@unbrained/pm-cli 2026.6.5 → 2026.6.7
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/CHANGELOG.md +77 -0
- package/CONTRIBUTING.md +1 -0
- package/README.md +17 -5
- package/dist/cli/commander-usage.js +74 -4
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/aggregate.d.ts +8 -0
- package/dist/cli/commands/aggregate.js +84 -7
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.js +10 -3
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.js +13 -10
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/close.d.ts +1 -1
- package/dist/cli/commands/close.js +20 -10
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +87 -18
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +5 -4
- package/dist/cli/commands/config.js +50 -2
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.js +6 -3
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/copy.d.ts +14 -0
- package/dist/cli/commands/copy.js +153 -0
- package/dist/cli/commands/copy.js.map +1 -0
- package/dist/cli/commands/extension/doctor.js +62 -2
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.d.ts +8 -0
- package/dist/cli/commands/extension/install-sources.js +82 -2
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +29 -0
- package/dist/cli/commands/extension.js +61 -2
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/gc.d.ts +8 -1
- package/dist/cli/commands/gc.js +26 -3
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.d.ts +9 -0
- package/dist/cli/commands/get.js +23 -2
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.js +15 -2
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.d.ts +39 -0
- package/dist/cli/commands/history-compact.js +262 -0
- package/dist/cli/commands/history-compact.js.map +1 -0
- package/dist/cli/commands/history.d.ts +4 -1
- package/dist/cli/commands/history.js +12 -24
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +3 -0
- package/dist/cli/commands/index.js +5 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/list.d.ts +2 -0
- package/dist/cli/commands/list.js +87 -9
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/reindex.js +8 -4
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/search.d.ts +1 -0
- package/dist/cli/commands/search.js +232 -35
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/stats.d.ts +8 -1
- package/dist/cli/commands/stats.js +18 -17
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/telemetry.d.ts +8 -0
- package/dist/cli/commands/telemetry.js +253 -0
- package/dist/cli/commands/telemetry.js.map +1 -0
- package/dist/cli/error-guidance.js +26 -2
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.d.ts +1 -0
- package/dist/cli/extension-command-help.js +3 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/help-content.js +19 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.js +13 -21
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +24 -6
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +52 -17
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +55 -8
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +5 -5
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +21 -3
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-5UROHJ3D.js +16 -0
- package/dist/cli-bundle/chunks/{activity-3RWRRNOW.js → activity-YVB3QRTE.js} +11 -11
- package/dist/cli-bundle/chunks/{aggregate-OOAGKWRG.js → aggregate-LH66F75F.js} +87 -17
- package/dist/cli-bundle/chunks/aggregate-LH66F75F.js.map +7 -0
- package/dist/cli-bundle/chunks/{aggregate-J35K7WZB.js → aggregate-OHSWFQJM.js} +88 -18
- package/dist/cli-bundle/chunks/aggregate-OHSWFQJM.js.map +1 -0
- package/dist/cli-bundle/chunks/{append-PNN6UIBZ.js → append-2PPYFAG5.js} +8 -8
- package/dist/cli-bundle/chunks/{append-5JE3YGXU.js → append-AUGT5W6J.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-26KTVXJW.js → chunk-2IF7WLB7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KA24HME7.js → chunk-2IXCHCLM.js} +5 -6
- package/dist/cli-bundle/chunks/chunk-2IXCHCLM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XX5LRINW.js → chunk-2OJHLWBZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ASQM3IF5.js → chunk-3A2CMEM7.js} +5 -4
- package/dist/cli-bundle/chunks/{chunk-S3CV7JGJ.js → chunk-3EOBJOF4.js} +5 -4
- package/dist/cli-bundle/chunks/{chunk-N5YF3VFN.js → chunk-42LOFGJS.js} +91 -16
- package/dist/cli-bundle/chunks/chunk-42LOFGJS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WIKR7KFL.js → chunk-4CHEG6UK.js} +108 -21
- package/dist/cli-bundle/chunks/chunk-4CHEG6UK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4QCR4QW3.js → chunk-4GHZR3BA.js} +56 -28
- package/dist/cli-bundle/chunks/chunk-4GHZR3BA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-B3N4TKNL.js → chunk-5AXMRKN5.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-JQI2HE55.js → chunk-6J4K6JLA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-V3JQ4IPL.js → chunk-6RZXO5M2.js} +102 -22
- package/dist/cli-bundle/chunks/chunk-6RZXO5M2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BNL6S7QH.js → chunk-AVJD6VTA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NQP3ECKF.js → chunk-B2KZGPM2.js} +39 -8
- package/dist/cli-bundle/chunks/chunk-B2KZGPM2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RQAWLSUU.js → chunk-B5RF3IP7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UFCG3SWR.js → chunk-C5W2UH56.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3OH4DAEB.js → chunk-CKLBZHS7.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-GNHVV4SY.js → chunk-CLD3XNCH.js} +124 -20
- package/dist/cli-bundle/chunks/chunk-CLD3XNCH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RANZIID5.js → chunk-FHHBD7PN.js} +38 -7
- package/dist/cli-bundle/chunks/chunk-FHHBD7PN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GFWHHMVV.js → chunk-FY6Z3FYY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-CCUFLH4J.js → chunk-GNIUOLZ2.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-ZRVSMOMR.js → chunk-GPXQBR3H.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-SZQCER6S.js → chunk-GUZBNB3G.js} +27 -5
- package/dist/cli-bundle/chunks/chunk-GUZBNB3G.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GPGAYASV.js → chunk-H7EO3QA3.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-MISYRLEP.js → chunk-HLC3KTLP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KK6YPGH3.js → chunk-HMMMWBK2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4PJQSECJ.js → chunk-HRMHZ4RV.js} +26 -4
- package/dist/cli-bundle/chunks/chunk-HRMHZ4RV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CJDQB2ED.js → chunk-HV5SSZXF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ATBVS6WW.js → chunk-IMCJBN2Q.js} +23 -14
- package/dist/cli-bundle/chunks/chunk-IMCJBN2Q.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FVXM3GKS.js → chunk-KNGVP5WJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OIQIXTNB.js → chunk-KR6R465K.js} +304 -215
- package/dist/cli-bundle/chunks/chunk-KR6R465K.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UOVLWB47.js → chunk-LI65XLJR.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-AXXKLVTW.js → chunk-LIN2BPJ7.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-LMTOY5HE.js +112 -0
- package/dist/cli-bundle/chunks/chunk-LMTOY5HE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Y2AKE2HS.js → chunk-LQHBENVW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-D5X7N6FI.js → chunk-LXO6V66E.js} +14 -14
- package/dist/cli-bundle/chunks/{chunk-TK633IVD.js → chunk-M2PW7EZU.js} +26 -7
- package/dist/cli-bundle/chunks/chunk-M2PW7EZU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DFIZGAI5.js → chunk-MOYM2C3J.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-ZQ4F6EC4.js → chunk-MWRS7Z4P.js} +127 -23
- package/dist/cli-bundle/chunks/chunk-MWRS7Z4P.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5PAOPUZX.js → chunk-NHR2QXXZ.js} +24 -15
- package/dist/cli-bundle/chunks/chunk-NHR2QXXZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OUF3ARDX.js → chunk-NQL32HQ5.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-TBQVUNVH.js → chunk-O7HSSFCC.js} +65 -16
- package/dist/cli-bundle/chunks/chunk-O7HSSFCC.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GCAVRLGE.js → chunk-OKSKJKHX.js} +9 -9
- package/dist/cli-bundle/chunks/chunk-QQL5QSTZ.js +1572 -0
- package/dist/cli-bundle/chunks/chunk-QQL5QSTZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-A6PEXMYN.js → chunk-R3V3YCMH.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-T2ORWB6D.js → chunk-RVPTZKBC.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-K47WAYQV.js → chunk-SFFVGNHC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-DFUSXJDE.js → chunk-SQPKRA54.js} +14 -14
- package/dist/cli-bundle/chunks/chunk-THDEID2Z.js +115 -0
- package/dist/cli-bundle/chunks/chunk-THDEID2Z.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-G5BACLYH.js → chunk-TINUJMWN.js} +92 -17
- package/dist/cli-bundle/chunks/chunk-TINUJMWN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JB4RGL4V.js → chunk-TNPBPNII.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-XG7RJYHV.js → chunk-TP4DDY27.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-ORTLYVA4.js → chunk-TYJJOTUA.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-HZOS2UG5.js → chunk-UAQOQ7IE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-D3WUNETC.js → chunk-UEWA73ZZ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-O5IBJE6S.js → chunk-UIIQC5YO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SRVKTWPR.js → chunk-UJUT6AHZ.js} +314 -39
- package/dist/cli-bundle/chunks/chunk-UJUT6AHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SSFMJCPF.js → chunk-UT6WFXW2.js} +6 -7
- package/dist/cli-bundle/chunks/chunk-UT6WFXW2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KBG47ZOY.js → chunk-UYQ7HXH4.js} +10 -6
- package/dist/cli-bundle/chunks/chunk-UYQ7HXH4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LDJK7SHN.js → chunk-V6EYFTRL.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-5IRA6IYD.js → chunk-WAA7UI6M.js} +58 -30
- package/dist/cli-bundle/chunks/chunk-WAA7UI6M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HPH6X4ZZ.js → chunk-WCQZBDDH.js} +10 -6
- package/dist/cli-bundle/chunks/{chunk-HPH6X4ZZ.js.map → chunk-WCQZBDDH.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-WR5567FH.js +1582 -0
- package/dist/cli-bundle/chunks/chunk-WR5567FH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TQ3ZK6VD.js → chunk-WYEXLDDY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-4LTBNUYT.js → chunk-X4IZKYHP.js} +307 -32
- package/dist/cli-bundle/chunks/chunk-X4IZKYHP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KCMIYKTA.js → chunk-X7UHMKPE.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7K24QB23.js → chunk-XS3O2TFJ.js} +27 -8
- package/dist/cli-bundle/chunks/chunk-XS3O2TFJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-EHXPIKKP.js → chunk-XYNT7UFP.js} +303 -207
- package/dist/cli-bundle/chunks/chunk-XYNT7UFP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-CWT53EYT.js → chunk-YBZW2QQ7.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-VGO2T3TY.js → chunk-YO3THIJF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-5KB4X7YY.js → chunk-YPH4ESA2.js} +66 -17
- package/dist/cli-bundle/chunks/chunk-YPH4ESA2.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-ZFA7HKU4.js → claim-BJ4QMPJC.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-AZLP7YFO.js → claim-KW743OSW.js} +10 -10
- package/dist/cli-bundle/chunks/close-P4ZBKODL.js +13 -0
- package/dist/cli-bundle/chunks/{close-65DFYAVS.js → close-SYHSRZDC.js} +8 -8
- package/dist/cli-bundle/chunks/{close-many-UKZSQGM7.js → close-many-DBLEYFOY.js} +29 -26
- package/dist/cli-bundle/chunks/close-many-DBLEYFOY.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-many-AKPZNSGI.js → close-many-LAC5VR4G.js} +30 -27
- package/dist/cli-bundle/chunks/close-many-LAC5VR4G.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-AGBNSJJH.js → comments-JEO6HHVM.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-CJWXQI7X.js → comments-YT2PQ5DD.js} +10 -10
- package/dist/cli-bundle/chunks/{config-DDPYIA6J.js → config-RZRVS3ZV.js} +127 -11
- package/dist/cli-bundle/chunks/config-RZRVS3ZV.js.map +1 -0
- package/dist/cli-bundle/chunks/{config-5ON3ADRH.js → config-YJSAAADD.js} +128 -12
- package/dist/cli-bundle/chunks/config-YJSAAADD.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-E6U3DWVM.js → context-LGYEEKAW.js} +14 -14
- package/dist/cli-bundle/chunks/{context-E6U3DWVM.js.map → context-LGYEEKAW.js.map} +2 -2
- package/dist/cli-bundle/chunks/{context-ZOJEN5VT.js → context-ZUH5IOOI.js} +15 -15
- package/dist/cli-bundle/chunks/context-ZUH5IOOI.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-CXSFM45B.js → contracts-YXJ6NXKH.js} +11 -5
- package/dist/cli-bundle/chunks/contracts-YXJ6NXKH.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-LCSX5R53.js → contracts-ZIBXROPE.js} +12 -6
- package/dist/cli-bundle/chunks/contracts-ZIBXROPE.js.map +1 -0
- package/dist/cli-bundle/chunks/copy-BZALX5MQ.js +182 -0
- package/dist/cli-bundle/chunks/copy-BZALX5MQ.js.map +1 -0
- package/dist/cli-bundle/chunks/copy-YPWEIAPD.js +185 -0
- package/dist/cli-bundle/chunks/copy-YPWEIAPD.js.map +7 -0
- package/dist/cli-bundle/chunks/create-4DS2QWQC.js +27 -0
- package/dist/cli-bundle/chunks/{create-WYFKN2U4.js → create-CF7EVRX7.js} +13 -13
- package/dist/cli-bundle/chunks/{delete-ZXWC56WO.js → delete-KR4VBWVE.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-RONNH4F4.js → delete-XLZRTRKR.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-WII3O4HB.js → deps-2YTXD3VM.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-EHXIFOZR.js → deps-GZMFMTGS.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-PDREIMLS.js → docs-SLROFEQ4.js} +9 -9
- package/dist/cli-bundle/chunks/{docs-JMVCFNHH.js → docs-ZHISRR2D.js} +9 -9
- package/dist/cli-bundle/chunks/{extension-G6UXSM5S.js → extension-3C7OOI4F.js} +8 -6
- package/dist/cli-bundle/chunks/{extension-B4ROVWJD.js → extension-XYCUXICD.js} +8 -6
- package/dist/cli-bundle/chunks/{files-2PN7UM2D.js → files-FUWF2FYJ.js} +9 -9
- package/dist/cli-bundle/chunks/{files-MXYS5W4M.js → files-J4I5IU4O.js} +9 -9
- package/dist/cli-bundle/chunks/gc-34NXSNSN.js +362 -0
- package/dist/cli-bundle/chunks/gc-34NXSNSN.js.map +1 -0
- package/dist/cli-bundle/chunks/gc-SPIIZX3A.js +372 -0
- package/dist/cli-bundle/chunks/gc-SPIIZX3A.js.map +7 -0
- package/dist/cli-bundle/chunks/{get-WXMLRG7M.js → get-SZKNRHMA.js} +34 -12
- package/dist/cli-bundle/chunks/get-SZKNRHMA.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-CINFEUIY.js → get-VITKYP6S.js} +33 -11
- package/dist/cli-bundle/chunks/get-VITKYP6S.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-IT5DBPRJ.js → health-4SNTA2TF.js} +27 -13
- package/dist/cli-bundle/chunks/health-4SNTA2TF.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-5VPOJQ53.js → health-7G3EPM57.js} +28 -14
- package/dist/cli-bundle/chunks/health-7G3EPM57.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-FLZIP7PM.js → history-SDAWYZR3.js} +10 -10
- package/dist/cli-bundle/chunks/history-YDUEILKP.js +20 -0
- package/dist/cli-bundle/chunks/history-compact-DMW536VH.js +287 -0
- package/dist/cli-bundle/chunks/history-compact-DMW536VH.js.map +1 -0
- package/dist/cli-bundle/chunks/history-compact-POTZGG7K.js +290 -0
- package/dist/cli-bundle/chunks/history-compact-POTZGG7K.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-redact-SSZBAD76.js → history-redact-EPJ7GENL.js} +11 -11
- package/dist/cli-bundle/chunks/history-redact-KASLLPE7.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-X7CO5JJZ.js → history-repair-IJ7LLBET.js} +11 -11
- package/dist/cli-bundle/chunks/{history-repair-KC5ZOJRZ.js → history-repair-YNESJRT6.js} +11 -11
- package/dist/cli-bundle/chunks/init-IGSS4GNH.js +17 -0
- package/dist/cli-bundle/chunks/{init-6MRFVOLH.js → init-YHVBTEET.js} +9 -8
- package/dist/cli-bundle/chunks/{learnings-DCX55BNX.js → learnings-4YBMIVCZ.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-A3CLB5CO.js → learnings-T4PF24YN.js} +10 -10
- package/dist/cli-bundle/chunks/{list-DBRECOG4.js → list-3KEVBOYW.js} +10 -10
- package/dist/cli-bundle/chunks/list-E44O2K64.js +20 -0
- package/dist/cli-bundle/chunks/{notes-42LIC3UE.js → notes-FLUCNJSH.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-P5O3VMQ3.js → notes-GJKALVZM.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-HDQXEUKD.js → plan-T5MMZLI3.js} +13 -13
- package/dist/cli-bundle/chunks/{plan-IGTE3WOJ.js → plan-YYMIL3HV.js} +13 -13
- package/dist/cli-bundle/chunks/{register-list-query-EMNSIUO4.js → register-list-query-I65EZ3HB.js} +33 -27
- package/dist/cli-bundle/chunks/register-list-query-I65EZ3HB.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-AG3XKXWL.js → register-list-query-OECMHO4G.js} +32 -26
- package/dist/cli-bundle/chunks/register-list-query-OECMHO4G.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-M3YS6XDO.js → register-mutation-2FLXORLR.js} +65 -47
- package/dist/cli-bundle/chunks/register-mutation-2FLXORLR.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-RSMT6DPK.js → register-mutation-5GPDEKHR.js} +64 -46
- package/dist/cli-bundle/chunks/register-mutation-5GPDEKHR.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-KYUOOOOD.js → register-operations-BNGAUMGK.js} +71 -35
- package/dist/cli-bundle/chunks/register-operations-BNGAUMGK.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-Q54JQZUN.js → register-operations-GQKT35H5.js} +70 -34
- package/dist/cli-bundle/chunks/register-operations-GQKT35H5.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-DI6P7X75.js → register-setup-DNDCGZ4O.js} +18 -18
- package/dist/cli-bundle/chunks/{register-setup-DI6P7X75.js.map → register-setup-DNDCGZ4O.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-YJKIQRKA.js → register-setup-EJY44FPH.js} +17 -17
- package/dist/cli-bundle/chunks/{register-setup-YJKIQRKA.js.map → register-setup-EJY44FPH.js.map} +2 -2
- package/dist/cli-bundle/chunks/{restore-2XVTBLKQ.js → restore-DDJGVZIN.js} +11 -11
- package/dist/cli-bundle/chunks/restore-SJSASGZP.js +17 -0
- package/dist/cli-bundle/chunks/{schema-V6BX65Q2.js → schema-B7NQ6XVP.js} +8 -8
- package/dist/cli-bundle/chunks/{schema-LVXZWFGY.js → schema-HEGYH6CE.js} +8 -8
- package/dist/cli-bundle/chunks/{search-C7NPB7G7.js → search-DVVQ4UO2.js} +421 -42
- package/dist/cli-bundle/chunks/search-DVVQ4UO2.js.map +1 -0
- package/dist/cli-bundle/chunks/{search-5A3BMFA7.js → search-JNEZJV7H.js} +427 -41
- package/dist/cli-bundle/chunks/search-JNEZJV7H.js.map +7 -0
- package/dist/cli-bundle/chunks/stats-7JDIJRDH.js +202 -0
- package/dist/cli-bundle/chunks/stats-7JDIJRDH.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-SYTJRR4Z.js +212 -0
- package/dist/cli-bundle/chunks/stats-SYTJRR4Z.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-4HHWD5Y7.js +251 -0
- package/dist/cli-bundle/chunks/telemetry-4HHWD5Y7.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-EGWP7ZUX.js +248 -0
- package/dist/cli-bundle/chunks/telemetry-EGWP7ZUX.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-OFYONO3C.js → test-IIELLSZX.js} +14 -13
- package/dist/cli-bundle/chunks/test-ML5RLWXE.js +32 -0
- package/dist/cli-bundle/chunks/{test-all-EEMKNTGU.js → test-all-7DNCMML7.js} +14 -13
- package/dist/cli-bundle/chunks/{test-all-EEMKNTGU.js.map → test-all-7DNCMML7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-OJE6CIO7.js → test-all-IHTUJRRC.js} +16 -15
- package/dist/cli-bundle/chunks/{test-all-OJE6CIO7.js.map → test-all-IHTUJRRC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-runs-IPOPFOAF.js → test-runs-5FEMBV3A.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-L2M7WKH7.js → test-runs-RNKZ37PS.js} +5 -5
- package/dist/cli-bundle/chunks/update-6C67X4KS.js +21 -0
- package/dist/cli-bundle/chunks/update-VF26YPT3.js +25 -0
- package/dist/cli-bundle/chunks/{update-many-322CCH2L.js → update-many-BSZZZYXY.js} +22 -22
- package/dist/cli-bundle/chunks/{update-many-DYWGW57M.js → update-many-BWKJJEBF.js} +22 -22
- package/dist/cli-bundle/chunks/{upgrade-3W3RVSNM.js → upgrade-RSE5PC44.js} +7 -6
- package/dist/cli-bundle/chunks/{upgrade-3W3RVSNM.js.map → upgrade-RSE5PC44.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-2U727SAM.js → upgrade-YWI5DJFA.js} +5 -4
- package/dist/cli-bundle/chunks/{upgrade-2U727SAM.js.map → upgrade-YWI5DJFA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-ZFVWPEEN.js → validate-NK3WKB7C.js} +18 -17
- package/dist/cli-bundle/chunks/{validate-ZFVWPEEN.js.map → validate-NK3WKB7C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-GZ24NYHO.js → validate-UCEOB7S6.js} +20 -19
- package/dist/cli-bundle/chunks/{validate-GZ24NYHO.js.map → validate-UCEOB7S6.js.map} +1 -1
- package/dist/cli-bundle/main.js +198 -1523
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/config/nested-settings.d.ts +8 -6
- package/dist/core/config/nested-settings.js +71 -5
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/config/positional-value.js +4 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +36 -0
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.js +46 -5
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/drift-scan.d.ts +3 -4
- package/dist/core/history/drift-scan.js +71 -18
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/history/history-diff.d.ts +47 -0
- package/dist/core/history/history-diff.js +152 -0
- package/dist/core/history/history-diff.js.map +1 -0
- package/dist/core/history/history-storage-stats.d.ts +31 -0
- package/dist/core/history/history-storage-stats.js +101 -0
- package/dist/core/history/history-storage-stats.js.map +1 -0
- package/dist/core/item/id.js +4 -5
- package/dist/core/item/id.js.map +1 -1
- package/dist/core/item/item-format.js +7 -3
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/toon-decode.d.ts +7 -0
- package/dist/core/item/toon-decode.js +11 -2
- package/dist/core/item/toon-decode.js.map +1 -1
- package/dist/core/item/type-registry.js +25 -7
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/lock/lock-gc.d.ts +46 -0
- package/dist/core/lock/lock-gc.js +194 -0
- package/dist/core/lock/lock-gc.js.map +1 -0
- package/dist/core/search/cache.js +5 -3
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/corpus.d.ts +6 -0
- package/dist/core/search/corpus.js +22 -9
- package/dist/core/search/corpus.js.map +1 -1
- package/dist/core/search/embedding-batches.js +10 -7
- package/dist/core/search/embedding-batches.js.map +1 -1
- package/dist/core/search/relevance.d.ts +29 -0
- package/dist/core/search/relevance.js +226 -0
- package/dist/core/search/relevance.js.map +1 -0
- package/dist/core/search/vector-stores.d.ts +3 -0
- package/dist/core/search/vector-stores.js +23 -10
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/shared/constants.js +15 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.d.ts +6 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/primitives.d.ts +8 -0
- package/dist/core/shared/primitives.js +29 -2
- package/dist/core/shared/primitives.js.map +1 -1
- package/dist/core/shared/serial-queue.d.ts +12 -0
- package/dist/core/shared/serial-queue.js +43 -0
- package/dist/core/shared/serial-queue.js.map +1 -0
- package/dist/core/shared/time.js +42 -6
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/paths.js +25 -7
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +11 -0
- package/dist/core/store/settings-validator.js +14 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.d.ts +19 -1
- package/dist/core/store/settings.js +199 -17
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/observability.js +3 -3
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.js +99 -6
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +187 -42
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
- package/dist/sdk/cli-contracts/commander-types.js +13 -2
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +8 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +7 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +39 -7
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +26 -1
- package/dist/sdk/cli-contracts.js +75 -11
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/testing.d.ts +51 -1
- package/dist/sdk/testing.js +93 -2
- package/dist/sdk/testing.js.map +1 -1
- package/dist/types.d.ts +14 -0
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +1 -1
- package/docs/ARCHITECTURE.md +11 -1
- package/docs/CLAUDE_CODE_PLUGIN.md +4 -4
- package/docs/CODEX_PLUGIN.md +1 -1
- package/docs/COMMANDS.md +42 -4
- package/docs/CONFIGURATION.md +31 -2
- package/docs/EXTENSIONS.md +28 -8
- package/docs/EXTENSION_AUTHOR_CONTRACTS.md +73 -0
- package/docs/ONBOARDING.md +165 -0
- package/docs/QUICKSTART.md +2 -2
- package/docs/README.md +12 -4
- package/docs/RELEASING.md +36 -1
- package/docs/SDK.md +66 -0
- package/docs/TESTING.md +33 -1
- package/package.json +6 -2
- package/packages/pm-governance-audit/README.md +14 -0
- package/packages/pm-governance-audit/extensions/governance-audit/index.js +39 -1
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +40 -2
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +1 -1
- package/packages/pm-governance-audit/package.json +4 -2
- package/packages/pm-lifecycle-hooks/README.md +21 -0
- package/packages/pm-search-advanced/README.md +38 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +17 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +17 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +216 -1
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +271 -2
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +11 -8
- package/plugins/pm-claude/agents/pm-coordinator.md +1 -1
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/plugins/pm-codex/README.md +1 -1
- package/dist/cli-bundle/chunks/activity-P5BUMWP3.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js.map +0 -1
- package/dist/cli-bundle/chunks/aggregate-OOAGKWRG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7K24QB23.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ATBVS6WW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-G5BACLYH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KA24HME7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RANZIID5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SZQCER6S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TK633IVD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WIKR7KFL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js.map +0 -7
- package/dist/cli-bundle/chunks/close-RMHQ3KWH.js +0 -13
- package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js.map +0 -1
- package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js.map +0 -7
- package/dist/cli-bundle/chunks/config-5ON3ADRH.js.map +0 -7
- package/dist/cli-bundle/chunks/config-DDPYIA6J.js.map +0 -1
- package/dist/cli-bundle/chunks/context-ZOJEN5VT.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-CXSFM45B.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-LCSX5R53.js.map +0 -1
- package/dist/cli-bundle/chunks/create-ATONSAZW.js +0 -27
- package/dist/cli-bundle/chunks/gc-GT552UJH.js +0 -178
- package/dist/cli-bundle/chunks/gc-GT552UJH.js.map +0 -1
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js +0 -181
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js.map +0 -7
- package/dist/cli-bundle/chunks/get-CINFEUIY.js.map +0 -7
- package/dist/cli-bundle/chunks/get-WXMLRG7M.js.map +0 -1
- package/dist/cli-bundle/chunks/health-5VPOJQ53.js.map +0 -1
- package/dist/cli-bundle/chunks/health-IT5DBPRJ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-6FC4H6HI.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js +0 -19
- package/dist/cli-bundle/chunks/init-KHX3FEEM.js +0 -16
- package/dist/cli-bundle/chunks/list-53LZ2AEO.js +0 -20
- package/dist/cli-bundle/chunks/register-list-query-AG3XKXWL.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-RSMT6DPK.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-Q54JQZUN.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-JL5QIH7H.js +0 -17
- package/dist/cli-bundle/chunks/search-5A3BMFA7.js.map +0 -7
- package/dist/cli-bundle/chunks/search-C7NPB7G7.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js +0 -120
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js +0 -123
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js.map +0 -7
- package/dist/cli-bundle/chunks/test-RJ4ZF35X.js +0 -31
- package/dist/cli-bundle/chunks/update-6YEHPVXH.js +0 -25
- package/dist/cli-bundle/chunks/update-PYLVHMRD.js +0 -21
- /package/dist/cli-bundle/chunks/{activity-P5BUMWP3.js.map → activity-5UROHJ3D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-3RWRRNOW.js.map → activity-YVB3QRTE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-PNN6UIBZ.js.map → append-2PPYFAG5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-5JE3YGXU.js.map → append-AUGT5W6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-26KTVXJW.js.map → chunk-2IF7WLB7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XX5LRINW.js.map → chunk-2OJHLWBZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ASQM3IF5.js.map → chunk-3A2CMEM7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S3CV7JGJ.js.map → chunk-3EOBJOF4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B3N4TKNL.js.map → chunk-5AXMRKN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JQI2HE55.js.map → chunk-6J4K6JLA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BNL6S7QH.js.map → chunk-AVJD6VTA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RQAWLSUU.js.map → chunk-B5RF3IP7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UFCG3SWR.js.map → chunk-C5W2UH56.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3OH4DAEB.js.map → chunk-CKLBZHS7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GFWHHMVV.js.map → chunk-FY6Z3FYY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CCUFLH4J.js.map → chunk-GNIUOLZ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZRVSMOMR.js.map → chunk-GPXQBR3H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GPGAYASV.js.map → chunk-H7EO3QA3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MISYRLEP.js.map → chunk-HLC3KTLP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KK6YPGH3.js.map → chunk-HMMMWBK2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CJDQB2ED.js.map → chunk-HV5SSZXF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FVXM3GKS.js.map → chunk-KNGVP5WJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UOVLWB47.js.map → chunk-LI65XLJR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AXXKLVTW.js.map → chunk-LIN2BPJ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y2AKE2HS.js.map → chunk-LQHBENVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D5X7N6FI.js.map → chunk-LXO6V66E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DFIZGAI5.js.map → chunk-MOYM2C3J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OUF3ARDX.js.map → chunk-NQL32HQ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GCAVRLGE.js.map → chunk-OKSKJKHX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A6PEXMYN.js.map → chunk-R3V3YCMH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T2ORWB6D.js.map → chunk-RVPTZKBC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K47WAYQV.js.map → chunk-SFFVGNHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DFUSXJDE.js.map → chunk-SQPKRA54.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JB4RGL4V.js.map → chunk-TNPBPNII.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XG7RJYHV.js.map → chunk-TP4DDY27.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ORTLYVA4.js.map → chunk-TYJJOTUA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HZOS2UG5.js.map → chunk-UAQOQ7IE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D3WUNETC.js.map → chunk-UEWA73ZZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-O5IBJE6S.js.map → chunk-UIIQC5YO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LDJK7SHN.js.map → chunk-V6EYFTRL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TQ3ZK6VD.js.map → chunk-WYEXLDDY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KCMIYKTA.js.map → chunk-X7UHMKPE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CWT53EYT.js.map → chunk-YBZW2QQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VGO2T3TY.js.map → chunk-YO3THIJF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-ZFA7HKU4.js.map → claim-BJ4QMPJC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-AZLP7YFO.js.map → claim-KW743OSW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-RMHQ3KWH.js.map → close-P4ZBKODL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-65DFYAVS.js.map → close-SYHSRZDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-AGBNSJJH.js.map → comments-JEO6HHVM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-CJWXQI7X.js.map → comments-YT2PQ5DD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-ATONSAZW.js.map → create-4DS2QWQC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-WYFKN2U4.js.map → create-CF7EVRX7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ZXWC56WO.js.map → delete-KR4VBWVE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-RONNH4F4.js.map → delete-XLZRTRKR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-WII3O4HB.js.map → deps-2YTXD3VM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-EHXIFOZR.js.map → deps-GZMFMTGS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-PDREIMLS.js.map → docs-SLROFEQ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-JMVCFNHH.js.map → docs-ZHISRR2D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-G6UXSM5S.js.map → extension-3C7OOI4F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-B4ROVWJD.js.map → extension-XYCUXICD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-2PN7UM2D.js.map → files-FUWF2FYJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-MXYS5W4M.js.map → files-J4I5IU4O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-FLZIP7PM.js.map → history-SDAWYZR3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-6FC4H6HI.js.map → history-YDUEILKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-SSZBAD76.js.map → history-redact-EPJ7GENL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-XKYEZDBL.js.map → history-redact-KASLLPE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-X7CO5JJZ.js.map → history-repair-IJ7LLBET.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-KC5ZOJRZ.js.map → history-repair-YNESJRT6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-KHX3FEEM.js.map → init-IGSS4GNH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-6MRFVOLH.js.map → init-YHVBTEET.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-DCX55BNX.js.map → learnings-4YBMIVCZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-A3CLB5CO.js.map → learnings-T4PF24YN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-DBRECOG4.js.map → list-3KEVBOYW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-53LZ2AEO.js.map → list-E44O2K64.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-42LIC3UE.js.map → notes-FLUCNJSH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-P5O3VMQ3.js.map → notes-GJKALVZM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-HDQXEUKD.js.map → plan-T5MMZLI3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-IGTE3WOJ.js.map → plan-YYMIL3HV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-2XVTBLKQ.js.map → restore-DDJGVZIN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-JL5QIH7H.js.map → restore-SJSASGZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-V6BX65Q2.js.map → schema-B7NQ6XVP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-LVXZWFGY.js.map → schema-HEGYH6CE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-OFYONO3C.js.map → test-IIELLSZX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-RJ4ZF35X.js.map → test-ML5RLWXE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-IPOPFOAF.js.map → test-runs-5FEMBV3A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-L2M7WKH7.js.map → test-runs-RNKZ37PS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-PYLVHMRD.js.map → update-6C67X4KS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-6YEHPVXH.js.map → update-VF26YPT3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-322CCH2L.js.map → update-many-BSZZZYXY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-DYWGW57M.js.map → update-many-BWKJJEBF.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.6.7 - 2026-06-07
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- pm-governance-audit: onWrite/onRead hooks exemplar \(hooks capability\) ([pm-7m8p](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-7m8p.toon))
|
|
8
|
+
- pm history-compact: checkpoint-based history stream compaction ([pm-3pbq](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-3pbq.toon))
|
|
9
|
+
- Advanced relevance tuning \(post-v0.1\): cross-encoder reranking + query expansion ([pm-7tsx](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-7tsx.toon))
|
|
10
|
+
- Configurable vector store collection name \(post-v0.1 adapter optimization\) ([pm-usw2](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-usw2.toon))
|
|
11
|
+
- pm copy <id\>: clone an item to a new ID with optional title override ([pm-m4nn](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-m4nn.toon))
|
|
12
|
+
- pm aggregate --sum/--avg: numeric aggregation over filtered items ([pm-bvns](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-bvns.toon))
|
|
13
|
+
- pm list --tree: recursive subtree rendering with indented hierarchy ([pm-vbzc](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-vbzc.toon))
|
|
14
|
+
- Configurable semantic corpus character limit \(search.embedding\_corpus\_max\_characters\) ([pm-cxdg](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-cxdg.toon))
|
|
15
|
+
- Per-query hybrid weight override: pm search --semantic-weight \(post-v0.1\) ([pm-cy8i](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-cy8i.toon))
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Track removal of TOON upstream bracket-bug workaround when upstream fix ships ([pm-idnz](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-idnz.toon))
|
|
20
|
+
- Drift-scan cache can false-hit on mtime-preserving file copies ([pm-up22](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-up22.toon))
|
|
21
|
+
- Search relevance evaluation harness \(golden queries, nDCG\) for regression detection ([pm-22x2](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-22x2.toon))
|
|
22
|
+
|
|
23
|
+
### Security
|
|
24
|
+
|
|
25
|
+
- Harden afterCommand coverage and GitHub code-scanning visibility ([pm-izid](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-izid.toon))
|
|
26
|
+
|
|
27
|
+
### Other
|
|
28
|
+
|
|
29
|
+
- Agent command compatibility and package command discovery ([pm-7etc](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-7etc.toon))
|
|
30
|
+
- Package install fallback hints and extension collision plans ([pm-e48i](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-e48i.toon))
|
|
31
|
+
- Stabilize npx onboarding path for scoped pm package ([pm-pgew](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-pgew.toon))
|
|
32
|
+
- Publish pm-github starter package as a community reference \(credential-requiring pattern\) ([pm-zw0n](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-zw0n.toon))
|
|
33
|
+
- Make list --ids repeatable for focused agent working-set refresh ([pm-42tb](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-42tb.toon))
|
|
34
|
+
- SDK testing helper for vector store adapter registrations ([pm-475h](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-475h.toon))
|
|
35
|
+
- SDK testing helper for package manifest resource assertions ([pm-xevy](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-xevy.toon))
|
|
36
|
+
- SDK testing helpers for schema package registrations ([pm-01bm](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-01bm.toon))
|
|
37
|
+
- PR \#123 review: make governance hook sidecar logging fail-open ([pm-mzlu](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-mzlu.toon))
|
|
38
|
+
- Config-driven optional close reason via governance.require\_close\_reason ([pm-peyv](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-peyv.toon))
|
|
39
|
+
|
|
40
|
+
## 2026.6.6 - 2026-06-06
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- pm telemetry local-analytics subcommand \(status/flush/stats/clear\) ([pm-6xdl](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-6xdl.toon))
|
|
45
|
+
- Add Claude Code rows to docs read-path and README start-here tables ([pm-pwdx](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-pwdx.toon))
|
|
46
|
+
- Add AGENTS.md/README workflow-update checkbox to the PR template ([pm-0sqs](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-0sqs.toon))
|
|
47
|
+
- Create ONBOARDING.md for new maintainers and first-time contributors ([pm-oh5h](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-oh5h.toon))
|
|
48
|
+
- Add markdown broken-link check to the docs CI gate ([pm-mp6c](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-mp6c.toon))
|
|
49
|
+
- Add pm stats --storage: aggregate history-stream metrics ([pm-mnee](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-mnee.toon))
|
|
50
|
+
- pm history --diff: per-entry field-level before/after diffs ([pm-puvn](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-puvn.toon))
|
|
51
|
+
- Add pm gc --scope locks: sweep expired lock debris from crashed processes ([pm-d70h](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-d70h.toon))
|
|
52
|
+
- Add MCP protocol handshake tests \(initialize + tools/list + unknown-tool error\) ([pm-kl11](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-kl11.toon))
|
|
53
|
+
- Add narrow MCP tools pm\_notes, pm\_learnings, pm\_deps \(agent self-documentation + deps\) ([pm-hywv](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-hywv.toon))
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
- Export PM\_TOOL\_PARAMETERS\_SCHEMA\_VERSION constant and bind all assertion sites ([pm-r9sz](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-r9sz.toon))
|
|
58
|
+
- Generate pm\_run action-list description from PM\_TOOL\_ACTIONS to end prose/enum drift ([pm-fd8n](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-fd8n.toon))
|
|
59
|
+
|
|
60
|
+
### Fixed
|
|
61
|
+
|
|
62
|
+
- File-backed schema sections \(types/statuses/fields/type\_workflows\) leak into settings.json on writeSettings ([pm-haak](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-haak.toon))
|
|
63
|
+
- MCP stdio server processes JSON-RPC lines concurrently → pipelined mutations on the same item lock-conflict ([pm-3puw](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-3puw.toon))
|
|
64
|
+
- PRD/contract drift: reminders\_weight and events\_weight missing from search.tuning docs ([pm-75du](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-75du.toon))
|
|
65
|
+
- MCP TOOL\_SCHEMA\_BASE additionalProperties:true silently swallows typo'd top-level args ([pm-qxwu](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-qxwu.toon))
|
|
66
|
+
|
|
67
|
+
### Other
|
|
68
|
+
|
|
69
|
+
- Telemetry schema versioning/negotiation preparation ([pm-t4wb](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-t4wb.toon))
|
|
70
|
+
- Contract schema golden-file snapshot gate in CI ([pm-d6kq](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-d6kq.toon))
|
|
71
|
+
- Document changelog classifier keyword routing for contributors ([pm-5vsv](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-5vsv.toon))
|
|
72
|
+
- Evaluate commander 15.0.0 major upgrade \(current 14.0.3\) ([pm-7j8t](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-7j8t.toon))
|
|
73
|
+
- Clean up stale closed tracker-item references in docs/ header lines ([pm-e376](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-e376.toon))
|
|
74
|
+
- Drift-lock the .agents/plugins/marketplace.json \(pm-local\) manifest in the plugin contract test ([pm-g3xl](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-g3xl.toon))
|
|
75
|
+
- History & storage observability: pm gc locks scope, pm history --diff before/after, pm stats --storage ([pm-l709](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/plans/pm-l709.toon))
|
|
76
|
+
- MCP & contract platform maturity PR \(pm-5k4v\): narrow tools pm\_notes/pm\_learnings/pm\_deps + schema-base hardening + action-list drift-gen + schema-version constant + handshake tests ([pm-at83](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/plans/pm-at83.toon))
|
|
77
|
+
- Document the create vs mutateItem dual write-path contract ([pm-k5r6](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-k5r6.toon))
|
|
78
|
+
- Document capture\_level semantics for extension authors ([pm-te9x](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-te9x.toon))
|
|
79
|
+
|
|
3
80
|
## 2026.6.5 - 2026-06-05
|
|
4
81
|
|
|
5
82
|
### Added
|
package/CONTRIBUTING.md
CHANGED
|
@@ -97,6 +97,7 @@ Behavior expectations to preserve:
|
|
|
97
97
|
|
|
98
98
|
Start with the [documentation index](docs/README.md). Focused pages:
|
|
99
99
|
|
|
100
|
+
- [Onboarding](docs/ONBOARDING.md) - first-two-hours maintainer and contributor setup.
|
|
100
101
|
- [Quickstart](docs/QUICKSTART.md) - first repository setup and item lifecycle.
|
|
101
102
|
- [Agent Guide](docs/AGENT_GUIDE.md) - canonical `pm` workflow for coding agents.
|
|
102
103
|
- [Command Reference](docs/COMMANDS.md) - command families and examples.
|
package/README.md
CHANGED
|
@@ -12,12 +12,14 @@
|
|
|
12
12
|
| Need | Read |
|
|
13
13
|
|------|------|
|
|
14
14
|
| Install and create the first item | [Quickstart](docs/QUICKSTART.md) |
|
|
15
|
+
| New maintainer onboarding | [Onboarding](docs/ONBOARDING.md) |
|
|
15
16
|
| Agent workflow and token-minimal loops | [Agent Guide](docs/AGENT_GUIDE.md) |
|
|
16
17
|
| Command families and examples | [Command Reference](docs/COMMANDS.md) |
|
|
17
18
|
| Settings, storage, search, and output | [Configuration](docs/CONFIGURATION.md) |
|
|
18
19
|
| Safe test execution and linked tests | [Testing](docs/TESTING.md) |
|
|
19
20
|
| Package and extension authoring | [Packages and Extensions](docs/EXTENSIONS.md) and [SDK](docs/SDK.md) |
|
|
20
21
|
| Codex native integration | [Codex Plugin](docs/CODEX_PLUGIN.md) |
|
|
22
|
+
| Claude Code native integration | [Claude Code Plugin](docs/CLAUDE_CODE_PLUGIN.md) |
|
|
21
23
|
| Maintainer release process (daily auto-release + local parity) | [Releasing](docs/RELEASING.md) |
|
|
22
24
|
| Contributor internals | [Architecture](docs/ARCHITECTURE.md) |
|
|
23
25
|
|
|
@@ -40,7 +42,7 @@ Use the npm registry package for global installs and updates. Avoid `npm install
|
|
|
40
42
|
Project-local invocation also works:
|
|
41
43
|
|
|
42
44
|
```bash
|
|
43
|
-
npx @unbrained/pm-cli --help
|
|
45
|
+
npx --yes @unbrained/pm-cli@latest --help
|
|
44
46
|
```
|
|
45
47
|
|
|
46
48
|
For Claude Code, install the native plugin (no `pm` CLI required):
|
|
@@ -122,13 +124,23 @@ For token-aware local routing, install `guide-shell` with `pm install guide-shel
|
|
|
122
124
|
- `pm contracts` is the machine-readable command and schema contract surface for agents.
|
|
123
125
|
- `pm guide` is the optional local progressive-disclosure docs and skills index for agents after installing `guide-shell`.
|
|
124
126
|
|
|
127
|
+
`search.tuning` lexical defaults include `reminders_weight=2` and `events_weight=2` in addition to title/description/tag/status/body/comment/note/learning/dependency/linked-content weights. Keep docs and contracts aligned with runtime defaults when tuning behavior changes.
|
|
128
|
+
|
|
129
|
+
Hybrid queries can override blend weight per call via `pm search --mode hybrid --semantic-weight <0..1>`, and semantic corpus truncation can be tuned via `pm config project set search_embedding_corpus_max_characters <positive-int>` (provider defaults still apply when unset).
|
|
130
|
+
|
|
131
|
+
Advanced semantic tuning is opt-in: `search.query_expansion` can expand semantic/hybrid queries before embedding, and `search.rerank` can rerank hybrid top-k candidates (with graceful fallback warnings when providers are unavailable). Vector backends now also support `vector_store.collection_name` for multi-workspace/shared-store isolation.
|
|
132
|
+
|
|
125
133
|
## Tracker References
|
|
126
134
|
|
|
127
|
-
|
|
135
|
+
Current documentation work is tracked through:
|
|
136
|
+
|
|
137
|
+
- [pm-u9d0](.agents/pm/epics/pm-u9d0.toon) - docs, onboarding, release, and CI capability epic
|
|
138
|
+
|
|
139
|
+
Legacy documentation baseline references (closed):
|
|
128
140
|
|
|
129
|
-
- [pm-3042](.agents/pm/epics/pm-3042.toon) - documentation overhaul epic
|
|
130
|
-
- [pm-r9gu](.agents/pm/features/pm-r9gu.toon) - documentation structure feature
|
|
131
|
-
- [pm-1sb2](.agents/pm/tasks/pm-1sb2.toon) - README and public docs rewrite task
|
|
141
|
+
- [pm-3042](.agents/pm/epics/pm-3042.toon) - documentation overhaul epic (closed)
|
|
142
|
+
- [pm-r9gu](.agents/pm/features/pm-r9gu.toon) - documentation structure feature (closed)
|
|
143
|
+
- [pm-1sb2](.agents/pm/tasks/pm-1sb2.toon) - README and public docs rewrite task (closed)
|
|
132
144
|
|
|
133
145
|
Docs should link to relevant `pm` items, and `pm` items should link back to changed docs through `pm docs`.
|
|
134
146
|
|
|
@@ -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]="591ae949-391a-5ede-8e92-15df7e3264df")}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";
|
|
@@ -14,6 +14,7 @@ import { getCommandPath } from "./registration-helpers.js";
|
|
|
14
14
|
import { normalizeBootstrapInvocation, parseBootstrapGlobalOptions, parseBootstrapCommandName, } from "./bootstrap-args.js";
|
|
15
15
|
import { extractProvidedOptionFlags, normalizeLongFlag, renderPmCommand, } from "./argv-utils.js";
|
|
16
16
|
import { levenshteinDistanceWithinLimit } from "../core/shared/levenshtein.js";
|
|
17
|
+
import { normalizeExtensionNameForMatch } from "./commands/extension/shared.js";
|
|
17
18
|
export const BUILTIN_TYPE_HELP_VALUES = BUILTIN_ITEM_TYPE_VALUES.join("|");
|
|
18
19
|
const OPTIONAL_PACKAGE_INSTALL_HINTS = {
|
|
19
20
|
calendar: "calendar",
|
|
@@ -152,6 +153,46 @@ function resolveOptionalPackageInstallHint(commandPath) {
|
|
|
152
153
|
}
|
|
153
154
|
return `If this command comes from an optional package, install it with: pm install ${packageAlias}`;
|
|
154
155
|
}
|
|
156
|
+
function normalizePackageCommandAliasToken(value) {
|
|
157
|
+
let normalized = normalizeExtensionNameForMatch(value);
|
|
158
|
+
// Strip outer package/source prefixes and then the pm- package stem so scoped
|
|
159
|
+
// and builtin package guesses converge on the exported command alias.
|
|
160
|
+
for (const prefix of ["@unbraind/", "@unbrained/", "builtin-", "pm-"]) {
|
|
161
|
+
if (normalized.startsWith(prefix)) {
|
|
162
|
+
normalized = normalized.slice(prefix.length);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return normalized;
|
|
166
|
+
}
|
|
167
|
+
function collectInstalledPackageCommandPathHints(unknownToken, extensionDescriptors) {
|
|
168
|
+
const normalizedUnknown = normalizePackageCommandAliasToken(unknownToken);
|
|
169
|
+
if (normalizedUnknown.length === 0) {
|
|
170
|
+
return [];
|
|
171
|
+
}
|
|
172
|
+
const hints = [];
|
|
173
|
+
for (const descriptor of extensionDescriptors.values()) {
|
|
174
|
+
const identifiers = new Set();
|
|
175
|
+
const source = descriptor.source;
|
|
176
|
+
if (source) {
|
|
177
|
+
for (const identifier of [source.name, source.package]) {
|
|
178
|
+
const normalizedIdentifier = normalizePackageCommandAliasToken(identifier ?? "");
|
|
179
|
+
if (normalizedIdentifier.length > 0) {
|
|
180
|
+
identifiers.add(normalizedIdentifier);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (identifiers.size === 0) {
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
const matches = [...identifiers].some((identifier) => identifier === normalizedUnknown ||
|
|
188
|
+
identifier.includes(normalizedUnknown) ||
|
|
189
|
+
normalizedUnknown.includes(identifier));
|
|
190
|
+
if (matches) {
|
|
191
|
+
hints.push(descriptor.command);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return [...new Set(hints)].sort((left, right) => left.localeCompare(right));
|
|
195
|
+
}
|
|
155
196
|
function collectKnownLongFlags(commandName) {
|
|
156
197
|
const flags = new Set();
|
|
157
198
|
const contracts = resolveSubcommandFlagContractsForCommand(commandName);
|
|
@@ -302,7 +343,8 @@ export function buildUnknownCommandGuidanceFromRuntime(rawMessage, root, extensi
|
|
|
302
343
|
})
|
|
303
344
|
.map((entry) => entry.commandPath);
|
|
304
345
|
const aliasCandidates = (COMMON_COMMAND_ALIASES[primaryToken] ?? []).filter((aliasPath) => commandPaths.includes(aliasPath));
|
|
305
|
-
const
|
|
346
|
+
const installedPackageCandidates = collectInstalledPackageCommandPathHints(primaryToken, extensionDescriptors).filter((commandPath) => commandPaths.includes(commandPath));
|
|
347
|
+
const combinedCandidates = dedupeStrings([...aliasCandidates, ...rankedCandidates, ...installedPackageCandidates]);
|
|
306
348
|
const fallbackTopLevel = [...new Set(commandPaths.map((commandPath) => commandPath.split(" ")[0]).filter((segment) => segment.length > 0))];
|
|
307
349
|
fallbackTopLevel.sort((left, right) => left.localeCompare(right));
|
|
308
350
|
const suggestedPaths = (combinedCandidates.length > 0 ? combinedCandidates : fallbackTopLevel).slice(0, 3);
|
|
@@ -322,6 +364,32 @@ export function buildUnknownCommandGuidanceFromRuntime(rawMessage, root, extensi
|
|
|
322
364
|
function dedupeStrings(values) {
|
|
323
365
|
return Array.from(new Set(values));
|
|
324
366
|
}
|
|
367
|
+
function firstWhitespaceSeparatedToken(input) {
|
|
368
|
+
let token = "";
|
|
369
|
+
for (const character of input) {
|
|
370
|
+
if (character === " " ||
|
|
371
|
+
character === "\t" ||
|
|
372
|
+
character === "\n" ||
|
|
373
|
+
character === "\r" ||
|
|
374
|
+
character === "\f" ||
|
|
375
|
+
character === "\v") {
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
token += character;
|
|
379
|
+
}
|
|
380
|
+
return token;
|
|
381
|
+
}
|
|
382
|
+
function trimTrailingPunctuationToken(token) {
|
|
383
|
+
let end = token.length;
|
|
384
|
+
while (end > 0) {
|
|
385
|
+
const character = token[end - 1];
|
|
386
|
+
if (character !== "," && character !== ":" && character !== ";") {
|
|
387
|
+
break;
|
|
388
|
+
}
|
|
389
|
+
end -= 1;
|
|
390
|
+
}
|
|
391
|
+
return token.slice(0, end);
|
|
392
|
+
}
|
|
325
393
|
export function resolveChildCommandByToken(parent, token) {
|
|
326
394
|
const normalizedToken = token.trim().toLowerCase();
|
|
327
395
|
return parent.commands.find((candidate) => {
|
|
@@ -390,7 +458,9 @@ export async function resolveCommanderUsageContext(error, rootProgram, extension
|
|
|
390
458
|
}
|
|
391
459
|
if (!suggestedRetryCommand) {
|
|
392
460
|
const missingRequiredOption = message.match(/required option '([^']+)' not specified/i);
|
|
393
|
-
const requiredOptionToken = missingRequiredOption?.[1]
|
|
461
|
+
const requiredOptionToken = missingRequiredOption?.[1]
|
|
462
|
+
? trimTrailingPunctuationToken(firstWhitespaceSeparatedToken(missingRequiredOption[1].trim()))
|
|
463
|
+
: undefined;
|
|
394
464
|
if (requiredOptionToken?.startsWith("--")) {
|
|
395
465
|
const hasFlag = invocationArgv.some((token) => token.startsWith(requiredOptionToken));
|
|
396
466
|
if (!hasFlag) {
|
|
@@ -449,4 +519,4 @@ export async function formatCommanderUsageJson(error, rootProgram, extensionDesc
|
|
|
449
519
|
return JSON.stringify(envelope, null, 2);
|
|
450
520
|
}
|
|
451
521
|
//# sourceMappingURL=commander-usage.js.map
|
|
452
|
-
//# debugId=
|
|
522
|
+
//# debugId=591ae949-391a-5ede-8e92-15df7e3264df
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commander-usage.js","sources":["cli/commander-usage.ts"],"sourceRoot":"/","sourcesContent":["import { 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 { PM_CORE_COMMAND_NAMES, resolveSubcommandFlagContractsForCommand } 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 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\";\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 \"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 COMMON_COMMAND_ALIASES: Record<string, string[]> = {\n comment: [\"comments\"],\n note: [\"notes\"],\n learning: [\"learnings\"],\n show: [\"get\"],\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\nexport interface CommanderUsageContext extends CommanderGuidanceContext {\n message: string;\n commandName: string | undefined;\n allowedTypes: string;\n}\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\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 collectKnownLongFlags(commandName: string | undefined): string[] {\n const flags = new Set<string>();\n const contracts = 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\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] ?? normalizedUnknown;\n const rankedCandidates = commandPaths\n .map((commandPath) => {\n const directScore = scoreCommandPathMatch(commandPath, normalizedUnknown);\n const fallbackScore =\n primaryToken !== normalizedUnknown ? scoreCommandPathMatch(commandPath, primaryToken) : Number.POSITIVE_INFINITY;\n const score = Math.min(directScore, fallbackScore);\n return { commandPath, score };\n })\n .filter((entry) => Number.isFinite(entry.score))\n .sort((left, right) => {\n if (left.score !== right.score) {\n return left.score - right.score;\n }\n return left.commandPath.localeCompare(right.commandPath);\n })\n .map((entry) => entry.commandPath);\n\n const aliasCandidates = (COMMON_COMMAND_ALIASES[primaryToken] ?? []).filter((aliasPath) =>\n commandPaths.includes(aliasPath),\n );\n const combinedCandidates = dedupeStrings([...aliasCandidates, ...rankedCandidates]);\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 examples = [...new Set([\"pm --help\", ...suggestedPaths.map((path) => `pm ${path} --help`)])];\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\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\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\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 let allowedTypes = BUILTIN_TYPE_HELP_VALUES;\n try {\n const pmRoot = resolvePmRoot(process.cwd(), bootstrapGlobal.path);\n if (await pathExists(getSettingsPath(pmRoot))) {\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n if (typeRegistry.types.length > 0) {\n allowedTypes = typeRegistry.types.join(\"|\");\n }\n }\n } catch {\n // Fall back to built-in type guidance when settings cannot be read.\n }\n const unknownCommandGuidance = buildUnknownCommandGuidanceFromRuntime(message, rootProgram, extensionDescriptors);\n const unknownOptionMatch = message.match(/unknown option '([^']+)'/i);\n const unknownOptionSuggestions =\n unknownOptionMatch && commandName\n ? dedupeStrings([\n ...getSemanticUnknownOptionSuggestions(commandName, unknownOptionMatch[1]),\n ...suggestNearestLongFlags(unknownOptionMatch[1], collectKnownLongFlags(commandName)),\n ])\n : undefined;\n const unknownOptionOtherCommands = unknownOptionMatch\n ? findOtherCommandsForFlag(unknownOptionMatch[1], commandName)\n : [];\n let suggestedRetryCommand: string | undefined;\n if (unknownOptionMatch && unknownOptionSuggestions && unknownOptionSuggestions.length > 0) {\n const rewritten = rewriteUnknownOptionArgv(invocationArgv, unknownOptionMatch[1], unknownOptionSuggestions[0]);\n if (rewritten) {\n suggestedRetryCommand = renderAttemptedCommand(rewritten);\n }\n }\n if (!suggestedRetryCommand) {\n const missingRequiredOption = message.match(/required option '([^']+)' not specified/i);\n const requiredOptionToken = missingRequiredOption?.[1]?.trim().split(/\\s+/)[0]?.replace(/[,:;]+$/g, \"\");\n if (requiredOptionToken?.startsWith(\"--\")) {\n const hasFlag = invocationArgv.some((token) => token.startsWith(requiredOptionToken));\n if (!hasFlag) {\n suggestedRetryCommand = renderAttemptedCommand([...invocationArgv, requiredOptionToken, \"<value>\"]);\n }\n }\n }\n return {\n message,\n commandName,\n allowedTypes,\n attemptedCommand,\n normalizedInvocationArgs: [...invocationArgv],\n providedOptionFlags,\n unknownOptionSuggestions,\n unknownOptionOtherCommands: unknownOptionOtherCommands.length > 0 ? unknownOptionOtherCommands : undefined,\n suggestedRetryCommand,\n ...(unknownCommandGuidance ?? {}),\n };\n}\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\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"],"names":[],"mappings":";;AACA,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,EAAE,qBAAqB,EAAE,wCA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AAE,CAAC,CAAC,CAAC;AAC3C,CAAC","debugId":"b54efed6-c3b0-5b4d-9912-588c58198fba"}
|
|
1
|
+
{"version":3,"file":"commander-usage.js","sources":["cli/commander-usage.ts"],"sourceRoot":"/","sourcesContent":["import { 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 { PM_CORE_COMMAND_NAMES, resolveSubcommandFlagContractsForCommand } 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 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 \"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 COMMON_COMMAND_ALIASES: Record<string, string[]> = {\n comment: [\"comments\"],\n note: [\"notes\"],\n learning: [\"learnings\"],\n show: [\"get\"],\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\nexport interface CommanderUsageContext extends CommanderGuidanceContext {\n message: string;\n commandName: string | undefined;\n allowedTypes: string;\n}\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\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(commandName: string | undefined): string[] {\n const flags = new Set<string>();\n const contracts = 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\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] ?? normalizedUnknown;\n const rankedCandidates = commandPaths\n .map((commandPath) => {\n const directScore = scoreCommandPathMatch(commandPath, normalizedUnknown);\n const fallbackScore =\n primaryToken !== normalizedUnknown ? scoreCommandPathMatch(commandPath, primaryToken) : Number.POSITIVE_INFINITY;\n const score = Math.min(directScore, fallbackScore);\n return { commandPath, score };\n })\n .filter((entry) => Number.isFinite(entry.score))\n .sort((left, right) => {\n if (left.score !== right.score) {\n return left.score - right.score;\n }\n return left.commandPath.localeCompare(right.commandPath);\n })\n .map((entry) => entry.commandPath);\n\n const aliasCandidates = (COMMON_COMMAND_ALIASES[primaryToken] ?? []).filter((aliasPath) =>\n commandPaths.includes(aliasPath),\n );\n const installedPackageCandidates = collectInstalledPackageCommandPathHints(primaryToken, extensionDescriptors).filter((commandPath) =>\n commandPaths.includes(commandPath),\n );\n const combinedCandidates = dedupeStrings([...aliasCandidates, ...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 examples = [...new Set([\"pm --help\", ...suggestedPaths.map((path) => `pm ${path} --help`)])];\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\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\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\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 let allowedTypes = BUILTIN_TYPE_HELP_VALUES;\n try {\n const pmRoot = resolvePmRoot(process.cwd(), bootstrapGlobal.path);\n if (await pathExists(getSettingsPath(pmRoot))) {\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n if (typeRegistry.types.length > 0) {\n allowedTypes = typeRegistry.types.join(\"|\");\n }\n }\n } catch {\n // Fall back to built-in type guidance when settings cannot be read.\n }\n const unknownCommandGuidance = buildUnknownCommandGuidanceFromRuntime(message, rootProgram, extensionDescriptors);\n const unknownOptionMatch = message.match(/unknown option '([^']+)'/i);\n const unknownOptionSuggestions =\n unknownOptionMatch && commandName\n ? dedupeStrings([\n ...getSemanticUnknownOptionSuggestions(commandName, unknownOptionMatch[1]),\n ...suggestNearestLongFlags(unknownOptionMatch[1], collectKnownLongFlags(commandName)),\n ])\n : undefined;\n const unknownOptionOtherCommands = unknownOptionMatch\n ? findOtherCommandsForFlag(unknownOptionMatch[1], commandName)\n : [];\n let suggestedRetryCommand: string | undefined;\n if (unknownOptionMatch && unknownOptionSuggestions && unknownOptionSuggestions.length > 0) {\n const rewritten = rewriteUnknownOptionArgv(invocationArgv, unknownOptionMatch[1], unknownOptionSuggestions[0]);\n if (rewritten) {\n suggestedRetryCommand = renderAttemptedCommand(rewritten);\n }\n }\n if (!suggestedRetryCommand) {\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 const hasFlag = invocationArgv.some((token) => token.startsWith(requiredOptionToken));\n if (!hasFlag) {\n suggestedRetryCommand = renderAttemptedCommand([...invocationArgv, requiredOptionToken, \"<value>\"]);\n }\n }\n }\n return {\n message,\n commandName,\n allowedTypes,\n attemptedCommand,\n normalizedInvocationArgs: [...invocationArgv],\n providedOptionFlags,\n unknownOptionSuggestions,\n unknownOptionOtherCommands: unknownOptionOtherCommands.length > 0 ? unknownOptionOtherCommands : undefined,\n suggestedRetryCommand,\n ...(unknownCommandGuidance ?? {}),\n };\n}\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\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"],"names":[],"mappings":";;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC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AAC,KAAK,UAAU,wBAAwB,CAC5C,KAAc,EACd,WAAoB,EACpB,oBAAyE;IAEzE,MAAM,YAAY,GAAG,MAAM,4BAA4B,CAAC,KAAK,EAAE,WAAW,EAAE,oBAAoB,CAAC,CAAC;IAClG,MAAM,QAAQ,GAAG,2BAA2B,CAC1C,YAAY,CAAC,OAAO,EACpB,YAAY,CAAC,WAAW,EACxB,YAAY,CAAC,YAAY,EACzB,SAAS,CAAC,KAAK,EACf;QACE,sBAAsB,EAAE,YAAY,CAAC,sBAAsB;QAC3D,uBAAuB,EAAE,YAAY,CAAC,uBAAuB;QAC7D,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;QAC/C,wBAAwB,EAAE,YAAY,CAAC,wBAAwB;QAC/D,mBAAmB,EAAE,YAAY,CAAC,mBAAmB;QACrD,wBAAwB,EAAE,YAAY,CAAC,wBAAwB;QAC/D,0BAA0B,EAAE,YAAY,CAAC,0BAA0B;QACnE,qBAAqB,EAAE,YAAY,CAAC,qBAAqB;KAC1D,CACF,CAAC;IACF,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC3C,CAAC","debugId":"591ae949-391a-5ede-8e92-15df7e3264df"}
|
|
@@ -6,6 +6,8 @@ type AggregateGroupRecord = Partial<Record<AggregateGroupField, AggregateGroupVa
|
|
|
6
6
|
export interface AggregateOptions {
|
|
7
7
|
groupBy?: string;
|
|
8
8
|
count?: boolean;
|
|
9
|
+
sum?: string;
|
|
10
|
+
avg?: string;
|
|
9
11
|
includeUnparented?: boolean;
|
|
10
12
|
status?: string;
|
|
11
13
|
type?: string;
|
|
@@ -22,6 +24,9 @@ export interface AggregateOptions {
|
|
|
22
24
|
export interface AggregateRow {
|
|
23
25
|
group: AggregateGroupRecord;
|
|
24
26
|
count: number;
|
|
27
|
+
null_count?: number;
|
|
28
|
+
sum?: number | null;
|
|
29
|
+
avg?: number | null;
|
|
25
30
|
}
|
|
26
31
|
export interface AggregateResult {
|
|
27
32
|
groups: AggregateRow[];
|
|
@@ -34,6 +39,9 @@ export interface AggregateResult {
|
|
|
34
39
|
filters: {
|
|
35
40
|
group_by: AggregateGroupField[];
|
|
36
41
|
count: boolean;
|
|
42
|
+
sum?: string | null;
|
|
43
|
+
avg?: string | null;
|
|
44
|
+
numeric_field?: string | null;
|
|
37
45
|
include_unparented: boolean;
|
|
38
46
|
status: ItemStatus | null;
|
|
39
47
|
type: string | null;
|