@hawkeyexl/manni 4.31.0 → 4.32.0

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 (252) hide show
  1. package/README.md +1 -1
  2. package/dist/{batch-P6LTMOZP.js → batch-EXTFKUAM.js} +14 -14
  3. package/dist/{build-V5JPMFTR.js → build-GADI674Y.js} +14 -14
  4. package/dist/{calibrate-YS4NLIC3.js → calibrate-UC4DGHYL.js} +15 -15
  5. package/dist/{capture-YQDJSSKZ.js → capture-HIBYY5R3.js} +14 -14
  6. package/dist/{check-QAVEMKP2.js → check-F7HHGF3D.js} +11 -11
  7. package/dist/{check-OWGSBBU7.js → check-FQ7N5Z2F.js} +32 -32
  8. package/dist/check-KF453CLV.js +58 -0
  9. package/dist/{check-FVL7G5PJ.js → check-PPNKOK37.js} +13 -13
  10. package/dist/{check-TUP4RG7G.js → check-QA3FIAPV.js} +23 -23
  11. package/dist/{chunk-DO5CJVXR.js → chunk-2EA6MOCN.js} +3 -3
  12. package/dist/{chunk-TX7NPCCT.js → chunk-2HKNDIP3.js} +6 -6
  13. package/dist/{chunk-BKLXSWGX.js → chunk-2JQPC5RK.js} +7 -7
  14. package/dist/chunk-2JQPC5RK.js.map +1 -0
  15. package/dist/{chunk-NH4RQUSD.js → chunk-2KCIETVY.js} +4 -4
  16. package/dist/{chunk-MCUN2JP3.js → chunk-2YV6K44B.js} +6 -6
  17. package/dist/{chunk-BVQEOF23.js → chunk-3AB4UPAH.js} +3 -3
  18. package/dist/{chunk-X7UWDGQQ.js → chunk-3Q2GJERD.js} +6 -6
  19. package/dist/{chunk-KWK6VVK2.js → chunk-3SHTLHQ6.js} +5 -5
  20. package/dist/{chunk-D2N3SAV6.js → chunk-3WUATOHK.js} +4 -4
  21. package/dist/{chunk-YT55M4VQ.js → chunk-5LLPUOYC.js} +6 -6
  22. package/dist/{chunk-CEPNSI4V.js → chunk-5YCFOK6Y.js} +2 -2
  23. package/dist/{chunk-FJZZYY7Q.js → chunk-6SB3IQWD.js} +9 -9
  24. package/dist/{chunk-P676AEK6.js → chunk-7PMYQS5K.js} +5 -5
  25. package/dist/{cli-NKGQZKXS.js → chunk-A2KXDBRL.js} +177 -227
  26. package/dist/chunk-A2KXDBRL.js.map +1 -0
  27. package/dist/{chunk-INDMEKFB.js → chunk-B5DAXZLE.js} +7 -7
  28. package/dist/{chunk-7URMU7S5.js → chunk-BHVVKRVV.js} +2 -2
  29. package/dist/{chunk-ZGLLJSL7.js → chunk-C3WYV3L4.js} +3 -3
  30. package/dist/{chunk-SORYKTNP.js → chunk-CWDUIJJX.js} +2 -2
  31. package/dist/{chunk-SORYKTNP.js.map → chunk-CWDUIJJX.js.map} +1 -1
  32. package/dist/{chunk-66A5PPWF.js → chunk-DUKZLNBC.js} +4 -4
  33. package/dist/{chunk-CCBIO2CB.js → chunk-DVHVNTP7.js} +2 -2
  34. package/dist/{chunk-4JDOHAHR.js → chunk-EESOMRVW.js} +7 -7
  35. package/dist/{chunk-CY4RNLFN.js → chunk-EOFXK7ON.js} +3 -3
  36. package/dist/{chunk-TE6SQVNO.js → chunk-GC7FAGRL.js} +10 -10
  37. package/dist/{chunk-STPT3WEC.js → chunk-GEA5SVJU.js} +8 -8
  38. package/dist/{chunk-ZZGHTXZ2.js → chunk-GY3RMN64.js} +2 -2
  39. package/dist/{chunk-YH6MWLDA.js → chunk-GYEP6KX7.js} +2 -2
  40. package/dist/{chunk-AD7IRC5T.js → chunk-HD4IZVVX.js} +3 -3
  41. package/dist/{chunk-SPYYVEWP.js → chunk-HG7O47EK.js} +13 -11
  42. package/dist/chunk-HG7O47EK.js.map +1 -0
  43. package/dist/{chunk-672TCM2Q.js → chunk-IFHB4QBS.js} +5 -5
  44. package/dist/{chunk-DSHAY6YM.js → chunk-IPS3B5WV.js} +3 -3
  45. package/dist/{chunk-GWOVEW53.js → chunk-J2PUJFA4.js} +5 -5
  46. package/dist/{chunk-WX77JHTU.js → chunk-J6QJ7T6M.js} +4 -4
  47. package/dist/{chunk-JVZAJBSS.js → chunk-JXGJLJOP.js} +2 -2
  48. package/dist/{chunk-ZY2XP3AS.js → chunk-KJOF3TAE.js} +14 -14
  49. package/dist/{chunk-R64PJYCT.js → chunk-KU7MRVTB.js} +2 -2
  50. package/dist/{chunk-MQ34D4OP.js → chunk-L7WBKQ2R.js} +4 -4
  51. package/dist/{chunk-HVYVIGBP.js → chunk-MBPDZWYI.js} +457 -366
  52. package/dist/chunk-MBPDZWYI.js.map +1 -0
  53. package/dist/{chunk-N7VIVL42.js → chunk-MRFSWEJA.js} +2 -2
  54. package/dist/{chunk-BTFXOKCP.js → chunk-MSLBEN74.js} +2 -2
  55. package/dist/chunk-NFZE4MXL.js +14 -0
  56. package/dist/chunk-NFZE4MXL.js.map +1 -0
  57. package/dist/{chunk-I52GL7N6.js → chunk-OILHKIBL.js} +3 -3
  58. package/dist/{chunk-EZBWGI25.js → chunk-PKLRFHO5.js} +2 -2
  59. package/dist/{chunk-AXSCHC34.js → chunk-POPJ4INH.js} +94 -169
  60. package/dist/chunk-POPJ4INH.js.map +1 -0
  61. package/dist/{chunk-7S6H5UML.js → chunk-PXUAUKLB.js} +3 -3
  62. package/dist/{chunk-VKAE3W6H.js → chunk-Q6INPRTC.js} +5 -5
  63. package/dist/{chunk-CDX4QK6O.js → chunk-QMYR4OI5.js} +29 -2
  64. package/dist/chunk-QMYR4OI5.js.map +1 -0
  65. package/dist/{chunk-KPQFF62T.js → chunk-QVDRRK5K.js} +4 -4
  66. package/dist/{chunk-BBIEWUO6.js → chunk-RC7TM74Z.js} +7 -7
  67. package/dist/{chunk-ZMFSFXQX.js → chunk-RNXOPBBD.js} +9 -9
  68. package/dist/{chunk-2NB7MT5I.js → chunk-RRXIIMKU.js} +3 -3
  69. package/dist/{chunk-66U7KHZE.js → chunk-RV5GZTXH.js} +6 -6
  70. package/dist/{chunk-M5HDMQCI.js → chunk-SHTMF6PC.js} +3 -4
  71. package/dist/chunk-SHTMF6PC.js.map +1 -0
  72. package/dist/{chunk-GTT7EQEV.js → chunk-SMQMGAP3.js} +2 -2
  73. package/dist/{chunk-2KGDXZMS.js → chunk-SVUF42MI.js} +3 -3
  74. package/dist/{chunk-F6FDIOKE.js → chunk-TZOBQ3TA.js} +3 -3
  75. package/dist/{chunk-DLIQJJAE.js → chunk-UKWWA4T7.js} +2 -2
  76. package/dist/{chunk-BR6NGHRG.js → chunk-UMCTYM7L.js} +3 -3
  77. package/dist/{chunk-DOXZ3U4O.js → chunk-VLUJ46LV.js} +11 -11
  78. package/dist/{chunk-ICUKYSPX.js → chunk-VQ3FZVNM.js} +2 -2
  79. package/dist/{chunk-AXIYZIHN.js → chunk-WWP6Y7S7.js} +4 -4
  80. package/dist/{chunk-MREXYXMW.js → chunk-WX7NURTP.js} +8 -8
  81. package/dist/{chunk-XIEUUETR.js → chunk-XWVXPXWI.js} +4 -4
  82. package/dist/{chunk-Z7HBBFSZ.js → chunk-YAPFEDGW.js} +5 -5
  83. package/dist/{chunk-LU6HSA2N.js → chunk-Z6T7UX7R.js} +70 -33
  84. package/dist/chunk-Z6T7UX7R.js.map +1 -0
  85. package/dist/{chunk-J7OFPDCD.js → chunk-ZIXRI5XY.js} +4 -4
  86. package/dist/{chunk-3WX73ME2.js → chunk-ZWL5ST2M.js} +2 -2
  87. package/dist/{cli-TA2IQRYK.js → cli-5UAQT4OU.js} +8 -8
  88. package/dist/{cli-XVJ5G4EO.js → cli-67XDE7Q7.js} +27 -27
  89. package/dist/{cli-YKM5YZHY.js → cli-EDXJFE5T.js} +3 -3
  90. package/dist/{cli-UAM4MBRM.js → cli-GJ6GRHZN.js} +18 -18
  91. package/dist/{cli-R5XYFIOY.js → cli-LQFBUP6H.js} +15 -15
  92. package/dist/{cli-7TW4HTQN.js → cli-MXEFSQJC.js} +13 -13
  93. package/dist/{cli-T2AZSUSY.js → cli-OZ4YL6WS.js} +22 -22
  94. package/dist/{cli-ME4U7S7Q.js → cli-PG6Z6YXW.js} +28 -28
  95. package/dist/cli-SSK7GS43.js +80 -0
  96. package/dist/cli-TIQNAQJA.js +133 -0
  97. package/dist/cli-TIQNAQJA.js.map +1 -0
  98. package/dist/{cli-5NIVQZIE.js → cli-W7QU573I.js} +27 -27
  99. package/dist/{cli-BG6WXYWT.js → cli-XXJQS3F3.js} +59 -54
  100. package/dist/cli-XXJQS3F3.js.map +1 -0
  101. package/dist/cli.js +21 -15
  102. package/dist/cli.js.map +1 -1
  103. package/dist/{config-Z3FYLJ6X.js → config-ISXGJ4XM.js} +3 -3
  104. package/dist/docmeta.js +7 -7
  105. package/dist/{github-SQ2ATTLV.js → github-IKC7EPZ6.js} +11 -11
  106. package/dist/{github-X6F2FQL3.js → github-LUJDHQRN.js} +13 -13
  107. package/dist/github-Z6S7HS6X.js +49 -0
  108. package/dist/graph/embed.d.ts +1 -1
  109. package/dist/graph/embed.js.map +1 -1
  110. package/dist/graph/runtime.d.ts +2 -2
  111. package/dist/graph/runtime.js +4 -4
  112. package/dist/graph/runtime.js.map +1 -1
  113. package/dist/index.d.ts +801 -786
  114. package/dist/index.js +77 -66
  115. package/dist/index.js.map +1 -1
  116. package/dist/{json-L7QDREEX.js → json-FBYXDIQQ.js} +11 -11
  117. package/dist/{json-NSLJFPWD.js → json-OZKTEKPS.js} +14 -14
  118. package/dist/{labels-C4HCKZMZ.js → labels-MFHU6ZPR.js} +10 -10
  119. package/dist/{lint-ODALAI2I.js → lint-2TA4DFLT.js} +11 -11
  120. package/dist/{list-4JLKJOGX.js → list-3RIITWCX.js} +25 -25
  121. package/dist/{list-TQK3FWC2.js → list-JLBUOBV5.js} +13 -13
  122. package/dist/{list-CAE7T5HA.js → list-YO3W3VKA.js} +11 -11
  123. package/dist/{page-GB5LHRHX.js → page-4MZGF2N2.js} +10 -10
  124. package/dist/{prepare-VCJRE3EY.js → prepare-PKGPBUNT.js} +17 -17
  125. package/dist/{pretty-KZPED6KN.js → pretty-7PT7ETKZ.js} +23 -23
  126. package/dist/{pretty-GP4R3UII.js → pretty-YHIPZV5I.js} +11 -11
  127. package/dist/{pretty-GXLKMUT4.js → pretty-YIWBO6C3.js} +13 -13
  128. package/dist/{release-EFLQT3FW.js → release-VQQXI4XB.js} +4 -4
  129. package/dist/{reporters-GGP4YLIM.js → reporters-QJ7QC3XA.js} +10 -10
  130. package/dist/{reporters-GQ2PUWQA.js → reporters-ZUKUAWKX.js} +5 -5
  131. package/dist/{run-SVH32CBO.js → run-ZK6EY5V7.js} +25 -25
  132. package/dist/sarif-HYGCKXCT.js +50 -0
  133. package/dist/{sarif-UHZD2CJ3.js → sarif-PIUCN7PT.js} +9 -9
  134. package/dist/{sarif-UG7F3WQD.js → sarif-YP2DCLLU.js} +9 -9
  135. package/dist/{strategy-Y4NEJRSH.js → strategy-E2YCBTAW.js} +20 -20
  136. package/dist/{term-LQ2F5WEN.js → term-RLQ6WZUD.js} +16 -16
  137. package/dist/{validate-6WBRKEV5.js → validate-OPLT7USL.js} +5 -5
  138. package/dist/validate-OPLT7USL.js.map +1 -0
  139. package/package.json +1 -1
  140. package/plugin/manni/.claude-plugin/plugin.json +1 -1
  141. package/dist/check-DVMU74U3.js +0 -58
  142. package/dist/chunk-AXSCHC34.js.map +0 -1
  143. package/dist/chunk-BKLXSWGX.js.map +0 -1
  144. package/dist/chunk-CDX4QK6O.js.map +0 -1
  145. package/dist/chunk-HVYVIGBP.js.map +0 -1
  146. package/dist/chunk-LU6HSA2N.js.map +0 -1
  147. package/dist/chunk-M5HDMQCI.js.map +0 -1
  148. package/dist/chunk-SPYYVEWP.js.map +0 -1
  149. package/dist/cli-BG6WXYWT.js.map +0 -1
  150. package/dist/cli-NKGQZKXS.js.map +0 -1
  151. package/dist/github-ZCA7TOJO.js +0 -49
  152. package/dist/sarif-CFQJ5HHP.js +0 -50
  153. /package/dist/{batch-P6LTMOZP.js.map → batch-EXTFKUAM.js.map} +0 -0
  154. /package/dist/{build-V5JPMFTR.js.map → build-GADI674Y.js.map} +0 -0
  155. /package/dist/{calibrate-YS4NLIC3.js.map → calibrate-UC4DGHYL.js.map} +0 -0
  156. /package/dist/{capture-YQDJSSKZ.js.map → capture-HIBYY5R3.js.map} +0 -0
  157. /package/dist/{check-DVMU74U3.js.map → check-F7HHGF3D.js.map} +0 -0
  158. /package/dist/{check-OWGSBBU7.js.map → check-FQ7N5Z2F.js.map} +0 -0
  159. /package/dist/{check-FVL7G5PJ.js.map → check-KF453CLV.js.map} +0 -0
  160. /package/dist/{check-QAVEMKP2.js.map → check-PPNKOK37.js.map} +0 -0
  161. /package/dist/{check-TUP4RG7G.js.map → check-QA3FIAPV.js.map} +0 -0
  162. /package/dist/{chunk-DO5CJVXR.js.map → chunk-2EA6MOCN.js.map} +0 -0
  163. /package/dist/{chunk-TX7NPCCT.js.map → chunk-2HKNDIP3.js.map} +0 -0
  164. /package/dist/{chunk-NH4RQUSD.js.map → chunk-2KCIETVY.js.map} +0 -0
  165. /package/dist/{chunk-MCUN2JP3.js.map → chunk-2YV6K44B.js.map} +0 -0
  166. /package/dist/{chunk-BVQEOF23.js.map → chunk-3AB4UPAH.js.map} +0 -0
  167. /package/dist/{chunk-X7UWDGQQ.js.map → chunk-3Q2GJERD.js.map} +0 -0
  168. /package/dist/{chunk-KWK6VVK2.js.map → chunk-3SHTLHQ6.js.map} +0 -0
  169. /package/dist/{chunk-D2N3SAV6.js.map → chunk-3WUATOHK.js.map} +0 -0
  170. /package/dist/{chunk-YT55M4VQ.js.map → chunk-5LLPUOYC.js.map} +0 -0
  171. /package/dist/{chunk-CEPNSI4V.js.map → chunk-5YCFOK6Y.js.map} +0 -0
  172. /package/dist/{chunk-FJZZYY7Q.js.map → chunk-6SB3IQWD.js.map} +0 -0
  173. /package/dist/{chunk-P676AEK6.js.map → chunk-7PMYQS5K.js.map} +0 -0
  174. /package/dist/{chunk-INDMEKFB.js.map → chunk-B5DAXZLE.js.map} +0 -0
  175. /package/dist/{chunk-7URMU7S5.js.map → chunk-BHVVKRVV.js.map} +0 -0
  176. /package/dist/{chunk-ZGLLJSL7.js.map → chunk-C3WYV3L4.js.map} +0 -0
  177. /package/dist/{chunk-66A5PPWF.js.map → chunk-DUKZLNBC.js.map} +0 -0
  178. /package/dist/{chunk-CCBIO2CB.js.map → chunk-DVHVNTP7.js.map} +0 -0
  179. /package/dist/{chunk-4JDOHAHR.js.map → chunk-EESOMRVW.js.map} +0 -0
  180. /package/dist/{chunk-CY4RNLFN.js.map → chunk-EOFXK7ON.js.map} +0 -0
  181. /package/dist/{chunk-TE6SQVNO.js.map → chunk-GC7FAGRL.js.map} +0 -0
  182. /package/dist/{chunk-STPT3WEC.js.map → chunk-GEA5SVJU.js.map} +0 -0
  183. /package/dist/{chunk-ZZGHTXZ2.js.map → chunk-GY3RMN64.js.map} +0 -0
  184. /package/dist/{chunk-YH6MWLDA.js.map → chunk-GYEP6KX7.js.map} +0 -0
  185. /package/dist/{chunk-AD7IRC5T.js.map → chunk-HD4IZVVX.js.map} +0 -0
  186. /package/dist/{chunk-672TCM2Q.js.map → chunk-IFHB4QBS.js.map} +0 -0
  187. /package/dist/{chunk-DSHAY6YM.js.map → chunk-IPS3B5WV.js.map} +0 -0
  188. /package/dist/{chunk-GWOVEW53.js.map → chunk-J2PUJFA4.js.map} +0 -0
  189. /package/dist/{chunk-WX77JHTU.js.map → chunk-J6QJ7T6M.js.map} +0 -0
  190. /package/dist/{chunk-JVZAJBSS.js.map → chunk-JXGJLJOP.js.map} +0 -0
  191. /package/dist/{chunk-ZY2XP3AS.js.map → chunk-KJOF3TAE.js.map} +0 -0
  192. /package/dist/{chunk-R64PJYCT.js.map → chunk-KU7MRVTB.js.map} +0 -0
  193. /package/dist/{chunk-MQ34D4OP.js.map → chunk-L7WBKQ2R.js.map} +0 -0
  194. /package/dist/{chunk-N7VIVL42.js.map → chunk-MRFSWEJA.js.map} +0 -0
  195. /package/dist/{chunk-BTFXOKCP.js.map → chunk-MSLBEN74.js.map} +0 -0
  196. /package/dist/{chunk-I52GL7N6.js.map → chunk-OILHKIBL.js.map} +0 -0
  197. /package/dist/{chunk-EZBWGI25.js.map → chunk-PKLRFHO5.js.map} +0 -0
  198. /package/dist/{chunk-7S6H5UML.js.map → chunk-PXUAUKLB.js.map} +0 -0
  199. /package/dist/{chunk-VKAE3W6H.js.map → chunk-Q6INPRTC.js.map} +0 -0
  200. /package/dist/{chunk-KPQFF62T.js.map → chunk-QVDRRK5K.js.map} +0 -0
  201. /package/dist/{chunk-BBIEWUO6.js.map → chunk-RC7TM74Z.js.map} +0 -0
  202. /package/dist/{chunk-ZMFSFXQX.js.map → chunk-RNXOPBBD.js.map} +0 -0
  203. /package/dist/{chunk-2NB7MT5I.js.map → chunk-RRXIIMKU.js.map} +0 -0
  204. /package/dist/{chunk-66U7KHZE.js.map → chunk-RV5GZTXH.js.map} +0 -0
  205. /package/dist/{chunk-GTT7EQEV.js.map → chunk-SMQMGAP3.js.map} +0 -0
  206. /package/dist/{chunk-2KGDXZMS.js.map → chunk-SVUF42MI.js.map} +0 -0
  207. /package/dist/{chunk-F6FDIOKE.js.map → chunk-TZOBQ3TA.js.map} +0 -0
  208. /package/dist/{chunk-DLIQJJAE.js.map → chunk-UKWWA4T7.js.map} +0 -0
  209. /package/dist/{chunk-BR6NGHRG.js.map → chunk-UMCTYM7L.js.map} +0 -0
  210. /package/dist/{chunk-DOXZ3U4O.js.map → chunk-VLUJ46LV.js.map} +0 -0
  211. /package/dist/{chunk-ICUKYSPX.js.map → chunk-VQ3FZVNM.js.map} +0 -0
  212. /package/dist/{chunk-AXIYZIHN.js.map → chunk-WWP6Y7S7.js.map} +0 -0
  213. /package/dist/{chunk-MREXYXMW.js.map → chunk-WX7NURTP.js.map} +0 -0
  214. /package/dist/{chunk-XIEUUETR.js.map → chunk-XWVXPXWI.js.map} +0 -0
  215. /package/dist/{chunk-Z7HBBFSZ.js.map → chunk-YAPFEDGW.js.map} +0 -0
  216. /package/dist/{chunk-J7OFPDCD.js.map → chunk-ZIXRI5XY.js.map} +0 -0
  217. /package/dist/{chunk-3WX73ME2.js.map → chunk-ZWL5ST2M.js.map} +0 -0
  218. /package/dist/{cli-TA2IQRYK.js.map → cli-5UAQT4OU.js.map} +0 -0
  219. /package/dist/{cli-XVJ5G4EO.js.map → cli-67XDE7Q7.js.map} +0 -0
  220. /package/dist/{cli-YKM5YZHY.js.map → cli-EDXJFE5T.js.map} +0 -0
  221. /package/dist/{cli-UAM4MBRM.js.map → cli-GJ6GRHZN.js.map} +0 -0
  222. /package/dist/{cli-R5XYFIOY.js.map → cli-LQFBUP6H.js.map} +0 -0
  223. /package/dist/{cli-7TW4HTQN.js.map → cli-MXEFSQJC.js.map} +0 -0
  224. /package/dist/{cli-T2AZSUSY.js.map → cli-OZ4YL6WS.js.map} +0 -0
  225. /package/dist/{cli-ME4U7S7Q.js.map → cli-PG6Z6YXW.js.map} +0 -0
  226. /package/dist/{config-Z3FYLJ6X.js.map → cli-SSK7GS43.js.map} +0 -0
  227. /package/dist/{cli-5NIVQZIE.js.map → cli-W7QU573I.js.map} +0 -0
  228. /package/dist/{github-SQ2ATTLV.js.map → config-ISXGJ4XM.js.map} +0 -0
  229. /package/dist/{github-X6F2FQL3.js.map → github-IKC7EPZ6.js.map} +0 -0
  230. /package/dist/{github-ZCA7TOJO.js.map → github-LUJDHQRN.js.map} +0 -0
  231. /package/dist/{json-L7QDREEX.js.map → github-Z6S7HS6X.js.map} +0 -0
  232. /package/dist/{json-NSLJFPWD.js.map → json-FBYXDIQQ.js.map} +0 -0
  233. /package/dist/{lint-ODALAI2I.js.map → json-OZKTEKPS.js.map} +0 -0
  234. /package/dist/{labels-C4HCKZMZ.js.map → labels-MFHU6ZPR.js.map} +0 -0
  235. /package/dist/{list-4JLKJOGX.js.map → lint-2TA4DFLT.js.map} +0 -0
  236. /package/dist/{list-CAE7T5HA.js.map → list-3RIITWCX.js.map} +0 -0
  237. /package/dist/{list-TQK3FWC2.js.map → list-JLBUOBV5.js.map} +0 -0
  238. /package/dist/{page-GB5LHRHX.js.map → list-YO3W3VKA.js.map} +0 -0
  239. /package/dist/{pretty-GP4R3UII.js.map → page-4MZGF2N2.js.map} +0 -0
  240. /package/dist/{prepare-VCJRE3EY.js.map → prepare-PKGPBUNT.js.map} +0 -0
  241. /package/dist/{pretty-GXLKMUT4.js.map → pretty-7PT7ETKZ.js.map} +0 -0
  242. /package/dist/{pretty-KZPED6KN.js.map → pretty-YHIPZV5I.js.map} +0 -0
  243. /package/dist/{reporters-GGP4YLIM.js.map → pretty-YIWBO6C3.js.map} +0 -0
  244. /package/dist/{release-EFLQT3FW.js.map → release-VQQXI4XB.js.map} +0 -0
  245. /package/dist/{reporters-GQ2PUWQA.js.map → reporters-QJ7QC3XA.js.map} +0 -0
  246. /package/dist/{run-SVH32CBO.js.map → reporters-ZUKUAWKX.js.map} +0 -0
  247. /package/dist/{sarif-CFQJ5HHP.js.map → run-ZK6EY5V7.js.map} +0 -0
  248. /package/dist/{sarif-UG7F3WQD.js.map → sarif-HYGCKXCT.js.map} +0 -0
  249. /package/dist/{sarif-UHZD2CJ3.js.map → sarif-PIUCN7PT.js.map} +0 -0
  250. /package/dist/{strategy-Y4NEJRSH.js.map → sarif-YP2DCLLU.js.map} +0 -0
  251. /package/dist/{validate-6WBRKEV5.js.map → strategy-E2YCBTAW.js.map} +0 -0
  252. /package/dist/{term-LQ2F5WEN.js.map → term-RLQ6WZUD.js.map} +0 -0
@@ -2,13 +2,15 @@
2
2
  import {
3
3
  detectFramework,
4
4
  loadSiteConfig
5
- } from "./chunk-ZZGHTXZ2.js";
5
+ } from "./chunk-GY3RMN64.js";
6
6
  import {
7
+ buildGraph,
7
8
  canonicalLanguage,
8
9
  deriveGraph,
9
10
  termIndex
10
- } from "./chunk-SPYYVEWP.js";
11
+ } from "./chunk-HG7O47EK.js";
11
12
  import {
13
+ DEFAULT_MODEL,
12
14
  EmbedderUnavailableError,
13
15
  bodyOf,
14
16
  buildSearchIndex,
@@ -25,14 +27,15 @@ import {
25
27
  freshness,
26
28
  loadGraph,
27
29
  matchList,
30
+ parseGraph,
28
31
  partitionByLanguage,
29
32
  storeToQuads,
30
33
  validateGraph
31
- } from "./chunk-LU6HSA2N.js";
34
+ } from "./chunk-Z6T7UX7R.js";
32
35
  import {
33
36
  GraphIndex,
34
37
  encodeVectorIndex
35
- } from "./chunk-BKLXSWGX.js";
38
+ } from "./chunk-2JQPC5RK.js";
36
39
  import {
37
40
  COPIED_SHARE,
38
41
  EVALS_ARE_AUTHOR_FACING,
@@ -44,18 +47,17 @@ import {
44
47
  questionKey,
45
48
  readQuestionFile,
46
49
  withExternalMetadata
47
- } from "./chunk-AXIYZIHN.js";
50
+ } from "./chunk-WWP6Y7S7.js";
48
51
  import {
49
52
  LOCALIZATIONS_FILENAME,
50
53
  UNDETERMINED,
51
54
  canonicalLanguageTag,
52
55
  emitLocalizations,
53
56
  isLanguageTag,
54
- isSafeRelativePath,
55
57
  parseLocalizations,
56
58
  searchIndexFilename,
57
59
  vectorIndexFilename
58
- } from "./chunk-M5HDMQCI.js";
60
+ } from "./chunk-SHTMF6PC.js";
59
61
  import {
60
62
  COVERAGE_FIELDS,
61
63
  GRAPH_NOT_APPLICABLE_TO_VARIANT,
@@ -104,12 +106,12 @@ import {
104
106
  parseContexts,
105
107
  resolveDocumentSet,
106
108
  routesFrom
107
- } from "./chunk-AXSCHC34.js";
109
+ } from "./chunk-POPJ4INH.js";
108
110
  import {
109
111
  mergeMetaProvenance,
110
112
  readRecord,
111
113
  splitBody
112
- } from "./chunk-672TCM2Q.js";
114
+ } from "./chunk-IFHB4QBS.js";
113
115
  import {
114
116
  findWindows,
115
117
  isMissing,
@@ -118,7 +120,7 @@ import {
118
120
  pinOfLines,
119
121
  spellLines,
120
122
  spliceManifestValue
121
- } from "./chunk-ZGLLJSL7.js";
123
+ } from "./chunk-C3WYV3L4.js";
122
124
  import {
123
125
  termLabelSource
124
126
  } from "./chunk-DSWKBZWW.js";
@@ -126,7 +128,11 @@ import {
126
128
  DocmetaError,
127
129
  urlManifestMessage,
128
130
  writeFileAtomic
129
- } from "./chunk-2NB7MT5I.js";
131
+ } from "./chunk-RRXIIMKU.js";
132
+ import {
133
+ findConfigFileSync,
134
+ readConfigFileSync
135
+ } from "./chunk-QMYR4OI5.js";
130
136
  import {
131
137
  noticeOnce,
132
138
  warn
@@ -143,6 +149,7 @@ import {
143
149
  selectProvider
144
150
  } from "./chunk-NVYDWVXN.js";
145
151
  import {
152
+ ToolError,
146
153
  errorMessage
147
154
  } from "./chunk-G3T47CFV.js";
148
155
 
@@ -334,8 +341,8 @@ var MEDIA_TYPES = {
334
341
  ".fltoc": "application/xml",
335
342
  ".flbrs": "application/xml"
336
343
  };
337
- function mediaTypeOf(path2) {
338
- return MEDIA_TYPES[extname(path2).toLowerCase()] ?? "text/markdown";
344
+ function mediaTypeOf(path) {
345
+ return MEDIA_TYPES[extname(path).toLowerCase()] ?? "text/markdown";
339
346
  }
340
347
  var CARRIED = [
341
348
  IIRDS_HAS_TOPIC_TYPE,
@@ -379,25 +386,25 @@ function projectPackage(store, opts, cwd) {
379
386
  if (title) add(doc, IIRDS_TITLE, lit(title));
380
387
  const language = firstObject(store, doc, `${NS.dcterms}language`);
381
388
  if (language) add(doc, IIRDS_LANGUAGE, lit(language));
382
- const path2 = firstObject(store, doc, `${NS.graph}path`);
383
- if (path2) {
384
- if (escapesArchiveRoot(path2)) {
389
+ const path = firstObject(store, doc, `${NS.graph}path`);
390
+ if (path) {
391
+ if (escapesArchiveRoot(path)) {
385
392
  throw new GraphError(
386
- `Cannot package "${path2}": an iiRDS package has one root, and a path that climbs above it has no place inside it. Re-run \`manni graph build\` from a directory that contains every document, then export again.`
393
+ `Cannot package "${path}": an iiRDS package has one root, and a path that climbs above it has no place inside it. Re-run \`manni graph build\` from a directory that contains every document, then export again.`
387
394
  );
388
395
  }
389
- const absPath = resolve(cwd, path2);
396
+ const absPath = resolve(cwd, path);
390
397
  if (!existsSync(absPath)) {
391
398
  throw new GraphError(
392
- `Content file for ${path2} not found at ${absPath} \u2014 re-run \`manni graph build\`, or the source moved.`
399
+ `Content file for ${path} not found at ${absPath} \u2014 re-run \`manni graph build\`, or the source moved.`
393
400
  );
394
401
  }
395
- const zipPath = `content/${path2}`;
402
+ const zipPath = `content/${path}`;
396
403
  const rendition = `${doc}/rendition`;
397
404
  add(doc, IIRDS_HAS_RENDITION, iri(rendition));
398
405
  add(rendition, RDF_TYPE, iri(IIRDS_RENDITION));
399
406
  add(rendition, IIRDS_SOURCE, lit(zipPath));
400
- add(rendition, IIRDS_FORMAT, lit(mediaTypeOf(path2)));
407
+ add(rendition, IIRDS_FORMAT, lit(mediaTypeOf(path)));
401
408
  contentFiles.push({ zipPath, absPath });
402
409
  } else {
403
410
  warnings.push(
@@ -451,11 +458,11 @@ function urlStyle(framework) {
451
458
  if (framework === "Flare") return "htm";
452
459
  return "slash";
453
460
  }
454
- function routeOf(path2, routes, style) {
455
- const holders = routes.filter((r) => r.root === "" || path2.startsWith(`${r.root}/`));
461
+ function routeOf(path, routes, style) {
462
+ const holders = routes.filter((r) => r.root === "" || path.startsWith(`${r.root}/`));
456
463
  const route = holders.sort((a, b) => b.root.length - a.root.length)[0];
457
464
  if (route === void 0) return void 0;
458
- const rest = (route.root === "" ? path2 : path2.slice(route.root.length + 1)).replace(/\.[^./]+$/, "");
465
+ const rest = (route.root === "" ? path : path.slice(route.root.length + 1)).replace(/\.[^./]+$/, "");
459
466
  const segments = rest.split("/");
460
467
  const last = segments[segments.length - 1] ?? "";
461
468
  const index = route.indexFiles.includes(last);
@@ -494,10 +501,10 @@ async function exportLlms(opts) {
494
501
  const pages = [];
495
502
  let missing = 0;
496
503
  for (const doc of graph.instancesOf(`${NS.graph}Document`)) {
497
- const path2 = graph.literal(doc, `${NS.graph}path`);
498
- if (path2 === void 0 || path2 === STDIN_PATH) continue;
499
- const abs = resolve2(sources, path2);
500
- if (existsSync2(abs)) pages.push({ doc, path: path2, content: readFileSync(abs, "utf8") });
504
+ const path = graph.literal(doc, `${NS.graph}path`);
505
+ if (path === void 0 || path === STDIN_PATH) continue;
506
+ const abs = resolve2(sources, path);
507
+ if (existsSync2(abs)) pages.push({ doc, path, content: readFileSync(abs, "utf8") });
501
508
  else missing += 1;
502
509
  }
503
510
  pages.sort((a, b) => byCodeUnit(a.path, b.path));
@@ -554,8 +561,8 @@ var EXTENSION = {
554
561
  jsonld: ".jsonld",
555
562
  iirds: ".iirds"
556
563
  };
557
- function withExtension(path2, ext) {
558
- return path2.replace(/\.[^./\\]*$/, "") + ext;
564
+ function withExtension(path, ext) {
565
+ return path.replace(/\.[^./\\]*$/, "") + ext;
559
566
  }
560
567
  function runJsonLd(cwd, graphPath, out) {
561
568
  const store = loadGraph(graphPath);
@@ -600,16 +607,18 @@ function searchIndexDigest(raw) {
600
607
  return `sha256:${createHash("sha256").update(raw, "utf8").digest("hex")}`;
601
608
  }
602
609
  async function runSearchIndex(cwd, sources, graphPath, out, context) {
603
- const store = loadGraph(graphPath);
610
+ const outDir = out ? resolve3(cwd, out) : dirname2(graphPath);
611
+ return writeSearchIndex(loadGraph(graphPath), sources, outDir, { context });
612
+ }
613
+ async function writeSearchIndex(store, sources, outDir, options) {
604
614
  const graph = GraphIndex.fromQuads(
605
615
  storeToQuads(store),
606
616
  Object.fromEntries(PREFIXES)
607
617
  );
608
618
  const warnings = [];
609
- const index = await buildSearchIndex(graph, sources, { warnings, context });
619
+ const index = await buildSearchIndex(graph, sources, { warnings, ...options });
610
620
  const byLanguage = partitionByLanguage(graph, index);
611
621
  const docCounts = documentsByLanguage(graph);
612
- const outDir = out ? resolve3(cwd, out) : dirname2(graphPath);
613
622
  mkdirSync2(outDir, { recursive: true });
614
623
  const languages = [];
615
624
  for (const [language, doc] of byLanguage) {
@@ -825,7 +834,7 @@ function frontmatterKind(content) {
825
834
  if (/^(\+\+\+|;;;)(\r?\n)/.test(body)) return "unsupported";
826
835
  return "none";
827
836
  }
828
- function splitYamlFrontmatter(content, path2) {
837
+ function splitYamlFrontmatter(content, path) {
829
838
  const bom = content.charCodeAt(0) === 65279 ? content.slice(0, 1) : "";
830
839
  const body = bom ? content.slice(1) : content;
831
840
  const openMatch = /^---(\r?\n)/.exec(body);
@@ -846,7 +855,7 @@ function splitYamlFrontmatter(content, path2) {
846
855
  }
847
856
  offset += line.length;
848
857
  }
849
- throw new GraphError(`${path2}: unterminated frontmatter block`);
858
+ throw new GraphError(`${path}: unterminated frontmatter block`);
850
859
  }
851
860
  function flowSeqs(node) {
852
861
  if (node instanceof YAMLSeq) {
@@ -861,7 +870,7 @@ function setField(doc, map, field, value) {
861
870
  flowSeqs(node);
862
871
  map.set(field, node);
863
872
  }
864
- function applyGraphFields(content, path2, values, options = {}) {
873
+ function applyGraphFields(content, path, values, options = {}) {
865
874
  const entries = writable(values);
866
875
  const pageEntries = Object.entries(options.page ?? {});
867
876
  if (entries.length === 0 && pageEntries.length === 0) {
@@ -869,10 +878,10 @@ function applyGraphFields(content, path2, values, options = {}) {
869
878
  }
870
879
  if (frontmatterKind(content) === "unsupported") {
871
880
  throw new GraphError(
872
- `${path2}: only YAML frontmatter can be edited (found a TOML/JSON fence)`
881
+ `${path}: only YAML frontmatter can be edited (found a TOML/JSON fence)`
873
882
  );
874
883
  }
875
- const split = splitYamlFrontmatter(content, path2);
884
+ const split = splitYamlFrontmatter(content, path);
876
885
  if (split === null) {
877
886
  const eol = content.includes("\r\n") ? "\r\n" : "\n";
878
887
  const nested = {};
@@ -902,12 +911,12 @@ function applyGraphFields(content, path2, values, options = {}) {
902
911
  const doc = parseDocument(split.block);
903
912
  if (doc.errors.length > 0) {
904
913
  throw new GraphError(
905
- `${path2}: cannot edit frontmatter \u2014 ${doc.errors[0]?.message ?? "parse error"}`
914
+ `${path}: cannot edit frontmatter \u2014 ${doc.errors[0]?.message ?? "parse error"}`
906
915
  );
907
916
  }
908
917
  let graph = doc.get("graph", true);
909
918
  if (graph !== void 0 && !isMap(graph)) {
910
- throw new GraphError(`${path2}: frontmatter key "graph" is not a map`);
919
+ throw new GraphError(`${path}: frontmatter key "graph" is not a map`);
911
920
  }
912
921
  if (graph === void 0 && entries.length > 0) {
913
922
  graph = doc.createNode({});
@@ -980,9 +989,9 @@ function mergeFields(doc, graphMap, entries, force) {
980
989
  }
981
990
  return { applied, skipped };
982
991
  }
983
- function writeGraphFields(content, path2, format, values, options = {}) {
992
+ function writeGraphFields(content, path, format, values, options = {}) {
984
993
  if (format === "markdown" || format === "mdx") {
985
- return applyGraphFields(content, path2, values, options);
994
+ return applyGraphFields(content, path, values, options);
986
995
  }
987
996
  const entries = writable(values);
988
997
  const patch = {};
@@ -990,10 +999,10 @@ function writeGraphFields(content, path2, format, values, options = {}) {
990
999
  let skipped = [];
991
1000
  if (entries.length > 0) {
992
1001
  const doc = new Document(
993
- metadataOf(content, path2, format).data[GRAPH_KEY] ?? {}
1002
+ metadataOf(content, path, format).data[GRAPH_KEY] ?? {}
994
1003
  );
995
1004
  if (!isMap(doc.contents)) {
996
- throw new GraphError(`${path2}: metadata key "graph" is not a map`);
1005
+ throw new GraphError(`${path}: metadata key "graph" is not a map`);
997
1006
  }
998
1007
  ({ applied, skipped } = mergeFields(
999
1008
  doc,
@@ -1007,9 +1016,9 @@ function writeGraphFields(content, path2, format, values, options = {}) {
1007
1016
  if (Object.keys(patch).length === 0) return { content, applied, skipped };
1008
1017
  const apply = extractorFor(format)?.apply;
1009
1018
  if (apply === void 0) {
1010
- throw new GraphError(`${path2}: manni cannot write ${format} metadata`);
1019
+ throw new GraphError(`${path}: manni cannot write ${format} metadata`);
1011
1020
  }
1012
- return { content: apply(content, patch, { filePath: path2 }), applied, skipped };
1021
+ return { content: apply(content, patch, { filePath: path }), applied, skipped };
1013
1022
  }
1014
1023
  function frontmatterData(content) {
1015
1024
  const split = splitYamlFrontmatter(content, "");
@@ -1123,19 +1132,19 @@ var FillGuard = class _FillGuard {
1123
1132
  force
1124
1133
  );
1125
1134
  const byExtension = { routes: config.routes, context };
1126
- for (const path2 of all) {
1135
+ for (const path of all) {
1127
1136
  try {
1128
1137
  guard.models.set(
1129
- path2,
1138
+ path,
1130
1139
  await analyzeDoc(
1131
- inline.get(path2) ?? readFileSync3(resolve5(cwd, path2), "utf8"),
1132
- path2,
1140
+ inline.get(path) ?? readFileSync3(resolve5(cwd, path), "utf8"),
1141
+ path,
1133
1142
  guard.allPaths,
1134
- inputs.has(path2) ? guard.analyzeOptions : byExtension
1143
+ inputs.has(path) ? guard.analyzeOptions : byExtension
1135
1144
  )
1136
1145
  );
1137
1146
  } catch {
1138
- guard.unreadable.push(path2);
1147
+ guard.unreadable.push(path);
1139
1148
  }
1140
1149
  }
1141
1150
  guard.unreadable.sort(byCodeUnit);
@@ -1143,8 +1152,8 @@ var FillGuard = class _FillGuard {
1143
1152
  }
1144
1153
  buildStore(override) {
1145
1154
  const models = [];
1146
- for (const [path2, model] of this.models) {
1147
- models.push(override && path2 === override.path ? override.model : model);
1155
+ for (const [path, model] of this.models) {
1156
+ models.push(override && path === override.path ? override.model : model);
1148
1157
  }
1149
1158
  return toStore(
1150
1159
  deriveGraph(models, { baseIri: this.baseIri, derive: this.sources })
@@ -1200,7 +1209,7 @@ var FillGuard = class _FillGuard {
1200
1209
  * reject the proposed label (an LLM must not introduce a second
1201
1210
  * spelling of an existing concept).
1202
1211
  */
1203
- async vet(path2, content, values) {
1212
+ async vet(path, content, values) {
1204
1213
  const current = { ...values };
1205
1214
  const rejected = [];
1206
1215
  const guardedLeaves = new Set(GUARDED_FIELDS);
@@ -1212,19 +1221,19 @@ var FillGuard = class _FillGuard {
1212
1221
  while (guarded().length > 0) {
1213
1222
  const applied = writeGraphFields(
1214
1223
  content,
1215
- path2,
1216
- formatOf(path2, this.analyzeOptions.format),
1224
+ path,
1225
+ formatOf(path, this.analyzeOptions.format),
1217
1226
  current,
1218
1227
  { force: this.force }
1219
1228
  );
1220
1229
  const model = await analyzeDoc(
1221
1230
  applied.content,
1222
- path2,
1231
+ path,
1223
1232
  this.allPaths,
1224
1233
  this.analyzeOptions
1225
1234
  );
1226
1235
  const findings = await validateGraph(
1227
- this.buildStore({ path: path2, model }),
1236
+ this.buildStore({ path, model }),
1228
1237
  this.shapesPaths
1229
1238
  );
1230
1239
  const introduced = findings.filter(
@@ -1256,10 +1265,10 @@ var FillGuard = class _FillGuard {
1256
1265
  return { values: current, rejected };
1257
1266
  }
1258
1267
  /** Fold an accepted (written or would-be-written) doc into guard state. */
1259
- async commit(path2, content) {
1268
+ async commit(path, content) {
1260
1269
  this.models.set(
1261
- path2,
1262
- await analyzeDoc(content, path2, this.allPaths, this.analyzeOptions)
1270
+ path,
1271
+ await analyzeDoc(content, path, this.allPaths, this.analyzeOptions)
1263
1272
  );
1264
1273
  this.baselineKeys = null;
1265
1274
  }
@@ -1692,8 +1701,8 @@ function locateQuote(body, quote) {
1692
1701
  const twice = folded.indexOf(wanted, found + wanted.length) >= 0;
1693
1702
  return { start: lineAt(start), end: lineAt(end), ...twice ? { ambiguous: true } : {} };
1694
1703
  }
1695
- function twiceWarning(path2, question, lines) {
1696
- return `${path2}: the answer to "${question}" appears more than once, so ${spellLines(lines)} is pinned; check it is the right one.`;
1704
+ function twiceWarning(path, question, lines) {
1705
+ return `${path}: the answer to "${question}" appears more than once, so ${spellLines(lines)} is pinned; check it is the right one.`;
1697
1706
  }
1698
1707
  function pinFor(body, lines) {
1699
1708
  return { lines: lineSpec(lines), integrity: pinOfLines(body, lines) };
@@ -1727,9 +1736,9 @@ function settle(tracked) {
1727
1736
  });
1728
1737
  }
1729
1738
  async function fillPageQuestions(input) {
1730
- const { path: path2, format, content, settings, asker, known } = input;
1739
+ const { path, format, content, settings, asker, known } = input;
1731
1740
  const { body } = bodyOf(content, format);
1732
- const held = metadataOf(content, path2, format).data[QUESTIONS_KEY];
1741
+ const held = metadataOf(content, path, format).data[QUESTIONS_KEY];
1733
1742
  const raw = Array.isArray(held) ? held : held === void 0 ? [] : [held];
1734
1743
  const tracked = [];
1735
1744
  const warnings = [];
@@ -1785,7 +1794,7 @@ async function fillPageQuestions(input) {
1785
1794
  changed = true;
1786
1795
  } else if (fresh.state === "ambiguous") {
1787
1796
  warnings.push(
1788
- `${path2}: the answer to "${question}" moved, and ${matchList(fresh.ranges)}, so pin one of them by hand.`
1797
+ `${path}: the answer to "${question}" moved, and ${matchList(fresh.ranges)}, so pin one of them by hand.`
1789
1798
  );
1790
1799
  }
1791
1800
  }
@@ -1811,7 +1820,7 @@ async function fillPageQuestions(input) {
1811
1820
  if (!changed) {
1812
1821
  return { content, outcomes: settle(tracked), state, ...skipped ? { skipped } : {}, warnings };
1813
1822
  }
1814
- const write = () => writeGraphFields(content, path2, format, {}, { page: { [QUESTIONS_KEY]: items } }).content;
1823
+ const write = () => writeGraphFields(content, path, format, {}, { page: { [QUESTIONS_KEY]: items } }).content;
1815
1824
  let next = write();
1816
1825
  let before = body;
1817
1826
  for (let round = 0; ; round++) {
@@ -1819,7 +1828,7 @@ async function fillPageQuestions(input) {
1819
1828
  if (!relocate(pins, before, after)) break;
1820
1829
  if (round === 2) {
1821
1830
  next = write();
1822
- warnings.push(`${path2}: the answer pins did not settle, so check their lines.`);
1831
+ warnings.push(`${path}: the answer pins did not settle, so check their lines.`);
1823
1832
  break;
1824
1833
  }
1825
1834
  before = after;
@@ -1834,7 +1843,7 @@ async function fillPageQuestions(input) {
1834
1843
  };
1835
1844
  async function ask(model) {
1836
1845
  const request = {
1837
- path: path2,
1846
+ path,
1838
1847
  title: input.title,
1839
1848
  concepts: await input.concepts(),
1840
1849
  pair: needs.map((n) => n.question),
@@ -1862,7 +1871,7 @@ async function fillPageQuestions(input) {
1862
1871
  for (const c of candidates) {
1863
1872
  const lines = locateQuote(body, c.quote);
1864
1873
  if (lines !== void 0) {
1865
- if (lines.ambiguous) warnings.push(twiceWarning(path2, question, lines));
1874
+ if (lines.ambiguous) warnings.push(twiceWarning(path, question, lines));
1866
1875
  found = { lines: { start: lines.start, end: lines.end }, confidence: c.confidence };
1867
1876
  break;
1868
1877
  }
@@ -1902,7 +1911,7 @@ async function fillPageQuestions(input) {
1902
1911
  tracked.push({ action: "dropped", question, reason: "answer not on page" });
1903
1912
  continue;
1904
1913
  }
1905
- if (located.ambiguous) warnings.push(twiceWarning(path2, question, located));
1914
+ if (located.ambiguous) warnings.push(twiceWarning(path, question, located));
1906
1915
  const lines = { start: located.start, end: located.end };
1907
1916
  const key = questionKey(question);
1908
1917
  const asked = key === "" ? void 0 : known.get(key);
@@ -1931,15 +1940,15 @@ async function fillPageQuestions(input) {
1931
1940
  ...settings.writeProvenance ? { "generated-by": model.generatedBy, confidence } : {},
1932
1941
  reviewed: false
1933
1942
  });
1934
- if (key !== "") known.set(key, path2);
1943
+ if (key !== "") known.set(key, path);
1935
1944
  tracked.push({ action: "drafted", question, confidence, pin });
1936
1945
  accepted++;
1937
1946
  }
1938
1947
  return accepted > 0;
1939
1948
  }
1940
1949
  }
1941
- function questionsIn(content, path2, format) {
1942
- const held = metadataOf(content, path2, format).data[QUESTIONS_KEY];
1950
+ function questionsIn(content, path, format) {
1951
+ const held = metadataOf(content, path, format).data[QUESTIONS_KEY];
1943
1952
  const raw = Array.isArray(held) ? held : held === void 0 ? [] : [held];
1944
1953
  return raw.flatMap(
1945
1954
  (v) => typeof v === "string" ? [v] : isRecord(v) && typeof v.question === "string" ? [v.question] : []
@@ -2140,7 +2149,7 @@ async function runFill(opts = {}) {
2140
2149
  ])
2141
2150
  ];
2142
2151
  const inputs = new Set(files);
2143
- const formatFor = (path2) => inputs.has(path2) ? format : void 0;
2152
+ const formatFor = (path) => inputs.has(path) ? format : void 0;
2144
2153
  const mergeErrors = /* @__PURE__ */ new Map();
2145
2154
  const view = await openMetaViewPerPage(
2146
2155
  {
@@ -2154,33 +2163,33 @@ async function runFill(opts = {}) {
2154
2163
  );
2155
2164
  const mergedTexts = /* @__PURE__ */ new Map();
2156
2165
  const inline = /* @__PURE__ */ new Map();
2157
- for (const path2 of guardFiles) {
2158
- if (mergeErrors.has(path2)) continue;
2166
+ for (const path of guardFiles) {
2167
+ if (mergeErrors.has(path)) continue;
2159
2168
  let text;
2160
2169
  try {
2161
- text = readFileSync5(resolve7(base2, path2), "utf8");
2170
+ text = readFileSync5(resolve7(base2, path), "utf8");
2162
2171
  } catch (e) {
2163
- mergeErrors.set(path2, e);
2172
+ mergeErrors.set(path, e);
2164
2173
  continue;
2165
2174
  }
2166
2175
  let asMetaReadsIt;
2167
2176
  try {
2168
2177
  asMetaReadsIt = await mergedText(
2169
2178
  view,
2170
- path2,
2179
+ path,
2171
2180
  text,
2172
- formatOf(path2, formatFor(path2))
2181
+ formatOf(path, formatFor(path))
2173
2182
  );
2174
2183
  } catch (e) {
2175
- mergeErrors.set(path2, e);
2184
+ mergeErrors.set(path, e);
2176
2185
  continue;
2177
2186
  }
2178
- mergedTexts.set(path2, asMetaReadsIt);
2179
- if (asMetaReadsIt !== text) inline.set(path2, asMetaReadsIt);
2187
+ mergedTexts.set(path, asMetaReadsIt);
2188
+ if (asMetaReadsIt !== text) inline.set(path, asMetaReadsIt);
2180
2189
  }
2181
2190
  if (stdinContent !== void 0) inline.set(STDIN_PATH, stdinContent);
2182
2191
  const guard = !opts.noValidateGraph && config.fill.validateGraph ? await FillGuard.create(
2183
- guardFiles.filter((path2) => !mergeErrors.has(path2)),
2192
+ guardFiles.filter((path) => !mergeErrors.has(path)),
2184
2193
  base2,
2185
2194
  { ...config, routes: routesFrom(config, base2) },
2186
2195
  shapesPaths,
@@ -2194,8 +2203,8 @@ async function runFill(opts = {}) {
2194
2203
  ) : void 0;
2195
2204
  if (guard) {
2196
2205
  const leftOut = [
2197
- ...guardFiles.filter((path2) => !inputs.has(path2) && mergeErrors.has(path2)),
2198
- ...guard.unreadable.filter((path2) => !inputs.has(path2) && path2 !== STDIN_PATH)
2206
+ ...guardFiles.filter((path) => !inputs.has(path) && mergeErrors.has(path)),
2207
+ ...guard.unreadable.filter((path) => !inputs.has(path) && path !== STDIN_PATH)
2199
2208
  ].sort(byCodeUnit);
2200
2209
  if (leftOut.length > 0) {
2201
2210
  warn(
@@ -2215,10 +2224,10 @@ async function runFill(opts = {}) {
2215
2224
  ...[...mergedTexts].sort(([a], [b]) => byCodeUnit(a, b)),
2216
2225
  ...stdinContent === void 0 ? [] : [[STDIN_PATH, stdinContent]]
2217
2226
  ];
2218
- for (const [path2, text] of asked) {
2219
- for (const q of questionsIn(text, path2, formatOf(path2, formatFor(path2)))) {
2227
+ for (const [path, text] of asked) {
2228
+ for (const q of questionsIn(text, path, formatOf(path, formatFor(path)))) {
2220
2229
  const key = questionKey(q);
2221
- if (key !== "" && !known.has(key)) known.set(key, path2);
2230
+ if (key !== "" && !known.has(key)) known.set(key, path);
2222
2231
  }
2223
2232
  }
2224
2233
  for (const label of config.questionFiles) {
@@ -2290,21 +2299,21 @@ async function runFill(opts = {}) {
2290
2299
  }
2291
2300
  return [...out].map(([label, altLabels]) => ({ label, altLabels }));
2292
2301
  }
2293
- for (const path2 of files) {
2294
- const absPath = resolve7(base2, path2);
2302
+ for (const path of files) {
2303
+ const absPath = resolve7(base2, path);
2295
2304
  let content;
2296
2305
  try {
2297
2306
  content = readFileSync5(absPath, "utf8");
2298
2307
  } catch (e) {
2299
2308
  throw new GraphError(
2300
- `cannot read ${path2}: ${errorMessage(e)}`
2309
+ `cannot read ${path}: ${errorMessage(e)}`
2301
2310
  );
2302
2311
  }
2303
2312
  try {
2304
- results.push(await fillPage(path2, absPath, content));
2313
+ results.push(await fillPage(path, absPath, content));
2305
2314
  } catch (e) {
2306
2315
  results.push({
2307
- path: path2,
2316
+ path,
2308
2317
  status: "error",
2309
2318
  fields: [],
2310
2319
  preserved: [],
@@ -2371,16 +2380,16 @@ async function runFill(opts = {}) {
2371
2380
  exitCode: hasErrors ? 1 : 0,
2372
2381
  ...stdinDocument === void 0 ? {} : { stdinDocument }
2373
2382
  };
2374
- async function fillPage(path2, absPath, content) {
2375
- const { after, merged, ...result } = await fillOne(path2, absPath, content);
2383
+ async function fillPage(path, absPath, content) {
2384
+ const { after, merged, ...result } = await fillOne(path, absPath, content);
2376
2385
  if (!withQuestions) return result;
2377
- const pageFormat = formatOf(path2, format);
2378
- const data = metadataOf(merged ?? mergedTexts.get(path2) ?? content, path2, pageFormat).data;
2386
+ const pageFormat = formatOf(path, format);
2387
+ const data = metadataOf(merged ?? mergedTexts.get(path) ?? content, path, pageFormat).data;
2379
2388
  const pass = await fillPageQuestions({
2380
- path: path2,
2389
+ path,
2381
2390
  format: pageFormat,
2382
2391
  content: after ?? content,
2383
- title: typeof data["title"] === "string" ? data["title"] : path2,
2392
+ title: typeof data["title"] === "string" ? data["title"] : path,
2384
2393
  concepts: () => conceptsOf(data),
2385
2394
  settings: questionSettings,
2386
2395
  asker,
@@ -2410,22 +2419,22 @@ async function runFill(opts = {}) {
2410
2419
  }
2411
2420
  return { ...result, ...outcomes };
2412
2421
  }
2413
- async function fillOne(path2, absPath, content) {
2414
- const pageFormat = formatOf(path2, format);
2422
+ async function fillOne(path, absPath, content) {
2423
+ const pageFormat = formatOf(path, format);
2415
2424
  if ((pageFormat === "markdown" || pageFormat === "mdx") && frontmatterKind(content) === "unsupported") {
2416
2425
  throw new GraphError(
2417
2426
  "only YAML frontmatter can be edited (found a TOML/JSON fence) \u2014 exclude this file or convert its frontmatter"
2418
2427
  );
2419
2428
  }
2420
- const effective = absPath === void 0 ? content : mergedTexts.get(path2);
2429
+ const effective = absPath === void 0 ? content : mergedTexts.get(path);
2421
2430
  if (effective === void 0) {
2422
- const failure = mergeErrors.get(path2);
2431
+ const failure = mergeErrors.get(path);
2423
2432
  throw failure instanceof Error ? failure : new GraphError(errorMessage(failure));
2424
2433
  }
2425
2434
  if (absPath !== void 0) {
2426
- const own2 = metadataOf(content, path2, pageFormat).data;
2435
+ const own2 = metadataOf(content, path, pageFormat).data;
2427
2436
  if (GRAPH_KEY2 in own2) {
2428
- const home = await view.home(path2, own2, GRAPH_KEY2);
2437
+ const home = await view.home(path, own2, GRAPH_KEY2);
2429
2438
  if (home.kind !== "unowned") {
2430
2439
  throw new GraphError(
2431
2440
  `"${GRAPH_KEY2}" is owned by manifest ${home.file} (collection ${home.collection}); remove it from the document`
@@ -2433,7 +2442,7 @@ async function runFill(opts = {}) {
2433
2442
  }
2434
2443
  }
2435
2444
  }
2436
- const held = metadataOf(effective, path2, pageFormat).data;
2445
+ const held = metadataOf(effective, path, pageFormat).data;
2437
2446
  const heldGraph = held[GRAPH_KEY2];
2438
2447
  const present = new Set(
2439
2448
  heldGraph !== null && typeof heldGraph === "object" && !Array.isArray(heldGraph) ? Object.keys(heldGraph) : []
@@ -2441,7 +2450,7 @@ async function runFill(opts = {}) {
2441
2450
  const missing = opts.force ? fields : fields.filter((f) => !present.has(f));
2442
2451
  if (fields.length === 0 || missing.length === 0 && !withSections) {
2443
2452
  return {
2444
- path: path2,
2453
+ path,
2445
2454
  status: "complete",
2446
2455
  fields: [],
2447
2456
  preserved: [],
@@ -2450,7 +2459,7 @@ async function runFill(opts = {}) {
2450
2459
  }
2451
2460
  if (identity === void 0) {
2452
2461
  return {
2453
- path: path2,
2462
+ path,
2454
2463
  status: "skipped",
2455
2464
  reason: OFFLINE_REASON,
2456
2465
  fields: [],
@@ -2471,11 +2480,11 @@ async function runFill(opts = {}) {
2471
2480
  }
2472
2481
  const cached = proposal !== void 0;
2473
2482
  let docModel;
2474
- const doc = () => docModel ??= analyzeDoc(effective, path2, allPaths, analyzeOptions);
2483
+ const doc = () => docModel ??= analyzeDoc(effective, path, allPaths, analyzeOptions);
2475
2484
  if (proposal === void 0) {
2476
2485
  if (maxTurns !== null && turnsUsed >= maxTurns) {
2477
2486
  return {
2478
- path: path2,
2487
+ path,
2479
2488
  status: "skipped",
2480
2489
  reason: TURN_BUDGET_REASON,
2481
2490
  fields: [],
@@ -2551,7 +2560,7 @@ async function runFill(opts = {}) {
2551
2560
  const lowConf = lowConfidence.length > 0 ? { lowConfidence } : {};
2552
2561
  let rejected;
2553
2562
  if (guard) {
2554
- const vetted = await guard.vet(path2, effective, narrowed);
2563
+ const vetted = await guard.vet(path, effective, narrowed);
2555
2564
  if (vetted.rejected.length > 0) {
2556
2565
  rejected = vetted.rejected.map((r) => r.field);
2557
2566
  for (const field of rejected) Reflect.deleteProperty(narrowed, field);
@@ -2564,7 +2573,7 @@ async function runFill(opts = {}) {
2564
2573
  });
2565
2574
  if (realFields.length === 0) {
2566
2575
  return {
2567
- path: path2,
2576
+ path,
2568
2577
  status: "nothing-proposed",
2569
2578
  fields: [],
2570
2579
  preserved: [],
@@ -2577,7 +2586,7 @@ async function runFill(opts = {}) {
2577
2586
  let provenanceList;
2578
2587
  if (config.fill.writeProvenance) {
2579
2588
  const recordable = realFields.filter((f) => !f.includes(".")).sort();
2580
- if (recordable.length < realFields.length) sectionsUnrecorded.push(path2);
2589
+ if (recordable.length < realFields.length) sectionsUnrecorded.push(path);
2581
2590
  const heldProvenance = held[META_PROVENANCE_KEY];
2582
2591
  const priorEntry = Array.isArray(heldProvenance) ? heldProvenance.find(
2583
2592
  (e) => !!e && typeof e === "object" && !Array.isArray(e) && e["generated-by"] === identity.model
@@ -2606,13 +2615,13 @@ async function runFill(opts = {}) {
2606
2615
  provenanceList = merged.list;
2607
2616
  }
2608
2617
  }
2609
- const applied = writeGraphFields(effective, path2, pageFormat, narrowed, {
2618
+ const applied = writeGraphFields(effective, path, pageFormat, narrowed, {
2610
2619
  force: opts.force
2611
2620
  });
2612
2621
  const reportedFields = applied.applied;
2613
2622
  if (reportedFields.length === 0) {
2614
2623
  return {
2615
- path: path2,
2624
+ path,
2616
2625
  status: "nothing-proposed",
2617
2626
  fields: [],
2618
2627
  preserved: applied.skipped,
@@ -2622,14 +2631,14 @@ async function runFill(opts = {}) {
2622
2631
  cached
2623
2632
  };
2624
2633
  }
2625
- const own = metadataOf(content, path2, pageFormat).data;
2626
- const graphHome = absPath === void 0 ? void 0 : await view.home(path2, own, GRAPH_KEY2);
2627
- const provenanceHome = absPath === void 0 || provenanceList === void 0 ? void 0 : await view.home(path2, own, META_PROVENANCE_KEY);
2628
- const graphTarget = writeTarget(path2, graphHome, GRAPH_KEY2);
2634
+ const own = metadataOf(content, path, pageFormat).data;
2635
+ const graphHome = absPath === void 0 ? void 0 : await view.home(path, own, GRAPH_KEY2);
2636
+ const provenanceHome = absPath === void 0 || provenanceList === void 0 ? void 0 : await view.home(path, own, META_PROVENANCE_KEY);
2637
+ const graphTarget = writeTarget(path, graphHome, GRAPH_KEY2);
2629
2638
  if (typeof graphTarget === "string") throw new GraphError(graphTarget);
2630
- let provenanceTarget = writeTarget(path2, provenanceHome, META_PROVENANCE_KEY);
2639
+ let provenanceTarget = writeTarget(path, provenanceHome, META_PROVENANCE_KEY);
2631
2640
  if (typeof provenanceTarget === "string") {
2632
- warnings.push(`${provenanceTarget} The fill of ${path2} is not recorded.`);
2641
+ warnings.push(`${provenanceTarget} The fill of ${path} is not recorded.`);
2633
2642
  provenanceList = void 0;
2634
2643
  provenanceTarget = null;
2635
2644
  }
@@ -2639,7 +2648,7 @@ async function runFill(opts = {}) {
2639
2648
  }
2640
2649
  const pageContent = writeGraphFields(
2641
2650
  content,
2642
- path2,
2651
+ path,
2643
2652
  pageFormat,
2644
2653
  graphTarget === null ? narrowed : {},
2645
2654
  { force: opts.force, page: pageKeys }
@@ -2649,7 +2658,7 @@ async function runFill(opts = {}) {
2649
2658
  manifestWrites.push({
2650
2659
  home: graphTarget,
2651
2660
  key: GRAPH_KEY2,
2652
- value: metadataOf(applied.content, path2, pageFormat).data[GRAPH_KEY2]
2661
+ value: metadataOf(applied.content, path, pageFormat).data[GRAPH_KEY2]
2653
2662
  });
2654
2663
  }
2655
2664
  if (provenanceList !== void 0 && provenanceTarget !== null) {
@@ -2668,11 +2677,11 @@ async function runFill(opts = {}) {
2668
2677
  }
2669
2678
  }
2670
2679
  }
2671
- await guard?.commit(path2, applied.content);
2680
+ await guard?.commit(path, applied.content);
2672
2681
  return {
2673
2682
  after: pageContent,
2674
2683
  merged: applied.content,
2675
- path: path2,
2684
+ path,
2676
2685
  status: opts.dryRun ? "proposed" : "filled",
2677
2686
  fields: reportedFields,
2678
2687
  preserved: applied.skipped,
@@ -2685,11 +2694,11 @@ async function runFill(opts = {}) {
2685
2694
  }
2686
2695
  }
2687
2696
  var GRAPH_KEY2 = "graph";
2688
- function writeTarget(path2, home, key) {
2697
+ function writeTarget(path, home, key) {
2689
2698
  if (home === void 0 || home.kind === "unowned") return null;
2690
2699
  if (home.kind === "url") return urlManifestMessage(key, home.file);
2691
2700
  if (home.entry === void 0) {
2692
- return `${path2} carries no ${home.join}, which ${home.file} joins on, so its ${key} has no entry there.`;
2701
+ return `${path} carries no ${home.join}, which ${home.file} joins on, so its ${key} has no entry there.`;
2693
2702
  }
2694
2703
  return {
2695
2704
  file: home.file,
@@ -2730,18 +2739,18 @@ async function spliceAll(writes) {
2730
2739
  }
2731
2740
  return [...out.values()];
2732
2741
  }
2733
- async function mergedText(view, path2, content, format) {
2742
+ async function mergedText(view, path, content, format) {
2734
2743
  const markdown = format === "markdown" || format === "mdx";
2735
2744
  if (markdown && frontmatterKind(content) === "unsupported") return content;
2736
- const own = metadataOf(content, path2, format);
2737
- const { supplied } = await mergePage(view, path2, own.data, own.present, format);
2745
+ const own = metadataOf(content, path, format);
2746
+ const { supplied } = await mergePage(view, path, own.data, own.present, format);
2738
2747
  if (Object.keys(supplied).length === 0) return content;
2739
2748
  try {
2740
- return writeGraphFields(content, path2, format, {}, { page: supplied }).content;
2749
+ return writeGraphFields(content, path, format, {}, { page: supplied }).content;
2741
2750
  } catch (e) {
2742
2751
  const noFence = (format === "asciidoc" || format === "rst") && e instanceof DocmetaError;
2743
2752
  if (!noFence) throw e;
2744
- return applyGraphFields(content, path2, {}, { page: supplied }).content;
2753
+ return applyGraphFields(content, path, {}, { page: supplied }).content;
2745
2754
  }
2746
2755
  }
2747
2756
  async function openMetaViewPerPage(source, cwd, paths, base2, failures) {
@@ -2750,12 +2759,12 @@ async function openMetaViewPerPage(source, cwd, paths, base2, failures) {
2750
2759
  } catch (whole) {
2751
2760
  await openMetaView(source, cwd, [], base2);
2752
2761
  const readable = [];
2753
- for (const path2 of paths) {
2762
+ for (const path of paths) {
2754
2763
  try {
2755
- await openMetaView(source, cwd, [path2], base2);
2756
- readable.push(path2);
2764
+ await openMetaView(source, cwd, [path], base2);
2765
+ readable.push(path);
2757
2766
  } catch (e) {
2758
- failures.set(path2, e);
2767
+ failures.set(path, e);
2759
2768
  }
2760
2769
  }
2761
2770
  if (readable.length === paths.length) throw whole;
@@ -2819,226 +2828,8 @@ function renderFill(report, format) {
2819
2828
  return lines.join("\n");
2820
2829
  }
2821
2830
 
2822
- // src/graph/commands/embed.ts
2823
- import { createHash as createHash2 } from "node:crypto";
2824
- import { existsSync as existsSync4, mkdirSync as mkdirSync3, readFileSync as readFileSync6, writeFileSync as writeFileSync5 } from "node:fs";
2825
- import path, { dirname as dirname3, join as join3, resolve as resolve8 } from "node:path";
2826
- function embedText(entry) {
2827
- return [entry.title, entry.labels, entry.description, entry.text].filter((part) => part !== void 0 && part !== "").join("\n\n");
2828
- }
2829
- function sha2562(text) {
2830
- return createHash2("sha256").update(text, "utf8").digest("hex");
2831
- }
2832
- var VectorCache = class {
2833
- constructor(dir, enabled) {
2834
- this.dir = dir;
2835
- this.enabled = enabled;
2836
- }
2837
- dir;
2838
- enabled;
2839
- path(key) {
2840
- return join3(this.dir, `${key}.json`);
2841
- }
2842
- get(key) {
2843
- if (!this.enabled) return void 0;
2844
- const file = this.path(key);
2845
- if (!existsSync4(file)) return void 0;
2846
- try {
2847
- const parsed = JSON.parse(readFileSync6(file, "utf8"));
2848
- return Array.isArray(parsed) ? Float32Array.from(parsed) : void 0;
2849
- } catch {
2850
- return void 0;
2851
- }
2852
- }
2853
- set(key, vector) {
2854
- if (!this.enabled) return;
2855
- mkdirSync3(this.dir, { recursive: true });
2856
- writeFileSync5(this.path(key), JSON.stringify([...vector]), "utf8");
2857
- }
2858
- };
2859
- async function makeEmbedder(opts, model, dtype) {
2860
- if (opts.embedder) return opts.embedder;
2861
- if (model === "mock") return createMockEmbedder({ dtype });
2862
- try {
2863
- return await createLocalEmbedder({ model, dtype, role: "passage" });
2864
- } catch (e) {
2865
- if (e instanceof EmbedderUnavailableError) {
2866
- throw new GraphError(e.message);
2867
- }
2868
- throw new GraphError(
2869
- `Failed to load embedding model ${model}: ${errorMessage(e)}`
2870
- );
2871
- }
2872
- }
2873
- function manifestRelativePath(indexDir, outPath, pathApi = path) {
2874
- const rel = pathApi.relative(indexDir, outPath);
2875
- const recorded = rel.split(pathApi.sep).join("/");
2876
- if (pathApi.isAbsolute(rel) || !isSafeRelativePath(recorded)) {
2877
- throw new GraphError(
2878
- `Cannot record vectors at ${outPath}: the localization manifest needs a path relative to ${indexDir}. Write the sidecars on the index's drive.`
2879
- );
2880
- }
2881
- return recorded;
2882
- }
2883
- async function runEmbed(opts = {}) {
2884
- const cwd = opts.cwd ?? process.cwd();
2885
- const config = loadRunConfig(
2886
- {
2887
- ...opts.config === void 0 ? {} : { configPath: opts.config },
2888
- ...opts.noConfig === void 0 ? {} : { noConfig: opts.noConfig }
2889
- },
2890
- cwd
2891
- );
2892
- const graphPath = resolve8(cwd, opts.graph ?? config.out);
2893
- const indexDir = opts.index ? resolve8(cwd, opts.index) : dirname3(graphPath);
2894
- const manifestPath = join3(indexDir, LOCALIZATIONS_FILENAME);
2895
- if (!existsSync4(manifestPath)) {
2896
- throw new GraphError(
2897
- `Localization manifest not found: ${manifestPath} \u2014 run \`manni graph export search\` first.`
2898
- );
2899
- }
2900
- const manifest = parseLocalizations(readFileSync6(manifestPath, "utf8"));
2901
- if (!manifest) {
2902
- throw new GraphError(
2903
- `Not a manni graph localization manifest: ${manifestPath} \u2014 re-run \`manni graph export search\`.`
2904
- );
2905
- }
2906
- const outSetting = opts.out ?? config.embed.out;
2907
- const outDir = outSetting ? resolve8(cwd, outSetting) : indexDir;
2908
- mkdirSync3(outDir, { recursive: true });
2909
- const cache = new VectorCache(
2910
- resolve8(cwd, config.embed.cacheDir),
2911
- !opts.noCache
2912
- );
2913
- const embedders = /* @__PURE__ */ new Map();
2914
- const getEmbedder = (model, dtype) => {
2915
- const key = JSON.stringify([model, dtype]);
2916
- const existing = embedders.get(key);
2917
- if (existing) return existing;
2918
- const built = makeEmbedder(opts, model, dtype);
2919
- embedders.set(key, built);
2920
- return built;
2921
- };
2922
- const languages = [];
2923
- const updated = [];
2924
- for (const entry of manifest.languages) {
2925
- const indexPath = join3(indexDir, entry.search.path);
2926
- if (!existsSync4(indexPath)) {
2927
- throw new GraphError(
2928
- `Search index not found: ${indexPath} \u2014 the manifest names it; re-run \`manni graph export search\`.`
2929
- );
2930
- }
2931
- const raw = readFileSync6(indexPath, "utf8");
2932
- const source = `sha256:${sha2562(raw)}`;
2933
- if (entry.search.digest !== source) {
2934
- throw new GraphError(
2935
- `Stale manifest: ${entry.search.path} does not match the digest recorded for "${entry.language}" \u2014 re-run \`manni graph export search\`.`
2936
- );
2937
- }
2938
- let parsed;
2939
- try {
2940
- parsed = JSON.parse(raw);
2941
- } catch (e) {
2942
- throw new GraphError(
2943
- `Failed to parse ${indexPath}: ${errorMessage(e)} \u2014 re-run \`manni graph export search\`.`
2944
- );
2945
- }
2946
- const entries = parsed?.entries;
2947
- if (!Array.isArray(entries)) {
2948
- throw new GraphError(
2949
- `Not a manni graph search index: ${indexPath} \u2014 expected an \`entries\` array.`
2950
- );
2951
- }
2952
- const wanted = canonicalLanguageTag(entry.language);
2953
- const perLanguage = Object.entries(config.embed.byLanguage).find(
2954
- ([tag]) => canonicalLanguageTag(tag) === wanted
2955
- )?.[1];
2956
- const model = opts.model ?? perLanguage?.model ?? config.embed.model;
2957
- const dtype = opts.dtype ?? perLanguage?.dtype ?? config.embed.dtype;
2958
- const identity = opts.embedder ? { model: opts.embedder.model, dtype: opts.embedder.dtype } : { model, dtype };
2959
- const vectors = [];
2960
- let embedded = 0;
2961
- let cached = 0;
2962
- for (const item of entries) {
2963
- const text = embedText(item);
2964
- if (text === "") continue;
2965
- const key = sha2562(
2966
- JSON.stringify([identity.model, identity.dtype, text])
2967
- );
2968
- let vector = cache.get(key);
2969
- if (vector) {
2970
- cached += 1;
2971
- } else {
2972
- vector = await (await getEmbedder(model, dtype)).embed(text);
2973
- cache.set(key, vector);
2974
- embedded += 1;
2975
- }
2976
- vectors.push({ id: item.id, vector });
2977
- }
2978
- const filename = vectorIndexFilename(entry.language);
2979
- const outPath = join3(outDir, filename);
2980
- const manifestRelative = manifestRelativePath(indexDir, outPath);
2981
- writeFileSync5(
2982
- outPath,
2983
- encodeVectorIndex(vectors, {
2984
- model: identity.model,
2985
- dtype: identity.dtype,
2986
- source,
2987
- language: entry.language
2988
- })
2989
- );
2990
- const dims = vectors[0]?.vector.length ?? 0;
2991
- languages.push({
2992
- language: entry.language,
2993
- outPath,
2994
- model: identity.model,
2995
- dims,
2996
- embedded,
2997
- cached,
2998
- total: vectors.length
2999
- });
3000
- updated.push({
3001
- ...entry,
3002
- vectors: {
3003
- path: manifestRelative,
3004
- model: identity.model,
3005
- dtype: identity.dtype,
3006
- dims,
3007
- count: vectors.length
3008
- }
3009
- });
3010
- }
3011
- writeFileSync5(
3012
- manifestPath,
3013
- emitLocalizations({ version: 1, languages: updated }),
3014
- "utf8"
3015
- );
3016
- return {
3017
- manifestPath,
3018
- languages,
3019
- embedded: languages.reduce((n, l) => n + l.embedded, 0),
3020
- cached: languages.reduce((n, l) => n + l.cached, 0),
3021
- total: languages.reduce((n, l) => n + l.total, 0)
3022
- };
3023
- }
3024
- function renderEmbed(report, format) {
3025
- if (format === "json") return JSON.stringify(report, null, 2);
3026
- const lines = report.languages.map(
3027
- (l) => ` ${l.language}: ${l.total} vector${l.total === 1 ? "" : "s"} (${l.dims}-d, ${l.model}) -> ${l.outPath}`
3028
- );
3029
- if (lines.length === 0) lines.push(" (no languages in the manifest)");
3030
- const n = report.languages.length;
3031
- return [
3032
- // Not "beside": `-o` may put the sidecars in a different directory from
3033
- // the manifest, and each line below names the path it actually wrote.
3034
- `Wrote ${n} sidecar${n === 1 ? "" : "s"}, recorded in ${report.manifestPath}`,
3035
- ...lines,
3036
- ` ${report.embedded} embedded, ${report.cached} from cache`
3037
- ].join("\n");
3038
- }
3039
-
3040
2831
  // src/graph/commands/stats.ts
3041
- import { resolve as resolve9 } from "node:path";
2832
+ import { resolve as resolve8 } from "node:path";
3042
2833
  import { DataFactory as DataFactory4 } from "n3";
3043
2834
  function subjectsOfType(store, typeIri) {
3044
2835
  return store.getQuads(null, DataFactory4.namedNode(RDF_TYPE), DataFactory4.namedNode(typeIri), null).map((q) => q.subject.value).sort();
@@ -3059,7 +2850,7 @@ function runStats(opts = {}) {
3059
2850
  },
3060
2851
  cwd
3061
2852
  );
3062
- const store = loadGraph(resolve9(cwd, opts.graph ?? config.out));
2853
+ const store = loadGraph(resolve8(cwd, opts.graph ?? config.out));
3063
2854
  const top = opts.top ?? 5;
3064
2855
  const docIris = subjectsOfType(store, `${NS.graph}Document`);
3065
2856
  const docSet = new Set(docIris);
@@ -3277,9 +3068,9 @@ function renderStats(report, format) {
3277
3068
  );
3278
3069
  lines.push("", "Localization:");
3279
3070
  for (const { language, docs, untranslated } of report.localization.languages) {
3280
- const plural = docs === 1 ? "doc" : "docs";
3071
+ const plural2 = docs === 1 ? "doc" : "docs";
3281
3072
  const backlog = untranslated.length === 0 ? "" : ` ${untranslated.length} untranslated`;
3282
- lines.push(` ${language.padEnd(tagWidth)} ${docs} ${plural}${backlog}`);
3073
+ lines.push(` ${language.padEnd(tagWidth)} ${docs} ${plural2}${backlog}`);
3283
3074
  }
3284
3075
  lines.push(` no language: ${report.localization.unlabelled}`);
3285
3076
  }
@@ -3292,6 +3083,304 @@ function renderStats(report, format) {
3292
3083
  return lines.join("\n");
3293
3084
  }
3294
3085
 
3086
+ // src/vector/commands/build.ts
3087
+ import { createHash as createHash2 } from "node:crypto";
3088
+ import { existsSync as existsSync4, mkdirSync as mkdirSync3, readFileSync as readFileSync6, writeFileSync as writeFileSync5 } from "node:fs";
3089
+ import { dirname as dirname3, isAbsolute, join as join3, relative, resolve as resolve9 } from "node:path";
3090
+
3091
+ // src/vector/core/config.ts
3092
+ import { parse as parseYaml } from "yaml";
3093
+ import { Ajv2020 } from "ajv/dist/2020.js";
3094
+
3095
+ // src/vector/core/config-schema.json
3096
+ var config_schema_default = {
3097
+ $schema: "https://json-schema.org/draft/2020-12/schema",
3098
+ $id: "manni:vector:config",
3099
+ title: "manni vector configuration",
3100
+ type: "object",
3101
+ additionalProperties: false,
3102
+ properties: {
3103
+ model: {
3104
+ type: "string",
3105
+ minLength: 1,
3106
+ description: "The embedding model id. Default onnx-community/granite-embedding-small-english-r2-ONNX. mock embeds offline."
3107
+ },
3108
+ dtype: {
3109
+ type: "string",
3110
+ minLength: 1,
3111
+ description: "The weight quantization the model loads at. Default q8."
3112
+ },
3113
+ cacheDir: {
3114
+ type: "string",
3115
+ minLength: 1,
3116
+ description: "Where computed vectors are cached, relative to the working directory. Default .manni/vector/cache."
3117
+ },
3118
+ byLanguage: {
3119
+ type: "object",
3120
+ additionalProperties: false,
3121
+ description: "The model and quantization for one language, keyed by BCP-47 tag and matched canonically.",
3122
+ patternProperties: {
3123
+ "^[A-Za-z]{2,3}(-[A-Za-z]{4})?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*$": {
3124
+ type: "object",
3125
+ additionalProperties: false,
3126
+ properties: {
3127
+ model: {
3128
+ type: "string",
3129
+ minLength: 1
3130
+ },
3131
+ dtype: {
3132
+ type: "string",
3133
+ minLength: 1
3134
+ }
3135
+ }
3136
+ }
3137
+ }
3138
+ }
3139
+ }
3140
+ };
3141
+
3142
+ // src/vector/types.ts
3143
+ var VectorError = class extends ToolError {
3144
+ constructor(message) {
3145
+ super(message);
3146
+ this.name = "VectorError";
3147
+ }
3148
+ };
3149
+
3150
+ // src/vector/core/config.ts
3151
+ var CONFIG_SECTION = "vector";
3152
+ var validate = new Ajv2020({ allErrors: true }).compile(config_schema_default);
3153
+ var CONFIG_FILE = {
3154
+ section: CONFIG_SECTION,
3155
+ legacyNames: [],
3156
+ toError: (message) => new VectorError(message)
3157
+ };
3158
+ function parseVectorSection(raw, source, declared) {
3159
+ const value = raw ?? {};
3160
+ if (!validate(value)) {
3161
+ const details = (validate.errors ?? []).map((e) => {
3162
+ const where = `/${CONFIG_SECTION}${e.instancePath}`;
3163
+ const extra = e.keyword === "additionalProperties" ? e.params.additionalProperty : void 0;
3164
+ return extra === void 0 ? ` ${where}: ${e.message ?? "is invalid"}` : ` ${where}: unknown key "${extra}"`;
3165
+ });
3166
+ throw new VectorError(`Invalid config in ${source}:
3167
+ ${details.join("\n")}`);
3168
+ }
3169
+ const r = value;
3170
+ return {
3171
+ model: r.model ?? DEFAULT_MODEL,
3172
+ dtype: r.dtype ?? "q8",
3173
+ cacheDir: r.cacheDir ?? ".manni/vector/cache",
3174
+ byLanguage: r.byLanguage ?? {},
3175
+ declared
3176
+ };
3177
+ }
3178
+ function loadVectorConfig(opts, cwd = process.cwd()) {
3179
+ const file = opts.noConfig ? null : opts.configPath === void 0 ? findConfigFileSync(cwd, CONFIG_FILE) : readConfigFileSync(opts.configPath, cwd, CONFIG_FILE);
3180
+ if (file === null || !file.wrapped) return parseVectorSection(null, "", false);
3181
+ const doc = parseYaml(file.text);
3182
+ const declared = doc !== null && typeof doc === "object" && Object.hasOwn(doc, CONFIG_SECTION);
3183
+ return parseVectorSection(file.value, file.source, declared);
3184
+ }
3185
+
3186
+ // src/vector/commands/build.ts
3187
+ function embedText(entry) {
3188
+ return [entry.title, entry.labels, entry.description, entry.text].filter((part) => part !== void 0 && part !== "").join("\n\n");
3189
+ }
3190
+ function sha2562(text) {
3191
+ return createHash2("sha256").update(text, "utf8").digest("hex");
3192
+ }
3193
+ var VectorCache = class {
3194
+ constructor(dir, enabled) {
3195
+ this.dir = dir;
3196
+ this.enabled = enabled;
3197
+ }
3198
+ dir;
3199
+ enabled;
3200
+ path(key) {
3201
+ return join3(this.dir, `${key}.json`);
3202
+ }
3203
+ get(key) {
3204
+ if (!this.enabled) return void 0;
3205
+ const file = this.path(key);
3206
+ if (!existsSync4(file)) return void 0;
3207
+ try {
3208
+ const parsed = JSON.parse(readFileSync6(file, "utf8"));
3209
+ if (!Array.isArray(parsed)) return void 0;
3210
+ return parsed.every((n) => typeof n === "number") ? Float32Array.from(parsed) : void 0;
3211
+ } catch {
3212
+ return void 0;
3213
+ }
3214
+ }
3215
+ set(key, vector) {
3216
+ if (!this.enabled) return;
3217
+ mkdirSync3(this.dir, { recursive: true });
3218
+ writeFileSync5(this.path(key), JSON.stringify([...vector]), "utf8");
3219
+ }
3220
+ };
3221
+ async function makeEmbedder(override, model, dtype) {
3222
+ if (override) return override;
3223
+ if (model === "mock") return createMockEmbedder({ dtype });
3224
+ try {
3225
+ return await createLocalEmbedder({ model, dtype, role: "passage" });
3226
+ } catch (e) {
3227
+ if (e instanceof EmbedderUnavailableError) throw new VectorError(e.message);
3228
+ throw new VectorError(`Failed to load embedding model ${model}: ${errorMessage(e)}`);
3229
+ }
3230
+ }
3231
+ async function embedIndex(indexDir, settings, opts = {}) {
3232
+ const cwd = opts.cwd ?? process.cwd();
3233
+ const manifestPath = join3(indexDir, LOCALIZATIONS_FILENAME);
3234
+ if (!existsSync4(manifestPath)) {
3235
+ throw new VectorError(`Localization manifest not found: ${manifestPath} \u2014 run \`manni vector build\` first.`);
3236
+ }
3237
+ const manifest = parseLocalizations(readFileSync6(manifestPath, "utf8"));
3238
+ if (!manifest) {
3239
+ throw new VectorError(`Not a manni graph localization manifest: ${manifestPath} \u2014 re-run \`manni vector build\`.`);
3240
+ }
3241
+ const cache = new VectorCache(resolve9(cwd, settings.cacheDir), opts.noCache !== true);
3242
+ const embedders = /* @__PURE__ */ new Map();
3243
+ const getEmbedder = (model, dtype) => {
3244
+ const key = JSON.stringify([model, dtype]);
3245
+ const existing = embedders.get(key);
3246
+ if (existing) return existing;
3247
+ const built = makeEmbedder(opts.embedder, model, dtype);
3248
+ embedders.set(key, built);
3249
+ return built;
3250
+ };
3251
+ const languages = [];
3252
+ const updated = [];
3253
+ for (const entry of manifest.languages) {
3254
+ const indexPath = join3(indexDir, entry.search.path);
3255
+ if (!existsSync4(indexPath)) {
3256
+ throw new VectorError(`Search index not found: ${indexPath} \u2014 the manifest names it; re-run \`manni vector build\`.`);
3257
+ }
3258
+ const raw = readFileSync6(indexPath, "utf8");
3259
+ const source = `sha256:${sha2562(raw)}`;
3260
+ if (entry.search.digest !== source) {
3261
+ throw new VectorError(
3262
+ `Stale manifest: ${entry.search.path} does not match the digest recorded for "${entry.language}" \u2014 re-run \`manni vector build\`.`
3263
+ );
3264
+ }
3265
+ let parsed;
3266
+ try {
3267
+ parsed = JSON.parse(raw);
3268
+ } catch (e) {
3269
+ throw new VectorError(`Failed to parse ${indexPath}: ${errorMessage(e)} \u2014 re-run \`manni vector build\`.`);
3270
+ }
3271
+ const entries = parsed?.entries;
3272
+ if (!Array.isArray(entries)) {
3273
+ throw new VectorError(`Not a manni graph search index: ${indexPath} \u2014 expected an \`entries\` array.`);
3274
+ }
3275
+ const wanted = canonicalLanguageTag(entry.language);
3276
+ const perLanguage = Object.entries(settings.byLanguage).find(
3277
+ ([tag]) => canonicalLanguageTag(tag) === wanted
3278
+ )?.[1];
3279
+ const model = opts.model ?? perLanguage?.model ?? settings.model;
3280
+ const dtype = opts.dtype ?? perLanguage?.dtype ?? settings.dtype;
3281
+ const identity = opts.embedder ? { model: opts.embedder.model, dtype: opts.embedder.dtype } : { model, dtype };
3282
+ const vectors = [];
3283
+ let embedded = 0;
3284
+ let cached = 0;
3285
+ for (const item of entries) {
3286
+ const text = embedText(item);
3287
+ if (text === "") continue;
3288
+ const key = sha2562(JSON.stringify([identity.model, identity.dtype, text]));
3289
+ let vector = cache.get(key);
3290
+ if (vector) {
3291
+ cached += 1;
3292
+ } else {
3293
+ vector = await (await getEmbedder(model, dtype)).embed(text);
3294
+ cache.set(key, vector);
3295
+ embedded += 1;
3296
+ }
3297
+ vectors.push({ id: item.id, vector });
3298
+ }
3299
+ const filename = vectorIndexFilename(entry.language);
3300
+ const outPath = join3(indexDir, filename);
3301
+ writeFileSync5(
3302
+ outPath,
3303
+ encodeVectorIndex(vectors, { model: identity.model, dtype: identity.dtype, source, language: entry.language })
3304
+ );
3305
+ const dims = vectors[0]?.vector.length ?? 0;
3306
+ languages.push({
3307
+ language: entry.language,
3308
+ searchPath: indexPath,
3309
+ entries: entry.search.entries,
3310
+ outPath,
3311
+ model: identity.model,
3312
+ dims,
3313
+ embedded,
3314
+ cached,
3315
+ total: vectors.length
3316
+ });
3317
+ updated.push({
3318
+ ...entry,
3319
+ vectors: { path: filename, model: identity.model, dtype: identity.dtype, dims, count: vectors.length }
3320
+ });
3321
+ }
3322
+ writeFileSync5(manifestPath, emitLocalizations({ version: 1, languages: updated }), "utf8");
3323
+ return { manifestPath, languages };
3324
+ }
3325
+ async function runBuild(opts = {}) {
3326
+ const cwd = opts.cwd ?? process.cwd();
3327
+ const { out, model, dtype, noCache, embedder, ...graphOptions } = opts;
3328
+ const source = {
3329
+ ...opts.config === void 0 ? {} : { configPath: opts.config },
3330
+ ...opts.noConfig === void 0 ? {} : { noConfig: opts.noConfig }
3331
+ };
3332
+ const settings = loadVectorConfig(source, cwd);
3333
+ const built = await buildGraph({ ...graphOptions, cwd });
3334
+ const { config } = built;
3335
+ const base2 = documentBase(config, opts, cwd);
3336
+ const outDir = out === void 0 ? dirname3(built.outPath) : resolve9(cwd, out);
3337
+ const index = await writeSearchIndex(parseGraph(built.turtle, "the built graph"), base2, outDir, {
3338
+ context: parseContexts(config, base2),
3339
+ readDoc: (path) => {
3340
+ if (path === STDIN_PATH) return opts.stdinContent;
3341
+ const abs = resolve9(base2, path);
3342
+ return existsSync4(abs) ? readFileSync6(abs, "utf8") : void 0;
3343
+ }
3344
+ });
3345
+ const embedded = await embedIndex(outDir, settings, {
3346
+ ...model === void 0 ? {} : { model },
3347
+ ...dtype === void 0 ? {} : { dtype },
3348
+ ...noCache === void 0 ? {} : { noCache },
3349
+ ...embedder === void 0 ? {} : { embedder },
3350
+ cwd
3351
+ });
3352
+ const shown = (path) => {
3353
+ const rel = relative(cwd, path);
3354
+ return rel.startsWith("..") || isAbsolute(rel) ? path : rel.split("\\").join("/");
3355
+ };
3356
+ const languages = embedded.languages.map((l) => ({ ...l, searchPath: shown(l.searchPath), outPath: shown(l.outPath) }));
3357
+ return {
3358
+ manifestPath: shown(embedded.manifestPath),
3359
+ documents: built.docs,
3360
+ // What the indexes hold: concepts are filed in every language (ADR 01038).
3361
+ entries: languages.reduce((n, l) => n + l.entries, 0),
3362
+ languages,
3363
+ embedded: languages.reduce((n, l) => n + l.embedded, 0),
3364
+ cached: languages.reduce((n, l) => n + l.cached, 0),
3365
+ total: languages.reduce((n, l) => n + l.total, 0),
3366
+ warnings: [...built.warnings, ...index.warnings]
3367
+ };
3368
+ }
3369
+ var plural = (n, one, many = `${one}s`) => `${String(n)} ${n === 1 ? one : many}`;
3370
+ function renderBuild(report, format) {
3371
+ const { warnings: _warnings, ...printed } = report;
3372
+ if (format === "json") return JSON.stringify(printed, null, 2);
3373
+ const lines = report.languages.map(
3374
+ (l) => ` ${l.language}: ${plural(l.total, "vector")} (${String(l.dims)}-d, ${l.model}) -> ${l.outPath}`
3375
+ );
3376
+ return [
3377
+ `Indexed ${plural(report.documents, "page")}: ${plural(report.entries, "entry", "entries")} in ${plural(report.languages.length, "language")}`,
3378
+ `Wrote ${plural(report.languages.length, "sidecar")}, recorded in ${report.manifestPath}`,
3379
+ ...lines,
3380
+ ` ${String(report.embedded)} embedded, ${String(report.cached)} from cache`
3381
+ ].join("\n");
3382
+ }
3383
+
3295
3384
  export {
3296
3385
  emitRdfXml,
3297
3386
  writeZip,
@@ -3313,10 +3402,12 @@ export {
3313
3402
  makeProvider,
3314
3403
  runFill,
3315
3404
  renderFill,
3316
- embedText,
3317
- runEmbed,
3318
- renderEmbed,
3319
3405
  runStats,
3320
- renderStats
3406
+ renderStats,
3407
+ loadVectorConfig,
3408
+ embedText,
3409
+ embedIndex,
3410
+ runBuild,
3411
+ renderBuild
3321
3412
  };
3322
- //# sourceMappingURL=chunk-HVYVIGBP.js.map
3413
+ //# sourceMappingURL=chunk-MBPDZWYI.js.map