@unbrained/pm-cli 2026.6.30 → 2026.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +20 -0
- package/dist/cli/bootstrap-args.js +89 -79
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commands/calendar.js +63 -62
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/create.js +483 -434
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.js +59 -46
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/doctor.js +129 -78
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/managed-state.js +101 -57
- package/dist/cli/commands/extension/managed-state.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.d.ts +7 -0
- package/dist/cli/commands/extension/scaffold.js +214 -186
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +6 -1
- package/dist/cli/commands/extension.js +1034 -902
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/list-filter-shared.js +55 -48
- package/dist/cli/commands/list-filter-shared.js.map +1 -1
- package/dist/cli/commands/search.js +94 -68
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test.js +108 -122
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update.js +27 -77
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/extension-command-options.js +48 -21
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/registration-helpers.js +117 -122
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-AW6XVFH6.js +16 -0
- package/dist/cli-bundle/chunks/{activity-MVSEND6D.js → activity-DBLQVIP6.js} +9 -9
- package/dist/cli-bundle/chunks/{aggregate-MOC4TR2G.js → aggregate-JTEF4BP7.js} +9 -9
- package/dist/cli-bundle/chunks/{aggregate-XJHLZQ5X.js → aggregate-SDF7DUOD.js} +9 -9
- package/dist/cli-bundle/chunks/{append-LEDBAM3K.js → append-LOVPGVPT.js} +6 -6
- package/dist/cli-bundle/chunks/{append-KDHT4GHI.js → append-QCFJSDFL.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-FBZ5XAAF.js → chunk-22WKIL3H.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-EVWYAG46.js → chunk-2466X6E4.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-3JWQCLR5.js → chunk-27BXPBAY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WTRUDJ3R.js → chunk-2D4HATP2.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-DORJSBGJ.js → chunk-3J6JRJ3I.js} +127 -125
- package/dist/cli-bundle/chunks/chunk-3J6JRJ3I.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LBH7UYKY.js → chunk-3K2M5OYU.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-KTMMTOIP.js → chunk-3S2KT7NG.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-FDEVKXC4.js → chunk-3VGN2UWE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-K46GQ265.js → chunk-3XZCOZ5J.js} +107 -117
- package/dist/cli-bundle/chunks/chunk-3XZCOZ5J.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4A3BJ675.js +799 -0
- package/dist/cli-bundle/chunks/chunk-4A3BJ675.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +87 -0
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KYDYQMNW.js → chunk-4DSGXSBL.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7L6TXOOC.js → chunk-4DUVCVLZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UB3V5WUI.js → chunk-4XOIEKSD.js} +351 -330
- package/dist/cli-bundle/chunks/chunk-4XOIEKSD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-DJDXAU74.js → chunk-55SNVXRQ.js} +68 -69
- package/dist/cli-bundle/chunks/chunk-55SNVXRQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZIE6WXJ2.js → chunk-5CGRF3L5.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-7WDETKGP.js → chunk-5QFDBI4F.js} +1105 -965
- package/dist/cli-bundle/chunks/chunk-5QFDBI4F.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IBU2LLWM.js → chunk-64HNBBFQ.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-T7ZMQI4J.js → chunk-6AQZPVHQ.js} +198 -189
- package/dist/cli-bundle/chunks/chunk-6AQZPVHQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-CY5IJMUM.js → chunk-7R4QEMZZ.js} +361 -322
- package/dist/cli-bundle/chunks/chunk-7R4QEMZZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WFJZDUM7.js → chunk-A7FPBAQS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-74PUWBGN.js → chunk-AVEE5EHK.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KRASIL6M.js → chunk-AXIDKKAT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CHRNYKNI.js → chunk-BDTISOSD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZFIEEDTJ.js → chunk-BHO33VBQ.js} +509 -363
- package/dist/cli-bundle/chunks/chunk-BHO33VBQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RM6MHL6A.js → chunk-BZCEN4JA.js} +98 -74
- package/dist/cli-bundle/chunks/chunk-BZCEN4JA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RPRW26NG.js → chunk-CF7RL6FR.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-NIBP3I7A.js → chunk-CWFNTKQJ.js} +128 -126
- package/dist/cli-bundle/chunks/chunk-CWFNTKQJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BN3CWK6G.js → chunk-DDPTYJIM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4YIMPANT.js → chunk-EJUDVUYZ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-73PTKMAE.js → chunk-EVMTBV6V.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-6YRAMXRS.js → chunk-FFMQB7WR.js} +99 -75
- package/dist/cli-bundle/chunks/chunk-FFMQB7WR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-E2Q2ULMR.js → chunk-G7I7DEZA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-IDYCAK35.js → chunk-GJ326ZKX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-JJ4SG243.js → chunk-HPPFYYOV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5IRVSKPS.js → chunk-HXTQJXWT.js} +150 -224
- package/dist/cli-bundle/chunks/chunk-HXTQJXWT.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JIP67N2K.js → chunk-HYTGA6GI.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7RIJGN4R.js → chunk-HZZEHPRG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4TXTVZL3.js → chunk-IJYK2T43.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GF7EAR22.js → chunk-IPYBJWTE.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-AWN4PPH5.js → chunk-IZBR4NRW.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-IF4ERU6A.js → chunk-JLM7BHI7.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-DU66JUGT.js → chunk-JMP4E6D7.js} +106 -116
- package/dist/cli-bundle/chunks/chunk-JMP4E6D7.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HUYYMTGW.js → chunk-JPECA746.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KGQ3W65B.js → chunk-JSU5P7VS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-HIBK6H4S.js → chunk-JWXRETDF.js} +69 -70
- package/dist/cli-bundle/chunks/chunk-JWXRETDF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Z5BM2FKQ.js → chunk-KNPEF7QG.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-DLDCPF5X.js → chunk-L5OEFZQG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-DRPF274X.js → chunk-LB6TP6MC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YEDFE4DC.js → chunk-MAUKX7JC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6T5ZIWBS.js → chunk-MDPEOIGN.js} +150 -224
- package/dist/cli-bundle/chunks/chunk-MDPEOIGN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OB3RJV5F.js → chunk-N74UMG5H.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZEATCVAC.js → chunk-NFDPYAIP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OUQ5JEFM.js → chunk-NKZAN7BD.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5ABGFWR4.js → chunk-NOLPZMSV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JZG5ADVE.js → chunk-NU2UEROZ.js} +1103 -963
- package/dist/cli-bundle/chunks/chunk-NU2UEROZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-A3UNLXNJ.js → chunk-NUHHPVVS.js} +36 -86
- package/dist/cli-bundle/chunks/chunk-NUHHPVVS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QE5UFCCO.js → chunk-NWMZWYYB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VMY7MZEM.js → chunk-OGXLACHC.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-IHXXUIXS.js → chunk-OTUHB4HS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-V3KLX7U7.js → chunk-QCWF6IYD.js} +510 -364
- package/dist/cli-bundle/chunks/chunk-QCWF6IYD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UFKNF23C.js → chunk-RGEMWD6Q.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-RH5ZBYFD.js +809 -0
- package/dist/cli-bundle/chunks/chunk-RH5ZBYFD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Z55WX4IQ.js → chunk-RLDHZHQS.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-NO6Y6FB2.js → chunk-RMMQ74TG.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-SNUK7H5J.js → chunk-RVUALSJF.js} +361 -322
- package/dist/cli-bundle/chunks/chunk-RVUALSJF.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IZQOJR2B.js → chunk-SDR5J34Q.js} +198 -189
- package/dist/cli-bundle/chunks/chunk-SDR5J34Q.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SJZTPVFT.js → chunk-SLMUGTK3.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-BOWQWXLI.js → chunk-TP5Q5ZD3.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-D5LYZVGB.js → chunk-UYUYDGIB.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-JVQ7UOYC.js → chunk-UZIWVBE6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JTRKME24.js → chunk-V3NOKJF2.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-5T6WPLRO.js → chunk-VARHOHYV.js} +350 -329
- package/dist/cli-bundle/chunks/chunk-VARHOHYV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-F7G53BOA.js → chunk-VICZWYGZ.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +84 -0
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TQ6E76BE.js → chunk-W4ULYO7Z.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-MLHX6DN5.js → chunk-WYDHYJPO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-53ARXF2O.js → chunk-YITK2PJ6.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-VD3LKZFX.js → chunk-ZETXE4SE.js} +37 -87
- package/dist/cli-bundle/chunks/chunk-ZETXE4SE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-D6USKAMA.js → chunk-ZRP4VG5U.js} +2 -2
- package/dist/cli-bundle/chunks/{claim-6NINZYB3.js → claim-EMQLYPRW.js} +8 -8
- package/dist/cli-bundle/chunks/{claim-HMCLSLUE.js → claim-T3GCKV7C.js} +8 -8
- package/dist/cli-bundle/chunks/close-E6ZZGCJY.js +14 -0
- package/dist/cli-bundle/chunks/{close-OP3LK7Z2.js → close-TQYAAFJP.js} +7 -7
- package/dist/cli-bundle/chunks/{close-many-BFMP6HHK.js → close-many-BG5QQIDQ.js} +15 -15
- package/dist/cli-bundle/chunks/{close-many-CXJBOWWY.js → close-many-LDRVEQY2.js} +15 -15
- package/dist/cli-bundle/chunks/{comments-MU2WMBUY.js → comments-QCKR2YY2.js} +8 -8
- package/dist/cli-bundle/chunks/{comments-ETHABIY6.js → comments-YUXJRZPQ.js} +8 -8
- package/dist/cli-bundle/chunks/{config-FIXJZEQK.js → config-DMSU64QO.js} +7 -7
- package/dist/cli-bundle/chunks/{config-X3ZVCUUG.js → config-QH2DICD6.js} +7 -7
- package/dist/cli-bundle/chunks/{context-XDI4DKKT.js → context-B6275WPX.js} +12 -12
- package/dist/cli-bundle/chunks/{context-7ZEZV3BV.js → context-OCZ3FJ4Z.js} +12 -12
- package/dist/cli-bundle/chunks/{contracts-SMOAN5NF.js → contracts-HN7ABKLP.js} +3 -3
- package/dist/cli-bundle/chunks/{contracts-KP4QAGVW.js → contracts-W4FZVVD6.js} +3 -3
- package/dist/cli-bundle/chunks/{copy-CWM6SBY6.js → copy-BTJOSKKT.js} +5 -5
- package/dist/cli-bundle/chunks/{copy-JJ3KOQW2.js → copy-DEM4DATS.js} +5 -5
- package/dist/cli-bundle/chunks/create-OH3BDGBB.js +28 -0
- package/dist/cli-bundle/chunks/{create-J5Q2ELZT.js → create-RLRJMRTM.js} +12 -12
- package/dist/cli-bundle/chunks/{delete-OOQS4KVD.js → delete-BHK7VB2Z.js} +5 -5
- package/dist/cli-bundle/chunks/{delete-2GZLQEUQ.js → delete-LSVHAB4Y.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-ZVGGCRR6.js → deps-4UDFJRUA.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-IF4IGL4R.js → deps-XHYXWEPT.js} +5 -5
- package/dist/cli-bundle/chunks/{docs-2TIFR62T.js → docs-26S44RXU.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-NFTBCQQC.js → docs-GYZNVS26.js} +7 -7
- package/dist/cli-bundle/chunks/{eval-2F6EH4XN.js → eval-PGRVIJQU.js} +10 -10
- package/dist/cli-bundle/chunks/{eval-PFKXQR3B.js → eval-UYF3ZPVO.js} +10 -10
- package/dist/cli-bundle/chunks/{extension-GMVOIP4O.js → extension-CPSLJQVE.js} +11 -10
- package/dist/cli-bundle/chunks/{extension-3LRYX7SW.js → extension-CXJ6RELI.js} +11 -10
- package/dist/cli-bundle/chunks/{files-T5ODMETM.js → files-MBNICQFM.js} +7 -7
- package/dist/cli-bundle/chunks/{files-DF3HO6XK.js → files-NQHEXUZD.js} +7 -7
- package/dist/cli-bundle/chunks/{focus-DLXKK4AH.js → focus-DWYIG7GU.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-MY5ARIEK.js → focus-XZW5423D.js} +6 -6
- package/dist/cli-bundle/chunks/{gc-FULIVYR4.js → gc-7GQYOS2G.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-MDGRR2SU.js → gc-LPVMKJQJ.js} +3 -3
- package/dist/cli-bundle/chunks/{get-AWK324RS.js → get-A7MAOHCU.js} +9 -9
- package/dist/cli-bundle/chunks/{get-VYPIICPC.js → get-DSDEKJ3L.js} +9 -9
- package/dist/cli-bundle/chunks/{health-Q66C43GN.js → health-3IPFLKXB.js} +17 -16
- package/dist/cli-bundle/chunks/{health-Q66C43GN.js.map → health-3IPFLKXB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-FBCVZGSX.js → health-GZXGBZ36.js} +15 -14
- package/dist/cli-bundle/chunks/{health-FBCVZGSX.js.map → health-GZXGBZ36.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-X4OSES6K.js → history-NERDJNUB.js} +8 -8
- package/dist/cli-bundle/chunks/history-WSZHY3PN.js +18 -0
- package/dist/cli-bundle/chunks/{history-compact-WLCQEKXS.js → history-compact-2WRZ2WK4.js} +10 -10
- package/dist/cli-bundle/chunks/{history-compact-2GHT32UX.js → history-compact-HR7BB4LR.js} +10 -10
- package/dist/cli-bundle/chunks/history-redact-MP6CH7U5.js +19 -0
- package/dist/cli-bundle/chunks/{history-redact-45YW65BK.js → history-redact-O3NBCNWC.js} +9 -9
- package/dist/cli-bundle/chunks/{history-repair-GABSDSVD.js → history-repair-LCMOS45X.js} +10 -10
- package/dist/cli-bundle/chunks/{history-repair-FY75IC26.js → history-repair-XA3LC4GA.js} +10 -10
- package/dist/cli-bundle/chunks/{init-KO7CGIRQ.js → init-64XDLQJB.js} +12 -11
- package/dist/cli-bundle/chunks/init-PAX32BJA.js +22 -0
- package/dist/cli-bundle/chunks/{learnings-3F7YLI45.js → learnings-JR6MA5TI.js} +8 -8
- package/dist/cli-bundle/chunks/{learnings-LHZT5BHW.js → learnings-LPKCSJX7.js} +8 -8
- package/dist/cli-bundle/chunks/{list-ROT7JF62.js → list-DNBJVO3E.js} +8 -8
- package/dist/cli-bundle/chunks/{list-Y6AU5BJS.js → list-G5Y65VF6.js} +8 -8
- package/dist/cli-bundle/chunks/{next-66BJB4N2.js → next-BCERKDUR.js} +13 -13
- package/dist/cli-bundle/chunks/{next-N5MWJTBY.js → next-FYTQF6HG.js} +13 -13
- package/dist/cli-bundle/chunks/{notes-FW6YFLND.js → notes-2BMU3VVQ.js} +8 -8
- package/dist/cli-bundle/chunks/{notes-EVJZ3VAB.js → notes-6KTGO2OJ.js} +8 -8
- package/dist/cli-bundle/chunks/{plan-DQ7G4EDC.js → plan-4WXEQCTN.js} +12 -12
- package/dist/cli-bundle/chunks/{plan-ZHKZ7JVF.js → plan-RKZHQVXR.js} +12 -12
- package/dist/cli-bundle/chunks/{profile-UPZGCDOG.js → profile-4OMM32CD.js} +8 -8
- package/dist/cli-bundle/chunks/{profile-CHAW6SEA.js → profile-QLER5ENE.js} +8 -8
- package/dist/cli-bundle/chunks/{register-list-query-Y2VRHPCL.js → register-list-query-7LV46VAU.js} +18 -18
- package/dist/cli-bundle/chunks/{register-list-query-KY6Z6WV7.js → register-list-query-SNG5PGA4.js} +18 -18
- package/dist/cli-bundle/chunks/{register-mutation-PCARIGZS.js → register-mutation-ENNDUAZG.js} +35 -35
- package/dist/cli-bundle/chunks/{register-mutation-N6AYSKPM.js → register-mutation-KK7PHYYU.js} +35 -35
- package/dist/cli-bundle/chunks/{register-operations-YAT6FUUB.js → register-operations-C6OWLDSH.js} +30 -30
- package/dist/cli-bundle/chunks/{register-operations-L6CYTOIH.js → register-operations-HZ6XERQG.js} +30 -30
- package/dist/cli-bundle/chunks/{register-setup-N7UGXYJC.js → register-setup-P67EMBDJ.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-MPANILQF.js → register-setup-ZKJ53RS7.js} +15 -15
- package/dist/cli-bundle/chunks/{restore-DKMCLPI5.js → restore-4MHZFJ2E.js} +9 -9
- package/dist/cli-bundle/chunks/restore-YALDGTQR.js +17 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-3F4QUEDH.js → scheduling-shortcuts-LB6DOLRL.js} +12 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-BNZLQK36.js → scheduling-shortcuts-UTOYKLXQ.js} +12 -12
- package/dist/cli-bundle/chunks/{schema-OLT6LVKH.js → schema-73HR2OJW.js} +7 -7
- package/dist/cli-bundle/chunks/{schema-XJXKJQF5.js → schema-U6LJKSIR.js} +7 -7
- package/dist/cli-bundle/chunks/{search-CX5UMV4H.js → search-AXPXKZER.js} +10 -10
- package/dist/cli-bundle/chunks/{search-KP6H7COV.js → search-KILGT37L.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-QZUG6MX5.js → stats-PSYVVTNZ.js} +6 -6
- package/dist/cli-bundle/chunks/{stats-7XW4OEMK.js → stats-W5KNVJWQ.js} +6 -6
- package/dist/cli-bundle/chunks/{telemetry-WTYFUPRL.js → telemetry-BZUF6H7G.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-DIFPXCAT.js → telemetry-GAHHQTOS.js} +4 -4
- package/dist/cli-bundle/chunks/{test-QNDXZQCW.js → test-ACD52Z3S.js} +15 -14
- package/dist/cli-bundle/chunks/{test-HU2BS7EY.js → test-PWDIZ255.js} +15 -14
- package/dist/cli-bundle/chunks/{test-all-XLPI4USF.js → test-all-L2MDDUCA.js} +17 -16
- package/dist/cli-bundle/chunks/{test-all-XLPI4USF.js.map → test-all-L2MDDUCA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-PZTBLLQ6.js → test-all-RBZ6DLU2.js} +15 -14
- package/dist/cli-bundle/chunks/{test-all-PZTBLLQ6.js.map → test-all-RBZ6DLU2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-runs-LANLLPVO.js → test-runs-PLRAZEFW.js} +4 -4
- package/dist/cli-bundle/chunks/{test-runs-CA6K32RD.js → test-runs-UXIXPDKU.js} +4 -4
- package/dist/cli-bundle/chunks/update-AMRSOIWP.js +24 -0
- package/dist/cli-bundle/chunks/{update-DJKWLBWJ.js → update-KFX2SIAC.js} +15 -15
- package/dist/cli-bundle/chunks/{update-many-VW5DGF3S.js → update-many-RNSBX2TA.js} +23 -23
- package/dist/cli-bundle/chunks/{update-many-LU3SCNK5.js → update-many-Z5GJS5LC.js} +23 -23
- package/dist/cli-bundle/chunks/{upgrade-77FRUAXN.js → upgrade-BRL6KCOJ.js} +13 -12
- package/dist/cli-bundle/chunks/{upgrade-77FRUAXN.js.map → upgrade-BRL6KCOJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-ICXY244R.js → upgrade-HAK6JG2O.js} +11 -10
- package/dist/cli-bundle/chunks/{upgrade-ICXY244R.js.map → upgrade-HAK6JG2O.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-2G566PKQ.js → validate-MTUVL5VC.js} +20 -19
- package/dist/cli-bundle/chunks/{validate-2G566PKQ.js.map → validate-MTUVL5VC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-BDPVXHHH.js → validate-X5W76YJL.js} +22 -21
- package/dist/cli-bundle/chunks/{validate-BDPVXHHH.js.map → validate-X5W76YJL.js.map} +1 -1
- package/dist/cli-bundle/main.js +55 -702
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/extensions/activation-summary-markdown.js +23 -12
- package/dist/core/extensions/activation-summary-markdown.js.map +1 -1
- package/dist/core/extensions/extension-policy.d.ts +18 -3
- package/dist/core/extensions/extension-policy.js +116 -106
- package/dist/core/extensions/extension-policy.js.map +1 -1
- package/dist/core/extensions/loader.js +310 -232
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/item/item-format.js +523 -410
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/mcp/server.js +387 -367
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +111 -180
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +76 -45
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/compose.d.ts +4 -1
- package/dist/sdk/compose.js +181 -115
- package/dist/sdk/compose.js.map +1 -1
- package/docs/RELEASING.md +2 -3
- package/package.json +1 -1
- package/dist/cli-bundle/chunks/activity-EJBMXUBH.js +0 -16
- package/dist/cli-bundle/chunks/chunk-5IRVSKPS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5T6WPLRO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6T5ZIWBS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6YRAMXRS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7WDETKGP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-A3UNLXNJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-C2KCIZKZ.js +0 -115
- package/dist/cli-bundle/chunks/chunk-C2KCIZKZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CY5IJMUM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DJDXAU74.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DORJSBGJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DU66JUGT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-F6VH3LFC.js +0 -118
- package/dist/cli-bundle/chunks/chunk-F6VH3LFC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HIBK6H4S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ISEKN64V.js +0 -35
- package/dist/cli-bundle/chunks/chunk-ISEKN64V.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IZQOJR2B.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JZG5ADVE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-K46GQ265.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NIBP3I7A.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RM6MHL6A.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SNUK7H5J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-T7ZMQI4J.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UB3V5WUI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-V3KLX7U7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VD3LKZFX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js +0 -32
- package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZFIEEDTJ.js.map +0 -7
- package/dist/cli-bundle/chunks/close-37KEHLYM.js +0 -14
- package/dist/cli-bundle/chunks/create-DFMNBKBS.js +0 -28
- package/dist/cli-bundle/chunks/history-5XUSLAJA.js +0 -18
- package/dist/cli-bundle/chunks/history-redact-BVHWDXPR.js +0 -19
- package/dist/cli-bundle/chunks/init-TRYJELH4.js +0 -21
- package/dist/cli-bundle/chunks/restore-IRAKSWIW.js +0 -17
- package/dist/cli-bundle/chunks/update-UXDLTEOZ.js +0 -24
- /package/dist/cli-bundle/chunks/{activity-EJBMXUBH.js.map → activity-AW6XVFH6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-MVSEND6D.js.map → activity-DBLQVIP6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-MOC4TR2G.js.map → aggregate-JTEF4BP7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-XJHLZQ5X.js.map → aggregate-SDF7DUOD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-LEDBAM3K.js.map → append-LOVPGVPT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-KDHT4GHI.js.map → append-QCFJSDFL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FBZ5XAAF.js.map → chunk-22WKIL3H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EVWYAG46.js.map → chunk-2466X6E4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3JWQCLR5.js.map → chunk-27BXPBAY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WTRUDJ3R.js.map → chunk-2D4HATP2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LBH7UYKY.js.map → chunk-3K2M5OYU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KTMMTOIP.js.map → chunk-3S2KT7NG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FDEVKXC4.js.map → chunk-3VGN2UWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KYDYQMNW.js.map → chunk-4DSGXSBL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7L6TXOOC.js.map → chunk-4DUVCVLZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZIE6WXJ2.js.map → chunk-5CGRF3L5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IBU2LLWM.js.map → chunk-64HNBBFQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WFJZDUM7.js.map → chunk-A7FPBAQS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-74PUWBGN.js.map → chunk-AVEE5EHK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KRASIL6M.js.map → chunk-AXIDKKAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CHRNYKNI.js.map → chunk-BDTISOSD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RPRW26NG.js.map → chunk-CF7RL6FR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BN3CWK6G.js.map → chunk-DDPTYJIM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4YIMPANT.js.map → chunk-EJUDVUYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-73PTKMAE.js.map → chunk-EVMTBV6V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E2Q2ULMR.js.map → chunk-G7I7DEZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IDYCAK35.js.map → chunk-GJ326ZKX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JJ4SG243.js.map → chunk-HPPFYYOV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JIP67N2K.js.map → chunk-HYTGA6GI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7RIJGN4R.js.map → chunk-HZZEHPRG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4TXTVZL3.js.map → chunk-IJYK2T43.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GF7EAR22.js.map → chunk-IPYBJWTE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AWN4PPH5.js.map → chunk-IZBR4NRW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IF4ERU6A.js.map → chunk-JLM7BHI7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HUYYMTGW.js.map → chunk-JPECA746.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KGQ3W65B.js.map → chunk-JSU5P7VS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z5BM2FKQ.js.map → chunk-KNPEF7QG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DLDCPF5X.js.map → chunk-L5OEFZQG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DRPF274X.js.map → chunk-LB6TP6MC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YEDFE4DC.js.map → chunk-MAUKX7JC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OB3RJV5F.js.map → chunk-N74UMG5H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZEATCVAC.js.map → chunk-NFDPYAIP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OUQ5JEFM.js.map → chunk-NKZAN7BD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5ABGFWR4.js.map → chunk-NOLPZMSV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QE5UFCCO.js.map → chunk-NWMZWYYB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VMY7MZEM.js.map → chunk-OGXLACHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IHXXUIXS.js.map → chunk-OTUHB4HS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UFKNF23C.js.map → chunk-RGEMWD6Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z55WX4IQ.js.map → chunk-RLDHZHQS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NO6Y6FB2.js.map → chunk-RMMQ74TG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SJZTPVFT.js.map → chunk-SLMUGTK3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BOWQWXLI.js.map → chunk-TP5Q5ZD3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D5LYZVGB.js.map → chunk-UYUYDGIB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JVQ7UOYC.js.map → chunk-UZIWVBE6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JTRKME24.js.map → chunk-V3NOKJF2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F7G53BOA.js.map → chunk-VICZWYGZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TQ6E76BE.js.map → chunk-W4ULYO7Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MLHX6DN5.js.map → chunk-WYDHYJPO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-53ARXF2O.js.map → chunk-YITK2PJ6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D6USKAMA.js.map → chunk-ZRP4VG5U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-6NINZYB3.js.map → claim-EMQLYPRW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-HMCLSLUE.js.map → claim-T3GCKV7C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-37KEHLYM.js.map → close-E6ZZGCJY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-OP3LK7Z2.js.map → close-TQYAAFJP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-BFMP6HHK.js.map → close-many-BG5QQIDQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-CXJBOWWY.js.map → close-many-LDRVEQY2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-MU2WMBUY.js.map → comments-QCKR2YY2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-ETHABIY6.js.map → comments-YUXJRZPQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-FIXJZEQK.js.map → config-DMSU64QO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-X3ZVCUUG.js.map → config-QH2DICD6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-XDI4DKKT.js.map → context-B6275WPX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-7ZEZV3BV.js.map → context-OCZ3FJ4Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-SMOAN5NF.js.map → contracts-HN7ABKLP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-KP4QAGVW.js.map → contracts-W4FZVVD6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-CWM6SBY6.js.map → copy-BTJOSKKT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-JJ3KOQW2.js.map → copy-DEM4DATS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-DFMNBKBS.js.map → create-OH3BDGBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-J5Q2ELZT.js.map → create-RLRJMRTM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-OOQS4KVD.js.map → delete-BHK7VB2Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-2GZLQEUQ.js.map → delete-LSVHAB4Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-ZVGGCRR6.js.map → deps-4UDFJRUA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-IF4IGL4R.js.map → deps-XHYXWEPT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-2TIFR62T.js.map → docs-26S44RXU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-NFTBCQQC.js.map → docs-GYZNVS26.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-2F6EH4XN.js.map → eval-PGRVIJQU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-PFKXQR3B.js.map → eval-UYF3ZPVO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-GMVOIP4O.js.map → extension-CPSLJQVE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-3LRYX7SW.js.map → extension-CXJ6RELI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-T5ODMETM.js.map → files-MBNICQFM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-DF3HO6XK.js.map → files-NQHEXUZD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-DLXKK4AH.js.map → focus-DWYIG7GU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-MY5ARIEK.js.map → focus-XZW5423D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-FULIVYR4.js.map → gc-7GQYOS2G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-MDGRR2SU.js.map → gc-LPVMKJQJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-AWK324RS.js.map → get-A7MAOHCU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-VYPIICPC.js.map → get-DSDEKJ3L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-X4OSES6K.js.map → history-NERDJNUB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-5XUSLAJA.js.map → history-WSZHY3PN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-WLCQEKXS.js.map → history-compact-2WRZ2WK4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-2GHT32UX.js.map → history-compact-HR7BB4LR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-BVHWDXPR.js.map → history-redact-MP6CH7U5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-45YW65BK.js.map → history-redact-O3NBCNWC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-GABSDSVD.js.map → history-repair-LCMOS45X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-FY75IC26.js.map → history-repair-XA3LC4GA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-KO7CGIRQ.js.map → init-64XDLQJB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-TRYJELH4.js.map → init-PAX32BJA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-3F7YLI45.js.map → learnings-JR6MA5TI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-LHZT5BHW.js.map → learnings-LPKCSJX7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-ROT7JF62.js.map → list-DNBJVO3E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-Y6AU5BJS.js.map → list-G5Y65VF6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{next-66BJB4N2.js.map → next-BCERKDUR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{next-N5MWJTBY.js.map → next-FYTQF6HG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-FW6YFLND.js.map → notes-2BMU3VVQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-EVJZ3VAB.js.map → notes-6KTGO2OJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-DQ7G4EDC.js.map → plan-4WXEQCTN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-ZHKZ7JVF.js.map → plan-RKZHQVXR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-UPZGCDOG.js.map → profile-4OMM32CD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-CHAW6SEA.js.map → profile-QLER5ENE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-Y2VRHPCL.js.map → register-list-query-7LV46VAU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-KY6Z6WV7.js.map → register-list-query-SNG5PGA4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-PCARIGZS.js.map → register-mutation-ENNDUAZG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-N6AYSKPM.js.map → register-mutation-KK7PHYYU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-operations-YAT6FUUB.js.map → register-operations-C6OWLDSH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-operations-L6CYTOIH.js.map → register-operations-HZ6XERQG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-N7UGXYJC.js.map → register-setup-P67EMBDJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-MPANILQF.js.map → register-setup-ZKJ53RS7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-DKMCLPI5.js.map → restore-4MHZFJ2E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-IRAKSWIW.js.map → restore-YALDGTQR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-3F4QUEDH.js.map → scheduling-shortcuts-LB6DOLRL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-BNZLQK36.js.map → scheduling-shortcuts-UTOYKLXQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-OLT6LVKH.js.map → schema-73HR2OJW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-XJXKJQF5.js.map → schema-U6LJKSIR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-CX5UMV4H.js.map → search-AXPXKZER.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-KP6H7COV.js.map → search-KILGT37L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-QZUG6MX5.js.map → stats-PSYVVTNZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-7XW4OEMK.js.map → stats-W5KNVJWQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-WTYFUPRL.js.map → telemetry-BZUF6H7G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-DIFPXCAT.js.map → telemetry-GAHHQTOS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-QNDXZQCW.js.map → test-ACD52Z3S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-HU2BS7EY.js.map → test-PWDIZ255.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-LANLLPVO.js.map → test-runs-PLRAZEFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-CA6K32RD.js.map → test-runs-UXIXPDKU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-UXDLTEOZ.js.map → update-AMRSOIWP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-DJKWLBWJ.js.map → update-KFX2SIAC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-VW5DGF3S.js.map → update-many-RNSBX2TA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-LU3SCNK5.js.map → update-many-Z5GJS5LC.js.map} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements extension package-management support for Bundled Catalog.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0baef9c6-cdf9-5aea-89f0-088600d538e6")}catch(e){}}();
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { collectPackageExtensionDirectories, PM_PACKAGE_RESOURCE_KINDS, readPmPackageManifest } from "../../../core/packages/manifest.js";
|
|
@@ -163,6 +163,61 @@ export async function resolveBundledAliasManifestName(input) {
|
|
|
163
163
|
return null;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* Resolve the catalog link block for a bundled package, preferring the explicit
|
|
168
|
+
* `catalog.links.*` manifest fields and falling back to the package's
|
|
169
|
+
* repository/bugs/homepage/npm metadata. The npm link is synthesized from the
|
|
170
|
+
* package name unless the package is private or unnamed.
|
|
171
|
+
*/
|
|
172
|
+
function buildBundledCatalogLinks(manifest) {
|
|
173
|
+
return {
|
|
174
|
+
docs: manifest.catalog?.links?.docs ?? manifest.package_homepage,
|
|
175
|
+
npm: manifest.catalog?.links?.npm ??
|
|
176
|
+
(manifest.package_name && manifest.package_private !== true
|
|
177
|
+
? `https://www.npmjs.com/package/${encodeURIComponent(manifest.package_name)}`
|
|
178
|
+
: undefined),
|
|
179
|
+
repository: manifest.catalog?.links?.repository ?? manifest.package_repository_url,
|
|
180
|
+
report: manifest.catalog?.links?.report ?? manifest.package_bugs_url,
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Build one bundled-package catalog entry from its manifest, marking it
|
|
185
|
+
* `installed` when the managed state for `scope` already records the package by
|
|
186
|
+
* built-in alias or resolved location, and projecting the metadata-only resource
|
|
187
|
+
* kinds (everything except installable `extensions`) that the package ships.
|
|
188
|
+
*/
|
|
189
|
+
function buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installedBuiltinAliases, installedLocations) {
|
|
190
|
+
const installScopeFlag = scope === "global" ? "--global" : "--project";
|
|
191
|
+
const metadataOnlyResources = Object.fromEntries(PM_PACKAGE_RESOURCE_KINDS
|
|
192
|
+
.filter((resourceKind) => resourceKind !== "extensions")
|
|
193
|
+
.map((resourceKind) => [resourceKind, manifest.resources[resourceKind] ?? []])
|
|
194
|
+
.filter(([, entries]) => Array.isArray(entries) && entries.length > 0));
|
|
195
|
+
return {
|
|
196
|
+
alias: bundledEntry.alias,
|
|
197
|
+
bundled: true,
|
|
198
|
+
available: true,
|
|
199
|
+
installed: installedBuiltinAliases.has(bundledEntry.alias) ||
|
|
200
|
+
installedLocations.has(path.resolve(bundledEntry.package_root)),
|
|
201
|
+
install_target: bundledEntry.alias,
|
|
202
|
+
install_command: `pm install ${bundledEntry.alias} ${installScopeFlag}`,
|
|
203
|
+
package_name: manifest.package_name,
|
|
204
|
+
package_version: manifest.package_version,
|
|
205
|
+
description: manifest.catalog?.summary ?? manifest.package_description,
|
|
206
|
+
keywords: manifest.package_keywords ?? [],
|
|
207
|
+
resources: manifest.resources,
|
|
208
|
+
installable_resources: {
|
|
209
|
+
extensions: manifest.resources.extensions ?? [],
|
|
210
|
+
},
|
|
211
|
+
metadata_only_resources: metadataOnlyResources,
|
|
212
|
+
catalog: {
|
|
213
|
+
display_name: manifest.catalog?.display_name,
|
|
214
|
+
category: manifest.catalog?.category,
|
|
215
|
+
tags: manifest.catalog?.tags ?? manifest.package_keywords ?? [],
|
|
216
|
+
links: buildBundledCatalogLinks(manifest),
|
|
217
|
+
media: manifest.catalog?.media,
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
}
|
|
166
221
|
/**
|
|
167
222
|
* Implements build bundled package catalog for the public runtime surface of this module.
|
|
168
223
|
*/
|
|
@@ -181,50 +236,8 @@ export async function buildBundledPackageCatalog(scope, global, options = {}) {
|
|
|
181
236
|
.map((value) => value.trim().toLowerCase()));
|
|
182
237
|
const packages = [];
|
|
183
238
|
for (const bundledEntry of await collectBundledPackageEntries()) {
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
const installScopeFlag = scope === "global" ? "--global" : "--project";
|
|
187
|
-
const manifest = await readPmPackageManifest(packageRoot);
|
|
188
|
-
const repository = manifest.catalog?.links?.repository ?? manifest.package_repository_url;
|
|
189
|
-
const report = manifest.catalog?.links?.report ?? manifest.package_bugs_url;
|
|
190
|
-
const docs = manifest.catalog?.links?.docs ?? manifest.package_homepage;
|
|
191
|
-
const npm = manifest.catalog?.links?.npm ??
|
|
192
|
-
(manifest.package_name && manifest.package_private !== true
|
|
193
|
-
? `https://www.npmjs.com/package/${encodeURIComponent(manifest.package_name)}`
|
|
194
|
-
: undefined);
|
|
195
|
-
const metadataOnlyResources = Object.fromEntries(PM_PACKAGE_RESOURCE_KINDS
|
|
196
|
-
.filter((resourceKind) => resourceKind !== "extensions")
|
|
197
|
-
.map((resourceKind) => [resourceKind, manifest.resources[resourceKind] ?? []])
|
|
198
|
-
.filter(([, entries]) => Array.isArray(entries) && entries.length > 0));
|
|
199
|
-
packages.push({
|
|
200
|
-
alias,
|
|
201
|
-
bundled: true,
|
|
202
|
-
available: true,
|
|
203
|
-
installed: installedBuiltinAliases.has(alias) || installedLocations.has(path.resolve(packageRoot)),
|
|
204
|
-
install_target: alias,
|
|
205
|
-
install_command: `pm install ${alias} ${installScopeFlag}`,
|
|
206
|
-
package_name: manifest.package_name,
|
|
207
|
-
package_version: manifest.package_version,
|
|
208
|
-
description: manifest.catalog?.summary ?? manifest.package_description,
|
|
209
|
-
keywords: manifest.package_keywords ?? [],
|
|
210
|
-
resources: manifest.resources,
|
|
211
|
-
installable_resources: {
|
|
212
|
-
extensions: manifest.resources.extensions ?? [],
|
|
213
|
-
},
|
|
214
|
-
metadata_only_resources: metadataOnlyResources,
|
|
215
|
-
catalog: {
|
|
216
|
-
display_name: manifest.catalog?.display_name,
|
|
217
|
-
category: manifest.catalog?.category,
|
|
218
|
-
tags: manifest.catalog?.tags ?? manifest.package_keywords ?? [],
|
|
219
|
-
links: {
|
|
220
|
-
docs,
|
|
221
|
-
npm,
|
|
222
|
-
repository,
|
|
223
|
-
report,
|
|
224
|
-
},
|
|
225
|
-
media: manifest.catalog?.media,
|
|
226
|
-
},
|
|
227
|
-
});
|
|
239
|
+
const manifest = await readPmPackageManifest(bundledEntry.package_root);
|
|
240
|
+
packages.push(buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installedBuiltinAliases, installedLocations));
|
|
228
241
|
}
|
|
229
242
|
const fields = parsePackageCatalogFields(options.fields);
|
|
230
243
|
const outputPackages = fields ? packages.map((entry) => projectPackageCatalogEntry(entry, fields)) : packages;
|
|
@@ -293,4 +306,4 @@ export const _testOnlyBundledCatalog = {
|
|
|
293
306
|
projectPackageCatalogEntry,
|
|
294
307
|
};
|
|
295
308
|
//# sourceMappingURL=bundled-catalog.js.map
|
|
296
|
-
//# debugId=
|
|
309
|
+
//# debugId=0baef9c6-cdf9-5aea-89f0-088600d538e6
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundled-catalog.js","sources":["cli/commands/extension/bundled-catalog.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/extension/bundled-catalog\n *\n * Implements extension package-management support for Bundled Catalog.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { collectPackageExtensionDirectories, PM_PACKAGE_RESOURCE_KINDS, readPmPackageManifest } from \"../../../core/packages/manifest.js\";\nimport { resolvePmPackageRootFromModule } from \"../../../core/packages/root.js\";\nimport { pathExists } from \"../../../core/fs/fs-utils.js\";\nimport { EXIT_CODE } from \"../../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../../core/shared/split-comma-list.js\";\nimport { resolveExtensionRoots } from \"../../../core/extensions/loader.js\";\nimport { resolvePmRoot } from \"../../../core/store/paths.js\";\nimport { validateExtensionDirectory } from \"./shared.js\";\nimport { readManagedExtensionState } from \"./managed-state.js\";\nimport type { ExtensionCommandOptions, ExtensionScope } from \"../extension.js\";\n\nconst PM_PACKAGE_ROOT_ENV = \"PM_CLI_PACKAGE_ROOT\";\nconst LEGACY_BUNDLED_PACKAGE_ALIASES: Record<string, { package_directory: string; legacy_extension_directory: string }> = {\n beads: {\n package_directory: \"pm-beads\",\n legacy_extension_directory: \"beads\",\n },\n todos: {\n package_directory: \"pm-todos\",\n legacy_extension_directory: \"todos\",\n },\n};\nconst BUNDLED_PACKAGE_INSTALL_ALL_TARGETS = new Set([\"*\", \"all\"]);\n\ninterface BundledPackageEntry {\n alias: string;\n package_directory: string;\n package_root: string;\n}\n\nfunction resolvePackageRootCandidates(): string[] {\n const candidates: string[] = [];\n const envRoot = process.env[PM_PACKAGE_ROOT_ENV];\n /* c8 ignore start -- env-root override branch is exercised by package-root integration tests */\n if (typeof envRoot === \"string\" && envRoot.trim().length > 0) {\n candidates.push(path.resolve(envRoot.trim()));\n }\n /* c8 ignore stop */\n candidates.push(resolvePmPackageRootFromModule(import.meta.url, [\"../../../..\"]));\n return [...new Set(candidates)];\n}\n\n/**\n * Implements resolve bundled extension alias source for the public runtime surface of this module.\n */\nexport async function resolveBundledExtensionAliasSource(input: string): Promise<string | null> {\n const normalized = input.trim().toLowerCase();\n const packageRoot = await resolveBundledPackageRoot(normalized);\n if (packageRoot) {\n return packageRoot;\n }\n\n const alias = LEGACY_BUNDLED_PACKAGE_ALIASES[normalized];\n /* c8 ignore start -- known aliases resolve through package manifests in normal runtime */\n if (!alias) {\n return null;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- exercised only when legacy extension paths exist without package manifests */\n for (const packageRoot of resolvePackageRootCandidates()) {\n const legacyExtensionPath = path.join(packageRoot, \".agents\", \"pm\", \"extensions\", alias.legacy_extension_directory);\n if (await pathExists(path.join(legacyExtensionPath, \"manifest.json\"))) {\n return legacyExtensionPath;\n }\n }\n return null;\n /* c8 ignore stop */\n}\n\n/**\n * Implements check whether bundled package install all target for the public runtime surface of this module.\n */\nexport function isBundledPackageInstallAllTarget(input: string): boolean {\n return BUNDLED_PACKAGE_INSTALL_ALL_TARGETS.has(input.trim().toLowerCase());\n}\n\nfunction derivePackageAlias(packageDirectory: string): string {\n return packageDirectory.replace(/^pm-/i, \"\").trim().toLowerCase();\n}\n\nasync function collectBundledPackageEntries(): Promise<BundledPackageEntry[]> {\n const entriesByAlias = new Map<string, BundledPackageEntry>();\n for (const packageRoot of resolvePackageRootCandidates()) {\n const packagesRoot = path.join(packageRoot, \"packages\");\n if (!(await pathExists(packagesRoot))) {\n continue;\n }\n const entries = await fs.readdir(packagesRoot, { withFileTypes: true });\n for (const entry of entries) {\n if (!entry.isDirectory() || !entry.name.startsWith(\"pm-\")) {\n continue;\n }\n const candidateRoot = path.join(packagesRoot, entry.name);\n if (!(await pathExists(path.join(candidateRoot, \"package.json\")))) {\n continue;\n }\n const manifest = await readPmPackageManifest(candidateRoot);\n const aliases = manifest.aliases && manifest.aliases.length > 0\n ? manifest.aliases\n : [derivePackageAlias(entry.name)];\n for (const alias of aliases) {\n const normalizedAlias = alias.trim().toLowerCase();\n if (normalizedAlias.length === 0 || entriesByAlias.has(normalizedAlias)) {\n continue;\n }\n entriesByAlias.set(normalizedAlias, {\n alias: normalizedAlias,\n package_directory: entry.name,\n package_root: candidateRoot,\n });\n }\n }\n }\n\n for (const [alias, legacy] of Object.entries(LEGACY_BUNDLED_PACKAGE_ALIASES)) {\n /* c8 ignore start -- canonical aliases are present in bundled package manifests */\n if (entriesByAlias.has(alias)) {\n continue;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- compatibility fallback when only legacy package layout exists */\n for (const packageRoot of resolvePackageRootCandidates()) {\n const packagePath = path.join(packageRoot, \"packages\", legacy.package_directory);\n if (await pathExists(path.join(packagePath, \"package.json\"))) {\n entriesByAlias.set(alias, {\n alias,\n package_directory: legacy.package_directory,\n package_root: packagePath,\n });\n break;\n }\n }\n /* c8 ignore stop */\n }\n\n return [...entriesByAlias.values()].sort((left, right) => left.alias.localeCompare(right.alias));\n}\n\n/**\n * Implements list bundled package aliases for the public runtime surface of this module.\n */\nexport async function listBundledPackageAliases(): Promise<string[]> {\n return (await collectBundledPackageEntries()).map((entry) => entry.alias);\n}\n\n/**\n * Implements resolve bundled package root for the public runtime surface of this module.\n */\nexport async function resolveBundledPackageRoot(alias: string): Promise<string | null> {\n const normalized = alias.trim().toLowerCase();\n const entry = (await collectBundledPackageEntries()).find((candidate) => candidate.alias === normalized);\n return entry?.package_root ?? null;\n}\n\n/**\n * Implements resolve bundled alias manifest name for the public runtime surface of this module.\n */\nexport async function resolveBundledAliasManifestName(input: string): Promise<string | null> {\n const bundledAliasSource = await resolveBundledExtensionAliasSource(input);\n if (!bundledAliasSource) {\n return null;\n }\n try {\n const extensionDirectories = await collectPackageExtensionDirectories(bundledAliasSource);\n if (extensionDirectories.length !== 1) {\n return null;\n }\n const validated = await validateExtensionDirectory(extensionDirectories[0]);\n return validated.manifest.name;\n } catch {\n return null;\n }\n}\n\n/**\n * Implements build bundled package catalog for the public runtime surface of this module.\n */\nexport async function buildBundledPackageCatalog(scope: ExtensionScope, global: GlobalOptions, options: ExtensionCommandOptions = {}): Promise<{\n total: number;\n scope: ExtensionScope;\n installable_resource_kinds: string[];\n metadata_only_resource_kinds: string[];\n packages: Array<Record<string, unknown>>;\n}> {\n const roots = resolveExtensionRoots(resolvePmRoot(process.cwd(), global.path), process.cwd());\n const selectedRoot = scope === \"global\" ? roots.global : roots.project;\n const managedStateRead = await readManagedExtensionState(selectedRoot);\n const installedLocations = new Set(\n managedStateRead.state.entries\n .filter((entry) => entry.scope === scope)\n .filter((entry) => entry.source.kind !== \"builtin\")\n .map((entry) => path.resolve(entry.source.location)),\n );\n const installedBuiltinAliases = new Set(\n managedStateRead.state.entries\n .filter((entry) => entry.scope === scope && entry.source.kind === \"builtin\")\n .flatMap((entry) => [entry.source.name, entry.source.input, entry.source.location])\n .filter((value): value is string => typeof value === \"string\" && value.trim().length > 0)\n .map((value) => value.trim().toLowerCase()),\n );\n const packages: Array<Record<string, unknown>> = [];\n\n for (const bundledEntry of await collectBundledPackageEntries()) {\n const alias = bundledEntry.alias;\n const packageRoot = bundledEntry.package_root;\n const installScopeFlag = scope === \"global\" ? \"--global\" : \"--project\";\n\n const manifest = await readPmPackageManifest(packageRoot);\n const repository = manifest.catalog?.links?.repository ?? manifest.package_repository_url;\n const report = manifest.catalog?.links?.report ?? manifest.package_bugs_url;\n const docs = manifest.catalog?.links?.docs ?? manifest.package_homepage;\n const npm = manifest.catalog?.links?.npm ??\n (manifest.package_name && manifest.package_private !== true\n ? `https://www.npmjs.com/package/${encodeURIComponent(manifest.package_name)}`\n : undefined);\n const metadataOnlyResources = Object.fromEntries(\n PM_PACKAGE_RESOURCE_KINDS\n .filter((resourceKind) => resourceKind !== \"extensions\")\n .map((resourceKind) => [resourceKind, manifest.resources[resourceKind] ?? []])\n .filter(([, entries]) => Array.isArray(entries) && entries.length > 0),\n );\n packages.push({\n alias,\n bundled: true,\n available: true,\n installed: installedBuiltinAliases.has(alias) || installedLocations.has(path.resolve(packageRoot)),\n install_target: alias,\n install_command: `pm install ${alias} ${installScopeFlag}`,\n package_name: manifest.package_name,\n package_version: manifest.package_version,\n description: manifest.catalog?.summary ?? manifest.package_description,\n keywords: manifest.package_keywords ?? [],\n resources: manifest.resources,\n installable_resources: {\n extensions: manifest.resources.extensions ?? [],\n },\n metadata_only_resources: metadataOnlyResources,\n catalog: {\n display_name: manifest.catalog?.display_name,\n category: manifest.catalog?.category,\n tags: manifest.catalog?.tags ?? manifest.package_keywords ?? [],\n links: {\n docs,\n npm,\n repository,\n report,\n },\n media: manifest.catalog?.media,\n },\n });\n }\n\n const fields = parsePackageCatalogFields(options.fields);\n const outputPackages = fields ? packages.map((entry) => projectPackageCatalogEntry(entry, fields)) : packages;\n return {\n total: outputPackages.length,\n scope,\n installable_resource_kinds: [\"extensions\"],\n metadata_only_resource_kinds: PM_PACKAGE_RESOURCE_KINDS.filter((resourceKind) => resourceKind !== \"extensions\"),\n packages: outputPackages,\n };\n}\n\nconst PACKAGE_CATALOG_FIELD_KEYS = new Set([\n \"alias\",\n \"bundled\",\n \"available\",\n \"installed\",\n \"install_target\",\n \"install_command\",\n \"package_name\",\n \"package_version\",\n \"description\",\n \"keywords\",\n \"resources\",\n \"installable_resources\",\n \"metadata_only_resources\",\n \"catalog\",\n \"category\",\n \"display_name\",\n]);\n\nfunction parsePackageCatalogFields(raw: string | undefined): string[] | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const fields = splitCommaList(raw);\n if (fields.length === 0) {\n throw new PmCliError(\"Package catalog --fields requires a comma-separated list of field names\", EXIT_CODE.USAGE);\n }\n const unknown = fields.filter((field) => !PACKAGE_CATALOG_FIELD_KEYS.has(field));\n if (unknown.length > 0) {\n throw new PmCliError(`Unknown package catalog --fields value(s): ${unknown.join(\", \")}`, EXIT_CODE.USAGE, {\n examples: [\n \"pm package list --project --fields alias,installed,install_command\",\n \"pm package catalog --project --fields alias,package_name,category\",\n ],\n });\n }\n return fields;\n}\n\nfunction projectPackageCatalogEntry(entry: Record<string, unknown>, fields: string[]): Record<string, unknown> {\n const projected: Record<string, unknown> = {};\n for (const field of fields) {\n if (field === \"category\") {\n projected[field] = (entry.catalog as { category?: unknown } | undefined)?.category ?? null;\n } else if (field === \"display_name\") {\n projected[field] = (entry.catalog as { display_name?: unknown } | undefined)?.display_name ?? null;\n } else {\n projected[field] = entry[field] ?? null;\n }\n }\n return projected;\n}\n\nexport const _testOnlyBundledCatalog = {\n parsePackageCatalogFields,\n projectPackageCatalogEntry,\n};\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kCAAkC,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC1I,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OA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E;gBACpE,mEAAmE;aACpE;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,0BAA0B,CAAC,KAA8B,EAAE,MAAgB;IAClF,MAAM,SAAS,GAA4B,EAAE,CAAC;IAC9C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;YACzB,SAAS,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,OAA8C,EAAE,QAAQ,IAAI,IAAI,CAAC;QAC7F,CAAC;aAAM,IAAI,KAAK,KAAK,cAAc,EAAE,CAAC;YACpC,SAAS,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,OAAkD,EAAE,YAAY,IAAI,IAAI,CAAC;QACrG,CAAC;aAAM,CAAC;YACN,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;QAC1C,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,yBAAyB;IACzB,0BAA0B;CAC3B,CAAC","debugId":"706494dc-d2f2-520c-9845-71326ee5841e"}
|
|
1
|
+
{"version":3,"file":"bundled-catalog.js","sources":["cli/commands/extension/bundled-catalog.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/extension/bundled-catalog\n *\n * Implements extension package-management support for Bundled Catalog.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { collectPackageExtensionDirectories, PM_PACKAGE_RESOURCE_KINDS, readPmPackageManifest } from \"../../../core/packages/manifest.js\";\nimport { resolvePmPackageRootFromModule } from \"../../../core/packages/root.js\";\nimport { pathExists } from \"../../../core/fs/fs-utils.js\";\nimport { EXIT_CODE } from \"../../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../../core/shared/split-comma-list.js\";\nimport { resolveExtensionRoots } from \"../../../core/extensions/loader.js\";\nimport { resolvePmRoot } from \"../../../core/store/paths.js\";\nimport { validateExtensionDirectory } from \"./shared.js\";\nimport { readManagedExtensionState } from \"./managed-state.js\";\nimport type { ExtensionCommandOptions, ExtensionScope } from \"../extension.js\";\n\nconst PM_PACKAGE_ROOT_ENV = \"PM_CLI_PACKAGE_ROOT\";\nconst LEGACY_BUNDLED_PACKAGE_ALIASES: Record<string, { package_directory: string; legacy_extension_directory: string }> = {\n beads: {\n package_directory: \"pm-beads\",\n legacy_extension_directory: \"beads\",\n },\n todos: {\n package_directory: \"pm-todos\",\n legacy_extension_directory: \"todos\",\n },\n};\nconst BUNDLED_PACKAGE_INSTALL_ALL_TARGETS = new Set([\"*\", \"all\"]);\n\ninterface BundledPackageEntry {\n alias: string;\n package_directory: string;\n package_root: string;\n}\n\nfunction resolvePackageRootCandidates(): string[] {\n const candidates: string[] = [];\n const envRoot = process.env[PM_PACKAGE_ROOT_ENV];\n /* c8 ignore start -- env-root override branch is exercised by package-root integration tests */\n if (typeof envRoot === \"string\" && envRoot.trim().length > 0) {\n candidates.push(path.resolve(envRoot.trim()));\n }\n /* c8 ignore stop */\n candidates.push(resolvePmPackageRootFromModule(import.meta.url, [\"../../../..\"]));\n return [...new Set(candidates)];\n}\n\n/**\n * Implements resolve bundled extension alias source for the public runtime surface of this module.\n */\nexport async function resolveBundledExtensionAliasSource(input: string): Promise<string | null> {\n const normalized = input.trim().toLowerCase();\n const packageRoot = await resolveBundledPackageRoot(normalized);\n if (packageRoot) {\n return packageRoot;\n }\n\n const alias = LEGACY_BUNDLED_PACKAGE_ALIASES[normalized];\n /* c8 ignore start -- known aliases resolve through package manifests in normal runtime */\n if (!alias) {\n return null;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- exercised only when legacy extension paths exist without package manifests */\n for (const packageRoot of resolvePackageRootCandidates()) {\n const legacyExtensionPath = path.join(packageRoot, \".agents\", \"pm\", \"extensions\", alias.legacy_extension_directory);\n if (await pathExists(path.join(legacyExtensionPath, \"manifest.json\"))) {\n return legacyExtensionPath;\n }\n }\n return null;\n /* c8 ignore stop */\n}\n\n/**\n * Implements check whether bundled package install all target for the public runtime surface of this module.\n */\nexport function isBundledPackageInstallAllTarget(input: string): boolean {\n return BUNDLED_PACKAGE_INSTALL_ALL_TARGETS.has(input.trim().toLowerCase());\n}\n\nfunction derivePackageAlias(packageDirectory: string): string {\n return packageDirectory.replace(/^pm-/i, \"\").trim().toLowerCase();\n}\n\nasync function collectBundledPackageEntries(): Promise<BundledPackageEntry[]> {\n const entriesByAlias = new Map<string, BundledPackageEntry>();\n for (const packageRoot of resolvePackageRootCandidates()) {\n const packagesRoot = path.join(packageRoot, \"packages\");\n if (!(await pathExists(packagesRoot))) {\n continue;\n }\n const entries = await fs.readdir(packagesRoot, { withFileTypes: true });\n for (const entry of entries) {\n if (!entry.isDirectory() || !entry.name.startsWith(\"pm-\")) {\n continue;\n }\n const candidateRoot = path.join(packagesRoot, entry.name);\n if (!(await pathExists(path.join(candidateRoot, \"package.json\")))) {\n continue;\n }\n const manifest = await readPmPackageManifest(candidateRoot);\n const aliases = manifest.aliases && manifest.aliases.length > 0\n ? manifest.aliases\n : [derivePackageAlias(entry.name)];\n for (const alias of aliases) {\n const normalizedAlias = alias.trim().toLowerCase();\n if (normalizedAlias.length === 0 || entriesByAlias.has(normalizedAlias)) {\n continue;\n }\n entriesByAlias.set(normalizedAlias, {\n alias: normalizedAlias,\n package_directory: entry.name,\n package_root: candidateRoot,\n });\n }\n }\n }\n\n for (const [alias, legacy] of Object.entries(LEGACY_BUNDLED_PACKAGE_ALIASES)) {\n /* c8 ignore start -- canonical aliases are present in bundled package manifests */\n if (entriesByAlias.has(alias)) {\n continue;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- compatibility fallback when only legacy package layout exists */\n for (const packageRoot of resolvePackageRootCandidates()) {\n const packagePath = path.join(packageRoot, \"packages\", legacy.package_directory);\n if (await pathExists(path.join(packagePath, \"package.json\"))) {\n entriesByAlias.set(alias, {\n alias,\n package_directory: legacy.package_directory,\n package_root: packagePath,\n });\n break;\n }\n }\n /* c8 ignore stop */\n }\n\n return [...entriesByAlias.values()].sort((left, right) => left.alias.localeCompare(right.alias));\n}\n\n/**\n * Implements list bundled package aliases for the public runtime surface of this module.\n */\nexport async function listBundledPackageAliases(): Promise<string[]> {\n return (await collectBundledPackageEntries()).map((entry) => entry.alias);\n}\n\n/**\n * Implements resolve bundled package root for the public runtime surface of this module.\n */\nexport async function resolveBundledPackageRoot(alias: string): Promise<string | null> {\n const normalized = alias.trim().toLowerCase();\n const entry = (await collectBundledPackageEntries()).find((candidate) => candidate.alias === normalized);\n return entry?.package_root ?? null;\n}\n\n/**\n * Implements resolve bundled alias manifest name for the public runtime surface of this module.\n */\nexport async function resolveBundledAliasManifestName(input: string): Promise<string | null> {\n const bundledAliasSource = await resolveBundledExtensionAliasSource(input);\n if (!bundledAliasSource) {\n return null;\n }\n try {\n const extensionDirectories = await collectPackageExtensionDirectories(bundledAliasSource);\n if (extensionDirectories.length !== 1) {\n return null;\n }\n const validated = await validateExtensionDirectory(extensionDirectories[0]);\n return validated.manifest.name;\n } catch {\n return null;\n }\n}\n\n/**\n * Resolve the catalog link block for a bundled package, preferring the explicit\n * `catalog.links.*` manifest fields and falling back to the package's\n * repository/bugs/homepage/npm metadata. The npm link is synthesized from the\n * package name unless the package is private or unnamed.\n */\nfunction buildBundledCatalogLinks(manifest: Awaited<ReturnType<typeof readPmPackageManifest>>): {\n docs: string | undefined;\n npm: string | undefined;\n repository: string | undefined;\n report: string | undefined;\n} {\n return {\n docs: manifest.catalog?.links?.docs ?? manifest.package_homepage,\n npm:\n manifest.catalog?.links?.npm ??\n (manifest.package_name && manifest.package_private !== true\n ? `https://www.npmjs.com/package/${encodeURIComponent(manifest.package_name)}`\n : undefined),\n repository: manifest.catalog?.links?.repository ?? manifest.package_repository_url,\n report: manifest.catalog?.links?.report ?? manifest.package_bugs_url,\n };\n}\n\n/**\n * Build one bundled-package catalog entry from its manifest, marking it\n * `installed` when the managed state for `scope` already records the package by\n * built-in alias or resolved location, and projecting the metadata-only resource\n * kinds (everything except installable `extensions`) that the package ships.\n */\nfunction buildBundledCatalogPackageEntry(\n manifest: Awaited<ReturnType<typeof readPmPackageManifest>>,\n bundledEntry: BundledPackageEntry,\n scope: ExtensionScope,\n installedBuiltinAliases: Set<string>,\n installedLocations: Set<string>,\n): Record<string, unknown> {\n const installScopeFlag = scope === \"global\" ? \"--global\" : \"--project\";\n const metadataOnlyResources = Object.fromEntries(\n PM_PACKAGE_RESOURCE_KINDS\n .filter((resourceKind) => resourceKind !== \"extensions\")\n .map((resourceKind) => [resourceKind, manifest.resources[resourceKind] ?? []])\n .filter(([, entries]) => Array.isArray(entries) && entries.length > 0),\n );\n return {\n alias: bundledEntry.alias,\n bundled: true,\n available: true,\n installed:\n installedBuiltinAliases.has(bundledEntry.alias) ||\n installedLocations.has(path.resolve(bundledEntry.package_root)),\n install_target: bundledEntry.alias,\n install_command: `pm install ${bundledEntry.alias} ${installScopeFlag}`,\n package_name: manifest.package_name,\n package_version: manifest.package_version,\n description: manifest.catalog?.summary ?? manifest.package_description,\n keywords: manifest.package_keywords ?? [],\n resources: manifest.resources,\n installable_resources: {\n extensions: manifest.resources.extensions ?? [],\n },\n metadata_only_resources: metadataOnlyResources,\n catalog: {\n display_name: manifest.catalog?.display_name,\n category: manifest.catalog?.category,\n tags: manifest.catalog?.tags ?? manifest.package_keywords ?? [],\n links: buildBundledCatalogLinks(manifest),\n media: manifest.catalog?.media,\n },\n };\n}\n\n/**\n * Implements build bundled package catalog for the public runtime surface of this module.\n */\nexport async function buildBundledPackageCatalog(scope: ExtensionScope, global: GlobalOptions, options: ExtensionCommandOptions = {}): Promise<{\n total: number;\n scope: ExtensionScope;\n installable_resource_kinds: string[];\n metadata_only_resource_kinds: string[];\n packages: Array<Record<string, unknown>>;\n}> {\n const roots = resolveExtensionRoots(resolvePmRoot(process.cwd(), global.path), process.cwd());\n const selectedRoot = scope === \"global\" ? roots.global : roots.project;\n const managedStateRead = await readManagedExtensionState(selectedRoot);\n const installedLocations = new Set(\n managedStateRead.state.entries\n .filter((entry) => entry.scope === scope)\n .filter((entry) => entry.source.kind !== \"builtin\")\n .map((entry) => path.resolve(entry.source.location)),\n );\n const installedBuiltinAliases = new Set(\n managedStateRead.state.entries\n .filter((entry) => entry.scope === scope && entry.source.kind === \"builtin\")\n .flatMap((entry) => [entry.source.name, entry.source.input, entry.source.location])\n .filter((value): value is string => typeof value === \"string\" && value.trim().length > 0)\n .map((value) => value.trim().toLowerCase()),\n );\n const packages: Array<Record<string, unknown>> = [];\n\n for (const bundledEntry of await collectBundledPackageEntries()) {\n const manifest = await readPmPackageManifest(bundledEntry.package_root);\n packages.push(\n buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installedBuiltinAliases, installedLocations),\n );\n }\n\n const fields = parsePackageCatalogFields(options.fields);\n const outputPackages = fields ? packages.map((entry) => projectPackageCatalogEntry(entry, fields)) : packages;\n return {\n total: outputPackages.length,\n scope,\n installable_resource_kinds: [\"extensions\"],\n metadata_only_resource_kinds: PM_PACKAGE_RESOURCE_KINDS.filter((resourceKind) => resourceKind !== \"extensions\"),\n packages: outputPackages,\n };\n}\n\nconst PACKAGE_CATALOG_FIELD_KEYS = new Set([\n \"alias\",\n \"bundled\",\n \"available\",\n \"installed\",\n \"install_target\",\n \"install_command\",\n \"package_name\",\n \"package_version\",\n \"description\",\n \"keywords\",\n \"resources\",\n \"installable_resources\",\n \"metadata_only_resources\",\n \"catalog\",\n \"category\",\n \"display_name\",\n]);\n\nfunction parsePackageCatalogFields(raw: string | undefined): string[] | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const fields = splitCommaList(raw);\n if (fields.length === 0) {\n throw new PmCliError(\"Package catalog --fields requires a comma-separated list of field names\", EXIT_CODE.USAGE);\n }\n const unknown = fields.filter((field) => !PACKAGE_CATALOG_FIELD_KEYS.has(field));\n if (unknown.length > 0) {\n throw new PmCliError(`Unknown package catalog --fields value(s): ${unknown.join(\", \")}`, EXIT_CODE.USAGE, {\n examples: [\n \"pm package list --project --fields alias,installed,install_command\",\n \"pm package catalog --project --fields alias,package_name,category\",\n ],\n });\n }\n return fields;\n}\n\nfunction projectPackageCatalogEntry(entry: Record<string, unknown>, fields: string[]): Record<string, unknown> {\n const projected: Record<string, unknown> = {};\n for (const field of fields) {\n if (field === \"category\") {\n projected[field] = (entry.catalog as { category?: unknown } | undefined)?.category ?? null;\n } else if (field === \"display_name\") {\n projected[field] = (entry.catalog as { display_name?: unknown } | undefined)?.display_name ?? null;\n } else {\n projected[field] = entry[field] ?? null;\n }\n }\n return projected;\n}\n\nexport const _testOnlyBundledCatalog = {\n parsePackageCatalogFields,\n projectPackageCatalogEntry,\n};\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kCAAkC,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC1I,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAG/D,MAAM,mBAAmB,GAAG,qBAAqB,CA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,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;YACzB,SAAS,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,OAA8C,EAAE,QAAQ,IAAI,IAAI,CAAC;QAC7F,CAAC;aAAM,IAAI,KAAK,KAAK,cAAc,EAAE,CAAC;YACpC,SAAS,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,OAAkD,EAAE,YAAY,IAAI,IAAI,CAAC;QACrG,CAAC;aAAM,CAAC;YACN,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;QAC1C,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,yBAAyB;IACzB,0BAA0B;CAC3B,CAAC","debugId":"0baef9c6-cdf9-5aea-89f0-088600d538e6"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements extension package-management support for Doctor.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="391a9e4b-f4b7-5176-970b-6de9523822e7")}catch(e){}}();
|
|
8
8
|
import { reconcileExtensionCapabilityUsage, } from "../../../core/extensions/index.js";
|
|
9
9
|
import { EXTENSION_CAPABILITY_CONTRACT, KNOWN_EXTENSION_CAPABILITIES, parseLegacyExtensionCapabilityAliasWarning, parseUnknownExtensionCapabilityWarning, } from "../../../core/extensions/loader.js";
|
|
10
10
|
import { EXIT_CODE } from "../../../core/shared/constants.js";
|
|
@@ -303,6 +303,121 @@ export function classifyUnusedCapabilityWarnings(loadResult, activationResult) {
|
|
|
303
303
|
}
|
|
304
304
|
return [...new Set(warnings)].sort((left, right) => left.localeCompare(right));
|
|
305
305
|
}
|
|
306
|
+
/**
|
|
307
|
+
* Ordered remediation rules evaluated while at least one warning is present. The
|
|
308
|
+
* order is load-bearing — it is the order remediation hints appear in doctor
|
|
309
|
+
* output — so new rules must be inserted at the intended position rather than
|
|
310
|
+
* appended.
|
|
311
|
+
*/
|
|
312
|
+
const TRIAGE_REMEDIATION_RULES = [
|
|
313
|
+
{
|
|
314
|
+
matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_manifest_")),
|
|
315
|
+
build: (ctx) => `Run ${lifecycleFlagCommand(ctx.options, "explore")} ${ctx.scopeFlag} to inspect discovered manifests and directories.`,
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_capability_unknown:")),
|
|
319
|
+
build: () => `Unknown extension capabilities detected. Allowed capabilities: ${KNOWN_EXTENSION_CAPABILITIES.join(", ")}. ` +
|
|
320
|
+
"Review extension_capability_unknown warning details for suggested replacements.",
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_capability_legacy_alias:")),
|
|
324
|
+
build: () => "Legacy extension capability aliases were auto-remapped to canonical capabilities. " +
|
|
325
|
+
"Update manifests to canonical names (migration/validation -> schema).",
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_capability_missing:")),
|
|
329
|
+
build: (ctx) => `Extension activation failed because code registered a surface missing from manifest capabilities. ` +
|
|
330
|
+
`Run ${lifecycleFlagCommand(ctx.options, "doctor")} ${ctx.scopeFlag} --detail deep --trace and add the reported missing_capability to manifest.json before publishing.`,
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_capability_unused:")),
|
|
334
|
+
build: (ctx) => "Extension manifests declare capabilities that are never registered against. " +
|
|
335
|
+
`Remove each reported unused capability from manifest.json to keep least privilege, or add the matching registration. Run ${lifecycleFlagCommand(ctx.options, "doctor")} ${ctx.scopeFlag} --detail deep --trace for per-extension registration counts.`,
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_command_definition_legacy_handler_alias:")),
|
|
339
|
+
build: () => "Extension command definitions using legacy handler were auto-remapped. " +
|
|
340
|
+
"Update command definitions to use run: (context) => ... for forward compatibility.",
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_output_service_override_global:") ||
|
|
344
|
+
warning.startsWith("extension_output_renderer_override_global:")),
|
|
345
|
+
build: () => "Global output service/renderer overrides are active. For output_format, return context.payload/null/undefined unless the extension owns the command. For renderers, return null for unrelated payloads so pm falls back to native rendering.",
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_schema_narrow_activation:")),
|
|
349
|
+
build: () => "A package registers custom item types/fields (a GLOBAL schema contribution) but also declares narrow activation.commands, so it never activates for built-in commands like pm create <type> and the custom type silently fails to register. Remove activation.commands from manifest.json so pm activates the package for every command, or — if the schema is intentionally command-scoped — knowingly ignore this advisory.",
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_load_failed_sdk_dependency_missing:")),
|
|
353
|
+
build: (ctx) => `Detected extension load failures caused by missing SDK dependency resolution. ` +
|
|
354
|
+
`Ensure extension package dependencies include "@unbrained/pm-cli" and reinstall dependencies before running ${lifecycleFlagCommand(ctx.options, "doctor")} ${ctx.scopeFlag}.`,
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_load_failed_module_mode_mismatch:")),
|
|
358
|
+
build: (ctx) => `Detected extension module-mode mismatches. For ESM-based extension entries/imports, set package.json "type": "module" ` +
|
|
359
|
+
`or use an explicit .mjs entry and rerun ${lifecycleFlagCommand(ctx.options, "doctor")} ${ctx.scopeFlag}.`,
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_pm_min_version_") || warning.startsWith("extension_pm_max_version_")),
|
|
363
|
+
build: (ctx) => "Extension pm version-bound warnings detected. Align each package manifest's pm_min_version/pm_max_version " +
|
|
364
|
+
`with the installed pm CLI version (see the warning's required/allowed=...:current=... details), or upgrade/downgrade the pm CLI to satisfy the declared bounds, then rerun ${lifecycleFlagCommand(ctx.options, "doctor")} ${ctx.scopeFlag}.`,
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
matches: (_warnings, ctx) => ctx.updateCheckFailedTotal > 0,
|
|
368
|
+
build: (ctx) => `Run ${lifecycleFlagCommand(ctx.options, "manage")} ${ctx.scopeFlag} after validating network and repository access.`,
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_manager_state_")),
|
|
372
|
+
build: (ctx) => `Review and repair ${ctx.scope} managed extension state file if schema/read warnings persist.`,
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
matches: (_warnings, ctx) => ctx.policyWarningCount > 0,
|
|
376
|
+
build: () => "Extension governance policy warnings detected. Review settings.extensions.policy mode and allow/block lists to confirm intended capabilities and registration surfaces.",
|
|
377
|
+
},
|
|
378
|
+
];
|
|
379
|
+
/**
|
|
380
|
+
* Build the ordered remediation hints for a triage summary. Warning-driven rules
|
|
381
|
+
* (collision remediation first, then {@link TRIAGE_REMEDIATION_RULES}) only run
|
|
382
|
+
* when at least one warning is present; the update-health coverage and
|
|
383
|
+
* availability hints always run; and a "no immediate action" fallback is
|
|
384
|
+
* appended when nothing else applied.
|
|
385
|
+
*/
|
|
386
|
+
function buildExtensionTriageRemediation(params) {
|
|
387
|
+
const { normalizedWarnings, options, scope, scopeFlag, updateCheckFailedTotal, policyWarningCount, updateHealthPartial, skippedUnmanagedTotal, skippedNonGithubTotal, updateAvailableTotal, } = params;
|
|
388
|
+
const remediation = [];
|
|
389
|
+
const ctx = { options, scope, scopeFlag, updateCheckFailedTotal, policyWarningCount };
|
|
390
|
+
if (normalizedWarnings.length > 0) {
|
|
391
|
+
const registrationCollisionRemediation = buildRegistrationCollisionRemediation(normalizedWarnings, {
|
|
392
|
+
deactivate: `${lifecycleFlagCommand(options, "deactivate")} <name> ${scopeFlag}`,
|
|
393
|
+
doctor: `${lifecycleFlagCommand(options, "doctor")} ${scopeFlag} --detail deep --trace`,
|
|
394
|
+
});
|
|
395
|
+
if (registrationCollisionRemediation) {
|
|
396
|
+
remediation.push(registrationCollisionRemediation);
|
|
397
|
+
}
|
|
398
|
+
for (const rule of TRIAGE_REMEDIATION_RULES) {
|
|
399
|
+
if (rule.matches(normalizedWarnings, ctx)) {
|
|
400
|
+
remediation.push(rule.build(ctx));
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
if (updateHealthPartial) {
|
|
405
|
+
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>).`);
|
|
406
|
+
}
|
|
407
|
+
else if (skippedUnmanagedTotal > 0) {
|
|
408
|
+
remediation.push(`Loaded unmanaged extensions are currently treated as informational. Use ${lifecycleFlagCommand(options, "manage")} ${scopeFlag} --fix-managed-state to adopt them for update checks.`);
|
|
409
|
+
}
|
|
410
|
+
if (skippedNonGithubTotal > 0) {
|
|
411
|
+
remediation.push(`Non-GitHub managed extensions are skipped by update checks. Use doctor output for non-update diagnostics.`);
|
|
412
|
+
}
|
|
413
|
+
if (updateAvailableTotal > 0) {
|
|
414
|
+
remediation.push(`Update available managed extensions via ${lifecycleFlagCommand(options, "install")} ${scopeFlag} <source>.`);
|
|
415
|
+
}
|
|
416
|
+
if (remediation.length === 0) {
|
|
417
|
+
remediation.push(`No immediate action required. Re-run ${lifecycleFlagCommand(options, "manage")} ${scopeFlag} after extension changes.`);
|
|
418
|
+
}
|
|
419
|
+
return remediation;
|
|
420
|
+
}
|
|
306
421
|
/**
|
|
307
422
|
* Implements build extension triage summary for the public runtime surface of this module.
|
|
308
423
|
*/
|
|
@@ -343,83 +458,19 @@ export function buildExtensionTriageSummary(scope, warnings, extensions, options
|
|
|
343
458
|
const warningCodes = [...new Set(effectiveWarnings.map((value) => warningCode(value)))].sort((left, right) => left.localeCompare(right));
|
|
344
459
|
const policyWarnings = summarizePolicyWarnings(effectiveWarnings);
|
|
345
460
|
const scopeFlag = scope === "global" ? "--global" : "--project";
|
|
346
|
-
const remediation = [];
|
|
347
|
-
if (normalizedWarnings.length > 0) {
|
|
348
|
-
const registrationCollisionRemediation = buildRegistrationCollisionRemediation(normalizedWarnings, {
|
|
349
|
-
deactivate: `${lifecycleFlagCommand(options, "deactivate")} <name> ${scopeFlag}`,
|
|
350
|
-
doctor: `${lifecycleFlagCommand(options, "doctor")} ${scopeFlag} --detail deep --trace`,
|
|
351
|
-
});
|
|
352
|
-
if (registrationCollisionRemediation) {
|
|
353
|
-
remediation.push(registrationCollisionRemediation);
|
|
354
|
-
}
|
|
355
|
-
if (normalizedWarnings.some((warning) => warning.startsWith("extension_manifest_"))) {
|
|
356
|
-
remediation.push(`Run ${lifecycleFlagCommand(options, "explore")} ${scopeFlag} to inspect discovered manifests and directories.`);
|
|
357
|
-
}
|
|
358
|
-
if (normalizedWarnings.some((warning) => warning.startsWith("extension_capability_unknown:"))) {
|
|
359
|
-
remediation.push(`Unknown extension capabilities detected. Allowed capabilities: ${KNOWN_EXTENSION_CAPABILITIES.join(", ")}. ` +
|
|
360
|
-
"Review extension_capability_unknown warning details for suggested replacements.");
|
|
361
|
-
}
|
|
362
|
-
if (normalizedWarnings.some((warning) => warning.startsWith("extension_capability_legacy_alias:"))) {
|
|
363
|
-
remediation.push("Legacy extension capability aliases were auto-remapped to canonical capabilities. " +
|
|
364
|
-
"Update manifests to canonical names (migration/validation -> schema).");
|
|
365
|
-
}
|
|
366
|
-
if (normalizedWarnings.some((warning) => warning.startsWith("extension_capability_missing:"))) {
|
|
367
|
-
remediation.push(`Extension activation failed because code registered a surface missing from manifest capabilities. ` +
|
|
368
|
-
`Run ${lifecycleFlagCommand(options, "doctor")} ${scopeFlag} --detail deep --trace and add the reported missing_capability to manifest.json before publishing.`);
|
|
369
|
-
}
|
|
370
|
-
if (normalizedWarnings.some((warning) => warning.startsWith("extension_capability_unused:"))) {
|
|
371
|
-
remediation.push("Extension manifests declare capabilities that are never registered against. " +
|
|
372
|
-
`Remove each reported unused capability from manifest.json to keep least privilege, or add the matching registration. Run ${lifecycleFlagCommand(options, "doctor")} ${scopeFlag} --detail deep --trace for per-extension registration counts.`);
|
|
373
|
-
}
|
|
374
|
-
if (normalizedWarnings.some((warning) => warning.startsWith("extension_command_definition_legacy_handler_alias:"))) {
|
|
375
|
-
remediation.push("Extension command definitions using legacy handler were auto-remapped. " +
|
|
376
|
-
"Update command definitions to use run: (context) => ... for forward compatibility.");
|
|
377
|
-
}
|
|
378
|
-
if (normalizedWarnings.some((warning) => warning.startsWith("extension_output_service_override_global:") ||
|
|
379
|
-
warning.startsWith("extension_output_renderer_override_global:"))) {
|
|
380
|
-
remediation.push("Global output service/renderer overrides are active. For output_format, return context.payload/null/undefined unless the extension owns the command. For renderers, return null for unrelated payloads so pm falls back to native rendering.");
|
|
381
|
-
}
|
|
382
|
-
if (normalizedWarnings.some((warning) => warning.startsWith("extension_schema_narrow_activation:"))) {
|
|
383
|
-
remediation.push("A package registers custom item types/fields (a GLOBAL schema contribution) but also declares narrow activation.commands, so it never activates for built-in commands like pm create <type> and the custom type silently fails to register. Remove activation.commands from manifest.json so pm activates the package for every command, or — if the schema is intentionally command-scoped — knowingly ignore this advisory.");
|
|
384
|
-
}
|
|
385
|
-
if (normalizedWarnings.some((warning) => warning.startsWith("extension_load_failed_sdk_dependency_missing:"))) {
|
|
386
|
-
remediation.push(`Detected extension load failures caused by missing SDK dependency resolution. ` +
|
|
387
|
-
`Ensure extension package dependencies include "@unbrained/pm-cli" and reinstall dependencies before running ${lifecycleFlagCommand(options, "doctor")} ${scopeFlag}.`);
|
|
388
|
-
}
|
|
389
|
-
if (normalizedWarnings.some((warning) => warning.startsWith("extension_load_failed_module_mode_mismatch:"))) {
|
|
390
|
-
remediation.push(`Detected extension module-mode mismatches. For ESM-based extension entries/imports, set package.json "type": "module" ` +
|
|
391
|
-
`or use an explicit .mjs entry and rerun ${lifecycleFlagCommand(options, "doctor")} ${scopeFlag}.`);
|
|
392
|
-
}
|
|
393
|
-
if (normalizedWarnings.some((warning) => warning.startsWith("extension_pm_min_version_") || warning.startsWith("extension_pm_max_version_"))) {
|
|
394
|
-
remediation.push("Extension pm version-bound warnings detected. Align each package manifest's pm_min_version/pm_max_version " +
|
|
395
|
-
`with the installed pm CLI version (see the warning's required/allowed=...:current=... details), or upgrade/downgrade the pm CLI to satisfy the declared bounds, then rerun ${lifecycleFlagCommand(options, "doctor")} ${scopeFlag}.`);
|
|
396
|
-
}
|
|
397
|
-
if (updateCheckFailedTotal > 0) {
|
|
398
|
-
remediation.push(`Run ${lifecycleFlagCommand(options, "manage")} ${scopeFlag} after validating network and repository access.`);
|
|
399
|
-
}
|
|
400
|
-
if (normalizedWarnings.some((warning) => warning.startsWith("extension_manager_state_"))) {
|
|
401
|
-
remediation.push(`Review and repair ${scope} managed extension state file if schema/read warnings persist.`);
|
|
402
|
-
}
|
|
403
|
-
if (policyWarnings.warning_count > 0) {
|
|
404
|
-
remediation.push("Extension governance policy warnings detected. Review settings.extensions.policy mode and allow/block lists to confirm intended capabilities and registration surfaces.");
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
461
|
const collisionPlan = buildRegistrationCollisionPlan(scope, normalizedWarnings, extensions, options);
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
}
|
|
420
|
-
if (remediation.length === 0) {
|
|
421
|
-
remediation.push(`No immediate action required. Re-run ${lifecycleFlagCommand(options, "manage")} ${scopeFlag} after extension changes.`);
|
|
422
|
-
}
|
|
462
|
+
const remediation = buildExtensionTriageRemediation({
|
|
463
|
+
normalizedWarnings,
|
|
464
|
+
options,
|
|
465
|
+
scope,
|
|
466
|
+
scopeFlag,
|
|
467
|
+
updateCheckFailedTotal,
|
|
468
|
+
policyWarningCount: policyWarnings.warning_count,
|
|
469
|
+
updateHealthPartial,
|
|
470
|
+
skippedUnmanagedTotal,
|
|
471
|
+
skippedNonGithubTotal,
|
|
472
|
+
updateAvailableTotal,
|
|
473
|
+
});
|
|
423
474
|
return {
|
|
424
475
|
status: effectiveWarnings.length === 0 ? "ok" : "warn",
|
|
425
476
|
warning_count: effectiveWarnings.length,
|
|
@@ -559,4 +610,4 @@ export function buildDoctorConsistencySummary(scope, installedExtensions, loaded
|
|
|
559
610
|
};
|
|
560
611
|
}
|
|
561
612
|
//# sourceMappingURL=doctor.js.map
|
|
562
|
-
//# debugId=
|
|
613
|
+
//# debugId=391a9e4b-f4b7-5176-970b-6de9523822e7
|