@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
|
@@ -1,858 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f08e76cd-55b1-531a-816a-79f021acbe1b")}catch(e){}}();
|
|
3
|
-
import {
|
|
4
|
-
resolveSubcommandFlagContractsForCommand
|
|
5
|
-
} from "./chunk-N3CMP4NI.js";
|
|
6
|
-
import {
|
|
7
|
-
DEFAULT_EXTENSION_PRIORITY,
|
|
8
|
-
EXIT_CODE,
|
|
9
|
-
PmCliError,
|
|
10
|
-
isCanonicalPathWithinDirectory,
|
|
11
|
-
isPathWithinDirectory,
|
|
12
|
-
levenshteinDistanceWithinLimit,
|
|
13
|
-
pathExists
|
|
14
|
-
} from "./chunk-GXXC7QSK.js";
|
|
15
|
-
|
|
16
|
-
// dist/cli/argv-utils.js
|
|
17
|
-
function normalizeLongFlag(flag) {
|
|
18
|
-
return `--${flag.replace(/^--?/, "").replace(/_/g, "-").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
|
|
19
|
-
}
|
|
20
|
-
function normalizeLongOptionFlag(token) {
|
|
21
|
-
if (!token.startsWith("--")) {
|
|
22
|
-
return void 0;
|
|
23
|
-
}
|
|
24
|
-
const key = token.includes("=") ? token.slice(0, token.indexOf("=")) : token;
|
|
25
|
-
return normalizeLongFlag(key);
|
|
26
|
-
}
|
|
27
|
-
function extractProvidedOptionFlags(argv) {
|
|
28
|
-
const provided = /* @__PURE__ */ new Set();
|
|
29
|
-
const ordered = [];
|
|
30
|
-
for (const token of argv) {
|
|
31
|
-
const normalized = normalizeLongOptionFlag(token);
|
|
32
|
-
if (normalized) {
|
|
33
|
-
if (!provided.has(normalized)) {
|
|
34
|
-
ordered.push(normalized);
|
|
35
|
-
}
|
|
36
|
-
provided.add(normalized);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return ordered;
|
|
40
|
-
}
|
|
41
|
-
function quoteCommandArg(arg) {
|
|
42
|
-
if (/^[A-Za-z0-9._:/@=-]+$/.test(arg)) {
|
|
43
|
-
return arg;
|
|
44
|
-
}
|
|
45
|
-
return `"${arg.replace(/(["\\$`])/g, "\\$1")}"`;
|
|
46
|
-
}
|
|
47
|
-
function renderPmCommand(argv) {
|
|
48
|
-
return `pm ${argv.map((token) => quoteCommandArg(token)).join(" ")}`;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// dist/cli/bootstrap-args.js
|
|
52
|
-
function parseBootstrapPathToken(token, next) {
|
|
53
|
-
if (token === "--path" || token === "--pm-path") {
|
|
54
|
-
if (typeof next === "string" && next.length > 0) {
|
|
55
|
-
return {
|
|
56
|
-
consumed: 2,
|
|
57
|
-
pathValue: next,
|
|
58
|
-
preferred: token === "--pm-path"
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
consumed: 1,
|
|
63
|
-
preferred: token === "--pm-path"
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
const inlinePrefix = token.startsWith("--path=") ? "--path=" : token.startsWith("--pm-path=") ? "--pm-path=" : void 0;
|
|
67
|
-
if (!inlinePrefix) {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
const value = token.slice(inlinePrefix.length);
|
|
71
|
-
if (value.length > 0) {
|
|
72
|
-
return {
|
|
73
|
-
consumed: 1,
|
|
74
|
-
pathValue: value,
|
|
75
|
-
preferred: inlinePrefix === "--pm-path="
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
return {
|
|
79
|
-
consumed: 1,
|
|
80
|
-
preferred: inlinePrefix === "--pm-path="
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
function parseBootstrapGlobalOptions(argv) {
|
|
84
|
-
let legacyPathValue;
|
|
85
|
-
let pmPathValue;
|
|
86
|
-
let noExtensions = false;
|
|
87
|
-
let noPager = false;
|
|
88
|
-
let json = false;
|
|
89
|
-
let quiet = false;
|
|
90
|
-
let index = 0;
|
|
91
|
-
while (index < argv.length) {
|
|
92
|
-
const token = argv[index];
|
|
93
|
-
if (token === "--") {
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
if (token === "--no-extensions") {
|
|
97
|
-
noExtensions = true;
|
|
98
|
-
index += 1;
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
if (token === "--no-pager") {
|
|
102
|
-
noPager = true;
|
|
103
|
-
index += 1;
|
|
104
|
-
continue;
|
|
105
|
-
}
|
|
106
|
-
if (token === "--json") {
|
|
107
|
-
json = true;
|
|
108
|
-
index += 1;
|
|
109
|
-
continue;
|
|
110
|
-
}
|
|
111
|
-
if (token === "--quiet") {
|
|
112
|
-
quiet = true;
|
|
113
|
-
index += 1;
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
const parsedPath = parseBootstrapPathToken(token, argv[index + 1]);
|
|
117
|
-
if (parsedPath) {
|
|
118
|
-
if (parsedPath.pathValue !== void 0) {
|
|
119
|
-
if (parsedPath.preferred) {
|
|
120
|
-
pmPathValue = parsedPath.pathValue;
|
|
121
|
-
} else {
|
|
122
|
-
legacyPathValue = parsedPath.pathValue;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
index += parsedPath.consumed;
|
|
126
|
-
continue;
|
|
127
|
-
}
|
|
128
|
-
index += 1;
|
|
129
|
-
}
|
|
130
|
-
return {
|
|
131
|
-
path: pmPathValue ?? legacyPathValue,
|
|
132
|
-
noExtensions,
|
|
133
|
-
noPager,
|
|
134
|
-
json,
|
|
135
|
-
quiet
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
function stripGlobalBootstrapTokens(argv) {
|
|
139
|
-
const remaining = [];
|
|
140
|
-
let index = 0;
|
|
141
|
-
while (index < argv.length) {
|
|
142
|
-
const token = argv[index];
|
|
143
|
-
if (token === "--") {
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
if (token === "--json" || token === "--quiet" || token === "--no-extensions" || token === "--no-pager" || token === "--profile" || token === "--id-only" || token === "--explain") {
|
|
147
|
-
index += 1;
|
|
148
|
-
continue;
|
|
149
|
-
}
|
|
150
|
-
if (token === "--path" || token === "--pm-path") {
|
|
151
|
-
index += 2;
|
|
152
|
-
continue;
|
|
153
|
-
}
|
|
154
|
-
if (token.startsWith("--path=") || token.startsWith("--pm-path=")) {
|
|
155
|
-
index += 1;
|
|
156
|
-
continue;
|
|
157
|
-
}
|
|
158
|
-
remaining.push(token);
|
|
159
|
-
index += 1;
|
|
160
|
-
}
|
|
161
|
-
return remaining;
|
|
162
|
-
}
|
|
163
|
-
function parseBootstrapHelpRequest(argv) {
|
|
164
|
-
const stripped = stripGlobalBootstrapTokens(argv);
|
|
165
|
-
const first = stripped[0]?.trim().toLowerCase();
|
|
166
|
-
if (first === "help") {
|
|
167
|
-
const commandPathTokens2 = [];
|
|
168
|
-
for (let index = 1; index < stripped.length; index += 1) {
|
|
169
|
-
const token = stripped[index];
|
|
170
|
-
if (token.startsWith("-")) {
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
173
|
-
commandPathTokens2.push(token.trim().toLowerCase());
|
|
174
|
-
}
|
|
175
|
-
return {
|
|
176
|
-
requested: true,
|
|
177
|
-
commandPathTokens: commandPathTokens2
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
const helpFlagIndex = stripped.findIndex((token) => token === "--help" || token === "-h");
|
|
181
|
-
if (helpFlagIndex < 0) {
|
|
182
|
-
return {
|
|
183
|
-
requested: false,
|
|
184
|
-
commandPathTokens: []
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
const commandPathTokens = [];
|
|
188
|
-
for (const token of stripped) {
|
|
189
|
-
if (token.startsWith("-")) {
|
|
190
|
-
break;
|
|
191
|
-
}
|
|
192
|
-
commandPathTokens.push(token.trim().toLowerCase());
|
|
193
|
-
}
|
|
194
|
-
return {
|
|
195
|
-
requested: true,
|
|
196
|
-
commandPathTokens
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
function findCommandTokenIndex(argv) {
|
|
200
|
-
for (let index = 0; index < argv.length; index += 1) {
|
|
201
|
-
const token = argv[index];
|
|
202
|
-
if (token === "--") {
|
|
203
|
-
return void 0;
|
|
204
|
-
}
|
|
205
|
-
if (token === "--path" || token === "--pm-path") {
|
|
206
|
-
index += 1;
|
|
207
|
-
continue;
|
|
208
|
-
}
|
|
209
|
-
if (token.startsWith("--path=") || token.startsWith("--pm-path=") || token === "--json" || token === "--quiet" || token === "--no-extensions" || token === "--no-pager" || token === "--profile" || token === "--id-only" || token === "--explain") {
|
|
210
|
-
continue;
|
|
211
|
-
}
|
|
212
|
-
if (token.startsWith("-")) {
|
|
213
|
-
continue;
|
|
214
|
-
}
|
|
215
|
-
return index;
|
|
216
|
-
}
|
|
217
|
-
return void 0;
|
|
218
|
-
}
|
|
219
|
-
function parseBootstrapCommandName(argv) {
|
|
220
|
-
const index = findCommandTokenIndex(argv);
|
|
221
|
-
return index === void 0 ? void 0 : argv[index].trim().toLowerCase();
|
|
222
|
-
}
|
|
223
|
-
function shouldDisablePagerForInvocation(argv, bootstrapGlobal) {
|
|
224
|
-
if (bootstrapGlobal.noPager) {
|
|
225
|
-
return true;
|
|
226
|
-
}
|
|
227
|
-
if (process.stdout.isTTY === true) {
|
|
228
|
-
return false;
|
|
229
|
-
}
|
|
230
|
-
const helpRequest = parseBootstrapHelpRequest(argv);
|
|
231
|
-
return helpRequest.requested;
|
|
232
|
-
}
|
|
233
|
-
function applyBootstrapPagerPolicy(argv) {
|
|
234
|
-
const bootstrapGlobal = parseBootstrapGlobalOptions(argv);
|
|
235
|
-
if (!shouldDisablePagerForInvocation(argv, bootstrapGlobal)) {
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
process.env.PAGER = "cat";
|
|
239
|
-
process.env.MANPAGER = "cat";
|
|
240
|
-
process.env.GIT_PAGER = "cat";
|
|
241
|
-
if (typeof process.env.LESS !== "string" || process.env.LESS.trim().length === 0) {
|
|
242
|
-
process.env.LESS = "FRX";
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
var EXTENSION_ACTION_SYNTAX_TOKENS = /* @__PURE__ */ new Set([
|
|
246
|
-
"install",
|
|
247
|
-
"uninstall",
|
|
248
|
-
"explore",
|
|
249
|
-
"manage",
|
|
250
|
-
"doctor",
|
|
251
|
-
"adopt",
|
|
252
|
-
"adopt-all",
|
|
253
|
-
"activate",
|
|
254
|
-
"deactivate"
|
|
255
|
-
]);
|
|
256
|
-
function normalizeLegacyExtensionActionSyntax(argv) {
|
|
257
|
-
const extensionIndex = argv.findIndex((token) => token === "extension");
|
|
258
|
-
if (extensionIndex < 0) {
|
|
259
|
-
return [...argv];
|
|
260
|
-
}
|
|
261
|
-
const actionToken = argv[extensionIndex + 1];
|
|
262
|
-
if (!actionToken || actionToken.startsWith("-")) {
|
|
263
|
-
return [...argv];
|
|
264
|
-
}
|
|
265
|
-
if (!EXTENSION_ACTION_SYNTAX_TOKENS.has(actionToken)) {
|
|
266
|
-
return [...argv];
|
|
267
|
-
}
|
|
268
|
-
if (argv.includes("--help") || argv.includes("-h")) {
|
|
269
|
-
return [...argv];
|
|
270
|
-
}
|
|
271
|
-
const forcedActionFlag = `--${actionToken}`;
|
|
272
|
-
if (argv.includes(forcedActionFlag)) {
|
|
273
|
-
return [...argv];
|
|
274
|
-
}
|
|
275
|
-
return [
|
|
276
|
-
...argv.slice(0, extensionIndex + 1),
|
|
277
|
-
forcedActionFlag,
|
|
278
|
-
...argv.slice(extensionIndex + 2)
|
|
279
|
-
];
|
|
280
|
-
}
|
|
281
|
-
var EXECUTABLE_COMMAND_ALIASES = {
|
|
282
|
-
show: "get",
|
|
283
|
-
view: "get",
|
|
284
|
-
comment: "comments",
|
|
285
|
-
note: "notes",
|
|
286
|
-
learning: "learnings"
|
|
287
|
-
};
|
|
288
|
-
function rewriteCommandAlias(argv, trace) {
|
|
289
|
-
const index = findCommandTokenIndex(argv);
|
|
290
|
-
if (index === void 0) {
|
|
291
|
-
return argv;
|
|
292
|
-
}
|
|
293
|
-
const token = argv[index];
|
|
294
|
-
const canonical = EXECUTABLE_COMMAND_ALIASES[token.trim().toLowerCase()];
|
|
295
|
-
if (!canonical) {
|
|
296
|
-
return argv;
|
|
297
|
-
}
|
|
298
|
-
const rewritten = [...argv];
|
|
299
|
-
rewritten[index] = canonical;
|
|
300
|
-
trace.push({
|
|
301
|
-
from: token,
|
|
302
|
-
to: [canonical],
|
|
303
|
-
reason: "command_alias",
|
|
304
|
-
confidence: "high"
|
|
305
|
-
});
|
|
306
|
-
return rewritten;
|
|
307
|
-
}
|
|
308
|
-
function normalizeFlagKeyToken(raw) {
|
|
309
|
-
const withoutPrefix = raw.replace(/^--?/, "");
|
|
310
|
-
return withoutPrefix.replace(/_/g, "-").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
311
|
-
}
|
|
312
|
-
function toComparableFlagKey(raw) {
|
|
313
|
-
return normalizeFlagKeyToken(raw).replace(/-/g, "");
|
|
314
|
-
}
|
|
315
|
-
function markUnambiguousFlag(map, key, canonicalFlag) {
|
|
316
|
-
const existing = map.get(key);
|
|
317
|
-
if (existing === void 0) {
|
|
318
|
-
map.set(key, canonicalFlag);
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
if (existing !== canonicalFlag) {
|
|
322
|
-
map.set(key, null);
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
function collectLongFlagCandidates(contract) {
|
|
326
|
-
const candidates = [];
|
|
327
|
-
const pushLongFlag = (value) => {
|
|
328
|
-
if (typeof value !== "string") {
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
if (!value.startsWith("--")) {
|
|
332
|
-
return;
|
|
333
|
-
}
|
|
334
|
-
candidates.push(value);
|
|
335
|
-
};
|
|
336
|
-
pushLongFlag(contract.flag);
|
|
337
|
-
for (const alias of contract.aliases ?? []) {
|
|
338
|
-
pushLongFlag(alias);
|
|
339
|
-
}
|
|
340
|
-
return candidates;
|
|
341
|
-
}
|
|
342
|
-
function buildFlagLookup(commandName, contractsOverride) {
|
|
343
|
-
const contracts = contractsOverride ?? resolveSubcommandFlagContractsForCommand(commandName);
|
|
344
|
-
const canonicalByNormalized = /* @__PURE__ */ new Map();
|
|
345
|
-
const canonicalByCompact = /* @__PURE__ */ new Map();
|
|
346
|
-
const canonicalComparablesMap = /* @__PURE__ */ new Map();
|
|
347
|
-
const listCanonicalFlags = /* @__PURE__ */ new Set();
|
|
348
|
-
for (const contract of contracts) {
|
|
349
|
-
const longCandidates = collectLongFlagCandidates(contract);
|
|
350
|
-
if (longCandidates.length === 0) {
|
|
351
|
-
continue;
|
|
352
|
-
}
|
|
353
|
-
const canonicalFlag = `--${normalizeFlagKeyToken(longCandidates[0])}`;
|
|
354
|
-
for (const candidate of longCandidates) {
|
|
355
|
-
markUnambiguousFlag(canonicalByNormalized, normalizeFlagKeyToken(candidate), canonicalFlag);
|
|
356
|
-
markUnambiguousFlag(canonicalByCompact, toComparableFlagKey(candidate), canonicalFlag);
|
|
357
|
-
}
|
|
358
|
-
const comparable = toComparableFlagKey(canonicalFlag);
|
|
359
|
-
if (!canonicalComparablesMap.has(canonicalFlag)) {
|
|
360
|
-
canonicalComparablesMap.set(canonicalFlag, comparable);
|
|
361
|
-
}
|
|
362
|
-
if (contract.list === true) {
|
|
363
|
-
listCanonicalFlags.add(canonicalFlag);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
return {
|
|
367
|
-
canonicalByNormalized,
|
|
368
|
-
canonicalByCompact,
|
|
369
|
-
canonicalComparables: [...canonicalComparablesMap.entries()].map(([canonicalFlag, comparable]) => ({
|
|
370
|
-
canonicalFlag,
|
|
371
|
-
comparable
|
|
372
|
-
})),
|
|
373
|
-
listCanonicalFlags
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
function resolveCanonicalFlag(rawKey, lookup) {
|
|
377
|
-
const normalizedKey = normalizeFlagKeyToken(rawKey);
|
|
378
|
-
const direct = lookup.canonicalByNormalized.get(normalizedKey);
|
|
379
|
-
if (typeof direct === "string") {
|
|
380
|
-
return {
|
|
381
|
-
flag: direct,
|
|
382
|
-
reason: "flag_alias",
|
|
383
|
-
confidence: "high"
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
const comparableKey = normalizedKey.replace(/-/g, "");
|
|
387
|
-
const compactMatch = lookup.canonicalByCompact.get(comparableKey);
|
|
388
|
-
if (typeof compactMatch === "string") {
|
|
389
|
-
return {
|
|
390
|
-
flag: compactMatch,
|
|
391
|
-
reason: "flag_alias",
|
|
392
|
-
confidence: "high"
|
|
393
|
-
};
|
|
394
|
-
}
|
|
395
|
-
const maxDistance = comparableKey.length >= 8 ? 2 : 1;
|
|
396
|
-
let bestDistance = Number.POSITIVE_INFINITY;
|
|
397
|
-
let bestFlag;
|
|
398
|
-
let tied = false;
|
|
399
|
-
for (const candidate of lookup.canonicalComparables) {
|
|
400
|
-
const distance = levenshteinDistanceWithinLimit(comparableKey, candidate.comparable, maxDistance);
|
|
401
|
-
if (distance === null) {
|
|
402
|
-
continue;
|
|
403
|
-
}
|
|
404
|
-
if (distance < bestDistance) {
|
|
405
|
-
bestDistance = distance;
|
|
406
|
-
bestFlag = candidate.canonicalFlag;
|
|
407
|
-
tied = false;
|
|
408
|
-
continue;
|
|
409
|
-
}
|
|
410
|
-
if (distance === bestDistance && bestFlag !== candidate.canonicalFlag) {
|
|
411
|
-
tied = true;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
if (!bestFlag || tied || !Number.isFinite(bestDistance) || bestDistance <= 0) {
|
|
415
|
-
return null;
|
|
416
|
-
}
|
|
417
|
-
return {
|
|
418
|
-
flag: bestFlag,
|
|
419
|
-
reason: "flag_typo",
|
|
420
|
-
confidence: bestDistance >= 2 ? "medium" : "high"
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
function parseBareKeyValueToken(token) {
|
|
424
|
-
if (token.includes("://")) {
|
|
425
|
-
return null;
|
|
426
|
-
}
|
|
427
|
-
const match = token.match(/^([A-Za-z][A-Za-z0-9_-]{1,63})([:=])(.*)$/);
|
|
428
|
-
if (!match) {
|
|
429
|
-
return null;
|
|
430
|
-
}
|
|
431
|
-
const key = match[1];
|
|
432
|
-
const value = match[3];
|
|
433
|
-
if (value.length === 0) {
|
|
434
|
-
return null;
|
|
435
|
-
}
|
|
436
|
-
return {
|
|
437
|
-
key,
|
|
438
|
-
value
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
function normalizeLongOptionToken(token, lookup) {
|
|
442
|
-
if (!token.startsWith("--")) {
|
|
443
|
-
return { tokens: [token] };
|
|
444
|
-
}
|
|
445
|
-
const equalsIndex = token.indexOf("=");
|
|
446
|
-
const key = equalsIndex >= 0 ? token.slice(0, equalsIndex) : token;
|
|
447
|
-
const inlineValue = equalsIndex >= 0 ? token.slice(equalsIndex + 1) : void 0;
|
|
448
|
-
const resolution = resolveCanonicalFlag(key, lookup);
|
|
449
|
-
if (!resolution) {
|
|
450
|
-
return { tokens: [token] };
|
|
451
|
-
}
|
|
452
|
-
const normalizedToken = inlineValue === void 0 ? resolution.flag : `${resolution.flag}=${inlineValue}`;
|
|
453
|
-
if (normalizedToken === token) {
|
|
454
|
-
return { tokens: [token] };
|
|
455
|
-
}
|
|
456
|
-
return {
|
|
457
|
-
tokens: [normalizedToken],
|
|
458
|
-
event: {
|
|
459
|
-
from: token,
|
|
460
|
-
to: [normalizedToken],
|
|
461
|
-
reason: resolution.reason,
|
|
462
|
-
confidence: resolution.confidence
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
var GLOBAL_VALUE_CONSUMING_FLAGS = /* @__PURE__ */ new Set(["--pm-path", "--path"]);
|
|
467
|
-
function splitCanonicalListToken(token) {
|
|
468
|
-
if (!token.startsWith("--")) {
|
|
469
|
-
return null;
|
|
470
|
-
}
|
|
471
|
-
const equalsIndex = token.indexOf("=");
|
|
472
|
-
if (equalsIndex < 0) {
|
|
473
|
-
return { flag: token };
|
|
474
|
-
}
|
|
475
|
-
return {
|
|
476
|
-
flag: token.slice(0, equalsIndex),
|
|
477
|
-
inlineValue: token.slice(equalsIndex + 1)
|
|
478
|
-
};
|
|
479
|
-
}
|
|
480
|
-
function copyValueConsumingFlag(argv, index, result) {
|
|
481
|
-
result.push(argv[index]);
|
|
482
|
-
const next = argv[index + 1];
|
|
483
|
-
if (typeof next === "string" && next !== "--") {
|
|
484
|
-
result.push(next);
|
|
485
|
-
return index + 2;
|
|
486
|
-
}
|
|
487
|
-
return index + 1;
|
|
488
|
-
}
|
|
489
|
-
function readListFlagOccurrence(argv, index, parsed, multiValueListFlags) {
|
|
490
|
-
if (parsed.inlineValue !== void 0) {
|
|
491
|
-
return {
|
|
492
|
-
originalTokens: [argv[index]],
|
|
493
|
-
value: parsed.inlineValue,
|
|
494
|
-
consumed: 1
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
const values = [];
|
|
498
|
-
let valueIndex = index + 1;
|
|
499
|
-
while (valueIndex < argv.length && argv[valueIndex] !== "--" && !argv[valueIndex].startsWith("-") && (values.length === 0 || multiValueListFlags.has(parsed.flag))) {
|
|
500
|
-
values.push(argv[valueIndex]);
|
|
501
|
-
valueIndex += 1;
|
|
502
|
-
}
|
|
503
|
-
const consumed = values.length === 0 ? 1 : 1 + values.length;
|
|
504
|
-
return {
|
|
505
|
-
originalTokens: argv.slice(index, index + consumed),
|
|
506
|
-
value: values.length === 0 ? void 0 : values.join(","),
|
|
507
|
-
consumed
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
function recordListFlagOccurrence(slots, result, flag, occurrence) {
|
|
511
|
-
const existing = slots.get(flag);
|
|
512
|
-
if (existing) {
|
|
513
|
-
existing.values.push(occurrence.value);
|
|
514
|
-
existing.occurrences += 1;
|
|
515
|
-
return;
|
|
516
|
-
}
|
|
517
|
-
slots.set(flag, {
|
|
518
|
-
outputIndex: result.length,
|
|
519
|
-
originalTokens: occurrence.originalTokens,
|
|
520
|
-
values: [occurrence.value],
|
|
521
|
-
occurrences: 1
|
|
522
|
-
});
|
|
523
|
-
result.push(null);
|
|
524
|
-
}
|
|
525
|
-
function buildListFlagCoalescingSplices(slots, multiValueListFlags) {
|
|
526
|
-
const events = [];
|
|
527
|
-
const splices = [];
|
|
528
|
-
for (const [flag, slot] of slots) {
|
|
529
|
-
const shouldMerge = slot.occurrences >= 2 || multiValueListFlags.has(flag) && slot.originalTokens.length > 2;
|
|
530
|
-
if (!shouldMerge) {
|
|
531
|
-
splices.push({
|
|
532
|
-
outputIndex: slot.outputIndex,
|
|
533
|
-
tokens: slot.originalTokens
|
|
534
|
-
});
|
|
535
|
-
continue;
|
|
536
|
-
}
|
|
537
|
-
const mergedToken = `${flag}=${slot.values.join(",")}`;
|
|
538
|
-
splices.push({ outputIndex: slot.outputIndex, tokens: [mergedToken] });
|
|
539
|
-
events.push({
|
|
540
|
-
from: `${flag} (x${slot.occurrences})`,
|
|
541
|
-
to: [mergedToken],
|
|
542
|
-
reason: "list_merge",
|
|
543
|
-
confidence: "high"
|
|
544
|
-
});
|
|
545
|
-
}
|
|
546
|
-
return { events, splices };
|
|
547
|
-
}
|
|
548
|
-
function applyListFlagSplices(result, splices) {
|
|
549
|
-
splices.sort((a, b) => b.outputIndex - a.outputIndex);
|
|
550
|
-
for (const splice of splices) {
|
|
551
|
-
result.splice(splice.outputIndex, 1, ...splice.tokens);
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
function coalesceRepeatedListFlags(argv, listFlags, valueConsumingFlags = /* @__PURE__ */ new Set(), multiValueListFlags = /* @__PURE__ */ new Set()) {
|
|
555
|
-
if (listFlags.size === 0) {
|
|
556
|
-
return { argv: [...argv], events: [] };
|
|
557
|
-
}
|
|
558
|
-
const result = [];
|
|
559
|
-
const slots = /* @__PURE__ */ new Map();
|
|
560
|
-
let index = 0;
|
|
561
|
-
while (index < argv.length) {
|
|
562
|
-
const token = argv[index];
|
|
563
|
-
if (token === "--") {
|
|
564
|
-
result.push(...argv.slice(index));
|
|
565
|
-
break;
|
|
566
|
-
}
|
|
567
|
-
if (valueConsumingFlags.has(token)) {
|
|
568
|
-
index = copyValueConsumingFlag(argv, index, result);
|
|
569
|
-
continue;
|
|
570
|
-
}
|
|
571
|
-
const parsed = splitCanonicalListToken(token);
|
|
572
|
-
if (!parsed || !listFlags.has(parsed.flag)) {
|
|
573
|
-
result.push(token);
|
|
574
|
-
index += 1;
|
|
575
|
-
continue;
|
|
576
|
-
}
|
|
577
|
-
const occurrence = readListFlagOccurrence(argv, index, parsed, multiValueListFlags);
|
|
578
|
-
if (occurrence.value === void 0) {
|
|
579
|
-
result.push(token);
|
|
580
|
-
index += occurrence.consumed;
|
|
581
|
-
continue;
|
|
582
|
-
}
|
|
583
|
-
recordListFlagOccurrence(slots, result, parsed.flag, {
|
|
584
|
-
originalTokens: occurrence.originalTokens,
|
|
585
|
-
value: occurrence.value
|
|
586
|
-
});
|
|
587
|
-
index += occurrence.consumed;
|
|
588
|
-
}
|
|
589
|
-
const { events, splices } = buildListFlagCoalescingSplices(slots, multiValueListFlags);
|
|
590
|
-
applyListFlagSplices(result, splices);
|
|
591
|
-
return { argv: result, events };
|
|
592
|
-
}
|
|
593
|
-
var LINKED_TEST_TWO_TOKEN_KEYS_BY_FLAG = /* @__PURE__ */ new Map([
|
|
594
|
-
["--add", /* @__PURE__ */ new Set(["command", "cmd", "path"])],
|
|
595
|
-
["--remove", /* @__PURE__ */ new Set(["command", "path"])]
|
|
596
|
-
]);
|
|
597
|
-
function isLinkedTestTwoTokenValuePosition(commandName, emittedTokens) {
|
|
598
|
-
if (commandName !== "test" || emittedTokens.length < 2) {
|
|
599
|
-
return false;
|
|
600
|
-
}
|
|
601
|
-
const key = emittedTokens[emittedTokens.length - 1];
|
|
602
|
-
const flag = emittedTokens[emittedTokens.length - 2];
|
|
603
|
-
const keys = LINKED_TEST_TWO_TOKEN_KEYS_BY_FLAG.get(flag);
|
|
604
|
-
return keys !== void 0 && keys.has(key);
|
|
605
|
-
}
|
|
606
|
-
function shouldPreserveBareKeyValueToken(commandName, emittedTokens) {
|
|
607
|
-
return commandName === "search" || isLinkedTestTwoTokenValuePosition(commandName, emittedTokens);
|
|
608
|
-
}
|
|
609
|
-
function mergeLinkedTestTwoTokenEntries(argv, commandName, trace) {
|
|
610
|
-
if (commandName !== "test") {
|
|
611
|
-
return argv;
|
|
612
|
-
}
|
|
613
|
-
const result = [];
|
|
614
|
-
let index = 0;
|
|
615
|
-
while (index < argv.length) {
|
|
616
|
-
const token = argv[index];
|
|
617
|
-
if (token === "--") {
|
|
618
|
-
result.push(...argv.slice(index));
|
|
619
|
-
return result;
|
|
620
|
-
}
|
|
621
|
-
const keys = LINKED_TEST_TWO_TOKEN_KEYS_BY_FLAG.get(token);
|
|
622
|
-
const key = keys ? argv[index + 1] : void 0;
|
|
623
|
-
if (!keys || typeof key !== "string" || !keys.has(key)) {
|
|
624
|
-
result.push(token);
|
|
625
|
-
index += 1;
|
|
626
|
-
continue;
|
|
627
|
-
}
|
|
628
|
-
let runEnd = index + 2;
|
|
629
|
-
while (runEnd < argv.length && !argv[runEnd].startsWith("-")) {
|
|
630
|
-
runEnd += 1;
|
|
631
|
-
}
|
|
632
|
-
if (runEnd - (index + 2) !== 1) {
|
|
633
|
-
result.push(token);
|
|
634
|
-
index += 1;
|
|
635
|
-
continue;
|
|
636
|
-
}
|
|
637
|
-
const value = argv[index + 2];
|
|
638
|
-
const mergedValue = `${key}=${value}`;
|
|
639
|
-
result.push(token, mergedValue);
|
|
640
|
-
trace.push({
|
|
641
|
-
from: `${token} ${key} ${value}`,
|
|
642
|
-
to: [token, mergedValue],
|
|
643
|
-
reason: "bare_key_value",
|
|
644
|
-
confidence: "high"
|
|
645
|
-
});
|
|
646
|
-
index += 3;
|
|
647
|
-
}
|
|
648
|
-
return result;
|
|
649
|
-
}
|
|
650
|
-
function normalizeBootstrapInvocation(argv) {
|
|
651
|
-
const trace = [];
|
|
652
|
-
const legacyNormalized = normalizeLegacyExtensionActionSyntax(argv);
|
|
653
|
-
if (legacyNormalized.length !== argv.length || legacyNormalized.some((token, index) => token !== argv[index])) {
|
|
654
|
-
trace.push({
|
|
655
|
-
from: argv.join(" "),
|
|
656
|
-
to: [...legacyNormalized],
|
|
657
|
-
reason: "legacy_extension_action",
|
|
658
|
-
confidence: "high"
|
|
659
|
-
});
|
|
660
|
-
}
|
|
661
|
-
const aliasNormalized = rewriteCommandAlias(legacyNormalized, trace);
|
|
662
|
-
const commandName = parseBootstrapCommandName(aliasNormalized);
|
|
663
|
-
const commandPathName = parseBootstrapCommandPathName(aliasNormalized);
|
|
664
|
-
const lookup = buildFlagLookup(commandPathName ?? commandName);
|
|
665
|
-
const normalizedArgv = [];
|
|
666
|
-
for (let index = 0; index < aliasNormalized.length; index += 1) {
|
|
667
|
-
const token = aliasNormalized[index];
|
|
668
|
-
if (token === "--") {
|
|
669
|
-
normalizedArgv.push(...aliasNormalized.slice(index));
|
|
670
|
-
break;
|
|
671
|
-
}
|
|
672
|
-
const previous = normalizedArgv[normalizedArgv.length - 1];
|
|
673
|
-
if (token.startsWith("--")) {
|
|
674
|
-
const normalizedToken = normalizeLongOptionToken(token, lookup);
|
|
675
|
-
normalizedArgv.push(...normalizedToken.tokens);
|
|
676
|
-
if (normalizedToken.event) {
|
|
677
|
-
trace.push(normalizedToken.event);
|
|
678
|
-
}
|
|
679
|
-
continue;
|
|
680
|
-
}
|
|
681
|
-
const bareKeyValue = parseBareKeyValueToken(token);
|
|
682
|
-
if (bareKeyValue && !(typeof previous === "string" && previous.startsWith("-")) && !shouldPreserveBareKeyValueToken(commandName, normalizedArgv)) {
|
|
683
|
-
const resolution = resolveCanonicalFlag(bareKeyValue.key, lookup);
|
|
684
|
-
if (resolution) {
|
|
685
|
-
const replacement = [resolution.flag, bareKeyValue.value];
|
|
686
|
-
normalizedArgv.push(...replacement);
|
|
687
|
-
trace.push({
|
|
688
|
-
from: token,
|
|
689
|
-
to: replacement,
|
|
690
|
-
reason: "bare_key_value",
|
|
691
|
-
confidence: resolution.confidence
|
|
692
|
-
});
|
|
693
|
-
continue;
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
normalizedArgv.push(token);
|
|
697
|
-
}
|
|
698
|
-
const linkedTestNormalized = mergeLinkedTestTwoTokenEntries(normalizedArgv, commandName, trace);
|
|
699
|
-
const coalesced = coalesceRepeatedListFlags(linkedTestNormalized, lookup.listCanonicalFlags, GLOBAL_VALUE_CONSUMING_FLAGS, commandName === "create" ? /* @__PURE__ */ new Set(["--tags"]) : /* @__PURE__ */ new Set());
|
|
700
|
-
for (const event of coalesced.events) {
|
|
701
|
-
trace.push(event);
|
|
702
|
-
}
|
|
703
|
-
return {
|
|
704
|
-
argv: coalesced.argv,
|
|
705
|
-
commandName,
|
|
706
|
-
trace
|
|
707
|
-
};
|
|
708
|
-
}
|
|
709
|
-
function parseBootstrapCommandPathName(argv) {
|
|
710
|
-
const stripped = stripGlobalBootstrapTokens(argv);
|
|
711
|
-
const first = stripped[0]?.trim().toLowerCase();
|
|
712
|
-
const second = stripped[1]?.trim().toLowerCase();
|
|
713
|
-
if ((first === "extension" || first === "package" || first === "packages") && typeof second === "string" && second.length > 0 && !second.startsWith("-")) {
|
|
714
|
-
return `${first} ${second}`;
|
|
715
|
-
}
|
|
716
|
-
return first;
|
|
717
|
-
}
|
|
718
|
-
function parseBootstrapTypeValue(argv) {
|
|
719
|
-
for (let index = 0; index < argv.length; index += 1) {
|
|
720
|
-
const token = argv[index];
|
|
721
|
-
if (token === "--type") {
|
|
722
|
-
const candidate = argv[index + 1];
|
|
723
|
-
if (typeof candidate === "string" && candidate.trim().length > 0) {
|
|
724
|
-
return candidate.trim();
|
|
725
|
-
}
|
|
726
|
-
continue;
|
|
727
|
-
}
|
|
728
|
-
if (token.startsWith("--type=")) {
|
|
729
|
-
const candidate = token.slice("--type=".length).trim();
|
|
730
|
-
if (candidate.length > 0) {
|
|
731
|
-
return candidate;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
return void 0;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
// dist/cli/commands/extension/shared.js
|
|
739
|
-
import fs from "node:fs/promises";
|
|
740
|
-
import path from "node:path";
|
|
741
|
-
function normalizeStringList(values) {
|
|
742
|
-
return [
|
|
743
|
-
...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))
|
|
744
|
-
].sort((left, right) => left.localeCompare(right));
|
|
745
|
-
}
|
|
746
|
-
function normalizeExtensionNameForMatch(value) {
|
|
747
|
-
return value.trim().toLowerCase();
|
|
748
|
-
}
|
|
749
|
-
function normalizeManagedDirectoryName(name) {
|
|
750
|
-
const normalized = name.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
751
|
-
if (normalized.length === 0) {
|
|
752
|
-
throw new PmCliError("Extension manifest name must resolve to a non-empty directory name.", EXIT_CODE.USAGE);
|
|
753
|
-
}
|
|
754
|
-
if (normalized === "." || normalized === "..") {
|
|
755
|
-
throw new PmCliError('Extension manifest name must not resolve to "." or "..".', EXIT_CODE.USAGE);
|
|
756
|
-
}
|
|
757
|
-
return normalized;
|
|
758
|
-
}
|
|
759
|
-
function parseOptionalManifestPriority(value) {
|
|
760
|
-
if (value === void 0 || value === null) {
|
|
761
|
-
return DEFAULT_EXTENSION_PRIORITY;
|
|
762
|
-
}
|
|
763
|
-
return typeof value === "number" && Number.isInteger(value) ? value : null;
|
|
764
|
-
}
|
|
765
|
-
function parseOptionalManifestCapabilities(value) {
|
|
766
|
-
if (value === void 0 || value === null) {
|
|
767
|
-
return [];
|
|
768
|
-
}
|
|
769
|
-
if (!Array.isArray(value) || value.some((entry) => typeof entry !== "string")) {
|
|
770
|
-
return null;
|
|
771
|
-
}
|
|
772
|
-
return normalizeStringList(value.map((entry) => String(entry).toLowerCase()));
|
|
773
|
-
}
|
|
774
|
-
function parseExtensionManifest(raw) {
|
|
775
|
-
if (typeof raw !== "object" || raw === null) {
|
|
776
|
-
return null;
|
|
777
|
-
}
|
|
778
|
-
const candidate = raw;
|
|
779
|
-
if (typeof candidate.name !== "string" || candidate.name.trim().length === 0) {
|
|
780
|
-
return null;
|
|
781
|
-
}
|
|
782
|
-
if (typeof candidate.version !== "string" || candidate.version.trim().length === 0) {
|
|
783
|
-
return null;
|
|
784
|
-
}
|
|
785
|
-
if (typeof candidate.entry !== "string" || candidate.entry.trim().length === 0) {
|
|
786
|
-
return null;
|
|
787
|
-
}
|
|
788
|
-
const priority = parseOptionalManifestPriority(candidate.priority);
|
|
789
|
-
const capabilities = parseOptionalManifestCapabilities(candidate.capabilities);
|
|
790
|
-
if (priority === null || capabilities === null) {
|
|
791
|
-
return null;
|
|
792
|
-
}
|
|
793
|
-
return {
|
|
794
|
-
name: candidate.name.trim(),
|
|
795
|
-
version: candidate.version.trim(),
|
|
796
|
-
entry: candidate.entry.trim(),
|
|
797
|
-
priority,
|
|
798
|
-
capabilities
|
|
799
|
-
};
|
|
800
|
-
}
|
|
801
|
-
async function validateExtensionDirectory(directory) {
|
|
802
|
-
const manifestPath = path.join(directory, "manifest.json");
|
|
803
|
-
if (!await pathExists(manifestPath)) {
|
|
804
|
-
throw new PmCliError(`Extension manifest is missing at "${manifestPath}".`, EXIT_CODE.USAGE);
|
|
805
|
-
}
|
|
806
|
-
let parsedManifest;
|
|
807
|
-
try {
|
|
808
|
-
parsedManifest = JSON.parse(await fs.readFile(manifestPath, "utf8"));
|
|
809
|
-
} catch (error) {
|
|
810
|
-
throw new PmCliError(`Failed to parse extension manifest at "${manifestPath}": ${formatManifestReadError(error)}`, EXIT_CODE.USAGE);
|
|
811
|
-
}
|
|
812
|
-
const manifest = parseExtensionManifest(parsedManifest);
|
|
813
|
-
if (!manifest) {
|
|
814
|
-
throw new PmCliError(`Extension manifest at "${manifestPath}" is invalid.`, EXIT_CODE.USAGE);
|
|
815
|
-
}
|
|
816
|
-
const entryPath = path.resolve(directory, manifest.entry);
|
|
817
|
-
if (!isPathWithinDirectory(directory, entryPath)) {
|
|
818
|
-
throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory "${directory}".`, EXIT_CODE.USAGE);
|
|
819
|
-
}
|
|
820
|
-
if (!await pathExists(entryPath)) {
|
|
821
|
-
throw new PmCliError(`Extension entry file is missing at "${entryPath}".`, EXIT_CODE.USAGE);
|
|
822
|
-
}
|
|
823
|
-
if (!await isCanonicalPathWithinDirectory(directory, entryPath)) {
|
|
824
|
-
throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory after symlink resolution.`, EXIT_CODE.USAGE);
|
|
825
|
-
}
|
|
826
|
-
return {
|
|
827
|
-
directory,
|
|
828
|
-
manifest_path: manifestPath,
|
|
829
|
-
entry_path: entryPath,
|
|
830
|
-
manifest
|
|
831
|
-
};
|
|
832
|
-
}
|
|
833
|
-
function formatManifestReadError(error) {
|
|
834
|
-
return error instanceof Error ? error.message : String(error);
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
export {
|
|
838
|
-
normalizeLongFlag,
|
|
839
|
-
normalizeLongOptionFlag,
|
|
840
|
-
extractProvidedOptionFlags,
|
|
841
|
-
renderPmCommand,
|
|
842
|
-
parseBootstrapGlobalOptions,
|
|
843
|
-
stripGlobalBootstrapTokens,
|
|
844
|
-
parseBootstrapHelpRequest,
|
|
845
|
-
parseBootstrapCommandName,
|
|
846
|
-
applyBootstrapPagerPolicy,
|
|
847
|
-
EXECUTABLE_COMMAND_ALIASES,
|
|
848
|
-
normalizeBootstrapInvocation,
|
|
849
|
-
parseBootstrapTypeValue,
|
|
850
|
-
normalizeStringList,
|
|
851
|
-
normalizeExtensionNameForMatch,
|
|
852
|
-
normalizeManagedDirectoryName,
|
|
853
|
-
parseExtensionManifest,
|
|
854
|
-
validateExtensionDirectory
|
|
855
|
-
};
|
|
856
|
-
//# sourceMappingURL=chunk-DBZVUJTK.js.map
|
|
857
|
-
|
|
858
|
-
//# debugId=f08e76cd-55b1-531a-816a-79f021acbe1b
|