@unbrained/pm-cli 2026.6.10 → 2026.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +44 -0
- package/README.md +1 -1
- package/dist/cli/bootstrap-args.d.ts +11 -0
- package/dist/cli/bootstrap-args.js +88 -4
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commands/completion.js +20 -8
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/contracts.d.ts +2 -0
- package/dist/cli/commands/contracts.js +9 -2
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.js +6 -3
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/docs.d.ts +2 -0
- package/dist/cli/commands/docs.js +2 -2
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/files.d.ts +2 -0
- package/dist/cli/commands/files.js +2 -2
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/health.d.ts +1 -1
- package/dist/cli/commands/health.js +77 -2
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-repair.d.ts +36 -0
- package/dist/cli/commands/history-repair.js +68 -3
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.js +3 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/linked-artifacts.d.ts +18 -0
- package/dist/cli/commands/linked-artifacts.js +26 -3
- package/dist/cli/commands/linked-artifacts.js.map +1 -1
- package/dist/cli/commands/plan.d.ts +6 -0
- package/dist/cli/commands/plan.js +93 -32
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +20 -0
- package/dist/cli/commands/validate.js +292 -28
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.d.ts +8 -0
- package/dist/cli/error-guidance.js +102 -2
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/help-content.js +7 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/register-mutation.js +47 -16
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +10 -2
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +16 -16
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli-bundle/chunks/{activity-W6TS5F2L.js → activity-XADJOG6G.js} +11 -11
- package/dist/cli-bundle/chunks/activity-XZIUPGZH.js +16 -0
- package/dist/cli-bundle/chunks/{aggregate-UK2WJ4Z3.js → aggregate-6OTS3AOO.js} +10 -10
- package/dist/cli-bundle/chunks/{aggregate-NNJLKGEK.js → aggregate-OD36DJU5.js} +10 -10
- package/dist/cli-bundle/chunks/{append-DHGTLUZW.js → append-JYWO4P7W.js} +8 -8
- package/dist/cli-bundle/chunks/{append-7BS36Z2L.js → append-KG55G7S3.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-GF5XIBUH.js → chunk-35P4GT6E.js} +111 -10
- package/dist/cli-bundle/chunks/chunk-35P4GT6E.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-A6XVYNQJ.js → chunk-37CYVF73.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-XRE4CTNP.js → chunk-3KLPFWZ4.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-WSWOQP3Z.js → chunk-4HFU4UO2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UNH3KSHG.js → chunk-4JCSYR6F.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-73PSHEMT.js → chunk-4YFAGDRH.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-7GYMMDDW.js → chunk-5SCT2JCT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q6PSD5DZ.js → chunk-73ZPG2I3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-XH6RA5A5.js → chunk-7AMK6DOW.js} +15 -15
- package/dist/cli-bundle/chunks/{chunk-XH6RA5A5.js.map → chunk-7AMK6DOW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CTW7QAHM.js → chunk-7IYFN5R7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OSGWBWLK.js → chunk-7UGSRQCL.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-WNMRICXH.js → chunk-A6LXQFO7.js} +4 -3
- package/dist/cli-bundle/chunks/chunk-A6LXQFO7.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UDWUDUJI.js → chunk-ATEES5SX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2MKBPWMK.js → chunk-AVGHVVF7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZH7C7ZVX.js → chunk-AX4GEVQC.js} +14 -14
- package/dist/cli-bundle/chunks/{chunk-ZH7C7ZVX.js.map → chunk-AX4GEVQC.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-C6SAP27O.js +187 -0
- package/dist/cli-bundle/chunks/chunk-C6SAP27O.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-344GDQTH.js → chunk-CCX4RSYZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6KQS23TX.js → chunk-CW6E4NAT.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-K45NAJV2.js → chunk-DY6C42S6.js} +9 -9
- package/dist/cli-bundle/chunks/chunk-EKS6O2IR.js +217 -0
- package/dist/cli-bundle/chunks/chunk-EKS6O2IR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ANVZCNL5.js → chunk-ESANVZF4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-6OSG3EMX.js → chunk-EWFY7SLA.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-DMDEC4QP.js → chunk-F75JSIOZ.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-TALBUVWF.js → chunk-FDH2X65L.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OQGJSCZZ.js → chunk-FY4SPXSC.js} +3 -2
- package/dist/cli-bundle/chunks/chunk-FY4SPXSC.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TZLGCTA5.js → chunk-GKIZW7SM.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UMWF6ZAS.js → chunk-GWZSYR6X.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KHBRV5JU.js → chunk-HGLC63AU.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-CMEHZD6G.js → chunk-HHHJ2GI3.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-MF6KSSMF.js → chunk-HI7STVF2.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-IEQ3N7WP.js → chunk-I2IJY2NL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-O64EYNHF.js → chunk-I53JBTJW.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-K7SXBA75.js → chunk-I7NYDZDV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WBU257Z4.js → chunk-IGVJRZ6H.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-7TW64BS5.js → chunk-IUKD4W6Z.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DTRIVUTN.js → chunk-KBPQHXWG.js} +21 -8
- package/dist/cli-bundle/chunks/chunk-KBPQHXWG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OVNSQHDG.js → chunk-KWAXVAXX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-WWEFBBVF.js → chunk-L5EPZQIC.js} +12 -12
- package/dist/cli-bundle/chunks/chunk-NAWVUHXH.js +220 -0
- package/dist/cli-bundle/chunks/chunk-NAWVUHXH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6ADVKPVV.js → chunk-OASDW5UI.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-EIS32UA4.js → chunk-OLKBSY4N.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-X3IPJU2O.js → chunk-P5BJOMBB.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-LYL32FT6.js → chunk-P5U5EOMA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-EAQLLID6.js → chunk-PNYAAB4S.js} +21 -188
- package/dist/cli-bundle/chunks/chunk-PNYAAB4S.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TV6FZGVK.js → chunk-QJMGRZO2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KMMUDSSB.js → chunk-QKW5D45B.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-4H2NDEGJ.js → chunk-QNJSITCX.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-R2OUQVBK.js +190 -0
- package/dist/cli-bundle/chunks/chunk-R2OUQVBK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XSCGU4WT.js → chunk-R4VWYWRN.js} +19 -193
- package/dist/cli-bundle/chunks/chunk-R4VWYWRN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VSS3CSTF.js → chunk-RXAP6JL5.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-3VTWCBXL.js → chunk-S26FESD4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-DEYNERFX.js → chunk-S2ZLDYGS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QGIWURY3.js → chunk-SO55HRA5.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-F2PVV7IX.js → chunk-SXKNJPQ7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5OMABP7I.js → chunk-TK5VZFHY.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-UY26RIBR.js → chunk-TNAP7EJX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QJ2OIEOC.js → chunk-UIG4TW2H.js} +111 -10
- package/dist/cli-bundle/chunks/chunk-UIG4TW2H.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SNASEDXB.js → chunk-UUWGCWBU.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-6N46IM44.js → chunk-VAOUX6TK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-X5YC5DZM.js → chunk-VFUZV5EB.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-I2FM2SMO.js → chunk-VPEAS7PS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7DUVDW7C.js → chunk-VSRZRLG3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GP6SHEAI.js → chunk-WPDMBIX6.js} +20 -7
- package/dist/cli-bundle/chunks/chunk-WPDMBIX6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PYULT32I.js → chunk-WUNFKP7M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LUJQJR7G.js → chunk-XJDGS74Y.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-TXWMLDMG.js → chunk-XMBI6TNW.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-4CYHWHZU.js → chunk-XTKJSVWH.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-T6QLB34N.js → chunk-XUC4C4PT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KRZQGRVL.js → chunk-XWMF3POR.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-OROMGSBP.js → chunk-Y3YKK7CY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-D6JZBUZ6.js → chunk-YW6Q3RYZ.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-GRHPU6EM.js → chunk-ZLMIWZUG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5HH6QRH5.js → chunk-ZMW77VWV.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-BE5G7HEL.js → chunk-ZYNJNPYD.js} +4 -4
- package/dist/cli-bundle/chunks/{claim-3TY5LE54.js → claim-2RDYMCTP.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-LM4YY6QQ.js → claim-MJ7DZFC3.js} +10 -10
- package/dist/cli-bundle/chunks/close-4FMAPEMY.js +13 -0
- package/dist/cli-bundle/chunks/{close-CSD4LEMT.js → close-XLEKIQSW.js} +8 -8
- package/dist/cli-bundle/chunks/{close-many-B5SHDX6W.js → close-many-AOD4HSAZ.js} +15 -15
- package/dist/cli-bundle/chunks/{close-many-WRXB5KVY.js → close-many-XKAQY5CQ.js} +15 -15
- package/dist/cli-bundle/chunks/{comments-BDDEK3VW.js → comments-B4RWWDJT.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-A5ALOYTG.js → comments-RN5TG4ZN.js} +10 -10
- package/dist/cli-bundle/chunks/{config-W2NHDNQT.js → config-3JXJ3XZ7.js} +8 -8
- package/dist/cli-bundle/chunks/{config-YUYBMJOW.js → config-FZ4UDC4B.js} +8 -8
- package/dist/cli-bundle/chunks/{context-LRJ74NSU.js → context-L36PIN35.js} +13 -13
- package/dist/cli-bundle/chunks/{context-R2QLOJCK.js → context-QBPO3BFM.js} +13 -13
- package/dist/cli-bundle/chunks/{contracts-HJHR4NCD.js → contracts-2G66IGIA.js} +309 -6
- package/dist/cli-bundle/chunks/contracts-2G66IGIA.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-47X7RYUF.js → contracts-PJCHYSO5.js} +315 -5
- package/dist/cli-bundle/chunks/contracts-PJCHYSO5.js.map +7 -0
- package/dist/cli-bundle/chunks/{copy-P4UVYZ7M.js → copy-ALU5WMHA.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-B7HFOWFB.js → copy-FWIVTLBO.js} +7 -7
- package/dist/cli-bundle/chunks/{create-5ERJF64D.js → create-5433DP3G.js} +13 -13
- package/dist/cli-bundle/chunks/create-VWLWS34Z.js +27 -0
- package/dist/cli-bundle/chunks/{delete-LX3LGBCH.js → delete-IYTIYAJS.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-S3WVK6LP.js → delete-Y2SGJBGY.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-YSM4LZQD.js → deps-6TSPOSGU.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-GWSNH7OZ.js → deps-CZ4PTVXU.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-TG6JMVMY.js → docs-I3BAF5WH.js} +11 -11
- package/dist/cli-bundle/chunks/docs-I3BAF5WH.js.map +1 -0
- package/dist/cli-bundle/chunks/{docs-7RYFBHQD.js → docs-MXLGZUIT.js} +10 -10
- package/dist/cli-bundle/chunks/docs-MXLGZUIT.js.map +7 -0
- package/dist/cli-bundle/chunks/{extension-R3LUKMX7.js → extension-Q34OEWO5.js} +5 -5
- package/dist/cli-bundle/chunks/{extension-VNMRKIHI.js → extension-WH2FOIOZ.js} +5 -5
- package/dist/cli-bundle/chunks/{files-KAKU57OT.js → files-FYP3MDPX.js} +10 -10
- package/dist/cli-bundle/chunks/files-FYP3MDPX.js.map +7 -0
- package/dist/cli-bundle/chunks/{files-QB3EYPMO.js → files-GUXUM2MB.js} +11 -11
- package/dist/cli-bundle/chunks/files-GUXUM2MB.js.map +1 -0
- package/dist/cli-bundle/chunks/{gc-KNUPLPSW.js → gc-FENB2ESG.js} +14 -176
- package/dist/cli-bundle/chunks/gc-FENB2ESG.js.map +1 -0
- package/dist/cli-bundle/chunks/{gc-B747VM4M.js → gc-KGQG66SA.js} +12 -181
- package/dist/cli-bundle/chunks/gc-KGQG66SA.js.map +7 -0
- package/dist/cli-bundle/chunks/{get-GMGLIQ5I.js → get-PCHS7RA6.js} +11 -11
- package/dist/cli-bundle/chunks/{get-SBL6NHYQ.js → get-QARTE6BL.js} +11 -11
- package/dist/cli-bundle/chunks/{health-WWZJ5KJS.js → health-7MTXAVR2.js} +82 -15
- package/dist/cli-bundle/chunks/health-7MTXAVR2.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-IG43Z4KL.js → health-E4D7KGHD.js} +83 -16
- package/dist/cli-bundle/chunks/health-E4D7KGHD.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-XCWRXBXC.js → history-7WUAEWHW.js} +10 -10
- package/dist/cli-bundle/chunks/history-L2FQFRTU.js +20 -0
- package/dist/cli-bundle/chunks/{history-compact-KICKUCR7.js → history-compact-3EJ3L2O7.js} +11 -11
- package/dist/cli-bundle/chunks/{history-compact-IDH7E7VN.js → history-compact-LW27IPFK.js} +11 -11
- package/dist/cli-bundle/chunks/{history-redact-JJWH3QWK.js → history-redact-G72A4EJ4.js} +11 -11
- package/dist/cli-bundle/chunks/history-redact-QWQCX5DZ.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-N5HXKJOI.js → history-repair-OSQOKJ3E.js} +71 -13
- package/dist/cli-bundle/chunks/history-repair-OSQOKJ3E.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-repair-7HWBZKXN.js → history-repair-SBK7P34V.js} +72 -14
- package/dist/cli-bundle/chunks/history-repair-SBK7P34V.js.map +1 -0
- package/dist/cli-bundle/chunks/init-4BKRHGWW.js +17 -0
- package/dist/cli-bundle/chunks/{init-OQA3TWIS.js → init-S5WEGUJY.js} +9 -9
- package/dist/cli-bundle/chunks/{learnings-L7VQUSVI.js → learnings-HQXSSKZ5.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-Z4GAIZQ5.js → learnings-XK3P4ZDR.js} +10 -10
- package/dist/cli-bundle/chunks/{list-W5ROBC5U.js → list-6CL3XFT6.js} +10 -10
- package/dist/cli-bundle/chunks/list-BYNN4ZEO.js +19 -0
- package/dist/cli-bundle/chunks/{notes-JJDOEDFK.js → notes-5T6P7C5V.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-SDCK7BEN.js → notes-U5FZCSBT.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-H5HYHMBB.js → plan-2YTQYWGM.js} +63 -23
- package/dist/cli-bundle/chunks/plan-2YTQYWGM.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-W2B5RYR3.js → plan-7IVSICR6.js} +62 -22
- package/dist/cli-bundle/chunks/plan-7IVSICR6.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-QGRFMDWA.js → register-list-query-4UPMHONX.js} +18 -18
- package/dist/cli-bundle/chunks/{register-list-query-V4S23735.js → register-list-query-7VOW2C3W.js} +18 -18
- package/dist/cli-bundle/chunks/{register-mutation-ZPZNJXSA.js → register-mutation-FARSGYRD.js} +64 -47
- package/dist/cli-bundle/chunks/{register-mutation-ZPZNJXSA.js.map → register-mutation-FARSGYRD.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-I57PLUHA.js → register-mutation-LJDNVREU.js} +65 -48
- package/dist/cli-bundle/chunks/{register-mutation-I57PLUHA.js.map → register-mutation-LJDNVREU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-KAMLXAF5.js → register-operations-FFTYAL42.js} +38 -34
- package/dist/cli-bundle/chunks/register-operations-FFTYAL42.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-YEN4YEZ2.js → register-operations-HCJKDUA6.js} +37 -33
- package/dist/cli-bundle/chunks/{register-operations-YEN4YEZ2.js.map → register-operations-HCJKDUA6.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-BZ3TNE3G.js → register-setup-6AVIUOCC.js} +31 -31
- package/dist/cli-bundle/chunks/register-setup-6AVIUOCC.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-WLFL3OUF.js → register-setup-KVNLO5OJ.js} +30 -30
- package/dist/cli-bundle/chunks/register-setup-KVNLO5OJ.js.map +7 -0
- package/dist/cli-bundle/chunks/restore-CHIOQAQL.js +17 -0
- package/dist/cli-bundle/chunks/{restore-RGFSPG4K.js → restore-M6AFHMV4.js} +11 -11
- package/dist/cli-bundle/chunks/{schema-CCDU3RLC.js → schema-76HDZJCC.js} +8 -8
- package/dist/cli-bundle/chunks/{schema-KZASL323.js → schema-AINZ2IMM.js} +8 -8
- package/dist/cli-bundle/chunks/{search-7KSOLI2E.js → search-JMLFQEPJ.js} +10 -10
- package/dist/cli-bundle/chunks/{search-DTL7CO22.js → search-NL3TSCYB.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-QNV7B2CE.js → stats-BKXCBIGT.js} +7 -7
- package/dist/cli-bundle/chunks/{stats-IOXQMGI6.js → stats-UBD56TGK.js} +7 -7
- package/dist/cli-bundle/chunks/{telemetry-NHR5RFXT.js → telemetry-N454RHG5.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-IV5C6JOM.js → telemetry-ZJXK3H7X.js} +4 -4
- package/dist/cli-bundle/chunks/{test-PIL2CEEB.js → test-BQAKIXAT.js} +14 -14
- package/dist/cli-bundle/chunks/test-O74JFUH5.js +32 -0
- package/dist/cli-bundle/chunks/{test-all-MFN4MYCV.js → test-all-7LV3I6S5.js} +14 -14
- package/dist/cli-bundle/chunks/{test-all-GRLYHBNP.js → test-all-TDYCCBA4.js} +14 -14
- package/dist/cli-bundle/chunks/{test-runs-7WCSC3TY.js → test-runs-E64M6XS3.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-7LRFWWCA.js → test-runs-LXZLULCI.js} +5 -5
- package/dist/cli-bundle/chunks/update-36JM7YZT.js +21 -0
- package/dist/cli-bundle/chunks/update-I246PCLO.js +25 -0
- package/dist/cli-bundle/chunks/{update-many-UYMTVF42.js → update-many-F4IKDWZB.js} +22 -22
- package/dist/cli-bundle/chunks/{update-many-LOTAYUTN.js → update-many-NTWZ5YT3.js} +22 -22
- package/dist/cli-bundle/chunks/{upgrade-ZZSC7CLV.js → upgrade-37F7JKES.js} +5 -5
- package/dist/cli-bundle/chunks/{upgrade-LT2MLLPS.js → upgrade-L32JA4TZ.js} +5 -5
- package/dist/cli-bundle/chunks/{validate-IQIQSKUX.js → validate-46KCRHL7.js} +462 -50
- package/dist/cli-bundle/chunks/validate-46KCRHL7.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-3XRORNMP.js → validate-CRFMPTYD.js} +482 -49
- package/dist/cli-bundle/chunks/validate-CRFMPTYD.js.map +7 -0
- package/dist/cli-bundle/main.js +180 -25
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/core/diagnostics/remediation.js +19 -6
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/lock/lock-gc.d.ts +31 -0
- package/dist/core/lock/lock-gc.js +120 -62
- package/dist/core/lock/lock-gc.js.map +1 -1
- package/dist/core/output/query-summary.d.ts +31 -0
- package/dist/core/output/query-summary.js +62 -0
- package/dist/core/output/query-summary.js.map +1 -0
- package/dist/core/shared/constants.js +3 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/telemetry/consent.js +18 -3
- package/dist/core/telemetry/consent.js.map +1 -1
- package/dist/core/validate/fix-planning.d.ts +130 -0
- package/dist/core/validate/fix-planning.js +202 -0
- package/dist/core/validate/fix-planning.js.map +1 -0
- package/dist/core/validate/missing-by-type.d.ts +21 -0
- package/dist/core/validate/missing-by-type.js +39 -0
- package/dist/core/validate/missing-by-type.js.map +1 -0
- package/dist/core/validate/stale-file-classification.d.ts +41 -0
- package/dist/core/validate/stale-file-classification.js +73 -0
- package/dist/core/validate/stale-file-classification.js.map +1 -0
- package/dist/mcp/server.js +74 -266
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-definitions.d.ts +27 -0
- package/dist/mcp/tool-definitions.js +330 -0
- package/dist/mcp/tool-definitions.js.map +1 -0
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +38 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +6 -1
- package/dist/sdk/cli-contracts.js +74 -7
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/docs/AGENT_GUIDE.md +7 -2
- package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +25 -2
- package/marketplace.json +1 -1
- package/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +7 -3
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/plugins/pm-codex/README.md +2 -2
- package/dist/cli-bundle/chunks/activity-5QLX6DHN.js +0 -16
- package/dist/cli-bundle/chunks/chunk-DTRIVUTN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EAQLLID6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GF5XIBUH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-GP6SHEAI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OQGJSCZZ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QJ2OIEOC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WNMRICXH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XSCGU4WT.js.map +0 -7
- package/dist/cli-bundle/chunks/close-SIQCDOBR.js +0 -13
- package/dist/cli-bundle/chunks/contracts-47X7RYUF.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-HJHR4NCD.js.map +0 -1
- package/dist/cli-bundle/chunks/create-TXNRPS4K.js +0 -27
- package/dist/cli-bundle/chunks/docs-7RYFBHQD.js.map +0 -7
- package/dist/cli-bundle/chunks/docs-TG6JMVMY.js.map +0 -1
- package/dist/cli-bundle/chunks/files-KAKU57OT.js.map +0 -7
- package/dist/cli-bundle/chunks/files-QB3EYPMO.js.map +0 -1
- package/dist/cli-bundle/chunks/gc-B747VM4M.js.map +0 -7
- package/dist/cli-bundle/chunks/gc-KNUPLPSW.js.map +0 -1
- package/dist/cli-bundle/chunks/health-IG43Z4KL.js.map +0 -1
- package/dist/cli-bundle/chunks/health-WWZJ5KJS.js.map +0 -7
- package/dist/cli-bundle/chunks/history-6UKSZTRT.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-HKYBTK6X.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-7HWBZKXN.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-N5HXKJOI.js.map +0 -7
- package/dist/cli-bundle/chunks/init-27JLDUO2.js +0 -17
- package/dist/cli-bundle/chunks/list-6U3CJVXS.js +0 -19
- package/dist/cli-bundle/chunks/plan-H5HYHMBB.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-W2B5RYR3.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-KAMLXAF5.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-BZ3TNE3G.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-WLFL3OUF.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-GNI2W5CN.js +0 -17
- package/dist/cli-bundle/chunks/test-4Z37CXW4.js +0 -32
- package/dist/cli-bundle/chunks/update-I4G34LKJ.js +0 -21
- package/dist/cli-bundle/chunks/update-VI5DBZ3G.js +0 -25
- package/dist/cli-bundle/chunks/validate-3XRORNMP.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-IQIQSKUX.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-W6TS5F2L.js.map → activity-XADJOG6G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-5QLX6DHN.js.map → activity-XZIUPGZH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-UK2WJ4Z3.js.map → aggregate-6OTS3AOO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-NNJLKGEK.js.map → aggregate-OD36DJU5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-DHGTLUZW.js.map → append-JYWO4P7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-7BS36Z2L.js.map → append-KG55G7S3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A6XVYNQJ.js.map → chunk-37CYVF73.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XRE4CTNP.js.map → chunk-3KLPFWZ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WSWOQP3Z.js.map → chunk-4HFU4UO2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UNH3KSHG.js.map → chunk-4JCSYR6F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-73PSHEMT.js.map → chunk-4YFAGDRH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7GYMMDDW.js.map → chunk-5SCT2JCT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q6PSD5DZ.js.map → chunk-73ZPG2I3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CTW7QAHM.js.map → chunk-7IYFN5R7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OSGWBWLK.js.map → chunk-7UGSRQCL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UDWUDUJI.js.map → chunk-ATEES5SX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2MKBPWMK.js.map → chunk-AVGHVVF7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-344GDQTH.js.map → chunk-CCX4RSYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6KQS23TX.js.map → chunk-CW6E4NAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K45NAJV2.js.map → chunk-DY6C42S6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ANVZCNL5.js.map → chunk-ESANVZF4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6OSG3EMX.js.map → chunk-EWFY7SLA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DMDEC4QP.js.map → chunk-F75JSIOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TALBUVWF.js.map → chunk-FDH2X65L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZLGCTA5.js.map → chunk-GKIZW7SM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UMWF6ZAS.js.map → chunk-GWZSYR6X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KHBRV5JU.js.map → chunk-HGLC63AU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CMEHZD6G.js.map → chunk-HHHJ2GI3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MF6KSSMF.js.map → chunk-HI7STVF2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IEQ3N7WP.js.map → chunk-I2IJY2NL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-O64EYNHF.js.map → chunk-I53JBTJW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K7SXBA75.js.map → chunk-I7NYDZDV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WBU257Z4.js.map → chunk-IGVJRZ6H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7TW64BS5.js.map → chunk-IUKD4W6Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OVNSQHDG.js.map → chunk-KWAXVAXX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WWEFBBVF.js.map → chunk-L5EPZQIC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6ADVKPVV.js.map → chunk-OASDW5UI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EIS32UA4.js.map → chunk-OLKBSY4N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X3IPJU2O.js.map → chunk-P5BJOMBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LYL32FT6.js.map → chunk-P5U5EOMA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TV6FZGVK.js.map → chunk-QJMGRZO2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KMMUDSSB.js.map → chunk-QKW5D45B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4H2NDEGJ.js.map → chunk-QNJSITCX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VSS3CSTF.js.map → chunk-RXAP6JL5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3VTWCBXL.js.map → chunk-S26FESD4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DEYNERFX.js.map → chunk-S2ZLDYGS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QGIWURY3.js.map → chunk-SO55HRA5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F2PVV7IX.js.map → chunk-SXKNJPQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5OMABP7I.js.map → chunk-TK5VZFHY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UY26RIBR.js.map → chunk-TNAP7EJX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SNASEDXB.js.map → chunk-UUWGCWBU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6N46IM44.js.map → chunk-VAOUX6TK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X5YC5DZM.js.map → chunk-VFUZV5EB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I2FM2SMO.js.map → chunk-VPEAS7PS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7DUVDW7C.js.map → chunk-VSRZRLG3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PYULT32I.js.map → chunk-WUNFKP7M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LUJQJR7G.js.map → chunk-XJDGS74Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TXWMLDMG.js.map → chunk-XMBI6TNW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4CYHWHZU.js.map → chunk-XTKJSVWH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T6QLB34N.js.map → chunk-XUC4C4PT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KRZQGRVL.js.map → chunk-XWMF3POR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OROMGSBP.js.map → chunk-Y3YKK7CY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D6JZBUZ6.js.map → chunk-YW6Q3RYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GRHPU6EM.js.map → chunk-ZLMIWZUG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5HH6QRH5.js.map → chunk-ZMW77VWV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BE5G7HEL.js.map → chunk-ZYNJNPYD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-3TY5LE54.js.map → claim-2RDYMCTP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-LM4YY6QQ.js.map → claim-MJ7DZFC3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-SIQCDOBR.js.map → close-4FMAPEMY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-CSD4LEMT.js.map → close-XLEKIQSW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-B5SHDX6W.js.map → close-many-AOD4HSAZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-WRXB5KVY.js.map → close-many-XKAQY5CQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-BDDEK3VW.js.map → comments-B4RWWDJT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-A5ALOYTG.js.map → comments-RN5TG4ZN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-W2NHDNQT.js.map → config-3JXJ3XZ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-YUYBMJOW.js.map → config-FZ4UDC4B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-LRJ74NSU.js.map → context-L36PIN35.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-R2QLOJCK.js.map → context-QBPO3BFM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-P4UVYZ7M.js.map → copy-ALU5WMHA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-B7HFOWFB.js.map → copy-FWIVTLBO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-5ERJF64D.js.map → create-5433DP3G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-TXNRPS4K.js.map → create-VWLWS34Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-LX3LGBCH.js.map → delete-IYTIYAJS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-S3WVK6LP.js.map → delete-Y2SGJBGY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-YSM4LZQD.js.map → deps-6TSPOSGU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-GWSNH7OZ.js.map → deps-CZ4PTVXU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-R3LUKMX7.js.map → extension-Q34OEWO5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-VNMRKIHI.js.map → extension-WH2FOIOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-GMGLIQ5I.js.map → get-PCHS7RA6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-SBL6NHYQ.js.map → get-QARTE6BL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-XCWRXBXC.js.map → history-7WUAEWHW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-6UKSZTRT.js.map → history-L2FQFRTU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-KICKUCR7.js.map → history-compact-3EJ3L2O7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-IDH7E7VN.js.map → history-compact-LW27IPFK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-JJWH3QWK.js.map → history-redact-G72A4EJ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-HKYBTK6X.js.map → history-redact-QWQCX5DZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-27JLDUO2.js.map → init-4BKRHGWW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-OQA3TWIS.js.map → init-S5WEGUJY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-L7VQUSVI.js.map → learnings-HQXSSKZ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-Z4GAIZQ5.js.map → learnings-XK3P4ZDR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-W5ROBC5U.js.map → list-6CL3XFT6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-6U3CJVXS.js.map → list-BYNN4ZEO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-JJDOEDFK.js.map → notes-5T6P7C5V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-SDCK7BEN.js.map → notes-U5FZCSBT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-QGRFMDWA.js.map → register-list-query-4UPMHONX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-V4S23735.js.map → register-list-query-7VOW2C3W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-GNI2W5CN.js.map → restore-CHIOQAQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-RGFSPG4K.js.map → restore-M6AFHMV4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-CCDU3RLC.js.map → schema-76HDZJCC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-KZASL323.js.map → schema-AINZ2IMM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-7KSOLI2E.js.map → search-JMLFQEPJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-DTL7CO22.js.map → search-NL3TSCYB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-QNV7B2CE.js.map → stats-BKXCBIGT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-IOXQMGI6.js.map → stats-UBD56TGK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-NHR5RFXT.js.map → telemetry-N454RHG5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-IV5C6JOM.js.map → telemetry-ZJXK3H7X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-PIL2CEEB.js.map → test-BQAKIXAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-4Z37CXW4.js.map → test-O74JFUH5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-MFN4MYCV.js.map → test-all-7LV3I6S5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-GRLYHBNP.js.map → test-all-TDYCCBA4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-7WCSC3TY.js.map → test-runs-E64M6XS3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-7LRFWWCA.js.map → test-runs-LXZLULCI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-I4G34LKJ.js.map → update-36JM7YZT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-VI5DBZ3G.js.map → update-I246PCLO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-UYMTVF42.js.map → update-many-F4IKDWZB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-LOTAYUTN.js.map → update-many-NTWZ5YT3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-ZZSC7CLV.js.map → upgrade-37F7JKES.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-LT2MLLPS.js.map → upgrade-L32JA4TZ.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b92552cc-f7d2-5100-a23c-bb53d8445bc6")}catch(e){}}();
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import { realpathSync } from "node:fs";
|
|
5
5
|
import { execFile } from "node:child_process";
|
|
@@ -19,6 +19,9 @@ import { nowIso } from "../../core/shared/time.js";
|
|
|
19
19
|
import { listAllFrontMatterWithBody } from "../../core/store/item-store.js";
|
|
20
20
|
import { getSettingsPath, resolvePmRoot } from "../../core/store/paths.js";
|
|
21
21
|
import { readSettings } from "../../core/store/settings.js";
|
|
22
|
+
import { partitionFixesByGrant, planCloseReasonBackfillFixes, planResolutionBackfillFixes, planStaleLinkPruneFixes, planTerminalParentFixes, resolveGrantedFixScopes, toFixOutputRow, } from "../../core/validate/fix-planning.js";
|
|
23
|
+
import { buildMissingByTypeCounts } from "../../core/validate/missing-by-type.js";
|
|
24
|
+
import { classifyStaleLinkedPaths, summarizeStaleLinkedPathClassifications, } from "../../core/validate/stale-file-classification.js";
|
|
22
25
|
import { extractReferencedPmItemIdsFromCommand } from "./test.js";
|
|
23
26
|
const FILE_SCAN_DIRECTORIES = ["src", "tests", "docs"];
|
|
24
27
|
const FILE_SCAN_ROOT_FILES = [
|
|
@@ -540,17 +543,38 @@ function resolveRequestedChecks(options) {
|
|
|
540
543
|
requested.add("command_references");
|
|
541
544
|
}
|
|
542
545
|
if (requested.size === 0) {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
+
// Remediation flags without explicit --check-* flags scope the run to the
|
|
547
|
+
// checks that can produce fixes: --auto-fix plans metadata/resolution
|
|
548
|
+
// backfills and gated lifecycle fixes; --prune-missing needs the files
|
|
549
|
+
// scan. With neither, the historical run-everything default applies.
|
|
550
|
+
if (options.autoFix) {
|
|
551
|
+
requested.add("metadata");
|
|
552
|
+
requested.add("resolution");
|
|
553
|
+
requested.add("lifecycle");
|
|
554
|
+
}
|
|
555
|
+
if (options.pruneMissing) {
|
|
556
|
+
requested.add("files");
|
|
557
|
+
}
|
|
558
|
+
if (requested.size === 0) {
|
|
559
|
+
requested.add("metadata");
|
|
560
|
+
requested.add("resolution");
|
|
561
|
+
requested.add("lifecycle");
|
|
562
|
+
requested.add("files");
|
|
563
|
+
requested.add("command_references");
|
|
564
|
+
requested.add("history_drift");
|
|
565
|
+
}
|
|
566
|
+
return requested;
|
|
567
|
+
}
|
|
568
|
+
// Explicit check flags are respected as-is, except --prune-missing always
|
|
569
|
+
// needs the files scan it acts on.
|
|
570
|
+
if (options.pruneMissing) {
|
|
546
571
|
requested.add("files");
|
|
547
|
-
requested.add("command_references");
|
|
548
|
-
requested.add("history_drift");
|
|
549
572
|
}
|
|
550
573
|
return requested;
|
|
551
574
|
}
|
|
552
575
|
function buildMetadataCheck(items, metadataPolicy, statusRegistry, verboseDiagnostics) {
|
|
553
576
|
const missingByField = Object.fromEntries(SUPPORTED_METADATA_REQUIRED_FIELDS.map((field) => [field, []]));
|
|
577
|
+
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
554
578
|
for (const item of items) {
|
|
555
579
|
for (const field of SUPPORTED_METADATA_REQUIRED_FIELDS) {
|
|
556
580
|
if (!isMetadataFieldMissing(item, field, statusRegistry)) {
|
|
@@ -582,6 +606,18 @@ function buildMetadataCheck(items, metadataPolicy, statusRegistry, verboseDiagno
|
|
|
582
606
|
counts[countKey] = value;
|
|
583
607
|
}
|
|
584
608
|
}
|
|
609
|
+
// Per-item-type grouping of missing required-field counts (pm-pmyq /
|
|
610
|
+
// GH-172): counts only — never row dumps — and only for the ACTIVE required
|
|
611
|
+
// fields, so the grouping mirrors `counts` at type granularity (e.g.
|
|
612
|
+
// `{ Task: { close_reason: 3 } }`). Zero-suppressed at both levels.
|
|
613
|
+
const missingFieldOccurrences = [];
|
|
614
|
+
for (const field of metadataPolicy.required_fields) {
|
|
615
|
+
for (const itemId of missingByField[field] ?? []) {
|
|
616
|
+
const itemType = itemsById.get(itemId)?.type;
|
|
617
|
+
missingFieldOccurrences.push({ item_type: typeof itemType === "string" && itemType.length > 0 ? itemType : "Unknown", field });
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
const missingByType = buildMissingByTypeCounts(missingFieldOccurrences);
|
|
585
621
|
const details = {
|
|
586
622
|
checked_items: items.length,
|
|
587
623
|
metadata_profile: metadataPolicy.profile,
|
|
@@ -590,6 +626,7 @@ function buildMetadataCheck(items, metadataPolicy, statusRegistry, verboseDiagno
|
|
|
590
626
|
required_fields: [...metadataPolicy.required_fields],
|
|
591
627
|
supported_required_fields: [...SUPPORTED_METADATA_REQUIRED_FIELDS],
|
|
592
628
|
counts,
|
|
629
|
+
missing_by_type: missingByType,
|
|
593
630
|
};
|
|
594
631
|
if (metadataPolicy.configured_custom_fields.length > 0) {
|
|
595
632
|
details.configured_custom_required_fields = [...metadataPolicy.configured_custom_fields];
|
|
@@ -616,6 +653,16 @@ function buildMetadataCheck(items, metadataPolicy, statusRegistry, verboseDiagno
|
|
|
616
653
|
details[idsKey] = summarized.values;
|
|
617
654
|
details[truncatedKey] = summarized.truncated;
|
|
618
655
|
}
|
|
656
|
+
// Auto-fix planning input (pm-c3sz): closed items flagged for a missing
|
|
657
|
+
// close_reason whose resolution can serve as the derivable source value.
|
|
658
|
+
// Only collected when close_reason is an active required field, so fixes
|
|
659
|
+
// always trace back to an actual finding of this run.
|
|
660
|
+
const closeReasonBackfillRows = metadataPolicy.required_fields.includes("close_reason")
|
|
661
|
+
? (missingByField.close_reason ?? []).map((itemId) => ({
|
|
662
|
+
id: itemId,
|
|
663
|
+
resolution: toNonEmptyStringOrUndefined(itemsById.get(itemId)?.resolution),
|
|
664
|
+
}))
|
|
665
|
+
: [];
|
|
619
666
|
return {
|
|
620
667
|
check: {
|
|
621
668
|
name: "metadata",
|
|
@@ -623,6 +670,7 @@ function buildMetadataCheck(items, metadataPolicy, statusRegistry, verboseDiagno
|
|
|
623
670
|
details,
|
|
624
671
|
},
|
|
625
672
|
warnings: warningTokens,
|
|
673
|
+
closeReasonBackfillRows,
|
|
626
674
|
};
|
|
627
675
|
}
|
|
628
676
|
function buildResolutionCheck(items, statusRegistry, verboseDiagnostics) {
|
|
@@ -630,6 +678,7 @@ function buildResolutionCheck(items, statusRegistry, verboseDiagnostics) {
|
|
|
630
678
|
terminalDoneStatuses.add(statusRegistry.close_status);
|
|
631
679
|
const closedItems = items.filter((item) => terminalDoneStatuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
|
|
632
680
|
const missingResolutionRows = [];
|
|
681
|
+
const resolutionBackfillRows = [];
|
|
633
682
|
for (const item of closedItems) {
|
|
634
683
|
const missingFields = RESOLUTION_FIELD_KEYS.filter((field) => !toNonEmptyStringOrUndefined(item[field]));
|
|
635
684
|
if (missingFields.length === 0) {
|
|
@@ -639,6 +688,13 @@ function buildResolutionCheck(items, statusRegistry, verboseDiagnostics) {
|
|
|
639
688
|
id: item.id,
|
|
640
689
|
missing_fields: missingFields,
|
|
641
690
|
});
|
|
691
|
+
// Auto-fix planning input (pm-c3sz): the planner backfills only the
|
|
692
|
+
// `resolution` field, deriving from the item's close_reason when present.
|
|
693
|
+
resolutionBackfillRows.push({
|
|
694
|
+
id: item.id,
|
|
695
|
+
missing_fields: missingFields,
|
|
696
|
+
close_reason: toNonEmptyStringOrUndefined(item.close_reason),
|
|
697
|
+
});
|
|
642
698
|
}
|
|
643
699
|
const warnings = missingResolutionRows.length > 0 ? [`validate_resolution_missing_fields:${missingResolutionRows.length}`] : [];
|
|
644
700
|
const diagnosticLimit = verboseDiagnostics ? Number.POSITIVE_INFINITY : DIAGNOSTIC_LIST_SUMMARY_LIMIT;
|
|
@@ -659,6 +715,7 @@ function buildResolutionCheck(items, statusRegistry, verboseDiagnostics) {
|
|
|
659
715
|
},
|
|
660
716
|
},
|
|
661
717
|
warnings,
|
|
718
|
+
resolutionBackfillRows,
|
|
662
719
|
};
|
|
663
720
|
}
|
|
664
721
|
function buildLifecycleDependencyGraph(activeItems) {
|
|
@@ -782,6 +839,7 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
782
839
|
const activeItems = items.filter((item) => !isTerminalStatus(item.status, statusRegistry));
|
|
783
840
|
const closureLikeRows = [];
|
|
784
841
|
const terminalParentRows = [];
|
|
842
|
+
const terminalParentFixRows = [];
|
|
785
843
|
const staleBlockerRows = [];
|
|
786
844
|
for (const item of activeItems) {
|
|
787
845
|
const closureLikeFields = Object.entries(lifecyclePatternPolicy.closure_like_metadata_field_patterns)
|
|
@@ -810,6 +868,17 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
810
868
|
parent_id: parent.id,
|
|
811
869
|
parent_status: parent.status,
|
|
812
870
|
});
|
|
871
|
+
// Gated lifecycle auto-fix input (pm-8jss): when the terminal parent
|
|
872
|
+
// has its own ACTIVE parent, the child can be reparented one level up;
|
|
873
|
+
// otherwise the suggested fix clears the parent link.
|
|
874
|
+
const grandparentId = toMeaningfulString(parent.parent);
|
|
875
|
+
const grandparent = grandparentId ? itemsById.get(grandparentId) : undefined;
|
|
876
|
+
terminalParentFixRows.push({
|
|
877
|
+
id: item.id,
|
|
878
|
+
parent_id: parent.id,
|
|
879
|
+
grandparent_id: grandparent?.id,
|
|
880
|
+
grandparent_active: grandparent !== undefined && !isTerminalStatus(grandparent.status, statusRegistry),
|
|
881
|
+
});
|
|
813
882
|
}
|
|
814
883
|
}
|
|
815
884
|
if (includeStaleBlockers) {
|
|
@@ -849,6 +918,7 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
849
918
|
}
|
|
850
919
|
closureLikeRows.sort((left, right) => left.id.localeCompare(right.id));
|
|
851
920
|
terminalParentRows.sort((left, right) => left.id.localeCompare(right.id) || left.parent_id.localeCompare(right.parent_id));
|
|
921
|
+
terminalParentFixRows.sort((left, right) => left.id.localeCompare(right.id) || left.parent_id.localeCompare(right.parent_id));
|
|
852
922
|
staleBlockerRows.sort((left, right) => left.id.localeCompare(right.id));
|
|
853
923
|
const dependencyCycleDiagnostics = detectLifecycleDependencyCycles(activeItems);
|
|
854
924
|
const warnings = [];
|
|
@@ -912,32 +982,44 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
912
982
|
},
|
|
913
983
|
},
|
|
914
984
|
warnings,
|
|
985
|
+
terminalParentFixRows,
|
|
915
986
|
};
|
|
916
987
|
}
|
|
917
988
|
async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, includePmInternals, verboseFileLists) {
|
|
918
989
|
const linkedProjectPaths = new Set();
|
|
919
990
|
const missingLinkedPaths = [];
|
|
991
|
+
const staleLinkRows = [];
|
|
920
992
|
for (const item of items) {
|
|
921
|
-
const
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
const
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
993
|
+
const linkedArtifactGroups = [
|
|
994
|
+
{ link_kind: "files", artifacts: item.files ?? [] },
|
|
995
|
+
{ link_kind: "docs", artifacts: item.docs ?? [] },
|
|
996
|
+
];
|
|
997
|
+
for (const group of linkedArtifactGroups) {
|
|
998
|
+
for (const artifact of group.artifacts) {
|
|
999
|
+
if (artifact.scope !== "project") {
|
|
1000
|
+
continue;
|
|
1001
|
+
}
|
|
1002
|
+
const normalizedPath = normalizeRelativePath(artifact.path);
|
|
1003
|
+
if (normalizedPath.length === 0) {
|
|
1004
|
+
continue;
|
|
1005
|
+
}
|
|
1006
|
+
linkedProjectPaths.add(normalizedPath);
|
|
1007
|
+
const absolutePath = path.isAbsolute(artifact.path) ? artifact.path : path.resolve(workspaceRoot, artifact.path);
|
|
1008
|
+
let missing = false;
|
|
1009
|
+
try {
|
|
1010
|
+
const stats = await fs.stat(absolutePath);
|
|
1011
|
+
if (!stats.isFile()) {
|
|
1012
|
+
missing = true;
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
catch {
|
|
1016
|
+
missing = true;
|
|
1017
|
+
}
|
|
1018
|
+
if (missing) {
|
|
935
1019
|
missingLinkedPaths.push(normalizedPath);
|
|
1020
|
+
staleLinkRows.push({ item_id: item.id, path: normalizedPath, link_kind: group.link_kind });
|
|
936
1021
|
}
|
|
937
1022
|
}
|
|
938
|
-
catch {
|
|
939
|
-
missingLinkedPaths.push(normalizedPath);
|
|
940
|
-
}
|
|
941
1023
|
}
|
|
942
1024
|
}
|
|
943
1025
|
const uniqueMissingLinkedPaths = [...new Set(missingLinkedPaths)].sort((left, right) => left.localeCompare(right));
|
|
@@ -964,6 +1046,20 @@ async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, inclu
|
|
|
964
1046
|
};
|
|
965
1047
|
}
|
|
966
1048
|
const orphanedFiles = candidateFiles.filter((candidate) => !linkedProjectPaths.has(candidate));
|
|
1049
|
+
// Stale-path classification (pm-0v2m / GH-184): a missing linked path whose
|
|
1050
|
+
// basename still exists in the candidate scan is reported as `moved` (with
|
|
1051
|
+
// relink candidates); otherwise it is `deleted` and safe to prune.
|
|
1052
|
+
const classifiedStalePaths = classifyStaleLinkedPaths(uniqueMissingLinkedPaths, candidateFiles);
|
|
1053
|
+
const classificationByPath = new Map(classifiedStalePaths.map((entry) => [entry.path, entry.classification]));
|
|
1054
|
+
const movedStalePathCount = classifiedStalePaths.filter((entry) => entry.classification === "moved").length;
|
|
1055
|
+
const staleLinkPruneRows = staleLinkRows
|
|
1056
|
+
.map((row) => ({
|
|
1057
|
+
...row,
|
|
1058
|
+
classification: classificationByPath.get(row.path) ?? "deleted",
|
|
1059
|
+
}))
|
|
1060
|
+
.sort((left, right) => left.item_id.localeCompare(right.item_id) ||
|
|
1061
|
+
left.path.localeCompare(right.path) ||
|
|
1062
|
+
left.link_kind.localeCompare(right.link_kind));
|
|
967
1063
|
const warnings = [];
|
|
968
1064
|
if (strictModeForcesPmInternals) {
|
|
969
1065
|
warnings.push("validate_files_tracked_all_strict_forces_pm_internals");
|
|
@@ -976,6 +1072,7 @@ async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, inclu
|
|
|
976
1072
|
}
|
|
977
1073
|
const summarizedMissing = summarizeFileList(uniqueMissingLinkedPaths, verboseFileLists);
|
|
978
1074
|
const summarizedOrphaned = summarizeFileList(orphanedFiles, verboseFileLists);
|
|
1075
|
+
const summarizedClassifications = summarizeFileList(summarizeStaleLinkedPathClassifications(classifiedStalePaths), verboseFileLists);
|
|
979
1076
|
return {
|
|
980
1077
|
check: {
|
|
981
1078
|
name: "files",
|
|
@@ -1008,6 +1105,10 @@ async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, inclu
|
|
|
1008
1105
|
missing_linked_paths_total: summarizedMissing.total,
|
|
1009
1106
|
missing_linked_paths: summarizedMissing.values,
|
|
1010
1107
|
missing_linked_paths_truncated: summarizedMissing.truncated,
|
|
1108
|
+
missing_linked_paths_moved_count: movedStalePathCount,
|
|
1109
|
+
missing_linked_paths_deleted_count: uniqueMissingLinkedPaths.length - movedStalePathCount,
|
|
1110
|
+
missing_linked_path_classifications: summarizedClassifications.values,
|
|
1111
|
+
missing_linked_path_classifications_truncated: summarizedClassifications.truncated,
|
|
1011
1112
|
orphaned_paths_count: orphanedFiles.length,
|
|
1012
1113
|
orphaned_paths_total: summarizedOrphaned.total,
|
|
1013
1114
|
orphaned_paths: summarizedOrphaned.values,
|
|
@@ -1015,6 +1116,7 @@ async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, inclu
|
|
|
1015
1116
|
},
|
|
1016
1117
|
},
|
|
1017
1118
|
warnings,
|
|
1119
|
+
staleLinkPruneRows,
|
|
1018
1120
|
};
|
|
1019
1121
|
}
|
|
1020
1122
|
async function buildHistoryDriftCheck(pmRoot, items, verboseDiagnostics) {
|
|
@@ -1115,7 +1217,110 @@ function buildCommandReferencesCheck(items, idPrefix, verboseDiagnostics) {
|
|
|
1115
1217
|
warnings,
|
|
1116
1218
|
};
|
|
1117
1219
|
}
|
|
1220
|
+
const VALIDATE_AUTO_FIX_MESSAGE = "pm validate auto-fix";
|
|
1221
|
+
/**
|
|
1222
|
+
* Apply one planned fix through the SAME audited command paths an operator
|
|
1223
|
+
* would use by hand (`pm update` / `pm files --remove` / `pm docs --remove`),
|
|
1224
|
+
* so every applied fix carries normal history, locking, and hook behavior.
|
|
1225
|
+
* Command modules are imported lazily: plain validate runs stay read-only and
|
|
1226
|
+
* never pay the mutation-stack import cost.
|
|
1227
|
+
*/
|
|
1228
|
+
async function applyValidateFix(fix, global) {
|
|
1229
|
+
switch (fix.kind) {
|
|
1230
|
+
case "set_resolution":
|
|
1231
|
+
case "set_close_reason":
|
|
1232
|
+
case "reparent":
|
|
1233
|
+
case "unset_parent": {
|
|
1234
|
+
const { runUpdate } = await import("./update.js");
|
|
1235
|
+
const updateOptions = { message: VALIDATE_AUTO_FIX_MESSAGE };
|
|
1236
|
+
if (fix.kind === "set_resolution") {
|
|
1237
|
+
updateOptions.resolution = fix.value;
|
|
1238
|
+
}
|
|
1239
|
+
else if (fix.kind === "set_close_reason") {
|
|
1240
|
+
updateOptions.closeReason = fix.value;
|
|
1241
|
+
}
|
|
1242
|
+
else if (fix.kind === "reparent") {
|
|
1243
|
+
updateOptions.parent = fix.parent_id;
|
|
1244
|
+
}
|
|
1245
|
+
else {
|
|
1246
|
+
updateOptions.unset = ["parent"];
|
|
1247
|
+
}
|
|
1248
|
+
await runUpdate(fix.item_id, updateOptions, global);
|
|
1249
|
+
return;
|
|
1250
|
+
}
|
|
1251
|
+
case "prune_file_link": {
|
|
1252
|
+
throw new Error(`Unsupported non-batched fix kind: ${fix.kind}`);
|
|
1253
|
+
}
|
|
1254
|
+
case "prune_doc_link": {
|
|
1255
|
+
throw new Error(`Unsupported non-batched fix kind: ${fix.kind}`);
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
function pruneBatchKey(fix) {
|
|
1260
|
+
if (fix.kind !== "prune_file_link" && fix.kind !== "prune_doc_link") {
|
|
1261
|
+
return null;
|
|
1262
|
+
}
|
|
1263
|
+
return `${fix.kind}:${fix.item_id}`;
|
|
1264
|
+
}
|
|
1265
|
+
async function applyValidateFixes(applicable, global) {
|
|
1266
|
+
const applied = [];
|
|
1267
|
+
const failed = [];
|
|
1268
|
+
const pruneBatches = new Map();
|
|
1269
|
+
for (const fix of applicable) {
|
|
1270
|
+
const batchKey = pruneBatchKey(fix);
|
|
1271
|
+
if (batchKey === null) {
|
|
1272
|
+
try {
|
|
1273
|
+
await applyValidateFix(fix, global);
|
|
1274
|
+
applied.push(fix);
|
|
1275
|
+
}
|
|
1276
|
+
catch (error) {
|
|
1277
|
+
failed.push({ fix, error });
|
|
1278
|
+
}
|
|
1279
|
+
continue;
|
|
1280
|
+
}
|
|
1281
|
+
const existing = pruneBatches.get(batchKey);
|
|
1282
|
+
if (existing) {
|
|
1283
|
+
existing.push(fix);
|
|
1284
|
+
}
|
|
1285
|
+
else {
|
|
1286
|
+
pruneBatches.set(batchKey, [fix]);
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
for (const batch of pruneBatches.values()) {
|
|
1290
|
+
const first = batch[0];
|
|
1291
|
+
if (!first) {
|
|
1292
|
+
continue;
|
|
1293
|
+
}
|
|
1294
|
+
const remove = batch
|
|
1295
|
+
.map((fix) => fix.path)
|
|
1296
|
+
.filter((value) => typeof value === "string" && value.length > 0);
|
|
1297
|
+
try {
|
|
1298
|
+
if (first.kind === "prune_file_link") {
|
|
1299
|
+
const { runFiles } = await import("./files.js");
|
|
1300
|
+
await runFiles(first.item_id, { remove, message: VALIDATE_AUTO_FIX_MESSAGE }, global);
|
|
1301
|
+
}
|
|
1302
|
+
else {
|
|
1303
|
+
const { runDocs } = await import("./docs.js");
|
|
1304
|
+
await runDocs(first.item_id, { remove, message: VALIDATE_AUTO_FIX_MESSAGE }, global);
|
|
1305
|
+
}
|
|
1306
|
+
applied.push(...batch);
|
|
1307
|
+
}
|
|
1308
|
+
catch (error) {
|
|
1309
|
+
failed.push(...batch.map((fix) => ({ fix, error })));
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
return { applied, failed };
|
|
1313
|
+
}
|
|
1118
1314
|
export async function runValidate(options, global) {
|
|
1315
|
+
const fixesRequested = options.autoFix === true || options.pruneMissing === true;
|
|
1316
|
+
if (options.dryRun === true && !fixesRequested) {
|
|
1317
|
+
throw new PmCliError("--dry-run requires --auto-fix or --prune-missing (there is nothing to preview otherwise).", EXIT_CODE.USAGE);
|
|
1318
|
+
}
|
|
1319
|
+
if (options.fixScope !== undefined && options.fixScope.length > 0 && options.autoFix !== true) {
|
|
1320
|
+
throw new PmCliError("--fix-scope requires --auto-fix.", EXIT_CODE.USAGE);
|
|
1321
|
+
}
|
|
1322
|
+
// Resolved up-front so unknown --fix-scope values fail fast before any scan.
|
|
1323
|
+
const grantedFixScopes = resolveGrantedFixScopes(options.fixScope);
|
|
1119
1324
|
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
1120
1325
|
if (!(await pathExists(getSettingsPath(pmRoot)))) {
|
|
1121
1326
|
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
@@ -1143,17 +1348,29 @@ export async function runValidate(options, global) {
|
|
|
1143
1348
|
checks.push(built.check);
|
|
1144
1349
|
warnings.push(...built.warnings);
|
|
1145
1350
|
};
|
|
1351
|
+
let closeReasonBackfillRows = [];
|
|
1352
|
+
let resolutionBackfillRows = [];
|
|
1353
|
+
let terminalParentFixRows = [];
|
|
1354
|
+
let staleLinkPruneRows = [];
|
|
1146
1355
|
if (requestedChecks.has("metadata")) {
|
|
1147
|
-
|
|
1356
|
+
const built = buildMetadataCheck(items, metadataPolicy, statusRegistry, Boolean(options.verboseDiagnostics));
|
|
1357
|
+
closeReasonBackfillRows = built.closeReasonBackfillRows;
|
|
1358
|
+
record(built);
|
|
1148
1359
|
}
|
|
1149
1360
|
if (requestedChecks.has("resolution")) {
|
|
1150
|
-
|
|
1361
|
+
const built = buildResolutionCheck(items, statusRegistry, Boolean(options.verboseDiagnostics));
|
|
1362
|
+
resolutionBackfillRows = built.resolutionBackfillRows;
|
|
1363
|
+
record(built);
|
|
1151
1364
|
}
|
|
1152
1365
|
if (requestedChecks.has("lifecycle")) {
|
|
1153
|
-
|
|
1366
|
+
const built = buildLifecycleCheck(items, Boolean(options.checkStaleBlockers), dependencyCycleSeverity, statusRegistry, lifecyclePatternPolicy, Boolean(options.verboseDiagnostics));
|
|
1367
|
+
terminalParentFixRows = built.terminalParentFixRows;
|
|
1368
|
+
record(built);
|
|
1154
1369
|
}
|
|
1155
1370
|
if (requestedChecks.has("files")) {
|
|
1156
|
-
|
|
1371
|
+
const built = await buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, Boolean(options.includePmInternals), Boolean(options.verboseFileLists));
|
|
1372
|
+
staleLinkPruneRows = built.staleLinkPruneRows;
|
|
1373
|
+
record(built);
|
|
1157
1374
|
}
|
|
1158
1375
|
if (requestedChecks.has("command_references")) {
|
|
1159
1376
|
record(buildCommandReferencesCheck(items, settings.id_prefix, Boolean(options.verboseDiagnostics)));
|
|
@@ -1161,6 +1378,52 @@ export async function runValidate(options, global) {
|
|
|
1161
1378
|
if (requestedChecks.has("history_drift")) {
|
|
1162
1379
|
record(await buildHistoryDriftCheck(pmRoot, items, Boolean(options.verboseDiagnostics)));
|
|
1163
1380
|
}
|
|
1381
|
+
// Remediation phase (pm-c3sz / pm-8jss / pm-0v2m). Plans are derived from
|
|
1382
|
+
// the findings of THIS run; checks above always report the pre-fix state.
|
|
1383
|
+
// Safe field backfills apply by default under --auto-fix; gated lifecycle
|
|
1384
|
+
// fixes are planned but withheld unless --fix-scope lifecycle grants them;
|
|
1385
|
+
// --dry-run previews without mutating; failures never abort the run.
|
|
1386
|
+
let fixes;
|
|
1387
|
+
if (fixesRequested) {
|
|
1388
|
+
const planned = [];
|
|
1389
|
+
if (options.autoFix === true) {
|
|
1390
|
+
planned.push(...planCloseReasonBackfillFixes(closeReasonBackfillRows));
|
|
1391
|
+
planned.push(...planResolutionBackfillFixes(resolutionBackfillRows));
|
|
1392
|
+
planned.push(...planTerminalParentFixes(terminalParentFixRows));
|
|
1393
|
+
}
|
|
1394
|
+
if (options.pruneMissing === true) {
|
|
1395
|
+
planned.push(...planStaleLinkPruneFixes(staleLinkPruneRows));
|
|
1396
|
+
}
|
|
1397
|
+
const { applicable, gated } = partitionFixesByGrant(planned, grantedFixScopes);
|
|
1398
|
+
const dryRun = options.dryRun === true;
|
|
1399
|
+
const appliedFixRows = [];
|
|
1400
|
+
const failedFixRows = [];
|
|
1401
|
+
if (!dryRun) {
|
|
1402
|
+
const applied = await applyValidateFixes(applicable, global);
|
|
1403
|
+
appliedFixRows.push(...applied.applied.map(toFixOutputRow));
|
|
1404
|
+
failedFixRows.push(...applied.failed.map(({ fix, error }) => ({
|
|
1405
|
+
...toFixOutputRow(fix),
|
|
1406
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1407
|
+
})));
|
|
1408
|
+
}
|
|
1409
|
+
fixes = {
|
|
1410
|
+
mode: dryRun ? "dry_run" : "apply",
|
|
1411
|
+
auto_fix: options.autoFix === true,
|
|
1412
|
+
prune_missing: options.pruneMissing === true,
|
|
1413
|
+
granted_fix_scopes: [...grantedFixScopes].sort((left, right) => left.localeCompare(right)),
|
|
1414
|
+
planned_count: planned.length,
|
|
1415
|
+
applied_count: appliedFixRows.length,
|
|
1416
|
+
gated_count: gated.length,
|
|
1417
|
+
failed_count: failedFixRows.length,
|
|
1418
|
+
planned_fixes: planned.map(toFixOutputRow),
|
|
1419
|
+
applied_fixes: appliedFixRows,
|
|
1420
|
+
gated_fixes: gated.map((fix) => ({
|
|
1421
|
+
...toFixOutputRow(fix),
|
|
1422
|
+
gate_hint: `Withheld: re-run with --fix-scope ${fix.gate} to apply.`,
|
|
1423
|
+
})),
|
|
1424
|
+
failed_fixes: failedFixRows,
|
|
1425
|
+
};
|
|
1426
|
+
}
|
|
1164
1427
|
const normalizedWarnings = [...new Set(warnings)].sort((left, right) => left.localeCompare(right));
|
|
1165
1428
|
const hasErrors = checks.some((check) => check.status === "error");
|
|
1166
1429
|
return {
|
|
@@ -1168,8 +1431,9 @@ export async function runValidate(options, global) {
|
|
|
1168
1431
|
has_warnings: normalizedWarnings.length > 0,
|
|
1169
1432
|
checks,
|
|
1170
1433
|
warnings: normalizedWarnings,
|
|
1434
|
+
...(fixes !== undefined ? { fixes } : {}),
|
|
1171
1435
|
generated_at: nowIso(),
|
|
1172
1436
|
};
|
|
1173
1437
|
}
|
|
1174
1438
|
//# sourceMappingURL=validate.js.map
|
|
1175
|
-
//# debugId=
|
|
1439
|
+
//# debugId=b92552cc-f7d2-5100-a23c-bb53d8445bc6
|