@unbrained/pm-cli 2026.7.14 → 2026.7.16
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/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +54 -0
- package/README.md +14 -11
- package/dist/cli/argv-utils.d.ts +1 -4
- package/dist/cli/argv-utils.js +3 -13
- package/dist/cli/argv-utils.js.map +1 -1
- package/dist/cli/bootstrap-args.d.ts +6 -4
- package/dist/cli/bootstrap-args.js +51 -16
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/bundle-integrity.d.ts +49 -0
- package/dist/cli/bundle-integrity.js +111 -0
- package/dist/cli/bundle-integrity.js.map +1 -0
- package/dist/cli/commands/completion.js +7 -2
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +6 -163
- package/dist/cli/commands/config.js +4 -1133
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.d.ts +2 -4
- package/dist/cli/commands/context.js +10 -85
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +3 -2
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +2 -91
- package/dist/cli/commands/extension/describe.js +4 -142
- package/dist/cli/commands/extension/describe.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.d.ts +2 -36
- package/dist/cli/commands/extension/scaffold.js +4 -2435
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension/shared.d.ts +2 -28
- package/dist/cli/commands/extension/shared.js +4 -130
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +3 -400
- package/dist/cli/commands/extension.js +4 -2183
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/gc.d.ts +6 -56
- package/dist/cli/commands/gc.js +4 -270
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.d.ts +18 -5
- package/dist/cli/commands/get.js +117 -58
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.d.ts +6 -184
- package/dist/cli/commands/health.js +4 -1747
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.d.ts +4 -139
- package/dist/cli/commands/history-compact.js +5 -510
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-redact.d.ts +8 -120
- package/dist/cli/commands/history-redact.js +6 -581
- package/dist/cli/commands/history-redact.js.map +1 -1
- package/dist/cli/commands/history-repair.d.ts +7 -89
- package/dist/cli/commands/history-repair.js +5 -257
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/history.d.ts +1 -2
- package/dist/cli/commands/history.js +6 -48
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +3 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.d.ts +6 -113
- package/dist/cli/commands/init-agent-guidance.js +4 -431
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.d.ts +6 -181
- package/dist/cli/commands/init.js +4 -690
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/next.js +3 -3
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/profile.d.ts +4 -174
- package/dist/cli/commands/profile.js +4 -425
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +4 -19
- package/dist/cli/commands/restore.js +9 -158
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +7 -507
- package/dist/cli/commands/schema.js +5 -1254
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/test.d.ts +2 -4
- package/dist/cli/commands/test.js +7 -97
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +9 -249
- package/dist/cli/commands/validate.js +9 -2150
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/extension-command-help.js +18 -4
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/extension-command-options.js +3 -3
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/help-content.js +7 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.js +20 -30
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +4 -2
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +11 -3
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-setup.js +4 -2
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +3 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/bundle-manifest.json +782 -0
- package/dist/cli-bundle/chunks/{append-PVZJDM6J.js → append-OJQFUQ4T.js} +5 -5
- package/dist/cli-bundle/chunks/append-UZVHUO74.js +11 -0
- package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js → chunk-2IFFUZLC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js → chunk-2JKGO6QX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js → chunk-2NCIPMQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js → chunk-2VPAVL7O.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js → chunk-2WSE6PO2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js → chunk-34L5OT3Y.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js → chunk-3AUGG2DP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js → chunk-3CLU2XZO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-N3CMP4NI.js → chunk-3S5QVM5H.js} +43 -7
- package/dist/cli-bundle/chunks/chunk-3S5QVM5H.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js +64 -0
- package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js → chunk-3WM75PWC.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-4223PVZT.js +121 -0
- package/dist/cli-bundle/chunks/chunk-4223PVZT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5URI7TPJ.js → chunk-4XQ3BDV4.js} +281 -164
- package/dist/cli-bundle/chunks/chunk-4XQ3BDV4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js → chunk-5JLUII3O.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-MKL4CP2I.js → chunk-5ZSLZLDN.js} +631 -246
- package/dist/cli-bundle/chunks/chunk-5ZSLZLDN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Q37E63AM.js → chunk-6CFNAVTF.js} +21 -141
- package/dist/cli-bundle/chunks/chunk-6CFNAVTF.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js → chunk-6N2VXVTQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js → chunk-6S3YSUYG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZUKSZVBW.js → chunk-7B67ZL4N.js} +8 -7
- package/dist/cli-bundle/chunks/chunk-7B67ZL4N.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IA3YFTXT.js → chunk-7PIWCHTW.js} +11 -13
- package/dist/cli-bundle/chunks/chunk-7PIWCHTW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BPD26E3P.js → chunk-7Z4LKRS4.js} +291 -81
- package/dist/cli-bundle/chunks/chunk-7Z4LKRS4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js → chunk-AHVTB5I5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js → chunk-APRVSW2O.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js → chunk-B7PE22W6.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js → chunk-BCOFWYW4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js → chunk-BEP7WJA2.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js +1114 -0
- package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js → chunk-BSEQUTQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js.map → chunk-BSEQUTQP.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js → chunk-CRVF2JDM.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js → chunk-DM4H7FP4.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-DUT67M43.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-44LNIULG.js → chunk-DYH63FX7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-LWTIRS3Y.js → chunk-E2OJMKML.js} +306 -82
- package/dist/cli-bundle/chunks/chunk-E2OJMKML.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js → chunk-EAB64KLB.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js → chunk-EACOH7AU.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js → chunk-EH2OPHBI.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js.map → chunk-EH2OPHBI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js → chunk-EJEXHTY5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js → chunk-EYLCSJAI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-655STMGA.js → chunk-FMBNM2EN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js → chunk-FNSPG7MU.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-5CT5BW6E.js → chunk-GM5QHQU6.js} +46 -40
- package/dist/cli-bundle/chunks/chunk-GM5QHQU6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FTQLW4JD.js → chunk-GOSLKLFE.js} +418 -24
- package/dist/cli-bundle/chunks/chunk-GOSLKLFE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KB726FMH.js → chunk-H2Z3FYXQ.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js +162 -0
- package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2QIQGYPW.js → chunk-H5APFTHZ.js} +53 -10
- package/dist/cli-bundle/chunks/chunk-H5APFTHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js +118 -0
- package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZAYYDNB3.js → chunk-HO4KXD6I.js} +22 -142
- package/dist/cli-bundle/chunks/chunk-HO4KXD6I.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js → chunk-HYB5AZ63.js} +203 -62
- package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js.map → chunk-HYB5AZ63.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js → chunk-IA5FKNII.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JL7WZ4O2.js → chunk-IG3SWA4A.js} +33 -9
- package/dist/cli-bundle/chunks/chunk-IG3SWA4A.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js → chunk-IJIICKVW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IGED7NH2.js → chunk-ILX33QXL.js} +668 -251
- package/dist/cli-bundle/chunks/chunk-ILX33QXL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UGTVWL3E.js → chunk-INU6DKT5.js} +47 -41
- package/dist/cli-bundle/chunks/chunk-INU6DKT5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UB2QYSTO.js → chunk-J5AOEGDC.js} +26 -18
- package/dist/cli-bundle/chunks/chunk-J5AOEGDC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4DY4KPQI.js → chunk-J6364LFM.js} +1330 -937
- package/dist/cli-bundle/chunks/chunk-J6364LFM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DVOLZJ3C.js → chunk-J6EY5V4N.js} +1295 -939
- package/dist/cli-bundle/chunks/chunk-J6EY5V4N.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js +1097 -0
- package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js → chunk-JOUQZENX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-J4NZOP3I.js → chunk-JXQUXVMI.js} +9 -8
- package/dist/cli-bundle/chunks/chunk-JXQUXVMI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js → chunk-JYFOV7FC.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js → chunk-K2X6U4UA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6OTZMORS.js → chunk-K3WII2ME.js} +27 -27
- package/dist/cli-bundle/chunks/chunk-K3WII2ME.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js → chunk-KG44YSKD.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js → chunk-KPMKHGEA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QASRVKUQ.js → chunk-LPYWLWDS.js} +257 -163
- package/dist/cli-bundle/chunks/chunk-LPYWLWDS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RGXD5JJR.js → chunk-LSG2U345.js} +19 -12
- package/dist/cli-bundle/chunks/chunk-LSG2U345.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-MIQDDLB5.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js → chunk-NLDFBC6J.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js → chunk-NP22ERDF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js → chunk-NU3IMIEA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js → chunk-NVPZIJVR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js → chunk-ODALILG3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CDJYP7OQ.js → chunk-ONG5V5CI.js} +190 -63
- package/dist/cli-bundle/chunks/chunk-ONG5V5CI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js → chunk-ONREO4ST.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js +61 -0
- package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js → chunk-P74IZQ7A.js} +12 -12
- package/dist/cli-bundle/chunks/chunk-PENXZX3U.js +172 -0
- package/dist/cli-bundle/chunks/chunk-PENXZX3U.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js → chunk-PGY23YTC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js → chunk-PMOSXADO.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-PNTULOGU.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js → chunk-Q7A43DS4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js → chunk-QEHQ2GVG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js → chunk-QIPLHNP7.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js → chunk-QKECXBBG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js.map → chunk-QKECXBBG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js → chunk-QKJGPFAF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-F7PSHRNO.js → chunk-QKXHFPYM.js} +27 -10
- package/dist/cli-bundle/chunks/chunk-QKXHFPYM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js → chunk-RLCHOOHC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js → chunk-RMLWNPH2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js → chunk-RRM5JYJC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js → chunk-S6MQESFR.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js → chunk-SDQLJWBO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js → chunk-SELVXEZK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DYEX6NFH.js → chunk-TD3LVC7D.js} +438 -23
- package/dist/cli-bundle/chunks/chunk-TD3LVC7D.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js → chunk-TKOVBP6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js → chunk-TQSZFPIS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js → chunk-TSMHDIW4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js → chunk-UFXU44HV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js → chunk-ULTHRDBP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js → chunk-UMOPHQSU.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js.map → chunk-UMOPHQSU.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js → chunk-UOHFKBUV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-PHKP3AGR.js → chunk-UWQHLMEB.js} +35 -18
- package/dist/cli-bundle/chunks/chunk-UWQHLMEB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6TTOHMTB.js → chunk-UXONS674.js} +45 -112
- package/dist/cli-bundle/chunks/chunk-UXONS674.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js → chunk-UY2ACEMF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-6PKA3SJQ.js → chunk-WQPUU7XD.js} +19 -28
- package/dist/cli-bundle/chunks/chunk-WQPUU7XD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7TQMR6LK.js → chunk-WT3ZEOGH.js} +70 -20
- package/dist/cli-bundle/chunks/chunk-WT3ZEOGH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js → chunk-WUJQK4YV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js → chunk-XSJUSQAE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6MHSBDGD.js → chunk-XXXF6PAQ.js} +50 -117
- package/dist/cli-bundle/chunks/chunk-XXXF6PAQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js → chunk-YAQEBNY7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7QDSYUMF.js → chunk-YAROI3PD.js} +44 -21
- package/dist/cli-bundle/chunks/chunk-YAROI3PD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js → chunk-YBLZ2VE7.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js → chunk-YCQET3OT.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-YUSOJDWM.js +9 -0
- package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js +58 -0
- package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js → chunk-ZI6VQWQ7.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-ZKRZY773.js +68 -0
- package/dist/cli-bundle/chunks/chunk-ZKRZY773.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-LZECOMHO.js → close-CWODTPKG.js} +5 -5
- package/dist/cli-bundle/chunks/close-W6LI2PKM.js +12 -0
- package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js → close-many-CQFUY7MR.js} +15 -13
- package/dist/cli-bundle/chunks/close-many-DLDDVSH5.js +23 -0
- package/dist/cli-bundle/chunks/comments-E3TNTK24.js +13 -0
- package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js → comments-WGLHR7LB.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js → copy-LXVDXH7B.js} +4 -4
- package/dist/cli-bundle/chunks/copy-Q5ZJPUKR.js +9 -0
- package/dist/cli-bundle/chunks/{create-F53OBTOU.js → create-J5U6ND4K.js} +9 -9
- package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js → create-LBVCYMEG.js} +9 -9
- package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js → delete-PMJBNY5G.js} +4 -4
- package/dist/cli-bundle/chunks/delete-WNHB3LYW.js +10 -0
- package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js → deps-JZ7TMVCB.js} +7 -4
- package/dist/cli-bundle/chunks/{deps-U57I7EAK.js → deps-OA26IS25.js} +7 -4
- package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js → docs-FEWB2DQB.js} +6 -6
- package/dist/cli-bundle/chunks/docs-HA2AIDBB.js +14 -0
- package/dist/cli-bundle/chunks/{files-TBZD7V6H.js → files-6YFBJRBG.js} +6 -6
- package/dist/cli-bundle/chunks/{files-TTY6N2AV.js → files-EFIWKFTM.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js → focus-4QJR7FOQ.js} +5 -5
- package/dist/cli-bundle/chunks/focus-POIW5LTJ.js +10 -0
- package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js → history-compact-CKRPDTJN.js} +6 -10
- package/dist/cli-bundle/chunks/history-compact-FWG2C7FZ.js +16 -0
- package/dist/cli-bundle/chunks/history-redact-BB3TGDAE.js +15 -0
- package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js → history-redact-D225BHOZ.js} +5 -6
- package/dist/cli-bundle/chunks/history-repair-6GEAM7HE.js +16 -0
- package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js → history-repair-RQXKQHL4.js} +6 -8
- package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js → learnings-JLNLCOL5.js} +7 -7
- package/dist/cli-bundle/chunks/learnings-RSNLSWDC.js +13 -0
- package/dist/cli-bundle/chunks/notes-2WDH6DXU.js +13 -0
- package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js → notes-GB47XXQQ.js} +7 -7
- package/dist/cli-bundle/chunks/plan-DOVI2VMW.js +24 -0
- package/dist/cli-bundle/chunks/{plan-2NNEO46V.js → plan-VDCJ2PCN.js} +10 -10
- package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js → profile-FAU7NZML.js} +10 -10
- package/dist/cli-bundle/chunks/{profile-U725ATWZ.js → profile-IVXQEL3D.js} +10 -10
- package/dist/cli-bundle/chunks/{register-list-query-BUWCYHBT.js → register-list-query-DKA3EH5D.js} +22 -19
- package/dist/cli-bundle/chunks/register-list-query-DKA3EH5D.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-KTZ6AGE7.js → register-list-query-UL4UKBBN.js} +23 -20
- package/dist/cli-bundle/chunks/register-list-query-UL4UKBBN.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js → register-mutation-ARFHRW55.js} +36 -32
- package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js.map → register-mutation-ARFHRW55.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-4FMGJJF7.js → register-mutation-RBBJ52DK.js} +37 -33
- package/dist/cli-bundle/chunks/register-mutation-RBBJ52DK.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js → register-operations-ZIBBRSED.js} +41 -39
- package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js.map → register-operations-ZIBBRSED.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js → register-operations-ZUJ5JWPE.js} +39 -37
- package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js.map → register-operations-ZUJ5JWPE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js → register-setup-BCVLFEYS.js} +29 -17
- package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js.map → register-setup-BCVLFEYS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js → register-setup-TDCGWIOS.js} +19 -18
- package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js.map → register-setup-TDCGWIOS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js → restore-25DLT2Q2.js} +6 -6
- package/dist/cli-bundle/chunks/restore-YPMVUUEX.js +14 -0
- package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js → schema-FNU3WE4O.js} +7 -6
- package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js → schema-NBCM3RAD.js} +7 -6
- package/dist/cli-bundle/chunks/update-WWBYOPXO.js +21 -0
- package/dist/cli-bundle/chunks/update-WWBYOPXO.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-Q3UCILNR.js → update-XHSIAIXE.js} +12 -12
- package/dist/cli-bundle/chunks/update-XHSIAIXE.js.map +1 -0
- package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js +32 -0
- package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js +36 -0
- package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js.map +1 -0
- package/dist/cli-bundle/main.js +826 -43
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/cli-bundle/sdk-runtime.js +70 -57
- package/dist/cli-bundle/sdk-testing.js +6 -6
- package/dist/cli-bundle/sdk.js +876 -74
- package/dist/cli-bundle/sdk.js.map +4 -4
- package/dist/cli.js +5 -4
- package/dist/cli.js.map +1 -1
- package/dist/core/diagnostics/remediation.js +12 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/history/projection.d.ts +39 -0
- package/dist/core/history/projection.js +164 -0
- package/dist/core/history/projection.js.map +1 -0
- package/dist/core/history/read.d.ts +3 -0
- package/dist/core/history/read.js +55 -0
- package/dist/core/history/read.js.map +1 -0
- package/dist/core/output/output-control.d.ts +18 -0
- package/dist/core/output/output-control.js +26 -0
- package/dist/core/output/output-control.js.map +1 -0
- package/dist/core/output/output.js +20 -8
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/sentry/helpers.js +10 -2
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/shared/command-types.d.ts +2 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/command-types.js.map +1 -1
- package/dist/core/shared/errors.d.ts +11 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/mcp/server.d.ts +2 -2
- package/dist/mcp/tool-definitions.js +5 -5
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/author-attribution.d.ts +35 -0
- package/dist/sdk/author-attribution.js +118 -0
- package/dist/sdk/author-attribution.js.map +1 -0
- package/dist/sdk/cli-contracts/command-aliases.d.ts +7 -0
- package/dist/sdk/cli-contracts/command-aliases.js +17 -0
- package/dist/sdk/cli-contracts/command-aliases.js.map +1 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +6 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +21 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +3 -3
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts.js +3 -2
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/cli-program.d.ts +8 -0
- package/dist/sdk/cli-program.js +39 -0
- package/dist/sdk/cli-program.js.map +1 -0
- package/dist/sdk/command-line.d.ts +11 -0
- package/dist/sdk/command-line.js +40 -0
- package/dist/sdk/command-line.js.map +1 -0
- package/dist/sdk/config.d.ts +163 -0
- package/dist/sdk/config.js +1087 -0
- package/dist/sdk/config.js.map +1 -0
- package/dist/sdk/context-relevance.d.ts +21 -0
- package/dist/sdk/context-relevance.js +70 -2
- package/dist/sdk/context-relevance.js.map +1 -1
- package/dist/sdk/dependencies.d.ts +15 -2
- package/dist/sdk/dependencies.js +97 -8
- package/dist/sdk/dependencies.js.map +1 -1
- package/dist/{cli/commands → sdk}/extension/bundled-catalog.d.ts +1 -1
- package/dist/{cli/commands → sdk}/extension/bundled-catalog.js +12 -12
- package/dist/sdk/extension/bundled-catalog.js.map +1 -0
- package/dist/sdk/extension/concurrency.d.ts +7 -0
- package/dist/sdk/extension/concurrency.js +26 -0
- package/dist/sdk/extension/concurrency.js.map +1 -0
- package/dist/sdk/extension/describe.d.ts +91 -0
- package/dist/sdk/extension/describe.js +144 -0
- package/dist/sdk/extension/describe.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/doctor.d.ts +3 -3
- package/dist/{cli/commands → sdk}/extension/doctor.js +7 -7
- package/dist/sdk/extension/doctor.js.map +1 -0
- package/dist/sdk/extension/install-runtime.d.ts +26 -0
- package/dist/sdk/extension/install-runtime.js +269 -0
- package/dist/sdk/extension/install-runtime.js.map +1 -0
- package/dist/sdk/extension/install-snapshot.d.ts +23 -0
- package/dist/sdk/extension/install-snapshot.js +66 -0
- package/dist/sdk/extension/install-snapshot.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/install-sources.d.ts +3 -3
- package/dist/{cli/commands → sdk}/extension/install-sources.js +15 -12
- package/dist/sdk/extension/install-sources.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/managed-state.js +6 -6
- package/dist/sdk/extension/managed-state.js.map +1 -0
- package/dist/sdk/extension/scaffold.d.ts +36 -0
- package/dist/sdk/extension/scaffold.js +2436 -0
- package/dist/sdk/extension/scaffold.js.map +1 -0
- package/dist/sdk/extension/shared.d.ts +28 -0
- package/dist/sdk/extension/shared.js +140 -0
- package/dist/sdk/extension/shared.js.map +1 -0
- package/dist/sdk/extension/update-check.d.ts +15 -0
- package/dist/sdk/extension/update-check.js +68 -0
- package/dist/sdk/extension/update-check.js.map +1 -0
- package/dist/sdk/extension.d.ts +367 -0
- package/dist/sdk/extension.js +2174 -0
- package/dist/sdk/extension.js.map +1 -0
- package/dist/sdk/governance/gc.d.ts +56 -0
- package/dist/sdk/governance/gc.js +276 -0
- package/dist/sdk/governance/gc.js.map +1 -0
- package/dist/sdk/governance/health.d.ts +187 -0
- package/dist/sdk/governance/health.js +1796 -0
- package/dist/sdk/governance/health.js.map +1 -0
- package/dist/sdk/governance/validate.d.ts +255 -0
- package/dist/sdk/governance/validate.js +2175 -0
- package/dist/sdk/governance/validate.js.map +1 -0
- package/dist/sdk/history-compact.d.ts +142 -0
- package/dist/sdk/history-compact.js +508 -0
- package/dist/sdk/history-compact.js.map +1 -0
- package/dist/sdk/history-mcp.d.ts +17 -0
- package/dist/sdk/history-mcp.js +68 -0
- package/dist/sdk/history-mcp.js.map +1 -0
- package/dist/sdk/history-read.d.ts +31 -0
- package/dist/sdk/history-read.js +58 -0
- package/dist/sdk/history-read.js.map +1 -0
- package/dist/sdk/history-redact.d.ts +120 -0
- package/dist/sdk/history-redact.js +577 -0
- package/dist/sdk/history-redact.js.map +1 -0
- package/dist/sdk/history-repair.d.ts +89 -0
- package/dist/sdk/history-repair.js +263 -0
- package/dist/sdk/history-repair.js.map +1 -0
- package/dist/sdk/index.d.ts +25 -1
- package/dist/sdk/index.js +27 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/init-agent-guidance.d.ts +113 -0
- package/dist/sdk/init-agent-guidance.js +437 -0
- package/dist/sdk/init-agent-guidance.js.map +1 -0
- package/dist/sdk/init.d.ts +186 -0
- package/dist/sdk/init.js +733 -0
- package/dist/sdk/init.js.map +1 -0
- package/dist/sdk/invocation-author.d.ts +2 -0
- package/dist/sdk/invocation-author.js +39 -0
- package/dist/sdk/invocation-author.js.map +1 -0
- package/dist/sdk/item-children.d.ts +45 -0
- package/dist/sdk/item-children.js +75 -0
- package/dist/sdk/item-children.js.map +1 -0
- package/dist/sdk/item-schedule.d.ts +26 -0
- package/dist/sdk/item-schedule.js +28 -0
- package/dist/sdk/item-schedule.js.map +1 -0
- package/dist/sdk/output.d.ts +7 -0
- package/dist/sdk/output.js +11 -0
- package/dist/sdk/output.js.map +1 -0
- package/dist/sdk/pagination.d.ts +4 -1
- package/dist/sdk/pagination.js +13 -5
- package/dist/sdk/pagination.js.map +1 -1
- package/dist/sdk/profile.d.ts +176 -0
- package/dist/sdk/profile.js +431 -0
- package/dist/sdk/profile.js.map +1 -0
- package/dist/sdk/relationship-analytics.d.ts +108 -0
- package/dist/sdk/relationship-analytics.js +292 -0
- package/dist/sdk/relationship-analytics.js.map +1 -0
- package/dist/sdk/relationship-context.d.ts +67 -0
- package/dist/sdk/relationship-context.js +207 -0
- package/dist/sdk/relationship-context.js.map +1 -0
- package/dist/sdk/relationship-history.d.ts +109 -0
- package/dist/sdk/relationship-history.js +401 -0
- package/dist/sdk/relationship-history.js.map +1 -0
- package/dist/sdk/relationships.d.ts +145 -0
- package/dist/sdk/relationships.js +551 -0
- package/dist/sdk/relationships.js.map +1 -0
- package/dist/sdk/runtime-input.d.ts +10 -0
- package/dist/sdk/runtime-input.js +60 -0
- package/dist/sdk/runtime-input.js.map +1 -0
- package/dist/sdk/runtime.d.ts +31 -8
- package/dist/sdk/runtime.js +61 -57
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/schema.d.ts +507 -0
- package/dist/sdk/schema.js +1269 -0
- package/dist/sdk/schema.js.map +1 -0
- package/dist/{cli/commands → sdk}/templates.d.ts +1 -1
- package/dist/{cli/commands → sdk}/templates.js +9 -9
- package/dist/sdk/templates.js.map +1 -0
- package/dist/{cli/commands → sdk}/test/linked-command-detection.d.ts +10 -2
- package/dist/sdk/test/linked-command-detection.js +525 -0
- package/dist/sdk/test/linked-command-detection.js.map +1 -0
- package/docs/COMMANDS.md +58 -40
- package/docs/EXTENSIONS.md +10 -1
- package/docs/RELATIONSHIP_GRAPH.md +113 -0
- package/docs/RELEASING.md +2 -0
- package/docs/SDK.md +156 -9
- package/docs/SDK_CUSTOMIZATION_PRIMITIVES.md +79 -0
- package/marketplace.json +2 -2
- package/package.json +3 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-governance-audit/extensions/governance-audit/runtime-utils.ts +76 -16
- package/packages/pm-governance-audit/extensions/governance-audit/sdk.ts +8 -0
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/bundle-cli.mjs +66 -23
- package/dist/cli/commands/extension/bundled-catalog.js.map +0 -1
- package/dist/cli/commands/extension/doctor.js.map +0 -1
- package/dist/cli/commands/extension/install-sources.js.map +0 -1
- package/dist/cli/commands/extension/managed-state.js.map +0 -1
- package/dist/cli/commands/templates.js.map +0 -1
- package/dist/cli/commands/test/linked-command-detection.js +0 -248
- package/dist/cli/commands/test/linked-command-detection.js.map +0 -1
- package/dist/cli-bundle/chunks/append-DYQWQK2J.js +0 -11
- package/dist/cli-bundle/chunks/chunk-2GA3NK35.js +0 -530
- package/dist/cli-bundle/chunks/chunk-2GA3NK35.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2QIQGYPW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4DY4KPQI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4WREH7RT.js +0 -554
- package/dist/cli-bundle/chunks/chunk-4WREH7RT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5CT5BW6E.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5URI7TPJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6MHSBDGD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6OTZMORS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6PKA3SJQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6TTOHMTB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7QDSYUMF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7TQMR6LK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js +0 -312
- package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BPD26E3P.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CDJYP7OQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js +0 -858
- package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DVOLZJ3C.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DYEX6NFH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-F7PSHRNO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js +0 -875
- package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FTQLW4JD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IA3YFTXT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IGED7NH2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-J4NZOP3I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JL7WZ4O2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-L24HCJFC.js +0 -309
- package/dist/cli-bundle/chunks/chunk-L24HCJFC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LWTIRS3Y.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MKL4CP2I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N3CMP4NI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PHKP3AGR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Q37E63AM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QASRVKUQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RGXD5JJR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-UB2QYSTO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UGTVWL3E.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZAYYDNB3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZUKSZVBW.js.map +0 -7
- package/dist/cli-bundle/chunks/close-RI4JQQHU.js +0 -12
- package/dist/cli-bundle/chunks/close-many-LY2XJ52M.js +0 -21
- package/dist/cli-bundle/chunks/comments-35M273DN.js +0 -13
- package/dist/cli-bundle/chunks/copy-NPYM7M7U.js +0 -9
- package/dist/cli-bundle/chunks/delete-ODRWJWAM.js +0 -10
- package/dist/cli-bundle/chunks/docs-G7N4E2JO.js +0 -14
- package/dist/cli-bundle/chunks/focus-U5TRVCRS.js +0 -10
- package/dist/cli-bundle/chunks/history-compact-M7GHYVFN.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-JIHZLHDP.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-NAFCHLH7.js +0 -18
- package/dist/cli-bundle/chunks/learnings-SONGPSHI.js +0 -13
- package/dist/cli-bundle/chunks/notes-BSD53H2W.js +0 -13
- package/dist/cli-bundle/chunks/plan-AWLYGBNV.js +0 -24
- package/dist/cli-bundle/chunks/register-list-query-BUWCYHBT.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-KTZ6AGE7.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-4FMGJJF7.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-66GLMHIX.js +0 -14
- package/dist/cli-bundle/chunks/update-2XGHIVQ2.js +0 -21
- package/dist/cli-bundle/chunks/update-many-75K57FS3.js +0 -34
- package/dist/cli-bundle/chunks/update-many-U42YA445.js +0 -30
- /package/dist/cli-bundle/chunks/{append-PVZJDM6J.js.map → append-OJQFUQ4T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-DYQWQK2J.js.map → append-UZVHUO74.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js.map → chunk-2IFFUZLC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js.map → chunk-2JKGO6QX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js.map → chunk-2NCIPMQP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js.map → chunk-2VPAVL7O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js.map → chunk-2WSE6PO2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js.map → chunk-34L5OT3Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js.map → chunk-3AUGG2DP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js.map → chunk-3CLU2XZO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js.map → chunk-3WM75PWC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js.map → chunk-5JLUII3O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js.map → chunk-6N2VXVTQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js.map → chunk-6S3YSUYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js.map → chunk-AHVTB5I5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js.map → chunk-APRVSW2O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js.map → chunk-B7PE22W6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js.map → chunk-BCOFWYW4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js.map → chunk-BEP7WJA2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js.map → chunk-CRVF2JDM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js.map → chunk-DM4H7FP4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-LZECOMHO.js.map → chunk-DUT67M43.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-44LNIULG.js.map → chunk-DYH63FX7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js.map → chunk-EAB64KLB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js.map → chunk-EACOH7AU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js.map → chunk-EJEXHTY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js.map → chunk-EYLCSJAI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-655STMGA.js.map → chunk-FMBNM2EN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js.map → chunk-FNSPG7MU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KB726FMH.js.map → chunk-H2Z3FYXQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js.map → chunk-IA5FKNII.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js.map → chunk-IJIICKVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js.map → chunk-JOUQZENX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js.map → chunk-JYFOV7FC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js.map → chunk-K2X6U4UA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js.map → chunk-KG44YSKD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js.map → chunk-KPMKHGEA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js.map → chunk-MIQDDLB5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js.map → chunk-NLDFBC6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js.map → chunk-NP22ERDF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js.map → chunk-NU3IMIEA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js.map → chunk-NVPZIJVR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js.map → chunk-ODALILG3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js.map → chunk-ONREO4ST.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js.map → chunk-P74IZQ7A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js.map → chunk-PGY23YTC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js.map → chunk-PMOSXADO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-RI4JQQHU.js.map → chunk-PNTULOGU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js.map → chunk-Q7A43DS4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js.map → chunk-QEHQ2GVG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js.map → chunk-QIPLHNP7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js.map → chunk-QKJGPFAF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js.map → chunk-RLCHOOHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js.map → chunk-RMLWNPH2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js.map → chunk-RRM5JYJC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js.map → chunk-S6MQESFR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js.map → chunk-SDQLJWBO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js.map → chunk-SELVXEZK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js.map → chunk-TKOVBP6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js.map → chunk-TQSZFPIS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js.map → chunk-TSMHDIW4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js.map → chunk-UFXU44HV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js.map → chunk-ULTHRDBP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js.map → chunk-UOHFKBUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js.map → chunk-UY2ACEMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js.map → chunk-WUJQK4YV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js.map → chunk-XSJUSQAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js.map → chunk-YAQEBNY7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js.map → chunk-YBLZ2VE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js.map → chunk-YCQET3OT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-LY2XJ52M.js.map → chunk-YUSOJDWM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js.map → chunk-ZI6VQWQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js.map → close-CWODTPKG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-35M273DN.js.map → close-W6LI2PKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js.map → close-many-CQFUY7MR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-NPYM7M7U.js.map → close-many-DLDDVSH5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-F53OBTOU.js.map → comments-E3TNTK24.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js.map → comments-WGLHR7LB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js.map → copy-LXVDXH7B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ODRWJWAM.js.map → copy-Q5ZJPUKR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-U57I7EAK.js.map → create-J5U6ND4K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js.map → create-LBVCYMEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js.map → delete-PMJBNY5G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-G7N4E2JO.js.map → delete-WNHB3LYW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-TTY6N2AV.js.map → deps-JZ7TMVCB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-TBZD7V6H.js.map → deps-OA26IS25.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js.map → docs-FEWB2DQB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-U5TRVCRS.js.map → docs-HA2AIDBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-M7GHYVFN.js.map → files-6YFBJRBG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js.map → files-EFIWKFTM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js.map → focus-4QJR7FOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-JIHZLHDP.js.map → focus-POIW5LTJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js.map → history-compact-CKRPDTJN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-NAFCHLH7.js.map → history-compact-FWG2C7FZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-SONGPSHI.js.map → history-redact-BB3TGDAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js.map → history-redact-D225BHOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-BSD53H2W.js.map → history-repair-6GEAM7HE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js.map → history-repair-RQXKQHL4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-2NNEO46V.js.map → learnings-JLNLCOL5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-AWLYGBNV.js.map → learnings-RSNLSWDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-U725ATWZ.js.map → notes-2WDH6DXU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js.map → notes-GB47XXQQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-66GLMHIX.js.map → plan-DOVI2VMW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js.map → plan-VDCJ2PCN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js.map → profile-FAU7NZML.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js.map → profile-IVXQEL3D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-Q3UCILNR.js.map → restore-25DLT2Q2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-2XGHIVQ2.js.map → restore-YPMVUUEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-75K57FS3.js.map → schema-FNU3WE4O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-U42YA445.js.map → schema-NBCM3RAD.js.map} +0 -0
- /package/dist/{cli/commands → sdk}/extension/managed-state.d.ts +0 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/extension/describe
|
|
3
|
+
*
|
|
4
|
+
* Builds the `pm extension describe` / `pm package describe` payload: a flat,
|
|
5
|
+
* by-name map of every surface each loaded extension registered.
|
|
6
|
+
*
|
|
7
|
+
* The SDK already ships {@link describeExtensionActivation} -- the `describe`
|
|
8
|
+
* (enumerate-all) verb that complements the `assert*` (verify-one) and `run*`
|
|
9
|
+
* (invoke-one) testing helpers -- but until now it was reachable only from a test
|
|
10
|
+
* that hand-built an {@link ExtensionActivationResult}. This module is the thin
|
|
11
|
+
* orchestration that lets an agent at the CLI (or over MCP) ask "what does this
|
|
12
|
+
* installed extension add to my context?" in one call, instead of stitching
|
|
13
|
+
* together `doctor` (errors), `manage` (update metadata), and a manifest read.
|
|
14
|
+
*
|
|
15
|
+
* It is intentionally pure: the caller performs the load+activate cycle (exactly
|
|
16
|
+
* as `explore`/`doctor` already do) and hands the results here, so the same
|
|
17
|
+
* builder is trivially unit-testable against synthetic activations.
|
|
18
|
+
*/
|
|
19
|
+
import { type ExtensionActivationSummary } from "../../core/extensions/activation-summary.js";
|
|
20
|
+
import type { ExtensionActivationResult, ExtensionLayer, ExtensionLoadResult } from "../../core/extensions/loader.js";
|
|
21
|
+
/** Runtime state of a described extension. `ok` loaded and activated cleanly, `failed` loaded but threw during `activate`, and `not_loaded` failed to import at all -- the latter two register nothing, so their `surfaces` are empty and the status explains why (rather than implying the extension contributes nothing). */
|
|
22
|
+
export type ExtensionDescribeActivationStatus = "ok" | "failed" | "not_loaded";
|
|
23
|
+
/**
|
|
24
|
+
* One extension's contribution to the workspace: its identity plus the
|
|
25
|
+
* {@link ExtensionActivationSummary} of every surface it registered.
|
|
26
|
+
*
|
|
27
|
+
* `surfaces` is matched by extension *name* (mirroring
|
|
28
|
+
* {@link describeExtensionActivation}'s name filter), so when the same name is
|
|
29
|
+
* loaded in both the project and global layers each entry reflects that name's
|
|
30
|
+
* combined surfaces -- the `layer`/`version` fields still distinguish the
|
|
31
|
+
* physical entries.
|
|
32
|
+
*/
|
|
33
|
+
export interface ExtensionSurfaceDescription {
|
|
34
|
+
/** Value that configures or reports name for this contract. */
|
|
35
|
+
name: string;
|
|
36
|
+
/** Value that configures or reports layer for this contract. */
|
|
37
|
+
layer: ExtensionLayer;
|
|
38
|
+
/** Value that configures or reports version for this contract. */
|
|
39
|
+
version: string;
|
|
40
|
+
/** Lifecycle state reported for activationthe record. */
|
|
41
|
+
activation_status: ExtensionDescribeActivationStatus;
|
|
42
|
+
/** Value that configures or reports surfaces for this contract. */
|
|
43
|
+
surfaces: ExtensionActivationSummary;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Result of {@link buildExtensionDescribeResult}: the per-extension surface maps
|
|
47
|
+
* plus a deduplicated `union` across the described set. `target` echoes the
|
|
48
|
+
* requested name filter (or `null` for the whole workspace) and `total` counts
|
|
49
|
+
* the described entries so callers need not re-measure `extensions`.
|
|
50
|
+
*/
|
|
51
|
+
export interface ExtensionDescribeResult {
|
|
52
|
+
/** Value that configures or reports target for this contract. */
|
|
53
|
+
target: string | null;
|
|
54
|
+
/** Value that configures or reports total for this contract. */
|
|
55
|
+
total: number;
|
|
56
|
+
/** Value that configures or reports extensions for this contract. */
|
|
57
|
+
extensions: ExtensionSurfaceDescription[];
|
|
58
|
+
/** Value that configures or reports union for this contract. */
|
|
59
|
+
union: ExtensionActivationSummary;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Summarize, by name, every registration surface the loaded extensions exercised.
|
|
63
|
+
*
|
|
64
|
+
* Walks `loadResult.loaded` (annotating each with `failed` when its layer+name is
|
|
65
|
+
* in `activationResult.failed`) and `loadResult.failed` (as `not_loaded`), sorts
|
|
66
|
+
* the entries by name then layer for deterministic output, and attaches each
|
|
67
|
+
* extension's {@link describeExtensionActivation} summary. When `target` is
|
|
68
|
+
* provided only the case-insensitively matching extensions are described and the
|
|
69
|
+
* `union` is scoped to that resolved name set; otherwise every loaded extension contributes.
|
|
70
|
+
* A target may name either the extension itself or its source npm package
|
|
71
|
+
* (`source_package`), so agents can reuse the `package_name` values surfaced by
|
|
72
|
+
* `pm extension list` / install discovery without a second lookup. An unmatched
|
|
73
|
+
* `target` yields an empty `extensions` array -- the caller decides whether that
|
|
74
|
+
* is a not-found error.
|
|
75
|
+
*/
|
|
76
|
+
export declare function buildExtensionDescribeResult(target: string | undefined, loadResult: ExtensionLoadResult, activationResult: ExtensionActivationResult): ExtensionDescribeResult;
|
|
77
|
+
/**
|
|
78
|
+
* Render an {@link ExtensionDescribeResult} as a Markdown reference document: a
|
|
79
|
+
* top-level title and scope line, one section per described extension (titled
|
|
80
|
+
* with its identity and activation status), and — only when more than one
|
|
81
|
+
* extension was described — a final union section spanning them all. Each
|
|
82
|
+
* extension and the union are rendered with the shared
|
|
83
|
+
* {@link renderExtensionSurfaceMarkdown} primitive at heading level 2, so the
|
|
84
|
+
* document nests cleanly under the level-1 title.
|
|
85
|
+
*
|
|
86
|
+
* `noun` is the lifecycle vocabulary (`"extension"` or `"package"`) so the prose
|
|
87
|
+
* matches the command the agent invoked. When no extensions match (an unmatched
|
|
88
|
+
* target is already a not-found error upstream, so this is the "nothing loaded"
|
|
89
|
+
* case) the document is the title plus a single explanatory note.
|
|
90
|
+
*/
|
|
91
|
+
export declare function renderExtensionDescribeMarkdown(result: ExtensionDescribeResult, noun: string): string;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/extension/describe
|
|
3
|
+
*
|
|
4
|
+
* Builds the `pm extension describe` / `pm package describe` payload: a flat,
|
|
5
|
+
* by-name map of every surface each loaded extension registered.
|
|
6
|
+
*
|
|
7
|
+
* The SDK already ships {@link describeExtensionActivation} -- the `describe`
|
|
8
|
+
* (enumerate-all) verb that complements the `assert*` (verify-one) and `run*`
|
|
9
|
+
* (invoke-one) testing helpers -- but until now it was reachable only from a test
|
|
10
|
+
* that hand-built an {@link ExtensionActivationResult}. This module is the thin
|
|
11
|
+
* orchestration that lets an agent at the CLI (or over MCP) ask "what does this
|
|
12
|
+
* installed extension add to my context?" in one call, instead of stitching
|
|
13
|
+
* together `doctor` (errors), `manage` (update metadata), and a manifest read.
|
|
14
|
+
*
|
|
15
|
+
* It is intentionally pure: the caller performs the load+activate cycle (exactly
|
|
16
|
+
* as `explore`/`doctor` already do) and hands the results here, so the same
|
|
17
|
+
* builder is trivially unit-testable against synthetic activations.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
!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]="fecfae4c-ebb9-5dad-abf6-4c4b147da177")}catch(e){}}();
|
|
21
|
+
import { describeExtensionActivation, } from "../../core/extensions/activation-summary.js";
|
|
22
|
+
import { renderExtensionSurfaceMarkdown } from "../../core/extensions/activation-summary-markdown.js";
|
|
23
|
+
import { normalizeExtensionNameForMatch } from "./shared.js";
|
|
24
|
+
/** Compose a collision-free identity key for an extension from its layer and normalized name. The two parts are joined with a colon; the layer prefix is always a colon-free enum value, so distinct (layer, name) pairs never collide even when a name itself contains a colon. */
|
|
25
|
+
function layerNameKey(layer, name) {
|
|
26
|
+
return `${layer}:${normalizeExtensionNameForMatch(name)}`;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Summarize, by name, every registration surface the loaded extensions exercised.
|
|
30
|
+
*
|
|
31
|
+
* Walks `loadResult.loaded` (annotating each with `failed` when its layer+name is
|
|
32
|
+
* in `activationResult.failed`) and `loadResult.failed` (as `not_loaded`), sorts
|
|
33
|
+
* the entries by name then layer for deterministic output, and attaches each
|
|
34
|
+
* extension's {@link describeExtensionActivation} summary. When `target` is
|
|
35
|
+
* provided only the case-insensitively matching extensions are described and the
|
|
36
|
+
* `union` is scoped to that resolved name set; otherwise every loaded extension contributes.
|
|
37
|
+
* A target may name either the extension itself or its source npm package
|
|
38
|
+
* (`source_package`), so agents can reuse the `package_name` values surfaced by
|
|
39
|
+
* `pm extension list` / install discovery without a second lookup. An unmatched
|
|
40
|
+
* `target` yields an empty `extensions` array -- the caller decides whether that
|
|
41
|
+
* is a not-found error.
|
|
42
|
+
*/
|
|
43
|
+
export function buildExtensionDescribeResult(target, loadResult, activationResult) {
|
|
44
|
+
const activationFailedKeys = new Set(activationResult.failed.map((entry) => layerNameKey(entry.layer, entry.name)));
|
|
45
|
+
const candidates = [
|
|
46
|
+
...loadResult.loaded.map((entry) => ({
|
|
47
|
+
name: entry.name,
|
|
48
|
+
layer: entry.layer,
|
|
49
|
+
version: entry.version,
|
|
50
|
+
activation_status: activationFailedKeys.has(layerNameKey(entry.layer, entry.name))
|
|
51
|
+
? "failed"
|
|
52
|
+
: "ok",
|
|
53
|
+
surfaces: describeExtensionActivation(activationResult, {
|
|
54
|
+
extensionName: entry.name,
|
|
55
|
+
}),
|
|
56
|
+
})),
|
|
57
|
+
...loadResult.failed.map((entry) => ({
|
|
58
|
+
name: entry.name,
|
|
59
|
+
layer: entry.layer,
|
|
60
|
+
version: "unknown",
|
|
61
|
+
activation_status: "not_loaded",
|
|
62
|
+
surfaces: describeExtensionActivation(activationResult, {
|
|
63
|
+
extensionName: entry.name,
|
|
64
|
+
}),
|
|
65
|
+
})),
|
|
66
|
+
].sort((left, right) => left.name.localeCompare(right.name) ||
|
|
67
|
+
left.layer.localeCompare(right.layer));
|
|
68
|
+
const normalizedTarget = typeof target === "string" ? normalizeExtensionNameForMatch(target) : null;
|
|
69
|
+
const matchedNames = normalizedTarget === null
|
|
70
|
+
? null
|
|
71
|
+
: new Set(loadResult.loaded
|
|
72
|
+
.filter((entry) => normalizeExtensionNameForMatch(entry.name) ===
|
|
73
|
+
normalizedTarget ||
|
|
74
|
+
(typeof entry.source_package === "string" &&
|
|
75
|
+
normalizeExtensionNameForMatch(entry.source_package) ===
|
|
76
|
+
normalizedTarget))
|
|
77
|
+
.map((entry) => normalizeExtensionNameForMatch(entry.name))
|
|
78
|
+
.concat(normalizedTarget));
|
|
79
|
+
const extensions = matchedNames === null
|
|
80
|
+
? candidates
|
|
81
|
+
: candidates.filter((entry) => matchedNames.has(normalizeExtensionNameForMatch(entry.name)));
|
|
82
|
+
const unionOptions = matchedNames === null ? {} : { extensionNames: [...matchedNames] };
|
|
83
|
+
return {
|
|
84
|
+
target: typeof target === "string" ? target.trim() : null,
|
|
85
|
+
total: extensions.length,
|
|
86
|
+
extensions,
|
|
87
|
+
union: describeExtensionActivation(activationResult, unionOptions),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Human-readable label for each {@link ExtensionDescribeActivationStatus}, used
|
|
92
|
+
* in the Markdown per-extension heading so a reader sees *why* an entry has no
|
|
93
|
+
* surfaces (activation failed / never loaded) rather than assuming it
|
|
94
|
+
* contributes nothing.
|
|
95
|
+
*/
|
|
96
|
+
const ACTIVATION_STATUS_LABELS = {
|
|
97
|
+
ok: "loaded",
|
|
98
|
+
failed: "activation failed",
|
|
99
|
+
not_loaded: "not loaded",
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Render an {@link ExtensionDescribeResult} as a Markdown reference document: a
|
|
103
|
+
* top-level title and scope line, one section per described extension (titled
|
|
104
|
+
* with its identity and activation status), and — only when more than one
|
|
105
|
+
* extension was described — a final union section spanning them all. Each
|
|
106
|
+
* extension and the union are rendered with the shared
|
|
107
|
+
* {@link renderExtensionSurfaceMarkdown} primitive at heading level 2, so the
|
|
108
|
+
* document nests cleanly under the level-1 title.
|
|
109
|
+
*
|
|
110
|
+
* `noun` is the lifecycle vocabulary (`"extension"` or `"package"`) so the prose
|
|
111
|
+
* matches the command the agent invoked. When no extensions match (an unmatched
|
|
112
|
+
* target is already a not-found error upstream, so this is the "nothing loaded"
|
|
113
|
+
* case) the document is the title plus a single explanatory note.
|
|
114
|
+
*/
|
|
115
|
+
export function renderExtensionDescribeMarkdown(result, noun) {
|
|
116
|
+
const titleNoun = `${noun[0].toUpperCase()}${noun.slice(1)}`;
|
|
117
|
+
const lines = [`# ${titleNoun} surface reference`, ""];
|
|
118
|
+
lines.push(result.target === null
|
|
119
|
+
? `Scope: all loaded ${noun}s`
|
|
120
|
+
: `Scope: \`${result.target}\``);
|
|
121
|
+
lines.push(`Described: ${result.total} ${noun}${result.total === 1 ? "" : "s"}`, "");
|
|
122
|
+
if (result.extensions.length === 0) {
|
|
123
|
+
lines.push(`_No ${noun}s are loaded._`, "");
|
|
124
|
+
return `${lines.join("\n").trimEnd()}\n`;
|
|
125
|
+
}
|
|
126
|
+
for (const entry of result.extensions) {
|
|
127
|
+
const title = `${entry.name} (${entry.layer} v${entry.version}, ${ACTIVATION_STATUS_LABELS[entry.activation_status]})`;
|
|
128
|
+
// renderExtensionSurfaceMarkdown already ends with a newline; the join adds a
|
|
129
|
+
// single blank line between sections, so no extra "" separator is pushed.
|
|
130
|
+
lines.push(renderExtensionSurfaceMarkdown(entry.surfaces, {
|
|
131
|
+
title,
|
|
132
|
+
headingLevel: 2,
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
if (result.extensions.length > 1) {
|
|
136
|
+
lines.push(renderExtensionSurfaceMarkdown(result.union, {
|
|
137
|
+
title: `Union across all described ${noun}s`,
|
|
138
|
+
headingLevel: 2,
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
return `${lines.join("\n").trimEnd()}\n`;
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=describe.js.map
|
|
144
|
+
//# debugId=fecfae4c-ebb9-5dad-abf6-4c4b147da177
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe.js","sources":["sdk/extension/describe.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/extension/describe\n *\n * Builds the `pm extension describe` / `pm package describe` payload: a flat,\n * by-name map of every surface each loaded extension registered.\n *\n * The SDK already ships {@link describeExtensionActivation} -- the `describe`\n * (enumerate-all) verb that complements the `assert*` (verify-one) and `run*`\n * (invoke-one) testing helpers -- but until now it was reachable only from a test\n * that hand-built an {@link ExtensionActivationResult}. This module is the thin\n * orchestration that lets an agent at the CLI (or over MCP) ask \"what does this\n * installed extension add to my context?\" in one call, instead of stitching\n * together `doctor` (errors), `manage` (update metadata), and a manifest read.\n *\n * It is intentionally pure: the caller performs the load+activate cycle (exactly\n * as `explore`/`doctor` already do) and hands the results here, so the same\n * builder is trivially unit-testable against synthetic activations.\n */\nimport {\n describeExtensionActivation,\n type ExtensionActivationSummary,\n} from \"../../core/extensions/activation-summary.js\";\nimport { renderExtensionSurfaceMarkdown } from \"../../core/extensions/activation-summary-markdown.js\";\nimport type {\n ExtensionActivationResult,\n ExtensionLayer,\n ExtensionLoadResult,\n} from \"../../core/extensions/loader.js\";\nimport { normalizeExtensionNameForMatch } from \"./shared.js\";\n\n/** Runtime state of a described extension. `ok` loaded and activated cleanly, `failed` loaded but threw during `activate`, and `not_loaded` failed to import at all -- the latter two register nothing, so their `surfaces` are empty and the status explains why (rather than implying the extension contributes nothing). */\nexport type ExtensionDescribeActivationStatus = \"ok\" | \"failed\" | \"not_loaded\";\n\n/**\n * One extension's contribution to the workspace: its identity plus the\n * {@link ExtensionActivationSummary} of every surface it registered.\n *\n * `surfaces` is matched by extension *name* (mirroring\n * {@link describeExtensionActivation}'s name filter), so when the same name is\n * loaded in both the project and global layers each entry reflects that name's\n * combined surfaces -- the `layer`/`version` fields still distinguish the\n * physical entries.\n */\nexport interface ExtensionSurfaceDescription {\n /** Value that configures or reports name for this contract. */\n name: string;\n /** Value that configures or reports layer for this contract. */\n layer: ExtensionLayer;\n /** Value that configures or reports version for this contract. */\n version: string;\n /** Lifecycle state reported for activationthe record. */\n activation_status: ExtensionDescribeActivationStatus;\n /** Value that configures or reports surfaces for this contract. */\n surfaces: ExtensionActivationSummary;\n}\n\n/**\n * Result of {@link buildExtensionDescribeResult}: the per-extension surface maps\n * plus a deduplicated `union` across the described set. `target` echoes the\n * requested name filter (or `null` for the whole workspace) and `total` counts\n * the described entries so callers need not re-measure `extensions`.\n */\nexport interface ExtensionDescribeResult {\n /** Value that configures or reports target for this contract. */\n target: string | null;\n /** Value that configures or reports total for this contract. */\n total: number;\n /** Value that configures or reports extensions for this contract. */\n extensions: ExtensionSurfaceDescription[];\n /** Value that configures or reports union for this contract. */\n union: ExtensionActivationSummary;\n}\n\n/** Compose a collision-free identity key for an extension from its layer and normalized name. The two parts are joined with a colon; the layer prefix is always a colon-free enum value, so distinct (layer, name) pairs never collide even when a name itself contains a colon. */\nfunction layerNameKey(layer: ExtensionLayer, name: string): string {\n return `${layer}:${normalizeExtensionNameForMatch(name)}`;\n}\n\n/**\n * Summarize, by name, every registration surface the loaded extensions exercised.\n *\n * Walks `loadResult.loaded` (annotating each with `failed` when its layer+name is\n * in `activationResult.failed`) and `loadResult.failed` (as `not_loaded`), sorts\n * the entries by name then layer for deterministic output, and attaches each\n * extension's {@link describeExtensionActivation} summary. When `target` is\n * provided only the case-insensitively matching extensions are described and the\n * `union` is scoped to that resolved name set; otherwise every loaded extension contributes.\n * A target may name either the extension itself or its source npm package\n * (`source_package`), so agents can reuse the `package_name` values surfaced by\n * `pm extension list` / install discovery without a second lookup. An unmatched\n * `target` yields an empty `extensions` array -- the caller decides whether that\n * is a not-found error.\n */\nexport function buildExtensionDescribeResult(\n target: string | undefined,\n loadResult: ExtensionLoadResult,\n activationResult: ExtensionActivationResult,\n): ExtensionDescribeResult {\n const activationFailedKeys = new Set(\n activationResult.failed.map((entry) =>\n layerNameKey(entry.layer, entry.name),\n ),\n );\n const candidates: ExtensionSurfaceDescription[] = [\n ...loadResult.loaded.map((entry) => ({\n name: entry.name,\n layer: entry.layer,\n version: entry.version,\n activation_status: activationFailedKeys.has(\n layerNameKey(entry.layer, entry.name),\n )\n ? (\"failed\" as const)\n : (\"ok\" as const),\n surfaces: describeExtensionActivation(activationResult, {\n extensionName: entry.name,\n }),\n })),\n ...loadResult.failed.map((entry) => ({\n name: entry.name,\n layer: entry.layer,\n version: \"unknown\",\n activation_status: \"not_loaded\" as const,\n surfaces: describeExtensionActivation(activationResult, {\n extensionName: entry.name,\n }),\n })),\n ].sort(\n (left, right) =>\n left.name.localeCompare(right.name) ||\n left.layer.localeCompare(right.layer),\n );\n\n const normalizedTarget =\n typeof target === \"string\" ? normalizeExtensionNameForMatch(target) : null;\n const matchedNames =\n normalizedTarget === null\n ? null\n : new Set(\n loadResult.loaded\n .filter(\n (entry) =>\n normalizeExtensionNameForMatch(entry.name) ===\n normalizedTarget ||\n (typeof entry.source_package === \"string\" &&\n normalizeExtensionNameForMatch(entry.source_package) ===\n normalizedTarget),\n )\n .map((entry) => normalizeExtensionNameForMatch(entry.name))\n .concat(normalizedTarget),\n );\n const extensions =\n matchedNames === null\n ? candidates\n : candidates.filter((entry) =>\n matchedNames.has(normalizeExtensionNameForMatch(entry.name)),\n );\n const unionOptions =\n matchedNames === null ? {} : { extensionNames: [...matchedNames] };\n\n return {\n target: typeof target === \"string\" ? target.trim() : null,\n total: extensions.length,\n extensions,\n union: describeExtensionActivation(activationResult, unionOptions),\n };\n}\n\n/**\n * Human-readable label for each {@link ExtensionDescribeActivationStatus}, used\n * in the Markdown per-extension heading so a reader sees *why* an entry has no\n * surfaces (activation failed / never loaded) rather than assuming it\n * contributes nothing.\n */\nconst ACTIVATION_STATUS_LABELS: Record<\n ExtensionDescribeActivationStatus,\n string\n> = {\n ok: \"loaded\",\n failed: \"activation failed\",\n not_loaded: \"not loaded\",\n};\n\n/**\n * Render an {@link ExtensionDescribeResult} as a Markdown reference document: a\n * top-level title and scope line, one section per described extension (titled\n * with its identity and activation status), and — only when more than one\n * extension was described — a final union section spanning them all. Each\n * extension and the union are rendered with the shared\n * {@link renderExtensionSurfaceMarkdown} primitive at heading level 2, so the\n * document nests cleanly under the level-1 title.\n *\n * `noun` is the lifecycle vocabulary (`\"extension\"` or `\"package\"`) so the prose\n * matches the command the agent invoked. When no extensions match (an unmatched\n * target is already a not-found error upstream, so this is the \"nothing loaded\"\n * case) the document is the title plus a single explanatory note.\n */\nexport function renderExtensionDescribeMarkdown(\n result: ExtensionDescribeResult,\n noun: string,\n): string {\n const titleNoun = `${noun[0]!.toUpperCase()}${noun.slice(1)}`;\n const lines = [`# ${titleNoun} surface reference`, \"\"];\n lines.push(\n result.target === null\n ? `Scope: all loaded ${noun}s`\n : `Scope: \\`${result.target}\\``,\n );\n lines.push(\n `Described: ${result.total} ${noun}${result.total === 1 ? \"\" : \"s\"}`,\n \"\",\n );\n\n if (result.extensions.length === 0) {\n lines.push(`_No ${noun}s are loaded._`, \"\");\n return `${lines.join(\"\\n\").trimEnd()}\\n`;\n }\n\n for (const entry of result.extensions) {\n const title = `${entry.name} (${entry.layer} v${entry.version}, ${ACTIVATION_STATUS_LABELS[entry.activation_status]})`;\n // renderExtensionSurfaceMarkdown already ends with a newline; the join adds a\n // single blank line between sections, so no extra \"\" separator is pushed.\n lines.push(\n renderExtensionSurfaceMarkdown(entry.surfaces, {\n title,\n headingLevel: 2,\n }),\n );\n }\n\n if (result.extensions.length > 1) {\n lines.push(\n renderExtensionSurfaceMarkdown(result.union, {\n title: `Union across all described ${noun}s`,\n headingLevel: 2,\n }),\n );\n }\n\n return `${lines.join(\"\\n\").trimEnd()}\\n`;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AACH,OAAO,EACL,2BAA2B,GAE5B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,8BAA8B,EAAE,MAAM,sDAAsD,CAAC;AAMtG,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AA6C7D,oRAAoR;AACpR,SAAS,YAAY,CAAC,KAAqB,EAAE,IAAY;IACvD,OAAO,GAAG,KAAK,IAAI,8BAA8B,CAAC,IAAI,CAAC,EAAE,CAAC;AAC5D,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,4BAA4B,CAC1C,MAA0B,EAC1B,UAA+B,EAC/B,gBAA2C;IAE3C,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAClC,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACpC,YAAY,CAAC,KAAK,CAAC,KAAK,EAAE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CAAC,EAAE,CAAC;QACjC,KAAK,CAAC,IAAI,CACR,8BAA8B,CAAC,MAAM,CAAC,KAAK,EAAE;YAC3C,KAAK,EAAE,8BAA8B,IAAI,GAAG;YAC5C,YAAY,EAAE,CAAC;SAChB,CAAC,CACH,CAAC;IACJ,CAAC;IAED,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC;AAC3C,CAAC","debugId":"fecfae4c-ebb9-5dad-abf6-4c4b147da177"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @module
|
|
2
|
+
* @module sdk/extension/doctor
|
|
3
3
|
*
|
|
4
4
|
* Implements extension package-management support for Doctor.
|
|
5
5
|
*/
|
|
6
|
-
import { activateExtensions, loadExtensions } from "
|
|
7
|
-
import { type UnknownExtensionCapabilityWarningDetails } from "
|
|
6
|
+
import { activateExtensions, loadExtensions } from "../../core/extensions/index.js";
|
|
7
|
+
import { type UnknownExtensionCapabilityWarningDetails } from "../../core/extensions/loader.js";
|
|
8
8
|
import type { ExtensionCommandOptions, ExtensionDoctorDetailMode, ExtensionScope, ExtensionTriageSummary, ManagedExtensionSummary } from "../extension.js";
|
|
9
9
|
/** Implements apply doctor runtime activation state for the public runtime surface of this module. */
|
|
10
10
|
export declare function applyDoctorRuntimeActivationState(extensions: ManagedExtensionSummary[], loadResult: Awaited<ReturnType<typeof loadExtensions>>, activationResult: Awaited<ReturnType<typeof activateExtensions>>): ManagedExtensionSummary[];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @module
|
|
2
|
+
* @module sdk/extension/doctor
|
|
3
3
|
*
|
|
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]="
|
|
8
|
-
import { reconcileExtensionCapabilityUsage, } from "
|
|
9
|
-
import { EXTENSION_CAPABILITY_CONTRACT, KNOWN_EXTENSION_CAPABILITIES, parseLegacyExtensionCapabilityAliasWarning, parseUnknownExtensionCapabilityWarning, } from "
|
|
10
|
-
import { EXIT_CODE } from "
|
|
11
|
-
import { PmCliError } from "
|
|
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]="cce22256-4d00-5abd-8fb8-c2a1a34ab128")}catch(e){}}();
|
|
8
|
+
import { reconcileExtensionCapabilityUsage, } from "../../core/extensions/index.js";
|
|
9
|
+
import { EXTENSION_CAPABILITY_CONTRACT, KNOWN_EXTENSION_CAPABILITIES, parseLegacyExtensionCapabilityAliasWarning, parseUnknownExtensionCapabilityWarning, } from "../../core/extensions/loader.js";
|
|
10
|
+
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
11
|
+
import { PmCliError } from "../../core/shared/errors.js";
|
|
12
12
|
import { normalizeExtensionNameForMatch } from "./shared.js";
|
|
13
13
|
function addRuntimePath(pathsByExtension, extensionName, pathValue) {
|
|
14
14
|
const normalizedName = normalizeExtensionNameForMatch(extensionName);
|
|
@@ -600,4 +600,4 @@ export function buildDoctorConsistencySummary(scope, installedExtensions, loaded
|
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
602
|
//# sourceMappingURL=doctor.js.map
|
|
603
|
-
//# debugId=
|
|
603
|
+
//# debugId=cce22256-4d00-5abd-8fb8-c2a1a34ab128
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sources":["sdk/extension/doctor.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/extension/doctor\n *\n * Implements extension package-management support for Doctor.\n */\nimport {\n activateExtensions,\n loadExtensions,\n reconcileExtensionCapabilityUsage,\n} from \"../../core/extensions/index.js\";\nimport {\n EXTENSION_CAPABILITY_CONTRACT,\n KNOWN_EXTENSION_CAPABILITIES,\n parseLegacyExtensionCapabilityAliasWarning,\n parseUnknownExtensionCapabilityWarning,\n type UnknownExtensionCapabilityWarningDetails,\n} from \"../../core/extensions/loader.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { normalizeExtensionNameForMatch } from \"./shared.js\";\nimport type {\n ExtensionCollisionPlan,\n ExtensionCommandOptions,\n ExtensionDoctorDetailMode,\n ExtensionScope,\n ExtensionTriageSummary,\n ExtensionUpdateCheckStatus,\n ManagedExtensionSummary,\n} from \"../extension.js\";\n\ninterface RuntimeActivationPaths {\n commandPathsByExtension: Map<string, Set<string>>;\n actionPathsByExtension: Map<string, Set<string>>;\n}\n\nfunction addRuntimePath(\n pathsByExtension: Map<string, Set<string>>,\n extensionName: string,\n pathValue: string,\n): void {\n const normalizedName = normalizeExtensionNameForMatch(extensionName);\n const normalizedPath = pathValue.trim();\n if (normalizedName.length === 0 || normalizedPath.length === 0) {\n return;\n }\n const existing = pathsByExtension.get(normalizedName) ?? new Set<string>();\n existing.add(normalizedPath);\n pathsByExtension.set(normalizedName, existing);\n}\n\nfunction collectRuntimeActivationPaths(\n activationResult: Awaited<ReturnType<typeof activateExtensions>>,\n): RuntimeActivationPaths {\n const commandPathsByExtension = new Map<string, Set<string>>();\n const actionPathsByExtension = new Map<string, Set<string>>();\n for (const registration of activationResult.registrations.commands) {\n addRuntimePath(\n commandPathsByExtension,\n registration.name,\n registration.command,\n );\n addRuntimePath(\n actionPathsByExtension,\n registration.name,\n registration.action,\n );\n }\n for (const handler of activationResult.commands.handlers) {\n addRuntimePath(commandPathsByExtension, handler.name, handler.command);\n }\n for (const override of activationResult.commands.overrides) {\n addRuntimePath(commandPathsByExtension, override.name, override.command);\n }\n return { commandPathsByExtension, actionPathsByExtension };\n}\n\nfunction sortedRuntimePaths(\n values: Set<string> | undefined,\n): string[] | undefined {\n if (!values || values.size === 0) {\n return undefined;\n }\n return [...values].sort((left, right) => left.localeCompare(right));\n}\n\nfunction resolveDoctorActivationStatus(params: {\n enabled: boolean;\n normalizedName: string;\n loadedNames: Set<string>;\n loadFailedNames: Set<string>;\n activationFailedNames: Set<string>;\n}): Pick<ManagedExtensionSummary, \"runtime_active\" | \"activation_status\"> {\n const {\n enabled,\n normalizedName,\n loadedNames,\n loadFailedNames,\n activationFailedNames,\n } = params;\n if (!enabled) {\n return { runtime_active: false, activation_status: \"not_loaded\" };\n }\n if (\n loadFailedNames.has(normalizedName) ||\n activationFailedNames.has(normalizedName)\n ) {\n return { runtime_active: false, activation_status: \"failed\" };\n }\n if (loadedNames.has(normalizedName)) {\n return { runtime_active: true, activation_status: \"ok\" };\n }\n return { runtime_active: false, activation_status: \"not_loaded\" };\n}\n\n/** Implements apply doctor runtime activation state for the public runtime surface of this module. */\nexport function applyDoctorRuntimeActivationState(\n extensions: ManagedExtensionSummary[],\n loadResult: Awaited<ReturnType<typeof loadExtensions>>,\n activationResult: Awaited<ReturnType<typeof activateExtensions>>,\n): ManagedExtensionSummary[] {\n const loadedNames = new Set(\n loadResult.loaded.map((entry) =>\n normalizeExtensionNameForMatch(entry.name),\n ),\n );\n const loadFailedNames = new Set(\n loadResult.failed.map((entry) =>\n normalizeExtensionNameForMatch(entry.name),\n ),\n );\n const activationFailedNames = new Set(\n activationResult.failed.map((entry) =>\n normalizeExtensionNameForMatch(entry.name),\n ),\n );\n const { commandPathsByExtension, actionPathsByExtension } =\n collectRuntimeActivationPaths(activationResult);\n\n return extensions.map((entry) => {\n const normalizedName = normalizeExtensionNameForMatch(entry.name);\n const commandPaths = sortedRuntimePaths(\n commandPathsByExtension.get(normalizedName),\n );\n const actionPaths = sortedRuntimePaths(\n actionPathsByExtension.get(normalizedName),\n );\n const runtimeMetadata = {\n ...(commandPaths ? { command_paths: commandPaths } : {}),\n ...(actionPaths ? { action_paths: actionPaths } : {}),\n };\n const activationStatus = resolveDoctorActivationStatus({\n enabled: entry.enabled,\n normalizedName,\n loadedNames,\n loadFailedNames,\n activationFailedNames,\n });\n return {\n ...entry,\n ...activationStatus,\n ...runtimeMetadata,\n };\n });\n}\n\nfunction summarizePolicyWarnings(warnings: string[]): {\n warning_count: number;\n violation_count: number;\n blocked_count: number;\n} {\n let warningCount = 0;\n let violationCount = 0;\n let blockedCount = 0;\n for (const warning of warnings) {\n if (!warning.startsWith(\"extension_policy_\")) {\n continue;\n }\n warningCount += 1;\n if (warning.startsWith(\"extension_policy_violation_\")) {\n violationCount += 1;\n continue;\n }\n if (warning.startsWith(\"extension_policy_blocked_\")) {\n blockedCount += 1;\n }\n }\n return {\n warning_count: warningCount,\n violation_count: violationCount,\n blocked_count: blockedCount,\n };\n}\n\nfunction lifecycleFlagCommand(\n options: ExtensionCommandOptions,\n action: string,\n): string {\n return options.vocabulary === \"package\"\n ? `pm package --${action}`\n : `pm extension --${action}`;\n}\n\nconst REGISTRATION_COLLISION_WARNING_CODES = new Set([\n \"extension_command_handler_collision\",\n \"extension_command_override_collision\",\n \"extension_command_override_handler_overlap\",\n \"extension_parser_override_collision\",\n \"extension_preflight_override_collision\",\n \"extension_renderer_collision\",\n \"extension_service_override_collision\",\n]);\n\n/** Implements check whether registration collision warning for the public runtime surface of this module. */\nfunction isRegistrationCollisionWarning(warning: string): boolean {\n return REGISTRATION_COLLISION_WARNING_CODES.has(warningCode(warning));\n}\n\nfunction isExtensionLayer(\n value: string | undefined,\n): value is \"project\" | \"global\" {\n return value === \"project\" || value === \"global\";\n}\n\ninterface RegistrationCollisionWarningParts {\n code: string;\n surface: string;\n winner: { layer: \"project\" | \"global\"; name: string };\n displaced: { layer: \"project\" | \"global\"; name: string };\n}\n\nfunction parseRegistrationCollisionWarning(\n warning: string,\n): RegistrationCollisionWarningParts | null {\n const parts = warning.split(\":\");\n const code = parts[0];\n if (!code || !REGISTRATION_COLLISION_WARNING_CODES.has(code)) {\n return null;\n }\n // Collision warnings end with winnerLayer:winnerName:displacedLayer:displacedName.\n // Surface identifiers before that suffix may contain colons, so parse from the right.\n const winnerLayer = parts.at(-4);\n const winnerName = parts.at(-3)?.trim();\n const displacedLayer = parts.at(-2);\n const displacedName = parts.at(-1)?.trim();\n if (\n !isExtensionLayer(winnerLayer) ||\n !isExtensionLayer(displacedLayer) ||\n !winnerName ||\n !displacedName\n ) {\n return null;\n }\n return {\n code,\n surface: parts.slice(1, -4).join(\":\") || \"global\",\n winner: { layer: winnerLayer, name: winnerName },\n displaced: { layer: displacedLayer, name: displacedName },\n };\n}\n\nfunction collectRegistrationCollisionExtensionNames(\n warnings: string[],\n): string[] {\n const names = new Set<string>();\n for (const warning of warnings) {\n const parsed = parseRegistrationCollisionWarning(warning);\n if (!parsed) {\n continue;\n }\n names.add(parsed.winner.name);\n names.add(parsed.displaced.name);\n }\n return [...names].sort((left, right) => left.localeCompare(right));\n}\n\n/** Implements build registration collision remediation for the public runtime surface of this module. */\nexport function buildRegistrationCollisionRemediation(\n warnings: string[],\n commands: { deactivate: string; doctor: string },\n): string | null {\n const registrationCollisionWarnings = warnings.filter(\n isRegistrationCollisionWarning,\n );\n if (registrationCollisionWarnings.length === 0) {\n return null;\n }\n const collisionNames = collectRegistrationCollisionExtensionNames(\n registrationCollisionWarnings,\n );\n const collisionNameText =\n collisionNames.length > 0\n ? ` Conflicting extensions: ${collisionNames.join(\", \")}.`\n : \"\";\n return (\n `Extension registration collisions or handler/override overlaps detected.${collisionNameText} Single-winner surfaces can hide earlier package behavior. ` +\n `Deactivate one conflicting package with ${commands.deactivate}, ` +\n `or scope registration surfaces in extensions.policy.extension_overrides, then rerun ${commands.doctor}.`\n );\n}\n\nfunction buildRegistrationCollisionPlan(\n scope: ExtensionScope,\n warnings: string[],\n extensions: ManagedExtensionSummary[],\n options: ExtensionCommandOptions,\n): ExtensionCollisionPlan | undefined {\n const collisions = warnings\n .map((warning) => parseRegistrationCollisionWarning(warning))\n .filter(\n (entry): entry is RegistrationCollisionWarningParts => entry !== null,\n )\n .sort((left, right) =>\n `${left.code}:${left.surface}:${left.winner.name}:${left.displaced.name}`.localeCompare(\n `${right.code}:${right.surface}:${right.winner.name}:${right.displaced.name}`,\n ),\n );\n if (collisions.length === 0) {\n return undefined;\n }\n const scopeFlag = scope === \"global\" ? \"--global\" : \"--project\";\n const deactivatePrefix = lifecycleFlagCommand(options, \"deactivate\");\n const doctorCommand = `${lifecycleFlagCommand(options, \"doctor\")} ${scopeFlag} --detail deep --trace`;\n const extensionByName = new Map(\n extensions.map((entry) => [\n normalizeExtensionNameForMatch(entry.name),\n entry,\n ]),\n );\n const affectedByName = new Map<string, number>();\n for (const collision of collisions) {\n for (const name of [collision.winner.name, collision.displaced.name]) {\n const normalizedName = normalizeExtensionNameForMatch(name);\n affectedByName.set(\n normalizedName,\n (affectedByName.get(normalizedName) ?? 0) + 1,\n );\n }\n }\n const remediationCandidates = [...affectedByName.entries()]\n .map(([normalizedName, affectedCollisions]) => {\n const extension = extensionByName.get(normalizedName);\n const extensionName = extension?.name ?? normalizedName;\n const commandPaths = extension?.command_paths ?? [];\n const actionPaths = extension?.action_paths ?? [];\n return {\n action: \"deactivate\" as const,\n extension: extensionName,\n command: `${deactivatePrefix} ${extensionName} ${scopeFlag}`,\n affected_collisions: affectedCollisions,\n feature_loss: {\n command_paths: [...commandPaths].sort((left, right) =>\n left.localeCompare(right),\n ),\n action_paths: [...actionPaths].sort((left, right) =>\n left.localeCompare(right),\n ),\n },\n };\n })\n .sort((left, right) => {\n const affectedDelta =\n right.affected_collisions - left.affected_collisions;\n if (affectedDelta !== 0) {\n return affectedDelta;\n }\n const leftSurfaceCount =\n left.feature_loss.command_paths.length +\n left.feature_loss.action_paths.length;\n const rightSurfaceCount =\n right.feature_loss.command_paths.length +\n right.feature_loss.action_paths.length;\n if (leftSurfaceCount !== rightSurfaceCount) {\n return leftSurfaceCount - rightSurfaceCount;\n }\n return left.extension.localeCompare(right.extension);\n });\n\n return {\n status: \"conflicts_detected\",\n collision_count: collisions.length,\n extension_count: affectedByName.size,\n next_best_command: doctorCommand,\n collisions,\n remediation_candidates: remediationCandidates,\n };\n}\n\n/** Implements classify doctor load failure warnings for the public runtime surface of this module. */\nexport function classifyDoctorLoadFailureWarnings(\n loadFailures: Array<{ name: string; error: string }>,\n): string[] {\n const warnings: string[] = [];\n for (const failure of loadFailures) {\n const normalizedError = failure.error.toLowerCase();\n if (\n normalizedError.includes(\"cannot find package '@unbrained/pm-cli'\") ||\n normalizedError.includes('cannot find module \"@unbrained/pm-cli\"') ||\n normalizedError.includes(\"cannot find module '@unbrained/pm-cli'\")\n ) {\n warnings.push(\n `extension_load_failed_sdk_dependency_missing:${failure.name}`,\n );\n }\n if (\n normalizedError.includes(\n \"cannot use import statement outside a module\",\n ) ||\n normalizedError.includes(\"to load an es module\") ||\n normalizedError.includes(\"must use import to load es module\")\n ) {\n warnings.push(\n `extension_load_failed_module_mode_mismatch:${failure.name}`,\n );\n }\n }\n return [...new Set(warnings)].sort((left, right) =>\n left.localeCompare(right),\n );\n}\n\n/** Implements classify doctor activation failure warnings for the public runtime surface of this module. */\nexport function classifyDoctorActivationFailureWarnings(\n activationFailures: Array<{\n name: string;\n trace?: { missing_capability?: string; capability?: string };\n }> = [],\n): string[] {\n const failures = Array.isArray(activationFailures) ? activationFailures : [];\n const warnings: string[] = [];\n for (const failure of failures) {\n if (!failure || typeof failure.name !== \"string\") {\n continue;\n }\n const missingCapability =\n failure.trace?.missing_capability ?? failure.trace?.capability;\n if (\n typeof missingCapability === \"string\" &&\n missingCapability.trim().length > 0\n ) {\n warnings.push(\n `extension_capability_missing:${failure.name}:${missingCapability.trim().toLowerCase()}`,\n );\n }\n }\n return [...new Set(warnings)].sort((left, right) =>\n left.localeCompare(right),\n );\n}\n\n/**\n * Classify advisory least-privilege warnings for capabilities each loaded\n * extension declares in its manifest but never registers against.\n *\n * Emits one `extension_capability_unused:<layer>:<name>:<capability>` token per\n * over-broad grant. These are advisory hygiene hints — they never block — that\n * tell an author to trim the manifest (or add the missing registration). The\n * inverse failure (registering a surface whose capability is undeclared) is the\n * blocking `extension_capability_missing` warning emitted during activation.\n */\nexport function classifyUnusedCapabilityWarnings(\n loadResult: Awaited<ReturnType<typeof loadExtensions>>,\n activationResult: Awaited<ReturnType<typeof activateExtensions>>,\n): string[] {\n const warnings: string[] = [];\n for (const entry of reconcileExtensionCapabilityUsage(\n loadResult.loaded,\n activationResult,\n )) {\n for (const capability of entry.unused) {\n warnings.push(\n `extension_capability_unused:${entry.layer}:${entry.name}:${capability}`,\n );\n }\n }\n return [...new Set(warnings)].sort((left, right) =>\n left.localeCompare(right),\n );\n}\n\n/** Inputs every triage remediation message can reference: the lifecycle command options and resolved `scopeFlag`/`scope`, plus the two numeric totals (`updateCheckFailedTotal`, `policyWarningCount`) whose own warning-driven rules fire purely on a count rather than a warning prefix. */\ninterface TriageRemediationContext {\n options: ExtensionCommandOptions;\n scope: ExtensionScope;\n scopeFlag: string;\n updateCheckFailedTotal: number;\n policyWarningCount: number;\n}\n\n/**\n * One warning-driven remediation rule: `matches` decides whether the emitted\n * warning set (or a {@link TriageRemediationContext} count) warrants the hint,\n * and `build` renders the scope-aware message. Replacing the former\n * if-prefix ladder with this table keeps {@link buildExtensionTriageSummary}\n * under the complexity ceiling while preserving message order and content.\n */\ninterface TriageRemediationRule {\n matches: (\n warnings: readonly string[],\n ctx: TriageRemediationContext,\n ) => boolean;\n build: (ctx: TriageRemediationContext) => string;\n}\n\n/** Ordered remediation rules evaluated while at least one warning is present. The order is load-bearing — it is the order remediation hints appear in doctor output — so new rules must be inserted at the intended position rather than appended. */\nconst TRIAGE_REMEDIATION_RULES: readonly TriageRemediationRule[] = [\n {\n matches: (warnings) =>\n warnings.some((warning) => warning.startsWith(\"extension_manifest_\")),\n build: (ctx) =>\n `Run ${lifecycleFlagCommand(ctx.options, \"explore\")} ${ctx.scopeFlag} to inspect discovered manifests and directories.`,\n },\n {\n matches: (warnings) =>\n warnings.some((warning) =>\n warning.startsWith(\"extension_capability_unknown:\"),\n ),\n build: () =>\n `Unknown extension capabilities detected. Allowed capabilities: ${KNOWN_EXTENSION_CAPABILITIES.join(\", \")}. ` +\n \"Review extension_capability_unknown warning details for suggested replacements.\",\n },\n {\n matches: (warnings) =>\n warnings.some((warning) =>\n warning.startsWith(\"extension_capability_legacy_alias:\"),\n ),\n build: () =>\n \"Legacy extension capability aliases were auto-remapped to canonical capabilities. \" +\n \"Update manifests to canonical names (migration/validation -> schema).\",\n },\n {\n matches: (warnings) =>\n warnings.some((warning) =>\n warning.startsWith(\"extension_capability_missing:\"),\n ),\n build: (ctx) =>\n `Extension activation failed because code registered a surface missing from manifest capabilities. ` +\n `Run ${lifecycleFlagCommand(ctx.options, \"doctor\")} ${ctx.scopeFlag} --detail deep --trace and add the reported missing_capability to manifest.json before publishing.`,\n },\n {\n matches: (warnings) =>\n warnings.some((warning) =>\n warning.startsWith(\"extension_capability_unused:\"),\n ),\n build: (ctx) =>\n \"Extension manifests declare capabilities that are never registered against. \" +\n `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.`,\n },\n {\n matches: (warnings) =>\n warnings.some((warning) =>\n warning.startsWith(\n \"extension_command_definition_legacy_handler_alias:\",\n ),\n ),\n build: () =>\n \"Extension command definitions using legacy handler were auto-remapped. \" +\n \"Update command definitions to use run: (context) => ... for forward compatibility.\",\n },\n {\n matches: (warnings) =>\n warnings.some(\n (warning) =>\n warning.startsWith(\"extension_output_service_override_global:\") ||\n warning.startsWith(\"extension_output_renderer_override_global:\"),\n ),\n build: () =>\n \"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.\",\n },\n {\n matches: (warnings) =>\n warnings.some((warning) =>\n warning.startsWith(\"extension_schema_narrow_activation:\"),\n ),\n build: () =>\n \"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.\",\n },\n {\n matches: (warnings) =>\n warnings.some((warning) =>\n warning.startsWith(\"extension_load_failed_sdk_dependency_missing:\"),\n ),\n build: (ctx) =>\n `Detected extension load failures caused by missing SDK dependency resolution. ` +\n `Ensure extension package dependencies include \"@unbrained/pm-cli\" and reinstall dependencies before running ${lifecycleFlagCommand(ctx.options, \"doctor\")} ${ctx.scopeFlag}.`,\n },\n {\n matches: (warnings) =>\n warnings.some((warning) =>\n warning.startsWith(\"extension_load_failed_module_mode_mismatch:\"),\n ),\n build: (ctx) =>\n `Detected extension module-mode mismatches. For ESM-based extension entries/imports, set package.json \"type\": \"module\" ` +\n `or use an explicit .mjs entry and rerun ${lifecycleFlagCommand(ctx.options, \"doctor\")} ${ctx.scopeFlag}.`,\n },\n {\n matches: (warnings) =>\n warnings.some(\n (warning) =>\n warning.startsWith(\"extension_pm_min_version_\") ||\n warning.startsWith(\"extension_pm_max_version_\"),\n ),\n build: (ctx) =>\n \"Extension pm version-bound warnings detected. Align each package manifest's pm_min_version/pm_max_version \" +\n `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}.`,\n },\n {\n matches: (_warnings, ctx) => ctx.updateCheckFailedTotal > 0,\n build: (ctx) =>\n `Run ${lifecycleFlagCommand(ctx.options, \"manage\")} ${ctx.scopeFlag} after validating network and repository access.`,\n },\n {\n matches: (warnings) =>\n warnings.some((warning) =>\n warning.startsWith(\"extension_manager_state_\"),\n ),\n build: (ctx) =>\n `Review and repair ${ctx.scope} managed extension state file if schema/read warnings persist.`,\n },\n {\n matches: (_warnings, ctx) => ctx.policyWarningCount > 0,\n build: () =>\n \"Extension governance policy warnings detected. Review settings.extensions.policy mode and allow/block lists to confirm intended capabilities and registration surfaces.\",\n },\n];\n\n/**\n * Build the ordered remediation hints for a triage summary. Warning-driven rules\n * (collision remediation first, then {@link TRIAGE_REMEDIATION_RULES}) only run\n * when at least one warning is present; the update-health coverage and\n * availability hints always run; and a \"no immediate action\" fallback is\n * appended when nothing else applied.\n */\nfunction buildExtensionTriageRemediation(params: {\n normalizedWarnings: string[];\n options: ExtensionCommandOptions;\n scope: ExtensionScope;\n scopeFlag: string;\n updateCheckFailedTotal: number;\n policyWarningCount: number;\n updateHealthPartial: boolean;\n skippedUnmanagedTotal: number;\n skippedNonGithubTotal: number;\n updateAvailableTotal: number;\n}): string[] {\n const {\n normalizedWarnings,\n options,\n scope,\n scopeFlag,\n updateCheckFailedTotal,\n policyWarningCount,\n updateHealthPartial,\n skippedUnmanagedTotal,\n skippedNonGithubTotal,\n updateAvailableTotal,\n } = params;\n const remediation: string[] = [];\n const ctx: TriageRemediationContext = {\n options,\n scope,\n scopeFlag,\n updateCheckFailedTotal,\n policyWarningCount,\n };\n if (normalizedWarnings.length > 0) {\n const registrationCollisionRemediation =\n buildRegistrationCollisionRemediation(normalizedWarnings, {\n deactivate: `${lifecycleFlagCommand(options, \"deactivate\")} <name> ${scopeFlag}`,\n doctor: `${lifecycleFlagCommand(options, \"doctor\")} ${scopeFlag} --detail deep --trace`,\n });\n if (registrationCollisionRemediation) {\n remediation.push(registrationCollisionRemediation);\n }\n for (const rule of TRIAGE_REMEDIATION_RULES) {\n if (rule.matches(normalizedWarnings, ctx)) {\n remediation.push(rule.build(ctx));\n }\n }\n }\n if (updateHealthPartial) {\n remediation.push(\n `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>).`,\n );\n } else if (skippedUnmanagedTotal > 0) {\n remediation.push(\n `Loaded unmanaged extensions are currently treated as informational. Use ${lifecycleFlagCommand(options, \"manage\")} ${scopeFlag} --fix-managed-state to adopt them for update checks.`,\n );\n }\n if (skippedNonGithubTotal > 0) {\n remediation.push(\n `Non-GitHub managed extensions are skipped by update checks. Use doctor output for non-update diagnostics.`,\n );\n }\n if (updateAvailableTotal > 0) {\n remediation.push(\n `Update available managed extensions via ${lifecycleFlagCommand(options, \"install\")} ${scopeFlag} <source>.`,\n );\n }\n if (remediation.length === 0) {\n remediation.push(\n `No immediate action required. Re-run ${lifecycleFlagCommand(options, \"manage\")} ${scopeFlag} after extension changes.`,\n );\n }\n return remediation;\n}\n\n/** Implements build extension triage summary for the public runtime surface of this module. */\nexport function buildExtensionTriageSummary(\n scope: ExtensionScope,\n warnings: string[],\n extensions: ManagedExtensionSummary[],\n options: ExtensionCommandOptions = {},\n): ExtensionTriageSummary {\n const normalizedWarnings = [...new Set(warnings)].sort((left, right) =>\n left.localeCompare(right),\n );\n const managedTotal = extensions.filter((entry) => entry.managed).length;\n const enabledTotal = extensions.filter((entry) => entry.enabled).length;\n const activeTotal = extensions.filter((entry) => entry.active).length;\n const updateAvailableTotal = extensions.filter(\n (entry) => entry.update_available === true,\n ).length;\n const unmanagedExtensions = extensions.filter(\n (entry) => entry.managed === false,\n );\n const unmanagedExpectedExtensions = unmanagedExtensions\n .filter((entry) => isExpectedUnmanagedExtension(entry))\n .map((entry) => entry.name)\n .sort((left, right) => left.localeCompare(right));\n const unmanagedActionRequiredExtensions = unmanagedExtensions\n .filter((entry) => !isExpectedUnmanagedExtension(entry))\n .map((entry) => entry.name)\n .sort((left, right) => left.localeCompare(right));\n const updateCheckStatusTotals: Record<ExtensionUpdateCheckStatus, number> = {\n checked: 0,\n skipped_unmanaged: 0,\n skipped_non_github: 0,\n failed: 0,\n not_checked: 0,\n };\n for (const entry of extensions) {\n updateCheckStatusTotals[entry.update_check_status] += 1;\n }\n const updateCheckFailedTotal = updateCheckStatusTotals.failed;\n const skippedUnmanagedTotal = updateCheckStatusTotals.skipped_unmanaged;\n const skippedNonGithubTotal = updateCheckStatusTotals.skipped_non_github;\n const updateHealthPartial = unmanagedActionRequiredExtensions.length > 0;\n const updateHealthCoverage = updateHealthPartial ? \"partial\" : \"full\";\n const partialCoverageWarnings = updateHealthPartial\n ? [\n `extension_update_health_partial_coverage:skipped_unmanaged:${unmanagedActionRequiredExtensions.length}`,\n ]\n : [];\n const effectiveWarnings = [\n ...new Set([...normalizedWarnings, ...partialCoverageWarnings]),\n ].sort((left, right) => left.localeCompare(right));\n const warningCodes = [\n ...new Set(effectiveWarnings.map((value) => warningCode(value))),\n ].sort((left, right) => left.localeCompare(right));\n const policyWarnings = summarizePolicyWarnings(effectiveWarnings);\n const scopeFlag = scope === \"global\" ? \"--global\" : \"--project\";\n const collisionPlan = buildRegistrationCollisionPlan(\n scope,\n normalizedWarnings,\n extensions,\n options,\n );\n const remediation = buildExtensionTriageRemediation({\n normalizedWarnings,\n options,\n scope,\n scopeFlag,\n updateCheckFailedTotal,\n policyWarningCount: policyWarnings.warning_count,\n updateHealthPartial,\n skippedUnmanagedTotal,\n skippedNonGithubTotal,\n updateAvailableTotal,\n });\n return {\n status: effectiveWarnings.length === 0 ? \"ok\" : \"warn\",\n warning_count: effectiveWarnings.length,\n warning_codes: warningCodes,\n warnings: effectiveWarnings,\n policy_warning_count: policyWarnings.warning_count,\n policy_violation_count: policyWarnings.violation_count,\n policy_blocked_count: policyWarnings.blocked_count,\n total_extensions: extensions.length,\n managed_total: managedTotal,\n enabled_total: enabledTotal,\n active_total: activeTotal,\n update_available_total: updateAvailableTotal,\n update_health_coverage: updateHealthCoverage,\n update_health_partial: updateHealthPartial,\n unmanaged_loaded_extension_count: unmanagedExtensions.length,\n unmanaged_loaded_extensions: unmanagedExtensions\n .map((entry) => entry.name)\n .sort((left, right) => left.localeCompare(right)),\n unmanaged_expected_extension_count: unmanagedExpectedExtensions.length,\n unmanaged_expected_extensions: unmanagedExpectedExtensions,\n unmanaged_action_required_extension_count:\n unmanagedActionRequiredExtensions.length,\n unmanaged_action_required_extensions: unmanagedActionRequiredExtensions,\n update_check_status_totals: updateCheckStatusTotals,\n update_check_failed_total: updateCheckFailedTotal,\n top_warnings: effectiveWarnings.slice(0, 8),\n remediation,\n ...(collisionPlan ? { collision_plan: collisionPlan } : {}),\n };\n}\n\n/** Implements parse doctor detail mode for the public runtime surface of this module. */\nexport function parseDoctorDetailMode(\n raw: string | undefined,\n): ExtensionDoctorDetailMode {\n if (!raw || raw.trim().length === 0) {\n return \"summary\";\n }\n const normalized = raw.trim().toLowerCase();\n if (normalized === \"summary\" || normalized === \"deep\") {\n return normalized;\n }\n throw new PmCliError(\n `Invalid --detail value \"${raw}\". Expected summary or deep.`,\n EXIT_CODE.USAGE,\n );\n}\n\nfunction warningCode(value: string): string {\n const normalized = value.trim();\n const separator = normalized.indexOf(\":\");\n if (separator === -1) {\n return normalized;\n }\n return normalized.slice(0, separator);\n}\n\n/** Implements collect unknown capability guidance for the public runtime surface of this module. */\nexport function collectUnknownCapabilityGuidance(\n warnings: string[],\n): UnknownExtensionCapabilityWarningDetails[] {\n const seen = new Set<string>();\n const guidance: UnknownExtensionCapabilityWarningDetails[] = [];\n for (const warning of warnings) {\n const parsedDetails = (() => {\n const unknownWarning = parseUnknownExtensionCapabilityWarning(warning);\n if (unknownWarning) {\n return [unknownWarning];\n }\n return parseLegacyExtensionCapabilityAliasWarning(warning);\n })();\n for (const parsed of parsedDetails) {\n const key = `${parsed.layer}:${parsed.name}:${parsed.capability}`;\n if (seen.has(key)) {\n continue;\n }\n seen.add(key);\n guidance.push(parsed);\n }\n }\n return guidance;\n}\n\n/** Implements build capability contract metadata for the public runtime surface of this module. */\nexport function buildCapabilityContractMetadata(): {\n version: number;\n capabilities: string[];\n legacy_aliases: Record<string, string>;\n} {\n return {\n version: EXTENSION_CAPABILITY_CONTRACT.version,\n capabilities: [...EXTENSION_CAPABILITY_CONTRACT.capabilities],\n legacy_aliases: { ...EXTENSION_CAPABILITY_CONTRACT.legacy_aliases },\n };\n}\n\nfunction isExpectedUnmanagedExtension(entry: ManagedExtensionSummary): boolean {\n const normalizedName = normalizeExtensionNameForMatch(entry.name);\n const normalizedDirectory = normalizeExtensionNameForMatch(entry.directory);\n if (normalizedName.startsWith(\"builtin-\")) {\n return true;\n }\n return normalizedDirectory === \"beads\" || normalizedDirectory === \"todos\";\n}\n\n/** Implements build doctor consistency summary for the public runtime surface of this module. */\nexport function buildDoctorConsistencySummary(\n scope: ExtensionScope,\n installedExtensions: ManagedExtensionSummary[],\n loadedExtensions: Array<{ layer: string; name: string }>,\n failedLoads: Array<{ name: string }>,\n disabledByFlag: boolean,\n): {\n warnings: string[];\n summary: {\n active_project_count: number;\n loaded_project_count: number;\n active_project_names: string[];\n loaded_project_names: string[];\n missing_active_project_names: string[];\n };\n} {\n if (scope !== \"project\" || disabledByFlag) {\n return {\n warnings: [],\n summary: {\n active_project_count: 0,\n loaded_project_count: 0,\n active_project_names: [],\n loaded_project_names: [],\n missing_active_project_names: [],\n },\n };\n }\n\n const activeProjectNames = [\n ...new Set(\n installedExtensions\n .filter((entry) => entry.active)\n .map((entry) => normalizeExtensionNameForMatch(entry.name)),\n ),\n ].sort((left, right) => left.localeCompare(right));\n const loadedProjectNames = [\n ...new Set(\n loadedExtensions\n .filter((entry) => entry.layer === \"project\")\n .map((entry) => normalizeExtensionNameForMatch(entry.name)),\n ),\n ].sort((left, right) => left.localeCompare(right));\n const failedLoadNames = new Set(\n failedLoads.map((entry) => normalizeExtensionNameForMatch(entry.name)),\n );\n const missingActiveProjectNames = activeProjectNames\n .filter(\n (name) =>\n !loadedProjectNames.includes(name) && !failedLoadNames.has(name),\n )\n .sort((left, right) => left.localeCompare(right));\n\n const warnings =\n missingActiveProjectNames.length > 0\n ? [\n `extension_doctor_consistency_active_not_loaded:${missingActiveProjectNames.join(\",\")}`,\n ]\n : [];\n\n return {\n warnings,\n summary: {\n active_project_count: activeProjectNames.length,\n loaded_project_count: loadedProjectNames.length,\n active_project_names: activeProjectNames,\n loaded_project_names: loadedProjectNames,\n missing_active_project_names: missingActiveProjectNames,\n },\n };\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAGL,iCAAiC,GAClC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,EAC5B,0CAA0C,EAC1C,sCAAsC,GAEvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAgB7D,SAAS,cAAc,CACrB,gBAA0C,EAC1C,aAAqB,EACrB,SAAiB;IAEjB,MAAM,cAAc,GAAG,8BAA8B,CAAC,aAAa,CAAC,CAAC;IACrE,MAAM,cAAc,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;IACxC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/D,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,IAAI,GAAG,EAAU,CAAC;IAC3E,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC7B,gBAAgB,CAAC,GAAG,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,6BAA6B,CACpC,gBAAgE;IAEhE,MAAM,uBAAuB,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC/D,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC9D,KAAK,MAAM,YAAY,IAAI,gBAAgB,CAAC,aAAa,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,CACnE;SACA,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAEpD,MAAM,QAAQ,GACZ,yBAAyB,CAAC,MAAM,GAAG,CAAC;QAClC,CAAC,CAAC;YACE,kDAAkD,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;SACxF;QACH,CAAC,CAAC,EAAE,CAAC;IAET,OAAO;QACL,QAAQ;QACR,OAAO,EAAE;YACP,oBAAoB,EAAE,kBAAkB,CAAC,MAAM;YAC/C,oBAAoB,EAAE,kBAAkB,CAAC,MAAM;YAC/C,oBAAoB,EAAE,kBAAkB;YACxC,oBAAoB,EAAE,kBAAkB;YACxC,4BAA4B,EAAE,yBAAyB;SACxD;KACF,CAAC;AACJ,CAAC","debugId":"cce22256-4d00-5abd-8fb8-c2a1a34ab128"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
/** Retry and lease timing overrides for one extension install lock. */
|
|
3
|
+
export interface ExtensionInstallLockOptions {
|
|
4
|
+
/** Maximum lock-acquisition attempts. */
|
|
5
|
+
attempts?: number;
|
|
6
|
+
/** Delay between contended acquisition attempts. */
|
|
7
|
+
delay_ms?: number;
|
|
8
|
+
/** Age after which an unchanged owner lease can be reclaimed. */
|
|
9
|
+
stale_ms?: number;
|
|
10
|
+
/** Lease heartbeat interval while the operation runs. */
|
|
11
|
+
heartbeat_ms?: number;
|
|
12
|
+
}
|
|
13
|
+
/** Identify transient copy races that are safe to retry during extension installation. */
|
|
14
|
+
export declare const isRetriableExtensionInstallCopyError: (error: unknown) => boolean;
|
|
15
|
+
/** Test an unknown failure against one expected errno-style code. */
|
|
16
|
+
export declare const isErrnoCode: (error: unknown, code: string) => boolean;
|
|
17
|
+
/** Ensure an installed extension carries an ESM package boundary marker. */
|
|
18
|
+
export declare const ensureExtensionModuleTypeMarker: (destinationDirectory: string) => Promise<void>;
|
|
19
|
+
/** Resolve a possibly partial extension destination through every existing symlink segment. */
|
|
20
|
+
export declare const resolveCanonicalExtensionInstallDestination: (destinationDirectory: string) => Promise<string>;
|
|
21
|
+
/** Copy an extension without recursively copying a destination nested below its source. */
|
|
22
|
+
export declare const copyExtensionDirectoryWithoutSelfNesting: (sourceDirectory: string, destinationDirectory: string, copyDirectory: typeof fs.cp, temporaryDirectory?: string) => Promise<void>;
|
|
23
|
+
/** Copy one extension directory with bounded transient-race retries. */
|
|
24
|
+
export declare const copyExtensionDirectoryForInstall: (sourceDirectory: string, destinationDirectory: string, copyDirectory?: typeof fs.cp) => Promise<void>;
|
|
25
|
+
/** Run one operation under an owner-bound extension install lock and heartbeat lease. */
|
|
26
|
+
export declare const withExtensionInstallLock: <T>(settingsRoot: string, destinationDirectoryName: string, run: () => Promise<T>, options?: ExtensionInstallLockOptions) => Promise<T>;
|