@hawkeyexl/manni 4.11.0 → 4.12.1

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-UAULUMGH.js → batch-KMGZMIAQ.js} +20 -19
  3. package/dist/build-NO4AWCYG.js +36 -0
  4. package/dist/calibrate-XQUG5XAK.js +41 -0
  5. package/dist/capture-5XE3ZMXK.js +38 -0
  6. package/dist/{check-YEOYBFST.js → check-HTNPLWOV.js} +19 -18
  7. package/dist/check-RJ45IBA6.js +34 -0
  8. package/dist/{check-VELUQAUW.js → check-W24BQNCT.js} +35 -34
  9. package/dist/{check-VELUQAUW.js.map → check-W24BQNCT.js.map} +1 -1
  10. package/dist/check-WFXSXICD.js +30 -0
  11. package/dist/{chunk-IGSHYP74.js → chunk-23P7KMJM.js} +4 -4
  12. package/dist/{chunk-HA6MQMOY.js → chunk-24J7TYPU.js} +6 -6
  13. package/dist/{chunk-PCS4VJBV.js → chunk-37QJLVS3.js} +9 -9
  14. package/dist/{chunk-4CK6ZSOK.js → chunk-3P6KCU36.js} +3 -3
  15. package/dist/{chunk-54F74XR3.js → chunk-5JBVFWVP.js} +19 -19
  16. package/dist/{chunk-B7XYNRJQ.js → chunk-6KIYVVKL.js} +2 -2
  17. package/dist/{chunk-J6IDQGJL.js → chunk-6TVH4FI7.js} +469 -85
  18. package/dist/chunk-6TVH4FI7.js.map +1 -0
  19. package/dist/{chunk-GDVZ5VII.js → chunk-7A452BPZ.js} +4 -4
  20. package/dist/{chunk-M42DZCOU.js → chunk-7FCLXEAQ.js} +2 -2
  21. package/dist/{chunk-2MJ62AYQ.js → chunk-7MCQHTQ5.js} +4 -3
  22. package/dist/chunk-7MCQHTQ5.js.map +1 -0
  23. package/dist/{chunk-LBSCW232.js → chunk-7NXPQKSB.js} +7 -7
  24. package/dist/{chunk-OPXWPJDA.js → chunk-A3TEDWBZ.js} +14 -14
  25. package/dist/{chunk-BBT6AVUG.js → chunk-BHHXU2D2.js} +2 -2
  26. package/dist/{chunk-D4N2V43Z.js → chunk-CEI2J42X.js} +13 -7
  27. package/dist/chunk-CEI2J42X.js.map +1 -0
  28. package/dist/{chunk-FQXWVS6J.js → chunk-CMMBWHT2.js} +9 -9
  29. package/dist/{chunk-EIFCP6CZ.js → chunk-CO47QJKZ.js} +2 -2
  30. package/dist/{chunk-2DRHT73U.js → chunk-CVZMKWZ5.js} +913 -1398
  31. package/dist/chunk-CVZMKWZ5.js.map +1 -0
  32. package/dist/{chunk-ADMEPUBT.js → chunk-CXWTNT2O.js} +3 -3
  33. package/dist/{chunk-LKP7QDFN.js → chunk-DAQTRAP5.js} +4 -4
  34. package/dist/chunk-DSWKBZWW.js +16 -0
  35. package/dist/chunk-DSWKBZWW.js.map +1 -0
  36. package/dist/{chunk-PWBH7DCQ.js → chunk-EESH6COU.js} +4 -4
  37. package/dist/{chunk-JPQDNYXH.js → chunk-EM67O2ET.js} +8 -2
  38. package/dist/chunk-EM67O2ET.js.map +1 -0
  39. package/dist/{chunk-HQR2ZBHW.js → chunk-I2XQRRP7.js} +36 -7
  40. package/dist/chunk-I2XQRRP7.js.map +1 -0
  41. package/dist/{chunk-NCPWXHDO.js → chunk-JEUFYSFQ.js} +4 -4
  42. package/dist/{chunk-2IR4T5PO.js → chunk-JJ4RSDSY.js} +2 -2
  43. package/dist/chunk-KCB5JCK4.js +2272 -0
  44. package/dist/chunk-KCB5JCK4.js.map +1 -0
  45. package/dist/{chunk-VSEBFHAY.js → chunk-KFKL4VTL.js} +11369 -10218
  46. package/dist/chunk-KFKL4VTL.js.map +1 -0
  47. package/dist/{chunk-PCQ7ELJH.js → chunk-L2TD7DZB.js} +109 -5
  48. package/dist/chunk-L2TD7DZB.js.map +1 -0
  49. package/dist/{chunk-WDWXAYVH.js → chunk-L3RLGGRK.js} +4 -4
  50. package/dist/{chunk-T7JAOYE5.js → chunk-L75CAZG4.js} +6 -6
  51. package/dist/{chunk-U7CTFN2J.js → chunk-MYRPMSOX.js} +7 -7
  52. package/dist/{chunk-Y6DOMTQD.js → chunk-NCF5NQV5.js} +27 -27
  53. package/dist/chunk-NCF5NQV5.js.map +1 -0
  54. package/dist/{chunk-WQWKYAAK.js → chunk-NUQF5F5J.js} +2 -2
  55. package/dist/{chunk-FUCPZVRY.js → chunk-OEN6FBUW.js} +2 -2
  56. package/dist/{chunk-FBMZJEB3.js → chunk-OKMTUAWO.js} +4 -4
  57. package/dist/{chunk-QLWC7MKD.js → chunk-OTJOBZJ5.js} +135 -135
  58. package/dist/chunk-OTJOBZJ5.js.map +1 -0
  59. package/dist/{chunk-R4WXQIOZ.js → chunk-PCEM5FOZ.js} +3 -3
  60. package/dist/{chunk-4D5IZSXM.js → chunk-PXNCRGUL.js} +3 -3
  61. package/dist/chunk-Q2QC5AZB.js +1868 -0
  62. package/dist/chunk-Q2QC5AZB.js.map +1 -0
  63. package/dist/{chunk-ODRPL3WB.js → chunk-Q3ODX5PF.js} +2 -2
  64. package/dist/{chunk-KGEQJ5CC.js → chunk-RRFFUWDL.js} +8 -8
  65. package/dist/{chunk-NSBXVPZL.js → chunk-S3XUYW5K.js} +17 -17
  66. package/dist/{chunk-LPIF5LIE.js → chunk-SAU2WQFC.js} +2 -2
  67. package/dist/{chunk-MSRU4D4P.js → chunk-SFLICIQV.js} +2 -2
  68. package/dist/{chunk-NGTVREIH.js → chunk-U6IHLEWT.js} +2 -2
  69. package/dist/{chunk-QCHVR4ZM.js → chunk-VM7VAFJW.js} +33 -7
  70. package/dist/chunk-VM7VAFJW.js.map +1 -0
  71. package/dist/{chunk-6HWBRZIN.js → chunk-VQYGLU4C.js} +252 -193
  72. package/dist/chunk-VQYGLU4C.js.map +1 -0
  73. package/dist/{chunk-2IAZEB45.js → chunk-WGMFDG6U.js} +229 -821
  74. package/dist/chunk-WGMFDG6U.js.map +1 -0
  75. package/dist/{chunk-GV56WGL2.js → chunk-WO4JYWZK.js} +1036 -883
  76. package/dist/chunk-WO4JYWZK.js.map +1 -0
  77. package/dist/chunk-XYRUDFKS.js +685 -0
  78. package/dist/chunk-XYRUDFKS.js.map +1 -0
  79. package/dist/{chunk-VQK4VHLF.js → chunk-YQV75FIL.js} +2 -2
  80. package/dist/chunk-YUTVAMWW.js +2 -0
  81. package/dist/{chunk-RLT5SEML.js → chunk-Z5MZCCTT.js} +6 -6
  82. package/dist/{chunk-BKVHX6FU.js → chunk-ZIRBFXDW.js} +5 -10
  83. package/dist/chunk-ZIRBFXDW.js.map +1 -0
  84. package/dist/{cli-O4ABTN4Z.js → cli-236TGVJG.js} +31 -30
  85. package/dist/{cli-O4ABTN4Z.js.map → cli-236TGVJG.js.map} +1 -1
  86. package/dist/{cli-3BTCK4AB.js → cli-3FAPJBEY.js} +27 -26
  87. package/dist/{cli-3BTCK4AB.js.map → cli-3FAPJBEY.js.map} +1 -1
  88. package/dist/{cli-JJMOVIKS.js → cli-BS43EVCD.js} +14 -14
  89. package/dist/{cli-RORDPAPE.js → cli-CMR4FYF6.js} +59 -38
  90. package/dist/cli-CMR4FYF6.js.map +1 -0
  91. package/dist/{cli-ONTC5PKT.js → cli-FX53PBQ3.js} +9 -9
  92. package/dist/{cli-6KZTHWGP.js → cli-IQNJLKSN.js} +37 -36
  93. package/dist/{cli-6KZTHWGP.js.map → cli-IQNJLKSN.js.map} +1 -1
  94. package/dist/{cli-4MF37HAQ.js → cli-KOMXVPXX.js} +26 -25
  95. package/dist/{cli-4MF37HAQ.js.map → cli-KOMXVPXX.js.map} +1 -1
  96. package/dist/{cli-I62SRH3R.js → cli-NGL63E53.js} +14 -13
  97. package/dist/{cli-DRMZBZLB.js → cli-QPGS2MR5.js} +43 -42
  98. package/dist/{cli-DRMZBZLB.js.map → cli-QPGS2MR5.js.map} +1 -1
  99. package/dist/{cli-VID7PJS3.js → cli-RKQX4TI3.js} +23 -22
  100. package/dist/{cli-VID7PJS3.js.map → cli-RKQX4TI3.js.map} +1 -1
  101. package/dist/{cli-VUKMWSSF.js → cli-WNEI5L7P.js} +4 -4
  102. package/dist/cli.js +19 -13
  103. package/dist/cli.js.map +1 -1
  104. package/dist/{config-XDA42RJL.js → config-JJW75SBX.js} +5 -5
  105. package/dist/docmeta.js +13 -12
  106. package/dist/docmeta.js.map +1 -1
  107. package/dist/github-4UR67MEN.js +35 -0
  108. package/dist/github-UPGKMVVF.js +30 -0
  109. package/dist/graph/runtime.d.ts +4 -1
  110. package/dist/graph/runtime.js +20 -9
  111. package/dist/graph/runtime.js.map +1 -1
  112. package/dist/{host-6GURH5HE.js → host-YSTYO5DX.js} +3 -3
  113. package/dist/index.d.ts +192 -26
  114. package/dist/index.js +129 -124
  115. package/dist/index.js.map +1 -1
  116. package/dist/{json-BXY44ED7.js → json-DQIELR36.js} +18 -17
  117. package/dist/labels-XSTJJMSG.js +73 -0
  118. package/dist/labels-XSTJJMSG.js.map +1 -0
  119. package/dist/lint-BLBGGOYM.js +34 -0
  120. package/dist/list-B3RRRWFQ.js +32 -0
  121. package/dist/list-ZFRT3JQH.js +35 -0
  122. package/dist/{page-EV7OUBAU.js → page-5ISEVJR5.js} +18 -16
  123. package/dist/{prepare-JHJDJB6I.js → prepare-KFXXG2CJ.js} +22 -21
  124. package/dist/{prepare-JHJDJB6I.js.map → prepare-KFXXG2CJ.js.map} +1 -1
  125. package/dist/{pretty-Q5Y2PA64.js → pretty-Y7CGQLAF.js} +18 -17
  126. package/dist/{pretty-SCRK66M5.js → pretty-ZISH3Q4F.js} +18 -17
  127. package/dist/{provider-527CO4DM.js → provider-LBX4IXGX.js} +3 -3
  128. package/dist/{release-3D5PK6M7.js → release-VV3UTKE5.js} +3 -3
  129. package/dist/{reporters-M6LJ2IYU.js → reporters-26H3N2KW.js} +3 -3
  130. package/dist/{reporters-A5ADKDYR.js → reporters-4STXJJE2.js} +16 -15
  131. package/dist/{reporters-RBYTASMI.js → reporters-74B4U2GZ.js} +7 -7
  132. package/dist/run-DVGTKM52.js +37 -0
  133. package/dist/{term-CQAGNG3Q.js → term-PLJEYJQV.js} +981 -141
  134. package/dist/term-PLJEYJQV.js.map +1 -0
  135. package/dist/validate-CJNFQHMD.js +19 -0
  136. package/package.json +3 -2
  137. package/plugin/manni/.claude-plugin/plugin.json +1 -1
  138. package/shapes/graph/shapes-1.1.0.ttl +785 -0
  139. package/dist/build-QSPNK5AL.js +0 -35
  140. package/dist/calibrate-KXN4URPM.js +0 -40
  141. package/dist/capture-JHTSUPUC.js +0 -37
  142. package/dist/check-MDGXEUWL.js +0 -20
  143. package/dist/check-WOQRKNZK.js +0 -29
  144. package/dist/chunk-2DRHT73U.js.map +0 -1
  145. package/dist/chunk-2IAZEB45.js.map +0 -1
  146. package/dist/chunk-2MJ62AYQ.js.map +0 -1
  147. package/dist/chunk-4VBSTXN6.js +0 -392
  148. package/dist/chunk-4VBSTXN6.js.map +0 -1
  149. package/dist/chunk-6HWBRZIN.js.map +0 -1
  150. package/dist/chunk-BKVHX6FU.js.map +0 -1
  151. package/dist/chunk-D4N2V43Z.js.map +0 -1
  152. package/dist/chunk-EFW7CAG4.js +0 -387
  153. package/dist/chunk-EFW7CAG4.js.map +0 -1
  154. package/dist/chunk-GV56WGL2.js.map +0 -1
  155. package/dist/chunk-HQR2ZBHW.js.map +0 -1
  156. package/dist/chunk-J6IDQGJL.js.map +0 -1
  157. package/dist/chunk-JPQDNYXH.js.map +0 -1
  158. package/dist/chunk-JROBZ7JA.js +0 -818
  159. package/dist/chunk-JROBZ7JA.js.map +0 -1
  160. package/dist/chunk-PCQ7ELJH.js.map +0 -1
  161. package/dist/chunk-QCHVR4ZM.js.map +0 -1
  162. package/dist/chunk-QLWC7MKD.js.map +0 -1
  163. package/dist/chunk-TU2WUBVZ.js +0 -2
  164. package/dist/chunk-VSEBFHAY.js.map +0 -1
  165. package/dist/chunk-Y6DOMTQD.js.map +0 -1
  166. package/dist/cli-RORDPAPE.js.map +0 -1
  167. package/dist/github-RY3FRA6P.js +0 -29
  168. package/dist/github-YKQSH7FS.js +0 -34
  169. package/dist/lint-YJ2L22BW.js +0 -33
  170. package/dist/list-NSG24VVX.js +0 -31
  171. package/dist/list-V6EGCSHX.js +0 -34
  172. package/dist/run-BUE2DDXN.js +0 -36
  173. package/dist/term-CQAGNG3Q.js.map +0 -1
  174. package/dist/validate-ZBW44RHT.js +0 -18
  175. /package/dist/{batch-UAULUMGH.js.map → batch-KMGZMIAQ.js.map} +0 -0
  176. /package/dist/{build-QSPNK5AL.js.map → build-NO4AWCYG.js.map} +0 -0
  177. /package/dist/{calibrate-KXN4URPM.js.map → calibrate-XQUG5XAK.js.map} +0 -0
  178. /package/dist/{capture-JHTSUPUC.js.map → capture-5XE3ZMXK.js.map} +0 -0
  179. /package/dist/{check-MDGXEUWL.js.map → check-HTNPLWOV.js.map} +0 -0
  180. /package/dist/{check-WOQRKNZK.js.map → check-RJ45IBA6.js.map} +0 -0
  181. /package/dist/{check-YEOYBFST.js.map → check-WFXSXICD.js.map} +0 -0
  182. /package/dist/{chunk-IGSHYP74.js.map → chunk-23P7KMJM.js.map} +0 -0
  183. /package/dist/{chunk-HA6MQMOY.js.map → chunk-24J7TYPU.js.map} +0 -0
  184. /package/dist/{chunk-PCS4VJBV.js.map → chunk-37QJLVS3.js.map} +0 -0
  185. /package/dist/{chunk-4CK6ZSOK.js.map → chunk-3P6KCU36.js.map} +0 -0
  186. /package/dist/{chunk-54F74XR3.js.map → chunk-5JBVFWVP.js.map} +0 -0
  187. /package/dist/{chunk-B7XYNRJQ.js.map → chunk-6KIYVVKL.js.map} +0 -0
  188. /package/dist/{chunk-GDVZ5VII.js.map → chunk-7A452BPZ.js.map} +0 -0
  189. /package/dist/{chunk-M42DZCOU.js.map → chunk-7FCLXEAQ.js.map} +0 -0
  190. /package/dist/{chunk-LBSCW232.js.map → chunk-7NXPQKSB.js.map} +0 -0
  191. /package/dist/{chunk-OPXWPJDA.js.map → chunk-A3TEDWBZ.js.map} +0 -0
  192. /package/dist/{chunk-BBT6AVUG.js.map → chunk-BHHXU2D2.js.map} +0 -0
  193. /package/dist/{chunk-FQXWVS6J.js.map → chunk-CMMBWHT2.js.map} +0 -0
  194. /package/dist/{chunk-EIFCP6CZ.js.map → chunk-CO47QJKZ.js.map} +0 -0
  195. /package/dist/{chunk-ADMEPUBT.js.map → chunk-CXWTNT2O.js.map} +0 -0
  196. /package/dist/{chunk-LKP7QDFN.js.map → chunk-DAQTRAP5.js.map} +0 -0
  197. /package/dist/{chunk-PWBH7DCQ.js.map → chunk-EESH6COU.js.map} +0 -0
  198. /package/dist/{chunk-NCPWXHDO.js.map → chunk-JEUFYSFQ.js.map} +0 -0
  199. /package/dist/{chunk-2IR4T5PO.js.map → chunk-JJ4RSDSY.js.map} +0 -0
  200. /package/dist/{chunk-WDWXAYVH.js.map → chunk-L3RLGGRK.js.map} +0 -0
  201. /package/dist/{chunk-T7JAOYE5.js.map → chunk-L75CAZG4.js.map} +0 -0
  202. /package/dist/{chunk-U7CTFN2J.js.map → chunk-MYRPMSOX.js.map} +0 -0
  203. /package/dist/{chunk-WQWKYAAK.js.map → chunk-NUQF5F5J.js.map} +0 -0
  204. /package/dist/{chunk-FUCPZVRY.js.map → chunk-OEN6FBUW.js.map} +0 -0
  205. /package/dist/{chunk-FBMZJEB3.js.map → chunk-OKMTUAWO.js.map} +0 -0
  206. /package/dist/{chunk-R4WXQIOZ.js.map → chunk-PCEM5FOZ.js.map} +0 -0
  207. /package/dist/{chunk-4D5IZSXM.js.map → chunk-PXNCRGUL.js.map} +0 -0
  208. /package/dist/{chunk-ODRPL3WB.js.map → chunk-Q3ODX5PF.js.map} +0 -0
  209. /package/dist/{chunk-KGEQJ5CC.js.map → chunk-RRFFUWDL.js.map} +0 -0
  210. /package/dist/{chunk-NSBXVPZL.js.map → chunk-S3XUYW5K.js.map} +0 -0
  211. /package/dist/{chunk-LPIF5LIE.js.map → chunk-SAU2WQFC.js.map} +0 -0
  212. /package/dist/{chunk-MSRU4D4P.js.map → chunk-SFLICIQV.js.map} +0 -0
  213. /package/dist/{chunk-NGTVREIH.js.map → chunk-U6IHLEWT.js.map} +0 -0
  214. /package/dist/{chunk-VQK4VHLF.js.map → chunk-YQV75FIL.js.map} +0 -0
  215. /package/dist/{chunk-TU2WUBVZ.js.map → chunk-YUTVAMWW.js.map} +0 -0
  216. /package/dist/{chunk-RLT5SEML.js.map → chunk-Z5MZCCTT.js.map} +0 -0
  217. /package/dist/{cli-JJMOVIKS.js.map → cli-BS43EVCD.js.map} +0 -0
  218. /package/dist/{cli-ONTC5PKT.js.map → cli-FX53PBQ3.js.map} +0 -0
  219. /package/dist/{cli-I62SRH3R.js.map → cli-NGL63E53.js.map} +0 -0
  220. /package/dist/{cli-VUKMWSSF.js.map → cli-WNEI5L7P.js.map} +0 -0
  221. /package/dist/{config-XDA42RJL.js.map → config-JJW75SBX.js.map} +0 -0
  222. /package/dist/{github-RY3FRA6P.js.map → github-4UR67MEN.js.map} +0 -0
  223. /package/dist/{github-YKQSH7FS.js.map → github-UPGKMVVF.js.map} +0 -0
  224. /package/dist/{host-6GURH5HE.js.map → host-YSTYO5DX.js.map} +0 -0
  225. /package/dist/{json-BXY44ED7.js.map → json-DQIELR36.js.map} +0 -0
  226. /package/dist/{lint-YJ2L22BW.js.map → lint-BLBGGOYM.js.map} +0 -0
  227. /package/dist/{list-NSG24VVX.js.map → list-B3RRRWFQ.js.map} +0 -0
  228. /package/dist/{list-V6EGCSHX.js.map → list-ZFRT3JQH.js.map} +0 -0
  229. /package/dist/{page-EV7OUBAU.js.map → page-5ISEVJR5.js.map} +0 -0
  230. /package/dist/{pretty-Q5Y2PA64.js.map → pretty-Y7CGQLAF.js.map} +0 -0
  231. /package/dist/{pretty-SCRK66M5.js.map → pretty-ZISH3Q4F.js.map} +0 -0
  232. /package/dist/{provider-527CO4DM.js.map → provider-LBX4IXGX.js.map} +0 -0
  233. /package/dist/{release-3D5PK6M7.js.map → release-VV3UTKE5.js.map} +0 -0
  234. /package/dist/{reporters-A5ADKDYR.js.map → reporters-26H3N2KW.js.map} +0 -0
  235. /package/dist/{reporters-M6LJ2IYU.js.map → reporters-4STXJJE2.js.map} +0 -0
  236. /package/dist/{reporters-RBYTASMI.js.map → reporters-74B4U2GZ.js.map} +0 -0
  237. /package/dist/{run-BUE2DDXN.js.map → run-DVGTKM52.js.map} +0 -0
  238. /package/dist/{validate-ZBW44RHT.js.map → validate-CJNFQHMD.js.map} +0 -0
@@ -1,818 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- findConfigFileSync,
4
- parseCollections,
5
- readConfigFileSync
6
- } from "./chunk-QLWC7MKD.js";
7
- import {
8
- PROVIDERS_KEY,
9
- assertKnownProvider,
10
- parseProviders
11
- } from "./chunk-QCHVR4ZM.js";
12
- import {
13
- ToolError,
14
- errorMessage
15
- } from "./chunk-G3T47CFV.js";
16
-
17
- // src/graph/types.ts
18
- var GraphError = class extends ToolError {
19
- constructor(message) {
20
- super(message);
21
- this.name = "GraphError";
22
- }
23
- };
24
-
25
- // src/graph/core/iri.ts
26
- import { slug as githubSlug } from "github-slugger";
27
- var DEFAULT_BASE_IRI = "urn:manni:graph:";
28
- function resolveBaseIri(base) {
29
- if (!base) return DEFAULT_BASE_IRI;
30
- if (base.endsWith("/") || base.endsWith(":")) return base;
31
- return `${base}/`;
32
- }
33
- function normalizeDocPath(p) {
34
- let out = p.replace(/\\/g, "/");
35
- while (out.startsWith("./")) out = out.slice(2);
36
- return out;
37
- }
38
- function encodeSegment(segment) {
39
- return encodeURIComponent(segment).replace(
40
- /[!'()*]/g,
41
- (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`
42
- );
43
- }
44
- var STDIN_PATH = "<stdin>";
45
- function mintDocIri(base, relPath) {
46
- if (relPath === STDIN_PATH) return `${base}stdin`;
47
- const path = normalizeDocPath(relPath).split("/").map(encodeSegment).join("/");
48
- return `${base}doc/${path}`;
49
- }
50
- function mintSectionIri(docIri, slugValue) {
51
- return `${docIri}#${slugValue}`;
52
- }
53
- function conceptSlug(label) {
54
- return githubSlug(label);
55
- }
56
- function mintConceptIri(base, label) {
57
- return `${base}concept/${encodeSegment(conceptSlug(label))}`;
58
- }
59
- function mintProductIri(base, label) {
60
- return `${base}product/${encodeSegment(conceptSlug(label))}`;
61
- }
62
- function mintSchemeIri(base) {
63
- return `${base}scheme`;
64
- }
65
- function mintAgentIri(base, kind, name) {
66
- return `${base}agent/${kind}/${encodeSegment(conceptSlug(name))}`;
67
- }
68
- function mintGraphIri(base) {
69
- return `${base}graph`;
70
- }
71
- function mintBuildActivityIri(base) {
72
- return `${base}activity/build`;
73
- }
74
-
75
- // src/graph/core/config.ts
76
- import { dirname, resolve } from "node:path";
77
- import { parse as parseYaml } from "yaml";
78
- import { Ajv2020 } from "ajv/dist/2020.js";
79
-
80
- // src/graph/core/config-schema.json
81
- var config_schema_default = {
82
- $schema: "https://json-schema.org/draft/2020-12/schema",
83
- $id: "manni:graph:config",
84
- title: "manni graph configuration",
85
- type: "object",
86
- additionalProperties: false,
87
- properties: {
88
- provider: {
89
- type: "string",
90
- minLength: 1,
91
- description: "Which provider `manni graph fill` sends pages to: auto | anthropic | openai | claude-cli | llama-cpp. Unset, the family's top-level providers.provider decides, then auto, detected exactly as manni meta fill detects: an Anthropic key, then an OpenAI key, then the Claude CLI, then a local model. --provider wins over it, and --local overrides both. Connection settings live in the family's top-level providers: map."
92
- },
93
- model: {
94
- type: "string",
95
- minLength: 1,
96
- description: "The model, within the provider named beside it. A model is carried only to the provider its own level names: a differing --provider or providers.provider takes its own default instead. With no provider here, it goes to whichever provider is in force, which must not be auto, because a model name does not say which provider owns it. Unset (the default) takes the provider's default model from the inference library; manni pins none. --model wins over it. This is not `embed.model`, which is a local embedding model id."
97
- },
98
- baseIri: {
99
- type: "string",
100
- minLength: 1
101
- },
102
- out: {
103
- type: "string",
104
- minLength: 1
105
- },
106
- routes: {
107
- type: "array",
108
- items: {
109
- type: "object",
110
- additionalProperties: false,
111
- required: ["root"],
112
- properties: {
113
- basePath: {
114
- type: "string"
115
- },
116
- root: {
117
- type: "string"
118
- },
119
- extensions: {
120
- type: "array",
121
- items: {
122
- type: "string",
123
- pattern: "^\\."
124
- }
125
- },
126
- language: {
127
- type: "string",
128
- pattern: "^[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}))*$"
129
- },
130
- indexFiles: {
131
- type: "array",
132
- items: {
133
- type: "string",
134
- minLength: 1
135
- }
136
- }
137
- }
138
- }
139
- },
140
- build: {
141
- type: "object",
142
- additionalProperties: false,
143
- properties: {
144
- derive: {
145
- type: "array",
146
- uniqueItems: true,
147
- items: {
148
- enum: [
149
- "frontmatter",
150
- "sections",
151
- "links",
152
- "tags",
153
- "images",
154
- "code",
155
- "provenance"
156
- ]
157
- }
158
- }
159
- }
160
- },
161
- check: {
162
- type: "object",
163
- additionalProperties: false,
164
- properties: {
165
- shapes: {
166
- type: "array",
167
- items: {
168
- type: "string",
169
- minLength: 1
170
- }
171
- }
172
- }
173
- },
174
- provenance: {
175
- type: "object",
176
- additionalProperties: false,
177
- properties: {
178
- qualified: {
179
- type: "boolean"
180
- }
181
- }
182
- },
183
- stats: {
184
- type: "object",
185
- additionalProperties: false,
186
- properties: {
187
- coverageThreshold: {
188
- anyOf: [
189
- {
190
- type: "number",
191
- minimum: 0,
192
- maximum: 100
193
- },
194
- {
195
- type: "object",
196
- additionalProperties: false,
197
- properties: {
198
- title: {
199
- type: "number",
200
- minimum: 0,
201
- maximum: 100
202
- },
203
- description: {
204
- type: "number",
205
- minimum: 0,
206
- maximum: 100
207
- },
208
- creator: {
209
- type: "number",
210
- minimum: 0,
211
- maximum: 100
212
- },
213
- created: {
214
- type: "number",
215
- minimum: 0,
216
- maximum: 100
217
- },
218
- modified: {
219
- type: "number",
220
- minimum: 0,
221
- maximum: 100
222
- },
223
- subject: {
224
- type: "number",
225
- minimum: 0,
226
- maximum: 100
227
- },
228
- label: {
229
- type: "number",
230
- minimum: 0,
231
- maximum: 100
232
- },
233
- language: {
234
- type: "number",
235
- minimum: 0,
236
- maximum: 100
237
- },
238
- type: {
239
- type: "number",
240
- minimum: 0,
241
- maximum: 100
242
- },
243
- "applies-to": {
244
- type: "number",
245
- minimum: 0,
246
- maximum: 100
247
- },
248
- "about-product-lifecycle": {
249
- type: "number",
250
- minimum: 0,
251
- maximum: 100
252
- },
253
- "about-product-aspect": {
254
- type: "number",
255
- minimum: 0,
256
- maximum: 100
257
- }
258
- }
259
- }
260
- ]
261
- }
262
- }
263
- },
264
- fill: {
265
- type: "object",
266
- additionalProperties: false,
267
- properties: {
268
- temperature: {
269
- type: "number",
270
- minimum: 0,
271
- maximum: 2
272
- },
273
- maxTurns: {
274
- type: ["integer", "null"],
275
- minimum: 1,
276
- description: "Stop after this many inference calls. One page is one turn, and a cached proposal spends none. Null (the default) is unbounded. Replaces the maxCostUsd ceiling, which read as zero for every model outside the library's price table \u2014 see graph ADR 01027 and docevals ADR 01019."
277
- },
278
- cacheDir: {
279
- type: "string",
280
- minLength: 1
281
- },
282
- confidenceThreshold: {
283
- type: "number",
284
- minimum: 0,
285
- maximum: 1,
286
- description: "Minimum model self-confidence (0..1) to write a proposed field; below it the field is reported and not written. Default 0.7. `--confidence` wins over it."
287
- },
288
- writeProvenance: {
289
- type: "boolean"
290
- },
291
- validateGraph: {
292
- type: "boolean"
293
- },
294
- fields: {
295
- type: "array",
296
- uniqueItems: true,
297
- items: {
298
- enum: [
299
- "label",
300
- "alt-labels",
301
- "broader",
302
- "narrower",
303
- "related-concepts",
304
- "concepts",
305
- "type",
306
- "applies-to",
307
- "about-product-lifecycle",
308
- "about-product-aspect",
309
- "not-applicable-to",
310
- "not-about-product-aspect"
311
- ]
312
- }
313
- },
314
- sections: {
315
- type: "boolean"
316
- }
317
- }
318
- },
319
- embed: {
320
- type: "object",
321
- additionalProperties: false,
322
- properties: {
323
- model: {
324
- type: "string",
325
- minLength: 1
326
- },
327
- dtype: {
328
- type: "string",
329
- minLength: 1
330
- },
331
- out: {
332
- type: "string",
333
- minLength: 1
334
- },
335
- cacheDir: {
336
- type: "string",
337
- minLength: 1
338
- },
339
- byLanguage: {
340
- type: "object",
341
- additionalProperties: false,
342
- patternProperties: {
343
- "^[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}))*$": {
344
- type: "object",
345
- additionalProperties: false,
346
- properties: {
347
- model: {
348
- type: "string",
349
- minLength: 1
350
- },
351
- dtype: {
352
- type: "string",
353
- minLength: 1
354
- }
355
- }
356
- }
357
- }
358
- }
359
- }
360
- },
361
- export: {
362
- type: "object",
363
- additionalProperties: false,
364
- properties: {
365
- iirds: {
366
- type: "object",
367
- additionalProperties: false,
368
- properties: {
369
- title: {
370
- type: "string",
371
- minLength: 1
372
- },
373
- creator: {
374
- type: "string",
375
- minLength: 1
376
- },
377
- version: {
378
- enum: ["1.2", "1.3"]
379
- }
380
- }
381
- }
382
- }
383
- }
384
- }
385
- };
386
-
387
- // src/graph/core/vocab.ts
388
- var NS = {
389
- dcterms: "http://purl.org/dc/terms/",
390
- foaf: "http://xmlns.com/foaf/0.1/",
391
- graph: "https://hawkeyexl.github.io/manni/graph/ns#",
392
- iirds: "http://iirds.tekom.de/iirds#",
393
- iirdsSft: "http://iirds.tekom.de/iirds/domain/software#",
394
- prov: "http://www.w3.org/ns/prov#",
395
- rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
396
- schema: "https://schema.org/",
397
- skos: "http://www.w3.org/2004/02/skos/core#",
398
- xsd: "http://www.w3.org/2001/XMLSchema#"
399
- };
400
- var PREFIXES = Object.entries(NS).sort(([a], [b]) => a < b ? -1 : 1);
401
- var RDF_TYPE = `${NS.rdf}type`;
402
- var ROLE = {
403
- author: `${NS.graph}authorRole`,
404
- generator: `${NS.graph}generatorRole`,
405
- tool: `${NS.graph}toolRole`
406
- };
407
-
408
- // src/graph/core/iirds.ts
409
- var IIRDS_HAS_TOPIC_TYPE = `${NS.iirds}has-topic-type`;
410
- var IIRDS_RELATES_TO_PRODUCT_VARIANT = `${NS.iirds}relates-to-product-variant`;
411
- var IIRDS_RELATES_TO_LIFECYCLE_PHASE = `${NS.iirds}relates-to-product-lifecycle-phase`;
412
- var IIRDS_HAS_SUBJECT = `${NS.iirds}has-subject`;
413
- var IIRDS_PRODUCT_VARIANT = `${NS.iirds}ProductVariant`;
414
- var IIRDS_PACKAGE = `${NS.iirds}Package`;
415
- var IIRDS_IIRDS_VERSION = `${NS.iirds}iiRDSVersion`;
416
- var IIRDS_TOPIC = `${NS.iirds}Topic`;
417
- var IIRDS_IS_PART_OF_PACKAGE = `${NS.iirds}is-part-of-package`;
418
- var IIRDS_HAS_RENDITION = `${NS.iirds}has-rendition`;
419
- var IIRDS_RENDITION = `${NS.iirds}Rendition`;
420
- var IIRDS_SOURCE = `${NS.iirds}source`;
421
- var IIRDS_FORMAT = `${NS.iirds}format`;
422
- var IIRDS_TITLE = `${NS.iirds}title`;
423
- var IIRDS_LANGUAGE = `${NS.iirds}language`;
424
- var IIRDS_PARTY = `${NS.iirds}Party`;
425
- var IIRDS_HAS_PARTY_ROLE = `${NS.iirds}has-party-role`;
426
- var IIRDS_CREATOR = `${NS.iirds}Creator`;
427
- var IIRDS_RELATES_TO_PARTY = `${NS.iirds}relates-to-party`;
428
- var IIRDS_RELATES_TO_VCARD = `${NS.iirds}relates-to-vcard`;
429
- var VCARD_NS = "http://www.w3.org/2006/vcard/ns#";
430
- var VCARD_ORGANIZATION = `${VCARD_NS}Organization`;
431
- var VCARD_ORGANIZATION_NAME = `${VCARD_NS}organization-name`;
432
- var GRAPH_NOT_APPLICABLE_TO_VARIANT = `${NS.graph}notApplicableToVariant`;
433
- var GRAPH_NOT_SOFTWARE_SUBJECT = `${NS.graph}notSoftwareSubject`;
434
- var PAGE_TYPE_TO_TOPIC_TYPE = {
435
- "how-to": "task",
436
- tutorial: "learning",
437
- explanation: "concept",
438
- reference: "reference",
439
- troubleshooting: "troubleshooting"
440
- };
441
- var TOPIC_TYPE_IRIS = {
442
- task: `${NS.iirds}GenericTask`,
443
- concept: `${NS.iirds}GenericConcept`,
444
- reference: `${NS.iirds}GenericReference`,
445
- learning: `${NS.iirds}GenericLearning`,
446
- troubleshooting: `${NS.iirds}GenericTroubleshooting`,
447
- form: `${NS.iirds}GenericForm`
448
- };
449
- var SOFTWARE_LIFECYCLE_IRIS = {
450
- administration: `${NS.iirdsSft}Administration`,
451
- customization: `${NS.iirdsSft}Customization`,
452
- update: `${NS.iirdsSft}Update`,
453
- deployment: `${NS.iirdsSft}Deployment`,
454
- integration: `${NS.iirdsSft}Integration`,
455
- deinstallation: `${NS.iirdsSft}Deinstallation`
456
- };
457
- var SOFTWARE_SUBJECT_IRIS = {
458
- architecture: `${NS.iirdsSft}Architecture`,
459
- interface: `${NS.iirdsSft}Interface`,
460
- "system-requirement": `${NS.iirdsSft}SystemRequirement`
461
- };
462
-
463
- // src/graph/core/coverage.ts
464
- var COVERAGE_FIELDS = [
465
- { field: "title", iri: `${NS.dcterms}title` },
466
- { field: "description", iri: `${NS.dcterms}description` },
467
- { field: "creator", iri: `${NS.dcterms}creator` },
468
- { field: "created", iri: `${NS.dcterms}created` },
469
- { field: "modified", iri: `${NS.dcterms}modified` },
470
- { field: "subject", iri: `${NS.dcterms}subject` },
471
- { field: "label", iri: `${NS.foaf}primaryTopic` },
472
- // Dropped by ADR 01011 as "near-universally 0% noise", which was true on the
473
- // monolingual corpora it was measured against and false the moment language
474
- // means something. Restored by ADR 01037, which made it a scope dimension:
475
- // an unlabelled document in a translated corpus cannot be filtered, indexed
476
- // per locale, or counted against the right audience.
477
- { field: "language", iri: `${NS.dcterms}language` },
478
- // The iiRDS typing added in Phases 2–4. Coverage predates all of it, so the
479
- // measure of "what a graph-side consumer can see" was silent about the
480
- // vocabulary the project spent four phases adding (ADR 01029).
481
- { field: "type", iri: IIRDS_HAS_TOPIC_TYPE },
482
- { field: "applies-to", iri: IIRDS_RELATES_TO_PRODUCT_VARIANT },
483
- {
484
- field: "about-product-lifecycle",
485
- iri: IIRDS_RELATES_TO_LIFECYCLE_PHASE
486
- },
487
- { field: "about-product-aspect", iri: IIRDS_HAS_SUBJECT }
488
- ];
489
- var SECTION_FIELD_NAMES = [
490
- "type",
491
- "applies-to",
492
- "about-product-lifecycle",
493
- "about-product-aspect",
494
- "subject"
495
- ];
496
- var SECTION_COVERAGE_FIELDS = SECTION_FIELD_NAMES.map((name) => {
497
- const field = COVERAGE_FIELDS.find((f) => f.field === name);
498
- if (field === void 0) {
499
- throw new Error(
500
- `SECTION_FIELD_NAMES names ${name}, which COVERAGE_FIELDS does not define`
501
- );
502
- }
503
- return field;
504
- });
505
- var COVERAGE_FIELD_NAMES = COVERAGE_FIELDS.map(
506
- (f) => f.field
507
- );
508
-
509
- // src/graph/embed/types.ts
510
- var DEFAULT_PROFILE = {
511
- id: "onnx-community/granite-embedding-small-english-r2-ONNX",
512
- note: "Default. 384-d, 8192-token context so sections are never truncated; no prefixes."
513
- };
514
- var MODEL_PROFILES = [
515
- DEFAULT_PROFILE,
516
- {
517
- id: "Xenova/gte-small",
518
- note: "Lighter (~34 MB). 384-d, 512-token context; no prefixes."
519
- },
520
- {
521
- id: "Xenova/bge-small-en-v1.5",
522
- queryPrefix: "Represent this sentence for searching relevant passages: ",
523
- note: "384-d. Needs a query prefix \u2014 applied automatically here, since omitting it degrades retrieval silently."
524
- },
525
- {
526
- id: "Xenova/all-MiniLM-L6-v2",
527
- note: "Smallest (~23 MB) but truncates at 256 wordpieces (~190 words), so long sections lose their tail."
528
- }
529
- ];
530
- var DEFAULT_MODEL = DEFAULT_PROFILE.id;
531
- function profileFor(id) {
532
- return MODEL_PROFILES.find((p) => p.id === id) ?? { id };
533
- }
534
- function withPrefix(profile, role, text) {
535
- const prefix = role === "query" ? profile.queryPrefix : profile.passagePrefix;
536
- return prefix ? `${prefix}${text}` : text;
537
- }
538
-
539
- // src/graph/core/config.ts
540
- var ALL_FILL_FIELDS = [
541
- "label",
542
- "alt-labels",
543
- "broader",
544
- "narrower",
545
- "related-concepts",
546
- "concepts",
547
- "type",
548
- "applies-to",
549
- "about-product-lifecycle",
550
- "about-product-aspect",
551
- "not-applicable-to",
552
- "not-about-product-aspect"
553
- ];
554
- var DEFAULT_CONFIG_FILENAME = "manni.config.yaml";
555
- var CONFIG_SECTION = "graph";
556
- var COLLECTIONS_KEY = "collections";
557
- var CONFIG_REF = "https://hawkeyexl.github.io/manni/meta/reference/configuration/";
558
- var MOVED_KEYS = ["inputs", "exclude"];
559
- var ALL_DERIVE_SOURCES = [
560
- "frontmatter",
561
- "sections",
562
- "links",
563
- "tags",
564
- "images",
565
- "code",
566
- "provenance"
567
- ];
568
- var DEFAULT_LINK_EXTENSIONS = [
569
- ".md",
570
- ".mdx",
571
- ".markdown",
572
- ".html",
573
- ".htm",
574
- ".adoc",
575
- ".asciidoc",
576
- ".rst",
577
- ".dita",
578
- ".ditamap"
579
- ];
580
- var DEFAULT_INDEX_FILES = ["index", "README"];
581
- function normalizeBasePath(basePath) {
582
- let out = basePath.trim();
583
- if (!out.startsWith("/")) out = `/${out}`;
584
- out = out.replace(/\/+$/, "");
585
- return out;
586
- }
587
- var ajv = new Ajv2020({ allErrors: true, allowUnionTypes: true });
588
- var validateConfig = ajv.compile(config_schema_default);
589
- function configErrorLine(e) {
590
- const extra = e.keyword === "additionalProperties" ? e.params.additionalProperty : void 0;
591
- const where = `/${CONFIG_SECTION}${e.instancePath}`;
592
- return extra === void 0 ? ` ${where}: ${e.message ?? "is invalid"}` : ` ${where}: unknown key "${extra}"`;
593
- }
594
- function resolveCoverageThreshold(raw) {
595
- if (raw == null) return {};
596
- if (typeof raw === "number")
597
- return Object.fromEntries(COVERAGE_FIELD_NAMES.map((f) => [f, raw]));
598
- return { ...raw };
599
- }
600
- function parseConfig(text, configPath) {
601
- let raw;
602
- try {
603
- raw = parseYaml(text);
604
- } catch (e) {
605
- throw new GraphError(
606
- `Invalid YAML in ${configPath}: ${errorMessage(e)}`
607
- );
608
- }
609
- if (raw == null) return parseConfigSection(null, configPath);
610
- if (typeof raw !== "object" || Array.isArray(raw)) {
611
- throw new GraphError(`Invalid config in ${configPath}: root must be an object`);
612
- }
613
- const doc = raw;
614
- const wrapped = Object.hasOwn(doc, CONFIG_SECTION);
615
- const toError = (message) => new GraphError(message);
616
- const collections = Object.hasOwn(doc, COLLECTIONS_KEY) ? parseCollections(doc[COLLECTIONS_KEY], configPath, toError) : [];
617
- const providers = Object.hasOwn(doc, PROVIDERS_KEY) ? parseProviders(
618
- doc[PROVIDERS_KEY],
619
- configPath,
620
- dirname(resolve(configPath)),
621
- toError
622
- ) : {};
623
- return parseConfigSection(wrapped ? doc[CONFIG_SECTION] : doc, configPath, {
624
- source: configPath,
625
- collections,
626
- providers
627
- });
628
- }
629
- function parseConfigSection(raw, configPath, file = { source: configPath, collections: [] }) {
630
- if (raw == null) raw = {};
631
- if (typeof raw !== "object" || Array.isArray(raw)) {
632
- throw new GraphError(
633
- `Invalid config in ${configPath}: root must be an object`
634
- );
635
- }
636
- for (const key of MOVED_KEYS) {
637
- if (Object.hasOwn(raw, key)) {
638
- throw new GraphError(
639
- `${file.source}: "${key}" is no longer a graph key. Document sets are declared once for every tool, under a top-level collections: list. See ${CONFIG_REF}#${COLLECTIONS_KEY}`
640
- );
641
- }
642
- }
643
- if (!validateConfig(raw)) {
644
- const details = (validateConfig.errors ?? []).map((e) => configErrorLine(e)).join("\n");
645
- throw new GraphError(`Invalid config in ${configPath}:
646
- ${details}`);
647
- }
648
- const r = raw;
649
- const abs = resolve(configPath);
650
- const dir = dirname(abs);
651
- const provider = r.provider ?? null;
652
- if (provider !== null) {
653
- assertKnownProvider(provider, (message) => new GraphError(message));
654
- }
655
- return {
656
- collections: file.collections,
657
- configSource: file.source,
658
- provider,
659
- model: r.model ?? null,
660
- providers: file.providers ?? {},
661
- baseIri: resolveBaseIri(r.baseIri),
662
- out: r.out ?? "graph/graph.ttl",
663
- routes: (r.routes ?? []).map((m) => ({
664
- basePath: normalizeBasePath(m.basePath ?? "/"),
665
- root: m.root.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/+$/, ""),
666
- extensions: m.extensions ?? [...DEFAULT_LINK_EXTENSIONS],
667
- indexFiles: m.indexFiles ?? [...DEFAULT_INDEX_FILES],
668
- ...m.language === void 0 ? {} : { language: m.language }
669
- })),
670
- build: {
671
- derive: r.build?.derive ?? [...ALL_DERIVE_SOURCES]
672
- },
673
- check: {
674
- // Empty means: use the shapes bundled with manni (see bundledShapesPath).
675
- shapes: r.check?.shapes ?? []
676
- },
677
- provenance: {
678
- qualified: r.provenance?.qualified ?? true
679
- },
680
- stats: {
681
- coverageThreshold: resolveCoverageThreshold(r.stats?.coverageThreshold)
682
- },
683
- fill: {
684
- temperature: r.fill?.temperature ?? 0,
685
- maxTurns: r.fill?.maxTurns ?? null,
686
- cacheDir: r.fill?.cacheDir ?? ".manni/graph/cache",
687
- fields: r.fill?.fields ?? [...ALL_FILL_FIELDS],
688
- confidenceThreshold: r.fill?.confidenceThreshold ?? 0.7,
689
- writeProvenance: r.fill?.writeProvenance ?? true,
690
- validateGraph: r.fill?.validateGraph ?? true,
691
- sections: r.fill?.sections ?? false
692
- },
693
- embed: {
694
- model: r.embed?.model ?? DEFAULT_MODEL,
695
- dtype: r.embed?.dtype ?? "q8",
696
- out: r.embed?.out,
697
- cacheDir: r.embed?.cacheDir ?? ".manni/graph/embed-cache",
698
- byLanguage: r.embed?.byLanguage ?? {}
699
- },
700
- export: {
701
- iirds: {
702
- title: r.export?.iirds?.title,
703
- creator: r.export?.iirds?.creator,
704
- version: r.export?.iirds?.version ?? "1.3"
705
- }
706
- },
707
- configPath: abs,
708
- configDir: dir
709
- };
710
- }
711
- var CONFIG_FILE = {
712
- section: CONFIG_SECTION,
713
- // The tool was `dockg` before it joined the family (proposal 0051 §7), but
714
- // it published no config file under that old name, so — like cite, a11y and
715
- // docevals — there is no pre-family filename to read (proposal 0051 §2).
716
- legacyNames: [],
717
- toError: (message) => new GraphError(message)
718
- };
719
- function loadConfig(path, cwd = process.cwd()) {
720
- const file = path ? readConfigFileSync(path, cwd, CONFIG_FILE) : findConfigFileSync(cwd, CONFIG_FILE);
721
- if (file === null) return defaultConfig(cwd);
722
- return parseConfigSection(file.value, file.path, {
723
- source: file.source,
724
- collections: file.collections,
725
- ...file.providers === void 0 ? {} : { providers: file.providers }
726
- });
727
- }
728
- function defaultConfig(cwd = process.cwd()) {
729
- return {
730
- ...parseConfigSection(null, resolve(cwd, DEFAULT_CONFIG_FILENAME)),
731
- configSource: null
732
- };
733
- }
734
- function loadRunConfig(opts, cwd = process.cwd()) {
735
- assertCollectionWithoutPaths(opts.collection, opts.paths);
736
- return opts.noConfig ? defaultConfig(cwd) : loadConfig(opts.configPath, cwd);
737
- }
738
- function assertCollectionWithoutPaths(collection, paths) {
739
- if ((collection ?? []).length > 0 && (paths ?? []).length > 0) {
740
- throw new GraphError(
741
- "--collection selects a configured collection; it cannot be combined with paths."
742
- );
743
- }
744
- }
745
-
746
- // src/graph/core/sort.ts
747
- function byCodeUnit(a, b) {
748
- return a < b ? -1 : a > b ? 1 : 0;
749
- }
750
-
751
- export {
752
- GraphError,
753
- resolveBaseIri,
754
- normalizeDocPath,
755
- encodeSegment,
756
- STDIN_PATH,
757
- mintDocIri,
758
- mintSectionIri,
759
- conceptSlug,
760
- mintConceptIri,
761
- mintProductIri,
762
- mintSchemeIri,
763
- mintAgentIri,
764
- mintGraphIri,
765
- mintBuildActivityIri,
766
- NS,
767
- PREFIXES,
768
- RDF_TYPE,
769
- ROLE,
770
- IIRDS_HAS_TOPIC_TYPE,
771
- IIRDS_RELATES_TO_PRODUCT_VARIANT,
772
- IIRDS_RELATES_TO_LIFECYCLE_PHASE,
773
- IIRDS_HAS_SUBJECT,
774
- IIRDS_PRODUCT_VARIANT,
775
- IIRDS_PACKAGE,
776
- IIRDS_IIRDS_VERSION,
777
- IIRDS_TOPIC,
778
- IIRDS_IS_PART_OF_PACKAGE,
779
- IIRDS_HAS_RENDITION,
780
- IIRDS_RENDITION,
781
- IIRDS_SOURCE,
782
- IIRDS_FORMAT,
783
- IIRDS_TITLE,
784
- IIRDS_LANGUAGE,
785
- IIRDS_PARTY,
786
- IIRDS_HAS_PARTY_ROLE,
787
- IIRDS_CREATOR,
788
- IIRDS_RELATES_TO_PARTY,
789
- IIRDS_RELATES_TO_VCARD,
790
- VCARD_NS,
791
- VCARD_ORGANIZATION,
792
- VCARD_ORGANIZATION_NAME,
793
- GRAPH_NOT_APPLICABLE_TO_VARIANT,
794
- GRAPH_NOT_SOFTWARE_SUBJECT,
795
- PAGE_TYPE_TO_TOPIC_TYPE,
796
- TOPIC_TYPE_IRIS,
797
- SOFTWARE_LIFECYCLE_IRIS,
798
- SOFTWARE_SUBJECT_IRIS,
799
- COVERAGE_FIELDS,
800
- SECTION_COVERAGE_FIELDS,
801
- COVERAGE_FIELD_NAMES,
802
- MODEL_PROFILES,
803
- DEFAULT_MODEL,
804
- profileFor,
805
- withPrefix,
806
- ALL_FILL_FIELDS,
807
- DEFAULT_CONFIG_FILENAME,
808
- CONFIG_SECTION,
809
- DEFAULT_LINK_EXTENSIONS,
810
- DEFAULT_INDEX_FILES,
811
- parseConfig,
812
- loadConfig,
813
- defaultConfig,
814
- loadRunConfig,
815
- assertCollectionWithoutPaths,
816
- byCodeUnit
817
- };
818
- //# sourceMappingURL=chunk-JROBZ7JA.js.map