@hawkeyexl/manni 4.31.0 → 4.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{batch-P6LTMOZP.js → batch-EXTFKUAM.js} +14 -14
- package/dist/{build-V5JPMFTR.js → build-GADI674Y.js} +14 -14
- package/dist/{calibrate-YS4NLIC3.js → calibrate-UC4DGHYL.js} +15 -15
- package/dist/{capture-YQDJSSKZ.js → capture-HIBYY5R3.js} +14 -14
- package/dist/{check-QAVEMKP2.js → check-F7HHGF3D.js} +11 -11
- package/dist/{check-OWGSBBU7.js → check-FQ7N5Z2F.js} +32 -32
- package/dist/check-KF453CLV.js +58 -0
- package/dist/{check-FVL7G5PJ.js → check-PPNKOK37.js} +13 -13
- package/dist/{check-TUP4RG7G.js → check-QA3FIAPV.js} +23 -23
- package/dist/{chunk-DO5CJVXR.js → chunk-2EA6MOCN.js} +3 -3
- package/dist/{chunk-TX7NPCCT.js → chunk-2HKNDIP3.js} +6 -6
- package/dist/{chunk-BKLXSWGX.js → chunk-2JQPC5RK.js} +7 -7
- package/dist/chunk-2JQPC5RK.js.map +1 -0
- package/dist/{chunk-NH4RQUSD.js → chunk-2KCIETVY.js} +4 -4
- package/dist/{chunk-MCUN2JP3.js → chunk-2YV6K44B.js} +6 -6
- package/dist/{chunk-BVQEOF23.js → chunk-3AB4UPAH.js} +3 -3
- package/dist/{chunk-X7UWDGQQ.js → chunk-3Q2GJERD.js} +6 -6
- package/dist/{chunk-KWK6VVK2.js → chunk-3SHTLHQ6.js} +5 -5
- package/dist/{chunk-D2N3SAV6.js → chunk-3WUATOHK.js} +4 -4
- package/dist/{chunk-YT55M4VQ.js → chunk-5LLPUOYC.js} +6 -6
- package/dist/{chunk-CEPNSI4V.js → chunk-5YCFOK6Y.js} +2 -2
- package/dist/{chunk-FJZZYY7Q.js → chunk-6SB3IQWD.js} +9 -9
- package/dist/{chunk-P676AEK6.js → chunk-7PMYQS5K.js} +5 -5
- package/dist/{cli-NKGQZKXS.js → chunk-A2KXDBRL.js} +177 -227
- package/dist/chunk-A2KXDBRL.js.map +1 -0
- package/dist/{chunk-INDMEKFB.js → chunk-B5DAXZLE.js} +7 -7
- package/dist/{chunk-7URMU7S5.js → chunk-BHVVKRVV.js} +2 -2
- package/dist/{chunk-ZGLLJSL7.js → chunk-C3WYV3L4.js} +3 -3
- package/dist/{chunk-SORYKTNP.js → chunk-CWDUIJJX.js} +2 -2
- package/dist/{chunk-SORYKTNP.js.map → chunk-CWDUIJJX.js.map} +1 -1
- package/dist/{chunk-66A5PPWF.js → chunk-DUKZLNBC.js} +4 -4
- package/dist/{chunk-CCBIO2CB.js → chunk-DVHVNTP7.js} +2 -2
- package/dist/{chunk-4JDOHAHR.js → chunk-EESOMRVW.js} +7 -7
- package/dist/{chunk-CY4RNLFN.js → chunk-EOFXK7ON.js} +3 -3
- package/dist/{chunk-TE6SQVNO.js → chunk-GC7FAGRL.js} +10 -10
- package/dist/{chunk-STPT3WEC.js → chunk-GEA5SVJU.js} +8 -8
- package/dist/{chunk-ZZGHTXZ2.js → chunk-GY3RMN64.js} +2 -2
- package/dist/{chunk-YH6MWLDA.js → chunk-GYEP6KX7.js} +2 -2
- package/dist/{chunk-AD7IRC5T.js → chunk-HD4IZVVX.js} +3 -3
- package/dist/{chunk-SPYYVEWP.js → chunk-HG7O47EK.js} +13 -11
- package/dist/chunk-HG7O47EK.js.map +1 -0
- package/dist/{chunk-672TCM2Q.js → chunk-IFHB4QBS.js} +5 -5
- package/dist/{chunk-DSHAY6YM.js → chunk-IPS3B5WV.js} +3 -3
- package/dist/{chunk-GWOVEW53.js → chunk-J2PUJFA4.js} +5 -5
- package/dist/{chunk-WX77JHTU.js → chunk-J6QJ7T6M.js} +4 -4
- package/dist/{chunk-JVZAJBSS.js → chunk-JXGJLJOP.js} +2 -2
- package/dist/{chunk-ZY2XP3AS.js → chunk-KJOF3TAE.js} +14 -14
- package/dist/{chunk-R64PJYCT.js → chunk-KU7MRVTB.js} +2 -2
- package/dist/{chunk-MQ34D4OP.js → chunk-L7WBKQ2R.js} +4 -4
- package/dist/{chunk-HVYVIGBP.js → chunk-MBPDZWYI.js} +457 -366
- package/dist/chunk-MBPDZWYI.js.map +1 -0
- package/dist/{chunk-N7VIVL42.js → chunk-MRFSWEJA.js} +2 -2
- package/dist/{chunk-BTFXOKCP.js → chunk-MSLBEN74.js} +2 -2
- package/dist/chunk-NFZE4MXL.js +14 -0
- package/dist/chunk-NFZE4MXL.js.map +1 -0
- package/dist/{chunk-I52GL7N6.js → chunk-OILHKIBL.js} +3 -3
- package/dist/{chunk-EZBWGI25.js → chunk-PKLRFHO5.js} +2 -2
- package/dist/{chunk-AXSCHC34.js → chunk-POPJ4INH.js} +94 -169
- package/dist/chunk-POPJ4INH.js.map +1 -0
- package/dist/{chunk-7S6H5UML.js → chunk-PXUAUKLB.js} +3 -3
- package/dist/{chunk-VKAE3W6H.js → chunk-Q6INPRTC.js} +5 -5
- package/dist/{chunk-CDX4QK6O.js → chunk-QMYR4OI5.js} +29 -2
- package/dist/chunk-QMYR4OI5.js.map +1 -0
- package/dist/{chunk-KPQFF62T.js → chunk-QVDRRK5K.js} +4 -4
- package/dist/{chunk-BBIEWUO6.js → chunk-RC7TM74Z.js} +7 -7
- package/dist/{chunk-ZMFSFXQX.js → chunk-RNXOPBBD.js} +9 -9
- package/dist/{chunk-2NB7MT5I.js → chunk-RRXIIMKU.js} +3 -3
- package/dist/{chunk-66U7KHZE.js → chunk-RV5GZTXH.js} +6 -6
- package/dist/{chunk-M5HDMQCI.js → chunk-SHTMF6PC.js} +3 -4
- package/dist/chunk-SHTMF6PC.js.map +1 -0
- package/dist/{chunk-GTT7EQEV.js → chunk-SMQMGAP3.js} +2 -2
- package/dist/{chunk-2KGDXZMS.js → chunk-SVUF42MI.js} +3 -3
- package/dist/{chunk-F6FDIOKE.js → chunk-TZOBQ3TA.js} +3 -3
- package/dist/{chunk-DLIQJJAE.js → chunk-UKWWA4T7.js} +2 -2
- package/dist/{chunk-BR6NGHRG.js → chunk-UMCTYM7L.js} +3 -3
- package/dist/{chunk-DOXZ3U4O.js → chunk-VLUJ46LV.js} +11 -11
- package/dist/{chunk-ICUKYSPX.js → chunk-VQ3FZVNM.js} +2 -2
- package/dist/{chunk-AXIYZIHN.js → chunk-WWP6Y7S7.js} +4 -4
- package/dist/{chunk-MREXYXMW.js → chunk-WX7NURTP.js} +8 -8
- package/dist/{chunk-XIEUUETR.js → chunk-XWVXPXWI.js} +4 -4
- package/dist/{chunk-Z7HBBFSZ.js → chunk-YAPFEDGW.js} +5 -5
- package/dist/{chunk-LU6HSA2N.js → chunk-Z6T7UX7R.js} +70 -33
- package/dist/chunk-Z6T7UX7R.js.map +1 -0
- package/dist/{chunk-J7OFPDCD.js → chunk-ZIXRI5XY.js} +4 -4
- package/dist/{chunk-3WX73ME2.js → chunk-ZWL5ST2M.js} +2 -2
- package/dist/{cli-TA2IQRYK.js → cli-5UAQT4OU.js} +8 -8
- package/dist/{cli-XVJ5G4EO.js → cli-67XDE7Q7.js} +27 -27
- package/dist/{cli-YKM5YZHY.js → cli-EDXJFE5T.js} +3 -3
- package/dist/{cli-UAM4MBRM.js → cli-GJ6GRHZN.js} +18 -18
- package/dist/{cli-R5XYFIOY.js → cli-LQFBUP6H.js} +15 -15
- package/dist/{cli-7TW4HTQN.js → cli-MXEFSQJC.js} +13 -13
- package/dist/{cli-T2AZSUSY.js → cli-OZ4YL6WS.js} +22 -22
- package/dist/{cli-ME4U7S7Q.js → cli-PG6Z6YXW.js} +28 -28
- package/dist/cli-SSK7GS43.js +80 -0
- package/dist/cli-TIQNAQJA.js +133 -0
- package/dist/cli-TIQNAQJA.js.map +1 -0
- package/dist/{cli-5NIVQZIE.js → cli-W7QU573I.js} +27 -27
- package/dist/{cli-BG6WXYWT.js → cli-XXJQS3F3.js} +59 -54
- package/dist/cli-XXJQS3F3.js.map +1 -0
- package/dist/cli.js +21 -15
- package/dist/cli.js.map +1 -1
- package/dist/{config-Z3FYLJ6X.js → config-ISXGJ4XM.js} +3 -3
- package/dist/docmeta.js +7 -7
- package/dist/{github-SQ2ATTLV.js → github-IKC7EPZ6.js} +11 -11
- package/dist/{github-X6F2FQL3.js → github-LUJDHQRN.js} +13 -13
- package/dist/github-Z6S7HS6X.js +49 -0
- package/dist/graph/embed.d.ts +1 -1
- package/dist/graph/embed.js.map +1 -1
- package/dist/graph/runtime.d.ts +2 -2
- package/dist/graph/runtime.js +4 -4
- package/dist/graph/runtime.js.map +1 -1
- package/dist/index.d.ts +801 -786
- package/dist/index.js +77 -66
- package/dist/index.js.map +1 -1
- package/dist/{json-L7QDREEX.js → json-FBYXDIQQ.js} +11 -11
- package/dist/{json-NSLJFPWD.js → json-OZKTEKPS.js} +14 -14
- package/dist/{labels-C4HCKZMZ.js → labels-MFHU6ZPR.js} +10 -10
- package/dist/{lint-ODALAI2I.js → lint-2TA4DFLT.js} +11 -11
- package/dist/{list-4JLKJOGX.js → list-3RIITWCX.js} +25 -25
- package/dist/{list-TQK3FWC2.js → list-JLBUOBV5.js} +13 -13
- package/dist/{list-CAE7T5HA.js → list-YO3W3VKA.js} +11 -11
- package/dist/{page-GB5LHRHX.js → page-4MZGF2N2.js} +10 -10
- package/dist/{prepare-VCJRE3EY.js → prepare-PKGPBUNT.js} +17 -17
- package/dist/{pretty-KZPED6KN.js → pretty-7PT7ETKZ.js} +23 -23
- package/dist/{pretty-GP4R3UII.js → pretty-YHIPZV5I.js} +11 -11
- package/dist/{pretty-GXLKMUT4.js → pretty-YIWBO6C3.js} +13 -13
- package/dist/{release-EFLQT3FW.js → release-VQQXI4XB.js} +4 -4
- package/dist/{reporters-GGP4YLIM.js → reporters-QJ7QC3XA.js} +10 -10
- package/dist/{reporters-GQ2PUWQA.js → reporters-ZUKUAWKX.js} +5 -5
- package/dist/{run-SVH32CBO.js → run-ZK6EY5V7.js} +25 -25
- package/dist/sarif-HYGCKXCT.js +50 -0
- package/dist/{sarif-UHZD2CJ3.js → sarif-PIUCN7PT.js} +9 -9
- package/dist/{sarif-UG7F3WQD.js → sarif-YP2DCLLU.js} +9 -9
- package/dist/{strategy-Y4NEJRSH.js → strategy-E2YCBTAW.js} +20 -20
- package/dist/{term-LQ2F5WEN.js → term-RLQ6WZUD.js} +16 -16
- package/dist/{validate-6WBRKEV5.js → validate-OPLT7USL.js} +5 -5
- package/dist/validate-OPLT7USL.js.map +1 -0
- package/package.json +1 -1
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/dist/check-DVMU74U3.js +0 -58
- package/dist/chunk-AXSCHC34.js.map +0 -1
- package/dist/chunk-BKLXSWGX.js.map +0 -1
- package/dist/chunk-CDX4QK6O.js.map +0 -1
- package/dist/chunk-HVYVIGBP.js.map +0 -1
- package/dist/chunk-LU6HSA2N.js.map +0 -1
- package/dist/chunk-M5HDMQCI.js.map +0 -1
- package/dist/chunk-SPYYVEWP.js.map +0 -1
- package/dist/cli-BG6WXYWT.js.map +0 -1
- package/dist/cli-NKGQZKXS.js.map +0 -1
- package/dist/github-ZCA7TOJO.js +0 -49
- package/dist/sarif-CFQJ5HHP.js +0 -50
- /package/dist/{batch-P6LTMOZP.js.map → batch-EXTFKUAM.js.map} +0 -0
- /package/dist/{build-V5JPMFTR.js.map → build-GADI674Y.js.map} +0 -0
- /package/dist/{calibrate-YS4NLIC3.js.map → calibrate-UC4DGHYL.js.map} +0 -0
- /package/dist/{capture-YQDJSSKZ.js.map → capture-HIBYY5R3.js.map} +0 -0
- /package/dist/{check-DVMU74U3.js.map → check-F7HHGF3D.js.map} +0 -0
- /package/dist/{check-OWGSBBU7.js.map → check-FQ7N5Z2F.js.map} +0 -0
- /package/dist/{check-FVL7G5PJ.js.map → check-KF453CLV.js.map} +0 -0
- /package/dist/{check-QAVEMKP2.js.map → check-PPNKOK37.js.map} +0 -0
- /package/dist/{check-TUP4RG7G.js.map → check-QA3FIAPV.js.map} +0 -0
- /package/dist/{chunk-DO5CJVXR.js.map → chunk-2EA6MOCN.js.map} +0 -0
- /package/dist/{chunk-TX7NPCCT.js.map → chunk-2HKNDIP3.js.map} +0 -0
- /package/dist/{chunk-NH4RQUSD.js.map → chunk-2KCIETVY.js.map} +0 -0
- /package/dist/{chunk-MCUN2JP3.js.map → chunk-2YV6K44B.js.map} +0 -0
- /package/dist/{chunk-BVQEOF23.js.map → chunk-3AB4UPAH.js.map} +0 -0
- /package/dist/{chunk-X7UWDGQQ.js.map → chunk-3Q2GJERD.js.map} +0 -0
- /package/dist/{chunk-KWK6VVK2.js.map → chunk-3SHTLHQ6.js.map} +0 -0
- /package/dist/{chunk-D2N3SAV6.js.map → chunk-3WUATOHK.js.map} +0 -0
- /package/dist/{chunk-YT55M4VQ.js.map → chunk-5LLPUOYC.js.map} +0 -0
- /package/dist/{chunk-CEPNSI4V.js.map → chunk-5YCFOK6Y.js.map} +0 -0
- /package/dist/{chunk-FJZZYY7Q.js.map → chunk-6SB3IQWD.js.map} +0 -0
- /package/dist/{chunk-P676AEK6.js.map → chunk-7PMYQS5K.js.map} +0 -0
- /package/dist/{chunk-INDMEKFB.js.map → chunk-B5DAXZLE.js.map} +0 -0
- /package/dist/{chunk-7URMU7S5.js.map → chunk-BHVVKRVV.js.map} +0 -0
- /package/dist/{chunk-ZGLLJSL7.js.map → chunk-C3WYV3L4.js.map} +0 -0
- /package/dist/{chunk-66A5PPWF.js.map → chunk-DUKZLNBC.js.map} +0 -0
- /package/dist/{chunk-CCBIO2CB.js.map → chunk-DVHVNTP7.js.map} +0 -0
- /package/dist/{chunk-4JDOHAHR.js.map → chunk-EESOMRVW.js.map} +0 -0
- /package/dist/{chunk-CY4RNLFN.js.map → chunk-EOFXK7ON.js.map} +0 -0
- /package/dist/{chunk-TE6SQVNO.js.map → chunk-GC7FAGRL.js.map} +0 -0
- /package/dist/{chunk-STPT3WEC.js.map → chunk-GEA5SVJU.js.map} +0 -0
- /package/dist/{chunk-ZZGHTXZ2.js.map → chunk-GY3RMN64.js.map} +0 -0
- /package/dist/{chunk-YH6MWLDA.js.map → chunk-GYEP6KX7.js.map} +0 -0
- /package/dist/{chunk-AD7IRC5T.js.map → chunk-HD4IZVVX.js.map} +0 -0
- /package/dist/{chunk-672TCM2Q.js.map → chunk-IFHB4QBS.js.map} +0 -0
- /package/dist/{chunk-DSHAY6YM.js.map → chunk-IPS3B5WV.js.map} +0 -0
- /package/dist/{chunk-GWOVEW53.js.map → chunk-J2PUJFA4.js.map} +0 -0
- /package/dist/{chunk-WX77JHTU.js.map → chunk-J6QJ7T6M.js.map} +0 -0
- /package/dist/{chunk-JVZAJBSS.js.map → chunk-JXGJLJOP.js.map} +0 -0
- /package/dist/{chunk-ZY2XP3AS.js.map → chunk-KJOF3TAE.js.map} +0 -0
- /package/dist/{chunk-R64PJYCT.js.map → chunk-KU7MRVTB.js.map} +0 -0
- /package/dist/{chunk-MQ34D4OP.js.map → chunk-L7WBKQ2R.js.map} +0 -0
- /package/dist/{chunk-N7VIVL42.js.map → chunk-MRFSWEJA.js.map} +0 -0
- /package/dist/{chunk-BTFXOKCP.js.map → chunk-MSLBEN74.js.map} +0 -0
- /package/dist/{chunk-I52GL7N6.js.map → chunk-OILHKIBL.js.map} +0 -0
- /package/dist/{chunk-EZBWGI25.js.map → chunk-PKLRFHO5.js.map} +0 -0
- /package/dist/{chunk-7S6H5UML.js.map → chunk-PXUAUKLB.js.map} +0 -0
- /package/dist/{chunk-VKAE3W6H.js.map → chunk-Q6INPRTC.js.map} +0 -0
- /package/dist/{chunk-KPQFF62T.js.map → chunk-QVDRRK5K.js.map} +0 -0
- /package/dist/{chunk-BBIEWUO6.js.map → chunk-RC7TM74Z.js.map} +0 -0
- /package/dist/{chunk-ZMFSFXQX.js.map → chunk-RNXOPBBD.js.map} +0 -0
- /package/dist/{chunk-2NB7MT5I.js.map → chunk-RRXIIMKU.js.map} +0 -0
- /package/dist/{chunk-66U7KHZE.js.map → chunk-RV5GZTXH.js.map} +0 -0
- /package/dist/{chunk-GTT7EQEV.js.map → chunk-SMQMGAP3.js.map} +0 -0
- /package/dist/{chunk-2KGDXZMS.js.map → chunk-SVUF42MI.js.map} +0 -0
- /package/dist/{chunk-F6FDIOKE.js.map → chunk-TZOBQ3TA.js.map} +0 -0
- /package/dist/{chunk-DLIQJJAE.js.map → chunk-UKWWA4T7.js.map} +0 -0
- /package/dist/{chunk-BR6NGHRG.js.map → chunk-UMCTYM7L.js.map} +0 -0
- /package/dist/{chunk-DOXZ3U4O.js.map → chunk-VLUJ46LV.js.map} +0 -0
- /package/dist/{chunk-ICUKYSPX.js.map → chunk-VQ3FZVNM.js.map} +0 -0
- /package/dist/{chunk-AXIYZIHN.js.map → chunk-WWP6Y7S7.js.map} +0 -0
- /package/dist/{chunk-MREXYXMW.js.map → chunk-WX7NURTP.js.map} +0 -0
- /package/dist/{chunk-XIEUUETR.js.map → chunk-XWVXPXWI.js.map} +0 -0
- /package/dist/{chunk-Z7HBBFSZ.js.map → chunk-YAPFEDGW.js.map} +0 -0
- /package/dist/{chunk-J7OFPDCD.js.map → chunk-ZIXRI5XY.js.map} +0 -0
- /package/dist/{chunk-3WX73ME2.js.map → chunk-ZWL5ST2M.js.map} +0 -0
- /package/dist/{cli-TA2IQRYK.js.map → cli-5UAQT4OU.js.map} +0 -0
- /package/dist/{cli-XVJ5G4EO.js.map → cli-67XDE7Q7.js.map} +0 -0
- /package/dist/{cli-YKM5YZHY.js.map → cli-EDXJFE5T.js.map} +0 -0
- /package/dist/{cli-UAM4MBRM.js.map → cli-GJ6GRHZN.js.map} +0 -0
- /package/dist/{cli-R5XYFIOY.js.map → cli-LQFBUP6H.js.map} +0 -0
- /package/dist/{cli-7TW4HTQN.js.map → cli-MXEFSQJC.js.map} +0 -0
- /package/dist/{cli-T2AZSUSY.js.map → cli-OZ4YL6WS.js.map} +0 -0
- /package/dist/{cli-ME4U7S7Q.js.map → cli-PG6Z6YXW.js.map} +0 -0
- /package/dist/{config-Z3FYLJ6X.js.map → cli-SSK7GS43.js.map} +0 -0
- /package/dist/{cli-5NIVQZIE.js.map → cli-W7QU573I.js.map} +0 -0
- /package/dist/{github-SQ2ATTLV.js.map → config-ISXGJ4XM.js.map} +0 -0
- /package/dist/{github-X6F2FQL3.js.map → github-IKC7EPZ6.js.map} +0 -0
- /package/dist/{github-ZCA7TOJO.js.map → github-LUJDHQRN.js.map} +0 -0
- /package/dist/{json-L7QDREEX.js.map → github-Z6S7HS6X.js.map} +0 -0
- /package/dist/{json-NSLJFPWD.js.map → json-FBYXDIQQ.js.map} +0 -0
- /package/dist/{lint-ODALAI2I.js.map → json-OZKTEKPS.js.map} +0 -0
- /package/dist/{labels-C4HCKZMZ.js.map → labels-MFHU6ZPR.js.map} +0 -0
- /package/dist/{list-4JLKJOGX.js.map → lint-2TA4DFLT.js.map} +0 -0
- /package/dist/{list-CAE7T5HA.js.map → list-3RIITWCX.js.map} +0 -0
- /package/dist/{list-TQK3FWC2.js.map → list-JLBUOBV5.js.map} +0 -0
- /package/dist/{page-GB5LHRHX.js.map → list-YO3W3VKA.js.map} +0 -0
- /package/dist/{pretty-GP4R3UII.js.map → page-4MZGF2N2.js.map} +0 -0
- /package/dist/{prepare-VCJRE3EY.js.map → prepare-PKGPBUNT.js.map} +0 -0
- /package/dist/{pretty-GXLKMUT4.js.map → pretty-7PT7ETKZ.js.map} +0 -0
- /package/dist/{pretty-KZPED6KN.js.map → pretty-YHIPZV5I.js.map} +0 -0
- /package/dist/{reporters-GGP4YLIM.js.map → pretty-YIWBO6C3.js.map} +0 -0
- /package/dist/{release-EFLQT3FW.js.map → release-VQQXI4XB.js.map} +0 -0
- /package/dist/{reporters-GQ2PUWQA.js.map → reporters-QJ7QC3XA.js.map} +0 -0
- /package/dist/{run-SVH32CBO.js.map → reporters-ZUKUAWKX.js.map} +0 -0
- /package/dist/{sarif-CFQJ5HHP.js.map → run-ZK6EY5V7.js.map} +0 -0
- /package/dist/{sarif-UG7F3WQD.js.map → sarif-HYGCKXCT.js.map} +0 -0
- /package/dist/{sarif-UHZD2CJ3.js.map → sarif-PIUCN7PT.js.map} +0 -0
- /package/dist/{strategy-Y4NEJRSH.js.map → sarif-YP2DCLLU.js.map} +0 -0
- /package/dist/{validate-6WBRKEV5.js.map → strategy-E2YCBTAW.js.map} +0 -0
- /package/dist/{term-LQ2F5WEN.js.map → term-RLQ6WZUD.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-YEUYKR62.js";
|
|
8
8
|
import {
|
|
9
9
|
package_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CWDUIJJX.js";
|
|
11
11
|
import "./chunk-OWBRDNRZ.js";
|
|
12
12
|
import "./chunk-G3T47CFV.js";
|
|
13
13
|
import "./chunk-2H7UOFLK.js";
|
|
@@ -15,13 +15,13 @@ import "./chunk-2H7UOFLK.js";
|
|
|
15
15
|
// src/cli.ts
|
|
16
16
|
import { Command } from "commander";
|
|
17
17
|
registerTermLabelSource(
|
|
18
|
-
async (request) => (await import("./labels-
|
|
18
|
+
async (request) => (await import("./labels-MFHU6ZPR.js")).termLabels(request)
|
|
19
19
|
);
|
|
20
20
|
var DOMAINS = [
|
|
21
21
|
{
|
|
22
22
|
names: ["meta"],
|
|
23
23
|
load: async () => [
|
|
24
|
-
(await import("./cli-
|
|
24
|
+
(await import("./cli-5UAQT4OU.js")).buildProgram().name("meta").description(
|
|
25
25
|
"Validate, read, query and fill document metadata against JSON Schema"
|
|
26
26
|
)
|
|
27
27
|
]
|
|
@@ -29,7 +29,7 @@ var DOMAINS = [
|
|
|
29
29
|
{
|
|
30
30
|
names: ["a11y"],
|
|
31
31
|
load: async () => [
|
|
32
|
-
(await import("./cli-
|
|
32
|
+
(await import("./cli-EDXJFE5T.js")).buildProgram().name("a11y").description(
|
|
33
33
|
"Crawl a site and check every page for accessibility violations with axe-core"
|
|
34
34
|
)
|
|
35
35
|
]
|
|
@@ -37,7 +37,7 @@ var DOMAINS = [
|
|
|
37
37
|
{
|
|
38
38
|
names: ["cite"],
|
|
39
39
|
load: async () => [
|
|
40
|
-
(await import("./cli-
|
|
40
|
+
(await import("./cli-67XDE7Q7.js")).buildProgram().name("cite").description(
|
|
41
41
|
"Track citations from doc claims to source lines and check them for drift"
|
|
42
42
|
)
|
|
43
43
|
]
|
|
@@ -45,7 +45,7 @@ var DOMAINS = [
|
|
|
45
45
|
{
|
|
46
46
|
names: ["lint"],
|
|
47
47
|
load: async () => [
|
|
48
|
-
(await import("./cli-
|
|
48
|
+
(await import("./cli-MXEFSQJC.js")).buildProgram().name("lint").description(
|
|
49
49
|
"Validate document structure against doctype templates, routed by a page's type"
|
|
50
50
|
)
|
|
51
51
|
]
|
|
@@ -53,7 +53,7 @@ var DOMAINS = [
|
|
|
53
53
|
{
|
|
54
54
|
names: ["docevals"],
|
|
55
55
|
load: async () => [
|
|
56
|
-
(await import("./cli-
|
|
56
|
+
(await import("./cli-W7QU573I.js")).buildProgram().name("docevals").description(
|
|
57
57
|
"Deterministic and LLM-as-judge evals for documentation pages, driven by frontmatter"
|
|
58
58
|
)
|
|
59
59
|
]
|
|
@@ -61,33 +61,39 @@ var DOMAINS = [
|
|
|
61
61
|
{
|
|
62
62
|
names: ["term"],
|
|
63
63
|
load: async () => [
|
|
64
|
-
(await import("./term-
|
|
64
|
+
(await import("./term-RLQ6WZUD.js")).buildProgram().name("term").description("Check, lint and render a docset's terms and the references into them")
|
|
65
65
|
]
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
names: ["strategy"],
|
|
69
69
|
load: async () => [
|
|
70
|
-
(await import("./strategy-
|
|
70
|
+
(await import("./strategy-E2YCBTAW.js")).buildProgram().name("strategy").description("Check a docset's pages against its audiences, personas and journeys")
|
|
71
71
|
]
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
names: ["test"],
|
|
75
75
|
load: async () => [
|
|
76
|
-
(await import("./cli-
|
|
76
|
+
(await import("./cli-GJ6GRHZN.js")).buildProgram().name("test").description("Run the docs' procedure tests, and have synthetic users attempt tasks in them")
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
names: ["graph"],
|
|
81
81
|
load: async () => [
|
|
82
|
-
(await import("./cli-
|
|
82
|
+
(await import("./cli-SSK7GS43.js")).buildProgram().name("graph").description(
|
|
83
83
|
"Deterministic knowledge graphs derived from documentation frontmatter and formatting"
|
|
84
84
|
)
|
|
85
85
|
]
|
|
86
86
|
},
|
|
87
|
+
{
|
|
88
|
+
names: ["vector"],
|
|
89
|
+
load: async () => [
|
|
90
|
+
(await import("./cli-TIQNAQJA.js")).buildProgram().name("vector").description("Build and search embeddings of a docset's pages, keyed by graph node IRIs")
|
|
91
|
+
]
|
|
92
|
+
},
|
|
87
93
|
{
|
|
88
94
|
names: ["tracevals"],
|
|
89
95
|
load: async () => [
|
|
90
|
-
(await import("./cli-
|
|
96
|
+
(await import("./cli-OZ4YL6WS.js")).buildProgram().name("tracevals").description(
|
|
91
97
|
"Deterministic and LLM-as-judge adherence evals for AI agent session traces"
|
|
92
98
|
)
|
|
93
99
|
]
|
|
@@ -96,14 +102,14 @@ var DOMAINS = [
|
|
|
96
102
|
{
|
|
97
103
|
names: ["key"],
|
|
98
104
|
load: async () => [
|
|
99
|
-
(await import("./cli-
|
|
105
|
+
(await import("./cli-PG6Z6YXW.js")).buildProgram().name("key").description("Set and rotate the family key that encrypted values are encrypted with.")
|
|
100
106
|
]
|
|
101
107
|
},
|
|
102
108
|
// The docs site, a family resource with verbs like `key` (proposal 0082).
|
|
103
109
|
{
|
|
104
110
|
names: ["site"],
|
|
105
111
|
load: async () => [
|
|
106
|
-
(await import("./cli-
|
|
112
|
+
(await import("./cli-LQFBUP6H.js")).buildProgram().name("site").description("Start, build and preview the docs site")
|
|
107
113
|
]
|
|
108
114
|
},
|
|
109
115
|
// The two family verbs (proposal 0078), and the only verbs the umbrella
|
|
@@ -111,7 +117,7 @@ var DOMAINS = [
|
|
|
111
117
|
{
|
|
112
118
|
names: ["check", "status"],
|
|
113
119
|
load: async () => {
|
|
114
|
-
const { buildCheck, buildStatus } = await import("./cli-
|
|
120
|
+
const { buildCheck, buildStatus } = await import("./cli-XXJQS3F3.js");
|
|
115
121
|
return [buildCheck(), buildStatus()];
|
|
116
122
|
}
|
|
117
123
|
}
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli.ts"],"sourcesContent":["/**\n * The `manni` CLI: one bin, one subcommand per tool in the family.\n *\n * Each tool builds its own commander program and is mounted here under its\n * name, so `manni meta validate …` is the metadata tool's `validate` with\n * nothing in between. The umbrella owns only what is common to all of them:\n * the name, the version, and the exit-code contract in `runProgram`.\n *\n * Tools land here one at a time, on their own branches; until one merges its\n * subcommand does not exist.\n *\n * Every domain is imported on demand. A domain's module graph is its whole\n * dependency tree (Playwright, axe, Asciidoctor, the RDF stack, ajv), and a\n * hook runs `manni check` after every edit, so the bin mounts only the domain\n * argv names. `--version` mounts none. Anything else (`--help`, a bare\n * `manni`, a typo) mounts them all, so help and \"unknown command\" read as\n * they always did.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../package.json\" with { type: \"json\" };\nimport { runIfMain } from \"./shared/run.js\";\nimport { registerTermLabelSource } from \"./shared/term-labels.js\";\n\n// `meta fill` offers the termbase's labels, but `manni meta fill` mounts only\n// the meta domain. So the umbrella registers the source, and the source loads\n// the term domain only when `fill` asks it for labels.\nregisterTermLabelSource(async (request) =>\n (await import(\"./term/commands/labels.js\")).termLabels(request),\n);\n\ninterface Domain {\n /** The command names the loader mounts, known before it is loaded. */\n names: readonly string[];\n load: () => Promise<Command[]>;\n}\n\n// In the order `manni --help` lists them.\nconst DOMAINS: readonly Domain[] = [\n {\n names: [\"meta\"],\n load: async () => [\n (await import(\"./meta/cli.js\"))\n .buildProgram()\n .name(\"meta\")\n .description(\n \"Validate, read, query and fill document metadata against JSON Schema\",\n ),\n ],\n },\n {\n names: [\"a11y\"],\n load: async () => [\n (await import(\"./a11y/cli.js\"))\n .buildProgram()\n .name(\"a11y\")\n .description(\n \"Crawl a site and check every page for accessibility violations with axe-core\",\n ),\n ],\n },\n {\n names: [\"cite\"],\n load: async () => [\n (await import(\"./cite/cli.js\"))\n .buildProgram()\n .name(\"cite\")\n .description(\n \"Track citations from doc claims to source lines and check them for drift\",\n ),\n ],\n },\n {\n names: [\"lint\"],\n load: async () => [\n (await import(\"./lint/cli.js\"))\n .buildProgram()\n .name(\"lint\")\n .description(\n \"Validate document structure against doctype templates, routed by a page's type\",\n ),\n ],\n },\n {\n names: [\"docevals\"],\n load: async () => [\n (await import(\"./docevals/cli.js\"))\n .buildProgram()\n .name(\"docevals\")\n .description(\n \"Deterministic and LLM-as-judge evals for documentation pages, driven by frontmatter\",\n ),\n ],\n },\n {\n names: [\"term\"],\n load: async () => [\n (await import(\"./term/index.js\"))\n .buildProgram()\n .name(\"term\")\n .description(\"Check, lint and render a docset's terms and the references into them\"),\n ],\n },\n {\n names: [\"strategy\"],\n load: async () => [\n (await import(\"./strategy/index.js\"))\n .buildProgram()\n .name(\"strategy\")\n .description(\"Check a docset's pages against its audiences, personas and journeys\"),\n ],\n },\n {\n names: [\"test\"],\n load: async () => [\n (await import(\"./test/cli.js\"))\n .buildProgram()\n .name(\"test\")\n .description(\"Run the docs' procedure tests, and have synthetic users attempt tasks in them\"),\n ],\n },\n {\n names: [\"graph\"],\n load: async () => [\n (await import(\"./graph/cli.js\"))\n .buildProgram()\n .name(\"graph\")\n .description(\n \"Deterministic knowledge graphs derived from documentation frontmatter and formatting\",\n ),\n ],\n },\n {\n names: [\"tracevals\"],\n load: async () => [\n (await import(\"./tracevals/cli.js\"))\n .buildProgram()\n .name(\"tracevals\")\n .description(\n \"Deterministic and LLM-as-judge adherence evals for AI agent session traces\",\n ),\n ],\n },\n // Not a tool but a family resource with verbs (proposal 0045).\n {\n names: [\"key\"],\n load: async () => [\n (await import(\"./key/cli.js\"))\n .buildProgram()\n .name(\"key\")\n .description(\"Set and rotate the family key that encrypted values are encrypted with.\"),\n ],\n },\n // The docs site, a family resource with verbs like `key` (proposal 0082).\n {\n names: [\"site\"],\n load: async () => [\n (await import(\"./site/cli.js\"))\n .buildProgram()\n .name(\"site\")\n .description(\"Start, build and preview the docs site\"),\n ],\n },\n // The two family verbs (proposal 0078), and the only verbs the umbrella\n // carries: each runs other domains' command cores and owns no checks.\n {\n names: [\"check\", \"status\"],\n load: async () => {\n const { buildCheck, buildStatus } = await import(\"./family/cli.js\");\n return [buildCheck(), buildStatus()];\n },\n },\n];\n\nconst VERSION_FLAGS = new Set([\"-V\", \"--version\"]);\n\n/**\n * The domains a run with these arguments (argv after the script) dispatches\n * to. The umbrella's only options are `--version` and `--help`, so the first\n * argument is one of them or the command commander will look up.\n */\nfunction domainsFor(args: readonly string[]): readonly Domain[] {\n const first = args[0];\n if (first === undefined) return DOMAINS;\n if (VERSION_FLAGS.has(first)) return [];\n const named = DOMAINS.find((d) => d.names.includes(first));\n return named === undefined ? DOMAINS : [named];\n}\n\nasync function mount(domains: readonly Domain[]): Promise<Command> {\n const mounted = (await Promise.all(domains.map((d) => d.load()))).flat();\n const metaCommands = new Set(\n mounted.find((c) => c.name() === \"meta\")?.commands.map((c) => c.name()),\n );\n\n const program = new Command();\n program\n .name(\"manni\")\n .description(\"Tools for documentation that is meant to be checked.\")\n .version(pkg.version, \"-V, --version\")\n // A pointer, not the whole help screen. Commander appends this after every\n // usage error, and the message that precedes it already names the problem.\n .showHelpAfterError(\"(add --help for usage)\")\n // MUST come before `addCommand`, which copies the exit callback into the\n // mounted program by value. See the same note in ./meta/cli.ts.\n .exitOverride()\n .configureOutput({\n outputError: (str, write) => {\n write(str);\n // `manni validate …` is the most likely thing a docmeta user types\n // first. Commander's \"unknown command\" is correct and unhelpful; say\n // where the command went.\n const m = /unknown command '([^']+)'/.exec(str);\n const name = m?.[1];\n if (name !== undefined && metaCommands.has(name)) {\n write(\n `(\\`${name}\\` is a metadata command: try \\`manni meta ${name}\\`)\\n`,\n );\n }\n },\n });\n\n for (const command of mounted) program.addCommand(command);\n return program;\n}\n\n/** The whole command tree, every domain mounted. */\nexport function buildProgram(): Promise<Command> {\n return mount(DOMAINS);\n}\n\n/** The tree a run with these arguments needs: the one domain they name, or all of them. */\nexport function buildProgramFor(args: readonly string[]): Promise<Command> {\n return mount(domainsFor(args));\n}\n\nrunIfMain(import.meta.url, () => buildProgramFor(process.argv.slice(2)));\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,SAAS,eAAe;AAQxB;AAAA,EAAwB,OAAO,aAC5B,MAAM,OAAO,sBAA2B,GAAG,WAAW,OAAO;AAChE;AASA,IAAM,UAA6B;AAAA,EACjC;AAAA,IACE,OAAO,CAAC,MAAM;AAAA,IACd,MAAM,YAAY;AAAA,OACf,MAAM,OAAO,mBAAe,GAC1B,aAAa,EACb,KAAK,MAAM,EACX;AAAA,QACC;AAAA,MACF;AAAA,IACJ;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,MAAM;AAAA,IACd,MAAM,YAAY;AAAA,OACf,MAAM,OAAO,mBAAe,GAC1B,aAAa,EACb,KAAK,MAAM,EACX;AAAA,QACC;AAAA,MACF;AAAA,IACJ;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,MAAM;AAAA,IACd,MAAM,YAAY;AAAA,OACf,MAAM,OAAO,mBAAe,GAC1B,aAAa,EACb,KAAK,MAAM,EACX;AAAA,QACC;AAAA,MACF;AAAA,IACJ;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,MAAM;AAAA,IACd,MAAM,YAAY;AAAA,OACf,MAAM,OAAO,mBAAe,GAC1B,aAAa,EACb,KAAK,MAAM,EACX;AAAA,QACC;AAAA,MACF;AAAA,IACJ;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,UAAU;AAAA,IAClB,MAAM,YAAY;AAAA,OACf,MAAM,OAAO,mBAAmB,GAC9B,aAAa,EACb,KAAK,UAAU,EACf;AAAA,Q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,aAAW,WAAW,QAAS,SAAQ,WAAW,OAAO;AACzD,SAAO;AACT;AAGO,SAAS,eAAiC;AAC/C,SAAO,MAAM,OAAO;AACtB;AAGO,SAAS,gBAAgB,MAA2C;AACzE,SAAO,MAAM,WAAW,IAAI,CAAC;AAC/B;AAEA,UAAU,YAAY,KAAK,MAAM,gBAAgB,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/cli.ts"],"sourcesContent":["/**\n * The `manni` CLI: one bin, one subcommand per tool in the family.\n *\n * Each tool builds its own commander program and is mounted here under its\n * name, so `manni meta validate …` is the metadata tool's `validate` with\n * nothing in between. The umbrella owns only what is common to all of them:\n * the name, the version, and the exit-code contract in `runProgram`.\n *\n * Tools land here one at a time, on their own branches; until one merges its\n * subcommand does not exist.\n *\n * Every domain is imported on demand. A domain's module graph is its whole\n * dependency tree (Playwright, axe, Asciidoctor, the RDF stack, ajv), and a\n * hook runs `manni check` after every edit, so the bin mounts only the domain\n * argv names. `--version` mounts none. Anything else (`--help`, a bare\n * `manni`, a typo) mounts them all, so help and \"unknown command\" read as\n * they always did.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../package.json\" with { type: \"json\" };\nimport { runIfMain } from \"./shared/run.js\";\nimport { registerTermLabelSource } from \"./shared/term-labels.js\";\n\n// `meta fill` offers the termbase's labels, but `manni meta fill` mounts only\n// the meta domain. So the umbrella registers the source, and the source loads\n// the term domain only when `fill` asks it for labels.\nregisterTermLabelSource(async (request) =>\n (await import(\"./term/commands/labels.js\")).termLabels(request),\n);\n\ninterface Domain {\n /** The command names the loader mounts, known before it is loaded. */\n names: readonly string[];\n load: () => Promise<Command[]>;\n}\n\n// In the order `manni --help` lists them.\nconst DOMAINS: readonly Domain[] = [\n {\n names: [\"meta\"],\n load: async () => [\n (await import(\"./meta/cli.js\"))\n .buildProgram()\n .name(\"meta\")\n .description(\n \"Validate, read, query and fill document metadata against JSON Schema\",\n ),\n ],\n },\n {\n names: [\"a11y\"],\n load: async () => [\n (await import(\"./a11y/cli.js\"))\n .buildProgram()\n .name(\"a11y\")\n .description(\n \"Crawl a site and check every page for accessibility violations with axe-core\",\n ),\n ],\n },\n {\n names: [\"cite\"],\n load: async () => [\n (await import(\"./cite/cli.js\"))\n .buildProgram()\n .name(\"cite\")\n .description(\n \"Track citations from doc claims to source lines and check them for drift\",\n ),\n ],\n },\n {\n names: [\"lint\"],\n load: async () => [\n (await import(\"./lint/cli.js\"))\n .buildProgram()\n .name(\"lint\")\n .description(\n \"Validate document structure against doctype templates, routed by a page's type\",\n ),\n ],\n },\n {\n names: [\"docevals\"],\n load: async () => [\n (await import(\"./docevals/cli.js\"))\n .buildProgram()\n .name(\"docevals\")\n .description(\n \"Deterministic and LLM-as-judge evals for documentation pages, driven by frontmatter\",\n ),\n ],\n },\n {\n names: [\"term\"],\n load: async () => [\n (await import(\"./term/index.js\"))\n .buildProgram()\n .name(\"term\")\n .description(\"Check, lint and render a docset's terms and the references into them\"),\n ],\n },\n {\n names: [\"strategy\"],\n load: async () => [\n (await import(\"./strategy/index.js\"))\n .buildProgram()\n .name(\"strategy\")\n .description(\"Check a docset's pages against its audiences, personas and journeys\"),\n ],\n },\n {\n names: [\"test\"],\n load: async () => [\n (await import(\"./test/cli.js\"))\n .buildProgram()\n .name(\"test\")\n .description(\"Run the docs' procedure tests, and have synthetic users attempt tasks in them\"),\n ],\n },\n {\n names: [\"graph\"],\n load: async () => [\n (await import(\"./graph/cli.js\"))\n .buildProgram()\n .name(\"graph\")\n .description(\n \"Deterministic knowledge graphs derived from documentation frontmatter and formatting\",\n ),\n ],\n },\n {\n names: [\"vector\"],\n load: async () => [\n (await import(\"./vector/cli.js\"))\n .buildProgram()\n .name(\"vector\")\n .description(\"Build and search embeddings of a docset's pages, keyed by graph node IRIs\"),\n ],\n },\n {\n names: [\"tracevals\"],\n load: async () => [\n (await import(\"./tracevals/cli.js\"))\n .buildProgram()\n .name(\"tracevals\")\n .description(\n \"Deterministic and LLM-as-judge adherence evals for AI agent session traces\",\n ),\n ],\n },\n // Not a tool but a family resource with verbs (proposal 0045).\n {\n names: [\"key\"],\n load: async () => [\n (await import(\"./key/cli.js\"))\n .buildProgram()\n .name(\"key\")\n .description(\"Set and rotate the family key that encrypted values are encrypted with.\"),\n ],\n },\n // The docs site, a family resource with verbs like `key` (proposal 0082).\n {\n names: [\"site\"],\n load: async () => [\n (await import(\"./site/cli.js\"))\n .buildProgram()\n .name(\"site\")\n .description(\"Start, build and preview the docs site\"),\n ],\n },\n // The two family verbs (proposal 0078), and the only verbs the umbrella\n // carries: each runs other domains' command cores and owns no checks.\n {\n names: [\"check\", \"status\"],\n load: async () => {\n const { buildCheck, buildStatus } = await import(\"./family/cli.js\");\n return [buildCheck(), buildStatus()];\n },\n },\n];\n\nconst VERSION_FLAGS = new Set([\"-V\", \"--version\"]);\n\n/**\n * The domains a run with these arguments (argv after the script) dispatches\n * to. The umbrella's only options are `--version` and `--help`, so the first\n * argument is one of them or the command commander will look up.\n */\nfunction domainsFor(args: readonly string[]): readonly Domain[] {\n const first = args[0];\n if (first === undefined) return DOMAINS;\n if (VERSION_FLAGS.has(first)) return [];\n const named = DOMAINS.find((d) => d.names.includes(first));\n return named === undefined ? DOMAINS : [named];\n}\n\nasync function mount(domains: readonly Domain[]): Promise<Command> {\n const mounted = (await Promise.all(domains.map((d) => d.load()))).flat();\n const metaCommands = new Set(\n mounted.find((c) => c.name() === \"meta\")?.commands.map((c) => c.name()),\n );\n\n const program = new Command();\n program\n .name(\"manni\")\n .description(\"Tools for documentation that is meant to be checked.\")\n .version(pkg.version, \"-V, --version\")\n // A pointer, not the whole help screen. Commander appends this after every\n // usage error, and the message that precedes it already names the problem.\n .showHelpAfterError(\"(add --help for usage)\")\n // MUST come before `addCommand`, which copies the exit callback into the\n // mounted program by value. See the same note in ./meta/cli.ts.\n .exitOverride()\n .configureOutput({\n outputError: (str, write) => {\n write(str);\n // `manni validate …` is the most likely thing a docmeta user types\n // first. Commander's \"unknown command\" is correct and unhelpful; say\n // where the command went.\n const m = /unknown command '([^']+)'/.exec(str);\n const name = m?.[1];\n if (name !== undefined && metaCommands.has(name)) {\n write(\n `(\\`${name}\\` is a metadata command: try \\`manni meta ${name}\\`)\\n`,\n );\n }\n },\n });\n\n for (const command of mounted) program.addCommand(command);\n return program;\n}\n\n/** The whole command tree, every domain mounted. */\nexport function buildProgram(): Promise<Command> {\n return mount(DOMAINS);\n}\n\n/** The tree a run with these arguments needs: the one domain they name, or all of them. */\nexport function buildProgramFor(args: readonly string[]): Promise<Command> {\n return mount(domainsFor(args));\n}\n\nrunIfMain(import.meta.url, () => buildProgramFor(process.argv.slice(2)));\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,SAAS,eAAe;AAQxB;AAAA,EAAwB,OAAO,aAC5B,MAAM,OAAO,sBAA2B,GAAG,WAAW,OAAO;AAChE;AASA,IAAM,UAA6B;AAAA,EACjC;AAAA,IACE,OAAO,CAAC,MAAM;AAAA,IACd,MAAM,YAAY;AAAA,OACf,MAAM,OAAO,mBAAe,GAC1B,aAAa,EACb,KAAK,MAAM,EACX;AAAA,QACC;AAAA,MACF;AAAA,IACJ;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,MAAM;AAAA,IACd,MAAM,YAAY;AAAA,OACf,MAAM,OAAO,mBAAe,GAC1B,aAAa,EACb,KAAK,MAAM,EACX;AAAA,QACC;AAAA,MACF;AAAA,IACJ;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,MAAM;AAAA,IACd,MAAM,YAAY;AAAA,OACf,MAAM,OAAO,mBAAe,GAC1B,aAAa,EACb,KAAK,MAAM,EACX;AAAA,QACC;AAAA,MACF;AAAA,IACJ;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,MAAM;AAAA,IACd,MAAM,YAAY;AAAA,OACf,MAAM,OAAO,mBAAe,GAC1B,aAAa,EACb,KAAK,MAAM,EACX;AAAA,QACC;AAAA,M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eAAe,EAGpC,mBAAmB,wBAAwB,EAG3C,aAAa,EACb,gBAAgB;AAAA,IACf,aAAa,CAAC,KAAK,UAAU;AAC3B,YAAM,GAAG;AAIT,YAAM,IAAI,4BAA4B,KAAK,GAAG;AAC9C,YAAM,OAAO,IAAI,CAAC;AAClB,UAAI,SAAS,UAAa,aAAa,IAAI,IAAI,GAAG;AAChD;AAAA,UACE,MAAM,IAAI,8CAA8C,IAAI;AAAA;AAAA,QAC9D;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AAEH,aAAW,WAAW,QAAS,SAAQ,WAAW,OAAO;AACzD,SAAO;AACT;AAGO,SAAS,eAAiC;AAC/C,SAAO,MAAM,OAAO;AACtB;AAGO,SAAS,gBAAgB,MAA2C;AACzE,SAAO,MAAM,WAAW,IAAI,CAAC;AAC/B;AAEA,UAAU,YAAY,KAAK,MAAM,gBAAgB,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC;","names":[]}
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
discoverConfig,
|
|
6
6
|
loadConfig,
|
|
7
7
|
parseConfig
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MSLBEN74.js";
|
|
9
9
|
import "./chunk-6WJUZQQX.js";
|
|
10
10
|
import "./chunk-NHOGTAPK.js";
|
|
11
11
|
import "./chunk-ZINZTHWO.js";
|
|
12
12
|
import "./chunk-YNHZHSSM.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-QMYR4OI5.js";
|
|
14
14
|
import "./chunk-HX44GB4Z.js";
|
|
15
15
|
import "./chunk-NVYDWVXN.js";
|
|
16
16
|
import "./chunk-OWBRDNRZ.js";
|
|
@@ -23,4 +23,4 @@ export {
|
|
|
23
23
|
loadConfig,
|
|
24
24
|
parseConfig
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=config-
|
|
26
|
+
//# sourceMappingURL=config-ISXGJ4XM.js.map
|
package/dist/docmeta.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
buildProgram
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5LLPUOYC.js";
|
|
5
|
+
import "./chunk-IFHB4QBS.js";
|
|
6
|
+
import "./chunk-2KCIETVY.js";
|
|
7
|
+
import "./chunk-C3WYV3L4.js";
|
|
8
8
|
import "./chunk-DSWKBZWW.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-RRXIIMKU.js";
|
|
10
10
|
import "./chunk-QK6VYJHV.js";
|
|
11
11
|
import "./chunk-RNVYGWIC.js";
|
|
12
12
|
import {
|
|
13
13
|
runIfMain
|
|
14
14
|
} from "./chunk-YEUYKR62.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-QMYR4OI5.js";
|
|
16
16
|
import "./chunk-HX44GB4Z.js";
|
|
17
17
|
import "./chunk-NVYDWVXN.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-CWDUIJJX.js";
|
|
19
19
|
import "./chunk-OWBRDNRZ.js";
|
|
20
20
|
import "./chunk-G3T47CFV.js";
|
|
21
21
|
import "./chunk-2H7UOFLK.js";
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
renderFindingsGithub
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-VQ3FZVNM.js";
|
|
5
|
+
import "./chunk-Q6INPRTC.js";
|
|
6
6
|
import "./chunk-BCRMMIY5.js";
|
|
7
7
|
import "./chunk-HMJZHUCJ.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-UMCTYM7L.js";
|
|
9
|
+
import "./chunk-J6QJ7T6M.js";
|
|
10
|
+
import "./chunk-IFHB4QBS.js";
|
|
11
|
+
import "./chunk-2KCIETVY.js";
|
|
12
|
+
import "./chunk-C3WYV3L4.js";
|
|
13
13
|
import "./chunk-DSWKBZWW.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-RRXIIMKU.js";
|
|
15
15
|
import "./chunk-77AINBYM.js";
|
|
16
16
|
import "./chunk-QK6VYJHV.js";
|
|
17
17
|
import "./chunk-RNVYGWIC.js";
|
|
18
18
|
import "./chunk-YEUYKR62.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-QMYR4OI5.js";
|
|
20
20
|
import "./chunk-HX44GB4Z.js";
|
|
21
21
|
import "./chunk-NVYDWVXN.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-CWDUIJJX.js";
|
|
23
23
|
import "./chunk-OWBRDNRZ.js";
|
|
24
24
|
import "./chunk-G3T47CFV.js";
|
|
25
25
|
import "./chunk-2H7UOFLK.js";
|
|
26
26
|
export {
|
|
27
27
|
renderFindingsGithub
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=github-
|
|
29
|
+
//# sourceMappingURL=github-IKC7EPZ6.js.map
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
renderFindingsGithub
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-KU7MRVTB.js";
|
|
5
|
+
import "./chunk-EESOMRVW.js";
|
|
6
|
+
import "./chunk-POPJ4INH.js";
|
|
7
7
|
import "./chunk-XTKJNRJ6.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-ZWL5ST2M.js";
|
|
9
9
|
import "./chunk-M77SIRUX.js";
|
|
10
10
|
import "./chunk-BXQLKOOR.js";
|
|
11
11
|
import "./chunk-JBOXCSTN.js";
|
|
12
12
|
import "./chunk-HMJZHUCJ.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-UMCTYM7L.js";
|
|
14
|
+
import "./chunk-J6QJ7T6M.js";
|
|
15
|
+
import "./chunk-IFHB4QBS.js";
|
|
16
|
+
import "./chunk-2KCIETVY.js";
|
|
17
|
+
import "./chunk-C3WYV3L4.js";
|
|
18
18
|
import "./chunk-DSWKBZWW.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-RRXIIMKU.js";
|
|
20
20
|
import "./chunk-77AINBYM.js";
|
|
21
21
|
import "./chunk-QK6VYJHV.js";
|
|
22
22
|
import "./chunk-RNVYGWIC.js";
|
|
23
23
|
import "./chunk-YEUYKR62.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-QMYR4OI5.js";
|
|
25
25
|
import "./chunk-HX44GB4Z.js";
|
|
26
26
|
import "./chunk-NVYDWVXN.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-CWDUIJJX.js";
|
|
28
28
|
import "./chunk-OWBRDNRZ.js";
|
|
29
29
|
import "./chunk-G3T47CFV.js";
|
|
30
30
|
import "./chunk-2H7UOFLK.js";
|
|
31
31
|
export {
|
|
32
32
|
renderFindingsGithub
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=github-
|
|
34
|
+
//# sourceMappingURL=github-LUJDHQRN.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
NAMES_ITS_SUBJECT,
|
|
4
|
+
findingMessage,
|
|
5
|
+
renderCheckGithub
|
|
6
|
+
} from "./chunk-3AB4UPAH.js";
|
|
7
|
+
import "./chunk-3WUATOHK.js";
|
|
8
|
+
import "./chunk-ZIXRI5XY.js";
|
|
9
|
+
import "./chunk-7PMYQS5K.js";
|
|
10
|
+
import "./chunk-KJOF3TAE.js";
|
|
11
|
+
import "./chunk-2EA6MOCN.js";
|
|
12
|
+
import "./chunk-IPS3B5WV.js";
|
|
13
|
+
import "./chunk-HD4IZVVX.js";
|
|
14
|
+
import "./chunk-KU7MRVTB.js";
|
|
15
|
+
import "./chunk-SVUF42MI.js";
|
|
16
|
+
import "./chunk-OILHKIBL.js";
|
|
17
|
+
import "./chunk-EESOMRVW.js";
|
|
18
|
+
import "./chunk-POPJ4INH.js";
|
|
19
|
+
import "./chunk-XTKJNRJ6.js";
|
|
20
|
+
import "./chunk-ZWL5ST2M.js";
|
|
21
|
+
import "./chunk-M77SIRUX.js";
|
|
22
|
+
import "./chunk-DVHVNTP7.js";
|
|
23
|
+
import "./chunk-BXQLKOOR.js";
|
|
24
|
+
import "./chunk-JBOXCSTN.js";
|
|
25
|
+
import "./chunk-HMJZHUCJ.js";
|
|
26
|
+
import "./chunk-UMCTYM7L.js";
|
|
27
|
+
import "./chunk-J6QJ7T6M.js";
|
|
28
|
+
import "./chunk-IFHB4QBS.js";
|
|
29
|
+
import "./chunk-2KCIETVY.js";
|
|
30
|
+
import "./chunk-C3WYV3L4.js";
|
|
31
|
+
import "./chunk-DSWKBZWW.js";
|
|
32
|
+
import "./chunk-RRXIIMKU.js";
|
|
33
|
+
import "./chunk-77AINBYM.js";
|
|
34
|
+
import "./chunk-QK6VYJHV.js";
|
|
35
|
+
import "./chunk-RNVYGWIC.js";
|
|
36
|
+
import "./chunk-YEUYKR62.js";
|
|
37
|
+
import "./chunk-QMYR4OI5.js";
|
|
38
|
+
import "./chunk-HX44GB4Z.js";
|
|
39
|
+
import "./chunk-NVYDWVXN.js";
|
|
40
|
+
import "./chunk-CWDUIJJX.js";
|
|
41
|
+
import "./chunk-OWBRDNRZ.js";
|
|
42
|
+
import "./chunk-G3T47CFV.js";
|
|
43
|
+
import "./chunk-2H7UOFLK.js";
|
|
44
|
+
export {
|
|
45
|
+
NAMES_ITS_SUBJECT,
|
|
46
|
+
findingMessage,
|
|
47
|
+
renderCheckGithub
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=github-Z6S7HS6X.js.map
|
package/dist/graph/embed.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ declare class EmbedderUnavailableError extends Error {
|
|
|
117
117
|
* **Constructing it is the expensive step**: `pipeline()` fetches the model's
|
|
118
118
|
* config and weights (tens of megabytes on a cold cache) and builds the ONNX
|
|
119
119
|
* session before returning, so callers that may not need to embed anything —
|
|
120
|
-
* `manni
|
|
120
|
+
* `manni vector build` on an all-cache-hit run — should construct it lazily.
|
|
121
121
|
*/
|
|
122
122
|
declare function createLocalEmbedder(options?: LocalEmbedderOptions): Promise<Embedder>;
|
|
123
123
|
|
package/dist/graph/embed.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shared/errors.ts","../../src/graph/embed/types.ts","../../src/graph/embed/local.ts","../../src/graph/embed/mock.ts"],"sourcesContent":["/**\n * The error every tool under the umbrella throws for an operational failure.\n *\n * Each tool keeps its own subclass (`DocmetaError`, …) so its tests and\n * library callers can match on it. The base is what the shared bin runner\n * matches on: a `ToolError` is reported as one line and exit 2, anything else\n * is a bug and keeps its stack trace.\n */\nexport class ToolError extends Error {\n /** clig.dev: 2 is operational/usage; 1 is reserved for findings. */\n readonly exitCode: number = 2;\n\n constructor(message: string) {\n super(message);\n this.name = \"ToolError\";\n }\n}\n\n/**\n * The message a caught value carries, whatever was thrown.\n *\n * JavaScript can throw anything, so `(err as Error).message` is `undefined`\n * for a thrown string, number or `null`, and \"undefined\" is what the user\n * reads. An Error, or anything with a string `message`, gives that message.\n * A string is its own message, and so is a number or a bigint, as `String()`\n * writes it: JSON would turn `NaN` and the infinities into `null`. Anything\n * else gives its JSON text, or its `String()` form when it will not\n * serialise.\n */\nexport function errorMessage(err: unknown): string {\n if (err instanceof Error) return err.message;\n if (typeof err === \"string\") return err;\n // Before the JSON step, which writes NaN and the infinities as \"null\" and\n // throws on a bigint.\n if (typeof err === \"number\" || typeof err === \"bigint\") return String(err);\n if (\n typeof err === \"object\" &&\n err !== null &&\n \"message\" in err &&\n typeof err.message === \"string\"\n ) {\n return err.message;\n }\n try {\n // Typed as returning a string, but `undefined`, a function or a symbol\n // gives `undefined`.\n const json = JSON.stringify(err) as string | undefined;\n if (json !== undefined) return json;\n } catch {\n // A cycle, or a bigint inside an object: fall through to the one form\n // that always exists.\n }\n return String(err);\n}\n","/**\n * The embedder seam (ADR 01020). Platform-neutral and dependency-free, so the\n * runtime and the CLI can both speak it without either pulling in a model.\n *\n * Everything that computes embeddings — the local transformers.js embedder, the\n * deterministic mock, or a host's own — implements `Embedder`.\n */\n\nexport interface Embedder {\n /** Stable identity of the model; recorded in the sidecar header. */\n readonly model: string;\n /** Weight quantization the vectors were produced under. */\n readonly dtype: string;\n /** Output dimensions. Never assumed by callers — always read from here. */\n readonly dims: number;\n /**\n * Embed one text. Single-text rather than batched **on purpose**: float\n * addition is not associative, so a batched vector depends on what it was\n * batched with, and adding one document would perturb its neighbours' vectors\n * (ADR 01020). Determinism is worth more here than throughput.\n */\n embed(text: string): Promise<Float32Array>;\n}\n\n/**\n * A model's quirks, applied on both the build and query sides so a user cannot\n * get them wrong. Some models require a prefix on queries and/or passages and\n * degrade *silently* without it.\n */\nexport interface ModelProfile {\n /** Hugging Face repo id. */\n id: string;\n /** Prepended when embedding a search query. */\n queryPrefix?: string;\n /** Prepended when embedding indexed content. */\n passagePrefix?: string;\n /** Human note surfaced in docs and `--help`. */\n note?: string;\n}\n\n/** What a text is being embedded *for* — decides which prefix applies. */\nexport type EmbedRole = \"query\" | \"passage\";\n\n/**\n * Models dockg has been tested against. This is the *tested* set, not the\n * permitted set: `embed.model` accepts any id, and an unknown one is used\n * as-is with no prefixes.\n */\n/**\n * The default, named rather than found at index 0: `DEFAULT_MODEL` below then\n * reads it directly instead of asserting that the list has a first element.\n */\nconst DEFAULT_PROFILE: ModelProfile = {\n id: \"onnx-community/granite-embedding-small-english-r2-ONNX\",\n note: \"Default. 384-d, 8192-token context so sections are never truncated; no prefixes.\",\n};\n\nexport const MODEL_PROFILES: readonly ModelProfile[] = [\n DEFAULT_PROFILE,\n {\n id: \"Xenova/gte-small\",\n note: \"Lighter (~34 MB). 384-d, 512-token context; no prefixes.\",\n },\n {\n id: \"Xenova/bge-small-en-v1.5\",\n queryPrefix: \"Represent this sentence for searching relevant passages: \",\n note: \"384-d. Needs a query prefix — applied automatically here, since omitting it degrades retrieval silently.\",\n },\n {\n id: \"Xenova/all-MiniLM-L6-v2\",\n note: \"Smallest (~23 MB) but truncates at 256 wordpieces (~190 words), so long sections lose their tail.\",\n },\n];\n\nexport const DEFAULT_MODEL = DEFAULT_PROFILE.id;\n\n/** The profile for a model id, or a bare profile when it is not a tested one. */\nexport function profileFor(id: string): ModelProfile {\n return MODEL_PROFILES.find((p) => p.id === id) ?? { id };\n}\n\n/** Apply the model's prefix convention for the role, if it has one. */\nexport function withPrefix(\n profile: ModelProfile,\n role: EmbedRole,\n text: string,\n): string {\n const prefix = role === \"query\" ? profile.queryPrefix : profile.passagePrefix;\n return prefix ? `${prefix}${text}` : text;\n}\n","/**\n * The local embedder ([ADR 01020](../../adrs/01020-local-embeddings.md), corrected\n * by [ADR 01025](../../adrs/01025-embedder-cross-platform-reality.md)).\n *\n * Node and the browser **do not** run the same implementation, and cannot be made\n * to. transformers.js v4 takes disjoint `device` vocabularies per platform — Node\n * accepts `dml | webgpu | cpu`, the browser accepts `webgpu | wasm` — so no single\n * value selects one backend everywhere. An earlier version of this file forced\n * `device: \"wasm\"`, which threw on every real Node run; see ADR 01025 for the\n * measurements.\n *\n * What that costs, measured on granite q8: Node native vs browser WASM agree to\n * cosine 0.999914 (max component diff 2.2e-3). dockg's guarantee is therefore\n * **ranking agreement**, gated by `test/real/cross-platform.mjs`, not float\n * equality.\n *\n * Three disciplines are real and pinned here:\n *\n * 1. `numThreads = 1` — binds on the WASM side, where the default follows\n * `hardwareConcurrency` and would vary reduction splits per machine. Inert\n * on the Node side, whose env object does not carry it.\n * 2. `dtype: \"q8\"` — int8 GEMM accumulates in int32, and integer addition is\n * associative.\n * 3. One text per call — a batched vector depends on what it was batched with,\n * so adding a document would perturb its neighbours.\n *\n * `device` is deliberately **not** passed: transformers.js then picks its platform\n * default, which in Node is bit-identical to an explicit `cpu` (measured) and in\n * the browser is WASM. A caller wanting `webgpu` can pass it.\n *\n * `@huggingface/transformers` is an **optional peer dependency**, imported\n * dynamically: it hard-depends on both ONNX runtimes plus native `sharp`, and\n * most dockg users never enable embeddings. Behind this subpath, a consumer who\n * never imports `@hawkeyexl/manni/graph/embed` never resolves it.\n */\nimport { errorMessage } from \"../../shared/errors.js\";\nimport {\n profileFor,\n withPrefix,\n type EmbedRole,\n type Embedder,\n type ModelProfile,\n} from \"./types.js\";\nimport { DEFAULT_MODEL } from \"./types.js\";\n\n/**\n * A built feature-extraction pipeline, as this module calls it.\n *\n * One text, mean-pooled and normalized (disciplines 2 and 3 above), returning\n * something array-like of numbers. `Tensor` carries far more than that; naming\n * only what is read keeps the peer's real type out of the build.\n */\nexport type FeatureExtractionPipeline = (\n text: string,\n options: { pooling: \"mean\"; normalize: boolean },\n) => Promise<{ data: ArrayLike<number> }>;\n\n/**\n * The slice of `@huggingface/transformers` this module touches.\n *\n * The package is an **optional peer**, so importing its types would make it a\n * hard dependency for everyone — the thing the dynamic import exists to avoid.\n * Declaring the used surface here instead keeps the boundary narrow rather\n * than untyped: three members, each one a line the code below actually runs.\n * `env` is optional all the way down because the Node build's\n * `backends.onnx.wasm` may be absent or a stub, which is the mistake ADR 01025\n * documents.\n */\nexport interface TransformersModule {\n env?: {\n backends?: {\n onnx?: { wasm?: { numThreads?: number } };\n };\n };\n pipeline: (\n task: \"feature-extraction\",\n model: string,\n options: { device?: string; dtype: string },\n ) => Promise<FeatureExtractionPipeline>;\n}\n\nexport interface LocalEmbedderOptions {\n /** Hugging Face model id. Any id is accepted; the tested set is documented. */\n model?: string;\n /** Weight quantization. Default `q8` — see discipline 2 above. */\n dtype?: string;\n /**\n * ONNX execution provider. **Omitted by default on purpose** — the accepted\n * values differ by platform (Node: `dml | webgpu | cpu`; browser: `webgpu |\n * wasm`), so any hardcoded value throws somewhere. Pass one only if you know\n * which platform this embedder runs on.\n */\n device?: string;\n /**\n * What these embeddings are for. Decides which prefix convention applies for\n * models that need one. Default \"passage\" (indexing); the query side passes\n * \"query\".\n */\n role?: EmbedRole;\n /**\n * Inject the transformers.js module (tests, or a host that already imported\n * it). Absent, it is imported dynamically.\n */\n transformers?: TransformersModule;\n}\n\n/** Thrown when the optional peer is not installed, with the fix in the message. */\nexport class EmbedderUnavailableError extends Error {\n constructor(detail: string) {\n super(\n `Local embeddings need @huggingface/transformers, which is an optional peer dependency.\\n` +\n ` Install it: npm install @huggingface/transformers\\n` +\n ` (${detail})`,\n );\n this.name = \"EmbedderUnavailableError\";\n }\n}\n\nasync function loadTransformers(\n injected?: TransformersModule,\n): Promise<TransformersModule> {\n if (injected) return injected;\n try {\n // A literal specifier, so a consumer's bundler can resolve and chunk it\n // normally when they *have* opted in. Nothing is lost by leaving it\n // untyped: this boundary is untyped by design (see the note above), and\n // the missing-package path is what the catch handles.\n //\n // `@ts-ignore`, not `@ts-expect-error`, precisely because whether this\n // line errors depends on whether the optional peer happens to be\n // installed. `@ts-expect-error` fails with TS2578 (\"unused directive\") the\n // moment someone follows the README and installs it — which is exactly\n // what the `embed-real` CI job does, and how this was caught.\n // @ts-ignore optional peer dependency, may or may not be installed\n return (await import(\"@huggingface/transformers\")) as TransformersModule;\n } catch (e) {\n throw new EmbedderUnavailableError(\n errorMessage(e),\n );\n }\n}\n\n/**\n * Create an embedder backed by a local model.\n *\n * **Constructing it is the expensive step**: `pipeline()` fetches the model's\n * config and weights (tens of megabytes on a cold cache) and builds the ONNX\n * session before returning, so callers that may not need to embed anything —\n * `manni graph embed` on an all-cache-hit run — should construct it lazily.\n */\nexport async function createLocalEmbedder(\n options: LocalEmbedderOptions = {},\n): Promise<Embedder> {\n const model = options.model ?? DEFAULT_MODEL;\n const dtype = options.dtype ?? \"q8\";\n const role: EmbedRole = options.role ?? \"passage\";\n const profile: ModelProfile = profileFor(model);\n\n const transformers = await loadTransformers(options.transformers);\n\n // Discipline 1, set before the pipeline is built. Optional-chained because\n // the Node build's `env.backends.onnx.wasm` may be absent or a stub — this\n // pins the browser side, and asserting it pinned both is the mistake ADR\n // 01025 documents.\n if (transformers.env?.backends?.onnx?.wasm) {\n transformers.env.backends.onnx.wasm.numThreads = 1;\n }\n\n const extractor = await transformers.pipeline(\"feature-extraction\", model, {\n // No `device`: its accepted values are disjoint across platforms, so any\n // hardcoded choice throws on one of them (ADR 01025).\n ...(options.device === undefined ? {} : { device: options.device }),\n dtype,\n });\n\n let dims = 0;\n\n return {\n model,\n dtype,\n get dims() {\n return dims;\n },\n async embed(text: string): Promise<Float32Array> {\n // Discipline 3: one text per call, never a batch.\n const output = await extractor(withPrefix(profile, role, text), {\n pooling: \"mean\",\n normalize: true,\n });\n const data = Float32Array.from(output.data);\n dims = data.length;\n return data;\n },\n };\n}\n","/**\n * A deterministic offline embedder (ADR 01020) — the counterpart to\n * `MockProvider` for the LLM seam.\n *\n * CI must stay hermetic: real embedding downloads tens of megabytes of model\n * weights, which the no-network rule forbids. This produces vectors from a hash\n * of the text, so they are stable across runs, machines, and platforms — which\n * makes the `vectors.bin` golden and the double-build determinism gate possible\n * without a model.\n *\n * The vectors carry no semantics. They are useful for testing plumbing,\n * ordering, and refusal paths — never for judging retrieval quality.\n *\n * Platform-neutral: no `node:` imports, no dependencies.\n */\nimport type { Embedder } from \"./types.js\";\n\n/** FNV-1a, 32-bit. Small, fast, and identical everywhere. */\nfunction fnv1a(text: string, seed: number): number {\n let hash = (0x81_1c_9d_c5 ^ seed) >>> 0;\n for (let i = 0; i < text.length; i++) {\n hash = (hash ^ text.charCodeAt(i)) >>> 0;\n // hash *= 16777619, via shifts to stay in 32-bit integer range.\n hash =\n (hash +\n ((hash << 1) +\n (hash << 4) +\n (hash << 7) +\n (hash << 8) +\n (hash << 24))) >>>\n 0;\n }\n return hash >>> 0;\n}\n\nexport interface MockEmbedderOptions {\n /** Output dimensions. Default 8 — small keeps fixtures readable. */\n dims?: number;\n /** Reported model id. Default \"mock\". */\n model?: string;\n /** Reported dtype. Default \"mock\". */\n dtype?: string;\n}\n\n/**\n * Build a deterministic embedder. The same text always yields the same vector;\n * different texts yield different ones with high probability.\n */\nexport function createMockEmbedder(\n options: MockEmbedderOptions = {},\n): Embedder {\n const dims = options.dims ?? 8;\n const model = options.model ?? \"mock\";\n const dtype = options.dtype ?? \"mock\";\n\n return {\n model,\n dtype,\n dims,\n embed(text: string): Promise<Float32Array> {\n const vector = new Float32Array(dims);\n for (let i = 0; i < dims; i++) {\n // Map each hash into [-1, 1) so vectors spread over the sphere rather\n // than crowding one orthant.\n vector[i] = (fnv1a(text, i) / 0x1_00_00_00_00) * 2 - 1;\n }\n return Promise.resolve(vector);\n },\n };\n}\n"],"mappings":";AA6BO,SAAS,aAAa,KAAsB;AACjD,MAAI,eAAe,MAAO,QAAO,IAAI;AACrC,MAAI,OAAO,QAAQ,SAAU,QAAO;AAGpC,MAAI,OAAO,QAAQ,YAAY,OAAO,QAAQ,SAAU,QAAO,OAAO,GAAG;AACzE,MACE,OAAO,QAAQ,YACf,QAAQ,QACR,aAAa,OACb,OAAO,IAAI,YAAY,UACvB;AACA,WAAO,IAAI;AAAA,EACb;AACA,MAAI;AAGF,UAAM,OAAO,KAAK,UAAU,GAAG;AAC/B,QAAI,SAAS,OAAW,QAAO;AAAA,EACjC,QAAQ;AAAA,EAGR;AACA,SAAO,OAAO,GAAG;AACnB;;;ACDA,IAAM,kBAAgC;AAAA,EACpC,IAAI;AAAA,EACJ,MAAM;AACR;AAEO,IAAM,iBAA0C;AAAA,EACrD;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,EACR;AA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AI,OAAO;AAEX,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,IAAI,OAAO;AACT,aAAO;AAAA,IACT;AAAA,IACA,MAAM,MAAM,MAAqC;AAE/C,YAAM,SAAS,MAAM,UAAU,WAAW,SAAS,MAAM,IAAI,GAAG;AAAA,QAC9D,SAAS;AAAA,QACT,WAAW;AAAA,MACb,CAAC;AACD,YAAM,OAAO,aAAa,KAAK,OAAO,IAAI;AAC1C,aAAO,KAAK;AACZ,aAAO;AAAA,IACT;AAAA,EACF;AACF;;;AChLA,SAAS,MAAM,MAAc,MAAsB;AACjD,MAAI,QAAQ,aAAgB,UAAU;AACtC,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,YAAQ,OAAO,KAAK,WAAW,CAAC,OAAO;AAEvC,WACG,SACG,QAAQ,MACP,QAAQ,MACR,QAAQ,MACR,QAAQ,MACR,QAAQ,SACb;AAAA,EACJ;AACA,SAAO,SAAS;AAClB;AAeO,SAAS,mBACd,UAA+B,CAAC,GACtB;AACV,QAAM,OAAO,QAAQ,QAAQ;AAC7B,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,QAAQ,QAAQ,SAAS;AAE/B,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM,MAAqC;AACzC,YAAM,SAAS,IAAI,aAAa,IAAI;AACpC,eAAS,IAAI,GAAG,IAAI,MAAM,KAAK;AAG7B,eAAO,CAAC,IAAK,MAAM,MAAM,CAAC,IAAI,aAAmB,IAAI;AAAA,MACvD;AACA,aAAO,QAAQ,QAAQ,MAAM;AAAA,IAC/B;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/shared/errors.ts","../../src/graph/embed/types.ts","../../src/graph/embed/local.ts","../../src/graph/embed/mock.ts"],"sourcesContent":["/**\n * The error every tool under the umbrella throws for an operational failure.\n *\n * Each tool keeps its own subclass (`DocmetaError`, …) so its tests and\n * library callers can match on it. The base is what the shared bin runner\n * matches on: a `ToolError` is reported as one line and exit 2, anything else\n * is a bug and keeps its stack trace.\n */\nexport class ToolError extends Error {\n /** clig.dev: 2 is operational/usage; 1 is reserved for findings. */\n readonly exitCode: number = 2;\n\n constructor(message: string) {\n super(message);\n this.name = \"ToolError\";\n }\n}\n\n/**\n * The message a caught value carries, whatever was thrown.\n *\n * JavaScript can throw anything, so `(err as Error).message` is `undefined`\n * for a thrown string, number or `null`, and \"undefined\" is what the user\n * reads. An Error, or anything with a string `message`, gives that message.\n * A string is its own message, and so is a number or a bigint, as `String()`\n * writes it: JSON would turn `NaN` and the infinities into `null`. Anything\n * else gives its JSON text, or its `String()` form when it will not\n * serialise.\n */\nexport function errorMessage(err: unknown): string {\n if (err instanceof Error) return err.message;\n if (typeof err === \"string\") return err;\n // Before the JSON step, which writes NaN and the infinities as \"null\" and\n // throws on a bigint.\n if (typeof err === \"number\" || typeof err === \"bigint\") return String(err);\n if (\n typeof err === \"object\" &&\n err !== null &&\n \"message\" in err &&\n typeof err.message === \"string\"\n ) {\n return err.message;\n }\n try {\n // Typed as returning a string, but `undefined`, a function or a symbol\n // gives `undefined`.\n const json = JSON.stringify(err) as string | undefined;\n if (json !== undefined) return json;\n } catch {\n // A cycle, or a bigint inside an object: fall through to the one form\n // that always exists.\n }\n return String(err);\n}\n","/**\n * The embedder seam (ADR 01020). Platform-neutral and dependency-free, so the\n * runtime and the CLI can both speak it without either pulling in a model.\n *\n * Everything that computes embeddings — the local transformers.js embedder, the\n * deterministic mock, or a host's own — implements `Embedder`.\n */\n\nexport interface Embedder {\n /** Stable identity of the model; recorded in the sidecar header. */\n readonly model: string;\n /** Weight quantization the vectors were produced under. */\n readonly dtype: string;\n /** Output dimensions. Never assumed by callers — always read from here. */\n readonly dims: number;\n /**\n * Embed one text. Single-text rather than batched **on purpose**: float\n * addition is not associative, so a batched vector depends on what it was\n * batched with, and adding one document would perturb its neighbours' vectors\n * (ADR 01020). Determinism is worth more here than throughput.\n */\n embed(text: string): Promise<Float32Array>;\n}\n\n/**\n * A model's quirks, applied on both the build and query sides so a user cannot\n * get them wrong. Some models require a prefix on queries and/or passages and\n * degrade *silently* without it.\n */\nexport interface ModelProfile {\n /** Hugging Face repo id. */\n id: string;\n /** Prepended when embedding a search query. */\n queryPrefix?: string;\n /** Prepended when embedding indexed content. */\n passagePrefix?: string;\n /** Human note surfaced in docs and `--help`. */\n note?: string;\n}\n\n/** What a text is being embedded *for* — decides which prefix applies. */\nexport type EmbedRole = \"query\" | \"passage\";\n\n/**\n * Models dockg has been tested against. This is the *tested* set, not the\n * permitted set: `vector.model` accepts any id, and an unknown one is used\n * as-is with no prefixes.\n */\n/**\n * The default, named rather than found at index 0: `DEFAULT_MODEL` below then\n * reads it directly instead of asserting that the list has a first element.\n */\nconst DEFAULT_PROFILE: ModelProfile = {\n id: \"onnx-community/granite-embedding-small-english-r2-ONNX\",\n note: \"Default. 384-d, 8192-token context so sections are never truncated; no prefixes.\",\n};\n\nexport const MODEL_PROFILES: readonly ModelProfile[] = [\n DEFAULT_PROFILE,\n {\n id: \"Xenova/gte-small\",\n note: \"Lighter (~34 MB). 384-d, 512-token context; no prefixes.\",\n },\n {\n id: \"Xenova/bge-small-en-v1.5\",\n queryPrefix: \"Represent this sentence for searching relevant passages: \",\n note: \"384-d. Needs a query prefix — applied automatically here, since omitting it degrades retrieval silently.\",\n },\n {\n id: \"Xenova/all-MiniLM-L6-v2\",\n note: \"Smallest (~23 MB) but truncates at 256 wordpieces (~190 words), so long sections lose their tail.\",\n },\n];\n\nexport const DEFAULT_MODEL = DEFAULT_PROFILE.id;\n\n/** The profile for a model id, or a bare profile when it is not a tested one. */\nexport function profileFor(id: string): ModelProfile {\n return MODEL_PROFILES.find((p) => p.id === id) ?? { id };\n}\n\n/** Apply the model's prefix convention for the role, if it has one. */\nexport function withPrefix(\n profile: ModelProfile,\n role: EmbedRole,\n text: string,\n): string {\n const prefix = role === \"query\" ? profile.queryPrefix : profile.passagePrefix;\n return prefix ? `${prefix}${text}` : text;\n}\n","/**\n * The local embedder ([ADR 01020](../../adrs/01020-local-embeddings.md), corrected\n * by [ADR 01025](../../adrs/01025-embedder-cross-platform-reality.md)).\n *\n * Node and the browser **do not** run the same implementation, and cannot be made\n * to. transformers.js v4 takes disjoint `device` vocabularies per platform — Node\n * accepts `dml | webgpu | cpu`, the browser accepts `webgpu | wasm` — so no single\n * value selects one backend everywhere. An earlier version of this file forced\n * `device: \"wasm\"`, which threw on every real Node run; see ADR 01025 for the\n * measurements.\n *\n * What that costs, measured on granite q8: Node native vs browser WASM agree to\n * cosine 0.999914 (max component diff 2.2e-3). dockg's guarantee is therefore\n * **ranking agreement**, gated by `test/real/cross-platform.mjs`, not float\n * equality.\n *\n * Three disciplines are real and pinned here:\n *\n * 1. `numThreads = 1` — binds on the WASM side, where the default follows\n * `hardwareConcurrency` and would vary reduction splits per machine. Inert\n * on the Node side, whose env object does not carry it.\n * 2. `dtype: \"q8\"` — int8 GEMM accumulates in int32, and integer addition is\n * associative.\n * 3. One text per call — a batched vector depends on what it was batched with,\n * so adding a document would perturb its neighbours.\n *\n * `device` is deliberately **not** passed: transformers.js then picks its platform\n * default, which in Node is bit-identical to an explicit `cpu` (measured) and in\n * the browser is WASM. A caller wanting `webgpu` can pass it.\n *\n * `@huggingface/transformers` is an **optional peer dependency**, imported\n * dynamically: it hard-depends on both ONNX runtimes plus native `sharp`, and\n * most dockg users never enable embeddings. Behind this subpath, a consumer who\n * never imports `@hawkeyexl/manni/graph/embed` never resolves it.\n */\nimport { errorMessage } from \"../../shared/errors.js\";\nimport {\n profileFor,\n withPrefix,\n type EmbedRole,\n type Embedder,\n type ModelProfile,\n} from \"./types.js\";\nimport { DEFAULT_MODEL } from \"./types.js\";\n\n/**\n * A built feature-extraction pipeline, as this module calls it.\n *\n * One text, mean-pooled and normalized (disciplines 2 and 3 above), returning\n * something array-like of numbers. `Tensor` carries far more than that; naming\n * only what is read keeps the peer's real type out of the build.\n */\nexport type FeatureExtractionPipeline = (\n text: string,\n options: { pooling: \"mean\"; normalize: boolean },\n) => Promise<{ data: ArrayLike<number> }>;\n\n/**\n * The slice of `@huggingface/transformers` this module touches.\n *\n * The package is an **optional peer**, so importing its types would make it a\n * hard dependency for everyone — the thing the dynamic import exists to avoid.\n * Declaring the used surface here instead keeps the boundary narrow rather\n * than untyped: three members, each one a line the code below actually runs.\n * `env` is optional all the way down because the Node build's\n * `backends.onnx.wasm` may be absent or a stub, which is the mistake ADR 01025\n * documents.\n */\nexport interface TransformersModule {\n env?: {\n backends?: {\n onnx?: { wasm?: { numThreads?: number } };\n };\n };\n pipeline: (\n task: \"feature-extraction\",\n model: string,\n options: { device?: string; dtype: string },\n ) => Promise<FeatureExtractionPipeline>;\n}\n\nexport interface LocalEmbedderOptions {\n /** Hugging Face model id. Any id is accepted; the tested set is documented. */\n model?: string;\n /** Weight quantization. Default `q8` — see discipline 2 above. */\n dtype?: string;\n /**\n * ONNX execution provider. **Omitted by default on purpose** — the accepted\n * values differ by platform (Node: `dml | webgpu | cpu`; browser: `webgpu |\n * wasm`), so any hardcoded value throws somewhere. Pass one only if you know\n * which platform this embedder runs on.\n */\n device?: string;\n /**\n * What these embeddings are for. Decides which prefix convention applies for\n * models that need one. Default \"passage\" (indexing); the query side passes\n * \"query\".\n */\n role?: EmbedRole;\n /**\n * Inject the transformers.js module (tests, or a host that already imported\n * it). Absent, it is imported dynamically.\n */\n transformers?: TransformersModule;\n}\n\n/** Thrown when the optional peer is not installed, with the fix in the message. */\nexport class EmbedderUnavailableError extends Error {\n constructor(detail: string) {\n super(\n `Local embeddings need @huggingface/transformers, which is an optional peer dependency.\\n` +\n ` Install it: npm install @huggingface/transformers\\n` +\n ` (${detail})`,\n );\n this.name = \"EmbedderUnavailableError\";\n }\n}\n\nasync function loadTransformers(\n injected?: TransformersModule,\n): Promise<TransformersModule> {\n if (injected) return injected;\n try {\n // A literal specifier, so a consumer's bundler can resolve and chunk it\n // normally when they *have* opted in. Nothing is lost by leaving it\n // untyped: this boundary is untyped by design (see the note above), and\n // the missing-package path is what the catch handles.\n //\n // `@ts-ignore`, not `@ts-expect-error`, precisely because whether this\n // line errors depends on whether the optional peer happens to be\n // installed. `@ts-expect-error` fails with TS2578 (\"unused directive\") the\n // moment someone follows the README and installs it — which is exactly\n // what the `embed-real` CI job does, and how this was caught.\n // @ts-ignore optional peer dependency, may or may not be installed\n return (await import(\"@huggingface/transformers\")) as TransformersModule;\n } catch (e) {\n throw new EmbedderUnavailableError(\n errorMessage(e),\n );\n }\n}\n\n/**\n * Create an embedder backed by a local model.\n *\n * **Constructing it is the expensive step**: `pipeline()` fetches the model's\n * config and weights (tens of megabytes on a cold cache) and builds the ONNX\n * session before returning, so callers that may not need to embed anything —\n * `manni vector build` on an all-cache-hit run — should construct it lazily.\n */\nexport async function createLocalEmbedder(\n options: LocalEmbedderOptions = {},\n): Promise<Embedder> {\n const model = options.model ?? DEFAULT_MODEL;\n const dtype = options.dtype ?? \"q8\";\n const role: EmbedRole = options.role ?? \"passage\";\n const profile: ModelProfile = profileFor(model);\n\n const transformers = await loadTransformers(options.transformers);\n\n // Discipline 1, set before the pipeline is built. Optional-chained because\n // the Node build's `env.backends.onnx.wasm` may be absent or a stub — this\n // pins the browser side, and asserting it pinned both is the mistake ADR\n // 01025 documents.\n if (transformers.env?.backends?.onnx?.wasm) {\n transformers.env.backends.onnx.wasm.numThreads = 1;\n }\n\n const extractor = await transformers.pipeline(\"feature-extraction\", model, {\n // No `device`: its accepted values are disjoint across platforms, so any\n // hardcoded choice throws on one of them (ADR 01025).\n ...(options.device === undefined ? {} : { device: options.device }),\n dtype,\n });\n\n let dims = 0;\n\n return {\n model,\n dtype,\n get dims() {\n return dims;\n },\n async embed(text: string): Promise<Float32Array> {\n // Discipline 3: one text per call, never a batch.\n const output = await extractor(withPrefix(profile, role, text), {\n pooling: \"mean\",\n normalize: true,\n });\n const data = Float32Array.from(output.data);\n dims = data.length;\n return data;\n },\n };\n}\n","/**\n * A deterministic offline embedder (ADR 01020) — the counterpart to\n * `MockProvider` for the LLM seam.\n *\n * CI must stay hermetic: real embedding downloads tens of megabytes of model\n * weights, which the no-network rule forbids. This produces vectors from a hash\n * of the text, so they are stable across runs, machines, and platforms — which\n * makes the `vectors.bin` golden and the double-build determinism gate possible\n * without a model.\n *\n * The vectors carry no semantics. They are useful for testing plumbing,\n * ordering, and refusal paths — never for judging retrieval quality.\n *\n * Platform-neutral: no `node:` imports, no dependencies.\n */\nimport type { Embedder } from \"./types.js\";\n\n/** FNV-1a, 32-bit. Small, fast, and identical everywhere. */\nfunction fnv1a(text: string, seed: number): number {\n let hash = (0x81_1c_9d_c5 ^ seed) >>> 0;\n for (let i = 0; i < text.length; i++) {\n hash = (hash ^ text.charCodeAt(i)) >>> 0;\n // hash *= 16777619, via shifts to stay in 32-bit integer range.\n hash =\n (hash +\n ((hash << 1) +\n (hash << 4) +\n (hash << 7) +\n (hash << 8) +\n (hash << 24))) >>>\n 0;\n }\n return hash >>> 0;\n}\n\nexport interface MockEmbedderOptions {\n /** Output dimensions. Default 8 — small keeps fixtures readable. */\n dims?: number;\n /** Reported model id. Default \"mock\". */\n model?: string;\n /** Reported dtype. Default \"mock\". */\n dtype?: string;\n}\n\n/**\n * Build a deterministic embedder. The same text always yields the same vector;\n * different texts yield different ones with high probability.\n */\nexport function createMockEmbedder(\n options: MockEmbedderOptions = {},\n): Embedder {\n const dims = options.dims ?? 8;\n const model = options.model ?? \"mock\";\n const dtype = options.dtype ?? \"mock\";\n\n return {\n model,\n dtype,\n dims,\n embed(text: string): Promise<Float32Array> {\n const vector = new Float32Array(dims);\n for (let i = 0; i < dims; i++) {\n // Map each hash into [-1, 1) so vectors spread over the sphere rather\n // than crowding one orthant.\n vector[i] = (fnv1a(text, i) / 0x1_00_00_00_00) * 2 - 1;\n }\n return Promise.resolve(vector);\n },\n };\n}\n"],"mappings":";AA6BO,SAAS,aAAa,KAAsB;AACjD,MAAI,eAAe,MAAO,QAAO,IAAI;AACrC,MAAI,OAAO,QAA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;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM,MAAqC;AACzC,YAAM,SAAS,IAAI,aAAa,IAAI;AACpC,eAAS,IAAI,GAAG,IAAI,MAAM,KAAK;AAG7B,eAAO,CAAC,IAAK,MAAM,MAAM,CAAC,IAAI,aAAmB,IAAI;AAAA,MACvD;AACA,aAAO,QAAQ,QAAQ,MAAM;AAAA,IAC/B;AAAA,EACF;AACF;","names":[]}
|
package/dist/graph/runtime.d.ts
CHANGED
|
@@ -706,7 +706,7 @@ declare class VectorMismatchError extends Error {
|
|
|
706
706
|
constructor(mismatch: VectorMismatch);
|
|
707
707
|
}
|
|
708
708
|
/**
|
|
709
|
-
* The digest `manni
|
|
709
|
+
* The digest `manni vector build` records as a sidecar's `source`, computed the same
|
|
710
710
|
* way in a browser — SHA-256 over the **raw bytes of `search.json` exactly as
|
|
711
711
|
* fetched**, hex, prefixed `sha256:`.
|
|
712
712
|
*
|
|
@@ -1148,7 +1148,7 @@ interface LocalizationEntry {
|
|
|
1148
1148
|
/** Documents in this language (sections excluded). */
|
|
1149
1149
|
documents: number;
|
|
1150
1150
|
search: SearchArtifact;
|
|
1151
|
-
/** Absent until `manni
|
|
1151
|
+
/** Absent until `manni vector build` has run for this language. */
|
|
1152
1152
|
vectors?: VectorArtifact;
|
|
1153
1153
|
}
|
|
1154
1154
|
interface LocalizationsDoc {
|
package/dist/graph/runtime.js
CHANGED
|
@@ -941,7 +941,7 @@ function decodeVectorIndex(bytes) {
|
|
|
941
941
|
const version = view.getUint32(4, true);
|
|
942
942
|
if (version !== FORMAT_VERSION) {
|
|
943
943
|
throw new VectorIndexError(
|
|
944
|
-
`Unsupported vector index version ${version} (this build reads ${FORMAT_VERSION}) \u2014 re-run \`manni
|
|
944
|
+
`Unsupported vector index version ${version} (this build reads ${FORMAT_VERSION}) \u2014 re-run \`manni vector build\`.`
|
|
945
945
|
);
|
|
946
946
|
}
|
|
947
947
|
const headerLength = view.getUint32(8, true);
|
|
@@ -1010,13 +1010,13 @@ function createVectorIndex(bytes) {
|
|
|
1010
1010
|
if (expected.model !== void 0 && expected.model !== header.model) {
|
|
1011
1011
|
return {
|
|
1012
1012
|
reason: "model",
|
|
1013
|
-
detail: `Vector index was built with ${header.model}, but the embedder is ${expected.model}. Re-run \`manni
|
|
1013
|
+
detail: `Vector index was built with ${header.model}, but the embedder is ${expected.model}. Re-run \`manni vector build\`.`
|
|
1014
1014
|
};
|
|
1015
1015
|
}
|
|
1016
1016
|
if (expected.dtype !== void 0 && expected.dtype !== header.dtype) {
|
|
1017
1017
|
return {
|
|
1018
1018
|
reason: "dtype",
|
|
1019
|
-
detail: `Vector index was built at dtype ${header.dtype}, but the embedder is at ${expected.dtype} \u2014 different weights are a different function. Re-run \`manni
|
|
1019
|
+
detail: `Vector index was built at dtype ${header.dtype}, but the embedder is at ${expected.dtype} \u2014 different weights are a different function. Re-run \`manni vector build\`.`
|
|
1020
1020
|
};
|
|
1021
1021
|
}
|
|
1022
1022
|
if (expected.dims !== void 0 && expected.dims !== dims) {
|
|
@@ -1028,7 +1028,7 @@ function createVectorIndex(bytes) {
|
|
|
1028
1028
|
if (expected.source !== void 0 && expected.source !== header.source) {
|
|
1029
1029
|
return {
|
|
1030
1030
|
reason: "stale-source",
|
|
1031
|
-
detail: "Vector index was built from a different search index \u2014 the corpus changed. Re-run `manni
|
|
1031
|
+
detail: "Vector index was built from a different search index \u2014 the corpus changed. Re-run `manni vector build`."
|
|
1032
1032
|
};
|
|
1033
1033
|
}
|
|
1034
1034
|
return void 0;
|