@unbrained/pm-cli 2026.6.5 → 2026.6.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 +77 -0
- package/CONTRIBUTING.md +1 -0
- package/README.md +17 -5
- package/dist/cli/commander-usage.js +74 -4
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/aggregate.d.ts +8 -0
- package/dist/cli/commands/aggregate.js +84 -7
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.js +10 -3
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.js +13 -10
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/close.d.ts +1 -1
- package/dist/cli/commands/close.js +20 -10
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +87 -18
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +5 -4
- package/dist/cli/commands/config.js +50 -2
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.js +6 -3
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/copy.d.ts +14 -0
- package/dist/cli/commands/copy.js +153 -0
- package/dist/cli/commands/copy.js.map +1 -0
- package/dist/cli/commands/extension/doctor.js +62 -2
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.d.ts +8 -0
- package/dist/cli/commands/extension/install-sources.js +82 -2
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +29 -0
- package/dist/cli/commands/extension.js +61 -2
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/gc.d.ts +8 -1
- package/dist/cli/commands/gc.js +26 -3
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.d.ts +9 -0
- package/dist/cli/commands/get.js +23 -2
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.js +15 -2
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.d.ts +39 -0
- package/dist/cli/commands/history-compact.js +262 -0
- package/dist/cli/commands/history-compact.js.map +1 -0
- package/dist/cli/commands/history.d.ts +4 -1
- package/dist/cli/commands/history.js +12 -24
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +3 -0
- package/dist/cli/commands/index.js +5 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/list.d.ts +2 -0
- package/dist/cli/commands/list.js +87 -9
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/reindex.js +8 -4
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/search.d.ts +1 -0
- package/dist/cli/commands/search.js +232 -35
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/stats.d.ts +8 -1
- package/dist/cli/commands/stats.js +18 -17
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/telemetry.d.ts +8 -0
- package/dist/cli/commands/telemetry.js +253 -0
- package/dist/cli/commands/telemetry.js.map +1 -0
- package/dist/cli/error-guidance.js +26 -2
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.d.ts +1 -0
- package/dist/cli/extension-command-help.js +3 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/help-content.js +19 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.js +13 -21
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +24 -6
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +52 -17
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +55 -8
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +5 -5
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +21 -3
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-5UROHJ3D.js +16 -0
- package/dist/cli-bundle/chunks/{activity-3RWRRNOW.js → activity-YVB3QRTE.js} +11 -11
- package/dist/cli-bundle/chunks/{aggregate-OOAGKWRG.js → aggregate-LH66F75F.js} +87 -17
- package/dist/cli-bundle/chunks/aggregate-LH66F75F.js.map +7 -0
- package/dist/cli-bundle/chunks/{aggregate-J35K7WZB.js → aggregate-OHSWFQJM.js} +88 -18
- package/dist/cli-bundle/chunks/aggregate-OHSWFQJM.js.map +1 -0
- package/dist/cli-bundle/chunks/{append-PNN6UIBZ.js → append-2PPYFAG5.js} +8 -8
- package/dist/cli-bundle/chunks/{append-5JE3YGXU.js → append-AUGT5W6J.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-26KTVXJW.js → chunk-2IF7WLB7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KA24HME7.js → chunk-2IXCHCLM.js} +5 -6
- package/dist/cli-bundle/chunks/chunk-2IXCHCLM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XX5LRINW.js → chunk-2OJHLWBZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ASQM3IF5.js → chunk-3A2CMEM7.js} +5 -4
- package/dist/cli-bundle/chunks/{chunk-S3CV7JGJ.js → chunk-3EOBJOF4.js} +5 -4
- package/dist/cli-bundle/chunks/{chunk-N5YF3VFN.js → chunk-42LOFGJS.js} +91 -16
- package/dist/cli-bundle/chunks/chunk-42LOFGJS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WIKR7KFL.js → chunk-4CHEG6UK.js} +108 -21
- package/dist/cli-bundle/chunks/chunk-4CHEG6UK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4QCR4QW3.js → chunk-4GHZR3BA.js} +56 -28
- package/dist/cli-bundle/chunks/chunk-4GHZR3BA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-B3N4TKNL.js → chunk-5AXMRKN5.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-JQI2HE55.js → chunk-6J4K6JLA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-V3JQ4IPL.js → chunk-6RZXO5M2.js} +102 -22
- package/dist/cli-bundle/chunks/chunk-6RZXO5M2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BNL6S7QH.js → chunk-AVJD6VTA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NQP3ECKF.js → chunk-B2KZGPM2.js} +39 -8
- package/dist/cli-bundle/chunks/chunk-B2KZGPM2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RQAWLSUU.js → chunk-B5RF3IP7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UFCG3SWR.js → chunk-C5W2UH56.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3OH4DAEB.js → chunk-CKLBZHS7.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-GNHVV4SY.js → chunk-CLD3XNCH.js} +124 -20
- package/dist/cli-bundle/chunks/chunk-CLD3XNCH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RANZIID5.js → chunk-FHHBD7PN.js} +38 -7
- package/dist/cli-bundle/chunks/chunk-FHHBD7PN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GFWHHMVV.js → chunk-FY6Z3FYY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-CCUFLH4J.js → chunk-GNIUOLZ2.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-ZRVSMOMR.js → chunk-GPXQBR3H.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-SZQCER6S.js → chunk-GUZBNB3G.js} +27 -5
- package/dist/cli-bundle/chunks/chunk-GUZBNB3G.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GPGAYASV.js → chunk-H7EO3QA3.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-MISYRLEP.js → chunk-HLC3KTLP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KK6YPGH3.js → chunk-HMMMWBK2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4PJQSECJ.js → chunk-HRMHZ4RV.js} +26 -4
- package/dist/cli-bundle/chunks/chunk-HRMHZ4RV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CJDQB2ED.js → chunk-HV5SSZXF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ATBVS6WW.js → chunk-IMCJBN2Q.js} +23 -14
- package/dist/cli-bundle/chunks/chunk-IMCJBN2Q.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FVXM3GKS.js → chunk-KNGVP5WJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OIQIXTNB.js → chunk-KR6R465K.js} +304 -215
- package/dist/cli-bundle/chunks/chunk-KR6R465K.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UOVLWB47.js → chunk-LI65XLJR.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-AXXKLVTW.js → chunk-LIN2BPJ7.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-LMTOY5HE.js +112 -0
- package/dist/cli-bundle/chunks/chunk-LMTOY5HE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Y2AKE2HS.js → chunk-LQHBENVW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-D5X7N6FI.js → chunk-LXO6V66E.js} +14 -14
- package/dist/cli-bundle/chunks/{chunk-TK633IVD.js → chunk-M2PW7EZU.js} +26 -7
- package/dist/cli-bundle/chunks/chunk-M2PW7EZU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DFIZGAI5.js → chunk-MOYM2C3J.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-ZQ4F6EC4.js → chunk-MWRS7Z4P.js} +127 -23
- package/dist/cli-bundle/chunks/chunk-MWRS7Z4P.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5PAOPUZX.js → chunk-NHR2QXXZ.js} +24 -15
- package/dist/cli-bundle/chunks/chunk-NHR2QXXZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OUF3ARDX.js → chunk-NQL32HQ5.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-TBQVUNVH.js → chunk-O7HSSFCC.js} +65 -16
- package/dist/cli-bundle/chunks/chunk-O7HSSFCC.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GCAVRLGE.js → chunk-OKSKJKHX.js} +9 -9
- package/dist/cli-bundle/chunks/chunk-QQL5QSTZ.js +1572 -0
- package/dist/cli-bundle/chunks/chunk-QQL5QSTZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-A6PEXMYN.js → chunk-R3V3YCMH.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-T2ORWB6D.js → chunk-RVPTZKBC.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-K47WAYQV.js → chunk-SFFVGNHC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-DFUSXJDE.js → chunk-SQPKRA54.js} +14 -14
- package/dist/cli-bundle/chunks/chunk-THDEID2Z.js +115 -0
- package/dist/cli-bundle/chunks/chunk-THDEID2Z.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-G5BACLYH.js → chunk-TINUJMWN.js} +92 -17
- package/dist/cli-bundle/chunks/chunk-TINUJMWN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JB4RGL4V.js → chunk-TNPBPNII.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-XG7RJYHV.js → chunk-TP4DDY27.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-ORTLYVA4.js → chunk-TYJJOTUA.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-HZOS2UG5.js → chunk-UAQOQ7IE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-D3WUNETC.js → chunk-UEWA73ZZ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-O5IBJE6S.js → chunk-UIIQC5YO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SRVKTWPR.js → chunk-UJUT6AHZ.js} +314 -39
- package/dist/cli-bundle/chunks/chunk-UJUT6AHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SSFMJCPF.js → chunk-UT6WFXW2.js} +6 -7
- package/dist/cli-bundle/chunks/chunk-UT6WFXW2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KBG47ZOY.js → chunk-UYQ7HXH4.js} +10 -6
- package/dist/cli-bundle/chunks/chunk-UYQ7HXH4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LDJK7SHN.js → chunk-V6EYFTRL.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-5IRA6IYD.js → chunk-WAA7UI6M.js} +58 -30
- package/dist/cli-bundle/chunks/chunk-WAA7UI6M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HPH6X4ZZ.js → chunk-WCQZBDDH.js} +10 -6
- package/dist/cli-bundle/chunks/{chunk-HPH6X4ZZ.js.map → chunk-WCQZBDDH.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-WR5567FH.js +1582 -0
- package/dist/cli-bundle/chunks/chunk-WR5567FH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TQ3ZK6VD.js → chunk-WYEXLDDY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-4LTBNUYT.js → chunk-X4IZKYHP.js} +307 -32
- package/dist/cli-bundle/chunks/chunk-X4IZKYHP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KCMIYKTA.js → chunk-X7UHMKPE.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7K24QB23.js → chunk-XS3O2TFJ.js} +27 -8
- package/dist/cli-bundle/chunks/chunk-XS3O2TFJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-EHXPIKKP.js → chunk-XYNT7UFP.js} +303 -207
- package/dist/cli-bundle/chunks/chunk-XYNT7UFP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-CWT53EYT.js → chunk-YBZW2QQ7.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-VGO2T3TY.js → chunk-YO3THIJF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-5KB4X7YY.js → chunk-YPH4ESA2.js} +66 -17
- package/dist/cli-bundle/chunks/chunk-YPH4ESA2.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-ZFA7HKU4.js → claim-BJ4QMPJC.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-AZLP7YFO.js → claim-KW743OSW.js} +10 -10
- package/dist/cli-bundle/chunks/close-P4ZBKODL.js +13 -0
- package/dist/cli-bundle/chunks/{close-65DFYAVS.js → close-SYHSRZDC.js} +8 -8
- package/dist/cli-bundle/chunks/{close-many-UKZSQGM7.js → close-many-DBLEYFOY.js} +29 -26
- package/dist/cli-bundle/chunks/close-many-DBLEYFOY.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-many-AKPZNSGI.js → close-many-LAC5VR4G.js} +30 -27
- package/dist/cli-bundle/chunks/close-many-LAC5VR4G.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-AGBNSJJH.js → comments-JEO6HHVM.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-CJWXQI7X.js → comments-YT2PQ5DD.js} +10 -10
- package/dist/cli-bundle/chunks/{config-DDPYIA6J.js → config-RZRVS3ZV.js} +127 -11
- package/dist/cli-bundle/chunks/config-RZRVS3ZV.js.map +1 -0
- package/dist/cli-bundle/chunks/{config-5ON3ADRH.js → config-YJSAAADD.js} +128 -12
- package/dist/cli-bundle/chunks/config-YJSAAADD.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-E6U3DWVM.js → context-LGYEEKAW.js} +14 -14
- package/dist/cli-bundle/chunks/{context-E6U3DWVM.js.map → context-LGYEEKAW.js.map} +2 -2
- package/dist/cli-bundle/chunks/{context-ZOJEN5VT.js → context-ZUH5IOOI.js} +15 -15
- package/dist/cli-bundle/chunks/context-ZUH5IOOI.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-CXSFM45B.js → contracts-YXJ6NXKH.js} +11 -5
- package/dist/cli-bundle/chunks/contracts-YXJ6NXKH.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-LCSX5R53.js → contracts-ZIBXROPE.js} +12 -6
- package/dist/cli-bundle/chunks/contracts-ZIBXROPE.js.map +1 -0
- package/dist/cli-bundle/chunks/copy-BZALX5MQ.js +182 -0
- package/dist/cli-bundle/chunks/copy-BZALX5MQ.js.map +1 -0
- package/dist/cli-bundle/chunks/copy-YPWEIAPD.js +185 -0
- package/dist/cli-bundle/chunks/copy-YPWEIAPD.js.map +7 -0
- package/dist/cli-bundle/chunks/create-4DS2QWQC.js +27 -0
- package/dist/cli-bundle/chunks/{create-WYFKN2U4.js → create-CF7EVRX7.js} +13 -13
- package/dist/cli-bundle/chunks/{delete-ZXWC56WO.js → delete-KR4VBWVE.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-RONNH4F4.js → delete-XLZRTRKR.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-WII3O4HB.js → deps-2YTXD3VM.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-EHXIFOZR.js → deps-GZMFMTGS.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-PDREIMLS.js → docs-SLROFEQ4.js} +9 -9
- package/dist/cli-bundle/chunks/{docs-JMVCFNHH.js → docs-ZHISRR2D.js} +9 -9
- package/dist/cli-bundle/chunks/{extension-G6UXSM5S.js → extension-3C7OOI4F.js} +8 -6
- package/dist/cli-bundle/chunks/{extension-B4ROVWJD.js → extension-XYCUXICD.js} +8 -6
- package/dist/cli-bundle/chunks/{files-2PN7UM2D.js → files-FUWF2FYJ.js} +9 -9
- package/dist/cli-bundle/chunks/{files-MXYS5W4M.js → files-J4I5IU4O.js} +9 -9
- package/dist/cli-bundle/chunks/gc-34NXSNSN.js +362 -0
- package/dist/cli-bundle/chunks/gc-34NXSNSN.js.map +1 -0
- package/dist/cli-bundle/chunks/gc-SPIIZX3A.js +372 -0
- package/dist/cli-bundle/chunks/gc-SPIIZX3A.js.map +7 -0
- package/dist/cli-bundle/chunks/{get-WXMLRG7M.js → get-SZKNRHMA.js} +34 -12
- package/dist/cli-bundle/chunks/get-SZKNRHMA.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-CINFEUIY.js → get-VITKYP6S.js} +33 -11
- package/dist/cli-bundle/chunks/get-VITKYP6S.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-IT5DBPRJ.js → health-4SNTA2TF.js} +27 -13
- package/dist/cli-bundle/chunks/health-4SNTA2TF.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-5VPOJQ53.js → health-7G3EPM57.js} +28 -14
- package/dist/cli-bundle/chunks/health-7G3EPM57.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-FLZIP7PM.js → history-SDAWYZR3.js} +10 -10
- package/dist/cli-bundle/chunks/history-YDUEILKP.js +20 -0
- package/dist/cli-bundle/chunks/history-compact-DMW536VH.js +287 -0
- package/dist/cli-bundle/chunks/history-compact-DMW536VH.js.map +1 -0
- package/dist/cli-bundle/chunks/history-compact-POTZGG7K.js +290 -0
- package/dist/cli-bundle/chunks/history-compact-POTZGG7K.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-redact-SSZBAD76.js → history-redact-EPJ7GENL.js} +11 -11
- package/dist/cli-bundle/chunks/history-redact-KASLLPE7.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-X7CO5JJZ.js → history-repair-IJ7LLBET.js} +11 -11
- package/dist/cli-bundle/chunks/{history-repair-KC5ZOJRZ.js → history-repair-YNESJRT6.js} +11 -11
- package/dist/cli-bundle/chunks/init-IGSS4GNH.js +17 -0
- package/dist/cli-bundle/chunks/{init-6MRFVOLH.js → init-YHVBTEET.js} +9 -8
- package/dist/cli-bundle/chunks/{learnings-DCX55BNX.js → learnings-4YBMIVCZ.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-A3CLB5CO.js → learnings-T4PF24YN.js} +10 -10
- package/dist/cli-bundle/chunks/{list-DBRECOG4.js → list-3KEVBOYW.js} +10 -10
- package/dist/cli-bundle/chunks/list-E44O2K64.js +20 -0
- package/dist/cli-bundle/chunks/{notes-42LIC3UE.js → notes-FLUCNJSH.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-P5O3VMQ3.js → notes-GJKALVZM.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-HDQXEUKD.js → plan-T5MMZLI3.js} +13 -13
- package/dist/cli-bundle/chunks/{plan-IGTE3WOJ.js → plan-YYMIL3HV.js} +13 -13
- package/dist/cli-bundle/chunks/{register-list-query-EMNSIUO4.js → register-list-query-I65EZ3HB.js} +33 -27
- package/dist/cli-bundle/chunks/register-list-query-I65EZ3HB.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-AG3XKXWL.js → register-list-query-OECMHO4G.js} +32 -26
- package/dist/cli-bundle/chunks/register-list-query-OECMHO4G.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-M3YS6XDO.js → register-mutation-2FLXORLR.js} +65 -47
- package/dist/cli-bundle/chunks/register-mutation-2FLXORLR.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-RSMT6DPK.js → register-mutation-5GPDEKHR.js} +64 -46
- package/dist/cli-bundle/chunks/register-mutation-5GPDEKHR.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-KYUOOOOD.js → register-operations-BNGAUMGK.js} +71 -35
- package/dist/cli-bundle/chunks/register-operations-BNGAUMGK.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-Q54JQZUN.js → register-operations-GQKT35H5.js} +70 -34
- package/dist/cli-bundle/chunks/register-operations-GQKT35H5.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-DI6P7X75.js → register-setup-DNDCGZ4O.js} +18 -18
- package/dist/cli-bundle/chunks/{register-setup-DI6P7X75.js.map → register-setup-DNDCGZ4O.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-YJKIQRKA.js → register-setup-EJY44FPH.js} +17 -17
- package/dist/cli-bundle/chunks/{register-setup-YJKIQRKA.js.map → register-setup-EJY44FPH.js.map} +2 -2
- package/dist/cli-bundle/chunks/{restore-2XVTBLKQ.js → restore-DDJGVZIN.js} +11 -11
- package/dist/cli-bundle/chunks/restore-SJSASGZP.js +17 -0
- package/dist/cli-bundle/chunks/{schema-V6BX65Q2.js → schema-B7NQ6XVP.js} +8 -8
- package/dist/cli-bundle/chunks/{schema-LVXZWFGY.js → schema-HEGYH6CE.js} +8 -8
- package/dist/cli-bundle/chunks/{search-C7NPB7G7.js → search-DVVQ4UO2.js} +421 -42
- package/dist/cli-bundle/chunks/search-DVVQ4UO2.js.map +1 -0
- package/dist/cli-bundle/chunks/{search-5A3BMFA7.js → search-JNEZJV7H.js} +427 -41
- package/dist/cli-bundle/chunks/search-JNEZJV7H.js.map +7 -0
- package/dist/cli-bundle/chunks/stats-7JDIJRDH.js +202 -0
- package/dist/cli-bundle/chunks/stats-7JDIJRDH.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-SYTJRR4Z.js +212 -0
- package/dist/cli-bundle/chunks/stats-SYTJRR4Z.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-4HHWD5Y7.js +251 -0
- package/dist/cli-bundle/chunks/telemetry-4HHWD5Y7.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-EGWP7ZUX.js +248 -0
- package/dist/cli-bundle/chunks/telemetry-EGWP7ZUX.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-OFYONO3C.js → test-IIELLSZX.js} +14 -13
- package/dist/cli-bundle/chunks/test-ML5RLWXE.js +32 -0
- package/dist/cli-bundle/chunks/{test-all-EEMKNTGU.js → test-all-7DNCMML7.js} +14 -13
- package/dist/cli-bundle/chunks/{test-all-EEMKNTGU.js.map → test-all-7DNCMML7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-OJE6CIO7.js → test-all-IHTUJRRC.js} +16 -15
- package/dist/cli-bundle/chunks/{test-all-OJE6CIO7.js.map → test-all-IHTUJRRC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-runs-IPOPFOAF.js → test-runs-5FEMBV3A.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-L2M7WKH7.js → test-runs-RNKZ37PS.js} +5 -5
- package/dist/cli-bundle/chunks/update-6C67X4KS.js +21 -0
- package/dist/cli-bundle/chunks/update-VF26YPT3.js +25 -0
- package/dist/cli-bundle/chunks/{update-many-322CCH2L.js → update-many-BSZZZYXY.js} +22 -22
- package/dist/cli-bundle/chunks/{update-many-DYWGW57M.js → update-many-BWKJJEBF.js} +22 -22
- package/dist/cli-bundle/chunks/{upgrade-3W3RVSNM.js → upgrade-RSE5PC44.js} +7 -6
- package/dist/cli-bundle/chunks/{upgrade-3W3RVSNM.js.map → upgrade-RSE5PC44.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-2U727SAM.js → upgrade-YWI5DJFA.js} +5 -4
- package/dist/cli-bundle/chunks/{upgrade-2U727SAM.js.map → upgrade-YWI5DJFA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-ZFVWPEEN.js → validate-NK3WKB7C.js} +18 -17
- package/dist/cli-bundle/chunks/{validate-ZFVWPEEN.js.map → validate-NK3WKB7C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-GZ24NYHO.js → validate-UCEOB7S6.js} +20 -19
- package/dist/cli-bundle/chunks/{validate-GZ24NYHO.js.map → validate-UCEOB7S6.js.map} +1 -1
- package/dist/cli-bundle/main.js +198 -1523
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/config/nested-settings.d.ts +8 -6
- package/dist/core/config/nested-settings.js +71 -5
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/config/positional-value.js +4 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +36 -0
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.js +46 -5
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/drift-scan.d.ts +3 -4
- package/dist/core/history/drift-scan.js +71 -18
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/history/history-diff.d.ts +47 -0
- package/dist/core/history/history-diff.js +152 -0
- package/dist/core/history/history-diff.js.map +1 -0
- package/dist/core/history/history-storage-stats.d.ts +31 -0
- package/dist/core/history/history-storage-stats.js +101 -0
- package/dist/core/history/history-storage-stats.js.map +1 -0
- package/dist/core/item/id.js +4 -5
- package/dist/core/item/id.js.map +1 -1
- package/dist/core/item/item-format.js +7 -3
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/toon-decode.d.ts +7 -0
- package/dist/core/item/toon-decode.js +11 -2
- package/dist/core/item/toon-decode.js.map +1 -1
- package/dist/core/item/type-registry.js +25 -7
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/lock/lock-gc.d.ts +46 -0
- package/dist/core/lock/lock-gc.js +194 -0
- package/dist/core/lock/lock-gc.js.map +1 -0
- package/dist/core/search/cache.js +5 -3
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/corpus.d.ts +6 -0
- package/dist/core/search/corpus.js +22 -9
- package/dist/core/search/corpus.js.map +1 -1
- package/dist/core/search/embedding-batches.js +10 -7
- package/dist/core/search/embedding-batches.js.map +1 -1
- package/dist/core/search/relevance.d.ts +29 -0
- package/dist/core/search/relevance.js +226 -0
- package/dist/core/search/relevance.js.map +1 -0
- package/dist/core/search/vector-stores.d.ts +3 -0
- package/dist/core/search/vector-stores.js +23 -10
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/shared/constants.js +15 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.d.ts +6 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/primitives.d.ts +8 -0
- package/dist/core/shared/primitives.js +29 -2
- package/dist/core/shared/primitives.js.map +1 -1
- package/dist/core/shared/serial-queue.d.ts +12 -0
- package/dist/core/shared/serial-queue.js +43 -0
- package/dist/core/shared/serial-queue.js.map +1 -0
- package/dist/core/shared/time.js +42 -6
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/paths.js +25 -7
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +11 -0
- package/dist/core/store/settings-validator.js +14 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.d.ts +19 -1
- package/dist/core/store/settings.js +199 -17
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/observability.js +3 -3
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.js +99 -6
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +187 -42
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
- package/dist/sdk/cli-contracts/commander-types.js +13 -2
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +8 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +7 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +39 -7
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +26 -1
- package/dist/sdk/cli-contracts.js +75 -11
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/testing.d.ts +51 -1
- package/dist/sdk/testing.js +93 -2
- package/dist/sdk/testing.js.map +1 -1
- package/dist/types.d.ts +14 -0
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +1 -1
- package/docs/ARCHITECTURE.md +11 -1
- package/docs/CLAUDE_CODE_PLUGIN.md +4 -4
- package/docs/CODEX_PLUGIN.md +1 -1
- package/docs/COMMANDS.md +42 -4
- package/docs/CONFIGURATION.md +31 -2
- package/docs/EXTENSIONS.md +28 -8
- package/docs/EXTENSION_AUTHOR_CONTRACTS.md +73 -0
- package/docs/ONBOARDING.md +165 -0
- package/docs/QUICKSTART.md +2 -2
- package/docs/README.md +12 -4
- package/docs/RELEASING.md +36 -1
- package/docs/SDK.md +66 -0
- package/docs/TESTING.md +33 -1
- package/package.json +6 -2
- package/packages/pm-governance-audit/README.md +14 -0
- package/packages/pm-governance-audit/extensions/governance-audit/index.js +39 -1
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +40 -2
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +1 -1
- package/packages/pm-governance-audit/package.json +4 -2
- package/packages/pm-lifecycle-hooks/README.md +21 -0
- package/packages/pm-search-advanced/README.md +38 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +17 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +17 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +216 -1
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +271 -2
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +11 -8
- package/plugins/pm-claude/agents/pm-coordinator.md +1 -1
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/plugins/pm-codex/README.md +1 -1
- package/dist/cli-bundle/chunks/activity-P5BUMWP3.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js.map +0 -1
- package/dist/cli-bundle/chunks/aggregate-OOAGKWRG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7K24QB23.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ATBVS6WW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-G5BACLYH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KA24HME7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RANZIID5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SZQCER6S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TK633IVD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WIKR7KFL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js.map +0 -7
- package/dist/cli-bundle/chunks/close-RMHQ3KWH.js +0 -13
- package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js.map +0 -1
- package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js.map +0 -7
- package/dist/cli-bundle/chunks/config-5ON3ADRH.js.map +0 -7
- package/dist/cli-bundle/chunks/config-DDPYIA6J.js.map +0 -1
- package/dist/cli-bundle/chunks/context-ZOJEN5VT.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-CXSFM45B.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-LCSX5R53.js.map +0 -1
- package/dist/cli-bundle/chunks/create-ATONSAZW.js +0 -27
- package/dist/cli-bundle/chunks/gc-GT552UJH.js +0 -178
- package/dist/cli-bundle/chunks/gc-GT552UJH.js.map +0 -1
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js +0 -181
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js.map +0 -7
- package/dist/cli-bundle/chunks/get-CINFEUIY.js.map +0 -7
- package/dist/cli-bundle/chunks/get-WXMLRG7M.js.map +0 -1
- package/dist/cli-bundle/chunks/health-5VPOJQ53.js.map +0 -1
- package/dist/cli-bundle/chunks/health-IT5DBPRJ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-6FC4H6HI.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js +0 -19
- package/dist/cli-bundle/chunks/init-KHX3FEEM.js +0 -16
- package/dist/cli-bundle/chunks/list-53LZ2AEO.js +0 -20
- package/dist/cli-bundle/chunks/register-list-query-AG3XKXWL.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-RSMT6DPK.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-Q54JQZUN.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-JL5QIH7H.js +0 -17
- package/dist/cli-bundle/chunks/search-5A3BMFA7.js.map +0 -7
- package/dist/cli-bundle/chunks/search-C7NPB7G7.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js +0 -120
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js +0 -123
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js.map +0 -7
- package/dist/cli-bundle/chunks/test-RJ4ZF35X.js +0 -31
- package/dist/cli-bundle/chunks/update-6YEHPVXH.js +0 -25
- package/dist/cli-bundle/chunks/update-PYLVHMRD.js +0 -21
- /package/dist/cli-bundle/chunks/{activity-P5BUMWP3.js.map → activity-5UROHJ3D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-3RWRRNOW.js.map → activity-YVB3QRTE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-PNN6UIBZ.js.map → append-2PPYFAG5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-5JE3YGXU.js.map → append-AUGT5W6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-26KTVXJW.js.map → chunk-2IF7WLB7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XX5LRINW.js.map → chunk-2OJHLWBZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ASQM3IF5.js.map → chunk-3A2CMEM7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S3CV7JGJ.js.map → chunk-3EOBJOF4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B3N4TKNL.js.map → chunk-5AXMRKN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JQI2HE55.js.map → chunk-6J4K6JLA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BNL6S7QH.js.map → chunk-AVJD6VTA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RQAWLSUU.js.map → chunk-B5RF3IP7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UFCG3SWR.js.map → chunk-C5W2UH56.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3OH4DAEB.js.map → chunk-CKLBZHS7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GFWHHMVV.js.map → chunk-FY6Z3FYY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CCUFLH4J.js.map → chunk-GNIUOLZ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZRVSMOMR.js.map → chunk-GPXQBR3H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GPGAYASV.js.map → chunk-H7EO3QA3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MISYRLEP.js.map → chunk-HLC3KTLP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KK6YPGH3.js.map → chunk-HMMMWBK2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CJDQB2ED.js.map → chunk-HV5SSZXF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FVXM3GKS.js.map → chunk-KNGVP5WJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UOVLWB47.js.map → chunk-LI65XLJR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AXXKLVTW.js.map → chunk-LIN2BPJ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y2AKE2HS.js.map → chunk-LQHBENVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D5X7N6FI.js.map → chunk-LXO6V66E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DFIZGAI5.js.map → chunk-MOYM2C3J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OUF3ARDX.js.map → chunk-NQL32HQ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GCAVRLGE.js.map → chunk-OKSKJKHX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A6PEXMYN.js.map → chunk-R3V3YCMH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T2ORWB6D.js.map → chunk-RVPTZKBC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K47WAYQV.js.map → chunk-SFFVGNHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DFUSXJDE.js.map → chunk-SQPKRA54.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JB4RGL4V.js.map → chunk-TNPBPNII.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XG7RJYHV.js.map → chunk-TP4DDY27.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ORTLYVA4.js.map → chunk-TYJJOTUA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HZOS2UG5.js.map → chunk-UAQOQ7IE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D3WUNETC.js.map → chunk-UEWA73ZZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-O5IBJE6S.js.map → chunk-UIIQC5YO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LDJK7SHN.js.map → chunk-V6EYFTRL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TQ3ZK6VD.js.map → chunk-WYEXLDDY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KCMIYKTA.js.map → chunk-X7UHMKPE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CWT53EYT.js.map → chunk-YBZW2QQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VGO2T3TY.js.map → chunk-YO3THIJF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-ZFA7HKU4.js.map → claim-BJ4QMPJC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-AZLP7YFO.js.map → claim-KW743OSW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-RMHQ3KWH.js.map → close-P4ZBKODL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-65DFYAVS.js.map → close-SYHSRZDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-AGBNSJJH.js.map → comments-JEO6HHVM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-CJWXQI7X.js.map → comments-YT2PQ5DD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-ATONSAZW.js.map → create-4DS2QWQC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-WYFKN2U4.js.map → create-CF7EVRX7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ZXWC56WO.js.map → delete-KR4VBWVE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-RONNH4F4.js.map → delete-XLZRTRKR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-WII3O4HB.js.map → deps-2YTXD3VM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-EHXIFOZR.js.map → deps-GZMFMTGS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-PDREIMLS.js.map → docs-SLROFEQ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-JMVCFNHH.js.map → docs-ZHISRR2D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-G6UXSM5S.js.map → extension-3C7OOI4F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-B4ROVWJD.js.map → extension-XYCUXICD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-2PN7UM2D.js.map → files-FUWF2FYJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-MXYS5W4M.js.map → files-J4I5IU4O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-FLZIP7PM.js.map → history-SDAWYZR3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-6FC4H6HI.js.map → history-YDUEILKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-SSZBAD76.js.map → history-redact-EPJ7GENL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-XKYEZDBL.js.map → history-redact-KASLLPE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-X7CO5JJZ.js.map → history-repair-IJ7LLBET.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-KC5ZOJRZ.js.map → history-repair-YNESJRT6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-KHX3FEEM.js.map → init-IGSS4GNH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-6MRFVOLH.js.map → init-YHVBTEET.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-DCX55BNX.js.map → learnings-4YBMIVCZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-A3CLB5CO.js.map → learnings-T4PF24YN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-DBRECOG4.js.map → list-3KEVBOYW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-53LZ2AEO.js.map → list-E44O2K64.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-42LIC3UE.js.map → notes-FLUCNJSH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-P5O3VMQ3.js.map → notes-GJKALVZM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-HDQXEUKD.js.map → plan-T5MMZLI3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-IGTE3WOJ.js.map → plan-YYMIL3HV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-2XVTBLKQ.js.map → restore-DDJGVZIN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-JL5QIH7H.js.map → restore-SJSASGZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-V6BX65Q2.js.map → schema-B7NQ6XVP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-LVXZWFGY.js.map → schema-HEGYH6CE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-OFYONO3C.js.map → test-IIELLSZX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-RJ4ZF35X.js.map → test-ML5RLWXE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-IPOPFOAF.js.map → test-runs-5FEMBV3A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-L2M7WKH7.js.map → test-runs-RNKZ37PS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-PYLVHMRD.js.map → update-6C67X4KS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-6YEHPVXH.js.map → update-VF26YPT3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-322CCH2L.js.map → update-many-BSZZZYXY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-DYWGW57M.js.map → update-many-BWKJJEBF.js.map} +0 -0
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
!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]="
|
|
2
|
+
!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]="bbca734a-ed22-5880-ac8f-334fdbfd62ae")}catch(e){}}();
|
|
3
|
+
import {
|
|
4
|
+
normalizeExtensionNameForMatch,
|
|
5
|
+
normalizeManagedDirectoryName,
|
|
6
|
+
normalizeStringList,
|
|
7
|
+
parseExtensionManifest,
|
|
8
|
+
validateExtensionDirectory
|
|
9
|
+
} from "./chunk-LMTOY5HE.js";
|
|
3
10
|
import {
|
|
4
11
|
splitCommaList
|
|
5
12
|
} from "./chunk-LXYVKYMQ.js";
|
|
6
13
|
import {
|
|
7
14
|
nowIso
|
|
8
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-B2KZGPM2.js";
|
|
9
16
|
import {
|
|
10
17
|
EXIT_CODE,
|
|
11
18
|
EXTENSION_CAPABILITY_CONTRACT,
|
|
@@ -24,115 +31,22 @@ import {
|
|
|
24
31
|
resolvePmPackageRootFromModule,
|
|
25
32
|
resolvePmRoot,
|
|
26
33
|
writeSettings
|
|
27
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-X4IZKYHP.js";
|
|
28
35
|
|
|
29
36
|
// dist/cli/commands/extension.js
|
|
30
37
|
import { execFile as execFile2 } from "node:child_process";
|
|
31
|
-
import
|
|
38
|
+
import fs6 from "node:fs/promises";
|
|
32
39
|
import os2 from "node:os";
|
|
33
|
-
import
|
|
40
|
+
import path6 from "node:path";
|
|
34
41
|
import { promisify as promisify2 } from "node:util";
|
|
35
42
|
|
|
36
|
-
// dist/cli/commands/extension/
|
|
43
|
+
// dist/cli/commands/extension/managed-state.js
|
|
37
44
|
import fs from "node:fs/promises";
|
|
38
45
|
import path from "node:path";
|
|
39
|
-
var DEFAULT_EXTENSION_PRIORITY = 100;
|
|
40
|
-
function normalizeStringList(values) {
|
|
41
|
-
return [...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
42
|
-
}
|
|
43
|
-
function normalizeExtensionNameForMatch(value) {
|
|
44
|
-
return value.trim().toLowerCase();
|
|
45
|
-
}
|
|
46
|
-
function normalizeManagedDirectoryName(name) {
|
|
47
|
-
const normalized = name.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
48
|
-
if (normalized.length === 0) {
|
|
49
|
-
throw new PmCliError("Extension manifest name must resolve to a non-empty directory name.", EXIT_CODE.USAGE);
|
|
50
|
-
}
|
|
51
|
-
if (normalized === "." || normalized === "..") {
|
|
52
|
-
throw new PmCliError('Extension manifest name must not resolve to "." or "..".', EXIT_CODE.USAGE);
|
|
53
|
-
}
|
|
54
|
-
return normalized;
|
|
55
|
-
}
|
|
56
|
-
function parseExtensionManifest(raw) {
|
|
57
|
-
if (typeof raw !== "object" || raw === null) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
const candidate = raw;
|
|
61
|
-
if (typeof candidate.name !== "string" || candidate.name.trim().length === 0) {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
if (typeof candidate.version !== "string" || candidate.version.trim().length === 0) {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
if (typeof candidate.entry !== "string" || candidate.entry.trim().length === 0) {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
let priority = DEFAULT_EXTENSION_PRIORITY;
|
|
71
|
-
if (candidate.priority !== void 0 && candidate.priority !== null) {
|
|
72
|
-
if (typeof candidate.priority !== "number" || !Number.isInteger(candidate.priority)) {
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
priority = candidate.priority;
|
|
76
|
-
}
|
|
77
|
-
let capabilities = [];
|
|
78
|
-
if (candidate.capabilities !== void 0 && candidate.capabilities !== null) {
|
|
79
|
-
if (!Array.isArray(candidate.capabilities) || candidate.capabilities.some((value) => typeof value !== "string")) {
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
capabilities = normalizeStringList(candidate.capabilities.map((value) => String(value).toLowerCase()));
|
|
83
|
-
}
|
|
84
|
-
return {
|
|
85
|
-
name: candidate.name.trim(),
|
|
86
|
-
version: candidate.version.trim(),
|
|
87
|
-
entry: candidate.entry.trim(),
|
|
88
|
-
priority,
|
|
89
|
-
capabilities
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
async function isCanonicalPathWithinDirectory(directory, targetPath) {
|
|
93
|
-
const [resolvedDirectory, resolvedTargetPath] = await Promise.all([fs.realpath(directory), fs.realpath(targetPath)]);
|
|
94
|
-
return isPathWithinDirectory(resolvedDirectory, resolvedTargetPath);
|
|
95
|
-
}
|
|
96
|
-
async function validateExtensionDirectory(directory) {
|
|
97
|
-
const manifestPath = path.join(directory, "manifest.json");
|
|
98
|
-
if (!await pathExists(manifestPath)) {
|
|
99
|
-
throw new PmCliError(`Extension manifest is missing at "${manifestPath}".`, EXIT_CODE.USAGE);
|
|
100
|
-
}
|
|
101
|
-
let parsedManifest;
|
|
102
|
-
try {
|
|
103
|
-
parsedManifest = JSON.parse(await fs.readFile(manifestPath, "utf8"));
|
|
104
|
-
} catch (error) {
|
|
105
|
-
throw new PmCliError(`Failed to parse extension manifest at "${manifestPath}": ${error instanceof Error ? error.message : String(error)}`, EXIT_CODE.USAGE);
|
|
106
|
-
}
|
|
107
|
-
const manifest = parseExtensionManifest(parsedManifest);
|
|
108
|
-
if (!manifest) {
|
|
109
|
-
throw new PmCliError(`Extension manifest at "${manifestPath}" is invalid.`, EXIT_CODE.USAGE);
|
|
110
|
-
}
|
|
111
|
-
const entryPath = path.resolve(directory, manifest.entry);
|
|
112
|
-
if (!isPathWithinDirectory(directory, entryPath)) {
|
|
113
|
-
throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory "${directory}".`, EXIT_CODE.USAGE);
|
|
114
|
-
}
|
|
115
|
-
if (!await pathExists(entryPath)) {
|
|
116
|
-
throw new PmCliError(`Extension entry file is missing at "${entryPath}".`, EXIT_CODE.USAGE);
|
|
117
|
-
}
|
|
118
|
-
if (!await isCanonicalPathWithinDirectory(directory, entryPath)) {
|
|
119
|
-
throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory after symlink resolution.`, EXIT_CODE.USAGE);
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
directory,
|
|
123
|
-
manifest_path: manifestPath,
|
|
124
|
-
entry_path: entryPath,
|
|
125
|
-
manifest
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// dist/cli/commands/extension/managed-state.js
|
|
130
|
-
import fs2 from "node:fs/promises";
|
|
131
|
-
import path2 from "node:path";
|
|
132
46
|
var MANAGED_EXTENSION_STATE_FILENAME = ".managed-extensions.json";
|
|
133
47
|
var MANAGED_EXTENSION_STATE_VERSION = 1;
|
|
134
48
|
function resolveManagedExtensionStatePath(extensionsRoot) {
|
|
135
|
-
return
|
|
49
|
+
return path.join(extensionsRoot, MANAGED_EXTENSION_STATE_FILENAME);
|
|
136
50
|
}
|
|
137
51
|
function createEmptyManagedExtensionState() {
|
|
138
52
|
return {
|
|
@@ -229,7 +143,7 @@ async function readManagedExtensionState(extensionsRoot) {
|
|
|
229
143
|
const statePath = resolveManagedExtensionStatePath(extensionsRoot);
|
|
230
144
|
const fallback = createEmptyManagedExtensionState();
|
|
231
145
|
try {
|
|
232
|
-
const raw = await
|
|
146
|
+
const raw = await fs.readFile(statePath, "utf8");
|
|
233
147
|
const parsed = JSON.parse(raw);
|
|
234
148
|
const normalized = normalizeManagedState(parsed);
|
|
235
149
|
if (!normalized) {
|
|
@@ -261,8 +175,8 @@ async function writeManagedExtensionState(extensionsRoot, state) {
|
|
|
261
175
|
updated_at: nowIso(),
|
|
262
176
|
entries: sortManagedEntries(state.entries)
|
|
263
177
|
};
|
|
264
|
-
await
|
|
265
|
-
await
|
|
178
|
+
await fs.mkdir(extensionsRoot, { recursive: true });
|
|
179
|
+
await fs.writeFile(statePath, `${JSON.stringify(normalized, null, 2)}
|
|
266
180
|
`, "utf8");
|
|
267
181
|
}
|
|
268
182
|
function upsertManagedEntry(state, entry) {
|
|
@@ -277,15 +191,15 @@ function upsertManagedEntry(state, entry) {
|
|
|
277
191
|
|
|
278
192
|
// dist/cli/commands/extension/install-sources.js
|
|
279
193
|
import { execFile } from "node:child_process";
|
|
280
|
-
import
|
|
194
|
+
import fs3 from "node:fs/promises";
|
|
281
195
|
import os from "node:os";
|
|
282
|
-
import
|
|
196
|
+
import path3 from "node:path";
|
|
283
197
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
284
198
|
import { promisify } from "node:util";
|
|
285
199
|
|
|
286
200
|
// dist/core/packages/manifest.js
|
|
287
|
-
import
|
|
288
|
-
import
|
|
201
|
+
import fs2 from "node:fs/promises";
|
|
202
|
+
import path2 from "node:path";
|
|
289
203
|
var PM_PACKAGE_RESOURCE_KINDS = [
|
|
290
204
|
"extensions",
|
|
291
205
|
"docs",
|
|
@@ -405,7 +319,7 @@ function normalizePackageCatalogMetadata(raw) {
|
|
|
405
319
|
return Object.values(catalog).some((value) => value !== void 0) ? catalog : void 0;
|
|
406
320
|
}
|
|
407
321
|
async function readPmPackageManifest(packageRoot) {
|
|
408
|
-
const packageJsonPath =
|
|
322
|
+
const packageJsonPath = path2.join(packageRoot, "package.json");
|
|
409
323
|
if (!await pathExists(packageJsonPath)) {
|
|
410
324
|
return {
|
|
411
325
|
source: "convention",
|
|
@@ -414,7 +328,7 @@ async function readPmPackageManifest(packageRoot) {
|
|
|
414
328
|
}
|
|
415
329
|
let parsed;
|
|
416
330
|
try {
|
|
417
|
-
parsed = JSON.parse(await
|
|
331
|
+
parsed = JSON.parse(await fs2.readFile(packageJsonPath, "utf8"));
|
|
418
332
|
} catch (error) {
|
|
419
333
|
throw new PmCliError(`Failed to parse package manifest at "${packageJsonPath}": ${String(error)}`, EXIT_CODE.USAGE);
|
|
420
334
|
}
|
|
@@ -445,21 +359,21 @@ async function listExtensionManifestDirectories(parentDirectory) {
|
|
|
445
359
|
if (!await pathExists(parentDirectory)) {
|
|
446
360
|
return [];
|
|
447
361
|
}
|
|
448
|
-
const entries = await
|
|
362
|
+
const entries = await fs2.readdir(parentDirectory, { withFileTypes: true });
|
|
449
363
|
const candidates = [];
|
|
450
364
|
for (const entry of entries) {
|
|
451
365
|
if (!entry.isDirectory()) {
|
|
452
366
|
continue;
|
|
453
367
|
}
|
|
454
|
-
const directory =
|
|
455
|
-
if (await pathExists(
|
|
368
|
+
const directory = path2.join(parentDirectory, entry.name);
|
|
369
|
+
if (await pathExists(path2.join(directory, "manifest.json"))) {
|
|
456
370
|
candidates.push(directory);
|
|
457
371
|
}
|
|
458
372
|
}
|
|
459
373
|
return candidates.sort((left, right) => left.localeCompare(right));
|
|
460
374
|
}
|
|
461
375
|
async function collectPackageExtensionDirectories(packageRoot) {
|
|
462
|
-
if (await pathExists(
|
|
376
|
+
if (await pathExists(path2.join(packageRoot, "manifest.json"))) {
|
|
463
377
|
return [packageRoot];
|
|
464
378
|
}
|
|
465
379
|
const manifest = await readPmPackageManifest(packageRoot);
|
|
@@ -469,11 +383,11 @@ async function collectPackageExtensionDirectories(packageRoot) {
|
|
|
469
383
|
if (entry.includes("*") || entry.startsWith("!")) {
|
|
470
384
|
throw new PmCliError(`Package extension entry "${entry}" uses a glob/exclusion pattern. pm package installs currently require concrete extension paths or directories.`, EXIT_CODE.USAGE);
|
|
471
385
|
}
|
|
472
|
-
const absolute =
|
|
386
|
+
const absolute = path2.resolve(packageRoot, entry);
|
|
473
387
|
if (!isPathWithinDirectory(packageRoot, absolute)) {
|
|
474
388
|
throw new PmCliError(`Package extension entry "${entry}" resolves outside package root.`, EXIT_CODE.USAGE);
|
|
475
389
|
}
|
|
476
|
-
if (await pathExists(
|
|
390
|
+
if (await pathExists(path2.join(absolute, "manifest.json"))) {
|
|
477
391
|
discovered.add(absolute);
|
|
478
392
|
continue;
|
|
479
393
|
}
|
|
@@ -483,7 +397,7 @@ async function collectPackageExtensionDirectories(packageRoot) {
|
|
|
483
397
|
}
|
|
484
398
|
if (manifestEntries.length === 0) {
|
|
485
399
|
for (const root of PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS.extensions) {
|
|
486
|
-
for (const child of await listExtensionManifestDirectories(
|
|
400
|
+
for (const child of await listExtensionManifestDirectories(path2.join(packageRoot, root))) {
|
|
487
401
|
discovered.add(child);
|
|
488
402
|
}
|
|
489
403
|
}
|
|
@@ -584,7 +498,7 @@ function parseExtensionInstallSource(input, options = {}) {
|
|
|
584
498
|
return {
|
|
585
499
|
kind: "local",
|
|
586
500
|
input: normalizedInput,
|
|
587
|
-
absolute_path:
|
|
501
|
+
absolute_path: path3.resolve(process.cwd(), normalizedInput)
|
|
588
502
|
};
|
|
589
503
|
}
|
|
590
504
|
async function runGitCommand(args) {
|
|
@@ -616,9 +530,77 @@ async function runNpmCommand(args, cwd) {
|
|
|
616
530
|
${message}`, EXIT_CODE.GENERIC_FAILURE);
|
|
617
531
|
}
|
|
618
532
|
}
|
|
533
|
+
function npmPackageNameFromSpec(spec) {
|
|
534
|
+
const trimmed = spec.trim();
|
|
535
|
+
const withoutAlias = trimmed.includes("@file:") ? trimmed.slice(0, trimmed.lastIndexOf("@file:")) : trimmed;
|
|
536
|
+
if (withoutAlias.startsWith("@")) {
|
|
537
|
+
const scoped = withoutAlias.match(/^(@[^/@\s]+\/[^/@\s]+)/);
|
|
538
|
+
return scoped?.[1] ?? withoutAlias;
|
|
539
|
+
}
|
|
540
|
+
const unscoped = withoutAlias.match(/^([^/@\s]+)/);
|
|
541
|
+
return unscoped?.[1] ?? withoutAlias;
|
|
542
|
+
}
|
|
543
|
+
function isNpmNotFoundError(error) {
|
|
544
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
545
|
+
const normalized = message.toLowerCase();
|
|
546
|
+
return normalized.includes("npm err! code e404") || normalized.includes("404 not found") || normalized.includes("is not in this registry");
|
|
547
|
+
}
|
|
548
|
+
function isNpmPackNotFoundError(error) {
|
|
549
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
550
|
+
const normalized = message.toLowerCase();
|
|
551
|
+
return isNpmNotFoundError(error) || normalized.includes("not found");
|
|
552
|
+
}
|
|
553
|
+
function isFirstPartyPmPackageName(packageName) {
|
|
554
|
+
const normalized = packageName.trim().toLowerCase();
|
|
555
|
+
return normalized.startsWith("@unbrained/pm-") || normalized.startsWith("pm-");
|
|
556
|
+
}
|
|
557
|
+
function buildNpmNotFoundRecovery(spec) {
|
|
558
|
+
const packageName = npmPackageNameFromSpec(spec);
|
|
559
|
+
const isFirstPartyPackage = isFirstPartyPmPackageName(packageName);
|
|
560
|
+
const repoName = packageName.split("/").at(-1) ?? packageName;
|
|
561
|
+
const githubSource = isFirstPartyPackage ? `github.com/unbraind/${repoName}` : void 0;
|
|
562
|
+
const nextBestCommand = githubSource ? `pm install --project ${githubSource}` : void 0;
|
|
563
|
+
return {
|
|
564
|
+
message: isFirstPartyPackage ? `npm package "${spec}" was not found in the registry. If this is an unpublished first-party pm package, install its GitHub repository instead.` : `npm package "${spec}" was not found in the registry.`,
|
|
565
|
+
context: {
|
|
566
|
+
code: "npm_package_not_found",
|
|
567
|
+
required: "Use an install source that exists, or publish the npm package before installing it with npm:<name>.",
|
|
568
|
+
why: "Classifying npm 404s avoids repeated registry retries and gives agents a deterministic fallback path.",
|
|
569
|
+
examples: nextBestCommand ? [nextBestCommand, `pm package catalog --project --json`] : [`npm view ${packageName}`, `pm package catalog --project --json`],
|
|
570
|
+
nextSteps: nextBestCommand ? [
|
|
571
|
+
`Try ${nextBestCommand} if the repository exists.`,
|
|
572
|
+
"Use pm package catalog --project --json to inspect bundled package aliases before installing."
|
|
573
|
+
] : [
|
|
574
|
+
`Verify ${packageName} exists in the npm registry and that you have access to it.`,
|
|
575
|
+
"Use pm package catalog --project --json to inspect bundled package aliases before installing."
|
|
576
|
+
],
|
|
577
|
+
recovery: {
|
|
578
|
+
attempted_command: `pm install --project npm:${spec}`,
|
|
579
|
+
normalized_args: ["install", "--project", `npm:${spec}`],
|
|
580
|
+
...githubSource && nextBestCommand ? {
|
|
581
|
+
fallback_candidates: [
|
|
582
|
+
{
|
|
583
|
+
source: githubSource,
|
|
584
|
+
command: nextBestCommand,
|
|
585
|
+
reason: "canonical first-party GitHub repository fallback for unpublished pm packages"
|
|
586
|
+
}
|
|
587
|
+
],
|
|
588
|
+
next_best_command: nextBestCommand
|
|
589
|
+
} : {}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
function wrapNpmPackResolutionError(spec, error) {
|
|
595
|
+
if (!isNpmPackNotFoundError(error)) {
|
|
596
|
+
return null;
|
|
597
|
+
}
|
|
598
|
+
const recovery = buildNpmNotFoundRecovery(spec);
|
|
599
|
+
return new PmCliError(recovery.message, EXIT_CODE.NOT_FOUND, recovery.context);
|
|
600
|
+
}
|
|
619
601
|
async function resolveLocalNpmPackagePath(spec) {
|
|
620
|
-
if (
|
|
621
|
-
const absolutePath =
|
|
602
|
+
if (path3.isAbsolute(spec) || spec.startsWith(".") || spec.startsWith("..")) {
|
|
603
|
+
const absolutePath = path3.resolve(process.cwd(), spec);
|
|
622
604
|
return await pathExists(absolutePath) ? absolutePath : null;
|
|
623
605
|
}
|
|
624
606
|
try {
|
|
@@ -630,7 +612,7 @@ async function resolveLocalNpmPackagePath(spec) {
|
|
|
630
612
|
} catch {
|
|
631
613
|
}
|
|
632
614
|
if (!/^[a-z][a-z0-9+.-]*:/i.test(spec)) {
|
|
633
|
-
const absolutePath =
|
|
615
|
+
const absolutePath = path3.resolve(process.cwd(), spec);
|
|
634
616
|
if (await pathExists(absolutePath)) {
|
|
635
617
|
return absolutePath;
|
|
636
618
|
}
|
|
@@ -662,7 +644,7 @@ function normalizeNpmLocalFileAliasSpec(spec, cwd = process.cwd()) {
|
|
|
662
644
|
if (packageName.trim().length === 0 || target.trim().length === 0 || target.startsWith("//")) {
|
|
663
645
|
return spec;
|
|
664
646
|
}
|
|
665
|
-
const absolutePath =
|
|
647
|
+
const absolutePath = path3.isAbsolute(target) || path3.win32.isAbsolute(target) ? target : path3.resolve(cwd, target);
|
|
666
648
|
return `${packageName}@${pathToFileURL(absolutePath).href}`;
|
|
667
649
|
}
|
|
668
650
|
function parsePackedNpmPackage(stdout, packDirectory) {
|
|
@@ -671,7 +653,7 @@ function parsePackedNpmPackage(stdout, packDirectory) {
|
|
|
671
653
|
const first = Array.isArray(parsed) ? parsed[0] : void 0;
|
|
672
654
|
if (first && typeof first.filename === "string" && first.filename.trim().length > 0) {
|
|
673
655
|
return {
|
|
674
|
-
tarball:
|
|
656
|
+
tarball: path3.resolve(packDirectory, first.filename),
|
|
675
657
|
package: typeof first.name === "string" ? first.name : void 0,
|
|
676
658
|
version: typeof first.version === "string" ? first.version : void 0
|
|
677
659
|
};
|
|
@@ -683,14 +665,14 @@ function parsePackedNpmPackage(stdout, packDirectory) {
|
|
|
683
665
|
throw new PmCliError("npm pack did not report a tarball filename.", EXIT_CODE.GENERIC_FAILURE);
|
|
684
666
|
}
|
|
685
667
|
return {
|
|
686
|
-
tarball:
|
|
668
|
+
tarball: path3.resolve(packDirectory, lastLine)
|
|
687
669
|
};
|
|
688
670
|
}
|
|
689
671
|
async function resolveNpmSourceDirectory(source) {
|
|
690
672
|
const localPackageRoot = await resolveLocalNpmPackagePath(source.spec);
|
|
691
673
|
if (localPackageRoot) {
|
|
692
|
-
const packageJsonPath =
|
|
693
|
-
const packageJson = await pathExists(packageJsonPath) ? JSON.parse(await
|
|
674
|
+
const packageJsonPath = path3.join(localPackageRoot, "package.json");
|
|
675
|
+
const packageJson = await pathExists(packageJsonPath) ? JSON.parse(await fs3.readFile(packageJsonPath, "utf8")) : {};
|
|
694
676
|
return {
|
|
695
677
|
directory: await resolvePackageExtensionDirectory(localPackageRoot, source.input),
|
|
696
678
|
package: typeof packageJson.name === "string" ? packageJson.name : void 0,
|
|
@@ -699,17 +681,17 @@ async function resolveNpmSourceDirectory(source) {
|
|
|
699
681
|
}
|
|
700
682
|
};
|
|
701
683
|
}
|
|
702
|
-
const tempRoot = await
|
|
703
|
-
const packDirectory =
|
|
704
|
-
const extractDirectory =
|
|
705
|
-
await
|
|
706
|
-
await
|
|
684
|
+
const tempRoot = await fs3.mkdtemp(path3.join(os.tmpdir(), "pm-npm-package-source-"));
|
|
685
|
+
const packDirectory = path3.join(tempRoot, "pack");
|
|
686
|
+
const extractDirectory = path3.join(tempRoot, "extract");
|
|
687
|
+
await fs3.mkdir(packDirectory, { recursive: true });
|
|
688
|
+
await fs3.mkdir(extractDirectory, { recursive: true });
|
|
707
689
|
try {
|
|
708
690
|
const packSpec = await resolveNpmPackSpec(source.spec);
|
|
709
691
|
const packStdout = await runNpmCommand(["pack", packSpec, "--json", "--pack-destination", packDirectory]);
|
|
710
692
|
const packed = parsePackedNpmPackage(packStdout, packDirectory);
|
|
711
693
|
await execFileAsync("tar", ["-xzf", packed.tarball, "-C", extractDirectory], { encoding: "utf8" });
|
|
712
|
-
const packageRoot =
|
|
694
|
+
const packageRoot = path3.join(extractDirectory, "package");
|
|
713
695
|
await installNpmPackageRuntimeDependencies(packageRoot);
|
|
714
696
|
const directory = await resolvePackageExtensionDirectory(packageRoot, source.input);
|
|
715
697
|
return {
|
|
@@ -717,22 +699,26 @@ async function resolveNpmSourceDirectory(source) {
|
|
|
717
699
|
package: packed.package,
|
|
718
700
|
version: packed.version,
|
|
719
701
|
cleanup: async () => {
|
|
720
|
-
await
|
|
702
|
+
await fs3.rm(tempRoot, { recursive: true, force: true });
|
|
721
703
|
}
|
|
722
704
|
};
|
|
723
705
|
} catch (error) {
|
|
724
|
-
await
|
|
706
|
+
await fs3.rm(tempRoot, { recursive: true, force: true });
|
|
707
|
+
const wrappedError = wrapNpmPackResolutionError(source.spec, error);
|
|
708
|
+
if (wrappedError) {
|
|
709
|
+
throw wrappedError;
|
|
710
|
+
}
|
|
725
711
|
throw error;
|
|
726
712
|
}
|
|
727
713
|
}
|
|
728
714
|
async function installNpmPackageRuntimeDependencies(packageRoot) {
|
|
729
|
-
const packageJsonPath =
|
|
715
|
+
const packageJsonPath = path3.join(packageRoot, "package.json");
|
|
730
716
|
if (!await pathExists(packageJsonPath)) {
|
|
731
717
|
return;
|
|
732
718
|
}
|
|
733
719
|
let parsed;
|
|
734
720
|
try {
|
|
735
|
-
parsed = JSON.parse(await
|
|
721
|
+
parsed = JSON.parse(await fs3.readFile(packageJsonPath, "utf8"));
|
|
736
722
|
} catch {
|
|
737
723
|
return;
|
|
738
724
|
}
|
|
@@ -746,11 +732,11 @@ async function installNpmPackageRuntimeDependencies(packageRoot) {
|
|
|
746
732
|
}
|
|
747
733
|
const runtimeOnlyManifest = { ...parsed };
|
|
748
734
|
delete runtimeOnlyManifest.devDependencies;
|
|
749
|
-
await
|
|
735
|
+
await fs3.writeFile(packageJsonPath, `${JSON.stringify(runtimeOnlyManifest, null, 2)}
|
|
750
736
|
`, "utf8");
|
|
751
737
|
await Promise.all([
|
|
752
|
-
|
|
753
|
-
|
|
738
|
+
fs3.rm(path3.join(packageRoot, "package-lock.json"), { force: true }),
|
|
739
|
+
fs3.rm(path3.join(packageRoot, "npm-shrinkwrap.json"), { force: true })
|
|
754
740
|
]);
|
|
755
741
|
await runNpmCommand(["install", "--ignore-scripts", "--no-audit", "--fund=false", "--package-lock=false", "--no-save", ...dependencySpecs], packageRoot);
|
|
756
742
|
}
|
|
@@ -775,7 +761,7 @@ async function resolvePackageExtensionDirectory(packageRoot, sourceLabel) {
|
|
|
775
761
|
return discovered[0];
|
|
776
762
|
}
|
|
777
763
|
if (discovered.length > 1) {
|
|
778
|
-
const choices = discovered.map((entry) =>
|
|
764
|
+
const choices = discovered.map((entry) => path3.relative(packageRoot, entry).replaceAll(path3.sep, "/")).sort((left, right) => left.localeCompare(right));
|
|
779
765
|
throw new PmCliError(`Package source "${sourceLabel}" contains multiple extension manifests. Provide an explicit extension path. Candidates: ${choices.join(", ")}`, EXIT_CODE.USAGE);
|
|
780
766
|
}
|
|
781
767
|
throw new PmCliError(`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.`, EXIT_CODE.USAGE);
|
|
@@ -784,33 +770,33 @@ async function resolveGithubSourceDirectory(cloneDirectory, source) {
|
|
|
784
770
|
const candidatePaths = [];
|
|
785
771
|
if (source.subpath) {
|
|
786
772
|
candidatePaths.push(source.subpath);
|
|
787
|
-
candidatePaths.push(
|
|
788
|
-
candidatePaths.push(
|
|
789
|
-
candidatePaths.push(
|
|
773
|
+
candidatePaths.push(path3.posix.join(".agents/pm/extensions", source.subpath));
|
|
774
|
+
candidatePaths.push(path3.posix.join(".custom/pm-extensions", source.subpath));
|
|
775
|
+
candidatePaths.push(path3.posix.join(".custom/pm-extension", source.subpath));
|
|
790
776
|
}
|
|
791
777
|
for (const candidate of candidatePaths) {
|
|
792
|
-
const absolute =
|
|
778
|
+
const absolute = path3.resolve(cloneDirectory, candidate);
|
|
793
779
|
if (!isPathWithinDirectory(cloneDirectory, absolute)) {
|
|
794
780
|
continue;
|
|
795
781
|
}
|
|
796
|
-
if (await pathExists(
|
|
782
|
+
if (await pathExists(path3.join(absolute, "manifest.json"))) {
|
|
797
783
|
return { directory: absolute, resolved_subpath: candidate };
|
|
798
784
|
}
|
|
799
785
|
}
|
|
800
|
-
if (await pathExists(
|
|
786
|
+
if (await pathExists(path3.join(cloneDirectory, "manifest.json"))) {
|
|
801
787
|
return { directory: cloneDirectory, resolved_subpath: "." };
|
|
802
788
|
}
|
|
803
789
|
const discoveredDirectory = await resolvePackageExtensionDirectory(cloneDirectory, source.input);
|
|
804
790
|
return {
|
|
805
791
|
directory: discoveredDirectory,
|
|
806
|
-
resolved_subpath:
|
|
792
|
+
resolved_subpath: path3.relative(cloneDirectory, discoveredDirectory).replaceAll(path3.sep, "/")
|
|
807
793
|
};
|
|
808
794
|
}
|
|
809
795
|
async function resolveInstallSource(source) {
|
|
810
796
|
if (source.kind === "local") {
|
|
811
797
|
let localStats;
|
|
812
798
|
try {
|
|
813
|
-
localStats = await
|
|
799
|
+
localStats = await fs3.stat(source.absolute_path);
|
|
814
800
|
} catch {
|
|
815
801
|
throw new PmCliError(`Local extension source does not exist: "${source.absolute_path}".`, EXIT_CODE.NOT_FOUND);
|
|
816
802
|
}
|
|
@@ -829,12 +815,12 @@ async function resolveInstallSource(source) {
|
|
|
829
815
|
source,
|
|
830
816
|
directory: resolved.directory,
|
|
831
817
|
cleanup: resolved.cleanup,
|
|
832
|
-
resolved_subpath:
|
|
818
|
+
resolved_subpath: path3.relative(path3.dirname(resolved.directory), resolved.directory).replaceAll(path3.sep, "/"),
|
|
833
819
|
npm_package: resolved.package,
|
|
834
820
|
npm_version: resolved.version
|
|
835
821
|
};
|
|
836
822
|
}
|
|
837
|
-
const cloneDirectory = await
|
|
823
|
+
const cloneDirectory = await fs3.mkdtemp(path3.join(os.tmpdir(), "pm-extension-source-"));
|
|
838
824
|
const cloneArgs = ["clone", "--depth", "1"];
|
|
839
825
|
if (source.ref) {
|
|
840
826
|
cloneArgs.push("--branch", source.ref);
|
|
@@ -850,11 +836,11 @@ async function resolveInstallSource(source) {
|
|
|
850
836
|
resolved_subpath: resolved.resolved_subpath,
|
|
851
837
|
commit,
|
|
852
838
|
cleanup: async () => {
|
|
853
|
-
await
|
|
839
|
+
await fs3.rm(cloneDirectory, { recursive: true, force: true });
|
|
854
840
|
}
|
|
855
841
|
};
|
|
856
842
|
} catch (error) {
|
|
857
|
-
await
|
|
843
|
+
await fs3.rm(cloneDirectory, { recursive: true, force: true });
|
|
858
844
|
throw error;
|
|
859
845
|
}
|
|
860
846
|
}
|
|
@@ -862,13 +848,13 @@ async function areDirectoriesEquivalent(left, right) {
|
|
|
862
848
|
if (!await pathExists(left) || !await pathExists(right)) {
|
|
863
849
|
return false;
|
|
864
850
|
}
|
|
865
|
-
const [leftRealPath, rightRealPath] = await Promise.all([
|
|
851
|
+
const [leftRealPath, rightRealPath] = await Promise.all([fs3.realpath(left), fs3.realpath(right)]);
|
|
866
852
|
return leftRealPath === rightRealPath;
|
|
867
853
|
}
|
|
868
854
|
|
|
869
855
|
// dist/cli/commands/extension/bundled-catalog.js
|
|
870
|
-
import
|
|
871
|
-
import
|
|
856
|
+
import fs4 from "node:fs/promises";
|
|
857
|
+
import path4 from "node:path";
|
|
872
858
|
var PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
|
|
873
859
|
var LEGACY_BUNDLED_PACKAGE_ALIASES = {
|
|
874
860
|
beads: {
|
|
@@ -885,7 +871,7 @@ function resolvePackageRootCandidates() {
|
|
|
885
871
|
const candidates = [];
|
|
886
872
|
const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
|
|
887
873
|
if (typeof envRoot === "string" && envRoot.trim().length > 0) {
|
|
888
|
-
candidates.push(
|
|
874
|
+
candidates.push(path4.resolve(envRoot.trim()));
|
|
889
875
|
}
|
|
890
876
|
candidates.push(resolvePmPackageRootFromModule(import.meta.url, ["../../../.."]));
|
|
891
877
|
return [...new Set(candidates)];
|
|
@@ -901,8 +887,8 @@ async function resolveBundledExtensionAliasSource(input) {
|
|
|
901
887
|
return null;
|
|
902
888
|
}
|
|
903
889
|
for (const packageRoot2 of resolvePackageRootCandidates()) {
|
|
904
|
-
const legacyExtensionPath =
|
|
905
|
-
if (await pathExists(
|
|
890
|
+
const legacyExtensionPath = path4.join(packageRoot2, ".agents", "pm", "extensions", alias.legacy_extension_directory);
|
|
891
|
+
if (await pathExists(path4.join(legacyExtensionPath, "manifest.json"))) {
|
|
906
892
|
return legacyExtensionPath;
|
|
907
893
|
}
|
|
908
894
|
}
|
|
@@ -917,17 +903,17 @@ function derivePackageAlias(packageDirectory) {
|
|
|
917
903
|
async function collectBundledPackageEntries() {
|
|
918
904
|
const entriesByAlias = /* @__PURE__ */ new Map();
|
|
919
905
|
for (const packageRoot of resolvePackageRootCandidates()) {
|
|
920
|
-
const packagesRoot =
|
|
906
|
+
const packagesRoot = path4.join(packageRoot, "packages");
|
|
921
907
|
if (!await pathExists(packagesRoot)) {
|
|
922
908
|
continue;
|
|
923
909
|
}
|
|
924
|
-
const entries = await
|
|
910
|
+
const entries = await fs4.readdir(packagesRoot, { withFileTypes: true });
|
|
925
911
|
for (const entry of entries) {
|
|
926
912
|
if (!entry.isDirectory() || !entry.name.startsWith("pm-")) {
|
|
927
913
|
continue;
|
|
928
914
|
}
|
|
929
|
-
const candidateRoot =
|
|
930
|
-
if (!await pathExists(
|
|
915
|
+
const candidateRoot = path4.join(packagesRoot, entry.name);
|
|
916
|
+
if (!await pathExists(path4.join(candidateRoot, "package.json"))) {
|
|
931
917
|
continue;
|
|
932
918
|
}
|
|
933
919
|
const manifest = await readPmPackageManifest(candidateRoot);
|
|
@@ -950,8 +936,8 @@ async function collectBundledPackageEntries() {
|
|
|
950
936
|
continue;
|
|
951
937
|
}
|
|
952
938
|
for (const packageRoot of resolvePackageRootCandidates()) {
|
|
953
|
-
const packagePath =
|
|
954
|
-
if (await pathExists(
|
|
939
|
+
const packagePath = path4.join(packageRoot, "packages", legacy.package_directory);
|
|
940
|
+
if (await pathExists(path4.join(packagePath, "package.json"))) {
|
|
955
941
|
entriesByAlias.set(alias, {
|
|
956
942
|
alias,
|
|
957
943
|
package_directory: legacy.package_directory,
|
|
@@ -991,7 +977,7 @@ async function buildBundledPackageCatalog(scope, global, options = {}) {
|
|
|
991
977
|
const roots = resolveExtensionRoots(resolvePmRoot(process.cwd(), global.path), process.cwd());
|
|
992
978
|
const selectedRoot = scope === "global" ? roots.global : roots.project;
|
|
993
979
|
const managedStateRead = await readManagedExtensionState(selectedRoot);
|
|
994
|
-
const installedLocations = new Set(managedStateRead.state.entries.filter((entry) => entry.scope === scope).filter((entry) => entry.source.kind !== "builtin").map((entry) =>
|
|
980
|
+
const installedLocations = new Set(managedStateRead.state.entries.filter((entry) => entry.scope === scope).filter((entry) => entry.source.kind !== "builtin").map((entry) => path4.resolve(entry.source.location)));
|
|
995
981
|
const installedBuiltinAliases = new Set(managedStateRead.state.entries.filter((entry) => entry.scope === scope && entry.source.kind === "builtin").flatMap((entry) => [entry.source.name, entry.source.input, entry.source.location]).filter((value) => typeof value === "string" && value.trim().length > 0).map((value) => value.trim().toLowerCase()));
|
|
996
982
|
const packages = [];
|
|
997
983
|
for (const alias of await listBundledPackageAliases()) {
|
|
@@ -1018,7 +1004,7 @@ async function buildBundledPackageCatalog(scope, global, options = {}) {
|
|
|
1018
1004
|
alias,
|
|
1019
1005
|
bundled: true,
|
|
1020
1006
|
available: true,
|
|
1021
|
-
installed: installedBuiltinAliases.has(alias) || installedLocations.has(
|
|
1007
|
+
installed: installedBuiltinAliases.has(alias) || installedLocations.has(path4.resolve(packageRoot)),
|
|
1022
1008
|
install_target: alias,
|
|
1023
1009
|
install_command: `pm install ${alias} ${installScopeFlag}`,
|
|
1024
1010
|
package_name: manifest.package_name,
|
|
@@ -1106,8 +1092,8 @@ function projectPackageCatalogEntry(entry, fields) {
|
|
|
1106
1092
|
}
|
|
1107
1093
|
|
|
1108
1094
|
// dist/cli/commands/extension/scaffold.js
|
|
1109
|
-
import
|
|
1110
|
-
import
|
|
1095
|
+
import fs5 from "node:fs/promises";
|
|
1096
|
+
import path5 from "node:path";
|
|
1111
1097
|
var SCAFFOLD_MANIFEST_VERSION = 1;
|
|
1112
1098
|
var SCAFFOLD_PM_MIN_VERSION = "2026.5.0";
|
|
1113
1099
|
function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabulary) {
|
|
@@ -1237,33 +1223,33 @@ function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabula
|
|
|
1237
1223
|
}
|
|
1238
1224
|
async function scaffoldExtensionProject(target, vocabulary = "extension") {
|
|
1239
1225
|
const normalizedTarget = target.trim();
|
|
1240
|
-
const targetPath =
|
|
1241
|
-
const extensionName = normalizeManagedDirectoryName(
|
|
1226
|
+
const targetPath = path5.resolve(process.cwd(), normalizedTarget);
|
|
1227
|
+
const extensionName = normalizeManagedDirectoryName(path5.basename(targetPath));
|
|
1242
1228
|
const commandName = `${extensionName} ping`;
|
|
1243
1229
|
const scaffoldFiles = buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabulary);
|
|
1244
1230
|
let createdDirectory = false;
|
|
1245
1231
|
if (await pathExists(targetPath)) {
|
|
1246
|
-
const existingTargetStats = await
|
|
1232
|
+
const existingTargetStats = await fs5.stat(targetPath);
|
|
1247
1233
|
if (!existingTargetStats.isDirectory()) {
|
|
1248
1234
|
throw new PmCliError(`Scaffold target "${targetPath}" exists and is not a directory.`, EXIT_CODE.CONFLICT);
|
|
1249
1235
|
}
|
|
1250
1236
|
} else {
|
|
1251
|
-
await
|
|
1237
|
+
await fs5.mkdir(targetPath, { recursive: true });
|
|
1252
1238
|
createdDirectory = true;
|
|
1253
1239
|
}
|
|
1254
1240
|
for (const [relativePath, content] of Object.entries(scaffoldFiles)) {
|
|
1255
|
-
const absolutePath =
|
|
1241
|
+
const absolutePath = path5.join(targetPath, relativePath);
|
|
1256
1242
|
if (!await pathExists(absolutePath)) {
|
|
1257
1243
|
continue;
|
|
1258
1244
|
}
|
|
1259
|
-
const existingContent = await
|
|
1245
|
+
const existingContent = await fs5.readFile(absolutePath, "utf8");
|
|
1260
1246
|
if (existingContent !== content) {
|
|
1261
1247
|
throw new PmCliError(`Scaffold file "${relativePath}" already exists with different content in "${targetPath}". Choose a new target path or remove conflicting files.`, EXIT_CODE.CONFLICT);
|
|
1262
1248
|
}
|
|
1263
1249
|
}
|
|
1264
1250
|
const files = [];
|
|
1265
1251
|
for (const [relativePath, content] of Object.entries(scaffoldFiles)) {
|
|
1266
|
-
const absolutePath =
|
|
1252
|
+
const absolutePath = path5.join(targetPath, relativePath);
|
|
1267
1253
|
if (await pathExists(absolutePath)) {
|
|
1268
1254
|
files.push({
|
|
1269
1255
|
path: relativePath,
|
|
@@ -1271,8 +1257,8 @@ async function scaffoldExtensionProject(target, vocabulary = "extension") {
|
|
|
1271
1257
|
});
|
|
1272
1258
|
continue;
|
|
1273
1259
|
}
|
|
1274
|
-
await
|
|
1275
|
-
await
|
|
1260
|
+
await fs5.mkdir(path5.dirname(absolutePath), { recursive: true });
|
|
1261
|
+
await fs5.writeFile(absolutePath, content, "utf8");
|
|
1276
1262
|
files.push({
|
|
1277
1263
|
path: relativePath,
|
|
1278
1264
|
status: "created"
|
|
@@ -1426,6 +1412,7 @@ function parseRegistrationCollisionWarning(warning) {
|
|
|
1426
1412
|
}
|
|
1427
1413
|
return {
|
|
1428
1414
|
code,
|
|
1415
|
+
surface: parts.slice(1, -4).join(":") || "global",
|
|
1429
1416
|
winner: { layer: winnerLayer, name: winnerName },
|
|
1430
1417
|
displaced: { layer: displacedLayer, name: displacedName }
|
|
1431
1418
|
};
|
|
@@ -1451,6 +1438,58 @@ function buildRegistrationCollisionRemediation(warnings, commands) {
|
|
|
1451
1438
|
const collisionNameText = collisionNames.length > 0 ? ` Conflicting extensions: ${collisionNames.join(", ")}.` : "";
|
|
1452
1439
|
return `Extension registration collisions or handler/override overlaps detected.${collisionNameText} Single-winner surfaces can hide earlier package behavior. Deactivate one conflicting package with ${commands.deactivate}, or scope registration surfaces in extensions.policy.extension_overrides, then rerun ${commands.doctor}.`;
|
|
1453
1440
|
}
|
|
1441
|
+
function buildRegistrationCollisionPlan(scope, warnings, extensions, options) {
|
|
1442
|
+
const collisions = warnings.map((warning) => parseRegistrationCollisionWarning(warning)).filter((entry) => entry !== null).sort((left, right) => `${left.code}:${left.surface}:${left.winner.name}:${left.displaced.name}`.localeCompare(`${right.code}:${right.surface}:${right.winner.name}:${right.displaced.name}`));
|
|
1443
|
+
if (collisions.length === 0) {
|
|
1444
|
+
return void 0;
|
|
1445
|
+
}
|
|
1446
|
+
const scopeFlag = scope === "global" ? "--global" : "--project";
|
|
1447
|
+
const deactivatePrefix = lifecycleFlagCommand(options, "deactivate");
|
|
1448
|
+
const doctorCommand = `${lifecycleFlagCommand(options, "doctor")} ${scopeFlag} --detail deep --trace`;
|
|
1449
|
+
const extensionByName = new Map(extensions.map((entry) => [normalizeExtensionNameForMatch(entry.name), entry]));
|
|
1450
|
+
const affectedByName = /* @__PURE__ */ new Map();
|
|
1451
|
+
for (const collision of collisions) {
|
|
1452
|
+
for (const name of [collision.winner.name, collision.displaced.name]) {
|
|
1453
|
+
const normalizedName = normalizeExtensionNameForMatch(name);
|
|
1454
|
+
affectedByName.set(normalizedName, (affectedByName.get(normalizedName) ?? 0) + 1);
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
const remediationCandidates = [...affectedByName.entries()].map(([normalizedName, affectedCollisions]) => {
|
|
1458
|
+
const extension = extensionByName.get(normalizedName);
|
|
1459
|
+
const extensionName = extension?.name ?? normalizedName;
|
|
1460
|
+
const commandPaths = extension?.command_paths ?? [];
|
|
1461
|
+
const actionPaths = extension?.action_paths ?? [];
|
|
1462
|
+
return {
|
|
1463
|
+
action: "deactivate",
|
|
1464
|
+
extension: extensionName,
|
|
1465
|
+
command: `${deactivatePrefix} ${extensionName} ${scopeFlag}`,
|
|
1466
|
+
affected_collisions: affectedCollisions,
|
|
1467
|
+
feature_loss: {
|
|
1468
|
+
command_paths: [...commandPaths].sort((left, right) => left.localeCompare(right)),
|
|
1469
|
+
action_paths: [...actionPaths].sort((left, right) => left.localeCompare(right))
|
|
1470
|
+
}
|
|
1471
|
+
};
|
|
1472
|
+
}).sort((left, right) => {
|
|
1473
|
+
const affectedDelta = right.affected_collisions - left.affected_collisions;
|
|
1474
|
+
if (affectedDelta !== 0) {
|
|
1475
|
+
return affectedDelta;
|
|
1476
|
+
}
|
|
1477
|
+
const leftSurfaceCount = left.feature_loss.command_paths.length + left.feature_loss.action_paths.length;
|
|
1478
|
+
const rightSurfaceCount = right.feature_loss.command_paths.length + right.feature_loss.action_paths.length;
|
|
1479
|
+
if (leftSurfaceCount !== rightSurfaceCount) {
|
|
1480
|
+
return leftSurfaceCount - rightSurfaceCount;
|
|
1481
|
+
}
|
|
1482
|
+
return left.extension.localeCompare(right.extension);
|
|
1483
|
+
});
|
|
1484
|
+
return {
|
|
1485
|
+
status: "conflicts_detected",
|
|
1486
|
+
collision_count: collisions.length,
|
|
1487
|
+
extension_count: affectedByName.size,
|
|
1488
|
+
next_best_command: doctorCommand,
|
|
1489
|
+
collisions,
|
|
1490
|
+
remediation_candidates: remediationCandidates
|
|
1491
|
+
};
|
|
1492
|
+
}
|
|
1454
1493
|
function classifyDoctorLoadFailureWarnings(loadFailures) {
|
|
1455
1494
|
const warnings = [];
|
|
1456
1495
|
for (const failure of loadFailures) {
|
|
@@ -1553,6 +1592,7 @@ function buildExtensionTriageSummary(scope, warnings, extensions, options = {})
|
|
|
1553
1592
|
remediation.push("Extension governance policy warnings detected. Review settings.extensions.policy mode and allow/block lists to confirm intended capabilities and registration surfaces.");
|
|
1554
1593
|
}
|
|
1555
1594
|
}
|
|
1595
|
+
const collisionPlan = buildRegistrationCollisionPlan(scope, normalizedWarnings, extensions, options);
|
|
1556
1596
|
if (updateHealthPartial) {
|
|
1557
1597
|
remediation.push(`Update-check coverage is partial because unmanaged extensions need adoption. Adopt existing installs via ${lifecycleFlagCommand(options, "manage")} ${scopeFlag} --fix-managed-state (or ${lifecycleFlagCommand(options, "adopt-all")} ${scopeFlag}, ${lifecycleFlagCommand(options, "adopt")} <name> ${scopeFlag}, or reinstall via ${lifecycleFlagCommand(options, "install")} ${scopeFlag} <source>).`);
|
|
1558
1598
|
} else if (skippedUnmanagedTotal > 0) {
|
|
@@ -1591,7 +1631,8 @@ function buildExtensionTriageSummary(scope, warnings, extensions, options = {})
|
|
|
1591
1631
|
update_check_status_totals: updateCheckStatusTotals,
|
|
1592
1632
|
update_check_failed_total: updateCheckFailedTotal,
|
|
1593
1633
|
top_warnings: effectiveWarnings.slice(0, 8),
|
|
1594
|
-
remediation
|
|
1634
|
+
remediation,
|
|
1635
|
+
...collisionPlan ? { collision_plan: collisionPlan } : {}
|
|
1595
1636
|
};
|
|
1596
1637
|
}
|
|
1597
1638
|
function parseDoctorDetailMode(raw) {
|
|
@@ -1760,11 +1801,11 @@ function sleep(ms) {
|
|
|
1760
1801
|
setTimeout(resolve, ms);
|
|
1761
1802
|
});
|
|
1762
1803
|
}
|
|
1763
|
-
async function copyExtensionDirectoryForInstall(sourceDirectory, destinationDirectory, copyDirectory =
|
|
1804
|
+
async function copyExtensionDirectoryForInstall(sourceDirectory, destinationDirectory, copyDirectory = fs6.cp) {
|
|
1764
1805
|
for (let attempt = 1; attempt <= EXTENSION_INSTALL_COPY_ATTEMPTS; attempt += 1) {
|
|
1765
1806
|
try {
|
|
1766
1807
|
if (await pathExists(destinationDirectory)) {
|
|
1767
|
-
await
|
|
1808
|
+
await fs6.rm(destinationDirectory, { recursive: true, force: true });
|
|
1768
1809
|
}
|
|
1769
1810
|
await copyExtensionDirectoryWithoutSelfNesting(sourceDirectory, destinationDirectory, copyDirectory);
|
|
1770
1811
|
return;
|
|
@@ -1777,8 +1818,8 @@ async function copyExtensionDirectoryForInstall(sourceDirectory, destinationDire
|
|
|
1777
1818
|
}
|
|
1778
1819
|
}
|
|
1779
1820
|
async function copyExtensionDirectoryWithoutSelfNesting(sourceDirectory, destinationDirectory, copyDirectory) {
|
|
1780
|
-
const resolvedSource =
|
|
1781
|
-
const resolvedDestination =
|
|
1821
|
+
const resolvedSource = path6.resolve(sourceDirectory);
|
|
1822
|
+
const resolvedDestination = path6.resolve(destinationDirectory);
|
|
1782
1823
|
if (resolvedSource === resolvedDestination) {
|
|
1783
1824
|
return;
|
|
1784
1825
|
}
|
|
@@ -1786,34 +1827,34 @@ async function copyExtensionDirectoryWithoutSelfNesting(sourceDirectory, destina
|
|
|
1786
1827
|
await copyDirectory(sourceDirectory, destinationDirectory, { recursive: true, force: true });
|
|
1787
1828
|
return;
|
|
1788
1829
|
}
|
|
1789
|
-
const stagingRoot = await
|
|
1790
|
-
const stagedDirectory =
|
|
1830
|
+
const stagingRoot = await fs6.mkdtemp(path6.join(os2.tmpdir(), "pm-extension-copy-"));
|
|
1831
|
+
const stagedDirectory = path6.join(stagingRoot, "extension");
|
|
1791
1832
|
try {
|
|
1792
1833
|
await copyDirectory(sourceDirectory, stagedDirectory, { recursive: true, force: true });
|
|
1793
1834
|
await copyDirectory(stagedDirectory, destinationDirectory, { recursive: true, force: true });
|
|
1794
1835
|
} finally {
|
|
1795
|
-
await
|
|
1836
|
+
await fs6.rm(stagingRoot, { recursive: true, force: true });
|
|
1796
1837
|
}
|
|
1797
1838
|
}
|
|
1798
1839
|
async function withExtensionInstallLock(settingsRoot, destinationDirectoryName, run) {
|
|
1799
|
-
const lockRoot =
|
|
1800
|
-
const lockPath =
|
|
1801
|
-
await
|
|
1840
|
+
const lockRoot = path6.join(settingsRoot, "runtime", "extension-install-locks");
|
|
1841
|
+
const lockPath = path6.join(lockRoot, `${destinationDirectoryName}.lock`);
|
|
1842
|
+
await fs6.mkdir(lockRoot, { recursive: true });
|
|
1802
1843
|
let acquired = false;
|
|
1803
1844
|
for (let attempt = 1; attempt <= EXTENSION_INSTALL_LOCK_ATTEMPTS; attempt += 1) {
|
|
1804
1845
|
try {
|
|
1805
|
-
await
|
|
1846
|
+
await fs6.mkdir(lockPath);
|
|
1806
1847
|
acquired = true;
|
|
1807
|
-
await
|
|
1848
|
+
await fs6.writeFile(path6.join(lockPath, "owner.json"), `${JSON.stringify({ pid: process.pid, created_at: nowIso(), destination: destinationDirectoryName }, null, 2)}
|
|
1808
1849
|
`, "utf8");
|
|
1809
1850
|
break;
|
|
1810
1851
|
} catch (error) {
|
|
1811
1852
|
if (!isErrnoCode(error, "EEXIST")) {
|
|
1812
1853
|
throw error;
|
|
1813
1854
|
}
|
|
1814
|
-
const stat = await
|
|
1855
|
+
const stat = await fs6.stat(lockPath).catch(() => null);
|
|
1815
1856
|
if (stat && Date.now() - stat.mtimeMs > EXTENSION_INSTALL_LOCK_STALE_MS) {
|
|
1816
|
-
await
|
|
1857
|
+
await fs6.rm(lockPath, { recursive: true, force: true });
|
|
1817
1858
|
continue;
|
|
1818
1859
|
}
|
|
1819
1860
|
await sleep(EXTENSION_INSTALL_LOCK_DELAY_MS);
|
|
@@ -1825,7 +1866,7 @@ async function withExtensionInstallLock(settingsRoot, destinationDirectoryName,
|
|
|
1825
1866
|
try {
|
|
1826
1867
|
return await run();
|
|
1827
1868
|
} finally {
|
|
1828
|
-
await
|
|
1869
|
+
await fs6.rm(lockPath, { recursive: true, force: true }).catch(() => void 0);
|
|
1829
1870
|
}
|
|
1830
1871
|
}
|
|
1831
1872
|
async function resolveInstalledExtensionCandidate(installed, extensionTarget) {
|
|
@@ -2003,7 +2044,7 @@ async function listInstalledExtensions(extensionsRoot, scope, settings, state) {
|
|
|
2003
2044
|
warnings: []
|
|
2004
2045
|
};
|
|
2005
2046
|
}
|
|
2006
|
-
const entries = await
|
|
2047
|
+
const entries = await fs6.readdir(extensionsRoot, { withFileTypes: true });
|
|
2007
2048
|
const directories = entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort((left, right) => left.localeCompare(right));
|
|
2008
2049
|
const managedByName = /* @__PURE__ */ new Map();
|
|
2009
2050
|
const managedByDirectory = /* @__PURE__ */ new Map();
|
|
@@ -2014,8 +2055,8 @@ async function listInstalledExtensions(extensionsRoot, scope, settings, state) {
|
|
|
2014
2055
|
const warnings = [];
|
|
2015
2056
|
const summaries = [];
|
|
2016
2057
|
for (const directoryName of directories) {
|
|
2017
|
-
const extensionDirectory =
|
|
2018
|
-
const manifestPath =
|
|
2058
|
+
const extensionDirectory = path6.join(extensionsRoot, directoryName);
|
|
2059
|
+
const manifestPath = path6.join(extensionDirectory, "manifest.json");
|
|
2019
2060
|
if (!await pathExists(manifestPath)) {
|
|
2020
2061
|
warnings.push(`extension_manifest_missing:${scope}:${directoryName}`);
|
|
2021
2062
|
const managedEntry2 = managedByDirectory.get(normalizeExtensionNameForMatch(directoryName));
|
|
@@ -2044,7 +2085,7 @@ async function listInstalledExtensions(extensionsRoot, scope, settings, state) {
|
|
|
2044
2085
|
}
|
|
2045
2086
|
let rawManifest;
|
|
2046
2087
|
try {
|
|
2047
|
-
rawManifest = JSON.parse(await
|
|
2088
|
+
rawManifest = JSON.parse(await fs6.readFile(manifestPath, "utf8"));
|
|
2048
2089
|
} catch {
|
|
2049
2090
|
warnings.push(`extension_manifest_invalid_json:${scope}:${directoryName}`);
|
|
2050
2091
|
continue;
|
|
@@ -2082,6 +2123,52 @@ async function listInstalledExtensions(extensionsRoot, scope, settings, state) {
|
|
|
2082
2123
|
warnings: warnings.sort((left, right) => left.localeCompare(right))
|
|
2083
2124
|
};
|
|
2084
2125
|
}
|
|
2126
|
+
function summarizeRuntimeCommandPathsForExtension(extensionName, installed) {
|
|
2127
|
+
const normalizedName = normalizeExtensionNameForMatch(extensionName);
|
|
2128
|
+
const entry = installed.find((candidate) => normalizeExtensionNameForMatch(candidate.name) === normalizedName);
|
|
2129
|
+
return {
|
|
2130
|
+
command_paths: [...entry?.command_paths ?? []].sort((left, right) => left.localeCompare(right)),
|
|
2131
|
+
action_paths: [...entry?.action_paths ?? []].sort((left, right) => left.localeCompare(right))
|
|
2132
|
+
};
|
|
2133
|
+
}
|
|
2134
|
+
function resolveCommandDiscoveryPackageName(extensionName, source) {
|
|
2135
|
+
if (source.kind === "npm" && typeof source.package === "string" && source.package.trim().length > 0) {
|
|
2136
|
+
return source.package.trim();
|
|
2137
|
+
}
|
|
2138
|
+
if (source.kind === "builtin" && typeof source.name === "string" && source.name.trim().length > 0) {
|
|
2139
|
+
return source.name.trim();
|
|
2140
|
+
}
|
|
2141
|
+
return extensionName;
|
|
2142
|
+
}
|
|
2143
|
+
function buildInstallCommandDiscovery(extensionName, source, commandSummary) {
|
|
2144
|
+
const helpCommands = commandSummary.command_paths.map((commandPath) => `pm ${commandPath} --help`);
|
|
2145
|
+
return {
|
|
2146
|
+
package_name: resolveCommandDiscoveryPackageName(extensionName, source),
|
|
2147
|
+
extension_name: extensionName,
|
|
2148
|
+
command_paths: commandSummary.command_paths,
|
|
2149
|
+
action_paths: commandSummary.action_paths,
|
|
2150
|
+
help_commands: helpCommands,
|
|
2151
|
+
next_steps: commandSummary.command_paths.length > 0 ? helpCommands : ["Run pm package doctor --project --detail deep if expected package commands are missing."]
|
|
2152
|
+
};
|
|
2153
|
+
}
|
|
2154
|
+
async function probeRuntimeCommandPathsForInstall(pmRoot, settings, refreshedInstalled, global) {
|
|
2155
|
+
const loadResult = await loadExtensions({
|
|
2156
|
+
pmRoot,
|
|
2157
|
+
settings,
|
|
2158
|
+
cwd: process.cwd(),
|
|
2159
|
+
noExtensions: global.noExtensions === true,
|
|
2160
|
+
reload_token: nextExtensionReloadToken(),
|
|
2161
|
+
cache_bust: true
|
|
2162
|
+
});
|
|
2163
|
+
const activationResult = await activateExtensions({
|
|
2164
|
+
...loadResult,
|
|
2165
|
+
loaded: loadResult.loaded
|
|
2166
|
+
});
|
|
2167
|
+
return {
|
|
2168
|
+
installed: applyDoctorRuntimeActivationState(refreshedInstalled, loadResult, activationResult),
|
|
2169
|
+
warnings: [...loadResult.warnings, ...activationResult.warnings]
|
|
2170
|
+
};
|
|
2171
|
+
}
|
|
2085
2172
|
async function checkGithubUpdate(source) {
|
|
2086
2173
|
const checkedAt = nowIso();
|
|
2087
2174
|
if (source.kind !== "github" || !source.repository) {
|
|
@@ -2143,7 +2230,7 @@ async function adoptUnmanagedExtensions(extensionsRoot, scope, installedExtensio
|
|
|
2143
2230
|
let nextState = state;
|
|
2144
2231
|
const adoptedEntries = [];
|
|
2145
2232
|
for (const candidate of sortedCandidates) {
|
|
2146
|
-
const extensionDirectory =
|
|
2233
|
+
const extensionDirectory = path6.join(extensionsRoot, candidate.directory);
|
|
2147
2234
|
const validated = await validateExtensionDirectory(extensionDirectory);
|
|
2148
2235
|
const now = nowIso();
|
|
2149
2236
|
const sourceRecord = {
|
|
@@ -2400,6 +2487,9 @@ async function runExtension(target, options, global) {
|
|
|
2400
2487
|
destination_path: entry.result.details.destination_path,
|
|
2401
2488
|
activated: entry.result.details.activated,
|
|
2402
2489
|
settings_changed: entry.result.details.settings_changed,
|
|
2490
|
+
command_paths: entry.result.details.command_paths,
|
|
2491
|
+
action_paths: entry.result.details.action_paths,
|
|
2492
|
+
command_discovery: entry.result.details.command_discovery,
|
|
2403
2493
|
warnings: entry.result.warnings
|
|
2404
2494
|
}))
|
|
2405
2495
|
});
|
|
@@ -2419,10 +2509,10 @@ async function runExtension(target, options, global) {
|
|
|
2419
2509
|
const settings = await readSettings(resolvedRoots.settings_root);
|
|
2420
2510
|
const managedStateRead = await readManagedExtensionState(resolvedRoots.selected_root);
|
|
2421
2511
|
warnings.push(...managedStateRead.warnings);
|
|
2422
|
-
const destinationDirectory =
|
|
2512
|
+
const destinationDirectory = path6.join(resolvedRoots.selected_root, destinationDirectoryName);
|
|
2423
2513
|
const destinationExists = await pathExists(destinationDirectory);
|
|
2424
2514
|
const installInPlace = await areDirectoriesEquivalent(validated.directory, destinationDirectory);
|
|
2425
|
-
await
|
|
2515
|
+
await fs6.mkdir(resolvedRoots.selected_root, { recursive: true });
|
|
2426
2516
|
if (!installInPlace) {
|
|
2427
2517
|
await copyExtensionDirectoryForInstall(validated.directory, destinationDirectory);
|
|
2428
2518
|
}
|
|
@@ -2471,6 +2561,11 @@ async function runExtension(target, options, global) {
|
|
|
2471
2561
|
if (activationChanged) {
|
|
2472
2562
|
await writeSettings(resolvedRoots.settings_root, settings, "settings:write");
|
|
2473
2563
|
}
|
|
2564
|
+
const refreshedInstalled = await listInstalledExtensions(resolvedRoots.selected_root, scope, settings, managedState);
|
|
2565
|
+
warnings.push(...refreshedInstalled.warnings);
|
|
2566
|
+
const runtimeProbe = await probeRuntimeCommandPathsForInstall(resolvedRoots.pm_root, settings, refreshedInstalled.extensions, global);
|
|
2567
|
+
warnings.push(...runtimeProbe.warnings);
|
|
2568
|
+
const commandSummary = summarizeRuntimeCommandPathsForExtension(validated.manifest.name, runtimeProbe.installed);
|
|
2474
2569
|
return withResult({
|
|
2475
2570
|
extension: {
|
|
2476
2571
|
name: validated.manifest.name,
|
|
@@ -2484,7 +2579,10 @@ async function runExtension(target, options, global) {
|
|
|
2484
2579
|
overwritten: destinationExists && !installInPlace,
|
|
2485
2580
|
installed_in_place: installInPlace,
|
|
2486
2581
|
activated: true,
|
|
2487
|
-
settings_changed: activationChanged
|
|
2582
|
+
settings_changed: activationChanged,
|
|
2583
|
+
command_paths: commandSummary.command_paths,
|
|
2584
|
+
action_paths: commandSummary.action_paths,
|
|
2585
|
+
command_discovery: buildInstallCommandDiscovery(validated.manifest.name, sourceRecord, commandSummary)
|
|
2488
2586
|
});
|
|
2489
2587
|
});
|
|
2490
2588
|
} finally {
|
|
@@ -2552,7 +2650,7 @@ async function runExtension(target, options, global) {
|
|
|
2552
2650
|
}
|
|
2553
2651
|
});
|
|
2554
2652
|
}
|
|
2555
|
-
const extensionDirectory =
|
|
2653
|
+
const extensionDirectory = path6.join(resolvedRoots.selected_root, candidate.directory);
|
|
2556
2654
|
const validated = await validateExtensionDirectory(extensionDirectory);
|
|
2557
2655
|
const now = nowIso();
|
|
2558
2656
|
const sourceRecord = githubOption === void 0 ? {
|
|
@@ -2617,8 +2715,8 @@ async function runExtension(target, options, global) {
|
|
|
2617
2715
|
if (!candidate) {
|
|
2618
2716
|
throw new PmCliError(`Installed extension "${extensionTarget}" was not found in ${scope} scope.`, EXIT_CODE.NOT_FOUND);
|
|
2619
2717
|
}
|
|
2620
|
-
const destinationDirectory =
|
|
2621
|
-
await
|
|
2718
|
+
const destinationDirectory = path6.join(resolvedRoots.selected_root, candidate.directory);
|
|
2719
|
+
await fs6.rm(destinationDirectory, { recursive: true, force: true });
|
|
2622
2720
|
const updatedState = {
|
|
2623
2721
|
...managedStateRead.state,
|
|
2624
2722
|
updated_at: nowIso(),
|
|
@@ -2973,8 +3071,6 @@ async function runExtension(target, options, global) {
|
|
|
2973
3071
|
}
|
|
2974
3072
|
|
|
2975
3073
|
export {
|
|
2976
|
-
parseExtensionManifest,
|
|
2977
|
-
validateExtensionDirectory,
|
|
2978
3074
|
resolveManagedExtensionStatePath,
|
|
2979
3075
|
readManagedExtensionState,
|
|
2980
3076
|
writeManagedExtensionState,
|
|
@@ -2983,6 +3079,6 @@ export {
|
|
|
2983
3079
|
copyExtensionDirectoryForInstall,
|
|
2984
3080
|
runExtension
|
|
2985
3081
|
};
|
|
2986
|
-
//# sourceMappingURL=chunk-
|
|
3082
|
+
//# sourceMappingURL=chunk-XYNT7UFP.js.map
|
|
2987
3083
|
|
|
2988
|
-
//# debugId=
|
|
3084
|
+
//# debugId=bbca734a-ed22-5880-ac8f-334fdbfd62ae
|