@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
|
@@ -0,0 +1,1171 @@
|
|
|
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]="ded50a19-e249-51bd-b1da-8244e75cdfbe")}catch(e){}}();
|
|
3
|
+
import {
|
|
4
|
+
runCreate
|
|
5
|
+
} from "./chunk-MITFDD35.js";
|
|
6
|
+
import "./chunk-E5FJNAZA.js";
|
|
7
|
+
import "./chunk-PO3GSVFV.js";
|
|
8
|
+
import "./chunk-77GFDHGF.js";
|
|
9
|
+
import "./chunk-6P6GGMOG.js";
|
|
10
|
+
import "./chunk-NUZ5HKR4.js";
|
|
11
|
+
import {
|
|
12
|
+
splitCommaList
|
|
13
|
+
} from "./chunk-LXYVKYMQ.js";
|
|
14
|
+
import {
|
|
15
|
+
locateItem,
|
|
16
|
+
mutateItem,
|
|
17
|
+
readLocatedItem
|
|
18
|
+
} from "./chunk-GGYWB3Y2.js";
|
|
19
|
+
import "./chunk-HZGUAH22.js";
|
|
20
|
+
import "./chunk-LB3RUL2N.js";
|
|
21
|
+
import {
|
|
22
|
+
resolveItemTypeRegistry,
|
|
23
|
+
resolveTypeName
|
|
24
|
+
} from "./chunk-2VBQ6ZXS.js";
|
|
25
|
+
import {
|
|
26
|
+
nowIso
|
|
27
|
+
} from "./chunk-TCD3R2PF.js";
|
|
28
|
+
import {
|
|
29
|
+
EXIT_CODE,
|
|
30
|
+
PLAN_HARNESS_VALUES,
|
|
31
|
+
PLAN_MODE_VALUES,
|
|
32
|
+
PLAN_STEP_LINK_KIND_VALUES,
|
|
33
|
+
PLAN_STEP_STATUS_VALUES,
|
|
34
|
+
PmCliError,
|
|
35
|
+
getActiveExtensionRegistrations,
|
|
36
|
+
getSettingsPath,
|
|
37
|
+
pathExists,
|
|
38
|
+
readSettings,
|
|
39
|
+
resolvePmRoot
|
|
40
|
+
} from "./chunk-5SFCOO6B.js";
|
|
41
|
+
|
|
42
|
+
// dist/cli/commands/plan.js
|
|
43
|
+
var PLAN_SUBCOMMANDS = [
|
|
44
|
+
"create",
|
|
45
|
+
"show",
|
|
46
|
+
"add-step",
|
|
47
|
+
"update-step",
|
|
48
|
+
"complete-step",
|
|
49
|
+
"block-step",
|
|
50
|
+
"reorder-step",
|
|
51
|
+
"remove-step",
|
|
52
|
+
"link",
|
|
53
|
+
"unlink",
|
|
54
|
+
"decision",
|
|
55
|
+
"discovery",
|
|
56
|
+
"validation",
|
|
57
|
+
"resume",
|
|
58
|
+
"approve",
|
|
59
|
+
"materialize"
|
|
60
|
+
];
|
|
61
|
+
var PLAN_SHOW_DEPTH_VALUES = ["brief", "standard", "deep"];
|
|
62
|
+
var STEP_ID_PREFIX = "plan-step-";
|
|
63
|
+
var DEFAULT_PLAN_MODE = "draft";
|
|
64
|
+
function resolveAuthor(candidate, fallback) {
|
|
65
|
+
const resolved = candidate ?? process.env.PM_AUTHOR ?? fallback;
|
|
66
|
+
const trimmed = resolved.trim();
|
|
67
|
+
return trimmed.length > 0 ? trimmed : "unknown";
|
|
68
|
+
}
|
|
69
|
+
function toArray(value) {
|
|
70
|
+
if (Array.isArray(value))
|
|
71
|
+
return value.flatMap((entry) => splitCommaList(entry, { unique: false }));
|
|
72
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
73
|
+
return splitCommaList(value, { unique: false });
|
|
74
|
+
}
|
|
75
|
+
return [];
|
|
76
|
+
}
|
|
77
|
+
function toSpecArray(value) {
|
|
78
|
+
if (Array.isArray(value))
|
|
79
|
+
return value.map((entry) => entry.trim()).filter(Boolean);
|
|
80
|
+
if (typeof value === "string" && value.trim().length > 0)
|
|
81
|
+
return [value.trim()];
|
|
82
|
+
return [];
|
|
83
|
+
}
|
|
84
|
+
function asPlanMode(value, fallback = DEFAULT_PLAN_MODE) {
|
|
85
|
+
if (value === void 0)
|
|
86
|
+
return fallback;
|
|
87
|
+
const normalized = value.trim().toLowerCase();
|
|
88
|
+
const found = PLAN_MODE_VALUES.find((entry) => entry === normalized);
|
|
89
|
+
if (!found) {
|
|
90
|
+
throw new PmCliError(`Invalid plan mode "${value}". Allowed: ${PLAN_MODE_VALUES.join(", ")}`, EXIT_CODE.USAGE);
|
|
91
|
+
}
|
|
92
|
+
return found;
|
|
93
|
+
}
|
|
94
|
+
function asStepStatus(value, fallback = "pending") {
|
|
95
|
+
if (value === void 0)
|
|
96
|
+
return fallback;
|
|
97
|
+
const normalized = value.trim().toLowerCase();
|
|
98
|
+
const found = PLAN_STEP_STATUS_VALUES.find((entry) => entry === normalized);
|
|
99
|
+
if (!found) {
|
|
100
|
+
throw new PmCliError(`Invalid step status "${value}". Allowed: ${PLAN_STEP_STATUS_VALUES.join(", ")}`, EXIT_CODE.USAGE);
|
|
101
|
+
}
|
|
102
|
+
return found;
|
|
103
|
+
}
|
|
104
|
+
function asLinkKind(value, fallback = "related") {
|
|
105
|
+
if (value === void 0)
|
|
106
|
+
return fallback;
|
|
107
|
+
const normalized = value.trim().toLowerCase();
|
|
108
|
+
const found = PLAN_STEP_LINK_KIND_VALUES.find((entry) => entry === normalized);
|
|
109
|
+
if (!found) {
|
|
110
|
+
throw new PmCliError(`Invalid step link kind "${value}". Allowed: ${PLAN_STEP_LINK_KIND_VALUES.join(", ")}`, EXIT_CODE.USAGE);
|
|
111
|
+
}
|
|
112
|
+
return found;
|
|
113
|
+
}
|
|
114
|
+
function asHarness(value) {
|
|
115
|
+
if (value === void 0)
|
|
116
|
+
return void 0;
|
|
117
|
+
const normalized = value.trim().toLowerCase();
|
|
118
|
+
if (normalized.length === 0)
|
|
119
|
+
return void 0;
|
|
120
|
+
const found = PLAN_HARNESS_VALUES.find((entry) => entry === normalized);
|
|
121
|
+
if (!found) {
|
|
122
|
+
throw new PmCliError(`Invalid plan harness "${value}". Allowed: ${PLAN_HARNESS_VALUES.join(", ")}`, EXIT_CODE.USAGE);
|
|
123
|
+
}
|
|
124
|
+
return found;
|
|
125
|
+
}
|
|
126
|
+
function asDepth(value) {
|
|
127
|
+
if (value === void 0)
|
|
128
|
+
return "brief";
|
|
129
|
+
const normalized = value.trim().toLowerCase();
|
|
130
|
+
const found = PLAN_SHOW_DEPTH_VALUES.find((entry) => entry === normalized);
|
|
131
|
+
if (!found) {
|
|
132
|
+
throw new PmCliError(`Invalid --depth "${value}". Allowed: ${PLAN_SHOW_DEPTH_VALUES.join(", ")}`, EXIT_CODE.USAGE);
|
|
133
|
+
}
|
|
134
|
+
return found;
|
|
135
|
+
}
|
|
136
|
+
function parsePlanFields(raw) {
|
|
137
|
+
if (raw === void 0) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
const fields = raw.split(",").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
141
|
+
if (fields.length === 0) {
|
|
142
|
+
throw new PmCliError("Plan --fields requires a comma-separated list of plan field names", EXIT_CODE.USAGE);
|
|
143
|
+
}
|
|
144
|
+
return fields;
|
|
145
|
+
}
|
|
146
|
+
var PLAN_FIELD_KEYS = /* @__PURE__ */ new Set([
|
|
147
|
+
"id",
|
|
148
|
+
"title",
|
|
149
|
+
"status",
|
|
150
|
+
"mode",
|
|
151
|
+
"scope",
|
|
152
|
+
"harness",
|
|
153
|
+
"parent",
|
|
154
|
+
"resume_context",
|
|
155
|
+
"steps_summary",
|
|
156
|
+
"current_step",
|
|
157
|
+
"blocked_steps",
|
|
158
|
+
"steps",
|
|
159
|
+
"decisions",
|
|
160
|
+
"discoveries",
|
|
161
|
+
"validation",
|
|
162
|
+
"linked_items"
|
|
163
|
+
]);
|
|
164
|
+
function projectPlanForFields(plan, fields) {
|
|
165
|
+
const source = plan;
|
|
166
|
+
const projected = {};
|
|
167
|
+
const unknownFields = [];
|
|
168
|
+
for (const field of fields) {
|
|
169
|
+
const normalized = field.startsWith("plan.") ? field.slice("plan.".length) : field;
|
|
170
|
+
if (normalized.length === 0) {
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
if (!PLAN_FIELD_KEYS.has(normalized)) {
|
|
174
|
+
unknownFields.push(field);
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
if (Object.prototype.hasOwnProperty.call(source, normalized)) {
|
|
178
|
+
projected[normalized] = source[normalized];
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (unknownFields.length > 0) {
|
|
182
|
+
throw new PmCliError(`Unknown Plan --fields value(s): ${unknownFields.join(", ")}`, EXIT_CODE.USAGE, {
|
|
183
|
+
nextSteps: [
|
|
184
|
+
`Use --fields ${[...PLAN_FIELD_KEYS].join(",")}`,
|
|
185
|
+
"Run pm plan show <id> --depth brief for compact default fields."
|
|
186
|
+
],
|
|
187
|
+
recovery: {
|
|
188
|
+
provided_fields: unknownFields,
|
|
189
|
+
suggested_retry: `pm plan show <id> --fields ${[...PLAN_FIELD_KEYS].join(",")}`
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
return projected;
|
|
194
|
+
}
|
|
195
|
+
function parsePairList(raw, label) {
|
|
196
|
+
const out = {};
|
|
197
|
+
for (const entry of raw.split(",")) {
|
|
198
|
+
const trimmed = entry.trim();
|
|
199
|
+
if (trimmed.length === 0)
|
|
200
|
+
continue;
|
|
201
|
+
const equalsIndex = trimmed.indexOf("=");
|
|
202
|
+
if (equalsIndex <= 0) {
|
|
203
|
+
throw new PmCliError(`Invalid ${label} entry "${trimmed}"; expected key=value`, EXIT_CODE.USAGE);
|
|
204
|
+
}
|
|
205
|
+
out[trimmed.slice(0, equalsIndex).trim().toLowerCase()] = trimmed.slice(equalsIndex + 1).trim();
|
|
206
|
+
}
|
|
207
|
+
return out;
|
|
208
|
+
}
|
|
209
|
+
function parseStepFile(spec) {
|
|
210
|
+
const fields = parsePairList(spec, "--file");
|
|
211
|
+
if (!fields.path) {
|
|
212
|
+
throw new PmCliError("--file requires path=<value>", EXIT_CODE.USAGE);
|
|
213
|
+
}
|
|
214
|
+
const file = { path: fields.path };
|
|
215
|
+
if (fields.scope === "global" || fields.scope === "project")
|
|
216
|
+
file.scope = fields.scope;
|
|
217
|
+
if (fields.note)
|
|
218
|
+
file.note = fields.note;
|
|
219
|
+
return file;
|
|
220
|
+
}
|
|
221
|
+
function parseStepTest(spec) {
|
|
222
|
+
const fields = parsePairList(spec, "--test");
|
|
223
|
+
if (!fields.command && !fields.path) {
|
|
224
|
+
throw new PmCliError("--test requires at least command=<value> or path=<value>", EXIT_CODE.USAGE);
|
|
225
|
+
}
|
|
226
|
+
const test = {};
|
|
227
|
+
if (fields.command)
|
|
228
|
+
test.command = fields.command;
|
|
229
|
+
if (fields.path)
|
|
230
|
+
test.path = fields.path;
|
|
231
|
+
if (fields.note)
|
|
232
|
+
test.note = fields.note;
|
|
233
|
+
return test;
|
|
234
|
+
}
|
|
235
|
+
function parseStepDoc(spec) {
|
|
236
|
+
const fields = parsePairList(spec, "--doc");
|
|
237
|
+
if (!fields.path) {
|
|
238
|
+
throw new PmCliError("--doc requires path=<value>", EXIT_CODE.USAGE);
|
|
239
|
+
}
|
|
240
|
+
const doc = { path: fields.path };
|
|
241
|
+
if (fields.scope === "global" || fields.scope === "project")
|
|
242
|
+
doc.scope = fields.scope;
|
|
243
|
+
if (fields.note)
|
|
244
|
+
doc.note = fields.note;
|
|
245
|
+
return doc;
|
|
246
|
+
}
|
|
247
|
+
function summarizeSteps(steps) {
|
|
248
|
+
const summary = {
|
|
249
|
+
total: steps.length,
|
|
250
|
+
pending: 0,
|
|
251
|
+
in_progress: 0,
|
|
252
|
+
blocked: 0,
|
|
253
|
+
completed: 0,
|
|
254
|
+
skipped: 0,
|
|
255
|
+
superseded: 0
|
|
256
|
+
};
|
|
257
|
+
for (const step of steps) {
|
|
258
|
+
summary[step.status] += 1;
|
|
259
|
+
}
|
|
260
|
+
return summary;
|
|
261
|
+
}
|
|
262
|
+
function newStepId(existing) {
|
|
263
|
+
const used = new Set(existing.map((step) => step.id));
|
|
264
|
+
for (let cursor = existing.length + 1; cursor < existing.length + 1024; cursor += 1) {
|
|
265
|
+
const candidate = `${STEP_ID_PREFIX}${String(cursor).padStart(3, "0")}`;
|
|
266
|
+
if (!used.has(candidate))
|
|
267
|
+
return candidate;
|
|
268
|
+
}
|
|
269
|
+
throw new PmCliError("Could not allocate step id (limit reached)", EXIT_CODE.GENERIC_FAILURE);
|
|
270
|
+
}
|
|
271
|
+
function resolveStepRef(steps, ref) {
|
|
272
|
+
const trimmed = ref.trim();
|
|
273
|
+
if (trimmed.length === 0) {
|
|
274
|
+
throw new PmCliError("Step reference cannot be empty", EXIT_CODE.USAGE);
|
|
275
|
+
}
|
|
276
|
+
const direct = steps.find((step) => step.id === trimmed);
|
|
277
|
+
if (direct)
|
|
278
|
+
return direct;
|
|
279
|
+
if (/^\d+$/.test(trimmed)) {
|
|
280
|
+
const order = Number.parseInt(trimmed, 10);
|
|
281
|
+
const byOrder = steps.find((step) => step.order === order);
|
|
282
|
+
if (byOrder)
|
|
283
|
+
return byOrder;
|
|
284
|
+
}
|
|
285
|
+
throw new PmCliError(`Step "${ref}" not found in plan`, EXIT_CODE.NOT_FOUND);
|
|
286
|
+
}
|
|
287
|
+
function classifyMaterializeSkip(step) {
|
|
288
|
+
if (step.status === "completed") {
|
|
289
|
+
return { reason: "already_completed" };
|
|
290
|
+
}
|
|
291
|
+
const existingImplements = (step.linked_items ?? []).find((link) => link.kind === "implements");
|
|
292
|
+
if (existingImplements) {
|
|
293
|
+
return { reason: "already_materialized", existing_id: existingImplements.id };
|
|
294
|
+
}
|
|
295
|
+
return void 0;
|
|
296
|
+
}
|
|
297
|
+
function resolveMaterializeTargets(steps, refs) {
|
|
298
|
+
const allRefs = refs.filter((ref) => ref.trim().toLowerCase() === "all");
|
|
299
|
+
const targets = [];
|
|
300
|
+
const skipped = [];
|
|
301
|
+
if (allRefs.length > 0) {
|
|
302
|
+
if (refs.length > allRefs.length) {
|
|
303
|
+
throw new PmCliError("pm plan materialize --steps all cannot be combined with other step refs", EXIT_CODE.USAGE);
|
|
304
|
+
}
|
|
305
|
+
for (const step of steps.slice().sort((left, right) => left.order - right.order)) {
|
|
306
|
+
const skip = classifyMaterializeSkip(step);
|
|
307
|
+
if (skip) {
|
|
308
|
+
skipped.push({ from_step: step.id, ...skip });
|
|
309
|
+
continue;
|
|
310
|
+
}
|
|
311
|
+
targets.push(step);
|
|
312
|
+
}
|
|
313
|
+
return { targets, skipped };
|
|
314
|
+
}
|
|
315
|
+
const seen = /* @__PURE__ */ new Set();
|
|
316
|
+
for (const ref of refs) {
|
|
317
|
+
const step = resolveStepRef(steps, ref);
|
|
318
|
+
if (seen.has(step.id))
|
|
319
|
+
continue;
|
|
320
|
+
seen.add(step.id);
|
|
321
|
+
const skip = classifyMaterializeSkip(step);
|
|
322
|
+
if (skip) {
|
|
323
|
+
skipped.push({ from_step: step.id, ...skip });
|
|
324
|
+
continue;
|
|
325
|
+
}
|
|
326
|
+
targets.push(step);
|
|
327
|
+
}
|
|
328
|
+
return { targets, skipped };
|
|
329
|
+
}
|
|
330
|
+
function resolvePlanLogText(kind, options) {
|
|
331
|
+
const canonical = kind === "decision" ? options.decisionText : kind === "discovery" ? options.discoveryText : options.validationText;
|
|
332
|
+
const shorthand = kind === "decision" ? options.decision : kind === "discovery" ? options.discovery : options.validation;
|
|
333
|
+
return canonical?.trim() || shorthand?.trim() || void 0;
|
|
334
|
+
}
|
|
335
|
+
function findCurrentStep(steps) {
|
|
336
|
+
return steps.find((step) => step.status === "in_progress") ?? steps.find((step) => step.status === "pending");
|
|
337
|
+
}
|
|
338
|
+
function blockedSteps(steps) {
|
|
339
|
+
return steps.filter((step) => step.status === "blocked").map((step) => ({ id: step.id, order: step.order, title: step.title, blocked_reason: step.blocked_reason }));
|
|
340
|
+
}
|
|
341
|
+
function projectPlan(item, depth = "brief") {
|
|
342
|
+
const steps = (item.plan_steps ?? []).slice().sort((left, right) => left.order - right.order);
|
|
343
|
+
const summary = summarizeSteps(steps);
|
|
344
|
+
const current = findCurrentStep(steps);
|
|
345
|
+
const projection = {
|
|
346
|
+
id: item.id,
|
|
347
|
+
title: item.title,
|
|
348
|
+
status: item.status,
|
|
349
|
+
mode: item.plan_mode ?? DEFAULT_PLAN_MODE,
|
|
350
|
+
scope: item.plan_scope,
|
|
351
|
+
harness: item.plan_harness,
|
|
352
|
+
parent: item.parent,
|
|
353
|
+
resume_context: item.plan_resume_context,
|
|
354
|
+
steps_summary: summary,
|
|
355
|
+
current_step: current ? { id: current.id, order: current.order, title: current.title, status: current.status } : void 0,
|
|
356
|
+
blocked_steps: blockedSteps(steps),
|
|
357
|
+
linked_items: (item.dependencies ?? []).map((dep) => ({ id: dep.id, kind: dep.kind }))
|
|
358
|
+
};
|
|
359
|
+
if (depth === "standard" || depth === "deep") {
|
|
360
|
+
projection.steps = steps;
|
|
361
|
+
}
|
|
362
|
+
if (depth === "deep") {
|
|
363
|
+
projection.decisions = item.plan_decisions ?? [];
|
|
364
|
+
projection.discoveries = item.plan_discoveries ?? [];
|
|
365
|
+
projection.validation = item.plan_validation ?? [];
|
|
366
|
+
}
|
|
367
|
+
return projection;
|
|
368
|
+
}
|
|
369
|
+
function nextActionsFor(planId, plan) {
|
|
370
|
+
const tips = [];
|
|
371
|
+
if (plan.steps_summary.total === 0) {
|
|
372
|
+
tips.push(`pm plan add-step ${planId} --step-title "First step"`);
|
|
373
|
+
}
|
|
374
|
+
if (plan.current_step) {
|
|
375
|
+
tips.push(`pm plan update-step ${planId} ${plan.current_step.id} --step-status in_progress`, `pm plan complete-step ${planId} ${plan.current_step.id} --step-evidence "..."`);
|
|
376
|
+
}
|
|
377
|
+
if (plan.steps_summary.blocked > 0) {
|
|
378
|
+
tips.push(`pm plan show ${planId} --depth standard`);
|
|
379
|
+
}
|
|
380
|
+
if (plan.mode === "draft" || plan.mode === "research") {
|
|
381
|
+
tips.push(`pm plan approve ${planId} --message "ready to execute"`);
|
|
382
|
+
}
|
|
383
|
+
if (plan.steps_summary.completed === plan.steps_summary.total && plan.steps_summary.total > 0) {
|
|
384
|
+
tips.push(`pm close ${planId} "plan complete"`);
|
|
385
|
+
}
|
|
386
|
+
return tips;
|
|
387
|
+
}
|
|
388
|
+
function ensurePlanItem(item) {
|
|
389
|
+
const normalizedType = (item.type ?? "").trim().toLowerCase();
|
|
390
|
+
if (normalizedType !== "plan") {
|
|
391
|
+
throw new PmCliError(`Item ${item.id} is type ${item.type}; pm plan commands require type=Plan. Use pm plan create or pm create --type Plan first.`, EXIT_CODE.USAGE, {
|
|
392
|
+
code: "wrong_item_type",
|
|
393
|
+
required: "Use pm plan commands only with items whose type is Plan.",
|
|
394
|
+
why: "Plan commands read and mutate Plan-specific step, decision, discovery, and validation fields.",
|
|
395
|
+
examples: [
|
|
396
|
+
`pm get ${item.id} --depth brief`,
|
|
397
|
+
'pm plan create --title "Execution plan" --scope "<goal>"'
|
|
398
|
+
]
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
async function loadContext(global) {
|
|
403
|
+
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
404
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
405
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
406
|
+
}
|
|
407
|
+
const settings = await readSettings(pmRoot);
|
|
408
|
+
return { pmRoot, settings };
|
|
409
|
+
}
|
|
410
|
+
async function readPlanItem(ctx, id) {
|
|
411
|
+
const typeRegistry = resolveItemTypeRegistry(ctx.settings, getActiveExtensionRegistrations());
|
|
412
|
+
const located = await locateItem(ctx.pmRoot, id, ctx.settings.id_prefix, ctx.settings.item_format, typeRegistry.type_to_folder);
|
|
413
|
+
if (!located) {
|
|
414
|
+
throw new PmCliError(`Plan ${id} not found`, EXIT_CODE.NOT_FOUND);
|
|
415
|
+
}
|
|
416
|
+
const loaded = await readLocatedItem(located, { schema: ctx.settings.schema });
|
|
417
|
+
ensurePlanItem(loaded.document.metadata);
|
|
418
|
+
return { document: loaded.document, itemId: located.id };
|
|
419
|
+
}
|
|
420
|
+
async function planCreate(options, global, ctx) {
|
|
421
|
+
const title = options.title?.trim();
|
|
422
|
+
if (!title) {
|
|
423
|
+
throw new PmCliError("pm plan create requires --title", EXIT_CODE.USAGE, {
|
|
424
|
+
code: "missing_required_option",
|
|
425
|
+
examples: ['pm plan create --title "Refactor lock retry" --scope pm-a1b2']
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
const mode = asPlanMode(options.mode, DEFAULT_PLAN_MODE);
|
|
429
|
+
const harness = asHarness(options.harness);
|
|
430
|
+
const fromSearch = options.fromSearch?.trim();
|
|
431
|
+
const related = toArray(options.related);
|
|
432
|
+
const blocks = toArray(options.blocks);
|
|
433
|
+
const blockedBy = toArray(options.blockedBy);
|
|
434
|
+
const deps = [];
|
|
435
|
+
if (options.parent) {
|
|
436
|
+
deps.push(`id=${options.parent.trim()},kind=parent`);
|
|
437
|
+
}
|
|
438
|
+
for (const ref of related)
|
|
439
|
+
deps.push(`id=${ref},kind=related`);
|
|
440
|
+
for (const ref of blocks)
|
|
441
|
+
deps.push(`id=${ref},kind=blocks`);
|
|
442
|
+
for (const ref of blockedBy)
|
|
443
|
+
deps.push(`id=${ref},kind=blocked_by`);
|
|
444
|
+
const description = options.description?.trim() ?? options.scope?.trim() ?? title;
|
|
445
|
+
const createOptions = {
|
|
446
|
+
title,
|
|
447
|
+
description,
|
|
448
|
+
type: "Plan",
|
|
449
|
+
body: options.body,
|
|
450
|
+
tags: options.tags,
|
|
451
|
+
priority: options.priority,
|
|
452
|
+
parent: options.parent,
|
|
453
|
+
dep: deps.length > 0 ? deps : void 0,
|
|
454
|
+
author: options.author,
|
|
455
|
+
message: options.message ?? (fromSearch ? `plan create (search: ${fromSearch})` : `plan create`)
|
|
456
|
+
};
|
|
457
|
+
const createResult = await runCreate(createOptions, global);
|
|
458
|
+
const seedResult = await mutateItem({
|
|
459
|
+
pmRoot: ctx.pmRoot,
|
|
460
|
+
settings: ctx.settings,
|
|
461
|
+
id: createResult.item.id,
|
|
462
|
+
op: "plan_create_metadata",
|
|
463
|
+
author: resolveAuthor(options.author, ctx.settings.author_default),
|
|
464
|
+
message: "seed plan metadata",
|
|
465
|
+
mutate(doc) {
|
|
466
|
+
const changed = [];
|
|
467
|
+
doc.metadata.plan_mode = mode;
|
|
468
|
+
changed.push("plan_mode");
|
|
469
|
+
if (harness) {
|
|
470
|
+
doc.metadata.plan_harness = harness;
|
|
471
|
+
changed.push("plan_harness");
|
|
472
|
+
}
|
|
473
|
+
if (options.scope?.trim()) {
|
|
474
|
+
doc.metadata.plan_scope = options.scope.trim();
|
|
475
|
+
changed.push("plan_scope");
|
|
476
|
+
}
|
|
477
|
+
if (options.resumeContext?.trim()) {
|
|
478
|
+
doc.metadata.plan_resume_context = options.resumeContext.trim();
|
|
479
|
+
changed.push("plan_resume_context");
|
|
480
|
+
}
|
|
481
|
+
doc.metadata.plan_steps = doc.metadata.plan_steps ?? [];
|
|
482
|
+
return { changedFields: changed };
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
let finalMetadata = seedResult.item;
|
|
486
|
+
let initialStep;
|
|
487
|
+
const initialValidationText = options.validationText?.trim();
|
|
488
|
+
const initialValidationCommand = options.validationCommand?.trim();
|
|
489
|
+
const initialValidationExpected = options.validationExpected?.trim();
|
|
490
|
+
const initialValidation = initialValidationText || initialValidationCommand || initialValidationExpected ? {
|
|
491
|
+
text: initialValidationText || initialValidationCommand || "Validation check",
|
|
492
|
+
command: initialValidationCommand || void 0,
|
|
493
|
+
expected: initialValidationExpected || void 0
|
|
494
|
+
} : void 0;
|
|
495
|
+
if (options.stepTitle?.trim()) {
|
|
496
|
+
const status = asStepStatus(options.stepStatus, "pending");
|
|
497
|
+
const linkedItems = buildLinkInputs(options, "depends_on");
|
|
498
|
+
const files = toSpecArray(options.file).map(parseStepFile);
|
|
499
|
+
const tests = toSpecArray(options.test).map(parseStepTest);
|
|
500
|
+
const docs = toSpecArray(options.doc).map(parseStepDoc);
|
|
501
|
+
const now = nowIso();
|
|
502
|
+
initialStep = {
|
|
503
|
+
id: "plan-step-001",
|
|
504
|
+
order: 1,
|
|
505
|
+
title: options.stepTitle.trim(),
|
|
506
|
+
body: options.stepBody?.trim() || void 0,
|
|
507
|
+
status,
|
|
508
|
+
owner: options.stepOwner?.trim() || void 0,
|
|
509
|
+
evidence: options.stepEvidence?.trim() || void 0,
|
|
510
|
+
blocked_reason: status === "blocked" ? options.stepBlockedReason?.trim() || "" : void 0,
|
|
511
|
+
linked_items: linkedItems.length > 0 ? linkedItems : void 0,
|
|
512
|
+
files: files.length > 0 ? files : void 0,
|
|
513
|
+
tests: tests.length > 0 ? tests : void 0,
|
|
514
|
+
docs: docs.length > 0 ? docs : void 0,
|
|
515
|
+
created_at: now,
|
|
516
|
+
updated_at: now,
|
|
517
|
+
completed_at: status === "completed" ? now : void 0
|
|
518
|
+
};
|
|
519
|
+
const stepped = await mutateItem({
|
|
520
|
+
pmRoot: ctx.pmRoot,
|
|
521
|
+
settings: ctx.settings,
|
|
522
|
+
id: createResult.item.id,
|
|
523
|
+
op: "plan_create_initial_step",
|
|
524
|
+
author: resolveAuthor(options.author, ctx.settings.author_default),
|
|
525
|
+
message: `plan create initial step "${initialStep.title}"`,
|
|
526
|
+
mutate(doc) {
|
|
527
|
+
ensurePlanItem(doc.metadata);
|
|
528
|
+
doc.metadata.plan_steps = [initialStep];
|
|
529
|
+
if (initialValidation) {
|
|
530
|
+
doc.metadata.plan_validation = [...doc.metadata.plan_validation ?? [], initialValidation];
|
|
531
|
+
}
|
|
532
|
+
return { changedFields: initialValidation ? ["plan_steps", "plan_validation"] : ["plan_steps"] };
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
finalMetadata = stepped.item;
|
|
536
|
+
} else if (initialValidation) {
|
|
537
|
+
const validated = await mutateItem({
|
|
538
|
+
pmRoot: ctx.pmRoot,
|
|
539
|
+
settings: ctx.settings,
|
|
540
|
+
id: createResult.item.id,
|
|
541
|
+
op: "plan_create_initial_validation",
|
|
542
|
+
author: resolveAuthor(options.author, ctx.settings.author_default),
|
|
543
|
+
message: "plan create initial validation",
|
|
544
|
+
mutate(doc) {
|
|
545
|
+
ensurePlanItem(doc.metadata);
|
|
546
|
+
doc.metadata.plan_validation = [...doc.metadata.plan_validation ?? [], initialValidation];
|
|
547
|
+
return { changedFields: ["plan_validation"] };
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
finalMetadata = validated.item;
|
|
551
|
+
} else if (options.stepBody?.trim() || options.stepOwner?.trim() || options.stepStatus?.trim() || options.stepEvidence?.trim() || options.stepBlockedReason?.trim() || options.stepReplacement?.trim() || toArray(options.dependsOn).length > 0 || toArray(options.link).length > 0 || toSpecArray(options.file).length > 0 || toSpecArray(options.test).length > 0 || toSpecArray(options.doc).length > 0) {
|
|
552
|
+
throw new PmCliError("pm plan create step options require --step-title", EXIT_CODE.USAGE, {
|
|
553
|
+
code: "missing_required_option",
|
|
554
|
+
examples: ['pm plan create --title "Execution plan" --step-title "Read the code"']
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
if (options.claim) {
|
|
558
|
+
const claimed = await mutateItem({
|
|
559
|
+
pmRoot: ctx.pmRoot,
|
|
560
|
+
settings: ctx.settings,
|
|
561
|
+
id: createResult.item.id,
|
|
562
|
+
op: "claim",
|
|
563
|
+
author: resolveAuthor(options.author, ctx.settings.author_default),
|
|
564
|
+
message: "plan claim by author",
|
|
565
|
+
mutate(doc) {
|
|
566
|
+
doc.metadata.assignee = resolveAuthor(options.author, ctx.settings.author_default);
|
|
567
|
+
return { changedFields: ["assignee"] };
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
finalMetadata = claimed.item;
|
|
571
|
+
}
|
|
572
|
+
const plan = projectPlan(finalMetadata, "brief");
|
|
573
|
+
return {
|
|
574
|
+
action: "create",
|
|
575
|
+
plan,
|
|
576
|
+
step: initialStep,
|
|
577
|
+
next_actions: nextActionsFor(createResult.item.id, plan),
|
|
578
|
+
warnings: [...createResult.warnings],
|
|
579
|
+
generated_at: nowIso()
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
async function planShow(id, options, ctx) {
|
|
583
|
+
const depth = asDepth(options.depth);
|
|
584
|
+
const fields = parsePlanFields(options.fields);
|
|
585
|
+
const { document, itemId } = await readPlanItem(ctx, id);
|
|
586
|
+
const fullPlan = projectPlan(document.metadata, fields === null ? depth : "deep");
|
|
587
|
+
const plan = fields === null ? fullPlan : projectPlanForFields(fullPlan, fields);
|
|
588
|
+
return {
|
|
589
|
+
action: "show",
|
|
590
|
+
plan,
|
|
591
|
+
next_actions: nextActionsFor(itemId, fullPlan),
|
|
592
|
+
warnings: [],
|
|
593
|
+
generated_at: nowIso()
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
async function mutatePlanSteps(args) {
|
|
597
|
+
const author = resolveAuthor(args.options.author, args.ctx.settings.author_default);
|
|
598
|
+
let resultStep;
|
|
599
|
+
const result = await mutateItem({
|
|
600
|
+
pmRoot: args.ctx.pmRoot,
|
|
601
|
+
settings: args.ctx.settings,
|
|
602
|
+
id: args.id,
|
|
603
|
+
op: args.op,
|
|
604
|
+
author,
|
|
605
|
+
message: args.options.message ?? args.message,
|
|
606
|
+
force: args.options.force,
|
|
607
|
+
mutate(doc) {
|
|
608
|
+
ensurePlanItem(doc.metadata);
|
|
609
|
+
const steps = (doc.metadata.plan_steps ?? []).slice();
|
|
610
|
+
const before = JSON.stringify(steps);
|
|
611
|
+
const outcome = args.mutator(steps, doc);
|
|
612
|
+
resultStep = outcome.resultStep;
|
|
613
|
+
const sorted = steps.slice().sort((left, right) => left.order - right.order).map((step, index) => ({ ...step, order: index + 1 }));
|
|
614
|
+
doc.metadata.plan_steps = sorted;
|
|
615
|
+
const after = JSON.stringify(sorted);
|
|
616
|
+
const changedFields = before === after ? [] : ["plan_steps"];
|
|
617
|
+
if (changedFields.length === 0 && outcome.changedSteps.length === 0) {
|
|
618
|
+
return { changedFields: [] };
|
|
619
|
+
}
|
|
620
|
+
return { changedFields: changedFields.length > 0 ? changedFields : ["plan_steps"] };
|
|
621
|
+
}
|
|
622
|
+
});
|
|
623
|
+
return {
|
|
624
|
+
document: { metadata: result.item, body: result.body },
|
|
625
|
+
resultStep,
|
|
626
|
+
itemId: result.item.id
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
async function planAddStep(id, options, ctx) {
|
|
630
|
+
const title = options.stepTitle?.trim();
|
|
631
|
+
if (!title) {
|
|
632
|
+
throw new PmCliError("pm plan add-step requires --step-title", EXIT_CODE.USAGE);
|
|
633
|
+
}
|
|
634
|
+
const status = asStepStatus(options.stepStatus, "pending");
|
|
635
|
+
const allowMultipleActive = options.allowMultipleActive === true;
|
|
636
|
+
const linkedItems = buildLinkInputs(options, "depends_on");
|
|
637
|
+
const files = toSpecArray(options.file).map(parseStepFile);
|
|
638
|
+
const tests = toSpecArray(options.test).map(parseStepTest);
|
|
639
|
+
const docs = toSpecArray(options.doc).map(parseStepDoc);
|
|
640
|
+
const { document, resultStep, itemId } = await mutatePlanSteps({
|
|
641
|
+
id,
|
|
642
|
+
options,
|
|
643
|
+
ctx,
|
|
644
|
+
op: "plan_add_step",
|
|
645
|
+
message: `plan add-step "${title}"`,
|
|
646
|
+
mutator(steps) {
|
|
647
|
+
const order = steps.length + 1;
|
|
648
|
+
if (status === "in_progress" && !allowMultipleActive) {
|
|
649
|
+
for (const step2 of steps) {
|
|
650
|
+
if (step2.status === "in_progress") {
|
|
651
|
+
throw new PmCliError(`Plan already has step ${step2.id} in_progress. Pass --allow-multiple-active or update that step first.`, EXIT_CODE.CONFLICT);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
const now = nowIso();
|
|
656
|
+
const step = {
|
|
657
|
+
id: newStepId(steps),
|
|
658
|
+
order,
|
|
659
|
+
title,
|
|
660
|
+
body: options.stepBody?.trim() || void 0,
|
|
661
|
+
status,
|
|
662
|
+
owner: options.stepOwner?.trim() || void 0,
|
|
663
|
+
evidence: options.stepEvidence?.trim() || void 0,
|
|
664
|
+
blocked_reason: status === "blocked" ? options.stepBlockedReason?.trim() || "" : void 0,
|
|
665
|
+
linked_items: linkedItems.length > 0 ? linkedItems : void 0,
|
|
666
|
+
files: files.length > 0 ? files : void 0,
|
|
667
|
+
tests: tests.length > 0 ? tests : void 0,
|
|
668
|
+
docs: docs.length > 0 ? docs : void 0,
|
|
669
|
+
created_at: now,
|
|
670
|
+
updated_at: now,
|
|
671
|
+
completed_at: status === "completed" ? now : void 0
|
|
672
|
+
};
|
|
673
|
+
steps.push(step);
|
|
674
|
+
return { changedSteps: [step.id], resultStep: step };
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
const plan = projectPlan(document.metadata, "standard");
|
|
678
|
+
return {
|
|
679
|
+
action: "add-step",
|
|
680
|
+
plan,
|
|
681
|
+
step: resultStep,
|
|
682
|
+
next_actions: nextActionsFor(itemId, plan),
|
|
683
|
+
warnings: [],
|
|
684
|
+
generated_at: nowIso()
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
function buildLinkInputs(options, fallbackKind) {
|
|
688
|
+
const dependsOn = toArray(options.dependsOn).map((id) => ({ id, kind: fallbackKind }));
|
|
689
|
+
const related = toArray(options.related).map((id) => ({ id, kind: "related" }));
|
|
690
|
+
const blocks = toArray(options.blocks).map((id) => ({ id, kind: "blocks" }));
|
|
691
|
+
const blockedBy = toArray(options.blockedBy).map((id) => ({ id, kind: "blocked_by" }));
|
|
692
|
+
const explicit = toArray(options.link);
|
|
693
|
+
const explicitKind = asLinkKind(options.linkKind, fallbackKind);
|
|
694
|
+
const note = options.linkNote?.trim();
|
|
695
|
+
const explicitLinks = explicit.map((id) => {
|
|
696
|
+
const link = { id, kind: explicitKind };
|
|
697
|
+
if (note)
|
|
698
|
+
link.note = note;
|
|
699
|
+
return link;
|
|
700
|
+
});
|
|
701
|
+
return [...dependsOn, ...related, ...blocks, ...blockedBy, ...explicitLinks];
|
|
702
|
+
}
|
|
703
|
+
async function planUpdateStep(id, options, ctx, args) {
|
|
704
|
+
const { document, resultStep, itemId } = await mutatePlanSteps({
|
|
705
|
+
id,
|
|
706
|
+
options,
|
|
707
|
+
ctx,
|
|
708
|
+
op: args.op,
|
|
709
|
+
message: options.message ?? `${args.op} ${args.stepRef}`,
|
|
710
|
+
mutator(steps, doc) {
|
|
711
|
+
const step = resolveStepRef(steps, args.stepRef);
|
|
712
|
+
const now = nowIso();
|
|
713
|
+
const desiredStatus = args.finalStatus ?? asStepStatus(options.stepStatus, step.status);
|
|
714
|
+
if (desiredStatus === "in_progress" && step.status !== "in_progress" && !options.allowMultipleActive && !args.allowMultipleActive) {
|
|
715
|
+
for (const other of steps) {
|
|
716
|
+
if (other.id !== step.id && other.status === "in_progress") {
|
|
717
|
+
throw new PmCliError(`Plan already has step ${other.id} in_progress. Pass --allow-multiple-active or update that step first.`, EXIT_CODE.CONFLICT);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
if (desiredStatus === "blocked" && !options.stepBlockedReason?.trim() && !step.blocked_reason) {
|
|
722
|
+
throw new PmCliError("Blocking a step requires --step-blocked-reason or an already-recorded blocked_reason.", EXIT_CODE.USAGE);
|
|
723
|
+
}
|
|
724
|
+
if (options.stepTitle?.trim())
|
|
725
|
+
step.title = options.stepTitle.trim();
|
|
726
|
+
if (options.stepBody !== void 0)
|
|
727
|
+
step.body = options.stepBody.trim() || void 0;
|
|
728
|
+
if (options.stepOwner !== void 0)
|
|
729
|
+
step.owner = options.stepOwner.trim() || void 0;
|
|
730
|
+
if (options.stepEvidence !== void 0)
|
|
731
|
+
step.evidence = options.stepEvidence.trim() || void 0;
|
|
732
|
+
if (options.stepBlockedReason !== void 0)
|
|
733
|
+
step.blocked_reason = options.stepBlockedReason.trim() || void 0;
|
|
734
|
+
if (options.stepReplacement !== void 0)
|
|
735
|
+
step.superseded_by = options.stepReplacement.trim() || void 0;
|
|
736
|
+
step.status = desiredStatus;
|
|
737
|
+
step.updated_at = now;
|
|
738
|
+
if (desiredStatus === "completed" && !step.completed_at) {
|
|
739
|
+
step.completed_at = now;
|
|
740
|
+
} else if (desiredStatus !== "completed") {
|
|
741
|
+
step.completed_at = void 0;
|
|
742
|
+
}
|
|
743
|
+
doc.metadata.updated_at = now;
|
|
744
|
+
return { changedSteps: [step.id], resultStep: step };
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
const plan = projectPlan(document.metadata, "standard");
|
|
748
|
+
return {
|
|
749
|
+
action: args.op === "plan_complete_step" ? "complete-step" : args.op === "plan_block_step" ? "block-step" : "update-step",
|
|
750
|
+
plan,
|
|
751
|
+
step: resultStep,
|
|
752
|
+
next_actions: nextActionsFor(itemId, plan),
|
|
753
|
+
warnings: [],
|
|
754
|
+
generated_at: nowIso()
|
|
755
|
+
};
|
|
756
|
+
}
|
|
757
|
+
async function planReorderStep(id, options, ctx, stepRef, newOrder) {
|
|
758
|
+
const { document, itemId } = await mutatePlanSteps({
|
|
759
|
+
id,
|
|
760
|
+
options,
|
|
761
|
+
ctx,
|
|
762
|
+
op: "plan_reorder_step",
|
|
763
|
+
message: options.message ?? `plan reorder-step ${stepRef} -> ${newOrder}`,
|
|
764
|
+
mutator(steps) {
|
|
765
|
+
const step = resolveStepRef(steps, stepRef);
|
|
766
|
+
const filtered = steps.filter((entry) => entry.id !== step.id);
|
|
767
|
+
const clamped = Math.max(1, Math.min(newOrder, filtered.length + 1));
|
|
768
|
+
filtered.splice(clamped - 1, 0, step);
|
|
769
|
+
filtered.forEach((entry, index) => {
|
|
770
|
+
entry.order = index + 1;
|
|
771
|
+
entry.updated_at = nowIso();
|
|
772
|
+
});
|
|
773
|
+
steps.length = 0;
|
|
774
|
+
steps.push(...filtered);
|
|
775
|
+
return { changedSteps: [step.id], resultStep: step };
|
|
776
|
+
}
|
|
777
|
+
});
|
|
778
|
+
const plan = projectPlan(document.metadata, "standard");
|
|
779
|
+
return {
|
|
780
|
+
action: "reorder-step",
|
|
781
|
+
plan,
|
|
782
|
+
next_actions: nextActionsFor(itemId, plan),
|
|
783
|
+
warnings: [],
|
|
784
|
+
generated_at: nowIso()
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
async function planRemoveStep(id, options, ctx, stepRef) {
|
|
788
|
+
const { document, itemId } = await mutatePlanSteps({
|
|
789
|
+
id,
|
|
790
|
+
options,
|
|
791
|
+
ctx,
|
|
792
|
+
op: "plan_remove_step",
|
|
793
|
+
message: options.message ?? `plan remove-step ${stepRef}`,
|
|
794
|
+
mutator(steps) {
|
|
795
|
+
const step = resolveStepRef(steps, stepRef);
|
|
796
|
+
const remaining = steps.filter((entry) => entry.id !== step.id);
|
|
797
|
+
remaining.forEach((entry, index) => {
|
|
798
|
+
entry.order = index + 1;
|
|
799
|
+
});
|
|
800
|
+
steps.length = 0;
|
|
801
|
+
steps.push(...remaining);
|
|
802
|
+
return { changedSteps: [step.id] };
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
const plan = projectPlan(document.metadata, "standard");
|
|
806
|
+
return {
|
|
807
|
+
action: "remove-step",
|
|
808
|
+
plan,
|
|
809
|
+
next_actions: nextActionsFor(itemId, plan),
|
|
810
|
+
warnings: [],
|
|
811
|
+
generated_at: nowIso()
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
async function planLink(id, options, ctx, stepRef) {
|
|
815
|
+
const newLinks = buildLinkInputs(options, asLinkKind(options.linkKind, "related"));
|
|
816
|
+
if (newLinks.length === 0) {
|
|
817
|
+
throw new PmCliError("pm plan link requires at least one --link/--related/--blocks/--blocked-by/--depends-on id", EXIT_CODE.USAGE);
|
|
818
|
+
}
|
|
819
|
+
const promoteToItemDep = options.promoteToItemDep === true;
|
|
820
|
+
const { document, itemId, resultStep } = await mutatePlanSteps({
|
|
821
|
+
id,
|
|
822
|
+
options,
|
|
823
|
+
ctx,
|
|
824
|
+
op: "plan_link_step",
|
|
825
|
+
message: options.message ?? `plan link ${stepRef}`,
|
|
826
|
+
mutator(steps, doc) {
|
|
827
|
+
const step = resolveStepRef(steps, stepRef);
|
|
828
|
+
const existing = step.linked_items ?? [];
|
|
829
|
+
const dedupKey = (link) => `${link.kind}:${link.id}`;
|
|
830
|
+
const seen = new Set(existing.map(dedupKey));
|
|
831
|
+
for (const link of newLinks) {
|
|
832
|
+
const key = dedupKey(link);
|
|
833
|
+
if (seen.has(key))
|
|
834
|
+
continue;
|
|
835
|
+
existing.push(link);
|
|
836
|
+
seen.add(key);
|
|
837
|
+
}
|
|
838
|
+
step.linked_items = existing;
|
|
839
|
+
step.updated_at = nowIso();
|
|
840
|
+
if (promoteToItemDep) {
|
|
841
|
+
const deps = doc.metadata.dependencies ?? [];
|
|
842
|
+
const depKey = (dep) => `${dep.kind}:${dep.id}`;
|
|
843
|
+
const seenDeps = new Set(deps.map(depKey));
|
|
844
|
+
for (const link of newLinks) {
|
|
845
|
+
const candidate = {
|
|
846
|
+
id: link.id,
|
|
847
|
+
kind: link.kind,
|
|
848
|
+
created_at: nowIso(),
|
|
849
|
+
author: resolveAuthor(options.author, ctx.settings.author_default)
|
|
850
|
+
};
|
|
851
|
+
if (seenDeps.has(depKey(candidate)))
|
|
852
|
+
continue;
|
|
853
|
+
deps.push(candidate);
|
|
854
|
+
seenDeps.add(depKey(candidate));
|
|
855
|
+
}
|
|
856
|
+
doc.metadata.dependencies = deps;
|
|
857
|
+
}
|
|
858
|
+
return { changedSteps: [step.id], resultStep: step };
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
const plan = projectPlan(document.metadata, "standard");
|
|
862
|
+
return {
|
|
863
|
+
action: "link",
|
|
864
|
+
plan,
|
|
865
|
+
step: resultStep,
|
|
866
|
+
next_actions: nextActionsFor(itemId, plan),
|
|
867
|
+
warnings: [],
|
|
868
|
+
generated_at: nowIso()
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
async function planUnlink(id, options, ctx, stepRef) {
|
|
872
|
+
const removeIds = toArray(options.link);
|
|
873
|
+
if (removeIds.length === 0) {
|
|
874
|
+
throw new PmCliError("pm plan unlink requires --link <id> to remove", EXIT_CODE.USAGE);
|
|
875
|
+
}
|
|
876
|
+
const { document, itemId, resultStep } = await mutatePlanSteps({
|
|
877
|
+
id,
|
|
878
|
+
options,
|
|
879
|
+
ctx,
|
|
880
|
+
op: "plan_unlink_step",
|
|
881
|
+
message: options.message ?? `plan unlink ${stepRef}`,
|
|
882
|
+
mutator(steps) {
|
|
883
|
+
const step = resolveStepRef(steps, stepRef);
|
|
884
|
+
const filtered = (step.linked_items ?? []).filter((link) => !removeIds.includes(link.id));
|
|
885
|
+
step.linked_items = filtered.length > 0 ? filtered : void 0;
|
|
886
|
+
step.updated_at = nowIso();
|
|
887
|
+
return { changedSteps: [step.id], resultStep: step };
|
|
888
|
+
}
|
|
889
|
+
});
|
|
890
|
+
const plan = projectPlan(document.metadata, "standard");
|
|
891
|
+
return {
|
|
892
|
+
action: "unlink",
|
|
893
|
+
plan,
|
|
894
|
+
step: resultStep,
|
|
895
|
+
next_actions: nextActionsFor(itemId, plan),
|
|
896
|
+
warnings: [],
|
|
897
|
+
generated_at: nowIso()
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
async function planAppendLog(id, options, ctx, kind) {
|
|
901
|
+
const logText = resolvePlanLogText(kind, options);
|
|
902
|
+
if (!logText) {
|
|
903
|
+
const canonical = `--${kind}-text`;
|
|
904
|
+
const shorthand = `--${kind}`;
|
|
905
|
+
throw new PmCliError(`pm plan ${kind} requires ${canonical}`, EXIT_CODE.USAGE, {
|
|
906
|
+
code: "missing_required_option",
|
|
907
|
+
examples: [
|
|
908
|
+
`pm plan ${kind} <plan-id> ${canonical} "..."`,
|
|
909
|
+
`pm plan ${kind} <plan-id> ${shorthand} "..."`
|
|
910
|
+
],
|
|
911
|
+
recovery: {
|
|
912
|
+
suggested_retry: `pm plan ${kind} <plan-id> ${canonical} <value>`
|
|
913
|
+
}
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
const author = resolveAuthor(options.author, ctx.settings.author_default);
|
|
917
|
+
const { document, itemId } = await mutatePlanSteps({
|
|
918
|
+
id,
|
|
919
|
+
options,
|
|
920
|
+
ctx,
|
|
921
|
+
op: `plan_append_${kind}`,
|
|
922
|
+
message: options.message ?? `plan ${kind} append`,
|
|
923
|
+
mutator(_steps, doc) {
|
|
924
|
+
const now = nowIso();
|
|
925
|
+
if (kind === "decision") {
|
|
926
|
+
const list2 = doc.metadata.plan_decisions ?? [];
|
|
927
|
+
list2.push({
|
|
928
|
+
ts: now,
|
|
929
|
+
author,
|
|
930
|
+
decision: logText,
|
|
931
|
+
rationale: options.decisionRationale?.trim() || void 0,
|
|
932
|
+
evidence: options.decisionEvidence?.trim() || void 0
|
|
933
|
+
});
|
|
934
|
+
doc.metadata.plan_decisions = list2;
|
|
935
|
+
return { changedSteps: [] };
|
|
936
|
+
}
|
|
937
|
+
if (kind === "discovery") {
|
|
938
|
+
const list2 = doc.metadata.plan_discoveries ?? [];
|
|
939
|
+
list2.push({ ts: now, author, text: logText });
|
|
940
|
+
doc.metadata.plan_discoveries = list2;
|
|
941
|
+
return { changedSteps: [] };
|
|
942
|
+
}
|
|
943
|
+
const list = doc.metadata.plan_validation ?? [];
|
|
944
|
+
list.push({
|
|
945
|
+
text: logText,
|
|
946
|
+
command: options.validationCommand?.trim() || void 0,
|
|
947
|
+
expected: options.validationExpected?.trim() || void 0
|
|
948
|
+
});
|
|
949
|
+
doc.metadata.plan_validation = list;
|
|
950
|
+
return { changedSteps: [] };
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
const plan = projectPlan(document.metadata, "deep");
|
|
954
|
+
return {
|
|
955
|
+
action: kind,
|
|
956
|
+
plan,
|
|
957
|
+
next_actions: nextActionsFor(itemId, plan),
|
|
958
|
+
warnings: [],
|
|
959
|
+
generated_at: nowIso()
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
async function planResume(id, options, ctx) {
|
|
963
|
+
const text = options.resumeContext?.trim();
|
|
964
|
+
if (!text) {
|
|
965
|
+
throw new PmCliError("pm plan resume requires --resume-context <text>", EXIT_CODE.USAGE);
|
|
966
|
+
}
|
|
967
|
+
const { document, itemId } = await mutatePlanSteps({
|
|
968
|
+
id,
|
|
969
|
+
options,
|
|
970
|
+
ctx,
|
|
971
|
+
op: "plan_resume",
|
|
972
|
+
message: options.message ?? "plan resume context update",
|
|
973
|
+
mutator(_steps, doc) {
|
|
974
|
+
doc.metadata.plan_resume_context = text;
|
|
975
|
+
return { changedSteps: [] };
|
|
976
|
+
}
|
|
977
|
+
});
|
|
978
|
+
const plan = projectPlan(document.metadata, "brief");
|
|
979
|
+
return {
|
|
980
|
+
action: "resume",
|
|
981
|
+
plan,
|
|
982
|
+
next_actions: nextActionsFor(itemId, plan),
|
|
983
|
+
warnings: [],
|
|
984
|
+
generated_at: nowIso()
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
async function planApprove(id, options, ctx) {
|
|
988
|
+
const mode = asPlanMode(options.mode ?? "approved", "approved");
|
|
989
|
+
const { document, itemId } = await mutatePlanSteps({
|
|
990
|
+
id,
|
|
991
|
+
options,
|
|
992
|
+
ctx,
|
|
993
|
+
op: "plan_approve",
|
|
994
|
+
message: options.message ?? `plan approve mode=${mode}`,
|
|
995
|
+
mutator(_steps, doc) {
|
|
996
|
+
doc.metadata.plan_mode = mode;
|
|
997
|
+
return { changedSteps: [] };
|
|
998
|
+
}
|
|
999
|
+
});
|
|
1000
|
+
const plan = projectPlan(document.metadata, "brief");
|
|
1001
|
+
return {
|
|
1002
|
+
action: "approve",
|
|
1003
|
+
plan,
|
|
1004
|
+
next_actions: nextActionsFor(itemId, plan),
|
|
1005
|
+
warnings: [],
|
|
1006
|
+
generated_at: nowIso()
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
async function planMaterialize(id, options, ctx) {
|
|
1010
|
+
const stepRefs = toArray(options.steps);
|
|
1011
|
+
if (stepRefs.length === 0) {
|
|
1012
|
+
throw new PmCliError("pm plan materialize requires --steps <ids|orders|all>", EXIT_CODE.USAGE);
|
|
1013
|
+
}
|
|
1014
|
+
const targetType = options.materializeType?.trim() || "Task";
|
|
1015
|
+
const typeRegistry = resolveItemTypeRegistry(ctx.settings, getActiveExtensionRegistrations());
|
|
1016
|
+
const resolvedTypeName = resolveTypeName(targetType, typeRegistry);
|
|
1017
|
+
if (!resolvedTypeName) {
|
|
1018
|
+
throw new PmCliError(`Invalid --materialize-type "${targetType}"`, EXIT_CODE.USAGE);
|
|
1019
|
+
}
|
|
1020
|
+
const parent = options.materializeParent?.trim() || id;
|
|
1021
|
+
const tags = options.materializeTags;
|
|
1022
|
+
const planRead = await readPlanItem(ctx, id);
|
|
1023
|
+
const steps = (planRead.document.metadata.plan_steps ?? []).slice();
|
|
1024
|
+
const { targets, skipped: materializeSkipped } = resolveMaterializeTargets(steps, stepRefs);
|
|
1025
|
+
if (targets.length === 0) {
|
|
1026
|
+
if (materializeSkipped.length > 0) {
|
|
1027
|
+
const plan2 = projectPlan(planRead.document.metadata, "standard");
|
|
1028
|
+
return {
|
|
1029
|
+
action: "materialize",
|
|
1030
|
+
plan: plan2,
|
|
1031
|
+
materialized: [],
|
|
1032
|
+
materialize_skipped: materializeSkipped,
|
|
1033
|
+
next_actions: nextActionsFor(planRead.itemId, plan2),
|
|
1034
|
+
warnings: materializeSkipped.map((entry) => `plan_materialize_skipped:${entry.from_step}:${entry.reason}${entry.existing_id ? `:${entry.existing_id}` : ""}`),
|
|
1035
|
+
generated_at: nowIso()
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
throw new PmCliError("No matching plan steps found for --steps", EXIT_CODE.NOT_FOUND);
|
|
1039
|
+
}
|
|
1040
|
+
const materialized = [];
|
|
1041
|
+
for (const step of targets) {
|
|
1042
|
+
const deps = [
|
|
1043
|
+
`id=${parent},kind=parent`,
|
|
1044
|
+
`id=${planRead.itemId},kind=discovered_from`
|
|
1045
|
+
];
|
|
1046
|
+
for (const link of step.linked_items ?? []) {
|
|
1047
|
+
const realKind = link.kind === "blocked_by" || link.kind === "blocks" || link.kind === "related" || link.kind === "discovered_from" ? link.kind : "related";
|
|
1048
|
+
deps.push(`id=${link.id},kind=${realKind}`);
|
|
1049
|
+
}
|
|
1050
|
+
const created = await runCreate({
|
|
1051
|
+
title: step.title,
|
|
1052
|
+
description: step.body?.trim() || step.title,
|
|
1053
|
+
type: resolvedTypeName,
|
|
1054
|
+
parent,
|
|
1055
|
+
tags,
|
|
1056
|
+
author: options.author,
|
|
1057
|
+
message: options.message ?? `materialized from plan ${planRead.itemId} step ${step.id}`,
|
|
1058
|
+
dep: deps
|
|
1059
|
+
}, ctx.settings ? { ...{}, path: ctx.pmRoot } : {});
|
|
1060
|
+
materialized.push({ id: created.item.id, type: resolvedTypeName, from_step: step.id });
|
|
1061
|
+
}
|
|
1062
|
+
const { document, itemId } = await mutatePlanSteps({
|
|
1063
|
+
id,
|
|
1064
|
+
options,
|
|
1065
|
+
ctx,
|
|
1066
|
+
op: "plan_materialize",
|
|
1067
|
+
message: options.message ?? `plan materialize ${stepRefs.join(",")}`,
|
|
1068
|
+
mutator(currentSteps, doc) {
|
|
1069
|
+
for (const target of targets) {
|
|
1070
|
+
const matched = materialized.find((entry) => entry.from_step === target.id);
|
|
1071
|
+
if (!matched)
|
|
1072
|
+
continue;
|
|
1073
|
+
const step = currentSteps.find((entry) => entry.id === target.id);
|
|
1074
|
+
if (!step)
|
|
1075
|
+
continue;
|
|
1076
|
+
const links = step.linked_items ?? [];
|
|
1077
|
+
links.push({ id: matched.id, kind: "implements", note: `materialized as ${matched.type}` });
|
|
1078
|
+
step.linked_items = links;
|
|
1079
|
+
step.updated_at = nowIso();
|
|
1080
|
+
}
|
|
1081
|
+
return { changedSteps: targets.map((entry) => entry.id) };
|
|
1082
|
+
}
|
|
1083
|
+
});
|
|
1084
|
+
const plan = projectPlan(document.metadata, "standard");
|
|
1085
|
+
return {
|
|
1086
|
+
action: "materialize",
|
|
1087
|
+
plan,
|
|
1088
|
+
materialized,
|
|
1089
|
+
...materializeSkipped.length > 0 ? { materialize_skipped: materializeSkipped } : {},
|
|
1090
|
+
next_actions: nextActionsFor(itemId, plan),
|
|
1091
|
+
warnings: materializeSkipped.map((entry) => `plan_materialize_skipped:${entry.from_step}:${entry.reason}${entry.existing_id ? `:${entry.existing_id}` : ""}`),
|
|
1092
|
+
generated_at: nowIso()
|
|
1093
|
+
};
|
|
1094
|
+
}
|
|
1095
|
+
async function runPlan(input) {
|
|
1096
|
+
const ctx = await loadContext(input.global);
|
|
1097
|
+
switch (input.subcommand) {
|
|
1098
|
+
case "create":
|
|
1099
|
+
return planCreate(input.options, input.global, ctx);
|
|
1100
|
+
case "show":
|
|
1101
|
+
if (!input.id)
|
|
1102
|
+
throw new PmCliError("pm plan show requires a plan id", EXIT_CODE.USAGE);
|
|
1103
|
+
return planShow(input.id, input.options, ctx);
|
|
1104
|
+
case "add-step":
|
|
1105
|
+
if (!input.id)
|
|
1106
|
+
throw new PmCliError("pm plan add-step requires a plan id", EXIT_CODE.USAGE);
|
|
1107
|
+
return planAddStep(input.id, input.options, ctx);
|
|
1108
|
+
case "update-step":
|
|
1109
|
+
if (!input.id || !input.stepRef)
|
|
1110
|
+
throw new PmCliError("pm plan update-step requires <plan-id> <step>", EXIT_CODE.USAGE);
|
|
1111
|
+
return planUpdateStep(input.id, input.options, ctx, { stepRef: input.stepRef, op: "plan_update_step" });
|
|
1112
|
+
case "complete-step":
|
|
1113
|
+
if (!input.id || !input.stepRef)
|
|
1114
|
+
throw new PmCliError("pm plan complete-step requires <plan-id> <step>", EXIT_CODE.USAGE);
|
|
1115
|
+
return planUpdateStep(input.id, input.options, ctx, { stepRef: input.stepRef, finalStatus: "completed", op: "plan_complete_step" });
|
|
1116
|
+
case "block-step":
|
|
1117
|
+
if (!input.id || !input.stepRef)
|
|
1118
|
+
throw new PmCliError("pm plan block-step requires <plan-id> <step>", EXIT_CODE.USAGE);
|
|
1119
|
+
return planUpdateStep(input.id, input.options, ctx, { stepRef: input.stepRef, finalStatus: "blocked", op: "plan_block_step" });
|
|
1120
|
+
case "reorder-step":
|
|
1121
|
+
if (!input.id || !input.stepRef || input.reorderTo === void 0)
|
|
1122
|
+
throw new PmCliError("pm plan reorder-step requires <plan-id> <step> <new-order>", EXIT_CODE.USAGE);
|
|
1123
|
+
return planReorderStep(input.id, input.options, ctx, input.stepRef, input.reorderTo);
|
|
1124
|
+
case "remove-step":
|
|
1125
|
+
if (!input.id || !input.stepRef)
|
|
1126
|
+
throw new PmCliError("pm plan remove-step requires <plan-id> <step>", EXIT_CODE.USAGE);
|
|
1127
|
+
return planRemoveStep(input.id, input.options, ctx, input.stepRef);
|
|
1128
|
+
case "link":
|
|
1129
|
+
if (!input.id || !input.stepRef)
|
|
1130
|
+
throw new PmCliError("pm plan link requires <plan-id> <step>", EXIT_CODE.USAGE);
|
|
1131
|
+
return planLink(input.id, input.options, ctx, input.stepRef);
|
|
1132
|
+
case "unlink":
|
|
1133
|
+
if (!input.id || !input.stepRef)
|
|
1134
|
+
throw new PmCliError("pm plan unlink requires <plan-id> <step>", EXIT_CODE.USAGE);
|
|
1135
|
+
return planUnlink(input.id, input.options, ctx, input.stepRef);
|
|
1136
|
+
case "decision":
|
|
1137
|
+
if (!input.id)
|
|
1138
|
+
throw new PmCliError("pm plan decision requires a plan id", EXIT_CODE.USAGE);
|
|
1139
|
+
return planAppendLog(input.id, input.options, ctx, "decision");
|
|
1140
|
+
case "discovery":
|
|
1141
|
+
if (!input.id)
|
|
1142
|
+
throw new PmCliError("pm plan discovery requires a plan id", EXIT_CODE.USAGE);
|
|
1143
|
+
return planAppendLog(input.id, input.options, ctx, "discovery");
|
|
1144
|
+
case "validation":
|
|
1145
|
+
if (!input.id)
|
|
1146
|
+
throw new PmCliError("pm plan validation requires a plan id", EXIT_CODE.USAGE);
|
|
1147
|
+
return planAppendLog(input.id, input.options, ctx, "validation");
|
|
1148
|
+
case "resume":
|
|
1149
|
+
if (!input.id)
|
|
1150
|
+
throw new PmCliError("pm plan resume requires a plan id", EXIT_CODE.USAGE);
|
|
1151
|
+
return planResume(input.id, input.options, ctx);
|
|
1152
|
+
case "approve":
|
|
1153
|
+
if (!input.id)
|
|
1154
|
+
throw new PmCliError("pm plan approve requires a plan id", EXIT_CODE.USAGE);
|
|
1155
|
+
return planApprove(input.id, input.options, ctx);
|
|
1156
|
+
case "materialize":
|
|
1157
|
+
if (!input.id)
|
|
1158
|
+
throw new PmCliError("pm plan materialize requires a plan id", EXIT_CODE.USAGE);
|
|
1159
|
+
return planMaterialize(input.id, input.options, ctx);
|
|
1160
|
+
default:
|
|
1161
|
+
throw new PmCliError(`Unknown pm plan subcommand "${input.subcommand}"`, EXIT_CODE.USAGE);
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
export {
|
|
1165
|
+
PLAN_SHOW_DEPTH_VALUES,
|
|
1166
|
+
PLAN_SUBCOMMANDS,
|
|
1167
|
+
runPlan
|
|
1168
|
+
};
|
|
1169
|
+
//# sourceMappingURL=plan-DUMBV3QB.js.map
|
|
1170
|
+
|
|
1171
|
+
//# debugId=ded50a19-e249-51bd-b1da-8244e75cdfbe
|