@unbrained/pm-cli 2026.7.14 → 2026.7.15
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 +48 -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,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/extension/shared
|
|
3
|
+
*
|
|
4
|
+
* Implements extension package-management support for Shared.
|
|
5
|
+
*/
|
|
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]="79cbf5a9-d060-546d-aa23-79e4b16fa6dc")}catch(e){}}();
|
|
8
|
+
import fs from "node:fs/promises";
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
import { pathExists } from "../../core/fs/fs-utils.js";
|
|
11
|
+
import { isPathWithinDirectory } from "../../core/fs/path-utils.js";
|
|
12
|
+
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
13
|
+
import { PmCliError } from "../../core/shared/errors.js";
|
|
14
|
+
import { DEFAULT_EXTENSION_PRIORITY, isCanonicalPathWithinDirectory, } from "../../core/extensions/loader.js";
|
|
15
|
+
export { DEFAULT_EXTENSION_PRIORITY, isCanonicalPathWithinDirectory };
|
|
16
|
+
/** Implements normalize string list for the public runtime surface of this module. */
|
|
17
|
+
export function normalizeStringList(values) {
|
|
18
|
+
return [
|
|
19
|
+
...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0)),
|
|
20
|
+
].sort((left, right) => left.localeCompare(right));
|
|
21
|
+
}
|
|
22
|
+
/** Implements normalize extension name for match for the public runtime surface of this module. */
|
|
23
|
+
export function normalizeExtensionNameForMatch(value) {
|
|
24
|
+
return value.trim().toLowerCase();
|
|
25
|
+
}
|
|
26
|
+
/** Implements normalize managed directory name for the public runtime surface of this module. */
|
|
27
|
+
export function normalizeManagedDirectoryName(name) {
|
|
28
|
+
const normalized = name
|
|
29
|
+
.trim()
|
|
30
|
+
.toLowerCase()
|
|
31
|
+
.replace(/[^a-z0-9._-]+/g, "-");
|
|
32
|
+
let start = 0;
|
|
33
|
+
while (normalized[start] === "-") {
|
|
34
|
+
start += 1;
|
|
35
|
+
}
|
|
36
|
+
let end = normalized.length;
|
|
37
|
+
while (end > start && normalized[end - 1] === "-") {
|
|
38
|
+
end -= 1;
|
|
39
|
+
}
|
|
40
|
+
const directoryName = normalized.slice(start, end);
|
|
41
|
+
if (directoryName.length === 0) {
|
|
42
|
+
throw new PmCliError("Extension manifest name must resolve to a non-empty directory name.", EXIT_CODE.USAGE);
|
|
43
|
+
}
|
|
44
|
+
if (directoryName === "." || directoryName === "..") {
|
|
45
|
+
// Manifest-controlled input must resolve to a dedicated child directory, never
|
|
46
|
+
// the extensions root itself or its parent (path-traversal guard).
|
|
47
|
+
throw new PmCliError('Extension manifest name must not resolve to "." or "..".', EXIT_CODE.USAGE);
|
|
48
|
+
}
|
|
49
|
+
return directoryName;
|
|
50
|
+
}
|
|
51
|
+
function parseOptionalManifestPriority(value) {
|
|
52
|
+
if (value === undefined || value === null) {
|
|
53
|
+
return DEFAULT_EXTENSION_PRIORITY;
|
|
54
|
+
}
|
|
55
|
+
return typeof value === "number" && Number.isInteger(value) ? value : null;
|
|
56
|
+
}
|
|
57
|
+
function parseOptionalManifestCapabilities(value) {
|
|
58
|
+
if (value === undefined || value === null) {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
if (!Array.isArray(value) ||
|
|
62
|
+
value.some((entry) => typeof entry !== "string")) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
return normalizeStringList(value.map((entry) => String(entry).toLowerCase()));
|
|
66
|
+
}
|
|
67
|
+
/** Implements parse extension manifest for the public runtime surface of this module. */
|
|
68
|
+
export function parseExtensionManifest(raw) {
|
|
69
|
+
if (typeof raw !== "object" || raw === null) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
const candidate = raw;
|
|
73
|
+
if (typeof candidate.name !== "string" ||
|
|
74
|
+
candidate.name.trim().length === 0) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
if (typeof candidate.version !== "string" ||
|
|
78
|
+
candidate.version.trim().length === 0) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
if (typeof candidate.entry !== "string" ||
|
|
82
|
+
candidate.entry.trim().length === 0) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
const priority = parseOptionalManifestPriority(candidate.priority);
|
|
86
|
+
const capabilities = parseOptionalManifestCapabilities(candidate.capabilities);
|
|
87
|
+
if (priority === null || capabilities === null) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
name: candidate.name.trim(),
|
|
92
|
+
version: candidate.version.trim(),
|
|
93
|
+
entry: candidate.entry.trim(),
|
|
94
|
+
priority,
|
|
95
|
+
capabilities,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/** Implements validate extension directory for the public runtime surface of this module. */
|
|
99
|
+
export async function validateExtensionDirectory(directory) {
|
|
100
|
+
const manifestPath = path.join(directory, "manifest.json");
|
|
101
|
+
if (!(await pathExists(manifestPath))) {
|
|
102
|
+
throw new PmCliError(`Extension manifest is missing at "${manifestPath}".`, EXIT_CODE.USAGE);
|
|
103
|
+
}
|
|
104
|
+
let parsedManifest;
|
|
105
|
+
try {
|
|
106
|
+
parsedManifest = JSON.parse(await fs.readFile(manifestPath, "utf8"));
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
throw new PmCliError(`Failed to parse extension manifest at "${manifestPath}": ${formatManifestReadError(error)}`, EXIT_CODE.USAGE);
|
|
110
|
+
}
|
|
111
|
+
const manifest = parseExtensionManifest(parsedManifest);
|
|
112
|
+
if (!manifest) {
|
|
113
|
+
throw new PmCliError(`Extension manifest at "${manifestPath}" is invalid.`, EXIT_CODE.USAGE);
|
|
114
|
+
}
|
|
115
|
+
const entryPath = path.resolve(directory, manifest.entry);
|
|
116
|
+
if (!isPathWithinDirectory(directory, entryPath)) {
|
|
117
|
+
throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory "${directory}".`, EXIT_CODE.USAGE);
|
|
118
|
+
}
|
|
119
|
+
if (!(await pathExists(entryPath))) {
|
|
120
|
+
throw new PmCliError(`Extension entry file is missing at "${entryPath}".`, EXIT_CODE.USAGE);
|
|
121
|
+
}
|
|
122
|
+
if (!(await isCanonicalPathWithinDirectory(directory, entryPath))) {
|
|
123
|
+
throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory after symlink resolution.`, EXIT_CODE.USAGE);
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
directory,
|
|
127
|
+
manifest_path: manifestPath,
|
|
128
|
+
entry_path: entryPath,
|
|
129
|
+
manifest,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function formatManifestReadError(error) {
|
|
133
|
+
return error instanceof Error ? error.message : String(error);
|
|
134
|
+
}
|
|
135
|
+
/** Public contract for test only extension shared, shared by SDK and presentation-layer consumers. */
|
|
136
|
+
export const _testOnlyExtensionShared = {
|
|
137
|
+
formatManifestReadError,
|
|
138
|
+
};
|
|
139
|
+
//# sourceMappingURL=shared.js.map
|
|
140
|
+
//# debugId=79cbf5a9-d060-546d-aa23-79e4b16fa6dc
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sources":["sdk/extension/shared.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/extension/shared\n *\n * Implements extension package-management support for Shared.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { isPathWithinDirectory } from \"../../core/fs/path-utils.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport {\n DEFAULT_EXTENSION_PRIORITY,\n isCanonicalPathWithinDirectory,\n type ExtensionManifest,\n} from \"../../core/extensions/loader.js\";\n\nexport { DEFAULT_EXTENSION_PRIORITY, isCanonicalPathWithinDirectory };\n\n/** Documents the validated extension directory payload exchanged by command, SDK, and package integrations. */\nexport interface ValidatedExtensionDirectory {\n /** Value that configures or reports directory for this contract. */\n directory: string;\n /** Filesystem path used for manifest resolution. */\n manifest_path: string;\n /** Filesystem path used for entry resolution. */\n entry_path: string;\n /** Declarative package manifest consumed by the extension loader. */\n manifest: ExtensionManifest;\n}\n\n/** Implements normalize string list for the public runtime surface of this module. */\nexport function normalizeStringList(values: readonly string[]): string[] {\n return [\n ...new Set(\n values.map((value) => value.trim()).filter((value) => value.length > 0),\n ),\n ].sort((left, right) => left.localeCompare(right));\n}\n\n/** Implements normalize extension name for match for the public runtime surface of this module. */\nexport function normalizeExtensionNameForMatch(value: string): string {\n return value.trim().toLowerCase();\n}\n\n/** Implements normalize managed directory name for the public runtime surface of this module. */\nexport function normalizeManagedDirectoryName(name: string): string {\n const normalized = name\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9._-]+/g, \"-\");\n let start = 0;\n while (normalized[start] === \"-\") {\n start += 1;\n }\n let end = normalized.length;\n while (end > start && normalized[end - 1] === \"-\") {\n end -= 1;\n }\n const directoryName = normalized.slice(start, end);\n if (directoryName.length === 0) {\n throw new PmCliError(\n \"Extension manifest name must resolve to a non-empty directory name.\",\n EXIT_CODE.USAGE,\n );\n }\n if (directoryName === \".\" || directoryName === \"..\") {\n // Manifest-controlled input must resolve to a dedicated child directory, never\n // the extensions root itself or its parent (path-traversal guard).\n throw new PmCliError(\n 'Extension manifest name must not resolve to \".\" or \"..\".',\n EXIT_CODE.USAGE,\n );\n }\n return directoryName;\n}\n\nfunction parseOptionalManifestPriority(value: unknown): number | null {\n if (value === undefined || value === null) {\n return DEFAULT_EXTENSION_PRIORITY;\n }\n return typeof value === \"number\" && Number.isInteger(value) ? value : null;\n}\n\nfunction parseOptionalManifestCapabilities(value: unknown): string[] | null {\n if (value === undefined || value === null) {\n return [];\n }\n if (\n !Array.isArray(value) ||\n value.some((entry) => typeof entry !== \"string\")\n ) {\n return null;\n }\n return normalizeStringList(value.map((entry) => String(entry).toLowerCase()));\n}\n\n/** Implements parse extension manifest for the public runtime surface of this module. */\nexport function parseExtensionManifest(raw: unknown): ExtensionManifest | null {\n if (typeof raw !== \"object\" || raw === null) {\n return null;\n }\n const candidate = raw as Record<string, unknown>;\n if (\n typeof candidate.name !== \"string\" ||\n candidate.name.trim().length === 0\n ) {\n return null;\n }\n if (\n typeof candidate.version !== \"string\" ||\n candidate.version.trim().length === 0\n ) {\n return null;\n }\n if (\n typeof candidate.entry !== \"string\" ||\n candidate.entry.trim().length === 0\n ) {\n return null;\n }\n\n const priority = parseOptionalManifestPriority(candidate.priority);\n const capabilities = parseOptionalManifestCapabilities(\n candidate.capabilities,\n );\n if (priority === null || capabilities === null) {\n return null;\n }\n\n return {\n name: candidate.name.trim(),\n version: candidate.version.trim(),\n entry: candidate.entry.trim(),\n priority,\n capabilities,\n };\n}\n\n/** Implements validate extension directory for the public runtime surface of this module. */\nexport async function validateExtensionDirectory(\n directory: string,\n): Promise<ValidatedExtensionDirectory> {\n const manifestPath = path.join(directory, \"manifest.json\");\n if (!(await pathExists(manifestPath))) {\n throw new PmCliError(\n `Extension manifest is missing at \"${manifestPath}\".`,\n EXIT_CODE.USAGE,\n );\n }\n\n let parsedManifest: unknown;\n try {\n parsedManifest = JSON.parse(\n await fs.readFile(manifestPath, \"utf8\"),\n ) as unknown;\n } catch (error: unknown) {\n throw new PmCliError(\n `Failed to parse extension manifest at \"${manifestPath}\": ${formatManifestReadError(error)}`,\n EXIT_CODE.USAGE,\n );\n }\n\n const manifest = parseExtensionManifest(parsedManifest);\n if (!manifest) {\n throw new PmCliError(\n `Extension manifest at \"${manifestPath}\" is invalid.`,\n EXIT_CODE.USAGE,\n );\n }\n\n const entryPath = path.resolve(directory, manifest.entry);\n if (!isPathWithinDirectory(directory, entryPath)) {\n throw new PmCliError(\n `Extension entry \"${manifest.entry}\" resolves outside extension directory \"${directory}\".`,\n EXIT_CODE.USAGE,\n );\n }\n if (!(await pathExists(entryPath))) {\n throw new PmCliError(\n `Extension entry file is missing at \"${entryPath}\".`,\n EXIT_CODE.USAGE,\n );\n }\n if (!(await isCanonicalPathWithinDirectory(directory, entryPath))) {\n throw new PmCliError(\n `Extension entry \"${manifest.entry}\" resolves outside extension directory after symlink resolution.`,\n EXIT_CODE.USAGE,\n );\n }\n\n return {\n directory,\n manifest_path: manifestPath,\n entry_path: entryPath,\n manifest,\n };\n}\n\nfunction formatManifestReadError(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\n/** Public contract for test only extension shared, shared by SDK and presentation-layer consumers. */\nexport const _testOnlyExtensionShared = {\n formatManifestReadError,\n};\n"],"names":[],"mappings":"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","debugId":"79cbf5a9-d060-546d-aa23-79e4b16fa6dc"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ManagedExtensionSource } from "./managed-state.js";
|
|
2
|
+
import { runGitCommand } from "./install-sources.js";
|
|
3
|
+
/** Describes the remote revision health of one managed GitHub extension. */
|
|
4
|
+
export interface GithubUpdateStatus {
|
|
5
|
+
/** Time at which the remote comparison completed. */
|
|
6
|
+
checked_at: string;
|
|
7
|
+
/** Whether the remote commit differs, or null when no comparison is possible. */
|
|
8
|
+
available: boolean | null;
|
|
9
|
+
/** Peeled remote commit when the selected reference resolves. */
|
|
10
|
+
remote_commit?: string;
|
|
11
|
+
/** Stable failure reason when the comparison is incomplete. */
|
|
12
|
+
error?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Compare one managed GitHub extension against its remote revision. */
|
|
15
|
+
export declare const checkGithubUpdate: (source: ManagedExtensionSource, gitCommandRunner?: typeof runGitCommand) => Promise<GithubUpdateStatus>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/extension/update-check
|
|
3
|
+
*
|
|
4
|
+
* Provides bounded and annotated-tag-aware update checks for managed extensions.
|
|
5
|
+
*/
|
|
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]="59876183-57e7-59fa-8137-5f86dac61ea5")}catch(e){}}();
|
|
8
|
+
import { nowIso } from "../../core/shared/time.js";
|
|
9
|
+
import { runGitCommand } from "./install-sources.js";
|
|
10
|
+
const GITHUB_UPDATE_CHECK_TIMEOUT_MS = 10_000;
|
|
11
|
+
/** Compare ls-remote output with an optional installed revision baseline. */
|
|
12
|
+
const resolveGithubUpdateOutput = (output, installedCommitInput, checkedAt) => {
|
|
13
|
+
const references = output
|
|
14
|
+
.split(/\r?\n/)
|
|
15
|
+
.map((line) => line.trim())
|
|
16
|
+
.filter(Boolean)
|
|
17
|
+
.map((line) => {
|
|
18
|
+
const [commit, ref = ""] = line.split(/\s+/);
|
|
19
|
+
return { commit, ref };
|
|
20
|
+
});
|
|
21
|
+
const remoteReference = references.find((reference) => reference.ref.endsWith("^{}")) ??
|
|
22
|
+
references[0];
|
|
23
|
+
if (!remoteReference) {
|
|
24
|
+
return {
|
|
25
|
+
checked_at: checkedAt,
|
|
26
|
+
available: null,
|
|
27
|
+
error: "no_remote_reference_found",
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const installedCommit = installedCommitInput?.trim();
|
|
31
|
+
return installedCommit
|
|
32
|
+
? {
|
|
33
|
+
checked_at: checkedAt,
|
|
34
|
+
remote_commit: remoteReference.commit,
|
|
35
|
+
available: remoteReference.commit !== installedCommit,
|
|
36
|
+
}
|
|
37
|
+
: {
|
|
38
|
+
checked_at: checkedAt,
|
|
39
|
+
remote_commit: remoteReference.commit,
|
|
40
|
+
available: null,
|
|
41
|
+
error: "missing_installed_commit",
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
/** Compare one managed GitHub extension against its remote revision. */
|
|
45
|
+
export const checkGithubUpdate = async (source, gitCommandRunner = runGitCommand) => {
|
|
46
|
+
const checkedAt = nowIso();
|
|
47
|
+
if (source.kind !== "github" || !source.repository) {
|
|
48
|
+
return {
|
|
49
|
+
checked_at: checkedAt,
|
|
50
|
+
available: null,
|
|
51
|
+
error: "not_a_github_managed_source",
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
try {
|
|
55
|
+
const ref = [source.ref?.trim(), "HEAD"].find(Boolean);
|
|
56
|
+
const output = await gitCommandRunner(["ls-remote", source.repository, ref, `${ref}^{}`], undefined, GITHUB_UPDATE_CHECK_TIMEOUT_MS);
|
|
57
|
+
return resolveGithubUpdateOutput(output, source.commit, checkedAt);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
return {
|
|
61
|
+
checked_at: checkedAt,
|
|
62
|
+
available: null,
|
|
63
|
+
error: error instanceof Error ? error.message : String(error),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=update-check.js.map
|
|
68
|
+
//# debugId=59876183-57e7-59fa-8137-5f86dac61ea5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-check.js","sources":["sdk/extension/update-check.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/extension/update-check\n *\n * Provides bounded and annotated-tag-aware update checks for managed extensions.\n */\nimport { nowIso } from \"../../core/shared/time.js\";\nimport type { ManagedExtensionSource } from \"./managed-state.js\";\nimport { runGitCommand } from \"./install-sources.js\";\n\nconst GITHUB_UPDATE_CHECK_TIMEOUT_MS = 10_000;\n\n/** Describes the remote revision health of one managed GitHub extension. */\nexport interface GithubUpdateStatus {\n /** Time at which the remote comparison completed. */\n checked_at: string;\n /** Whether the remote commit differs, or null when no comparison is possible. */\n available: boolean | null;\n /** Peeled remote commit when the selected reference resolves. */\n remote_commit?: string;\n /** Stable failure reason when the comparison is incomplete. */\n error?: string;\n}\n\n/** Compare ls-remote output with an optional installed revision baseline. */\nconst resolveGithubUpdateOutput = (\n output: string,\n installedCommitInput: string | undefined,\n checkedAt: string,\n): GithubUpdateStatus => {\n const references = output\n .split(/\\r?\\n/)\n .map((line) => line.trim())\n .filter(Boolean)\n .map((line) => {\n const [commit, ref = \"\"] = line.split(/\\s+/) as [string, string?];\n return { commit, ref };\n });\n const remoteReference =\n references.find((reference) => reference.ref.endsWith(\"^{}\")) ??\n references[0];\n if (!remoteReference) {\n return {\n checked_at: checkedAt,\n available: null,\n error: \"no_remote_reference_found\",\n };\n }\n const installedCommit = installedCommitInput?.trim();\n return installedCommit\n ? {\n checked_at: checkedAt,\n remote_commit: remoteReference.commit,\n available: remoteReference.commit !== installedCommit,\n }\n : {\n checked_at: checkedAt,\n remote_commit: remoteReference.commit,\n available: null,\n error: \"missing_installed_commit\",\n };\n};\n\n/** Compare one managed GitHub extension against its remote revision. */\nexport const checkGithubUpdate = async (\n source: ManagedExtensionSource,\n gitCommandRunner: typeof runGitCommand = runGitCommand,\n): Promise<GithubUpdateStatus> => {\n const checkedAt = nowIso();\n if (source.kind !== \"github\" || !source.repository) {\n return {\n checked_at: checkedAt,\n available: null,\n error: \"not_a_github_managed_source\",\n };\n }\n try {\n const ref = [source.ref?.trim(), \"HEAD\"].find(Boolean) as string;\n const output = await gitCommandRunner(\n [\"ls-remote\", source.repository, ref, `${ref}^{}`],\n undefined,\n GITHUB_UPDATE_CHECK_TIMEOUT_MS,\n );\n return resolveGithubUpdateOutput(output, source.commit, checkedAt);\n } catch (error: unknown) {\n return {\n checked_at: checkedAt,\n available: null,\n error: error instanceof Error ? error.message : String(error),\n };\n }\n};\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,8BAA8B,GAAG,MAAM,CAAC;AAc9C,6EAA6E;AAC7E,MAAM,yBAAyB,GAAG,CAChC,MAAc,EACd,oBAAwC,EACxC,SAAiB,EACG,EAAE;IACtB,MAAM,UAAU,GAAG,MAAM;SACtB,KAAK,CAAC,OAAO,CAAC;SACd,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CAAC,OAAO,CAAC;SACf,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACZ,MAAM,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAsB,CAAC;QAClE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;IACL,MAAM,eAAe,GACnB,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC7D,UAAU,CAAC,CAAC,CAAC,CAAC;IAChB,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO;YACL,UAAU,EAAE,SAAS;YACrB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,2BAA2B;SACnC,CAAC;IACJ,CAAC;IACD,MAAM,eAAe,GAAG,oBAAoB,EAAE,IAAI,EAAE,CAAC;IACrD,OAAO,eAAe;QACpB,CAAC,CAAC;YACE,UAAU,EAAE,SAAS;YACrB,aAAa,EAAE,eAAe,CAAC,MAAM;YACrC,SAAS,EAAE,eAAe,CAAC,MAAM,KAAK,eAAe;SACtD;QACH,CAAC,CAAC;YACE,UAAU,EAAE,SAAS;YACrB,aAAa,EAAE,eAAe,CAAC,MAAM;YACrC,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,0BAA0B;SAClC,CAAC;AACR,CAAC,CAAC;AAEF,wEAAwE;AACxE,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EACpC,MAA8B,EAC9B,mBAAyC,aAAa,EACzB,EAAE;IAC/B,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;IAC3B,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACnD,OAAO;YACL,UAAU,EAAE,SAAS;YACrB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,6BAA6B;SACrC,CAAC;IACJ,CAAC;IACD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAW,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,gBAAgB,CACnC,CAAC,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,GAAG,EAAE,GAAG,GAAG,KAAK,CAAC,EAClD,SAAS,EACT,8BAA8B,CAC/B,CAAC;QACF,OAAO,yBAAyB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACrE,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,OAAO;YACL,UAAU,EAAE,SAAS;YACrB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAC9D,CAAC;IACJ,CAAC;AACH,CAAC,CAAC","debugId":"59876183-57e7-59fa-8137-5f86dac61ea5"}
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/extension
|
|
3
|
+
*
|
|
4
|
+
* Implements the pm extension command surface and its agent-facing runtime behavior.
|
|
5
|
+
*/
|
|
6
|
+
import fs from "node:fs/promises";
|
|
7
|
+
import { activateExtensions, loadExtensions } from "../core/extensions/index.js";
|
|
8
|
+
import type { GlobalOptions } from "../core/shared/command-types.js";
|
|
9
|
+
import type { PmSettings } from "../types/index.js";
|
|
10
|
+
import { parseExtensionManifest, validateExtensionDirectory } from "./extension/shared.js";
|
|
11
|
+
import { readManagedExtensionState, writeManagedExtensionState, resolveManagedExtensionStatePath, type ManagedExtensionSource, type ManagedExtensionRecord, type ManagedExtensionState } from "./extension/managed-state.js";
|
|
12
|
+
import { parseExtensionInstallSource } from "./extension/install-sources.js";
|
|
13
|
+
import { copyExtensionDirectoryForInstall, resolveCanonicalExtensionInstallDestination } from "./extension/install-runtime.js";
|
|
14
|
+
export { parseExtensionManifest, validateExtensionDirectory, readManagedExtensionState, writeManagedExtensionState, resolveManagedExtensionStatePath, parseExtensionInstallSource, copyExtensionDirectoryForInstall, resolveCanonicalExtensionInstallDestination, };
|
|
15
|
+
export type { ManagedExtensionSource, ManagedExtensionRecord, ManagedExtensionState, };
|
|
16
|
+
export type { ManagedExtensionStateReadResult } from "./extension/managed-state.js";
|
|
17
|
+
/** Restricts extension command action values accepted by command, SDK, and storage contracts. */
|
|
18
|
+
export type ExtensionCommandAction = "install" | "uninstall" | "explore" | "manage" | "describe" | "reload" | "doctor" | "catalog" | "adopt" | "adopt-all" | "activate" | "deactivate" | "init";
|
|
19
|
+
/** Restricts extension scope values accepted by command, SDK, and storage contracts. */
|
|
20
|
+
export type ExtensionScope = "project" | "global";
|
|
21
|
+
/** Restricts extension activation status values accepted by command, SDK, and storage contracts. */
|
|
22
|
+
export type ExtensionActivationStatus = "ok" | "failed" | "not_loaded" | "unknown";
|
|
23
|
+
/** Documents the extension command options payload exchanged by command, SDK, and package integrations. */
|
|
24
|
+
export interface ExtensionCommandOptions {
|
|
25
|
+
/** Value that configures or reports install for this contract. */
|
|
26
|
+
install?: boolean;
|
|
27
|
+
/** Value that configures or reports uninstall for this contract. */
|
|
28
|
+
uninstall?: boolean;
|
|
29
|
+
/** Value that configures or reports explore for this contract. */
|
|
30
|
+
explore?: boolean;
|
|
31
|
+
/** Value that configures or reports manage for this contract. */
|
|
32
|
+
manage?: boolean;
|
|
33
|
+
/** Value that configures or reports describe for this contract. */
|
|
34
|
+
describe?: boolean;
|
|
35
|
+
/** Value that configures or reports markdown for this contract. */
|
|
36
|
+
markdown?: boolean;
|
|
37
|
+
/** Value that configures or reports output for this contract. */
|
|
38
|
+
output?: string;
|
|
39
|
+
/** Value that configures or reports reload for this contract. */
|
|
40
|
+
reload?: boolean;
|
|
41
|
+
/** Value that configures or reports doctor for this contract. */
|
|
42
|
+
doctor?: boolean;
|
|
43
|
+
/** Value that configures or reports catalog for this contract. */
|
|
44
|
+
catalog?: boolean;
|
|
45
|
+
/** Value that configures or reports init for this contract. */
|
|
46
|
+
init?: boolean;
|
|
47
|
+
/** Value that configures or reports scaffold for this contract. */
|
|
48
|
+
scaffold?: boolean;
|
|
49
|
+
/** Value that configures or reports strict exit for this contract. */
|
|
50
|
+
strictExit?: boolean;
|
|
51
|
+
/** Value that configures or reports fail on warn for this contract. */
|
|
52
|
+
failOnWarn?: boolean;
|
|
53
|
+
/** Value that configures or reports adopt for this contract. */
|
|
54
|
+
adopt?: boolean;
|
|
55
|
+
/** Value that configures or reports adopt all for this contract. */
|
|
56
|
+
adoptAll?: boolean;
|
|
57
|
+
/** Registers this package's commands, actions, and runtime hooks with the host. */
|
|
58
|
+
activate?: boolean;
|
|
59
|
+
/** Value that configures or reports deactivate for this contract. */
|
|
60
|
+
deactivate?: boolean;
|
|
61
|
+
/** Value that configures or reports project for this contract. */
|
|
62
|
+
project?: boolean;
|
|
63
|
+
/** Value that configures or reports local for this contract. */
|
|
64
|
+
local?: boolean;
|
|
65
|
+
/** Value that configures or reports global for this contract. */
|
|
66
|
+
global?: boolean;
|
|
67
|
+
/** Value that configures or reports gh for this contract. */
|
|
68
|
+
gh?: string;
|
|
69
|
+
/** Value that configures or reports github for this contract. */
|
|
70
|
+
github?: string;
|
|
71
|
+
/** Value that configures or reports ref for this contract. */
|
|
72
|
+
ref?: string;
|
|
73
|
+
/** Value that configures or reports detail for this contract. */
|
|
74
|
+
detail?: string;
|
|
75
|
+
/** Value that configures or reports trace for this contract. */
|
|
76
|
+
trace?: boolean;
|
|
77
|
+
/** Value that configures or reports watch for this contract. */
|
|
78
|
+
watch?: boolean;
|
|
79
|
+
/** Value that configures or reports runtime probe for this contract. */
|
|
80
|
+
runtimeProbe?: boolean;
|
|
81
|
+
/** Value that configures or reports fix managed state for this contract. */
|
|
82
|
+
fixManagedState?: boolean;
|
|
83
|
+
/** Value that configures or reports isolated for this contract. */
|
|
84
|
+
isolated?: boolean;
|
|
85
|
+
/** Value that configures or reports ignore global for this contract. */
|
|
86
|
+
ignoreGlobal?: boolean;
|
|
87
|
+
/** Value that configures or reports fields for this contract. */
|
|
88
|
+
fields?: string;
|
|
89
|
+
/** Value that configures or reports capability for this contract. */
|
|
90
|
+
capability?: string;
|
|
91
|
+
/** Value that configures or reports declarative for this contract. */
|
|
92
|
+
declarative?: boolean;
|
|
93
|
+
/** Value that configures or reports vocabulary for this contract. */
|
|
94
|
+
vocabulary?: "extension" | "package";
|
|
95
|
+
}
|
|
96
|
+
/** Documents the managed extension summary payload exchanged by command, SDK, and package integrations. */
|
|
97
|
+
export interface ManagedExtensionSummary {
|
|
98
|
+
/** Value that configures or reports name for this contract. */
|
|
99
|
+
name: string;
|
|
100
|
+
/** Value that configures or reports directory for this contract. */
|
|
101
|
+
directory: string;
|
|
102
|
+
/** Value that configures or reports version for this contract. */
|
|
103
|
+
version: string;
|
|
104
|
+
/** Value that configures or reports entry for this contract. */
|
|
105
|
+
entry: string;
|
|
106
|
+
/** Value that configures or reports scope for this contract. */
|
|
107
|
+
scope: ExtensionScope;
|
|
108
|
+
/** Value that configures or reports active for this contract. */
|
|
109
|
+
active: boolean;
|
|
110
|
+
/** Whether enabled applies to this operation. */
|
|
111
|
+
enabled: boolean;
|
|
112
|
+
/** Value that configures or reports runtime active for this contract. */
|
|
113
|
+
runtime_active: boolean | null;
|
|
114
|
+
/** Lifecycle state reported for activationthe record. */
|
|
115
|
+
activation_status: ExtensionActivationStatus;
|
|
116
|
+
/** Value that configures or reports command paths for this contract. */
|
|
117
|
+
command_paths?: string[];
|
|
118
|
+
/** Value that configures or reports action paths for this contract. */
|
|
119
|
+
action_paths?: string[];
|
|
120
|
+
/** Value that configures or reports managed for this contract. */
|
|
121
|
+
managed: boolean;
|
|
122
|
+
/** Value that configures or reports source for this contract. */
|
|
123
|
+
source?: ManagedExtensionSource;
|
|
124
|
+
/** Value that configures or reports update available for this contract. */
|
|
125
|
+
update_available?: boolean | null;
|
|
126
|
+
/** ISO 8601 timestamp recording when last update check occurred. */
|
|
127
|
+
last_update_check_at?: string;
|
|
128
|
+
/** Value that configures or reports last update remote commit for this contract. */
|
|
129
|
+
last_update_remote_commit?: string;
|
|
130
|
+
/** Value that configures or reports update error for this contract. */
|
|
131
|
+
update_error?: string;
|
|
132
|
+
/** Lifecycle state reported for update checkthe record. */
|
|
133
|
+
update_check_status: ExtensionUpdateCheckStatus;
|
|
134
|
+
/** Value that configures or reports update check reason for this contract. */
|
|
135
|
+
update_check_reason: string;
|
|
136
|
+
}
|
|
137
|
+
/** Documents the extension command result payload exchanged by command, SDK, and package integrations. */
|
|
138
|
+
export interface ExtensionCommandResult {
|
|
139
|
+
/** Whether the operation completed without a blocking failure. */
|
|
140
|
+
ok: boolean;
|
|
141
|
+
/** Value that configures or reports action for this contract. */
|
|
142
|
+
action: ExtensionCommandAction;
|
|
143
|
+
/** Value that configures or reports scope for this contract. */
|
|
144
|
+
scope: ExtensionScope;
|
|
145
|
+
/** Value that configures or reports roots for this contract. */
|
|
146
|
+
roots: {
|
|
147
|
+
project: string;
|
|
148
|
+
global: string;
|
|
149
|
+
selected: string;
|
|
150
|
+
settings_root: string;
|
|
151
|
+
};
|
|
152
|
+
/** Value that configures or reports warnings for this contract. */
|
|
153
|
+
warnings: string[];
|
|
154
|
+
/** Value that configures or reports details for this contract. */
|
|
155
|
+
details: Record<string, unknown>;
|
|
156
|
+
}
|
|
157
|
+
/** Documents the extension triage summary payload exchanged by command, SDK, and package integrations. */
|
|
158
|
+
export interface ExtensionTriageSummary {
|
|
159
|
+
/** Lifecycle state reported for status. */
|
|
160
|
+
status: "ok" | "warn";
|
|
161
|
+
/** Number of warning entries represented by this result. */
|
|
162
|
+
warning_count: number;
|
|
163
|
+
/** Value that configures or reports warning codes for this contract. */
|
|
164
|
+
warning_codes: string[];
|
|
165
|
+
/** Value that configures or reports warnings for this contract. */
|
|
166
|
+
warnings: string[];
|
|
167
|
+
/** Number of policy warning entries represented by this result. */
|
|
168
|
+
policy_warning_count: number;
|
|
169
|
+
/** Number of policy violation entries represented by this result. */
|
|
170
|
+
policy_violation_count: number;
|
|
171
|
+
/** Number of policy blocked entries represented by this result. */
|
|
172
|
+
policy_blocked_count: number;
|
|
173
|
+
/** Value that configures or reports total extensions for this contract. */
|
|
174
|
+
total_extensions: number;
|
|
175
|
+
/** Value that configures or reports managed total for this contract. */
|
|
176
|
+
managed_total: number;
|
|
177
|
+
/** Value that configures or reports enabled total for this contract. */
|
|
178
|
+
enabled_total: number;
|
|
179
|
+
/** Value that configures or reports active total for this contract. */
|
|
180
|
+
active_total: number;
|
|
181
|
+
/** Value that configures or reports update available total for this contract. */
|
|
182
|
+
update_available_total: number;
|
|
183
|
+
/** Value that configures or reports update health coverage for this contract. */
|
|
184
|
+
update_health_coverage: "full" | "partial";
|
|
185
|
+
/** Value that configures or reports update health partial for this contract. */
|
|
186
|
+
update_health_partial: boolean;
|
|
187
|
+
/** Number of unmanaged loaded extension entries represented by this result. */
|
|
188
|
+
unmanaged_loaded_extension_count: number;
|
|
189
|
+
/** Value that configures or reports unmanaged loaded extensions for this contract. */
|
|
190
|
+
unmanaged_loaded_extensions: string[];
|
|
191
|
+
/** Number of unmanaged expected extension entries represented by this result. */
|
|
192
|
+
unmanaged_expected_extension_count: number;
|
|
193
|
+
/** Value that configures or reports unmanaged expected extensions for this contract. */
|
|
194
|
+
unmanaged_expected_extensions: string[];
|
|
195
|
+
/** Number of unmanaged action required extension entries represented by this result. */
|
|
196
|
+
unmanaged_action_required_extension_count: number;
|
|
197
|
+
/** Value that configures or reports unmanaged action required extensions for this contract. */
|
|
198
|
+
unmanaged_action_required_extensions: string[];
|
|
199
|
+
/** Value that configures or reports update check status totals for this contract. */
|
|
200
|
+
update_check_status_totals: Record<ExtensionUpdateCheckStatus, number>;
|
|
201
|
+
/** Value that configures or reports update check failed total for this contract. */
|
|
202
|
+
update_check_failed_total: number;
|
|
203
|
+
/** Value that configures or reports top warnings for this contract. */
|
|
204
|
+
top_warnings: string[];
|
|
205
|
+
/** Value that configures or reports remediation for this contract. */
|
|
206
|
+
remediation: string[];
|
|
207
|
+
/** Value that configures or reports collision plan for this contract. */
|
|
208
|
+
collision_plan?: ExtensionCollisionPlan;
|
|
209
|
+
}
|
|
210
|
+
/** Documents the extension collision plan payload exchanged by command, SDK, and package integrations. */
|
|
211
|
+
export interface ExtensionCollisionPlan {
|
|
212
|
+
/** Lifecycle state reported for status. */
|
|
213
|
+
status: "ok" | "conflicts_detected";
|
|
214
|
+
/** Number of collision entries represented by this result. */
|
|
215
|
+
collision_count: number;
|
|
216
|
+
/** Number of extension entries represented by this result. */
|
|
217
|
+
extension_count: number;
|
|
218
|
+
/** Value that configures or reports next best command for this contract. */
|
|
219
|
+
next_best_command: string;
|
|
220
|
+
/** Value that configures or reports collisions for this contract. */
|
|
221
|
+
collisions: Array<{
|
|
222
|
+
code: string;
|
|
223
|
+
surface: string;
|
|
224
|
+
winner: {
|
|
225
|
+
layer: ExtensionScope;
|
|
226
|
+
name: string;
|
|
227
|
+
};
|
|
228
|
+
displaced: {
|
|
229
|
+
layer: ExtensionScope;
|
|
230
|
+
name: string;
|
|
231
|
+
};
|
|
232
|
+
}>;
|
|
233
|
+
/** Value that configures or reports remediation candidates for this contract. */
|
|
234
|
+
remediation_candidates: Array<{
|
|
235
|
+
action: "deactivate";
|
|
236
|
+
extension: string;
|
|
237
|
+
command: string;
|
|
238
|
+
affected_collisions: number;
|
|
239
|
+
feature_loss: {
|
|
240
|
+
command_paths: string[];
|
|
241
|
+
action_paths: string[];
|
|
242
|
+
};
|
|
243
|
+
}>;
|
|
244
|
+
}
|
|
245
|
+
/** Restricts extension update check status values accepted by command, SDK, and storage contracts. */
|
|
246
|
+
export type ExtensionUpdateCheckStatus = "checked" | "skipped_unmanaged" | "skipped_non_github" | "failed" | "not_checked";
|
|
247
|
+
interface ExtensionUpdateCheckResolution {
|
|
248
|
+
status: ExtensionUpdateCheckStatus;
|
|
249
|
+
reason: string;
|
|
250
|
+
}
|
|
251
|
+
/** Restricts extension doctor detail mode values accepted by command, SDK, and storage contracts. */
|
|
252
|
+
export type ExtensionDoctorDetailMode = "summary" | "deep";
|
|
253
|
+
interface ExtensionPolicyOverrideDetails {
|
|
254
|
+
name: string;
|
|
255
|
+
disabled?: boolean;
|
|
256
|
+
require_trusted?: boolean;
|
|
257
|
+
require_provenance?: boolean;
|
|
258
|
+
sandbox_profile?: "none" | "restricted" | "strict";
|
|
259
|
+
allowed_capabilities?: string[];
|
|
260
|
+
blocked_capabilities?: string[];
|
|
261
|
+
allowed_surfaces?: string[];
|
|
262
|
+
blocked_surfaces?: string[];
|
|
263
|
+
allowed_commands?: string[];
|
|
264
|
+
blocked_commands?: string[];
|
|
265
|
+
allowed_actions?: string[];
|
|
266
|
+
blocked_actions?: string[];
|
|
267
|
+
allowed_services?: string[];
|
|
268
|
+
blocked_services?: string[];
|
|
269
|
+
}
|
|
270
|
+
interface ExtensionPolicyDetails {
|
|
271
|
+
mode: "off" | "warn" | "enforce";
|
|
272
|
+
trust_mode: "off" | "warn" | "enforce";
|
|
273
|
+
require_provenance: boolean;
|
|
274
|
+
trusted_extensions: string[];
|
|
275
|
+
default_sandbox_profile: "none" | "restricted" | "strict";
|
|
276
|
+
allowed_extensions: string[];
|
|
277
|
+
blocked_extensions: string[];
|
|
278
|
+
allowed_capabilities: string[];
|
|
279
|
+
blocked_capabilities: string[];
|
|
280
|
+
allowed_surfaces: string[];
|
|
281
|
+
blocked_surfaces: string[];
|
|
282
|
+
allowed_commands: string[];
|
|
283
|
+
blocked_commands: string[];
|
|
284
|
+
allowed_actions: string[];
|
|
285
|
+
blocked_actions: string[];
|
|
286
|
+
allowed_services: string[];
|
|
287
|
+
blocked_services: string[];
|
|
288
|
+
extension_overrides: ExtensionPolicyOverrideDetails[];
|
|
289
|
+
}
|
|
290
|
+
type ActivationFailureEntry = Awaited<ReturnType<typeof activateExtensions>>["failed"][number];
|
|
291
|
+
interface ActivationFailureDiagnostic {
|
|
292
|
+
layer: string;
|
|
293
|
+
name: string;
|
|
294
|
+
entry_path: string;
|
|
295
|
+
error: string;
|
|
296
|
+
missing_capability?: string;
|
|
297
|
+
hint?: string;
|
|
298
|
+
trace?: {
|
|
299
|
+
method: string;
|
|
300
|
+
registration_index: number;
|
|
301
|
+
expected_schema: string;
|
|
302
|
+
command?: string;
|
|
303
|
+
capability?: string;
|
|
304
|
+
missing_capability?: string;
|
|
305
|
+
hint?: string;
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
interface AdoptedUnmanagedExtension {
|
|
309
|
+
name: string;
|
|
310
|
+
directory: string;
|
|
311
|
+
version: string;
|
|
312
|
+
entry: string;
|
|
313
|
+
source: ManagedExtensionSource;
|
|
314
|
+
}
|
|
315
|
+
interface AdoptUnmanagedExtensionsResult {
|
|
316
|
+
state: ManagedExtensionState;
|
|
317
|
+
adopted_entries: AdoptedUnmanagedExtension[];
|
|
318
|
+
unmanaged_candidates: ManagedExtensionSummary[];
|
|
319
|
+
already_managed_count: number;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Entry point for the `pm extension` / `pm package` command surface. Resolves the
|
|
323
|
+
* requested lifecycle action and scope, rejects out-of-scope option usage,
|
|
324
|
+
* normalizes positional aliases, then dispatches to the matching action handler —
|
|
325
|
+
* each of which reads and writes managed-extension state, runtime-probes, and
|
|
326
|
+
* returns the canonical {@link ExtensionCommandResult}. `--doctor` results are
|
|
327
|
+
* flagged for native (non-JSON-wrapped) output.
|
|
328
|
+
*/
|
|
329
|
+
export declare const runExtension: (target: string | undefined, options: ExtensionCommandOptions, global: GlobalOptions) => Promise<ExtensionCommandResult>;
|
|
330
|
+
/** Public contract for test only, shared by SDK and presentation-layer consumers. */
|
|
331
|
+
export declare const _testOnly: {
|
|
332
|
+
adoptUnmanagedExtensions: (extensionsRoot: string, scope: ExtensionScope, installedExtensions: ManagedExtensionSummary[], state: ManagedExtensionState) => Promise<AdoptUnmanagedExtensionsResult>;
|
|
333
|
+
buildAdoptedExtensionSource: (githubOption: string | undefined, extensionTarget: string, extensionDirectory: string, ref: string | undefined) => ManagedExtensionSource;
|
|
334
|
+
buildExtensionPolicyDetails: (policy: PmSettings["extensions"]["policy"] | null | undefined) => ExtensionPolicyDetails;
|
|
335
|
+
buildInstallCommandDiscovery: (extensionName: string, source: ManagedExtensionSource, commandSummary: {
|
|
336
|
+
command_paths: string[];
|
|
337
|
+
action_paths: string[];
|
|
338
|
+
}, activationFailure?: ActivationFailureDiagnostic) => Record<string, unknown>;
|
|
339
|
+
checkGithubUpdate: (source: ManagedExtensionSource, gitCommandRunner?: typeof import("./extension/install-sources.js").runGitCommand) => Promise<import("./extension/update-check.js").GithubUpdateStatus>;
|
|
340
|
+
clearExtensionState: (settings: PmSettings, name: string) => boolean;
|
|
341
|
+
collectActivationFailureDiagnostics: (failures: ActivationFailureEntry[]) => ActivationFailureDiagnostic[];
|
|
342
|
+
findActivationFailureByName: (extensionName: string, failures: ActivationFailureDiagnostic[], layer?: ExtensionScope) => ActivationFailureDiagnostic | undefined;
|
|
343
|
+
resolveInstallRuntimeActivationStatus: (extensionName: string, scope: ExtensionScope, runtimeInstalled: ManagedExtensionSummary[], installActivationFailure: ActivationFailureDiagnostic | undefined) => ExtensionActivationStatus;
|
|
344
|
+
collectGlobalOutputOverrideDoctorWarnings: (activationResult: Awaited<ReturnType<typeof activateExtensions>>) => string[];
|
|
345
|
+
collectSchemaNarrowActivationDoctorWarnings: (loadResult: Awaited<ReturnType<typeof loadExtensions>>, activationResult: Awaited<ReturnType<typeof activateExtensions>>) => string[];
|
|
346
|
+
copyExtensionDirectoryWithoutSelfNesting: (sourceDirectory: string, destinationDirectory: string, copyDirectory: typeof fs.cp, temporaryDirectory?: string) => Promise<void>;
|
|
347
|
+
isErrnoCode: (error: unknown, code: string) => boolean;
|
|
348
|
+
isRetriableExtensionInstallCopyError: (error: unknown) => boolean;
|
|
349
|
+
listInstalledExtensions: (extensionsRoot: string, scope: ExtensionScope, settings: PmSettings, state: ManagedExtensionState) => Promise<{
|
|
350
|
+
extensions: ManagedExtensionSummary[];
|
|
351
|
+
warnings: string[];
|
|
352
|
+
}>;
|
|
353
|
+
mapWithFixedConcurrency: <Input, Output>(inputs: Input[], concurrency: number, mapper: (input: Input) => Promise<Output>) => Promise<Output[]>;
|
|
354
|
+
projectExtensionUpdateCheck: (entry: ManagedExtensionSummary | undefined) => {
|
|
355
|
+
update_check_status: string | null;
|
|
356
|
+
update_check_reason: string | null;
|
|
357
|
+
};
|
|
358
|
+
readOptionalMetadataFile: (filePath: string) => Promise<Buffer | null>;
|
|
359
|
+
requireTarget: (target: string | undefined, action: ExtensionCommandAction, options?: ExtensionCommandOptions) => string;
|
|
360
|
+
resolveAction: (target: string | undefined, options: ExtensionCommandOptions) => ExtensionCommandAction;
|
|
361
|
+
resolveCommandDiscoveryPackageName: (extensionName: string, source: ManagedExtensionSource) => string;
|
|
362
|
+
resolveGithubOption: (options: ExtensionCommandOptions) => string | undefined;
|
|
363
|
+
resolveInstalledExtensionCandidate: (installed: ManagedExtensionSummary[], extensionTarget: string) => Promise<ManagedExtensionSummary | undefined>;
|
|
364
|
+
resolveScope: (options: ExtensionCommandOptions) => ExtensionScope;
|
|
365
|
+
resolveUpdateCheckResolution: (managedEntry: ManagedExtensionRecord | undefined) => ExtensionUpdateCheckResolution;
|
|
366
|
+
withExtensionInstallLock: <T>(settingsRoot: string, destinationDirectoryName: string, run: () => Promise<T>, options?: import("./extension/install-runtime.js").ExtensionInstallLockOptions) => Promise<T>;
|
|
367
|
+
};
|