@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,9 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeExtensionNameForMatch,
|
|
3
|
+
normalizeManagedDirectoryName,
|
|
4
|
+
normalizeStringList,
|
|
5
|
+
parseExtensionManifest,
|
|
6
|
+
validateExtensionDirectory
|
|
7
|
+
} from "./chunk-THDEID2Z.js";
|
|
1
8
|
import {
|
|
2
9
|
splitCommaList
|
|
3
10
|
} from "./chunk-3HUE7XOF.js";
|
|
4
11
|
import {
|
|
5
12
|
nowIso
|
|
6
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FHHBD7PN.js";
|
|
7
14
|
import {
|
|
8
15
|
EXIT_CODE,
|
|
9
16
|
EXTENSION_CAPABILITY_CONTRACT,
|
|
@@ -22,118 +29,18 @@ import {
|
|
|
22
29
|
resolvePmPackageRootFromModule,
|
|
23
30
|
resolvePmRoot,
|
|
24
31
|
writeSettings
|
|
25
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-UJUT6AHZ.js";
|
|
26
33
|
|
|
27
34
|
// dist/cli/commands/extension.js
|
|
28
35
|
import { execFile as execFile2 } from "node:child_process";
|
|
29
|
-
import
|
|
36
|
+
import fs6 from "node:fs/promises";
|
|
30
37
|
import os2 from "node:os";
|
|
31
|
-
import
|
|
38
|
+
import path6 from "node:path";
|
|
32
39
|
import { promisify as promisify2 } from "node:util";
|
|
33
40
|
|
|
34
|
-
// dist/cli/commands/extension/
|
|
41
|
+
// dist/cli/commands/extension/managed-state.js
|
|
35
42
|
import fs from "node:fs/promises";
|
|
36
43
|
import path from "node:path";
|
|
37
|
-
!(function() {
|
|
38
|
-
try {
|
|
39
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
40
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "cb831def-7a8a-55f8-85e2-7749a5591bfe");
|
|
41
|
-
} catch (e2) {
|
|
42
|
-
}
|
|
43
|
-
})();
|
|
44
|
-
var DEFAULT_EXTENSION_PRIORITY = 100;
|
|
45
|
-
function normalizeStringList(values) {
|
|
46
|
-
return [...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
47
|
-
}
|
|
48
|
-
function normalizeExtensionNameForMatch(value) {
|
|
49
|
-
return value.trim().toLowerCase();
|
|
50
|
-
}
|
|
51
|
-
function normalizeManagedDirectoryName(name) {
|
|
52
|
-
const normalized = name.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
53
|
-
if (normalized.length === 0) {
|
|
54
|
-
throw new PmCliError("Extension manifest name must resolve to a non-empty directory name.", EXIT_CODE.USAGE);
|
|
55
|
-
}
|
|
56
|
-
if (normalized === "." || normalized === "..") {
|
|
57
|
-
throw new PmCliError('Extension manifest name must not resolve to "." or "..".', EXIT_CODE.USAGE);
|
|
58
|
-
}
|
|
59
|
-
return normalized;
|
|
60
|
-
}
|
|
61
|
-
function parseExtensionManifest(raw) {
|
|
62
|
-
if (typeof raw !== "object" || raw === null) {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
const candidate = raw;
|
|
66
|
-
if (typeof candidate.name !== "string" || candidate.name.trim().length === 0) {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
if (typeof candidate.version !== "string" || candidate.version.trim().length === 0) {
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
if (typeof candidate.entry !== "string" || candidate.entry.trim().length === 0) {
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
let priority = DEFAULT_EXTENSION_PRIORITY;
|
|
76
|
-
if (candidate.priority !== void 0 && candidate.priority !== null) {
|
|
77
|
-
if (typeof candidate.priority !== "number" || !Number.isInteger(candidate.priority)) {
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
priority = candidate.priority;
|
|
81
|
-
}
|
|
82
|
-
let capabilities = [];
|
|
83
|
-
if (candidate.capabilities !== void 0 && candidate.capabilities !== null) {
|
|
84
|
-
if (!Array.isArray(candidate.capabilities) || candidate.capabilities.some((value) => typeof value !== "string")) {
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
capabilities = normalizeStringList(candidate.capabilities.map((value) => String(value).toLowerCase()));
|
|
88
|
-
}
|
|
89
|
-
return {
|
|
90
|
-
name: candidate.name.trim(),
|
|
91
|
-
version: candidate.version.trim(),
|
|
92
|
-
entry: candidate.entry.trim(),
|
|
93
|
-
priority,
|
|
94
|
-
capabilities
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
async function isCanonicalPathWithinDirectory(directory, targetPath) {
|
|
98
|
-
const [resolvedDirectory, resolvedTargetPath] = await Promise.all([fs.realpath(directory), fs.realpath(targetPath)]);
|
|
99
|
-
return isPathWithinDirectory(resolvedDirectory, resolvedTargetPath);
|
|
100
|
-
}
|
|
101
|
-
async function validateExtensionDirectory(directory) {
|
|
102
|
-
const manifestPath = path.join(directory, "manifest.json");
|
|
103
|
-
if (!await pathExists(manifestPath)) {
|
|
104
|
-
throw new PmCliError(`Extension manifest is missing at "${manifestPath}".`, EXIT_CODE.USAGE);
|
|
105
|
-
}
|
|
106
|
-
let parsedManifest;
|
|
107
|
-
try {
|
|
108
|
-
parsedManifest = JSON.parse(await fs.readFile(manifestPath, "utf8"));
|
|
109
|
-
} catch (error) {
|
|
110
|
-
throw new PmCliError(`Failed to parse extension manifest at "${manifestPath}": ${error instanceof Error ? error.message : String(error)}`, EXIT_CODE.USAGE);
|
|
111
|
-
}
|
|
112
|
-
const manifest = parseExtensionManifest(parsedManifest);
|
|
113
|
-
if (!manifest) {
|
|
114
|
-
throw new PmCliError(`Extension manifest at "${manifestPath}" is invalid.`, EXIT_CODE.USAGE);
|
|
115
|
-
}
|
|
116
|
-
const entryPath = path.resolve(directory, manifest.entry);
|
|
117
|
-
if (!isPathWithinDirectory(directory, entryPath)) {
|
|
118
|
-
throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory "${directory}".`, EXIT_CODE.USAGE);
|
|
119
|
-
}
|
|
120
|
-
if (!await pathExists(entryPath)) {
|
|
121
|
-
throw new PmCliError(`Extension entry file is missing at "${entryPath}".`, EXIT_CODE.USAGE);
|
|
122
|
-
}
|
|
123
|
-
if (!await isCanonicalPathWithinDirectory(directory, entryPath)) {
|
|
124
|
-
throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory after symlink resolution.`, EXIT_CODE.USAGE);
|
|
125
|
-
}
|
|
126
|
-
return {
|
|
127
|
-
directory,
|
|
128
|
-
manifest_path: manifestPath,
|
|
129
|
-
entry_path: entryPath,
|
|
130
|
-
manifest
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// dist/cli/commands/extension/managed-state.js
|
|
135
|
-
import fs2 from "node:fs/promises";
|
|
136
|
-
import path2 from "node:path";
|
|
137
44
|
!(function() {
|
|
138
45
|
try {
|
|
139
46
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -144,7 +51,7 @@ import path2 from "node:path";
|
|
|
144
51
|
var MANAGED_EXTENSION_STATE_FILENAME = ".managed-extensions.json";
|
|
145
52
|
var MANAGED_EXTENSION_STATE_VERSION = 1;
|
|
146
53
|
function resolveManagedExtensionStatePath(extensionsRoot) {
|
|
147
|
-
return
|
|
54
|
+
return path.join(extensionsRoot, MANAGED_EXTENSION_STATE_FILENAME);
|
|
148
55
|
}
|
|
149
56
|
function createEmptyManagedExtensionState() {
|
|
150
57
|
return {
|
|
@@ -241,7 +148,7 @@ async function readManagedExtensionState(extensionsRoot) {
|
|
|
241
148
|
const statePath = resolveManagedExtensionStatePath(extensionsRoot);
|
|
242
149
|
const fallback = createEmptyManagedExtensionState();
|
|
243
150
|
try {
|
|
244
|
-
const raw = await
|
|
151
|
+
const raw = await fs.readFile(statePath, "utf8");
|
|
245
152
|
const parsed = JSON.parse(raw);
|
|
246
153
|
const normalized = normalizeManagedState(parsed);
|
|
247
154
|
if (!normalized) {
|
|
@@ -273,8 +180,8 @@ async function writeManagedExtensionState(extensionsRoot, state) {
|
|
|
273
180
|
updated_at: nowIso(),
|
|
274
181
|
entries: sortManagedEntries(state.entries)
|
|
275
182
|
};
|
|
276
|
-
await
|
|
277
|
-
await
|
|
183
|
+
await fs.mkdir(extensionsRoot, { recursive: true });
|
|
184
|
+
await fs.writeFile(statePath, `${JSON.stringify(normalized, null, 2)}
|
|
278
185
|
`, "utf8");
|
|
279
186
|
}
|
|
280
187
|
function upsertManagedEntry(state, entry) {
|
|
@@ -289,15 +196,15 @@ function upsertManagedEntry(state, entry) {
|
|
|
289
196
|
|
|
290
197
|
// dist/cli/commands/extension/install-sources.js
|
|
291
198
|
import { execFile } from "node:child_process";
|
|
292
|
-
import
|
|
199
|
+
import fs3 from "node:fs/promises";
|
|
293
200
|
import os from "node:os";
|
|
294
|
-
import
|
|
201
|
+
import path3 from "node:path";
|
|
295
202
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
296
203
|
import { promisify } from "node:util";
|
|
297
204
|
|
|
298
205
|
// dist/core/packages/manifest.js
|
|
299
|
-
import
|
|
300
|
-
import
|
|
206
|
+
import fs2 from "node:fs/promises";
|
|
207
|
+
import path2 from "node:path";
|
|
301
208
|
!(function() {
|
|
302
209
|
try {
|
|
303
210
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -424,7 +331,7 @@ function normalizePackageCatalogMetadata(raw) {
|
|
|
424
331
|
return Object.values(catalog).some((value) => value !== void 0) ? catalog : void 0;
|
|
425
332
|
}
|
|
426
333
|
async function readPmPackageManifest(packageRoot) {
|
|
427
|
-
const packageJsonPath =
|
|
334
|
+
const packageJsonPath = path2.join(packageRoot, "package.json");
|
|
428
335
|
if (!await pathExists(packageJsonPath)) {
|
|
429
336
|
return {
|
|
430
337
|
source: "convention",
|
|
@@ -433,7 +340,7 @@ async function readPmPackageManifest(packageRoot) {
|
|
|
433
340
|
}
|
|
434
341
|
let parsed;
|
|
435
342
|
try {
|
|
436
|
-
parsed = JSON.parse(await
|
|
343
|
+
parsed = JSON.parse(await fs2.readFile(packageJsonPath, "utf8"));
|
|
437
344
|
} catch (error) {
|
|
438
345
|
throw new PmCliError(`Failed to parse package manifest at "${packageJsonPath}": ${String(error)}`, EXIT_CODE.USAGE);
|
|
439
346
|
}
|
|
@@ -464,21 +371,21 @@ async function listExtensionManifestDirectories(parentDirectory) {
|
|
|
464
371
|
if (!await pathExists(parentDirectory)) {
|
|
465
372
|
return [];
|
|
466
373
|
}
|
|
467
|
-
const entries = await
|
|
374
|
+
const entries = await fs2.readdir(parentDirectory, { withFileTypes: true });
|
|
468
375
|
const candidates = [];
|
|
469
376
|
for (const entry of entries) {
|
|
470
377
|
if (!entry.isDirectory()) {
|
|
471
378
|
continue;
|
|
472
379
|
}
|
|
473
|
-
const directory =
|
|
474
|
-
if (await pathExists(
|
|
380
|
+
const directory = path2.join(parentDirectory, entry.name);
|
|
381
|
+
if (await pathExists(path2.join(directory, "manifest.json"))) {
|
|
475
382
|
candidates.push(directory);
|
|
476
383
|
}
|
|
477
384
|
}
|
|
478
385
|
return candidates.sort((left, right) => left.localeCompare(right));
|
|
479
386
|
}
|
|
480
387
|
async function collectPackageExtensionDirectories(packageRoot) {
|
|
481
|
-
if (await pathExists(
|
|
388
|
+
if (await pathExists(path2.join(packageRoot, "manifest.json"))) {
|
|
482
389
|
return [packageRoot];
|
|
483
390
|
}
|
|
484
391
|
const manifest = await readPmPackageManifest(packageRoot);
|
|
@@ -488,11 +395,11 @@ async function collectPackageExtensionDirectories(packageRoot) {
|
|
|
488
395
|
if (entry.includes("*") || entry.startsWith("!")) {
|
|
489
396
|
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);
|
|
490
397
|
}
|
|
491
|
-
const absolute =
|
|
398
|
+
const absolute = path2.resolve(packageRoot, entry);
|
|
492
399
|
if (!isPathWithinDirectory(packageRoot, absolute)) {
|
|
493
400
|
throw new PmCliError(`Package extension entry "${entry}" resolves outside package root.`, EXIT_CODE.USAGE);
|
|
494
401
|
}
|
|
495
|
-
if (await pathExists(
|
|
402
|
+
if (await pathExists(path2.join(absolute, "manifest.json"))) {
|
|
496
403
|
discovered.add(absolute);
|
|
497
404
|
continue;
|
|
498
405
|
}
|
|
@@ -502,7 +409,7 @@ async function collectPackageExtensionDirectories(packageRoot) {
|
|
|
502
409
|
}
|
|
503
410
|
if (manifestEntries.length === 0) {
|
|
504
411
|
for (const root of PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS.extensions) {
|
|
505
|
-
for (const child of await listExtensionManifestDirectories(
|
|
412
|
+
for (const child of await listExtensionManifestDirectories(path2.join(packageRoot, root))) {
|
|
506
413
|
discovered.add(child);
|
|
507
414
|
}
|
|
508
415
|
}
|
|
@@ -514,7 +421,7 @@ async function collectPackageExtensionDirectories(packageRoot) {
|
|
|
514
421
|
!(function() {
|
|
515
422
|
try {
|
|
516
423
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
517
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
424
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2ced78c7-c9de-52cc-ad20-81a4028eb89d");
|
|
518
425
|
} catch (e2) {
|
|
519
426
|
}
|
|
520
427
|
})();
|
|
@@ -610,7 +517,7 @@ function parseExtensionInstallSource(input, options = {}) {
|
|
|
610
517
|
return {
|
|
611
518
|
kind: "local",
|
|
612
519
|
input: normalizedInput,
|
|
613
|
-
absolute_path:
|
|
520
|
+
absolute_path: path3.resolve(process.cwd(), normalizedInput)
|
|
614
521
|
};
|
|
615
522
|
}
|
|
616
523
|
async function runGitCommand(args) {
|
|
@@ -642,9 +549,77 @@ async function runNpmCommand(args, cwd) {
|
|
|
642
549
|
${message}`, EXIT_CODE.GENERIC_FAILURE);
|
|
643
550
|
}
|
|
644
551
|
}
|
|
552
|
+
function npmPackageNameFromSpec(spec) {
|
|
553
|
+
const trimmed = spec.trim();
|
|
554
|
+
const withoutAlias = trimmed.includes("@file:") ? trimmed.slice(0, trimmed.lastIndexOf("@file:")) : trimmed;
|
|
555
|
+
if (withoutAlias.startsWith("@")) {
|
|
556
|
+
const scoped = withoutAlias.match(/^(@[^/@\s]+\/[^/@\s]+)/);
|
|
557
|
+
return scoped?.[1] ?? withoutAlias;
|
|
558
|
+
}
|
|
559
|
+
const unscoped = withoutAlias.match(/^([^/@\s]+)/);
|
|
560
|
+
return unscoped?.[1] ?? withoutAlias;
|
|
561
|
+
}
|
|
562
|
+
function isNpmNotFoundError(error) {
|
|
563
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
564
|
+
const normalized = message.toLowerCase();
|
|
565
|
+
return normalized.includes("npm err! code e404") || normalized.includes("404 not found") || normalized.includes("is not in this registry");
|
|
566
|
+
}
|
|
567
|
+
function isNpmPackNotFoundError(error) {
|
|
568
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
569
|
+
const normalized = message.toLowerCase();
|
|
570
|
+
return isNpmNotFoundError(error) || normalized.includes("not found");
|
|
571
|
+
}
|
|
572
|
+
function isFirstPartyPmPackageName(packageName) {
|
|
573
|
+
const normalized = packageName.trim().toLowerCase();
|
|
574
|
+
return normalized.startsWith("@unbrained/pm-") || normalized.startsWith("pm-");
|
|
575
|
+
}
|
|
576
|
+
function buildNpmNotFoundRecovery(spec) {
|
|
577
|
+
const packageName = npmPackageNameFromSpec(spec);
|
|
578
|
+
const isFirstPartyPackage = isFirstPartyPmPackageName(packageName);
|
|
579
|
+
const repoName = packageName.split("/").at(-1) ?? packageName;
|
|
580
|
+
const githubSource = isFirstPartyPackage ? `github.com/unbraind/${repoName}` : void 0;
|
|
581
|
+
const nextBestCommand = githubSource ? `pm install --project ${githubSource}` : void 0;
|
|
582
|
+
return {
|
|
583
|
+
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.`,
|
|
584
|
+
context: {
|
|
585
|
+
code: "npm_package_not_found",
|
|
586
|
+
required: "Use an install source that exists, or publish the npm package before installing it with npm:<name>.",
|
|
587
|
+
why: "Classifying npm 404s avoids repeated registry retries and gives agents a deterministic fallback path.",
|
|
588
|
+
examples: nextBestCommand ? [nextBestCommand, `pm package catalog --project --json`] : [`npm view ${packageName}`, `pm package catalog --project --json`],
|
|
589
|
+
nextSteps: nextBestCommand ? [
|
|
590
|
+
`Try ${nextBestCommand} if the repository exists.`,
|
|
591
|
+
"Use pm package catalog --project --json to inspect bundled package aliases before installing."
|
|
592
|
+
] : [
|
|
593
|
+
`Verify ${packageName} exists in the npm registry and that you have access to it.`,
|
|
594
|
+
"Use pm package catalog --project --json to inspect bundled package aliases before installing."
|
|
595
|
+
],
|
|
596
|
+
recovery: {
|
|
597
|
+
attempted_command: `pm install --project npm:${spec}`,
|
|
598
|
+
normalized_args: ["install", "--project", `npm:${spec}`],
|
|
599
|
+
...githubSource && nextBestCommand ? {
|
|
600
|
+
fallback_candidates: [
|
|
601
|
+
{
|
|
602
|
+
source: githubSource,
|
|
603
|
+
command: nextBestCommand,
|
|
604
|
+
reason: "canonical first-party GitHub repository fallback for unpublished pm packages"
|
|
605
|
+
}
|
|
606
|
+
],
|
|
607
|
+
next_best_command: nextBestCommand
|
|
608
|
+
} : {}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
function wrapNpmPackResolutionError(spec, error) {
|
|
614
|
+
if (!isNpmPackNotFoundError(error)) {
|
|
615
|
+
return null;
|
|
616
|
+
}
|
|
617
|
+
const recovery = buildNpmNotFoundRecovery(spec);
|
|
618
|
+
return new PmCliError(recovery.message, EXIT_CODE.NOT_FOUND, recovery.context);
|
|
619
|
+
}
|
|
645
620
|
async function resolveLocalNpmPackagePath(spec) {
|
|
646
|
-
if (
|
|
647
|
-
const absolutePath =
|
|
621
|
+
if (path3.isAbsolute(spec) || spec.startsWith(".") || spec.startsWith("..")) {
|
|
622
|
+
const absolutePath = path3.resolve(process.cwd(), spec);
|
|
648
623
|
return await pathExists(absolutePath) ? absolutePath : null;
|
|
649
624
|
}
|
|
650
625
|
try {
|
|
@@ -656,7 +631,7 @@ async function resolveLocalNpmPackagePath(spec) {
|
|
|
656
631
|
} catch {
|
|
657
632
|
}
|
|
658
633
|
if (!/^[a-z][a-z0-9+.-]*:/i.test(spec)) {
|
|
659
|
-
const absolutePath =
|
|
634
|
+
const absolutePath = path3.resolve(process.cwd(), spec);
|
|
660
635
|
if (await pathExists(absolutePath)) {
|
|
661
636
|
return absolutePath;
|
|
662
637
|
}
|
|
@@ -688,7 +663,7 @@ function normalizeNpmLocalFileAliasSpec(spec, cwd = process.cwd()) {
|
|
|
688
663
|
if (packageName.trim().length === 0 || target.trim().length === 0 || target.startsWith("//")) {
|
|
689
664
|
return spec;
|
|
690
665
|
}
|
|
691
|
-
const absolutePath =
|
|
666
|
+
const absolutePath = path3.isAbsolute(target) || path3.win32.isAbsolute(target) ? target : path3.resolve(cwd, target);
|
|
692
667
|
return `${packageName}@${pathToFileURL(absolutePath).href}`;
|
|
693
668
|
}
|
|
694
669
|
function parsePackedNpmPackage(stdout, packDirectory) {
|
|
@@ -697,7 +672,7 @@ function parsePackedNpmPackage(stdout, packDirectory) {
|
|
|
697
672
|
const first = Array.isArray(parsed) ? parsed[0] : void 0;
|
|
698
673
|
if (first && typeof first.filename === "string" && first.filename.trim().length > 0) {
|
|
699
674
|
return {
|
|
700
|
-
tarball:
|
|
675
|
+
tarball: path3.resolve(packDirectory, first.filename),
|
|
701
676
|
package: typeof first.name === "string" ? first.name : void 0,
|
|
702
677
|
version: typeof first.version === "string" ? first.version : void 0
|
|
703
678
|
};
|
|
@@ -709,14 +684,14 @@ function parsePackedNpmPackage(stdout, packDirectory) {
|
|
|
709
684
|
throw new PmCliError("npm pack did not report a tarball filename.", EXIT_CODE.GENERIC_FAILURE);
|
|
710
685
|
}
|
|
711
686
|
return {
|
|
712
|
-
tarball:
|
|
687
|
+
tarball: path3.resolve(packDirectory, lastLine)
|
|
713
688
|
};
|
|
714
689
|
}
|
|
715
690
|
async function resolveNpmSourceDirectory(source) {
|
|
716
691
|
const localPackageRoot = await resolveLocalNpmPackagePath(source.spec);
|
|
717
692
|
if (localPackageRoot) {
|
|
718
|
-
const packageJsonPath =
|
|
719
|
-
const packageJson = await pathExists(packageJsonPath) ? JSON.parse(await
|
|
693
|
+
const packageJsonPath = path3.join(localPackageRoot, "package.json");
|
|
694
|
+
const packageJson = await pathExists(packageJsonPath) ? JSON.parse(await fs3.readFile(packageJsonPath, "utf8")) : {};
|
|
720
695
|
return {
|
|
721
696
|
directory: await resolvePackageExtensionDirectory(localPackageRoot, source.input),
|
|
722
697
|
package: typeof packageJson.name === "string" ? packageJson.name : void 0,
|
|
@@ -725,17 +700,17 @@ async function resolveNpmSourceDirectory(source) {
|
|
|
725
700
|
}
|
|
726
701
|
};
|
|
727
702
|
}
|
|
728
|
-
const tempRoot = await
|
|
729
|
-
const packDirectory =
|
|
730
|
-
const extractDirectory =
|
|
731
|
-
await
|
|
732
|
-
await
|
|
703
|
+
const tempRoot = await fs3.mkdtemp(path3.join(os.tmpdir(), "pm-npm-package-source-"));
|
|
704
|
+
const packDirectory = path3.join(tempRoot, "pack");
|
|
705
|
+
const extractDirectory = path3.join(tempRoot, "extract");
|
|
706
|
+
await fs3.mkdir(packDirectory, { recursive: true });
|
|
707
|
+
await fs3.mkdir(extractDirectory, { recursive: true });
|
|
733
708
|
try {
|
|
734
709
|
const packSpec = await resolveNpmPackSpec(source.spec);
|
|
735
710
|
const packStdout = await runNpmCommand(["pack", packSpec, "--json", "--pack-destination", packDirectory]);
|
|
736
711
|
const packed = parsePackedNpmPackage(packStdout, packDirectory);
|
|
737
712
|
await execFileAsync("tar", ["-xzf", packed.tarball, "-C", extractDirectory], { encoding: "utf8" });
|
|
738
|
-
const packageRoot =
|
|
713
|
+
const packageRoot = path3.join(extractDirectory, "package");
|
|
739
714
|
await installNpmPackageRuntimeDependencies(packageRoot);
|
|
740
715
|
const directory = await resolvePackageExtensionDirectory(packageRoot, source.input);
|
|
741
716
|
return {
|
|
@@ -743,22 +718,26 @@ async function resolveNpmSourceDirectory(source) {
|
|
|
743
718
|
package: packed.package,
|
|
744
719
|
version: packed.version,
|
|
745
720
|
cleanup: async () => {
|
|
746
|
-
await
|
|
721
|
+
await fs3.rm(tempRoot, { recursive: true, force: true });
|
|
747
722
|
}
|
|
748
723
|
};
|
|
749
724
|
} catch (error) {
|
|
750
|
-
await
|
|
725
|
+
await fs3.rm(tempRoot, { recursive: true, force: true });
|
|
726
|
+
const wrappedError = wrapNpmPackResolutionError(source.spec, error);
|
|
727
|
+
if (wrappedError) {
|
|
728
|
+
throw wrappedError;
|
|
729
|
+
}
|
|
751
730
|
throw error;
|
|
752
731
|
}
|
|
753
732
|
}
|
|
754
733
|
async function installNpmPackageRuntimeDependencies(packageRoot) {
|
|
755
|
-
const packageJsonPath =
|
|
734
|
+
const packageJsonPath = path3.join(packageRoot, "package.json");
|
|
756
735
|
if (!await pathExists(packageJsonPath)) {
|
|
757
736
|
return;
|
|
758
737
|
}
|
|
759
738
|
let parsed;
|
|
760
739
|
try {
|
|
761
|
-
parsed = JSON.parse(await
|
|
740
|
+
parsed = JSON.parse(await fs3.readFile(packageJsonPath, "utf8"));
|
|
762
741
|
} catch {
|
|
763
742
|
return;
|
|
764
743
|
}
|
|
@@ -772,11 +751,11 @@ async function installNpmPackageRuntimeDependencies(packageRoot) {
|
|
|
772
751
|
}
|
|
773
752
|
const runtimeOnlyManifest = { ...parsed };
|
|
774
753
|
delete runtimeOnlyManifest.devDependencies;
|
|
775
|
-
await
|
|
754
|
+
await fs3.writeFile(packageJsonPath, `${JSON.stringify(runtimeOnlyManifest, null, 2)}
|
|
776
755
|
`, "utf8");
|
|
777
756
|
await Promise.all([
|
|
778
|
-
|
|
779
|
-
|
|
757
|
+
fs3.rm(path3.join(packageRoot, "package-lock.json"), { force: true }),
|
|
758
|
+
fs3.rm(path3.join(packageRoot, "npm-shrinkwrap.json"), { force: true })
|
|
780
759
|
]);
|
|
781
760
|
await runNpmCommand(["install", "--ignore-scripts", "--no-audit", "--fund=false", "--package-lock=false", "--no-save", ...dependencySpecs], packageRoot);
|
|
782
761
|
}
|
|
@@ -801,7 +780,7 @@ async function resolvePackageExtensionDirectory(packageRoot, sourceLabel) {
|
|
|
801
780
|
return discovered[0];
|
|
802
781
|
}
|
|
803
782
|
if (discovered.length > 1) {
|
|
804
|
-
const choices = discovered.map((entry) =>
|
|
783
|
+
const choices = discovered.map((entry) => path3.relative(packageRoot, entry).replaceAll(path3.sep, "/")).sort((left, right) => left.localeCompare(right));
|
|
805
784
|
throw new PmCliError(`Package source "${sourceLabel}" contains multiple extension manifests. Provide an explicit extension path. Candidates: ${choices.join(", ")}`, EXIT_CODE.USAGE);
|
|
806
785
|
}
|
|
807
786
|
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);
|
|
@@ -810,33 +789,33 @@ async function resolveGithubSourceDirectory(cloneDirectory, source) {
|
|
|
810
789
|
const candidatePaths = [];
|
|
811
790
|
if (source.subpath) {
|
|
812
791
|
candidatePaths.push(source.subpath);
|
|
813
|
-
candidatePaths.push(
|
|
814
|
-
candidatePaths.push(
|
|
815
|
-
candidatePaths.push(
|
|
792
|
+
candidatePaths.push(path3.posix.join(".agents/pm/extensions", source.subpath));
|
|
793
|
+
candidatePaths.push(path3.posix.join(".custom/pm-extensions", source.subpath));
|
|
794
|
+
candidatePaths.push(path3.posix.join(".custom/pm-extension", source.subpath));
|
|
816
795
|
}
|
|
817
796
|
for (const candidate of candidatePaths) {
|
|
818
|
-
const absolute =
|
|
797
|
+
const absolute = path3.resolve(cloneDirectory, candidate);
|
|
819
798
|
if (!isPathWithinDirectory(cloneDirectory, absolute)) {
|
|
820
799
|
continue;
|
|
821
800
|
}
|
|
822
|
-
if (await pathExists(
|
|
801
|
+
if (await pathExists(path3.join(absolute, "manifest.json"))) {
|
|
823
802
|
return { directory: absolute, resolved_subpath: candidate };
|
|
824
803
|
}
|
|
825
804
|
}
|
|
826
|
-
if (await pathExists(
|
|
805
|
+
if (await pathExists(path3.join(cloneDirectory, "manifest.json"))) {
|
|
827
806
|
return { directory: cloneDirectory, resolved_subpath: "." };
|
|
828
807
|
}
|
|
829
808
|
const discoveredDirectory = await resolvePackageExtensionDirectory(cloneDirectory, source.input);
|
|
830
809
|
return {
|
|
831
810
|
directory: discoveredDirectory,
|
|
832
|
-
resolved_subpath:
|
|
811
|
+
resolved_subpath: path3.relative(cloneDirectory, discoveredDirectory).replaceAll(path3.sep, "/")
|
|
833
812
|
};
|
|
834
813
|
}
|
|
835
814
|
async function resolveInstallSource(source) {
|
|
836
815
|
if (source.kind === "local") {
|
|
837
816
|
let localStats;
|
|
838
817
|
try {
|
|
839
|
-
localStats = await
|
|
818
|
+
localStats = await fs3.stat(source.absolute_path);
|
|
840
819
|
} catch {
|
|
841
820
|
throw new PmCliError(`Local extension source does not exist: "${source.absolute_path}".`, EXIT_CODE.NOT_FOUND);
|
|
842
821
|
}
|
|
@@ -855,12 +834,12 @@ async function resolveInstallSource(source) {
|
|
|
855
834
|
source,
|
|
856
835
|
directory: resolved.directory,
|
|
857
836
|
cleanup: resolved.cleanup,
|
|
858
|
-
resolved_subpath:
|
|
837
|
+
resolved_subpath: path3.relative(path3.dirname(resolved.directory), resolved.directory).replaceAll(path3.sep, "/"),
|
|
859
838
|
npm_package: resolved.package,
|
|
860
839
|
npm_version: resolved.version
|
|
861
840
|
};
|
|
862
841
|
}
|
|
863
|
-
const cloneDirectory = await
|
|
842
|
+
const cloneDirectory = await fs3.mkdtemp(path3.join(os.tmpdir(), "pm-extension-source-"));
|
|
864
843
|
const cloneArgs = ["clone", "--depth", "1"];
|
|
865
844
|
if (source.ref) {
|
|
866
845
|
cloneArgs.push("--branch", source.ref);
|
|
@@ -876,11 +855,11 @@ async function resolveInstallSource(source) {
|
|
|
876
855
|
resolved_subpath: resolved.resolved_subpath,
|
|
877
856
|
commit,
|
|
878
857
|
cleanup: async () => {
|
|
879
|
-
await
|
|
858
|
+
await fs3.rm(cloneDirectory, { recursive: true, force: true });
|
|
880
859
|
}
|
|
881
860
|
};
|
|
882
861
|
} catch (error) {
|
|
883
|
-
await
|
|
862
|
+
await fs3.rm(cloneDirectory, { recursive: true, force: true });
|
|
884
863
|
throw error;
|
|
885
864
|
}
|
|
886
865
|
}
|
|
@@ -888,13 +867,13 @@ async function areDirectoriesEquivalent(left, right) {
|
|
|
888
867
|
if (!await pathExists(left) || !await pathExists(right)) {
|
|
889
868
|
return false;
|
|
890
869
|
}
|
|
891
|
-
const [leftRealPath, rightRealPath] = await Promise.all([
|
|
870
|
+
const [leftRealPath, rightRealPath] = await Promise.all([fs3.realpath(left), fs3.realpath(right)]);
|
|
892
871
|
return leftRealPath === rightRealPath;
|
|
893
872
|
}
|
|
894
873
|
|
|
895
874
|
// dist/cli/commands/extension/bundled-catalog.js
|
|
896
|
-
import
|
|
897
|
-
import
|
|
875
|
+
import fs4 from "node:fs/promises";
|
|
876
|
+
import path4 from "node:path";
|
|
898
877
|
!(function() {
|
|
899
878
|
try {
|
|
900
879
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -918,7 +897,7 @@ function resolvePackageRootCandidates() {
|
|
|
918
897
|
const candidates = [];
|
|
919
898
|
const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
|
|
920
899
|
if (typeof envRoot === "string" && envRoot.trim().length > 0) {
|
|
921
|
-
candidates.push(
|
|
900
|
+
candidates.push(path4.resolve(envRoot.trim()));
|
|
922
901
|
}
|
|
923
902
|
candidates.push(resolvePmPackageRootFromModule(import.meta.url, ["../../../.."]));
|
|
924
903
|
return [...new Set(candidates)];
|
|
@@ -934,8 +913,8 @@ async function resolveBundledExtensionAliasSource(input) {
|
|
|
934
913
|
return null;
|
|
935
914
|
}
|
|
936
915
|
for (const packageRoot2 of resolvePackageRootCandidates()) {
|
|
937
|
-
const legacyExtensionPath =
|
|
938
|
-
if (await pathExists(
|
|
916
|
+
const legacyExtensionPath = path4.join(packageRoot2, ".agents", "pm", "extensions", alias.legacy_extension_directory);
|
|
917
|
+
if (await pathExists(path4.join(legacyExtensionPath, "manifest.json"))) {
|
|
939
918
|
return legacyExtensionPath;
|
|
940
919
|
}
|
|
941
920
|
}
|
|
@@ -950,17 +929,17 @@ function derivePackageAlias(packageDirectory) {
|
|
|
950
929
|
async function collectBundledPackageEntries() {
|
|
951
930
|
const entriesByAlias = /* @__PURE__ */ new Map();
|
|
952
931
|
for (const packageRoot of resolvePackageRootCandidates()) {
|
|
953
|
-
const packagesRoot =
|
|
932
|
+
const packagesRoot = path4.join(packageRoot, "packages");
|
|
954
933
|
if (!await pathExists(packagesRoot)) {
|
|
955
934
|
continue;
|
|
956
935
|
}
|
|
957
|
-
const entries = await
|
|
936
|
+
const entries = await fs4.readdir(packagesRoot, { withFileTypes: true });
|
|
958
937
|
for (const entry of entries) {
|
|
959
938
|
if (!entry.isDirectory() || !entry.name.startsWith("pm-")) {
|
|
960
939
|
continue;
|
|
961
940
|
}
|
|
962
|
-
const candidateRoot =
|
|
963
|
-
if (!await pathExists(
|
|
941
|
+
const candidateRoot = path4.join(packagesRoot, entry.name);
|
|
942
|
+
if (!await pathExists(path4.join(candidateRoot, "package.json"))) {
|
|
964
943
|
continue;
|
|
965
944
|
}
|
|
966
945
|
const manifest = await readPmPackageManifest(candidateRoot);
|
|
@@ -983,8 +962,8 @@ async function collectBundledPackageEntries() {
|
|
|
983
962
|
continue;
|
|
984
963
|
}
|
|
985
964
|
for (const packageRoot of resolvePackageRootCandidates()) {
|
|
986
|
-
const packagePath =
|
|
987
|
-
if (await pathExists(
|
|
965
|
+
const packagePath = path4.join(packageRoot, "packages", legacy.package_directory);
|
|
966
|
+
if (await pathExists(path4.join(packagePath, "package.json"))) {
|
|
988
967
|
entriesByAlias.set(alias, {
|
|
989
968
|
alias,
|
|
990
969
|
package_directory: legacy.package_directory,
|
|
@@ -1024,7 +1003,7 @@ async function buildBundledPackageCatalog(scope, global2, options = {}) {
|
|
|
1024
1003
|
const roots = resolveExtensionRoots(resolvePmRoot(process.cwd(), global2.path), process.cwd());
|
|
1025
1004
|
const selectedRoot = scope === "global" ? roots.global : roots.project;
|
|
1026
1005
|
const managedStateRead = await readManagedExtensionState(selectedRoot);
|
|
1027
|
-
const installedLocations = new Set(managedStateRead.state.entries.filter((entry) => entry.scope === scope).filter((entry) => entry.source.kind !== "builtin").map((entry) =>
|
|
1006
|
+
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)));
|
|
1028
1007
|
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()));
|
|
1029
1008
|
const packages = [];
|
|
1030
1009
|
for (const alias of await listBundledPackageAliases()) {
|
|
@@ -1051,7 +1030,7 @@ async function buildBundledPackageCatalog(scope, global2, options = {}) {
|
|
|
1051
1030
|
alias,
|
|
1052
1031
|
bundled: true,
|
|
1053
1032
|
available: true,
|
|
1054
|
-
installed: installedBuiltinAliases.has(alias) || installedLocations.has(
|
|
1033
|
+
installed: installedBuiltinAliases.has(alias) || installedLocations.has(path4.resolve(packageRoot)),
|
|
1055
1034
|
install_target: alias,
|
|
1056
1035
|
install_command: `pm install ${alias} ${installScopeFlag}`,
|
|
1057
1036
|
package_name: manifest.package_name,
|
|
@@ -1139,8 +1118,8 @@ function projectPackageCatalogEntry(entry, fields) {
|
|
|
1139
1118
|
}
|
|
1140
1119
|
|
|
1141
1120
|
// dist/cli/commands/extension/scaffold.js
|
|
1142
|
-
import
|
|
1143
|
-
import
|
|
1121
|
+
import fs5 from "node:fs/promises";
|
|
1122
|
+
import path5 from "node:path";
|
|
1144
1123
|
!(function() {
|
|
1145
1124
|
try {
|
|
1146
1125
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -1277,33 +1256,33 @@ function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabula
|
|
|
1277
1256
|
}
|
|
1278
1257
|
async function scaffoldExtensionProject(target, vocabulary = "extension") {
|
|
1279
1258
|
const normalizedTarget = target.trim();
|
|
1280
|
-
const targetPath =
|
|
1281
|
-
const extensionName = normalizeManagedDirectoryName(
|
|
1259
|
+
const targetPath = path5.resolve(process.cwd(), normalizedTarget);
|
|
1260
|
+
const extensionName = normalizeManagedDirectoryName(path5.basename(targetPath));
|
|
1282
1261
|
const commandName = `${extensionName} ping`;
|
|
1283
1262
|
const scaffoldFiles = buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabulary);
|
|
1284
1263
|
let createdDirectory = false;
|
|
1285
1264
|
if (await pathExists(targetPath)) {
|
|
1286
|
-
const existingTargetStats = await
|
|
1265
|
+
const existingTargetStats = await fs5.stat(targetPath);
|
|
1287
1266
|
if (!existingTargetStats.isDirectory()) {
|
|
1288
1267
|
throw new PmCliError(`Scaffold target "${targetPath}" exists and is not a directory.`, EXIT_CODE.CONFLICT);
|
|
1289
1268
|
}
|
|
1290
1269
|
} else {
|
|
1291
|
-
await
|
|
1270
|
+
await fs5.mkdir(targetPath, { recursive: true });
|
|
1292
1271
|
createdDirectory = true;
|
|
1293
1272
|
}
|
|
1294
1273
|
for (const [relativePath, content] of Object.entries(scaffoldFiles)) {
|
|
1295
|
-
const absolutePath =
|
|
1274
|
+
const absolutePath = path5.join(targetPath, relativePath);
|
|
1296
1275
|
if (!await pathExists(absolutePath)) {
|
|
1297
1276
|
continue;
|
|
1298
1277
|
}
|
|
1299
|
-
const existingContent = await
|
|
1278
|
+
const existingContent = await fs5.readFile(absolutePath, "utf8");
|
|
1300
1279
|
if (existingContent !== content) {
|
|
1301
1280
|
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);
|
|
1302
1281
|
}
|
|
1303
1282
|
}
|
|
1304
1283
|
const files = [];
|
|
1305
1284
|
for (const [relativePath, content] of Object.entries(scaffoldFiles)) {
|
|
1306
|
-
const absolutePath =
|
|
1285
|
+
const absolutePath = path5.join(targetPath, relativePath);
|
|
1307
1286
|
if (await pathExists(absolutePath)) {
|
|
1308
1287
|
files.push({
|
|
1309
1288
|
path: relativePath,
|
|
@@ -1311,8 +1290,8 @@ async function scaffoldExtensionProject(target, vocabulary = "extension") {
|
|
|
1311
1290
|
});
|
|
1312
1291
|
continue;
|
|
1313
1292
|
}
|
|
1314
|
-
await
|
|
1315
|
-
await
|
|
1293
|
+
await fs5.mkdir(path5.dirname(absolutePath), { recursive: true });
|
|
1294
|
+
await fs5.writeFile(absolutePath, content, "utf8");
|
|
1316
1295
|
files.push({
|
|
1317
1296
|
path: relativePath,
|
|
1318
1297
|
status: "created"
|
|
@@ -1331,7 +1310,7 @@ async function scaffoldExtensionProject(target, vocabulary = "extension") {
|
|
|
1331
1310
|
!(function() {
|
|
1332
1311
|
try {
|
|
1333
1312
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
1334
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
1313
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "bda44a9b-2e9f-5654-851d-eac3d5c6c094");
|
|
1335
1314
|
} catch (e2) {
|
|
1336
1315
|
}
|
|
1337
1316
|
})();
|
|
@@ -1473,6 +1452,7 @@ function parseRegistrationCollisionWarning(warning) {
|
|
|
1473
1452
|
}
|
|
1474
1453
|
return {
|
|
1475
1454
|
code,
|
|
1455
|
+
surface: parts.slice(1, -4).join(":") || "global",
|
|
1476
1456
|
winner: { layer: winnerLayer, name: winnerName },
|
|
1477
1457
|
displaced: { layer: displacedLayer, name: displacedName }
|
|
1478
1458
|
};
|
|
@@ -1498,6 +1478,58 @@ function buildRegistrationCollisionRemediation(warnings, commands) {
|
|
|
1498
1478
|
const collisionNameText = collisionNames.length > 0 ? ` Conflicting extensions: ${collisionNames.join(", ")}.` : "";
|
|
1499
1479
|
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}.`;
|
|
1500
1480
|
}
|
|
1481
|
+
function buildRegistrationCollisionPlan(scope, warnings, extensions, options) {
|
|
1482
|
+
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}`));
|
|
1483
|
+
if (collisions.length === 0) {
|
|
1484
|
+
return void 0;
|
|
1485
|
+
}
|
|
1486
|
+
const scopeFlag = scope === "global" ? "--global" : "--project";
|
|
1487
|
+
const deactivatePrefix = lifecycleFlagCommand(options, "deactivate");
|
|
1488
|
+
const doctorCommand = `${lifecycleFlagCommand(options, "doctor")} ${scopeFlag} --detail deep --trace`;
|
|
1489
|
+
const extensionByName = new Map(extensions.map((entry) => [normalizeExtensionNameForMatch(entry.name), entry]));
|
|
1490
|
+
const affectedByName = /* @__PURE__ */ new Map();
|
|
1491
|
+
for (const collision of collisions) {
|
|
1492
|
+
for (const name of [collision.winner.name, collision.displaced.name]) {
|
|
1493
|
+
const normalizedName = normalizeExtensionNameForMatch(name);
|
|
1494
|
+
affectedByName.set(normalizedName, (affectedByName.get(normalizedName) ?? 0) + 1);
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
const remediationCandidates = [...affectedByName.entries()].map(([normalizedName, affectedCollisions]) => {
|
|
1498
|
+
const extension = extensionByName.get(normalizedName);
|
|
1499
|
+
const extensionName = extension?.name ?? normalizedName;
|
|
1500
|
+
const commandPaths = extension?.command_paths ?? [];
|
|
1501
|
+
const actionPaths = extension?.action_paths ?? [];
|
|
1502
|
+
return {
|
|
1503
|
+
action: "deactivate",
|
|
1504
|
+
extension: extensionName,
|
|
1505
|
+
command: `${deactivatePrefix} ${extensionName} ${scopeFlag}`,
|
|
1506
|
+
affected_collisions: affectedCollisions,
|
|
1507
|
+
feature_loss: {
|
|
1508
|
+
command_paths: [...commandPaths].sort((left, right) => left.localeCompare(right)),
|
|
1509
|
+
action_paths: [...actionPaths].sort((left, right) => left.localeCompare(right))
|
|
1510
|
+
}
|
|
1511
|
+
};
|
|
1512
|
+
}).sort((left, right) => {
|
|
1513
|
+
const affectedDelta = right.affected_collisions - left.affected_collisions;
|
|
1514
|
+
if (affectedDelta !== 0) {
|
|
1515
|
+
return affectedDelta;
|
|
1516
|
+
}
|
|
1517
|
+
const leftSurfaceCount = left.feature_loss.command_paths.length + left.feature_loss.action_paths.length;
|
|
1518
|
+
const rightSurfaceCount = right.feature_loss.command_paths.length + right.feature_loss.action_paths.length;
|
|
1519
|
+
if (leftSurfaceCount !== rightSurfaceCount) {
|
|
1520
|
+
return leftSurfaceCount - rightSurfaceCount;
|
|
1521
|
+
}
|
|
1522
|
+
return left.extension.localeCompare(right.extension);
|
|
1523
|
+
});
|
|
1524
|
+
return {
|
|
1525
|
+
status: "conflicts_detected",
|
|
1526
|
+
collision_count: collisions.length,
|
|
1527
|
+
extension_count: affectedByName.size,
|
|
1528
|
+
next_best_command: doctorCommand,
|
|
1529
|
+
collisions,
|
|
1530
|
+
remediation_candidates: remediationCandidates
|
|
1531
|
+
};
|
|
1532
|
+
}
|
|
1501
1533
|
function classifyDoctorLoadFailureWarnings(loadFailures) {
|
|
1502
1534
|
const warnings = [];
|
|
1503
1535
|
for (const failure of loadFailures) {
|
|
@@ -1600,6 +1632,7 @@ function buildExtensionTriageSummary(scope, warnings, extensions, options = {})
|
|
|
1600
1632
|
remediation.push("Extension governance policy warnings detected. Review settings.extensions.policy mode and allow/block lists to confirm intended capabilities and registration surfaces.");
|
|
1601
1633
|
}
|
|
1602
1634
|
}
|
|
1635
|
+
const collisionPlan = buildRegistrationCollisionPlan(scope, normalizedWarnings, extensions, options);
|
|
1603
1636
|
if (updateHealthPartial) {
|
|
1604
1637
|
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>).`);
|
|
1605
1638
|
} else if (skippedUnmanagedTotal > 0) {
|
|
@@ -1638,7 +1671,8 @@ function buildExtensionTriageSummary(scope, warnings, extensions, options = {})
|
|
|
1638
1671
|
update_check_status_totals: updateCheckStatusTotals,
|
|
1639
1672
|
update_check_failed_total: updateCheckFailedTotal,
|
|
1640
1673
|
top_warnings: effectiveWarnings.slice(0, 8),
|
|
1641
|
-
remediation
|
|
1674
|
+
remediation,
|
|
1675
|
+
...collisionPlan ? { collision_plan: collisionPlan } : {}
|
|
1642
1676
|
};
|
|
1643
1677
|
}
|
|
1644
1678
|
function parseDoctorDetailMode(raw) {
|
|
@@ -1734,7 +1768,7 @@ function buildDoctorConsistencySummary(scope, installedExtensions, loadedExtensi
|
|
|
1734
1768
|
!(function() {
|
|
1735
1769
|
try {
|
|
1736
1770
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
1737
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
1771
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "efb7ee07-3564-5722-a520-fcc45e7dbc3c");
|
|
1738
1772
|
} catch (e2) {
|
|
1739
1773
|
}
|
|
1740
1774
|
})();
|
|
@@ -1814,11 +1848,11 @@ function sleep(ms) {
|
|
|
1814
1848
|
setTimeout(resolve, ms);
|
|
1815
1849
|
});
|
|
1816
1850
|
}
|
|
1817
|
-
async function copyExtensionDirectoryForInstall(sourceDirectory, destinationDirectory, copyDirectory =
|
|
1851
|
+
async function copyExtensionDirectoryForInstall(sourceDirectory, destinationDirectory, copyDirectory = fs6.cp) {
|
|
1818
1852
|
for (let attempt = 1; attempt <= EXTENSION_INSTALL_COPY_ATTEMPTS; attempt += 1) {
|
|
1819
1853
|
try {
|
|
1820
1854
|
if (await pathExists(destinationDirectory)) {
|
|
1821
|
-
await
|
|
1855
|
+
await fs6.rm(destinationDirectory, { recursive: true, force: true });
|
|
1822
1856
|
}
|
|
1823
1857
|
await copyExtensionDirectoryWithoutSelfNesting(sourceDirectory, destinationDirectory, copyDirectory);
|
|
1824
1858
|
return;
|
|
@@ -1831,8 +1865,8 @@ async function copyExtensionDirectoryForInstall(sourceDirectory, destinationDire
|
|
|
1831
1865
|
}
|
|
1832
1866
|
}
|
|
1833
1867
|
async function copyExtensionDirectoryWithoutSelfNesting(sourceDirectory, destinationDirectory, copyDirectory) {
|
|
1834
|
-
const resolvedSource =
|
|
1835
|
-
const resolvedDestination =
|
|
1868
|
+
const resolvedSource = path6.resolve(sourceDirectory);
|
|
1869
|
+
const resolvedDestination = path6.resolve(destinationDirectory);
|
|
1836
1870
|
if (resolvedSource === resolvedDestination) {
|
|
1837
1871
|
return;
|
|
1838
1872
|
}
|
|
@@ -1840,34 +1874,34 @@ async function copyExtensionDirectoryWithoutSelfNesting(sourceDirectory, destina
|
|
|
1840
1874
|
await copyDirectory(sourceDirectory, destinationDirectory, { recursive: true, force: true });
|
|
1841
1875
|
return;
|
|
1842
1876
|
}
|
|
1843
|
-
const stagingRoot = await
|
|
1844
|
-
const stagedDirectory =
|
|
1877
|
+
const stagingRoot = await fs6.mkdtemp(path6.join(os2.tmpdir(), "pm-extension-copy-"));
|
|
1878
|
+
const stagedDirectory = path6.join(stagingRoot, "extension");
|
|
1845
1879
|
try {
|
|
1846
1880
|
await copyDirectory(sourceDirectory, stagedDirectory, { recursive: true, force: true });
|
|
1847
1881
|
await copyDirectory(stagedDirectory, destinationDirectory, { recursive: true, force: true });
|
|
1848
1882
|
} finally {
|
|
1849
|
-
await
|
|
1883
|
+
await fs6.rm(stagingRoot, { recursive: true, force: true });
|
|
1850
1884
|
}
|
|
1851
1885
|
}
|
|
1852
1886
|
async function withExtensionInstallLock(settingsRoot, destinationDirectoryName, run) {
|
|
1853
|
-
const lockRoot =
|
|
1854
|
-
const lockPath =
|
|
1855
|
-
await
|
|
1887
|
+
const lockRoot = path6.join(settingsRoot, "runtime", "extension-install-locks");
|
|
1888
|
+
const lockPath = path6.join(lockRoot, `${destinationDirectoryName}.lock`);
|
|
1889
|
+
await fs6.mkdir(lockRoot, { recursive: true });
|
|
1856
1890
|
let acquired = false;
|
|
1857
1891
|
for (let attempt = 1; attempt <= EXTENSION_INSTALL_LOCK_ATTEMPTS; attempt += 1) {
|
|
1858
1892
|
try {
|
|
1859
|
-
await
|
|
1893
|
+
await fs6.mkdir(lockPath);
|
|
1860
1894
|
acquired = true;
|
|
1861
|
-
await
|
|
1895
|
+
await fs6.writeFile(path6.join(lockPath, "owner.json"), `${JSON.stringify({ pid: process.pid, created_at: nowIso(), destination: destinationDirectoryName }, null, 2)}
|
|
1862
1896
|
`, "utf8");
|
|
1863
1897
|
break;
|
|
1864
1898
|
} catch (error) {
|
|
1865
1899
|
if (!isErrnoCode(error, "EEXIST")) {
|
|
1866
1900
|
throw error;
|
|
1867
1901
|
}
|
|
1868
|
-
const stat = await
|
|
1902
|
+
const stat = await fs6.stat(lockPath).catch(() => null);
|
|
1869
1903
|
if (stat && Date.now() - stat.mtimeMs > EXTENSION_INSTALL_LOCK_STALE_MS) {
|
|
1870
|
-
await
|
|
1904
|
+
await fs6.rm(lockPath, { recursive: true, force: true });
|
|
1871
1905
|
continue;
|
|
1872
1906
|
}
|
|
1873
1907
|
await sleep(EXTENSION_INSTALL_LOCK_DELAY_MS);
|
|
@@ -1879,7 +1913,7 @@ async function withExtensionInstallLock(settingsRoot, destinationDirectoryName,
|
|
|
1879
1913
|
try {
|
|
1880
1914
|
return await run();
|
|
1881
1915
|
} finally {
|
|
1882
|
-
await
|
|
1916
|
+
await fs6.rm(lockPath, { recursive: true, force: true }).catch(() => void 0);
|
|
1883
1917
|
}
|
|
1884
1918
|
}
|
|
1885
1919
|
async function resolveInstalledExtensionCandidate(installed, extensionTarget) {
|
|
@@ -2057,7 +2091,7 @@ async function listInstalledExtensions(extensionsRoot, scope, settings, state) {
|
|
|
2057
2091
|
warnings: []
|
|
2058
2092
|
};
|
|
2059
2093
|
}
|
|
2060
|
-
const entries = await
|
|
2094
|
+
const entries = await fs6.readdir(extensionsRoot, { withFileTypes: true });
|
|
2061
2095
|
const directories = entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort((left, right) => left.localeCompare(right));
|
|
2062
2096
|
const managedByName = /* @__PURE__ */ new Map();
|
|
2063
2097
|
const managedByDirectory = /* @__PURE__ */ new Map();
|
|
@@ -2068,8 +2102,8 @@ async function listInstalledExtensions(extensionsRoot, scope, settings, state) {
|
|
|
2068
2102
|
const warnings = [];
|
|
2069
2103
|
const summaries = [];
|
|
2070
2104
|
for (const directoryName of directories) {
|
|
2071
|
-
const extensionDirectory =
|
|
2072
|
-
const manifestPath =
|
|
2105
|
+
const extensionDirectory = path6.join(extensionsRoot, directoryName);
|
|
2106
|
+
const manifestPath = path6.join(extensionDirectory, "manifest.json");
|
|
2073
2107
|
if (!await pathExists(manifestPath)) {
|
|
2074
2108
|
warnings.push(`extension_manifest_missing:${scope}:${directoryName}`);
|
|
2075
2109
|
const managedEntry2 = managedByDirectory.get(normalizeExtensionNameForMatch(directoryName));
|
|
@@ -2098,7 +2132,7 @@ async function listInstalledExtensions(extensionsRoot, scope, settings, state) {
|
|
|
2098
2132
|
}
|
|
2099
2133
|
let rawManifest;
|
|
2100
2134
|
try {
|
|
2101
|
-
rawManifest = JSON.parse(await
|
|
2135
|
+
rawManifest = JSON.parse(await fs6.readFile(manifestPath, "utf8"));
|
|
2102
2136
|
} catch {
|
|
2103
2137
|
warnings.push(`extension_manifest_invalid_json:${scope}:${directoryName}`);
|
|
2104
2138
|
continue;
|
|
@@ -2136,6 +2170,52 @@ async function listInstalledExtensions(extensionsRoot, scope, settings, state) {
|
|
|
2136
2170
|
warnings: warnings.sort((left, right) => left.localeCompare(right))
|
|
2137
2171
|
};
|
|
2138
2172
|
}
|
|
2173
|
+
function summarizeRuntimeCommandPathsForExtension(extensionName, installed) {
|
|
2174
|
+
const normalizedName = normalizeExtensionNameForMatch(extensionName);
|
|
2175
|
+
const entry = installed.find((candidate) => normalizeExtensionNameForMatch(candidate.name) === normalizedName);
|
|
2176
|
+
return {
|
|
2177
|
+
command_paths: [...entry?.command_paths ?? []].sort((left, right) => left.localeCompare(right)),
|
|
2178
|
+
action_paths: [...entry?.action_paths ?? []].sort((left, right) => left.localeCompare(right))
|
|
2179
|
+
};
|
|
2180
|
+
}
|
|
2181
|
+
function resolveCommandDiscoveryPackageName(extensionName, source) {
|
|
2182
|
+
if (source.kind === "npm" && typeof source.package === "string" && source.package.trim().length > 0) {
|
|
2183
|
+
return source.package.trim();
|
|
2184
|
+
}
|
|
2185
|
+
if (source.kind === "builtin" && typeof source.name === "string" && source.name.trim().length > 0) {
|
|
2186
|
+
return source.name.trim();
|
|
2187
|
+
}
|
|
2188
|
+
return extensionName;
|
|
2189
|
+
}
|
|
2190
|
+
function buildInstallCommandDiscovery(extensionName, source, commandSummary) {
|
|
2191
|
+
const helpCommands = commandSummary.command_paths.map((commandPath) => `pm ${commandPath} --help`);
|
|
2192
|
+
return {
|
|
2193
|
+
package_name: resolveCommandDiscoveryPackageName(extensionName, source),
|
|
2194
|
+
extension_name: extensionName,
|
|
2195
|
+
command_paths: commandSummary.command_paths,
|
|
2196
|
+
action_paths: commandSummary.action_paths,
|
|
2197
|
+
help_commands: helpCommands,
|
|
2198
|
+
next_steps: commandSummary.command_paths.length > 0 ? helpCommands : ["Run pm package doctor --project --detail deep if expected package commands are missing."]
|
|
2199
|
+
};
|
|
2200
|
+
}
|
|
2201
|
+
async function probeRuntimeCommandPathsForInstall(pmRoot, settings, refreshedInstalled, global2) {
|
|
2202
|
+
const loadResult = await loadExtensions({
|
|
2203
|
+
pmRoot,
|
|
2204
|
+
settings,
|
|
2205
|
+
cwd: process.cwd(),
|
|
2206
|
+
noExtensions: global2.noExtensions === true,
|
|
2207
|
+
reload_token: nextExtensionReloadToken(),
|
|
2208
|
+
cache_bust: true
|
|
2209
|
+
});
|
|
2210
|
+
const activationResult = await activateExtensions({
|
|
2211
|
+
...loadResult,
|
|
2212
|
+
loaded: loadResult.loaded
|
|
2213
|
+
});
|
|
2214
|
+
return {
|
|
2215
|
+
installed: applyDoctorRuntimeActivationState(refreshedInstalled, loadResult, activationResult),
|
|
2216
|
+
warnings: [...loadResult.warnings, ...activationResult.warnings]
|
|
2217
|
+
};
|
|
2218
|
+
}
|
|
2139
2219
|
async function checkGithubUpdate(source) {
|
|
2140
2220
|
const checkedAt = nowIso();
|
|
2141
2221
|
if (source.kind !== "github" || !source.repository) {
|
|
@@ -2197,7 +2277,7 @@ async function adoptUnmanagedExtensions(extensionsRoot, scope, installedExtensio
|
|
|
2197
2277
|
let nextState = state;
|
|
2198
2278
|
const adoptedEntries = [];
|
|
2199
2279
|
for (const candidate of sortedCandidates) {
|
|
2200
|
-
const extensionDirectory =
|
|
2280
|
+
const extensionDirectory = path6.join(extensionsRoot, candidate.directory);
|
|
2201
2281
|
const validated = await validateExtensionDirectory(extensionDirectory);
|
|
2202
2282
|
const now = nowIso();
|
|
2203
2283
|
const sourceRecord = {
|
|
@@ -2454,6 +2534,9 @@ async function runExtension(target, options, global2) {
|
|
|
2454
2534
|
destination_path: entry.result.details.destination_path,
|
|
2455
2535
|
activated: entry.result.details.activated,
|
|
2456
2536
|
settings_changed: entry.result.details.settings_changed,
|
|
2537
|
+
command_paths: entry.result.details.command_paths,
|
|
2538
|
+
action_paths: entry.result.details.action_paths,
|
|
2539
|
+
command_discovery: entry.result.details.command_discovery,
|
|
2457
2540
|
warnings: entry.result.warnings
|
|
2458
2541
|
}))
|
|
2459
2542
|
});
|
|
@@ -2473,10 +2556,10 @@ async function runExtension(target, options, global2) {
|
|
|
2473
2556
|
const settings = await readSettings(resolvedRoots.settings_root);
|
|
2474
2557
|
const managedStateRead = await readManagedExtensionState(resolvedRoots.selected_root);
|
|
2475
2558
|
warnings.push(...managedStateRead.warnings);
|
|
2476
|
-
const destinationDirectory =
|
|
2559
|
+
const destinationDirectory = path6.join(resolvedRoots.selected_root, destinationDirectoryName);
|
|
2477
2560
|
const destinationExists = await pathExists(destinationDirectory);
|
|
2478
2561
|
const installInPlace = await areDirectoriesEquivalent(validated.directory, destinationDirectory);
|
|
2479
|
-
await
|
|
2562
|
+
await fs6.mkdir(resolvedRoots.selected_root, { recursive: true });
|
|
2480
2563
|
if (!installInPlace) {
|
|
2481
2564
|
await copyExtensionDirectoryForInstall(validated.directory, destinationDirectory);
|
|
2482
2565
|
}
|
|
@@ -2525,6 +2608,11 @@ async function runExtension(target, options, global2) {
|
|
|
2525
2608
|
if (activationChanged) {
|
|
2526
2609
|
await writeSettings(resolvedRoots.settings_root, settings, "settings:write");
|
|
2527
2610
|
}
|
|
2611
|
+
const refreshedInstalled = await listInstalledExtensions(resolvedRoots.selected_root, scope, settings, managedState);
|
|
2612
|
+
warnings.push(...refreshedInstalled.warnings);
|
|
2613
|
+
const runtimeProbe = await probeRuntimeCommandPathsForInstall(resolvedRoots.pm_root, settings, refreshedInstalled.extensions, global2);
|
|
2614
|
+
warnings.push(...runtimeProbe.warnings);
|
|
2615
|
+
const commandSummary = summarizeRuntimeCommandPathsForExtension(validated.manifest.name, runtimeProbe.installed);
|
|
2528
2616
|
return withResult({
|
|
2529
2617
|
extension: {
|
|
2530
2618
|
name: validated.manifest.name,
|
|
@@ -2538,7 +2626,10 @@ async function runExtension(target, options, global2) {
|
|
|
2538
2626
|
overwritten: destinationExists && !installInPlace,
|
|
2539
2627
|
installed_in_place: installInPlace,
|
|
2540
2628
|
activated: true,
|
|
2541
|
-
settings_changed: activationChanged
|
|
2629
|
+
settings_changed: activationChanged,
|
|
2630
|
+
command_paths: commandSummary.command_paths,
|
|
2631
|
+
action_paths: commandSummary.action_paths,
|
|
2632
|
+
command_discovery: buildInstallCommandDiscovery(validated.manifest.name, sourceRecord, commandSummary)
|
|
2542
2633
|
});
|
|
2543
2634
|
});
|
|
2544
2635
|
} finally {
|
|
@@ -2606,7 +2697,7 @@ async function runExtension(target, options, global2) {
|
|
|
2606
2697
|
}
|
|
2607
2698
|
});
|
|
2608
2699
|
}
|
|
2609
|
-
const extensionDirectory =
|
|
2700
|
+
const extensionDirectory = path6.join(resolvedRoots.selected_root, candidate.directory);
|
|
2610
2701
|
const validated = await validateExtensionDirectory(extensionDirectory);
|
|
2611
2702
|
const now = nowIso();
|
|
2612
2703
|
const sourceRecord = githubOption === void 0 ? {
|
|
@@ -2671,8 +2762,8 @@ async function runExtension(target, options, global2) {
|
|
|
2671
2762
|
if (!candidate) {
|
|
2672
2763
|
throw new PmCliError(`Installed extension "${extensionTarget}" was not found in ${scope} scope.`, EXIT_CODE.NOT_FOUND);
|
|
2673
2764
|
}
|
|
2674
|
-
const destinationDirectory =
|
|
2675
|
-
await
|
|
2765
|
+
const destinationDirectory = path6.join(resolvedRoots.selected_root, candidate.directory);
|
|
2766
|
+
await fs6.rm(destinationDirectory, { recursive: true, force: true });
|
|
2676
2767
|
const updatedState = {
|
|
2677
2768
|
...managedStateRead.state,
|
|
2678
2769
|
updated_at: nowIso(),
|
|
@@ -3027,8 +3118,6 @@ async function runExtension(target, options, global2) {
|
|
|
3027
3118
|
}
|
|
3028
3119
|
|
|
3029
3120
|
export {
|
|
3030
|
-
parseExtensionManifest,
|
|
3031
|
-
validateExtensionDirectory,
|
|
3032
3121
|
resolveManagedExtensionStatePath,
|
|
3033
3122
|
readManagedExtensionState,
|
|
3034
3123
|
writeManagedExtensionState,
|
|
@@ -3037,4 +3126,4 @@ export {
|
|
|
3037
3126
|
copyExtensionDirectoryForInstall,
|
|
3038
3127
|
runExtension
|
|
3039
3128
|
};
|
|
3040
|
-
//# sourceMappingURL=chunk-
|
|
3129
|
+
//# sourceMappingURL=chunk-KR6R465K.js.map
|