@unbrained/pm-cli 2026.7.2 → 2026.7.4
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 +29 -0
- package/CONTRIBUTING.md +38 -9
- package/README.md +1 -5
- 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/calendar.js +3 -3
- package/dist/cli/commands/calendar.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/completion.js +231 -345
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/create.d.ts +2 -59
- package/dist/cli/commands/create.js +38 -39
- 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/scaffold.js +54 -133
- package/dist/cli/commands/extension/scaffold.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/files.js +3 -3
- package/dist/cli/commands/files.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/history-compact.js +9 -18
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-repair.js +9 -19
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.js +160 -111
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.js +3 -3
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/item-filter-options.d.ts +2 -0
- package/dist/cli/commands/item-filter-options.js +2 -2
- package/dist/cli/commands/item-filter-options.js.map +1 -1
- package/dist/cli/commands/mutation-command-options.d.ts +78 -0
- package/dist/cli/commands/mutation-command-options.js +10 -0
- package/dist/cli/commands/mutation-command-options.js.map +1 -0
- 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/reindex.js +3 -3
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/shared-unset-fields.d.ts +19 -0
- package/dist/cli/commands/shared-unset-fields.js +31 -2
- package/dist/cli/commands/shared-unset-fields.js.map +1 -1
- package/dist/cli/commands/update.d.ts +2 -59
- package/dist/cli/commands/update.js +26 -97
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +2 -0
- package/dist/cli/commands/validate.js +16 -4
- 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 +215 -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 +51 -56
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-IDS5GSYG.js +16 -0
- package/dist/cli-bundle/chunks/{activity-CUC4JY3U.js → activity-OENQCYZD.js} +9 -9
- package/dist/cli-bundle/chunks/{aggregate-SW5PNGCS.js → aggregate-EC4LWS3U.js} +8 -8
- package/dist/cli-bundle/chunks/{aggregate-DKUTRY6R.js → aggregate-RCB3QJJE.js} +8 -8
- package/dist/cli-bundle/chunks/{append-H32VOR2Y.js → append-ADBOI3A6.js} +8 -8
- package/dist/cli-bundle/chunks/{append-UBM632FK.js → append-XLEKVVWB.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-Q6NXOHS6.js → chunk-2LRMWMZ6.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-2227673O.js → chunk-2ONH3WG6.js} +32 -13
- package/dist/cli-bundle/chunks/{chunk-2227673O.js.map → chunk-2ONH3WG6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MNBPX5JS.js → chunk-2VK677OA.js} +72 -49
- package/dist/cli-bundle/chunks/chunk-2VK677OA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KLXF7NCC.js → chunk-3C5T3ZEO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JMK5GCK2.js → chunk-3MLQZI3H.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BTX5MIQF.js → chunk-4EVY7CQN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q6K2OACU.js → chunk-4IW7STMB.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-6YCYF2AI.js → chunk-4KPQQ42D.js} +166 -110
- package/dist/cli-bundle/chunks/chunk-4KPQQ42D.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BVZZN2LH.js → chunk-4OXNQHKQ.js} +23 -17
- package/dist/cli-bundle/chunks/{chunk-BVZZN2LH.js.map → chunk-4OXNQHKQ.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UWKEJMZU.js → chunk-4PJYRA3V.js} +31 -12
- package/dist/cli-bundle/chunks/{chunk-UWKEJMZU.js.map → chunk-4PJYRA3V.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-EMPGXBUF.js → chunk-4SHME4VR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6ITZLD4T.js → chunk-5FYY76HR.js} +28 -99
- package/dist/cli-bundle/chunks/chunk-5FYY76HR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OTUJZKGI.js → chunk-6QY2NA2M.js} +24 -18
- package/dist/cli-bundle/chunks/{chunk-OTUJZKGI.js.map → chunk-6QY2NA2M.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-2KWL5NPW.js → chunk-6YB7HG2J.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-36UGKF4O.js → chunk-724VLYDJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XCHUVHKU.js → chunk-75VMARGO.js} +11 -11
- package/dist/cli-bundle/chunks/chunk-75VMARGO.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-XWGEMNBR.js → chunk-7745CXNI.js} +119 -195
- package/dist/cli-bundle/chunks/chunk-7745CXNI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YPKFV2JR.js → chunk-7G5SUU6F.js} +76 -54
- package/dist/cli-bundle/chunks/chunk-7G5SUU6F.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Y4NRKBFW.js → chunk-7ITQSEBL.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-W47SML5B.js → chunk-A222YWOQ.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-3LCUASYG.js → chunk-A2W3XKAD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KN3URLKS.js → chunk-AOP2EMK3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RM37OPYK.js → chunk-AZMPKLIA.js} +72 -49
- package/dist/cli-bundle/chunks/chunk-AZMPKLIA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7NSPKJUS.js → chunk-BDDYM4LH.js} +262 -252
- package/dist/cli-bundle/chunks/chunk-BDDYM4LH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JXAUVO6X.js → chunk-CN4OAA2G.js} +55 -20
- package/dist/cli-bundle/chunks/chunk-CN4OAA2G.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IEEJQCZ4.js → chunk-CQFZRLXQ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-4NUOWFBT.js → chunk-CQISNF3Z.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-S62UANU7.js → chunk-D2LDM35X.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GRRG3MCT.js → chunk-DEIDJQZK.js} +57 -136
- package/dist/cli-bundle/chunks/chunk-DEIDJQZK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IG5JYZGU.js → chunk-DJ5S2LDY.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-A6VOGKBA.js → chunk-EB4BBEZD.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-QH3FSKRJ.js → chunk-EH23N5FX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HQTPRV4D.js → chunk-FDNJMYZB.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-K2VYLVX4.js → chunk-FMWQRMHS.js} +33 -6
- package/dist/cli-bundle/chunks/chunk-FMWQRMHS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-N2JSWVWG.js → chunk-HL742IBM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-3AZUFQK6.js → chunk-J4KNRDI3.js} +59 -70
- package/dist/cli-bundle/chunks/{chunk-3AZUFQK6.js.map → chunk-J4KNRDI3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-66Z3X7ZG.js → chunk-JYLFF7GJ.js} +166 -110
- package/dist/cli-bundle/chunks/chunk-JYLFF7GJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GFMSLORL.js → chunk-JZJJEJBR.js} +75 -53
- package/dist/cli-bundle/chunks/chunk-JZJJEJBR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7TH5NMVB.js → chunk-KKHIQOTN.js} +25 -19
- package/dist/cli-bundle/chunks/chunk-KKHIQOTN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5GVTFFTC.js → chunk-LLQLLAKU.js} +118 -194
- package/dist/cli-bundle/chunks/chunk-LLQLLAKU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KIYCOJ63.js → chunk-M34MVAOP.js} +58 -137
- package/dist/cli-bundle/chunks/chunk-M34MVAOP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-CZPVDLD2.js → chunk-M6PR5BC6.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-XEWQKDYZ.js → chunk-MTB4PRA3.js} +10 -10
- package/dist/cli-bundle/chunks/chunk-MTB4PRA3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-MRD4T5LF.js → chunk-MZ4NH46V.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AIAIXG7I.js → chunk-MZG6I2Q2.js} +39 -5
- package/dist/cli-bundle/chunks/chunk-MZG6I2Q2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZNHEYCDD.js → chunk-N2LOJUBB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WJAMWAHZ.js → chunk-NGDK3KEZ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-SYNKD3ZG.js → chunk-NHDR3UCW.js} +46 -60
- package/dist/cli-bundle/chunks/chunk-NHDR3UCW.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-2CHRYUXL.js → chunk-NHKXOMZ5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7MYWF4ZX.js → chunk-OTSP6UEX.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-UGLU6Q2I.js → chunk-PUVPC5DL.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-LTRAF2D7.js → chunk-PV5JS7MP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KCO2EAN5.js → chunk-Q2266G4S.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-SYVUU7EK.js → chunk-Q3XVLRCJ.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-AJEBCRIY.js → chunk-QFXFKYNQ.js} +47 -61
- package/dist/cli-bundle/chunks/chunk-QFXFKYNQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6ZMBJRDJ.js → chunk-R7EMP4JG.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-SPM2XLWI.js → chunk-SBNT6SLO.js} +22 -7
- package/dist/cli-bundle/chunks/chunk-SBNT6SLO.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-I66WE2HE.js → chunk-SL2ANJSV.js} +260 -250
- package/dist/cli-bundle/chunks/chunk-SL2ANJSV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-U2BEEM2X.js → chunk-T5RTYLZJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UTSH5GWX.js → chunk-TGYDJEJH.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-H4GRLYJS.js → chunk-TO4KCIOT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-EUKTMRN3.js → chunk-TUV7SIWZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-N3QCJS4M.js → chunk-UGDONITK.js} +58 -69
- package/dist/cli-bundle/chunks/{chunk-N3QCJS4M.js.map → chunk-UGDONITK.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NRZS637N.js → chunk-UYLA5ROU.js} +56 -21
- package/dist/cli-bundle/chunks/chunk-UYLA5ROU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-55XRYWEG.js → chunk-V655JQ5J.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-3Q2HBMTI.js → chunk-W5X3AHJN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XTHQWXVC.js → chunk-WBWRQS32.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-UT73HUPC.js → chunk-WOOB7PV7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5PGBHRY3.js → chunk-WSDIALO4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LRKMWUUV.js → chunk-WTXDLBSZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FFOQHGNH.js → chunk-XBIYI23P.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-7W4H4K26.js → chunk-XFO2NJY6.js} +29 -100
- package/dist/cli-bundle/chunks/chunk-XFO2NJY6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TPOFWBMY.js → chunk-XQCWTSLO.js} +26 -20
- package/dist/cli-bundle/chunks/chunk-XQCWTSLO.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2ASNV4DH.js → chunk-Y2VSCQ77.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ZNT7KEWE.js → chunk-YZR7UMZ6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YLZZ6T54.js → chunk-YZWXMDNH.js} +23 -8
- package/dist/cli-bundle/chunks/chunk-YZWXMDNH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-CYBDUHNO.js → chunk-ZIEGTQCY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-TTHCEV5Q.js → chunk-ZZWMJVW2.js} +4 -4
- package/dist/cli-bundle/chunks/{claim-Z7MEQCBT.js → claim-D6L33A5Y.js} +8 -8
- package/dist/cli-bundle/chunks/{claim-SENTPZBN.js → claim-YAFUTPVK.js} +8 -8
- package/dist/cli-bundle/chunks/close-KLDLHAOP.js +14 -0
- package/dist/cli-bundle/chunks/{close-424MX4CU.js → close-TGYXG7TV.js} +7 -7
- package/dist/cli-bundle/chunks/{close-many-SWY34BII.js → close-many-4QSWKCRU.js} +119 -76
- package/dist/cli-bundle/chunks/close-many-4QSWKCRU.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-many-2IV4J2TR.js → close-many-SNA6LNZH.js} +120 -77
- package/dist/cli-bundle/chunks/close-many-SNA6LNZH.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-4FGNTSNV.js → comments-QC6ARR5X.js} +9 -9
- package/dist/cli-bundle/chunks/{comments-7YS5MY5X.js → comments-ZHVYGUVC.js} +9 -9
- package/dist/cli-bundle/chunks/{config-G74GISC4.js → config-O6W2EU2G.js} +7 -7
- package/dist/cli-bundle/chunks/{config-BZJKK7FZ.js → config-XQRFJXJP.js} +7 -7
- package/dist/cli-bundle/chunks/{context-LHVKJSPJ.js → context-IHE3IXN5.js} +12 -12
- package/dist/cli-bundle/chunks/{context-ZQY54JNS.js → context-WSYWBEUL.js} +12 -12
- package/dist/cli-bundle/chunks/{contracts-FIZLMP7O.js → contracts-CVBINC7C.js} +3 -3
- package/dist/cli-bundle/chunks/{contracts-CP2EZJC7.js → contracts-NLCDIZAT.js} +3 -3
- package/dist/cli-bundle/chunks/{copy-TLW7JTQT.js → copy-7MUQC44A.js} +5 -5
- package/dist/cli-bundle/chunks/{copy-GYNQQPW2.js → copy-ANWXDJVC.js} +5 -5
- package/dist/cli-bundle/chunks/create-AJ6HUR5W.js +28 -0
- package/dist/cli-bundle/chunks/{create-VSKYSOCD.js → create-JIA2IFCO.js} +12 -12
- package/dist/cli-bundle/chunks/{delete-ANTOTI2I.js → delete-5OLYWQIC.js} +5 -5
- package/dist/cli-bundle/chunks/{delete-4W5JYCEG.js → delete-INHKCIRN.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-HPPE6MJN.js → deps-CCSWGZW7.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-ZQZN54EZ.js → deps-IYEID3QX.js} +5 -5
- package/dist/cli-bundle/chunks/{docs-XJNYBJGE.js → docs-3XZK22WF.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-RPOVFMP3.js → docs-PKO7OEIM.js} +7 -7
- package/dist/cli-bundle/chunks/{eval-RFBI5FGS.js → eval-5XYP6NMY.js} +10 -10
- package/dist/cli-bundle/chunks/{eval-DM6JBZTS.js → eval-O4WGQYDI.js} +10 -10
- package/dist/cli-bundle/chunks/{extension-TTSEFQTS.js → extension-PVGRRZZG.js} +11 -11
- package/dist/cli-bundle/chunks/{extension-B3YY4WY5.js → extension-T7JNTAAA.js} +11 -11
- package/dist/cli-bundle/chunks/{files-5D65CHGE.js → files-7IU56S6R.js} +10 -10
- package/dist/cli-bundle/chunks/files-7IU56S6R.js.map +1 -0
- package/dist/cli-bundle/chunks/{files-GPIG77EN.js → files-W7HH5EOD.js} +9 -9
- package/dist/cli-bundle/chunks/{files-GPIG77EN.js.map → files-W7HH5EOD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-ZHN7WIGX.js → focus-6FA5KYRY.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-C3PEJV2C.js → focus-CQ63JFDG.js} +6 -6
- package/dist/cli-bundle/chunks/{gc-D4JQ6OWN.js → gc-3BG67KTO.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-VZIXDL32.js → gc-PEZYGNVB.js} +3 -3
- package/dist/cli-bundle/chunks/{get-GIBRUUOP.js → get-J6CSJ4SX.js} +10 -10
- package/dist/cli-bundle/chunks/{get-IOVAN6RU.js → get-KJTKGNEQ.js} +10 -10
- package/dist/cli-bundle/chunks/{health-L2U3AFKV.js → health-32UQICEL.js} +115 -123
- package/dist/cli-bundle/chunks/health-32UQICEL.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-MM7AWXYF.js → health-ZUZG5ULV.js} +114 -122
- package/dist/cli-bundle/chunks/health-ZUZG5ULV.js.map +7 -0
- package/dist/cli-bundle/chunks/history-IOH6FKG7.js +18 -0
- package/dist/cli-bundle/chunks/{history-IL7XCEX2.js → history-W6QVR6FA.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-HALOTOU7.js → history-compact-F355EGL4.js} +20 -27
- package/dist/cli-bundle/chunks/history-compact-F355EGL4.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-compact-MV25P7DM.js → history-compact-JQ6ZGYSJ.js} +19 -26
- package/dist/cli-bundle/chunks/history-compact-JQ6ZGYSJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-redact-VYCWQFK7.js → history-redact-TUWOUYX5.js} +9 -9
- package/dist/cli-bundle/chunks/history-redact-VVDOARNO.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-44MODPQF.js → history-repair-MPCAIKYE.js} +20 -28
- package/dist/cli-bundle/chunks/history-repair-MPCAIKYE.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-CPNAOCNF.js → history-repair-ZKS3LKPV.js} +19 -27
- package/dist/cli-bundle/chunks/history-repair-ZKS3LKPV.js.map +7 -0
- package/dist/cli-bundle/chunks/init-CZLEEE6Q.js +22 -0
- package/dist/cli-bundle/chunks/{init-F27NHENZ.js → init-MAA6UMNQ.js} +12 -12
- package/dist/cli-bundle/chunks/{learnings-XSFSUUWK.js → learnings-EYC3OKS2.js} +9 -9
- package/dist/cli-bundle/chunks/{learnings-HJVDQIGY.js → learnings-HKJJUVTA.js} +9 -9
- package/dist/cli-bundle/chunks/{list-VMPWTURB.js → list-HFD5737R.js} +8 -8
- package/dist/cli-bundle/chunks/{list-HPMEKCAA.js → list-KN3TL5Y5.js} +8 -8
- package/dist/cli-bundle/chunks/{next-ETXF2ZCN.js → next-DQUMFAHG.js} +25 -22
- package/dist/cli-bundle/chunks/{next-ETXF2ZCN.js.map → next-DQUMFAHG.js.map} +2 -2
- package/dist/cli-bundle/chunks/{next-QM6YJIIS.js → next-JUEYC5HE.js} +26 -23
- package/dist/cli-bundle/chunks/next-JUEYC5HE.js.map +1 -0
- package/dist/cli-bundle/chunks/{notes-WDDBPC4D.js → notes-XATYT43P.js} +9 -9
- package/dist/cli-bundle/chunks/{notes-GDZIKGR6.js → notes-ZG6RLZXB.js} +9 -9
- package/dist/cli-bundle/chunks/{plan-BGDR73Z6.js → plan-5NWQL2DH.js} +12 -12
- package/dist/cli-bundle/chunks/{plan-C5IMM335.js → plan-DVVLX7LK.js} +12 -12
- package/dist/cli-bundle/chunks/{profile-CCOKZ2IQ.js → profile-54DZ4CLB.js} +27 -19
- package/dist/cli-bundle/chunks/profile-54DZ4CLB.js.map +1 -0
- package/dist/cli-bundle/chunks/{profile-HUCENIEQ.js → profile-PLIQVEOY.js} +26 -18
- package/dist/cli-bundle/chunks/profile-PLIQVEOY.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-ROSNIL52.js → register-list-query-PNRAHNIQ.js} +181 -172
- package/dist/cli-bundle/chunks/register-list-query-PNRAHNIQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-XN4ZRHSV.js → register-list-query-WRS6ACUW.js} +180 -171
- package/dist/cli-bundle/chunks/register-list-query-WRS6ACUW.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-KRLAHEL2.js → register-mutation-ET6E4VLE.js} +367 -361
- package/dist/cli-bundle/chunks/register-mutation-ET6E4VLE.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-CFSB2MS3.js → register-mutation-K2MNRWGI.js} +368 -362
- package/dist/cli-bundle/chunks/register-mutation-K2MNRWGI.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-MBN4KGUM.js → register-operations-6DQRUTIX.js} +310 -305
- package/dist/cli-bundle/chunks/register-operations-6DQRUTIX.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-4PASGJDB.js → register-operations-73UDWMVB.js} +309 -304
- package/dist/cli-bundle/chunks/register-operations-73UDWMVB.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-ZCGKHDKL.js → register-setup-FXZJ2CEJ.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-VIAWYFP5.js → register-setup-LYYCMQFV.js} +15 -15
- package/dist/cli-bundle/chunks/restore-L27TMMCF.js +17 -0
- package/dist/cli-bundle/chunks/{restore-4CBWUMCX.js → restore-R6YJHQK3.js} +9 -9
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-6VFKNKCM.js → scheduling-shortcuts-LE4S7OI7.js} +12 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-ERHCVTEM.js → scheduling-shortcuts-OGODPUBL.js} +12 -12
- package/dist/cli-bundle/chunks/{schema-UE5KKAUX.js → schema-ICCD3HOP.js} +7 -7
- package/dist/cli-bundle/chunks/{schema-TDGK6N3I.js → schema-RHH23PQX.js} +7 -7
- package/dist/cli-bundle/chunks/{search-FP7MEU4S.js → search-HDDKOPFE.js} +10 -10
- package/dist/cli-bundle/chunks/{search-K4CFLQ5S.js → search-Z2VGP2Q5.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-NJJCALEZ.js → stats-DHMRXHOB.js} +6 -6
- package/dist/cli-bundle/chunks/{stats-XT6QRKQY.js → stats-ETFP37MB.js} +6 -6
- package/dist/cli-bundle/chunks/{telemetry-HVXFZA2U.js → telemetry-NUZNKDCP.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-5SQ5UDXC.js → telemetry-ZRBM22QD.js} +4 -4
- package/dist/cli-bundle/chunks/{test-UFSJ5YIO.js → test-H36PM746.js} +15 -15
- package/dist/cli-bundle/chunks/{test-YCDAUBWF.js → test-XNKTIP4Y.js} +15 -15
- package/dist/cli-bundle/chunks/{test-all-2BWKY3GQ.js → test-all-APCBSXQI.js} +17 -17
- package/dist/cli-bundle/chunks/{test-all-PM7UYN42.js → test-all-KIK3OYBY.js} +17 -17
- package/dist/cli-bundle/chunks/{test-runs-H4TGWGRN.js → test-runs-5SLLV3XU.js} +4 -4
- package/dist/cli-bundle/chunks/{test-runs-FK5E75AA.js → test-runs-L3WKLO67.js} +4 -4
- package/dist/cli-bundle/chunks/update-RQKI3AMW.js +24 -0
- package/dist/cli-bundle/chunks/{update-Y5WQVT5O.js → update-ZM7NJWHY.js} +15 -15
- package/dist/cli-bundle/chunks/{update-many-JTKKSA7Y.js → update-many-GFCQG6ZQ.js} +28 -28
- package/dist/cli-bundle/chunks/{update-many-6YAYYRLE.js → update-many-XGTJ7QIU.js} +28 -28
- package/dist/cli-bundle/chunks/{upgrade-DTAHZ236.js → upgrade-KJ3JGELR.js} +11 -11
- package/dist/cli-bundle/chunks/{upgrade-JUDU7YL4.js → upgrade-RBRQ7PQU.js} +11 -11
- package/dist/cli-bundle/chunks/{validate-732RWS5W.js → validate-EW6TGC7R.js} +31 -21
- package/dist/cli-bundle/chunks/validate-EW6TGC7R.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-W7H5TEDC.js → validate-T6PR5WAL.js} +32 -22
- package/dist/cli-bundle/chunks/validate-T6PR5WAL.js.map +1 -0
- package/dist/cli-bundle/main.js +180 -122
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/core/extensions/extension-types.d.ts +1 -2
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/history/history-rewrite.d.ts +10 -0
- package/dist/core/history/history-rewrite.js +27 -3
- package/dist/core/history/history-rewrite.js.map +1 -1
- package/dist/core/item/type-registry.d.ts +1 -0
- package/dist/core/item/type-registry.js +180 -194
- 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 +73 -99
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +55 -94
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/compose.js +51 -42
- package/dist/sdk/compose.js.map +1 -1
- package/dist/sdk/package-import-adapters.d.ts +90 -2
- package/dist/sdk/package-import-adapters.js +274 -2
- package/dist/sdk/package-import-adapters.js.map +1 -1
- package/dist/sdk/runtime.d.ts +1 -1
- package/dist/sdk/runtime.js +3 -3
- package/dist/sdk/runtime.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 +4 -3
- package/packages/pm-beads/extensions/beads/runtime-loader.ts +27 -40
- package/packages/pm-beads/extensions/beads/runtime.ts +106 -223
- package/packages/pm-calendar/extensions/calendar/runtime.ts +21 -18
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +9 -11
- package/packages/pm-todos/extensions/todos/runtime-loader.ts +48 -76
- package/packages/pm-todos/extensions/todos/runtime.ts +61 -257
- 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/plugins/pm-claude/scripts/pm-mcp-server.mjs +73 -31
- package/plugins/pm-codex/scripts/pm-mcp-server.mjs +80 -34
- package/scripts/install.ps1 +7 -7
- 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-66Z3X7ZG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6ITZLD4T.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6YCYF2AI.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-7W4H4K26.js.map +0 -1
- 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-GRRG3MCT.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-KIYCOJ63.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MNBPX5JS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NRZS637N.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RM37OPYK.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-XCHUVHKU.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XEWQKDYZ.js.map +0 -7
- 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/files-5D65CHGE.js.map +0 -1
- 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-compact-HALOTOU7.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-MV25P7DM.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-IX4YEWMY.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-44MODPQF.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-CPNAOCNF.js.map +0 -7
- 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-WEIEMM73.js.map → activity-IDS5GSYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-CUC4JY3U.js.map → activity-OENQCYZD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-SW5PNGCS.js.map → aggregate-EC4LWS3U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-DKUTRY6R.js.map → aggregate-RCB3QJJE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-H32VOR2Y.js.map → append-ADBOI3A6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-UBM632FK.js.map → append-XLEKVVWB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q6NXOHS6.js.map → chunk-2LRMWMZ6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KLXF7NCC.js.map → chunk-3C5T3ZEO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JMK5GCK2.js.map → chunk-3MLQZI3H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BTX5MIQF.js.map → chunk-4EVY7CQN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q6K2OACU.js.map → chunk-4IW7STMB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EMPGXBUF.js.map → chunk-4SHME4VR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2KWL5NPW.js.map → chunk-6YB7HG2J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-36UGKF4O.js.map → chunk-724VLYDJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y4NRKBFW.js.map → chunk-7ITQSEBL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W47SML5B.js.map → chunk-A222YWOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3LCUASYG.js.map → chunk-A2W3XKAD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KN3URLKS.js.map → chunk-AOP2EMK3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IEEJQCZ4.js.map → chunk-CQFZRLXQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4NUOWFBT.js.map → chunk-CQISNF3Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S62UANU7.js.map → chunk-D2LDM35X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IG5JYZGU.js.map → chunk-DJ5S2LDY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A6VOGKBA.js.map → chunk-EB4BBEZD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QH3FSKRJ.js.map → chunk-EH23N5FX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HQTPRV4D.js.map → chunk-FDNJMYZB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N2JSWVWG.js.map → chunk-HL742IBM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CZPVDLD2.js.map → chunk-M6PR5BC6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MRD4T5LF.js.map → chunk-MZ4NH46V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZNHEYCDD.js.map → chunk-N2LOJUBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WJAMWAHZ.js.map → chunk-NGDK3KEZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2CHRYUXL.js.map → chunk-NHKXOMZ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7MYWF4ZX.js.map → chunk-OTSP6UEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UGLU6Q2I.js.map → chunk-PUVPC5DL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LTRAF2D7.js.map → chunk-PV5JS7MP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KCO2EAN5.js.map → chunk-Q2266G4S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SYVUU7EK.js.map → chunk-Q3XVLRCJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6ZMBJRDJ.js.map → chunk-R7EMP4JG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-U2BEEM2X.js.map → chunk-T5RTYLZJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UTSH5GWX.js.map → chunk-TGYDJEJH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H4GRLYJS.js.map → chunk-TO4KCIOT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EUKTMRN3.js.map → chunk-TUV7SIWZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-55XRYWEG.js.map → chunk-V655JQ5J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3Q2HBMTI.js.map → chunk-W5X3AHJN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XTHQWXVC.js.map → chunk-WBWRQS32.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UT73HUPC.js.map → chunk-WOOB7PV7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5PGBHRY3.js.map → chunk-WSDIALO4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LRKMWUUV.js.map → chunk-WTXDLBSZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FFOQHGNH.js.map → chunk-XBIYI23P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2ASNV4DH.js.map → chunk-Y2VSCQ77.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZNT7KEWE.js.map → chunk-YZR7UMZ6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CYBDUHNO.js.map → chunk-ZIEGTQCY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TTHCEV5Q.js.map → chunk-ZZWMJVW2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-Z7MEQCBT.js.map → claim-D6L33A5Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-SENTPZBN.js.map → claim-YAFUTPVK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-YCWQQPDS.js.map → close-KLDLHAOP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-424MX4CU.js.map → close-TGYXG7TV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-4FGNTSNV.js.map → comments-QC6ARR5X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-7YS5MY5X.js.map → comments-ZHVYGUVC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-G74GISC4.js.map → config-O6W2EU2G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-BZJKK7FZ.js.map → config-XQRFJXJP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-LHVKJSPJ.js.map → context-IHE3IXN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-ZQY54JNS.js.map → context-WSYWBEUL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-FIZLMP7O.js.map → contracts-CVBINC7C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-CP2EZJC7.js.map → contracts-NLCDIZAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-TLW7JTQT.js.map → copy-7MUQC44A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-GYNQQPW2.js.map → copy-ANWXDJVC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-XTMAPS7I.js.map → create-AJ6HUR5W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-VSKYSOCD.js.map → create-JIA2IFCO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ANTOTI2I.js.map → delete-5OLYWQIC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-4W5JYCEG.js.map → delete-INHKCIRN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-HPPE6MJN.js.map → deps-CCSWGZW7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-ZQZN54EZ.js.map → deps-IYEID3QX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-XJNYBJGE.js.map → docs-3XZK22WF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-RPOVFMP3.js.map → docs-PKO7OEIM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-RFBI5FGS.js.map → eval-5XYP6NMY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-DM6JBZTS.js.map → eval-O4WGQYDI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-TTSEFQTS.js.map → extension-PVGRRZZG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-B3YY4WY5.js.map → extension-T7JNTAAA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-ZHN7WIGX.js.map → focus-6FA5KYRY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-C3PEJV2C.js.map → focus-CQ63JFDG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-D4JQ6OWN.js.map → gc-3BG67KTO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-VZIXDL32.js.map → gc-PEZYGNVB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-GIBRUUOP.js.map → get-J6CSJ4SX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-IOVAN6RU.js.map → get-KJTKGNEQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-DD7L7BNL.js.map → history-IOH6FKG7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-IL7XCEX2.js.map → history-W6QVR6FA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-VYCWQFK7.js.map → history-redact-TUWOUYX5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-IX4YEWMY.js.map → history-redact-VVDOARNO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-HHVQQP6C.js.map → init-CZLEEE6Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-F27NHENZ.js.map → init-MAA6UMNQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-XSFSUUWK.js.map → learnings-EYC3OKS2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-HJVDQIGY.js.map → learnings-HKJJUVTA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-VMPWTURB.js.map → list-HFD5737R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-HPMEKCAA.js.map → list-KN3TL5Y5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-WDDBPC4D.js.map → notes-XATYT43P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-GDZIKGR6.js.map → notes-ZG6RLZXB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-BGDR73Z6.js.map → plan-5NWQL2DH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-C5IMM335.js.map → plan-DVVLX7LK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-ZCGKHDKL.js.map → register-setup-FXZJ2CEJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-VIAWYFP5.js.map → register-setup-LYYCMQFV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-5UEAGG3W.js.map → restore-L27TMMCF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-4CBWUMCX.js.map → restore-R6YJHQK3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-6VFKNKCM.js.map → scheduling-shortcuts-LE4S7OI7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-ERHCVTEM.js.map → scheduling-shortcuts-OGODPUBL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-UE5KKAUX.js.map → schema-ICCD3HOP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-TDGK6N3I.js.map → schema-RHH23PQX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-FP7MEU4S.js.map → search-HDDKOPFE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-K4CFLQ5S.js.map → search-Z2VGP2Q5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-NJJCALEZ.js.map → stats-DHMRXHOB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-XT6QRKQY.js.map → stats-ETFP37MB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-HVXFZA2U.js.map → telemetry-NUZNKDCP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-5SQ5UDXC.js.map → telemetry-ZRBM22QD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-UFSJ5YIO.js.map → test-H36PM746.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-YCDAUBWF.js.map → test-XNKTIP4Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-2BWKY3GQ.js.map → test-all-APCBSXQI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-PM7UYN42.js.map → test-all-KIK3OYBY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-H4TGWGRN.js.map → test-runs-5SLLV3XU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-FK5E75AA.js.map → test-runs-L3WKLO67.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-MTCFES6X.js.map → update-RQKI3AMW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-Y5WQVT5O.js.map → update-ZM7NJWHY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-JTKKSA7Y.js.map → update-many-GFCQG6ZQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-6YAYYRLE.js.map → update-many-XGTJ7QIU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-DTAHZ236.js.map → upgrade-KJ3JGELR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-JUDU7YL4.js.map → upgrade-RBRQ7PQU.js.map} +0 -0
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.",
|
|
9
|
-
"version": "1.4.
|
|
9
|
+
"version": "1.4.1"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "pm-claude",
|
|
14
14
|
"source": "./plugins/pm-claude",
|
|
15
|
-
"description": "Native pm CLI integration for Claude Code —
|
|
16
|
-
"version": "1.4.
|
|
15
|
+
"description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.",
|
|
16
|
+
"version": "1.4.1",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "unbrained",
|
|
19
19
|
"url": "https://github.com/unbraind/pm-cli"
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.7.4 - 2026-07-04
|
|
4
|
+
|
|
5
|
+
### Security
|
|
6
|
+
|
|
7
|
+
- Extreme mandatory quality gates: strict ESLint everywhere, jscpd strict/zero-threshold, suppressions budget, Trivy/ShellCheck/PSScriptAnalyzer/actionlint CI, admin-proof branch protection ([pm-7wmq](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-7wmq.toon))
|
|
8
|
+
|
|
9
|
+
### Other
|
|
10
|
+
|
|
11
|
+
- Test meaningfulness audit: strengthen hollow assertions, de-mock thin specs, convert contract source-mirrors to behavior ([pm-4i73](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-4i73.toon))
|
|
12
|
+
|
|
13
|
+
## 2026.7.3 - 2026-07-03
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- GH-416: Windows nightly validate linked-artifact prune classification ([pm-xpkt](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-xpkt.toon))
|
|
18
|
+
|
|
19
|
+
### Other
|
|
20
|
+
|
|
21
|
+
- Perf: pm context / pm next hot path ~700ms on an ~850-item tracker ([pm-z1pv](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-z1pv.toon))
|
|
22
|
+
- 2026-07-02 full ecosystem audit & optimization pass (CLI+SDK+packages+docs+CI) ([pm-fpod](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-fpod.toon))
|
|
23
|
+
- Lane C: Code quality audit (complexity, dead code, cross-file duplication, long files, type safety, dependencies) ([pm-hfli](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-hfli.toon))
|
|
24
|
+
- Lane F: CI/CD best-practice + secret/PII leak scan incl. pm history files ([pm-mo2v](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-mo2v.toon))
|
|
25
|
+
- Lane E: Docs audit (progressive disclosure, minimal README, link graph, duplicated docs/skills) ([pm-p99b](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-p99b.toon))
|
|
26
|
+
- Lane B: SDK best-practice + package-authoring DX review (define/compose/harness/preflight loop, scaffold matrix) ([pm-6vy7](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-6vy7.toon))
|
|
27
|
+
- Lane A: E2E ecosystem smoke in temp workspace (pack+install CLI, all first-party packages, full command surface, agent UX/token-efficiency) ([pm-kes3](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-kes3.toon))
|
|
28
|
+
- Lane D: Performance audit (startup latency, per-command responsiveness, hot paths) ([pm-3l76](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-3l76.toon))
|
|
29
|
+
- CodeFactor residual complexity and duplication cleanup for 27-issue main snapshot ([pm-bssk](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-bssk.toon))
|
|
30
|
+
- Zero the jscpd clone baseline: dedupe registration-helpers/flag-contracts source clones and 21 test-spec clones ([pm-chxp](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-chxp.toon))
|
|
31
|
+
|
|
3
32
|
## 2026.7.2 - 2026-07-02
|
|
4
33
|
|
|
5
34
|
### Changed
|
package/CONTRIBUTING.md
CHANGED
|
@@ -4,7 +4,7 @@ Thanks for helping improve `pm-cli`. This project is designed for deterministic,
|
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
|
-
- Node.js
|
|
7
|
+
- Node.js 22.18+
|
|
8
8
|
- pnpm 10+
|
|
9
9
|
|
|
10
10
|
## Setup
|
|
@@ -80,13 +80,17 @@ Every change must *only improve* the codebase — CI blocks any pull request tha
|
|
|
80
80
|
introduces a new quality issue. Run the lint suite before pushing:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
|
-
pnpm lint # eslint (complexity + maintainability) + jscpd duplication + static-quality gate
|
|
83
|
+
pnpm lint # eslint (recommended + complexity + maintainability) + jscpd duplication + static-quality gate
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
**ESLint strict baseline.** The flat config layers `@eslint/js` recommended,
|
|
87
|
+
`typescript-eslint` recommended, and the CodeFactor-calibrated maintainability
|
|
88
|
+
rules over *all* surfaces including tests, with
|
|
89
|
+
`reportUnusedDisableDirectives: "error"` so stale inline disables fail the run.
|
|
90
|
+
It also enforces a cyclomatic-complexity ceiling (`complexity` max 17 — a
|
|
91
|
+
function at CC ≥ 18 fails), calibrated to CodeFactor's "Complex Method"
|
|
92
|
+
detector. The full set of pre-existing violations is grandfathered in
|
|
93
|
+
`eslint-suppressions.json` (ESLint native bulk suppressions), so:
|
|
90
94
|
|
|
91
95
|
- A **new** complex method (or making an existing one worse) fails `pnpm lint` in
|
|
92
96
|
CI — you must simplify it.
|
|
@@ -95,8 +99,33 @@ grandfathered in `eslint-suppressions.json` (ESLint native bulk suppressions), s
|
|
|
95
99
|
`eslint-suppressions.json` — the baseline only ever shrinks.
|
|
96
100
|
|
|
97
101
|
Do not regenerate the whole baseline (`pnpm lint:complexity:baseline`) to silence a
|
|
98
|
-
new violation; that defeats the gate
|
|
99
|
-
|
|
102
|
+
new violation; that defeats the gate — and the static quality gate enforces a hard
|
|
103
|
+
budget (`MAX_ESLINT_SUPPRESSIONS` in `scripts/release/static-quality-gate.mjs`) on
|
|
104
|
+
the baseline's total size, so growing it fails CI outright. Lower the budget as the
|
|
105
|
+
baseline burns down. Driving the baseline to empty is the path to a CodeFactor
|
|
106
|
+
**A+** (tracked under epic `pm-92if`).
|
|
107
|
+
|
|
108
|
+
**jscpd duplication gate.** `jscpd` runs in `strict` mode with `threshold: 0`
|
|
109
|
+
(any clone ≥ 22 lines / 115 tokens across src, packages, plugins, scripts,
|
|
110
|
+
docs/examples, and tests fails). Extract shared helpers instead of loosening
|
|
111
|
+
`.jscpd.json`.
|
|
112
|
+
|
|
113
|
+
**Inline pragma budgets.** The static quality gate enforces hard ceilings on the
|
|
114
|
+
inline escape hatches that could otherwise silence a gate without touching any
|
|
115
|
+
config file a reviewer would watch: inline `eslint-disable` comments, coverage
|
|
116
|
+
ignore pragmas (`v8 ignore` / `c8 ignore` / `istanbul ignore`), and
|
|
117
|
+
`jscpd:ignore` blocks (budget 0 — never allowed). The ceilings live in
|
|
118
|
+
`scripts/release/static-quality-gate.mjs` (`MAX_INLINE_ESLINT_DISABLES`,
|
|
119
|
+
`MAX_COVERAGE_IGNORE_PRAGMAS`, `MAX_JSCPD_IGNORE_PRAGMAS`); adding a new pragma
|
|
120
|
+
anywhere in the scanned surfaces fails CI. Lower the budgets as usage burns
|
|
121
|
+
down — never raise them.
|
|
122
|
+
|
|
123
|
+
**Security & script gates (`.github/workflows/security.yml`).** Every PR also
|
|
124
|
+
runs Trivy (dependency vulnerabilities, secrets, misconfigurations — any
|
|
125
|
+
HIGH/CRITICAL finding fails), ShellCheck at `--severity=style` over all tracked
|
|
126
|
+
`*.sh`, PSScriptAnalyzer over all tracked PowerShell at Error/Warning/Information
|
|
127
|
+
severity, and actionlint over the workflows themselves. All four are required
|
|
128
|
+
branch-protection checks.
|
|
100
129
|
|
|
101
130
|
**Greptile review.** `pnpm review:greptile:gate` runs the Greptile CLI reviewer over
|
|
102
131
|
the current branch and fails on findings. It is wired into `pnpm release:gates`
|
|
@@ -175,7 +204,7 @@ When unmanaged extension state is expected to be managed, use `pm extension --do
|
|
|
175
204
|
|
|
176
205
|
- Include focused scope and rationale.
|
|
177
206
|
- Confirm all checks pass (`pnpm build && pnpm typecheck && pnpm test:coverage`).
|
|
178
|
-
- CI runs the full build/test matrix — `ubuntu-latest` (Node
|
|
207
|
+
- CI runs the full build/test matrix — `ubuntu-latest` (Node 22, 24) and `macos-latest` (Node 24) — on every pull request and on `main` pushes (doc/markdown-only pushes to `main` are skipped via `paths-ignore`; pull requests always run regardless of the changed paths). Nightly keeps broader regression coverage (Windows and Node 25).
|
|
179
208
|
- Update relevant user-facing docs when behavior changes, but keep enforcement in `pm` data and runtime tests.
|
|
180
209
|
- Keep private operations artifacts out of tracked public docs and package output.
|
|
181
210
|
- Add/maintain tests for any new behavior (100% coverage required).
|
package/README.md
CHANGED
|
@@ -10,12 +10,8 @@
|
|
|
10
10
|
[](https://pm-cli.unbrained.dev/badges)
|
|
11
11
|
[](https://pm-cli.unbrained.dev/badges)
|
|
12
12
|
[](https://pm-cli.unbrained.dev/badges)
|
|
13
|
-
[](https://pm-cli.unbrained.dev/badges)
|
|
14
|
-
[](https://pm-cli.unbrained.dev/badges)
|
|
15
13
|
[](https://pm-cli.unbrained.dev/badges)
|
|
16
14
|
[](https://pm-cli.unbrained.dev/badges)
|
|
17
|
-
[](https://pm-cli.unbrained.dev/badges)
|
|
18
|
-
[](https://pm-cli.unbrained.dev/badges)
|
|
19
15
|
|
|
20
16
|
`pm` is a git-native project management CLI for humans and coding agents. It stores work items in reviewable repository files, records every mutation in append-only history, and defaults to sparse TOON output so agents can spend fewer tokens while still getting deterministic data.
|
|
21
17
|
|
|
@@ -63,7 +59,7 @@ For Claude Code, install the native plugin (no `pm` CLI required):
|
|
|
63
59
|
/plugin install pm-claude@pm
|
|
64
60
|
```
|
|
65
61
|
|
|
66
|
-
This registers
|
|
62
|
+
This registers 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents, hybrid TUI tracking, and a session-start context hook — all without shelling out to the `pm` CLI.
|
|
67
63
|
|
|
68
64
|
`pm` packages use the same package-first vocabulary:
|
|
69
65
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7d27d900-2792-5dba-95dc-262d72ce028e")}catch(e){}}();
|
|
3
3
|
import { pathExists } from "../core/fs/fs-utils.js";
|
|
4
4
|
import { resolveItemTypeRegistry } from "../core/item/type-registry.js";
|
|
5
5
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
@@ -314,27 +314,11 @@ function rewriteUnknownOptionArgv(argv, unknownOption, replacementFlag) {
|
|
|
314
314
|
}
|
|
315
315
|
return undefined;
|
|
316
316
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
if (!unknownCommandMatch || typeof unknownCommandMatch[1] !== "string") {
|
|
323
|
-
return undefined;
|
|
324
|
-
}
|
|
325
|
-
const normalizedUnknown = normalizeHelpCommandPath(unknownCommandMatch[1]);
|
|
326
|
-
if (normalizedUnknown.length === 0) {
|
|
327
|
-
return undefined;
|
|
328
|
-
}
|
|
329
|
-
const commandPaths = collectRuntimeCommandPaths(root, extensionDescriptors);
|
|
330
|
-
if (commandPaths.length === 0) {
|
|
331
|
-
return undefined;
|
|
332
|
-
}
|
|
333
|
-
const primaryToken = normalizedUnknown.split(" ")[0];
|
|
334
|
-
const commandPathSet = new Set(commandPaths);
|
|
335
|
-
const scoreAgainstUnknown = (candidatePath) => Math.min(scoreCommandPathMatch(candidatePath, normalizedUnknown), primaryToken !== normalizedUnknown ? scoreCommandPathMatch(candidatePath, primaryToken) : Number.POSITIVE_INFINITY);
|
|
336
|
-
// Score every runtime command path against the unknown token, keeping the best
|
|
337
|
-
// (lowest) score per path.
|
|
317
|
+
function scoreRuntimeCommandCandidates(params) {
|
|
318
|
+
const commandPathSet = new Set(params.commandPaths);
|
|
319
|
+
const scoreAgainstUnknown = (candidatePath) => Math.min(scoreCommandPathMatch(candidatePath, params.normalizedUnknown), params.primaryToken !== params.normalizedUnknown
|
|
320
|
+
? scoreCommandPathMatch(candidatePath, params.primaryToken)
|
|
321
|
+
: Number.POSITIVE_INFINITY);
|
|
338
322
|
const scoresByCommandPath = new Map();
|
|
339
323
|
const recordCandidateScore = (commandPath, score) => {
|
|
340
324
|
if (!Number.isFinite(score) || !commandPathSet.has(commandPath)) {
|
|
@@ -345,33 +329,62 @@ export function buildUnknownCommandGuidanceFromRuntime(rawMessage, root, extensi
|
|
|
345
329
|
scoresByCommandPath.set(commandPath, score);
|
|
346
330
|
}
|
|
347
331
|
};
|
|
348
|
-
for (const commandPath of commandPaths) {
|
|
332
|
+
for (const commandPath of params.commandPaths) {
|
|
349
333
|
recordCandidateScore(commandPath, scoreAgainstUnknown(commandPath));
|
|
350
334
|
}
|
|
351
|
-
// Executable command aliases (e.g. `show` -> `get`) are rewritten to their
|
|
352
|
-
// canonical command before commander parses, so they are never themselves
|
|
353
|
-
// runtime command paths and a typo of one (`shwo`) cannot match a real path.
|
|
354
|
-
// Fuzzy-match the alias token and attribute the score to its canonical command
|
|
355
|
-
// so the suggestion points at the command that would actually run.
|
|
356
335
|
for (const [aliasToken, canonicalPath] of Object.entries(EXECUTABLE_COMMAND_ALIASES)) {
|
|
357
336
|
recordCandidateScore(canonicalPath, scoreAgainstUnknown(aliasToken));
|
|
358
337
|
}
|
|
359
|
-
|
|
338
|
+
return [...scoresByCommandPath.entries()]
|
|
360
339
|
.sort(([leftPath, leftScore], [rightPath, rightScore]) => leftScore !== rightScore ? leftScore - rightScore : leftPath.localeCompare(rightPath))
|
|
361
340
|
.map(([commandPath]) => commandPath);
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
|
|
341
|
+
}
|
|
342
|
+
function resolveUnknownCommandCandidates(params) {
|
|
343
|
+
const rankedCandidates = scoreRuntimeCommandCandidates(params);
|
|
344
|
+
const installedPackageCandidates = collectInstalledPackageCommandPathHints(params.primaryToken, params.extensionDescriptors).filter((commandPath) => params.commandPaths.includes(commandPath));
|
|
345
|
+
return dedupeStrings([...rankedCandidates, ...installedPackageCandidates]);
|
|
346
|
+
}
|
|
347
|
+
function resolveUnknownCommandFallbacks(commandPaths) {
|
|
348
|
+
const topLevel = [...new Set(commandPaths.map((commandPath) => commandPath.split(" ")[0]).filter((segment) => segment.length > 0))];
|
|
349
|
+
return topLevel.sort((left, right) => left.localeCompare(right));
|
|
350
|
+
}
|
|
351
|
+
function buildUnknownCommandExamples(suggestedPaths, hasConcreteCandidates) {
|
|
367
352
|
const suggestedExamples = suggestedPaths.map((path) => `pm ${path} --help`);
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
353
|
+
if (hasConcreteCandidates) {
|
|
354
|
+
return [...new Set([...suggestedExamples, "pm --help"])];
|
|
355
|
+
}
|
|
356
|
+
return [...new Set(["pm --help", ...suggestedExamples])];
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Implements build unknown command guidance from runtime for the public runtime surface of this module.
|
|
360
|
+
*/
|
|
361
|
+
export function buildUnknownCommandGuidanceFromRuntime(rawMessage, root, extensionDescriptors) {
|
|
362
|
+
const unknownCommandMatch = rawMessage.match(/unknown command '([^']+)'/i);
|
|
363
|
+
if (!unknownCommandMatch || typeof unknownCommandMatch[1] !== "string") {
|
|
364
|
+
return undefined;
|
|
365
|
+
}
|
|
366
|
+
const normalizedUnknown = normalizeHelpCommandPath(unknownCommandMatch[1]);
|
|
367
|
+
if (normalizedUnknown.length === 0) {
|
|
368
|
+
return undefined;
|
|
369
|
+
}
|
|
370
|
+
const commandPaths = collectRuntimeCommandPaths(root, extensionDescriptors);
|
|
371
|
+
if (commandPaths.length === 0) {
|
|
372
|
+
return undefined;
|
|
373
|
+
}
|
|
374
|
+
const primaryToken = normalizedUnknown.split(" ")[0];
|
|
375
|
+
// Executable aliases are scored against their canonical runtime command, so a
|
|
376
|
+
// typo of an alias still points at the command path that would actually run.
|
|
377
|
+
const combinedCandidates = resolveUnknownCommandCandidates({
|
|
378
|
+
commandPaths,
|
|
379
|
+
normalizedUnknown,
|
|
380
|
+
primaryToken,
|
|
381
|
+
extensionDescriptors,
|
|
382
|
+
});
|
|
383
|
+
const fallbackTopLevel = resolveUnknownCommandFallbacks(commandPaths);
|
|
384
|
+
const suggestedPaths = (combinedCandidates.length > 0 ? combinedCandidates : fallbackTopLevel).slice(0, 3);
|
|
385
|
+
const examples = buildUnknownCommandExamples(suggestedPaths, combinedCandidates.length > 0);
|
|
373
386
|
const optionalPackageHint = resolveOptionalPackageInstallHint(normalizedUnknown);
|
|
374
|
-
const didYouMean = combinedCandidates.length > 0 ? `Did you mean: ${
|
|
387
|
+
const didYouMean = combinedCandidates.length > 0 ? `Did you mean: ${suggestedPaths.join(", ")}?` : null;
|
|
375
388
|
return {
|
|
376
389
|
unknownCommandExamples: examples,
|
|
377
390
|
unknownCommandNextSteps: [
|
|
@@ -572,4 +585,4 @@ export const _testOnly = {
|
|
|
572
585
|
suggestNearestLongFlags,
|
|
573
586
|
};
|
|
574
587
|
//# sourceMappingURL=commander-usage.js.map
|
|
575
|
-
//# debugId=
|
|
588
|
+
//# debugId=7d27d900-2792-5dba-95dc-262d72ce028e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commander-usage.js","sources":["cli/commander-usage.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commander-usage\n *\n * Provides CLI runtime support for Commander Usage.\n */\nimport { Command } from \"commander\";\nimport { pathExists } from \"../core/fs/fs-utils.js\";\nimport { resolveItemTypeRegistry } from \"../core/item/type-registry.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../core/store/paths.js\";\nimport { readSettings } from \"../core/store/settings.js\";\nimport { BUILTIN_ITEM_TYPE_VALUES } from \"../types/index.js\";\nimport {\n getActiveExtensionRegistrations,\n runActiveServiceOverride,\n} from \"../core/extensions/index.js\";\nimport {\n PM_CORE_COMMAND_NAMES,\n resolveSubcommandFlagContractsForCommand,\n type CliFlagContract,\n} from \"../sdk/cli-contracts.js\";\nimport {\n type CommanderGuidanceContext,\n formatCommanderErrorForDisplay,\n formatCommanderErrorForJson,\n} from \"./error-guidance.js\";\nimport { normalizeHelpCommandPath } from \"./help-content.js\";\nimport { getCommandPath } from \"./registration-helpers.js\";\nimport {\n EXECUTABLE_COMMAND_ALIASES,\n normalizeBootstrapInvocation,\n parseBootstrapGlobalOptions,\n parseBootstrapCommandName,\n} from \"./bootstrap-args.js\";\nimport {\n extractProvidedOptionFlags,\n normalizeLongFlag,\n renderPmCommand,\n} from \"./argv-utils.js\";\nimport { levenshteinDistanceWithinLimit } from \"../core/shared/levenshtein.js\";\nimport type { ExtensionCommandHelpDescriptor } from \"./extension-command-help.js\";\nimport { normalizeExtensionNameForMatch } from \"./commands/extension/shared.js\";\n\nexport const BUILTIN_TYPE_HELP_VALUES = BUILTIN_ITEM_TYPE_VALUES.join(\"|\");\n\nconst OPTIONAL_PACKAGE_INSTALL_HINTS: Record<string, string> = {\n calendar: \"calendar\",\n cal: \"calendar\",\n reindex: \"search-advanced\",\n \"search-advanced\": \"search-advanced\",\n \"dedupe-audit\": \"governance-audit\",\n \"dedupe-merge\": \"governance-audit\",\n \"comments-audit\": \"governance-audit\",\n normalize: \"governance-audit\",\n guide: \"guide-shell\",\n completion: \"guide-shell\",\n templates: \"templates\",\n \"test-runs\": \"linked-test-adapters\",\n beads: \"beads\",\n todos: \"todos\",\n};\n\nconst SEMANTIC_UNKNOWN_OPTION_SUGGESTIONS: Record<string, Record<string, string[]>> = {\n comments: {\n \"--body\": [\"--add\"],\n \"--text\": [\"--add\"],\n \"--comment\": [\"--add\"],\n },\n notes: {\n \"--body\": [\"--add\"],\n \"--text\": [\"--add\"],\n \"--note\": [\"--add\"],\n },\n learnings: {\n \"--body\": [\"--add\"],\n \"--text\": [\"--add\"],\n \"--learning\": [\"--add\"],\n },\n // pm update / pm create now accept --add-tags natively, so the singular\n // --add-tag and the old \"--tag\" mistype still need to be redirected at the\n // canonical additive flag (not at --tags, which would silently replace).\n update: {\n \"--add-tag\": [\"--add-tags\"],\n \"--remove-tag\": [\"--remove-tags\"],\n \"--tag\": [\"--tags\"],\n },\n create: {\n \"--add-tag\": [\"--add-tags\"],\n \"--tag\": [\"--tags\"],\n },\n};\n\nfunction getSemanticUnknownOptionSuggestions(commandName: string, unknownOption: string): string[] {\n const commandSuggestions = SEMANTIC_UNKNOWN_OPTION_SUGGESTIONS[commandName];\n if (!commandSuggestions) {\n return [];\n }\n const normalizedUnknown = normalizeLongFlag(unknownOption);\n for (const [flag, suggestions] of Object.entries(commandSuggestions)) {\n if (normalizeLongFlag(flag) === normalizedUnknown) {\n return suggestions;\n }\n }\n return [];\n}\n\n/**\n * Documents the commander usage context payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommanderUsageContext extends CommanderGuidanceContext {\n message: string;\n commandName: string | undefined;\n allowedTypes: string;\n}\n\n/**\n * Implements collect runtime command paths for the public runtime surface of this module.\n */\nexport function collectRuntimeCommandPaths(\n root: Command,\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>,\n): string[] {\n const commandPaths = new Set<string>();\n const queue: Command[] = [...root.commands];\n while (queue.length > 0) {\n const current = queue.shift();\n if (!current) {\n continue;\n }\n const normalizedPath = normalizeHelpCommandPath(getCommandPath(current));\n const hasInternalSegment = normalizedPath.split(\" \").some((segment) => segment.startsWith(\"_\"));\n if (normalizedPath.length > 0 && !hasInternalSegment) {\n commandPaths.add(normalizedPath);\n }\n queue.push(...current.commands);\n }\n for (const descriptorPath of extensionDescriptors.keys()) {\n const normalizedPath = normalizeHelpCommandPath(descriptorPath);\n const hasInternalSegment = normalizedPath.split(\" \").some((segment) => segment.startsWith(\"_\"));\n if (normalizedPath.length > 0 && !hasInternalSegment) {\n commandPaths.add(normalizedPath);\n }\n }\n return [...commandPaths].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Implements score command path match for the public runtime surface of this module.\n */\nexport function scoreCommandPathMatch(commandPath: string, queryToken: string): number {\n const normalizedPath = commandPath.trim().toLowerCase();\n const normalizedToken = queryToken.trim().toLowerCase();\n if (normalizedToken.length === 0) {\n return Number.POSITIVE_INFINITY;\n }\n const pathSegments = normalizedPath.split(\" \");\n if (normalizedPath === normalizedToken) {\n return 0;\n }\n if (pathSegments.includes(normalizedToken)) {\n return 1;\n }\n if (pathSegments.some((segment) => segment.startsWith(normalizedToken))) {\n return 2;\n }\n if (normalizedPath.includes(normalizedToken)) {\n return 3;\n }\n // Fall back to edit distance so transposition/typo cases (e.g. \"lst\" -> \"list\") still rank.\n const maxDistance = normalizedToken.length >= 5 ? 2 : 1;\n let bestDistance = Number.POSITIVE_INFINITY;\n for (const segment of pathSegments) {\n const distance = levenshteinDistanceWithinLimit(segment, normalizedToken, maxDistance);\n if (distance !== null) {\n bestDistance = Math.min(bestDistance, distance);\n }\n }\n if (Number.isFinite(bestDistance)) {\n return 4 + bestDistance;\n }\n return Number.POSITIVE_INFINITY;\n}\n\nfunction toComparableFlag(flag: string): string {\n return normalizeLongFlag(flag).slice(2).replace(/-/g, \"\");\n}\n\nfunction renderAttemptedCommand(argv: string[]): string {\n return renderPmCommand(argv);\n}\n\nfunction resolveOptionalPackageInstallHint(commandPath: string): string | null {\n const topLevel = commandPath.split(\" \")[0]?.trim().toLowerCase();\n if (!topLevel) {\n return null;\n }\n const packageAlias = OPTIONAL_PACKAGE_INSTALL_HINTS[topLevel];\n if (!packageAlias) {\n return null;\n }\n return `If this command comes from an optional package, install it with: pm install ${packageAlias}`;\n}\n\nfunction normalizePackageCommandAliasToken(value: string): string {\n let normalized = normalizeExtensionNameForMatch(value);\n // Strip outer package/source prefixes and then the pm- package stem so scoped\n // and builtin package guesses converge on the exported command alias.\n for (const prefix of [\"@unbraind/\", \"@unbrained/\", \"builtin-\", \"pm-\"]) {\n if (normalized.startsWith(prefix)) {\n normalized = normalized.slice(prefix.length);\n }\n }\n return normalized;\n}\n\nfunction collectInstalledPackageCommandPathHints(\n unknownToken: string,\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>,\n): string[] {\n const normalizedUnknown = normalizePackageCommandAliasToken(unknownToken);\n if (normalizedUnknown.length === 0) {\n return [];\n }\n const hints: string[] = [];\n for (const descriptor of extensionDescriptors.values()) {\n const identifiers = new Set<string>();\n const source = descriptor.source;\n if (source) {\n for (const identifier of [source.name, source.package]) {\n const normalizedIdentifier = normalizePackageCommandAliasToken(identifier ?? \"\");\n if (normalizedIdentifier.length > 0) {\n identifiers.add(normalizedIdentifier);\n }\n }\n }\n if (identifiers.size === 0) {\n continue;\n }\n const matches = [...identifiers].some(\n (identifier) =>\n identifier === normalizedUnknown ||\n identifier.includes(normalizedUnknown) ||\n normalizedUnknown.includes(identifier),\n );\n if (matches) {\n hints.push(descriptor.command);\n }\n }\n return [...new Set(hints)].sort((left, right) => left.localeCompare(right));\n}\n\nfunction collectKnownLongFlags(\n commandName: string | undefined,\n contractsOverride?: CliFlagContract[],\n): string[] {\n const flags = new Set<string>();\n const contracts = contractsOverride ?? resolveSubcommandFlagContractsForCommand(commandName);\n for (const contract of contracts) {\n if (contract.flag.startsWith(\"--\")) {\n flags.add(normalizeLongFlag(contract.flag));\n }\n for (const alias of contract.aliases ?? []) {\n if (alias.startsWith(\"--\")) {\n flags.add(normalizeLongFlag(alias));\n }\n }\n }\n return [...flags].sort((left, right) => left.localeCompare(right));\n}\n\nfunction suggestNearestLongFlags(unknownOption: string, knownFlags: string[]): string[] {\n if (!unknownOption.startsWith(\"--\")) {\n return [];\n }\n const unknownComparable = toComparableFlag(unknownOption);\n if (unknownComparable.length === 0) {\n return [];\n }\n const maxDistance = unknownComparable.length >= 8 ? 2 : 1;\n // rank 0 = abbreviation/prefix match (e.g. --desc -> --description), rank 1 = edit-distance typo.\n const candidates: Array<{ flag: string; rank: number; distance: number }> = [];\n for (const flag of knownFlags) {\n const flagComparable = toComparableFlag(flag);\n if (flagComparable === unknownComparable) {\n continue;\n }\n if (unknownComparable.length >= 3 && flagComparable.startsWith(unknownComparable)) {\n candidates.push({ flag, rank: 0, distance: flagComparable.length - unknownComparable.length });\n continue;\n }\n const distance = levenshteinDistanceWithinLimit(unknownComparable, flagComparable, maxDistance);\n if (distance === null || distance <= 0) {\n continue;\n }\n candidates.push({ flag, rank: 1, distance });\n }\n return candidates\n .sort((left, right) => {\n if (left.rank !== right.rank) {\n return left.rank - right.rank;\n }\n if (left.distance !== right.distance) {\n return left.distance - right.distance;\n }\n return left.flag.localeCompare(right.flag);\n })\n .map((entry) => entry.flag)\n .slice(0, 3);\n}\n\nlet crossCommandFlagIndexCache: Map<string, string[]> | undefined;\n\n// Alias/shortcut command names that duplicate a canonical command. Excluding them\n// keeps cross-command flag hints focused on the primary commands an agent should use.\nconst CROSS_COMMAND_FLAG_EXCLUSIONS = new Set<string>([\n \"ctx\",\n \"packages\",\n \"list-draft\",\n \"list-open\",\n \"list-in-progress\",\n \"list-blocked\",\n \"list-closed\",\n \"list-canceled\",\n \"start-task\",\n \"pause-task\",\n \"close-task\",\n \"help\",\n]);\n\n// Index of long flag -> command names that accept it (in declaration order), so an\n// unknown flag on one command can be recognised as valid elsewhere (e.g. --type is\n// rejected on test-all but valid on create/list). Built once from core command contracts.\nfunction getCrossCommandFlagIndex(): Map<string, string[]> {\n if (crossCommandFlagIndexCache) {\n return crossCommandFlagIndexCache;\n }\n const index = new Map<string, string[]>();\n for (const command of PM_CORE_COMMAND_NAMES) {\n if (CROSS_COMMAND_FLAG_EXCLUSIONS.has(command)) {\n continue;\n }\n for (const flag of collectKnownLongFlags(command)) {\n const commands = index.get(flag) ?? [];\n commands.push(command);\n index.set(flag, commands);\n }\n }\n crossCommandFlagIndexCache = index;\n return crossCommandFlagIndexCache;\n}\n\nfunction findOtherCommandsForFlag(unknownOption: string, currentCommand: string | undefined): string[] {\n if (!unknownOption.startsWith(\"--\")) {\n return [];\n }\n const commands = getCrossCommandFlagIndex().get(normalizeLongFlag(unknownOption));\n if (!commands) {\n return [];\n }\n const normalizedCurrent = currentCommand?.trim().toLowerCase();\n return commands.filter((command) => command !== normalizedCurrent).slice(0, 3);\n}\n\nfunction rewriteUnknownOptionArgv(argv: string[], unknownOption: string, replacementFlag: string): string[] | undefined {\n for (let index = 0; index < argv.length; index += 1) {\n const token = argv[index];\n if (!token.startsWith(\"--\")) {\n continue;\n }\n const equalsIndex = token.indexOf(\"=\");\n const key = equalsIndex >= 0 ? token.slice(0, equalsIndex) : token;\n if (normalizeLongFlag(key) !== normalizeLongFlag(unknownOption)) {\n continue;\n }\n const next = [...argv];\n next[index] = equalsIndex >= 0 ? `${replacementFlag}${token.slice(equalsIndex)}` : replacementFlag;\n return next;\n }\n return undefined;\n}\n\n/**\n * Implements build unknown command guidance from runtime for the public runtime surface of this module.\n */\nexport function buildUnknownCommandGuidanceFromRuntime(\n rawMessage: string,\n root: Command,\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>,\n): CommanderGuidanceContext | undefined {\n const unknownCommandMatch = rawMessage.match(/unknown command '([^']+)'/i);\n if (!unknownCommandMatch || typeof unknownCommandMatch[1] !== \"string\") {\n return undefined;\n }\n const normalizedUnknown = normalizeHelpCommandPath(unknownCommandMatch[1]);\n if (normalizedUnknown.length === 0) {\n return undefined;\n }\n const commandPaths = collectRuntimeCommandPaths(root, extensionDescriptors);\n if (commandPaths.length === 0) {\n return undefined;\n }\n\n const primaryToken = normalizedUnknown.split(\" \")[0];\n const commandPathSet = new Set(commandPaths);\n const scoreAgainstUnknown = (candidatePath: string): number =>\n Math.min(\n scoreCommandPathMatch(candidatePath, normalizedUnknown),\n primaryToken !== normalizedUnknown ? scoreCommandPathMatch(candidatePath, primaryToken) : Number.POSITIVE_INFINITY,\n );\n // Score every runtime command path against the unknown token, keeping the best\n // (lowest) score per path.\n const scoresByCommandPath = new Map<string, number>();\n const recordCandidateScore = (commandPath: string, score: number): void => {\n if (!Number.isFinite(score) || !commandPathSet.has(commandPath)) {\n return;\n }\n const existing = scoresByCommandPath.get(commandPath);\n if (existing === undefined || score < existing) {\n scoresByCommandPath.set(commandPath, score);\n }\n };\n for (const commandPath of commandPaths) {\n recordCandidateScore(commandPath, scoreAgainstUnknown(commandPath));\n }\n // Executable command aliases (e.g. `show` -> `get`) are rewritten to their\n // canonical command before commander parses, so they are never themselves\n // runtime command paths and a typo of one (`shwo`) cannot match a real path.\n // Fuzzy-match the alias token and attribute the score to its canonical command\n // so the suggestion points at the command that would actually run.\n for (const [aliasToken, canonicalPath] of Object.entries(EXECUTABLE_COMMAND_ALIASES)) {\n recordCandidateScore(canonicalPath, scoreAgainstUnknown(aliasToken));\n }\n const rankedCandidates = [...scoresByCommandPath.entries()]\n .sort(([leftPath, leftScore], [rightPath, rightScore]) =>\n leftScore !== rightScore ? leftScore - rightScore : leftPath.localeCompare(rightPath),\n )\n .map(([commandPath]) => commandPath);\n\n const installedPackageCandidates = collectInstalledPackageCommandPathHints(primaryToken, extensionDescriptors).filter((commandPath) =>\n commandPaths.includes(commandPath),\n );\n const combinedCandidates = dedupeStrings([...rankedCandidates, ...installedPackageCandidates]);\n\n const fallbackTopLevel = [...new Set(commandPaths.map((commandPath) => commandPath.split(\" \")[0]).filter((segment) => segment.length > 0))];\n fallbackTopLevel.sort((left, right) => left.localeCompare(right));\n const suggestedPaths = (combinedCandidates.length > 0 ? combinedCandidates : fallbackTopLevel).slice(0, 3);\n const suggestedExamples = suggestedPaths.map((path) => `pm ${path} --help`);\n // When we have a concrete did-you-mean candidate, lead examples with that\n // candidate and keep the broader \"pm --help\" fallback after it.\n const examples = combinedCandidates.length > 0\n ? [...new Set([...suggestedExamples, \"pm --help\"])]\n : [...new Set([\"pm --help\", ...suggestedExamples])];\n const optionalPackageHint = resolveOptionalPackageInstallHint(normalizedUnknown);\n const didYouMean = combinedCandidates.length > 0 ? `Did you mean: ${combinedCandidates.slice(0, 3).join(\", \")}?` : null;\n\n return {\n unknownCommandExamples: examples,\n unknownCommandNextSteps: [\n ...(didYouMean ? [didYouMean] : []),\n 'Run \"pm --help\" to list commands available in this runtime, including active extensions.',\n \"Use one of the suggested command paths above with --help to inspect valid flags and usage.\",\n ...(optionalPackageHint ? [optionalPackageHint] : []),\n ],\n };\n}\n\nfunction dedupeStrings(values: string[]): string[] {\n return Array.from(new Set(values));\n}\n\nfunction firstWhitespaceSeparatedToken(input: string): string {\n let token = \"\";\n for (const character of input) {\n if (\n character === \" \" ||\n character === \"\\t\" ||\n character === \"\\n\" ||\n character === \"\\r\" ||\n character === \"\\f\" ||\n character === \"\\v\"\n ) {\n break;\n }\n token += character;\n }\n return token;\n}\n\nfunction trimTrailingPunctuationToken(token: string): string {\n let end = token.length;\n while (end > 0) {\n const character = token[end - 1];\n if (character !== \",\" && character !== \":\" && character !== \";\") {\n break;\n }\n end -= 1;\n }\n return token.slice(0, end);\n}\n\n/**\n * Implements resolve child command by token for the public runtime surface of this module.\n */\nexport function resolveChildCommandByToken(parent: Command, token: string): Command | undefined {\n const normalizedToken = token.trim().toLowerCase();\n return parent.commands.find((candidate) => {\n if (candidate.name().trim().toLowerCase() === normalizedToken) {\n return true;\n }\n const aliases = typeof candidate.aliases === \"function\" ? candidate.aliases() : [];\n return aliases.some((alias) => alias.trim().toLowerCase() === normalizedToken);\n });\n}\n\n/**\n * Implements check whether known help command path for the public runtime surface of this module.\n */\nexport function isKnownHelpCommandPath(root: Command, commandPathTokens: string[]): boolean {\n if (commandPathTokens.length === 0) {\n return true;\n }\n let current = root;\n let matchedAny = false;\n for (const token of commandPathTokens) {\n const next = resolveChildCommandByToken(current, token);\n if (!next) {\n return matchedAny;\n }\n matchedAny = true;\n current = next;\n }\n return matchedAny;\n}\n\nasync function resolveAllowedTypesForUsage(bootstrapGlobal: ReturnType<typeof parseBootstrapGlobalOptions>): Promise<string> {\n try {\n const pmRoot = resolvePmRoot(process.cwd(), bootstrapGlobal.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n return BUILTIN_TYPE_HELP_VALUES;\n }\n const settings = await readSettings(pmRoot);\n const extensionRegistrations = bootstrapGlobal.noExtensions ? undefined : getActiveExtensionRegistrations();\n const typeRegistry = resolveItemTypeRegistry(settings, extensionRegistrations);\n return typeRegistry.types.length > 0 ? typeRegistry.types.join(\"|\") : BUILTIN_TYPE_HELP_VALUES;\n } catch {\n /* v8 ignore start -- defensive fallback for corrupted settings during usage-error rendering; command behavior is covered through normal settings paths */\n return BUILTIN_TYPE_HELP_VALUES;\n /* v8 ignore stop */\n }\n}\n\nfunction resolveUnknownOptionSuggestions(\n message: string,\n commandName: string | undefined,\n): { match: RegExpMatchArray | null; suggestions: string[] | undefined; otherCommands: string[] } {\n const match = message.match(/unknown option '([^']+)'/i);\n const suggestions =\n match && commandName\n ? dedupeStrings([\n ...getSemanticUnknownOptionSuggestions(commandName, match[1]),\n ...suggestNearestLongFlags(match[1], collectKnownLongFlags(commandName)),\n ])\n : undefined;\n return {\n match,\n suggestions,\n otherCommands: match ? findOtherCommandsForFlag(match[1], commandName) : [],\n };\n}\n\nfunction resolveSuggestedRetryForUnknownOption(\n invocationArgv: string[],\n unknownOptionMatch: RegExpMatchArray | null,\n unknownOptionSuggestions: string[] | undefined,\n): string | undefined {\n if (!unknownOptionMatch || !unknownOptionSuggestions || unknownOptionSuggestions.length === 0) {\n return undefined;\n }\n const rewritten = rewriteUnknownOptionArgv(invocationArgv, unknownOptionMatch[1], unknownOptionSuggestions[0]);\n return rewritten ? renderAttemptedCommand(rewritten) : undefined;\n}\n\nfunction resolveSuggestedRetryForMissingOption(message: string, invocationArgv: string[]): string | undefined {\n const missingRequiredOption = message.match(/required option '([^']+)' not specified/i);\n const requiredOptionToken = missingRequiredOption?.[1]\n ? trimTrailingPunctuationToken(firstWhitespaceSeparatedToken(missingRequiredOption[1].trim()))\n : undefined;\n if (!requiredOptionToken?.startsWith(\"--\")) {\n return undefined;\n }\n const hasFlag = invocationArgv.some((token) => token === requiredOptionToken || token.startsWith(`${requiredOptionToken}=`));\n return hasFlag ? undefined : renderAttemptedCommand([...invocationArgv, requiredOptionToken, \"<value>\"]);\n}\n\n/**\n * Implements resolve commander usage context for the public runtime surface of this module.\n */\nexport async function resolveCommanderUsageContext(\n error: unknown,\n rootProgram: Command,\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>,\n): Promise<CommanderUsageContext> {\n const rawMessage = typeof error === \"object\" && error !== null ? (error as { message?: string }).message : undefined;\n const message = rawMessage ?? \"Invalid command usage\";\n const invocationArgv = normalizeBootstrapInvocation(process.argv.slice(2)).argv;\n const bootstrapGlobal = parseBootstrapGlobalOptions(invocationArgv);\n const commandName = parseBootstrapCommandName(invocationArgv);\n const attemptedCommand = renderAttemptedCommand(invocationArgv);\n const providedOptionFlags = extractProvidedOptionFlags(invocationArgv);\n const allowedTypes = await resolveAllowedTypesForUsage(bootstrapGlobal);\n const unknownCommandGuidance = buildUnknownCommandGuidanceFromRuntime(message, rootProgram, extensionDescriptors);\n const unknownOption = resolveUnknownOptionSuggestions(message, commandName);\n const suggestedRetryCommand =\n resolveSuggestedRetryForUnknownOption(invocationArgv, unknownOption.match, unknownOption.suggestions) ??\n resolveSuggestedRetryForMissingOption(message, invocationArgv);\n return {\n message,\n commandName,\n allowedTypes,\n attemptedCommand,\n normalizedInvocationArgs: [...invocationArgv],\n providedOptionFlags,\n unknownOptionSuggestions: unknownOption.suggestions,\n unknownOptionOtherCommands: unknownOption.otherCommands.length > 0 ? unknownOption.otherCommands : undefined,\n suggestedRetryCommand,\n ...unknownCommandGuidance,\n };\n}\n\n/**\n * Implements format commander usage message for the public runtime surface of this module.\n */\nexport async function formatCommanderUsageMessage(\n error: unknown,\n rootProgram: Command,\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>,\n): Promise<string> {\n const usageContext = await resolveCommanderUsageContext(error, rootProgram, extensionDescriptors);\n const {\n message,\n commandName,\n allowedTypes,\n unknownCommandExamples,\n unknownCommandNextSteps,\n attemptedCommand,\n normalizedInvocationArgs,\n providedOptionFlags,\n unknownOptionSuggestions,\n unknownOptionOtherCommands,\n suggestedRetryCommand,\n } = usageContext;\n const formatted = formatCommanderErrorForDisplay(message, commandName, allowedTypes, {\n unknownCommandExamples,\n unknownCommandNextSteps,\n attemptedCommand,\n normalizedInvocationArgs,\n providedOptionFlags,\n unknownOptionSuggestions,\n unknownOptionOtherCommands,\n suggestedRetryCommand,\n });\n const serviceOverride = await runActiveServiceOverride(\"help_format\", {\n message: formatted,\n command: commandName,\n allowed_types: allowedTypes,\n });\n if (serviceOverride.handled && typeof serviceOverride.result === \"string\") {\n return serviceOverride.result;\n }\n return formatted;\n}\n\n/**\n * Implements format commander usage json for the public runtime surface of this module.\n */\nexport async function formatCommanderUsageJson(\n error: unknown,\n rootProgram: Command,\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>,\n): Promise<string> {\n const usageContext = await resolveCommanderUsageContext(error, rootProgram, extensionDescriptors);\n const envelope = formatCommanderErrorForJson(\n usageContext.message,\n usageContext.commandName,\n usageContext.allowedTypes,\n EXIT_CODE.USAGE,\n {\n unknownCommandExamples: usageContext.unknownCommandExamples,\n unknownCommandNextSteps: usageContext.unknownCommandNextSteps,\n attemptedCommand: usageContext.attemptedCommand,\n normalizedInvocationArgs: usageContext.normalizedInvocationArgs,\n providedOptionFlags: usageContext.providedOptionFlags,\n unknownOptionSuggestions: usageContext.unknownOptionSuggestions,\n unknownOptionOtherCommands: usageContext.unknownOptionOtherCommands,\n suggestedRetryCommand: usageContext.suggestedRetryCommand,\n },\n );\n return JSON.stringify(envelope, null, 2);\n}\n\nexport const _testOnly = {\n collectKnownLongFlags,\n collectInstalledPackageCommandPathHints,\n resolveOptionalPackageInstallHint,\n resolveSuggestedRetryForMissingOption,\n suggestNearestLongFlags,\n};\n"],"names":[],"mappings":";;AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EACL,+BAA+B,EAC/B,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,qBAAqB,EACrB,wCAAwC,GAEzC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAE/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAEhF,MAAM,CAAC,MAAM,wBAAwB,GAAG,wBAAwB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE3E,MAAM,8BAA8B,GAA2B;IAC7D,QAAQ,EAAE,UAAU;IACpB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;IACrC,uBAAuB;CACxB,CAAC","debugId":"66620fd2-4f5f-5930-a9e1-0497672abda9"}
|
|
1
|
+
{"version":3,"file":"commander-usage.js","sources":["cli/commander-usage.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commander-usage\n *\n * Provides CLI runtime support for Commander Usage.\n */\nimport { Command } from \"commander\";\nimport { pathExists } from \"../core/fs/fs-utils.js\";\nimport { resolveItemTypeRegistry } from \"../core/item/type-registry.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../core/store/paths.js\";\nimport { readSettings } from \"../core/store/settings.js\";\nimport { BUILTIN_ITEM_TYPE_VALUES } from \"../types/index.js\";\nimport {\n getActiveExtensionRegistrations,\n runActiveServiceOverride,\n} from \"../core/extensions/index.js\";\nimport {\n PM_CORE_COMMAND_NAMES,\n resolveSubcommandFlagContractsForCommand,\n type CliFlagContract,\n} from \"../sdk/cli-contracts.js\";\nimport {\n type CommanderGuidanceContext,\n formatCommanderErrorForDisplay,\n formatCommanderErrorForJson,\n} from \"./error-guidance.js\";\nimport { normalizeHelpCommandPath } from \"./help-content.js\";\nimport { getCommandPath } from \"./registration-helpers.js\";\nimport {\n EXECUTABLE_COMMAND_ALIASES,\n normalizeBootstrapInvocation,\n parseBootstrapGlobalOptions,\n parseBootstrapCommandName,\n} from \"./bootstrap-args.js\";\nimport {\n extractProvidedOptionFlags,\n normalizeLongFlag,\n renderPmCommand,\n} from \"./argv-utils.js\";\nimport { levenshteinDistanceWithinLimit } from \"../core/shared/levenshtein.js\";\nimport type { ExtensionCommandHelpDescriptor } from \"./extension-command-help.js\";\nimport { normalizeExtensionNameForMatch } from \"./commands/extension/shared.js\";\n\nexport const BUILTIN_TYPE_HELP_VALUES = BUILTIN_ITEM_TYPE_VALUES.join(\"|\");\n\nconst OPTIONAL_PACKAGE_INSTALL_HINTS: Record<string, string> = {\n calendar: \"calendar\",\n cal: \"calendar\",\n reindex: \"search-advanced\",\n \"search-advanced\": \"search-advanced\",\n \"dedupe-audit\": \"governance-audit\",\n \"dedupe-merge\": \"governance-audit\",\n \"comments-audit\": \"governance-audit\",\n normalize: \"governance-audit\",\n guide: \"guide-shell\",\n completion: \"guide-shell\",\n templates: \"templates\",\n \"test-runs\": \"linked-test-adapters\",\n beads: \"beads\",\n todos: \"todos\",\n};\n\nconst SEMANTIC_UNKNOWN_OPTION_SUGGESTIONS: Record<string, Record<string, string[]>> = {\n comments: {\n \"--body\": [\"--add\"],\n \"--text\": [\"--add\"],\n \"--comment\": [\"--add\"],\n },\n notes: {\n \"--body\": [\"--add\"],\n \"--text\": [\"--add\"],\n \"--note\": [\"--add\"],\n },\n learnings: {\n \"--body\": [\"--add\"],\n \"--text\": [\"--add\"],\n \"--learning\": [\"--add\"],\n },\n // pm update / pm create now accept --add-tags natively, so the singular\n // --add-tag and the old \"--tag\" mistype still need to be redirected at the\n // canonical additive flag (not at --tags, which would silently replace).\n update: {\n \"--add-tag\": [\"--add-tags\"],\n \"--remove-tag\": [\"--remove-tags\"],\n \"--tag\": [\"--tags\"],\n },\n create: {\n \"--add-tag\": [\"--add-tags\"],\n \"--tag\": [\"--tags\"],\n },\n};\n\nfunction getSemanticUnknownOptionSuggestions(commandName: string, unknownOption: string): string[] {\n const commandSuggestions = SEMANTIC_UNKNOWN_OPTION_SUGGESTIONS[commandName];\n if (!commandSuggestions) {\n return [];\n }\n const normalizedUnknown = normalizeLongFlag(unknownOption);\n for (const [flag, suggestions] of Object.entries(commandSuggestions)) {\n if (normalizeLongFlag(flag) === normalizedUnknown) {\n return suggestions;\n }\n }\n return [];\n}\n\n/**\n * Documents the commander usage context payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommanderUsageContext extends CommanderGuidanceContext {\n message: string;\n commandName: string | undefined;\n allowedTypes: string;\n}\n\n/**\n * Implements collect runtime command paths for the public runtime surface of this module.\n */\nexport function collectRuntimeCommandPaths(\n root: Command,\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>,\n): string[] {\n const commandPaths = new Set<string>();\n const queue: Command[] = [...root.commands];\n while (queue.length > 0) {\n const current = queue.shift();\n if (!current) {\n continue;\n }\n const normalizedPath = normalizeHelpCommandPath(getCommandPath(current));\n const hasInternalSegment = normalizedPath.split(\" \").some((segment) => segment.startsWith(\"_\"));\n if (normalizedPath.length > 0 && !hasInternalSegment) {\n commandPaths.add(normalizedPath);\n }\n queue.push(...current.commands);\n }\n for (const descriptorPath of extensionDescriptors.keys()) {\n const normalizedPath = normalizeHelpCommandPath(descriptorPath);\n const hasInternalSegment = normalizedPath.split(\" \").some((segment) => segment.startsWith(\"_\"));\n if (normalizedPath.length > 0 && !hasInternalSegment) {\n commandPaths.add(normalizedPath);\n }\n }\n return [...commandPaths].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Implements score command path match for the public runtime surface of this module.\n */\nexport function scoreCommandPathMatch(commandPath: string, queryToken: string): number {\n const normalizedPath = commandPath.trim().toLowerCase();\n const normalizedToken = queryToken.trim().toLowerCase();\n if (normalizedToken.length === 0) {\n return Number.POSITIVE_INFINITY;\n }\n const pathSegments = normalizedPath.split(\" \");\n if (normalizedPath === normalizedToken) {\n return 0;\n }\n if (pathSegments.includes(normalizedToken)) {\n return 1;\n }\n if (pathSegments.some((segment) => segment.startsWith(normalizedToken))) {\n return 2;\n }\n if (normalizedPath.includes(normalizedToken)) {\n return 3;\n }\n // Fall back to edit distance so transposition/typo cases (e.g. \"lst\" -> \"list\") still rank.\n const maxDistance = normalizedToken.length >= 5 ? 2 : 1;\n let bestDistance = Number.POSITIVE_INFINITY;\n for (const segment of pathSegments) {\n const distance = levenshteinDistanceWithinLimit(segment, normalizedToken, maxDistance);\n if (distance !== null) {\n bestDistance = Math.min(bestDistance, distance);\n }\n }\n if (Number.isFinite(bestDistance)) {\n return 4 + bestDistance;\n }\n return Number.POSITIVE_INFINITY;\n}\n\nfunction toComparableFlag(flag: string): string {\n return normalizeLongFlag(flag).slice(2).replace(/-/g, \"\");\n}\n\nfunction renderAttemptedCommand(argv: string[]): string {\n return renderPmCommand(argv);\n}\n\nfunction resolveOptionalPackageInstallHint(commandPath: string): string | null {\n const topLevel = commandPath.split(\" \")[0]?.trim().toLowerCase();\n if (!topLevel) {\n return null;\n }\n const packageAlias = OPTIONAL_PACKAGE_INSTALL_HINTS[topLevel];\n if (!packageAlias) {\n return null;\n }\n return `If this command comes from an optional package, install it with: pm install ${packageAlias}`;\n}\n\nfunction normalizePackageCommandAliasToken(value: string): string {\n let normalized = normalizeExtensionNameForMatch(value);\n // Strip outer package/source prefixes and then the pm- package stem so scoped\n // and builtin package guesses converge on the exported command alias.\n for (const prefix of [\"@unbraind/\", \"@unbrained/\", \"builtin-\", \"pm-\"]) {\n if (normalized.startsWith(prefix)) {\n normalized = normalized.slice(prefix.length);\n }\n }\n return normalized;\n}\n\nfunction collectInstalledPackageCommandPathHints(\n unknownToken: string,\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>,\n): string[] {\n const normalizedUnknown = normalizePackageCommandAliasToken(unknownToken);\n if (normalizedUnknown.length === 0) {\n return [];\n }\n const hints: string[] = [];\n for (const descriptor of extensionDescriptors.values()) {\n const identifiers = new Set<string>();\n const source = descriptor.source;\n if (source) {\n for (const identifier of [source.name, source.package]) {\n const normalizedIdentifier = normalizePackageCommandAliasToken(identifier ?? \"\");\n if (normalizedIdentifier.length > 0) {\n identifiers.add(normalizedIdentifier);\n }\n }\n }\n if (identifiers.size === 0) {\n continue;\n }\n const matches = [...identifiers].some(\n (identifier) =>\n identifier === normalizedUnknown ||\n identifier.includes(normalizedUnknown) ||\n normalizedUnknown.includes(identifier),\n );\n if (matches) {\n hints.push(descriptor.command);\n }\n }\n return [...new Set(hints)].sort((left, right) => left.localeCompare(right));\n}\n\nfunction collectKnownLongFlags(\n commandName: string | undefined,\n contractsOverride?: CliFlagContract[],\n): string[] {\n const flags = new Set<string>();\n const contracts = contractsOverride ?? resolveSubcommandFlagContractsForCommand(commandName);\n for (const contract of contracts) {\n if (contract.flag.startsWith(\"--\")) {\n flags.add(normalizeLongFlag(contract.flag));\n }\n for (const alias of contract.aliases ?? []) {\n if (alias.startsWith(\"--\")) {\n flags.add(normalizeLongFlag(alias));\n }\n }\n }\n return [...flags].sort((left, right) => left.localeCompare(right));\n}\n\nfunction suggestNearestLongFlags(unknownOption: string, knownFlags: string[]): string[] {\n if (!unknownOption.startsWith(\"--\")) {\n return [];\n }\n const unknownComparable = toComparableFlag(unknownOption);\n if (unknownComparable.length === 0) {\n return [];\n }\n const maxDistance = unknownComparable.length >= 8 ? 2 : 1;\n // rank 0 = abbreviation/prefix match (e.g. --desc -> --description), rank 1 = edit-distance typo.\n const candidates: Array<{ flag: string; rank: number; distance: number }> = [];\n for (const flag of knownFlags) {\n const flagComparable = toComparableFlag(flag);\n if (flagComparable === unknownComparable) {\n continue;\n }\n if (unknownComparable.length >= 3 && flagComparable.startsWith(unknownComparable)) {\n candidates.push({ flag, rank: 0, distance: flagComparable.length - unknownComparable.length });\n continue;\n }\n const distance = levenshteinDistanceWithinLimit(unknownComparable, flagComparable, maxDistance);\n if (distance === null || distance <= 0) {\n continue;\n }\n candidates.push({ flag, rank: 1, distance });\n }\n return candidates\n .sort((left, right) => {\n if (left.rank !== right.rank) {\n return left.rank - right.rank;\n }\n if (left.distance !== right.distance) {\n return left.distance - right.distance;\n }\n return left.flag.localeCompare(right.flag);\n })\n .map((entry) => entry.flag)\n .slice(0, 3);\n}\n\nlet crossCommandFlagIndexCache: Map<string, string[]> | undefined;\n\n// Alias/shortcut command names that duplicate a canonical command. Excluding them\n// keeps cross-command flag hints focused on the primary commands an agent should use.\nconst CROSS_COMMAND_FLAG_EXCLUSIONS = new Set<string>([\n \"ctx\",\n \"packages\",\n \"list-draft\",\n \"list-open\",\n \"list-in-progress\",\n \"list-blocked\",\n \"list-closed\",\n \"list-canceled\",\n \"start-task\",\n \"pause-task\",\n \"close-task\",\n \"help\",\n]);\n\n// Index of long flag -> command names that accept it (in declaration order), so an\n// unknown flag on one command can be recognised as valid elsewhere (e.g. --type is\n// rejected on test-all but valid on create/list). Built once from core command contracts.\nfunction getCrossCommandFlagIndex(): Map<string, string[]> {\n if (crossCommandFlagIndexCache) {\n return crossCommandFlagIndexCache;\n }\n const index = new Map<string, string[]>();\n for (const command of PM_CORE_COMMAND_NAMES) {\n if (CROSS_COMMAND_FLAG_EXCLUSIONS.has(command)) {\n continue;\n }\n for (const flag of collectKnownLongFlags(command)) {\n const commands = index.get(flag) ?? [];\n commands.push(command);\n index.set(flag, commands);\n }\n }\n crossCommandFlagIndexCache = index;\n return crossCommandFlagIndexCache;\n}\n\nfunction findOtherCommandsForFlag(unknownOption: string, currentCommand: string | undefined): string[] {\n if (!unknownOption.startsWith(\"--\")) {\n return [];\n }\n const commands = getCrossCommandFlagIndex().get(normalizeLongFlag(unknownOption));\n if (!commands) {\n return [];\n }\n const normalizedCurrent = currentCommand?.trim().toLowerCase();\n return commands.filter((command) => command !== normalizedCurrent).slice(0, 3);\n}\n\nfunction rewriteUnknownOptionArgv(argv: string[], unknownOption: string, replacementFlag: string): string[] | undefined {\n for (let index = 0; index < argv.length; index += 1) {\n const token = argv[index];\n if (!token.startsWith(\"--\")) {\n continue;\n }\n const equalsIndex = token.indexOf(\"=\");\n const key = equalsIndex >= 0 ? token.slice(0, equalsIndex) : token;\n if (normalizeLongFlag(key) !== normalizeLongFlag(unknownOption)) {\n continue;\n }\n const next = [...argv];\n next[index] = equalsIndex >= 0 ? `${replacementFlag}${token.slice(equalsIndex)}` : replacementFlag;\n return next;\n }\n return undefined;\n}\n\nfunction scoreRuntimeCommandCandidates(params: {\n commandPaths: string[];\n normalizedUnknown: string;\n primaryToken: string;\n}): string[] {\n const commandPathSet = new Set(params.commandPaths);\n const scoreAgainstUnknown = (candidatePath: string): number =>\n Math.min(\n scoreCommandPathMatch(candidatePath, params.normalizedUnknown),\n params.primaryToken !== params.normalizedUnknown\n ? scoreCommandPathMatch(candidatePath, params.primaryToken)\n : Number.POSITIVE_INFINITY,\n );\n const scoresByCommandPath = new Map<string, number>();\n const recordCandidateScore = (commandPath: string, score: number): void => {\n if (!Number.isFinite(score) || !commandPathSet.has(commandPath)) {\n return;\n }\n const existing = scoresByCommandPath.get(commandPath);\n if (existing === undefined || score < existing) {\n scoresByCommandPath.set(commandPath, score);\n }\n };\n for (const commandPath of params.commandPaths) {\n recordCandidateScore(commandPath, scoreAgainstUnknown(commandPath));\n }\n for (const [aliasToken, canonicalPath] of Object.entries(EXECUTABLE_COMMAND_ALIASES)) {\n recordCandidateScore(canonicalPath, scoreAgainstUnknown(aliasToken));\n }\n return [...scoresByCommandPath.entries()]\n .sort(([leftPath, leftScore], [rightPath, rightScore]) =>\n leftScore !== rightScore ? leftScore - rightScore : leftPath.localeCompare(rightPath),\n )\n .map(([commandPath]) => commandPath);\n}\n\nfunction resolveUnknownCommandCandidates(params: {\n commandPaths: string[];\n normalizedUnknown: string;\n primaryToken: string;\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>;\n}): string[] {\n const rankedCandidates = scoreRuntimeCommandCandidates(params);\n const installedPackageCandidates = collectInstalledPackageCommandPathHints(\n params.primaryToken,\n params.extensionDescriptors,\n ).filter((commandPath) => params.commandPaths.includes(commandPath));\n return dedupeStrings([...rankedCandidates, ...installedPackageCandidates]);\n}\n\nfunction resolveUnknownCommandFallbacks(commandPaths: string[]): string[] {\n const topLevel = [...new Set(commandPaths.map((commandPath) => commandPath.split(\" \")[0]).filter((segment) => segment.length > 0))];\n return topLevel.sort((left, right) => left.localeCompare(right));\n}\n\nfunction buildUnknownCommandExamples(suggestedPaths: string[], hasConcreteCandidates: boolean): string[] {\n const suggestedExamples = suggestedPaths.map((path) => `pm ${path} --help`);\n if (hasConcreteCandidates) {\n return [...new Set([...suggestedExamples, \"pm --help\"])];\n }\n return [...new Set([\"pm --help\", ...suggestedExamples])];\n}\n\n/**\n * Implements build unknown command guidance from runtime for the public runtime surface of this module.\n */\nexport function buildUnknownCommandGuidanceFromRuntime(\n rawMessage: string,\n root: Command,\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>,\n): CommanderGuidanceContext | undefined {\n const unknownCommandMatch = rawMessage.match(/unknown command '([^']+)'/i);\n if (!unknownCommandMatch || typeof unknownCommandMatch[1] !== \"string\") {\n return undefined;\n }\n const normalizedUnknown = normalizeHelpCommandPath(unknownCommandMatch[1]);\n if (normalizedUnknown.length === 0) {\n return undefined;\n }\n const commandPaths = collectRuntimeCommandPaths(root, extensionDescriptors);\n if (commandPaths.length === 0) {\n return undefined;\n }\n\n const primaryToken = normalizedUnknown.split(\" \")[0];\n // Executable aliases are scored against their canonical runtime command, so a\n // typo of an alias still points at the command path that would actually run.\n const combinedCandidates = resolveUnknownCommandCandidates({\n commandPaths,\n normalizedUnknown,\n primaryToken,\n extensionDescriptors,\n });\n const fallbackTopLevel = resolveUnknownCommandFallbacks(commandPaths);\n const suggestedPaths = (combinedCandidates.length > 0 ? combinedCandidates : fallbackTopLevel).slice(0, 3);\n const examples = buildUnknownCommandExamples(suggestedPaths, combinedCandidates.length > 0);\n const optionalPackageHint = resolveOptionalPackageInstallHint(normalizedUnknown);\n const didYouMean = combinedCandidates.length > 0 ? `Did you mean: ${suggestedPaths.join(\", \")}?` : null;\n\n return {\n unknownCommandExamples: examples,\n unknownCommandNextSteps: [\n ...(didYouMean ? [didYouMean] : []),\n 'Run \"pm --help\" to list commands available in this runtime, including active extensions.',\n \"Use one of the suggested command paths above with --help to inspect valid flags and usage.\",\n ...(optionalPackageHint ? [optionalPackageHint] : []),\n ],\n };\n}\n\nfunction dedupeStrings(values: string[]): string[] {\n return Array.from(new Set(values));\n}\n\nfunction firstWhitespaceSeparatedToken(input: string): string {\n let token = \"\";\n for (const character of input) {\n if (\n character === \" \" ||\n character === \"\\t\" ||\n character === \"\\n\" ||\n character === \"\\r\" ||\n character === \"\\f\" ||\n character === \"\\v\"\n ) {\n break;\n }\n token += character;\n }\n return token;\n}\n\nfunction trimTrailingPunctuationToken(token: string): string {\n let end = token.length;\n while (end > 0) {\n const character = token[end - 1];\n if (character !== \",\" && character !== \":\" && character !== \";\") {\n break;\n }\n end -= 1;\n }\n return token.slice(0, end);\n}\n\n/**\n * Implements resolve child command by token for the public runtime surface of this module.\n */\nexport function resolveChildCommandByToken(parent: Command, token: string): Command | undefined {\n const normalizedToken = token.trim().toLowerCase();\n return parent.commands.find((candidate) => {\n if (candidate.name().trim().toLowerCase() === normalizedToken) {\n return true;\n }\n const aliases = typeof candidate.aliases === \"function\" ? candidate.aliases() : [];\n return aliases.some((alias) => alias.trim().toLowerCase() === normalizedToken);\n });\n}\n\n/**\n * Implements check whether known help command path for the public runtime surface of this module.\n */\nexport function isKnownHelpCommandPath(root: Command, commandPathTokens: string[]): boolean {\n if (commandPathTokens.length === 0) {\n return true;\n }\n let current = root;\n let matchedAny = false;\n for (const token of commandPathTokens) {\n const next = resolveChildCommandByToken(current, token);\n if (!next) {\n return matchedAny;\n }\n matchedAny = true;\n current = next;\n }\n return matchedAny;\n}\n\nasync function resolveAllowedTypesForUsage(bootstrapGlobal: ReturnType<typeof parseBootstrapGlobalOptions>): Promise<string> {\n try {\n const pmRoot = resolvePmRoot(process.cwd(), bootstrapGlobal.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n return BUILTIN_TYPE_HELP_VALUES;\n }\n const settings = await readSettings(pmRoot);\n const extensionRegistrations = bootstrapGlobal.noExtensions ? undefined : getActiveExtensionRegistrations();\n const typeRegistry = resolveItemTypeRegistry(settings, extensionRegistrations);\n return typeRegistry.types.length > 0 ? typeRegistry.types.join(\"|\") : BUILTIN_TYPE_HELP_VALUES;\n } catch {\n /* v8 ignore start -- defensive fallback for corrupted settings during usage-error rendering; command behavior is covered through normal settings paths */\n return BUILTIN_TYPE_HELP_VALUES;\n /* v8 ignore stop */\n }\n}\n\nfunction resolveUnknownOptionSuggestions(\n message: string,\n commandName: string | undefined,\n): { match: RegExpMatchArray | null; suggestions: string[] | undefined; otherCommands: string[] } {\n const match = message.match(/unknown option '([^']+)'/i);\n const suggestions =\n match && commandName\n ? dedupeStrings([\n ...getSemanticUnknownOptionSuggestions(commandName, match[1]),\n ...suggestNearestLongFlags(match[1], collectKnownLongFlags(commandName)),\n ])\n : undefined;\n return {\n match,\n suggestions,\n otherCommands: match ? findOtherCommandsForFlag(match[1], commandName) : [],\n };\n}\n\nfunction resolveSuggestedRetryForUnknownOption(\n invocationArgv: string[],\n unknownOptionMatch: RegExpMatchArray | null,\n unknownOptionSuggestions: string[] | undefined,\n): string | undefined {\n if (!unknownOptionMatch || !unknownOptionSuggestions || unknownOptionSuggestions.length === 0) {\n return undefined;\n }\n const rewritten = rewriteUnknownOptionArgv(invocationArgv, unknownOptionMatch[1], unknownOptionSuggestions[0]);\n return rewritten ? renderAttemptedCommand(rewritten) : undefined;\n}\n\nfunction resolveSuggestedRetryForMissingOption(message: string, invocationArgv: string[]): string | undefined {\n const missingRequiredOption = message.match(/required option '([^']+)' not specified/i);\n const requiredOptionToken = missingRequiredOption?.[1]\n ? trimTrailingPunctuationToken(firstWhitespaceSeparatedToken(missingRequiredOption[1].trim()))\n : undefined;\n if (!requiredOptionToken?.startsWith(\"--\")) {\n return undefined;\n }\n const hasFlag = invocationArgv.some((token) => token === requiredOptionToken || token.startsWith(`${requiredOptionToken}=`));\n return hasFlag ? undefined : renderAttemptedCommand([...invocationArgv, requiredOptionToken, \"<value>\"]);\n}\n\n/**\n * Implements resolve commander usage context for the public runtime surface of this module.\n */\nexport async function resolveCommanderUsageContext(\n error: unknown,\n rootProgram: Command,\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>,\n): Promise<CommanderUsageContext> {\n const rawMessage = typeof error === \"object\" && error !== null ? (error as { message?: string }).message : undefined;\n const message = rawMessage ?? \"Invalid command usage\";\n const invocationArgv = normalizeBootstrapInvocation(process.argv.slice(2)).argv;\n const bootstrapGlobal = parseBootstrapGlobalOptions(invocationArgv);\n const commandName = parseBootstrapCommandName(invocationArgv);\n const attemptedCommand = renderAttemptedCommand(invocationArgv);\n const providedOptionFlags = extractProvidedOptionFlags(invocationArgv);\n const allowedTypes = await resolveAllowedTypesForUsage(bootstrapGlobal);\n const unknownCommandGuidance = buildUnknownCommandGuidanceFromRuntime(message, rootProgram, extensionDescriptors);\n const unknownOption = resolveUnknownOptionSuggestions(message, commandName);\n const suggestedRetryCommand =\n resolveSuggestedRetryForUnknownOption(invocationArgv, unknownOption.match, unknownOption.suggestions) ??\n resolveSuggestedRetryForMissingOption(message, invocationArgv);\n return {\n message,\n commandName,\n allowedTypes,\n attemptedCommand,\n normalizedInvocationArgs: [...invocationArgv],\n providedOptionFlags,\n unknownOptionSuggestions: unknownOption.suggestions,\n unknownOptionOtherCommands: unknownOption.otherCommands.length > 0 ? unknownOption.otherCommands : undefined,\n suggestedRetryCommand,\n ...unknownCommandGuidance,\n };\n}\n\n/**\n * Implements format commander usage message for the public runtime surface of this module.\n */\nexport async function formatCommanderUsageMessage(\n error: unknown,\n rootProgram: Command,\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>,\n): Promise<string> {\n const usageContext = await resolveCommanderUsageContext(error, rootProgram, extensionDescriptors);\n const {\n message,\n commandName,\n allowedTypes,\n unknownCommandExamples,\n unknownCommandNextSteps,\n attemptedCommand,\n normalizedInvocationArgs,\n providedOptionFlags,\n unknownOptionSuggestions,\n unknownOptionOtherCommands,\n suggestedRetryCommand,\n } = usageContext;\n const formatted = formatCommanderErrorForDisplay(message, commandName, allowedTypes, {\n unknownCommandExamples,\n unknownCommandNextSteps,\n attemptedCommand,\n normalizedInvocationArgs,\n providedOptionFlags,\n unknownOptionSuggestions,\n unknownOptionOtherCommands,\n suggestedRetryCommand,\n });\n const serviceOverride = await runActiveServiceOverride(\"help_format\", {\n message: formatted,\n command: commandName,\n allowed_types: allowedTypes,\n });\n if (serviceOverride.handled && typeof serviceOverride.result === \"string\") {\n return serviceOverride.result;\n }\n return formatted;\n}\n\n/**\n * Implements format commander usage json for the public runtime surface of this module.\n */\nexport async function formatCommanderUsageJson(\n error: unknown,\n rootProgram: Command,\n extensionDescriptors: ReadonlyMap<string, ExtensionCommandHelpDescriptor>,\n): Promise<string> {\n const usageContext = await resolveCommanderUsageContext(error, rootProgram, extensionDescriptors);\n const envelope = formatCommanderErrorForJson(\n usageContext.message,\n usageContext.commandName,\n usageContext.allowedTypes,\n EXIT_CODE.USAGE,\n {\n unknownCommandExamples: usageContext.unknownCommandExamples,\n unknownCommandNextSteps: usageContext.unknownCommandNextSteps,\n attemptedCommand: usageContext.attemptedCommand,\n normalizedInvocationArgs: usageContext.normalizedInvocationArgs,\n providedOptionFlags: usageContext.providedOptionFlags,\n unknownOptionSuggestions: usageContext.unknownOptionSuggestions,\n unknownOptionOtherCommands: usageContext.unknownOptionOtherCommands,\n suggestedRetryCommand: usageContext.suggestedRetryCommand,\n },\n );\n return JSON.stringify(envelope, null, 2);\n}\n\nexport const _testOnly = {\n collectKnownLongFlags,\n collectInstalledPackageCommandPathHints,\n resolveOptionalPackageInstallHint,\n resolveSuggestedRetryForMissingOption,\n suggestNearestLongFlags,\n};\n"],"names":[],"mappings":";;AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EACL,+BAA+B,EAC/B,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,qBAAqB,EACrB,wCAAwC,GAEzC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,8BAA8B,EAC9B,2BAA2B,GAC5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