@unbrained/pm-cli 2026.7.5 → 2026.7.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 +10 -0
- package/dist/cli-bundle/chunks/activity-WJCGCYPU.js +18 -0
- package/dist/cli-bundle/chunks/activity-Z6QUAUSG.js +22 -0
- package/dist/cli-bundle/chunks/aggregate-BDM6EIAR.js +25 -0
- package/dist/cli-bundle/chunks/aggregate-VQ2DHU3S.js +21 -0
- package/dist/cli-bundle/chunks/append-BGML6VLD.js +19 -0
- package/dist/cli-bundle/chunks/append-RKJYPU74.js +15 -0
- package/dist/cli-bundle/chunks/chunk-22KBU3MW.js +57 -0
- package/dist/cli-bundle/chunks/chunk-24YG75HI.js +634 -0
- package/dist/cli-bundle/chunks/chunk-2XG4IZON.js +218 -0
- package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js +228 -0
- package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js +2330 -0
- package/dist/cli-bundle/chunks/chunk-3N6RRO2Q.js +808 -0
- package/dist/cli-bundle/chunks/chunk-3N6RRO2Q.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-3UJRFJ5R.js +1573 -0
- package/dist/cli-bundle/chunks/chunk-3VHSI5FL.js +1001 -0
- package/dist/cli-bundle/chunks/chunk-425E4QL5.js +278 -0
- package/dist/cli-bundle/chunks/chunk-425E4QL5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-45FYNUFJ.js +38 -0
- package/dist/cli-bundle/chunks/chunk-45FYNUFJ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-46CUF5L6.js +1018 -0
- package/dist/cli-bundle/chunks/chunk-4CJFCTLM.js +222 -0
- package/dist/cli-bundle/chunks/chunk-4CJFCTLM.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js +249 -0
- package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js +819 -0
- package/dist/cli-bundle/chunks/chunk-4LELACOL.js +391 -0
- package/dist/cli-bundle/chunks/chunk-4LELACOL.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js +279 -0
- package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4ZBE5GUN.js +184 -0
- package/dist/cli-bundle/chunks/chunk-4ZBE5GUN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-57NWPFF2.js +5640 -0
- package/dist/cli-bundle/chunks/chunk-57NWPFF2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js +268 -0
- package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js +508 -0
- package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js +1868 -0
- package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js +1749 -0
- package/dist/cli-bundle/chunks/chunk-64YKRTSV.js +1961 -0
- package/dist/cli-bundle/chunks/chunk-6LLVNJXT.js +429 -0
- package/dist/cli-bundle/chunks/chunk-6QBJLYBP.js +120 -0
- package/dist/cli-bundle/chunks/chunk-6QBJLYBP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-7D7OOEYG.js +278 -0
- package/dist/cli-bundle/chunks/chunk-7D7OOEYG.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-7DT4WSH2.js +60 -0
- package/dist/cli-bundle/chunks/chunk-7WBAJSS6.js +102 -0
- package/dist/cli-bundle/chunks/chunk-AGHMOTGM.js +150 -0
- package/dist/cli-bundle/chunks/chunk-ALFPSEWO.js +112 -0
- package/dist/cli-bundle/chunks/chunk-AZYGZGGI.js +361 -0
- package/dist/cli-bundle/chunks/chunk-B6DUFX6H.js +1413 -0
- package/dist/cli-bundle/chunks/chunk-B6XS3R3O.js +275 -0
- package/dist/cli-bundle/chunks/chunk-B6XS3R3O.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js +421 -0
- package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js +1985 -0
- package/dist/cli-bundle/chunks/chunk-CFB33L7W.js +398 -0
- package/dist/cli-bundle/chunks/chunk-CFNGIXZP.js +784 -0
- package/dist/cli-bundle/chunks/chunk-CFNGIXZP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-CL36D4PC.js +225 -0
- package/dist/cli-bundle/chunks/chunk-COSPOP7H.js +6677 -0
- package/dist/cli-bundle/chunks/chunk-COSPOP7H.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-COWTDV6B.js +3461 -0
- package/dist/cli-bundle/chunks/chunk-COWTDV6B.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-CRVYGJUI.js +553 -0
- package/dist/cli-bundle/chunks/chunk-CRVYGJUI.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-D2XRLB55.js +645 -0
- package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js +1858 -0
- package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js +1063 -0
- package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js +1932 -0
- package/dist/cli-bundle/chunks/chunk-E42XTBSP.js +1359 -0
- package/dist/cli-bundle/chunks/chunk-E42XTBSP.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-EBRZZ54H.js +655 -0
- package/dist/cli-bundle/chunks/chunk-EBRZZ54H.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js +4712 -0
- package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-EGY6JBQ3.js +160 -0
- package/dist/cli-bundle/chunks/chunk-EKFNL33R.js +222 -0
- package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js +1704 -0
- package/dist/cli-bundle/chunks/chunk-EOKXK3R3.js +2046 -0
- package/dist/cli-bundle/chunks/chunk-F3K4JGFD.js +121 -0
- package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js +231 -0
- package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js +2090 -0
- package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-FT3QTERD.js +550 -0
- package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js +1570 -0
- package/dist/cli-bundle/chunks/chunk-G64OCSKU.js +444 -0
- package/dist/cli-bundle/chunks/chunk-GANUTS7W.js +1775 -0
- package/dist/cli-bundle/chunks/chunk-GBAX2ZAQ.js +401 -0
- package/dist/cli-bundle/chunks/chunk-GDDAGPWJ.js +105 -0
- package/dist/cli-bundle/chunks/chunk-GDDAGPWJ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js +239 -0
- package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GJ7QC5DJ.js +624 -0
- package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js +530 -0
- package/dist/cli-bundle/chunks/chunk-GZRDYONU.js +1005 -0
- package/dist/cli-bundle/chunks/chunk-HFDADVJZ.js +1356 -0
- package/dist/cli-bundle/chunks/chunk-HFDADVJZ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-HIHMT6WS.js +41 -0
- package/dist/cli-bundle/chunks/chunk-HIHMT6WS.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js +277 -0
- package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HOVCGJSD.js +293 -0
- package/dist/cli-bundle/chunks/chunk-HOVCGJSD.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-I36Y7PCE.js +38 -0
- package/dist/cli-bundle/chunks/chunk-I36Y7PCE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js +309 -0
- package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-IWVU4C2F.js +358 -0
- package/dist/cli-bundle/chunks/chunk-IX5BXEMX.js +267 -0
- package/dist/cli-bundle/chunks/chunk-JDDLOQAE.js +265 -0
- package/dist/cli-bundle/chunks/chunk-JJP45OEI.js +119 -0
- package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js +2257 -0
- package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-JVH7QBVV.js +24 -0
- package/dist/cli-bundle/chunks/chunk-JVH7QBVV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-K46RF36U.js +207 -0
- package/dist/cli-bundle/chunks/chunk-KERMZVY5.js +371 -0
- package/dist/cli-bundle/chunks/chunk-KERMZVY5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KGFUY7WN.js +814 -0
- package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js +76 -0
- package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KUOOJR35.js +260 -0
- package/dist/cli-bundle/chunks/chunk-L5PSPMZ4.js +277 -0
- package/dist/cli-bundle/chunks/chunk-LK6XLOGP.js +5799 -0
- package/dist/cli-bundle/chunks/chunk-LK6XLOGP.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js +140 -0
- package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-LPSSSDJR.js +1239 -0
- package/dist/cli-bundle/chunks/chunk-M7JNBQAD.js +225 -0
- package/dist/cli-bundle/chunks/chunk-M7JNBQAD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-MA4SM3QZ.js +655 -0
- package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js +1601 -0
- package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js +1031 -0
- package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js +995 -0
- package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js +296 -0
- package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-MLIYFOE7.js +357 -0
- package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js +2043 -0
- package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-MUH7A3FD.js +61 -0
- package/dist/cli-bundle/chunks/chunk-MVSP7WGJ.js +108 -0
- package/dist/cli-bundle/chunks/chunk-MVSP7WGJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-MVYWGY2A.js +262 -0
- package/dist/cli-bundle/chunks/chunk-MWMVPCIE.js +1423 -0
- package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js +2033 -0
- package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-N745W3B3.js +1604 -0
- package/dist/cli-bundle/chunks/chunk-N745W3B3.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NB7RLQFW.js +57 -0
- package/dist/cli-bundle/chunks/chunk-NB7RLQFW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NC33K5ZS.js +123 -0
- package/dist/cli-bundle/chunks/chunk-NC33K5ZS.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NGXQ3PFT.js +263 -0
- package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js +1615 -0
- package/dist/cli-bundle/chunks/chunk-NO442GWJ.js +41 -0
- package/dist/cli-bundle/chunks/chunk-NO442GWJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NZEHECMW.js +658 -0
- package/dist/cli-bundle/chunks/chunk-NZEHECMW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-O6AWCQRQ.js +124 -0
- package/dist/cli-bundle/chunks/chunk-OGWQ2IEP.js +240 -0
- package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js +143 -0
- package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-QLMX7SRD.js +210 -0
- package/dist/cli-bundle/chunks/chunk-QX6HM775.js +398 -0
- package/dist/cli-bundle/chunks/chunk-QX6HM775.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-R5BMJX33.js +27 -0
- package/dist/cli-bundle/chunks/chunk-R5BMJX33.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RCQZK2GO.js +296 -0
- package/dist/cli-bundle/chunks/chunk-RCQZK2GO.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RFNYTESG.js +520 -0
- package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js +79 -0
- package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js +282 -0
- package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js +274 -0
- package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SCUR7K7N.js +2198 -0
- package/dist/cli-bundle/chunks/chunk-SGMFPXKR.js +68 -0
- package/dist/cli-bundle/chunks/chunk-SGMFPXKR.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js +1977 -0
- package/dist/cli-bundle/chunks/chunk-SMB7RV23.js +130 -0
- package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js +1041 -0
- package/dist/cli-bundle/chunks/chunk-SQOIV3OQ.js +563 -0
- package/dist/cli-bundle/chunks/chunk-SQOIV3OQ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SQYJ4HF2.js +1765 -0
- package/dist/cli-bundle/chunks/chunk-T42JWV3F.js +822 -0
- package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js +6567 -0
- package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-TULGS6X6.js +2132 -0
- package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js +2306 -0
- package/dist/cli-bundle/chunks/chunk-UH7T2DAX.js +181 -0
- package/dist/cli-bundle/chunks/chunk-UH7T2DAX.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js +4773 -0
- package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-VPIM42PC.js +367 -0
- package/dist/cli-bundle/chunks/chunk-VQRSPVME.js +368 -0
- package/dist/cli-bundle/chunks/chunk-VQRSPVME.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-W3DSJQIO.js +447 -0
- package/dist/cli-bundle/chunks/chunk-W572BIEB.js +1249 -0
- package/dist/cli-bundle/chunks/chunk-W6DYWXPQ.js +1073 -0
- package/dist/cli-bundle/chunks/chunk-W6DYWXPQ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js +3423 -0
- package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-WLSM645P.js +2247 -0
- package/dist/cli-bundle/chunks/chunk-WLSM645P.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-WRTENIX3.js +215 -0
- package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js +388 -0
- package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-XB7KFVFI.js +533 -0
- package/dist/cli-bundle/chunks/chunk-XC5BURG2.js +306 -0
- package/dist/cli-bundle/chunks/chunk-XC5BURG2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js +424 -0
- package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XG625QP4.js +58 -0
- package/dist/cli-bundle/chunks/chunk-XHET7YUZ.js +71 -0
- package/dist/cli-bundle/chunks/chunk-XHET7YUZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XUC7PI2H.js +243 -0
- package/dist/cli-bundle/chunks/chunk-Y46GD4IX.js +116 -0
- package/dist/cli-bundle/chunks/chunk-Y4M7CPQP.js +804 -0
- package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js +2128 -0
- package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-YN7Y6DQZ.js +426 -0
- package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js +511 -0
- package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZGK4L4JM.js +133 -0
- package/dist/cli-bundle/chunks/chunk-ZJ262CED.js +394 -0
- package/dist/cli-bundle/chunks/chunk-ZJ262CED.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js +299 -0
- package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZSUS2OD3.js +2105 -0
- package/dist/cli-bundle/chunks/chunk-ZWBEPGD7.js +54 -0
- package/dist/cli-bundle/chunks/chunk-ZWBEPGD7.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ZZD4J5XY.js +1570 -0
- package/dist/cli-bundle/chunks/claim-RFS7BROJ.js +19 -0
- package/dist/cli-bundle/chunks/claim-XP5AWZ5H.js +23 -0
- package/dist/cli-bundle/chunks/close-2SSSHHUZ.js +20 -0
- package/dist/cli-bundle/chunks/close-GEANHQ2J.js +16 -0
- package/dist/cli-bundle/chunks/close-many-CMZW7ITN.js +31 -0
- package/dist/cli-bundle/chunks/close-many-ZFDIG6M7.js +27 -0
- package/dist/cli-bundle/chunks/comments-MFSYVNNU.js +21 -0
- package/dist/cli-bundle/chunks/comments-XUBPXDYX.js +17 -0
- package/dist/cli-bundle/chunks/config-D7XQMONX.js +18 -0
- package/dist/cli-bundle/chunks/config-T4FHBSYN.js +22 -0
- package/dist/cli-bundle/chunks/context-DIU275XI.js +48 -0
- package/dist/cli-bundle/chunks/context-JCOYB4LZ.js +44 -0
- package/dist/cli-bundle/chunks/contracts-BVO7CSLK.js +12 -0
- package/dist/cli-bundle/chunks/contracts-NYPEW2G4.js +16 -0
- package/dist/cli-bundle/chunks/copy-32ROBIDL.js +17 -0
- package/dist/cli-bundle/chunks/copy-NAGLGMHZ.js +13 -0
- package/dist/cli-bundle/chunks/create-4V7SWNBB.js +30 -0
- package/dist/cli-bundle/chunks/create-E77SDCUP.js +34 -0
- package/dist/cli-bundle/chunks/delete-NQI5OSKN.js +14 -0
- package/dist/cli-bundle/chunks/delete-RA5KTCLB.js +18 -0
- package/dist/cli-bundle/chunks/deps-32SU7HO5.js +21 -0
- package/dist/cli-bundle/chunks/deps-T7SCWXEX.js +17 -0
- package/dist/cli-bundle/chunks/docs-RRUPT7O2.js +22 -0
- package/dist/cli-bundle/chunks/docs-WL2IWGWV.js +18 -0
- package/dist/cli-bundle/chunks/eval-NF2J5SHR.js +23 -0
- package/dist/cli-bundle/chunks/eval-SKDT3MZU.js +27 -0
- package/dist/cli-bundle/chunks/extension-LAXKCAYE.js +42 -0
- package/dist/cli-bundle/chunks/extension-LAXKCAYE.js.map +1 -0
- package/dist/cli-bundle/chunks/extension-ZISPBRBC.js +38 -0
- package/dist/cli-bundle/chunks/extension-ZISPBRBC.js.map +7 -0
- package/dist/cli-bundle/chunks/files-EWRQHGIS.js +22 -0
- package/dist/cli-bundle/chunks/files-EWRQHGIS.js.map +7 -0
- package/dist/cli-bundle/chunks/files-PYKR2UUG.js +26 -0
- package/dist/cli-bundle/chunks/files-PYKR2UUG.js.map +1 -0
- package/dist/cli-bundle/chunks/focus-4T7TM4MT.js +18 -0
- package/dist/cli-bundle/chunks/focus-4T7TM4MT.js.map +1 -0
- package/dist/cli-bundle/chunks/focus-L3YUASOD.js +14 -0
- package/dist/cli-bundle/chunks/focus-L3YUASOD.js.map +7 -0
- package/dist/cli-bundle/chunks/gc-2DNMPXMC.js +16 -0
- package/dist/cli-bundle/chunks/gc-2DNMPXMC.js.map +1 -0
- package/dist/cli-bundle/chunks/gc-2PCTYYRI.js +12 -0
- package/dist/cli-bundle/chunks/gc-2PCTYYRI.js.map +7 -0
- package/dist/cli-bundle/chunks/get-7DMITJ3G.js +23 -0
- package/dist/cli-bundle/chunks/get-7DMITJ3G.js.map +1 -0
- package/dist/cli-bundle/chunks/get-VKQXCXLL.js +19 -0
- package/dist/cli-bundle/chunks/get-VKQXCXLL.js.map +7 -0
- package/dist/cli-bundle/chunks/health-CVSTAR2F.js +31 -0
- package/dist/cli-bundle/chunks/health-CVSTAR2F.js.map +7 -0
- package/dist/cli-bundle/chunks/health-TV3GKTFN.js +35 -0
- package/dist/cli-bundle/chunks/health-TV3GKTFN.js.map +1 -0
- package/dist/cli-bundle/chunks/history-D4JUX5XV.js +20 -0
- package/dist/cli-bundle/chunks/history-D4JUX5XV.js.map +7 -0
- package/dist/cli-bundle/chunks/history-LQ2UWZTE.js +24 -0
- package/dist/cli-bundle/chunks/history-LQ2UWZTE.js.map +1 -0
- package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js +29 -0
- package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js.map +1 -0
- package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js +25 -0
- package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js.map +7 -0
- package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js +21 -0
- package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js.map +7 -0
- package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js +25 -0
- package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js.map +1 -0
- package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js +23 -0
- package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js.map +7 -0
- package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js +27 -0
- package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js.map +1 -0
- package/dist/cli-bundle/chunks/init-C3LJPWQZ.js +30 -0
- package/dist/cli-bundle/chunks/init-C3LJPWQZ.js.map +1 -0
- package/dist/cli-bundle/chunks/init-J3DPGWQI.js +26 -0
- package/dist/cli-bundle/chunks/init-J3DPGWQI.js.map +7 -0
- package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js +21 -0
- package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js.map +1 -0
- package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js +17 -0
- package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js.map +7 -0
- package/dist/cli-bundle/chunks/list-O5NZVSPN.js +36 -0
- package/dist/cli-bundle/chunks/list-O5NZVSPN.js.map +1 -0
- package/dist/cli-bundle/chunks/list-Z55YCNTC.js +32 -0
- package/dist/cli-bundle/chunks/list-Z55YCNTC.js.map +7 -0
- package/dist/cli-bundle/chunks/next-GBNTGXFC.js +28 -0
- package/dist/cli-bundle/chunks/next-GBNTGXFC.js.map +7 -0
- package/dist/cli-bundle/chunks/next-QKW7PTKE.js +32 -0
- package/dist/cli-bundle/chunks/next-QKW7PTKE.js.map +1 -0
- package/dist/cli-bundle/chunks/notes-R5FZTKWF.js +17 -0
- package/dist/cli-bundle/chunks/notes-R5FZTKWF.js.map +7 -0
- package/dist/cli-bundle/chunks/notes-WCGIULVG.js +21 -0
- package/dist/cli-bundle/chunks/notes-WCGIULVG.js.map +1 -0
- package/dist/cli-bundle/chunks/plan-ADISFYH4.js +29 -0
- package/dist/cli-bundle/chunks/plan-ADISFYH4.js.map +7 -0
- package/dist/cli-bundle/chunks/plan-CHVE7PBR.js +33 -0
- package/dist/cli-bundle/chunks/plan-CHVE7PBR.js.map +1 -0
- package/dist/cli-bundle/chunks/profile-LD23PSI6.js +37 -0
- package/dist/cli-bundle/chunks/profile-LD23PSI6.js.map +7 -0
- package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js +41 -0
- package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js.map +1 -0
- package/dist/cli-bundle/chunks/register-list-query-B42JCCOI.js +409 -0
- package/dist/cli-bundle/chunks/register-list-query-OEYQHFXO.js +419 -0
- package/dist/cli-bundle/chunks/register-mutation-3QXIHCQG.js +1273 -0
- package/dist/cli-bundle/chunks/register-mutation-IAEST26S.js +1256 -0
- package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js +19 -0
- package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js.map +7 -0
- package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js +23 -0
- package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js.map +1 -0
- package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js +324 -0
- package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js.map +7 -0
- package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js +321 -0
- package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js.map +1 -0
- package/dist/cli-bundle/chunks/restore-5RQHAPMA.js +23 -0
- package/dist/cli-bundle/chunks/restore-5RQHAPMA.js.map +1 -0
- package/dist/cli-bundle/chunks/restore-PNEIBBLW.js +19 -0
- package/dist/cli-bundle/chunks/restore-PNEIBBLW.js.map +7 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js +29 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js.map +1 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js +25 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js.map +7 -0
- package/dist/cli-bundle/chunks/schema-245WW4G2.js +78 -0
- package/dist/cli-bundle/chunks/schema-245WW4G2.js.map +1 -0
- package/dist/cli-bundle/chunks/schema-HBORFC6B.js +74 -0
- package/dist/cli-bundle/chunks/schema-HBORFC6B.js.map +7 -0
- package/dist/cli-bundle/chunks/search-AOZC5SIK.js +34 -0
- package/dist/cli-bundle/chunks/search-AOZC5SIK.js.map +7 -0
- package/dist/cli-bundle/chunks/search-DRXPGHD7.js +38 -0
- package/dist/cli-bundle/chunks/search-DRXPGHD7.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-NJG4NLHG.js +21 -0
- package/dist/cli-bundle/chunks/stats-NJG4NLHG.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-RG6AG4N2.js +17 -0
- package/dist/cli-bundle/chunks/stats-RG6AG4N2.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js +14 -0
- package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js +18 -0
- package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js.map +1 -0
- package/dist/cli-bundle/chunks/test-6CMOCWUC.js +39 -0
- package/dist/cli-bundle/chunks/test-6CMOCWUC.js.map +7 -0
- package/dist/cli-bundle/chunks/test-RI7XHBZL.js +43 -0
- package/dist/cli-bundle/chunks/test-RI7XHBZL.js.map +1 -0
- package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js +29 -0
- package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-QEIORFYW.js +33 -0
- package/dist/cli-bundle/chunks/test-all-QEIORFYW.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js +28 -0
- package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js +24 -0
- package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js.map +7 -0
- package/dist/cli-bundle/chunks/update-QVJDFEAP.js +30 -0
- package/dist/cli-bundle/chunks/update-QVJDFEAP.js.map +1 -0
- package/dist/cli-bundle/chunks/update-VQVHAY6X.js +26 -0
- package/dist/cli-bundle/chunks/update-VQVHAY6X.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js +37 -0
- package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js +41 -0
- package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js.map +1 -0
- package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js +24 -0
- package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js.map +7 -0
- package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js +28 -0
- package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js.map +1 -0
- package/dist/cli-bundle/chunks/validate-4NTXSB62.js +36 -0
- package/dist/cli-bundle/chunks/validate-4NTXSB62.js.map +1 -0
- package/dist/cli-bundle/chunks/validate-MUFXQZMI.js +32 -0
- package/dist/cli-bundle/chunks/validate-MUFXQZMI.js.map +7 -0
- package/dist/cli-bundle/main.js +16 -16
- package/dist/cli-bundle/sdk-runtime.js +88 -28
- package/dist/cli-bundle/sdk-testing.js +6 -6
- package/dist/cli-bundle/sdk.js +92 -49
- package/dist/cli-bundle/sdk.js.map +2 -2
- package/dist/mcp/server.d.ts +22 -50
- package/dist/mcp/server.js +62 -916
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/index.d.ts +4 -2
- package/dist/sdk/index.js +4 -4
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +168 -4
- package/dist/sdk/runtime.js +1149 -25
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/workspace-contracts-cache.d.ts +17 -0
- package/dist/sdk/workspace-contracts-cache.js +36 -0
- package/dist/sdk/workspace-contracts-cache.js.map +1 -0
- package/docs/RELEASING.md +3 -1
- package/docs/SDK.md +46 -0
- package/docs/examples/sdk-app-embedding/run-embedded-pm.mjs +16 -2
- package/docs/examples/sdk-contract-consumer/inspect-contracts.mjs +16 -1
- package/package.json +1 -1
- package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +0 -18
- package/dist/cli-bundle/chunks/activity-YKAKZTZ4.js +0 -22
- package/dist/cli-bundle/chunks/aggregate-EQX2RGB7.js +0 -375
- package/dist/cli-bundle/chunks/aggregate-EQX2RGB7.js.map +0 -7
- package/dist/cli-bundle/chunks/aggregate-PEGZGJXD.js +0 -372
- package/dist/cli-bundle/chunks/aggregate-PEGZGJXD.js.map +0 -1
- package/dist/cli-bundle/chunks/append-CZGUZ45Q.js +0 -73
- package/dist/cli-bundle/chunks/append-CZGUZ45Q.js.map +0 -7
- package/dist/cli-bundle/chunks/append-NSQBCXZJ.js +0 -70
- package/dist/cli-bundle/chunks/append-NSQBCXZJ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js +0 -1413
- package/dist/cli-bundle/chunks/chunk-3PL6LEKP.js +0 -1961
- package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js +0 -1749
- package/dist/cli-bundle/chunks/chunk-3Y4OESPP.js +0 -277
- package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js +0 -822
- package/dist/cli-bundle/chunks/chunk-4OFLJHX6.js +0 -356
- package/dist/cli-bundle/chunks/chunk-4QQ6PM7M.js +0 -1249
- package/dist/cli-bundle/chunks/chunk-53BTLLAF.js +0 -2181
- package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-57C2RLW5.js +0 -1704
- package/dist/cli-bundle/chunks/chunk-5B3X4Y22.js +0 -2330
- package/dist/cli-bundle/chunks/chunk-5J2XPTAD.js +0 -225
- package/dist/cli-bundle/chunks/chunk-5JE6SMYS.js +0 -262
- package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js +0 -995
- package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js +0 -5789
- package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js +0 -819
- package/dist/cli-bundle/chunks/chunk-7EQNAZX2.js +0 -1018
- package/dist/cli-bundle/chunks/chunk-7MDXZAZS.js +0 -102
- package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js +0 -2046
- package/dist/cli-bundle/chunks/chunk-7WYXBPYQ.js +0 -358
- package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js +0 -150
- package/dist/cli-bundle/chunks/chunk-ABRA3BHY.js +0 -429
- package/dist/cli-bundle/chunks/chunk-BFVHCAOO.js +0 -240
- package/dist/cli-bundle/chunks/chunk-BVEUCSH2.js +0 -530
- package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js +0 -160
- package/dist/cli-bundle/chunks/chunk-D3UCE7RW.js +0 -243
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +0 -275
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js +0 -634
- package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js +0 -231
- package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js +0 -2184
- package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EEY54JMF.js +0 -60
- package/dist/cli-bundle/chunks/chunk-EZFKWSC7.js +0 -1615
- package/dist/cli-bundle/chunks/chunk-FDBARR33.js +0 -655
- package/dist/cli-bundle/chunks/chunk-FGQKEDE4.js +0 -447
- package/dist/cli-bundle/chunks/chunk-FJRKQREY.js +0 -228
- package/dist/cli-bundle/chunks/chunk-FUM6UMY4.js +0 -804
- package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js +0 -3237
- package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HBYZDSK5.js +0 -426
- package/dist/cli-bundle/chunks/chunk-HJE4JTKQ.js +0 -124
- package/dist/cli-bundle/chunks/chunk-HK72NWAD.js +0 -1570
- package/dist/cli-bundle/chunks/chunk-IJ6CO3JV.js +0 -645
- package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js +0 -3206
- package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JLA7EVYV.js +0 -222
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +0 -76
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-K3AGVXSF.js +0 -444
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +0 -79
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +0 -915
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KLG4ZULO.js +0 -218
- package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js +0 -2105
- package/dist/cli-bundle/chunks/chunk-MNZ7DRNC.js +0 -1858
- package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js +0 -2198
- package/dist/cli-bundle/chunks/chunk-MZ7VNEVY.js +0 -520
- package/dist/cli-bundle/chunks/chunk-N6DNM2FA.js +0 -116
- package/dist/cli-bundle/chunks/chunk-N7X4WP6L.js +0 -1041
- package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js +0 -2132
- package/dist/cli-bundle/chunks/chunk-NER3KUUS.js +0 -260
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +0 -918
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OESSOFJ4.js +0 -1985
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +0 -238
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OWTIRHX4.js +0 -112
- package/dist/cli-bundle/chunks/chunk-P3VRG72Q.js +0 -1765
- package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js +0 -1423
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +0 -1977
- package/dist/cli-bundle/chunks/chunk-PDXT6Q55.js +0 -58
- package/dist/cli-bundle/chunks/chunk-PJ3A56YF.js +0 -1239
- package/dist/cli-bundle/chunks/chunk-PPAJG4GB.js +0 -1031
- package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js +0 -4725
- package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QHZO65XW.js +0 -1775
- package/dist/cli-bundle/chunks/chunk-R3ZBLGTC.js +0 -814
- package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js +0 -624
- package/dist/cli-bundle/chunks/chunk-RX3HQSYG.js +0 -265
- package/dist/cli-bundle/chunks/chunk-S4APD35C.js +0 -210
- package/dist/cli-bundle/chunks/chunk-S5AYOUT5.js +0 -130
- package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js +0 -1149
- package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-T35XLYZF.js +0 -263
- package/dist/cli-bundle/chunks/chunk-T3ABIMGW.js +0 -361
- package/dist/cli-bundle/chunks/chunk-T3F4DF23.js +0 -267
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +0 -272
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js +0 -5354
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TSPKZRRW.js +0 -1570
- package/dist/cli-bundle/chunks/chunk-TT42JUMF.js +0 -207
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +0 -165
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js +0 -4786
- package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +0 -1932
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +0 -175
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VZIYHZDX.js +0 -1868
- package/dist/cli-bundle/chunks/chunk-WISPVC2E.js +0 -401
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js +0 -5434
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js +0 -1152
- package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Y76TWC45.js +0 -550
- package/dist/cli-bundle/chunks/chunk-YD5FML7K.js +0 -5630
- package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YFIE7YK6.js +0 -57
- package/dist/cli-bundle/chunks/chunk-YMABYTNG.js +0 -1573
- package/dist/cli-bundle/chunks/chunk-YOF5VPKM.js +0 -119
- package/dist/cli-bundle/chunks/chunk-YPPVU5GX.js +0 -398
- package/dist/cli-bundle/chunks/chunk-YQMMMONE.js +0 -133
- package/dist/cli-bundle/chunks/chunk-YSAH5FY5.js +0 -1001
- package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js +0 -1005
- package/dist/cli-bundle/chunks/chunk-Z2CRRZYF.js +0 -215
- package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js +0 -533
- package/dist/cli-bundle/chunks/chunk-ZCJAA3JK.js +0 -121
- package/dist/cli-bundle/chunks/chunk-ZD34OFFQ.js +0 -366
- package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js +0 -2306
- package/dist/cli-bundle/chunks/chunk-ZMD35NYG.js +0 -61
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +0 -241
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +0 -7
- package/dist/cli-bundle/chunks/claim-4DROPSIS.js +0 -144
- package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +0 -1
- package/dist/cli-bundle/chunks/claim-VX54TV5U.js +0 -147
- package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +0 -7
- package/dist/cli-bundle/chunks/close-3YRR3XY6.js +0 -20
- package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +0 -16
- package/dist/cli-bundle/chunks/close-many-AP4MWU36.js +0 -397
- package/dist/cli-bundle/chunks/close-many-AP4MWU36.js.map +0 -1
- package/dist/cli-bundle/chunks/close-many-OMZIGZB4.js +0 -400
- package/dist/cli-bundle/chunks/close-many-OMZIGZB4.js.map +0 -7
- package/dist/cli-bundle/chunks/comments-MIW5MZOX.js +0 -128
- package/dist/cli-bundle/chunks/comments-MIW5MZOX.js.map +0 -7
- package/dist/cli-bundle/chunks/comments-SAG5LSKL.js +0 -125
- package/dist/cli-bundle/chunks/comments-SAG5LSKL.js.map +0 -1
- package/dist/cli-bundle/chunks/config-DJJKZB5R.js +0 -1075
- package/dist/cli-bundle/chunks/config-DJJKZB5R.js.map +0 -7
- package/dist/cli-bundle/chunks/config-V57QD47V.js +0 -1065
- package/dist/cli-bundle/chunks/config-V57QD47V.js.map +0 -1
- package/dist/cli-bundle/chunks/context-4OQGIPSO.js +0 -45
- package/dist/cli-bundle/chunks/context-WLA6IAWE.js +0 -49
- package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +0 -12
- package/dist/cli-bundle/chunks/contracts-OJEXMKVW.js +0 -16
- package/dist/cli-bundle/chunks/copy-LEE6P6EM.js +0 -184
- package/dist/cli-bundle/chunks/copy-LEE6P6EM.js.map +0 -7
- package/dist/cli-bundle/chunks/copy-OTJOWFL6.js +0 -181
- package/dist/cli-bundle/chunks/copy-OTJOWFL6.js.map +0 -1
- package/dist/cli-bundle/chunks/create-WKOZKPQR.js +0 -30
- package/dist/cli-bundle/chunks/create-XWWQFQ6S.js +0 -34
- package/dist/cli-bundle/chunks/delete-62JQTYT4.js +0 -59
- package/dist/cli-bundle/chunks/delete-62JQTYT4.js.map +0 -7
- package/dist/cli-bundle/chunks/delete-HQKGRNRZ.js +0 -56
- package/dist/cli-bundle/chunks/delete-HQKGRNRZ.js.map +0 -1
- package/dist/cli-bundle/chunks/deps-55FTG6Z5.js +0 -224
- package/dist/cli-bundle/chunks/deps-55FTG6Z5.js.map +0 -1
- package/dist/cli-bundle/chunks/deps-L2FPIAD3.js +0 -227
- package/dist/cli-bundle/chunks/deps-L2FPIAD3.js.map +0 -7
- package/dist/cli-bundle/chunks/docs-6CRCSVKK.js +0 -33
- package/dist/cli-bundle/chunks/docs-6CRCSVKK.js.map +0 -1
- package/dist/cli-bundle/chunks/docs-S6UTOTO5.js +0 -36
- package/dist/cli-bundle/chunks/docs-S6UTOTO5.js.map +0 -7
- package/dist/cli-bundle/chunks/eval-N6UHFWVO.js +0 -288
- package/dist/cli-bundle/chunks/eval-N6UHFWVO.js.map +0 -7
- package/dist/cli-bundle/chunks/eval-PHOTWYHI.js +0 -278
- package/dist/cli-bundle/chunks/eval-PHOTWYHI.js.map +0 -1
- package/dist/cli-bundle/chunks/extension-NBAH62ML.js +0 -40
- package/dist/cli-bundle/chunks/extension-ZF6ZZPOU.js +0 -44
- package/dist/cli-bundle/chunks/files-6P57MRKL.js +0 -301
- package/dist/cli-bundle/chunks/files-6P57MRKL.js.map +0 -7
- package/dist/cli-bundle/chunks/files-JPU3FNJ7.js +0 -298
- package/dist/cli-bundle/chunks/files-JPU3FNJ7.js.map +0 -1
- package/dist/cli-bundle/chunks/focus-LFZ6IDBR.js +0 -106
- package/dist/cli-bundle/chunks/focus-LFZ6IDBR.js.map +0 -1
- package/dist/cli-bundle/chunks/focus-WNMYCVYA.js +0 -109
- package/dist/cli-bundle/chunks/focus-WNMYCVYA.js.map +0 -7
- package/dist/cli-bundle/chunks/gc-AETFKZ44.js +0 -398
- package/dist/cli-bundle/chunks/gc-AETFKZ44.js.map +0 -7
- package/dist/cli-bundle/chunks/gc-RLBP4QVN.js +0 -388
- package/dist/cli-bundle/chunks/gc-RLBP4QVN.js.map +0 -1
- package/dist/cli-bundle/chunks/get-NH2MPBCI.js +0 -283
- package/dist/cli-bundle/chunks/get-NH2MPBCI.js.map +0 -1
- package/dist/cli-bundle/chunks/get-P4ZQXCPZ.js +0 -286
- package/dist/cli-bundle/chunks/get-P4ZQXCPZ.js.map +0 -7
- package/dist/cli-bundle/chunks/health-3GVPMQBL.js +0 -1612
- package/dist/cli-bundle/chunks/health-3GVPMQBL.js.map +0 -1
- package/dist/cli-bundle/chunks/health-DNTM72GJ.js +0 -1615
- package/dist/cli-bundle/chunks/health-DNTM72GJ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-RYKLC72X.js +0 -20
- package/dist/cli-bundle/chunks/history-SGPYRAFT.js +0 -24
- package/dist/cli-bundle/chunks/history-compact-3F6VELO7.js +0 -565
- package/dist/cli-bundle/chunks/history-compact-3F6VELO7.js.map +0 -7
- package/dist/cli-bundle/chunks/history-compact-656Y2TN4.js +0 -555
- package/dist/cli-bundle/chunks/history-compact-656Y2TN4.js.map +0 -1
- package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +0 -21
- package/dist/cli-bundle/chunks/history-redact-54ICFKXM.js +0 -25
- package/dist/cli-bundle/chunks/history-repair-4N6SDVHK.js +0 -281
- package/dist/cli-bundle/chunks/history-repair-4N6SDVHK.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-EVTO6LIH.js +0 -278
- package/dist/cli-bundle/chunks/history-repair-EVTO6LIH.js.map +0 -1
- package/dist/cli-bundle/chunks/init-RPIPQUNV.js +0 -32
- package/dist/cli-bundle/chunks/init-SKQAESQS.js +0 -28
- package/dist/cli-bundle/chunks/learnings-2HTPZNGZ.js +0 -48
- package/dist/cli-bundle/chunks/learnings-2HTPZNGZ.js.map +0 -7
- package/dist/cli-bundle/chunks/learnings-YBIHY3D6.js +0 -45
- package/dist/cli-bundle/chunks/learnings-YBIHY3D6.js.map +0 -1
- package/dist/cli-bundle/chunks/list-64LHZ3HM.js +0 -32
- package/dist/cli-bundle/chunks/list-7LXBTEKI.js +0 -36
- package/dist/cli-bundle/chunks/next-7ODPAQ4U.js +0 -306
- package/dist/cli-bundle/chunks/next-7ODPAQ4U.js.map +0 -7
- package/dist/cli-bundle/chunks/next-ODJUM4ZM.js +0 -303
- package/dist/cli-bundle/chunks/next-ODJUM4ZM.js.map +0 -1
- package/dist/cli-bundle/chunks/notes-72YXN5JX.js +0 -48
- package/dist/cli-bundle/chunks/notes-72YXN5JX.js.map +0 -7
- package/dist/cli-bundle/chunks/notes-NJ7IQJX4.js +0 -45
- package/dist/cli-bundle/chunks/notes-NJ7IQJX4.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-R4NDQ27E.js +0 -1366
- package/dist/cli-bundle/chunks/plan-R4NDQ27E.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-XWY5T67S.js +0 -1363
- package/dist/cli-bundle/chunks/plan-XWY5T67S.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +0 -397
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +0 -400
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-5H66WFYF.js +0 -419
- package/dist/cli-bundle/chunks/register-list-query-FB3FNDLZ.js +0 -409
- package/dist/cli-bundle/chunks/register-mutation-UJO23C7R.js +0 -1256
- package/dist/cli-bundle/chunks/register-mutation-Z2ETYHKS.js +0 -1273
- package/dist/cli-bundle/chunks/register-operations-A3XAM5J7.js +0 -513
- package/dist/cli-bundle/chunks/register-operations-A3XAM5J7.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-SG7HBSUP.js +0 -516
- package/dist/cli-bundle/chunks/register-operations-SG7HBSUP.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-I45OGJUV.js +0 -323
- package/dist/cli-bundle/chunks/register-setup-I45OGJUV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-K6U3NVY5.js +0 -326
- package/dist/cli-bundle/chunks/register-setup-K6U3NVY5.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +0 -19
- package/dist/cli-bundle/chunks/restore-YJ2ET6AT.js +0 -23
- package/dist/cli-bundle/chunks/scheduling-shortcuts-SSC4MYWQ.js +0 -91
- package/dist/cli-bundle/chunks/scheduling-shortcuts-SSC4MYWQ.js.map +0 -7
- package/dist/cli-bundle/chunks/scheduling-shortcuts-ULRG7MNP.js +0 -88
- package/dist/cli-bundle/chunks/scheduling-shortcuts-ULRG7MNP.js.map +0 -1
- package/dist/cli-bundle/chunks/schema-2PUXCZ25.js +0 -74
- package/dist/cli-bundle/chunks/schema-Y6DXXK2F.js +0 -78
- package/dist/cli-bundle/chunks/search-3S72CTD6.js +0 -38
- package/dist/cli-bundle/chunks/search-WNUNBQXO.js +0 -34
- package/dist/cli-bundle/chunks/stats-IJYTRQGV.js +0 -250
- package/dist/cli-bundle/chunks/stats-IJYTRQGV.js.map +0 -7
- package/dist/cli-bundle/chunks/stats-L2D5Y2O5.js +0 -240
- package/dist/cli-bundle/chunks/stats-L2D5Y2O5.js.map +0 -1
- package/dist/cli-bundle/chunks/telemetry-L2CVOKVN.js +0 -309
- package/dist/cli-bundle/chunks/telemetry-L2CVOKVN.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-QBYWQA76.js +0 -306
- package/dist/cli-bundle/chunks/telemetry-QBYWQA76.js.map +0 -1
- package/dist/cli-bundle/chunks/test-DQ2QFJ7W.js +0 -45
- package/dist/cli-bundle/chunks/test-W7QBLVJS.js +0 -41
- package/dist/cli-bundle/chunks/test-all-636NTRTT.js +0 -434
- package/dist/cli-bundle/chunks/test-all-636NTRTT.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-DWYK3RG6.js +0 -437
- package/dist/cli-bundle/chunks/test-all-DWYK3RG6.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-245OINZR.js +0 -28
- package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +0 -24
- package/dist/cli-bundle/chunks/update-SFLZPJXX.js +0 -30
- package/dist/cli-bundle/chunks/update-SJZ6S77U.js +0 -26
- package/dist/cli-bundle/chunks/update-many-DC7X3EWM.js +0 -671
- package/dist/cli-bundle/chunks/update-many-DC7X3EWM.js.map +0 -7
- package/dist/cli-bundle/chunks/update-many-SLLAMHT7.js +0 -668
- package/dist/cli-bundle/chunks/update-many-SLLAMHT7.js.map +0 -1
- package/dist/cli-bundle/chunks/upgrade-HFFXLZJA.js +0 -290
- package/dist/cli-bundle/chunks/upgrade-HFFXLZJA.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-UYQKM7RF.js +0 -287
- package/dist/cli-bundle/chunks/upgrade-UYQKM7RF.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-PA4FDTOV.js +0 -2143
- package/dist/cli-bundle/chunks/validate-PA4FDTOV.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js +0 -2105
- package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-4XQIDNM5.js.map → activity-WJCGCYPU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-YKAKZTZ4.js.map → activity-Z6QUAUSG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-3YRR3XY6.js.map → aggregate-BDM6EIAR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-OB2Y4QP5.js.map → aggregate-VQ2DHU3S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-WLA6IAWE.js.map → append-BGML6VLD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-4OQGIPSO.js.map → append-RKJYPU74.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YFIE7YK6.js.map → chunk-22KBU3MW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DLQ4ZTCU.js.map → chunk-24YG75HI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KLG4ZULO.js.map → chunk-2XG4IZON.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FJRKQREY.js.map → chunk-3GCS5SKL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5B3X4Y22.js.map → chunk-3KTN6IBA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YMABYTNG.js.map → chunk-3UJRFJ5R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YSAH5FY5.js.map → chunk-3VHSI5FL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7EQNAZX2.js.map → chunk-46CUF5L6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-75U6M5ZD.js.map → chunk-4IWYTWGF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VZIYHZDX.js.map → chunk-5GZ7TDD6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3U3VEWK6.js.map → chunk-5VAA4YHR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3PL6LEKP.js.map → chunk-64YKRTSV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ABRA3BHY.js.map → chunk-6LLVNJXT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EEY54JMF.js.map → chunk-7DT4WSH2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7MDXZAZS.js.map → chunk-7WBAJSS6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AAEQMOC6.js.map → chunk-AGHMOTGM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OWTIRHX4.js.map → chunk-ALFPSEWO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T3ABIMGW.js.map → chunk-AZYGZGGI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3JZNEQBA.js.map → chunk-B6DUFX6H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OESSOFJ4.js.map → chunk-C5JBZRPU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YPPVU5GX.js.map → chunk-CFB33L7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5J2XPTAD.js.map → chunk-CL36D4PC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IJ6CO3JV.js.map → chunk-D2XRLB55.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MNZ7DRNC.js.map → chunk-DEWEK6AN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-US3T3W5J.js.map → chunk-E3SZTQ4K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-C3PMDWGX.js.map → chunk-EGY6JBQ3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JLA7EVYV.js.map → chunk-EKFNL33R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-57C2RLW5.js.map → chunk-ENGQOEUY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7QH7DHUB.js.map → chunk-EOKXK3R3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZCJAA3JK.js.map → chunk-F3K4JGFD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DRBV5UC2.js.map → chunk-FLZSGSQR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y76TWC45.js.map → chunk-FT3QTERD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HK72NWAD.js.map → chunk-G24G7ZAV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K3AGVXSF.js.map → chunk-G64OCSKU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QHZO65XW.js.map → chunk-GANUTS7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WISPVC2E.js.map → chunk-GBAX2ZAQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RCT3YJOK.js.map → chunk-GJ7QC5DJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BVEUCSH2.js.map → chunk-GPLPTGOV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YZIR4R3U.js.map → chunk-GZRDYONU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7WYXBPYQ.js.map → chunk-IWVU4C2F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T3F4DF23.js.map → chunk-IX5BXEMX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RX3HQSYG.js.map → chunk-JDDLOQAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YOF5VPKM.js.map → chunk-JJP45OEI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TT42JUMF.js.map → chunk-K46RF36U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R3ZBLGTC.js.map → chunk-KGFUY7WN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NER3KUUS.js.map → chunk-KUOOJR35.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3Y4OESPP.js.map → chunk-L5PSPMZ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PJ3A56YF.js.map → chunk-LPSSSDJR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FDBARR33.js.map → chunk-MA4SM3QZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PPAJG4GB.js.map → chunk-MFAZSEM5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5JZ7APJU.js.map → chunk-MFSCBT5Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4OFLJHX6.js.map → chunk-MLIYFOE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZMD35NYG.js.map → chunk-MUH7A3FD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5JE6SMYS.js.map → chunk-MVYWGY2A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P5TFTLWW.js.map → chunk-MWMVPCIE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T35XLYZF.js.map → chunk-NGXQ3PFT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EZFKWSC7.js.map → chunk-NMP5I3I5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HJE4JTKQ.js.map → chunk-O6AWCQRQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BFVHCAOO.js.map → chunk-OGWQ2IEP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S4APD35C.js.map → chunk-QLMX7SRD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MZ7VNEVY.js.map → chunk-RFNYTESG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MTTXDAK4.js.map → chunk-SCUR7K7N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P5YORJRH.js.map → chunk-SHQY2IDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S5AYOUT5.js.map → chunk-SMB7RV23.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N7X4WP6L.js.map → chunk-SPZ6DOGY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P3VRG72Q.js.map → chunk-SQYJ4HF2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4LRVSBO6.js.map → chunk-T42JWV3F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NBFCNJ7Q.js.map → chunk-TULGS6X6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZJB3UV5U.js.map → chunk-TZXRBVAM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZD34OFFQ.js.map → chunk-VPIM42PC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FGQKEDE4.js.map → chunk-W3DSJQIO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4QQ6PM7M.js.map → chunk-W572BIEB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z2CRRZYF.js.map → chunk-WRTENIX3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZAHXPXVY.js.map → chunk-XB7KFVFI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PDXT6Q55.js.map → chunk-XG625QP4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D3UCE7RW.js.map → chunk-XUC7PI2H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N6DNM2FA.js.map → chunk-Y46GD4IX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FUM6UMY4.js.map → chunk-Y4M7CPQP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HBYZDSK5.js.map → chunk-YN7Y6DQZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YQMMMONE.js.map → chunk-ZGK4L4JM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LEKT4K7I.js.map → chunk-ZSUS2OD3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TSPKZRRW.js.map → chunk-ZZD4J5XY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-HXJLKCRI.js.map → claim-RFS7BROJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-OJEXMKVW.js.map → claim-XP5AWZ5H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-XWWQFQ6S.js.map → close-2SSSHHUZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-WKOZKPQR.js.map → close-GEANHQ2J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-ZF6ZZPOU.js.map → close-many-CMZW7ITN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-NBAH62ML.js.map → close-many-ZFDIG6M7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-SGPYRAFT.js.map → comments-MFSYVNNU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-RYKLC72X.js.map → comments-XUBPXDYX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-4H3FCKF3.js.map → config-D7XQMONX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-54ICFKXM.js.map → config-T4FHBSYN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-RPIPQUNV.js.map → context-DIU275XI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-SKQAESQS.js.map → context-JCOYB4LZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-64LHZ3HM.js.map → contracts-BVO7CSLK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-7LXBTEKI.js.map → contracts-NYPEW2G4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-YJ2ET6AT.js.map → copy-32ROBIDL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-PXOFL6AM.js.map → copy-NAGLGMHZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-2PUXCZ25.js.map → create-4V7SWNBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-Y6DXXK2F.js.map → create-E77SDCUP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-WNUNBQXO.js.map → delete-NQI5OSKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-3S72CTD6.js.map → delete-RA5KTCLB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-DQ2QFJ7W.js.map → deps-32SU7HO5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-W7QBLVJS.js.map → deps-T7SCWXEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-245OINZR.js.map → docs-RRUPT7O2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-ZRD4GCTT.js.map → docs-WL2IWGWV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-SJZ6S77U.js.map → eval-NF2J5SHR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-SFLZPJXX.js.map → eval-SKDT3MZU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-FB3FNDLZ.js.map → register-list-query-B42JCCOI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-5H66WFYF.js.map → register-list-query-OEYQHFXO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-Z2ETYHKS.js.map → register-mutation-3QXIHCQG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-UJO23C7R.js.map → register-mutation-IAEST26S.js.map} +0 -0
|
@@ -1,2143 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
extractReferencedPmItemIdsFromCommand
|
|
3
|
-
} from "./chunk-OESSOFJ4.js";
|
|
4
|
-
import {
|
|
5
|
-
buildRemediationCommands
|
|
6
|
-
} from "./chunk-JINYH2DB.js";
|
|
7
|
-
import {
|
|
8
|
-
scanHistoryDrift
|
|
9
|
-
} from "./chunk-S4APD35C.js";
|
|
10
|
-
import {
|
|
11
|
-
isRemoteLinkedArtifactReference
|
|
12
|
-
} from "./chunk-7M2HAZEB.js";
|
|
13
|
-
import "./chunk-D3UCE7RW.js";
|
|
14
|
-
import "./chunk-BVEUCSH2.js";
|
|
15
|
-
import "./chunk-T3ABIMGW.js";
|
|
16
|
-
import "./chunk-YZIR4R3U.js";
|
|
17
|
-
import "./chunk-GIWXVMZ3.js";
|
|
18
|
-
import "./chunk-KDZ6K25I.js";
|
|
19
|
-
import "./chunk-ZVDL32GJ.js";
|
|
20
|
-
import "./chunk-E2FUG6GD.js";
|
|
21
|
-
import "./chunk-5HIZDR5A.js";
|
|
22
|
-
import "./chunk-R3ZBLGTC.js";
|
|
23
|
-
import "./chunk-UI5BJ6DO.js";
|
|
24
|
-
import "./chunk-C3PMDWGX.js";
|
|
25
|
-
import "./chunk-4QQ6PM7M.js";
|
|
26
|
-
import {
|
|
27
|
-
listAllFrontMatterWithBody
|
|
28
|
-
} from "./chunk-3U3VEWK6.js";
|
|
29
|
-
import "./chunk-Y76TWC45.js";
|
|
30
|
-
import {
|
|
31
|
-
CURRENT_ITEM_FORMAT_VERSION,
|
|
32
|
-
effectiveItemFormatVersion,
|
|
33
|
-
normalizeStatusInput,
|
|
34
|
-
scanItemFormatVersions
|
|
35
|
-
} from "./chunk-EZFKWSC7.js";
|
|
36
|
-
import {
|
|
37
|
-
nowIso
|
|
38
|
-
} from "./chunk-DRBV5UC2.js";
|
|
39
|
-
import {
|
|
40
|
-
PmCliError,
|
|
41
|
-
getActiveExtensionRegistrations,
|
|
42
|
-
readSettings,
|
|
43
|
-
resolveEstimateDefaultMinutes
|
|
44
|
-
} from "./chunk-P5YORJRH.js";
|
|
45
|
-
import "./chunk-T35XLYZF.js";
|
|
46
|
-
import "./chunk-7C2O74AE.js";
|
|
47
|
-
import {
|
|
48
|
-
DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS,
|
|
49
|
-
DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS,
|
|
50
|
-
EXIT_CODE,
|
|
51
|
-
PM_DIRNAME,
|
|
52
|
-
getSettingsPath,
|
|
53
|
-
pathExists,
|
|
54
|
-
resolveItemTypeRegistry,
|
|
55
|
-
resolvePmRoot,
|
|
56
|
-
resolveRuntimeStatusRegistry,
|
|
57
|
-
toNonEmptyStringOrUndefined
|
|
58
|
-
} from "./chunk-5VVUKE3U.js";
|
|
59
|
-
|
|
60
|
-
// dist/cli/commands/validate.js
|
|
61
|
-
import fs from "node:fs/promises";
|
|
62
|
-
import { realpathSync } from "node:fs";
|
|
63
|
-
import { execFile } from "node:child_process";
|
|
64
|
-
import path from "node:path";
|
|
65
|
-
import { promisify } from "node:util";
|
|
66
|
-
|
|
67
|
-
// dist/core/validate/fix-planning.js
|
|
68
|
-
!(function() {
|
|
69
|
-
try {
|
|
70
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
71
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "efc3e5f9-0d68-50a9-a99c-b86ddd13c4ed");
|
|
72
|
-
} catch (e2) {
|
|
73
|
-
}
|
|
74
|
-
})();
|
|
75
|
-
var DEFAULT_GRANTED_FIX_SCOPES = ["metadata", "resolution"];
|
|
76
|
-
var SUPPORTED_FIX_SCOPES = ["metadata", "resolution", "estimates", "lifecycle"];
|
|
77
|
-
var DEFAULT_RESOLUTION_BACKFILL_VALUE = "completed";
|
|
78
|
-
function quoteForCommand(value) {
|
|
79
|
-
return `"${value.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
|
|
80
|
-
}
|
|
81
|
-
function toMeaningfulValue(value) {
|
|
82
|
-
const trimmed = value?.trim();
|
|
83
|
-
return trimmed !== void 0 && trimmed.length > 0 ? trimmed : void 0;
|
|
84
|
-
}
|
|
85
|
-
function planResolutionBackfillFixes(rows) {
|
|
86
|
-
const fixes = [];
|
|
87
|
-
for (const row of rows) {
|
|
88
|
-
if (!row.missing_fields.includes("resolution")) {
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
const value = toMeaningfulValue(row.close_reason) ?? DEFAULT_RESOLUTION_BACKFILL_VALUE;
|
|
92
|
-
fixes.push({
|
|
93
|
-
item_id: row.id,
|
|
94
|
-
check: "resolution",
|
|
95
|
-
field: "resolution",
|
|
96
|
-
kind: "set_resolution",
|
|
97
|
-
value,
|
|
98
|
-
command: `pm update ${row.id} --resolution ${quoteForCommand(value)}`,
|
|
99
|
-
gate: "resolution"
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
return fixes;
|
|
103
|
-
}
|
|
104
|
-
function planCloseReasonBackfillFixes(rows) {
|
|
105
|
-
const fixes = [];
|
|
106
|
-
for (const row of rows) {
|
|
107
|
-
const value = toMeaningfulValue(row.resolution);
|
|
108
|
-
if (value === void 0) {
|
|
109
|
-
continue;
|
|
110
|
-
}
|
|
111
|
-
fixes.push({
|
|
112
|
-
item_id: row.id,
|
|
113
|
-
check: "metadata",
|
|
114
|
-
field: "close_reason",
|
|
115
|
-
kind: "set_close_reason",
|
|
116
|
-
value,
|
|
117
|
-
command: `pm update ${row.id} --close-reason ${quoteForCommand(value)}`,
|
|
118
|
-
gate: "metadata"
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
return fixes;
|
|
122
|
-
}
|
|
123
|
-
function planEstimateBackfillFixes(rows, overrides) {
|
|
124
|
-
return rows.map((row) => {
|
|
125
|
-
const minutes = resolveEstimateDefaultMinutes(row.type, overrides);
|
|
126
|
-
return {
|
|
127
|
-
item_id: row.id,
|
|
128
|
-
check: "metadata",
|
|
129
|
-
field: "estimated_minutes",
|
|
130
|
-
kind: "set_estimate",
|
|
131
|
-
value: String(minutes),
|
|
132
|
-
command: `pm update ${row.id} --estimate ${minutes}`,
|
|
133
|
-
gate: "estimates"
|
|
134
|
-
};
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
function planTerminalParentFixes(rows) {
|
|
138
|
-
return rows.map((row) => {
|
|
139
|
-
if (row.grandparent_id !== void 0 && row.grandparent_active === true) {
|
|
140
|
-
return {
|
|
141
|
-
item_id: row.id,
|
|
142
|
-
check: "lifecycle",
|
|
143
|
-
field: "parent",
|
|
144
|
-
kind: "reparent",
|
|
145
|
-
parent_id: row.grandparent_id,
|
|
146
|
-
command: `pm update ${row.id} --parent ${row.grandparent_id}`,
|
|
147
|
-
gate: "lifecycle"
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
return {
|
|
151
|
-
item_id: row.id,
|
|
152
|
-
check: "lifecycle",
|
|
153
|
-
field: "parent",
|
|
154
|
-
kind: "unset_parent",
|
|
155
|
-
command: `pm update ${row.id} --unset parent`,
|
|
156
|
-
gate: "lifecycle"
|
|
157
|
-
};
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
function planStaleLinkPruneFixes(rows) {
|
|
161
|
-
const fixes = [];
|
|
162
|
-
for (const row of rows) {
|
|
163
|
-
if (row.classification !== "deleted") {
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
const noun = row.link_kind === "files" ? "files" : "docs";
|
|
167
|
-
fixes.push({
|
|
168
|
-
item_id: row.item_id,
|
|
169
|
-
check: "files",
|
|
170
|
-
field: row.link_kind,
|
|
171
|
-
kind: row.link_kind === "files" ? "prune_file_link" : "prune_doc_link",
|
|
172
|
-
path: row.path,
|
|
173
|
-
command: `pm ${noun} ${row.item_id} --remove ${quoteForCommand(row.path)}`
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
return fixes;
|
|
177
|
-
}
|
|
178
|
-
function resolveGrantedFixScopes(rawScopes) {
|
|
179
|
-
const tokens = (rawScopes ?? []).flatMap((raw) => raw.split(",")).map((raw) => raw.trim()).filter((raw) => raw.length > 0);
|
|
180
|
-
if (tokens.length === 0) {
|
|
181
|
-
if (rawScopes !== void 0 && rawScopes.length > 0) {
|
|
182
|
-
throw new PmCliError(`--fix-scope values must not be empty. Supported values: ${SUPPORTED_FIX_SCOPES.join(", ")}.`, EXIT_CODE.USAGE);
|
|
183
|
-
}
|
|
184
|
-
return new Set(DEFAULT_GRANTED_FIX_SCOPES);
|
|
185
|
-
}
|
|
186
|
-
const granted = /* @__PURE__ */ new Set();
|
|
187
|
-
for (const raw of tokens) {
|
|
188
|
-
const normalized = raw.toLowerCase().replaceAll("-", "_");
|
|
189
|
-
if (SUPPORTED_FIX_SCOPES.includes(normalized)) {
|
|
190
|
-
granted.add(normalized);
|
|
191
|
-
continue;
|
|
192
|
-
}
|
|
193
|
-
throw new PmCliError(`Unknown --fix-scope value "${raw}". Supported values: ${SUPPORTED_FIX_SCOPES.join(", ")}.`, EXIT_CODE.USAGE);
|
|
194
|
-
}
|
|
195
|
-
return granted;
|
|
196
|
-
}
|
|
197
|
-
function partitionFixesByGrant(fixes, granted) {
|
|
198
|
-
const applicable = [];
|
|
199
|
-
const gated = [];
|
|
200
|
-
for (const fix of fixes) {
|
|
201
|
-
if (fix.gate !== void 0 && !granted.has(fix.gate)) {
|
|
202
|
-
gated.push(fix);
|
|
203
|
-
} else {
|
|
204
|
-
applicable.push(fix);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
return { applicable, gated };
|
|
208
|
-
}
|
|
209
|
-
function toFixOutputRow(fix) {
|
|
210
|
-
return {
|
|
211
|
-
item_id: fix.item_id,
|
|
212
|
-
check: fix.check,
|
|
213
|
-
field: fix.field,
|
|
214
|
-
command: fix.command,
|
|
215
|
-
...fix.gate !== void 0 ? { gate: fix.gate } : {}
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// dist/core/governance/issue-codes.js
|
|
220
|
-
!(function() {
|
|
221
|
-
try {
|
|
222
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
223
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ddde9a81-1cc4-589d-a05f-ebaa5195bac1");
|
|
224
|
-
} catch (e2) {
|
|
225
|
-
}
|
|
226
|
-
})();
|
|
227
|
-
var ISSUE_CODE_PATTERN = /^([A-Z][A-Z0-9]*-\d+)\b/;
|
|
228
|
-
function extractIssueCode(title) {
|
|
229
|
-
if (typeof title !== "string") {
|
|
230
|
-
return null;
|
|
231
|
-
}
|
|
232
|
-
const normalized = title.trim().toUpperCase();
|
|
233
|
-
if (normalized.length === 0) {
|
|
234
|
-
return null;
|
|
235
|
-
}
|
|
236
|
-
const match = ISSUE_CODE_PATTERN.exec(normalized);
|
|
237
|
-
return match ? match[1] : null;
|
|
238
|
-
}
|
|
239
|
-
function isNonEmptyIdReference(value) {
|
|
240
|
-
return typeof value === "string" && value.trim().length > 0;
|
|
241
|
-
}
|
|
242
|
-
function findDuplicateIssueCodes(items) {
|
|
243
|
-
const byCode = /* @__PURE__ */ new Map();
|
|
244
|
-
for (const item of items) {
|
|
245
|
-
if (typeof item.title !== "string") {
|
|
246
|
-
continue;
|
|
247
|
-
}
|
|
248
|
-
if (isNonEmptyIdReference(item.duplicate_of)) {
|
|
249
|
-
continue;
|
|
250
|
-
}
|
|
251
|
-
const code = extractIssueCode(item.title);
|
|
252
|
-
if (code === null) {
|
|
253
|
-
continue;
|
|
254
|
-
}
|
|
255
|
-
let entries = byCode.get(code);
|
|
256
|
-
if (!entries) {
|
|
257
|
-
entries = [];
|
|
258
|
-
byCode.set(code, entries);
|
|
259
|
-
}
|
|
260
|
-
if (!entries.some((entry) => entry.id === item.id)) {
|
|
261
|
-
entries.push({ id: item.id, title: item.title, parent: isNonEmptyIdReference(item.parent) ? item.parent.trim() : null });
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
const duplicates = [];
|
|
265
|
-
for (const [code, entries] of byCode) {
|
|
266
|
-
if (entries.length < 2) {
|
|
267
|
-
continue;
|
|
268
|
-
}
|
|
269
|
-
const idsInGroup = new Set(entries.map((entry) => entry.id.toLowerCase()));
|
|
270
|
-
const collisionEntries = entries.filter((entry) => entry.parent === null || !idsInGroup.has(entry.parent.toLowerCase()));
|
|
271
|
-
if (collisionEntries.length < 2) {
|
|
272
|
-
continue;
|
|
273
|
-
}
|
|
274
|
-
const sorted = [...collisionEntries].sort((left, right) => left.id.localeCompare(right.id));
|
|
275
|
-
duplicates.push({
|
|
276
|
-
code,
|
|
277
|
-
count: sorted.length,
|
|
278
|
-
ids: sorted.map((entry) => entry.id),
|
|
279
|
-
titles: sorted.map((entry) => entry.title)
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
return duplicates.sort((left, right) => left.code.localeCompare(right.code));
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
// dist/core/validate/missing-by-type.js
|
|
286
|
-
!(function() {
|
|
287
|
-
try {
|
|
288
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
289
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1fb67bf6-73f3-58f9-a2b3-4ef9aba339d6");
|
|
290
|
-
} catch (e2) {
|
|
291
|
-
}
|
|
292
|
-
})();
|
|
293
|
-
function buildMissingByTypeCounts(occurrences) {
|
|
294
|
-
const countsByType = /* @__PURE__ */ new Map();
|
|
295
|
-
for (const occurrence of occurrences) {
|
|
296
|
-
let fieldCounts = countsByType.get(occurrence.item_type);
|
|
297
|
-
if (!fieldCounts) {
|
|
298
|
-
fieldCounts = /* @__PURE__ */ new Map();
|
|
299
|
-
countsByType.set(occurrence.item_type, fieldCounts);
|
|
300
|
-
}
|
|
301
|
-
fieldCounts.set(occurrence.field, (fieldCounts.get(occurrence.field) ?? 0) + 1);
|
|
302
|
-
}
|
|
303
|
-
const result = {};
|
|
304
|
-
for (const type of [...countsByType.keys()].sort((left, right) => left.localeCompare(right))) {
|
|
305
|
-
const fieldCounts = countsByType.get(type);
|
|
306
|
-
const fields = {};
|
|
307
|
-
for (const field of [...fieldCounts.keys()].sort((left, right) => left.localeCompare(right))) {
|
|
308
|
-
fields[field] = fieldCounts.get(field);
|
|
309
|
-
}
|
|
310
|
-
result[type] = fields;
|
|
311
|
-
}
|
|
312
|
-
return result;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
// dist/core/validate/stale-file-classification.js
|
|
316
|
-
!(function() {
|
|
317
|
-
try {
|
|
318
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
319
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9e7c3521-173b-54a8-bd97-2af3e1db8316");
|
|
320
|
-
} catch (e2) {
|
|
321
|
-
}
|
|
322
|
-
})();
|
|
323
|
-
var DEFAULT_STALE_PATH_CANDIDATE_LIMIT = 3;
|
|
324
|
-
function basenameOf(relativePath) {
|
|
325
|
-
const lastSlash = Math.max(relativePath.lastIndexOf("/"), relativePath.lastIndexOf("\\"));
|
|
326
|
-
return lastSlash === -1 ? relativePath : relativePath.slice(lastSlash + 1);
|
|
327
|
-
}
|
|
328
|
-
function classifyStaleLinkedPaths(stalePaths, candidateFiles, candidateLimit = DEFAULT_STALE_PATH_CANDIDATE_LIMIT) {
|
|
329
|
-
const limit = Number.isFinite(candidateLimit) && candidateLimit >= 1 ? Math.floor(candidateLimit) : DEFAULT_STALE_PATH_CANDIDATE_LIMIT;
|
|
330
|
-
const candidatesByBasename = /* @__PURE__ */ new Map();
|
|
331
|
-
for (const candidate of candidateFiles) {
|
|
332
|
-
const basename = basenameOf(candidate);
|
|
333
|
-
if (basename.length === 0) {
|
|
334
|
-
continue;
|
|
335
|
-
}
|
|
336
|
-
const bucket = candidatesByBasename.get(basename);
|
|
337
|
-
if (bucket) {
|
|
338
|
-
bucket.push(candidate);
|
|
339
|
-
} else {
|
|
340
|
-
candidatesByBasename.set(basename, [candidate]);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
return stalePaths.map((stalePath) => {
|
|
344
|
-
const matches = (candidatesByBasename.get(basenameOf(stalePath)) ?? []).filter((candidate) => candidate !== stalePath).sort((left, right) => left.localeCompare(right));
|
|
345
|
-
if (matches.length === 0) {
|
|
346
|
-
return {
|
|
347
|
-
path: stalePath,
|
|
348
|
-
classification: "deleted",
|
|
349
|
-
candidates: [],
|
|
350
|
-
candidates_truncated: false
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
return {
|
|
354
|
-
path: stalePath,
|
|
355
|
-
classification: "moved",
|
|
356
|
-
candidates: matches.slice(0, limit),
|
|
357
|
-
candidates_truncated: matches.length > limit
|
|
358
|
-
};
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
function summarizeStaleLinkedPathClassifications(classified) {
|
|
362
|
-
return classified.map((entry) => entry.classification === "moved" ? `${entry.path}:moved:${entry.candidates[0]}` : `${entry.path}:deleted`);
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
// dist/core/validate/missing-link-owners.js
|
|
366
|
-
!(function() {
|
|
367
|
-
try {
|
|
368
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
369
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "950e74dc-b576-59a0-9c45-e718aa6644fc");
|
|
370
|
-
} catch (e2) {
|
|
371
|
-
}
|
|
372
|
-
})();
|
|
373
|
-
function preferClassification(current, next) {
|
|
374
|
-
return current === "moved" || next === "moved" ? "moved" : "deleted";
|
|
375
|
-
}
|
|
376
|
-
function ownerKey(input) {
|
|
377
|
-
return `${input.item_id} ${input.link_kind}`;
|
|
378
|
-
}
|
|
379
|
-
function buildMissingLinkedPathRows(rows, lookup) {
|
|
380
|
-
const buckets = /* @__PURE__ */ new Map();
|
|
381
|
-
for (const row of rows) {
|
|
382
|
-
const bucket = buckets.get(row.path);
|
|
383
|
-
if (bucket) {
|
|
384
|
-
bucket.classification = preferClassification(bucket.classification, row.classification);
|
|
385
|
-
bucket.owners.set(ownerKey(row), row);
|
|
386
|
-
} else {
|
|
387
|
-
buckets.set(row.path, {
|
|
388
|
-
classification: row.classification,
|
|
389
|
-
owners: /* @__PURE__ */ new Map([[ownerKey(row), row]])
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
return [...buckets.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([path2, bucket]) => ({
|
|
394
|
-
path: path2,
|
|
395
|
-
classification: bucket.classification,
|
|
396
|
-
items: [...bucket.owners.values()].map((owner) => {
|
|
397
|
-
const metadata = lookup(owner.item_id);
|
|
398
|
-
return {
|
|
399
|
-
id: owner.item_id,
|
|
400
|
-
type: metadata?.type ?? "Unknown",
|
|
401
|
-
title: metadata?.title ?? "",
|
|
402
|
-
status: metadata?.status ?? "",
|
|
403
|
-
field: owner.link_kind
|
|
404
|
-
};
|
|
405
|
-
}).sort((leftOwner, rightOwner) => {
|
|
406
|
-
const byId = leftOwner.id.localeCompare(rightOwner.id);
|
|
407
|
-
return byId !== 0 ? byId : leftOwner.field.localeCompare(rightOwner.field);
|
|
408
|
-
})
|
|
409
|
-
}));
|
|
410
|
-
}
|
|
411
|
-
function escapeTitle(title) {
|
|
412
|
-
return title.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
413
|
-
}
|
|
414
|
-
function summarizeMissingLinkedPathRows(rows) {
|
|
415
|
-
const lines = [];
|
|
416
|
-
for (const row of rows) {
|
|
417
|
-
for (const owner of row.items) {
|
|
418
|
-
lines.push(`${row.path}:${row.classification} owner=${owner.id} status=${owner.status} field=${owner.field} title="${escapeTitle(owner.title)}"`);
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
return lines;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
// dist/cli/commands/validate.js
|
|
425
|
-
!(function() {
|
|
426
|
-
try {
|
|
427
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
428
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e12634b8-369c-5ccf-99ad-ffd5ed8c0182");
|
|
429
|
-
} catch (e2) {
|
|
430
|
-
}
|
|
431
|
-
})();
|
|
432
|
-
var FILE_SCAN_DIRECTORIES = ["src", "tests", "docs"];
|
|
433
|
-
var FILE_SCAN_ROOT_FILES = [
|
|
434
|
-
"README.md",
|
|
435
|
-
"PRD.md",
|
|
436
|
-
"CHANGELOG.md",
|
|
437
|
-
"AGENTS.md",
|
|
438
|
-
"CONTRIBUTING.md",
|
|
439
|
-
"SECURITY.md",
|
|
440
|
-
"CODE_OF_CONDUCT.md",
|
|
441
|
-
"LICENSE"
|
|
442
|
-
];
|
|
443
|
-
var DIRECTORY_IGNORE_SET = /* @__PURE__ */ new Set(["node_modules", ".git", ".cursor", ".agents", "dist", "coverage"]);
|
|
444
|
-
var RESOLUTION_FIELD_KEYS = ["resolution", "expected_result", "actual_result"];
|
|
445
|
-
var VALIDATE_FILE_SCAN_MODES = ["default", "tracked-all", "tracked-all-strict"];
|
|
446
|
-
var VALIDATE_METADATA_PROFILE_VALUES = ["core", "strict", "custom"];
|
|
447
|
-
var VALIDATE_DEPENDENCY_CYCLE_SEVERITY_VALUES = ["off", "warn", "error"];
|
|
448
|
-
var CORE_METADATA_REQUIRED_FIELDS = ["author", "acceptance_criteria", "estimated_minutes", "close_reason"];
|
|
449
|
-
var STRICT_METADATA_REQUIRED_FIELDS = [
|
|
450
|
-
...CORE_METADATA_REQUIRED_FIELDS,
|
|
451
|
-
"reviewer",
|
|
452
|
-
"risk",
|
|
453
|
-
"confidence",
|
|
454
|
-
"sprint",
|
|
455
|
-
"release"
|
|
456
|
-
];
|
|
457
|
-
var SUPPORTED_METADATA_REQUIRED_FIELDS = Array.from(new Set(STRICT_METADATA_REQUIRED_FIELDS));
|
|
458
|
-
var METADATA_REQUIRED_FIELD_ALIASES = {
|
|
459
|
-
author: "author",
|
|
460
|
-
acceptance_criteria: "acceptance_criteria",
|
|
461
|
-
"acceptance-criteria": "acceptance_criteria",
|
|
462
|
-
estimated_minutes: "estimated_minutes",
|
|
463
|
-
"estimated-minutes": "estimated_minutes",
|
|
464
|
-
estimate: "estimated_minutes",
|
|
465
|
-
close_reason: "close_reason",
|
|
466
|
-
"close-reason": "close_reason",
|
|
467
|
-
reviewer: "reviewer",
|
|
468
|
-
risk: "risk",
|
|
469
|
-
confidence: "confidence",
|
|
470
|
-
sprint: "sprint",
|
|
471
|
-
release: "release"
|
|
472
|
-
};
|
|
473
|
-
var METADATA_WARNING_TOKEN_BY_FIELD = {
|
|
474
|
-
author: "validate_metadata_missing_author",
|
|
475
|
-
acceptance_criteria: "validate_metadata_missing_acceptance_criteria",
|
|
476
|
-
estimated_minutes: "validate_metadata_missing_estimate",
|
|
477
|
-
close_reason: "validate_metadata_missing_close_reason",
|
|
478
|
-
reviewer: "validate_metadata_missing_reviewer",
|
|
479
|
-
risk: "validate_metadata_missing_risk",
|
|
480
|
-
confidence: "validate_metadata_missing_confidence",
|
|
481
|
-
sprint: "validate_metadata_missing_sprint",
|
|
482
|
-
release: "validate_metadata_missing_release"
|
|
483
|
-
};
|
|
484
|
-
var METADATA_COUNT_KEY_BY_FIELD = {
|
|
485
|
-
author: "missing_author",
|
|
486
|
-
acceptance_criteria: "missing_acceptance_criteria",
|
|
487
|
-
estimated_minutes: "missing_estimated_minutes",
|
|
488
|
-
close_reason: "closed_missing_close_reason",
|
|
489
|
-
reviewer: "missing_reviewer",
|
|
490
|
-
risk: "missing_risk",
|
|
491
|
-
confidence: "missing_confidence",
|
|
492
|
-
sprint: "missing_sprint",
|
|
493
|
-
release: "missing_release"
|
|
494
|
-
};
|
|
495
|
-
var METADATA_ITEM_IDS_KEY_BY_FIELD = {
|
|
496
|
-
author: "missing_author_item_ids",
|
|
497
|
-
acceptance_criteria: "missing_acceptance_criteria_item_ids",
|
|
498
|
-
estimated_minutes: "missing_estimated_minutes_item_ids",
|
|
499
|
-
close_reason: "closed_missing_close_reason_item_ids",
|
|
500
|
-
reviewer: "missing_reviewer_item_ids",
|
|
501
|
-
risk: "missing_risk_item_ids",
|
|
502
|
-
confidence: "missing_confidence_item_ids",
|
|
503
|
-
sprint: "missing_sprint_item_ids",
|
|
504
|
-
release: "missing_release_item_ids"
|
|
505
|
-
};
|
|
506
|
-
var METADATA_TRUNCATED_KEY_BY_FIELD = {
|
|
507
|
-
author: "missing_author_truncated",
|
|
508
|
-
acceptance_criteria: "missing_acceptance_criteria_truncated",
|
|
509
|
-
estimated_minutes: "missing_estimated_minutes_truncated",
|
|
510
|
-
close_reason: "closed_missing_close_reason_truncated",
|
|
511
|
-
reviewer: "missing_reviewer_truncated",
|
|
512
|
-
risk: "missing_risk_truncated",
|
|
513
|
-
confidence: "missing_confidence_truncated",
|
|
514
|
-
sprint: "missing_sprint_truncated",
|
|
515
|
-
release: "missing_release_truncated"
|
|
516
|
-
};
|
|
517
|
-
var GIT_LS_FILES_MAX_BUFFER = 32 * 1024 * 1024;
|
|
518
|
-
var FILE_LIST_SUMMARY_LIMIT = 40;
|
|
519
|
-
var DIAGNOSTIC_LIST_SUMMARY_LIMIT = 5;
|
|
520
|
-
var LINKED_ARTIFACT_MAX_PATH_LENGTH = 4096;
|
|
521
|
-
var LINKED_ARTIFACT_MAX_SEGMENT_LENGTH = 255;
|
|
522
|
-
var execFileAsync = promisify(execFile);
|
|
523
|
-
function normalizeRelativePath(value) {
|
|
524
|
-
return value.replaceAll("\\", "/").replace(/^\.\/+/, "").replace(/^\/+/, "");
|
|
525
|
-
}
|
|
526
|
-
function normalizeRelativeDirectoryPath(value) {
|
|
527
|
-
const normalized = normalizeRelativePath(value);
|
|
528
|
-
return normalized.replace(/\/+$/, "");
|
|
529
|
-
}
|
|
530
|
-
function toMeaningfulString(value) {
|
|
531
|
-
const normalized = toNonEmptyStringOrUndefined(value);
|
|
532
|
-
if (!normalized) {
|
|
533
|
-
return void 0;
|
|
534
|
-
}
|
|
535
|
-
const lowered = normalized.toLowerCase();
|
|
536
|
-
if (lowered === "none" || lowered === "null" || lowered === "n/a" || lowered === "na") {
|
|
537
|
-
return void 0;
|
|
538
|
-
}
|
|
539
|
-
return normalized;
|
|
540
|
-
}
|
|
541
|
-
function normalizeStatusForRegistry(status, statusRegistry) {
|
|
542
|
-
return normalizeStatusInput(status, statusRegistry) ?? status;
|
|
543
|
-
}
|
|
544
|
-
function isTerminalStatus(status, statusRegistry) {
|
|
545
|
-
return statusRegistry.terminal_statuses.has(normalizeStatusForRegistry(status, statusRegistry));
|
|
546
|
-
}
|
|
547
|
-
function normalizeLifecyclePatternList(values) {
|
|
548
|
-
return [...new Set((values ?? []).map((value) => value.trim().toLowerCase()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
549
|
-
}
|
|
550
|
-
function areSortedStringListsEqual(left, right) {
|
|
551
|
-
if (left.length !== right.length) {
|
|
552
|
-
return false;
|
|
553
|
-
}
|
|
554
|
-
return left.every((value, index) => value === right[index]);
|
|
555
|
-
}
|
|
556
|
-
function resolveLifecyclePatternPolicy(settings) {
|
|
557
|
-
const defaultStalePatterns = normalizeLifecyclePatternList(DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS);
|
|
558
|
-
const defaultClosureLikePatterns = {
|
|
559
|
-
blocked_reason: normalizeLifecyclePatternList(DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS.blocked_reason),
|
|
560
|
-
resolution: normalizeLifecyclePatternList(DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS.resolution),
|
|
561
|
-
actual_result: normalizeLifecyclePatternList(DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS.actual_result)
|
|
562
|
-
};
|
|
563
|
-
const staleBlockerReasonPatterns = normalizeLifecyclePatternList(settings.validation.lifecycle_stale_blocker_reason_patterns);
|
|
564
|
-
const closureLikePatterns = {
|
|
565
|
-
blocked_reason: normalizeLifecyclePatternList(settings.validation.lifecycle_closure_like_blocked_reason_patterns),
|
|
566
|
-
resolution: normalizeLifecyclePatternList(settings.validation.lifecycle_closure_like_resolution_patterns),
|
|
567
|
-
actual_result: normalizeLifecyclePatternList(settings.validation.lifecycle_closure_like_actual_result_patterns)
|
|
568
|
-
};
|
|
569
|
-
return {
|
|
570
|
-
stale_blocker_reason_patterns: staleBlockerReasonPatterns,
|
|
571
|
-
stale_blocker_reason_pattern_source: areSortedStringListsEqual(staleBlockerReasonPatterns, defaultStalePatterns) ? "default" : "settings",
|
|
572
|
-
closure_like_metadata_field_patterns: closureLikePatterns,
|
|
573
|
-
closure_like_metadata_field_pattern_sources: {
|
|
574
|
-
blocked_reason: areSortedStringListsEqual(closureLikePatterns.blocked_reason, defaultClosureLikePatterns.blocked_reason) ? "default" : "settings",
|
|
575
|
-
resolution: areSortedStringListsEqual(closureLikePatterns.resolution, defaultClosureLikePatterns.resolution) ? "default" : "settings",
|
|
576
|
-
actual_result: areSortedStringListsEqual(closureLikePatterns.actual_result, defaultClosureLikePatterns.actual_result) ? "default" : "settings"
|
|
577
|
-
}
|
|
578
|
-
};
|
|
579
|
-
}
|
|
580
|
-
function resolveValidateMetadataProfile(value) {
|
|
581
|
-
const normalized = value?.trim().toLowerCase();
|
|
582
|
-
if (!normalized || normalized.length === 0) {
|
|
583
|
-
return "core";
|
|
584
|
-
}
|
|
585
|
-
if (VALIDATE_METADATA_PROFILE_VALUES.includes(normalized)) {
|
|
586
|
-
return normalized;
|
|
587
|
-
}
|
|
588
|
-
throw new PmCliError(`Unknown --metadata-profile value "${value}". Supported values: ${VALIDATE_METADATA_PROFILE_VALUES.join(", ")}.`, EXIT_CODE.USAGE);
|
|
589
|
-
}
|
|
590
|
-
function resolveDependencyCycleSeverity(value) {
|
|
591
|
-
const normalized = value?.trim().toLowerCase();
|
|
592
|
-
if (!normalized || normalized.length === 0) {
|
|
593
|
-
return "warn";
|
|
594
|
-
}
|
|
595
|
-
if (VALIDATE_DEPENDENCY_CYCLE_SEVERITY_VALUES.includes(normalized)) {
|
|
596
|
-
return normalized;
|
|
597
|
-
}
|
|
598
|
-
throw new PmCliError(`Unknown --dependency-cycle-severity value "${value}". Supported values: ${VALIDATE_DEPENDENCY_CYCLE_SEVERITY_VALUES.join(", ")}.`, EXIT_CODE.USAGE);
|
|
599
|
-
}
|
|
600
|
-
function resolveParentCycleSeverity(value) {
|
|
601
|
-
const normalized = value?.trim().toLowerCase();
|
|
602
|
-
if (!normalized || normalized.length === 0) {
|
|
603
|
-
return "warn";
|
|
604
|
-
}
|
|
605
|
-
if (VALIDATE_DEPENDENCY_CYCLE_SEVERITY_VALUES.includes(normalized)) {
|
|
606
|
-
return normalized;
|
|
607
|
-
}
|
|
608
|
-
throw new PmCliError(`Unknown --parent-cycle-severity value "${value}". Supported values: ${VALIDATE_DEPENDENCY_CYCLE_SEVERITY_VALUES.join(", ")}.`, EXIT_CODE.USAGE);
|
|
609
|
-
}
|
|
610
|
-
function normalizeMetadataRequiredFieldsFromSettings(values) {
|
|
611
|
-
const normalized = [...new Set((values ?? []).map((value) => value.trim().toLowerCase().replaceAll("-", "_")))];
|
|
612
|
-
return normalized.map((value) => METADATA_REQUIRED_FIELD_ALIASES[value]).filter((value) => value !== void 0).sort((left, right) => left.localeCompare(right));
|
|
613
|
-
}
|
|
614
|
-
function resolveValidateMetadataPolicy(profile, profileSource, configuredCustomFields) {
|
|
615
|
-
const normalizedCustomFields = normalizeMetadataRequiredFieldsFromSettings(configuredCustomFields);
|
|
616
|
-
if (profile === "core") {
|
|
617
|
-
return {
|
|
618
|
-
profile,
|
|
619
|
-
profile_source: profileSource,
|
|
620
|
-
required_fields: [...CORE_METADATA_REQUIRED_FIELDS],
|
|
621
|
-
configured_custom_fields: normalizedCustomFields,
|
|
622
|
-
fallback_to_core: false,
|
|
623
|
-
warnings: []
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
if (profile === "strict") {
|
|
627
|
-
return {
|
|
628
|
-
profile,
|
|
629
|
-
profile_source: profileSource,
|
|
630
|
-
required_fields: [...STRICT_METADATA_REQUIRED_FIELDS],
|
|
631
|
-
configured_custom_fields: normalizedCustomFields,
|
|
632
|
-
fallback_to_core: false,
|
|
633
|
-
warnings: []
|
|
634
|
-
};
|
|
635
|
-
}
|
|
636
|
-
if (normalizedCustomFields.length > 0) {
|
|
637
|
-
return {
|
|
638
|
-
profile,
|
|
639
|
-
profile_source: profileSource,
|
|
640
|
-
required_fields: normalizedCustomFields,
|
|
641
|
-
configured_custom_fields: normalizedCustomFields,
|
|
642
|
-
fallback_to_core: false,
|
|
643
|
-
warnings: []
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
|
-
return {
|
|
647
|
-
profile,
|
|
648
|
-
profile_source: profileSource,
|
|
649
|
-
required_fields: [...CORE_METADATA_REQUIRED_FIELDS],
|
|
650
|
-
configured_custom_fields: normalizedCustomFields,
|
|
651
|
-
fallback_to_core: true,
|
|
652
|
-
warnings: ["validate_metadata_custom_profile_missing_required_fields:0"]
|
|
653
|
-
};
|
|
654
|
-
}
|
|
655
|
-
var TERMINAL_EXEMPT_PLANNING_FIELDS = /* @__PURE__ */ new Set([
|
|
656
|
-
"acceptance_criteria",
|
|
657
|
-
"estimated_minutes"
|
|
658
|
-
]);
|
|
659
|
-
function isMetadataFieldMissing(item, field, statusRegistry, enforcePlanningFieldsOnTerminal) {
|
|
660
|
-
if (!enforcePlanningFieldsOnTerminal && TERMINAL_EXEMPT_PLANNING_FIELDS.has(field) && isTerminalStatus(item.status, statusRegistry)) {
|
|
661
|
-
return false;
|
|
662
|
-
}
|
|
663
|
-
if (field === "author") {
|
|
664
|
-
return !toNonEmptyStringOrUndefined(item.author);
|
|
665
|
-
}
|
|
666
|
-
if (field === "acceptance_criteria") {
|
|
667
|
-
return !toNonEmptyStringOrUndefined(item.acceptance_criteria);
|
|
668
|
-
}
|
|
669
|
-
if (field === "estimated_minutes") {
|
|
670
|
-
return !Number.isFinite(item.estimated_minutes);
|
|
671
|
-
}
|
|
672
|
-
if (field === "close_reason") {
|
|
673
|
-
return normalizeStatusForRegistry(item.status, statusRegistry) === statusRegistry.close_status && !toNonEmptyStringOrUndefined(item.close_reason);
|
|
674
|
-
}
|
|
675
|
-
if (field === "reviewer") {
|
|
676
|
-
return !toNonEmptyStringOrUndefined(item.reviewer);
|
|
677
|
-
}
|
|
678
|
-
if (field === "risk") {
|
|
679
|
-
return !toNonEmptyStringOrUndefined(item.risk);
|
|
680
|
-
}
|
|
681
|
-
if (field === "confidence") {
|
|
682
|
-
if (typeof item.confidence === "number") {
|
|
683
|
-
return !Number.isFinite(item.confidence);
|
|
684
|
-
}
|
|
685
|
-
return !toNonEmptyStringOrUndefined(item.confidence);
|
|
686
|
-
}
|
|
687
|
-
if (field === "sprint") {
|
|
688
|
-
return !toNonEmptyStringOrUndefined(item.sprint);
|
|
689
|
-
}
|
|
690
|
-
return !toNonEmptyStringOrUndefined(item.release);
|
|
691
|
-
}
|
|
692
|
-
function resolveFileScanMode(scanMode) {
|
|
693
|
-
if (scanMode === void 0) {
|
|
694
|
-
return "default";
|
|
695
|
-
}
|
|
696
|
-
const normalized = scanMode.trim().toLowerCase();
|
|
697
|
-
if (normalized.length === 0) {
|
|
698
|
-
return "default";
|
|
699
|
-
}
|
|
700
|
-
if (normalized === "default") {
|
|
701
|
-
return "default";
|
|
702
|
-
}
|
|
703
|
-
if (normalized === "tracked-all" || normalized === "tracked_all") {
|
|
704
|
-
return "tracked-all";
|
|
705
|
-
}
|
|
706
|
-
if (normalized === "tracked-all-strict" || normalized === "tracked_all_strict") {
|
|
707
|
-
return "tracked-all-strict";
|
|
708
|
-
}
|
|
709
|
-
throw new PmCliError(`Unknown --scan-mode value "${scanMode}". Supported values: ${VALIDATE_FILE_SCAN_MODES.join(", ")}.`, EXIT_CODE.USAGE);
|
|
710
|
-
}
|
|
711
|
-
function resolveWorkspaceRoot(pmRoot) {
|
|
712
|
-
const resolvedPmRoot = path.resolve(pmRoot);
|
|
713
|
-
const normalizedPmRoot = resolvedPmRoot.replaceAll("\\", "/");
|
|
714
|
-
if (normalizedPmRoot.endsWith("/.agents/pm")) {
|
|
715
|
-
return path.dirname(path.dirname(resolvedPmRoot));
|
|
716
|
-
}
|
|
717
|
-
const resolvedCwd = path.resolve(process.cwd());
|
|
718
|
-
const canonicalPmRoot = realpathForWorkspaceRoot(resolvedPmRoot);
|
|
719
|
-
const canonicalCwd = realpathForWorkspaceRoot(resolvedCwd);
|
|
720
|
-
const relativeFromPmRoot = path.relative(canonicalPmRoot, canonicalCwd);
|
|
721
|
-
const cwdInsidePmRoot = relativeFromPmRoot.length === 0 || !relativeFromPmRoot.startsWith("..") && !path.isAbsolute(relativeFromPmRoot);
|
|
722
|
-
if (cwdInsidePmRoot) {
|
|
723
|
-
return resolvedPmRoot;
|
|
724
|
-
}
|
|
725
|
-
return resolvedCwd;
|
|
726
|
-
}
|
|
727
|
-
function realpathForWorkspaceRoot(inputPath) {
|
|
728
|
-
try {
|
|
729
|
-
return realpathSync.native(inputPath);
|
|
730
|
-
} catch {
|
|
731
|
-
return path.resolve(inputPath);
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
async function listFilesRecursive(basePath, relativePath, output) {
|
|
735
|
-
const targetDirectory = relativePath.length > 0 ? path.join(basePath, relativePath) : basePath;
|
|
736
|
-
let entries;
|
|
737
|
-
try {
|
|
738
|
-
entries = await fs.readdir(targetDirectory, { withFileTypes: true });
|
|
739
|
-
} catch (error) {
|
|
740
|
-
if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") {
|
|
741
|
-
return;
|
|
742
|
-
}
|
|
743
|
-
throw error;
|
|
744
|
-
}
|
|
745
|
-
for (const entry of entries) {
|
|
746
|
-
if (entry.name.startsWith(".")) {
|
|
747
|
-
continue;
|
|
748
|
-
}
|
|
749
|
-
const childRelative = relativePath.length > 0 ? path.join(relativePath, entry.name) : entry.name;
|
|
750
|
-
if (entry.isDirectory()) {
|
|
751
|
-
if (DIRECTORY_IGNORE_SET.has(entry.name)) {
|
|
752
|
-
continue;
|
|
753
|
-
}
|
|
754
|
-
await listFilesRecursive(basePath, childRelative, output);
|
|
755
|
-
continue;
|
|
756
|
-
}
|
|
757
|
-
if (!entry.isFile()) {
|
|
758
|
-
continue;
|
|
759
|
-
}
|
|
760
|
-
output.push(normalizeRelativePath(childRelative));
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
async function collectDefaultProjectFileCandidates(workspaceRoot) {
|
|
764
|
-
const discovered = [];
|
|
765
|
-
for (const directory of FILE_SCAN_DIRECTORIES) {
|
|
766
|
-
await listFilesRecursive(workspaceRoot, directory, discovered);
|
|
767
|
-
}
|
|
768
|
-
for (const candidate of FILE_SCAN_ROOT_FILES) {
|
|
769
|
-
const absolute = path.join(workspaceRoot, candidate);
|
|
770
|
-
try {
|
|
771
|
-
const stats = await fs.stat(absolute);
|
|
772
|
-
if (stats.isFile()) {
|
|
773
|
-
discovered.push(normalizeRelativePath(candidate));
|
|
774
|
-
}
|
|
775
|
-
} catch {
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
return [...new Set(discovered)].sort((left, right) => left.localeCompare(right));
|
|
779
|
-
}
|
|
780
|
-
async function collectTrackedGitFileCandidates(workspaceRoot) {
|
|
781
|
-
try {
|
|
782
|
-
const { stdout } = await execFileAsync("git", ["ls-files", "-z"], {
|
|
783
|
-
cwd: workspaceRoot,
|
|
784
|
-
encoding: "utf8",
|
|
785
|
-
maxBuffer: GIT_LS_FILES_MAX_BUFFER,
|
|
786
|
-
windowsHide: true
|
|
787
|
-
});
|
|
788
|
-
const discovered = stdout.split("\0").map((value) => normalizeRelativePath(value)).filter((value) => value.length > 0);
|
|
789
|
-
return [...new Set(discovered)].sort((left, right) => left.localeCompare(right));
|
|
790
|
-
} catch {
|
|
791
|
-
return null;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
function resolvePmInternalCandidatePrefixes(pmRoot, workspaceRoot) {
|
|
795
|
-
const prefixes = /* @__PURE__ */ new Set();
|
|
796
|
-
const configuredDefault = normalizeRelativeDirectoryPath(PM_DIRNAME);
|
|
797
|
-
if (configuredDefault.length > 0) {
|
|
798
|
-
prefixes.add(configuredDefault);
|
|
799
|
-
}
|
|
800
|
-
const relativePmRoot = normalizeRelativeDirectoryPath(path.relative(workspaceRoot, pmRoot));
|
|
801
|
-
if (relativePmRoot.length > 0 && !relativePmRoot.startsWith("..")) {
|
|
802
|
-
prefixes.add(relativePmRoot);
|
|
803
|
-
}
|
|
804
|
-
return [...prefixes].sort((left, right) => left.localeCompare(right));
|
|
805
|
-
}
|
|
806
|
-
function hasPathPrefix(candidate, prefixes) {
|
|
807
|
-
for (const prefix of prefixes) {
|
|
808
|
-
if (candidate === prefix || candidate.startsWith(`${prefix}/`)) {
|
|
809
|
-
return true;
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
return false;
|
|
813
|
-
}
|
|
814
|
-
async function collectProjectFileCandidates(workspaceRoot, scanMode) {
|
|
815
|
-
if (scanMode === "tracked-all" || scanMode === "tracked-all-strict") {
|
|
816
|
-
const trackedCandidates = await collectTrackedGitFileCandidates(workspaceRoot);
|
|
817
|
-
if (trackedCandidates) {
|
|
818
|
-
return {
|
|
819
|
-
requestedMode: scanMode,
|
|
820
|
-
appliedMode: scanMode,
|
|
821
|
-
source: "tracked-git",
|
|
822
|
-
candidateFiles: trackedCandidates,
|
|
823
|
-
candidateTotal: trackedCandidates.length,
|
|
824
|
-
candidateScanned: trackedCandidates.length
|
|
825
|
-
};
|
|
826
|
-
}
|
|
827
|
-
const fallbackCandidates = await collectDefaultProjectFileCandidates(workspaceRoot);
|
|
828
|
-
return {
|
|
829
|
-
requestedMode: scanMode,
|
|
830
|
-
appliedMode: "default",
|
|
831
|
-
source: "tracked-all-fallback-default",
|
|
832
|
-
candidateFiles: fallbackCandidates,
|
|
833
|
-
candidateTotal: fallbackCandidates.length,
|
|
834
|
-
candidateScanned: fallbackCandidates.length
|
|
835
|
-
};
|
|
836
|
-
}
|
|
837
|
-
const defaultCandidates = await collectDefaultProjectFileCandidates(workspaceRoot);
|
|
838
|
-
return {
|
|
839
|
-
requestedMode: scanMode,
|
|
840
|
-
appliedMode: "default",
|
|
841
|
-
source: "default-curated",
|
|
842
|
-
candidateFiles: defaultCandidates,
|
|
843
|
-
candidateTotal: defaultCandidates.length,
|
|
844
|
-
candidateScanned: defaultCandidates.length
|
|
845
|
-
};
|
|
846
|
-
}
|
|
847
|
-
function summarizeList(values, limit = DIAGNOSTIC_LIST_SUMMARY_LIMIT) {
|
|
848
|
-
if (values.length <= limit) {
|
|
849
|
-
return { values, truncated: false };
|
|
850
|
-
}
|
|
851
|
-
return {
|
|
852
|
-
values: values.slice(0, limit),
|
|
853
|
-
truncated: true
|
|
854
|
-
};
|
|
855
|
-
}
|
|
856
|
-
function summarizeFileList(values, verboseFileLists) {
|
|
857
|
-
if (verboseFileLists) {
|
|
858
|
-
return {
|
|
859
|
-
values,
|
|
860
|
-
truncated: false,
|
|
861
|
-
total: values.length
|
|
862
|
-
};
|
|
863
|
-
}
|
|
864
|
-
const summary = summarizeList(values, FILE_LIST_SUMMARY_LIMIT);
|
|
865
|
-
return {
|
|
866
|
-
values: summary.values,
|
|
867
|
-
truncated: summary.truncated,
|
|
868
|
-
total: values.length
|
|
869
|
-
};
|
|
870
|
-
}
|
|
871
|
-
var RESOLUTION_REMEDIATION_FLAG_BY_FIELD = {
|
|
872
|
-
resolution: "--resolution",
|
|
873
|
-
expected_result: "--expected-result",
|
|
874
|
-
actual_result: "--actual-result"
|
|
875
|
-
};
|
|
876
|
-
var RESOLUTION_REMEDIATION_PLACEHOLDER_BY_FIELD = {
|
|
877
|
-
resolution: "Describe how this item was resolved",
|
|
878
|
-
expected_result: "Describe the expected result",
|
|
879
|
-
actual_result: "Describe the actual result"
|
|
880
|
-
};
|
|
881
|
-
function buildResolutionRemediationCommand(row) {
|
|
882
|
-
const fieldArguments = row.missing_fields.map((field) => `${RESOLUTION_REMEDIATION_FLAG_BY_FIELD[field]} "${RESOLUTION_REMEDIATION_PLACEHOLDER_BY_FIELD[field]}"`).join(" ");
|
|
883
|
-
return `pm update ${row.id} ${fieldArguments} --message "Backfill resolution metadata"`;
|
|
884
|
-
}
|
|
885
|
-
function attachValidateFixHints(check, checkWarnings) {
|
|
886
|
-
const existingResolutionHints = check.details?.missing_resolution_remediation_hints;
|
|
887
|
-
const aliasedResolution = Array.isArray(existingResolutionHints) && existingResolutionHints.length > 0;
|
|
888
|
-
const fixHints = aliasedResolution ? existingResolutionHints.filter((hint) => typeof hint === "string") : buildRemediationCommands(checkWarnings);
|
|
889
|
-
if (fixHints.length === 0) {
|
|
890
|
-
return;
|
|
891
|
-
}
|
|
892
|
-
const truncated = aliasedResolution && check.details?.missing_resolution_remediation_hints_truncated === true;
|
|
893
|
-
check.details = {
|
|
894
|
-
...check.details,
|
|
895
|
-
fix_hints: fixHints,
|
|
896
|
-
...truncated ? { fix_hints_truncated: true } : {}
|
|
897
|
-
};
|
|
898
|
-
}
|
|
899
|
-
function resolveRequestedChecks(options) {
|
|
900
|
-
const requested = /* @__PURE__ */ new Set();
|
|
901
|
-
if (options.checkMetadata) {
|
|
902
|
-
requested.add("metadata");
|
|
903
|
-
}
|
|
904
|
-
if (options.checkResolution) {
|
|
905
|
-
requested.add("resolution");
|
|
906
|
-
}
|
|
907
|
-
if (options.checkLifecycle || options.checkStaleBlockers) {
|
|
908
|
-
requested.add("lifecycle");
|
|
909
|
-
}
|
|
910
|
-
if (options.checkFiles) {
|
|
911
|
-
requested.add("files");
|
|
912
|
-
}
|
|
913
|
-
if (options.checkHistoryDrift) {
|
|
914
|
-
requested.add("history_drift");
|
|
915
|
-
}
|
|
916
|
-
if (options.checkCommandReferences) {
|
|
917
|
-
requested.add("command_references");
|
|
918
|
-
}
|
|
919
|
-
if (requested.size === 0) {
|
|
920
|
-
if (options.autoFix) {
|
|
921
|
-
requested.add("metadata");
|
|
922
|
-
requested.add("resolution");
|
|
923
|
-
requested.add("lifecycle");
|
|
924
|
-
}
|
|
925
|
-
if (options.pruneMissing) {
|
|
926
|
-
requested.add("files");
|
|
927
|
-
}
|
|
928
|
-
if (requested.size === 0) {
|
|
929
|
-
requested.add("metadata");
|
|
930
|
-
requested.add("resolution");
|
|
931
|
-
requested.add("lifecycle");
|
|
932
|
-
requested.add("files");
|
|
933
|
-
requested.add("command_references");
|
|
934
|
-
requested.add("history_drift");
|
|
935
|
-
requested.add("format_version");
|
|
936
|
-
}
|
|
937
|
-
return requested;
|
|
938
|
-
}
|
|
939
|
-
if (options.pruneMissing) {
|
|
940
|
-
requested.add("files");
|
|
941
|
-
}
|
|
942
|
-
return requested;
|
|
943
|
-
}
|
|
944
|
-
var DUPLICATE_ISSUE_CODE_WARNING_TOKEN = "validate_metadata_duplicate_issue_codes";
|
|
945
|
-
function summarizeDuplicateIssueCodes(duplicates, verboseDiagnostics) {
|
|
946
|
-
if (duplicates.length === 0) {
|
|
947
|
-
return { rows: [], truncated: false, warnings: [] };
|
|
948
|
-
}
|
|
949
|
-
const limit = verboseDiagnostics ? duplicates.length : DIAGNOSTIC_LIST_SUMMARY_LIMIT;
|
|
950
|
-
const shown = duplicates.slice(0, limit);
|
|
951
|
-
const rows = shown.map((duplicate) => ({
|
|
952
|
-
code: duplicate.code,
|
|
953
|
-
count: duplicate.count,
|
|
954
|
-
ids: duplicate.ids,
|
|
955
|
-
titles: duplicate.titles,
|
|
956
|
-
remediation_hint: `Items ${duplicate.ids.join(", ")} share issue code "${duplicate.code}"; rename or merge so each logical code maps to one item.`
|
|
957
|
-
}));
|
|
958
|
-
return {
|
|
959
|
-
rows,
|
|
960
|
-
truncated: shown.length < duplicates.length,
|
|
961
|
-
warnings: [`${DUPLICATE_ISSUE_CODE_WARNING_TOKEN}:${duplicates.length}`]
|
|
962
|
-
};
|
|
963
|
-
}
|
|
964
|
-
function initializeMissingMetadataByField() {
|
|
965
|
-
return Object.fromEntries(SUPPORTED_METADATA_REQUIRED_FIELDS.map((field) => [field, []]));
|
|
966
|
-
}
|
|
967
|
-
function collectMissingMetadataByField(items, statusRegistry, enforcePlanningFieldsOnTerminal) {
|
|
968
|
-
const missingByField = initializeMissingMetadataByField();
|
|
969
|
-
for (const item of items) {
|
|
970
|
-
for (const field of SUPPORTED_METADATA_REQUIRED_FIELDS) {
|
|
971
|
-
if (isMetadataFieldMissing(item, field, statusRegistry, enforcePlanningFieldsOnTerminal)) {
|
|
972
|
-
missingByField[field].push(item.id);
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
return missingByField;
|
|
977
|
-
}
|
|
978
|
-
function buildMetadataWarningTokens(metadataPolicy, missingByField, duplicateWarnings) {
|
|
979
|
-
const warningTokens = [...metadataPolicy.warnings];
|
|
980
|
-
for (const field of metadataPolicy.required_fields) {
|
|
981
|
-
const missingItems = missingByField[field];
|
|
982
|
-
if (missingItems.length > 0) {
|
|
983
|
-
warningTokens.push(`${METADATA_WARNING_TOKEN_BY_FIELD[field]}:${missingItems.length}`);
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
warningTokens.push(...duplicateWarnings);
|
|
987
|
-
return warningTokens;
|
|
988
|
-
}
|
|
989
|
-
function buildMetadataCounts(metadataPolicy, missingByField) {
|
|
990
|
-
const counts = {};
|
|
991
|
-
for (const field of metadataPolicy.required_fields) {
|
|
992
|
-
const missing = missingByField[field];
|
|
993
|
-
const value = missing ? missing.length : 0;
|
|
994
|
-
const countKey = METADATA_COUNT_KEY_BY_FIELD[field];
|
|
995
|
-
if (value > 0 && countKey) {
|
|
996
|
-
counts[countKey] = value;
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
return counts;
|
|
1000
|
-
}
|
|
1001
|
-
function buildMissingFieldOccurrences(metadataPolicy, missingByField, itemsById) {
|
|
1002
|
-
const occurrences = [];
|
|
1003
|
-
for (const field of metadataPolicy.required_fields) {
|
|
1004
|
-
const missing = missingByField[field];
|
|
1005
|
-
if (!missing) {
|
|
1006
|
-
continue;
|
|
1007
|
-
}
|
|
1008
|
-
for (const itemId of missing) {
|
|
1009
|
-
const itemType = itemsById.get(itemId)?.type;
|
|
1010
|
-
const normalizedItemType = typeof itemType === "string" && itemType.length > 0 ? itemType : "Unknown";
|
|
1011
|
-
occurrences.push({ item_type: normalizedItemType, field });
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
return occurrences;
|
|
1015
|
-
}
|
|
1016
|
-
function attachMissingMetadataItemIds(details, metadataPolicy, missingByField, verboseDiagnostics) {
|
|
1017
|
-
for (const field of metadataPolicy.required_fields) {
|
|
1018
|
-
const missing = missingByField[field];
|
|
1019
|
-
if (!missing || missing.length === 0) {
|
|
1020
|
-
continue;
|
|
1021
|
-
}
|
|
1022
|
-
const idsKey = METADATA_ITEM_IDS_KEY_BY_FIELD[field];
|
|
1023
|
-
const truncatedKey = METADATA_TRUNCATED_KEY_BY_FIELD[field];
|
|
1024
|
-
if (!idsKey || !truncatedKey) {
|
|
1025
|
-
continue;
|
|
1026
|
-
}
|
|
1027
|
-
const summarized = summarizeList(missing, verboseDiagnostics ? missing.length : DIAGNOSTIC_LIST_SUMMARY_LIMIT);
|
|
1028
|
-
details[idsKey] = summarized.values;
|
|
1029
|
-
details[truncatedKey] = summarized.truncated;
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
function buildCloseReasonBackfillRows(metadataPolicy, missingByField, itemsById) {
|
|
1033
|
-
if (!metadataPolicy.required_fields.includes("close_reason")) {
|
|
1034
|
-
return [];
|
|
1035
|
-
}
|
|
1036
|
-
const missing = missingByField.close_reason;
|
|
1037
|
-
if (!missing) {
|
|
1038
|
-
return [];
|
|
1039
|
-
}
|
|
1040
|
-
return missing.map((itemId) => ({
|
|
1041
|
-
id: itemId,
|
|
1042
|
-
resolution: toNonEmptyStringOrUndefined(itemsById.get(itemId)?.resolution)
|
|
1043
|
-
}));
|
|
1044
|
-
}
|
|
1045
|
-
function buildEstimateBackfillRows(metadataPolicy, missingByField, itemsById) {
|
|
1046
|
-
if (!metadataPolicy.required_fields.includes("estimated_minutes")) {
|
|
1047
|
-
return [];
|
|
1048
|
-
}
|
|
1049
|
-
const missing = missingByField.estimated_minutes;
|
|
1050
|
-
if (!missing) {
|
|
1051
|
-
return [];
|
|
1052
|
-
}
|
|
1053
|
-
return missing.map((itemId) => ({
|
|
1054
|
-
id: itemId,
|
|
1055
|
-
type: toNonEmptyStringOrUndefined(itemsById.get(itemId)?.type)
|
|
1056
|
-
}));
|
|
1057
|
-
}
|
|
1058
|
-
function buildMetadataCheck(items, metadataPolicy, statusRegistry, verboseDiagnostics) {
|
|
1059
|
-
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
1060
|
-
const enforcePlanningFieldsOnTerminal = metadataPolicy.profile === "strict";
|
|
1061
|
-
const missingByField = collectMissingMetadataByField(items, statusRegistry, enforcePlanningFieldsOnTerminal);
|
|
1062
|
-
const duplicateIssueCodes = findDuplicateIssueCodes(items);
|
|
1063
|
-
const duplicateIssueCodeSummary = summarizeDuplicateIssueCodes(duplicateIssueCodes, verboseDiagnostics);
|
|
1064
|
-
const warningTokens = buildMetadataWarningTokens(metadataPolicy, missingByField, duplicateIssueCodeSummary.warnings);
|
|
1065
|
-
const counts = buildMetadataCounts(metadataPolicy, missingByField);
|
|
1066
|
-
const missingFieldOccurrences = buildMissingFieldOccurrences(metadataPolicy, missingByField, itemsById);
|
|
1067
|
-
const missingByType = buildMissingByTypeCounts(missingFieldOccurrences);
|
|
1068
|
-
const details = {
|
|
1069
|
-
checked_items: items.length,
|
|
1070
|
-
metadata_profile: metadataPolicy.profile,
|
|
1071
|
-
metadata_profile_source: metadataPolicy.profile_source,
|
|
1072
|
-
metadata_profile_fallback_to_core: metadataPolicy.fallback_to_core,
|
|
1073
|
-
required_fields: [...metadataPolicy.required_fields],
|
|
1074
|
-
supported_required_fields: [...SUPPORTED_METADATA_REQUIRED_FIELDS],
|
|
1075
|
-
counts,
|
|
1076
|
-
missing_by_type: missingByType,
|
|
1077
|
-
duplicate_issue_codes_count: duplicateIssueCodes.length,
|
|
1078
|
-
duplicate_issue_codes: duplicateIssueCodeSummary.rows,
|
|
1079
|
-
duplicate_issue_codes_truncated: duplicateIssueCodeSummary.truncated
|
|
1080
|
-
};
|
|
1081
|
-
if (metadataPolicy.configured_custom_fields.length > 0) {
|
|
1082
|
-
details.configured_custom_required_fields = [...metadataPolicy.configured_custom_fields];
|
|
1083
|
-
}
|
|
1084
|
-
attachMissingMetadataItemIds(details, metadataPolicy, missingByField, verboseDiagnostics);
|
|
1085
|
-
const closeReasonBackfillRows = buildCloseReasonBackfillRows(metadataPolicy, missingByField, itemsById);
|
|
1086
|
-
const estimateBackfillRows = buildEstimateBackfillRows(metadataPolicy, missingByField, itemsById);
|
|
1087
|
-
return {
|
|
1088
|
-
check: {
|
|
1089
|
-
name: "metadata",
|
|
1090
|
-
status: warningTokens.length === 0 ? "ok" : "warn",
|
|
1091
|
-
details
|
|
1092
|
-
},
|
|
1093
|
-
warnings: warningTokens,
|
|
1094
|
-
closeReasonBackfillRows,
|
|
1095
|
-
estimateBackfillRows
|
|
1096
|
-
};
|
|
1097
|
-
}
|
|
1098
|
-
function buildResolutionCheck(items, statusRegistry, verboseDiagnostics) {
|
|
1099
|
-
const terminalDoneStatuses = new Set(statusRegistry.terminal_done_statuses);
|
|
1100
|
-
terminalDoneStatuses.add(statusRegistry.close_status);
|
|
1101
|
-
const closedItems = items.filter((item) => terminalDoneStatuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
|
|
1102
|
-
const missingResolutionRows = [];
|
|
1103
|
-
const resolutionBackfillRows = [];
|
|
1104
|
-
for (const item of closedItems) {
|
|
1105
|
-
const missingFields = RESOLUTION_FIELD_KEYS.filter((field) => !toNonEmptyStringOrUndefined(item[field]));
|
|
1106
|
-
if (missingFields.length === 0) {
|
|
1107
|
-
continue;
|
|
1108
|
-
}
|
|
1109
|
-
missingResolutionRows.push({
|
|
1110
|
-
id: item.id,
|
|
1111
|
-
missing_fields: missingFields
|
|
1112
|
-
});
|
|
1113
|
-
resolutionBackfillRows.push({
|
|
1114
|
-
id: item.id,
|
|
1115
|
-
missing_fields: missingFields,
|
|
1116
|
-
close_reason: toNonEmptyStringOrUndefined(item.close_reason)
|
|
1117
|
-
});
|
|
1118
|
-
}
|
|
1119
|
-
const warnings = missingResolutionRows.length > 0 ? [`validate_resolution_missing_fields:${missingResolutionRows.length}`] : [];
|
|
1120
|
-
const diagnosticLimit = verboseDiagnostics ? Number.POSITIVE_INFINITY : DIAGNOSTIC_LIST_SUMMARY_LIMIT;
|
|
1121
|
-
const summarizedRows = summarizeList(missingResolutionRows.map((row) => `${row.id}:${row.missing_fields.join(",")}`), diagnosticLimit);
|
|
1122
|
-
const remediationHints = missingResolutionRows.map((row) => buildResolutionRemediationCommand(row));
|
|
1123
|
-
const summarizedHints = summarizeList(remediationHints, diagnosticLimit);
|
|
1124
|
-
return {
|
|
1125
|
-
check: {
|
|
1126
|
-
name: "resolution",
|
|
1127
|
-
status: warnings.length === 0 ? "ok" : "warn",
|
|
1128
|
-
details: {
|
|
1129
|
-
checked_closed_items: closedItems.length,
|
|
1130
|
-
missing_resolution_items: missingResolutionRows.length,
|
|
1131
|
-
missing_resolution_rows: summarizedRows.values,
|
|
1132
|
-
missing_resolution_rows_truncated: summarizedRows.truncated,
|
|
1133
|
-
missing_resolution_remediation_hints: summarizedHints.values,
|
|
1134
|
-
missing_resolution_remediation_hints_truncated: summarizedHints.truncated
|
|
1135
|
-
}
|
|
1136
|
-
},
|
|
1137
|
-
warnings,
|
|
1138
|
-
resolutionBackfillRows
|
|
1139
|
-
};
|
|
1140
|
-
}
|
|
1141
|
-
function escapeRegExp(value) {
|
|
1142
|
-
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1143
|
-
}
|
|
1144
|
-
function buildLifecycleDependencyGraph(activeItems, idPrefix = "pm") {
|
|
1145
|
-
const activeItemIds = new Set(activeItems.map((item) => item.id));
|
|
1146
|
-
const graph = /* @__PURE__ */ new Map();
|
|
1147
|
-
const sortedItems = [...activeItems].sort((left, right) => left.id.localeCompare(right.id));
|
|
1148
|
-
for (const item of sortedItems) {
|
|
1149
|
-
const edges = /* @__PURE__ */ new Set();
|
|
1150
|
-
const blockedBy = toMeaningfulString(item.blocked_by);
|
|
1151
|
-
if (blockedBy && activeItemIds.has(blockedBy)) {
|
|
1152
|
-
edges.add(blockedBy);
|
|
1153
|
-
}
|
|
1154
|
-
for (const dependency of item.dependencies ?? []) {
|
|
1155
|
-
const dependencyId = toMeaningfulString(dependency.id);
|
|
1156
|
-
if (!dependencyId || !activeItemIds.has(dependencyId)) {
|
|
1157
|
-
continue;
|
|
1158
|
-
}
|
|
1159
|
-
edges.add(dependencyId);
|
|
1160
|
-
}
|
|
1161
|
-
const definitionOfReady = toMeaningfulString(item.definition_of_ready);
|
|
1162
|
-
if (definitionOfReady) {
|
|
1163
|
-
for (const referencedId of extractItemIds(definitionOfReady, idPrefix)) {
|
|
1164
|
-
if (activeItemIds.has(referencedId)) {
|
|
1165
|
-
edges.add(referencedId);
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
graph.set(item.id, [...edges].sort((left, right) => left.localeCompare(right)));
|
|
1170
|
-
}
|
|
1171
|
-
return graph;
|
|
1172
|
-
}
|
|
1173
|
-
function extractItemIds(value, idPrefix = "pm") {
|
|
1174
|
-
const normalizedPrefix = (idPrefix.trim().toLowerCase() || "pm").replace(/-+$/g, "");
|
|
1175
|
-
const pattern = new RegExp(`(?:^|[^a-z0-9-])(${escapeRegExp(normalizedPrefix)}-[a-z0-9][a-z0-9-]*)`, "gi");
|
|
1176
|
-
return [...new Set([...value.matchAll(pattern)].map((match) => match[1].toLowerCase()))].sort((left, right) => left.localeCompare(right));
|
|
1177
|
-
}
|
|
1178
|
-
function findLifecycleDependencyCycleComponents(graph) {
|
|
1179
|
-
let nextIndex = 0;
|
|
1180
|
-
const indexById = /* @__PURE__ */ new Map();
|
|
1181
|
-
const lowLinkById = /* @__PURE__ */ new Map();
|
|
1182
|
-
const stack = [];
|
|
1183
|
-
const inStack = /* @__PURE__ */ new Set();
|
|
1184
|
-
const components = [];
|
|
1185
|
-
const visit = (id) => {
|
|
1186
|
-
indexById.set(id, nextIndex);
|
|
1187
|
-
lowLinkById.set(id, nextIndex);
|
|
1188
|
-
nextIndex += 1;
|
|
1189
|
-
stack.push(id);
|
|
1190
|
-
inStack.add(id);
|
|
1191
|
-
for (const dependencyId of graph.get(id) ?? []) {
|
|
1192
|
-
if (!indexById.has(dependencyId)) {
|
|
1193
|
-
visit(dependencyId);
|
|
1194
|
-
lowLinkById.set(id, Math.min(lowLinkById.get(id), lowLinkById.get(dependencyId)));
|
|
1195
|
-
} else if (inStack.has(dependencyId)) {
|
|
1196
|
-
lowLinkById.set(id, Math.min(lowLinkById.get(id), indexById.get(dependencyId)));
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
if (lowLinkById.get(id) !== indexById.get(id)) {
|
|
1200
|
-
return;
|
|
1201
|
-
}
|
|
1202
|
-
const component = [];
|
|
1203
|
-
while (stack.length > 0) {
|
|
1204
|
-
const member = stack.pop();
|
|
1205
|
-
inStack.delete(member);
|
|
1206
|
-
component.push(member);
|
|
1207
|
-
if (member === id) {
|
|
1208
|
-
break;
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
component.sort((left, right) => left.localeCompare(right));
|
|
1212
|
-
components.push(component);
|
|
1213
|
-
};
|
|
1214
|
-
const sortedNodeIds = [...graph.keys()].sort((left, right) => left.localeCompare(right));
|
|
1215
|
-
for (const id of sortedNodeIds) {
|
|
1216
|
-
if (!indexById.has(id)) {
|
|
1217
|
-
visit(id);
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
const cycleComponents = components.filter((component) => {
|
|
1221
|
-
if (component.length > 1) {
|
|
1222
|
-
return true;
|
|
1223
|
-
}
|
|
1224
|
-
const selfId = component[0];
|
|
1225
|
-
return (graph.get(selfId) ?? []).includes(selfId);
|
|
1226
|
-
});
|
|
1227
|
-
return cycleComponents.sort((left, right) => left[0].localeCompare(right[0]) || left.length - right.length || left.join(",").localeCompare(right.join(",")));
|
|
1228
|
-
}
|
|
1229
|
-
function resolveLifecycleDependencyCycleSamplePath(component, graph) {
|
|
1230
|
-
const start = component[0];
|
|
1231
|
-
if (component.length === 1) {
|
|
1232
|
-
return [start, start];
|
|
1233
|
-
}
|
|
1234
|
-
const componentSet = new Set(component);
|
|
1235
|
-
const path2 = [start];
|
|
1236
|
-
const visited = /* @__PURE__ */ new Set([start]);
|
|
1237
|
-
const search = (current) => {
|
|
1238
|
-
const neighbors = (graph.get(current) ?? []).filter((candidate) => componentSet.has(candidate));
|
|
1239
|
-
for (const next of neighbors) {
|
|
1240
|
-
if (next === start && path2.length > 1) {
|
|
1241
|
-
path2.push(start);
|
|
1242
|
-
return true;
|
|
1243
|
-
}
|
|
1244
|
-
if (visited.has(next)) {
|
|
1245
|
-
continue;
|
|
1246
|
-
}
|
|
1247
|
-
visited.add(next);
|
|
1248
|
-
path2.push(next);
|
|
1249
|
-
if (search(next)) {
|
|
1250
|
-
return true;
|
|
1251
|
-
}
|
|
1252
|
-
path2.pop();
|
|
1253
|
-
visited.delete(next);
|
|
1254
|
-
}
|
|
1255
|
-
return false;
|
|
1256
|
-
};
|
|
1257
|
-
if (search(start)) {
|
|
1258
|
-
return [...path2];
|
|
1259
|
-
}
|
|
1260
|
-
return [...component, start];
|
|
1261
|
-
}
|
|
1262
|
-
function detectLifecycleDependencyCycles(activeItems, idPrefix = "pm") {
|
|
1263
|
-
const graph = buildLifecycleDependencyGraph(activeItems, idPrefix);
|
|
1264
|
-
const cycleComponents = findLifecycleDependencyCycleComponents(graph);
|
|
1265
|
-
const cycleItemIds = [...new Set(cycleComponents.flat())].sort((left, right) => left.localeCompare(right));
|
|
1266
|
-
const cycleSamplePaths = cycleComponents.map((component) => resolveLifecycleDependencyCycleSamplePath(component, graph).join("->"));
|
|
1267
|
-
return {
|
|
1268
|
-
cycle_count: cycleComponents.length,
|
|
1269
|
-
cycle_item_ids: cycleItemIds,
|
|
1270
|
-
cycle_sample_paths: cycleSamplePaths
|
|
1271
|
-
};
|
|
1272
|
-
}
|
|
1273
|
-
function buildLifecycleParentGraph(items) {
|
|
1274
|
-
const canonicalIdByLowercase = new Map(items.map((item) => [item.id.toLowerCase(), item.id]));
|
|
1275
|
-
const graph = /* @__PURE__ */ new Map();
|
|
1276
|
-
const sortedItems = [...items].sort((left, right) => left.id.localeCompare(right.id));
|
|
1277
|
-
for (const item of sortedItems) {
|
|
1278
|
-
const edges = [];
|
|
1279
|
-
const parentId = toMeaningfulString(item.parent);
|
|
1280
|
-
const canonicalParentId = parentId ? canonicalIdByLowercase.get(parentId.toLowerCase()) : void 0;
|
|
1281
|
-
if (canonicalParentId) {
|
|
1282
|
-
edges.push(canonicalParentId);
|
|
1283
|
-
}
|
|
1284
|
-
graph.set(item.id, edges);
|
|
1285
|
-
}
|
|
1286
|
-
return graph;
|
|
1287
|
-
}
|
|
1288
|
-
function detectLifecycleParentCycles(items) {
|
|
1289
|
-
const graph = buildLifecycleParentGraph(items);
|
|
1290
|
-
const cycleComponents = findLifecycleDependencyCycleComponents(graph);
|
|
1291
|
-
const cycleItemIds = [...new Set(cycleComponents.flat())].sort((left, right) => left.localeCompare(right));
|
|
1292
|
-
const cycleSamplePaths = cycleComponents.map((component) => resolveLifecycleDependencyCycleSamplePath(component, graph).join("->"));
|
|
1293
|
-
return {
|
|
1294
|
-
cycle_count: cycleComponents.length,
|
|
1295
|
-
cycle_item_ids: cycleItemIds,
|
|
1296
|
-
cycle_sample_paths: cycleSamplePaths
|
|
1297
|
-
};
|
|
1298
|
-
}
|
|
1299
|
-
function classifyOrphanedPath(pathValue) {
|
|
1300
|
-
if (pathValue.startsWith("docs/")) {
|
|
1301
|
-
return "docs_unowned";
|
|
1302
|
-
}
|
|
1303
|
-
if (pathValue.startsWith("tests/")) {
|
|
1304
|
-
return "tests_unowned";
|
|
1305
|
-
}
|
|
1306
|
-
if (pathValue.startsWith("src/")) {
|
|
1307
|
-
return "source_unowned";
|
|
1308
|
-
}
|
|
1309
|
-
if (pathValue.endsWith(".md")) {
|
|
1310
|
-
return "docs_unowned";
|
|
1311
|
-
}
|
|
1312
|
-
return "unlinked_existing";
|
|
1313
|
-
}
|
|
1314
|
-
function directoryOf(relativePath) {
|
|
1315
|
-
const slash = relativePath.lastIndexOf("/");
|
|
1316
|
-
return slash === -1 ? "" : relativePath.slice(0, slash);
|
|
1317
|
-
}
|
|
1318
|
-
function sharedDirectoryPrefixLength(left, right) {
|
|
1319
|
-
const leftParts = directoryOf(left).split("/").filter(Boolean);
|
|
1320
|
-
const rightParts = directoryOf(right).split("/").filter(Boolean);
|
|
1321
|
-
let count = 0;
|
|
1322
|
-
while (count < leftParts.length && count < rightParts.length && leftParts[count] === rightParts[count]) {
|
|
1323
|
-
count += 1;
|
|
1324
|
-
}
|
|
1325
|
-
return count;
|
|
1326
|
-
}
|
|
1327
|
-
function scoreOrphanOwnerCandidate(pathValue, linkedPath) {
|
|
1328
|
-
const linkedDir = directoryOf(linkedPath);
|
|
1329
|
-
const orphanDir = directoryOf(pathValue);
|
|
1330
|
-
const directoryPrefix = linkedPath.endsWith("/") ? linkedPath : `${linkedPath}/`;
|
|
1331
|
-
const isDirectoryPrefix = pathValue.startsWith(directoryPrefix);
|
|
1332
|
-
const sameDirectory = linkedDir.length > 0 && linkedDir === orphanDir;
|
|
1333
|
-
const sharedPrefixLength = sharedDirectoryPrefixLength(pathValue, linkedPath);
|
|
1334
|
-
if (!isDirectoryPrefix && !sameDirectory && sharedPrefixLength === 0) {
|
|
1335
|
-
return null;
|
|
1336
|
-
}
|
|
1337
|
-
if (isDirectoryPrefix) {
|
|
1338
|
-
return { score: linkedPath.length + 1e3, confidence: "path_prefix" };
|
|
1339
|
-
}
|
|
1340
|
-
return sameDirectory ? { score: sharedPrefixLength + 500, confidence: "same_directory" } : { score: sharedPrefixLength, confidence: "shared_directory" };
|
|
1341
|
-
}
|
|
1342
|
-
function shouldReplaceOrphanOwnerCandidate(best, item, score) {
|
|
1343
|
-
return best === void 0 || score > best.score || score === best.score && item.id.localeCompare(best.item.id) < 0;
|
|
1344
|
-
}
|
|
1345
|
-
function findOrphanOwnerCandidate(pathValue, classification, items) {
|
|
1346
|
-
const linkKind = classification === "docs_unowned" ? "docs" : "files";
|
|
1347
|
-
let best;
|
|
1348
|
-
for (const item of items) {
|
|
1349
|
-
const links = linkKind === "docs" ? item.docs ?? [] : item.files ?? [];
|
|
1350
|
-
for (const link of links) {
|
|
1351
|
-
if (link.scope !== "project") {
|
|
1352
|
-
continue;
|
|
1353
|
-
}
|
|
1354
|
-
const linkedPath = normalizeRelativePath(link.path);
|
|
1355
|
-
if (linkedPath.length === 0 || linkedPath === pathValue) {
|
|
1356
|
-
continue;
|
|
1357
|
-
}
|
|
1358
|
-
const scored = scoreOrphanOwnerCandidate(pathValue, linkedPath);
|
|
1359
|
-
if (scored === null) {
|
|
1360
|
-
continue;
|
|
1361
|
-
}
|
|
1362
|
-
if (shouldReplaceOrphanOwnerCandidate(best, item, scored.score)) {
|
|
1363
|
-
best = {
|
|
1364
|
-
item,
|
|
1365
|
-
score: scored.score,
|
|
1366
|
-
confidence: scored.confidence
|
|
1367
|
-
};
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
if (!best) {
|
|
1372
|
-
return null;
|
|
1373
|
-
}
|
|
1374
|
-
return {
|
|
1375
|
-
id: best.item.id,
|
|
1376
|
-
type: best.item.type,
|
|
1377
|
-
title: best.item.title,
|
|
1378
|
-
status: best.item.status,
|
|
1379
|
-
confidence: best.confidence
|
|
1380
|
-
};
|
|
1381
|
-
}
|
|
1382
|
-
function buildOrphanedPathRows(orphanedFiles, items) {
|
|
1383
|
-
return orphanedFiles.map((pathValue) => {
|
|
1384
|
-
const classification = classifyOrphanedPath(pathValue);
|
|
1385
|
-
const linkCommand = classification === "docs_unowned" ? "docs" : "files";
|
|
1386
|
-
const ownerCandidate = findOrphanOwnerCandidate(pathValue, classification, items);
|
|
1387
|
-
const target = ownerCandidate?.id ?? "<id>";
|
|
1388
|
-
return {
|
|
1389
|
-
path: pathValue,
|
|
1390
|
-
classification,
|
|
1391
|
-
owner_candidate: ownerCandidate,
|
|
1392
|
-
remediation_hint: `pm ${linkCommand} ${target} --add path=${pathValue},scope=project,note="<why this artifact belongs to the item>"`
|
|
1393
|
-
};
|
|
1394
|
-
});
|
|
1395
|
-
}
|
|
1396
|
-
function summarizeOrphanedPathRows(rows) {
|
|
1397
|
-
return rows.map((row) => `${row.path}:${row.classification} owner_candidate=${row.owner_candidate?.id ?? "unowned"} hint=${JSON.stringify(row.remediation_hint)}`);
|
|
1398
|
-
}
|
|
1399
|
-
function closureLikeFieldsForItem(item, lifecyclePatternPolicy) {
|
|
1400
|
-
return Object.entries(lifecyclePatternPolicy.closure_like_metadata_field_patterns).filter(([field, patterns]) => {
|
|
1401
|
-
const value = toMeaningfulString(item[field]);
|
|
1402
|
-
return value ? patterns.some((pattern) => value.toLowerCase().includes(pattern)) : false;
|
|
1403
|
-
}).map(([field]) => field).sort((left, right) => left.localeCompare(right));
|
|
1404
|
-
}
|
|
1405
|
-
function buildTerminalParentFixRow(item, parent, itemsById, canonicalIdByLowercase, statusRegistry) {
|
|
1406
|
-
const grandparentId = toMeaningfulString(parent.parent);
|
|
1407
|
-
const grandparent = grandparentId ? itemsById.get(canonicalIdByLowercase.get(grandparentId.toLowerCase()) ?? grandparentId) : void 0;
|
|
1408
|
-
return {
|
|
1409
|
-
id: item.id,
|
|
1410
|
-
parent_id: parent.id,
|
|
1411
|
-
grandparent_id: grandparent?.id,
|
|
1412
|
-
grandparent_active: grandparent !== void 0 && !isTerminalStatus(grandparent.status, statusRegistry)
|
|
1413
|
-
};
|
|
1414
|
-
}
|
|
1415
|
-
function staleBlockerReasonsForItem(item, blockedStatuses, statusRegistry, lifecyclePatternPolicy) {
|
|
1416
|
-
const blockedBy = toMeaningfulString(item.blocked_by);
|
|
1417
|
-
const blockedReason = toMeaningfulString(item.blocked_reason);
|
|
1418
|
-
const blockedReasonNormalized = blockedReason?.toLowerCase();
|
|
1419
|
-
const normalizedStatus = normalizeStatusForRegistry(item.status, statusRegistry);
|
|
1420
|
-
const reasons = [];
|
|
1421
|
-
if (!blockedStatuses.has(normalizedStatus)) {
|
|
1422
|
-
if (blockedBy) {
|
|
1423
|
-
reasons.push("non_blocked_status_has_blocked_by");
|
|
1424
|
-
}
|
|
1425
|
-
if (blockedReason) {
|
|
1426
|
-
reasons.push("non_blocked_status_has_blocked_reason");
|
|
1427
|
-
}
|
|
1428
|
-
return reasons;
|
|
1429
|
-
}
|
|
1430
|
-
if (!blockedBy && !blockedReason) {
|
|
1431
|
-
reasons.push("blocked_status_missing_blocker_context");
|
|
1432
|
-
}
|
|
1433
|
-
if (blockedReasonNormalized?.includes("no active blocker")) {
|
|
1434
|
-
reasons.push("blocked_status_reason_reports_no_active_blocker");
|
|
1435
|
-
}
|
|
1436
|
-
if (blockedReasonNormalized && lifecyclePatternPolicy.stale_blocker_reason_patterns.some((pattern) => blockedReasonNormalized.includes(pattern))) {
|
|
1437
|
-
reasons.push("blocked_status_reason_matches_stale_pattern");
|
|
1438
|
-
}
|
|
1439
|
-
return reasons;
|
|
1440
|
-
}
|
|
1441
|
-
function collectLifecycleScanRows(items, includeStaleBlockers, statusRegistry, lifecyclePatternPolicy) {
|
|
1442
|
-
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
1443
|
-
const canonicalIdByLowercase = new Map(items.map((item) => [item.id.toLowerCase(), item.id]));
|
|
1444
|
-
const blockedStatuses = statusRegistry.blocked_statuses.size > 0 ? statusRegistry.blocked_statuses : /* @__PURE__ */ new Set(["blocked"]);
|
|
1445
|
-
const rows = {
|
|
1446
|
-
activeItems: items.filter((item) => !isTerminalStatus(item.status, statusRegistry)),
|
|
1447
|
-
closureLikeRows: [],
|
|
1448
|
-
terminalParentRows: [],
|
|
1449
|
-
terminalParentFixRows: [],
|
|
1450
|
-
staleBlockerRows: []
|
|
1451
|
-
};
|
|
1452
|
-
for (const item of rows.activeItems) {
|
|
1453
|
-
const closureLikeFields = closureLikeFieldsForItem(item, lifecyclePatternPolicy);
|
|
1454
|
-
if (closureLikeFields.length > 0) {
|
|
1455
|
-
rows.closureLikeRows.push({ id: item.id, fields: closureLikeFields });
|
|
1456
|
-
}
|
|
1457
|
-
const parentId = toMeaningfulString(item.parent);
|
|
1458
|
-
const parent = parentId ? itemsById.get(canonicalIdByLowercase.get(parentId.toLowerCase()) ?? parentId) : void 0;
|
|
1459
|
-
if (parent && isTerminalStatus(parent.status, statusRegistry)) {
|
|
1460
|
-
rows.terminalParentRows.push({ id: item.id, parent_id: parent.id, parent_status: parent.status });
|
|
1461
|
-
rows.terminalParentFixRows.push(buildTerminalParentFixRow(item, parent, itemsById, canonicalIdByLowercase, statusRegistry));
|
|
1462
|
-
}
|
|
1463
|
-
if (includeStaleBlockers) {
|
|
1464
|
-
const reasons = staleBlockerReasonsForItem(item, blockedStatuses, statusRegistry, lifecyclePatternPolicy);
|
|
1465
|
-
if (reasons.length > 0) {
|
|
1466
|
-
rows.staleBlockerRows.push({
|
|
1467
|
-
id: item.id,
|
|
1468
|
-
status: item.status,
|
|
1469
|
-
reasons: [...new Set(reasons)].sort((left, right) => left.localeCompare(right))
|
|
1470
|
-
});
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
}
|
|
1474
|
-
return rows;
|
|
1475
|
-
}
|
|
1476
|
-
function sortLifecycleScanRows(rows) {
|
|
1477
|
-
rows.closureLikeRows.sort((left, right) => left.id.localeCompare(right.id));
|
|
1478
|
-
rows.terminalParentRows.sort((left, right) => left.id.localeCompare(right.id) || left.parent_id.localeCompare(right.parent_id));
|
|
1479
|
-
rows.terminalParentFixRows.sort((left, right) => left.id.localeCompare(right.id) || left.parent_id.localeCompare(right.parent_id));
|
|
1480
|
-
rows.staleBlockerRows.sort((left, right) => left.id.localeCompare(right.id));
|
|
1481
|
-
}
|
|
1482
|
-
function lifecycleCycleWarningToken(prefix, severity, count) {
|
|
1483
|
-
if (count <= 0 || severity === "off") {
|
|
1484
|
-
return null;
|
|
1485
|
-
}
|
|
1486
|
-
return `${severity === "error" ? `${prefix}_error` : prefix}:${count}`;
|
|
1487
|
-
}
|
|
1488
|
-
function buildLifecycleWarnings(rows, includeStaleBlockers, dependencyCycleSeverity, parentCycleSeverity, dependencyCycleCount, parentCycleCount) {
|
|
1489
|
-
const warnings = [];
|
|
1490
|
-
if (rows.closureLikeRows.length > 0) {
|
|
1491
|
-
warnings.push(`validate_lifecycle_active_closure_like_metadata:${rows.closureLikeRows.length}`);
|
|
1492
|
-
}
|
|
1493
|
-
if (rows.terminalParentRows.length > 0) {
|
|
1494
|
-
warnings.push(`validate_lifecycle_active_terminal_parent:${rows.terminalParentRows.length}`);
|
|
1495
|
-
}
|
|
1496
|
-
if (includeStaleBlockers && rows.staleBlockerRows.length > 0) {
|
|
1497
|
-
warnings.push(`validate_lifecycle_stale_blockers:${rows.staleBlockerRows.length}`);
|
|
1498
|
-
}
|
|
1499
|
-
const dependencyWarning = lifecycleCycleWarningToken("validate_lifecycle_dependency_cycles", dependencyCycleSeverity, dependencyCycleCount);
|
|
1500
|
-
const parentWarning = lifecycleCycleWarningToken("validate_hierarchy_parent_cycle", parentCycleSeverity, parentCycleCount);
|
|
1501
|
-
return [...warnings, ...dependencyWarning ? [dependencyWarning] : [], ...parentWarning ? [parentWarning] : []];
|
|
1502
|
-
}
|
|
1503
|
-
function linkedArtifactPathExceedsFilesystemLimits(artifactPath) {
|
|
1504
|
-
const normalized = normalizeRelativePath(artifactPath);
|
|
1505
|
-
return normalized.length > LINKED_ARTIFACT_MAX_PATH_LENGTH || normalized.split(/[\\/]/).some((segment) => segment.length > LINKED_ARTIFACT_MAX_SEGMENT_LENGTH);
|
|
1506
|
-
}
|
|
1507
|
-
async function linkedArtifactIsMissing(workspaceRoot, artifactPath) {
|
|
1508
|
-
const absolutePath = path.isAbsolute(artifactPath) ? artifactPath : path.resolve(workspaceRoot, artifactPath);
|
|
1509
|
-
if (linkedArtifactPathExceedsFilesystemLimits(absolutePath)) {
|
|
1510
|
-
return false;
|
|
1511
|
-
}
|
|
1512
|
-
try {
|
|
1513
|
-
const stats = await fs.stat(absolutePath);
|
|
1514
|
-
return !stats.isFile() && !stats.isDirectory();
|
|
1515
|
-
} catch (error) {
|
|
1516
|
-
const code = typeof error === "object" && error !== null && "code" in error ? error.code : void 0;
|
|
1517
|
-
return code === "ENOENT" || code === "ENOTDIR";
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
|
-
async function collectLinkedPathScanState(items, workspaceRoot) {
|
|
1521
|
-
const state = {
|
|
1522
|
-
linkedProjectPaths: /* @__PURE__ */ new Set(),
|
|
1523
|
-
remoteLinkedPaths: /* @__PURE__ */ new Set(),
|
|
1524
|
-
missingLinkedPaths: [],
|
|
1525
|
-
staleLinkRows: []
|
|
1526
|
-
};
|
|
1527
|
-
for (const item of items) {
|
|
1528
|
-
const linkedArtifactGroups = [
|
|
1529
|
-
{ link_kind: "files", artifacts: item.files ?? [] },
|
|
1530
|
-
{ link_kind: "docs", artifacts: item.docs ?? [] }
|
|
1531
|
-
];
|
|
1532
|
-
for (const group of linkedArtifactGroups) {
|
|
1533
|
-
for (const artifact of group.artifacts) {
|
|
1534
|
-
if (artifact.scope !== "project") {
|
|
1535
|
-
continue;
|
|
1536
|
-
}
|
|
1537
|
-
if (isRemoteLinkedArtifactReference(artifact.path)) {
|
|
1538
|
-
state.remoteLinkedPaths.add(artifact.path.trim());
|
|
1539
|
-
continue;
|
|
1540
|
-
}
|
|
1541
|
-
const normalizedPath = normalizeRelativePath(artifact.path);
|
|
1542
|
-
if (normalizedPath.length === 0) {
|
|
1543
|
-
continue;
|
|
1544
|
-
}
|
|
1545
|
-
state.linkedProjectPaths.add(normalizedPath);
|
|
1546
|
-
if (await linkedArtifactIsMissing(workspaceRoot, artifact.path)) {
|
|
1547
|
-
state.missingLinkedPaths.push(normalizedPath);
|
|
1548
|
-
state.staleLinkRows.push({ item_id: item.id, path: normalizedPath, link_kind: group.link_kind });
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
1553
|
-
return state;
|
|
1554
|
-
}
|
|
1555
|
-
function partitionFileCandidates(fileCandidates, pmRoot, workspaceRoot, fileScanMode, includePmInternals, verboseFileLists) {
|
|
1556
|
-
const strictTrackedAllMode = fileScanMode === "tracked-all-strict";
|
|
1557
|
-
const strictModeForcesPmInternals = strictTrackedAllMode && !includePmInternals;
|
|
1558
|
-
const includePmInternalsEffective = includePmInternals || strictTrackedAllMode;
|
|
1559
|
-
const pmInternalCandidatePrefixes = includePmInternalsEffective ? [] : resolvePmInternalCandidatePrefixes(pmRoot, workspaceRoot);
|
|
1560
|
-
const excludedPmInternalPaths = pmInternalCandidatePrefixes.length === 0 ? [] : fileCandidates.candidateFiles.filter((candidate) => hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1561
|
-
const candidateFiles = pmInternalCandidatePrefixes.length === 0 ? fileCandidates.candidateFiles : fileCandidates.candidateFiles.filter((candidate) => !hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1562
|
-
const excludedByReason = {};
|
|
1563
|
-
if (excludedPmInternalPaths.length > 0) {
|
|
1564
|
-
const summarizedPmInternalPaths = summarizeFileList(excludedPmInternalPaths, verboseFileLists);
|
|
1565
|
-
excludedByReason.pm_internals = {
|
|
1566
|
-
count: excludedPmInternalPaths.length,
|
|
1567
|
-
paths: summarizedPmInternalPaths.values,
|
|
1568
|
-
paths_truncated: summarizedPmInternalPaths.truncated,
|
|
1569
|
-
paths_total: summarizedPmInternalPaths.total
|
|
1570
|
-
};
|
|
1571
|
-
}
|
|
1572
|
-
return {
|
|
1573
|
-
strictTrackedAllMode,
|
|
1574
|
-
strictModeForcesPmInternals,
|
|
1575
|
-
includePmInternalsEffective,
|
|
1576
|
-
pmInternalCandidatePrefixes,
|
|
1577
|
-
excludedPmInternalPaths,
|
|
1578
|
-
candidateFiles,
|
|
1579
|
-
excludedByReason
|
|
1580
|
-
};
|
|
1581
|
-
}
|
|
1582
|
-
function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverity, parentCycleSeverity, statusRegistry, lifecyclePatternPolicy, verboseDiagnostics, idPrefix = "pm") {
|
|
1583
|
-
const rows = collectLifecycleScanRows(items, includeStaleBlockers, statusRegistry, lifecyclePatternPolicy);
|
|
1584
|
-
sortLifecycleScanRows(rows);
|
|
1585
|
-
const dependencyCycleDiagnostics = detectLifecycleDependencyCycles(rows.activeItems, idPrefix);
|
|
1586
|
-
const parentCycleDiagnostics = detectLifecycleParentCycles(items);
|
|
1587
|
-
const warnings = buildLifecycleWarnings(rows, includeStaleBlockers, dependencyCycleSeverity, parentCycleSeverity, dependencyCycleDiagnostics.cycle_count, parentCycleDiagnostics.cycle_count);
|
|
1588
|
-
const diagnosticLimit = verboseDiagnostics ? Number.POSITIVE_INFINITY : DIAGNOSTIC_LIST_SUMMARY_LIMIT;
|
|
1589
|
-
const summarizedClosureLikeRows = summarizeList(rows.closureLikeRows.map((row) => `${row.id}:${row.fields.join(",")}`), diagnosticLimit);
|
|
1590
|
-
const summarizedTerminalParentRows = summarizeList(rows.terminalParentRows.map((row) => `${row.id}:${row.parent_id}:${row.parent_status}`), diagnosticLimit);
|
|
1591
|
-
const summarizedStaleBlockerRows = summarizeList(rows.staleBlockerRows.map((row) => `${row.id}:${row.status}:${row.reasons.join(",")}`), diagnosticLimit);
|
|
1592
|
-
const summarizedDependencyCycleItemIds = summarizeList(dependencyCycleDiagnostics.cycle_item_ids, diagnosticLimit);
|
|
1593
|
-
const summarizedDependencyCycleSamplePaths = summarizeList(dependencyCycleDiagnostics.cycle_sample_paths, diagnosticLimit);
|
|
1594
|
-
const summarizedParentCycleItemIds = summarizeList(parentCycleDiagnostics.cycle_item_ids, diagnosticLimit);
|
|
1595
|
-
const summarizedParentCycleSamplePaths = summarizeList(parentCycleDiagnostics.cycle_sample_paths, diagnosticLimit);
|
|
1596
|
-
const hasErrorSeverityCycle = dependencyCycleDiagnostics.cycle_count > 0 && dependencyCycleSeverity === "error" || parentCycleDiagnostics.cycle_count > 0 && parentCycleSeverity === "error";
|
|
1597
|
-
return {
|
|
1598
|
-
check: {
|
|
1599
|
-
name: "lifecycle",
|
|
1600
|
-
status: hasErrorSeverityCycle ? "error" : warnings.length === 0 ? "ok" : "warn",
|
|
1601
|
-
details: {
|
|
1602
|
-
checked_active_items: rows.activeItems.length,
|
|
1603
|
-
active_closure_like_metadata_items: rows.closureLikeRows.length,
|
|
1604
|
-
active_closure_like_metadata_rows: summarizedClosureLikeRows.values,
|
|
1605
|
-
active_closure_like_metadata_rows_truncated: summarizedClosureLikeRows.truncated,
|
|
1606
|
-
active_terminal_parent_items: rows.terminalParentRows.length,
|
|
1607
|
-
active_terminal_parent_rows: summarizedTerminalParentRows.values,
|
|
1608
|
-
active_terminal_parent_rows_truncated: summarizedTerminalParentRows.truncated,
|
|
1609
|
-
stale_blocker_checks_enabled: includeStaleBlockers,
|
|
1610
|
-
stale_blocker_items: rows.staleBlockerRows.length,
|
|
1611
|
-
stale_blocker_rows: summarizedStaleBlockerRows.values,
|
|
1612
|
-
stale_blocker_rows_truncated: summarizedStaleBlockerRows.truncated,
|
|
1613
|
-
dependency_cycle_severity_policy: dependencyCycleSeverity,
|
|
1614
|
-
dependency_cycle_count: dependencyCycleDiagnostics.cycle_count,
|
|
1615
|
-
dependency_cycle_item_count: dependencyCycleDiagnostics.cycle_item_ids.length,
|
|
1616
|
-
dependency_cycle_item_ids: summarizedDependencyCycleItemIds.values,
|
|
1617
|
-
dependency_cycle_item_ids_truncated: summarizedDependencyCycleItemIds.truncated,
|
|
1618
|
-
dependency_cycle_sample_paths: summarizedDependencyCycleSamplePaths.values,
|
|
1619
|
-
dependency_cycle_sample_paths_truncated: summarizedDependencyCycleSamplePaths.truncated,
|
|
1620
|
-
parent_cycle_severity_policy: parentCycleSeverity,
|
|
1621
|
-
parent_cycle_count: parentCycleDiagnostics.cycle_count,
|
|
1622
|
-
parent_cycle_item_count: parentCycleDiagnostics.cycle_item_ids.length,
|
|
1623
|
-
parent_cycle_item_ids: summarizedParentCycleItemIds.values,
|
|
1624
|
-
parent_cycle_item_ids_truncated: summarizedParentCycleItemIds.truncated,
|
|
1625
|
-
parent_cycle_sample_paths: summarizedParentCycleSamplePaths.values,
|
|
1626
|
-
parent_cycle_sample_paths_truncated: summarizedParentCycleSamplePaths.truncated,
|
|
1627
|
-
stale_blocker_reason_patterns: [...lifecyclePatternPolicy.stale_blocker_reason_patterns],
|
|
1628
|
-
stale_blocker_reason_pattern_source: lifecyclePatternPolicy.stale_blocker_reason_pattern_source,
|
|
1629
|
-
closure_like_blocked_reason_patterns: [
|
|
1630
|
-
...lifecyclePatternPolicy.closure_like_metadata_field_patterns.blocked_reason
|
|
1631
|
-
],
|
|
1632
|
-
closure_like_blocked_reason_pattern_source: lifecyclePatternPolicy.closure_like_metadata_field_pattern_sources.blocked_reason,
|
|
1633
|
-
closure_like_resolution_patterns: [...lifecyclePatternPolicy.closure_like_metadata_field_patterns.resolution],
|
|
1634
|
-
closure_like_resolution_pattern_source: lifecyclePatternPolicy.closure_like_metadata_field_pattern_sources.resolution,
|
|
1635
|
-
closure_like_actual_result_patterns: [...lifecyclePatternPolicy.closure_like_metadata_field_patterns.actual_result],
|
|
1636
|
-
closure_like_actual_result_pattern_source: lifecyclePatternPolicy.closure_like_metadata_field_pattern_sources.actual_result
|
|
1637
|
-
}
|
|
1638
|
-
},
|
|
1639
|
-
warnings,
|
|
1640
|
-
terminalParentFixRows: rows.terminalParentFixRows
|
|
1641
|
-
};
|
|
1642
|
-
}
|
|
1643
|
-
async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, includePmInternals, verboseFileLists) {
|
|
1644
|
-
const linkedPathState = await collectLinkedPathScanState(items, workspaceRoot);
|
|
1645
|
-
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
1646
|
-
const uniqueMissingLinkedPaths = [...new Set(linkedPathState.missingLinkedPaths)].sort((left, right) => left.localeCompare(right));
|
|
1647
|
-
const fileCandidates = await collectProjectFileCandidates(workspaceRoot, fileScanMode);
|
|
1648
|
-
const partition = partitionFileCandidates(fileCandidates, pmRoot, workspaceRoot, fileScanMode, includePmInternals, verboseFileLists);
|
|
1649
|
-
const orphanedFiles = partition.candidateFiles.filter((candidate) => !linkedPathState.linkedProjectPaths.has(candidate));
|
|
1650
|
-
const orphanedPathRows = buildOrphanedPathRows(orphanedFiles, items);
|
|
1651
|
-
const classifiedStalePaths = classifyStaleLinkedPaths(uniqueMissingLinkedPaths, partition.candidateFiles);
|
|
1652
|
-
const classificationByPath = new Map(classifiedStalePaths.map((entry) => [entry.path, entry.classification]));
|
|
1653
|
-
const movedStalePathCount = classifiedStalePaths.filter((entry) => entry.classification === "moved").length;
|
|
1654
|
-
const staleLinkPruneRows = linkedPathState.staleLinkRows.map((row) => ({
|
|
1655
|
-
...row,
|
|
1656
|
-
classification: classificationByPath.get(row.path) ?? "deleted"
|
|
1657
|
-
})).sort((left, right) => left.item_id.localeCompare(right.item_id) || left.path.localeCompare(right.path) || left.link_kind.localeCompare(right.link_kind));
|
|
1658
|
-
const warnings = [];
|
|
1659
|
-
if (partition.strictModeForcesPmInternals) {
|
|
1660
|
-
warnings.push("validate_files_tracked_all_strict_forces_pm_internals");
|
|
1661
|
-
}
|
|
1662
|
-
if (uniqueMissingLinkedPaths.length > 0) {
|
|
1663
|
-
warnings.push(`validate_files_missing_linked_paths:${uniqueMissingLinkedPaths.length}`);
|
|
1664
|
-
}
|
|
1665
|
-
if (orphanedFiles.length > 0) {
|
|
1666
|
-
warnings.push(`validate_files_orphaned_paths:${orphanedFiles.length}`);
|
|
1667
|
-
}
|
|
1668
|
-
const uniqueRemoteLinkedPaths = [...linkedPathState.remoteLinkedPaths].sort((left, right) => left.localeCompare(right));
|
|
1669
|
-
const summarizedRemote = summarizeFileList(uniqueRemoteLinkedPaths, verboseFileLists);
|
|
1670
|
-
const summarizedMissing = summarizeFileList(uniqueMissingLinkedPaths, verboseFileLists);
|
|
1671
|
-
const summarizedOrphaned = summarizeFileList(orphanedFiles, verboseFileLists);
|
|
1672
|
-
const summarizedOrphanedClassifications = summarizeFileList(orphanedPathRows.map((row) => `${row.path}:${row.classification}:owner_candidate=${row.owner_candidate?.id ?? "unowned"}`), verboseFileLists);
|
|
1673
|
-
const orphanedPathRowDetail = verboseFileLists ? orphanedPathRows : summarizeFileList(summarizeOrphanedPathRows(orphanedPathRows), false).values;
|
|
1674
|
-
const summarizedClassifications = summarizeFileList(summarizeStaleLinkedPathClassifications(classifiedStalePaths), verboseFileLists);
|
|
1675
|
-
const missingLinkedPathRows = staleLinkPruneRows.map((row) => ({
|
|
1676
|
-
item_id: row.item_id,
|
|
1677
|
-
path: row.path,
|
|
1678
|
-
link_kind: row.link_kind,
|
|
1679
|
-
classification: row.classification
|
|
1680
|
-
}));
|
|
1681
|
-
const ownerRows = buildMissingLinkedPathRows(missingLinkedPathRows, (id) => {
|
|
1682
|
-
const owner = itemsById.get(id);
|
|
1683
|
-
return owner ? { type: owner.type, title: owner.title, status: owner.status } : void 0;
|
|
1684
|
-
});
|
|
1685
|
-
const ownerRowDetail = verboseFileLists ? ownerRows : summarizeFileList(summarizeMissingLinkedPathRows(ownerRows), false).values;
|
|
1686
|
-
return {
|
|
1687
|
-
check: {
|
|
1688
|
-
name: "files",
|
|
1689
|
-
status: warnings.length === 0 ? "ok" : "warn",
|
|
1690
|
-
details: {
|
|
1691
|
-
workspace_root: workspaceRoot,
|
|
1692
|
-
scan_mode_requested: fileCandidates.requestedMode,
|
|
1693
|
-
scan_mode_applied: fileCandidates.appliedMode,
|
|
1694
|
-
strict_tracked_all_mode: partition.strictTrackedAllMode,
|
|
1695
|
-
strict_mode_forces_pm_internals: partition.strictModeForcesPmInternals,
|
|
1696
|
-
strict_mode_forces_pm_internals_notice: partition.strictModeForcesPmInternals ? "tracked-all-strict force-enables PM internals; pass --include-pm-internals to make inclusion explicit." : null,
|
|
1697
|
-
file_list_detail_mode: verboseFileLists ? "full" : "summary",
|
|
1698
|
-
file_list_summary_limit: FILE_LIST_SUMMARY_LIMIT,
|
|
1699
|
-
candidate_scan_source: fileCandidates.source,
|
|
1700
|
-
include_pm_internals: partition.includePmInternalsEffective,
|
|
1701
|
-
include_pm_internals_requested: includePmInternals,
|
|
1702
|
-
pm_internal_candidate_prefixes: partition.pmInternalCandidatePrefixes,
|
|
1703
|
-
pm_internal_excluded_count: partition.excludedPmInternalPaths.length,
|
|
1704
|
-
excluded_total: partition.excludedPmInternalPaths.length,
|
|
1705
|
-
excluded_by_reason: partition.excludedByReason,
|
|
1706
|
-
linked_project_paths: linkedPathState.linkedProjectPaths.size,
|
|
1707
|
-
remote_linked_paths_count: uniqueRemoteLinkedPaths.length,
|
|
1708
|
-
remote_linked_paths_total: summarizedRemote.total,
|
|
1709
|
-
remote_linked_paths: summarizedRemote.values,
|
|
1710
|
-
remote_linked_paths_truncated: summarizedRemote.truncated,
|
|
1711
|
-
candidate_total_raw: fileCandidates.candidateTotal,
|
|
1712
|
-
candidate_scanned_raw: fileCandidates.candidateScanned,
|
|
1713
|
-
candidate_total: partition.candidateFiles.length,
|
|
1714
|
-
candidate_scanned: partition.candidateFiles.length,
|
|
1715
|
-
scanned_candidate_files: partition.candidateFiles.length,
|
|
1716
|
-
missing_linked_paths_count: uniqueMissingLinkedPaths.length,
|
|
1717
|
-
missing_linked_paths_total: summarizedMissing.total,
|
|
1718
|
-
missing_linked_paths: summarizedMissing.values,
|
|
1719
|
-
missing_linked_paths_truncated: summarizedMissing.truncated,
|
|
1720
|
-
missing_linked_paths_moved_count: movedStalePathCount,
|
|
1721
|
-
missing_linked_paths_deleted_count: uniqueMissingLinkedPaths.length - movedStalePathCount,
|
|
1722
|
-
missing_linked_path_classifications: summarizedClassifications.values,
|
|
1723
|
-
missing_linked_path_classifications_truncated: summarizedClassifications.truncated,
|
|
1724
|
-
missing_linked_path_rows_count: ownerRows.length,
|
|
1725
|
-
missing_linked_path_rows: ownerRowDetail,
|
|
1726
|
-
orphaned_paths_count: orphanedFiles.length,
|
|
1727
|
-
orphaned_paths_total: summarizedOrphaned.total,
|
|
1728
|
-
orphaned_paths: summarizedOrphaned.values,
|
|
1729
|
-
orphaned_paths_truncated: summarizedOrphaned.truncated,
|
|
1730
|
-
orphaned_path_classifications: summarizedOrphanedClassifications.values,
|
|
1731
|
-
orphaned_path_classifications_truncated: summarizedOrphanedClassifications.truncated,
|
|
1732
|
-
orphaned_path_rows_count: orphanedPathRows.length,
|
|
1733
|
-
orphaned_path_rows: orphanedPathRowDetail
|
|
1734
|
-
}
|
|
1735
|
-
},
|
|
1736
|
-
warnings,
|
|
1737
|
-
staleLinkPruneRows
|
|
1738
|
-
};
|
|
1739
|
-
}
|
|
1740
|
-
async function buildHistoryDriftCheck(pmRoot, items, verboseDiagnostics) {
|
|
1741
|
-
const { missingStreams, unreadableStreams, hashMismatches, chainMismatches, driftedItems } = await scanHistoryDrift(pmRoot, items);
|
|
1742
|
-
const warnings = [];
|
|
1743
|
-
if (missingStreams.length > 0) {
|
|
1744
|
-
warnings.push(`validate_history_drift_missing_streams:${missingStreams.length}`);
|
|
1745
|
-
}
|
|
1746
|
-
if (unreadableStreams.length > 0) {
|
|
1747
|
-
warnings.push(`validate_history_drift_unreadable_streams:${unreadableStreams.length}`);
|
|
1748
|
-
}
|
|
1749
|
-
if (hashMismatches.length > 0) {
|
|
1750
|
-
warnings.push(`validate_history_drift_hash_mismatches:${hashMismatches.length}`);
|
|
1751
|
-
}
|
|
1752
|
-
if (chainMismatches.length > 0) {
|
|
1753
|
-
warnings.push(`validate_history_drift_chain_mismatches:${chainMismatches.length}`);
|
|
1754
|
-
}
|
|
1755
|
-
const diagnosticLimit = verboseDiagnostics ? Number.POSITIVE_INFINITY : DIAGNOSTIC_LIST_SUMMARY_LIMIT;
|
|
1756
|
-
const summarizedDrifted = summarizeList(driftedItems, diagnosticLimit);
|
|
1757
|
-
return {
|
|
1758
|
-
check: {
|
|
1759
|
-
name: "history_drift",
|
|
1760
|
-
status: warnings.length === 0 ? "ok" : "warn",
|
|
1761
|
-
details: {
|
|
1762
|
-
checked_items: items.length,
|
|
1763
|
-
drifted_items_count: driftedItems.length,
|
|
1764
|
-
drifted_items: summarizedDrifted.values,
|
|
1765
|
-
drifted_items_truncated: summarizedDrifted.truncated,
|
|
1766
|
-
counts: {
|
|
1767
|
-
missing_streams: missingStreams.length,
|
|
1768
|
-
unreadable_streams: unreadableStreams.length,
|
|
1769
|
-
hash_mismatches: hashMismatches.length,
|
|
1770
|
-
chain_mismatches: chainMismatches.length
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
},
|
|
1774
|
-
warnings
|
|
1775
|
-
};
|
|
1776
|
-
}
|
|
1777
|
-
function summarizeCommandReferenceRow(ownerId, referencedId, command) {
|
|
1778
|
-
const normalizedCommand = command.trim().replaceAll(/\s+/g, " ");
|
|
1779
|
-
const commandPreview = normalizedCommand.length > 120 ? `${normalizedCommand.slice(0, 117)}...` : normalizedCommand;
|
|
1780
|
-
return `${ownerId}:${referencedId}:${commandPreview}`;
|
|
1781
|
-
}
|
|
1782
|
-
function buildCommandReferencesCheck(items, idPrefix, verboseDiagnostics) {
|
|
1783
|
-
const knownIds = new Set(items.map((item) => item.id.toLowerCase()));
|
|
1784
|
-
let linkedCommandsScanned = 0;
|
|
1785
|
-
let referencedPmIdCount = 0;
|
|
1786
|
-
const referencedPmIds = /* @__PURE__ */ new Set();
|
|
1787
|
-
const staleReferenceRows = [];
|
|
1788
|
-
for (const item of items) {
|
|
1789
|
-
for (const linkedTest of item.tests ?? []) {
|
|
1790
|
-
if (typeof linkedTest.command !== "string" || linkedTest.command.trim().length === 0) {
|
|
1791
|
-
continue;
|
|
1792
|
-
}
|
|
1793
|
-
linkedCommandsScanned += 1;
|
|
1794
|
-
const referencedIds = extractReferencedPmItemIdsFromCommand(linkedTest.command, idPrefix);
|
|
1795
|
-
if (referencedIds.length === 0) {
|
|
1796
|
-
continue;
|
|
1797
|
-
}
|
|
1798
|
-
referencedPmIdCount += referencedIds.length;
|
|
1799
|
-
for (const referencedId of referencedIds) {
|
|
1800
|
-
referencedPmIds.add(referencedId);
|
|
1801
|
-
if (!knownIds.has(referencedId.toLowerCase())) {
|
|
1802
|
-
staleReferenceRows.push(summarizeCommandReferenceRow(item.id, referencedId, linkedTest.command));
|
|
1803
|
-
}
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
}
|
|
1807
|
-
const uniqueStaleReferenceRows = [...new Set(staleReferenceRows)].sort((left, right) => left.localeCompare(right));
|
|
1808
|
-
const stalePmIds = [...new Set(uniqueStaleReferenceRows.map((row) => row.split(":")[1] ?? ""))].filter((value) => value.length > 0).sort((left, right) => left.localeCompare(right));
|
|
1809
|
-
const warnings = uniqueStaleReferenceRows.length > 0 ? [`validate_command_references_stale_pm_ids:${uniqueStaleReferenceRows.length}`] : [];
|
|
1810
|
-
const diagnosticLimit = verboseDiagnostics ? Number.POSITIVE_INFINITY : DIAGNOSTIC_LIST_SUMMARY_LIMIT;
|
|
1811
|
-
const summarizedRows = summarizeList(uniqueStaleReferenceRows, diagnosticLimit);
|
|
1812
|
-
const summarizedStalePmIds = summarizeList(stalePmIds, diagnosticLimit);
|
|
1813
|
-
const summarizedReferencedPmIds = summarizeList([...referencedPmIds].sort((left, right) => left.localeCompare(right)), diagnosticLimit);
|
|
1814
|
-
return {
|
|
1815
|
-
check: {
|
|
1816
|
-
name: "command_references",
|
|
1817
|
-
status: warnings.length === 0 ? "ok" : "warn",
|
|
1818
|
-
details: {
|
|
1819
|
-
checked_items: items.length,
|
|
1820
|
-
linked_commands_scanned: linkedCommandsScanned,
|
|
1821
|
-
referenced_pm_ids_count: referencedPmIdCount,
|
|
1822
|
-
unique_referenced_pm_ids_count: referencedPmIds.size,
|
|
1823
|
-
unique_referenced_pm_ids: summarizedReferencedPmIds.values,
|
|
1824
|
-
unique_referenced_pm_ids_truncated: summarizedReferencedPmIds.truncated,
|
|
1825
|
-
stale_pm_id_references_count: uniqueStaleReferenceRows.length,
|
|
1826
|
-
stale_pm_ids_count: stalePmIds.length,
|
|
1827
|
-
stale_pm_ids: summarizedStalePmIds.values,
|
|
1828
|
-
stale_pm_ids_truncated: summarizedStalePmIds.truncated,
|
|
1829
|
-
stale_pm_id_reference_rows: summarizedRows.values,
|
|
1830
|
-
stale_pm_id_reference_rows_truncated: summarizedRows.truncated
|
|
1831
|
-
}
|
|
1832
|
-
},
|
|
1833
|
-
warnings
|
|
1834
|
-
};
|
|
1835
|
-
}
|
|
1836
|
-
function buildFormatVersionCheck(items, verboseDiagnostics) {
|
|
1837
|
-
const scan = scanItemFormatVersions(items.map((item) => ({ ref: item.id, version: effectiveItemFormatVersion(item) })));
|
|
1838
|
-
const warnings = [];
|
|
1839
|
-
if (scan.outdated.length > 0) {
|
|
1840
|
-
warnings.push(`validate_format_version_outdated_items:${scan.outdated.length}`);
|
|
1841
|
-
}
|
|
1842
|
-
if (scan.ahead.length > 0) {
|
|
1843
|
-
warnings.push(`validate_format_version_ahead_items:${scan.ahead.length}`);
|
|
1844
|
-
}
|
|
1845
|
-
const diagnosticLimit = verboseDiagnostics ? Number.POSITIVE_INFINITY : DIAGNOSTIC_LIST_SUMMARY_LIMIT;
|
|
1846
|
-
const summarizedOutdated = summarizeList(scan.outdated, diagnosticLimit);
|
|
1847
|
-
const summarizedAhead = summarizeList(scan.ahead, diagnosticLimit);
|
|
1848
|
-
const status = scan.ahead.length > 0 ? "error" : scan.outdated.length > 0 ? "warn" : "ok";
|
|
1849
|
-
return {
|
|
1850
|
-
check: {
|
|
1851
|
-
name: "format_version",
|
|
1852
|
-
status,
|
|
1853
|
-
details: {
|
|
1854
|
-
checked_items: items.length,
|
|
1855
|
-
current_format_version: CURRENT_ITEM_FORMAT_VERSION,
|
|
1856
|
-
outdated_items_count: scan.outdated.length,
|
|
1857
|
-
outdated_items: summarizedOutdated.values,
|
|
1858
|
-
outdated_items_truncated: summarizedOutdated.truncated,
|
|
1859
|
-
ahead_items_count: scan.ahead.length,
|
|
1860
|
-
ahead_items: summarizedAhead.values,
|
|
1861
|
-
ahead_items_truncated: summarizedAhead.truncated
|
|
1862
|
-
}
|
|
1863
|
-
},
|
|
1864
|
-
warnings
|
|
1865
|
-
};
|
|
1866
|
-
}
|
|
1867
|
-
var VALIDATE_AUTO_FIX_MESSAGE = "pm validate auto-fix";
|
|
1868
|
-
async function applyValidateFix(fix, global2) {
|
|
1869
|
-
switch (fix.kind) {
|
|
1870
|
-
case "set_resolution":
|
|
1871
|
-
case "set_close_reason":
|
|
1872
|
-
case "set_estimate":
|
|
1873
|
-
case "reparent":
|
|
1874
|
-
case "unset_parent": {
|
|
1875
|
-
const { runUpdate } = await import("./update-SJZ6S77U.js");
|
|
1876
|
-
const updateOptions = { message: VALIDATE_AUTO_FIX_MESSAGE };
|
|
1877
|
-
if (fix.kind === "set_resolution") {
|
|
1878
|
-
updateOptions.resolution = fix.value;
|
|
1879
|
-
} else if (fix.kind === "set_close_reason") {
|
|
1880
|
-
updateOptions.closeReason = fix.value;
|
|
1881
|
-
} else if (fix.kind === "set_estimate") {
|
|
1882
|
-
updateOptions.estimatedMinutes = fix.value;
|
|
1883
|
-
} else if (fix.kind === "reparent") {
|
|
1884
|
-
updateOptions.parent = fix.parent_id;
|
|
1885
|
-
} else {
|
|
1886
|
-
updateOptions.unset = ["parent"];
|
|
1887
|
-
}
|
|
1888
|
-
await runUpdate(fix.item_id, updateOptions, global2);
|
|
1889
|
-
return;
|
|
1890
|
-
}
|
|
1891
|
-
case "prune_file_link": {
|
|
1892
|
-
throw new Error(`Unsupported non-batched fix kind: ${fix.kind}`);
|
|
1893
|
-
}
|
|
1894
|
-
case "prune_doc_link": {
|
|
1895
|
-
throw new Error(`Unsupported non-batched fix kind: ${fix.kind}`);
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
}
|
|
1899
|
-
function pruneBatchKey(fix) {
|
|
1900
|
-
if (fix.kind !== "prune_file_link" && fix.kind !== "prune_doc_link") {
|
|
1901
|
-
return null;
|
|
1902
|
-
}
|
|
1903
|
-
return `${fix.kind}:${fix.item_id}`;
|
|
1904
|
-
}
|
|
1905
|
-
async function applyValidateFixes(applicable, global2) {
|
|
1906
|
-
const applied = [];
|
|
1907
|
-
const failed = [];
|
|
1908
|
-
const pruneBatches = /* @__PURE__ */ new Map();
|
|
1909
|
-
for (const fix of applicable) {
|
|
1910
|
-
const batchKey = pruneBatchKey(fix);
|
|
1911
|
-
if (batchKey === null) {
|
|
1912
|
-
try {
|
|
1913
|
-
await applyValidateFix(fix, global2);
|
|
1914
|
-
applied.push(fix);
|
|
1915
|
-
} catch (error) {
|
|
1916
|
-
failed.push({ fix, error });
|
|
1917
|
-
}
|
|
1918
|
-
continue;
|
|
1919
|
-
}
|
|
1920
|
-
const existing = pruneBatches.get(batchKey);
|
|
1921
|
-
if (existing) {
|
|
1922
|
-
existing.push(fix);
|
|
1923
|
-
} else {
|
|
1924
|
-
pruneBatches.set(batchKey, [fix]);
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
for (const batch of pruneBatches.values()) {
|
|
1928
|
-
const first = batch[0];
|
|
1929
|
-
if (!first) {
|
|
1930
|
-
continue;
|
|
1931
|
-
}
|
|
1932
|
-
const remove = batch.map((fix) => fix.path).filter((value) => typeof value === "string" && value.length > 0);
|
|
1933
|
-
try {
|
|
1934
|
-
if (first.kind === "prune_file_link") {
|
|
1935
|
-
const { runFiles } = await import("./files-6P57MRKL.js");
|
|
1936
|
-
await runFiles(first.item_id, { remove, message: VALIDATE_AUTO_FIX_MESSAGE }, global2);
|
|
1937
|
-
} else {
|
|
1938
|
-
const { runDocs } = await import("./docs-S6UTOTO5.js");
|
|
1939
|
-
await runDocs(first.item_id, { remove, message: VALIDATE_AUTO_FIX_MESSAGE }, global2);
|
|
1940
|
-
}
|
|
1941
|
-
applied.push(...batch);
|
|
1942
|
-
} catch (error) {
|
|
1943
|
-
failed.push(...batch.map((fix) => ({ fix, error })));
|
|
1944
|
-
}
|
|
1945
|
-
}
|
|
1946
|
-
return { applied, failed };
|
|
1947
|
-
}
|
|
1948
|
-
var _testOnlyValidateCommand = {
|
|
1949
|
-
applyValidateFix,
|
|
1950
|
-
applyValidateFixes,
|
|
1951
|
-
attachValidateFixHints,
|
|
1952
|
-
buildCommandReferencesCheck,
|
|
1953
|
-
buildCloseReasonBackfillRows,
|
|
1954
|
-
buildFilesCheck,
|
|
1955
|
-
buildLifecycleCheck,
|
|
1956
|
-
buildLifecycleDependencyGraph,
|
|
1957
|
-
buildLifecycleParentGraph,
|
|
1958
|
-
buildEstimateBackfillRows,
|
|
1959
|
-
buildMetadataCounts,
|
|
1960
|
-
buildMissingFieldOccurrences,
|
|
1961
|
-
buildOrphanedPathRows,
|
|
1962
|
-
classifyOrphanedPath,
|
|
1963
|
-
collectDefaultProjectFileCandidates,
|
|
1964
|
-
collectTrackedGitFileCandidates,
|
|
1965
|
-
detectLifecycleDependencyCycles,
|
|
1966
|
-
detectLifecycleParentCycles,
|
|
1967
|
-
escapeRegExp,
|
|
1968
|
-
extractItemIds,
|
|
1969
|
-
findLifecycleDependencyCycleComponents,
|
|
1970
|
-
isMetadataFieldMissing,
|
|
1971
|
-
linkedArtifactPathExceedsFilesystemLimits,
|
|
1972
|
-
listFilesRecursive,
|
|
1973
|
-
resolveDependencyCycleSeverity,
|
|
1974
|
-
resolveParentCycleSeverity,
|
|
1975
|
-
resolveFileScanMode,
|
|
1976
|
-
resolveLifecycleDependencyCycleSamplePath,
|
|
1977
|
-
resolveRequestedChecks,
|
|
1978
|
-
resolveValidateMetadataProfile,
|
|
1979
|
-
resolveWorkspaceRoot,
|
|
1980
|
-
sharedDirectoryPrefixLength,
|
|
1981
|
-
summarizeOrphanedPathRows,
|
|
1982
|
-
summarizeDuplicateIssueCodes,
|
|
1983
|
-
toMeaningfulString
|
|
1984
|
-
};
|
|
1985
|
-
function recordValidateCheck(state, built, fixHintsEnabled) {
|
|
1986
|
-
if (fixHintsEnabled) {
|
|
1987
|
-
attachValidateFixHints(built.check, built.warnings);
|
|
1988
|
-
}
|
|
1989
|
-
state.checks.push(built.check);
|
|
1990
|
-
state.warnings.push(...built.warnings);
|
|
1991
|
-
}
|
|
1992
|
-
async function executeRequestedValidateChecks(params) {
|
|
1993
|
-
const state = {
|
|
1994
|
-
checks: [],
|
|
1995
|
-
warnings: [...params.initialWarnings],
|
|
1996
|
-
closeReasonBackfillRows: [],
|
|
1997
|
-
estimateBackfillRows: [],
|
|
1998
|
-
resolutionBackfillRows: [],
|
|
1999
|
-
terminalParentFixRows: [],
|
|
2000
|
-
staleLinkPruneRows: []
|
|
2001
|
-
};
|
|
2002
|
-
const fixHintsEnabled = params.options.fixHints === true;
|
|
2003
|
-
const fullDiagnostics = params.options.verboseDiagnostics === true || params.options.allAffectedIds === true || params.global.json === true;
|
|
2004
|
-
if (params.requestedChecks.has("metadata")) {
|
|
2005
|
-
const built = buildMetadataCheck(params.items, params.metadataPolicy, params.statusRegistry, fullDiagnostics);
|
|
2006
|
-
state.closeReasonBackfillRows = built.closeReasonBackfillRows;
|
|
2007
|
-
state.estimateBackfillRows = built.estimateBackfillRows;
|
|
2008
|
-
recordValidateCheck(state, built, fixHintsEnabled);
|
|
2009
|
-
}
|
|
2010
|
-
if (params.requestedChecks.has("resolution")) {
|
|
2011
|
-
const built = buildResolutionCheck(params.items, params.statusRegistry, fullDiagnostics);
|
|
2012
|
-
state.resolutionBackfillRows = built.resolutionBackfillRows;
|
|
2013
|
-
recordValidateCheck(state, built, fixHintsEnabled);
|
|
2014
|
-
}
|
|
2015
|
-
if (params.requestedChecks.has("lifecycle")) {
|
|
2016
|
-
const built = buildLifecycleCheck(params.items, Boolean(params.options.checkStaleBlockers), params.dependencyCycleSeverity, params.parentCycleSeverity, params.statusRegistry, params.lifecyclePatternPolicy, fullDiagnostics, params.settings.id_prefix);
|
|
2017
|
-
state.terminalParentFixRows = built.terminalParentFixRows;
|
|
2018
|
-
recordValidateCheck(state, built, fixHintsEnabled);
|
|
2019
|
-
}
|
|
2020
|
-
if (params.requestedChecks.has("files")) {
|
|
2021
|
-
const built = await buildFilesCheck(params.items, params.workspaceRoot, params.pmRoot, params.fileScanMode, Boolean(params.options.includePmInternals), Boolean(params.options.verboseFileLists));
|
|
2022
|
-
state.staleLinkPruneRows = built.staleLinkPruneRows;
|
|
2023
|
-
recordValidateCheck(state, built, fixHintsEnabled);
|
|
2024
|
-
}
|
|
2025
|
-
if (params.requestedChecks.has("command_references")) {
|
|
2026
|
-
recordValidateCheck(state, buildCommandReferencesCheck(params.items, params.settings.id_prefix, fullDiagnostics), fixHintsEnabled);
|
|
2027
|
-
}
|
|
2028
|
-
if (params.requestedChecks.has("history_drift")) {
|
|
2029
|
-
recordValidateCheck(state, await buildHistoryDriftCheck(params.pmRoot, params.items, fullDiagnostics), fixHintsEnabled);
|
|
2030
|
-
}
|
|
2031
|
-
if (params.requestedChecks.has("format_version")) {
|
|
2032
|
-
recordValidateCheck(state, buildFormatVersionCheck(params.items, fullDiagnostics), fixHintsEnabled);
|
|
2033
|
-
}
|
|
2034
|
-
return state;
|
|
2035
|
-
}
|
|
2036
|
-
function planValidateFixes(options, state, settings) {
|
|
2037
|
-
const planned = [];
|
|
2038
|
-
if (options.autoFix === true) {
|
|
2039
|
-
planned.push(...planCloseReasonBackfillFixes(state.closeReasonBackfillRows));
|
|
2040
|
-
planned.push(...planResolutionBackfillFixes(state.resolutionBackfillRows));
|
|
2041
|
-
planned.push(...planEstimateBackfillFixes(state.estimateBackfillRows, settings.validation.estimate_defaults_by_type));
|
|
2042
|
-
planned.push(...planTerminalParentFixes(state.terminalParentFixRows));
|
|
2043
|
-
}
|
|
2044
|
-
if (options.pruneMissing === true) {
|
|
2045
|
-
planned.push(...planStaleLinkPruneFixes(state.staleLinkPruneRows));
|
|
2046
|
-
}
|
|
2047
|
-
return planned;
|
|
2048
|
-
}
|
|
2049
|
-
async function buildValidateFixesSummary(options, state, settings, grantedFixScopes, global2) {
|
|
2050
|
-
if (options.autoFix !== true && options.pruneMissing !== true) {
|
|
2051
|
-
return void 0;
|
|
2052
|
-
}
|
|
2053
|
-
const planned = planValidateFixes(options, state, settings);
|
|
2054
|
-
const { applicable, gated } = partitionFixesByGrant(planned, grantedFixScopes);
|
|
2055
|
-
const dryRun = options.dryRun === true;
|
|
2056
|
-
const appliedFixRows = [];
|
|
2057
|
-
const failedFixRows = [];
|
|
2058
|
-
if (!dryRun) {
|
|
2059
|
-
const applied = await applyValidateFixes(applicable, global2);
|
|
2060
|
-
appliedFixRows.push(...applied.applied.map(toFixOutputRow));
|
|
2061
|
-
failedFixRows.push(...applied.failed.map(({ fix, error }) => ({
|
|
2062
|
-
...toFixOutputRow(fix),
|
|
2063
|
-
error: error instanceof Error ? error.message : String(error)
|
|
2064
|
-
})));
|
|
2065
|
-
}
|
|
2066
|
-
return {
|
|
2067
|
-
mode: dryRun ? "dry_run" : "apply",
|
|
2068
|
-
auto_fix: options.autoFix === true,
|
|
2069
|
-
prune_missing: options.pruneMissing === true,
|
|
2070
|
-
granted_fix_scopes: [...grantedFixScopes].sort((left, right) => left.localeCompare(right)),
|
|
2071
|
-
planned_count: planned.length,
|
|
2072
|
-
applied_count: appliedFixRows.length,
|
|
2073
|
-
gated_count: gated.length,
|
|
2074
|
-
failed_count: failedFixRows.length,
|
|
2075
|
-
planned_fixes: planned.map(toFixOutputRow),
|
|
2076
|
-
applied_fixes: appliedFixRows,
|
|
2077
|
-
gated_fixes: gated.map((fix) => ({
|
|
2078
|
-
...toFixOutputRow(fix),
|
|
2079
|
-
gate_hint: `Withheld: re-run with --fix-scope ${fix.gate} to apply.`
|
|
2080
|
-
})),
|
|
2081
|
-
failed_fixes: failedFixRows
|
|
2082
|
-
};
|
|
2083
|
-
}
|
|
2084
|
-
async function runValidate(options, global2) {
|
|
2085
|
-
const fixesRequested = options.autoFix === true || options.pruneMissing === true;
|
|
2086
|
-
if (options.dryRun === true && !fixesRequested) {
|
|
2087
|
-
throw new PmCliError("--dry-run requires --auto-fix or --prune-missing (there is nothing to preview otherwise).", EXIT_CODE.USAGE);
|
|
2088
|
-
}
|
|
2089
|
-
if (options.fixScope !== void 0 && options.fixScope.length > 0 && options.autoFix !== true) {
|
|
2090
|
-
throw new PmCliError("--fix-scope requires --auto-fix.", EXIT_CODE.USAGE);
|
|
2091
|
-
}
|
|
2092
|
-
const grantedFixScopes = resolveGrantedFixScopes(options.fixScope);
|
|
2093
|
-
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
2094
|
-
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
2095
|
-
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
2096
|
-
}
|
|
2097
|
-
const settings = await readSettings(pmRoot);
|
|
2098
|
-
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
2099
|
-
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
2100
|
-
const itemReadWarnings = [];
|
|
2101
|
-
const items = await listAllFrontMatterWithBody(pmRoot, settings.item_format, typeRegistry.type_to_folder, itemReadWarnings, settings.schema);
|
|
2102
|
-
const requestedChecks = resolveRequestedChecks(options);
|
|
2103
|
-
const metadataProfileSource = typeof options.metadataProfile === "string" ? "option" : "settings";
|
|
2104
|
-
const metadataProfile = resolveValidateMetadataProfile(typeof options.metadataProfile === "string" ? options.metadataProfile : settings.validation.metadata_profile);
|
|
2105
|
-
const metadataPolicy = resolveValidateMetadataPolicy(metadataProfile, metadataProfileSource, settings.validation.metadata_required_fields);
|
|
2106
|
-
const lifecyclePatternPolicy = resolveLifecyclePatternPolicy(settings);
|
|
2107
|
-
const dependencyCycleSeverity = resolveDependencyCycleSeverity(options.dependencyCycleSeverity);
|
|
2108
|
-
const parentCycleSeverity = resolveParentCycleSeverity(options.parentCycleSeverity);
|
|
2109
|
-
const fileScanMode = resolveFileScanMode(options.scanMode);
|
|
2110
|
-
const workspaceRoot = resolveWorkspaceRoot(pmRoot);
|
|
2111
|
-
const state = await executeRequestedValidateChecks({
|
|
2112
|
-
requestedChecks,
|
|
2113
|
-
options,
|
|
2114
|
-
global: global2,
|
|
2115
|
-
pmRoot,
|
|
2116
|
-
workspaceRoot,
|
|
2117
|
-
settings,
|
|
2118
|
-
items,
|
|
2119
|
-
statusRegistry,
|
|
2120
|
-
metadataPolicy,
|
|
2121
|
-
lifecyclePatternPolicy,
|
|
2122
|
-
dependencyCycleSeverity,
|
|
2123
|
-
parentCycleSeverity,
|
|
2124
|
-
fileScanMode,
|
|
2125
|
-
initialWarnings: [...new Set(itemReadWarnings)]
|
|
2126
|
-
});
|
|
2127
|
-
const fixes = fixesRequested ? await buildValidateFixesSummary(options, state, settings, grantedFixScopes, global2) : void 0;
|
|
2128
|
-
const normalizedWarnings = [...new Set(state.warnings)].sort((left, right) => left.localeCompare(right));
|
|
2129
|
-
const hasErrors = state.checks.some((check) => check.status === "error");
|
|
2130
|
-
return {
|
|
2131
|
-
ok: !hasErrors,
|
|
2132
|
-
has_warnings: normalizedWarnings.length > 0,
|
|
2133
|
-
checks: state.checks,
|
|
2134
|
-
warnings: normalizedWarnings,
|
|
2135
|
-
...fixes !== void 0 ? { fixes } : {},
|
|
2136
|
-
generated_at: nowIso()
|
|
2137
|
-
};
|
|
2138
|
-
}
|
|
2139
|
-
export {
|
|
2140
|
-
_testOnlyValidateCommand,
|
|
2141
|
-
runValidate
|
|
2142
|
-
};
|
|
2143
|
-
//# sourceMappingURL=validate-PA4FDTOV.js.map
|