@unbrained/pm-cli 2026.7.2 → 2026.7.3
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 +3 -3
- package/CHANGELOG.md +19 -0
- package/CONTRIBUTING.md +2 -2
- package/README.md +1 -1
- package/dist/cli/commander-usage.js +54 -41
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/activity.js +79 -57
- package/dist/cli/commands/activity.js.map +1 -1
- package/dist/cli/commands/close-many.js +106 -65
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/create.js +32 -17
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/doctor.js +56 -67
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/shared.js +21 -15
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/health.js +101 -112
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.js +32 -19
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/next.js +13 -10
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/profile.js +23 -15
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +2 -0
- package/dist/cli/commands/validate.js +14 -2
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +9 -6
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.js +27 -19
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/help-json-payload.js +57 -49
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.js +48 -32
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +213 -213
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +368 -368
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +303 -299
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +4 -0
- package/dist/cli/registration-helpers.js +45 -56
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/{activity-CUC4JY3U.js → activity-5YWLSPGE.js} +9 -9
- package/dist/cli-bundle/chunks/activity-BIML7K2D.js +16 -0
- package/dist/cli-bundle/chunks/{aggregate-SW5PNGCS.js → aggregate-2V2M3JZU.js} +8 -8
- package/dist/cli-bundle/chunks/{aggregate-DKUTRY6R.js → aggregate-EK7DXML7.js} +8 -8
- package/dist/cli-bundle/chunks/{append-UBM632FK.js → append-EZESUVJT.js} +8 -8
- package/dist/cli-bundle/chunks/{append-H32VOR2Y.js → append-JFG4WQMG.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-XTHQWXVC.js → chunk-32IUNTG4.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-IEEJQCZ4.js → chunk-3W2HJKJX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-MNBPX5JS.js → chunk-4EXFFP7T.js} +42 -27
- package/dist/cli-bundle/chunks/{chunk-MNBPX5JS.js.map → chunk-4EXFFP7T.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JMK5GCK2.js → chunk-4PFVUUYV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NRZS637N.js → chunk-4WB6S4YX.js} +56 -21
- package/dist/cli-bundle/chunks/chunk-4WB6S4YX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5GVTFFTC.js → chunk-572FKBRL.js} +61 -102
- package/dist/cli-bundle/chunks/chunk-572FKBRL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MRD4T5LF.js → chunk-5E7N4T2Z.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-S62UANU7.js → chunk-5IZUBZBR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BTX5MIQF.js → chunk-5JIWFWOZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SYVUU7EK.js → chunk-67LARBDL.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-KIYCOJ63.js → chunk-6CDCWKSX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-JXAUVO6X.js → chunk-6KRFL33E.js} +55 -20
- package/dist/cli-bundle/chunks/chunk-6KRFL33E.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3LCUASYG.js → chunk-6NYJGMTY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2ASNV4DH.js → chunk-7CLLC75T.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-FFOQHGNH.js → chunk-7LYO6S5A.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-55XRYWEG.js → chunk-A3OQ7TFW.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-Q6K2OACU.js → chunk-AIKU3IIL.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-AIAIXG7I.js → chunk-AJHYQCBJ.js} +39 -5
- package/dist/cli-bundle/chunks/chunk-AJHYQCBJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TTHCEV5Q.js → chunk-BE2SR6QL.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-GFMSLORL.js → chunk-BI4R7HI2.js} +75 -53
- package/dist/cli-bundle/chunks/chunk-BI4R7HI2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-K2VYLVX4.js → chunk-CXR3CMBQ.js} +33 -6
- package/dist/cli-bundle/chunks/chunk-CXR3CMBQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7W4H4K26.js → chunk-ECU6MMTQ.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-YLZZ6T54.js → chunk-EJ2OCBHF.js} +23 -8
- package/dist/cli-bundle/chunks/chunk-EJ2OCBHF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5PGBHRY3.js → chunk-EQURFOMH.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-H4GRLYJS.js → chunk-ER4ME5U2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-QH3FSKRJ.js → chunk-ERG65A2L.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UWKEJMZU.js → chunk-F6WNBITZ.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-U2BEEM2X.js → chunk-FH2H3CBD.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-EUKTMRN3.js → chunk-FUFFPIYA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7MYWF4ZX.js → chunk-FZJM2TXF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-CYBDUHNO.js → chunk-GUYNUXQT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZNT7KEWE.js → chunk-GVJE5T7Q.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SYNKD3ZG.js → chunk-HB4FAT3O.js} +42 -60
- package/dist/cli-bundle/chunks/chunk-HB4FAT3O.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XEWQKDYZ.js → chunk-HQAF23Q2.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-KLXF7NCC.js → chunk-JBZ2NTKX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SPM2XLWI.js → chunk-JPATY4SE.js} +22 -7
- package/dist/cli-bundle/chunks/chunk-JPATY4SE.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4NUOWFBT.js → chunk-K5DT2YKM.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-KCO2EAN5.js → chunk-KEZOIPCR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7NSPKJUS.js → chunk-KHVGM5CS.js} +113 -83
- package/dist/cli-bundle/chunks/chunk-KHVGM5CS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-66Z3X7ZG.js → chunk-KS6ATO47.js} +33 -20
- package/dist/cli-bundle/chunks/{chunk-66Z3X7ZG.js.map → chunk-KS6ATO47.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-I66WE2HE.js → chunk-L4SLHV6G.js} +112 -82
- package/dist/cli-bundle/chunks/chunk-L4SLHV6G.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2227673O.js → chunk-LBE5QFMZ.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-YPKFV2JR.js → chunk-LCWQP6NM.js} +76 -54
- package/dist/cli-bundle/chunks/chunk-LCWQP6NM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UGLU6Q2I.js → chunk-LOWVNZBZ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-Y4NRKBFW.js → chunk-MDHWWBNZ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-LRKMWUUV.js → chunk-MEZZZBYX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6YCYF2AI.js → chunk-MHRS5FUX.js} +34 -21
- package/dist/cli-bundle/chunks/{chunk-6YCYF2AI.js.map → chunk-MHRS5FUX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-Q6NXOHS6.js → chunk-NOIEVOK5.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-GRRG3MCT.js → chunk-NZ7QIUP5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-TPOFWBMY.js → chunk-OGLGI22K.js} +26 -20
- package/dist/cli-bundle/chunks/chunk-OGLGI22K.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZNHEYCDD.js → chunk-P5L7Z2O6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6ZMBJRDJ.js → chunk-PULUSQAV.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-EMPGXBUF.js → chunk-QCDTQCMW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OTUJZKGI.js → chunk-QNNQAAZ5.js} +24 -18
- package/dist/cli-bundle/chunks/{chunk-OTUJZKGI.js.map → chunk-QNNQAAZ5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XWGEMNBR.js → chunk-RAHINBVP.js} +60 -101
- package/dist/cli-bundle/chunks/chunk-RAHINBVP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AJEBCRIY.js → chunk-RJH5VQHW.js} +43 -61
- package/dist/cli-bundle/chunks/chunk-RJH5VQHW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HQTPRV4D.js → chunk-SU2E4AWU.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-3Q2HBMTI.js → chunk-SU3TB4NS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XCHUVHKU.js → chunk-SYE6WMV6.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-2KWL5NPW.js → chunk-T3P7PMZP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-N2JSWVWG.js → chunk-T4XBKJ3F.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-BVZZN2LH.js → chunk-T6AXEBOP.js} +23 -17
- package/dist/cli-bundle/chunks/{chunk-BVZZN2LH.js.map → chunk-T6AXEBOP.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-N3QCJS4M.js → chunk-TQ6AX5SQ.js} +58 -69
- package/dist/cli-bundle/chunks/{chunk-N3QCJS4M.js.map → chunk-TQ6AX5SQ.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RM37OPYK.js → chunk-U3S2B7TA.js} +43 -28
- package/dist/cli-bundle/chunks/{chunk-RM37OPYK.js.map → chunk-U3S2B7TA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-UTSH5GWX.js → chunk-U5TR4N7J.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-UT73HUPC.js → chunk-UMNQZS4H.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-CZPVDLD2.js → chunk-WJA3PXW7.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-WJAMWAHZ.js → chunk-WRYERRZX.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-6ITZLD4T.js → chunk-WYOIIFSE.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-7TH5NMVB.js → chunk-XRYSCRZR.js} +25 -19
- package/dist/cli-bundle/chunks/chunk-XRYSCRZR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3AZUFQK6.js → chunk-YF746GTH.js} +59 -70
- package/dist/cli-bundle/chunks/{chunk-3AZUFQK6.js.map → chunk-YF746GTH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IG5JYZGU.js → chunk-YPWUSH72.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-KN3URLKS.js → chunk-YSDFIY7N.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2CHRYUXL.js → chunk-YSGTMDWC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-36UGKF4O.js → chunk-YVKZ3ANP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-A6VOGKBA.js → chunk-Z5F6XZXE.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-LTRAF2D7.js → chunk-Z7RPDF2Y.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-W47SML5B.js → chunk-ZFTKYWIF.js} +7 -7
- package/dist/cli-bundle/chunks/{claim-SENTPZBN.js → claim-2BGBGSVI.js} +8 -8
- package/dist/cli-bundle/chunks/{claim-Z7MEQCBT.js → claim-5GU7OE67.js} +8 -8
- package/dist/cli-bundle/chunks/close-6YODBUIV.js +14 -0
- package/dist/cli-bundle/chunks/{close-424MX4CU.js → close-AFVKPR57.js} +7 -7
- package/dist/cli-bundle/chunks/{close-many-SWY34BII.js → close-many-7KLOSYLP.js} +119 -76
- package/dist/cli-bundle/chunks/close-many-7KLOSYLP.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-many-2IV4J2TR.js → close-many-JKUJMHLG.js} +120 -77
- package/dist/cli-bundle/chunks/close-many-JKUJMHLG.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-4FGNTSNV.js → comments-DNWHEBOS.js} +9 -9
- package/dist/cli-bundle/chunks/{comments-7YS5MY5X.js → comments-RW23R3VE.js} +9 -9
- package/dist/cli-bundle/chunks/{config-G74GISC4.js → config-AUM5WBYA.js} +7 -7
- package/dist/cli-bundle/chunks/{config-BZJKK7FZ.js → config-OZWSA2NP.js} +7 -7
- package/dist/cli-bundle/chunks/{context-ZQY54JNS.js → context-OYXRGY7S.js} +12 -12
- package/dist/cli-bundle/chunks/{context-LHVKJSPJ.js → context-PKCEHQY3.js} +12 -12
- package/dist/cli-bundle/chunks/{contracts-CP2EZJC7.js → contracts-L6ODXNUM.js} +3 -3
- package/dist/cli-bundle/chunks/{contracts-FIZLMP7O.js → contracts-X74F2GSM.js} +3 -3
- package/dist/cli-bundle/chunks/{copy-GYNQQPW2.js → copy-6XOR3HKN.js} +5 -5
- package/dist/cli-bundle/chunks/{copy-TLW7JTQT.js → copy-I4NCLBR4.js} +5 -5
- package/dist/cli-bundle/chunks/{create-VSKYSOCD.js → create-PM45M6PE.js} +12 -12
- package/dist/cli-bundle/chunks/create-Z7YCH3BE.js +28 -0
- package/dist/cli-bundle/chunks/{delete-ANTOTI2I.js → delete-7YXHYG67.js} +5 -5
- package/dist/cli-bundle/chunks/{delete-4W5JYCEG.js → delete-LPISP43T.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-HPPE6MJN.js → deps-N2T26FME.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-ZQZN54EZ.js → deps-WATKQDE3.js} +5 -5
- package/dist/cli-bundle/chunks/{docs-RPOVFMP3.js → docs-6LQ3GLM7.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-XJNYBJGE.js → docs-Z3X6JZLT.js} +7 -7
- package/dist/cli-bundle/chunks/{eval-RFBI5FGS.js → eval-6DCLG52D.js} +10 -10
- package/dist/cli-bundle/chunks/{eval-DM6JBZTS.js → eval-Y3ZCUTHK.js} +10 -10
- package/dist/cli-bundle/chunks/{extension-B3YY4WY5.js → extension-BNINIMT7.js} +11 -11
- package/dist/cli-bundle/chunks/{extension-TTSEFQTS.js → extension-QWE4YYK5.js} +11 -11
- package/dist/cli-bundle/chunks/{files-5D65CHGE.js → files-6SGKHS6O.js} +7 -7
- package/dist/cli-bundle/chunks/{files-GPIG77EN.js → files-FUYPSOFJ.js} +7 -7
- package/dist/cli-bundle/chunks/{focus-ZHN7WIGX.js → focus-2Q3K76G2.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-C3PEJV2C.js → focus-ATLBWXXD.js} +6 -6
- package/dist/cli-bundle/chunks/{gc-D4JQ6OWN.js → gc-RUYEMNRF.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-VZIXDL32.js → gc-TDWSDR66.js} +3 -3
- package/dist/cli-bundle/chunks/{get-IOVAN6RU.js → get-2WGLX74N.js} +10 -10
- package/dist/cli-bundle/chunks/{get-GIBRUUOP.js → get-LY6M2JIM.js} +10 -10
- package/dist/cli-bundle/chunks/{health-L2U3AFKV.js → health-4RKHYS3T.js} +115 -123
- package/dist/cli-bundle/chunks/health-4RKHYS3T.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-MM7AWXYF.js → health-TMFVNYRA.js} +114 -122
- package/dist/cli-bundle/chunks/health-TMFVNYRA.js.map +7 -0
- package/dist/cli-bundle/chunks/history-CGNQJXFE.js +18 -0
- package/dist/cli-bundle/chunks/{history-IL7XCEX2.js → history-SGRRS72R.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-MV25P7DM.js → history-compact-LOED43R3.js} +10 -10
- package/dist/cli-bundle/chunks/{history-compact-HALOTOU7.js → history-compact-V5DNAQHH.js} +10 -10
- package/dist/cli-bundle/chunks/{history-redact-VYCWQFK7.js → history-redact-IRL7WJ3E.js} +9 -9
- package/dist/cli-bundle/chunks/history-redact-N3JK7VBW.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-44MODPQF.js → history-repair-4WVBVHFR.js} +10 -10
- package/dist/cli-bundle/chunks/{history-repair-CPNAOCNF.js → history-repair-PGYQJMGD.js} +10 -10
- package/dist/cli-bundle/chunks/{init-F27NHENZ.js → init-4GESW7RM.js} +12 -12
- package/dist/cli-bundle/chunks/init-XIDPABA4.js +22 -0
- package/dist/cli-bundle/chunks/{learnings-HJVDQIGY.js → learnings-4BHWFFUV.js} +9 -9
- package/dist/cli-bundle/chunks/{learnings-XSFSUUWK.js → learnings-4FJY7WIW.js} +9 -9
- package/dist/cli-bundle/chunks/{list-HPMEKCAA.js → list-472TIOVK.js} +8 -8
- package/dist/cli-bundle/chunks/{list-VMPWTURB.js → list-D7BF5CL2.js} +8 -8
- package/dist/cli-bundle/chunks/{next-QM6YJIIS.js → next-D5STGWI2.js} +26 -23
- package/dist/cli-bundle/chunks/next-D5STGWI2.js.map +1 -0
- package/dist/cli-bundle/chunks/{next-ETXF2ZCN.js → next-SFQZVX2B.js} +25 -22
- package/dist/cli-bundle/chunks/{next-ETXF2ZCN.js.map → next-SFQZVX2B.js.map} +2 -2
- package/dist/cli-bundle/chunks/{notes-GDZIKGR6.js → notes-6KNOSLIT.js} +9 -9
- package/dist/cli-bundle/chunks/{notes-WDDBPC4D.js → notes-W4UEICGF.js} +9 -9
- package/dist/cli-bundle/chunks/{plan-BGDR73Z6.js → plan-JO6V7BXO.js} +12 -12
- package/dist/cli-bundle/chunks/{plan-C5IMM335.js → plan-MJQW5XK3.js} +12 -12
- package/dist/cli-bundle/chunks/{profile-HUCENIEQ.js → profile-3TOTMUR4.js} +26 -18
- package/dist/cli-bundle/chunks/profile-3TOTMUR4.js.map +7 -0
- package/dist/cli-bundle/chunks/{profile-CCOKZ2IQ.js → profile-WIQY2KCV.js} +27 -19
- package/dist/cli-bundle/chunks/profile-WIQY2KCV.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-XN4ZRHSV.js → register-list-query-ELBHCCFI.js} +179 -170
- package/dist/cli-bundle/chunks/register-list-query-ELBHCCFI.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-ROSNIL52.js → register-list-query-GAPQ6DM3.js} +180 -171
- package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-KRLAHEL2.js → register-mutation-ROFE2YPC.js} +367 -361
- package/dist/cli-bundle/chunks/register-mutation-ROFE2YPC.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-CFSB2MS3.js → register-mutation-SJWMVIJ2.js} +368 -362
- package/dist/cli-bundle/chunks/register-mutation-SJWMVIJ2.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-4PASGJDB.js → register-operations-IADFVH53.js} +309 -304
- package/dist/cli-bundle/chunks/register-operations-IADFVH53.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-MBN4KGUM.js → register-operations-MEKU3AKC.js} +310 -305
- package/dist/cli-bundle/chunks/register-operations-MEKU3AKC.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-ZCGKHDKL.js → register-setup-3QJY43CY.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-VIAWYFP5.js → register-setup-AJWUSSQX.js} +15 -15
- package/dist/cli-bundle/chunks/{restore-4CBWUMCX.js → restore-44IHMMZZ.js} +9 -9
- package/dist/cli-bundle/chunks/restore-EXHU34EU.js +17 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-6VFKNKCM.js → scheduling-shortcuts-OLHNLAZY.js} +12 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-ERHCVTEM.js → scheduling-shortcuts-TSBK4AY5.js} +12 -12
- package/dist/cli-bundle/chunks/{schema-TDGK6N3I.js → schema-IB2NZZWD.js} +7 -7
- package/dist/cli-bundle/chunks/{schema-UE5KKAUX.js → schema-VBCELP5G.js} +7 -7
- package/dist/cli-bundle/chunks/{search-K4CFLQ5S.js → search-7UBETML4.js} +10 -10
- package/dist/cli-bundle/chunks/{search-FP7MEU4S.js → search-R227JOL6.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-XT6QRKQY.js → stats-FAG7COEH.js} +6 -6
- package/dist/cli-bundle/chunks/{stats-NJJCALEZ.js → stats-MCK7PLYS.js} +6 -6
- package/dist/cli-bundle/chunks/{telemetry-5SQ5UDXC.js → telemetry-DRPDZMAO.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-HVXFZA2U.js → telemetry-GVVUQSJQ.js} +4 -4
- package/dist/cli-bundle/chunks/{test-YCDAUBWF.js → test-QY44WAMR.js} +15 -15
- package/dist/cli-bundle/chunks/{test-UFSJ5YIO.js → test-SY76DZTO.js} +15 -15
- package/dist/cli-bundle/chunks/{test-all-PM7UYN42.js → test-all-QD6QAEG7.js} +17 -17
- package/dist/cli-bundle/chunks/{test-all-2BWKY3GQ.js → test-all-USPJHXFR.js} +17 -17
- package/dist/cli-bundle/chunks/{test-runs-FK5E75AA.js → test-runs-MG5VIGSK.js} +4 -4
- package/dist/cli-bundle/chunks/{test-runs-H4TGWGRN.js → test-runs-QIR5MJPL.js} +4 -4
- package/dist/cli-bundle/chunks/update-A7EICML6.js +24 -0
- package/dist/cli-bundle/chunks/{update-Y5WQVT5O.js → update-IKJZWLQC.js} +15 -15
- package/dist/cli-bundle/chunks/{update-many-JTKKSA7Y.js → update-many-BEMTDA2X.js} +28 -28
- package/dist/cli-bundle/chunks/{update-many-6YAYYRLE.js → update-many-RATAARHU.js} +28 -28
- package/dist/cli-bundle/chunks/{upgrade-JUDU7YL4.js → upgrade-NWMR3VQL.js} +11 -11
- package/dist/cli-bundle/chunks/{upgrade-DTAHZ236.js → upgrade-VU46BLJZ.js} +11 -11
- package/dist/cli-bundle/chunks/{validate-W7H5TEDC.js → validate-GAJ6FUSI.js} +32 -22
- package/dist/cli-bundle/chunks/validate-GAJ6FUSI.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-732RWS5W.js → validate-NRY6MFXN.js} +31 -21
- package/dist/cli-bundle/chunks/validate-NRY6MFXN.js.map +7 -0
- package/dist/cli-bundle/main.js +180 -122
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/core/item/type-registry.js +29 -19
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +65 -54
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/status-defs-file.js +26 -3
- package/dist/core/schema/status-defs-file.js.map +1 -1
- package/dist/core/search/corpus.js +25 -19
- package/dist/core/search/corpus.js.map +1 -1
- package/dist/core/shared/memo.d.ts +12 -0
- package/dist/core/shared/memo.js +25 -0
- package/dist/core/shared/memo.js.map +1 -0
- package/dist/core/shared/serialization.js +24 -14
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/shared/time.js +26 -4
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/front-matter-cache.d.ts +5 -0
- package/dist/core/store/front-matter-cache.js +79 -20
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +71 -99
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/compose.js +51 -42
- package/dist/sdk/compose.js.map +1 -1
- package/docs/AGENT_GUIDE.md +2 -2
- package/docs/ARCHITECTURE.md +2 -2
- package/docs/COMMANDS.md +8 -4
- package/docs/CONFIGURATION.md +1 -1
- package/docs/EXTENSIONS.md +12 -12
- package/docs/ONBOARDING.md +4 -2
- package/docs/README.md +2 -0
- package/docs/examples/starter-extension/README.md +11 -10
- package/marketplace.json +3 -3
- package/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +2 -2
- package/plugins/pm-claude/README.md +6 -3
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/dist/cli-bundle/chunks/activity-WEIEMM73.js +0 -16
- package/dist/cli-bundle/chunks/chunk-5GVTFFTC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7NSPKJUS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7TH5NMVB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AIAIXG7I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AJEBCRIY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GFMSLORL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-I66WE2HE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JXAUVO6X.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-K2VYLVX4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NRZS637N.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SPM2XLWI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SYNKD3ZG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TPOFWBMY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XWGEMNBR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YLZZ6T54.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YPKFV2JR.js.map +0 -1
- package/dist/cli-bundle/chunks/close-YCWQQPDS.js +0 -14
- package/dist/cli-bundle/chunks/close-many-2IV4J2TR.js.map +0 -1
- package/dist/cli-bundle/chunks/close-many-SWY34BII.js.map +0 -7
- package/dist/cli-bundle/chunks/create-XTMAPS7I.js +0 -28
- package/dist/cli-bundle/chunks/health-L2U3AFKV.js.map +0 -1
- package/dist/cli-bundle/chunks/health-MM7AWXYF.js.map +0 -7
- package/dist/cli-bundle/chunks/history-DD7L7BNL.js +0 -18
- package/dist/cli-bundle/chunks/history-redact-IX4YEWMY.js +0 -19
- package/dist/cli-bundle/chunks/init-HHVQQP6C.js +0 -22
- package/dist/cli-bundle/chunks/next-QM6YJIIS.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-CCOKZ2IQ.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-HUCENIEQ.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-ROSNIL52.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-XN4ZRHSV.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-CFSB2MS3.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-KRLAHEL2.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-4PASGJDB.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-MBN4KGUM.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-5UEAGG3W.js +0 -17
- package/dist/cli-bundle/chunks/update-MTCFES6X.js +0 -24
- package/dist/cli-bundle/chunks/validate-732RWS5W.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-W7H5TEDC.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-CUC4JY3U.js.map → activity-5YWLSPGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-WEIEMM73.js.map → activity-BIML7K2D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-SW5PNGCS.js.map → aggregate-2V2M3JZU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-DKUTRY6R.js.map → aggregate-EK7DXML7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-UBM632FK.js.map → append-EZESUVJT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-H32VOR2Y.js.map → append-JFG4WQMG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XTHQWXVC.js.map → chunk-32IUNTG4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IEEJQCZ4.js.map → chunk-3W2HJKJX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JMK5GCK2.js.map → chunk-4PFVUUYV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MRD4T5LF.js.map → chunk-5E7N4T2Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S62UANU7.js.map → chunk-5IZUBZBR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BTX5MIQF.js.map → chunk-5JIWFWOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SYVUU7EK.js.map → chunk-67LARBDL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KIYCOJ63.js.map → chunk-6CDCWKSX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3LCUASYG.js.map → chunk-6NYJGMTY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2ASNV4DH.js.map → chunk-7CLLC75T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FFOQHGNH.js.map → chunk-7LYO6S5A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-55XRYWEG.js.map → chunk-A3OQ7TFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q6K2OACU.js.map → chunk-AIKU3IIL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TTHCEV5Q.js.map → chunk-BE2SR6QL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7W4H4K26.js.map → chunk-ECU6MMTQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5PGBHRY3.js.map → chunk-EQURFOMH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H4GRLYJS.js.map → chunk-ER4ME5U2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QH3FSKRJ.js.map → chunk-ERG65A2L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UWKEJMZU.js.map → chunk-F6WNBITZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-U2BEEM2X.js.map → chunk-FH2H3CBD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EUKTMRN3.js.map → chunk-FUFFPIYA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7MYWF4ZX.js.map → chunk-FZJM2TXF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CYBDUHNO.js.map → chunk-GUYNUXQT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZNT7KEWE.js.map → chunk-GVJE5T7Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XEWQKDYZ.js.map → chunk-HQAF23Q2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KLXF7NCC.js.map → chunk-JBZ2NTKX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4NUOWFBT.js.map → chunk-K5DT2YKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KCO2EAN5.js.map → chunk-KEZOIPCR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2227673O.js.map → chunk-LBE5QFMZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UGLU6Q2I.js.map → chunk-LOWVNZBZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y4NRKBFW.js.map → chunk-MDHWWBNZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LRKMWUUV.js.map → chunk-MEZZZBYX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q6NXOHS6.js.map → chunk-NOIEVOK5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GRRG3MCT.js.map → chunk-NZ7QIUP5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZNHEYCDD.js.map → chunk-P5L7Z2O6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6ZMBJRDJ.js.map → chunk-PULUSQAV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EMPGXBUF.js.map → chunk-QCDTQCMW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HQTPRV4D.js.map → chunk-SU2E4AWU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3Q2HBMTI.js.map → chunk-SU3TB4NS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XCHUVHKU.js.map → chunk-SYE6WMV6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2KWL5NPW.js.map → chunk-T3P7PMZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N2JSWVWG.js.map → chunk-T4XBKJ3F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UTSH5GWX.js.map → chunk-U5TR4N7J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UT73HUPC.js.map → chunk-UMNQZS4H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CZPVDLD2.js.map → chunk-WJA3PXW7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WJAMWAHZ.js.map → chunk-WRYERRZX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6ITZLD4T.js.map → chunk-WYOIIFSE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IG5JYZGU.js.map → chunk-YPWUSH72.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KN3URLKS.js.map → chunk-YSDFIY7N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2CHRYUXL.js.map → chunk-YSGTMDWC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-36UGKF4O.js.map → chunk-YVKZ3ANP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A6VOGKBA.js.map → chunk-Z5F6XZXE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LTRAF2D7.js.map → chunk-Z7RPDF2Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W47SML5B.js.map → chunk-ZFTKYWIF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-SENTPZBN.js.map → claim-2BGBGSVI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-Z7MEQCBT.js.map → claim-5GU7OE67.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-YCWQQPDS.js.map → close-6YODBUIV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-424MX4CU.js.map → close-AFVKPR57.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-4FGNTSNV.js.map → comments-DNWHEBOS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-7YS5MY5X.js.map → comments-RW23R3VE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-G74GISC4.js.map → config-AUM5WBYA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-BZJKK7FZ.js.map → config-OZWSA2NP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-ZQY54JNS.js.map → context-OYXRGY7S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-LHVKJSPJ.js.map → context-PKCEHQY3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-CP2EZJC7.js.map → contracts-L6ODXNUM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-FIZLMP7O.js.map → contracts-X74F2GSM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-GYNQQPW2.js.map → copy-6XOR3HKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-TLW7JTQT.js.map → copy-I4NCLBR4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-VSKYSOCD.js.map → create-PM45M6PE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-XTMAPS7I.js.map → create-Z7YCH3BE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ANTOTI2I.js.map → delete-7YXHYG67.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-4W5JYCEG.js.map → delete-LPISP43T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-HPPE6MJN.js.map → deps-N2T26FME.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-ZQZN54EZ.js.map → deps-WATKQDE3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-RPOVFMP3.js.map → docs-6LQ3GLM7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-XJNYBJGE.js.map → docs-Z3X6JZLT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-RFBI5FGS.js.map → eval-6DCLG52D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-DM6JBZTS.js.map → eval-Y3ZCUTHK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-B3YY4WY5.js.map → extension-BNINIMT7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-TTSEFQTS.js.map → extension-QWE4YYK5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-5D65CHGE.js.map → files-6SGKHS6O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-GPIG77EN.js.map → files-FUYPSOFJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-ZHN7WIGX.js.map → focus-2Q3K76G2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-C3PEJV2C.js.map → focus-ATLBWXXD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-D4JQ6OWN.js.map → gc-RUYEMNRF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-VZIXDL32.js.map → gc-TDWSDR66.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-IOVAN6RU.js.map → get-2WGLX74N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-GIBRUUOP.js.map → get-LY6M2JIM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-DD7L7BNL.js.map → history-CGNQJXFE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-IL7XCEX2.js.map → history-SGRRS72R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-MV25P7DM.js.map → history-compact-LOED43R3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-HALOTOU7.js.map → history-compact-V5DNAQHH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-VYCWQFK7.js.map → history-redact-IRL7WJ3E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-IX4YEWMY.js.map → history-redact-N3JK7VBW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-44MODPQF.js.map → history-repair-4WVBVHFR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-CPNAOCNF.js.map → history-repair-PGYQJMGD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-F27NHENZ.js.map → init-4GESW7RM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-HHVQQP6C.js.map → init-XIDPABA4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-HJVDQIGY.js.map → learnings-4BHWFFUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-XSFSUUWK.js.map → learnings-4FJY7WIW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-HPMEKCAA.js.map → list-472TIOVK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-VMPWTURB.js.map → list-D7BF5CL2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-GDZIKGR6.js.map → notes-6KNOSLIT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-WDDBPC4D.js.map → notes-W4UEICGF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-BGDR73Z6.js.map → plan-JO6V7BXO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-C5IMM335.js.map → plan-MJQW5XK3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-ZCGKHDKL.js.map → register-setup-3QJY43CY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-VIAWYFP5.js.map → register-setup-AJWUSSQX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-4CBWUMCX.js.map → restore-44IHMMZZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-5UEAGG3W.js.map → restore-EXHU34EU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-6VFKNKCM.js.map → scheduling-shortcuts-OLHNLAZY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-ERHCVTEM.js.map → scheduling-shortcuts-TSBK4AY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-TDGK6N3I.js.map → schema-IB2NZZWD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-UE5KKAUX.js.map → schema-VBCELP5G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-K4CFLQ5S.js.map → search-7UBETML4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-FP7MEU4S.js.map → search-R227JOL6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-XT6QRKQY.js.map → stats-FAG7COEH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-NJJCALEZ.js.map → stats-MCK7PLYS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-5SQ5UDXC.js.map → telemetry-DRPDZMAO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-HVXFZA2U.js.map → telemetry-GVVUQSJQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-YCDAUBWF.js.map → test-QY44WAMR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-UFSJ5YIO.js.map → test-SY76DZTO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-PM7UYN42.js.map → test-all-QD6QAEG7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-2BWKY3GQ.js.map → test-all-USPJHXFR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-FK5E75AA.js.map → test-runs-MG5VIGSK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-H4TGWGRN.js.map → test-runs-QIR5MJPL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-MTCFES6X.js.map → update-A7EICML6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-Y5WQVT5O.js.map → update-IKJZWLQC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-JTKKSA7Y.js.map → update-many-BEMTDA2X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-6YAYYRLE.js.map → update-many-RATAARHU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-JUDU7YL4.js.map → upgrade-NWMR3VQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-DTAHZ236.js.map → upgrade-VU46BLJZ.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/bootstrap-args.ts","../../../../../../../../cli/commands/extension/shared.ts"],"sourcesContent":["/**\n * @module cli/bootstrap-args\n *\n * Provides CLI runtime support for Bootstrap Args.\n */\nimport { resolveSubcommandFlagContractsForCommand, type CliFlagContract } from \"../sdk/cli-contracts.js\";\nimport { levenshteinDistanceWithinLimit } from \"../core/shared/levenshtein.js\";\n\nfunction parseBootstrapPathToken(\n token: string,\n next: string | undefined,\n): { consumed: number; pathValue?: string; preferred: boolean } | null {\n if (token === \"--path\" || token === \"--pm-path\") {\n if (typeof next === \"string\" && next.length > 0) {\n return {\n consumed: 2,\n pathValue: next,\n preferred: token === \"--pm-path\",\n };\n }\n return {\n consumed: 1,\n preferred: token === \"--pm-path\",\n };\n }\n\n const inlinePrefix = token.startsWith(\"--path=\")\n ? \"--path=\"\n : token.startsWith(\"--pm-path=\")\n ? \"--pm-path=\"\n : undefined;\n if (!inlinePrefix) {\n return null;\n }\n\n const value = token.slice(inlinePrefix.length);\n if (value.length > 0) {\n return {\n consumed: 1,\n pathValue: value,\n preferred: inlinePrefix === \"--pm-path=\",\n };\n }\n return {\n consumed: 1,\n preferred: inlinePrefix === \"--pm-path=\",\n };\n}\n\n/**\n * Documents the bootstrap global options payload exchanged by command, SDK, and package integrations.\n */\nexport interface BootstrapGlobalOptions {\n path?: string;\n noExtensions: boolean;\n noPager: boolean;\n json: boolean;\n quiet: boolean;\n}\n\n/**\n * Implements parse bootstrap global options for the public runtime surface of this module.\n */\nexport function parseBootstrapGlobalOptions(argv: string[]): BootstrapGlobalOptions {\n let legacyPathValue: string | undefined;\n let pmPathValue: string | undefined;\n let noExtensions = false;\n let noPager = false;\n let json = false;\n let quiet = false;\n let index = 0;\n while (index < argv.length) {\n const token = argv[index];\n if (token === \"--\") {\n break;\n }\n if (token === \"--no-extensions\") {\n noExtensions = true;\n index += 1;\n continue;\n }\n if (token === \"--no-pager\") {\n noPager = true;\n index += 1;\n continue;\n }\n if (token === \"--json\") {\n json = true;\n index += 1;\n continue;\n }\n if (token === \"--quiet\") {\n quiet = true;\n index += 1;\n continue;\n }\n const parsedPath = parseBootstrapPathToken(token, argv[index + 1]);\n if (parsedPath) {\n if (parsedPath.pathValue !== undefined) {\n if (parsedPath.preferred) {\n pmPathValue = parsedPath.pathValue;\n } else {\n legacyPathValue = parsedPath.pathValue;\n }\n }\n index += parsedPath.consumed;\n continue;\n }\n index += 1;\n }\n return {\n path: pmPathValue ?? legacyPathValue,\n noExtensions,\n noPager,\n json,\n quiet,\n };\n}\n\n/**\n * Implements strip global bootstrap tokens for the public runtime surface of this module.\n */\nexport function stripGlobalBootstrapTokens(argv: string[]): string[] {\n const remaining: string[] = [];\n let index = 0;\n while (index < argv.length) {\n const token = argv[index];\n if (token === \"--\") {\n break;\n }\n if (\n token === \"--json\" ||\n token === \"--quiet\" ||\n token === \"--no-extensions\" ||\n token === \"--no-pager\" ||\n token === \"--profile\" ||\n token === \"--id-only\" ||\n token === \"--explain\"\n ) {\n index += 1;\n continue;\n }\n if (token === \"--path\" || token === \"--pm-path\") {\n index += 2;\n continue;\n }\n if (token.startsWith(\"--path=\") || token.startsWith(\"--pm-path=\")) {\n index += 1;\n continue;\n }\n remaining.push(token);\n index += 1;\n }\n return remaining;\n}\n\n/**\n * Documents the bootstrap help request payload exchanged by command, SDK, and package integrations.\n */\nexport interface BootstrapHelpRequest {\n requested: boolean;\n commandPathTokens: string[];\n}\n\n/**\n * Implements parse bootstrap help request for the public runtime surface of this module.\n */\nexport function parseBootstrapHelpRequest(argv: string[]): BootstrapHelpRequest {\n const stripped = stripGlobalBootstrapTokens(argv);\n const first = stripped[0]?.trim().toLowerCase();\n if (first === \"help\") {\n const commandPathTokens: string[] = [];\n for (let index = 1; index < stripped.length; index += 1) {\n const token = stripped[index];\n if (token.startsWith(\"-\")) {\n break;\n }\n commandPathTokens.push(token.trim().toLowerCase());\n }\n return {\n requested: true,\n commandPathTokens,\n };\n }\n\n const helpFlagIndex = stripped.findIndex((token) => token === \"--help\" || token === \"-h\");\n if (helpFlagIndex < 0) {\n return {\n requested: false,\n commandPathTokens: [],\n };\n }\n\n const commandPathTokens: string[] = [];\n for (const token of stripped) {\n if (token.startsWith(\"-\")) {\n break;\n }\n commandPathTokens.push(token.trim().toLowerCase());\n }\n return {\n requested: true,\n commandPathTokens,\n };\n}\n\n/**\n * Index of the command token in argv — the first non-flag token, skipping the\n * value-consuming/global bootstrap flags. Returns undefined when there is none\n * (bare invocation, only global flags, or a leading `--`). Single source of truth\n * for command-position scanning shared by {@link parseBootstrapCommandName} and the\n * command-alias rewrite so their precedence rules can never drift apart.\n */\nfunction findCommandTokenIndex(argv: string[]): number | undefined {\n for (let index = 0; index < argv.length; index += 1) {\n const token = argv[index];\n if (token === \"--\") {\n return undefined;\n }\n if (token === \"--path\" || token === \"--pm-path\") {\n index += 1;\n continue;\n }\n if (\n token.startsWith(\"--path=\") ||\n token.startsWith(\"--pm-path=\") ||\n token === \"--json\" ||\n token === \"--quiet\" ||\n token === \"--no-extensions\" ||\n token === \"--no-pager\" ||\n token === \"--profile\" ||\n token === \"--id-only\" ||\n token === \"--explain\"\n ) {\n continue;\n }\n if (token.startsWith(\"-\")) {\n continue;\n }\n return index;\n }\n return undefined;\n}\n\n/**\n * Implements parse bootstrap command name for the public runtime surface of this module.\n */\nexport function parseBootstrapCommandName(argv: string[]): string | undefined {\n const index = findCommandTokenIndex(argv);\n return index === undefined ? undefined : argv[index].trim().toLowerCase();\n}\n\nfunction shouldDisablePagerForInvocation(argv: string[], bootstrapGlobal: BootstrapGlobalOptions): boolean {\n if (bootstrapGlobal.noPager) {\n return true;\n }\n if (process.stdout.isTTY === true) {\n return false;\n }\n const helpRequest = parseBootstrapHelpRequest(argv);\n return helpRequest.requested;\n}\n\n/**\n * Implements apply bootstrap pager policy for the public runtime surface of this module.\n */\nexport function applyBootstrapPagerPolicy(argv: string[]): void {\n const bootstrapGlobal = parseBootstrapGlobalOptions(argv);\n if (!shouldDisablePagerForInvocation(argv, bootstrapGlobal)) {\n return;\n }\n process.env.PAGER = \"cat\";\n process.env.MANPAGER = \"cat\";\n process.env.GIT_PAGER = \"cat\";\n if (typeof process.env.LESS !== \"string\" || process.env.LESS.trim().length === 0) {\n process.env.LESS = \"FRX\";\n }\n}\n\ntype ExtensionSubcommandAction =\n | \"init\"\n | \"install\"\n | \"uninstall\"\n | \"explore\"\n | \"manage\"\n | \"doctor\"\n | \"adopt\"\n | \"adopt-all\"\n | \"activate\"\n | \"deactivate\";\n\nconst EXTENSION_ACTION_SYNTAX_TOKENS = new Set<ExtensionSubcommandAction>([\n \"install\",\n \"uninstall\",\n \"explore\",\n \"manage\",\n \"doctor\",\n \"adopt\",\n \"adopt-all\",\n \"activate\",\n \"deactivate\",\n]);\n\n/**\n * Implements normalize legacy extension action syntax for the public runtime surface of this module.\n */\nexport function normalizeLegacyExtensionActionSyntax(argv: string[]): string[] {\n const extensionIndex = argv.findIndex((token) => token === \"extension\");\n if (extensionIndex < 0) {\n return [...argv];\n }\n const actionToken = argv[extensionIndex + 1];\n if (!actionToken || actionToken.startsWith(\"-\")) {\n return [...argv];\n }\n if (!EXTENSION_ACTION_SYNTAX_TOKENS.has(actionToken as ExtensionSubcommandAction)) {\n return [...argv];\n }\n if (argv.includes(\"--help\") || argv.includes(\"-h\")) {\n return [...argv];\n }\n const forcedActionFlag = `--${actionToken}`;\n if (argv.includes(forcedActionFlag)) {\n return [...argv];\n }\n return [...argv.slice(0, extensionIndex + 1), forcedActionFlag, ...argv.slice(extensionIndex + 2)];\n}\n\ntype BootstrapNormalizationReason =\n | \"legacy_extension_action\"\n | \"command_alias\"\n | \"flag_alias\"\n | \"flag_typo\"\n | \"bare_key_value\"\n | \"list_merge\";\ntype BootstrapNormalizationConfidence = \"high\" | \"medium\";\n\n/**\n * Executable command aliases: a leading command token here is rewritten to its\n * canonical command BEFORE commander parses, so the alias actually runs instead of\n * merely being suggested. These are the highest-frequency aliases real agents type\n * (telemetry: `pm show <id>` alone is the single most common unknown-command) and\n * each target takes the same positional/flags as the alias (with `--comment`/\n * `--note`/`--learning` flag-aliased to `--add` on the target command). Keeping this\n * in one place means the alias is consistent across registration, commander dispatch,\n * telemetry, and error handling — all of which read the normalized argv.\n */\nexport const EXECUTABLE_COMMAND_ALIASES: Readonly<Record<string, string>> = {\n show: \"get\",\n view: \"get\",\n comment: \"comments\",\n note: \"notes\",\n learning: \"learnings\",\n};\n\n/**\n * Rewrite a leading command-alias token (e.g. `show` -> `get`) in place. Only the\n * command position is considered — the same token appearing later as an argument\n * (`pm get show`) is left untouched — and only when it is not preceded by `--` or a\n * value-consuming global flag, mirroring {@link parseBootstrapCommandName}.\n */\nfunction rewriteCommandAlias(argv: string[], trace: BootstrapNormalizationEvent[]): string[] {\n const index = findCommandTokenIndex(argv);\n if (index === undefined) {\n return argv;\n }\n const token = argv[index];\n const canonical = EXECUTABLE_COMMAND_ALIASES[token.trim().toLowerCase()];\n if (!canonical) {\n return argv;\n }\n const rewritten = [...argv];\n rewritten[index] = canonical;\n trace.push({ from: token, to: [canonical], reason: \"command_alias\", confidence: \"high\" });\n return rewritten;\n}\n\n/**\n * Documents the bootstrap normalization event payload exchanged by command, SDK, and package integrations.\n */\nexport interface BootstrapNormalizationEvent {\n from: string;\n to: string[];\n reason: BootstrapNormalizationReason;\n confidence: BootstrapNormalizationConfidence;\n}\n\n/**\n * Documents the bootstrap invocation normalization result payload exchanged by command, SDK, and package integrations.\n */\nexport interface BootstrapInvocationNormalizationResult {\n argv: string[];\n commandName: string | undefined;\n trace: BootstrapNormalizationEvent[];\n}\n\ninterface FlagLookup {\n canonicalByNormalized: Map<string, string | null>;\n canonicalByCompact: Map<string, string | null>;\n canonicalComparables: Array<{ canonicalFlag: string; comparable: string }>;\n listCanonicalFlags: Set<string>;\n}\n\nfunction normalizeFlagKeyToken(raw: string): string {\n const withoutPrefix = raw.replace(/^--?/, \"\");\n return withoutPrefix\n .replace(/_/g, \"-\")\n .replace(/([a-z0-9])([A-Z])/g, \"$1-$2\")\n .toLowerCase();\n}\n\nfunction toComparableFlagKey(raw: string): string {\n return normalizeFlagKeyToken(raw).replace(/-/g, \"\");\n}\n\nfunction markUnambiguousFlag(\n map: Map<string, string | null>,\n key: string,\n canonicalFlag: string,\n): void {\n const existing = map.get(key);\n if (existing === undefined) {\n map.set(key, canonicalFlag);\n return;\n }\n if (existing !== canonicalFlag) {\n map.set(key, null);\n }\n}\n\nfunction collectLongFlagCandidates(contract: CliFlagContract): string[] {\n const candidates: string[] = [];\n const pushLongFlag = (value: string | undefined): void => {\n if (typeof value !== \"string\") {\n return;\n }\n if (!value.startsWith(\"--\")) {\n return;\n }\n candidates.push(value);\n };\n pushLongFlag(contract.flag);\n for (const alias of contract.aliases ?? []) {\n pushLongFlag(alias);\n }\n return candidates;\n}\n\nfunction buildFlagLookup(\n commandName: string | undefined,\n contractsOverride?: CliFlagContract[],\n): FlagLookup {\n const contracts = contractsOverride ?? resolveSubcommandFlagContractsForCommand(commandName);\n const canonicalByNormalized = new Map<string, string | null>();\n const canonicalByCompact = new Map<string, string | null>();\n const canonicalComparablesMap = new Map<string, string>();\n const listCanonicalFlags = new Set<string>();\n for (const contract of contracts) {\n const longCandidates = collectLongFlagCandidates(contract);\n if (longCandidates.length === 0) {\n continue;\n }\n const canonicalFlag = `--${normalizeFlagKeyToken(longCandidates[0])}`;\n for (const candidate of longCandidates) {\n markUnambiguousFlag(canonicalByNormalized, normalizeFlagKeyToken(candidate), canonicalFlag);\n markUnambiguousFlag(canonicalByCompact, toComparableFlagKey(candidate), canonicalFlag);\n }\n const comparable = toComparableFlagKey(canonicalFlag);\n if (!canonicalComparablesMap.has(canonicalFlag)) {\n canonicalComparablesMap.set(canonicalFlag, comparable);\n }\n if (contract.list === true) {\n listCanonicalFlags.add(canonicalFlag);\n }\n }\n return {\n canonicalByNormalized,\n canonicalByCompact,\n canonicalComparables: [...canonicalComparablesMap.entries()].map(([canonicalFlag, comparable]) => ({\n canonicalFlag,\n comparable,\n })),\n listCanonicalFlags,\n };\n}\n\nfunction resolveCanonicalFlag(\n rawKey: string,\n lookup: FlagLookup,\n): { flag: string; reason: \"flag_alias\" | \"flag_typo\"; confidence: BootstrapNormalizationConfidence } | null {\n const normalizedKey = normalizeFlagKeyToken(rawKey);\n const direct = lookup.canonicalByNormalized.get(normalizedKey);\n if (typeof direct === \"string\") {\n return {\n flag: direct,\n reason: \"flag_alias\",\n confidence: \"high\",\n };\n }\n const comparableKey = normalizedKey.replace(/-/g, \"\");\n const compactMatch = lookup.canonicalByCompact.get(comparableKey);\n if (typeof compactMatch === \"string\") {\n return {\n flag: compactMatch,\n reason: \"flag_alias\",\n confidence: \"high\",\n };\n }\n const maxDistance = comparableKey.length >= 8 ? 2 : 1;\n let bestDistance = Number.POSITIVE_INFINITY;\n let bestFlag: string | undefined;\n let tied = false;\n for (const candidate of lookup.canonicalComparables) {\n const distance = levenshteinDistanceWithinLimit(comparableKey, candidate.comparable, maxDistance);\n if (distance === null) {\n continue;\n }\n if (distance < bestDistance) {\n bestDistance = distance;\n bestFlag = candidate.canonicalFlag;\n tied = false;\n continue;\n }\n if (distance === bestDistance && bestFlag !== candidate.canonicalFlag) {\n tied = true;\n }\n }\n if (!bestFlag || tied || !Number.isFinite(bestDistance) || bestDistance <= 0) {\n return null;\n }\n return {\n flag: bestFlag,\n reason: \"flag_typo\",\n confidence: bestDistance >= 2 ? \"medium\" : \"high\",\n };\n}\n\n/**\n * Implements list alias plural keys for the public runtime surface of this module.\n */\nexport function listAliasPluralKeys(normalizedKey: string): string[] {\n const candidates = [`${normalizedKey}s`];\n if (normalizedKey.endsWith(\"y\") && normalizedKey.length > 1) {\n candidates.push(`${normalizedKey.slice(0, -1)}ies`);\n }\n return candidates;\n}\n\nfunction parseBareKeyValueToken(token: string): { key: string; value: string } | null {\n if (token.includes(\"://\")) {\n return null;\n }\n const match = token.match(/^([A-Za-z][A-Za-z0-9_-]{1,63})([:=])(.*)$/);\n if (!match) {\n return null;\n }\n const key = match[1];\n const value = match[3];\n if (value.length === 0) {\n return null;\n }\n return {\n key,\n value,\n };\n}\n\nfunction normalizeLongOptionToken(\n token: string,\n lookup: FlagLookup,\n): { tokens: string[]; event?: BootstrapNormalizationEvent } {\n if (!token.startsWith(\"--\")) {\n return { tokens: [token] };\n }\n const equalsIndex = token.indexOf(\"=\");\n const key = equalsIndex >= 0 ? token.slice(0, equalsIndex) : token;\n const inlineValue = equalsIndex >= 0 ? token.slice(equalsIndex + 1) : undefined;\n const resolution = resolveCanonicalFlag(key, lookup);\n if (!resolution) {\n return { tokens: [token] };\n }\n const normalizedToken = inlineValue === undefined ? resolution.flag : `${resolution.flag}=${inlineValue}`;\n if (normalizedToken === token) {\n return { tokens: [token] };\n }\n return {\n tokens: [normalizedToken],\n event: {\n from: token,\n to: [normalizedToken],\n reason: resolution.reason,\n confidence: resolution.confidence,\n },\n };\n}\n\n// Global option flags whose value may legitimately begin with \"--\" (commander\n// accepts such values). Their value token must not be reinterpreted as a list\n// flag during coalescing. `--pm-path <dir>` and its legacy `--path <dir>`\n// alias are the documented cases; other globals\n// (--json/--quiet/--no-extensions/--no-pager/--profile) are boolean.\nconst GLOBAL_VALUE_CONSUMING_FLAGS = new Set<string>([\"--pm-path\", \"--path\"]);\n\nfunction splitCanonicalListToken(token: string): { flag: string; inlineValue?: string } | null {\n if (!token.startsWith(\"--\")) {\n return null;\n }\n const equalsIndex = token.indexOf(\"=\");\n if (equalsIndex < 0) {\n return { flag: token };\n }\n return {\n flag: token.slice(0, equalsIndex),\n inlineValue: token.slice(equalsIndex + 1),\n };\n}\n\ninterface ListFlagSlot {\n outputIndex: number;\n originalTokens: string[];\n values: string[];\n occurrences: number;\n}\n\ninterface ListFlagOccurrence {\n originalTokens: string[];\n value: string | undefined;\n consumed: number;\n}\n\ninterface ValuedListFlagOccurrence {\n originalTokens: string[];\n value: string;\n}\n\nfunction copyValueConsumingFlag(argv: string[], index: number, result: (string | null)[]): number {\n result.push(argv[index]);\n const next = argv[index + 1];\n if (typeof next === \"string\" && next !== \"--\") {\n result.push(next);\n return index + 2;\n }\n return index + 1;\n}\n\nfunction readListFlagOccurrence(\n argv: string[],\n index: number,\n parsed: { flag: string; inlineValue?: string },\n multiValueListFlags: Set<string>,\n): ListFlagOccurrence {\n if (parsed.inlineValue !== undefined) {\n return {\n originalTokens: [argv[index]],\n value: parsed.inlineValue,\n consumed: 1,\n };\n }\n\n const values: string[] = [];\n let valueIndex = index + 1;\n while (\n valueIndex < argv.length &&\n argv[valueIndex] !== \"--\" &&\n !argv[valueIndex].startsWith(\"-\") &&\n (values.length === 0 || multiValueListFlags.has(parsed.flag))\n ) {\n values.push(argv[valueIndex]);\n valueIndex += 1;\n }\n\n const consumed = values.length === 0 ? 1 : 1 + values.length;\n return {\n originalTokens: argv.slice(index, index + consumed),\n value: values.length === 0 ? undefined : values.join(\",\"),\n consumed,\n };\n}\n\nfunction recordListFlagOccurrence(\n slots: Map<string, ListFlagSlot>,\n result: (string | null)[],\n flag: string,\n occurrence: ValuedListFlagOccurrence,\n): void {\n const existing = slots.get(flag);\n if (existing) {\n existing.values.push(occurrence.value);\n existing.occurrences += 1;\n return;\n }\n\n slots.set(flag, {\n outputIndex: result.length,\n originalTokens: occurrence.originalTokens,\n values: [occurrence.value],\n occurrences: 1,\n });\n // Reserve the anchor position; finalized after the walk so we know the full\n // merged value or can restore the original token form for single uses.\n result.push(null);\n}\n\nfunction buildListFlagCoalescingSplices(\n slots: Map<string, ListFlagSlot>,\n multiValueListFlags: Set<string>,\n): {\n events: BootstrapNormalizationEvent[];\n splices: Array<{ outputIndex: number; tokens: string[] }>;\n} {\n const events: BootstrapNormalizationEvent[] = [];\n const splices: Array<{ outputIndex: number; tokens: string[] }> = [];\n for (const [flag, slot] of slots) {\n const shouldMerge = slot.occurrences >= 2 || (multiValueListFlags.has(flag) && slot.originalTokens.length > 2);\n if (!shouldMerge) {\n splices.push({ outputIndex: slot.outputIndex, tokens: slot.originalTokens });\n continue;\n }\n const mergedToken = `${flag}=${slot.values.join(\",\")}`;\n splices.push({ outputIndex: slot.outputIndex, tokens: [mergedToken] });\n events.push({\n from: `${flag} (x${slot.occurrences})`,\n to: [mergedToken],\n reason: \"list_merge\",\n confidence: \"high\",\n });\n }\n return { events, splices };\n}\n\nfunction applyListFlagSplices(result: (string | null)[], splices: Array<{ outputIndex: number; tokens: string[] }>): void {\n splices.sort((a, b) => b.outputIndex - a.outputIndex);\n for (const splice of splices) {\n result.splice(splice.outputIndex, 1, ...splice.tokens);\n }\n}\n\n/**\n * Coalesce repeated occurrences of comma-separated list flags into a single\n * `--flag=v1,v2,v3` token anchored at the FIRST occurrence. Without this,\n * Commander treats these flags as scalars and silently keeps only the last\n * value (data loss). Both `--flag value` and `--flag=value` forms are merged;\n * a value-less occurrence is preserved untouched, and a `--` terminator stops\n * coalescing (remainder is passed through verbatim).\n *\n * `valueConsumingFlags` lists option flags (e.g. global `--path`) whose value\n * may itself begin with `--`. Their value token is emitted verbatim so a\n * list-flag-looking value (`--path --tags`) is never reinterpreted as a flag\n * nor allowed to swallow the following command/positional token.\n */\nexport function coalesceRepeatedListFlags(\n argv: string[],\n listFlags: Set<string>,\n valueConsumingFlags: Set<string> = new Set(),\n multiValueListFlags: Set<string> = new Set(),\n): { argv: string[]; events: BootstrapNormalizationEvent[] } {\n if (listFlags.size === 0) {\n return { argv: [...argv], events: [] };\n }\n\n const result: (string | null)[] = [];\n const slots = new Map<string, ListFlagSlot>();\n let index = 0;\n while (index < argv.length) {\n const token = argv[index];\n if (token === \"--\") {\n result.push(...argv.slice(index));\n break;\n }\n // A value-consuming option in space form owns the next token as its value,\n // even when that value begins with \"--\". Emit both verbatim so the value is\n // never misread as a list-flag occurrence.\n if (valueConsumingFlags.has(token)) {\n index = copyValueConsumingFlag(argv, index, result);\n continue;\n }\n const parsed = splitCanonicalListToken(token);\n if (!parsed || !listFlags.has(parsed.flag)) {\n result.push(token);\n index += 1;\n continue;\n }\n\n const occurrence = readListFlagOccurrence(argv, index, parsed, multiValueListFlags);\n if (occurrence.value === undefined) {\n // Value-less occurrence: leave untouched, do not coalesce.\n result.push(token);\n index += occurrence.consumed;\n continue;\n }\n\n recordListFlagOccurrence(slots, result, parsed.flag, {\n originalTokens: occurrence.originalTokens,\n value: occurrence.value,\n });\n index += occurrence.consumed;\n }\n\n // Apply anchor splices from the end so earlier indices stay valid when a\n // single-occurrence anchor expands back into two tokens.\n const { events, splices } = buildListFlagCoalescingSplices(slots, multiValueListFlags);\n applyListFlagSplices(result, splices);\n\n return { argv: result as string[], events };\n}\n\n/**\n * Linked-test entry keys accepted in the two-token form `pm test <id> --add command\n * \"npm test -- parser\"` (GH-191). Only entry-identity keys are merged: `command`/`cmd`\n * name the shell command and `path` names the test file, so a single key=value entry is\n * meaningful for them. Other structured keys (scope, env_set, assertions, ...) cannot\n * form a valid standalone entry and are left for the normal parser to reject. `--remove`\n * matches existing entries by `command=`/`path=` only, so `cmd` is excluded there.\n * Key names mirror STRUCTURED_LINKED_TEST_KEYS in src/cli/commands/linked-test-entry.ts.\n */\nconst LINKED_TEST_TWO_TOKEN_KEYS_BY_FLAG: ReadonlyMap<string, ReadonlySet<string>> = new Map([\n [\"--add\", new Set([\"command\", \"cmd\", \"path\"])],\n [\"--remove\", new Set([\"command\", \"path\"])],\n]);\n\n/**\n * Sandbox-safe linked-test commands legitimately start with env assignments\n * (`PM_PATH=... PM_GLOBAL_PATH=... vitest run -- parser`), which look like bare\n * key=value settings tokens. When the two preceding tokens are a linked-test\n * flag plus a bare two-token key (`--add command <value>`), the value must be\n * left intact for mergeLinkedTestTwoTokenEntries instead of being rewritten\n * into a canonical flag (e.g. PM_PATH= -> --pm-path), which would silently\n * corrupt the command into `--add command --pm-path ...`.\n */\nfunction isLinkedTestTwoTokenValuePosition(commandName: string | undefined, emittedTokens: readonly string[]): boolean {\n if (commandName !== \"test\" || emittedTokens.length < 2) {\n return false;\n }\n const key = emittedTokens[emittedTokens.length - 1];\n const flag = emittedTokens[emittedTokens.length - 2];\n const keys = LINKED_TEST_TWO_TOKEN_KEYS_BY_FLAG.get(flag);\n return keys !== undefined && keys.has(key);\n}\n\n/**\n * Accept the two-token linked-test form `pm test <id> --add command \"npm test -- parser\"`\n * by merging the bare key token and its single quoted value into the documented\n * `--add command=...` shape. Without this merge Commander binds the bare key as the\n * option value and treats the quoted command as an excess positional, failing with\n * \"too many arguments\" (GH-191). The merge only fires when EXACTLY ONE non-flag token\n * follows the bare key, i.e. the value was quoted into one shell token — an unquoted\n * multi-token value stays ambiguous (it may swallow the item id), still fails fast, and\n * is routed to targeted quoting guidance by the commander error classifier instead.\n */\nexport function mergeLinkedTestTwoTokenEntries(\n argv: string[],\n commandName: string | undefined,\n trace: BootstrapNormalizationEvent[],\n): string[] {\n if (commandName !== \"test\") {\n return argv;\n }\n const result: string[] = [];\n let index = 0;\n while (index < argv.length) {\n const token = argv[index];\n if (token === \"--\") {\n result.push(...argv.slice(index));\n return result;\n }\n const keys = LINKED_TEST_TWO_TOKEN_KEYS_BY_FLAG.get(token);\n const key = keys ? argv[index + 1] : undefined;\n if (!keys || typeof key !== \"string\" || !keys.has(key)) {\n result.push(token);\n index += 1;\n continue;\n }\n let runEnd = index + 2;\n while (runEnd < argv.length && !argv[runEnd].startsWith(\"-\")) {\n runEnd += 1;\n }\n if (runEnd - (index + 2) !== 1) {\n result.push(token);\n index += 1;\n continue;\n }\n const value = argv[index + 2];\n const mergedValue = `${key}=${value}`;\n result.push(token, mergedValue);\n trace.push({\n from: `${token} ${key} ${value}`,\n to: [token, mergedValue],\n reason: \"bare_key_value\",\n confidence: \"high\",\n });\n index += 3;\n }\n return result;\n}\n\n/**\n * Implements normalize bootstrap invocation for the public runtime surface of this module.\n */\nexport function normalizeBootstrapInvocation(argv: string[]): BootstrapInvocationNormalizationResult {\n const trace: BootstrapNormalizationEvent[] = [];\n const legacyNormalized = normalizeLegacyExtensionActionSyntax(argv);\n if (legacyNormalized.length !== argv.length || legacyNormalized.some((token, index) => token !== argv[index])) {\n trace.push({\n from: argv.join(\" \"),\n to: [...legacyNormalized],\n reason: \"legacy_extension_action\",\n confidence: \"high\",\n });\n }\n const aliasNormalized = rewriteCommandAlias(legacyNormalized, trace);\n const commandName = parseBootstrapCommandName(aliasNormalized);\n const commandPathName = parseBootstrapCommandPathName(aliasNormalized);\n const lookup = buildFlagLookup(commandPathName ?? commandName);\n const normalizedArgv: string[] = [];\n for (let index = 0; index < aliasNormalized.length; index += 1) {\n const token = aliasNormalized[index];\n if (token === \"--\") {\n normalizedArgv.push(...aliasNormalized.slice(index));\n break;\n }\n const previous = normalizedArgv[normalizedArgv.length - 1];\n if (token.startsWith(\"--\")) {\n const normalizedToken = normalizeLongOptionToken(token, lookup);\n normalizedArgv.push(...normalizedToken.tokens);\n if (normalizedToken.event) {\n trace.push(normalizedToken.event);\n }\n continue;\n }\n const bareKeyValue = parseBareKeyValueToken(token);\n if (\n bareKeyValue &&\n !(typeof previous === \"string\" && previous.startsWith(\"-\")) &&\n !isLinkedTestTwoTokenValuePosition(commandName, normalizedArgv)\n ) {\n const resolution = resolveCanonicalFlag(bareKeyValue.key, lookup);\n if (resolution) {\n const replacement = [resolution.flag, bareKeyValue.value];\n normalizedArgv.push(...replacement);\n trace.push({\n from: token,\n to: replacement,\n reason: \"bare_key_value\",\n confidence: resolution.confidence,\n });\n continue;\n }\n }\n normalizedArgv.push(token);\n }\n const linkedTestNormalized = mergeLinkedTestTwoTokenEntries(normalizedArgv, commandName, trace);\n const coalesced = coalesceRepeatedListFlags(\n linkedTestNormalized,\n lookup.listCanonicalFlags,\n GLOBAL_VALUE_CONSUMING_FLAGS,\n commandName === \"create\" ? new Set([\"--tags\"]) : new Set(),\n );\n for (const event of coalesced.events) {\n trace.push(event);\n }\n return {\n argv: coalesced.argv,\n commandName,\n trace,\n };\n}\n\nfunction parseBootstrapCommandPathName(argv: string[]): string | undefined {\n const stripped = stripGlobalBootstrapTokens(argv);\n const first = stripped[0]?.trim().toLowerCase();\n const second = stripped[1]?.trim().toLowerCase();\n if (\n (first === \"extension\" || first === \"package\" || first === \"packages\") &&\n typeof second === \"string\" &&\n second.length > 0 &&\n !second.startsWith(\"-\")\n ) {\n return `${first} ${second}`;\n }\n return first;\n}\n\n/**\n * Implements parse bootstrap type value for the public runtime surface of this module.\n */\nexport function parseBootstrapTypeValue(argv: string[]): string | undefined {\n for (let index = 0; index < argv.length; index += 1) {\n const token = argv[index];\n if (token === \"--type\") {\n const candidate = argv[index + 1];\n if (typeof candidate === \"string\" && candidate.trim().length > 0) {\n return candidate.trim();\n }\n continue;\n }\n if (token.startsWith(\"--type=\")) {\n const candidate = token.slice(\"--type=\".length).trim();\n if (candidate.length > 0) {\n return candidate;\n }\n }\n }\n return undefined;\n}\n\nexport const _testOnly = {\n buildFlagLookup,\n collectLongFlagCandidates,\n markUnambiguousFlag,\n normalizeLongOptionToken,\n resolveCanonicalFlag,\n};\n","/**\n * @module cli/commands/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 type { ExtensionManifest } from \"../../../core/extensions/loader.js\";\n\nexport const DEFAULT_EXTENSION_PRIORITY = 100;\n\n/**\n * Documents the validated extension directory payload exchanged by command, SDK, and package integrations.\n */\nexport interface ValidatedExtensionDirectory {\n directory: string;\n manifest_path: string;\n entry_path: string;\n manifest: ExtensionManifest;\n}\n\n/**\n * Implements normalize string list for the public runtime surface of this module.\n */\nexport function normalizeStringList(values: readonly string[]): string[] {\n return [...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) =>\n left.localeCompare(right),\n );\n}\n\n/**\n * Implements normalize extension name for match for the public runtime surface of this module.\n */\nexport function normalizeExtensionNameForMatch(value: string): string {\n return value.trim().toLowerCase();\n}\n\n/**\n * Implements normalize managed directory name for the public runtime surface of this module.\n */\nexport function normalizeManagedDirectoryName(name: string): string {\n const normalized = name\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9._-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n if (normalized.length === 0) {\n throw new PmCliError(\"Extension manifest name must resolve to a non-empty directory name.\", EXIT_CODE.USAGE);\n }\n if (normalized === \".\" || normalized === \"..\") {\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(\"Extension manifest name must not resolve to \\\".\\\" or \\\"..\\\".\", EXIT_CODE.USAGE);\n }\n return normalized;\n}\n\n/**\n * Implements parse extension manifest for the public runtime surface of this module.\n */\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 (typeof candidate.name !== \"string\" || candidate.name.trim().length === 0) {\n return null;\n }\n if (typeof candidate.version !== \"string\" || candidate.version.trim().length === 0) {\n return null;\n }\n if (typeof candidate.entry !== \"string\" || candidate.entry.trim().length === 0) {\n return null;\n }\n\n let priority = DEFAULT_EXTENSION_PRIORITY;\n if (candidate.priority !== undefined && candidate.priority !== null) {\n if (typeof candidate.priority !== \"number\" || !Number.isInteger(candidate.priority)) {\n return null;\n }\n priority = candidate.priority;\n }\n\n let capabilities: string[] = [];\n if (candidate.capabilities !== undefined && candidate.capabilities !== null) {\n if (!Array.isArray(candidate.capabilities) || candidate.capabilities.some((value) => typeof value !== \"string\")) {\n return null;\n }\n capabilities = normalizeStringList(candidate.capabilities.map((value) => String(value).toLowerCase()));\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/**\n * Implements check whether canonical path within directory for the public runtime surface of this module.\n */\nexport async function isCanonicalPathWithinDirectory(directory: string, targetPath: string): Promise<boolean> {\n const [resolvedDirectory, resolvedTargetPath] = await Promise.all([fs.realpath(directory), fs.realpath(targetPath)]);\n return isPathWithinDirectory(resolvedDirectory, resolvedTargetPath);\n}\n\n/**\n * Implements validate extension directory for the public runtime surface of this module.\n */\nexport async function validateExtensionDirectory(directory: string): Promise<ValidatedExtensionDirectory> {\n const manifestPath = path.join(directory, \"manifest.json\");\n if (!(await pathExists(manifestPath))) {\n throw new PmCliError(`Extension manifest is missing at \"${manifestPath}\".`, EXIT_CODE.USAGE);\n }\n\n let parsedManifest: unknown;\n try {\n parsedManifest = JSON.parse(await fs.readFile(manifestPath, \"utf8\")) 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(`Extension manifest at \"${manifestPath}\" is invalid.`, EXIT_CODE.USAGE);\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(`Extension entry file is missing at \"${entryPath}\".`, EXIT_CODE.USAGE);\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\nexport const _testOnlyExtensionShared = {\n formatManifestReadError,\n};\n"],"names":["commandPathTokens"],"mappings":";;;;;;;;;;;;;;AAQA,SAAS,wBACP,OACA,MAAwB;AAExB,MAAI,UAAU,YAAY,UAAU,aAAa;AAC/C,QAAI,OAAO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I;AACF,qBAAiB,KAAK,MAAM,MAAM,GAAG,SAAS,cAAc,MAAM,CAAC;EACrE,SAAS,OAAgB;AACvB,UAAM,IAAI,WACR,0CAA0C,YAAY,MAAM,wBAAwB,KAAK,CAAC,IAC1F,UAAU,KAAK;EAEnB;AAEA,QAAM,WAAW,uBAAuB,cAAc;AACtD,MAAI,CAAC,UAAU;AACb,UAAM,IAAI,WAAW,0BAA0B,YAAY,iBAAiB,UAAU,KAAK;EAC7F;AAEA,QAAM,YAAY,KAAK,QAAQ,WAAW,SAAS,KAAK;AACxD,MAAI,CAAC,sBAAsB,WAAW,SAAS,GAAG;AAChD,UAAM,IAAI,WACR,oBAAoB,SAAS,KAAK,2CAA2C,SAAS,MACtF,UAAU,KAAK;EAEnB;AACA,MAAI,CAAE,MAAM,WAAW,SAAS,GAAI;AAClC,UAAM,IAAI,WAAW,uCAAuC,SAAS,MAAM,UAAU,KAAK;EAC5F;AACA,MAAI,CAAE,MAAM,+BAA+B,WAAW,SAAS,GAAI;AACjE,UAAM,IAAI,WACR,oBAAoB,SAAS,KAAK,oEAClC,UAAU,KAAK;EAEnB;AAEA,SAAO;IACL;IACA,eAAe;IACf,YAAY;IACZ;;AAEJ;AAEA,SAAS,wBAAwB,OAAc;AAC7C,SAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC9D","debugId":"bbea8d94-04ff-5f5e-9dde-660e98ee0b8c"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/bootstrap-args.ts","../../../../../../../../cli/commands/extension/shared.ts"],"sourcesContent":["/**\n * @module cli/bootstrap-args\n *\n * Provides CLI runtime support for Bootstrap Args.\n */\nimport { resolveSubcommandFlagContractsForCommand, type CliFlagContract } from \"../sdk/cli-contracts.js\";\nimport { levenshteinDistanceWithinLimit } from \"../core/shared/levenshtein.js\";\n\nfunction parseBootstrapPathToken(\n token: string,\n next: string | undefined,\n): { consumed: number; pathValue?: string; preferred: boolean } | null {\n if (token === \"--path\" || token === \"--pm-path\") {\n if (typeof next === \"string\" && next.length > 0) {\n return {\n consumed: 2,\n pathValue: next,\n preferred: token === \"--pm-path\",\n };\n }\n return {\n consumed: 1,\n preferred: token === \"--pm-path\",\n };\n }\n\n const inlinePrefix = token.startsWith(\"--path=\")\n ? \"--path=\"\n : token.startsWith(\"--pm-path=\")\n ? \"--pm-path=\"\n : undefined;\n if (!inlinePrefix) {\n return null;\n }\n\n const value = token.slice(inlinePrefix.length);\n if (value.length > 0) {\n return {\n consumed: 1,\n pathValue: value,\n preferred: inlinePrefix === \"--pm-path=\",\n };\n }\n return {\n consumed: 1,\n preferred: inlinePrefix === \"--pm-path=\",\n };\n}\n\n/**\n * Documents the bootstrap global options payload exchanged by command, SDK, and package integrations.\n */\nexport interface BootstrapGlobalOptions {\n path?: string;\n noExtensions: boolean;\n noPager: boolean;\n json: boolean;\n quiet: boolean;\n}\n\n/**\n * Implements parse bootstrap global options for the public runtime surface of this module.\n */\nexport function parseBootstrapGlobalOptions(argv: string[]): BootstrapGlobalOptions {\n let legacyPathValue: string | undefined;\n let pmPathValue: string | undefined;\n let noExtensions = false;\n let noPager = false;\n let json = false;\n let quiet = false;\n let index = 0;\n while (index < argv.length) {\n const token = argv[index];\n if (token === \"--\") {\n break;\n }\n if (token === \"--no-extensions\") {\n noExtensions = true;\n index += 1;\n continue;\n }\n if (token === \"--no-pager\") {\n noPager = true;\n index += 1;\n continue;\n }\n if (token === \"--json\") {\n json = true;\n index += 1;\n continue;\n }\n if (token === \"--quiet\") {\n quiet = true;\n index += 1;\n continue;\n }\n const parsedPath = parseBootstrapPathToken(token, argv[index + 1]);\n if (parsedPath) {\n if (parsedPath.pathValue !== undefined) {\n if (parsedPath.preferred) {\n pmPathValue = parsedPath.pathValue;\n } else {\n legacyPathValue = parsedPath.pathValue;\n }\n }\n index += parsedPath.consumed;\n continue;\n }\n index += 1;\n }\n return {\n path: pmPathValue ?? legacyPathValue,\n noExtensions,\n noPager,\n json,\n quiet,\n };\n}\n\n/**\n * Implements strip global bootstrap tokens for the public runtime surface of this module.\n */\nexport function stripGlobalBootstrapTokens(argv: string[]): string[] {\n const remaining: string[] = [];\n let index = 0;\n while (index < argv.length) {\n const token = argv[index];\n if (token === \"--\") {\n break;\n }\n if (\n token === \"--json\" ||\n token === \"--quiet\" ||\n token === \"--no-extensions\" ||\n token === \"--no-pager\" ||\n token === \"--profile\" ||\n token === \"--id-only\" ||\n token === \"--explain\"\n ) {\n index += 1;\n continue;\n }\n if (token === \"--path\" || token === \"--pm-path\") {\n index += 2;\n continue;\n }\n if (token.startsWith(\"--path=\") || token.startsWith(\"--pm-path=\")) {\n index += 1;\n continue;\n }\n remaining.push(token);\n index += 1;\n }\n return remaining;\n}\n\n/**\n * Documents the bootstrap help request payload exchanged by command, SDK, and package integrations.\n */\nexport interface BootstrapHelpRequest {\n requested: boolean;\n commandPathTokens: string[];\n}\n\n/**\n * Implements parse bootstrap help request for the public runtime surface of this module.\n */\nexport function parseBootstrapHelpRequest(argv: string[]): BootstrapHelpRequest {\n const stripped = stripGlobalBootstrapTokens(argv);\n const first = stripped[0]?.trim().toLowerCase();\n if (first === \"help\") {\n const commandPathTokens: string[] = [];\n for (let index = 1; index < stripped.length; index += 1) {\n const token = stripped[index];\n if (token.startsWith(\"-\")) {\n break;\n }\n commandPathTokens.push(token.trim().toLowerCase());\n }\n return {\n requested: true,\n commandPathTokens,\n };\n }\n\n const helpFlagIndex = stripped.findIndex((token) => token === \"--help\" || token === \"-h\");\n if (helpFlagIndex < 0) {\n return {\n requested: false,\n commandPathTokens: [],\n };\n }\n\n const commandPathTokens: string[] = [];\n for (const token of stripped) {\n if (token.startsWith(\"-\")) {\n break;\n }\n commandPathTokens.push(token.trim().toLowerCase());\n }\n return {\n requested: true,\n commandPathTokens,\n };\n}\n\n/**\n * Index of the command token in argv — the first non-flag token, skipping the\n * value-consuming/global bootstrap flags. Returns undefined when there is none\n * (bare invocation, only global flags, or a leading `--`). Single source of truth\n * for command-position scanning shared by {@link parseBootstrapCommandName} and the\n * command-alias rewrite so their precedence rules can never drift apart.\n */\nfunction findCommandTokenIndex(argv: string[]): number | undefined {\n for (let index = 0; index < argv.length; index += 1) {\n const token = argv[index];\n if (token === \"--\") {\n return undefined;\n }\n if (token === \"--path\" || token === \"--pm-path\") {\n index += 1;\n continue;\n }\n if (\n token.startsWith(\"--path=\") ||\n token.startsWith(\"--pm-path=\") ||\n token === \"--json\" ||\n token === \"--quiet\" ||\n token === \"--no-extensions\" ||\n token === \"--no-pager\" ||\n token === \"--profile\" ||\n token === \"--id-only\" ||\n token === \"--explain\"\n ) {\n continue;\n }\n if (token.startsWith(\"-\")) {\n continue;\n }\n return index;\n }\n return undefined;\n}\n\n/**\n * Implements parse bootstrap command name for the public runtime surface of this module.\n */\nexport function parseBootstrapCommandName(argv: string[]): string | undefined {\n const index = findCommandTokenIndex(argv);\n return index === undefined ? undefined : argv[index].trim().toLowerCase();\n}\n\nfunction shouldDisablePagerForInvocation(argv: string[], bootstrapGlobal: BootstrapGlobalOptions): boolean {\n if (bootstrapGlobal.noPager) {\n return true;\n }\n if (process.stdout.isTTY === true) {\n return false;\n }\n const helpRequest = parseBootstrapHelpRequest(argv);\n return helpRequest.requested;\n}\n\n/**\n * Implements apply bootstrap pager policy for the public runtime surface of this module.\n */\nexport function applyBootstrapPagerPolicy(argv: string[]): void {\n const bootstrapGlobal = parseBootstrapGlobalOptions(argv);\n if (!shouldDisablePagerForInvocation(argv, bootstrapGlobal)) {\n return;\n }\n process.env.PAGER = \"cat\";\n process.env.MANPAGER = \"cat\";\n process.env.GIT_PAGER = \"cat\";\n if (typeof process.env.LESS !== \"string\" || process.env.LESS.trim().length === 0) {\n process.env.LESS = \"FRX\";\n }\n}\n\ntype ExtensionSubcommandAction =\n | \"init\"\n | \"install\"\n | \"uninstall\"\n | \"explore\"\n | \"manage\"\n | \"doctor\"\n | \"adopt\"\n | \"adopt-all\"\n | \"activate\"\n | \"deactivate\";\n\nconst EXTENSION_ACTION_SYNTAX_TOKENS = new Set<ExtensionSubcommandAction>([\n \"install\",\n \"uninstall\",\n \"explore\",\n \"manage\",\n \"doctor\",\n \"adopt\",\n \"adopt-all\",\n \"activate\",\n \"deactivate\",\n]);\n\n/**\n * Implements normalize legacy extension action syntax for the public runtime surface of this module.\n */\nexport function normalizeLegacyExtensionActionSyntax(argv: string[]): string[] {\n const extensionIndex = argv.findIndex((token) => token === \"extension\");\n if (extensionIndex < 0) {\n return [...argv];\n }\n const actionToken = argv[extensionIndex + 1];\n if (!actionToken || actionToken.startsWith(\"-\")) {\n return [...argv];\n }\n if (!EXTENSION_ACTION_SYNTAX_TOKENS.has(actionToken as ExtensionSubcommandAction)) {\n return [...argv];\n }\n if (argv.includes(\"--help\") || argv.includes(\"-h\")) {\n return [...argv];\n }\n const forcedActionFlag = `--${actionToken}`;\n if (argv.includes(forcedActionFlag)) {\n return [...argv];\n }\n return [...argv.slice(0, extensionIndex + 1), forcedActionFlag, ...argv.slice(extensionIndex + 2)];\n}\n\ntype BootstrapNormalizationReason =\n | \"legacy_extension_action\"\n | \"command_alias\"\n | \"flag_alias\"\n | \"flag_typo\"\n | \"bare_key_value\"\n | \"list_merge\";\ntype BootstrapNormalizationConfidence = \"high\" | \"medium\";\n\n/**\n * Executable command aliases: a leading command token here is rewritten to its\n * canonical command BEFORE commander parses, so the alias actually runs instead of\n * merely being suggested. These are the highest-frequency aliases real agents type\n * (telemetry: `pm show <id>` alone is the single most common unknown-command) and\n * each target takes the same positional/flags as the alias (with `--comment`/\n * `--note`/`--learning` flag-aliased to `--add` on the target command). Keeping this\n * in one place means the alias is consistent across registration, commander dispatch,\n * telemetry, and error handling — all of which read the normalized argv.\n */\nexport const EXECUTABLE_COMMAND_ALIASES: Readonly<Record<string, string>> = {\n show: \"get\",\n view: \"get\",\n comment: \"comments\",\n note: \"notes\",\n learning: \"learnings\",\n};\n\n/**\n * Rewrite a leading command-alias token (e.g. `show` -> `get`) in place. Only the\n * command position is considered — the same token appearing later as an argument\n * (`pm get show`) is left untouched — and only when it is not preceded by `--` or a\n * value-consuming global flag, mirroring {@link parseBootstrapCommandName}.\n */\nfunction rewriteCommandAlias(argv: string[], trace: BootstrapNormalizationEvent[]): string[] {\n const index = findCommandTokenIndex(argv);\n if (index === undefined) {\n return argv;\n }\n const token = argv[index];\n const canonical = EXECUTABLE_COMMAND_ALIASES[token.trim().toLowerCase()];\n if (!canonical) {\n return argv;\n }\n const rewritten = [...argv];\n rewritten[index] = canonical;\n trace.push({ from: token, to: [canonical], reason: \"command_alias\", confidence: \"high\" });\n return rewritten;\n}\n\n/**\n * Documents the bootstrap normalization event payload exchanged by command, SDK, and package integrations.\n */\nexport interface BootstrapNormalizationEvent {\n from: string;\n to: string[];\n reason: BootstrapNormalizationReason;\n confidence: BootstrapNormalizationConfidence;\n}\n\n/**\n * Documents the bootstrap invocation normalization result payload exchanged by command, SDK, and package integrations.\n */\nexport interface BootstrapInvocationNormalizationResult {\n argv: string[];\n commandName: string | undefined;\n trace: BootstrapNormalizationEvent[];\n}\n\ninterface FlagLookup {\n canonicalByNormalized: Map<string, string | null>;\n canonicalByCompact: Map<string, string | null>;\n canonicalComparables: Array<{ canonicalFlag: string; comparable: string }>;\n listCanonicalFlags: Set<string>;\n}\n\nfunction normalizeFlagKeyToken(raw: string): string {\n const withoutPrefix = raw.replace(/^--?/, \"\");\n return withoutPrefix\n .replace(/_/g, \"-\")\n .replace(/([a-z0-9])([A-Z])/g, \"$1-$2\")\n .toLowerCase();\n}\n\nfunction toComparableFlagKey(raw: string): string {\n return normalizeFlagKeyToken(raw).replace(/-/g, \"\");\n}\n\nfunction markUnambiguousFlag(\n map: Map<string, string | null>,\n key: string,\n canonicalFlag: string,\n): void {\n const existing = map.get(key);\n if (existing === undefined) {\n map.set(key, canonicalFlag);\n return;\n }\n if (existing !== canonicalFlag) {\n map.set(key, null);\n }\n}\n\nfunction collectLongFlagCandidates(contract: CliFlagContract): string[] {\n const candidates: string[] = [];\n const pushLongFlag = (value: string | undefined): void => {\n if (typeof value !== \"string\") {\n return;\n }\n if (!value.startsWith(\"--\")) {\n return;\n }\n candidates.push(value);\n };\n pushLongFlag(contract.flag);\n for (const alias of contract.aliases ?? []) {\n pushLongFlag(alias);\n }\n return candidates;\n}\n\nfunction buildFlagLookup(\n commandName: string | undefined,\n contractsOverride?: CliFlagContract[],\n): FlagLookup {\n const contracts = contractsOverride ?? resolveSubcommandFlagContractsForCommand(commandName);\n const canonicalByNormalized = new Map<string, string | null>();\n const canonicalByCompact = new Map<string, string | null>();\n const canonicalComparablesMap = new Map<string, string>();\n const listCanonicalFlags = new Set<string>();\n for (const contract of contracts) {\n const longCandidates = collectLongFlagCandidates(contract);\n if (longCandidates.length === 0) {\n continue;\n }\n const canonicalFlag = `--${normalizeFlagKeyToken(longCandidates[0])}`;\n for (const candidate of longCandidates) {\n markUnambiguousFlag(canonicalByNormalized, normalizeFlagKeyToken(candidate), canonicalFlag);\n markUnambiguousFlag(canonicalByCompact, toComparableFlagKey(candidate), canonicalFlag);\n }\n const comparable = toComparableFlagKey(canonicalFlag);\n if (!canonicalComparablesMap.has(canonicalFlag)) {\n canonicalComparablesMap.set(canonicalFlag, comparable);\n }\n if (contract.list === true) {\n listCanonicalFlags.add(canonicalFlag);\n }\n }\n return {\n canonicalByNormalized,\n canonicalByCompact,\n canonicalComparables: [...canonicalComparablesMap.entries()].map(([canonicalFlag, comparable]) => ({\n canonicalFlag,\n comparable,\n })),\n listCanonicalFlags,\n };\n}\n\nfunction resolveCanonicalFlag(\n rawKey: string,\n lookup: FlagLookup,\n): { flag: string; reason: \"flag_alias\" | \"flag_typo\"; confidence: BootstrapNormalizationConfidence } | null {\n const normalizedKey = normalizeFlagKeyToken(rawKey);\n const direct = lookup.canonicalByNormalized.get(normalizedKey);\n if (typeof direct === \"string\") {\n return {\n flag: direct,\n reason: \"flag_alias\",\n confidence: \"high\",\n };\n }\n const comparableKey = normalizedKey.replace(/-/g, \"\");\n const compactMatch = lookup.canonicalByCompact.get(comparableKey);\n if (typeof compactMatch === \"string\") {\n return {\n flag: compactMatch,\n reason: \"flag_alias\",\n confidence: \"high\",\n };\n }\n const maxDistance = comparableKey.length >= 8 ? 2 : 1;\n let bestDistance = Number.POSITIVE_INFINITY;\n let bestFlag: string | undefined;\n let tied = false;\n for (const candidate of lookup.canonicalComparables) {\n const distance = levenshteinDistanceWithinLimit(comparableKey, candidate.comparable, maxDistance);\n if (distance === null) {\n continue;\n }\n if (distance < bestDistance) {\n bestDistance = distance;\n bestFlag = candidate.canonicalFlag;\n tied = false;\n continue;\n }\n if (distance === bestDistance && bestFlag !== candidate.canonicalFlag) {\n tied = true;\n }\n }\n if (!bestFlag || tied || !Number.isFinite(bestDistance) || bestDistance <= 0) {\n return null;\n }\n return {\n flag: bestFlag,\n reason: \"flag_typo\",\n confidence: bestDistance >= 2 ? \"medium\" : \"high\",\n };\n}\n\n/**\n * Implements list alias plural keys for the public runtime surface of this module.\n */\nexport function listAliasPluralKeys(normalizedKey: string): string[] {\n const candidates = [`${normalizedKey}s`];\n if (normalizedKey.endsWith(\"y\") && normalizedKey.length > 1) {\n candidates.push(`${normalizedKey.slice(0, -1)}ies`);\n }\n return candidates;\n}\n\nfunction parseBareKeyValueToken(token: string): { key: string; value: string } | null {\n if (token.includes(\"://\")) {\n return null;\n }\n const match = token.match(/^([A-Za-z][A-Za-z0-9_-]{1,63})([:=])(.*)$/);\n if (!match) {\n return null;\n }\n const key = match[1];\n const value = match[3];\n if (value.length === 0) {\n return null;\n }\n return {\n key,\n value,\n };\n}\n\nfunction normalizeLongOptionToken(\n token: string,\n lookup: FlagLookup,\n): { tokens: string[]; event?: BootstrapNormalizationEvent } {\n if (!token.startsWith(\"--\")) {\n return { tokens: [token] };\n }\n const equalsIndex = token.indexOf(\"=\");\n const key = equalsIndex >= 0 ? token.slice(0, equalsIndex) : token;\n const inlineValue = equalsIndex >= 0 ? token.slice(equalsIndex + 1) : undefined;\n const resolution = resolveCanonicalFlag(key, lookup);\n if (!resolution) {\n return { tokens: [token] };\n }\n const normalizedToken = inlineValue === undefined ? resolution.flag : `${resolution.flag}=${inlineValue}`;\n if (normalizedToken === token) {\n return { tokens: [token] };\n }\n return {\n tokens: [normalizedToken],\n event: {\n from: token,\n to: [normalizedToken],\n reason: resolution.reason,\n confidence: resolution.confidence,\n },\n };\n}\n\n// Global option flags whose value may legitimately begin with \"--\" (commander\n// accepts such values). Their value token must not be reinterpreted as a list\n// flag during coalescing. `--pm-path <dir>` and its legacy `--path <dir>`\n// alias are the documented cases; other globals\n// (--json/--quiet/--no-extensions/--no-pager/--profile) are boolean.\nconst GLOBAL_VALUE_CONSUMING_FLAGS = new Set<string>([\"--pm-path\", \"--path\"]);\n\nfunction splitCanonicalListToken(token: string): { flag: string; inlineValue?: string } | null {\n if (!token.startsWith(\"--\")) {\n return null;\n }\n const equalsIndex = token.indexOf(\"=\");\n if (equalsIndex < 0) {\n return { flag: token };\n }\n return {\n flag: token.slice(0, equalsIndex),\n inlineValue: token.slice(equalsIndex + 1),\n };\n}\n\ninterface ListFlagSlot {\n outputIndex: number;\n originalTokens: string[];\n values: string[];\n occurrences: number;\n}\n\ninterface ListFlagOccurrence {\n originalTokens: string[];\n value: string | undefined;\n consumed: number;\n}\n\ninterface ValuedListFlagOccurrence {\n originalTokens: string[];\n value: string;\n}\n\nfunction copyValueConsumingFlag(argv: string[], index: number, result: (string | null)[]): number {\n result.push(argv[index]);\n const next = argv[index + 1];\n if (typeof next === \"string\" && next !== \"--\") {\n result.push(next);\n return index + 2;\n }\n return index + 1;\n}\n\nfunction readListFlagOccurrence(\n argv: string[],\n index: number,\n parsed: { flag: string; inlineValue?: string },\n multiValueListFlags: Set<string>,\n): ListFlagOccurrence {\n if (parsed.inlineValue !== undefined) {\n return {\n originalTokens: [argv[index]],\n value: parsed.inlineValue,\n consumed: 1,\n };\n }\n\n const values: string[] = [];\n let valueIndex = index + 1;\n while (\n valueIndex < argv.length &&\n argv[valueIndex] !== \"--\" &&\n !argv[valueIndex].startsWith(\"-\") &&\n (values.length === 0 || multiValueListFlags.has(parsed.flag))\n ) {\n values.push(argv[valueIndex]);\n valueIndex += 1;\n }\n\n const consumed = values.length === 0 ? 1 : 1 + values.length;\n return {\n originalTokens: argv.slice(index, index + consumed),\n value: values.length === 0 ? undefined : values.join(\",\"),\n consumed,\n };\n}\n\nfunction recordListFlagOccurrence(\n slots: Map<string, ListFlagSlot>,\n result: (string | null)[],\n flag: string,\n occurrence: ValuedListFlagOccurrence,\n): void {\n const existing = slots.get(flag);\n if (existing) {\n existing.values.push(occurrence.value);\n existing.occurrences += 1;\n return;\n }\n\n slots.set(flag, {\n outputIndex: result.length,\n originalTokens: occurrence.originalTokens,\n values: [occurrence.value],\n occurrences: 1,\n });\n // Reserve the anchor position; finalized after the walk so we know the full\n // merged value or can restore the original token form for single uses.\n result.push(null);\n}\n\nfunction buildListFlagCoalescingSplices(\n slots: Map<string, ListFlagSlot>,\n multiValueListFlags: Set<string>,\n): {\n events: BootstrapNormalizationEvent[];\n splices: Array<{ outputIndex: number; tokens: string[] }>;\n} {\n const events: BootstrapNormalizationEvent[] = [];\n const splices: Array<{ outputIndex: number; tokens: string[] }> = [];\n for (const [flag, slot] of slots) {\n const shouldMerge = slot.occurrences >= 2 || (multiValueListFlags.has(flag) && slot.originalTokens.length > 2);\n if (!shouldMerge) {\n splices.push({ outputIndex: slot.outputIndex, tokens: slot.originalTokens });\n continue;\n }\n const mergedToken = `${flag}=${slot.values.join(\",\")}`;\n splices.push({ outputIndex: slot.outputIndex, tokens: [mergedToken] });\n events.push({\n from: `${flag} (x${slot.occurrences})`,\n to: [mergedToken],\n reason: \"list_merge\",\n confidence: \"high\",\n });\n }\n return { events, splices };\n}\n\nfunction applyListFlagSplices(result: (string | null)[], splices: Array<{ outputIndex: number; tokens: string[] }>): void {\n splices.sort((a, b) => b.outputIndex - a.outputIndex);\n for (const splice of splices) {\n result.splice(splice.outputIndex, 1, ...splice.tokens);\n }\n}\n\n/**\n * Coalesce repeated occurrences of comma-separated list flags into a single\n * `--flag=v1,v2,v3` token anchored at the FIRST occurrence. Without this,\n * Commander treats these flags as scalars and silently keeps only the last\n * value (data loss). Both `--flag value` and `--flag=value` forms are merged;\n * a value-less occurrence is preserved untouched, and a `--` terminator stops\n * coalescing (remainder is passed through verbatim).\n *\n * `valueConsumingFlags` lists option flags (e.g. global `--path`) whose value\n * may itself begin with `--`. Their value token is emitted verbatim so a\n * list-flag-looking value (`--path --tags`) is never reinterpreted as a flag\n * nor allowed to swallow the following command/positional token.\n */\nexport function coalesceRepeatedListFlags(\n argv: string[],\n listFlags: Set<string>,\n valueConsumingFlags: Set<string> = new Set(),\n multiValueListFlags: Set<string> = new Set(),\n): { argv: string[]; events: BootstrapNormalizationEvent[] } {\n if (listFlags.size === 0) {\n return { argv: [...argv], events: [] };\n }\n\n const result: (string | null)[] = [];\n const slots = new Map<string, ListFlagSlot>();\n let index = 0;\n while (index < argv.length) {\n const token = argv[index];\n if (token === \"--\") {\n result.push(...argv.slice(index));\n break;\n }\n // A value-consuming option in space form owns the next token as its value,\n // even when that value begins with \"--\". Emit both verbatim so the value is\n // never misread as a list-flag occurrence.\n if (valueConsumingFlags.has(token)) {\n index = copyValueConsumingFlag(argv, index, result);\n continue;\n }\n const parsed = splitCanonicalListToken(token);\n if (!parsed || !listFlags.has(parsed.flag)) {\n result.push(token);\n index += 1;\n continue;\n }\n\n const occurrence = readListFlagOccurrence(argv, index, parsed, multiValueListFlags);\n if (occurrence.value === undefined) {\n // Value-less occurrence: leave untouched, do not coalesce.\n result.push(token);\n index += occurrence.consumed;\n continue;\n }\n\n recordListFlagOccurrence(slots, result, parsed.flag, {\n originalTokens: occurrence.originalTokens,\n value: occurrence.value,\n });\n index += occurrence.consumed;\n }\n\n // Apply anchor splices from the end so earlier indices stay valid when a\n // single-occurrence anchor expands back into two tokens.\n const { events, splices } = buildListFlagCoalescingSplices(slots, multiValueListFlags);\n applyListFlagSplices(result, splices);\n\n return { argv: result as string[], events };\n}\n\n/**\n * Linked-test entry keys accepted in the two-token form `pm test <id> --add command\n * \"npm test -- parser\"` (GH-191). Only entry-identity keys are merged: `command`/`cmd`\n * name the shell command and `path` names the test file, so a single key=value entry is\n * meaningful for them. Other structured keys (scope, env_set, assertions, ...) cannot\n * form a valid standalone entry and are left for the normal parser to reject. `--remove`\n * matches existing entries by `command=`/`path=` only, so `cmd` is excluded there.\n * Key names mirror STRUCTURED_LINKED_TEST_KEYS in src/cli/commands/linked-test-entry.ts.\n */\nconst LINKED_TEST_TWO_TOKEN_KEYS_BY_FLAG: ReadonlyMap<string, ReadonlySet<string>> = new Map([\n [\"--add\", new Set([\"command\", \"cmd\", \"path\"])],\n [\"--remove\", new Set([\"command\", \"path\"])],\n]);\n\n/**\n * Sandbox-safe linked-test commands legitimately start with env assignments\n * (`PM_PATH=... PM_GLOBAL_PATH=... vitest run -- parser`), which look like bare\n * key=value settings tokens. When the two preceding tokens are a linked-test\n * flag plus a bare two-token key (`--add command <value>`), the value must be\n * left intact for mergeLinkedTestTwoTokenEntries instead of being rewritten\n * into a canonical flag (e.g. PM_PATH= -> --pm-path), which would silently\n * corrupt the command into `--add command --pm-path ...`.\n */\nfunction isLinkedTestTwoTokenValuePosition(commandName: string | undefined, emittedTokens: readonly string[]): boolean {\n if (commandName !== \"test\" || emittedTokens.length < 2) {\n return false;\n }\n const key = emittedTokens[emittedTokens.length - 1];\n const flag = emittedTokens[emittedTokens.length - 2];\n const keys = LINKED_TEST_TWO_TOKEN_KEYS_BY_FLAG.get(flag);\n return keys !== undefined && keys.has(key);\n}\n\n/**\n * Accept the two-token linked-test form `pm test <id> --add command \"npm test -- parser\"`\n * by merging the bare key token and its single quoted value into the documented\n * `--add command=...` shape. Without this merge Commander binds the bare key as the\n * option value and treats the quoted command as an excess positional, failing with\n * \"too many arguments\" (GH-191). The merge only fires when EXACTLY ONE non-flag token\n * follows the bare key, i.e. the value was quoted into one shell token — an unquoted\n * multi-token value stays ambiguous (it may swallow the item id), still fails fast, and\n * is routed to targeted quoting guidance by the commander error classifier instead.\n */\nexport function mergeLinkedTestTwoTokenEntries(\n argv: string[],\n commandName: string | undefined,\n trace: BootstrapNormalizationEvent[],\n): string[] {\n if (commandName !== \"test\") {\n return argv;\n }\n const result: string[] = [];\n let index = 0;\n while (index < argv.length) {\n const token = argv[index];\n if (token === \"--\") {\n result.push(...argv.slice(index));\n return result;\n }\n const keys = LINKED_TEST_TWO_TOKEN_KEYS_BY_FLAG.get(token);\n const key = keys ? argv[index + 1] : undefined;\n if (!keys || typeof key !== \"string\" || !keys.has(key)) {\n result.push(token);\n index += 1;\n continue;\n }\n let runEnd = index + 2;\n while (runEnd < argv.length && !argv[runEnd].startsWith(\"-\")) {\n runEnd += 1;\n }\n if (runEnd - (index + 2) !== 1) {\n result.push(token);\n index += 1;\n continue;\n }\n const value = argv[index + 2];\n const mergedValue = `${key}=${value}`;\n result.push(token, mergedValue);\n trace.push({\n from: `${token} ${key} ${value}`,\n to: [token, mergedValue],\n reason: \"bare_key_value\",\n confidence: \"high\",\n });\n index += 3;\n }\n return result;\n}\n\n/**\n * Implements normalize bootstrap invocation for the public runtime surface of this module.\n */\nexport function normalizeBootstrapInvocation(argv: string[]): BootstrapInvocationNormalizationResult {\n const trace: BootstrapNormalizationEvent[] = [];\n const legacyNormalized = normalizeLegacyExtensionActionSyntax(argv);\n if (legacyNormalized.length !== argv.length || legacyNormalized.some((token, index) => token !== argv[index])) {\n trace.push({\n from: argv.join(\" \"),\n to: [...legacyNormalized],\n reason: \"legacy_extension_action\",\n confidence: \"high\",\n });\n }\n const aliasNormalized = rewriteCommandAlias(legacyNormalized, trace);\n const commandName = parseBootstrapCommandName(aliasNormalized);\n const commandPathName = parseBootstrapCommandPathName(aliasNormalized);\n const lookup = buildFlagLookup(commandPathName ?? commandName);\n const normalizedArgv: string[] = [];\n for (let index = 0; index < aliasNormalized.length; index += 1) {\n const token = aliasNormalized[index];\n if (token === \"--\") {\n normalizedArgv.push(...aliasNormalized.slice(index));\n break;\n }\n const previous = normalizedArgv[normalizedArgv.length - 1];\n if (token.startsWith(\"--\")) {\n const normalizedToken = normalizeLongOptionToken(token, lookup);\n normalizedArgv.push(...normalizedToken.tokens);\n if (normalizedToken.event) {\n trace.push(normalizedToken.event);\n }\n continue;\n }\n const bareKeyValue = parseBareKeyValueToken(token);\n if (\n bareKeyValue &&\n !(typeof previous === \"string\" && previous.startsWith(\"-\")) &&\n !isLinkedTestTwoTokenValuePosition(commandName, normalizedArgv)\n ) {\n const resolution = resolveCanonicalFlag(bareKeyValue.key, lookup);\n if (resolution) {\n const replacement = [resolution.flag, bareKeyValue.value];\n normalizedArgv.push(...replacement);\n trace.push({\n from: token,\n to: replacement,\n reason: \"bare_key_value\",\n confidence: resolution.confidence,\n });\n continue;\n }\n }\n normalizedArgv.push(token);\n }\n const linkedTestNormalized = mergeLinkedTestTwoTokenEntries(normalizedArgv, commandName, trace);\n const coalesced = coalesceRepeatedListFlags(\n linkedTestNormalized,\n lookup.listCanonicalFlags,\n GLOBAL_VALUE_CONSUMING_FLAGS,\n commandName === \"create\" ? new Set([\"--tags\"]) : new Set(),\n );\n for (const event of coalesced.events) {\n trace.push(event);\n }\n return {\n argv: coalesced.argv,\n commandName,\n trace,\n };\n}\n\nfunction parseBootstrapCommandPathName(argv: string[]): string | undefined {\n const stripped = stripGlobalBootstrapTokens(argv);\n const first = stripped[0]?.trim().toLowerCase();\n const second = stripped[1]?.trim().toLowerCase();\n if (\n (first === \"extension\" || first === \"package\" || first === \"packages\") &&\n typeof second === \"string\" &&\n second.length > 0 &&\n !second.startsWith(\"-\")\n ) {\n return `${first} ${second}`;\n }\n return first;\n}\n\n/**\n * Implements parse bootstrap type value for the public runtime surface of this module.\n */\nexport function parseBootstrapTypeValue(argv: string[]): string | undefined {\n for (let index = 0; index < argv.length; index += 1) {\n const token = argv[index];\n if (token === \"--type\") {\n const candidate = argv[index + 1];\n if (typeof candidate === \"string\" && candidate.trim().length > 0) {\n return candidate.trim();\n }\n continue;\n }\n if (token.startsWith(\"--type=\")) {\n const candidate = token.slice(\"--type=\".length).trim();\n if (candidate.length > 0) {\n return candidate;\n }\n }\n }\n return undefined;\n}\n\nexport const _testOnly = {\n buildFlagLookup,\n collectLongFlagCandidates,\n markUnambiguousFlag,\n normalizeLongOptionToken,\n resolveCanonicalFlag,\n};\n","/**\n * @module cli/commands/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 type { ExtensionManifest } from \"../../../core/extensions/loader.js\";\n\nexport const DEFAULT_EXTENSION_PRIORITY = 100;\n\n/**\n * Documents the validated extension directory payload exchanged by command, SDK, and package integrations.\n */\nexport interface ValidatedExtensionDirectory {\n directory: string;\n manifest_path: string;\n entry_path: string;\n manifest: ExtensionManifest;\n}\n\n/**\n * Implements normalize string list for the public runtime surface of this module.\n */\nexport function normalizeStringList(values: readonly string[]): string[] {\n return [...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) =>\n left.localeCompare(right),\n );\n}\n\n/**\n * Implements normalize extension name for match for the public runtime surface of this module.\n */\nexport function normalizeExtensionNameForMatch(value: string): string {\n return value.trim().toLowerCase();\n}\n\n/**\n * Implements normalize managed directory name for the public runtime surface of this module.\n */\nexport function normalizeManagedDirectoryName(name: string): string {\n const normalized = name\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9._-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n if (normalized.length === 0) {\n throw new PmCliError(\"Extension manifest name must resolve to a non-empty directory name.\", EXIT_CODE.USAGE);\n }\n if (normalized === \".\" || normalized === \"..\") {\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(\"Extension manifest name must not resolve to \\\".\\\" or \\\"..\\\".\", EXIT_CODE.USAGE);\n }\n return normalized;\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 (!Array.isArray(value) || value.some((entry) => typeof entry !== \"string\")) {\n return null;\n }\n return normalizeStringList(value.map((entry) => String(entry).toLowerCase()));\n}\n\n/**\n * Implements parse extension manifest for the public runtime surface of this module.\n */\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 (typeof candidate.name !== \"string\" || candidate.name.trim().length === 0) {\n return null;\n }\n if (typeof candidate.version !== \"string\" || candidate.version.trim().length === 0) {\n return null;\n }\n if (typeof candidate.entry !== \"string\" || candidate.entry.trim().length === 0) {\n return null;\n }\n\n const priority = parseOptionalManifestPriority(candidate.priority);\n const capabilities = parseOptionalManifestCapabilities(candidate.capabilities);\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/**\n * Implements check whether canonical path within directory for the public runtime surface of this module.\n */\nexport async function isCanonicalPathWithinDirectory(directory: string, targetPath: string): Promise<boolean> {\n const [resolvedDirectory, resolvedTargetPath] = await Promise.all([fs.realpath(directory), fs.realpath(targetPath)]);\n return isPathWithinDirectory(resolvedDirectory, resolvedTargetPath);\n}\n\n/**\n * Implements validate extension directory for the public runtime surface of this module.\n */\nexport async function validateExtensionDirectory(directory: string): Promise<ValidatedExtensionDirectory> {\n const manifestPath = path.join(directory, \"manifest.json\");\n if (!(await pathExists(manifestPath))) {\n throw new PmCliError(`Extension manifest is missing at \"${manifestPath}\".`, EXIT_CODE.USAGE);\n }\n\n let parsedManifest: unknown;\n try {\n parsedManifest = JSON.parse(await fs.readFile(manifestPath, \"utf8\")) 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(`Extension manifest at \"${manifestPath}\" is invalid.`, EXIT_CODE.USAGE);\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(`Extension entry file is missing at \"${entryPath}\".`, EXIT_CODE.USAGE);\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\nexport const _testOnlyExtensionShared = {\n formatManifestReadError,\n};\n"],"names":["commandPathTokens"],"mappings":";;;;;;;;;;;;;;AAQA,SAAS,wBACP,OACA,MAAwB;AAExB,MAAI,UAAU,YAAY,UAAU,aAAa;AAC/C,QAAI,OAAO,SAAS,YAAY,KAAK,SAAS,GAAG;AAC/C,aAAO;QACL,UAAU;QACV,WAAW;QACX,WAAW,UAAU;;IAEzB;AACA,WAAO;MACL,UAAU;MACV,WAAW,UAAU;;EAEzB;AAEA,QAAM,eAAe,MAAM,WAAW,SAAS,IAC3C,YACA,MAAM,WAAW,YAAY,IAC3B,eACA;AACN,MAAI,CAAC,cAAc;AACjB,WAAO;EACT;AAEA,QAAM,QAAQ,MAAM,MAA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AuB,cAAc;AACtD,MAAI,CAAC,UAAU;AACb,UAAM,IAAI,WAAW,0BAA0B,YAAY,iBAAiB,UAAU,KAAK;EAC7F;AAEA,QAAM,YAAY,KAAK,QAAQ,WAAW,SAAS,KAAK;AACxD,MAAI,CAAC,sBAAsB,WAAW,SAAS,GAAG;AAChD,UAAM,IAAI,WACR,oBAAoB,SAAS,KAAK,2CAA2C,SAAS,MACtF,UAAU,KAAK;EAEnB;AACA,MAAI,CAAE,MAAM,WAAW,SAAS,GAAI;AAClC,UAAM,IAAI,WAAW,uCAAuC,SAAS,MAAM,UAAU,KAAK;EAC5F;AACA,MAAI,CAAE,MAAM,+BAA+B,WAAW,SAAS,GAAI;AACjE,UAAM,IAAI,WACR,oBAAoB,SAAS,KAAK,oEAClC,UAAU,KAAK;EAEnB;AAEA,SAAO;IACL;IACA,eAAe;IACf,YAAY;IACZ;;AAEJ;AAEA,SAAS,wBAAwB,OAAc;AAC7C,SAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC9D","debugId":"7df0fcc5-8ff4-5817-b72d-925ba746d847"}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
PLAN_MODE_VALUES,
|
|
10
10
|
PLAN_STEP_LINK_KIND_VALUES,
|
|
11
11
|
PLAN_STEP_STATUS_VALUES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KHVGM5CS.js";
|
|
13
13
|
|
|
14
14
|
// dist/sdk/cli-contracts/commander-types.js
|
|
15
15
|
!(function() {
|
|
@@ -865,7 +865,7 @@ function normalizeUniqueStringList(values) {
|
|
|
865
865
|
!(function() {
|
|
866
866
|
try {
|
|
867
867
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
868
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
868
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "eb82ab31-2042-5c86-b4b9-af5a5e3aeb96");
|
|
869
869
|
} catch (e2) {
|
|
870
870
|
}
|
|
871
871
|
})();
|
|
@@ -931,28 +931,7 @@ var GLOBAL_FLAG_CONTRACTS = [
|
|
|
931
931
|
...SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,
|
|
932
932
|
{ flag: "--version" }
|
|
933
933
|
];
|
|
934
|
-
var
|
|
935
|
-
{ flag: "--status", list: true },
|
|
936
|
-
{ flag: "--type" },
|
|
937
|
-
{ flag: "--tag", aliases: ["--tags"] },
|
|
938
|
-
{ flag: "--priority" },
|
|
939
|
-
{ flag: "--deadline-before" },
|
|
940
|
-
{ flag: "--deadline-after" },
|
|
941
|
-
{ flag: "--updated-after" },
|
|
942
|
-
{ flag: "--updated-before" },
|
|
943
|
-
{ flag: "--created-after" },
|
|
944
|
-
{ flag: "--created-before" },
|
|
945
|
-
{ flag: "--ids", list: true },
|
|
946
|
-
{ flag: "--assignee" },
|
|
947
|
-
{ flag: "--assignee-filter" },
|
|
948
|
-
{ flag: "--assignee_filter" },
|
|
949
|
-
{ flag: "--parent" },
|
|
950
|
-
{ flag: "--sprint" },
|
|
951
|
-
{ flag: "--release" },
|
|
952
|
-
{ flag: "--filter-ac-missing" },
|
|
953
|
-
{ flag: "--filter-estimates-missing", aliases: ["--filter-estimate-missing"] },
|
|
954
|
-
{ flag: "--filter-resolution-missing" },
|
|
955
|
-
{ flag: "--filter-metadata-missing" },
|
|
934
|
+
var GOVERNANCE_AND_CONTENT_FILTER_FLAG_CONTRACTS = [
|
|
956
935
|
{ flag: "--filter-reviewer-missing" },
|
|
957
936
|
{ flag: "--filter-risk-missing" },
|
|
958
937
|
{ flag: "--filter-confidence-missing" },
|
|
@@ -975,7 +954,59 @@ var LIST_FILTER_FLAG_CONTRACTS = [
|
|
|
975
954
|
{ flag: "--has-body" },
|
|
976
955
|
{ flag: "--empty-body" },
|
|
977
956
|
{ flag: "--has-linked-command" },
|
|
978
|
-
{ flag: "--no-linked-command" }
|
|
957
|
+
{ flag: "--no-linked-command" }
|
|
958
|
+
];
|
|
959
|
+
var MANY_GOVERNANCE_AND_CONTENT_FILTER_FLAG_CONTRACTS = [
|
|
960
|
+
{ flag: "--filter-reviewer-missing" },
|
|
961
|
+
{ flag: "--filter-risk-missing" },
|
|
962
|
+
{ flag: "--filter-confidence-missing" },
|
|
963
|
+
{ flag: "--filter-sprint-missing" },
|
|
964
|
+
{ flag: "--filter-release-missing" },
|
|
965
|
+
{ flag: "--filter-has-notes" },
|
|
966
|
+
{ flag: "--filter-no-notes" },
|
|
967
|
+
{ flag: "--filter-has-learnings" },
|
|
968
|
+
{ flag: "--filter-no-learnings" },
|
|
969
|
+
{ flag: "--filter-has-files" },
|
|
970
|
+
{ flag: "--filter-no-files" },
|
|
971
|
+
{ flag: "--filter-has-docs" },
|
|
972
|
+
{ flag: "--filter-no-docs" },
|
|
973
|
+
{ flag: "--filter-has-tests" },
|
|
974
|
+
{ flag: "--filter-no-tests" },
|
|
975
|
+
{ flag: "--filter-has-comments" },
|
|
976
|
+
{ flag: "--filter-no-comments" },
|
|
977
|
+
{ flag: "--filter-has-deps" },
|
|
978
|
+
{ flag: "--filter-no-deps" },
|
|
979
|
+
{ flag: "--filter-has-body" },
|
|
980
|
+
{ flag: "--filter-empty-body" },
|
|
981
|
+
{ flag: "--filter-has-linked-command" },
|
|
982
|
+
{ flag: "--filter-no-linked-command" },
|
|
983
|
+
{ flag: "--ids", list: true },
|
|
984
|
+
{ flag: "--limit" },
|
|
985
|
+
{ flag: "--offset" }
|
|
986
|
+
];
|
|
987
|
+
var LIST_FILTER_FLAG_CONTRACTS = [
|
|
988
|
+
{ flag: "--status", list: true },
|
|
989
|
+
{ flag: "--type" },
|
|
990
|
+
{ flag: "--tag", aliases: ["--tags"] },
|
|
991
|
+
{ flag: "--priority" },
|
|
992
|
+
{ flag: "--deadline-before" },
|
|
993
|
+
{ flag: "--deadline-after" },
|
|
994
|
+
{ flag: "--updated-after" },
|
|
995
|
+
{ flag: "--updated-before" },
|
|
996
|
+
{ flag: "--created-after" },
|
|
997
|
+
{ flag: "--created-before" },
|
|
998
|
+
{ flag: "--ids", list: true },
|
|
999
|
+
{ flag: "--assignee" },
|
|
1000
|
+
{ flag: "--assignee-filter" },
|
|
1001
|
+
{ flag: "--assignee_filter" },
|
|
1002
|
+
{ flag: "--parent" },
|
|
1003
|
+
{ flag: "--sprint" },
|
|
1004
|
+
{ flag: "--release" },
|
|
1005
|
+
{ flag: "--filter-ac-missing" },
|
|
1006
|
+
{ flag: "--filter-estimates-missing", aliases: ["--filter-estimate-missing"] },
|
|
1007
|
+
{ flag: "--filter-resolution-missing" },
|
|
1008
|
+
{ flag: "--filter-metadata-missing" },
|
|
1009
|
+
...GOVERNANCE_AND_CONTENT_FILTER_FLAG_CONTRACTS,
|
|
979
1010
|
{ flag: "--limit" },
|
|
980
1011
|
{ flag: "--offset" },
|
|
981
1012
|
{ flag: "--no-truncate", aliases: ["--all"] },
|
|
@@ -1411,32 +1442,7 @@ var CLOSE_MANY_FLAG_CONTRACTS = [
|
|
|
1411
1442
|
{ flag: "--filter-parent" },
|
|
1412
1443
|
{ flag: "--filter-sprint" },
|
|
1413
1444
|
{ flag: "--filter-release" },
|
|
1414
|
-
|
|
1415
|
-
{ flag: "--filter-risk-missing" },
|
|
1416
|
-
{ flag: "--filter-confidence-missing" },
|
|
1417
|
-
{ flag: "--filter-sprint-missing" },
|
|
1418
|
-
{ flag: "--filter-release-missing" },
|
|
1419
|
-
{ flag: "--filter-has-notes" },
|
|
1420
|
-
{ flag: "--filter-no-notes" },
|
|
1421
|
-
{ flag: "--filter-has-learnings" },
|
|
1422
|
-
{ flag: "--filter-no-learnings" },
|
|
1423
|
-
{ flag: "--filter-has-files" },
|
|
1424
|
-
{ flag: "--filter-no-files" },
|
|
1425
|
-
{ flag: "--filter-has-docs" },
|
|
1426
|
-
{ flag: "--filter-no-docs" },
|
|
1427
|
-
{ flag: "--filter-has-tests" },
|
|
1428
|
-
{ flag: "--filter-no-tests" },
|
|
1429
|
-
{ flag: "--filter-has-comments" },
|
|
1430
|
-
{ flag: "--filter-no-comments" },
|
|
1431
|
-
{ flag: "--filter-has-deps" },
|
|
1432
|
-
{ flag: "--filter-no-deps" },
|
|
1433
|
-
{ flag: "--filter-has-body" },
|
|
1434
|
-
{ flag: "--filter-empty-body" },
|
|
1435
|
-
{ flag: "--filter-has-linked-command" },
|
|
1436
|
-
{ flag: "--filter-no-linked-command" },
|
|
1437
|
-
{ flag: "--ids", list: true },
|
|
1438
|
-
{ flag: "--limit" },
|
|
1439
|
-
{ flag: "--offset" },
|
|
1445
|
+
...MANY_GOVERNANCE_AND_CONTENT_FILTER_FLAG_CONTRACTS,
|
|
1440
1446
|
{ flag: "--reason" },
|
|
1441
1447
|
{ flag: "--resolution" },
|
|
1442
1448
|
{ flag: "--expected-result", aliases: ["--expected_result", "--expected"] },
|
|
@@ -1858,32 +1864,7 @@ var UPDATE_MANY_FLAG_CONTRACTS = [
|
|
|
1858
1864
|
{ flag: "--filter-estimates-missing", aliases: ["--filter-estimate-missing"] },
|
|
1859
1865
|
{ flag: "--filter-resolution-missing" },
|
|
1860
1866
|
{ flag: "--filter-metadata-missing" },
|
|
1861
|
-
|
|
1862
|
-
{ flag: "--filter-risk-missing" },
|
|
1863
|
-
{ flag: "--filter-confidence-missing" },
|
|
1864
|
-
{ flag: "--filter-sprint-missing" },
|
|
1865
|
-
{ flag: "--filter-release-missing" },
|
|
1866
|
-
{ flag: "--filter-has-notes" },
|
|
1867
|
-
{ flag: "--filter-no-notes" },
|
|
1868
|
-
{ flag: "--filter-has-learnings" },
|
|
1869
|
-
{ flag: "--filter-no-learnings" },
|
|
1870
|
-
{ flag: "--filter-has-files" },
|
|
1871
|
-
{ flag: "--filter-no-files" },
|
|
1872
|
-
{ flag: "--filter-has-docs" },
|
|
1873
|
-
{ flag: "--filter-no-docs" },
|
|
1874
|
-
{ flag: "--filter-has-tests" },
|
|
1875
|
-
{ flag: "--filter-no-tests" },
|
|
1876
|
-
{ flag: "--filter-has-comments" },
|
|
1877
|
-
{ flag: "--filter-no-comments" },
|
|
1878
|
-
{ flag: "--filter-has-deps" },
|
|
1879
|
-
{ flag: "--filter-no-deps" },
|
|
1880
|
-
{ flag: "--filter-has-body" },
|
|
1881
|
-
{ flag: "--filter-empty-body" },
|
|
1882
|
-
{ flag: "--filter-has-linked-command" },
|
|
1883
|
-
{ flag: "--filter-no-linked-command" },
|
|
1884
|
-
{ flag: "--ids", list: true },
|
|
1885
|
-
{ flag: "--limit" },
|
|
1886
|
-
{ flag: "--offset" },
|
|
1867
|
+
...MANY_GOVERNANCE_AND_CONTENT_FILTER_FLAG_CONTRACTS,
|
|
1887
1868
|
{ flag: "--dry-run" },
|
|
1888
1869
|
{ flag: "--rollback" },
|
|
1889
1870
|
{ flag: "--no-checkpoint" },
|
|
@@ -2130,29 +2111,7 @@ var SEARCH_FLAG_CONTRACTS = [
|
|
|
2130
2111
|
{ flag: "--sprint" },
|
|
2131
2112
|
{ flag: "--release" },
|
|
2132
2113
|
{ flag: "--parent" },
|
|
2133
|
-
|
|
2134
|
-
{ flag: "--filter-risk-missing" },
|
|
2135
|
-
{ flag: "--filter-confidence-missing" },
|
|
2136
|
-
{ flag: "--filter-sprint-missing" },
|
|
2137
|
-
{ flag: "--filter-release-missing" },
|
|
2138
|
-
{ flag: "--has-notes" },
|
|
2139
|
-
{ flag: "--no-notes" },
|
|
2140
|
-
{ flag: "--has-learnings" },
|
|
2141
|
-
{ flag: "--no-learnings" },
|
|
2142
|
-
{ flag: "--has-files" },
|
|
2143
|
-
{ flag: "--no-files" },
|
|
2144
|
-
{ flag: "--has-docs" },
|
|
2145
|
-
{ flag: "--no-docs" },
|
|
2146
|
-
{ flag: "--has-tests" },
|
|
2147
|
-
{ flag: "--no-tests" },
|
|
2148
|
-
{ flag: "--has-comments" },
|
|
2149
|
-
{ flag: "--no-comments" },
|
|
2150
|
-
{ flag: "--has-deps" },
|
|
2151
|
-
{ flag: "--no-deps" },
|
|
2152
|
-
{ flag: "--has-body" },
|
|
2153
|
-
{ flag: "--empty-body" },
|
|
2154
|
-
{ flag: "--has-linked-command" },
|
|
2155
|
-
{ flag: "--no-linked-command" }
|
|
2114
|
+
...GOVERNANCE_AND_CONTENT_FILTER_FLAG_CONTRACTS
|
|
2156
2115
|
];
|
|
2157
2116
|
var CONTRACTS_FLAG_CONTRACTS = [
|
|
2158
2117
|
{ flag: "--action" },
|
|
@@ -4762,4 +4721,4 @@ export {
|
|
|
4762
4721
|
resolveSubcommandFlagContractsForCommand,
|
|
4763
4722
|
PM_TOOL_PARAMETERS_SCHEMA
|
|
4764
4723
|
};
|
|
4765
|
-
//# sourceMappingURL=chunk-
|
|
4724
|
+
//# sourceMappingURL=chunk-RAHINBVP.js.map
|