@unbrained/pm-cli 2026.7.6 → 2026.7.7
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/CHANGELOG.md +32 -0
- package/dist/cli/commands/annotation-command.d.ts +1 -0
- package/dist/cli/commands/annotation-command.js +29 -2
- package/dist/cli/commands/annotation-command.js.map +1 -1
- package/dist/cli/commands/comments.js +3 -4
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.d.ts +3 -0
- package/dist/cli/commands/extension/bundled-catalog.js +38 -28
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.js +81 -18
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/health.js +9 -5
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/learnings.js +5 -3
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/notes.js +5 -3
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/reindex.js +4 -3
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/search.js +3 -3
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test.d.ts +9 -0
- package/dist/cli/commands/test.js +144 -105
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/extension-command-help.js +10 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/register-list-query.d.ts +1 -1
- package/dist/cli/register-list-query.js +18 -27
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-operations.d.ts +0 -8
- package/dist/cli/register-operations.js +41 -46
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +113 -13
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +5 -1
- package/dist/cli/registration-helpers.js +14 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/append-F7WPGIQL.js +11 -0
- package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js → append-PVCTBVJG.js} +8 -9
- package/dist/cli-bundle/chunks/{chunk-EGAP5OWD.js → chunk-2APXX4TZ.js} +16 -14
- package/dist/cli-bundle/chunks/chunk-2APXX4TZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js → chunk-2LEJGRQ7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js → chunk-2TILG6F2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js → chunk-3G6UMXT3.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js.map → chunk-3G6UMXT3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js → chunk-3TYOW6RR.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js → chunk-3X542TEY.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js → chunk-42LXP4VO.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js.map → chunk-42LXP4VO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CL36D4PC.js → chunk-43SIHQND.js} +36 -15
- package/dist/cli-bundle/chunks/chunk-43SIHQND.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js → chunk-43UQN754.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js.map → chunk-43UQN754.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js → chunk-43YSKY75.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js.map → chunk-43YSKY75.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js → chunk-4BKDAEDF.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js.map → chunk-4BKDAEDF.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4LELACOL.js → chunk-4IQKDKGE.js} +15 -23
- package/dist/cli-bundle/chunks/{chunk-4LELACOL.js.map → chunk-4IQKDKGE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js → chunk-4MZOKTI2.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js.map → chunk-4MZOKTI2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js → chunk-52NS7JDP.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js.map → chunk-52NS7JDP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js → chunk-565WYS5W.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js.map → chunk-565WYS5W.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js → chunk-5FIQ4EX3.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js.map → chunk-5FIQ4EX3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-DMRNBQOI.js → chunk-6G6O3OPQ.js} +256 -36
- package/dist/cli-bundle/chunks/chunk-6G6O3OPQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js → chunk-6LCJRGPD.js} +9 -13
- package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js.map → chunk-6LCJRGPD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js → chunk-6UQCNWFV.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js.map → chunk-6UQCNWFV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZSUS2OD3.js → chunk-6XTSYPPO.js} +1216 -387
- package/dist/cli-bundle/chunks/chunk-6XTSYPPO.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-7ML7JONU.js +5434 -0
- package/dist/cli-bundle/chunks/chunk-7ML7JONU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js → chunk-7PNQA24K.js} +30 -36
- package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js.map → chunk-7PNQA24K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js → chunk-7VQ3JJN5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js → chunk-7Y5N34HX.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js.map → chunk-7Y5N34HX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js → chunk-AGAVEDIE.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js → chunk-AJUON7E6.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js → chunk-ARKHKYYS.js} +13 -21
- package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js.map → chunk-ARKHKYYS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-46CUF5L6.js → chunk-C5ACVMOI.js} +99 -51
- package/dist/cli-bundle/chunks/chunk-C5ACVMOI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js → chunk-CJQM7O7R.js} +16 -20
- package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js.map → chunk-CJQM7O7R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js → chunk-D2DCTFTL.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js.map → chunk-D2DCTFTL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js → chunk-DDDWVPID.js} +8 -10
- package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js.map → chunk-DDDWVPID.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js → chunk-DG6BSXZ7.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js.map → chunk-DG6BSXZ7.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js → chunk-DR2V5OIV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js → chunk-E3LWJUGF.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js.map → chunk-E3LWJUGF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js → chunk-E3YQFSFE.js} +6 -10
- package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js.map → chunk-E3YQFSFE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XG625QP4.js → chunk-EDO7VXSO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js → chunk-EIUBK2LT.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js.map → chunk-EIUBK2LT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js → chunk-EMXPI36L.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js.map → chunk-EMXPI36L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MLIYFOE7.js → chunk-EOUVR7JN.js} +12 -8
- package/dist/cli-bundle/chunks/chunk-EOUVR7JN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js → chunk-EVEPHNXJ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js → chunk-F6MT7KKE.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js.map → chunk-F6MT7KKE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js → chunk-F6YC2A6X.js} +7 -11
- package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js.map → chunk-F6YC2A6X.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-FILL6BB2.js +5514 -0
- package/dist/cli-bundle/chunks/chunk-FILL6BB2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js → chunk-FN6SB4HU.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js +5359 -0
- package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-EKFNL33R.js → chunk-GLS6VMWI.js} +37 -16
- package/dist/cli-bundle/chunks/chunk-GLS6VMWI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js → chunk-GPIDUMMN.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js.map → chunk-GPIDUMMN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js → chunk-GTM5HQL4.js} +11 -15
- package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js.map → chunk-GTM5HQL4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-24YG75HI.js → chunk-H2SMKL2N.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-QLMX7SRD.js → chunk-HHEWQXPD.js} +6 -6
- package/dist/cli-bundle/chunks/chunk-HHEWQXPD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js → chunk-HX6QXV5P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js → chunk-I74FMIWA.js} +10 -16
- package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js.map → chunk-I74FMIWA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js → chunk-IDIBF4E2.js} +20 -24
- package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js.map → chunk-IDIBF4E2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js → chunk-II7R6KD4.js} +8 -7
- package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js.map → chunk-II7R6KD4.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-J2VGADNG.js +10320 -0
- package/dist/cli-bundle/chunks/chunk-J2VGADNG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js → chunk-J7BOLHAV.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js.map → chunk-J7BOLHAV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js → chunk-KTGJ2CBU.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js.map → chunk-KTGJ2CBU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js → chunk-LCFJ7XAM.js} +22 -2
- package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js.map → chunk-LCFJ7XAM.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js → chunk-LZQU6XJG.js} +28 -34
- package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js.map → chunk-LZQU6XJG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js → chunk-M62RO3XK.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js.map → chunk-M62RO3XK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js → chunk-MCEUKJKW.js} +12 -14
- package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js.map → chunk-MCEUKJKW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TKD5VCTD.js → chunk-MHNMCDWR.js} +343 -195
- package/dist/cli-bundle/chunks/chunk-MHNMCDWR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js → chunk-MRFWUSVA.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js.map → chunk-MRFWUSVA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js → chunk-N6ZHDLUY.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js.map → chunk-N6ZHDLUY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js → chunk-NWWL22C7.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js.map → chunk-NWWL22C7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js → chunk-P3MJJW7P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js → chunk-PDXJXEZJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js → chunk-Q64AYQYW.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js.map → chunk-Q64AYQYW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js → chunk-QDABF2RB.js} +26 -34
- package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js.map → chunk-QDABF2RB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TULGS6X6.js → chunk-QFBSP3NI.js} +529 -46
- package/dist/cli-bundle/chunks/chunk-QFBSP3NI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js → chunk-RB3KLPAH.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js.map → chunk-RB3KLPAH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3VHSI5FL.js → chunk-RY7PTTUB.js} +94 -53
- package/dist/cli-bundle/chunks/chunk-RY7PTTUB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-COSPOP7H.js → chunk-S547WBYG.js} +343 -195
- package/dist/cli-bundle/chunks/chunk-S547WBYG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js → chunk-S5BNGFN5.js} +24 -32
- package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js.map → chunk-S5BNGFN5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js → chunk-S6VC2A2K.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js.map → chunk-S6VC2A2K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js → chunk-SIM5JDON.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js.map → chunk-SIM5JDON.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VPIM42PC.js → chunk-SY75LYXR.js} +11 -7
- package/dist/cli-bundle/chunks/chunk-SY75LYXR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-K46RF36U.js → chunk-TEISGNSH.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-TEISGNSH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js → chunk-TEKZOS7M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-W572BIEB.js → chunk-TGUK6XN6.js} +14 -18
- package/dist/cli-bundle/chunks/{chunk-W572BIEB.js.map → chunk-TGUK6XN6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js → chunk-TNC6MZUD.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js.map → chunk-TNC6MZUD.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js +10498 -0
- package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-57NWPFF2.js → chunk-UO7XAZK6.js} +17 -4
- package/dist/cli-bundle/chunks/chunk-UO7XAZK6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js → chunk-V5ZWKJNY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js → chunk-VGO73OCK.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js.map → chunk-VGO73OCK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js → chunk-VLEA2UTQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js → chunk-W5HXHC7C.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js.map → chunk-W5HXHC7C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js → chunk-WCWVEXGA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-X47MKQXU.js +6690 -0
- package/dist/cli-bundle/chunks/chunk-X47MKQXU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js → chunk-XBX5CBRQ.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js.map → chunk-XBX5CBRQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SCUR7K7N.js → chunk-XC3X7BQR.js} +541 -44
- package/dist/cli-bundle/chunks/chunk-XC3X7BQR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js → chunk-XHCVAZGM.js} +13 -17
- package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js.map → chunk-XHCVAZGM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js → chunk-XPMXPR7K.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js.map → chunk-XPMXPR7K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js → chunk-XS2TMNXR.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js.map → chunk-XS2TMNXR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js → chunk-XXIYUTLK.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js.map → chunk-XXIYUTLK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EOKXK3R3.js → chunk-XZWL7VNE.js} +1220 -398
- package/dist/cli-bundle/chunks/chunk-XZWL7VNE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js +6624 -0
- package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js → chunk-Y7KYVCZM.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js.map → chunk-Y7KYVCZM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VIIUS6N6.js → chunk-YCVWWIKY.js} +16 -14
- package/dist/cli-bundle/chunks/chunk-YCVWWIKY.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js → chunk-YH5NBDFA.js} +22 -26
- package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js.map → chunk-YH5NBDFA.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js +5509 -0
- package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js → chunk-YPD7SQ5P.js} +7 -6
- package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js.map → chunk-YPD7SQ5P.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js → chunk-YPMZMKN7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js → chunk-YTD5GICJ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js → chunk-ZNEG2UDO.js} +261 -34
- package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js.map → chunk-ZNEG2UDO.js.map} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js → chunk-ZO7CLOY2.js} +3 -3
- package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js → close-3YYQ5OG2.js} +5 -9
- package/dist/cli-bundle/chunks/close-Z3Q4U7TS.js +12 -0
- package/dist/cli-bundle/chunks/close-many-3L2RXH3M.js +22 -0
- package/dist/cli-bundle/chunks/close-many-D366FTIG.js +26 -0
- package/dist/cli-bundle/chunks/comments-54XDJNFE.js +17 -0
- package/dist/cli-bundle/chunks/comments-HGHC2PN6.js +13 -0
- package/dist/cli-bundle/chunks/{copy-32ROBIDL.js → copy-44RT5GDW.js} +4 -8
- package/dist/cli-bundle/chunks/copy-UGMUGHZA.js +9 -0
- package/dist/cli-bundle/chunks/{create-E77SDCUP.js → create-4GWJWPXG.js} +9 -14
- package/dist/cli-bundle/chunks/create-AZXCUYKP.js +25 -0
- package/dist/cli-bundle/chunks/delete-Y6SXIQ4X.js +10 -0
- package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js → delete-YQ2VPXNF.js} +4 -8
- package/dist/cli-bundle/chunks/{deps-32SU7HO5.js → deps-BU5EBJDU.js} +4 -8
- package/dist/cli-bundle/chunks/deps-FMANWFRP.js +13 -0
- package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js → docs-OQBSJNIA.js} +6 -10
- package/dist/cli-bundle/chunks/docs-VNPBZXEL.js +14 -0
- package/dist/cli-bundle/chunks/files-72HZEBOE.js +18 -0
- package/dist/cli-bundle/chunks/{files-PYKR2UUG.js → files-HTSB2KJG.js} +6 -10
- package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js → focus-FOG4ALC2.js} +7 -9
- package/dist/cli-bundle/chunks/focus-SUTMKXGX.js +10 -0
- package/dist/cli-bundle/chunks/{history-compact-3MNXLKAT.js → history-compact-M6IFAMBP.js} +9 -13
- package/dist/cli-bundle/chunks/history-compact-NEXRPP2O.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-P6DYF55G.js → history-redact-NQX3OGZP.js} +7 -11
- package/dist/cli-bundle/chunks/history-redact-WQJBZ3PX.js +17 -0
- package/dist/cli-bundle/chunks/history-repair-CBHMHAJO.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-ZJQFMWPD.js → history-repair-NHOJG7WO.js} +9 -13
- package/dist/cli-bundle/chunks/learnings-M64NTSOR.js +13 -0
- package/dist/cli-bundle/chunks/{append-BGML6VLD.js → learnings-T63JGKKN.js} +9 -11
- package/dist/cli-bundle/chunks/notes-73WE2UV2.js +13 -0
- package/dist/cli-bundle/chunks/notes-U7L6HQQ2.js +17 -0
- package/dist/cli-bundle/chunks/plan-OSCNYFGC.js +24 -0
- package/dist/cli-bundle/chunks/{plan-CHVE7PBR.js → plan-TN537L24.js} +10 -15
- package/dist/cli-bundle/chunks/{profile-ZXGSKBJD.js → profile-MHAMXMHQ.js} +9 -13
- package/dist/cli-bundle/chunks/{profile-LD23PSI6.js → profile-TIGLAKJ7.js} +9 -13
- package/dist/cli-bundle/chunks/{register-list-query-OEYQHFXO.js → register-list-query-OHXD7G5N.js} +41 -33
- package/dist/cli-bundle/chunks/register-list-query-OHXD7G5N.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-B42JCCOI.js → register-list-query-ZCRABAPN.js} +42 -34
- package/dist/cli-bundle/chunks/register-list-query-ZCRABAPN.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js → register-mutation-P3G4XP6Q.js} +36 -41
- package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js.map → register-mutation-P3G4XP6Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js → register-mutation-XX4H56PE.js} +34 -39
- package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js.map → register-mutation-XX4H56PE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5BMM6XQY.js → register-operations-V6PIYEDU.js} +79 -46
- package/dist/cli-bundle/chunks/register-operations-V6PIYEDU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Z3U3U5KD.js → register-operations-V6VKTG54.js} +78 -45
- package/dist/cli-bundle/chunks/register-operations-V6VKTG54.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-3ZVVX2VN.js → register-setup-6RVAWT6W.js} +129 -29
- package/dist/cli-bundle/chunks/register-setup-6RVAWT6W.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-Q6KFNIOZ.js → register-setup-6YVUSQYD.js} +130 -30
- package/dist/cli-bundle/chunks/register-setup-6YVUSQYD.js.map +1 -0
- package/dist/cli-bundle/chunks/{restore-5RQHAPMA.js → restore-HC3YSWF7.js} +7 -11
- package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js +15 -0
- package/dist/cli-bundle/chunks/{schema-HBORFC6B.js → schema-DAGSYO6E.js} +6 -10
- package/dist/cli-bundle/chunks/{schema-245WW4G2.js → schema-UBXJCQAC.js} +6 -10
- package/dist/cli-bundle/chunks/update-CJGG5WMV.js +21 -0
- package/dist/cli-bundle/chunks/update-LKD64AFP.js +25 -0
- package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js +31 -0
- package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js +35 -0
- package/dist/cli-bundle/main.js +29 -31
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +129 -107
- package/dist/cli-bundle/sdk-testing.js +7 -8
- package/dist/cli-bundle/sdk.js +122 -117
- package/dist/cli-bundle/sdk.js.map +2 -2
- package/dist/core/history/drift-scan.js +3 -8
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/output/mutation-projection.js +11 -5
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/search/cache.js +3 -3
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/semantic-defaults.d.ts +2 -0
- package/dist/core/search/semantic-defaults.js +11 -4
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/vector-stores.d.ts +1 -1
- package/dist/core/search/vector-stores.js +33 -7
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +7 -7
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +9 -7
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +151 -8
- package/dist/sdk/runtime.js +255 -14
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/start-task-status.d.ts +13 -0
- package/dist/sdk/start-task-status.js +19 -0
- package/dist/sdk/start-task-status.js.map +1 -0
- package/docs/COMMANDS.md +10 -1
- package/docs/SDK.md +35 -0
- package/docs/TESTING.md +3 -0
- package/package.json +1 -1
- package/dist/cli-bundle/chunks/activity-WJCGCYPU.js +0 -18
- package/dist/cli-bundle/chunks/activity-Z6QUAUSG.js +0 -22
- package/dist/cli-bundle/chunks/aggregate-BDM6EIAR.js +0 -25
- package/dist/cli-bundle/chunks/aggregate-VQ2DHU3S.js +0 -21
- package/dist/cli-bundle/chunks/append-RKJYPU74.js +0 -15
- package/dist/cli-bundle/chunks/chunk-2XG4IZON.js +0 -218
- package/dist/cli-bundle/chunks/chunk-2XG4IZON.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-37E72CNS.js +0 -217
- package/dist/cli-bundle/chunks/chunk-37E72CNS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js +0 -228
- package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js +0 -2330
- package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3VHSI5FL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-425E4QL5.js +0 -278
- package/dist/cli-bundle/chunks/chunk-425E4QL5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-46CUF5L6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +0 -87
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js +0 -249
- package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js +0 -819
- package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js +0 -279
- package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-57NWPFF2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js +0 -268
- package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js +0 -1868
- package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js +0 -1749
- package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-64YKRTSV.js +0 -1961
- package/dist/cli-bundle/chunks/chunk-64YKRTSV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +0 -23
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js +0 -421
- package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js +0 -1985
- package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CL36D4PC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-COSPOP7H.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-COWTDV6B.js +0 -3461
- package/dist/cli-bundle/chunks/chunk-COWTDV6B.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js +0 -1858
- package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js +0 -1932
- package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EKFNL33R.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js +0 -1704
- package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EOKXK3R3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js +0 -231
- package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js +0 -2090
- package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js +0 -1570
- package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js +0 -239
- package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js +0 -530
- package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-GZRDYONU.js +0 -1005
- package/dist/cli-bundle/chunks/chunk-GZRDYONU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js +0 -277
- package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js +0 -309
- package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JINYH2DB.js +0 -371
- package/dist/cli-bundle/chunks/chunk-JINYH2DB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js +0 -2257
- package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-K46RF36U.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KERMZVY5.js +0 -371
- package/dist/cli-bundle/chunks/chunk-KERMZVY5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js +0 -76
- package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js +0 -140
- package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js +0 -1601
- package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js +0 -1031
- package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js +0 -995
- package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js +0 -296
- package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MLIYFOE7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js +0 -2043
- package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js +0 -2033
- package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N745W3B3.js +0 -1604
- package/dist/cli-bundle/chunks/chunk-N745W3B3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js +0 -1615
- package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +0 -20
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js +0 -143
- package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QLMX7SRD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QX6HM775.js +0 -398
- package/dist/cli-bundle/chunks/chunk-QX6HM775.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QZ342C63.js +0 -220
- package/dist/cli-bundle/chunks/chunk-QZ342C63.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js +0 -368
- package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RFNYTESG.js +0 -520
- package/dist/cli-bundle/chunks/chunk-RFNYTESG.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js +0 -79
- package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js +0 -282
- package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js +0 -274
- package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SCUR7K7N.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js +0 -1977
- package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js +0 -1041
- package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-T42JWV3F.js +0 -822
- package/dist/cli-bundle/chunks/chunk-T42JWV3F.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TULGS6X6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js +0 -2306
- package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VPIM42PC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VQRSPVME.js +0 -368
- package/dist/cli-bundle/chunks/chunk-VQRSPVME.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +0 -84
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js +0 -3423
- package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WLSM645P.js +0 -2247
- package/dist/cli-bundle/chunks/chunk-WLSM645P.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WRTENIX3.js +0 -215
- package/dist/cli-bundle/chunks/chunk-WRTENIX3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js +0 -388
- package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XC5BURG2.js +0 -306
- package/dist/cli-bundle/chunks/chunk-XC5BURG2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js +0 -424
- package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js +0 -2128
- package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js +0 -299
- package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZSUS2OD3.js.map +0 -7
- package/dist/cli-bundle/chunks/claim-RFS7BROJ.js +0 -19
- package/dist/cli-bundle/chunks/claim-XP5AWZ5H.js +0 -23
- package/dist/cli-bundle/chunks/close-GEANHQ2J.js +0 -16
- package/dist/cli-bundle/chunks/close-many-CMZW7ITN.js +0 -31
- package/dist/cli-bundle/chunks/close-many-ZFDIG6M7.js +0 -27
- package/dist/cli-bundle/chunks/comments-MFSYVNNU.js +0 -21
- package/dist/cli-bundle/chunks/comments-XUBPXDYX.js +0 -17
- package/dist/cli-bundle/chunks/config-D7XQMONX.js +0 -18
- package/dist/cli-bundle/chunks/config-T4FHBSYN.js +0 -22
- package/dist/cli-bundle/chunks/context-DIU275XI.js +0 -48
- package/dist/cli-bundle/chunks/context-JCOYB4LZ.js +0 -44
- package/dist/cli-bundle/chunks/contracts-BVO7CSLK.js +0 -12
- package/dist/cli-bundle/chunks/copy-NAGLGMHZ.js +0 -13
- package/dist/cli-bundle/chunks/create-4V7SWNBB.js +0 -30
- package/dist/cli-bundle/chunks/delete-NQI5OSKN.js +0 -14
- package/dist/cli-bundle/chunks/deps-T7SCWXEX.js +0 -17
- package/dist/cli-bundle/chunks/docs-WL2IWGWV.js +0 -18
- package/dist/cli-bundle/chunks/eval-NF2J5SHR.js +0 -23
- package/dist/cli-bundle/chunks/eval-SKDT3MZU.js +0 -27
- package/dist/cli-bundle/chunks/extension-LAXKCAYE.js +0 -42
- package/dist/cli-bundle/chunks/extension-ZISPBRBC.js +0 -38
- package/dist/cli-bundle/chunks/files-EWRQHGIS.js +0 -22
- package/dist/cli-bundle/chunks/focus-4T7TM4MT.js +0 -18
- package/dist/cli-bundle/chunks/focus-L3YUASOD.js +0 -14
- package/dist/cli-bundle/chunks/gc-2PCTYYRI.js +0 -12
- package/dist/cli-bundle/chunks/get-7DMITJ3G.js +0 -23
- package/dist/cli-bundle/chunks/get-VKQXCXLL.js +0 -19
- package/dist/cli-bundle/chunks/health-CVSTAR2F.js +0 -31
- package/dist/cli-bundle/chunks/health-TV3GKTFN.js +0 -35
- package/dist/cli-bundle/chunks/history-D4JUX5XV.js +0 -20
- package/dist/cli-bundle/chunks/history-D4JUX5XV.js.map +0 -7
- package/dist/cli-bundle/chunks/history-LQ2UWZTE.js +0 -24
- package/dist/cli-bundle/chunks/history-LQ2UWZTE.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js +0 -25
- package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js +0 -21
- package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js +0 -23
- package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js.map +0 -1
- package/dist/cli-bundle/chunks/init-C3LJPWQZ.js +0 -30
- package/dist/cli-bundle/chunks/init-C3LJPWQZ.js.map +0 -1
- package/dist/cli-bundle/chunks/init-J3DPGWQI.js +0 -26
- package/dist/cli-bundle/chunks/init-J3DPGWQI.js.map +0 -7
- package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js +0 -21
- package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js.map +0 -1
- package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js +0 -17
- package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js.map +0 -7
- package/dist/cli-bundle/chunks/list-O5NZVSPN.js +0 -36
- package/dist/cli-bundle/chunks/list-O5NZVSPN.js.map +0 -1
- package/dist/cli-bundle/chunks/list-Z55YCNTC.js +0 -32
- package/dist/cli-bundle/chunks/list-Z55YCNTC.js.map +0 -7
- package/dist/cli-bundle/chunks/next-GBNTGXFC.js +0 -28
- package/dist/cli-bundle/chunks/next-GBNTGXFC.js.map +0 -7
- package/dist/cli-bundle/chunks/next-QKW7PTKE.js +0 -32
- package/dist/cli-bundle/chunks/next-QKW7PTKE.js.map +0 -1
- package/dist/cli-bundle/chunks/notes-R5FZTKWF.js +0 -17
- package/dist/cli-bundle/chunks/notes-R5FZTKWF.js.map +0 -7
- package/dist/cli-bundle/chunks/notes-WCGIULVG.js +0 -21
- package/dist/cli-bundle/chunks/notes-WCGIULVG.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-ADISFYH4.js +0 -29
- package/dist/cli-bundle/chunks/plan-ADISFYH4.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-CHVE7PBR.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-LD23PSI6.js.map +0 -7
- package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-B42JCCOI.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-OEYQHFXO.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js +0 -19
- package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js +0 -23
- package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-5RQHAPMA.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-PNEIBBLW.js +0 -19
- package/dist/cli-bundle/chunks/restore-PNEIBBLW.js.map +0 -7
- package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js +0 -29
- package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js.map +0 -1
- package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js +0 -25
- package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js.map +0 -7
- package/dist/cli-bundle/chunks/schema-245WW4G2.js.map +0 -1
- package/dist/cli-bundle/chunks/schema-HBORFC6B.js.map +0 -7
- package/dist/cli-bundle/chunks/search-AOZC5SIK.js +0 -34
- package/dist/cli-bundle/chunks/search-AOZC5SIK.js.map +0 -7
- package/dist/cli-bundle/chunks/search-DRXPGHD7.js +0 -38
- package/dist/cli-bundle/chunks/search-DRXPGHD7.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-NJG4NLHG.js +0 -21
- package/dist/cli-bundle/chunks/stats-NJG4NLHG.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-RG6AG4N2.js +0 -17
- package/dist/cli-bundle/chunks/stats-RG6AG4N2.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js +0 -14
- package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js +0 -18
- package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js.map +0 -1
- package/dist/cli-bundle/chunks/test-6CMOCWUC.js +0 -39
- package/dist/cli-bundle/chunks/test-6CMOCWUC.js.map +0 -7
- package/dist/cli-bundle/chunks/test-RI7XHBZL.js +0 -43
- package/dist/cli-bundle/chunks/test-RI7XHBZL.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js +0 -29
- package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-QEIORFYW.js +0 -33
- package/dist/cli-bundle/chunks/test-all-QEIORFYW.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js +0 -28
- package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js +0 -24
- package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js.map +0 -7
- package/dist/cli-bundle/chunks/update-QVJDFEAP.js +0 -30
- package/dist/cli-bundle/chunks/update-QVJDFEAP.js.map +0 -1
- package/dist/cli-bundle/chunks/update-VQVHAY6X.js +0 -26
- package/dist/cli-bundle/chunks/update-VQVHAY6X.js.map +0 -7
- package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js +0 -37
- package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js.map +0 -7
- package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js +0 -41
- package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js.map +0 -1
- package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js +0 -24
- package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js +0 -28
- package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-4NTXSB62.js +0 -36
- package/dist/cli-bundle/chunks/validate-4NTXSB62.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-MUFXQZMI.js +0 -32
- package/dist/cli-bundle/chunks/validate-MUFXQZMI.js.map +0 -7
- /package/dist/cli-bundle/chunks/{activity-WJCGCYPU.js.map → append-F7WPGIQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-Z6QUAUSG.js.map → append-PVCTBVJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js.map → chunk-2LEJGRQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js.map → chunk-2TILG6F2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js.map → chunk-3TYOW6RR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js.map → chunk-3X542TEY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js.map → chunk-7VQ3JJN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js.map → chunk-AGAVEDIE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js.map → chunk-AJUON7E6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js.map → chunk-DR2V5OIV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XG625QP4.js.map → chunk-EDO7VXSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js.map → chunk-EVEPHNXJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js.map → chunk-FN6SB4HU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-24YG75HI.js.map → chunk-H2SMKL2N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js.map → chunk-HX6QXV5P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js.map → chunk-P3MJJW7P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js.map → chunk-PDXJXEZJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js.map → chunk-TEKZOS7M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js.map → chunk-V5ZWKJNY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js.map → chunk-VLEA2UTQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js.map → chunk-WCWVEXGA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js.map → chunk-YPMZMKN7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js.map → chunk-YTD5GICJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js.map → chunk-ZO7CLOY2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-BDM6EIAR.js.map → close-3YYQ5OG2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-VQ2DHU3S.js.map → close-Z3Q4U7TS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-RKJYPU74.js.map → close-many-3L2RXH3M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-BGML6VLD.js.map → close-many-D366FTIG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-XP5AWZ5H.js.map → comments-54XDJNFE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-RFS7BROJ.js.map → comments-HGHC2PN6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js.map → copy-44RT5GDW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-GEANHQ2J.js.map → copy-UGMUGHZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-CMZW7ITN.js.map → create-4GWJWPXG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-ZFDIG6M7.js.map → create-AZXCUYKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-XUBPXDYX.js.map → delete-Y6SXIQ4X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-MFSYVNNU.js.map → delete-YQ2VPXNF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-T4FHBSYN.js.map → deps-BU5EBJDU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-D7XQMONX.js.map → deps-FMANWFRP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-DIU275XI.js.map → docs-OQBSJNIA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-JCOYB4LZ.js.map → docs-VNPBZXEL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-BVO7CSLK.js.map → files-72HZEBOE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js.map → files-HTSB2KJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-32ROBIDL.js.map → focus-FOG4ALC2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-NAGLGMHZ.js.map → focus-SUTMKXGX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-E77SDCUP.js.map → history-compact-M6IFAMBP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-4V7SWNBB.js.map → history-compact-NEXRPP2O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js.map → history-redact-NQX3OGZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-NQI5OSKN.js.map → history-redact-WQJBZ3PX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-T7SCWXEX.js.map → history-repair-CBHMHAJO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-32SU7HO5.js.map → history-repair-NHOJG7WO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-WL2IWGWV.js.map → learnings-M64NTSOR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js.map → learnings-T63JGKKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-NF2J5SHR.js.map → notes-73WE2UV2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-SKDT3MZU.js.map → notes-U7L6HQQ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-ZISPBRBC.js.map → plan-OSCNYFGC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-LAXKCAYE.js.map → plan-TN537L24.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-PYKR2UUG.js.map → profile-MHAMXMHQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-EWRQHGIS.js.map → profile-TIGLAKJ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-4T7TM4MT.js.map → restore-HC3YSWF7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-L3YUASOD.js.map → restore-LFAMMRYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-2PCTYYRI.js.map → schema-DAGSYO6E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js.map → schema-UBXJCQAC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-VKQXCXLL.js.map → update-CJGG5WMV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-7DMITJ3G.js.map → update-LKD64AFP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-CVSTAR2F.js.map → update-many-G4SM7BHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-TV3GKTFN.js.map → update-many-VLIV3D7R.js.map} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements extension package-management support for Install Sources.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cc53d374-129f-5ffe-9949-85ed5b45c268")}catch(e){}}();
|
|
8
8
|
import { execFile } from "node:child_process";
|
|
9
9
|
import fs from "node:fs/promises";
|
|
10
10
|
import os from "node:os";
|
|
@@ -17,8 +17,10 @@ import { pathExists } from "../../../core/fs/fs-utils.js";
|
|
|
17
17
|
import { isPathWithinDirectory } from "../../../core/fs/path-utils.js";
|
|
18
18
|
import { EXIT_CODE } from "../../../core/shared/constants.js";
|
|
19
19
|
import { PmCliError } from "../../../core/shared/errors.js";
|
|
20
|
+
import { listBundledPackageAliases } from "./bundled-catalog.js";
|
|
20
21
|
const execFileAsync = promisify(execFile);
|
|
21
22
|
const PM_CLI_PACKAGE_NAME = "@unbrained/pm-cli";
|
|
23
|
+
let bundledPackageAliasesCache;
|
|
22
24
|
function parseGithubPathSpec(pathSpec, input, refOverride) {
|
|
23
25
|
const segments = pathSpec
|
|
24
26
|
.split("/")
|
|
@@ -55,6 +57,23 @@ function parseGithubPathSpec(pathSpec, input, refOverride) {
|
|
|
55
57
|
subpath: subpath && subpath.length > 0 ? subpath : undefined,
|
|
56
58
|
};
|
|
57
59
|
}
|
|
60
|
+
function parseNpmInstallSource(normalizedInput, forceGithub, refOverride) {
|
|
61
|
+
const spec = normalizedInput.slice("npm:".length).trim();
|
|
62
|
+
if (spec.length === 0) {
|
|
63
|
+
throw new PmCliError('npm package source must include a package spec after "npm:".', EXIT_CODE.USAGE);
|
|
64
|
+
}
|
|
65
|
+
if (forceGithub) {
|
|
66
|
+
throw new PmCliError('Options "--gh/--github" cannot be combined with npm: package sources.', EXIT_CODE.USAGE);
|
|
67
|
+
}
|
|
68
|
+
if (refOverride) {
|
|
69
|
+
throw new PmCliError('Option "--ref" cannot be combined with npm: package sources.', EXIT_CODE.USAGE);
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
kind: "npm",
|
|
73
|
+
input: normalizedInput,
|
|
74
|
+
spec,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
58
77
|
/**
|
|
59
78
|
* Implements parse extension install source for the public runtime surface of this module.
|
|
60
79
|
*/
|
|
@@ -65,21 +84,7 @@ export function parseExtensionInstallSource(input, options = {}) {
|
|
|
65
84
|
}
|
|
66
85
|
const refOverride = typeof options.ref === "string" && options.ref.trim().length > 0 ? options.ref.trim() : undefined;
|
|
67
86
|
if (normalizedInput.startsWith("npm:")) {
|
|
68
|
-
|
|
69
|
-
if (spec.length === 0) {
|
|
70
|
-
throw new PmCliError('npm package source must include a package spec after "npm:".', EXIT_CODE.USAGE);
|
|
71
|
-
}
|
|
72
|
-
if (options.forceGithub) {
|
|
73
|
-
throw new PmCliError('Options "--gh/--github" cannot be combined with npm: package sources.', EXIT_CODE.USAGE);
|
|
74
|
-
}
|
|
75
|
-
if (refOverride) {
|
|
76
|
-
throw new PmCliError('Option "--ref" cannot be combined with npm: package sources.', EXIT_CODE.USAGE);
|
|
77
|
-
}
|
|
78
|
-
return {
|
|
79
|
-
kind: "npm",
|
|
80
|
-
input: normalizedInput,
|
|
81
|
-
spec,
|
|
82
|
-
};
|
|
87
|
+
return parseNpmInstallSource(normalizedInput, options.forceGithub === true, refOverride);
|
|
83
88
|
}
|
|
84
89
|
const maybeGithubByUrl = (() => {
|
|
85
90
|
try {
|
|
@@ -556,6 +561,64 @@ async function resolveGithubSourceDirectory(cloneDirectory, source) {
|
|
|
556
561
|
resolved_subpath: path.relative(cloneDirectory, discoveredDirectory).replaceAll(path.sep, "/"),
|
|
557
562
|
};
|
|
558
563
|
}
|
|
564
|
+
/**
|
|
565
|
+
* Bare package-ish names (no path separators, or a single-scope npm name) that
|
|
566
|
+
* miss local resolution are almost always intended as npm or bundled installs,
|
|
567
|
+
* so the not-found error must route agents to those sources instead of dead-ending.
|
|
568
|
+
*/
|
|
569
|
+
function looksLikeBarePackageName(input) {
|
|
570
|
+
const trimmed = input.trim();
|
|
571
|
+
if (trimmed.length === 0 || trimmed.startsWith(".") || trimmed.startsWith("~")) {
|
|
572
|
+
return false;
|
|
573
|
+
}
|
|
574
|
+
if (trimmed.startsWith("@")) {
|
|
575
|
+
return trimmed.split("/").length === 2;
|
|
576
|
+
}
|
|
577
|
+
return !trimmed.includes("/") && !trimmed.includes("\\");
|
|
578
|
+
}
|
|
579
|
+
async function buildLocalSourceNotFoundError(source) {
|
|
580
|
+
const baseMessage = `Local extension source does not exist: "${source.absolute_path}".`;
|
|
581
|
+
const input = source.input.trim();
|
|
582
|
+
if (!looksLikeBarePackageName(input)) {
|
|
583
|
+
return new PmCliError(baseMessage, EXIT_CODE.NOT_FOUND);
|
|
584
|
+
}
|
|
585
|
+
let bundledAliases = [];
|
|
586
|
+
try {
|
|
587
|
+
const envPackageRoot = process.env.PM_CLI_PACKAGE_ROOT;
|
|
588
|
+
const cacheKey = typeof envPackageRoot === "string" && envPackageRoot.trim().length > 0
|
|
589
|
+
? path.resolve(envPackageRoot.trim())
|
|
590
|
+
: "";
|
|
591
|
+
if (bundledPackageAliasesCache?.key !== cacheKey) {
|
|
592
|
+
bundledPackageAliasesCache = {
|
|
593
|
+
key: cacheKey,
|
|
594
|
+
aliases: await listBundledPackageAliases(),
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
bundledAliases = bundledPackageAliasesCache.aliases;
|
|
598
|
+
}
|
|
599
|
+
catch {
|
|
600
|
+
// Alias discovery is best-effort; the npm: hint alone still unblocks agents.
|
|
601
|
+
}
|
|
602
|
+
const nextSteps = [
|
|
603
|
+
`Retry with pm install npm:${input} if the package is published to npm.`,
|
|
604
|
+
`Or inspect bundled packages with pm package catalog --project --json before installing by alias. Known aliases (blank means none found): ${bundledAliases.join(", ")}`,
|
|
605
|
+
];
|
|
606
|
+
return new PmCliError(`${baseMessage} "${input}" did not match a local directory, bundled package alias, or bundled package name; if you meant an npm package, install it as "npm:${input}".`, EXIT_CODE.NOT_FOUND, {
|
|
607
|
+
code: "local_source_not_found_bare_name",
|
|
608
|
+
required: `Use "npm:${input}" for npm registry packages, a bundled catalog alias, or an existing local directory path.`,
|
|
609
|
+
why: "Bare names resolve as local paths only after bundled aliases, so unmatched names need an explicit npm: source.",
|
|
610
|
+
examples: [
|
|
611
|
+
`pm install npm:${input}`,
|
|
612
|
+
"pm package catalog --project --json",
|
|
613
|
+
],
|
|
614
|
+
nextSteps,
|
|
615
|
+
recovery: {
|
|
616
|
+
attempted_command: `pm install ${input}`,
|
|
617
|
+
normalized_args: ["install", input],
|
|
618
|
+
next_best_command: `pm install npm:${input}`,
|
|
619
|
+
},
|
|
620
|
+
});
|
|
621
|
+
}
|
|
559
622
|
/**
|
|
560
623
|
* Implements resolve install source for the public runtime surface of this module.
|
|
561
624
|
*/
|
|
@@ -566,7 +629,7 @@ export async function resolveInstallSource(source) {
|
|
|
566
629
|
localStats = await fs.stat(source.absolute_path);
|
|
567
630
|
}
|
|
568
631
|
catch {
|
|
569
|
-
throw
|
|
632
|
+
throw await buildLocalSourceNotFoundError(source);
|
|
570
633
|
}
|
|
571
634
|
if (!localStats.isDirectory()) {
|
|
572
635
|
throw new PmCliError(`Local extension source must be a directory: "${source.absolute_path}".`, EXIT_CODE.USAGE);
|
|
@@ -639,4 +702,4 @@ export const _testOnlyInstallSources = {
|
|
|
639
702
|
runNpmCommand,
|
|
640
703
|
};
|
|
641
704
|
//# sourceMappingURL=install-sources.js.map
|
|
642
|
-
//# debugId=
|
|
705
|
+
//# debugId=cc53d374-129f-5ffe-9949-85ed5b45c268
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-sources.js","sources":["cli/commands/extension/install-sources.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/extension/install-sources\n *\n * Implements extension package-management support for Install Sources.\n */\nimport { execFile } from \"node:child_process\";\nimport fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { promisify } from \"node:util\";\nimport { collectPackageExtensionDirectories } from \"../../../core/packages/manifest.js\";\nimport { resolvePmPackageRootFromModule } from \"../../../core/packages/root.js\";\nimport { pathExists } from \"../../../core/fs/fs-utils.js\";\nimport { isPathWithinDirectory } from \"../../../core/fs/path-utils.js\";\nimport { EXIT_CODE } from \"../../../core/shared/constants.js\";\nimport { PmCliError, type PmCliErrorContext } from \"../../../core/shared/errors.js\";\n\nconst execFileAsync = promisify(execFile);\nconst PM_CLI_PACKAGE_NAME = \"@unbrained/pm-cli\";\n\ninterface LocalInstallSource {\n kind: \"local\";\n input: string;\n absolute_path: string;\n}\n\ninterface GithubInstallSource {\n kind: \"github\";\n input: string;\n owner: string;\n repo: string;\n repository: string;\n ref?: string;\n subpath?: string;\n}\n\ninterface NpmInstallSource {\n kind: \"npm\";\n input: string;\n spec: string;\n}\n\ntype InstallSource = LocalInstallSource | GithubInstallSource | NpmInstallSource;\n\ninterface ResolvedInstallSource {\n source: InstallSource;\n directory: string;\n resolved_subpath?: string;\n commit?: string;\n npm_package?: string;\n npm_version?: string;\n cleanup?: () => Promise<void>;\n}\n\nfunction parseGithubPathSpec(pathSpec: string, input: string, refOverride?: string): GithubInstallSource | null {\n const segments = pathSpec\n .split(\"/\")\n .map((segment) => segment.trim())\n .filter((segment) => segment.length > 0);\n if (segments.length < 2) {\n return null;\n }\n const owner = segments[0];\n const repo = segments[1].replace(/\\.git$/i, \"\");\n if (owner.length === 0 || repo.length === 0) {\n return null;\n }\n const tail = segments.slice(2);\n let ref: string | undefined;\n let subpath: string | undefined;\n if (tail[0] === \"tree\" && tail.length >= 2) {\n ref = tail[1];\n subpath = tail.slice(2).join(\"/\");\n } else if (tail.length > 0) {\n subpath = tail.join(\"/\");\n }\n if (typeof refOverride === \"string\" && refOverride.trim().length > 0) {\n ref = refOverride.trim();\n }\n return {\n kind: \"github\",\n input,\n owner,\n repo,\n repository: `https://github.com/${owner}/${repo}.git`,\n ref,\n subpath: subpath && subpath.length > 0 ? subpath : undefined,\n };\n}\n\n/**\n * Implements parse extension install source for the public runtime surface of this module.\n */\nexport function parseExtensionInstallSource(input: string, options: { forceGithub?: boolean; ref?: string } = {}): InstallSource {\n const normalizedInput = input.trim();\n if (normalizedInput.length === 0) {\n throw new PmCliError(\"Extension source is required for --install.\", EXIT_CODE.USAGE);\n }\n const refOverride = typeof options.ref === \"string\" && options.ref.trim().length > 0 ? options.ref.trim() : undefined;\n\n if (normalizedInput.startsWith(\"npm:\")) {\n const spec = normalizedInput.slice(\"npm:\".length).trim();\n if (spec.length === 0) {\n throw new PmCliError('npm package source must include a package spec after \"npm:\".', EXIT_CODE.USAGE);\n }\n if (options.forceGithub) {\n throw new PmCliError('Options \"--gh/--github\" cannot be combined with npm: package sources.', EXIT_CODE.USAGE);\n }\n if (refOverride) {\n throw new PmCliError('Option \"--ref\" cannot be combined with npm: package sources.', EXIT_CODE.USAGE);\n }\n return {\n kind: \"npm\",\n input: normalizedInput,\n spec,\n };\n }\n\n const maybeGithubByUrl = (() => {\n try {\n const parsed = new URL(normalizedInput);\n if (parsed.hostname !== \"github.com\") {\n return null;\n }\n const pathSpec = parsed.pathname.replace(/^\\/+/, \"\");\n return parseGithubPathSpec(pathSpec, normalizedInput, refOverride);\n } catch {\n return null;\n }\n })();\n if (maybeGithubByUrl) {\n return maybeGithubByUrl;\n }\n\n const strippedDomainInput = normalizedInput.startsWith(\"github.com/\") ? normalizedInput.slice(\"github.com/\".length) : null;\n if (strippedDomainInput) {\n const parsed = parseGithubPathSpec(strippedDomainInput, normalizedInput, refOverride);\n if (!parsed) {\n throw new PmCliError(`Invalid GitHub source \"${normalizedInput}\".`, EXIT_CODE.USAGE);\n }\n return parsed;\n }\n\n if (options.forceGithub) {\n const parsed = parseGithubPathSpec(normalizedInput, normalizedInput, refOverride);\n if (!parsed) {\n throw new PmCliError(`Invalid GitHub shorthand \"${normalizedInput}\".`, EXIT_CODE.USAGE);\n }\n return parsed;\n }\n\n if (/^https?:\\/\\//i.test(normalizedInput)) {\n throw new PmCliError(\n `Unsupported extension source URL \"${normalizedInput}\". Supported remote source host: github.com.`,\n EXIT_CODE.USAGE,\n );\n }\n\n return {\n kind: \"local\",\n input: normalizedInput,\n absolute_path: path.resolve(process.cwd(), normalizedInput),\n };\n}\n\n/**\n * Implements run git command for the public runtime surface of this module.\n */\nexport async function runGitCommand(\n args: string[],\n execRunner: typeof execFileAsync = execFileAsync,\n): Promise<string> {\n try {\n const result = await execRunner(\"git\", args, { encoding: \"utf8\" });\n return (result.stdout ?? \"\").trim();\n } catch (error: unknown) {\n /* c8 ignore start -- stderr-vs-error-message precedence is validated in integration command-runner paths */\n const stderr = typeof error === \"object\" && error !== null && \"stderr\" in error ? String((error as { stderr: unknown }).stderr) : \"\";\n const message = stderr.trim().length > 0 ? stderr.trim() : error instanceof Error ? error.message : String(error);\n /* c8 ignore stop */\n throw new PmCliError(`Git command failed: git ${args.join(\" \")}\\n${message}`, EXIT_CODE.GENERIC_FAILURE);\n }\n}\n\n/**\n * Implements resolve npm command name for the public runtime surface of this module.\n */\nexport function resolveNpmCommandName(platform: NodeJS.Platform = process.platform): \"npm\" | \"npm.cmd\" {\n return platform === \"win32\" ? \"npm.cmd\" : \"npm\";\n}\n\n/**\n * Implements should run npm command in shell for the public runtime surface of this module.\n */\nexport function shouldRunNpmCommandInShell(platform: NodeJS.Platform = process.platform): boolean {\n return platform === \"win32\";\n}\n\nasync function runNpmCommand(\n args: string[],\n cwd?: string,\n execRunner: typeof execFileAsync = execFileAsync,\n): Promise<string> {\n const npmCommand = resolveNpmCommandName();\n try {\n const result = await execRunner(npmCommand, args, { cwd, encoding: \"utf8\", shell: shouldRunNpmCommandInShell() });\n return (result.stdout ?? \"\").trim();\n } catch (error: unknown) {\n const stderr = typeof error === \"object\" && error !== null && \"stderr\" in error ? String((error as { stderr: unknown }).stderr) : \"\";\n const message = stderr.trim().length > 0 ? stderr.trim() : error instanceof Error ? error.message : String(error);\n throw new PmCliError(`npm command failed: ${npmCommand} ${args.join(\" \")}\\n${message}`, EXIT_CODE.GENERIC_FAILURE);\n }\n}\n\nfunction npmPackageNameFromSpec(spec: string): string {\n const trimmed = spec.trim();\n const withoutAlias = trimmed.includes(\"@file:\") ? trimmed.slice(0, trimmed.lastIndexOf(\"@file:\")) : trimmed;\n if (withoutAlias.startsWith(\"@\")) {\n const scoped = withoutAlias.match(/^(@[^/@\\s]+\\/[^/@\\s]+)/);\n return scoped?.[1] ?? withoutAlias;\n }\n const unscoped = withoutAlias.match(/^([^/@\\s]+)/);\n return unscoped?.[1] ?? withoutAlias;\n}\n\n/**\n * Implements check whether npm not found error for the public runtime surface of this module.\n */\nexport function isNpmNotFoundError(error: unknown): boolean {\n const message = error instanceof Error ? error.message : String(error);\n const normalized = message.toLowerCase();\n return (\n normalized.includes(\"npm err! code e404\") ||\n normalized.includes(\"404 not found\") ||\n normalized.includes(\"is not in this registry\")\n );\n}\n\n/**\n * Implements check whether npm pack not found error for the public runtime surface of this module.\n */\nexport function isNpmPackNotFoundError(error: unknown): boolean {\n const message = error instanceof Error ? error.message : String(error);\n const normalized = message.toLowerCase();\n return isNpmNotFoundError(error) || normalized.includes(\"not found\");\n}\n\nfunction isFirstPartyPmPackageName(packageName: string): boolean {\n const normalized = packageName.trim().toLowerCase();\n return normalized.startsWith(\"@unbrained/pm-\") || normalized.startsWith(\"pm-\");\n}\n\n/**\n * Implements build npm not found recovery for the public runtime surface of this module.\n */\nexport function buildNpmNotFoundRecovery(spec: string): {\n message: string;\n context: PmCliErrorContext;\n} {\n const packageName = npmPackageNameFromSpec(spec);\n const isFirstPartyPackage = isFirstPartyPmPackageName(packageName);\n const repoName = packageName.replace(/^.*\\//, \"\");\n const githubSource = isFirstPartyPackage ? `github.com/unbraind/${repoName}` : undefined;\n const nextBestCommand = githubSource ? `pm install --project ${githubSource}` : undefined;\n return {\n message: isFirstPartyPackage\n ? `npm package \"${spec}\" was not found in the registry. If this is an unpublished first-party pm package, install its GitHub repository instead.`\n : `npm package \"${spec}\" was not found in the registry.`,\n context: {\n code: \"npm_package_not_found\",\n required: \"Use an install source that exists, or publish the npm package before installing it with npm:<name>.\",\n why: \"Classifying npm 404s avoids repeated registry retries and gives agents a deterministic fallback path.\",\n examples: nextBestCommand ? [nextBestCommand, `pm package catalog --project --json`] : [`npm view ${packageName}`, `pm package catalog --project --json`],\n nextSteps: nextBestCommand\n ? [\n `Try ${nextBestCommand} if the repository exists.`,\n \"Use pm package catalog --project --json to inspect bundled package aliases before installing.\",\n ]\n : [\n `Verify ${packageName} exists in the npm registry and that you have access to it.`,\n \"Use pm package catalog --project --json to inspect bundled package aliases before installing.\",\n ],\n recovery: {\n attempted_command: `pm install --project npm:${spec}`,\n normalized_args: [\"install\", \"--project\", `npm:${spec}`],\n ...(githubSource && nextBestCommand\n ? {\n fallback_candidates: [\n {\n source: githubSource,\n command: nextBestCommand,\n reason: \"canonical first-party GitHub repository fallback for unpublished pm packages\",\n },\n ],\n next_best_command: nextBestCommand,\n }\n : {}),\n },\n },\n };\n}\n\n/**\n * Implements wrap npm pack resolution error for the public runtime surface of this module.\n */\nexport function wrapNpmPackResolutionError(spec: string, error: unknown): PmCliError | null {\n if (!isNpmPackNotFoundError(error)) {\n return null;\n }\n const recovery = buildNpmNotFoundRecovery(spec);\n return new PmCliError(recovery.message, EXIT_CODE.NOT_FOUND, recovery.context);\n}\n\nasync function resolveLocalNpmPackagePath(spec: string): Promise<string | null> {\n if (path.isAbsolute(spec) || spec.startsWith(\".\") || spec.startsWith(\"..\")) {\n const absolutePath = path.resolve(process.cwd(), spec);\n return (await pathExists(absolutePath)) ? absolutePath : null;\n }\n\n try {\n const parsed = new URL(spec);\n if (parsed.protocol === \"file:\") {\n const absolutePath = fileURLToPath(parsed);\n return (await pathExists(absolutePath)) ? absolutePath : null;\n }\n } catch {\n // Registry package specs are not URLs.\n }\n\n if (!/^[a-z][a-z0-9+.-]*:/i.test(spec)) {\n const absolutePath = path.resolve(process.cwd(), spec);\n if (await pathExists(absolutePath)) {\n return absolutePath;\n }\n }\n\n return null;\n}\n\nasync function resolveNpmPackSpec(spec: string): Promise<string> {\n const localPath = await resolveLocalNpmPackagePath(spec);\n if (localPath) {\n // Hand npm pack a NATIVE filesystem path, never a percent-encoded file URL:\n // npm opens the spec literally, so spaces (`%20`) or a Windows 8.3 `~` short\n // name (`%7E`) escaped by pathToFileURL make pack fail ENOENT on every\n // platform (GH-363). resolveLocalNpmPackagePath already decoded the path.\n return localPath;\n }\n\n const localFileAlias = normalizeNpmLocalFileAliasSpec(spec);\n if (localFileAlias !== spec) {\n return localFileAlias;\n }\n\n if (/^[a-z][a-z0-9+.-]*:/i.test(spec)) {\n return spec;\n }\n\n return spec;\n}\n\n/**\n * Implements normalize npm local file alias spec for the public runtime surface of this module.\n */\nexport function normalizeNpmLocalFileAliasSpec(spec: string, cwd: string = process.cwd()): string {\n const marker = \"@file:\";\n const markerIndex = spec.lastIndexOf(marker);\n if (markerIndex <= 0) {\n return spec;\n }\n const packageName = spec.slice(0, markerIndex);\n const target = spec.slice(markerIndex + marker.length);\n if (packageName.trim().length === 0 || target.trim().length === 0) {\n return spec;\n }\n // `file://host/share` (exactly two leading slashes) is a UNC / network spec,\n // not a local path — leave it for npm to resolve.\n if (target.startsWith(\"//\") && !target.startsWith(\"///\")) {\n return spec;\n }\n // A bare relative target resolves against cwd.\n if (!target.startsWith(\"/\")) {\n return `${packageName}@${path.resolve(cwd, target)}`;\n }\n // Resolve an absolute `file:` URL target to a NATIVE, percent-DECODED path\n // (never an encoded file URL): npm opens the alias target literally, so an\n // escaped path — spaces (`%20`) or a Windows 8.3 `~` short name escaped to\n // `%7E` — fails ENOENT on every platform (GH-363). Decode via URL +\n // decodeURIComponent rather than fileURLToPath, which throws\n // ERR_INVALID_FILE_URL_PATH for a driveless absolute path supplied on Windows;\n // strip the leading slash before a Windows drive letter (`/C:/x` -> `C:/x`).\n let decodedPath: string;\n try {\n decodedPath = decodeURIComponent(new URL(`file:${target}`).pathname);\n } catch {\n // Malformed percent-encoding (e.g. `%ZZ`) makes decodeURIComponent throw a\n // URIError; leave the spec untouched so npm surfaces a clear error instead\n // of crashing the CLI on an uncaught exception.\n return spec;\n }\n const nativePath = /^\\/[A-Za-z]:/.test(decodedPath) ? decodedPath.slice(1) : decodedPath;\n return `${packageName}@${nativePath}`;\n}\n\nfunction parsePackedNpmPackage(stdout: string, packDirectory: string): { tarball: string; package?: string; version?: string } {\n try {\n const parsed = JSON.parse(stdout) as Array<{ filename?: unknown; name?: unknown; version?: unknown }>;\n const first = Array.isArray(parsed) ? parsed[0] : undefined;\n if (first && typeof first.filename === \"string\" && first.filename.trim().length > 0) {\n return {\n tarball: path.resolve(packDirectory, first.filename),\n package: typeof first.name === \"string\" ? first.name : undefined,\n version: typeof first.version === \"string\" ? first.version : undefined,\n };\n }\n } catch {\n // Fall back to the last stdout line for older npm output.\n }\n const lastLine = stdout\n .split(/\\r?\\n/)\n .map((line) => line.trim())\n .filter((line) => line.length > 0)\n .at(-1);\n if (!lastLine) {\n throw new PmCliError(\"npm pack did not report a tarball filename.\", EXIT_CODE.GENERIC_FAILURE);\n }\n return {\n tarball: path.resolve(packDirectory, lastLine),\n };\n}\n\nasync function resolveNpmSourceDirectory(source: NpmInstallSource): Promise<{\n directory: string;\n package?: string;\n version?: string;\n cleanup: () => Promise<void>;\n}> {\n return resolveNpmSourceDirectoryWithRunner(source, runNpmCommand);\n}\n\nasync function resolveNpmSourceDirectoryWithRunner(\n source: NpmInstallSource,\n npmRunner: typeof runNpmCommand,\n): Promise<{\n directory: string;\n package?: string;\n version?: string;\n cleanup: () => Promise<void>;\n}> {\n const localPackageRoot = await resolveLocalNpmPackagePath(source.spec);\n if (localPackageRoot) {\n const packageJsonPath = path.join(localPackageRoot, \"package.json\");\n const packageJson = (await pathExists(packageJsonPath))\n ? JSON.parse(await fs.readFile(packageJsonPath, \"utf8\")) as { name?: unknown; version?: unknown }\n : {};\n return {\n directory: await resolvePackageExtensionDirectory(localPackageRoot, source.input),\n package: typeof packageJson.name === \"string\" ? packageJson.name : undefined,\n version: typeof packageJson.version === \"string\" ? packageJson.version : undefined,\n cleanup: async () => {},\n };\n }\n\n const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), \"pm-npm-package-source-\"));\n const packDirectory = path.join(tempRoot, \"pack\");\n const extractDirectory = path.join(tempRoot, \"extract\");\n await fs.mkdir(packDirectory, { recursive: true });\n await fs.mkdir(extractDirectory, { recursive: true });\n\n try {\n const packSpec = await resolveNpmPackSpec(source.spec);\n const packStdout = await npmRunner([\"pack\", packSpec, \"--json\", \"--pack-destination\", packDirectory]);\n const packed = parsePackedNpmPackage(packStdout, packDirectory);\n await execFileAsync(\"tar\", [\"-xzf\", packed.tarball, \"-C\", extractDirectory], { encoding: \"utf8\" });\n const packageRoot = path.join(extractDirectory, \"package\");\n await installNpmPackageRuntimeDependencies(packageRoot);\n const directory = await resolvePackageExtensionDirectory(packageRoot, source.input);\n return {\n directory,\n package: packed.package,\n version: packed.version,\n cleanup: async () => {\n await fs.rm(tempRoot, { recursive: true, force: true });\n },\n };\n } catch (error: unknown) {\n await fs.rm(tempRoot, { recursive: true, force: true });\n const wrappedError = wrapNpmPackResolutionError(source.spec, error);\n if (wrappedError) {\n throw wrappedError;\n }\n throw error;\n }\n}\n\nasync function installNpmPackageRuntimeDependencies(packageRoot: string): Promise<void> {\n const packageJsonPath = path.join(packageRoot, \"package.json\");\n if (!(await pathExists(packageJsonPath))) {\n return;\n }\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(await fs.readFile(packageJsonPath, \"utf8\")) as unknown;\n } catch {\n return;\n }\n if (typeof parsed !== \"object\" || parsed === null) {\n return;\n }\n\n const manifest = parsed as { dependencies?: unknown; optionalDependencies?: unknown; peerDependencies?: unknown };\n const dependencySpecs = runtimeDependencyInstallSpecs(manifest);\n const shouldLinkHostedPmCli = hasHostedPmCliDependency(manifest);\n if (dependencySpecs.length === 0 && !shouldLinkHostedPmCli) {\n return;\n }\n\n const runtimeOnlyManifest = { ...(parsed as Record<string, unknown>) };\n delete runtimeOnlyManifest.devDependencies;\n const installManifest = { ...runtimeOnlyManifest };\n removeHostedPmCliDependency(installManifest);\n await fs.writeFile(packageJsonPath, `${JSON.stringify(installManifest, null, 2)}\\n`, \"utf8\");\n try {\n await Promise.all([\n fs.rm(path.join(packageRoot, \"package-lock.json\"), { force: true }),\n fs.rm(path.join(packageRoot, \"npm-shrinkwrap.json\"), { force: true }),\n ]);\n\n if (dependencySpecs.length > 0) {\n await runNpmCommand(\n [\n \"install\",\n \"--ignore-scripts\",\n \"--no-audit\",\n \"--fund=false\",\n \"--package-lock=false\",\n \"--no-save\",\n \"--omit=peer\",\n ...dependencySpecs,\n ],\n packageRoot,\n );\n }\n\n if (shouldLinkHostedPmCli) {\n await linkHostedPmCliDependency(packageRoot);\n }\n } finally {\n await fs.writeFile(packageJsonPath, `${JSON.stringify(runtimeOnlyManifest, null, 2)}\\n`, \"utf8\");\n }\n}\n\nfunction hasHostedPmCliDependency(manifest: {\n dependencies?: unknown;\n optionalDependencies?: unknown;\n peerDependencies?: unknown;\n}): boolean {\n for (const dependencyMap of [manifest.dependencies, manifest.optionalDependencies, manifest.peerDependencies]) {\n if (typeof dependencyMap === \"object\" && dependencyMap !== null && PM_CLI_PACKAGE_NAME in dependencyMap) {\n return true;\n }\n }\n return false;\n}\n\nfunction removeHostedPmCliDependency(manifest: Record<string, unknown>): void {\n for (const field of [\"dependencies\", \"optionalDependencies\", \"peerDependencies\"] as const) {\n const dependencyMap = manifest[field];\n if (typeof dependencyMap !== \"object\" || dependencyMap === null) {\n continue;\n }\n const nextMap = { ...(dependencyMap as Record<string, unknown>) };\n delete nextMap[PM_CLI_PACKAGE_NAME];\n if (Object.keys(nextMap).length === 0) {\n delete manifest[field];\n } else {\n manifest[field] = nextMap;\n }\n }\n}\n\nasync function linkHostedPmCliDependency(packageRoot: string): Promise<void> {\n const hostPackageRoot = resolvePmPackageRootFromModule(import.meta.url, [\"../../../..\"]);\n const [scope, packageName] = PM_CLI_PACKAGE_NAME.split(\"/\");\n const scopedDirectory = path.join(packageRoot, \"node_modules\", scope);\n const linkPath = path.join(scopedDirectory, packageName);\n await fs.mkdir(scopedDirectory, { recursive: true });\n await fs.rm(linkPath, { recursive: true, force: true });\n await fs.symlink(hostPackageRoot, linkPath, resolveDirectorySymlinkType(process.platform));\n}\n\nfunction resolveDirectorySymlinkType(platform: NodeJS.Platform): \"dir\" | \"junction\" {\n return platform === \"win32\" ? \"junction\" : \"dir\";\n}\n\nfunction runtimeDependencyInstallSpecs(manifest: {\n dependencies?: unknown;\n optionalDependencies?: unknown;\n peerDependencies?: unknown;\n}): string[] {\n const specs = new Map<string, string>();\n for (const dependencyMap of [manifest.dependencies, manifest.optionalDependencies, manifest.peerDependencies]) {\n if (typeof dependencyMap !== \"object\" || dependencyMap === null) {\n continue;\n }\n for (const [name, version] of Object.entries(dependencyMap)) {\n if (\n name === PM_CLI_PACKAGE_NAME ||\n typeof version !== \"string\" ||\n version.trim().length === 0 ||\n specs.has(name)\n ) {\n continue;\n }\n specs.set(name, `${name}@${version.trim()}`);\n }\n }\n return [...specs.values()];\n}\n\nasync function resolvePackageExtensionDirectory(packageRoot: string, sourceLabel: string): Promise<string> {\n const discovered = await collectPackageExtensionDirectories(packageRoot);\n if (discovered.length === 1) {\n return discovered[0];\n }\n if (discovered.length > 1) {\n const choices = discovered\n .map((entry) => path.relative(packageRoot, entry).replaceAll(path.sep, \"/\"))\n .sort((left, right) => left.localeCompare(right));\n throw new PmCliError(\n `Package source \"${sourceLabel}\" contains multiple extension manifests. Provide an explicit extension path. Candidates: ${choices.join(\", \")}`,\n EXIT_CODE.USAGE,\n );\n }\n throw new PmCliError(\n `Unable to locate a pm extension manifest in package source \"${sourceLabel}\". Package installs currently activate only extension resources, so add package.json pm.extensions or an extensions/ directory. Metadata-only resources like pm.docs/pm.examples are catalog metadata and do not activate commands.`,\n EXIT_CODE.USAGE,\n );\n}\n\nasync function resolveGithubSourceDirectory(cloneDirectory: string, source: GithubInstallSource): Promise<{ directory: string; resolved_subpath?: string }> {\n const candidatePaths: string[] = [];\n /* c8 ignore start -- subpath candidate expansion permutations are covered by source-resolution integration suites */\n if (source.subpath) {\n candidatePaths.push(source.subpath);\n candidatePaths.push(path.posix.join(\".agents/pm/extensions\", source.subpath));\n candidatePaths.push(path.posix.join(\".custom/pm-extensions\", source.subpath));\n candidatePaths.push(path.posix.join(\".custom/pm-extension\", source.subpath));\n }\n /* c8 ignore stop */\n\n for (const candidate of candidatePaths) {\n const absolute = path.resolve(cloneDirectory, candidate);\n if (!isPathWithinDirectory(cloneDirectory, absolute)) {\n // source.subpath is user-controlled; never resolve a manifest outside the\n // cloned repository (path-traversal guard).\n continue;\n }\n if (await pathExists(path.join(absolute, \"manifest.json\"))) {\n return { directory: absolute, resolved_subpath: candidate };\n }\n }\n\n if (await pathExists(path.join(cloneDirectory, \"manifest.json\"))) {\n return { directory: cloneDirectory, resolved_subpath: \".\" };\n }\n\n const discoveredDirectory = await resolvePackageExtensionDirectory(cloneDirectory, source.input);\n return {\n directory: discoveredDirectory,\n resolved_subpath: path.relative(cloneDirectory, discoveredDirectory).replaceAll(path.sep, \"/\"),\n };\n}\n\n/**\n * Implements resolve install source for the public runtime surface of this module.\n */\nexport async function resolveInstallSource(source: InstallSource): Promise<ResolvedInstallSource> {\n if (source.kind === \"local\") {\n let localStats;\n try {\n localStats = await fs.stat(source.absolute_path);\n } catch {\n throw new PmCliError(`Local extension source does not exist: \"${source.absolute_path}\".`, EXIT_CODE.NOT_FOUND);\n }\n if (!localStats.isDirectory()) {\n throw new PmCliError(`Local extension source must be a directory: \"${source.absolute_path}\".`, EXIT_CODE.USAGE);\n }\n const directory = await resolvePackageExtensionDirectory(source.absolute_path, source.input);\n return {\n source,\n directory,\n };\n }\n\n if (source.kind === \"npm\") {\n const resolved = await resolveNpmSourceDirectory(source);\n return {\n source,\n directory: resolved.directory,\n cleanup: resolved.cleanup,\n resolved_subpath: path.relative(path.dirname(resolved.directory), resolved.directory).replaceAll(path.sep, \"/\"),\n npm_package: resolved.package,\n npm_version: resolved.version,\n };\n }\n\n const cloneDirectory = await fs.mkdtemp(path.join(os.tmpdir(), \"pm-extension-source-\"));\n const cloneArgs = [\"clone\", \"--depth\", \"1\"];\n if (source.ref) {\n cloneArgs.push(\"--branch\", source.ref);\n }\n cloneArgs.push(source.repository, cloneDirectory);\n\n try {\n await runGitCommand(cloneArgs);\n const commit = await runGitCommand([\"-C\", cloneDirectory, \"rev-parse\", \"HEAD\"]);\n const resolved = await resolveGithubSourceDirectory(cloneDirectory, source);\n return {\n source,\n directory: resolved.directory,\n resolved_subpath: resolved.resolved_subpath,\n commit,\n cleanup: async () => {\n await fs.rm(cloneDirectory, { recursive: true, force: true });\n },\n };\n } catch (error: unknown) {\n await fs.rm(cloneDirectory, { recursive: true, force: true });\n throw error;\n }\n}\n\n/**\n * Implements are directories equivalent for the public runtime surface of this module.\n */\nexport async function areDirectoriesEquivalent(left: string, right: string): Promise<boolean> {\n if (!(await pathExists(left)) || !(await pathExists(right))) {\n return false;\n }\n const [leftRealPath, rightRealPath] = await Promise.all([fs.realpath(left), fs.realpath(right)]);\n return leftRealPath === rightRealPath;\n}\n\nexport const _testOnlyInstallSources = {\n installNpmPackageRuntimeDependencies,\n npmPackageNameFromSpec,\n parsePackedNpmPackage,\n resolveNpmSourceDirectoryWithRunner,\n resolveNpmSourceDirectory,\n resolveNpmPackSpec,\n resolvePackageExtensionDirectory,\n runtimeDependencyInstallSpecs,\n hasHostedPmCliDependency,\n removeHostedPmCliDependency,\n linkHostedPmCliDependency,\n resolveDirectorySymlinkType,\n runNpmCommand,\n};\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAA0B,MAAM,gCAAgC,CAAC;AAEpF,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC1C,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAoChD,SAAS,mBAAmB,CAAC,QAAgB,EAAE,KAAa,EAAE,WAAoB;IAChF,MAAM,QAAQ,GAAG,QAAQ;SACtB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;SAChC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC3C,IAAI,QAAQ,CAAC,MAA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AU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAC5D,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjG,OAAO,YAAY,KAAK,aAAa,CAAC;AACxC,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,oCAAoC;IACpC,sBAAsB;IACtB,qBAAqB;IACrB,mCAAmC;IACnC,yBAAyB;IACzB,kBAAkB;IAClB,gCAAgC;IAChC,6BAA6B;IAC7B,wBAAwB;IACxB,2BAA2B;IAC3B,yBAAyB;IACzB,2BAA2B;IAC3B,aAAa;CACd,CAAC","debugId":"eab3d475-6769-535e-96a9-6bc5153c9627"}
|
|
1
|
+
{"version":3,"file":"install-sources.js","sources":["cli/commands/extension/install-sources.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/extension/install-sources\n *\n * Implements extension package-management support for Install Sources.\n */\nimport { execFile } from \"node:child_process\";\nimport fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { promisify } from \"node:util\";\nimport { collectPackageExtensionDirectories } from \"../../../core/packages/manifest.js\";\nimport { resolvePmPackageRootFromModule } from \"../../../core/packages/root.js\";\nimport { pathExists } from \"../../../core/fs/fs-utils.js\";\nimport { isPathWithinDirectory } from \"../../../core/fs/path-utils.js\";\nimport { EXIT_CODE } from \"../../../core/shared/constants.js\";\nimport { PmCliError, type PmCliErrorContext } from \"../../../core/shared/errors.js\";\nimport { listBundledPackageAliases } from \"./bundled-catalog.js\";\n\nconst execFileAsync = promisify(execFile);\nconst PM_CLI_PACKAGE_NAME = \"@unbrained/pm-cli\";\nlet bundledPackageAliasesCache: { key: string; aliases: string[] } | undefined;\n\ninterface LocalInstallSource {\n kind: \"local\";\n input: string;\n absolute_path: string;\n}\n\ninterface GithubInstallSource {\n kind: \"github\";\n input: string;\n owner: string;\n repo: string;\n repository: string;\n ref?: string;\n subpath?: string;\n}\n\ninterface NpmInstallSource {\n kind: \"npm\";\n input: string;\n spec: string;\n}\n\ntype InstallSource = LocalInstallSource | GithubInstallSource | NpmInstallSource;\n\ninterface ResolvedInstallSource {\n source: InstallSource;\n directory: string;\n resolved_subpath?: string;\n commit?: string;\n npm_package?: string;\n npm_version?: string;\n cleanup?: () => Promise<void>;\n}\n\nfunction parseGithubPathSpec(pathSpec: string, input: string, refOverride?: string): GithubInstallSource | null {\n const segments = pathSpec\n .split(\"/\")\n .map((segment) => segment.trim())\n .filter((segment) => segment.length > 0);\n if (segments.length < 2) {\n return null;\n }\n const owner = segments[0];\n const repo = segments[1].replace(/\\.git$/i, \"\");\n if (owner.length === 0 || repo.length === 0) {\n return null;\n }\n const tail = segments.slice(2);\n let ref: string | undefined;\n let subpath: string | undefined;\n if (tail[0] === \"tree\" && tail.length >= 2) {\n ref = tail[1];\n subpath = tail.slice(2).join(\"/\");\n } else if (tail.length > 0) {\n subpath = tail.join(\"/\");\n }\n if (typeof refOverride === \"string\" && refOverride.trim().length > 0) {\n ref = refOverride.trim();\n }\n return {\n kind: \"github\",\n input,\n owner,\n repo,\n repository: `https://github.com/${owner}/${repo}.git`,\n ref,\n subpath: subpath && subpath.length > 0 ? subpath : undefined,\n };\n}\n\nfunction parseNpmInstallSource(normalizedInput: string, forceGithub: boolean, refOverride: string | undefined): InstallSource {\n const spec = normalizedInput.slice(\"npm:\".length).trim();\n if (spec.length === 0) {\n throw new PmCliError('npm package source must include a package spec after \"npm:\".', EXIT_CODE.USAGE);\n }\n if (forceGithub) {\n throw new PmCliError('Options \"--gh/--github\" cannot be combined with npm: package sources.', EXIT_CODE.USAGE);\n }\n if (refOverride) {\n throw new PmCliError('Option \"--ref\" cannot be combined with npm: package sources.', EXIT_CODE.USAGE);\n }\n return {\n kind: \"npm\",\n input: normalizedInput,\n spec,\n };\n}\n\n/**\n * Implements parse extension install source for the public runtime surface of this module.\n */\nexport function parseExtensionInstallSource(input: string, options: { forceGithub?: boolean; ref?: string } = {}): InstallSource {\n const normalizedInput = input.trim();\n if (normalizedInput.length === 0) {\n throw new PmCliError(\"Extension source is required for --install.\", EXIT_CODE.USAGE);\n }\n const refOverride = typeof options.ref === \"string\" && options.ref.trim().length > 0 ? options.ref.trim() : undefined;\n\n if (normalizedInput.startsWith(\"npm:\")) {\n return parseNpmInstallSource(normalizedInput, options.forceGithub === true, refOverride);\n }\n\n const maybeGithubByUrl = (() => {\n try {\n const parsed = new URL(normalizedInput);\n if (parsed.hostname !== \"github.com\") {\n return null;\n }\n const pathSpec = parsed.pathname.replace(/^\\/+/, \"\");\n return parseGithubPathSpec(pathSpec, normalizedInput, refOverride);\n } catch {\n return null;\n }\n })();\n if (maybeGithubByUrl) {\n return maybeGithubByUrl;\n }\n\n const strippedDomainInput = normalizedInput.startsWith(\"github.com/\") ? normalizedInput.slice(\"github.com/\".length) : null;\n if (strippedDomainInput) {\n const parsed = parseGithubPathSpec(strippedDomainInput, normalizedInput, refOverride);\n if (!parsed) {\n throw new PmCliError(`Invalid GitHub source \"${normalizedInput}\".`, EXIT_CODE.USAGE);\n }\n return parsed;\n }\n\n if (options.forceGithub) {\n const parsed = parseGithubPathSpec(normalizedInput, normalizedInput, refOverride);\n if (!parsed) {\n throw new PmCliError(`Invalid GitHub shorthand \"${normalizedInput}\".`, EXIT_CODE.USAGE);\n }\n return parsed;\n }\n\n if (/^https?:\\/\\//i.test(normalizedInput)) {\n throw new PmCliError(\n `Unsupported extension source URL \"${normalizedInput}\". Supported remote source host: github.com.`,\n EXIT_CODE.USAGE,\n );\n }\n\n return {\n kind: \"local\",\n input: normalizedInput,\n absolute_path: path.resolve(process.cwd(), normalizedInput),\n };\n}\n\n/**\n * Implements run git command for the public runtime surface of this module.\n */\nexport async function runGitCommand(\n args: string[],\n execRunner: typeof execFileAsync = execFileAsync,\n): Promise<string> {\n try {\n const result = await execRunner(\"git\", args, { encoding: \"utf8\" });\n return (result.stdout ?? \"\").trim();\n } catch (error: unknown) {\n /* c8 ignore start -- stderr-vs-error-message precedence is validated in integration command-runner paths */\n const stderr = typeof error === \"object\" && error !== null && \"stderr\" in error ? String((error as { stderr: unknown }).stderr) : \"\";\n const message = stderr.trim().length > 0 ? stderr.trim() : error instanceof Error ? error.message : String(error);\n /* c8 ignore stop */\n throw new PmCliError(`Git command failed: git ${args.join(\" \")}\\n${message}`, EXIT_CODE.GENERIC_FAILURE);\n }\n}\n\n/**\n * Implements resolve npm command name for the public runtime surface of this module.\n */\nexport function resolveNpmCommandName(platform: NodeJS.Platform = process.platform): \"npm\" | \"npm.cmd\" {\n return platform === \"win32\" ? \"npm.cmd\" : \"npm\";\n}\n\n/**\n * Implements should run npm command in shell for the public runtime surface of this module.\n */\nexport function shouldRunNpmCommandInShell(platform: NodeJS.Platform = process.platform): boolean {\n return platform === \"win32\";\n}\n\nasync function runNpmCommand(\n args: string[],\n cwd?: string,\n execRunner: typeof execFileAsync = execFileAsync,\n): Promise<string> {\n const npmCommand = resolveNpmCommandName();\n try {\n const result = await execRunner(npmCommand, args, { cwd, encoding: \"utf8\", shell: shouldRunNpmCommandInShell() });\n return (result.stdout ?? \"\").trim();\n } catch (error: unknown) {\n const stderr = typeof error === \"object\" && error !== null && \"stderr\" in error ? String((error as { stderr: unknown }).stderr) : \"\";\n const message = stderr.trim().length > 0 ? stderr.trim() : error instanceof Error ? error.message : String(error);\n throw new PmCliError(`npm command failed: ${npmCommand} ${args.join(\" \")}\\n${message}`, EXIT_CODE.GENERIC_FAILURE);\n }\n}\n\nfunction npmPackageNameFromSpec(spec: string): string {\n const trimmed = spec.trim();\n const withoutAlias = trimmed.includes(\"@file:\") ? trimmed.slice(0, trimmed.lastIndexOf(\"@file:\")) : trimmed;\n if (withoutAlias.startsWith(\"@\")) {\n const scoped = withoutAlias.match(/^(@[^/@\\s]+\\/[^/@\\s]+)/);\n return scoped?.[1] ?? withoutAlias;\n }\n const unscoped = withoutAlias.match(/^([^/@\\s]+)/);\n return unscoped?.[1] ?? withoutAlias;\n}\n\n/**\n * Implements check whether npm not found error for the public runtime surface of this module.\n */\nexport function isNpmNotFoundError(error: unknown): boolean {\n const message = error instanceof Error ? error.message : String(error);\n const normalized = message.toLowerCase();\n return (\n normalized.includes(\"npm err! code e404\") ||\n normalized.includes(\"404 not found\") ||\n normalized.includes(\"is not in this registry\")\n );\n}\n\n/**\n * Implements check whether npm pack not found error for the public runtime surface of this module.\n */\nexport function isNpmPackNotFoundError(error: unknown): boolean {\n const message = error instanceof Error ? error.message : String(error);\n const normalized = message.toLowerCase();\n return isNpmNotFoundError(error) || normalized.includes(\"not found\");\n}\n\nfunction isFirstPartyPmPackageName(packageName: string): boolean {\n const normalized = packageName.trim().toLowerCase();\n return normalized.startsWith(\"@unbrained/pm-\") || normalized.startsWith(\"pm-\");\n}\n\n/**\n * Implements build npm not found recovery for the public runtime surface of this module.\n */\nexport function buildNpmNotFoundRecovery(spec: string): {\n message: string;\n context: PmCliErrorContext;\n} {\n const packageName = npmPackageNameFromSpec(spec);\n const isFirstPartyPackage = isFirstPartyPmPackageName(packageName);\n const repoName = packageName.replace(/^.*\\//, \"\");\n const githubSource = isFirstPartyPackage ? `github.com/unbraind/${repoName}` : undefined;\n const nextBestCommand = githubSource ? `pm install --project ${githubSource}` : undefined;\n return {\n message: isFirstPartyPackage\n ? `npm package \"${spec}\" was not found in the registry. If this is an unpublished first-party pm package, install its GitHub repository instead.`\n : `npm package \"${spec}\" was not found in the registry.`,\n context: {\n code: \"npm_package_not_found\",\n required: \"Use an install source that exists, or publish the npm package before installing it with npm:<name>.\",\n why: \"Classifying npm 404s avoids repeated registry retries and gives agents a deterministic fallback path.\",\n examples: nextBestCommand ? [nextBestCommand, `pm package catalog --project --json`] : [`npm view ${packageName}`, `pm package catalog --project --json`],\n nextSteps: nextBestCommand\n ? [\n `Try ${nextBestCommand} if the repository exists.`,\n \"Use pm package catalog --project --json to inspect bundled package aliases before installing.\",\n ]\n : [\n `Verify ${packageName} exists in the npm registry and that you have access to it.`,\n \"Use pm package catalog --project --json to inspect bundled package aliases before installing.\",\n ],\n recovery: {\n attempted_command: `pm install --project npm:${spec}`,\n normalized_args: [\"install\", \"--project\", `npm:${spec}`],\n ...(githubSource && nextBestCommand\n ? {\n fallback_candidates: [\n {\n source: githubSource,\n command: nextBestCommand,\n reason: \"canonical first-party GitHub repository fallback for unpublished pm packages\",\n },\n ],\n next_best_command: nextBestCommand,\n }\n : {}),\n },\n },\n };\n}\n\n/**\n * Implements wrap npm pack resolution error for the public runtime surface of this module.\n */\nexport function wrapNpmPackResolutionError(spec: string, error: unknown): PmCliError | null {\n if (!isNpmPackNotFoundError(error)) {\n return null;\n }\n const recovery = buildNpmNotFoundRecovery(spec);\n return new PmCliError(recovery.message, EXIT_CODE.NOT_FOUND, recovery.context);\n}\n\nasync function resolveLocalNpmPackagePath(spec: string): Promise<string | null> {\n if (path.isAbsolute(spec) || spec.startsWith(\".\") || spec.startsWith(\"..\")) {\n const absolutePath = path.resolve(process.cwd(), spec);\n return (await pathExists(absolutePath)) ? absolutePath : null;\n }\n\n try {\n const parsed = new URL(spec);\n if (parsed.protocol === \"file:\") {\n const absolutePath = fileURLToPath(parsed);\n return (await pathExists(absolutePath)) ? absolutePath : null;\n }\n } catch {\n // Registry package specs are not URLs.\n }\n\n if (!/^[a-z][a-z0-9+.-]*:/i.test(spec)) {\n const absolutePath = path.resolve(process.cwd(), spec);\n if (await pathExists(absolutePath)) {\n return absolutePath;\n }\n }\n\n return null;\n}\n\nasync function resolveNpmPackSpec(spec: string): Promise<string> {\n const localPath = await resolveLocalNpmPackagePath(spec);\n if (localPath) {\n // Hand npm pack a NATIVE filesystem path, never a percent-encoded file URL:\n // npm opens the spec literally, so spaces (`%20`) or a Windows 8.3 `~` short\n // name (`%7E`) escaped by pathToFileURL make pack fail ENOENT on every\n // platform (GH-363). resolveLocalNpmPackagePath already decoded the path.\n return localPath;\n }\n\n const localFileAlias = normalizeNpmLocalFileAliasSpec(spec);\n if (localFileAlias !== spec) {\n return localFileAlias;\n }\n\n if (/^[a-z][a-z0-9+.-]*:/i.test(spec)) {\n return spec;\n }\n\n return spec;\n}\n\n/**\n * Implements normalize npm local file alias spec for the public runtime surface of this module.\n */\nexport function normalizeNpmLocalFileAliasSpec(spec: string, cwd: string = process.cwd()): string {\n const marker = \"@file:\";\n const markerIndex = spec.lastIndexOf(marker);\n if (markerIndex <= 0) {\n return spec;\n }\n const packageName = spec.slice(0, markerIndex);\n const target = spec.slice(markerIndex + marker.length);\n if (packageName.trim().length === 0 || target.trim().length === 0) {\n return spec;\n }\n // `file://host/share` (exactly two leading slashes) is a UNC / network spec,\n // not a local path — leave it for npm to resolve.\n if (target.startsWith(\"//\") && !target.startsWith(\"///\")) {\n return spec;\n }\n // A bare relative target resolves against cwd.\n if (!target.startsWith(\"/\")) {\n return `${packageName}@${path.resolve(cwd, target)}`;\n }\n // Resolve an absolute `file:` URL target to a NATIVE, percent-DECODED path\n // (never an encoded file URL): npm opens the alias target literally, so an\n // escaped path — spaces (`%20`) or a Windows 8.3 `~` short name escaped to\n // `%7E` — fails ENOENT on every platform (GH-363). Decode via URL +\n // decodeURIComponent rather than fileURLToPath, which throws\n // ERR_INVALID_FILE_URL_PATH for a driveless absolute path supplied on Windows;\n // strip the leading slash before a Windows drive letter (`/C:/x` -> `C:/x`).\n let decodedPath: string;\n try {\n decodedPath = decodeURIComponent(new URL(`file:${target}`).pathname);\n } catch {\n // Malformed percent-encoding (e.g. `%ZZ`) makes decodeURIComponent throw a\n // URIError; leave the spec untouched so npm surfaces a clear error instead\n // of crashing the CLI on an uncaught exception.\n return spec;\n }\n const nativePath = /^\\/[A-Za-z]:/.test(decodedPath) ? decodedPath.slice(1) : decodedPath;\n return `${packageName}@${nativePath}`;\n}\n\nfunction parsePackedNpmPackage(stdout: string, packDirectory: string): { tarball: string; package?: string; version?: string } {\n try {\n const parsed = JSON.parse(stdout) as Array<{ filename?: unknown; name?: unknown; version?: unknown }>;\n const first = Array.isArray(parsed) ? parsed[0] : undefined;\n if (first && typeof first.filename === \"string\" && first.filename.trim().length > 0) {\n return {\n tarball: path.resolve(packDirectory, first.filename),\n package: typeof first.name === \"string\" ? first.name : undefined,\n version: typeof first.version === \"string\" ? first.version : undefined,\n };\n }\n } catch {\n // Fall back to the last stdout line for older npm output.\n }\n const lastLine = stdout\n .split(/\\r?\\n/)\n .map((line) => line.trim())\n .filter((line) => line.length > 0)\n .at(-1);\n if (!lastLine) {\n throw new PmCliError(\"npm pack did not report a tarball filename.\", EXIT_CODE.GENERIC_FAILURE);\n }\n return {\n tarball: path.resolve(packDirectory, lastLine),\n };\n}\n\nasync function resolveNpmSourceDirectory(source: NpmInstallSource): Promise<{\n directory: string;\n package?: string;\n version?: string;\n cleanup: () => Promise<void>;\n}> {\n return resolveNpmSourceDirectoryWithRunner(source, runNpmCommand);\n}\n\nasync function resolveNpmSourceDirectoryWithRunner(\n source: NpmInstallSource,\n npmRunner: typeof runNpmCommand,\n): Promise<{\n directory: string;\n package?: string;\n version?: string;\n cleanup: () => Promise<void>;\n}> {\n const localPackageRoot = await resolveLocalNpmPackagePath(source.spec);\n if (localPackageRoot) {\n const packageJsonPath = path.join(localPackageRoot, \"package.json\");\n const packageJson = (await pathExists(packageJsonPath))\n ? JSON.parse(await fs.readFile(packageJsonPath, \"utf8\")) as { name?: unknown; version?: unknown }\n : {};\n return {\n directory: await resolvePackageExtensionDirectory(localPackageRoot, source.input),\n package: typeof packageJson.name === \"string\" ? packageJson.name : undefined,\n version: typeof packageJson.version === \"string\" ? packageJson.version : undefined,\n cleanup: async () => {},\n };\n }\n\n const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), \"pm-npm-package-source-\"));\n const packDirectory = path.join(tempRoot, \"pack\");\n const extractDirectory = path.join(tempRoot, \"extract\");\n await fs.mkdir(packDirectory, { recursive: true });\n await fs.mkdir(extractDirectory, { recursive: true });\n\n try {\n const packSpec = await resolveNpmPackSpec(source.spec);\n const packStdout = await npmRunner([\"pack\", packSpec, \"--json\", \"--pack-destination\", packDirectory]);\n const packed = parsePackedNpmPackage(packStdout, packDirectory);\n await execFileAsync(\"tar\", [\"-xzf\", packed.tarball, \"-C\", extractDirectory], { encoding: \"utf8\" });\n const packageRoot = path.join(extractDirectory, \"package\");\n await installNpmPackageRuntimeDependencies(packageRoot);\n const directory = await resolvePackageExtensionDirectory(packageRoot, source.input);\n return {\n directory,\n package: packed.package,\n version: packed.version,\n cleanup: async () => {\n await fs.rm(tempRoot, { recursive: true, force: true });\n },\n };\n } catch (error: unknown) {\n await fs.rm(tempRoot, { recursive: true, force: true });\n const wrappedError = wrapNpmPackResolutionError(source.spec, error);\n if (wrappedError) {\n throw wrappedError;\n }\n throw error;\n }\n}\n\nasync function installNpmPackageRuntimeDependencies(packageRoot: string): Promise<void> {\n const packageJsonPath = path.join(packageRoot, \"package.json\");\n if (!(await pathExists(packageJsonPath))) {\n return;\n }\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(await fs.readFile(packageJsonPath, \"utf8\")) as unknown;\n } catch {\n return;\n }\n if (typeof parsed !== \"object\" || parsed === null) {\n return;\n }\n\n const manifest = parsed as { dependencies?: unknown; optionalDependencies?: unknown; peerDependencies?: unknown };\n const dependencySpecs = runtimeDependencyInstallSpecs(manifest);\n const shouldLinkHostedPmCli = hasHostedPmCliDependency(manifest);\n if (dependencySpecs.length === 0 && !shouldLinkHostedPmCli) {\n return;\n }\n\n const runtimeOnlyManifest = { ...(parsed as Record<string, unknown>) };\n delete runtimeOnlyManifest.devDependencies;\n const installManifest = { ...runtimeOnlyManifest };\n removeHostedPmCliDependency(installManifest);\n await fs.writeFile(packageJsonPath, `${JSON.stringify(installManifest, null, 2)}\\n`, \"utf8\");\n try {\n await Promise.all([\n fs.rm(path.join(packageRoot, \"package-lock.json\"), { force: true }),\n fs.rm(path.join(packageRoot, \"npm-shrinkwrap.json\"), { force: true }),\n ]);\n\n if (dependencySpecs.length > 0) {\n await runNpmCommand(\n [\n \"install\",\n \"--ignore-scripts\",\n \"--no-audit\",\n \"--fund=false\",\n \"--package-lock=false\",\n \"--no-save\",\n \"--omit=peer\",\n ...dependencySpecs,\n ],\n packageRoot,\n );\n }\n\n if (shouldLinkHostedPmCli) {\n await linkHostedPmCliDependency(packageRoot);\n }\n } finally {\n await fs.writeFile(packageJsonPath, `${JSON.stringify(runtimeOnlyManifest, null, 2)}\\n`, \"utf8\");\n }\n}\n\nfunction hasHostedPmCliDependency(manifest: {\n dependencies?: unknown;\n optionalDependencies?: unknown;\n peerDependencies?: unknown;\n}): boolean {\n for (const dependencyMap of [manifest.dependencies, manifest.optionalDependencies, manifest.peerDependencies]) {\n if (typeof dependencyMap === \"object\" && dependencyMap !== null && PM_CLI_PACKAGE_NAME in dependencyMap) {\n return true;\n }\n }\n return false;\n}\n\nfunction removeHostedPmCliDependency(manifest: Record<string, unknown>): void {\n for (const field of [\"dependencies\", \"optionalDependencies\", \"peerDependencies\"] as const) {\n const dependencyMap = manifest[field];\n if (typeof dependencyMap !== \"object\" || dependencyMap === null) {\n continue;\n }\n const nextMap = { ...(dependencyMap as Record<string, unknown>) };\n delete nextMap[PM_CLI_PACKAGE_NAME];\n if (Object.keys(nextMap).length === 0) {\n delete manifest[field];\n } else {\n manifest[field] = nextMap;\n }\n }\n}\n\nasync function linkHostedPmCliDependency(packageRoot: string): Promise<void> {\n const hostPackageRoot = resolvePmPackageRootFromModule(import.meta.url, [\"../../../..\"]);\n const [scope, packageName] = PM_CLI_PACKAGE_NAME.split(\"/\");\n const scopedDirectory = path.join(packageRoot, \"node_modules\", scope);\n const linkPath = path.join(scopedDirectory, packageName);\n await fs.mkdir(scopedDirectory, { recursive: true });\n await fs.rm(linkPath, { recursive: true, force: true });\n await fs.symlink(hostPackageRoot, linkPath, resolveDirectorySymlinkType(process.platform));\n}\n\nfunction resolveDirectorySymlinkType(platform: NodeJS.Platform): \"dir\" | \"junction\" {\n return platform === \"win32\" ? \"junction\" : \"dir\";\n}\n\nfunction runtimeDependencyInstallSpecs(manifest: {\n dependencies?: unknown;\n optionalDependencies?: unknown;\n peerDependencies?: unknown;\n}): string[] {\n const specs = new Map<string, string>();\n for (const dependencyMap of [manifest.dependencies, manifest.optionalDependencies, manifest.peerDependencies]) {\n if (typeof dependencyMap !== \"object\" || dependencyMap === null) {\n continue;\n }\n for (const [name, version] of Object.entries(dependencyMap)) {\n if (\n name === PM_CLI_PACKAGE_NAME ||\n typeof version !== \"string\" ||\n version.trim().length === 0 ||\n specs.has(name)\n ) {\n continue;\n }\n specs.set(name, `${name}@${version.trim()}`);\n }\n }\n return [...specs.values()];\n}\n\nasync function resolvePackageExtensionDirectory(packageRoot: string, sourceLabel: string): Promise<string> {\n const discovered = await collectPackageExtensionDirectories(packageRoot);\n if (discovered.length === 1) {\n return discovered[0];\n }\n if (discovered.length > 1) {\n const choices = discovered\n .map((entry) => path.relative(packageRoot, entry).replaceAll(path.sep, \"/\"))\n .sort((left, right) => left.localeCompare(right));\n throw new PmCliError(\n `Package source \"${sourceLabel}\" contains multiple extension manifests. Provide an explicit extension path. Candidates: ${choices.join(\", \")}`,\n EXIT_CODE.USAGE,\n );\n }\n throw new PmCliError(\n `Unable to locate a pm extension manifest in package source \"${sourceLabel}\". Package installs currently activate only extension resources, so add package.json pm.extensions or an extensions/ directory. Metadata-only resources like pm.docs/pm.examples are catalog metadata and do not activate commands.`,\n EXIT_CODE.USAGE,\n );\n}\n\nasync function resolveGithubSourceDirectory(cloneDirectory: string, source: GithubInstallSource): Promise<{ directory: string; resolved_subpath?: string }> {\n const candidatePaths: string[] = [];\n /* c8 ignore start -- subpath candidate expansion permutations are covered by source-resolution integration suites */\n if (source.subpath) {\n candidatePaths.push(source.subpath);\n candidatePaths.push(path.posix.join(\".agents/pm/extensions\", source.subpath));\n candidatePaths.push(path.posix.join(\".custom/pm-extensions\", source.subpath));\n candidatePaths.push(path.posix.join(\".custom/pm-extension\", source.subpath));\n }\n /* c8 ignore stop */\n\n for (const candidate of candidatePaths) {\n const absolute = path.resolve(cloneDirectory, candidate);\n if (!isPathWithinDirectory(cloneDirectory, absolute)) {\n // source.subpath is user-controlled; never resolve a manifest outside the\n // cloned repository (path-traversal guard).\n continue;\n }\n if (await pathExists(path.join(absolute, \"manifest.json\"))) {\n return { directory: absolute, resolved_subpath: candidate };\n }\n }\n\n if (await pathExists(path.join(cloneDirectory, \"manifest.json\"))) {\n return { directory: cloneDirectory, resolved_subpath: \".\" };\n }\n\n const discoveredDirectory = await resolvePackageExtensionDirectory(cloneDirectory, source.input);\n return {\n directory: discoveredDirectory,\n resolved_subpath: path.relative(cloneDirectory, discoveredDirectory).replaceAll(path.sep, \"/\"),\n };\n}\n\n/**\n * Bare package-ish names (no path separators, or a single-scope npm name) that\n * miss local resolution are almost always intended as npm or bundled installs,\n * so the not-found error must route agents to those sources instead of dead-ending.\n */\nfunction looksLikeBarePackageName(input: string): boolean {\n const trimmed = input.trim();\n if (trimmed.length === 0 || trimmed.startsWith(\".\") || trimmed.startsWith(\"~\")) {\n return false;\n }\n if (trimmed.startsWith(\"@\")) {\n return trimmed.split(\"/\").length === 2;\n }\n return !trimmed.includes(\"/\") && !trimmed.includes(\"\\\\\");\n}\n\nasync function buildLocalSourceNotFoundError(source: LocalInstallSource): Promise<PmCliError> {\n const baseMessage = `Local extension source does not exist: \"${source.absolute_path}\".`;\n const input = source.input.trim();\n if (!looksLikeBarePackageName(input)) {\n return new PmCliError(baseMessage, EXIT_CODE.NOT_FOUND);\n }\n let bundledAliases: string[] = [];\n try {\n const envPackageRoot = process.env.PM_CLI_PACKAGE_ROOT;\n const cacheKey = typeof envPackageRoot === \"string\" && envPackageRoot.trim().length > 0\n ? path.resolve(envPackageRoot.trim())\n : \"\";\n if (bundledPackageAliasesCache?.key !== cacheKey) {\n bundledPackageAliasesCache = {\n key: cacheKey,\n aliases: await listBundledPackageAliases(),\n };\n }\n bundledAliases = bundledPackageAliasesCache.aliases;\n } catch {\n // Alias discovery is best-effort; the npm: hint alone still unblocks agents.\n }\n const nextSteps = [\n `Retry with pm install npm:${input} if the package is published to npm.`,\n `Or inspect bundled packages with pm package catalog --project --json before installing by alias. Known aliases (blank means none found): ${bundledAliases.join(\", \")}`,\n ];\n return new PmCliError(\n `${baseMessage} \"${input}\" did not match a local directory, bundled package alias, or bundled package name; if you meant an npm package, install it as \"npm:${input}\".`,\n EXIT_CODE.NOT_FOUND,\n {\n code: \"local_source_not_found_bare_name\",\n required: `Use \"npm:${input}\" for npm registry packages, a bundled catalog alias, or an existing local directory path.`,\n why: \"Bare names resolve as local paths only after bundled aliases, so unmatched names need an explicit npm: source.\",\n examples: [\n `pm install npm:${input}`,\n \"pm package catalog --project --json\",\n ],\n nextSteps,\n recovery: {\n attempted_command: `pm install ${input}`,\n normalized_args: [\"install\", input],\n next_best_command: `pm install npm:${input}`,\n },\n },\n );\n}\n\n/**\n * Implements resolve install source for the public runtime surface of this module.\n */\nexport async function resolveInstallSource(source: InstallSource): Promise<ResolvedInstallSource> {\n if (source.kind === \"local\") {\n let localStats;\n try {\n localStats = await fs.stat(source.absolute_path);\n } catch {\n throw await buildLocalSourceNotFoundError(source);\n }\n if (!localStats.isDirectory()) {\n throw new PmCliError(`Local extension source must be a directory: \"${source.absolute_path}\".`, EXIT_CODE.USAGE);\n }\n const directory = await resolvePackageExtensionDirectory(source.absolute_path, source.input);\n return {\n source,\n directory,\n };\n }\n\n if (source.kind === \"npm\") {\n const resolved = await resolveNpmSourceDirectory(source);\n return {\n source,\n directory: resolved.directory,\n cleanup: resolved.cleanup,\n resolved_subpath: path.relative(path.dirname(resolved.directory), resolved.directory).replaceAll(path.sep, \"/\"),\n npm_package: resolved.package,\n npm_version: resolved.version,\n };\n }\n\n const cloneDirectory = await fs.mkdtemp(path.join(os.tmpdir(), \"pm-extension-source-\"));\n const cloneArgs = [\"clone\", \"--depth\", \"1\"];\n if (source.ref) {\n cloneArgs.push(\"--branch\", source.ref);\n }\n cloneArgs.push(source.repository, cloneDirectory);\n\n try {\n await runGitCommand(cloneArgs);\n const commit = await runGitCommand([\"-C\", cloneDirectory, \"rev-parse\", \"HEAD\"]);\n const resolved = await resolveGithubSourceDirectory(cloneDirectory, source);\n return {\n source,\n directory: resolved.directory,\n resolved_subpath: resolved.resolved_subpath,\n commit,\n cleanup: async () => {\n await fs.rm(cloneDirectory, { recursive: true, force: true });\n },\n };\n } catch (error: unknown) {\n await fs.rm(cloneDirectory, { recursive: true, force: true });\n throw error;\n }\n}\n\n/**\n * Implements are directories equivalent for the public runtime surface of this module.\n */\nexport async function areDirectoriesEquivalent(left: string, right: string): Promise<boolean> {\n if (!(await pathExists(left)) || !(await pathExists(right))) {\n return false;\n }\n const [leftRealPath, rightRealPath] = await Promise.all([fs.realpath(left), fs.realpath(right)]);\n return leftRealPath === rightRealPath;\n}\n\nexport const _testOnlyInstallSources = {\n installNpmPackageRuntimeDependencies,\n npmPackageNameFromSpec,\n parsePackedNpmPackage,\n resolveNpmSourceDirectoryWithRunner,\n resolveNpmSourceDirectory,\n resolveNpmPackSpec,\n resolvePackageExtensionDirectory,\n runtimeDependencyInstallSpecs,\n hasHostedPmCliDependency,\n removeHostedPmCliDependency,\n linkHostedPmCliDependency,\n resolveDirectorySymlinkType,\n runNpmCommand,\n};\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EAAE,8BAA8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AAC,CAAC;YAChE,CAAC;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,EAAE,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9D,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,IAAY,EAAE,KAAa;IACxE,IAAI,CAAC,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAC5D,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjG,OAAO,YAAY,KAAK,aAAa,CAAC;AACxC,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,oCAAoC;IACpC,sBAAsB;IACtB,qBAAqB;IACrB,mCAAmC;IACnC,yBAAyB;IACzB,kBAAkB;IAClB,gCAAgC;IAChC,6BAA6B;IAC7B,wBAAwB;IACxB,2BAA2B;IAC3B,yBAAyB;IACzB,2BAA2B;IAC3B,aAAa;CACd,CAAC","debugId":"cc53d374-129f-5ffe-9949-85ed5b45c268"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm health command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2b3c6d60-bc83-523e-8b95-c5923f6cac7a")}catch(e){}}();
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { resolveItemTypeRegistry } from "../../core/item/type-registry.js";
|
|
@@ -740,6 +740,8 @@ const HEALTH_DETAIL_SUMMARIZERS = {
|
|
|
740
740
|
semantic_runtime_available: details.semantic_runtime_available,
|
|
741
741
|
compatibility_mode_auto_defaults: details.compatibility_mode_auto_defaults,
|
|
742
742
|
auto_ollama_defaults_applied: details.auto_ollama_defaults_applied,
|
|
743
|
+
auto_ollama_defaults_skipped_reason: details.auto_ollama_defaults_skipped_reason,
|
|
744
|
+
auto_ollama_defaults_remediation: details.auto_ollama_defaults_remediation,
|
|
743
745
|
refresh_policy: details.refresh_policy,
|
|
744
746
|
provider_active: details.provider_active,
|
|
745
747
|
vector_store_active: details.vector_store_active,
|
|
@@ -1172,10 +1174,10 @@ async function buildHistoryDriftCheck(pmRoot, items) {
|
|
|
1172
1174
|
warnings,
|
|
1173
1175
|
};
|
|
1174
1176
|
}
|
|
1175
|
-
function buildVectorizationRuntimeSnapshot(settings) {
|
|
1177
|
+
function buildVectorizationRuntimeSnapshot(settings, pmRoot) {
|
|
1176
1178
|
const runtimeDefaults = resolveSettingsWithSemanticRuntimeDefaults(settings);
|
|
1177
1179
|
const providerResolution = resolveEmbeddingProviders(runtimeDefaults.settings);
|
|
1178
|
-
const vectorStoreResolution = resolveVectorStores(runtimeDefaults.settings);
|
|
1180
|
+
const vectorStoreResolution = resolveVectorStores(runtimeDefaults.settings, pmRoot);
|
|
1179
1181
|
const runtimeEmbeddingIdentity = providerResolution.active
|
|
1180
1182
|
? buildVectorizationEmbeddingIdentity(providerResolution.active.name, providerResolution.active.model)
|
|
1181
1183
|
: null;
|
|
@@ -1264,7 +1266,7 @@ function vectorizationRefreshAttempted(refreshPolicy, semanticRuntimeAvailable,
|
|
|
1264
1266
|
return refreshPolicy.enabled && staleBefore.length > 0 && semanticRuntimeAvailable;
|
|
1265
1267
|
}
|
|
1266
1268
|
async function buildVectorizationCheck(pmRoot, settings, items, refreshPolicy, verboseStaleItems) {
|
|
1267
|
-
const snapshot = buildVectorizationRuntimeSnapshot(settings);
|
|
1269
|
+
const snapshot = buildVectorizationRuntimeSnapshot(settings, pmRoot);
|
|
1268
1270
|
const ledgerBefore = await readVectorizationStatusLedger(pmRoot);
|
|
1269
1271
|
const staleBefore = snapshot.semanticRuntimeAvailable ? collectStaleVectorizationIds(items, ledgerBefore.entries) : [];
|
|
1270
1272
|
const refreshResult = await refreshStaleVectorizationItems({ pmRoot, snapshot, refreshPolicy, staleBefore });
|
|
@@ -1297,6 +1299,8 @@ async function buildVectorizationCheck(pmRoot, settings, items, refreshPolicy, v
|
|
|
1297
1299
|
semantic_runtime_available: snapshot.semanticRuntimeAvailable,
|
|
1298
1300
|
compatibility_mode_auto_defaults: snapshot.runtimeDefaults.auto_ollama_defaults_applied,
|
|
1299
1301
|
auto_ollama_defaults_applied: snapshot.runtimeDefaults.auto_ollama_defaults_applied,
|
|
1302
|
+
auto_ollama_defaults_skipped_reason: snapshot.runtimeDefaults.auto_ollama_defaults_skipped_reason ?? null,
|
|
1303
|
+
auto_ollama_defaults_remediation: snapshot.runtimeDefaults.auto_ollama_defaults_remediation ?? null,
|
|
1300
1304
|
refresh_policy: buildVectorizationRefreshPolicyDetails(refreshPolicy),
|
|
1301
1305
|
...buildVectorizationProviderDetails(settings, snapshot),
|
|
1302
1306
|
embedding_identity_changed: embeddingIdentityChanged,
|
|
@@ -1657,4 +1661,4 @@ export const _testOnlyHealthCommand = {
|
|
|
1657
1661
|
warningCode,
|
|
1658
1662
|
};
|
|
1659
1663
|
//# sourceMappingURL=health.js.map
|
|
1660
|
-
//# debugId=
|
|
1664
|
+
//# debugId=2b3c6d60-bc83-523e-8b95-c5923f6cac7a
|