@hawkeyexl/manni 4.18.1 → 4.20.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 (238) hide show
  1. package/README.md +1 -1
  2. package/dist/{batch-XVUPHNWT.js → batch-TBQBH6XQ.js} +13 -13
  3. package/dist/{build-GU7M5EC6.js → build-S3JQMDFX.js} +14 -14
  4. package/dist/{calibrate-YODCJAEA.js → calibrate-KLN22IGS.js} +14 -14
  5. package/dist/{capture-TZ42LHNK.js → capture-JS3ICXE7.js} +13 -13
  6. package/dist/{check-KBDIV35E.js → check-2EAR4ZW3.js} +31 -31
  7. package/dist/check-6D2JCIMD.js +47 -0
  8. package/dist/{check-I72HPJNA.js → check-PDXYA6XH.js} +13 -12
  9. package/dist/check-RNAB7X74.js +33 -0
  10. package/dist/{check-AOGJBQR4.js → check-WS2USSUD.js} +13 -13
  11. package/dist/{chunk-HUCZKEDF.js → chunk-2G4XYGTN.js} +4 -4
  12. package/dist/{chunk-O7OJWMP5.js → chunk-2XRSQXGZ.js} +2 -2
  13. package/dist/{chunk-W5STNXKP.js → chunk-3OXBZSDN.js} +2 -2
  14. package/dist/chunk-4KM23E53.js +50 -0
  15. package/dist/chunk-4KM23E53.js.map +1 -0
  16. package/dist/chunk-5HB4YKZW.js +64 -0
  17. package/dist/chunk-5HB4YKZW.js.map +1 -0
  18. package/dist/{chunk-N4KY3WLM.js → chunk-5MJE5KMY.js} +7 -7
  19. package/dist/{chunk-C4MNHJXP.js → chunk-5UJQLZXY.js} +2 -2
  20. package/dist/{chunk-34PGSNS5.js → chunk-6D7FCU4E.js} +3 -3
  21. package/dist/{chunk-ES7PJMHM.js → chunk-6VGWLCYT.js} +2 -2
  22. package/dist/chunk-BEQZI3V5.js +137 -0
  23. package/dist/chunk-BEQZI3V5.js.map +1 -0
  24. package/dist/{chunk-7MU47MZM.js → chunk-BV7FJ4V2.js} +7 -7
  25. package/dist/{chunk-2G42VA4H.js → chunk-DQO44Y5G.js} +5 -5
  26. package/dist/{chunk-7JDWLMOT.js → chunk-DTSWP5FC.js} +5 -5
  27. package/dist/{chunk-MHLCZBW2.js → chunk-EBYLQE7P.js} +2 -2
  28. package/dist/{chunk-LFKYNDG4.js → chunk-FERFWKZM.js} +2 -2
  29. package/dist/{chunk-PZAHBJ56.js → chunk-FRM62BEN.js} +3 -3
  30. package/dist/{chunk-RBNZI6YG.js → chunk-GCF7STEA.js} +7 -32
  31. package/dist/chunk-GCF7STEA.js.map +1 -0
  32. package/dist/{chunk-YMDASDGR.js → chunk-GL2HXZVX.js} +3 -3
  33. package/dist/chunk-GVOI7SCF.js +50 -0
  34. package/dist/chunk-GVOI7SCF.js.map +1 -0
  35. package/dist/{chunk-O3PRYQCW.js → chunk-GXDVERLV.js} +5 -5
  36. package/dist/{chunk-UXEICZKX.js → chunk-HIZNNOVW.js} +17 -5
  37. package/dist/chunk-HIZNNOVW.js.map +1 -0
  38. package/dist/{chunk-4VR2UFEO.js → chunk-HSC5G3FW.js} +8 -8
  39. package/dist/{chunk-72OTCIYQ.js → chunk-HZWLHSZG.js} +2 -2
  40. package/dist/{chunk-SJLEHQKY.js → chunk-I62V2ZAJ.js} +8 -8
  41. package/dist/{chunk-EEJFXYFO.js → chunk-IGAZWY2W.js} +2 -2
  42. package/dist/{chunk-GSLXJSGT.js → chunk-ITA7V5Y2.js} +4 -4
  43. package/dist/{chunk-AL46P5H6.js → chunk-IYRGV2BC.js} +6 -6
  44. package/dist/{chunk-HH327OEQ.js → chunk-JKH2LV5D.js} +5 -5
  45. package/dist/{chunk-2EAUZVO2.js → chunk-JOZVVIVD.js} +3 -3
  46. package/dist/{chunk-GRRSOAAS.js → chunk-KZ7534CD.js} +3 -3
  47. package/dist/{chunk-UVUMFFZ6.js → chunk-MLY65CQE.js} +24 -12
  48. package/dist/chunk-MLY65CQE.js.map +1 -0
  49. package/dist/{chunk-T363DMEJ.js → chunk-MNK732BZ.js} +37 -14
  50. package/dist/chunk-MNK732BZ.js.map +1 -0
  51. package/dist/{chunk-N74QH6XJ.js → chunk-NDQA4VYK.js} +3 -3
  52. package/dist/chunk-NEO2HN2N.js +326 -0
  53. package/dist/chunk-NEO2HN2N.js.map +1 -0
  54. package/dist/{chunk-MQG4ONTU.js → chunk-O26NQ7KT.js} +2 -2
  55. package/dist/chunk-O4O6JOGD.js +59 -0
  56. package/dist/chunk-O4O6JOGD.js.map +1 -0
  57. package/dist/{chunk-QRQVOEAH.js → chunk-PGDUVYTF.js} +2 -2
  58. package/dist/{chunk-CYMA4O2F.js → chunk-PHOWMWFJ.js} +6 -2
  59. package/dist/{chunk-CYMA4O2F.js.map → chunk-PHOWMWFJ.js.map} +1 -1
  60. package/dist/{chunk-WIHQJSO3.js → chunk-PTXHJLAS.js} +4 -4
  61. package/dist/{chunk-J33NBVBX.js → chunk-Q5EKERQS.js} +2 -2
  62. package/dist/{chunk-GWCITMHN.js → chunk-QA7AXRGH.js} +2 -2
  63. package/dist/{chunk-J7MZRF3J.js → chunk-QSY5YPM4.js} +5 -5
  64. package/dist/{chunk-S5JFWUNK.js → chunk-QWCP7UMG.js} +4 -4
  65. package/dist/chunk-RGZBROMW.js +25 -0
  66. package/dist/chunk-RGZBROMW.js.map +1 -0
  67. package/dist/{chunk-WMOQXWHB.js → chunk-RXCDT55X.js} +14 -14
  68. package/dist/{chunk-JBB22HPK.js → chunk-SFSALDIR.js} +6 -6
  69. package/dist/{chunk-ZI5JHYPT.js → chunk-SFTWEGUD.js} +2 -2
  70. package/dist/{chunk-SGV5U4NE.js → chunk-SGI3WPYK.js} +4 -4
  71. package/dist/chunk-SIREOHLW.js +233 -0
  72. package/dist/chunk-SIREOHLW.js.map +1 -0
  73. package/dist/{chunk-PRF44AAC.js → chunk-SOW6SVAM.js} +4 -4
  74. package/dist/{chunk-3H7M5MXE.js → chunk-SRTBHEUM.js} +3 -3
  75. package/dist/{chunk-YBWU4JGX.js → chunk-SX626JUF.js} +3 -3
  76. package/dist/{chunk-UT6SVXUQ.js → chunk-U2CE55YV.js} +5 -5
  77. package/dist/{chunk-4VQVJOIK.js → chunk-UKSXQHSE.js} +44 -23
  78. package/dist/chunk-UKSXQHSE.js.map +1 -0
  79. package/dist/chunk-VCU7OMXV.js +126 -0
  80. package/dist/chunk-VCU7OMXV.js.map +1 -0
  81. package/dist/chunk-XTKJNRJ6.js +33 -0
  82. package/dist/chunk-XTKJNRJ6.js.map +1 -0
  83. package/dist/{chunk-UE6IYEKA.js → chunk-Z6FATXBE.js} +2 -2
  84. package/dist/{chunk-PJILKN4Z.js → chunk-ZBE735BH.js} +5 -5
  85. package/dist/{chunk-FGGDLZUU.js → chunk-ZEKQRBXO.js} +2 -2
  86. package/dist/{chunk-Z2LHEYK5.js → chunk-ZODSGFAP.js} +5 -7
  87. package/dist/{chunk-Z2LHEYK5.js.map → chunk-ZODSGFAP.js.map} +1 -1
  88. package/dist/{chunk-WRWPOXVG.js → chunk-ZRMA5U53.js} +3 -3
  89. package/dist/{chunk-4CMNCP5O.js → chunk-ZVEDBFTM.js} +8 -8
  90. package/dist/{cli-OD7SXNLX.js → cli-4HH6IY2L.js} +14 -14
  91. package/dist/{cli-4P4FWT6C.js → cli-4IE6CRAT.js} +355 -123
  92. package/dist/cli-4IE6CRAT.js.map +1 -0
  93. package/dist/{cli-NCJZTOWR.js → cli-5BFVL3DH.js} +2 -2
  94. package/dist/{cli-HGZ7XTDU.js → cli-AR43H5BW.js} +9 -9
  95. package/dist/{cli-WQNWAMDL.js → cli-EQG4KETY.js} +89 -38
  96. package/dist/cli-EQG4KETY.js.map +1 -0
  97. package/dist/{cli-2JZEYVTI.js → cli-GVHXRQAD.js} +18 -18
  98. package/dist/{cli-NUP7KAW3.js → cli-HTAR3PWY.js} +21 -21
  99. package/dist/{cli-4YURODFH.js → cli-L7H4C442.js} +14 -14
  100. package/dist/{cli-DK55ACQR.js → cli-T4NY2EGM.js} +17 -17
  101. package/dist/{cli-TDCMZ7HV.js → cli-UIY57JPM.js} +14 -14
  102. package/dist/{cli-MRH5QXW5.js → cli-ZPW5VIRA.js} +9 -9
  103. package/dist/cli.js +20 -14
  104. package/dist/cli.js.map +1 -1
  105. package/dist/docmeta.js +8 -8
  106. package/dist/{github-FX4WWY7N.js → github-CMWG4QMI.js} +14 -14
  107. package/dist/github-NIRLMJ65.js +27 -0
  108. package/dist/{github-TOQ4AJIU.js → github-RIU47U73.js} +12 -12
  109. package/dist/index.d.ts +25 -1
  110. package/dist/index.js +99 -99
  111. package/dist/json-EJTB7XYG.js +34 -0
  112. package/dist/{json-SIPVIBNW.js → json-KSBVGZUX.js} +12 -12
  113. package/dist/{labels-UXKTDM5A.js → labels-VNKACCAG.js} +11 -11
  114. package/dist/{lint-UUVMFRPB.js → lint-75BD6L5T.js} +12 -12
  115. package/dist/list-6XVIW3RW.js +33 -0
  116. package/dist/{list-FLNHGIML.js → list-MH54XU7E.js} +12 -12
  117. package/dist/{list-6Q7VGKIG.js → list-PHNZAYIM.js} +12 -12
  118. package/dist/{page-FPLKY53Q.js → page-5AJS7AEM.js} +11 -11
  119. package/dist/{prepare-VUHZQTJ4.js → prepare-R63RJI6O.js} +16 -16
  120. package/dist/{pretty-JDZSGZCR.js → pretty-DE4WXJFA.js} +13 -13
  121. package/dist/{pretty-WKPQD3UU.js → pretty-E3DS32NZ.js} +12 -12
  122. package/dist/pretty-SUKMF6AB.js +35 -0
  123. package/dist/{release-Z3ASYZ3S.js → release-VHHASAG7.js} +4 -4
  124. package/dist/{reporters-E53V7UXY.js → reporters-DLMLFLKS.js} +4 -4
  125. package/dist/{reporters-RAWZONQ3.js → reporters-V2PSDBVW.js} +11 -11
  126. package/dist/reporters-V2PSDBVW.js.map +1 -0
  127. package/dist/{run-2BDAM2LA.js → run-QT2LVHRU.js} +12 -12
  128. package/dist/run-QT2LVHRU.js.map +1 -0
  129. package/dist/{sarif-7F6EJA3K.js → sarif-2ZKPRT42.js} +15 -15
  130. package/dist/sarif-2ZKPRT42.js.map +1 -0
  131. package/dist/{sarif-Q3FX4ODM.js → sarif-GKMUHCZB.js} +10 -10
  132. package/dist/sarif-GKMUHCZB.js.map +1 -0
  133. package/dist/sarif-HUIRTPSL.js +30 -0
  134. package/dist/sarif-HUIRTPSL.js.map +1 -0
  135. package/dist/strategy-TBFM7NZU.js +222 -0
  136. package/dist/strategy-TBFM7NZU.js.map +1 -0
  137. package/dist/{term-5CCU7VDU.js → term-ZZWAVUW5.js} +30 -28
  138. package/dist/term-ZZWAVUW5.js.map +1 -0
  139. package/dist/{validate-A2R6KXAH.js → validate-ZEUFF3BG.js} +5 -5
  140. package/dist/validate-ZEUFF3BG.js.map +1 -0
  141. package/package.json +4 -6
  142. package/plugin/manni/.claude-plugin/plugin.json +2 -2
  143. package/plugin/manni/.mcp.json +12 -0
  144. package/plugin/manni/hooks/graph-server.mjs +95 -0
  145. package/plugin/manni/hooks/hooks.json +26 -0
  146. package/plugin/manni/hooks/manni.mjs +51 -25
  147. package/plugin/manni/hooks/page-metadata.mjs +144 -0
  148. package/plugin/manni/skills/fix/SKILL.md +18 -1
  149. package/plugin/manni/skills/setup/SKILL.md +1 -1
  150. package/dist/check-OIL3CZ4N.js +0 -47
  151. package/dist/chunk-4VQVJOIK.js.map +0 -1
  152. package/dist/chunk-RBNZI6YG.js.map +0 -1
  153. package/dist/chunk-T363DMEJ.js.map +0 -1
  154. package/dist/chunk-UVUMFFZ6.js.map +0 -1
  155. package/dist/chunk-UXEICZKX.js.map +0 -1
  156. package/dist/cli-4P4FWT6C.js.map +0 -1
  157. package/dist/cli-WQNWAMDL.js.map +0 -1
  158. package/dist/term-5CCU7VDU.js.map +0 -1
  159. /package/dist/{batch-XVUPHNWT.js.map → batch-TBQBH6XQ.js.map} +0 -0
  160. /package/dist/{build-GU7M5EC6.js.map → build-S3JQMDFX.js.map} +0 -0
  161. /package/dist/{calibrate-YODCJAEA.js.map → calibrate-KLN22IGS.js.map} +0 -0
  162. /package/dist/{capture-TZ42LHNK.js.map → capture-JS3ICXE7.js.map} +0 -0
  163. /package/dist/{check-KBDIV35E.js.map → check-2EAR4ZW3.js.map} +0 -0
  164. /package/dist/{check-AOGJBQR4.js.map → check-6D2JCIMD.js.map} +0 -0
  165. /package/dist/{check-I72HPJNA.js.map → check-PDXYA6XH.js.map} +0 -0
  166. /package/dist/{check-OIL3CZ4N.js.map → check-RNAB7X74.js.map} +0 -0
  167. /package/dist/{cli-HGZ7XTDU.js.map → check-WS2USSUD.js.map} +0 -0
  168. /package/dist/{chunk-HUCZKEDF.js.map → chunk-2G4XYGTN.js.map} +0 -0
  169. /package/dist/{chunk-O7OJWMP5.js.map → chunk-2XRSQXGZ.js.map} +0 -0
  170. /package/dist/{chunk-W5STNXKP.js.map → chunk-3OXBZSDN.js.map} +0 -0
  171. /package/dist/{chunk-N4KY3WLM.js.map → chunk-5MJE5KMY.js.map} +0 -0
  172. /package/dist/{chunk-C4MNHJXP.js.map → chunk-5UJQLZXY.js.map} +0 -0
  173. /package/dist/{chunk-34PGSNS5.js.map → chunk-6D7FCU4E.js.map} +0 -0
  174. /package/dist/{chunk-ES7PJMHM.js.map → chunk-6VGWLCYT.js.map} +0 -0
  175. /package/dist/{chunk-7MU47MZM.js.map → chunk-BV7FJ4V2.js.map} +0 -0
  176. /package/dist/{chunk-2G42VA4H.js.map → chunk-DQO44Y5G.js.map} +0 -0
  177. /package/dist/{chunk-7JDWLMOT.js.map → chunk-DTSWP5FC.js.map} +0 -0
  178. /package/dist/{chunk-MHLCZBW2.js.map → chunk-EBYLQE7P.js.map} +0 -0
  179. /package/dist/{chunk-LFKYNDG4.js.map → chunk-FERFWKZM.js.map} +0 -0
  180. /package/dist/{chunk-PZAHBJ56.js.map → chunk-FRM62BEN.js.map} +0 -0
  181. /package/dist/{chunk-YMDASDGR.js.map → chunk-GL2HXZVX.js.map} +0 -0
  182. /package/dist/{chunk-O3PRYQCW.js.map → chunk-GXDVERLV.js.map} +0 -0
  183. /package/dist/{chunk-4VR2UFEO.js.map → chunk-HSC5G3FW.js.map} +0 -0
  184. /package/dist/{chunk-72OTCIYQ.js.map → chunk-HZWLHSZG.js.map} +0 -0
  185. /package/dist/{chunk-SJLEHQKY.js.map → chunk-I62V2ZAJ.js.map} +0 -0
  186. /package/dist/{chunk-EEJFXYFO.js.map → chunk-IGAZWY2W.js.map} +0 -0
  187. /package/dist/{chunk-GSLXJSGT.js.map → chunk-ITA7V5Y2.js.map} +0 -0
  188. /package/dist/{chunk-AL46P5H6.js.map → chunk-IYRGV2BC.js.map} +0 -0
  189. /package/dist/{chunk-HH327OEQ.js.map → chunk-JKH2LV5D.js.map} +0 -0
  190. /package/dist/{chunk-2EAUZVO2.js.map → chunk-JOZVVIVD.js.map} +0 -0
  191. /package/dist/{chunk-GRRSOAAS.js.map → chunk-KZ7534CD.js.map} +0 -0
  192. /package/dist/{chunk-N74QH6XJ.js.map → chunk-NDQA4VYK.js.map} +0 -0
  193. /package/dist/{chunk-MQG4ONTU.js.map → chunk-O26NQ7KT.js.map} +0 -0
  194. /package/dist/{chunk-QRQVOEAH.js.map → chunk-PGDUVYTF.js.map} +0 -0
  195. /package/dist/{chunk-WIHQJSO3.js.map → chunk-PTXHJLAS.js.map} +0 -0
  196. /package/dist/{chunk-J33NBVBX.js.map → chunk-Q5EKERQS.js.map} +0 -0
  197. /package/dist/{chunk-GWCITMHN.js.map → chunk-QA7AXRGH.js.map} +0 -0
  198. /package/dist/{chunk-J7MZRF3J.js.map → chunk-QSY5YPM4.js.map} +0 -0
  199. /package/dist/{chunk-S5JFWUNK.js.map → chunk-QWCP7UMG.js.map} +0 -0
  200. /package/dist/{chunk-WMOQXWHB.js.map → chunk-RXCDT55X.js.map} +0 -0
  201. /package/dist/{chunk-JBB22HPK.js.map → chunk-SFSALDIR.js.map} +0 -0
  202. /package/dist/{chunk-ZI5JHYPT.js.map → chunk-SFTWEGUD.js.map} +0 -0
  203. /package/dist/{chunk-SGV5U4NE.js.map → chunk-SGI3WPYK.js.map} +0 -0
  204. /package/dist/{chunk-PRF44AAC.js.map → chunk-SOW6SVAM.js.map} +0 -0
  205. /package/dist/{chunk-3H7M5MXE.js.map → chunk-SRTBHEUM.js.map} +0 -0
  206. /package/dist/{chunk-YBWU4JGX.js.map → chunk-SX626JUF.js.map} +0 -0
  207. /package/dist/{chunk-UT6SVXUQ.js.map → chunk-U2CE55YV.js.map} +0 -0
  208. /package/dist/{chunk-UE6IYEKA.js.map → chunk-Z6FATXBE.js.map} +0 -0
  209. /package/dist/{chunk-PJILKN4Z.js.map → chunk-ZBE735BH.js.map} +0 -0
  210. /package/dist/{chunk-FGGDLZUU.js.map → chunk-ZEKQRBXO.js.map} +0 -0
  211. /package/dist/{chunk-WRWPOXVG.js.map → chunk-ZRMA5U53.js.map} +0 -0
  212. /package/dist/{chunk-4CMNCP5O.js.map → chunk-ZVEDBFTM.js.map} +0 -0
  213. /package/dist/{cli-OD7SXNLX.js.map → cli-4HH6IY2L.js.map} +0 -0
  214. /package/dist/{cli-NCJZTOWR.js.map → cli-5BFVL3DH.js.map} +0 -0
  215. /package/dist/{github-FX4WWY7N.js.map → cli-AR43H5BW.js.map} +0 -0
  216. /package/dist/{cli-2JZEYVTI.js.map → cli-GVHXRQAD.js.map} +0 -0
  217. /package/dist/{cli-NUP7KAW3.js.map → cli-HTAR3PWY.js.map} +0 -0
  218. /package/dist/{cli-4YURODFH.js.map → cli-L7H4C442.js.map} +0 -0
  219. /package/dist/{cli-DK55ACQR.js.map → cli-T4NY2EGM.js.map} +0 -0
  220. /package/dist/{cli-TDCMZ7HV.js.map → cli-UIY57JPM.js.map} +0 -0
  221. /package/dist/{cli-MRH5QXW5.js.map → cli-ZPW5VIRA.js.map} +0 -0
  222. /package/dist/{github-TOQ4AJIU.js.map → github-CMWG4QMI.js.map} +0 -0
  223. /package/dist/{json-SIPVIBNW.js.map → github-NIRLMJ65.js.map} +0 -0
  224. /package/dist/{lint-UUVMFRPB.js.map → github-RIU47U73.js.map} +0 -0
  225. /package/dist/{list-6Q7VGKIG.js.map → json-EJTB7XYG.js.map} +0 -0
  226. /package/dist/{list-FLNHGIML.js.map → json-KSBVGZUX.js.map} +0 -0
  227. /package/dist/{labels-UXKTDM5A.js.map → labels-VNKACCAG.js.map} +0 -0
  228. /package/dist/{page-FPLKY53Q.js.map → lint-75BD6L5T.js.map} +0 -0
  229. /package/dist/{pretty-JDZSGZCR.js.map → list-6XVIW3RW.js.map} +0 -0
  230. /package/dist/{pretty-WKPQD3UU.js.map → list-MH54XU7E.js.map} +0 -0
  231. /package/dist/{reporters-E53V7UXY.js.map → list-PHNZAYIM.js.map} +0 -0
  232. /package/dist/{reporters-RAWZONQ3.js.map → page-5AJS7AEM.js.map} +0 -0
  233. /package/dist/{prepare-VUHZQTJ4.js.map → prepare-R63RJI6O.js.map} +0 -0
  234. /package/dist/{run-2BDAM2LA.js.map → pretty-DE4WXJFA.js.map} +0 -0
  235. /package/dist/{sarif-7F6EJA3K.js.map → pretty-E3DS32NZ.js.map} +0 -0
  236. /package/dist/{sarif-Q3FX4ODM.js.map → pretty-SUKMF6AB.js.map} +0 -0
  237. /package/dist/{release-Z3ASYZ3S.js.map → release-VHHASAG7.js.map} +0 -0
  238. /package/dist/{validate-A2R6KXAH.js.map → reporters-DLMLFLKS.js.map} +0 -0
@@ -11,7 +11,7 @@ import {
11
11
  runRetrieve,
12
12
  runTraverseContext,
13
13
  traverseIn
14
- } from "./chunk-AL46P5H6.js";
14
+ } from "./chunk-IYRGV2BC.js";
15
15
  import {
16
16
  EXPORT_TARGETS,
17
17
  LLMS_FILENAME,
@@ -24,9 +24,14 @@ import {
24
24
  runFill,
25
25
  runQuery,
26
26
  runStats
27
- } from "./chunk-WMOQXWHB.js";
27
+ } from "./chunk-RXCDT55X.js";
28
28
  import "./chunk-245W2Q7C.js";
29
29
  import {
30
+ checkoutStatus,
31
+ runBuild
32
+ } from "./chunk-MNK732BZ.js";
33
+ import {
34
+ CHUNKS_MANIFEST,
30
35
  SEARCH_MODES,
31
36
  bundledShapesPath,
32
37
  compactIri,
@@ -37,13 +42,12 @@ import {
37
42
  runSearch,
38
43
  runTraverse,
39
44
  shapeText
40
- } from "./chunk-4CMNCP5O.js";
41
- import "./chunk-4VR2UFEO.js";
42
- import "./chunk-J33NBVBX.js";
45
+ } from "./chunk-ZVEDBFTM.js";
46
+ import "./chunk-HSC5G3FW.js";
43
47
  import {
44
- runBuild
45
- } from "./chunk-T363DMEJ.js";
46
- import "./chunk-GSLXJSGT.js";
48
+ parseChunksManifest
49
+ } from "./chunk-Q5EKERQS.js";
50
+ import "./chunk-ITA7V5Y2.js";
47
51
  import {
48
52
  ALL_FILL_FIELDS,
49
53
  CONFIG_SECTION,
@@ -55,34 +59,34 @@ import {
55
59
  assertInputFormat,
56
60
  byCodeUnit,
57
61
  loadRunConfig
58
- } from "./chunk-UXEICZKX.js";
62
+ } from "./chunk-HIZNNOVW.js";
59
63
  import "./chunk-GLP5PSXB.js";
60
- import "./chunk-7MU47MZM.js";
61
- import "./chunk-PJILKN4Z.js";
64
+ import "./chunk-BV7FJ4V2.js";
65
+ import "./chunk-ZBE735BH.js";
62
66
  import "./chunk-GMOAW2EG.js";
63
- import "./chunk-PZAHBJ56.js";
64
- import "./chunk-WRWPOXVG.js";
65
- import "./chunk-SGV5U4NE.js";
66
- import "./chunk-YMDASDGR.js";
67
+ import "./chunk-FRM62BEN.js";
68
+ import "./chunk-ZRMA5U53.js";
69
+ import "./chunk-SGI3WPYK.js";
70
+ import "./chunk-GL2HXZVX.js";
67
71
  import "./chunk-TIUTIOFB.js";
68
- import "./chunk-C4MNHJXP.js";
72
+ import "./chunk-5UJQLZXY.js";
69
73
  import "./chunk-TKINOTVS.js";
70
74
  import "./chunk-UP6NBQ62.js";
71
- import "./chunk-3H7M5MXE.js";
72
- import "./chunk-GRRSOAAS.js";
73
- import "./chunk-4VQVJOIK.js";
74
- import "./chunk-ES7PJMHM.js";
75
- import "./chunk-34PGSNS5.js";
76
- import "./chunk-2EAUZVO2.js";
75
+ import "./chunk-SRTBHEUM.js";
76
+ import "./chunk-KZ7534CD.js";
77
+ import "./chunk-UKSXQHSE.js";
78
+ import "./chunk-6VGWLCYT.js";
79
+ import "./chunk-6D7FCU4E.js";
80
+ import "./chunk-JOZVVIVD.js";
77
81
  import {
78
82
  collect,
79
83
  configOption,
80
84
  readStdin,
81
85
  splitList,
82
86
  writeTextAtomic
83
- } from "./chunk-CYMA4O2F.js";
87
+ } from "./chunk-PHOWMWFJ.js";
84
88
  import "./chunk-DSWKBZWW.js";
85
- import "./chunk-QRQVOEAH.js";
89
+ import "./chunk-PGDUVYTF.js";
86
90
  import "./chunk-77AINBYM.js";
87
91
  import "./chunk-QK6VYJHV.js";
88
92
  import {
@@ -102,7 +106,7 @@ import {
102
106
  } from "./chunk-VM7VAFJW.js";
103
107
  import {
104
108
  package_default
105
- } from "./chunk-Z2LHEYK5.js";
109
+ } from "./chunk-ZODSGFAP.js";
106
110
  import "./chunk-OWBRDNRZ.js";
107
111
  import {
108
112
  errorMessage
@@ -500,7 +504,180 @@ async function runInit(cwd = process.cwd()) {
500
504
  }
501
505
 
502
506
  // src/graph/commands/serve.ts
507
+ import { existsSync as existsSync2, readFileSync as readFileSync2, statSync } from "node:fs";
508
+ import { basename as basename2, dirname as dirname2, join as join2, relative as relative2, resolve as resolve4, sep } from "node:path";
503
509
  import { Ajv2020 } from "ajv/dist/2020.js";
510
+
511
+ // src/graph/commands/publish.ts
512
+ import { basename, dirname, join, relative, resolve as resolve3 } from "node:path";
513
+ var plural = (n, word) => `${String(n)} ${word}${n === 1 ? "" : "s"}`;
514
+ async function runPublish(opts = {}) {
515
+ const cwd = opts.cwd ?? process.cwd();
516
+ const source = {
517
+ ...opts.config === void 0 ? {} : { config: opts.config },
518
+ ...opts.noConfig === void 0 ? {} : { noConfig: opts.noConfig },
519
+ cwd
520
+ };
521
+ const config = loadRunConfig(
522
+ {
523
+ ...opts.config === void 0 ? {} : { configPath: opts.config },
524
+ ...opts.noConfig === void 0 ? {} : { noConfig: opts.noConfig }
525
+ },
526
+ cwd
527
+ );
528
+ const configured = resolve3(cwd, config.out);
529
+ const outDir = opts.out === void 0 ? dirname(configured) : resolve3(cwd, opts.out);
530
+ const graph = join(outDir, basename(configured));
531
+ const shown = (path) => relative(outDir, path).split("\\").join("/");
532
+ const say = opts.say ?? (() => void 0);
533
+ const steps = [];
534
+ const run = async (step, work) => {
535
+ let done;
536
+ try {
537
+ done = await work();
538
+ } catch (e) {
539
+ throw new GraphError(`graph publish stopped at ${step}: ${errorMessage(e)}`);
540
+ }
541
+ for (const w of done.warnings) say("warning", w);
542
+ for (const n of done.notices ?? []) say("notice", n);
543
+ steps.push({ step, status: "ran", detail: done.detail, files: done.files.map(shown) });
544
+ };
545
+ const skip = (step, section) => {
546
+ steps.push({ step, status: "skipped", detail: `no ${section} section`, files: [] });
547
+ };
548
+ const exported = (format, detail, out) => run(`export:${format}`, async () => {
549
+ const r = await runExport({ ...source, graph, format, ...out === void 0 ? {} : { out }, ...format === "chunks" && opts.evals !== void 0 ? { evals: opts.evals } : {} });
550
+ return { detail: detail(r), files: r.files, warnings: r.warnings, ...r.notices === void 0 ? {} : { notices: r.notices } };
551
+ });
552
+ const names = (r) => r.files.map(shown).join(", ");
553
+ await run("build", async () => {
554
+ const r = await runBuild({ ...source, ...opts.collection === void 0 ? {} : { collection: opts.collection }, out: graph });
555
+ return { detail: `${shown(r.outPath)}: ${plural(r.docs, "page")}, ${plural(r.quads, "triple")}`, files: [r.outPath], warnings: r.warnings };
556
+ });
557
+ await exported("search", (r) => `${names(r)}: ${String(r.nodes)} ${r.nodes === 1 ? "entry" : "entries"}`, outDir);
558
+ if (config.declared.embed) {
559
+ await run("embed", async () => {
560
+ const r = await runEmbed({ ...source, graph, index: outDir, out: outDir });
561
+ const models = [...new Set(r.languages.map((l) => l.model))].join(", ");
562
+ const files = r.languages.map((l) => l.outPath);
563
+ return { detail: `${files.map(shown).join(", ")}: ${plural(r.total, "vector")}, ${models}`, files, warnings: [] };
564
+ });
565
+ } else {
566
+ skip("embed", "graph.embed");
567
+ }
568
+ await exported("jsonld", (r) => `${names(r)}: ${plural(r.nodes, "node")}`);
569
+ await exported("chunks", (r) => `${names(r)}: ${plural(r.nodes, "chunk")}, ${String(r.withheld ?? 0)} withheld`, outDir);
570
+ if (config.export.llms !== null) {
571
+ await exported("llms", (r) => `${names(r)}: ${plural(r.nodes, "page")}`, join(outDir, LLMS_FILENAME));
572
+ } else {
573
+ skip("export:llms", "graph.export.llms");
574
+ }
575
+ if (config.declared.iirds) {
576
+ await exported("iirds", (r) => `${names(r)}: ${plural(r.nodes, "node")}`);
577
+ } else {
578
+ skip("export:iirds", "graph.export.iirds");
579
+ }
580
+ const label = relative(cwd, outDir).split("\\").join("/");
581
+ return { out: label === "" ? "." : label, steps };
582
+ }
583
+ function renderPublish(report, format) {
584
+ if (format === "json") return JSON.stringify(report, null, 2);
585
+ const lines = report.steps.map((s) => {
586
+ if (s.status === "skipped") return `skipped ${s.step.replace(/^export:/, "")}: ${s.detail}`;
587
+ return `${s.step.replace(/:.*$/, "").padEnd(9)} ${s.detail}`;
588
+ });
589
+ const files = new Set(report.steps.flatMap((s) => s.files)).size;
590
+ lines.push(`Published ${plural(files, "file")} to ${report.out}/.`);
591
+ return lines.join("\n");
592
+ }
593
+
594
+ // src/graph/commands/serve-fit.ts
595
+ function proofed(p) {
596
+ if (p.text !== null) return p;
597
+ const { provenance, ...rest } = p;
598
+ return rest;
599
+ }
600
+ function reference(p) {
601
+ return {
602
+ iri: p.iri,
603
+ ...p.title === void 0 ? {} : { title: p.title },
604
+ page: p.page,
605
+ ...p.lines === void 0 ? {} : { lines: p.lines },
606
+ ...p.rank === void 0 ? {} : { rank: p.rank },
607
+ ...p.score === void 0 ? {} : { score: { fused: p.score.fused } },
608
+ ...p.depth === void 0 ? {} : { depth: p.depth },
609
+ ...p.role === void 0 ? {} : { role: p.role },
610
+ text: null,
611
+ truncated: true
612
+ };
613
+ }
614
+ function texted(all, passages) {
615
+ const named2 = new Set(passages.filter((p) => p.text !== null).map((p) => p.page));
616
+ return Object.fromEntries(Object.entries(all).filter(([page]) => named2.has(page)));
617
+ }
618
+ var slotsOf = (list, owner) => list.map((_, index) => ({ list, index, owner }));
619
+ var deepestFirst = (s) => slotsOf(s.passages, s).sort(
620
+ (a, b) => (b.list[b.index]?.depth ?? 0) - (a.list[a.index]?.depth ?? 0) || b.index - a.index
621
+ );
622
+ var lowestRankedFirst = (s) => slotsOf(s.passages, s).sort((a, b) => (b.list[b.index]?.rank ?? b.index) - (a.list[a.index]?.rank ?? a.index));
623
+ function cap(out, maxChars, stages, sync) {
624
+ const over = () => JSON.stringify(out).length > maxChars;
625
+ for (const stage of stages) {
626
+ if (!Array.isArray(stage)) {
627
+ while (stage.edges.length > 0 && over()) {
628
+ stage.edges.pop();
629
+ stage.truncated = true;
630
+ }
631
+ continue;
632
+ }
633
+ for (const { list, index, owner } of stage) {
634
+ if (!over()) return;
635
+ const p = list[index];
636
+ if (p === void 0) continue;
637
+ list[index] = reference(p);
638
+ owner.truncated = true;
639
+ sync();
640
+ }
641
+ }
642
+ }
643
+ function fitAnswer(answer2, maxChars) {
644
+ if (answer2.refusal !== void 0) return answer2;
645
+ const trace = {
646
+ entry: answer2.trace.entry,
647
+ withheld: answer2.trace.withheld,
648
+ filtered: answer2.trace.filtered
649
+ };
650
+ if ("matches" in answer2) {
651
+ const out2 = {
652
+ ...answer2,
653
+ matches: { ...answer2.matches, passages: answer2.matches.passages.map(proofed) },
654
+ traversal: { ...answer2.traversal, passages: answer2.traversal.passages.map(proofed), edges: [...answer2.traversal.edges] },
655
+ impact: { ...answer2.impact, passages: answer2.impact.passages.map(proofed), edges: [...answer2.impact.edges] },
656
+ trace
657
+ };
658
+ const sync2 = () => {
659
+ out2.pages = texted(answer2.pages, [...out2.matches.passages, ...out2.traversal.passages, ...out2.impact.passages]);
660
+ };
661
+ sync2();
662
+ const stages = [
663
+ [...deepestFirst(out2.impact), ...deepestFirst(out2.traversal)],
664
+ out2.impact,
665
+ out2.traversal,
666
+ lowestRankedFirst(out2.matches)
667
+ ];
668
+ cap(out2, maxChars, stages, sync2);
669
+ return out2;
670
+ }
671
+ const out = { ...answer2, context: answer2.context.map(proofed), trace };
672
+ const sync = () => {
673
+ out.pages = texted(answer2.pages, out.context);
674
+ };
675
+ sync();
676
+ cap(out, maxChars, [slotsOf(out.context, out).reverse()], sync);
677
+ return out;
678
+ }
679
+
680
+ // src/graph/commands/serve.ts
504
681
  async function importSdk() {
505
682
  const [mcp, stdio, types] = await Promise.all([
506
683
  import("@modelcontextprotocol/sdk/server/mcp.js"),
@@ -551,10 +728,7 @@ var REFUSAL = {
551
728
  required: ["reason", "detail"]
552
729
  };
553
730
  var PROOF = { type: "object", description: "The provenance record: pins, dates and eval verdicts." };
554
- var TRACE = {
555
- type: "object",
556
- required: ["entry", "hops", "exclusions", "resolutions", "withheld", "filtered"]
557
- };
731
+ var TRACE = { type: "object", required: ["entry", "withheld", "filtered"] };
558
732
  var CITATIONS = {
559
733
  type: "array",
560
734
  items: { type: "object", properties: { iri: { type: "string" }, sourceUrl: { type: "string" } }, required: ["iri", "sourceUrl"] }
@@ -574,13 +748,14 @@ var BUNDLE = {
574
748
  properties: {
575
749
  iri: { type: "string" },
576
750
  title: { type: "string" },
577
- text: { type: "string" },
751
+ text: NULLABLE_TEXT,
578
752
  page: { type: "string" },
579
753
  depth: { type: "integer" },
580
754
  role: { type: "string", enum: ["match", "context", "dependent"] },
755
+ truncated: { type: "boolean" },
581
756
  provenance: PROOF
582
757
  },
583
- required: ["iri", "text", "page", "depth", "role", "provenance"]
758
+ required: ["iri", "text", "page", "depth", "role"]
584
759
  }
585
760
  },
586
761
  citations: CITATIONS,
@@ -604,7 +779,7 @@ var PASSAGE = (extra, required) => ({
604
779
  provenance: PROOF,
605
780
  ...extra
606
781
  },
607
- required: ["iri", "page", "text", "truncated", "provenance", ...required]
782
+ required: ["iri", "page", "text", "truncated", ...required]
608
783
  });
609
784
  var EDGES = {
610
785
  type: "array",
@@ -653,7 +828,7 @@ var READ_ONLY = { readOnlyHint: true, openWorldHint: false };
653
828
  var TOOLS = [
654
829
  {
655
830
  name: "lookup",
656
- description: "Start here. Pass the reader's question. You get three full result sets. Every match is ranked with its scores. Every passage reached by following links outward from the matches comes back, and so does every passage that depends on the matches. Each set has its edges, and each passage has its source and proof: pin status, dates and eval verdicts. A refusal means nothing in the docs answers it.",
831
+ description: "Start here. Pass the reader's question. You get three result sets. Every match is ranked with its scores. Every passage reached by following links outward from the matches comes back, and so does every passage that depends on the matches. Each set has its edges, and each passage with text has its source and proof: pin status, dates and eval verdicts. When the answer runs long, the lowest-priority passages come back as references with no text. A refusal means nothing in the docs answers it.",
657
832
  inputSchema: input({ question: QUESTION }, "question"),
658
833
  outputSchema: LOOKUP_RESULT,
659
834
  annotations: READ_ONLY
@@ -772,7 +947,128 @@ async function answer(artifact, name, args, withhold) {
772
947
  return refused;
773
948
  }
774
949
  }
950
+ var RUN_PUBLISH = "; run manni graph publish.";
951
+ function publisher(opts, seams) {
952
+ const cwd = opts.cwd ?? process.cwd();
953
+ const source = {
954
+ ...opts.config === void 0 ? {} : { config: opts.config },
955
+ ...opts.noConfig === void 0 ? {} : { noConfig: opts.noConfig },
956
+ cwd
957
+ };
958
+ const config = loadRunConfig(
959
+ {
960
+ ...opts.config === void 0 ? {} : { configPath: opts.config },
961
+ ...opts.noConfig === void 0 ? {} : { noConfig: opts.noConfig }
962
+ },
963
+ cwd
964
+ );
965
+ const configured = resolve4(cwd, config.out);
966
+ const index = opts.index === void 0 ? dirname2(configured) : resolve4(cwd, opts.index);
967
+ const target = { ...opts, graph: join2(index, basename2(configured)), index };
968
+ const shown = (path) => relative2(cwd, path).split("\\").join("/");
969
+ const publish = seams.publish ?? runPublish;
970
+ const fingerprint = (state) => {
971
+ if (state === null) return null;
972
+ const lines = changed(state).map((abs) => {
973
+ try {
974
+ const s = statSync(abs);
975
+ return `${abs} ${String(s.size)} ${String(s.mtimeMs)}`;
976
+ } catch {
977
+ return `${abs} gone`;
978
+ }
979
+ });
980
+ return [state.head, ...lines].join("\n");
981
+ };
982
+ const changed = (state) => state.paths.map((p) => resolve4(state.root, p)).filter((abs) => abs !== index && !abs.startsWith(index + sep)).sort(byCodeUnit);
983
+ let artifact;
984
+ let failed;
985
+ let baseline = null;
986
+ let inflight;
987
+ const publishing = () => inflight;
988
+ const staleness = (state) => {
989
+ try {
990
+ artifact = openArtifact(target);
991
+ } catch (e) {
992
+ if (!(e instanceof GraphError)) throw e;
993
+ if (e.message.endsWith(RUN_PUBLISH)) return e.message.slice(0, -RUN_PUBLISH.length);
994
+ const graph = target.graph ?? "";
995
+ return existsSync2(graph) ? e.message.replace(/\.$/, "") : `${shown(graph)} does not exist`;
996
+ }
997
+ const { commit } = parseChunksManifest(readFileSync2(join2(index, CHUNKS_MANIFEST), "utf8"));
998
+ if (commit === null) return "it records no commit";
999
+ if (state === null) return void 0;
1000
+ if (commit !== state.head) return `it was built at ${commit.slice(0, 7)} and HEAD is ${state.head.slice(0, 7)}`;
1001
+ if (changed(state).length > 0) return "the working tree has changes";
1002
+ return void 0;
1003
+ };
1004
+ const run = async (print) => {
1005
+ baseline = print;
1006
+ const began = performance.now();
1007
+ try {
1008
+ await publish({
1009
+ ...source,
1010
+ out: index,
1011
+ say: (kind, message) => {
1012
+ if (kind === "warning") warn(message);
1013
+ else notice(message);
1014
+ }
1015
+ });
1016
+ artifact = openArtifact(target);
1017
+ } catch (e) {
1018
+ const said = errorMessage(e);
1019
+ notice(said);
1020
+ return `${said.replace(/\.$/, "")}. Run manni graph publish to see the whole report.`;
1021
+ }
1022
+ notice(`published the graph in ${((performance.now() - began) / 1e3).toFixed(1)}s.`);
1023
+ return void 0;
1024
+ };
1025
+ let ready;
1026
+ const start = () => ready ??= (async () => {
1027
+ try {
1028
+ const state = await checkoutStatus(cwd);
1029
+ const reason = staleness(state);
1030
+ if (reason === void 0) baseline = fingerprint(state);
1031
+ else {
1032
+ notice(`publishing the graph before serving it: ${reason}.`);
1033
+ failed = await run(fingerprint(state));
1034
+ }
1035
+ } catch (e) {
1036
+ failed = errorMessage(e);
1037
+ notice(failed);
1038
+ }
1039
+ if (failed === void 0) {
1040
+ notice(`serving lookup, retrieve, traverse and impact over stdio from ${shown(join2(index, CHUNKS_MANIFEST))}.`);
1041
+ }
1042
+ return failed;
1043
+ })();
1044
+ const fresh = async () => {
1045
+ if (inflight !== void 0) return inflight;
1046
+ if (baseline === null) return void 0;
1047
+ const now = fingerprint(await checkoutStatus(cwd));
1048
+ const begun = publishing();
1049
+ if (begun !== void 0) return begun;
1050
+ if (now === baseline) return void 0;
1051
+ notice("republishing the graph: the checkout changed since the last publish.");
1052
+ inflight = run(now).finally(() => inflight = void 0);
1053
+ return inflight;
1054
+ };
1055
+ return {
1056
+ start,
1057
+ current: async () => {
1058
+ const startup = await start();
1059
+ if (startup !== void 0) return startup;
1060
+ const later = await fresh();
1061
+ return later ?? artifact ?? "graph serve has no artifact to answer from.";
1062
+ },
1063
+ running: () => [...ready === void 0 ? [] : [ready], ...inflight === void 0 ? [] : [inflight]]
1064
+ };
1065
+ }
775
1066
  async function runServe(opts, seams = {}) {
1067
+ if (opts.publish === true && opts.graph !== void 0) {
1068
+ throw new GraphError(
1069
+ "--publish writes graph.ttl into the index directory, so it cannot be combined with --graph. Use --index to choose the directory."
1070
+ );
1071
+ }
776
1072
  let sdk;
777
1073
  try {
778
1074
  sdk = await (seams.loadSdk ?? importSdk)();
@@ -781,7 +1077,16 @@ async function runServe(opts, seams = {}) {
781
1077
  "graph serve needs the optional @modelcontextprotocol/sdk package; run npm install @modelcontextprotocol/sdk."
782
1078
  );
783
1079
  }
784
- const artifact = openArtifact(opts);
1080
+ const kept = opts.publish === true ? publisher(opts, seams) : void 0;
1081
+ let opened;
1082
+ let current;
1083
+ if (kept === void 0) {
1084
+ const artifact = openArtifact(opts);
1085
+ opened = artifact;
1086
+ current = () => Promise.resolve(artifact);
1087
+ } else {
1088
+ current = kept.current;
1089
+ }
785
1090
  const ajv = new Ajv2020({ allErrors: false, strict: false });
786
1091
  const validators = new Map(TOOLS.map((t) => [t.name, ajv.compile(t.inputSchema)]));
787
1092
  const server = new sdk.McpServer(
@@ -807,10 +1112,15 @@ async function runServe(opts, seams = {}) {
807
1112
  const why = first?.keyword === "additionalProperties" ? `${String(first.params.additionalProperty)} is not an argument` : `${where} ${first?.message ?? "is invalid"}`;
808
1113
  return fault(`Invalid arguments for ${name}: ${why}.`);
809
1114
  }
810
- const work = answer(artifact, name, args, opts.withhold);
1115
+ const work = (async () => {
1116
+ const held = await current();
1117
+ if (typeof held === "string") return held;
1118
+ return fitAnswer(await answer(held, name, args, opts.withhold), held.config.serve.maxChars);
1119
+ })();
811
1120
  pending.add(work);
812
1121
  try {
813
1122
  const result = await work;
1123
+ if (typeof result === "string") return fault(result);
814
1124
  return {
815
1125
  structuredContent: { ...result },
816
1126
  content: [{ type: "text", text: JSON.stringify(result) }]
@@ -828,94 +1138,13 @@ async function runServe(opts, seams = {}) {
828
1138
  stdin.once("close", done);
829
1139
  });
830
1140
  await server.connect(transport);
831
- notice(`serving lookup, retrieve, traverse and impact over stdio from ${artifact.label}.`);
1141
+ if (opened !== void 0) notice(`serving lookup, retrieve, traverse and impact over stdio from ${opened.label}.`);
1142
+ const startup = kept?.start();
832
1143
  await closed;
833
- await Promise.allSettled([...pending]);
1144
+ await Promise.allSettled([...pending, ...kept?.running() ?? []]);
834
1145
  await new Promise((done) => setImmediate(done));
835
1146
  await server.close();
836
- }
837
-
838
- // src/graph/commands/publish.ts
839
- import { basename, dirname, join, relative, resolve as resolve3 } from "node:path";
840
- var plural = (n, word) => `${String(n)} ${word}${n === 1 ? "" : "s"}`;
841
- async function runPublish(opts = {}) {
842
- const cwd = opts.cwd ?? process.cwd();
843
- const source = {
844
- ...opts.config === void 0 ? {} : { config: opts.config },
845
- ...opts.noConfig === void 0 ? {} : { noConfig: opts.noConfig },
846
- cwd
847
- };
848
- const config = loadRunConfig(
849
- {
850
- ...opts.config === void 0 ? {} : { configPath: opts.config },
851
- ...opts.noConfig === void 0 ? {} : { noConfig: opts.noConfig }
852
- },
853
- cwd
854
- );
855
- const configured = resolve3(cwd, config.out);
856
- const outDir = opts.out === void 0 ? dirname(configured) : resolve3(cwd, opts.out);
857
- const graph = join(outDir, basename(configured));
858
- const shown = (path) => relative(outDir, path).split("\\").join("/");
859
- const say = opts.say ?? (() => void 0);
860
- const steps = [];
861
- const run = async (step, work) => {
862
- let done;
863
- try {
864
- done = await work();
865
- } catch (e) {
866
- throw new GraphError(`graph publish stopped at ${step}: ${errorMessage(e)}`);
867
- }
868
- for (const w of done.warnings) say("warning", w);
869
- for (const n of done.notices ?? []) say("notice", n);
870
- steps.push({ step, status: "ran", detail: done.detail, files: done.files.map(shown) });
871
- };
872
- const skip = (step, section) => {
873
- steps.push({ step, status: "skipped", detail: `no ${section} section`, files: [] });
874
- };
875
- const exported = (format, detail, out) => run(`export:${format}`, async () => {
876
- const r = await runExport({ ...source, graph, format, ...out === void 0 ? {} : { out }, ...format === "chunks" && opts.evals !== void 0 ? { evals: opts.evals } : {} });
877
- return { detail: detail(r), files: r.files, warnings: r.warnings, ...r.notices === void 0 ? {} : { notices: r.notices } };
878
- });
879
- const names = (r) => r.files.map(shown).join(", ");
880
- await run("build", async () => {
881
- const r = await runBuild({ ...source, out: graph });
882
- return { detail: `${shown(r.outPath)}: ${plural(r.docs, "page")}, ${plural(r.quads, "triple")}`, files: [r.outPath], warnings: r.warnings };
883
- });
884
- await exported("search", (r) => `${names(r)}: ${String(r.nodes)} ${r.nodes === 1 ? "entry" : "entries"}`, outDir);
885
- if (config.declared.embed) {
886
- await run("embed", async () => {
887
- const r = await runEmbed({ ...source, graph, index: outDir, out: outDir });
888
- const models = [...new Set(r.languages.map((l) => l.model))].join(", ");
889
- const files = r.languages.map((l) => l.outPath);
890
- return { detail: `${files.map(shown).join(", ")}: ${plural(r.total, "vector")}, ${models}`, files, warnings: [] };
891
- });
892
- } else {
893
- skip("embed", "graph.embed");
894
- }
895
- await exported("jsonld", (r) => `${names(r)}: ${plural(r.nodes, "node")}`);
896
- await exported("chunks", (r) => `${names(r)}: ${plural(r.nodes, "chunk")}, ${String(r.withheld ?? 0)} withheld`, outDir);
897
- if (config.export.llms !== null) {
898
- await exported("llms", (r) => `${names(r)}: ${plural(r.nodes, "page")}`, join(outDir, LLMS_FILENAME));
899
- } else {
900
- skip("export:llms", "graph.export.llms");
901
- }
902
- if (config.declared.iirds) {
903
- await exported("iirds", (r) => `${names(r)}: ${plural(r.nodes, "node")}`);
904
- } else {
905
- skip("export:iirds", "graph.export.iirds");
906
- }
907
- const label = relative(cwd, outDir).split("\\").join("/");
908
- return { out: label === "" ? "." : label, steps };
909
- }
910
- function renderPublish(report, format) {
911
- if (format === "json") return JSON.stringify(report, null, 2);
912
- const lines = report.steps.map((s) => {
913
- if (s.status === "skipped") return `skipped ${s.step.replace(/^export:/, "")}: ${s.detail}`;
914
- return `${s.step.replace(/:.*$/, "").padEnd(9)} ${s.detail}`;
915
- });
916
- const files = new Set(report.steps.flatMap((s) => s.files)).size;
917
- lines.push(`Published ${plural(files, "file")} to ${report.out}/.`);
918
- return lines.join("\n");
1147
+ return await startup === void 0 ? 0 : 2;
919
1148
  }
920
1149
 
921
1150
  // src/graph/cli.ts
@@ -1435,10 +1664,13 @@ function buildProgram() {
1435
1664
  "--withhold <list>",
1436
1665
  "Also leave out passages that are drifted or failing, comma-separated, on every call",
1437
1666
  withholdOption
1667
+ ).option(
1668
+ "--publish",
1669
+ "Publish the graph first when its artifact is missing or older than the checkout, and again after the checkout changes"
1438
1670
  ).action(
1439
1671
  async (opts) => {
1440
1672
  try {
1441
- await runServe({ ...rest(opts), ...documentOptions(opts) });
1673
+ process.exitCode = await runServe({ ...rest(opts), ...documentOptions(opts) });
1442
1674
  } catch (e) {
1443
1675
  fail(e);
1444
1676
  }
@@ -1509,7 +1741,7 @@ function buildProgram() {
1509
1741
  );
1510
1742
  program.command("publish").description(
1511
1743
  "Build, embed when configured, and export everything serving needs into one directory"
1512
- ).option("-c, --config <path>", "Path to manni.config.yaml").option("--no-config", "Ignore any discovered config file").option("-o, --out <dir>", "Directory for every artifact (default: the directory of config out)").option("--evals <path>", "A docevals JSON report for the chunks (default: config export.chunks.evals)").option(
1744
+ ).option("-c, --config <path>", "Path to manni.config.yaml").option("--no-config", "Ignore any discovered config file").option("-o, --out <dir>", "Directory for every artifact (default: the directory of config out)").option("--evals <path>", "A docevals JSON report for the chunks (default: config export.chunks.evals)").option("--collection <name>", "Configured collection to read (repeatable)", collect, []).option(
1513
1745
  "-f, --format <format>",
1514
1746
  `Output: ${GRAPH_FORMAT_LIST}`,
1515
1747
  formatOption,
@@ -1538,4 +1770,4 @@ export {
1538
1770
  buildProgram,
1539
1771
  colorFor
1540
1772
  };
1541
- //# sourceMappingURL=cli-4P4FWT6C.js.map
1773
+ //# sourceMappingURL=cli-4IE6CRAT.js.map