@hawkeyexl/manni 4.16.0 → 4.18.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 (239) hide show
  1. package/README.md +1 -1
  2. package/dist/{batch-L5W4JS7A.js → batch-5TPNK5BQ.js} +14 -14
  3. package/dist/{build-GNZUVDZX.js → build-GGKCRWKH.js} +15 -14
  4. package/dist/{calibrate-2LYIDN6U.js → calibrate-OGOLLGXY.js} +15 -15
  5. package/dist/{capture-OEDMFU5Z.js → capture-CNHRHTA7.js} +14 -14
  6. package/dist/{check-NLLFHNWG.js → check-BAMOJMOJ.js} +16 -15
  7. package/dist/{check-Z5VGDSDT.js → check-XLIS5A7G.js} +13 -14
  8. package/dist/check-XYGABPXI.js +47 -0
  9. package/dist/{check-JR2TYL2Y.js → check-ZFI7H7LS.js} +15 -15
  10. package/dist/{cli-THEU2QG2.js → chunk-245W2Q7C.js} +133 -365
  11. package/dist/chunk-245W2Q7C.js.map +1 -0
  12. package/dist/{chunk-OJ7FEM2G.js → chunk-27FP4KKD.js} +47 -10
  13. package/dist/chunk-27FP4KKD.js.map +1 -0
  14. package/dist/{chunk-GQQ2AX63.js → chunk-2QZCPPVE.js} +38 -432
  15. package/dist/chunk-2QZCPPVE.js.map +1 -0
  16. package/dist/{chunk-BMYCLTFK.js → chunk-327CWO33.js} +3 -3
  17. package/dist/{chunk-WT3AATHC.js → chunk-33FIOHJ4.js} +252 -425
  18. package/dist/chunk-33FIOHJ4.js.map +1 -0
  19. package/dist/{chunk-ZJZQPOJO.js → chunk-3COYAAR7.js} +2 -2
  20. package/dist/{chunk-6ANTGYNT.js → chunk-3LZ6AYB4.js} +2 -2
  21. package/dist/{chunk-2AUULNIJ.js → chunk-4A445ALG.js} +3 -3
  22. package/dist/{chunk-L3YGGYBG.js → chunk-4KY2RUXQ.js} +3 -3
  23. package/dist/{chunk-NDBISART.js → chunk-5VA3ZOB7.js} +3 -3
  24. package/dist/{chunk-4LLYPDNG.js → chunk-6E6Z6UQL.js} +7 -7
  25. package/dist/{chunk-CSLJMML4.js → chunk-6ZYXK3JT.js} +4 -4
  26. package/dist/chunk-7RZQAMA2.js +314 -0
  27. package/dist/chunk-7RZQAMA2.js.map +1 -0
  28. package/dist/{chunk-NH6B6DDI.js → chunk-CWVL7XZR.js} +4 -4
  29. package/dist/{chunk-DTG6S2UG.js → chunk-E3YXGLEU.js} +2 -2
  30. package/dist/{chunk-5PO2BWZF.js → chunk-E76WPNYO.js} +2 -2
  31. package/dist/{chunk-F4GXZMEO.js → chunk-EITEHOSX.js} +12 -7
  32. package/dist/{chunk-F4GXZMEO.js.map → chunk-EITEHOSX.js.map} +1 -1
  33. package/dist/{chunk-DSTRT6YD.js → chunk-EU5QLSNN.js} +3 -3
  34. package/dist/{chunk-F6B2TNXU.js → chunk-F7GYY373.js} +6 -6
  35. package/dist/{chunk-6NTNLKNQ.js → chunk-FE3US7FR.js} +6 -5
  36. package/dist/{chunk-6NTNLKNQ.js.map → chunk-FE3US7FR.js.map} +1 -1
  37. package/dist/{chunk-IL62WATF.js → chunk-FNQE3RAW.js} +2 -2
  38. package/dist/chunk-FO6MNXOF.js +580 -0
  39. package/dist/chunk-FO6MNXOF.js.map +1 -0
  40. package/dist/{chunk-5D24C6WM.js → chunk-GMOAW2EG.js} +6 -2
  41. package/dist/chunk-GMOAW2EG.js.map +1 -0
  42. package/dist/chunk-GNZKLUZW.js +459 -0
  43. package/dist/chunk-GNZKLUZW.js.map +1 -0
  44. package/dist/{chunk-LEOQO3S6.js → chunk-ICRYIYMJ.js} +7 -7
  45. package/dist/{chunk-GR6QQ7GM.js → chunk-IIBVQCCR.js} +4 -4
  46. package/dist/{chunk-O6YTTBSN.js → chunk-JFB45L7D.js} +2 -2
  47. package/dist/chunk-JFPCDIES.js +1338 -0
  48. package/dist/chunk-JFPCDIES.js.map +1 -0
  49. package/dist/{chunk-2XRET3ZG.js → chunk-JHUEACRT.js} +31 -47
  50. package/dist/chunk-JHUEACRT.js.map +1 -0
  51. package/dist/{chunk-7UC55CAU.js → chunk-JS5NCZYC.js} +187 -159
  52. package/dist/chunk-JS5NCZYC.js.map +1 -0
  53. package/dist/{chunk-63GILHR5.js → chunk-KRQTN5KE.js} +4 -4
  54. package/dist/{chunk-WDENIUC7.js → chunk-MDZXRHIJ.js} +1 -1
  55. package/dist/chunk-MDZXRHIJ.js.map +1 -0
  56. package/dist/{chunk-3GLDB7MZ.js → chunk-MH5MX4B3.js} +1311 -18
  57. package/dist/chunk-MH5MX4B3.js.map +1 -0
  58. package/dist/{chunk-IGRXQC3H.js → chunk-N25KDXOV.js} +2 -2
  59. package/dist/{chunk-DW22KCLN.js → chunk-NPZWOPOH.js} +3 -3
  60. package/dist/{chunk-4L3JBAW4.js → chunk-NUAVQQMC.js} +2 -2
  61. package/dist/{chunk-PBZZUNDV.js → chunk-O2TE5X25.js} +7 -7
  62. package/dist/{chunk-EOSQENQF.js → chunk-OVQDZOMU.js} +2 -2
  63. package/dist/{chunk-WD33LE5A.js → chunk-OZWV27SE.js} +1313 -127
  64. package/dist/chunk-OZWV27SE.js.map +1 -0
  65. package/dist/{chunk-5OOQ3HQ3.js → chunk-PCTJ7P6U.js} +11 -2
  66. package/dist/chunk-PCTJ7P6U.js.map +1 -0
  67. package/dist/{chunk-EZCJPF72.js → chunk-PLN2LJDM.js} +3 -3
  68. package/dist/{chunk-D4ANAOY7.js → chunk-QGJA43DX.js} +20 -6
  69. package/dist/chunk-QGJA43DX.js.map +1 -0
  70. package/dist/{chunk-6YFEV7CM.js → chunk-QWYE3S3U.js} +5 -5
  71. package/dist/{chunk-GC47NBGO.js → chunk-QXTL5MGT.js} +4 -4
  72. package/dist/{chunk-AWAXAJ6R.js → chunk-RCWP63XT.js} +2 -2
  73. package/dist/{chunk-IM67NRUW.js → chunk-RMKMJ43W.js} +2 -2
  74. package/dist/{chunk-EA5KKIFG.js → chunk-RVSUMNCR.js} +3 -3
  75. package/dist/{chunk-NFJGIBES.js → chunk-SVB45M54.js} +82 -238
  76. package/dist/chunk-SVB45M54.js.map +1 -0
  77. package/dist/{chunk-4HEEXPVX.js → chunk-T3VFO2LO.js} +6 -6
  78. package/dist/{chunk-FU3OCYYH.js → chunk-TFTGMYDR.js} +2 -2
  79. package/dist/chunk-UP6NBQ62.js +2 -0
  80. package/dist/{chunk-LPBVWUKS.js → chunk-V2IP2ZMD.js} +2 -2
  81. package/dist/{chunk-PHNAQ4QX.js → chunk-V5QTIP2M.js} +182 -94
  82. package/dist/chunk-V5QTIP2M.js.map +1 -0
  83. package/dist/{chunk-B3XXCDYW.js → chunk-VV4YM6VM.js} +2385 -2061
  84. package/dist/chunk-VV4YM6VM.js.map +1 -0
  85. package/dist/{chunk-7GB3KEEM.js → chunk-XKZZRG3Z.js} +24 -460
  86. package/dist/chunk-XKZZRG3Z.js.map +1 -0
  87. package/dist/{chunk-ZT5NUSZA.js → chunk-XTQTA262.js} +146 -27
  88. package/dist/chunk-XTQTA262.js.map +1 -0
  89. package/dist/chunk-YLU4H2H3.js +545 -0
  90. package/dist/chunk-YLU4H2H3.js.map +1 -0
  91. package/dist/{chunk-YF6IZXAC.js → chunk-ZLOLC6WD.js} +7 -7
  92. package/dist/{cli-RWRYV5FB.js → cli-6UQ3QV2G.js} +9 -9
  93. package/dist/{cli-LZW6Z33F.js → cli-GH42HLFK.js} +42 -24
  94. package/dist/cli-GH42HLFK.js.map +1 -0
  95. package/dist/{cli-5QTSTGTX.js → cli-GND6TVRG.js} +18 -18
  96. package/dist/{cli-4Y2XY52B.js → cli-JHULEOH2.js} +2 -2
  97. package/dist/cli-LVHZCC2O.js +379 -0
  98. package/dist/cli-LVHZCC2O.js.map +1 -0
  99. package/dist/{cli-2EKRURBU.js → cli-NWU77YRZ.js} +15 -15
  100. package/dist/{cli-2SDBEUER.js → cli-PUO75R3L.js} +21 -21
  101. package/dist/{cli-TZ2OHF3H.js → cli-Q2RJMCVE.js} +28 -20
  102. package/dist/cli-Q2RJMCVE.js.map +1 -0
  103. package/dist/{cli-DBMPGGOV.js → cli-RUNYBUIV.js} +38 -38
  104. package/dist/{cli-BXUZ3KEQ.js → cli-T7UJF3BF.js} +634 -36
  105. package/dist/cli-T7UJF3BF.js.map +1 -0
  106. package/dist/{cli-KAUXC7EZ.js → cli-WUFQGIUG.js} +9 -9
  107. package/dist/cli.js +14 -14
  108. package/dist/docmeta.js +8 -8
  109. package/dist/{github-UR6LMUMW.js → github-BV42LSW2.js} +13 -14
  110. package/dist/github-XZ7OLATY.js +35 -0
  111. package/dist/graph/runtime.d.ts +633 -217
  112. package/dist/graph/runtime.js +1001 -370
  113. package/dist/graph/runtime.js.map +1 -1
  114. package/dist/index.d.ts +2734 -1977
  115. package/dist/index.js +109 -65
  116. package/dist/index.js.map +1 -1
  117. package/dist/{json-QTYN2JQB.js → json-LEEXKSGP.js} +13 -14
  118. package/dist/{json-5EQCGVCV.js → json-YTKUFNO3.js} +2 -2
  119. package/dist/{labels-UM2AFR5S.js → labels-E256WRAI.js} +12 -13
  120. package/dist/{labels-UM2AFR5S.js.map → labels-E256WRAI.js.map} +1 -1
  121. package/dist/{lint-LOFNZZPR.js → lint-W4CM3EIO.js} +13 -13
  122. package/dist/{list-GU7S6KEX.js → list-TB4R6AP4.js} +13 -14
  123. package/dist/{list-EPMHOU7T.js → list-UDDGL2OI.js} +15 -15
  124. package/dist/{page-25CN3AFY.js → page-L64NO57W.js} +13 -14
  125. package/dist/{prepare-5GYMBF4P.js → prepare-GFTAYDTP.js} +13 -13
  126. package/dist/{pretty-52Z74O6F.js → pretty-HYCYKYHB.js} +14 -15
  127. package/dist/{pretty-QW6OSYRS.js → pretty-Q43TCD6D.js} +13 -14
  128. package/dist/{reporters-WT53GD4P.js → reporters-4HRBSMUF.js} +4 -4
  129. package/dist/{reporters-FSXJ42EB.js → reporters-6TEJDXXO.js} +4 -4
  130. package/dist/{reporters-3FXX2W4X.js → reporters-E3FUVBQ6.js} +12 -12
  131. package/dist/{run-H7XJMUWK.js → run-UDX2C54M.js} +16 -16
  132. package/dist/{sarif-C427U3NA.js → sarif-WL353VTA.js} +11 -11
  133. package/dist/sarif-XZFJ5VIJ.js +36 -0
  134. package/dist/site/rehype.d.ts +33 -0
  135. package/dist/site/rehype.js +49 -0
  136. package/dist/site/rehype.js.map +1 -0
  137. package/dist/{term-VG65JRNR.js → term-OZ7ZR5KB.js} +18 -19
  138. package/dist/{term-VG65JRNR.js.map → term-OZ7ZR5KB.js.map} +1 -1
  139. package/dist/{types-VMOT7RAL.js → types-7N7ETP3W.js} +2 -2
  140. package/dist/{validate-K36F54UB.js → validate-CR3TI7GP.js} +5 -5
  141. package/package.json +10 -1
  142. package/plugin/manni/.claude-plugin/plugin.json +1 -1
  143. package/shapes/graph/shapes-1.2.0.ttl +1161 -0
  144. package/dist/check-LVO4HZ3F.js +0 -36
  145. package/dist/chunk-2XRET3ZG.js.map +0 -1
  146. package/dist/chunk-3GLDB7MZ.js.map +0 -1
  147. package/dist/chunk-3WZQ2FR3.js +0 -236
  148. package/dist/chunk-3WZQ2FR3.js.map +0 -1
  149. package/dist/chunk-5D24C6WM.js.map +0 -1
  150. package/dist/chunk-5OOQ3HQ3.js.map +0 -1
  151. package/dist/chunk-7GB3KEEM.js.map +0 -1
  152. package/dist/chunk-7UC55CAU.js.map +0 -1
  153. package/dist/chunk-B3XXCDYW.js.map +0 -1
  154. package/dist/chunk-D4ANAOY7.js.map +0 -1
  155. package/dist/chunk-GQQ2AX63.js.map +0 -1
  156. package/dist/chunk-IKEWBMCN.js +0 -98
  157. package/dist/chunk-IKEWBMCN.js.map +0 -1
  158. package/dist/chunk-NFJGIBES.js.map +0 -1
  159. package/dist/chunk-OJ7FEM2G.js.map +0 -1
  160. package/dist/chunk-PHNAQ4QX.js.map +0 -1
  161. package/dist/chunk-WD33LE5A.js.map +0 -1
  162. package/dist/chunk-WDENIUC7.js.map +0 -1
  163. package/dist/chunk-WT3AATHC.js.map +0 -1
  164. package/dist/chunk-YUTVAMWW.js +0 -2
  165. package/dist/chunk-ZT5NUSZA.js.map +0 -1
  166. package/dist/cli-BXUZ3KEQ.js.map +0 -1
  167. package/dist/cli-LZW6Z33F.js.map +0 -1
  168. package/dist/cli-THEU2QG2.js.map +0 -1
  169. package/dist/cli-TZ2OHF3H.js.map +0 -1
  170. package/dist/github-ICZ5UDGX.js +0 -36
  171. package/dist/sarif-UVAFWZKS.js +0 -37
  172. /package/dist/{batch-L5W4JS7A.js.map → batch-5TPNK5BQ.js.map} +0 -0
  173. /package/dist/{build-GNZUVDZX.js.map → build-GGKCRWKH.js.map} +0 -0
  174. /package/dist/{calibrate-2LYIDN6U.js.map → calibrate-OGOLLGXY.js.map} +0 -0
  175. /package/dist/{capture-OEDMFU5Z.js.map → capture-CNHRHTA7.js.map} +0 -0
  176. /package/dist/{check-LVO4HZ3F.js.map → check-BAMOJMOJ.js.map} +0 -0
  177. /package/dist/{check-NLLFHNWG.js.map → check-XLIS5A7G.js.map} +0 -0
  178. /package/dist/{check-Z5VGDSDT.js.map → check-XYGABPXI.js.map} +0 -0
  179. /package/dist/{check-JR2TYL2Y.js.map → check-ZFI7H7LS.js.map} +0 -0
  180. /package/dist/{chunk-BMYCLTFK.js.map → chunk-327CWO33.js.map} +0 -0
  181. /package/dist/{chunk-ZJZQPOJO.js.map → chunk-3COYAAR7.js.map} +0 -0
  182. /package/dist/{chunk-6ANTGYNT.js.map → chunk-3LZ6AYB4.js.map} +0 -0
  183. /package/dist/{chunk-2AUULNIJ.js.map → chunk-4A445ALG.js.map} +0 -0
  184. /package/dist/{chunk-L3YGGYBG.js.map → chunk-4KY2RUXQ.js.map} +0 -0
  185. /package/dist/{chunk-NDBISART.js.map → chunk-5VA3ZOB7.js.map} +0 -0
  186. /package/dist/{chunk-4LLYPDNG.js.map → chunk-6E6Z6UQL.js.map} +0 -0
  187. /package/dist/{chunk-CSLJMML4.js.map → chunk-6ZYXK3JT.js.map} +0 -0
  188. /package/dist/{chunk-NH6B6DDI.js.map → chunk-CWVL7XZR.js.map} +0 -0
  189. /package/dist/{chunk-DTG6S2UG.js.map → chunk-E3YXGLEU.js.map} +0 -0
  190. /package/dist/{chunk-5PO2BWZF.js.map → chunk-E76WPNYO.js.map} +0 -0
  191. /package/dist/{chunk-DSTRT6YD.js.map → chunk-EU5QLSNN.js.map} +0 -0
  192. /package/dist/{chunk-F6B2TNXU.js.map → chunk-F7GYY373.js.map} +0 -0
  193. /package/dist/{chunk-IL62WATF.js.map → chunk-FNQE3RAW.js.map} +0 -0
  194. /package/dist/{chunk-LEOQO3S6.js.map → chunk-ICRYIYMJ.js.map} +0 -0
  195. /package/dist/{chunk-GR6QQ7GM.js.map → chunk-IIBVQCCR.js.map} +0 -0
  196. /package/dist/{chunk-O6YTTBSN.js.map → chunk-JFB45L7D.js.map} +0 -0
  197. /package/dist/{chunk-63GILHR5.js.map → chunk-KRQTN5KE.js.map} +0 -0
  198. /package/dist/{chunk-IGRXQC3H.js.map → chunk-N25KDXOV.js.map} +0 -0
  199. /package/dist/{chunk-DW22KCLN.js.map → chunk-NPZWOPOH.js.map} +0 -0
  200. /package/dist/{chunk-4L3JBAW4.js.map → chunk-NUAVQQMC.js.map} +0 -0
  201. /package/dist/{chunk-PBZZUNDV.js.map → chunk-O2TE5X25.js.map} +0 -0
  202. /package/dist/{chunk-EOSQENQF.js.map → chunk-OVQDZOMU.js.map} +0 -0
  203. /package/dist/{chunk-EZCJPF72.js.map → chunk-PLN2LJDM.js.map} +0 -0
  204. /package/dist/{chunk-6YFEV7CM.js.map → chunk-QWYE3S3U.js.map} +0 -0
  205. /package/dist/{chunk-GC47NBGO.js.map → chunk-QXTL5MGT.js.map} +0 -0
  206. /package/dist/{chunk-AWAXAJ6R.js.map → chunk-RCWP63XT.js.map} +0 -0
  207. /package/dist/{chunk-IM67NRUW.js.map → chunk-RMKMJ43W.js.map} +0 -0
  208. /package/dist/{chunk-EA5KKIFG.js.map → chunk-RVSUMNCR.js.map} +0 -0
  209. /package/dist/{chunk-4HEEXPVX.js.map → chunk-T3VFO2LO.js.map} +0 -0
  210. /package/dist/{chunk-FU3OCYYH.js.map → chunk-TFTGMYDR.js.map} +0 -0
  211. /package/dist/{chunk-YUTVAMWW.js.map → chunk-UP6NBQ62.js.map} +0 -0
  212. /package/dist/{chunk-LPBVWUKS.js.map → chunk-V2IP2ZMD.js.map} +0 -0
  213. /package/dist/{chunk-YF6IZXAC.js.map → chunk-ZLOLC6WD.js.map} +0 -0
  214. /package/dist/{cli-RWRYV5FB.js.map → cli-6UQ3QV2G.js.map} +0 -0
  215. /package/dist/{cli-5QTSTGTX.js.map → cli-GND6TVRG.js.map} +0 -0
  216. /package/dist/{cli-4Y2XY52B.js.map → cli-JHULEOH2.js.map} +0 -0
  217. /package/dist/{cli-2EKRURBU.js.map → cli-NWU77YRZ.js.map} +0 -0
  218. /package/dist/{cli-2SDBEUER.js.map → cli-PUO75R3L.js.map} +0 -0
  219. /package/dist/{cli-DBMPGGOV.js.map → cli-RUNYBUIV.js.map} +0 -0
  220. /package/dist/{cli-KAUXC7EZ.js.map → cli-WUFQGIUG.js.map} +0 -0
  221. /package/dist/{github-ICZ5UDGX.js.map → github-BV42LSW2.js.map} +0 -0
  222. /package/dist/{github-UR6LMUMW.js.map → github-XZ7OLATY.js.map} +0 -0
  223. /package/dist/{json-5EQCGVCV.js.map → json-LEEXKSGP.js.map} +0 -0
  224. /package/dist/{json-QTYN2JQB.js.map → json-YTKUFNO3.js.map} +0 -0
  225. /package/dist/{lint-LOFNZZPR.js.map → lint-W4CM3EIO.js.map} +0 -0
  226. /package/dist/{list-EPMHOU7T.js.map → list-TB4R6AP4.js.map} +0 -0
  227. /package/dist/{list-GU7S6KEX.js.map → list-UDDGL2OI.js.map} +0 -0
  228. /package/dist/{page-25CN3AFY.js.map → page-L64NO57W.js.map} +0 -0
  229. /package/dist/{prepare-5GYMBF4P.js.map → prepare-GFTAYDTP.js.map} +0 -0
  230. /package/dist/{pretty-52Z74O6F.js.map → pretty-HYCYKYHB.js.map} +0 -0
  231. /package/dist/{pretty-QW6OSYRS.js.map → pretty-Q43TCD6D.js.map} +0 -0
  232. /package/dist/{reporters-3FXX2W4X.js.map → reporters-4HRBSMUF.js.map} +0 -0
  233. /package/dist/{reporters-FSXJ42EB.js.map → reporters-6TEJDXXO.js.map} +0 -0
  234. /package/dist/{reporters-WT53GD4P.js.map → reporters-E3FUVBQ6.js.map} +0 -0
  235. /package/dist/{run-H7XJMUWK.js.map → run-UDX2C54M.js.map} +0 -0
  236. /package/dist/{sarif-C427U3NA.js.map → sarif-WL353VTA.js.map} +0 -0
  237. /package/dist/{sarif-UVAFWZKS.js.map → sarif-XZFJ5VIJ.js.map} +0 -0
  238. /package/dist/{types-VMOT7RAL.js.map → types-7N7ETP3W.js.map} +0 -0
  239. /package/dist/{validate-K36F54UB.js.map → validate-CR3TI7GP.js.map} +0 -0
@@ -1,22 +1,31 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ lookupIn,
4
+ openArtifact,
5
+ renderBundle,
3
6
  renderCheck,
4
- runCheck
5
- } from "./chunk-3WZQ2FR3.js";
7
+ renderLookup,
8
+ retrieveIn,
9
+ runCheck,
10
+ runLookup,
11
+ runRetrieve,
12
+ runTraverseContext,
13
+ traverseIn
14
+ } from "./chunk-YLU4H2H3.js";
6
15
  import {
7
16
  EXPORT_TARGETS,
17
+ LLMS_FILENAME,
8
18
  renderEmbed,
9
19
  renderFill,
10
20
  renderQuery,
11
21
  renderStats,
12
- renderTraverse,
13
22
  runEmbed,
14
23
  runExport,
15
24
  runFill,
16
25
  runQuery,
17
- runStats,
18
- runTraverse
19
- } from "./chunk-WT3AATHC.js";
26
+ runStats
27
+ } from "./chunk-33FIOHJ4.js";
28
+ import "./chunk-245W2Q7C.js";
20
29
  import {
21
30
  SEARCH_MODES,
22
31
  bundledShapesPath,
@@ -24,12 +33,17 @@ import {
24
33
  loadShapes,
25
34
  localName,
26
35
  renderSearch,
36
+ renderTraverse,
27
37
  runSearch,
38
+ runTraverse,
28
39
  shapeText
29
- } from "./chunk-B3XXCDYW.js";
40
+ } from "./chunk-VV4YM6VM.js";
41
+ import "./chunk-GNZKLUZW.js";
42
+ import "./chunk-JFPCDIES.js";
30
43
  import {
31
44
  runBuild
32
- } from "./chunk-7UC55CAU.js";
45
+ } from "./chunk-JS5NCZYC.js";
46
+ import "./chunk-7RZQAMA2.js";
33
47
  import {
34
48
  ALL_FILL_FIELDS,
35
49
  CONFIG_SECTION,
@@ -41,27 +55,35 @@ import {
41
55
  assertInputFormat,
42
56
  byCodeUnit,
43
57
  loadRunConfig
44
- } from "./chunk-NFJGIBES.js";
58
+ } from "./chunk-SVB45M54.js";
45
59
  import "./chunk-GLP5PSXB.js";
60
+ import "./chunk-V5QTIP2M.js";
61
+ import "./chunk-XTQTA262.js";
62
+ import "./chunk-GMOAW2EG.js";
63
+ import "./chunk-327CWO33.js";
64
+ import "./chunk-5VA3ZOB7.js";
65
+ import "./chunk-JHUEACRT.js";
66
+ import "./chunk-XKZZRG3Z.js";
46
67
  import "./chunk-TIUTIOFB.js";
47
- import "./chunk-6ANTGYNT.js";
68
+ import "./chunk-3LZ6AYB4.js";
48
69
  import "./chunk-TKINOTVS.js";
49
- import "./chunk-YUTVAMWW.js";
50
- import "./chunk-L3YGGYBG.js";
51
- import "./chunk-EZCJPF72.js";
52
- import "./chunk-OJ7FEM2G.js";
53
- import "./chunk-O6YTTBSN.js";
54
- import "./chunk-6NTNLKNQ.js";
55
- import "./chunk-D4ANAOY7.js";
70
+ import "./chunk-UP6NBQ62.js";
71
+ import "./chunk-4KY2RUXQ.js";
72
+ import "./chunk-PLN2LJDM.js";
73
+ import "./chunk-27FP4KKD.js";
74
+ import "./chunk-JFB45L7D.js";
75
+ import "./chunk-FE3US7FR.js";
76
+ import "./chunk-QGJA43DX.js";
56
77
  import {
57
78
  collect,
58
79
  configOption,
59
80
  readStdin,
60
81
  splitList,
61
82
  writeTextAtomic
62
- } from "./chunk-3GLDB7MZ.js";
83
+ } from "./chunk-MH5MX4B3.js";
63
84
  import "./chunk-DSWKBZWW.js";
64
- import "./chunk-WD33LE5A.js";
85
+ import "./chunk-OZWV27SE.js";
86
+ import "./chunk-77AINBYM.js";
65
87
  import "./chunk-QK6VYJHV.js";
66
88
  import {
67
89
  shouldColor
@@ -71,6 +93,8 @@ import {
71
93
  } from "./chunk-YEUYKR62.js";
72
94
  import "./chunk-B2242FYO.js";
73
95
  import {
96
+ notice,
97
+ noticeOnce,
74
98
  warn
75
99
  } from "./chunk-HX44GB4Z.js";
76
100
  import {
@@ -78,7 +102,7 @@ import {
78
102
  } from "./chunk-VM7VAFJW.js";
79
103
  import {
80
104
  package_default
81
- } from "./chunk-5OOQ3HQ3.js";
105
+ } from "./chunk-PCTJ7P6U.js";
82
106
  import "./chunk-OWBRDNRZ.js";
83
107
  import {
84
108
  errorMessage
@@ -374,7 +398,7 @@ provenance:
374
398
  # stewardship people fields (owner, stakeholders, reviewed-by) out.
375
399
 
376
400
  # SHACL shapes \`manni graph check\` validates the built graph against. Default:
377
- # the shapes contract bundled with manni (shapes/graph/shapes-1.1.1.ttl).
401
+ # the shapes contract bundled with manni (shapes/graph/shapes-1.2.0.ttl).
378
402
  # check:
379
403
  # shapes: ["./my-shapes.ttl"]
380
404
 
@@ -447,10 +471,10 @@ async function runInit(cwd = process.cwd()) {
447
471
  await writeTextAtomic(path, `${HEADER}${starterSection()}`);
448
472
  return path;
449
473
  }
450
- const text = readFileSync(path, "utf8");
474
+ const text2 = readFileSync(path, "utf8");
451
475
  let doc;
452
476
  try {
453
- doc = parseYaml(text);
477
+ doc = parseYaml(text2);
454
478
  } catch (e) {
455
479
  throw new GraphError(
456
480
  `Invalid YAML in ${DEFAULT_CONFIG_FILENAME}: ${errorMessage(e)}`
@@ -466,15 +490,434 @@ async function runInit(cwd = process.cwd()) {
466
490
  `${DEFAULT_CONFIG_FILENAME} already has a \`${CONFIG_SECTION}:\` section \u2014 not overwriting.`
467
491
  );
468
492
  }
469
- const separator = text === "" || text.endsWith("\n") ? "" : "\n";
470
- const blank = text === "" ? "" : "\n";
493
+ const separator = text2 === "" || text2.endsWith("\n") ? "" : "\n";
494
+ const blank = text2 === "" ? "" : "\n";
471
495
  await writeTextAtomic(
472
496
  path,
473
- `${text}${separator}${blank}${starterSection()}`
497
+ `${text2}${separator}${blank}${starterSection()}`
474
498
  );
475
499
  return path;
476
500
  }
477
501
 
502
+ // src/graph/commands/serve.ts
503
+ import { Ajv2020 } from "ajv/dist/2020.js";
504
+ async function importSdk() {
505
+ const [mcp, stdio, types] = await Promise.all([
506
+ import("@modelcontextprotocol/sdk/server/mcp.js"),
507
+ import("@modelcontextprotocol/sdk/server/stdio.js"),
508
+ import("@modelcontextprotocol/sdk/types.js")
509
+ ]);
510
+ return {
511
+ McpServer: mcp.McpServer,
512
+ StdioServerTransport: stdio.StdioServerTransport,
513
+ ListToolsRequestSchema: types.ListToolsRequestSchema,
514
+ CallToolRequestSchema: types.CallToolRequestSchema
515
+ };
516
+ }
517
+ var text = (description) => ({ type: "string", minLength: 1, description });
518
+ var count = (minimum, description) => ({ type: "integer", minimum, description });
519
+ var QUESTION = text("The reader's question, in their words.");
520
+ var NODE = text("The IRI of the node to start from, as a passage's iri gives it.");
521
+ var LANG = text("The localization, as a BCP-47 tag. Required when the docs have more than one.");
522
+ var VARIANT = text("Only passages for this product variant: its IRI, title or slug.");
523
+ var SUBJECT = text("Only passages about this software subject.");
524
+ var MAX_CHARS = count(1, "The character budget for passage text. Defaults to graph.retrieve.maxChars.");
525
+ var LIMIT = count(1, "Stop after this many nodes.");
526
+ var WHERE = {
527
+ type: "object",
528
+ description: "Only passages whose metadata holds each field's value. A list asks for every value, and a list field matches when it contains the value.",
529
+ additionalProperties: {
530
+ oneOf: [
531
+ { type: "string", minLength: 1 },
532
+ { type: "array", items: { type: "string", minLength: 1 }, minItems: 1 }
533
+ ]
534
+ }
535
+ };
536
+ var input = (properties, requiredField) => ({
537
+ type: "object",
538
+ properties,
539
+ required: [requiredField],
540
+ additionalProperties: false
541
+ });
542
+ var REFUSAL = {
543
+ type: "object",
544
+ properties: {
545
+ reason: {
546
+ type: "string",
547
+ enum: ["no-route", "no-content", "withheld", "lang-required", "unknown-node", "unknown-scope"]
548
+ },
549
+ detail: { type: "string" }
550
+ },
551
+ required: ["reason", "detail"]
552
+ };
553
+ 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
+ };
558
+ var CITATIONS = {
559
+ type: "array",
560
+ items: { type: "object", properties: { iri: { type: "string" }, sourceUrl: { type: "string" } }, required: ["iri", "sourceUrl"] }
561
+ };
562
+ var PAGES = { type: "object", additionalProperties: { type: "object", required: ["metadata"] } };
563
+ var NULLABLE_TEXT = { type: ["string", "null"] };
564
+ var BUNDLE = {
565
+ type: "object",
566
+ properties: {
567
+ question: { type: "string" },
568
+ node: { type: "string" },
569
+ language: NULLABLE_TEXT,
570
+ context: {
571
+ type: "array",
572
+ items: {
573
+ type: "object",
574
+ properties: {
575
+ iri: { type: "string" },
576
+ title: { type: "string" },
577
+ text: { type: "string" },
578
+ page: { type: "string" },
579
+ depth: { type: "integer" },
580
+ role: { type: "string", enum: ["match", "context", "dependent"] },
581
+ provenance: PROOF
582
+ },
583
+ required: ["iri", "text", "page", "depth", "role", "provenance"]
584
+ }
585
+ },
586
+ citations: CITATIONS,
587
+ pages: PAGES,
588
+ trace: TRACE,
589
+ refusal: REFUSAL,
590
+ truncated: { type: "boolean" }
591
+ },
592
+ required: ["language", "context", "citations", "pages", "trace", "truncated"],
593
+ additionalProperties: false
594
+ };
595
+ var PASSAGE = (extra, required) => ({
596
+ type: "object",
597
+ properties: {
598
+ iri: { type: "string" },
599
+ title: { type: "string" },
600
+ page: { type: "string" },
601
+ lines: { type: "string" },
602
+ text: NULLABLE_TEXT,
603
+ truncated: { type: "boolean" },
604
+ provenance: PROOF,
605
+ ...extra
606
+ },
607
+ required: ["iri", "page", "text", "truncated", "provenance", ...required]
608
+ });
609
+ var EDGES = {
610
+ type: "array",
611
+ items: {
612
+ type: "object",
613
+ properties: { from: { type: "string" }, predicate: { type: "string" }, to: { type: "string" } },
614
+ required: ["from", "predicate", "to"]
615
+ }
616
+ };
617
+ var WALK = {
618
+ type: "object",
619
+ properties: {
620
+ passages: { type: "array", items: PASSAGE({ depth: { type: "integer" } }, ["depth"]) },
621
+ edges: EDGES,
622
+ truncated: { type: "boolean" }
623
+ },
624
+ required: ["passages", "edges", "truncated"]
625
+ };
626
+ var LOOKUP_RESULT = {
627
+ type: "object",
628
+ properties: {
629
+ question: { type: "string" },
630
+ language: NULLABLE_TEXT,
631
+ matches: {
632
+ type: "object",
633
+ properties: {
634
+ passages: {
635
+ type: "array",
636
+ items: PASSAGE({ rank: { type: "integer" }, score: { type: "object", required: ["fused"] } }, ["rank", "score"])
637
+ },
638
+ truncated: { type: "boolean" }
639
+ },
640
+ required: ["passages", "truncated"]
641
+ },
642
+ traversal: WALK,
643
+ impact: WALK,
644
+ pages: PAGES,
645
+ citations: CITATIONS,
646
+ trace: TRACE,
647
+ refusal: REFUSAL
648
+ },
649
+ required: ["question", "language", "matches", "traversal", "impact", "pages", "citations", "trace"],
650
+ additionalProperties: false
651
+ };
652
+ var READ_ONLY = { readOnlyHint: true, openWorldHint: false };
653
+ var TOOLS = [
654
+ {
655
+ 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.",
657
+ inputSchema: input({ question: QUESTION }, "question"),
658
+ outputSchema: LOOKUP_RESULT,
659
+ annotations: READ_ONLY
660
+ },
661
+ {
662
+ name: "retrieve",
663
+ description: "Like lookup, with control over language, scope, depth and budget.",
664
+ inputSchema: input(
665
+ {
666
+ question: QUESTION,
667
+ lang: LANG,
668
+ variant: VARIANT,
669
+ softwareSubject: SUBJECT,
670
+ depth: count(0, "Hops out from each match. Defaults to graph.retrieve.depth."),
671
+ maxChars: MAX_CHARS,
672
+ where: WHERE
673
+ },
674
+ "question"
675
+ ),
676
+ outputSchema: BUNDLE,
677
+ annotations: READ_ONLY
678
+ },
679
+ {
680
+ name: "traverse",
681
+ description: "Walk the graph from one node and return the passages it reaches.",
682
+ inputSchema: input(
683
+ {
684
+ node: NODE,
685
+ depth: count(0, "Hops out from the node."),
686
+ predicates: {
687
+ type: "array",
688
+ items: { type: "string", minLength: 1 },
689
+ description: "Follow only these predicates, as prefixed names or IRIs."
690
+ },
691
+ reverse: { type: "boolean", description: "Follow edges into the node rather than out of it." },
692
+ lang: LANG,
693
+ variant: VARIANT,
694
+ softwareSubject: SUBJECT,
695
+ limit: LIMIT,
696
+ maxChars: MAX_CHARS,
697
+ where: WHERE
698
+ },
699
+ "node"
700
+ ),
701
+ outputSchema: BUNDLE,
702
+ annotations: READ_ONLY
703
+ },
704
+ {
705
+ name: "impact",
706
+ description: "List the passages that depend on a node. Use it before changing a page.",
707
+ inputSchema: input(
708
+ {
709
+ node: NODE,
710
+ depth: { ...count(0, "Hops in from the node."), default: 3 },
711
+ lang: LANG,
712
+ variant: VARIANT,
713
+ softwareSubject: SUBJECT,
714
+ limit: LIMIT,
715
+ maxChars: MAX_CHARS,
716
+ where: WHERE
717
+ },
718
+ "node"
719
+ ),
720
+ outputSchema: BUNDLE,
721
+ annotations: READ_ONLY
722
+ }
723
+ ];
724
+ function whereOf(where) {
725
+ if (where === void 0) return void 0;
726
+ return Object.entries(where).flatMap(
727
+ ([field, value]) => (Array.isArray(value) ? value : [value]).map((v) => ({ field, value: v }))
728
+ );
729
+ }
730
+ var defined = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== void 0));
731
+ async function answer(artifact, name, args, withhold) {
732
+ const scope = defined({ lang: args.lang, variant: args.variant, subject: args.softwareSubject, withhold });
733
+ const head = name === "retrieve" || name === "lookup" ? { question: args.question ?? "" } : { node: args.node ?? "" };
734
+ try {
735
+ switch (name) {
736
+ case "lookup":
737
+ return await lookupIn(artifact, { question: args.question ?? "", ...defined({ withhold }) });
738
+ case "retrieve":
739
+ return await retrieveIn(artifact, {
740
+ question: args.question ?? "",
741
+ ...scope,
742
+ ...defined({ depth: args.depth, maxChars: args.maxChars, where: whereOf(args.where) })
743
+ });
744
+ case "traverse":
745
+ case "impact":
746
+ return await traverseIn(artifact, {
747
+ node: args.node ?? "",
748
+ ...scope,
749
+ ...name === "impact" ? { impact: true } : {},
750
+ ...defined({
751
+ depth: args.depth,
752
+ predicates: args.predicates,
753
+ reverse: args.reverse,
754
+ limit: args.limit,
755
+ maxChars: args.maxChars,
756
+ where: whereOf(args.where)
757
+ })
758
+ });
759
+ }
760
+ } catch (e) {
761
+ if (!(e instanceof GraphError) || e.refusal === void 0) throw e;
762
+ const refused = {
763
+ ...head,
764
+ language: null,
765
+ context: [],
766
+ citations: [],
767
+ pages: {},
768
+ trace: { entry: { candidates: [] }, hops: [], exclusions: [], resolutions: [], withheld: [], filtered: [] },
769
+ refusal: { reason: e.refusal, detail: e.message },
770
+ truncated: false
771
+ };
772
+ return refused;
773
+ }
774
+ }
775
+ async function runServe(opts, seams = {}) {
776
+ let sdk;
777
+ try {
778
+ sdk = await (seams.loadSdk ?? importSdk)();
779
+ } catch {
780
+ throw new GraphError(
781
+ "graph serve needs the optional @modelcontextprotocol/sdk package; run npm install @modelcontextprotocol/sdk."
782
+ );
783
+ }
784
+ const artifact = openArtifact(opts);
785
+ const ajv = new Ajv2020({ allErrors: false, strict: false });
786
+ const validators = new Map(TOOLS.map((t) => [t.name, ajv.compile(t.inputSchema)]));
787
+ const server = new sdk.McpServer(
788
+ { name: "manni-graph", version: package_default.version },
789
+ { capabilities: { tools: {} } }
790
+ );
791
+ const pending = /* @__PURE__ */ new Set();
792
+ server.server.setRequestHandler(sdk.ListToolsRequestSchema, () => ({
793
+ tools: TOOLS.map((t) => ({ ...t }))
794
+ }));
795
+ server.server.setRequestHandler(sdk.CallToolRequestSchema, async (request) => {
796
+ const { name } = request.params;
797
+ const args = request.params.arguments ?? {};
798
+ const validate = validators.get(name);
799
+ const fault = (message) => ({
800
+ isError: true,
801
+ content: [{ type: "text", text: message }]
802
+ });
803
+ if (validate === void 0) return fault(`Unknown tool ${name}; this server has lookup, retrieve, traverse and impact.`);
804
+ if (!validate(args)) {
805
+ const first = validate.errors?.[0];
806
+ const where = first?.instancePath === "" || first === void 0 ? "arguments" : first.instancePath.slice(1);
807
+ const why = first?.keyword === "additionalProperties" ? `${String(first.params.additionalProperty)} is not an argument` : `${where} ${first?.message ?? "is invalid"}`;
808
+ return fault(`Invalid arguments for ${name}: ${why}.`);
809
+ }
810
+ const work = answer(artifact, name, args, opts.withhold);
811
+ pending.add(work);
812
+ try {
813
+ const result = await work;
814
+ return {
815
+ structuredContent: { ...result },
816
+ content: [{ type: "text", text: JSON.stringify(result) }]
817
+ };
818
+ } catch (e) {
819
+ return fault(errorMessage(e));
820
+ } finally {
821
+ pending.delete(work);
822
+ }
823
+ });
824
+ const stdin = seams.stdin ?? process.stdin;
825
+ const transport = new sdk.StdioServerTransport(stdin, seams.stdout ?? process.stdout);
826
+ const closed = new Promise((done) => {
827
+ stdin.once("end", done);
828
+ stdin.once("close", done);
829
+ });
830
+ await server.connect(transport);
831
+ notice(`serving lookup, retrieve, traverse and impact over stdio from ${artifact.label}.`);
832
+ await closed;
833
+ await Promise.allSettled([...pending]);
834
+ await new Promise((done) => setImmediate(done));
835
+ 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");
919
+ }
920
+
478
921
  // src/graph/cli.ts
479
922
  function colorFor(command, isTTY, env) {
480
923
  const noColor = colorOwner(command).opts().color === false;
@@ -532,6 +975,32 @@ function buildProgram() {
532
975
  const checkFormatOption = choiceOption("--format", CHECK_FORMATS);
533
976
  const showFormatOption = choiceOption("--format", SHAPES_SHOW_FORMATS);
534
977
  const fieldsOption = (raw) => splitList(raw).map((value) => enumOption("--fields", ALL_FILL_FIELDS)(value));
978
+ const withholdOption = (raw) => splitList(raw).map((value) => {
979
+ if (value !== "drifted" && value !== "failing") {
980
+ throw new GraphError(`--withhold takes drifted or failing, and got ${value}.`);
981
+ }
982
+ return value;
983
+ });
984
+ const whereOption = (raw, prev) => {
985
+ const eq = raw.indexOf("=");
986
+ const field = eq < 0 ? "" : raw.slice(0, eq);
987
+ const value = eq < 0 ? "" : raw.slice(eq + 1);
988
+ if (field === "" || value === "") {
989
+ throw new GraphError(`--where takes field=value, and got ${raw}.`);
990
+ }
991
+ return [...prev, { field, value }];
992
+ };
993
+ function artifactInputs(command) {
994
+ return command.option("-c, --config <path>", "Path to manni.config.yaml").option("--no-config", "Ignore any discovered config file").option("-g, --graph <path>", "Graph .ttl path (default: config out)").option(
995
+ "-i, --index <dir>",
996
+ "Directory holding chunks.json, its rows and the search index (default: beside the graph)"
997
+ ).option(
998
+ "-f, --format <format>",
999
+ `Output: ${GRAPH_FORMAT_LIST}`,
1000
+ formatOption,
1001
+ "pretty"
1002
+ );
1003
+ }
535
1004
  function documentInputs(command, verb) {
536
1005
  return command.argument(
537
1006
  "[paths...]",
@@ -852,22 +1321,124 @@ function buildProgram() {
852
1321
  "--variant <variant>",
853
1322
  "Scope filter: product variant IRI, title, or slug"
854
1323
  ).option("--software-subject <subject>", "Scope filter: software subject").option("--lang <tag>", "Scope filter: BCP-47 language tag, matched in any case").option("--limit <n>", "Stop after this many nodes", countOption("--limit")).option(
1324
+ "--context",
1325
+ "Return the passages the walk reaches, with their text and proof, from the chunk artifact beside the graph"
1326
+ ).option(
1327
+ "--max-chars <n>",
1328
+ "Character budget for the passages (with --context; default: config retrieve.maxChars)",
1329
+ countOption("--max-chars")
1330
+ ).option(
1331
+ "--withhold <list>",
1332
+ "Also leave out passages that are drifted or failing, comma-separated (with --context)",
1333
+ withholdOption
1334
+ ).option(
1335
+ "--where <field=value>",
1336
+ "Only passages whose metadata field holds the value, or a list field containing it (repeatable; all must hold; with --context)",
1337
+ whereOption,
1338
+ []
1339
+ ).option(
855
1340
  "-f, --format <format>",
856
1341
  `Output: ${GRAPH_FORMAT_LIST}`,
857
1342
  formatOption,
858
1343
  "pretty"
859
1344
  ).action(
860
- (node, opts) => {
1345
+ async (node, opts) => {
861
1346
  try {
862
- const { softwareSubject, ...others } = rest(opts);
863
- const report = runTraverse({
1347
+ const { softwareSubject, context, maxChars, withhold, where, ...others } = rest(opts);
1348
+ const inputs = {
864
1349
  ...others,
865
1350
  ...documentOptions(opts),
866
1351
  ...softwareSubject === void 0 ? {} : { subject: softwareSubject },
867
1352
  node,
868
1353
  predicates: opts.predicates === void 0 ? void 0 : splitList(opts.predicates)
1354
+ };
1355
+ if (context !== true) {
1356
+ if (maxChars !== void 0) throw new GraphError("--max-chars needs --context.");
1357
+ if (withhold !== void 0) throw new GraphError("--withhold needs --context.");
1358
+ if (where.length > 0) throw new GraphError("--where needs --context.");
1359
+ console.log(renderTraverse(runTraverse(inputs), opts.format));
1360
+ return;
1361
+ }
1362
+ const bundle = await runTraverseContext({
1363
+ ...inputs,
1364
+ ...maxChars === void 0 ? {} : { maxChars },
1365
+ ...withhold === void 0 ? {} : { withhold },
1366
+ ...where.length === 0 ? {} : { where }
869
1367
  });
870
- console.log(renderTraverse(report, opts.format));
1368
+ console.log(renderBundle(bundle, opts.format));
1369
+ } catch (e) {
1370
+ fail(e);
1371
+ }
1372
+ }
1373
+ );
1374
+ artifactInputs(
1375
+ program.command("lookup").description(
1376
+ "Answer a question from the chunk artifact: every ranked match, everything reached outward, and everything that depends on them"
1377
+ ).argument("<question>", "The question, in quotes")
1378
+ ).action(
1379
+ async (question, opts) => {
1380
+ try {
1381
+ const { format, ...others } = rest(opts);
1382
+ const { result, settings } = await runLookup({ ...others, ...documentOptions(opts), question });
1383
+ console.log(renderLookup(result, format, settings));
1384
+ } catch (e) {
1385
+ fail(e);
1386
+ }
1387
+ }
1388
+ );
1389
+ artifactInputs(
1390
+ program.command("retrieve").description("Retrieve passages for a question, with control over language, scope, depth and budget").argument("<question>", "The question, in quotes")
1391
+ ).option("--lang <tag>", "The localization (required when the corpus has more than one)").option("--variant <variant>", "Scope filter: product variant IRI, title, or slug").option("--software-subject <subject>", "Scope filter: software subject").option(
1392
+ "--mode <mode>",
1393
+ `Which legs to run: ${SEARCH_MODES.join(" | ")} (default: hybrid when the rows carry vectors)`,
1394
+ choiceOption("--mode", SEARCH_MODES)
1395
+ ).option("--seeds <n>", "Ranked matches the walk starts from (default: config retrieve.seeds)", countOption("--seeds")).option(
1396
+ "-d, --depth <n>",
1397
+ "Hops out from each match (default: config retrieve.depth)",
1398
+ countOption("--depth", 0)
1399
+ ).option(
1400
+ "--max-chars <n>",
1401
+ "Character budget for the passages (default: config retrieve.maxChars)",
1402
+ countOption("--max-chars")
1403
+ ).option(
1404
+ "--withhold <list>",
1405
+ "Also leave out passages that are drifted or failing, comma-separated",
1406
+ withholdOption
1407
+ ).option(
1408
+ "--where <field=value>",
1409
+ "Only passages whose metadata field holds the value, or a list field containing it (repeatable; all must hold)",
1410
+ whereOption,
1411
+ []
1412
+ ).action(
1413
+ async (question, opts) => {
1414
+ try {
1415
+ const { softwareSubject, format, where, ...others } = rest(opts);
1416
+ const bundle = await runRetrieve({
1417
+ ...others,
1418
+ ...documentOptions(opts),
1419
+ ...softwareSubject === void 0 ? {} : { subject: softwareSubject },
1420
+ ...where.length === 0 ? {} : { where },
1421
+ question
1422
+ });
1423
+ console.log(renderBundle(bundle, format));
1424
+ } catch (e) {
1425
+ fail(e);
1426
+ }
1427
+ }
1428
+ );
1429
+ program.command("serve").description(
1430
+ "Serve lookup, retrieve, traverse and impact to an agent over MCP on stdio, from the chunk artifact, until stdin closes"
1431
+ ).option("-c, --config <path>", "Path to manni.config.yaml").option("--no-config", "Ignore any discovered config file").option("-g, --graph <path>", "Graph .ttl path (default: config out)").option(
1432
+ "-i, --index <dir>",
1433
+ "Directory holding chunks.json, its rows and the search index (default: beside the graph)"
1434
+ ).option(
1435
+ "--withhold <list>",
1436
+ "Also leave out passages that are drifted or failing, comma-separated, on every call",
1437
+ withholdOption
1438
+ ).action(
1439
+ async (opts) => {
1440
+ try {
1441
+ await runServe({ ...rest(opts), ...documentOptions(opts) });
871
1442
  } catch (e) {
872
1443
  fail(e);
873
1444
  }
@@ -906,11 +1477,11 @@ function buildProgram() {
906
1477
  }
907
1478
  );
908
1479
  program.command("export").description(
909
- "Reserialize the built graph into a consumer format (jsonld file, iirds package, search index, or question set)"
1480
+ "Reserialize the built graph into a consumer format (jsonld file, iirds package, search index, question set, chunks with their provenance, or llms.txt)"
910
1481
  ).argument("<target>", `What to write: ${EXPORT_TARGETS.join(" | ")}`).option("-c, --config <path>", "Path to manni.config.yaml").option("--no-config", "Ignore any discovered config file").option("-g, --graph <path>", "Graph .ttl path (default: config out)").option(
911
1482
  "-o, --out <path>",
912
- "Output path (default: the graph path with the target's extension)"
913
- ).action(
1483
+ "Output path (default: the graph path with the target's extension); a directory for search and chunks"
1484
+ ).option("--evals <path>", "A docevals JSON report for chunks (default: config export.chunks.evals)").action(
914
1485
  async (target, opts) => {
915
1486
  try {
916
1487
  if (!EXPORT_TARGETS.includes(target)) {
@@ -922,10 +1493,12 @@ function buildProgram() {
922
1493
  ...documentOptions(opts),
923
1494
  graph: opts.graph,
924
1495
  format: target,
925
- out: opts.out
1496
+ out: opts.out,
1497
+ ...opts.evals === void 0 ? {} : { evals: opts.evals }
926
1498
  });
927
1499
  for (const warning of result.warnings) warn(warning);
928
- const noun = result.format === "questions" ? "question" : "node";
1500
+ for (const said of result.notices ?? []) noticeOnce(said);
1501
+ const noun = result.format === "questions" ? "question" : result.format === "chunks" ? "chunk" : result.format === "llms" ? "page" : "node";
929
1502
  console.log(
930
1503
  `Wrote ${result.nodes} ${noun}${result.nodes === 1 ? "" : "s"} to ${result.outPath}`
931
1504
  );
@@ -934,10 +1507,35 @@ function buildProgram() {
934
1507
  }
935
1508
  }
936
1509
  );
1510
+ program.command("publish").description(
1511
+ "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(
1513
+ "-f, --format <format>",
1514
+ `Output: ${GRAPH_FORMAT_LIST}`,
1515
+ formatOption,
1516
+ "pretty"
1517
+ ).action(
1518
+ async (opts) => {
1519
+ try {
1520
+ const report = await runPublish({
1521
+ ...documentOptions(opts),
1522
+ ...opts.out === void 0 ? {} : { out: opts.out },
1523
+ ...opts.evals === void 0 ? {} : { evals: opts.evals },
1524
+ say: (kind, message) => {
1525
+ if (kind === "notice") noticeOnce(message);
1526
+ else warn(message);
1527
+ }
1528
+ });
1529
+ console.log(renderPublish(report, opts.format));
1530
+ } catch (e) {
1531
+ fail(e);
1532
+ }
1533
+ }
1534
+ );
937
1535
  return program;
938
1536
  }
939
1537
  export {
940
1538
  buildProgram,
941
1539
  colorFor
942
1540
  };
943
- //# sourceMappingURL=cli-BXUZ3KEQ.js.map
1541
+ //# sourceMappingURL=cli-T7UJF3BF.js.map