@unbrained/pm-cli 2026.5.31 → 2026.6.6
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 +167 -0
- package/CONTRIBUTING.md +1 -0
- package/README.md +12 -4
- package/dist/cli/argv-utils.js +7 -3
- package/dist/cli/argv-utils.js.map +1 -1
- package/dist/cli/bootstrap-args.d.ts +1 -0
- package/dist/cli/bootstrap-args.js +23 -3
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commands/calendar.js +17 -3
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.d.ts +63 -0
- package/dist/cli/commands/close-many.js +302 -0
- package/dist/cli/commands/close-many.js.map +1 -0
- package/dist/cli/commands/completion.d.ts +1 -0
- package/dist/cli/commands/completion.js +260 -32
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +4 -4
- package/dist/cli/commands/config.js +115 -3
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.js +193 -162
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +77 -114
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/doctor.d.ts +12 -0
- package/dist/cli/commands/extension/doctor.js +97 -2
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.js +49 -48
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.js +51 -23
- 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.js +7 -7
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.js +51 -3
- package/dist/cli/commands/health.js.map +1 -1
- 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 -1
- package/dist/cli/commands/index.js +5 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +10 -0
- package/dist/cli/commands/init.js +107 -4
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list.d.ts +5 -0
- package/dist/cli/commands/list.js +58 -26
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/reindex.js +163 -47
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/repeatable-metadata-parsers.d.ts +15 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js +120 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -0
- package/dist/cli/commands/restore.js +25 -4
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +122 -1
- package/dist/cli/commands/schema.js +536 -6
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +1 -0
- package/dist/cli/commands/search.js +18 -4
- 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/commands/test.js +4 -3
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +69 -140
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +2 -0
- package/dist/cli/commands/update.js +138 -119
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +1 -0
- package/dist/cli/commands/validate.js +63 -33
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +26 -3
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/help-content.js +91 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.js +377 -23
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +14 -5
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +200 -28
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +31 -6
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +4 -2
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +31 -4
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-CVXTCHYY.js +16 -0
- package/dist/cli-bundle/chunks/activity-JM6DTDND.js +20 -0
- package/dist/cli-bundle/chunks/activity-JM6DTDND.js.map +1 -0
- package/dist/cli-bundle/chunks/aggregate-GI7WSZPH.js +206 -0
- package/dist/cli-bundle/chunks/aggregate-GI7WSZPH.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-ADUOSFRO.js → aggregate-VNAHUNNF.js} +11 -11
- package/dist/cli-bundle/chunks/{append-JD2DETU7.js → append-7H5N64R2.js} +8 -9
- package/dist/cli-bundle/chunks/{append-JD2DETU7.js.map → append-7H5N64R2.js.map} +1 -1
- package/dist/cli-bundle/chunks/append-WMKRXKCE.js +69 -0
- package/dist/cli-bundle/chunks/append-WMKRXKCE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3M73P3G6.js → chunk-23YFZ3IG.js} +210 -132
- package/dist/cli-bundle/chunks/chunk-23YFZ3IG.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-2HVRUSQA.js +128 -0
- package/dist/cli-bundle/chunks/chunk-2HVRUSQA.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-2RSPZI5H.js +266 -0
- package/dist/cli-bundle/chunks/chunk-2RSPZI5H.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-2VBQ6ZXS.js +631 -0
- package/dist/cli-bundle/chunks/chunk-2VBQ6ZXS.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-2VVCGBNV.js +380 -0
- package/dist/cli-bundle/chunks/chunk-2VVCGBNV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3BWOVLTH.js +1664 -0
- package/dist/cli-bundle/chunks/chunk-3BWOVLTH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6HT2F4TK.js → chunk-3FI4SEFT.js} +175 -54
- package/dist/cli-bundle/chunks/chunk-3FI4SEFT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JULRTHJQ.js → chunk-3LB74A67.js} +119 -6
- package/dist/cli-bundle/chunks/chunk-3LB74A67.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-3VAM3NNM.js +57 -0
- package/dist/cli-bundle/chunks/chunk-3VAM3NNM.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4LL6TK5B.js +1832 -0
- package/dist/cli-bundle/chunks/chunk-4LL6TK5B.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-52MAOQ6J.js +422 -0
- package/dist/cli-bundle/chunks/chunk-52MAOQ6J.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-5FDATVEZ.js +412 -0
- package/dist/cli-bundle/chunks/chunk-5FDATVEZ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5SFCOO6B.js +5622 -0
- package/dist/cli-bundle/chunks/chunk-5SFCOO6B.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-U7FMKRXH.js → chunk-6ER6DXH5.js} +37 -16
- package/dist/cli-bundle/chunks/chunk-6ER6DXH5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-6P6GGMOG.js +218 -0
- package/dist/cli-bundle/chunks/chunk-6P6GGMOG.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-77GFDHGF.js +80 -0
- package/dist/cli-bundle/chunks/chunk-77GFDHGF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MD7K4JYF.js → chunk-AO442XLN.js} +26 -15
- package/dist/cli-bundle/chunks/chunk-AO442XLN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-AY43SBIN.js +751 -0
- package/dist/cli-bundle/chunks/chunk-AY43SBIN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-D7AOMPRH.js → chunk-BQHUILZS.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-E5FJNAZA.js +242 -0
- package/dist/cli-bundle/chunks/chunk-E5FJNAZA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OGZEG5TT.js → chunk-ECCMVXGM.js} +164 -53
- package/dist/cli-bundle/chunks/chunk-ECCMVXGM.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-FRAUKRU2.js +182 -0
- package/dist/cli-bundle/chunks/chunk-FRAUKRU2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GCOQW437.js +130 -0
- package/dist/cli-bundle/chunks/chunk-GCOQW437.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GGYWB3Y2.js +1340 -0
- package/dist/cli-bundle/chunks/chunk-GGYWB3Y2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-G57E5D7T.js → chunk-GU2ZJ2VV.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-GXSUPCBV.js +231 -0
- package/dist/cli-bundle/chunks/chunk-GXSUPCBV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-HZGUAH22.js +76 -0
- package/dist/cli-bundle/chunks/chunk-HZGUAH22.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-I2HSTRJF.js +346 -0
- package/dist/cli-bundle/chunks/chunk-I2HSTRJF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-I6BNFU5X.js +140 -0
- package/dist/cli-bundle/chunks/chunk-I6BNFU5X.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JTWRXG4B.js → chunk-IJGCZSIQ.js} +251 -251
- package/dist/cli-bundle/chunks/chunk-IJGCZSIQ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js +1491 -0
- package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-IUV734HF.js +17 -0
- package/dist/cli-bundle/chunks/chunk-IUV734HF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-J27KIHTG.js +15 -0
- package/dist/cli-bundle/chunks/chunk-J27KIHTG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AKOOMO3T.js → chunk-KAG77BY3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KBQY3YG5.js → chunk-KJ33AOCY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WDPXDQFG.js → chunk-KJE2FOS4.js} +6 -4
- package/dist/cli-bundle/chunks/chunk-KJE2FOS4.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KWU6HG75.js +3883 -0
- package/dist/cli-bundle/chunks/chunk-KWU6HG75.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-LB3RUL2N.js +1325 -0
- package/dist/cli-bundle/chunks/chunk-LB3RUL2N.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5HSEP75M.js → chunk-LCM63IXU.js} +18 -6
- package/dist/cli-bundle/chunks/chunk-LCM63IXU.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js +24 -0
- package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ME2YH6FN.js +182 -0
- package/dist/cli-bundle/chunks/chunk-ME2YH6FN.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-MITFDD35.js +1809 -0
- package/dist/cli-bundle/chunks/chunk-MITFDD35.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WJ2NAC37.js → chunk-N7ACFE26.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-NUZ5HKR4.js +332 -0
- package/dist/cli-bundle/chunks/chunk-NUZ5HKR4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7Y53ZJIQ.js → chunk-OVQCEJPG.js} +22 -3
- package/dist/cli-bundle/chunks/chunk-OVQCEJPG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PXUAZUUY.js → chunk-OZ7NSQHL.js} +12 -11
- package/dist/cli-bundle/chunks/chunk-OZ7NSQHL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-P53TN6IA.js → chunk-PDDFYW4X.js} +35 -8
- package/dist/cli-bundle/chunks/chunk-PDDFYW4X.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6YCV7WSL.js → chunk-PIU6RSL3.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-6YCV7WSL.js.map → chunk-PIU6RSL3.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-PO3GSVFV.js +338 -0
- package/dist/cli-bundle/chunks/chunk-PO3GSVFV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LRBOHPUE.js → chunk-PRJCELV4.js} +108 -21
- package/dist/cli-bundle/chunks/chunk-PRJCELV4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GN7IJPCD.js → chunk-PROOHX4K.js} +332 -32
- package/dist/cli-bundle/chunks/chunk-PROOHX4K.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FQE6XZDB.js → chunk-Q7SPNHLW.js} +54 -32
- package/dist/cli-bundle/chunks/chunk-Q7SPNHLW.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PVNQLCIS.js → chunk-QO7EBBOM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-A7E7PUVX.js → chunk-R6UFP2GE.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-RWPSOIEE.js +154 -0
- package/dist/cli-bundle/chunks/chunk-RWPSOIEE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-RZN6VURO.js +119 -0
- package/dist/cli-bundle/chunks/chunk-RZN6VURO.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js +1501 -0
- package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CEFIVZPG.js → chunk-T3LC5LKB.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-TCD3R2PF.js +173 -0
- package/dist/cli-bundle/chunks/chunk-TCD3R2PF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-TPH5XEVD.js +2988 -0
- package/dist/cli-bundle/chunks/chunk-TPH5XEVD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LSXGH6NE.js → chunk-U5SXYXSY.js} +821 -200
- package/dist/cli-bundle/chunks/chunk-U5SXYXSY.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-UBOPJT3S.js +540 -0
- package/dist/cli-bundle/chunks/chunk-UBOPJT3S.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JFWUHHS2.js → chunk-UM2GBHS4.js} +5 -4
- package/dist/cli-bundle/chunks/chunk-W7XABV4H.js +454 -0
- package/dist/cli-bundle/chunks/chunk-W7XABV4H.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SEXQN4KL.js → chunk-WKY2IBOQ.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-WOPXVEZP.js +698 -0
- package/dist/cli-bundle/chunks/chunk-WOPXVEZP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-WSMOSYRD.js +1704 -0
- package/dist/cli-bundle/chunks/chunk-WSMOSYRD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NGN7UV5K.js → chunk-XLTD2HN3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-XSJCLN2R.js +131 -0
- package/dist/cli-bundle/chunks/chunk-XSJCLN2R.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js +53 -0
- package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BUPWJ3IJ.js → chunk-XTGLRY2Y.js} +484 -49
- package/dist/cli-bundle/chunks/chunk-XTGLRY2Y.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-L2FXEKDB.js → chunk-YL2DJGYS.js} +7 -7
- package/dist/cli-bundle/chunks/{claim-EE4TKKCV.js → claim-4DBF6RVG.js} +10 -11
- package/dist/cli-bundle/chunks/{claim-EE4TKKCV.js.map → claim-4DBF6RVG.js.map} +1 -1
- package/dist/cli-bundle/chunks/claim-X2P4IB7J.js +129 -0
- package/dist/cli-bundle/chunks/claim-X2P4IB7J.js.map +1 -0
- package/dist/cli-bundle/chunks/close-3HDWDA3L.js +13 -0
- package/dist/cli-bundle/chunks/close-PTYFA45H.js +17 -0
- package/dist/cli-bundle/chunks/close-PTYFA45H.js.map +1 -0
- package/dist/cli-bundle/chunks/close-many-7CGIDPTJ.js +314 -0
- package/dist/cli-bundle/chunks/close-many-7CGIDPTJ.js.map +7 -0
- package/dist/cli-bundle/chunks/close-many-ERFO6LHR.js +311 -0
- package/dist/cli-bundle/chunks/close-many-ERFO6LHR.js.map +1 -0
- package/dist/cli-bundle/chunks/comments-OONGABK5.js +100 -0
- package/dist/cli-bundle/chunks/comments-OONGABK5.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-AAKJQ6LW.js → comments-QKBYCWKD.js} +10 -11
- package/dist/cli-bundle/chunks/{comments-AAKJQ6LW.js.map → comments-QKBYCWKD.js.map} +1 -1
- package/dist/cli-bundle/chunks/config-6FXCQKIF.js +1671 -0
- package/dist/cli-bundle/chunks/config-6FXCQKIF.js.map +1 -0
- package/dist/cli-bundle/chunks/{config-V3FZOKLI.js → config-U4RZ4CQB.js} +121 -10
- package/dist/cli-bundle/chunks/config-U4RZ4CQB.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-RZ5QPNJB.js → context-FYYJGFWS.js} +32 -19
- package/dist/cli-bundle/chunks/{context-RZ5QPNJB.js.map → context-FYYJGFWS.js.map} +2 -2
- package/dist/cli-bundle/chunks/context-YMJ3Z2HQ.js +1461 -0
- package/dist/cli-bundle/chunks/context-YMJ3Z2HQ.js.map +1 -0
- package/dist/cli-bundle/chunks/contracts-QDB6OMLQ.js +1278 -0
- package/dist/cli-bundle/chunks/contracts-QDB6OMLQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-YLMH33VU.js → contracts-RFSPGVVJ.js} +198 -162
- package/dist/cli-bundle/chunks/contracts-RFSPGVVJ.js.map +7 -0
- package/dist/cli-bundle/chunks/create-I5L4EYYZ.js +31 -0
- package/dist/cli-bundle/chunks/create-I5L4EYYZ.js.map +1 -0
- package/dist/cli-bundle/chunks/create-JTZNCTQC.js +27 -0
- package/dist/cli-bundle/chunks/delete-7HPGI4GZ.js +55 -0
- package/dist/cli-bundle/chunks/delete-7HPGI4GZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{delete-RHCTEORS.js → delete-VXUPH5RS.js} +7 -8
- package/dist/cli-bundle/chunks/{delete-RHCTEORS.js.map → delete-VXUPH5RS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-MZYCMLAO.js → deps-JSRRWC3Z.js} +7 -8
- package/dist/cli-bundle/chunks/{deps-MZYCMLAO.js.map → deps-JSRRWC3Z.js.map} +1 -1
- package/dist/cli-bundle/chunks/deps-SCZIFK2Z.js +225 -0
- package/dist/cli-bundle/chunks/deps-SCZIFK2Z.js.map +1 -0
- package/dist/cli-bundle/chunks/docs-GJK6K4VP.js +31 -0
- package/dist/cli-bundle/chunks/docs-GJK6K4VP.js.map +1 -0
- package/dist/cli-bundle/chunks/{docs-FXXUCZYU.js → docs-WW4N3MBM.js} +9 -10
- package/dist/cli-bundle/chunks/{docs-FXXUCZYU.js.map → docs-WW4N3MBM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{extension-B4WL7BQU.js → extension-J7IBMFTD.js} +4 -5
- package/dist/cli-bundle/chunks/extension-VDY2U33M.js +28 -0
- package/dist/cli-bundle/chunks/extension-VDY2U33M.js.map +1 -0
- package/dist/cli-bundle/chunks/files-ISZJGILQ.js +282 -0
- package/dist/cli-bundle/chunks/files-ISZJGILQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{files-WVOX67PE.js → files-WKOD326U.js} +9 -10
- package/dist/cli-bundle/chunks/{files-WVOX67PE.js.map → files-WKOD326U.js.map} +1 -1
- package/dist/cli-bundle/chunks/gc-JDVJ6OQ2.js +362 -0
- package/dist/cli-bundle/chunks/gc-JDVJ6OQ2.js.map +1 -0
- package/dist/cli-bundle/chunks/gc-ULPVWMTN.js +372 -0
- package/dist/cli-bundle/chunks/gc-ULPVWMTN.js.map +7 -0
- package/dist/cli-bundle/chunks/get-RV37HT3G.js +194 -0
- package/dist/cli-bundle/chunks/get-RV37HT3G.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-LTK3HOCQ.js → get-WXU6WI5P.js} +16 -17
- package/dist/cli-bundle/chunks/get-WXU6WI5P.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-TCWL55KM.js → health-6L6EH4WR.js} +57 -16
- package/dist/cli-bundle/chunks/health-6L6EH4WR.js.map +7 -0
- package/dist/cli-bundle/chunks/health-LOI2HHKB.js +1271 -0
- package/dist/cli-bundle/chunks/health-LOI2HHKB.js.map +1 -0
- package/dist/cli-bundle/chunks/history-2BA3T5AE.js +20 -0
- package/dist/cli-bundle/chunks/history-PKN67D5O.js +24 -0
- package/dist/cli-bundle/chunks/history-PKN67D5O.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-JBZNXHGR.js +19 -0
- package/dist/cli-bundle/chunks/history-redact-V4FOJGS7.js +23 -0
- package/dist/cli-bundle/chunks/history-redact-V4FOJGS7.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-ZWSTDRH2.js → history-repair-HIBCBIKK.js} +12 -14
- package/dist/cli-bundle/chunks/{history-repair-ZWSTDRH2.js.map → history-repair-HIBCBIKK.js.map} +1 -1
- package/dist/cli-bundle/chunks/history-repair-SDMHR7JT.js +193 -0
- package/dist/cli-bundle/chunks/history-repair-SDMHR7JT.js.map +1 -0
- package/dist/cli-bundle/chunks/init-HIVSNX3O.js +16 -0
- package/dist/cli-bundle/chunks/init-P56QYWJF.js +20 -0
- package/dist/cli-bundle/chunks/init-P56QYWJF.js.map +1 -0
- package/dist/cli-bundle/chunks/learnings-GDFRG5J7.js +44 -0
- package/dist/cli-bundle/chunks/learnings-GDFRG5J7.js.map +1 -0
- package/dist/cli-bundle/chunks/{learnings-NXTWE3FR.js → learnings-MIXSESLK.js} +10 -11
- package/dist/cli-bundle/chunks/{learnings-NXTWE3FR.js.map → learnings-MIXSESLK.js.map} +1 -1
- package/dist/cli-bundle/chunks/list-FGOWQMSM.js +24 -0
- package/dist/cli-bundle/chunks/list-FGOWQMSM.js.map +1 -0
- package/dist/cli-bundle/chunks/list-MUSQNMTD.js +20 -0
- package/dist/cli-bundle/chunks/{notes-DFS5ZGOO.js → notes-4XVSH2AZ.js} +10 -11
- package/dist/cli-bundle/chunks/{notes-DFS5ZGOO.js.map → notes-4XVSH2AZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/notes-5UK3GEH2.js +44 -0
- package/dist/cli-bundle/chunks/notes-5UK3GEH2.js.map +1 -0
- package/dist/cli-bundle/chunks/plan-DUMBV3QB.js +1171 -0
- package/dist/cli-bundle/chunks/plan-DUMBV3QB.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-67AB2PLM.js → plan-SLMODHWX.js} +13 -14
- package/dist/cli-bundle/chunks/{plan-67AB2PLM.js.map → plan-SLMODHWX.js.map} +1 -1
- package/dist/cli-bundle/chunks/register-list-query-POCFZ5JW.js +229 -0
- package/dist/cli-bundle/chunks/register-list-query-POCFZ5JW.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-UP3VRUFS.js → register-list-query-WST76HSQ.js} +26 -26
- package/dist/cli-bundle/chunks/register-list-query-WST76HSQ.js.map +7 -0
- package/dist/cli-bundle/chunks/register-mutation-N5GSUZJV.js +813 -0
- package/dist/cli-bundle/chunks/register-mutation-N5GSUZJV.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-YWSBF545.js → register-mutation-OA675SOU.js} +154 -43
- package/dist/cli-bundle/chunks/register-mutation-OA675SOU.js.map +7 -0
- package/dist/cli-bundle/chunks/register-operations-GNHBE5I3.js +383 -0
- package/dist/cli-bundle/chunks/register-operations-GNHBE5I3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-3BDTGSDH.js → register-operations-N3PMHXH5.js} +49 -37
- package/dist/cli-bundle/chunks/register-operations-N3PMHXH5.js.map +7 -0
- package/dist/cli-bundle/chunks/register-setup-JIMPKJKV.js +242 -0
- package/dist/cli-bundle/chunks/register-setup-JIMPKJKV.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-V56GDRUS.js → register-setup-ZHJI2DI3.js} +18 -19
- package/dist/cli-bundle/chunks/{register-setup-V56GDRUS.js.map → register-setup-ZHJI2DI3.js.map} +2 -2
- package/dist/cli-bundle/chunks/restore-D4RGNX33.js +17 -0
- package/dist/cli-bundle/chunks/restore-PBL6T5TW.js +21 -0
- package/dist/cli-bundle/chunks/restore-PBL6T5TW.js.map +1 -0
- package/dist/cli-bundle/chunks/schema-2NOO6NGB.js +780 -0
- package/dist/cli-bundle/chunks/schema-2NOO6NGB.js.map +7 -0
- package/dist/cli-bundle/chunks/schema-EBI4NLUO.js +770 -0
- package/dist/cli-bundle/chunks/schema-EBI4NLUO.js.map +1 -0
- package/dist/cli-bundle/chunks/search-JPUQTVCY.js +1127 -0
- package/dist/cli-bundle/chunks/search-JPUQTVCY.js.map +1 -0
- package/dist/cli-bundle/chunks/{search-HENBL456.js → search-OA6JX27A.js} +25 -16
- package/dist/cli-bundle/chunks/search-OA6JX27A.js.map +7 -0
- package/dist/cli-bundle/chunks/stats-CV54BAWY.js +202 -0
- package/dist/cli-bundle/chunks/stats-CV54BAWY.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-XYB6KTFG.js +212 -0
- package/dist/cli-bundle/chunks/stats-XYB6KTFG.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-LMJ7PFUO.js +251 -0
- package/dist/cli-bundle/chunks/telemetry-LMJ7PFUO.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-NCMEPJNR.js +248 -0
- package/dist/cli-bundle/chunks/telemetry-NCMEPJNR.js.map +1 -0
- package/dist/cli-bundle/chunks/test-MXX3E5JL.js +31 -0
- package/dist/cli-bundle/chunks/test-WBROAJIE.js +35 -0
- package/dist/cli-bundle/chunks/test-WBROAJIE.js.map +1 -0
- package/dist/cli-bundle/chunks/test-all-N6NSRDTV.js +328 -0
- package/dist/cli-bundle/chunks/test-all-N6NSRDTV.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-all-G2AZOHXI.js → test-all-NTOZ7C3M.js} +13 -14
- package/dist/cli-bundle/chunks/{test-all-G2AZOHXI.js.map → test-all-NTOZ7C3M.js.map} +1 -1
- package/dist/cli-bundle/chunks/test-runs-V6A7LPWZ.js +929 -0
- package/dist/cli-bundle/chunks/test-runs-V6A7LPWZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-GX5HTPSF.js → test-runs-WMVTQU3Y.js} +5 -5
- package/dist/cli-bundle/chunks/update-OSV3NAQB.js +25 -0
- package/dist/cli-bundle/chunks/update-OSV3NAQB.js.map +1 -0
- package/dist/cli-bundle/chunks/update-YRXSUGYQ.js +21 -0
- package/dist/cli-bundle/chunks/update-many-EM6OXYGO.js +605 -0
- package/dist/cli-bundle/chunks/update-many-EM6OXYGO.js.map +1 -0
- package/dist/cli-bundle/chunks/{update-many-46HRSP2Q.js → update-many-KGGEYABR.js} +78 -146
- package/dist/cli-bundle/chunks/update-many-KGGEYABR.js.map +7 -0
- package/dist/cli-bundle/chunks/{upgrade-H5HHM5UV.js → upgrade-BLI7XBAJ.js} +5 -7
- package/dist/cli-bundle/chunks/{upgrade-H5HHM5UV.js.map → upgrade-BLI7XBAJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/upgrade-LXPOQKFV.js +266 -0
- package/dist/cli-bundle/chunks/upgrade-LXPOQKFV.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-TMCVKIGZ.js → validate-AGOAUOVW.js} +61 -48
- package/dist/cli-bundle/chunks/validate-AGOAUOVW.js.map +7 -0
- package/dist/cli-bundle/chunks/validate-L5J6A7YO.js +1120 -0
- package/dist/cli-bundle/chunks/validate-L5J6A7YO.js.map +1 -0
- package/dist/cli-bundle/main.js +534 -1505
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/checkpoint/mutation-checkpoint.d.ts +44 -0
- package/dist/core/checkpoint/mutation-checkpoint.js +119 -0
- package/dist/core/checkpoint/mutation-checkpoint.js.map +1 -0
- package/dist/core/config/positional-value.js +4 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/diagnostics/remediation.d.ts +73 -0
- package/dist/core/diagnostics/remediation.js +328 -0
- package/dist/core/diagnostics/remediation.js.map +1 -0
- package/dist/core/extensions/extension-hook-runtime.js +9 -2
- package/dist/core/extensions/extension-hook-runtime.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +60 -4
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +5 -1
- package/dist/core/extensions/index.js +61 -2
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/item-fields.d.ts +5 -1
- package/dist/core/extensions/item-fields.js +126 -4
- package/dist/core/extensions/item-fields.js.map +1 -1
- package/dist/core/extensions/loader.js +283 -8
- package/dist/core/extensions/loader.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/item-format.d.ts +3 -2
- package/dist/core/item/item-format.js +15 -10
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/status-filter.d.ts +29 -0
- package/dist/core/item/status-filter.js +97 -0
- package/dist/core/item/status-filter.js.map +1 -0
- package/dist/core/item/type-registry.js +4 -2
- 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/output/output.js +17 -5
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/schema/item-types-file.d.ts +15 -0
- package/dist/core/schema/item-types-file.js +27 -2
- package/dist/core/schema/item-types-file.js.map +1 -1
- package/dist/core/schema/runtime-field-filters.js +4 -3
- package/dist/core/schema/runtime-field-filters.js.map +1 -1
- package/dist/core/schema/runtime-field-values.d.ts +1 -1
- package/dist/core/schema/runtime-field-values.js +10 -4
- package/dist/core/schema/runtime-field-values.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +75 -2
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/status-defs-file.d.ts +113 -0
- package/dist/core/schema/status-defs-file.js +260 -0
- package/dist/core/schema/status-defs-file.js.map +1 -0
- package/dist/core/schema/type-workflows.d.ts +64 -0
- package/dist/core/schema/type-workflows.js +98 -0
- package/dist/core/schema/type-workflows.js.map +1 -0
- package/dist/core/search/cache.d.ts +3 -1
- package/dist/core/search/cache.js +104 -28
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/http-client.d.ts +2 -2
- package/dist/core/search/http-client.js +2 -2
- package/dist/core/search/http-client.js.map +1 -1
- package/dist/core/search/vector-stores.d.ts +1 -0
- package/dist/core/search/vector-stores.js +64 -14
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/search/vectorization-metadata.d.ts +13 -0
- package/dist/core/search/vectorization-metadata.js +65 -0
- package/dist/core/search/vectorization-metadata.js.map +1 -0
- 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/serialization.d.ts +1 -0
- package/dist/core/shared/serialization.js +86 -2
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/store/front-matter-cache.js +14 -5
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-store.d.ts +2 -0
- package/dist/core/store/item-store.js +61 -6
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-validator.js +18 -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 +130 -10
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/consent.js +3 -3
- package/dist/core/telemetry/consent.js.map +1 -1
- package/dist/core/telemetry/observability.js +5 -4
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.js +16 -4
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +372 -45
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +16 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +7 -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 +6 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.js +53 -3
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +42 -10
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +42 -1
- package/dist/sdk/cli-contracts.js +225 -19
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/errors.d.ts +22 -0
- package/dist/sdk/errors.js +46 -0
- package/dist/sdk/errors.js.map +1 -0
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +3 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/package-import-adapters.js +14 -3
- package/dist/sdk/package-import-adapters.js.map +1 -1
- package/dist/sdk/runtime.d.ts +1 -0
- package/dist/sdk/runtime.js +3 -2
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/testing.d.ts +77 -0
- package/dist/sdk/testing.js +239 -0
- package/dist/sdk/testing.js.map +1 -0
- package/dist/types.d.ts +19 -0
- package/dist/types.js +3 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +22 -3
- package/docs/ARCHITECTURE.md +11 -1
- package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +118 -7
- package/docs/CONFIGURATION.md +57 -2
- package/docs/EXTENSIONS.md +125 -6
- package/docs/EXTENSION_AUTHOR_CONTRACTS.md +73 -0
- package/docs/ONBOARDING.md +165 -0
- package/docs/QUICKSTART.md +3 -1
- package/docs/README.md +12 -4
- package/docs/RELEASING.md +38 -3
- package/docs/SDK.md +273 -1
- package/docs/TESTING.md +36 -1
- package/docs/examples/policy-restricted-extension/manifest.json +1 -0
- package/docs/examples/starter-extension/index.js +9 -1
- package/docs/examples/starter-extension/manifest.json +1 -0
- package/package.json +16 -7
- package/packages/pm-beads/extensions/beads/index.js +2 -4
- package/packages/pm-beads/extensions/beads/index.ts +43 -33
- package/packages/pm-beads/extensions/beads/manifest.json +12 -1
- package/packages/pm-calendar/README.md +6 -0
- package/packages/pm-calendar/extensions/calendar/index.js +6 -1
- package/packages/pm-calendar/extensions/calendar/index.ts +6 -1
- package/packages/pm-calendar/extensions/calendar/manifest.json +6 -1
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +6 -1
- package/packages/pm-guide-shell/README.md +4 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.js +22 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +22 -0
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +6 -1
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +74 -3
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +84 -4
- package/packages/pm-lifecycle-hooks/README.md +29 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +18 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +20 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +9 -0
- package/packages/pm-lifecycle-hooks/package.json +52 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +13 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +69 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +91 -2
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +13 -1
- package/packages/pm-templates/extensions/templates/manifest.json +6 -1
- package/packages/pm-todos/extensions/todos/index.js +3 -7
- package/packages/pm-todos/extensions/todos/index.ts +55 -42
- package/packages/pm-todos/extensions/todos/manifest.json +13 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +7 -4
- package/plugins/pm-claude/agents/pm-coordinator.md +1 -1
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/scripts/bundle-cli.mjs +121 -17
- package/dist/cli-bundle/chunks/activity-OWYSUZOY.js +0 -17
- package/dist/cli-bundle/chunks/chunk-3M73P3G6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js +0 -189
- package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5HSEP75M.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6HT2F4TK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7Y53ZJIQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BUPWJ3IJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js +0 -47
- package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FM26RGSU.js +0 -56
- package/dist/cli-bundle/chunks/chunk-FM26RGSU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FQE6XZDB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-GN7IJPCD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JTWRXG4B.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JULRTHJQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LRBOHPUE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LSXGH6NE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MD7K4JYF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OGZEG5TT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-P53TN6IA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PXUAZUUY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-U7FMKRXH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VGICHR7D.js +0 -141
- package/dist/cli-bundle/chunks/chunk-VGICHR7D.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WDPXDQFG.js.map +0 -7
- package/dist/cli-bundle/chunks/close-XY4CSAYF.js +0 -14
- package/dist/cli-bundle/chunks/config-V3FZOKLI.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-YLMH33VU.js.map +0 -7
- package/dist/cli-bundle/chunks/create-PZVHRIZQ.js +0 -28
- package/dist/cli-bundle/chunks/gc-JWNF66EC.js +0 -181
- package/dist/cli-bundle/chunks/gc-JWNF66EC.js.map +0 -7
- package/dist/cli-bundle/chunks/get-LTK3HOCQ.js.map +0 -7
- package/dist/cli-bundle/chunks/health-TCWL55KM.js.map +0 -7
- package/dist/cli-bundle/chunks/history-A2JUDXUE.js +0 -21
- package/dist/cli-bundle/chunks/history-redact-ED6RFCPL.js +0 -20
- package/dist/cli-bundle/chunks/init-M2WUB4YH.js +0 -16
- package/dist/cli-bundle/chunks/list-OGWQPC26.js +0 -20
- package/dist/cli-bundle/chunks/register-list-query-UP3VRUFS.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-YWSBF545.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-3BDTGSDH.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-MB2ISME7.js +0 -18
- package/dist/cli-bundle/chunks/schema-Q622KC46.js +0 -119
- package/dist/cli-bundle/chunks/schema-Q622KC46.js.map +0 -7
- package/dist/cli-bundle/chunks/search-HENBL456.js.map +0 -7
- package/dist/cli-bundle/chunks/stats-N6H3YP2F.js +0 -124
- package/dist/cli-bundle/chunks/stats-N6H3YP2F.js.map +0 -7
- package/dist/cli-bundle/chunks/test-VNBDRJ4Z.js +0 -32
- package/dist/cli-bundle/chunks/update-H6SCWNMA.js +0 -22
- package/dist/cli-bundle/chunks/update-many-46HRSP2Q.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-TMCVKIGZ.js.map +0 -7
- /package/dist/cli-bundle/chunks/{activity-OWYSUZOY.js.map → activity-CVXTCHYY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-ADUOSFRO.js.map → aggregate-VNAHUNNF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D7AOMPRH.js.map → chunk-BQHUILZS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G57E5D7T.js.map → chunk-GU2ZJ2VV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AKOOMO3T.js.map → chunk-KAG77BY3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KBQY3YG5.js.map → chunk-KJ33AOCY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WJ2NAC37.js.map → chunk-N7ACFE26.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PVNQLCIS.js.map → chunk-QO7EBBOM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A7E7PUVX.js.map → chunk-R6UFP2GE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CEFIVZPG.js.map → chunk-T3LC5LKB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JFWUHHS2.js.map → chunk-UM2GBHS4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SEXQN4KL.js.map → chunk-WKY2IBOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NGN7UV5K.js.map → chunk-XLTD2HN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L2FXEKDB.js.map → chunk-YL2DJGYS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-XY4CSAYF.js.map → close-3HDWDA3L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-PZVHRIZQ.js.map → create-JTZNCTQC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-B4WL7BQU.js.map → extension-J7IBMFTD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-A2JUDXUE.js.map → history-2BA3T5AE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-ED6RFCPL.js.map → history-redact-JBZNXHGR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-M2WUB4YH.js.map → init-HIVSNX3O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-OGWQPC26.js.map → list-MUSQNMTD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-MB2ISME7.js.map → restore-D4RGNX33.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-VNBDRJ4Z.js.map → test-MXX3E5JL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-GX5HTPSF.js.map → test-runs-WMVTQU3Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-H6SCWNMA.js.map → update-YRXSUGYQ.js.map} +0 -0
|
@@ -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]="fe2bfac3-19a8-5dc0-b812-ad59c6281ba6")}catch(e){}}();
|
|
3
3
|
import { Option } from "commander";
|
|
4
4
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
5
5
|
import { PmCliError } from "../core/shared/errors.js";
|
|
@@ -35,6 +35,11 @@ export function registerListQueryCommands(program, options) {
|
|
|
35
35
|
.option("--priority <value>", "Filter by priority")
|
|
36
36
|
.option("--deadline-before <value>", "Filter by deadline upper bound (ISO/date string or relative)")
|
|
37
37
|
.option("--deadline-after <value>", "Filter by deadline lower bound (ISO/date string or relative)")
|
|
38
|
+
.option("--updated-after <value>", 'Filter by updated_at lower bound: ISO timestamp or signed relative (e.g. "-2h"/"-7d" for the past). "Changed since my last window" → --updated-after <ISO>')
|
|
39
|
+
.option("--updated-before <value>", "Filter by updated_at upper bound: ISO timestamp or signed relative (-2h/+1d)")
|
|
40
|
+
.option("--created-after <value>", "Filter by created_at lower bound: ISO timestamp or signed relative (-2h/+1d)")
|
|
41
|
+
.option("--created-before <value>", "Filter by created_at upper bound: ISO timestamp or signed relative (-2h/+1d)")
|
|
42
|
+
.option("--ids <value>", "Filter by explicit item IDs (comma-separated)")
|
|
38
43
|
.option("--assignee <value>", "Filter by assignee")
|
|
39
44
|
.option("--assignee-filter <value>", "Filter assignee presence: assigned|unassigned")
|
|
40
45
|
.option("--parent <value>", "Filter by parent item ID")
|
|
@@ -199,6 +204,7 @@ export function registerListQueryCommands(program, options) {
|
|
|
199
204
|
.option("--include-linked", "Include linked files, docs, and tests in the searchable corpus")
|
|
200
205
|
.option("--title-exact", "Require exact normalized title match for the full query string")
|
|
201
206
|
.option("--phrase-exact", "Require exact normalized phrase match in searchable text")
|
|
207
|
+
.option("--status <value>", "Filter by status before query (open/closed/canceled aliases or configured status id; CSV)")
|
|
202
208
|
.option("--type <value>", "Filter by item type")
|
|
203
209
|
.option("--tag <value>", "Filter by tag")
|
|
204
210
|
.option("--priority <value>", "Filter by priority")
|
|
@@ -229,7 +235,7 @@ export function registerListQueryCommands(program, options) {
|
|
|
229
235
|
program
|
|
230
236
|
.command("get")
|
|
231
237
|
.argument("<id>", "Item id")
|
|
232
|
-
.option("--depth <value>", "Detail depth: brief|standard|deep|full (full aliases deep; default:
|
|
238
|
+
.option("--depth <value>", "Detail depth: brief|standard|deep|full (full aliases deep; default: standard)")
|
|
233
239
|
.option("--full", "Explicit full item read; equivalent to --depth deep (mutually exclusive with --depth/--fields)")
|
|
234
240
|
.option("--fields <value>", "Render custom comma-separated item metadata fields (for example: --fields id,title,status,parent,type)")
|
|
235
241
|
.description("Show item details by ID.")
|
|
@@ -255,7 +261,8 @@ export function registerListQueryCommands(program, options) {
|
|
|
255
261
|
.option("--limit <n>", "Return only the latest n history entries")
|
|
256
262
|
.option("--compact", "Condensed output: show entry index, timestamp, op, author, patch count, and changed fields")
|
|
257
263
|
.option("--full", "Show full history entries with JSON Patch payloads")
|
|
258
|
-
.option("--diff", "Include per-entry
|
|
264
|
+
.option("--diff", "Include per-entry field-level before/after value diffs computed by replaying the history chain")
|
|
265
|
+
.option("--field <name>", "With --diff, show only entries that changed this field (implies --diff)")
|
|
259
266
|
.option("--verify", "Verify hash chain and replay integrity for the full history stream")
|
|
260
267
|
.description("Show item history entries.")
|
|
261
268
|
.action(async (id, options, command) => {
|
|
@@ -264,11 +271,13 @@ export function registerListQueryCommands(program, options) {
|
|
|
264
271
|
if (options.compact === true && options.full === true) {
|
|
265
272
|
throw new PmCliError("History projection options are mutually exclusive. Use either --compact or --full.", EXIT_CODE.USAGE);
|
|
266
273
|
}
|
|
274
|
+
const field = typeof options.field === "string" ? options.field : undefined;
|
|
267
275
|
const { runHistory } = await import("./commands/history.js");
|
|
268
276
|
const result = await runHistory(id, {
|
|
269
277
|
limit: typeof options.limit === "string" ? options.limit : undefined,
|
|
270
278
|
compact: options.full === true ? false : true,
|
|
271
|
-
diff: Boolean(options.diff),
|
|
279
|
+
diff: Boolean(options.diff) || field !== undefined,
|
|
280
|
+
field,
|
|
272
281
|
verify: Boolean(options.verify),
|
|
273
282
|
}, globalOptions);
|
|
274
283
|
printResult(result, globalOptions);
|
|
@@ -316,4 +325,4 @@ export function registerListQueryCommands(program, options) {
|
|
|
316
325
|
}
|
|
317
326
|
}
|
|
318
327
|
//# sourceMappingURL=register-list-query.js.map
|
|
319
|
-
//# debugId=
|
|
328
|
+
//# debugId=fe2bfac3-19a8-5dc0-b812-ad59c6281ba6
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-list-query.js","sources":["cli/register-list-query.ts"],"sourceRoot":"/","sourcesContent":["import { Option, type Command } from \"commander\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport type { ItemStatus } from \"../types/index.js\";\nimport {\n getGlobalOptions,\n normalizeAggregateOptions,\n normalizeActivityOptions,\n normalizeContextOptions,\n normalizeListOptions,\n normalizeSearchKeywordsInput,\n normalizeSearchOptions,\n printActivityJsonStream,\n printError,\n printListJsonStream,\n printResult,\n resolveActivityStreamMode,\n writeStdout,\n} from \"./registration-helpers.js\";\n\n\n\nexport interface RegisterListQueryCommandsOptions {\n commandFilter?: Set<string>;\n}\n\nfunction shouldRegisterListQueryCommand(commandName: string, commandFilter?: Set<string>): boolean {\n if (!commandFilter || commandFilter.size === 0) {\n return true;\n }\n if (commandName === \"context\") {\n return commandFilter.has(\"context\") || commandFilter.has(\"ctx\");\n }\n return commandFilter.has(commandName);\n}\n\nexport function registerListQueryCommands(program: Command, options?: RegisterListQueryCommandsOptions): void {\n const commandFilter = options?.commandFilter;\n const shouldRegister = (commandName: string): boolean => shouldRegisterListQueryCommand(commandName, commandFilter);\n // Register a flag and hide it from --help text while keeping it functional as\n // a parse-time alias. Used for pure snake_case underscore-duplicate aliases\n // (e.g. --assignee_filter for --assignee-filter) so they no longer bloat\n // --help output. The option still appears in command.options, so JSON help\n // and completion are unchanged.\n function addHiddenOption(command: Command, flags: string, description: string): void {\n command.addOption(new Option(flags, description).hideHelp());\n }\n\n function registerListCommand(\n name: string,\n description: string,\n status?: ItemStatus,\n excludeTerminal?: boolean,\n allowStatusFilter?: boolean,\n defaultBrief?: boolean,\n ): void {\n const command = program.command(name).description(description);\n if (allowStatusFilter) {\n command.option(\"--status <value>\", \"Filter by status\");\n }\n command\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--deadline-before <value>\", \"Filter by deadline upper bound (ISO/date string or relative)\")\n .option(\"--deadline-after <value>\", \"Filter by deadline lower bound (ISO/date string or relative)\")\n .option(\"--assignee <value>\", \"Filter by assignee\")\n .option(\"--assignee-filter <value>\", \"Filter assignee presence: assigned|unassigned\")\n .option(\"--parent <value>\", \"Filter by parent item ID\")\n .option(\"--sprint <value>\", \"Filter by sprint\")\n .option(\"--release <value>\", \"Filter by release\")\n .option(\"--limit <n>\", \"Limit returned item count\")\n .option(\"--offset <n>\", \"Skip the first n matching rows before limit is applied\")\n .option(\"--include-body\", \"Include item body in each returned list row\")\n .option(\"--compact\", \"Render compact list projection fields (mutually exclusive with --brief/--full/--fields)\")\n .option(\"--brief\", \"Ultra-compact output: id, status, type, title only (agent-optimized, mutually exclusive with --compact/--full/--fields)\")\n .option(\"--full\", \"Render full list projection fields (mutually exclusive with --compact/--brief/--fields)\")\n .option(\n \"--fields <value>\",\n \"Render custom comma-separated list fields (mutually exclusive with --compact/--brief/--full; valid: --fields id,title)\",\n )\n .option(\"--sort <value>\", \"Sort field: priority|deadline|updated_at|created_at|title|parent (aliases: updated, created)\")\n .option(\"--order <value>\", \"Sort order: asc|desc (requires --sort)\")\n .option(\"--stream\", \"Emit line-delimited JSON rows (requires --json)\")\n .action(async (options: Record<string, unknown>, actionCommand) => {\n const globalOptions = getGlobalOptions(actionCommand);\n const startedAt = Date.now();\n const listOptions = normalizeListOptions(options);\n if (\n defaultBrief === true &&\n listOptions.includeBody !== true &&\n listOptions.compact !== true &&\n listOptions.brief !== true &&\n listOptions.full !== true &&\n listOptions.fields === undefined\n ) {\n listOptions.brief = true;\n }\n if (excludeTerminal) listOptions.excludeTerminal = true;\n const { runList } = await import(\"./commands/list.js\");\n const result = await runList(status, listOptions, globalOptions);\n const streamMode = options.stream === true;\n if (streamMode && !globalOptions.json) {\n throw new PmCliError(\"--stream requires --json output mode.\", EXIT_CODE.USAGE);\n }\n if (streamMode) {\n printListJsonStream(name, result, globalOptions);\n } else {\n printResult(result, globalOptions);\n }\n if (globalOptions.profile) {\n printError(`profile:command=${name} took_ms=${Date.now() - startedAt}`);\n }\n });\n // Hidden pure snake_case underscore-duplicate alias (kept parse-functional).\n addHiddenOption(command, \"--assignee_filter <value>\", \"Alias for --assignee-filter\");\n }\n\n if (shouldRegister(\"list\")) {\n registerListCommand(\"list\", \"List active items with optional filters.\", undefined, true, true, true);\n }\n if (shouldRegister(\"list-all\")) {\n registerListCommand(\"list-all\", \"List all items with optional filters.\", undefined, false, true);\n }\n if (shouldRegister(\"list-draft\")) {\n registerListCommand(\"list-draft\", \"List draft items with optional filters.\", \"draft\");\n }\n if (shouldRegister(\"list-open\")) {\n registerListCommand(\"list-open\", \"List open items with optional filters.\", \"open\", false, false, true);\n }\n if (shouldRegister(\"list-in-progress\")) {\n registerListCommand(\"list-in-progress\", \"List in-progress items with optional filters.\", \"in_progress\", false, false, true);\n }\n if (shouldRegister(\"list-blocked\")) {\n registerListCommand(\"list-blocked\", \"List blocked items with optional filters.\", \"blocked\");\n }\n if (shouldRegister(\"list-closed\")) {\n registerListCommand(\"list-closed\", \"List closed items with optional filters.\", \"closed\");\n }\n if (shouldRegister(\"list-canceled\")) {\n registerListCommand(\"list-canceled\", \"List canceled items with optional filters.\", \"canceled\");\n }\n\n if (shouldRegister(\"aggregate\")) {\n const aggregateCommand = program\n .command(\"aggregate\")\n .description(\"Aggregate grouped item counts for governance queries.\")\n .option(\n \"--group-by <value>\",\n \"Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)\",\n )\n .option(\"--count\", \"Return grouped counts (default behavior)\")\n .option(\"--include-unparented\", \"Include unparented rows when grouping by parent\")\n .option(\"--status <value>\", \"Filter by item status\")\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--deadline-before <value>\", \"Filter by deadline upper bound (ISO/date string or relative)\")\n .option(\"--deadline-after <value>\", \"Filter by deadline lower bound (ISO/date string or relative)\")\n .option(\"--assignee <value>\", \"Filter by assignee\")\n .option(\"--assignee-filter <value>\", \"Filter assignee presence: assigned|unassigned\")\n .option(\"--parent <value>\", \"Filter by parent item ID\")\n .option(\"--sprint <value>\", \"Filter by sprint\")\n .option(\"--release <value>\", \"Filter by release\");\n // Hidden pure snake_case underscore-duplicate aliases (kept parse-functional).\n addHiddenOption(aggregateCommand, \"--include_unparented\", \"Alias for --include-unparented\");\n addHiddenOption(aggregateCommand, \"--assignee_filter <value>\", \"Alias for --assignee-filter\");\n aggregateCommand\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runAggregate } = await import(\"./commands/aggregate.js\");\n const result = await runAggregate(normalizeAggregateOptions(options), globalOptions);\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=aggregate took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"context\")) {\n const contextCommand = program\n .command(\"context\")\n .alias(\"ctx\")\n .description(\"Show a token-efficient project context snapshot for next-work decisions.\")\n .option(\"--date <value>\", \"Anchor date/time for agenda window calculations (ISO/date string or relative)\")\n .option(\"--from <value>\", \"Agenda lower bound (ISO/date string or relative)\")\n .option(\"--to <value>\", \"Agenda upper bound (ISO/date string or relative)\")\n .option(\"--past\", \"Include past agenda entries in bounded windows\")\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--assignee <value>\", \"Filter by assignee\")\n .option(\"--assignee-filter <value>\", \"Filter assignee presence: assigned|unassigned\")\n .option(\"--sprint <value>\", \"Filter by sprint\")\n .option(\"--release <value>\", \"Filter by release\")\n .option(\"--limit <n>\", \"Limit focus and agenda rows per section\")\n .option(\"--format <value>\", \"Context output format override: markdown|toon|json\")\n .option(\"--depth <value>\", \"Context depth: brief|standard|deep (default: settings or brief)\")\n .option(\"--section <value...>\", \"Include specific sections (repeatable; overrides --depth)\")\n .option(\"--activity-limit <n>\", \"Limit recent activity entries (default: settings or 10)\")\n .option(\"--stale-threshold <value>\", \"Staleness cutoff in days (e.g. 7 or 7d; default: settings or 7)\");\n // Hidden pure snake_case underscore-duplicate alias (kept parse-functional).\n addHiddenOption(contextCommand, \"--assignee_filter <value>\", \"Alias for --assignee-filter\");\n contextCommand\n .action(async (options: Record<string, unknown>, actionCommand) => {\n const globalOptions = getGlobalOptions(actionCommand);\n const startedAt = Date.now();\n const normalized = normalizeContextOptions(options);\n const commands = await import(\"./commands/context.js\");\n const result = await commands.runContext(normalized, globalOptions);\n const outputFormat = commands.resolveContextOutputFormat(normalized, globalOptions);\n if (outputFormat === \"markdown\") {\n if (!globalOptions.quiet) {\n writeStdout(`${commands.renderContextMarkdown(result)}\\n`);\n }\n } else {\n printResult(result, {\n ...globalOptions,\n json: outputFormat === \"json\",\n });\n }\n if (globalOptions.profile) {\n printError(`profile:command=context took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"search\")) {\n program\n .command(\"search\")\n .argument(\"<keywords...>\", \"Keyword query tokens\")\n .description(\"Search items with keyword, semantic, or hybrid retrieval.\")\n .option(\"--mode <value>\", \"Search mode: keyword|semantic|hybrid (default: keyword)\")\n .option(\"--semantic\", \"Shorthand for --mode semantic\")\n .option(\"--hybrid\", \"Shorthand for --mode hybrid\")\n .option(\"--include-linked\", \"Include linked files, docs, and tests in the searchable corpus\")\n .option(\"--title-exact\", \"Require exact normalized title match for the full query string\")\n .option(\"--phrase-exact\", \"Require exact normalized phrase match in searchable text\")\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--deadline-before <value>\", \"Filter by deadline upper bound (ISO/date string or relative)\")\n .option(\"--deadline-after <value>\", \"Filter by deadline lower bound (ISO/date string or relative)\")\n .option(\"--compact\", \"Render compact search hits (default; mutually exclusive with --full/--fields)\")\n .option(\"--full\", \"Render full search hits with nested item payloads (mutually exclusive with --compact/--fields)\")\n .option(\n \"--fields <value>\",\n \"Render custom comma-separated search hit fields (mutually exclusive with --compact/--full; valid: --fields id,title,score; invalid: --full --fields id,title)\",\n )\n .option(\"--limit <n>\", \"Limit returned item count\")\n .action(async (keywords: string[], options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runSearch } = await import(\"./commands/search.js\");\n const searchOptions = normalizeSearchOptions(options);\n const result = await runSearch(\n normalizeSearchKeywordsInput(keywords),\n {\n ...searchOptions,\n mode:\n typeof searchOptions.mode === \"string\" && searchOptions.mode.trim().length > 0\n ? searchOptions.mode\n : \"keyword\",\n },\n globalOptions,\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=search took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"get\")) {\n program\n .command(\"get\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--depth <value>\", \"Detail depth: brief|standard|deep|full (full aliases deep; default: deep)\")\n .option(\"--full\", \"Explicit full item read; equivalent to --depth deep (mutually exclusive with --depth/--fields)\")\n .option(\"--fields <value>\", \"Render custom comma-separated item metadata fields (for example: --fields id,title,status,parent,type)\")\n .description(\"Show item details by ID.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runGet } = await import(\"./commands/get.js\");\n const result = await runGet(\n id,\n globalOptions,\n {\n depth: typeof options.depth === \"string\" ? options.depth : undefined,\n fields: typeof options.fields === \"string\" ? options.fields : undefined,\n full: Boolean(options.full),\n },\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=get took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"history\")) {\n program\n .command(\"history\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--limit <n>\", \"Return only the latest n history entries\")\n .option(\"--compact\", \"Condensed output: show entry index, timestamp, op, author, patch count, and changed fields\")\n .option(\"--full\", \"Show full history entries with JSON Patch payloads\")\n .option(\"--diff\", \"Include per-entry changed field summaries from history patches\")\n .option(\"--verify\", \"Verify hash chain and replay integrity for the full history stream\")\n .description(\"Show item history entries.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n if (options.compact === true && options.full === true) {\n throw new PmCliError(\"History projection options are mutually exclusive. Use either --compact or --full.\", EXIT_CODE.USAGE);\n }\n const { runHistory } = await import(\"./commands/history.js\");\n const result = await runHistory(\n id,\n {\n limit: typeof options.limit === \"string\" ? options.limit : undefined,\n compact: options.full === true ? false : true,\n diff: Boolean(options.diff),\n verify: Boolean(options.verify),\n },\n globalOptions,\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=history took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"activity\")) {\n program\n .command(\"activity\")\n .option(\"--id <value>\", \"Filter by item ID\")\n .option(\"--op <value>\", \"Filter by history operation\")\n .option(\"--author <value>\", \"Filter by history author\")\n .option(\"--from <value>\", \"Lower timestamp bound (ISO/date string or relative)\")\n .option(\"--to <value>\", \"Upper timestamp bound (ISO/date string or relative)\")\n .option(\"--limit <n>\", \"Return only the latest n activity entries\")\n .option(\"--compact\", \"Condensed output: show only id, op, ts, author, msg per entry\")\n .option(\"--full\", \"Show full activity entries with JSON Patch payloads\")\n .option(\"--stream [mode]\", \"Emit line-delimited JSON rows (requires --json). Optional mode: rows|ndjson|jsonl\")\n .description(\"Show recent activity across items.\")\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n if (options.compact === true && options.full === true) {\n throw new PmCliError(\"Activity projection options are mutually exclusive. Use either --compact or --full.\", EXIT_CODE.USAGE);\n }\n const normalized = normalizeActivityOptions(options);\n const { runActivity } = await import(\"./commands/activity.js\");\n const result = await runActivity(normalized, globalOptions);\n const streamMode = resolveActivityStreamMode(options.stream);\n if (streamMode && !globalOptions.json) {\n throw new PmCliError(\"--stream requires --json output mode.\", EXIT_CODE.USAGE);\n }\n if (streamMode) {\n printActivityJsonStream(result, normalized, globalOptions);\n } else {\n printResult(result, globalOptions);\n }\n if (globalOptions.profile) {\n printError(`profile:command=activity took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,UAAU,EACV,mBAAmB,EACnB,WAAW,EACX,yBAAyB,EACzB,WAAW,GACZ,MAAM,2BAA2B,CAAC;AA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D,MAAM,UAAU,GAAG,yBAAyB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC7D,IAAI,UAAU,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;gBACtC,MAAM,IAAI,UAAU,CAAC,uCAAuC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;YACjF,CAAC;YACD,IAAI,UAAU,EAAE,CAAC;gBACf,uBAAuB,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;YAC7D,CAAC;iBAAM,CAAC;gBACN,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;YACrC,CAAC;YACD,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;gBAC1B,UAAU,CAAC,oCAAoC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;YAC3E,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;AACH,CAAC","debugId":"febfb5c7-e10b-58e9-ac9b-d2bcd0c25b57"}
|
|
1
|
+
{"version":3,"file":"register-list-query.js","sources":["cli/register-list-query.ts"],"sourceRoot":"/","sourcesContent":["import { Option, type Command } from \"commander\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport type { ItemStatus } from \"../types/index.js\";\nimport {\n getGlobalOptions,\n normalizeAggregateOptions,\n normalizeActivityOptions,\n normalizeContextOptions,\n normalizeListOptions,\n normalizeSearchKeywordsInput,\n normalizeSearchOptions,\n printActivityJsonStream,\n printError,\n printListJsonStream,\n printResult,\n resolveActivityStreamMode,\n writeStdout,\n} from \"./registration-helpers.js\";\n\n\n\nexport interface RegisterListQueryCommandsOptions {\n commandFilter?: Set<string>;\n}\n\nfunction shouldRegisterListQueryCommand(commandName: string, commandFilter?: Set<string>): boolean {\n if (!commandFilter || commandFilter.size === 0) {\n return true;\n }\n if (commandName === \"context\") {\n return commandFilter.has(\"context\") || commandFilter.has(\"ctx\");\n }\n return commandFilter.has(commandName);\n}\n\nexport function registerListQueryCommands(program: Command, options?: RegisterListQueryCommandsOptions): void {\n const commandFilter = options?.commandFilter;\n const shouldRegister = (commandName: string): boolean => shouldRegisterListQueryCommand(commandName, commandFilter);\n // Register a flag and hide it from --help text while keeping it functional as\n // a parse-time alias. Used for pure snake_case underscore-duplicate aliases\n // (e.g. --assignee_filter for --assignee-filter) so they no longer bloat\n // --help output. The option still appears in command.options, so JSON help\n // and completion are unchanged.\n function addHiddenOption(command: Command, flags: string, description: string): void {\n command.addOption(new Option(flags, description).hideHelp());\n }\n\n function registerListCommand(\n name: string,\n description: string,\n status?: ItemStatus,\n excludeTerminal?: boolean,\n allowStatusFilter?: boolean,\n defaultBrief?: boolean,\n ): void {\n const command = program.command(name).description(description);\n if (allowStatusFilter) {\n command.option(\"--status <value>\", \"Filter by status\");\n }\n command\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--deadline-before <value>\", \"Filter by deadline upper bound (ISO/date string or relative)\")\n .option(\"--deadline-after <value>\", \"Filter by deadline lower bound (ISO/date string or relative)\")\n .option(\"--updated-after <value>\", 'Filter by updated_at lower bound: ISO timestamp or signed relative (e.g. \"-2h\"/\"-7d\" for the past). \"Changed since my last window\" → --updated-after <ISO>')\n .option(\"--updated-before <value>\", \"Filter by updated_at upper bound: ISO timestamp or signed relative (-2h/+1d)\")\n .option(\"--created-after <value>\", \"Filter by created_at lower bound: ISO timestamp or signed relative (-2h/+1d)\")\n .option(\"--created-before <value>\", \"Filter by created_at upper bound: ISO timestamp or signed relative (-2h/+1d)\")\n .option(\"--ids <value>\", \"Filter by explicit item IDs (comma-separated)\")\n .option(\"--assignee <value>\", \"Filter by assignee\")\n .option(\"--assignee-filter <value>\", \"Filter assignee presence: assigned|unassigned\")\n .option(\"--parent <value>\", \"Filter by parent item ID\")\n .option(\"--sprint <value>\", \"Filter by sprint\")\n .option(\"--release <value>\", \"Filter by release\")\n .option(\"--limit <n>\", \"Limit returned item count\")\n .option(\"--offset <n>\", \"Skip the first n matching rows before limit is applied\")\n .option(\"--include-body\", \"Include item body in each returned list row\")\n .option(\"--compact\", \"Render compact list projection fields (mutually exclusive with --brief/--full/--fields)\")\n .option(\"--brief\", \"Ultra-compact output: id, status, type, title only (agent-optimized, mutually exclusive with --compact/--full/--fields)\")\n .option(\"--full\", \"Render full list projection fields (mutually exclusive with --compact/--brief/--fields)\")\n .option(\n \"--fields <value>\",\n \"Render custom comma-separated list fields (mutually exclusive with --compact/--brief/--full; valid: --fields id,title)\",\n )\n .option(\"--sort <value>\", \"Sort field: priority|deadline|updated_at|created_at|title|parent (aliases: updated, created)\")\n .option(\"--order <value>\", \"Sort order: asc|desc (requires --sort)\")\n .option(\"--stream\", \"Emit line-delimited JSON rows (requires --json)\")\n .action(async (options: Record<string, unknown>, actionCommand) => {\n const globalOptions = getGlobalOptions(actionCommand);\n const startedAt = Date.now();\n const listOptions = normalizeListOptions(options);\n if (\n defaultBrief === true &&\n listOptions.includeBody !== true &&\n listOptions.compact !== true &&\n listOptions.brief !== true &&\n listOptions.full !== true &&\n listOptions.fields === undefined\n ) {\n listOptions.brief = true;\n }\n if (excludeTerminal) listOptions.excludeTerminal = true;\n const { runList } = await import(\"./commands/list.js\");\n const result = await runList(status, listOptions, globalOptions);\n const streamMode = options.stream === true;\n if (streamMode && !globalOptions.json) {\n throw new PmCliError(\"--stream requires --json output mode.\", EXIT_CODE.USAGE);\n }\n if (streamMode) {\n printListJsonStream(name, result, globalOptions);\n } else {\n printResult(result, globalOptions);\n }\n if (globalOptions.profile) {\n printError(`profile:command=${name} took_ms=${Date.now() - startedAt}`);\n }\n });\n // Hidden pure snake_case underscore-duplicate alias (kept parse-functional).\n addHiddenOption(command, \"--assignee_filter <value>\", \"Alias for --assignee-filter\");\n }\n\n if (shouldRegister(\"list\")) {\n registerListCommand(\"list\", \"List active items with optional filters.\", undefined, true, true, true);\n }\n if (shouldRegister(\"list-all\")) {\n registerListCommand(\"list-all\", \"List all items with optional filters.\", undefined, false, true);\n }\n if (shouldRegister(\"list-draft\")) {\n registerListCommand(\"list-draft\", \"List draft items with optional filters.\", \"draft\");\n }\n if (shouldRegister(\"list-open\")) {\n registerListCommand(\"list-open\", \"List open items with optional filters.\", \"open\", false, false, true);\n }\n if (shouldRegister(\"list-in-progress\")) {\n registerListCommand(\"list-in-progress\", \"List in-progress items with optional filters.\", \"in_progress\", false, false, true);\n }\n if (shouldRegister(\"list-blocked\")) {\n registerListCommand(\"list-blocked\", \"List blocked items with optional filters.\", \"blocked\");\n }\n if (shouldRegister(\"list-closed\")) {\n registerListCommand(\"list-closed\", \"List closed items with optional filters.\", \"closed\");\n }\n if (shouldRegister(\"list-canceled\")) {\n registerListCommand(\"list-canceled\", \"List canceled items with optional filters.\", \"canceled\");\n }\n\n if (shouldRegister(\"aggregate\")) {\n const aggregateCommand = program\n .command(\"aggregate\")\n .description(\"Aggregate grouped item counts for governance queries.\")\n .option(\n \"--group-by <value>\",\n \"Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)\",\n )\n .option(\"--count\", \"Return grouped counts (default behavior)\")\n .option(\"--include-unparented\", \"Include unparented rows when grouping by parent\")\n .option(\"--status <value>\", \"Filter by item status\")\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--deadline-before <value>\", \"Filter by deadline upper bound (ISO/date string or relative)\")\n .option(\"--deadline-after <value>\", \"Filter by deadline lower bound (ISO/date string or relative)\")\n .option(\"--assignee <value>\", \"Filter by assignee\")\n .option(\"--assignee-filter <value>\", \"Filter assignee presence: assigned|unassigned\")\n .option(\"--parent <value>\", \"Filter by parent item ID\")\n .option(\"--sprint <value>\", \"Filter by sprint\")\n .option(\"--release <value>\", \"Filter by release\");\n // Hidden pure snake_case underscore-duplicate aliases (kept parse-functional).\n addHiddenOption(aggregateCommand, \"--include_unparented\", \"Alias for --include-unparented\");\n addHiddenOption(aggregateCommand, \"--assignee_filter <value>\", \"Alias for --assignee-filter\");\n aggregateCommand\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runAggregate } = await import(\"./commands/aggregate.js\");\n const result = await runAggregate(normalizeAggregateOptions(options), globalOptions);\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=aggregate took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"context\")) {\n const contextCommand = program\n .command(\"context\")\n .alias(\"ctx\")\n .description(\"Show a token-efficient project context snapshot for next-work decisions.\")\n .option(\"--date <value>\", \"Anchor date/time for agenda window calculations (ISO/date string or relative)\")\n .option(\"--from <value>\", \"Agenda lower bound (ISO/date string or relative)\")\n .option(\"--to <value>\", \"Agenda upper bound (ISO/date string or relative)\")\n .option(\"--past\", \"Include past agenda entries in bounded windows\")\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--assignee <value>\", \"Filter by assignee\")\n .option(\"--assignee-filter <value>\", \"Filter assignee presence: assigned|unassigned\")\n .option(\"--sprint <value>\", \"Filter by sprint\")\n .option(\"--release <value>\", \"Filter by release\")\n .option(\"--limit <n>\", \"Limit focus and agenda rows per section\")\n .option(\"--format <value>\", \"Context output format override: markdown|toon|json\")\n .option(\"--depth <value>\", \"Context depth: brief|standard|deep (default: settings or brief)\")\n .option(\"--section <value...>\", \"Include specific sections (repeatable; overrides --depth)\")\n .option(\"--activity-limit <n>\", \"Limit recent activity entries (default: settings or 10)\")\n .option(\"--stale-threshold <value>\", \"Staleness cutoff in days (e.g. 7 or 7d; default: settings or 7)\");\n // Hidden pure snake_case underscore-duplicate alias (kept parse-functional).\n addHiddenOption(contextCommand, \"--assignee_filter <value>\", \"Alias for --assignee-filter\");\n contextCommand\n .action(async (options: Record<string, unknown>, actionCommand) => {\n const globalOptions = getGlobalOptions(actionCommand);\n const startedAt = Date.now();\n const normalized = normalizeContextOptions(options);\n const commands = await import(\"./commands/context.js\");\n const result = await commands.runContext(normalized, globalOptions);\n const outputFormat = commands.resolveContextOutputFormat(normalized, globalOptions);\n if (outputFormat === \"markdown\") {\n if (!globalOptions.quiet) {\n writeStdout(`${commands.renderContextMarkdown(result)}\\n`);\n }\n } else {\n printResult(result, {\n ...globalOptions,\n json: outputFormat === \"json\",\n });\n }\n if (globalOptions.profile) {\n printError(`profile:command=context took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"search\")) {\n program\n .command(\"search\")\n .argument(\"<keywords...>\", \"Keyword query tokens\")\n .description(\"Search items with keyword, semantic, or hybrid retrieval.\")\n .option(\"--mode <value>\", \"Search mode: keyword|semantic|hybrid (default: keyword)\")\n .option(\"--semantic\", \"Shorthand for --mode semantic\")\n .option(\"--hybrid\", \"Shorthand for --mode hybrid\")\n .option(\"--include-linked\", \"Include linked files, docs, and tests in the searchable corpus\")\n .option(\"--title-exact\", \"Require exact normalized title match for the full query string\")\n .option(\"--phrase-exact\", \"Require exact normalized phrase match in searchable text\")\n .option(\"--status <value>\", \"Filter by status before query (open/closed/canceled aliases or configured status id; CSV)\")\n .option(\"--type <value>\", \"Filter by item type\")\n .option(\"--tag <value>\", \"Filter by tag\")\n .option(\"--priority <value>\", \"Filter by priority\")\n .option(\"--deadline-before <value>\", \"Filter by deadline upper bound (ISO/date string or relative)\")\n .option(\"--deadline-after <value>\", \"Filter by deadline lower bound (ISO/date string or relative)\")\n .option(\"--compact\", \"Render compact search hits (default; mutually exclusive with --full/--fields)\")\n .option(\"--full\", \"Render full search hits with nested item payloads (mutually exclusive with --compact/--fields)\")\n .option(\n \"--fields <value>\",\n \"Render custom comma-separated search hit fields (mutually exclusive with --compact/--full; valid: --fields id,title,score; invalid: --full --fields id,title)\",\n )\n .option(\"--limit <n>\", \"Limit returned item count\")\n .action(async (keywords: string[], options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runSearch } = await import(\"./commands/search.js\");\n const searchOptions = normalizeSearchOptions(options);\n const result = await runSearch(\n normalizeSearchKeywordsInput(keywords),\n {\n ...searchOptions,\n mode:\n typeof searchOptions.mode === \"string\" && searchOptions.mode.trim().length > 0\n ? searchOptions.mode\n : \"keyword\",\n },\n globalOptions,\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=search took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"get\")) {\n program\n .command(\"get\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--depth <value>\", \"Detail depth: brief|standard|deep|full (full aliases deep; default: standard)\")\n .option(\"--full\", \"Explicit full item read; equivalent to --depth deep (mutually exclusive with --depth/--fields)\")\n .option(\"--fields <value>\", \"Render custom comma-separated item metadata fields (for example: --fields id,title,status,parent,type)\")\n .description(\"Show item details by ID.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runGet } = await import(\"./commands/get.js\");\n const result = await runGet(\n id,\n globalOptions,\n {\n depth: typeof options.depth === \"string\" ? options.depth : undefined,\n fields: typeof options.fields === \"string\" ? options.fields : undefined,\n full: Boolean(options.full),\n },\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=get took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"history\")) {\n program\n .command(\"history\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--limit <n>\", \"Return only the latest n history entries\")\n .option(\"--compact\", \"Condensed output: show entry index, timestamp, op, author, patch count, and changed fields\")\n .option(\"--full\", \"Show full history entries with JSON Patch payloads\")\n .option(\"--diff\", \"Include per-entry field-level before/after value diffs computed by replaying the history chain\")\n .option(\"--field <name>\", \"With --diff, show only entries that changed this field (implies --diff)\")\n .option(\"--verify\", \"Verify hash chain and replay integrity for the full history stream\")\n .description(\"Show item history entries.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n if (options.compact === true && options.full === true) {\n throw new PmCliError(\"History projection options are mutually exclusive. Use either --compact or --full.\", EXIT_CODE.USAGE);\n }\n const field = typeof options.field === \"string\" ? options.field : undefined;\n const { runHistory } = await import(\"./commands/history.js\");\n const result = await runHistory(\n id,\n {\n limit: typeof options.limit === \"string\" ? options.limit : undefined,\n compact: options.full === true ? false : true,\n diff: Boolean(options.diff) || field !== undefined,\n field,\n verify: Boolean(options.verify),\n },\n globalOptions,\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=history took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n\n if (shouldRegister(\"activity\")) {\n program\n .command(\"activity\")\n .option(\"--id <value>\", \"Filter by item ID\")\n .option(\"--op <value>\", \"Filter by history operation\")\n .option(\"--author <value>\", \"Filter by history author\")\n .option(\"--from <value>\", \"Lower timestamp bound (ISO/date string or relative)\")\n .option(\"--to <value>\", \"Upper timestamp bound (ISO/date string or relative)\")\n .option(\"--limit <n>\", \"Return only the latest n activity entries\")\n .option(\"--compact\", \"Condensed output: show only id, op, ts, author, msg per entry\")\n .option(\"--full\", \"Show full activity entries with JSON Patch payloads\")\n .option(\"--stream [mode]\", \"Emit line-delimited JSON rows (requires --json). Optional mode: rows|ndjson|jsonl\")\n .description(\"Show recent activity across items.\")\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n if (options.compact === true && options.full === true) {\n throw new PmCliError(\"Activity projection options are mutually exclusive. Use either --compact or --full.\", EXIT_CODE.USAGE);\n }\n const normalized = normalizeActivityOptions(options);\n const { runActivity } = await import(\"./commands/activity.js\");\n const result = await runActivity(normalized, globalOptions);\n const streamMode = resolveActivityStreamMode(options.stream);\n if (streamMode && !globalOptions.json) {\n throw new PmCliError(\"--stream requires --json output mode.\", EXIT_CODE.USAGE);\n }\n if (streamMode) {\n printActivityJsonStream(result, normalized, globalOptions);\n } else {\n printResult(result, globalOptions);\n }\n if (globalOptions.profile) {\n printError(`profile:command=activity took_ms=${Date.now() - startedAt}`);\n }\n });\n }\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,UAAU,EACV,mBAAmB,EACnB,WAAW,EACX,yBAAyB,EACzB,WAAW,GACZ,MAAM,2BAA2B,CAAC;AAQnC,SAAS,8BAA8B,CAAC,WAAmB,EAAE,aAA2B;IACtF,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAgB,EAAE,OAA0C;IACpG,MAAM,aAAa,GAAG,OAAO,EAAE,aAAa,CAAC;IAC7C,MAAM,cAAc,GAAG,CAAC,WAAmB,EAAW,EAAE,CAAC,8BAA8B,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IACpH,8EAA8E;IAC9E,4EAA4E;IAC5E,yEAAyE;IACzE,2EAA2E;IAC3E,gCAAgC;IAChC,SAAS,eAAe,CAAC,OAAgB,EAAE,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AAC,CAAC;YACjF,CAAC;YACD,IAAI,UAAU,EAAE,CAAC;gBACf,uBAAuB,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;YAC7D,CAAC;iBAAM,CAAC;gBACN,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;YACrC,CAAC;YACD,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;gBAC1B,UAAU,CAAC,oCAAoC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;YAC3E,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;AACH,CAAC","debugId":"fe2bfac3-19a8-5dc0-b812-ad59c6281ba6"}
|
|
@@ -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]="512c19d2-da36-590c-a1ca-cd11e57c7529")}catch(e){}}();
|
|
3
3
|
import { Option } from "commander";
|
|
4
4
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
5
5
|
import { PmCliError } from "../core/shared/errors.js";
|
|
@@ -26,6 +26,34 @@ function addHiddenOption(command, flags, description, repeatable) {
|
|
|
26
26
|
}
|
|
27
27
|
command.addOption(option);
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Parse the `--order` value for `pm schema add-status`. Accepts a value that is
|
|
31
|
+
* already a number or a numeric string; throws a usage error when the flag was
|
|
32
|
+
* supplied but does not parse to a finite integer (rather than silently dropping
|
|
33
|
+
* it). Returns `undefined` only when the flag was genuinely not provided.
|
|
34
|
+
*/
|
|
35
|
+
function parseSchemaOrderOption(raw) {
|
|
36
|
+
if (raw === undefined || raw === null) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
if (typeof raw === "number") {
|
|
40
|
+
if (!Number.isInteger(raw)) {
|
|
41
|
+
throw new PmCliError("--order must be a finite integer.", EXIT_CODE.USAGE);
|
|
42
|
+
}
|
|
43
|
+
return raw;
|
|
44
|
+
}
|
|
45
|
+
if (typeof raw === "string") {
|
|
46
|
+
if (raw.trim().length === 0) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
const parsed = Number(raw);
|
|
50
|
+
if (!Number.isInteger(parsed)) {
|
|
51
|
+
throw new PmCliError("--order must be a finite integer.", EXIT_CODE.USAGE);
|
|
52
|
+
}
|
|
53
|
+
return parsed;
|
|
54
|
+
}
|
|
55
|
+
throw new PmCliError("--order must be a finite integer.", EXIT_CODE.USAGE);
|
|
56
|
+
}
|
|
29
57
|
function registerCommanderOptionContracts(command, contracts) {
|
|
30
58
|
for (const contract of contracts) {
|
|
31
59
|
if (contract.required) {
|
|
@@ -170,11 +198,16 @@ export function registerMutationCommands(program) {
|
|
|
170
198
|
.option("--filter-priority <value>", "Filter by priority before applying updates")
|
|
171
199
|
.option("--filter-deadline-before <value>", "Filter by deadline upper bound before applying updates")
|
|
172
200
|
.option("--filter-deadline-after <value>", "Filter by deadline lower bound before applying updates")
|
|
201
|
+
.option("--filter-updated-after <value>", "Filter by updated_at lower bound before applying updates (ISO/relative)")
|
|
202
|
+
.option("--filter-updated-before <value>", "Filter by updated_at upper bound before applying updates (ISO/relative)")
|
|
203
|
+
.option("--filter-created-after <value>", "Filter by created_at lower bound before applying updates (ISO/relative)")
|
|
204
|
+
.option("--filter-created-before <value>", "Filter by created_at upper bound before applying updates (ISO/relative)")
|
|
173
205
|
.option("--filter-assignee <value>", "Filter by assignee before applying updates")
|
|
174
206
|
.option("--filter-assignee-filter <value>", "Filter assignee presence: assigned|unassigned before applying updates")
|
|
175
207
|
.option("--filter-parent <value>", "Filter by parent item ID before applying updates")
|
|
176
208
|
.option("--filter-sprint <value>", "Filter by sprint before applying updates")
|
|
177
209
|
.option("--filter-release <value>", "Filter by release before applying updates")
|
|
210
|
+
.option("--ids <value>", "Restrict to an explicit comma-separated ID allowlist (intersected with other filters)")
|
|
178
211
|
.option("--limit <n>", "Limit matched item count before apply/preview")
|
|
179
212
|
.option("--offset <n>", "Skip first n matched rows before apply/preview")
|
|
180
213
|
.option("--dry-run", "Preview per-item diffs and checkpoint intent without mutating")
|
|
@@ -298,6 +331,11 @@ export function registerMutationCommands(program) {
|
|
|
298
331
|
priority: typeof options.filterPriority === "string" ? options.filterPriority : undefined,
|
|
299
332
|
deadlineBefore: typeof options.filterDeadlineBefore === "string" ? options.filterDeadlineBefore : undefined,
|
|
300
333
|
deadlineAfter: typeof options.filterDeadlineAfter === "string" ? options.filterDeadlineAfter : undefined,
|
|
334
|
+
updatedAfter: typeof options.filterUpdatedAfter === "string" ? options.filterUpdatedAfter : undefined,
|
|
335
|
+
updatedBefore: typeof options.filterUpdatedBefore === "string" ? options.filterUpdatedBefore : undefined,
|
|
336
|
+
createdAfter: typeof options.filterCreatedAfter === "string" ? options.filterCreatedAfter : undefined,
|
|
337
|
+
createdBefore: typeof options.filterCreatedBefore === "string" ? options.filterCreatedBefore : undefined,
|
|
338
|
+
ids: typeof options.ids === "string" ? options.ids : undefined,
|
|
301
339
|
assignee: typeof options.filterAssignee === "string" ? options.filterAssignee : undefined,
|
|
302
340
|
assigneeFilter: typeof options.filterAssigneeFilter === "string"
|
|
303
341
|
? options.filterAssigneeFilter
|
|
@@ -392,6 +430,98 @@ export function registerMutationCommands(program) {
|
|
|
392
430
|
printError(`profile:command=close took_ms=${Date.now() - startedAt}`);
|
|
393
431
|
}
|
|
394
432
|
});
|
|
433
|
+
const closeManyCommand = program
|
|
434
|
+
.command("close-many")
|
|
435
|
+
.description("Bulk-close matched items with a shared reason and full runClose semantics (dry-run + rollback checkpoint).")
|
|
436
|
+
.option("--filter-status <value>", "Filter by status before closing")
|
|
437
|
+
.option("--filter-type <value>", "Filter by item type before closing")
|
|
438
|
+
.option("--filter-tag <value>", "Filter by tag before closing")
|
|
439
|
+
.option("--filter-priority <value>", "Filter by priority before closing")
|
|
440
|
+
.option("--filter-deadline-before <value>", "Filter by deadline upper bound before closing")
|
|
441
|
+
.option("--filter-deadline-after <value>", "Filter by deadline lower bound before closing")
|
|
442
|
+
.option("--filter-updated-after <value>", "Filter by updated_at lower bound before closing (ISO/relative)")
|
|
443
|
+
.option("--filter-updated-before <value>", "Filter by updated_at upper bound before closing (ISO/relative)")
|
|
444
|
+
.option("--filter-created-after <value>", "Filter by created_at lower bound before closing (ISO/relative)")
|
|
445
|
+
.option("--filter-created-before <value>", "Filter by created_at upper bound before closing (ISO/relative)")
|
|
446
|
+
.option("--filter-assignee <value>", "Filter by assignee before closing")
|
|
447
|
+
.option("--filter-assignee-filter <value>", "Filter assignee presence: assigned|unassigned before closing")
|
|
448
|
+
.option("--filter-parent <value>", "Filter by parent item ID before closing")
|
|
449
|
+
.option("--filter-sprint <value>", "Filter by sprint before closing")
|
|
450
|
+
.option("--filter-release <value>", "Filter by release before closing")
|
|
451
|
+
.option("--ids <value>", "Restrict to an explicit comma-separated ID allowlist (intersected with other filters)")
|
|
452
|
+
.option("--limit <n>", "Limit matched item count before apply/preview")
|
|
453
|
+
.option("--offset <n>", "Skip first n matched rows before apply/preview")
|
|
454
|
+
.option("--reason <value>", "Shared close reason applied to every matched item (required for dry-run/apply)")
|
|
455
|
+
.option("--resolution <value>", "Shared closure resolution applied to every matched item (closure-validation field)")
|
|
456
|
+
.option("--expected-result <value>", "Shared expected-result note (closure-validation field)")
|
|
457
|
+
.option("--expected <value>", "Short alias for --expected-result")
|
|
458
|
+
.option("--actual-result <value>", "Shared actual-result note (closure-validation field)")
|
|
459
|
+
.option("--actual <value>", "Short alias for --actual-result")
|
|
460
|
+
.option("--validate-close [mode]", 'Validate closure metadata per item: "off", "warn", or "strict" (default: settings governance preset)')
|
|
461
|
+
.option("--author <value>", "Mutation author")
|
|
462
|
+
.option("--message <value>", "History message")
|
|
463
|
+
.option("--force", "Re-close already-terminal matches and override ownership")
|
|
464
|
+
.option("--dry-run", "Preview matched items + per-item skip/active-child plan without mutating")
|
|
465
|
+
.option("--rollback <value>", "Rollback a prior close-many checkpoint ID")
|
|
466
|
+
.option("--no-checkpoint", "Disable checkpoint creation during apply mode");
|
|
467
|
+
addHiddenOption(closeManyCommand, "--filter-assignee_filter <value>", "Alias for --filter-assignee-filter", false);
|
|
468
|
+
addHiddenOption(closeManyCommand, "--expected_result <value>", "Alias for --expected-result", false);
|
|
469
|
+
addHiddenOption(closeManyCommand, "--actual_result <value>", "Alias for --actual-result", false);
|
|
470
|
+
closeManyCommand.action(async (options, command) => {
|
|
471
|
+
const globalOptions = getGlobalOptions(command);
|
|
472
|
+
const startedAt = Date.now();
|
|
473
|
+
const pickString = (...candidates) => {
|
|
474
|
+
for (const candidate of candidates) {
|
|
475
|
+
if (typeof candidate === "string") {
|
|
476
|
+
return candidate;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
return undefined;
|
|
480
|
+
};
|
|
481
|
+
const { runCloseMany } = await import("./commands/close-many.js");
|
|
482
|
+
const result = await runCloseMany({
|
|
483
|
+
status: typeof options.filterStatus === "string" ? options.filterStatus : undefined,
|
|
484
|
+
list: {
|
|
485
|
+
type: typeof options.filterType === "string" ? options.filterType : undefined,
|
|
486
|
+
tag: typeof options.filterTag === "string" ? options.filterTag : undefined,
|
|
487
|
+
priority: typeof options.filterPriority === "string" ? options.filterPriority : undefined,
|
|
488
|
+
deadlineBefore: typeof options.filterDeadlineBefore === "string" ? options.filterDeadlineBefore : undefined,
|
|
489
|
+
deadlineAfter: typeof options.filterDeadlineAfter === "string" ? options.filterDeadlineAfter : undefined,
|
|
490
|
+
updatedAfter: typeof options.filterUpdatedAfter === "string" ? options.filterUpdatedAfter : undefined,
|
|
491
|
+
updatedBefore: typeof options.filterUpdatedBefore === "string" ? options.filterUpdatedBefore : undefined,
|
|
492
|
+
createdAfter: typeof options.filterCreatedAfter === "string" ? options.filterCreatedAfter : undefined,
|
|
493
|
+
createdBefore: typeof options.filterCreatedBefore === "string" ? options.filterCreatedBefore : undefined,
|
|
494
|
+
ids: typeof options.ids === "string" ? options.ids : undefined,
|
|
495
|
+
assignee: typeof options.filterAssignee === "string" ? options.filterAssignee : undefined,
|
|
496
|
+
assigneeFilter: pickString(options.filterAssigneeFilter, options.filterAssignee_filter),
|
|
497
|
+
parent: typeof options.filterParent === "string" ? options.filterParent : undefined,
|
|
498
|
+
sprint: typeof options.filterSprint === "string" ? options.filterSprint : undefined,
|
|
499
|
+
release: typeof options.filterRelease === "string" ? options.filterRelease : undefined,
|
|
500
|
+
limit: typeof options.limit === "string" ? options.limit : undefined,
|
|
501
|
+
offset: typeof options.offset === "string" ? options.offset : undefined,
|
|
502
|
+
},
|
|
503
|
+
reason: typeof options.reason === "string" ? options.reason : undefined,
|
|
504
|
+
resolution: typeof options.resolution === "string" ? options.resolution : undefined,
|
|
505
|
+
expectedResult: pickString(options.expectedResult, options.expected_result, options.expected),
|
|
506
|
+
actualResult: pickString(options.actualResult, options.actual_result, options.actual),
|
|
507
|
+
validateClose: options.validateClose === true
|
|
508
|
+
? "warn"
|
|
509
|
+
: typeof options.validateClose === "string"
|
|
510
|
+
? options.validateClose
|
|
511
|
+
: undefined,
|
|
512
|
+
author: typeof options.author === "string" ? options.author : undefined,
|
|
513
|
+
message: typeof options.message === "string" ? options.message : undefined,
|
|
514
|
+
force: Boolean(options.force),
|
|
515
|
+
dryRun: options.dryRun === true ? true : undefined,
|
|
516
|
+
rollback: typeof options.rollback === "string" ? options.rollback : undefined,
|
|
517
|
+
checkpoint: options.checkpoint === false ? false : undefined,
|
|
518
|
+
}, globalOptions);
|
|
519
|
+
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
520
|
+
printResult(result, globalOptions);
|
|
521
|
+
if (globalOptions.profile) {
|
|
522
|
+
printError(`profile:command=close-many took_ms=${Date.now() - startedAt}`);
|
|
523
|
+
}
|
|
524
|
+
});
|
|
395
525
|
program
|
|
396
526
|
.command("delete")
|
|
397
527
|
.argument("<id>", "Item id")
|
|
@@ -719,30 +849,36 @@ export function registerMutationCommands(program) {
|
|
|
719
849
|
});
|
|
720
850
|
const schemaCommand = program
|
|
721
851
|
.command("schema")
|
|
722
|
-
.argument("[subcommand]", "Schema subcommand: add-type, or a custom item type name shorthand")
|
|
723
|
-
.argument("[name]", "
|
|
724
|
-
.option("--description <text>", "Human description for the custom item type")
|
|
852
|
+
.argument("[subcommand]", "Schema subcommand: list, show, add-type, remove-type, add-status, remove-status, or a custom item type name shorthand")
|
|
853
|
+
.argument("[name]", "Item type name (add-type/remove-type/show) or status id (add-status/remove-status)")
|
|
854
|
+
.option("--description <text>", "Human description for the custom item type or status")
|
|
725
855
|
.option("--default-status <status>", "Default status hint recorded for the custom item type")
|
|
726
856
|
.option("--folder <dir>", "Storage folder for items of this custom type")
|
|
727
|
-
.option("--alias <name>", "Alias for the custom type (repeatable, csv-friendly)", collect)
|
|
857
|
+
.option("--alias <name>", "Alias for the custom type or status (repeatable, csv-friendly)", collect)
|
|
858
|
+
.option("--role <value>", "Lifecycle role for a custom status (repeatable): draft, active, blocked, terminal, terminal_done, terminal_canceled, default_open, default_close, default_cancel", collect)
|
|
859
|
+
.option("--order <n>", "Display/sort order for a custom status")
|
|
728
860
|
.option("--author <value>", "Mutation author")
|
|
729
861
|
.option("--force", "Force ownership/lock override")
|
|
730
|
-
.description("
|
|
862
|
+
.description("Inspect and manage config-driven runtime schema.");
|
|
731
863
|
// Hidden pure snake_case underscore-duplicate alias.
|
|
732
864
|
addHiddenOption(schemaCommand, "--default_status <status>", "Alias for --default-status", false);
|
|
733
865
|
schemaCommand
|
|
734
866
|
.action(async (subcommand, name, options, command) => {
|
|
735
867
|
const globalOptions = getGlobalOptions(command);
|
|
736
868
|
const startedAt = Date.now();
|
|
737
|
-
const { runSchemaAddType, formatSchemaAddTypeHuman, SCHEMA_SUBCOMMANDS } = await import("./commands/schema.js");
|
|
869
|
+
const { runSchemaAddType, runSchemaRemoveType, runSchemaAddStatus, runSchemaRemoveStatus, runSchemaList, runSchemaShow, formatSchemaAddTypeHuman, formatSchemaRemoveTypeHuman, formatSchemaAddStatusHuman, formatSchemaRemoveStatusHuman, formatSchemaListHuman, formatSchemaShowHuman, SCHEMA_SUBCOMMANDS, } = await import("./commands/schema.js");
|
|
738
870
|
let normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
|
|
739
871
|
let typeName = name;
|
|
740
872
|
if (!normalizedSubcommand) {
|
|
741
873
|
throw new PmCliError(`pm schema requires a subcommand. Allowed: ${SCHEMA_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, {
|
|
742
874
|
code: "missing_required_argument",
|
|
743
875
|
examples: [
|
|
876
|
+
"pm schema list",
|
|
877
|
+
"pm schema show Task",
|
|
744
878
|
'pm schema add-type Spike --description "Time-boxed investigation" --default-status open',
|
|
745
|
-
|
|
879
|
+
"pm schema remove-type Spike",
|
|
880
|
+
"pm schema add-status review --role active --alias in_review",
|
|
881
|
+
"pm schema remove-status review",
|
|
746
882
|
],
|
|
747
883
|
});
|
|
748
884
|
}
|
|
@@ -751,42 +887,78 @@ export function registerMutationCommands(program) {
|
|
|
751
887
|
: Array.isArray(options.alias)
|
|
752
888
|
? options.alias
|
|
753
889
|
: undefined;
|
|
890
|
+
const roles = typeof options.role === "string"
|
|
891
|
+
? [options.role]
|
|
892
|
+
: Array.isArray(options.role)
|
|
893
|
+
? options.role
|
|
894
|
+
: undefined;
|
|
754
895
|
const defaultStatus = typeof options.defaultStatus === "string"
|
|
755
896
|
? options.defaultStatus
|
|
756
897
|
: typeof options.default_status === "string"
|
|
757
898
|
? options.default_status
|
|
758
899
|
: undefined;
|
|
759
|
-
const
|
|
760
|
-
|
|
761
|
-
typeof options.folder === "string" ||
|
|
762
|
-
(aliases?.length ?? 0) > 0;
|
|
763
|
-
if (!SCHEMA_SUBCOMMANDS.includes(normalizedSubcommand) &&
|
|
764
|
-
typeName === undefined &&
|
|
765
|
-
usedAddTypeOption) {
|
|
900
|
+
const order = parseSchemaOrderOption(options.order);
|
|
901
|
+
if (!SCHEMA_SUBCOMMANDS.includes(normalizedSubcommand) && typeName === undefined) {
|
|
766
902
|
typeName = subcommand;
|
|
767
903
|
normalizedSubcommand = "add-type";
|
|
768
904
|
}
|
|
769
905
|
if (!SCHEMA_SUBCOMMANDS.includes(normalizedSubcommand)) {
|
|
770
906
|
throw new PmCliError(`Unknown pm schema subcommand "${subcommand}". Allowed: ${SCHEMA_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, { code: "unknown_subcommand" });
|
|
771
907
|
}
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
908
|
+
const author = typeof options.author === "string" ? options.author : undefined;
|
|
909
|
+
const force = Boolean(options.force);
|
|
910
|
+
const result = normalizedSubcommand === "list"
|
|
911
|
+
? await runSchemaList(globalOptions)
|
|
912
|
+
: normalizedSubcommand === "show"
|
|
913
|
+
? await runSchemaShow(typeName, globalOptions)
|
|
914
|
+
: normalizedSubcommand === "remove-type"
|
|
915
|
+
? await runSchemaRemoveType(typeName, { author, force }, globalOptions)
|
|
916
|
+
: normalizedSubcommand === "add-status"
|
|
917
|
+
? await runSchemaAddStatus(typeName, {
|
|
918
|
+
role: roles,
|
|
919
|
+
alias: aliases,
|
|
920
|
+
description: typeof options.description === "string" ? options.description : undefined,
|
|
921
|
+
order,
|
|
922
|
+
author,
|
|
923
|
+
force,
|
|
924
|
+
}, globalOptions)
|
|
925
|
+
: normalizedSubcommand === "remove-status"
|
|
926
|
+
? await runSchemaRemoveStatus(typeName, { author, force }, globalOptions)
|
|
927
|
+
: await runSchemaAddType(typeName, {
|
|
928
|
+
description: typeof options.description === "string" ? options.description : undefined,
|
|
929
|
+
defaultStatus,
|
|
930
|
+
folder: typeof options.folder === "string" ? options.folder : undefined,
|
|
931
|
+
alias: aliases,
|
|
932
|
+
author,
|
|
933
|
+
force,
|
|
934
|
+
}, globalOptions);
|
|
935
|
+
// Schema inspection and type registration do not touch item content, so search caches stay valid.
|
|
781
936
|
if (globalOptions.json === true || globalOptions.defaultOutputFormat === "json") {
|
|
782
937
|
printResult(result, globalOptions);
|
|
783
938
|
}
|
|
784
939
|
else if (!globalOptions.quiet) {
|
|
785
|
-
|
|
940
|
+
if (result.action === "list") {
|
|
941
|
+
writeStdout(`${formatSchemaListHuman(result)}\n`);
|
|
942
|
+
}
|
|
943
|
+
else if (result.action === "show") {
|
|
944
|
+
writeStdout(`${formatSchemaShowHuman(result)}\n`);
|
|
945
|
+
}
|
|
946
|
+
else if (result.action === "remove-type") {
|
|
947
|
+
writeStdout(`${formatSchemaRemoveTypeHuman(result)}\n`);
|
|
948
|
+
}
|
|
949
|
+
else if (result.action === "add-status") {
|
|
950
|
+
writeStdout(`${formatSchemaAddStatusHuman(result)}\n`);
|
|
951
|
+
}
|
|
952
|
+
else if (result.action === "remove-status") {
|
|
953
|
+
writeStdout(`${formatSchemaRemoveStatusHuman(result)}\n`);
|
|
954
|
+
}
|
|
955
|
+
else {
|
|
956
|
+
writeStdout(`${formatSchemaAddTypeHuman(result)}\n`);
|
|
957
|
+
}
|
|
786
958
|
// Surface extension on-write hook diagnostics so policy/enforcement
|
|
787
959
|
// warnings are visible without forcing --json.
|
|
788
|
-
if (result.warnings.length > 0) {
|
|
789
|
-
printError(`schema
|
|
960
|
+
if (result.action !== "list" && result.action !== "show" && result.warnings.length > 0) {
|
|
961
|
+
printError(`schema ${result.action} warnings: ${formatHookWarnings(result.warnings)}`);
|
|
790
962
|
}
|
|
791
963
|
}
|
|
792
964
|
if (globalOptions.profile) {
|
|
@@ -1061,4 +1233,4 @@ export function registerMutationCommands(program) {
|
|
|
1061
1233
|
});
|
|
1062
1234
|
}
|
|
1063
1235
|
//# sourceMappingURL=register-mutation.js.map
|
|
1064
|
-
//# debugId=
|
|
1236
|
+
//# debugId=512c19d2-da36-590c-a1ca-cd11e57c7529
|