@unbrained/pm-cli 2026.7.1 → 2026.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +3 -3
- package/CHANGELOG.md +25 -0
- package/CONTRIBUTING.md +2 -2
- package/README.md +1 -1
- package/dist/cli/commander-usage.d.ts +2 -0
- package/dist/cli/commander-usage.js +110 -86
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/activity.js +79 -57
- package/dist/cli/commands/activity.js.map +1 -1
- package/dist/cli/commands/aggregate.js +102 -79
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.js +278 -243
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.js +176 -114
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/close.js +157 -129
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments-audit.js +50 -42
- package/dist/cli/commands/comments-audit.js.map +1 -1
- package/dist/cli/commands/config.d.ts +2 -0
- package/dist/cli/commands/config.js +443 -879
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.js +365 -287
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.js +352 -238
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.js +32 -17
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/dedupe-audit.js +46 -39
- package/dist/cli/commands/dedupe-audit.js.map +1 -1
- package/dist/cli/commands/dedupe-merge.js +88 -69
- package/dist/cli/commands/dedupe-merge.js.map +1 -1
- package/dist/cli/commands/extension/doctor.js +56 -67
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/shared.js +21 -15
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/get.js +114 -81
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.d.ts +17 -0
- package/dist/cli/commands/health.js +545 -417
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.js +209 -140
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-redact.js +162 -119
- package/dist/cli/commands/history-redact.js.map +1 -1
- package/dist/cli/commands/history-repair.js +120 -85
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.js +32 -19
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.d.ts +8 -2
- package/dist/cli/commands/init.js +263 -162
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list.js +152 -102
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/next.js +60 -40
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/plan.js +373 -298
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/profile.js +23 -15
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/recurrence-parsers.js +43 -25
- package/dist/cli/commands/recurrence-parsers.js.map +1 -1
- package/dist/cli/commands/reindex.d.ts +21 -5
- package/dist/cli/commands/reindex.js +345 -205
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +8 -7
- package/dist/cli/commands/restore.js +105 -69
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.js +33 -30
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +10 -2
- package/dist/cli/commands/search.js +503 -470
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/telemetry.js +98 -87
- package/dist/cli/commands/telemetry.js.map +1 -1
- package/dist/cli/commands/test-all.js +237 -168
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test.d.ts +6 -5
- package/dist/cli/commands/test.js +424 -344
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +57 -42
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +1 -1
- package/dist/cli/commands/update.js +738 -671
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +20 -1
- package/dist/cli/commands/validate.js +478 -343
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +406 -361
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.js +27 -19
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/help-json-payload.js +57 -49
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.d.ts +47 -0
- package/dist/cli/main.js +474 -371
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/migration-gates.js +22 -45
- package/dist/cli/migration-gates.js.map +1 -1
- package/dist/cli/register-list-query.js +299 -310
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +763 -779
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +386 -362
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +120 -101
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +4 -0
- package/dist/cli/registration-helpers.js +45 -56
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js → activity-5YWLSPGE.js} +9 -9
- package/dist/cli-bundle/chunks/activity-BIML7K2D.js +16 -0
- package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js → aggregate-2V2M3JZU.js} +107 -83
- package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js.map → aggregate-2V2M3JZU.js.map} +2 -2
- package/dist/cli-bundle/chunks/{aggregate-JTEF4BP7.js → aggregate-EK7DXML7.js} +108 -84
- package/dist/cli-bundle/chunks/aggregate-EK7DXML7.js.map +1 -0
- package/dist/cli-bundle/chunks/{append-LOVPGVPT.js → append-EZESUVJT.js} +8 -8
- package/dist/cli-bundle/chunks/{append-QCFJSDFL.js → append-JFG4WQMG.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-TP5Q5ZD3.js → chunk-32IUNTG4.js} +158 -119
- package/dist/cli-bundle/chunks/chunk-32IUNTG4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js → chunk-3W2HJKJX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VARHOHYV.js → chunk-4EXFFP7T.js} +86 -52
- package/dist/cli-bundle/chunks/chunk-4EXFFP7T.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js → chunk-4PFVUUYV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JSU5P7VS.js → chunk-4WB6S4YX.js} +308 -184
- package/dist/cli-bundle/chunks/chunk-4WB6S4YX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HXTQJXWT.js → chunk-572FKBRL.js} +61 -102
- package/dist/cli-bundle/chunks/chunk-572FKBRL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js → chunk-5E7N4T2Z.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js → chunk-5IZUBZBR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js → chunk-5JIWFWOZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FFMQB7WR.js → chunk-67LARBDL.js} +493 -404
- package/dist/cli-bundle/chunks/chunk-67LARBDL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js → chunk-6CDCWKSX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-3K2M5OYU.js → chunk-6KRFL33E.js} +308 -184
- package/dist/cli-bundle/chunks/chunk-6KRFL33E.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js → chunk-6NYJGMTY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js → chunk-7CLLC75T.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-2466X6E4.js → chunk-7LYO6S5A.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js → chunk-A3OQ7TFW.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-5CGRF3L5.js → chunk-AIKU3IIL.js} +153 -90
- package/dist/cli-bundle/chunks/chunk-AIKU3IIL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WYDHYJPO.js → chunk-AJHYQCBJ.js} +39 -5
- package/dist/cli-bundle/chunks/chunk-AJHYQCBJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js → chunk-B4O5S7I3.js} +79 -57
- package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js.map → chunk-B4O5S7I3.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OTUHB4HS.js → chunk-BE2SR6QL.js} +92 -77
- package/dist/cli-bundle/chunks/chunk-BE2SR6QL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JLM7BHI7.js → chunk-BI4R7HI2.js} +75 -53
- package/dist/cli-bundle/chunks/chunk-BI4R7HI2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AXIDKKAT.js → chunk-CXR3CMBQ.js} +33 -6
- package/dist/cli-bundle/chunks/chunk-CXR3CMBQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZETXE4SE.js → chunk-ECU6MMTQ.js} +713 -613
- package/dist/cli-bundle/chunks/chunk-ECU6MMTQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2D4HATP2.js → chunk-EJ2OCBHF.js} +54 -30
- package/dist/cli-bundle/chunks/chunk-EJ2OCBHF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BDTISOSD.js → chunk-EQURFOMH.js} +41 -26
- package/dist/cli-bundle/chunks/chunk-EQURFOMH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js → chunk-ER4ME5U2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js → chunk-ERG65A2L.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IZBR4NRW.js → chunk-F6WNBITZ.js} +157 -113
- package/dist/cli-bundle/chunks/chunk-F6WNBITZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js → chunk-FH2H3CBD.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-JPECA746.js → chunk-FUFFPIYA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CF7RL6FR.js → chunk-FZJM2TXF.js} +110 -73
- package/dist/cli-bundle/chunks/chunk-FZJM2TXF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js → chunk-GUYNUXQT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js → chunk-GVJE5T7Q.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3J6JRJ3I.js → chunk-HB4FAT3O.js} +42 -60
- package/dist/cli-bundle/chunks/chunk-HB4FAT3O.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-55SNVXRQ.js → chunk-HQAF23Q2.js} +626 -484
- package/dist/cli-bundle/chunks/chunk-HQAF23Q2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js → chunk-JBZ2NTKX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RMMQ74TG.js → chunk-JPATY4SE.js} +54 -30
- package/dist/cli-bundle/chunks/chunk-JPATY4SE.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IPYBJWTE.js → chunk-K5DT2YKM.js} +109 -72
- package/dist/cli-bundle/chunks/chunk-K5DT2YKM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js → chunk-KEZOIPCR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RVUALSJF.js → chunk-KHVGM5CS.js} +466 -365
- package/dist/cli-bundle/chunks/chunk-KHVGM5CS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YITK2PJ6.js → chunk-KS6ATO47.js} +288 -175
- package/dist/cli-bundle/chunks/chunk-KS6ATO47.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7R4QEMZZ.js → chunk-L4SLHV6G.js} +463 -362
- package/dist/cli-bundle/chunks/chunk-L4SLHV6G.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RLDHZHQS.js → chunk-LBE5QFMZ.js} +158 -114
- package/dist/cli-bundle/chunks/chunk-LBE5QFMZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-22WKIL3H.js → chunk-LCWQP6NM.js} +76 -54
- package/dist/cli-bundle/chunks/chunk-LCWQP6NM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KNPEF7QG.js → chunk-LOWVNZBZ.js} +91 -76
- package/dist/cli-bundle/chunks/chunk-LOWVNZBZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js → chunk-MDHWWBNZ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js → chunk-MEZZZBYX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-V3NOKJF2.js → chunk-MHRS5FUX.js} +288 -175
- package/dist/cli-bundle/chunks/chunk-MHRS5FUX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3XZCOZ5J.js → chunk-NOIEVOK5.js} +391 -313
- package/dist/cli-bundle/chunks/chunk-NOIEVOK5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js → chunk-NZ7QIUP5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-UYUYDGIB.js → chunk-OGLGI22K.js} +115 -67
- package/dist/cli-bundle/chunks/{chunk-UYUYDGIB.js.map → chunk-OGLGI22K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js → chunk-P5L7Z2O6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BZCEN4JA.js → chunk-PULUSQAV.js} +492 -403
- package/dist/cli-bundle/chunks/chunk-PULUSQAV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3VGN2UWE.js → chunk-QCDTQCMW.js} +22 -30
- package/dist/cli-bundle/chunks/chunk-QCDTQCMW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js → chunk-QNNQAAZ5.js} +24 -18
- package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js.map → chunk-QNNQAAZ5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MDPEOIGN.js → chunk-RAHINBVP.js} +60 -101
- package/dist/cli-bundle/chunks/chunk-RAHINBVP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CWFNTKQJ.js → chunk-RJH5VQHW.js} +43 -61
- package/dist/cli-bundle/chunks/chunk-RJH5VQHW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js → chunk-SU2E4AWU.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js → chunk-SU3TB4NS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JWXRETDF.js → chunk-SYE6WMV6.js} +626 -484
- package/dist/cli-bundle/chunks/chunk-SYE6WMV6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NWMZWYYB.js → chunk-T3P7PMZP.js} +42 -27
- package/dist/cli-bundle/chunks/chunk-T3P7PMZP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js → chunk-T4XBKJ3F.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js → chunk-T6AXEBOP.js} +23 -17
- package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js.map → chunk-T6AXEBOP.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js → chunk-TQ6AX5SQ.js} +58 -69
- package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js.map → chunk-TQ6AX5SQ.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4XOIEKSD.js → chunk-U3S2B7TA.js} +86 -52
- package/dist/cli-bundle/chunks/chunk-U3S2B7TA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js → chunk-U5TR4N7J.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js → chunk-UMNQZS4H.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js → chunk-WJA3PXW7.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-RGEMWD6Q.js → chunk-WRYERRZX.js} +157 -118
- package/dist/cli-bundle/chunks/chunk-WRYERRZX.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NUHHPVVS.js → chunk-WYOIIFSE.js} +712 -612
- package/dist/cli-bundle/chunks/chunk-WYOIIFSE.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4DSGXSBL.js → chunk-XRYSCRZR.js} +116 -68
- package/dist/cli-bundle/chunks/{chunk-4DSGXSBL.js.map → chunk-XRYSCRZR.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js → chunk-YF746GTH.js} +59 -70
- package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js.map → chunk-YF746GTH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js → chunk-YPWUSH72.js} +390 -312
- package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js.map → chunk-YPWUSH72.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js → chunk-YSDFIY7N.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js → chunk-YSGTMDWC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NFDPYAIP.js → chunk-YVKZ3ANP.js} +21 -29
- package/dist/cli-bundle/chunks/chunk-YVKZ3ANP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js → chunk-Z4DGFQDH.js} +80 -58
- package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js.map → chunk-Z4DGFQDH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js → chunk-Z5F6XZXE.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js → chunk-Z7RPDF2Y.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3S2KT7NG.js → chunk-ZFTKYWIF.js} +152 -89
- package/dist/cli-bundle/chunks/chunk-ZFTKYWIF.js.map +7 -0
- package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js → claim-2BGBGSVI.js} +8 -8
- package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js → claim-5GU7OE67.js} +8 -8
- package/dist/cli-bundle/chunks/close-6YODBUIV.js +14 -0
- package/dist/cli-bundle/chunks/{close-TQYAAFJP.js → close-AFVKPR57.js} +7 -7
- package/dist/cli-bundle/chunks/{close-many-BG5QQIDQ.js → close-many-7KLOSYLP.js} +186 -122
- package/dist/cli-bundle/chunks/close-many-7KLOSYLP.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-many-LDRVEQY2.js → close-many-JKUJMHLG.js} +187 -123
- package/dist/cli-bundle/chunks/close-many-JKUJMHLG.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js → comments-DNWHEBOS.js} +9 -9
- package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js → comments-RW23R3VE.js} +9 -9
- package/dist/cli-bundle/chunks/config-AUM5WBYA.js +1072 -0
- package/dist/cli-bundle/chunks/config-AUM5WBYA.js.map +7 -0
- package/dist/cli-bundle/chunks/config-OZWSA2NP.js +1062 -0
- package/dist/cli-bundle/chunks/config-OZWSA2NP.js.map +1 -0
- package/dist/cli-bundle/chunks/{context-B6275WPX.js → context-OYXRGY7S.js} +12 -12
- package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js → context-PKCEHQY3.js} +12 -12
- package/dist/cli-bundle/chunks/{contracts-HN7ABKLP.js → contracts-L6ODXNUM.js} +320 -199
- package/dist/cli-bundle/chunks/contracts-L6ODXNUM.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-W4FZVVD6.js → contracts-X74F2GSM.js} +321 -200
- package/dist/cli-bundle/chunks/contracts-X74F2GSM.js.map +1 -0
- package/dist/cli-bundle/chunks/{copy-DEM4DATS.js → copy-6XOR3HKN.js} +5 -5
- package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js → copy-I4NCLBR4.js} +5 -5
- package/dist/cli-bundle/chunks/{create-RLRJMRTM.js → create-PM45M6PE.js} +12 -12
- package/dist/cli-bundle/chunks/create-Z7YCH3BE.js +28 -0
- package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js → delete-7YXHYG67.js} +5 -5
- package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js → delete-LPISP43T.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js → deps-N2T26FME.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js → deps-WATKQDE3.js} +5 -5
- package/dist/cli-bundle/chunks/{docs-GYZNVS26.js → docs-6LQ3GLM7.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-26S44RXU.js → docs-Z3X6JZLT.js} +7 -7
- package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js → eval-6DCLG52D.js} +10 -10
- package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js → eval-Y3ZCUTHK.js} +10 -10
- package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js → extension-BNINIMT7.js} +11 -11
- package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js → extension-QWE4YYK5.js} +11 -11
- package/dist/cli-bundle/chunks/{files-NQHEXUZD.js → files-6SGKHS6O.js} +7 -7
- package/dist/cli-bundle/chunks/{files-MBNICQFM.js → files-FUYPSOFJ.js} +7 -7
- package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js → focus-2Q3K76G2.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-XZW5423D.js → focus-ATLBWXXD.js} +6 -6
- package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js → gc-RUYEMNRF.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js → gc-TDWSDR66.js} +3 -3
- package/dist/cli-bundle/chunks/{get-A7MAOHCU.js → get-2WGLX74N.js} +120 -80
- package/dist/cli-bundle/chunks/get-2WGLX74N.js.map +7 -0
- package/dist/cli-bundle/chunks/{get-DSDEKJ3L.js → get-LY6M2JIM.js} +121 -81
- package/dist/cli-bundle/chunks/get-LY6M2JIM.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-3IPFLKXB.js → health-4RKHYS3T.js} +535 -371
- package/dist/cli-bundle/chunks/health-4RKHYS3T.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-GZXGBZ36.js → health-TMFVNYRA.js} +534 -370
- package/dist/cli-bundle/chunks/health-TMFVNYRA.js.map +7 -0
- package/dist/cli-bundle/chunks/history-CGNQJXFE.js +18 -0
- package/dist/cli-bundle/chunks/{history-NERDJNUB.js → history-SGRRS72R.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-2WRZ2WK4.js → history-compact-LOED43R3.js} +213 -134
- package/dist/cli-bundle/chunks/history-compact-LOED43R3.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-compact-HR7BB4LR.js → history-compact-V5DNAQHH.js} +214 -135
- package/dist/cli-bundle/chunks/history-compact-V5DNAQHH.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js → history-redact-IRL7WJ3E.js} +9 -9
- package/dist/cli-bundle/chunks/history-redact-N3JK7VBW.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-XA3LC4GA.js → history-repair-4WVBVHFR.js} +124 -84
- package/dist/cli-bundle/chunks/history-repair-4WVBVHFR.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-LCMOS45X.js → history-repair-PGYQJMGD.js} +123 -83
- package/dist/cli-bundle/chunks/history-repair-PGYQJMGD.js.map +7 -0
- package/dist/cli-bundle/chunks/{init-64XDLQJB.js → init-4GESW7RM.js} +12 -12
- package/dist/cli-bundle/chunks/init-XIDPABA4.js +22 -0
- package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js → learnings-4BHWFFUV.js} +9 -9
- package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js → learnings-4FJY7WIW.js} +9 -9
- package/dist/cli-bundle/chunks/{list-G5Y65VF6.js → list-472TIOVK.js} +8 -8
- package/dist/cli-bundle/chunks/{list-DNBJVO3E.js → list-D7BF5CL2.js} +8 -8
- package/dist/cli-bundle/chunks/{next-FYTQF6HG.js → next-D5STGWI2.js} +71 -46
- package/dist/cli-bundle/chunks/next-D5STGWI2.js.map +1 -0
- package/dist/cli-bundle/chunks/{next-BCERKDUR.js → next-SFQZVX2B.js} +70 -45
- package/dist/cli-bundle/chunks/next-SFQZVX2B.js.map +7 -0
- package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js → notes-6KNOSLIT.js} +9 -9
- package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js → notes-W4UEICGF.js} +9 -9
- package/dist/cli-bundle/chunks/{plan-RKZHQVXR.js → plan-JO6V7BXO.js} +373 -279
- package/dist/cli-bundle/chunks/plan-JO6V7BXO.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-4WXEQCTN.js → plan-MJQW5XK3.js} +372 -278
- package/dist/cli-bundle/chunks/plan-MJQW5XK3.js.map +7 -0
- package/dist/cli-bundle/chunks/{profile-4OMM32CD.js → profile-3TOTMUR4.js} +27 -19
- package/dist/cli-bundle/chunks/profile-3TOTMUR4.js.map +7 -0
- package/dist/cli-bundle/chunks/{profile-QLER5ENE.js → profile-WIQY2KCV.js} +28 -20
- package/dist/cli-bundle/chunks/profile-WIQY2KCV.js.map +1 -0
- package/dist/cli-bundle/chunks/register-list-query-ELBHCCFI.js +416 -0
- package/dist/cli-bundle/chunks/register-list-query-ELBHCCFI.js.map +7 -0
- package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js +406 -0
- package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-KK7PHYYU.js → register-mutation-ROFE2YPC.js} +729 -702
- package/dist/cli-bundle/chunks/register-mutation-ROFE2YPC.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-ENNDUAZG.js → register-mutation-SJWMVIJ2.js} +730 -703
- package/dist/cli-bundle/chunks/register-mutation-SJWMVIJ2.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-HZ6XERQG.js → register-operations-IADFVH53.js} +389 -365
- package/dist/cli-bundle/chunks/register-operations-IADFVH53.js.map +7 -0
- package/dist/cli-bundle/chunks/register-operations-MEKU3AKC.js +510 -0
- package/dist/cli-bundle/chunks/register-operations-MEKU3AKC.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-ZKJ53RS7.js → register-setup-3QJY43CY.js} +128 -103
- package/dist/cli-bundle/chunks/register-setup-3QJY43CY.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-P67EMBDJ.js → register-setup-AJWUSSQX.js} +129 -104
- package/dist/cli-bundle/chunks/register-setup-AJWUSSQX.js.map +1 -0
- package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js → restore-44IHMMZZ.js} +9 -9
- package/dist/cli-bundle/chunks/restore-EXHU34EU.js +17 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js → scheduling-shortcuts-OLHNLAZY.js} +12 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js → scheduling-shortcuts-TSBK4AY5.js} +12 -12
- package/dist/cli-bundle/chunks/{schema-73HR2OJW.js → schema-IB2NZZWD.js} +7 -7
- package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js → schema-VBCELP5G.js} +7 -7
- package/dist/cli-bundle/chunks/{search-AXPXKZER.js → search-7UBETML4.js} +10 -10
- package/dist/cli-bundle/chunks/{search-KILGT37L.js → search-R227JOL6.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js → stats-FAG7COEH.js} +6 -6
- package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js → stats-MCK7PLYS.js} +6 -6
- package/dist/cli-bundle/chunks/{telemetry-GAHHQTOS.js → telemetry-DRPDZMAO.js} +84 -70
- package/dist/cli-bundle/chunks/telemetry-DRPDZMAO.js.map +7 -0
- package/dist/cli-bundle/chunks/{telemetry-BZUF6H7G.js → telemetry-GVVUQSJQ.js} +85 -71
- package/dist/cli-bundle/chunks/telemetry-GVVUQSJQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-PWDIZ255.js → test-QY44WAMR.js} +15 -15
- package/dist/cli-bundle/chunks/{test-ACD52Z3S.js → test-SY76DZTO.js} +15 -15
- package/dist/cli-bundle/chunks/test-all-QD6QAEG7.js +430 -0
- package/dist/cli-bundle/chunks/test-all-QD6QAEG7.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-USPJHXFR.js +427 -0
- package/dist/cli-bundle/chunks/test-all-USPJHXFR.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-UXIXPDKU.js → test-runs-MG5VIGSK.js} +185 -147
- package/dist/cli-bundle/chunks/test-runs-MG5VIGSK.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-PLRAZEFW.js → test-runs-QIR5MJPL.js} +184 -146
- package/dist/cli-bundle/chunks/test-runs-QIR5MJPL.js.map +7 -0
- package/dist/cli-bundle/chunks/update-A7EICML6.js +24 -0
- package/dist/cli-bundle/chunks/{update-KFX2SIAC.js → update-IKJZWLQC.js} +15 -15
- package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js → update-many-BEMTDA2X.js} +84 -69
- package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js.map → update-many-BEMTDA2X.js.map} +1 -1
- package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js → update-many-RATAARHU.js} +83 -68
- package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js.map → update-many-RATAARHU.js.map} +2 -2
- package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js → upgrade-NWMR3VQL.js} +11 -11
- package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js → upgrade-VU46BLJZ.js} +11 -11
- package/dist/cli-bundle/chunks/{validate-X5W76YJL.js → validate-GAJ6FUSI.js} +451 -321
- package/dist/cli-bundle/chunks/validate-GAJ6FUSI.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-MTUVL5VC.js → validate-NRY6MFXN.js} +450 -320
- package/dist/cli-bundle/chunks/validate-NRY6MFXN.js.map +7 -0
- package/dist/cli-bundle/main.js +1107 -916
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/core/config/nested-settings.js +89 -67
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/governance/metadata-coverage.js +20 -28
- package/dist/core/governance/metadata-coverage.js.map +1 -1
- package/dist/core/history/drift-scan.js +93 -81
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/item/item-type-definition.js +14 -14
- package/dist/core/item/item-type-definition.js.map +1 -1
- package/dist/core/item/type-registry.js +114 -99
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/output/mutation-projection.js +42 -26
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +97 -80
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/status-defs-file.js +26 -3
- package/dist/core/schema/status-defs-file.js.map +1 -1
- package/dist/core/search/corpus.js +25 -19
- package/dist/core/search/corpus.js.map +1 -1
- package/dist/core/search/semantic-defaults.js +64 -37
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/vector-stores.js +32 -17
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/sentry/helpers.js +31 -28
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/sentry/instrument.js +54 -43
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/shared/memo.d.ts +12 -0
- package/dist/core/shared/memo.js +25 -0
- package/dist/core/shared/memo.js.map +1 -0
- package/dist/core/shared/serialization.js +24 -14
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/shared/time.js +26 -4
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/front-matter-cache.d.ts +5 -0
- package/dist/core/store/front-matter-cache.js +316 -171
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-store.js +33 -26
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings.js +247 -203
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/test/background-runs.js +189 -160
- package/dist/core/test/background-runs.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +71 -99
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/compose.js +51 -42
- package/dist/sdk/compose.js.map +1 -1
- package/docs/AGENT_GUIDE.md +2 -2
- package/docs/ARCHITECTURE.md +2 -2
- package/docs/COMMANDS.md +8 -4
- package/docs/CONFIGURATION.md +1 -1
- package/docs/EXTENSIONS.md +12 -12
- package/docs/ONBOARDING.md +4 -2
- package/docs/README.md +2 -0
- package/docs/examples/starter-extension/README.md +11 -10
- package/marketplace.json +3 -3
- package/package.json +2 -2
- package/packages/pm-beads/extensions/beads/runtime.ts +240 -167
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +65 -58
- package/packages/pm-todos/extensions/todos/runtime.ts +65 -42
- package/plugins/pm-claude/.claude-plugin/plugin.json +2 -2
- package/plugins/pm-claude/README.md +6 -3
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/dist/cli-bundle/chunks/activity-AW6XVFH6.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-JTEF4BP7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-22WKIL3H.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2D4HATP2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3J6JRJ3I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3K2M5OYU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3S2KT7NG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3VGN2UWE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3XZCOZ5J.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4XOIEKSD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-55SNVXRQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5CGRF3L5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7R4QEMZZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-AXIDKKAT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BDTISOSD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BZCEN4JA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CF7RL6FR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CWFNTKQJ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FFMQB7WR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-HXTQJXWT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IPYBJWTE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IZBR4NRW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JLM7BHI7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JSU5P7VS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JWXRETDF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KNPEF7QG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MDPEOIGN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NFDPYAIP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NUHHPVVS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NWMZWYYB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OTUHB4HS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RGEMWD6Q.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RLDHZHQS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RMMQ74TG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RVUALSJF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TP5Q5ZD3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-V3NOKJF2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VARHOHYV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WYDHYJPO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YITK2PJ6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZETXE4SE.js.map +0 -1
- package/dist/cli-bundle/chunks/close-E6ZZGCJY.js +0 -14
- package/dist/cli-bundle/chunks/close-many-BG5QQIDQ.js.map +0 -7
- package/dist/cli-bundle/chunks/close-many-LDRVEQY2.js.map +0 -1
- package/dist/cli-bundle/chunks/config-DMSU64QO.js +0 -1541
- package/dist/cli-bundle/chunks/config-DMSU64QO.js.map +0 -7
- package/dist/cli-bundle/chunks/config-QH2DICD6.js +0 -1531
- package/dist/cli-bundle/chunks/config-QH2DICD6.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-HN7ABKLP.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-W4FZVVD6.js.map +0 -1
- package/dist/cli-bundle/chunks/create-OH3BDGBB.js +0 -28
- package/dist/cli-bundle/chunks/get-A7MAOHCU.js.map +0 -7
- package/dist/cli-bundle/chunks/get-DSDEKJ3L.js.map +0 -1
- package/dist/cli-bundle/chunks/health-3IPFLKXB.js.map +0 -1
- package/dist/cli-bundle/chunks/health-GZXGBZ36.js.map +0 -7
- package/dist/cli-bundle/chunks/history-WSZHY3PN.js +0 -18
- package/dist/cli-bundle/chunks/history-compact-2WRZ2WK4.js.map +0 -7
- package/dist/cli-bundle/chunks/history-compact-HR7BB4LR.js.map +0 -1
- package/dist/cli-bundle/chunks/history-redact-MP6CH7U5.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-LCMOS45X.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-XA3LC4GA.js.map +0 -1
- package/dist/cli-bundle/chunks/init-PAX32BJA.js +0 -22
- package/dist/cli-bundle/chunks/next-BCERKDUR.js.map +0 -7
- package/dist/cli-bundle/chunks/next-FYTQF6HG.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-4WXEQCTN.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-RKZHQVXR.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-4OMM32CD.js.map +0 -7
- package/dist/cli-bundle/chunks/profile-QLER5ENE.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js +0 -400
- package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js +0 -410
- package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-ENNDUAZG.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-KK7PHYYU.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-C6OWLDSH.js +0 -486
- package/dist/cli-bundle/chunks/register-operations-C6OWLDSH.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-HZ6XERQG.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-P67EMBDJ.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-ZKJ53RS7.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-YALDGTQR.js +0 -17
- package/dist/cli-bundle/chunks/telemetry-BZUF6H7G.js.map +0 -1
- package/dist/cli-bundle/chunks/telemetry-GAHHQTOS.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js +0 -358
- package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js +0 -361
- package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-PLRAZEFW.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-UXIXPDKU.js.map +0 -1
- package/dist/cli-bundle/chunks/update-AMRSOIWP.js +0 -24
- package/dist/cli-bundle/chunks/validate-MTUVL5VC.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-X5W76YJL.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js.map → activity-5YWLSPGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-AW6XVFH6.js.map → activity-BIML7K2D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-LOVPGVPT.js.map → append-EZESUVJT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-QCFJSDFL.js.map → append-JFG4WQMG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js.map → chunk-3W2HJKJX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js.map → chunk-4PFVUUYV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js.map → chunk-5E7N4T2Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js.map → chunk-5IZUBZBR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js.map → chunk-5JIWFWOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js.map → chunk-6CDCWKSX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js.map → chunk-6NYJGMTY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js.map → chunk-7CLLC75T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2466X6E4.js.map → chunk-7LYO6S5A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js.map → chunk-A3OQ7TFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js.map → chunk-ER4ME5U2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js.map → chunk-ERG65A2L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js.map → chunk-FH2H3CBD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JPECA746.js.map → chunk-FUFFPIYA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js.map → chunk-GUYNUXQT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js.map → chunk-GVJE5T7Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js.map → chunk-JBZ2NTKX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js.map → chunk-KEZOIPCR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js.map → chunk-MDHWWBNZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js.map → chunk-MEZZZBYX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js.map → chunk-NZ7QIUP5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js.map → chunk-P5L7Z2O6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js.map → chunk-SU2E4AWU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js.map → chunk-SU3TB4NS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js.map → chunk-T4XBKJ3F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js.map → chunk-U5TR4N7J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js.map → chunk-UMNQZS4H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js.map → chunk-WJA3PXW7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js.map → chunk-YSDFIY7N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js.map → chunk-YSGTMDWC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js.map → chunk-Z5F6XZXE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js.map → chunk-Z7RPDF2Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js.map → claim-2BGBGSVI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js.map → claim-5GU7OE67.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-E6ZZGCJY.js.map → close-6YODBUIV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-TQYAAFJP.js.map → close-AFVKPR57.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js.map → comments-DNWHEBOS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js.map → comments-RW23R3VE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-B6275WPX.js.map → context-OYXRGY7S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js.map → context-PKCEHQY3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-DEM4DATS.js.map → copy-6XOR3HKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js.map → copy-I4NCLBR4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-RLRJMRTM.js.map → create-PM45M6PE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-OH3BDGBB.js.map → create-Z7YCH3BE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js.map → delete-7YXHYG67.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js.map → delete-LPISP43T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js.map → deps-N2T26FME.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js.map → deps-WATKQDE3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-GYZNVS26.js.map → docs-6LQ3GLM7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-26S44RXU.js.map → docs-Z3X6JZLT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js.map → eval-6DCLG52D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js.map → eval-Y3ZCUTHK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js.map → extension-BNINIMT7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js.map → extension-QWE4YYK5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-NQHEXUZD.js.map → files-6SGKHS6O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-MBNICQFM.js.map → files-FUYPSOFJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js.map → focus-2Q3K76G2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-XZW5423D.js.map → focus-ATLBWXXD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js.map → gc-RUYEMNRF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js.map → gc-TDWSDR66.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-WSZHY3PN.js.map → history-CGNQJXFE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-NERDJNUB.js.map → history-SGRRS72R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js.map → history-redact-IRL7WJ3E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-MP6CH7U5.js.map → history-redact-N3JK7VBW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-64XDLQJB.js.map → init-4GESW7RM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-PAX32BJA.js.map → init-XIDPABA4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js.map → learnings-4BHWFFUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js.map → learnings-4FJY7WIW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-G5Y65VF6.js.map → list-472TIOVK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-DNBJVO3E.js.map → list-D7BF5CL2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js.map → notes-6KNOSLIT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js.map → notes-W4UEICGF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js.map → restore-44IHMMZZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-YALDGTQR.js.map → restore-EXHU34EU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js.map → scheduling-shortcuts-OLHNLAZY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js.map → scheduling-shortcuts-TSBK4AY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-73HR2OJW.js.map → schema-IB2NZZWD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js.map → schema-VBCELP5G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-AXPXKZER.js.map → search-7UBETML4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-KILGT37L.js.map → search-R227JOL6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js.map → stats-FAG7COEH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js.map → stats-MCK7PLYS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-PWDIZ255.js.map → test-QY44WAMR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-ACD52Z3S.js.map → test-SY76DZTO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-AMRSOIWP.js.map → update-A7EICML6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-KFX2SIAC.js.map → update-IKJZWLQC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js.map → upgrade-NWMR3VQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js.map → upgrade-VU46BLJZ.js.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a4633e01-6951-59e5-83cd-351f590aec99")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
extractReferencedPmItemIdsFromCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NOIEVOK5.js";
|
|
6
6
|
import {
|
|
7
7
|
buildRemediationCommands
|
|
8
8
|
} from "./chunk-R2EMWY7Q.js";
|
|
@@ -11,30 +11,30 @@ import {
|
|
|
11
11
|
} from "./chunk-IBMFIKVS.js";
|
|
12
12
|
import {
|
|
13
13
|
scanHistoryDrift
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-BE2SR6QL.js";
|
|
15
|
+
import "./chunk-KEZOIPCR.js";
|
|
16
|
+
import "./chunk-JBZ2NTKX.js";
|
|
17
|
+
import "./chunk-7CLLC75T.js";
|
|
18
|
+
import "./chunk-MHRS5FUX.js";
|
|
19
|
+
import "./chunk-YF746GTH.js";
|
|
20
20
|
import "./chunk-P4SESZGT.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-EJ2OCBHF.js";
|
|
22
|
+
import "./chunk-GVJE5T7Q.js";
|
|
23
|
+
import "./chunk-6CDCWKSX.js";
|
|
24
|
+
import "./chunk-QNNQAAZ5.js";
|
|
25
|
+
import "./chunk-572FKBRL.js";
|
|
26
26
|
import {
|
|
27
27
|
listAllFrontMatterWithBody
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-4WB6S4YX.js";
|
|
29
29
|
import {
|
|
30
30
|
CURRENT_ITEM_FORMAT_VERSION,
|
|
31
31
|
effectiveItemFormatVersion,
|
|
32
32
|
normalizeStatusInput,
|
|
33
33
|
scanItemFormatVersions
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-YSDFIY7N.js";
|
|
35
35
|
import {
|
|
36
36
|
nowIso
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-CXR3CMBQ.js";
|
|
38
38
|
import {
|
|
39
39
|
DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS,
|
|
40
40
|
DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
resolvePmRoot,
|
|
51
51
|
resolveRuntimeStatusRegistry,
|
|
52
52
|
toNonEmptyStringOrUndefined
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-L4SLHV6G.js";
|
|
54
54
|
|
|
55
55
|
// dist/cli/commands/validate.js
|
|
56
56
|
import fs from "node:fs/promises";
|
|
@@ -470,6 +470,8 @@ var METADATA_TRUNCATED_KEY_BY_FIELD = {
|
|
|
470
470
|
var GIT_LS_FILES_MAX_BUFFER = 32 * 1024 * 1024;
|
|
471
471
|
var FILE_LIST_SUMMARY_LIMIT = 40;
|
|
472
472
|
var DIAGNOSTIC_LIST_SUMMARY_LIMIT = 5;
|
|
473
|
+
var LINKED_ARTIFACT_MAX_PATH_LENGTH = 4096;
|
|
474
|
+
var LINKED_ARTIFACT_MAX_SEGMENT_LENGTH = 255;
|
|
473
475
|
var execFileAsync = promisify(execFile);
|
|
474
476
|
function normalizeRelativePath(value) {
|
|
475
477
|
return value.replaceAll("\\", "/").replace(/^\.\/+/, "").replace(/^\/+/, "");
|
|
@@ -912,61 +914,59 @@ function summarizeDuplicateIssueCodes(duplicates, verboseDiagnostics) {
|
|
|
912
914
|
warnings: [`${DUPLICATE_ISSUE_CODE_WARNING_TOKEN}:${duplicates.length}`]
|
|
913
915
|
};
|
|
914
916
|
}
|
|
915
|
-
function
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
917
|
+
function initializeMissingMetadataByField() {
|
|
918
|
+
return Object.fromEntries(SUPPORTED_METADATA_REQUIRED_FIELDS.map((field) => [field, []]));
|
|
919
|
+
}
|
|
920
|
+
function collectMissingMetadataByField(items, statusRegistry, enforcePlanningFieldsOnTerminal) {
|
|
921
|
+
const missingByField = initializeMissingMetadataByField();
|
|
919
922
|
for (const item of items) {
|
|
920
923
|
for (const field of SUPPORTED_METADATA_REQUIRED_FIELDS) {
|
|
921
|
-
if (
|
|
922
|
-
|
|
924
|
+
if (isMetadataFieldMissing(item, field, statusRegistry, enforcePlanningFieldsOnTerminal)) {
|
|
925
|
+
missingByField[field].push(item.id);
|
|
923
926
|
}
|
|
924
|
-
missingByField[field].push(item.id);
|
|
925
927
|
}
|
|
926
928
|
}
|
|
929
|
+
return missingByField;
|
|
930
|
+
}
|
|
931
|
+
function buildMetadataWarningTokens(metadataPolicy, missingByField, duplicateWarnings) {
|
|
927
932
|
const warningTokens = [...metadataPolicy.warnings];
|
|
928
933
|
for (const field of metadataPolicy.required_fields) {
|
|
929
934
|
const missingItems = missingByField[field];
|
|
930
|
-
if (missingItems.length
|
|
931
|
-
|
|
935
|
+
if (missingItems.length > 0) {
|
|
936
|
+
warningTokens.push(`${METADATA_WARNING_TOKEN_BY_FIELD[field]}:${missingItems.length}`);
|
|
932
937
|
}
|
|
933
|
-
warningTokens.push(`${METADATA_WARNING_TOKEN_BY_FIELD[field]}:${missingItems.length}`);
|
|
934
938
|
}
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
939
|
+
warningTokens.push(...duplicateWarnings);
|
|
940
|
+
return warningTokens;
|
|
941
|
+
}
|
|
942
|
+
function buildMetadataCounts(metadataPolicy, missingByField) {
|
|
938
943
|
const counts = {};
|
|
939
944
|
for (const field of metadataPolicy.required_fields) {
|
|
940
|
-
const
|
|
945
|
+
const missing = missingByField[field];
|
|
946
|
+
const value = missing ? missing.length : 0;
|
|
941
947
|
const countKey = METADATA_COUNT_KEY_BY_FIELD[field];
|
|
942
948
|
if (value > 0 && countKey) {
|
|
943
949
|
counts[countKey] = value;
|
|
944
950
|
}
|
|
945
951
|
}
|
|
946
|
-
|
|
952
|
+
return counts;
|
|
953
|
+
}
|
|
954
|
+
function buildMissingFieldOccurrences(metadataPolicy, missingByField, itemsById) {
|
|
955
|
+
const occurrences = [];
|
|
947
956
|
for (const field of metadataPolicy.required_fields) {
|
|
948
|
-
|
|
957
|
+
const missing = missingByField[field];
|
|
958
|
+
if (!missing) {
|
|
959
|
+
continue;
|
|
960
|
+
}
|
|
961
|
+
for (const itemId of missing) {
|
|
949
962
|
const itemType = itemsById.get(itemId)?.type;
|
|
950
|
-
|
|
963
|
+
const normalizedItemType = typeof itemType === "string" && itemType.length > 0 ? itemType : "Unknown";
|
|
964
|
+
occurrences.push({ item_type: normalizedItemType, field });
|
|
951
965
|
}
|
|
952
966
|
}
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
metadata_profile: metadataPolicy.profile,
|
|
957
|
-
metadata_profile_source: metadataPolicy.profile_source,
|
|
958
|
-
metadata_profile_fallback_to_core: metadataPolicy.fallback_to_core,
|
|
959
|
-
required_fields: [...metadataPolicy.required_fields],
|
|
960
|
-
supported_required_fields: [...SUPPORTED_METADATA_REQUIRED_FIELDS],
|
|
961
|
-
counts,
|
|
962
|
-
missing_by_type: missingByType,
|
|
963
|
-
duplicate_issue_codes_count: duplicateIssueCodes.length,
|
|
964
|
-
duplicate_issue_codes: duplicateIssueCodeSummary.rows,
|
|
965
|
-
duplicate_issue_codes_truncated: duplicateIssueCodeSummary.truncated
|
|
966
|
-
};
|
|
967
|
-
if (metadataPolicy.configured_custom_fields.length > 0) {
|
|
968
|
-
details.configured_custom_required_fields = [...metadataPolicy.configured_custom_fields];
|
|
969
|
-
}
|
|
967
|
+
return occurrences;
|
|
968
|
+
}
|
|
969
|
+
function attachMissingMetadataItemIds(details, metadataPolicy, missingByField, verboseDiagnostics) {
|
|
970
970
|
for (const field of metadataPolicy.required_fields) {
|
|
971
971
|
const missing = missingByField[field];
|
|
972
972
|
if (!missing || missing.length === 0) {
|
|
@@ -981,14 +981,62 @@ function buildMetadataCheck(items, metadataPolicy, statusRegistry, verboseDiagno
|
|
|
981
981
|
details[idsKey] = summarized.values;
|
|
982
982
|
details[truncatedKey] = summarized.truncated;
|
|
983
983
|
}
|
|
984
|
-
|
|
984
|
+
}
|
|
985
|
+
function buildCloseReasonBackfillRows(metadataPolicy, missingByField, itemsById) {
|
|
986
|
+
if (!metadataPolicy.required_fields.includes("close_reason")) {
|
|
987
|
+
return [];
|
|
988
|
+
}
|
|
989
|
+
const missing = missingByField.close_reason;
|
|
990
|
+
if (!missing) {
|
|
991
|
+
return [];
|
|
992
|
+
}
|
|
993
|
+
return missing.map((itemId) => ({
|
|
985
994
|
id: itemId,
|
|
986
995
|
resolution: toNonEmptyStringOrUndefined(itemsById.get(itemId)?.resolution)
|
|
987
|
-
}))
|
|
988
|
-
|
|
996
|
+
}));
|
|
997
|
+
}
|
|
998
|
+
function buildEstimateBackfillRows(metadataPolicy, missingByField, itemsById) {
|
|
999
|
+
if (!metadataPolicy.required_fields.includes("estimated_minutes")) {
|
|
1000
|
+
return [];
|
|
1001
|
+
}
|
|
1002
|
+
const missing = missingByField.estimated_minutes;
|
|
1003
|
+
if (!missing) {
|
|
1004
|
+
return [];
|
|
1005
|
+
}
|
|
1006
|
+
return missing.map((itemId) => ({
|
|
989
1007
|
id: itemId,
|
|
990
1008
|
type: toNonEmptyStringOrUndefined(itemsById.get(itemId)?.type)
|
|
991
|
-
}))
|
|
1009
|
+
}));
|
|
1010
|
+
}
|
|
1011
|
+
function buildMetadataCheck(items, metadataPolicy, statusRegistry, verboseDiagnostics) {
|
|
1012
|
+
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
1013
|
+
const enforcePlanningFieldsOnTerminal = metadataPolicy.profile === "strict";
|
|
1014
|
+
const missingByField = collectMissingMetadataByField(items, statusRegistry, enforcePlanningFieldsOnTerminal);
|
|
1015
|
+
const duplicateIssueCodes = findDuplicateIssueCodes(items);
|
|
1016
|
+
const duplicateIssueCodeSummary = summarizeDuplicateIssueCodes(duplicateIssueCodes, verboseDiagnostics);
|
|
1017
|
+
const warningTokens = buildMetadataWarningTokens(metadataPolicy, missingByField, duplicateIssueCodeSummary.warnings);
|
|
1018
|
+
const counts = buildMetadataCounts(metadataPolicy, missingByField);
|
|
1019
|
+
const missingFieldOccurrences = buildMissingFieldOccurrences(metadataPolicy, missingByField, itemsById);
|
|
1020
|
+
const missingByType = buildMissingByTypeCounts(missingFieldOccurrences);
|
|
1021
|
+
const details = {
|
|
1022
|
+
checked_items: items.length,
|
|
1023
|
+
metadata_profile: metadataPolicy.profile,
|
|
1024
|
+
metadata_profile_source: metadataPolicy.profile_source,
|
|
1025
|
+
metadata_profile_fallback_to_core: metadataPolicy.fallback_to_core,
|
|
1026
|
+
required_fields: [...metadataPolicy.required_fields],
|
|
1027
|
+
supported_required_fields: [...SUPPORTED_METADATA_REQUIRED_FIELDS],
|
|
1028
|
+
counts,
|
|
1029
|
+
missing_by_type: missingByType,
|
|
1030
|
+
duplicate_issue_codes_count: duplicateIssueCodes.length,
|
|
1031
|
+
duplicate_issue_codes: duplicateIssueCodeSummary.rows,
|
|
1032
|
+
duplicate_issue_codes_truncated: duplicateIssueCodeSummary.truncated
|
|
1033
|
+
};
|
|
1034
|
+
if (metadataPolicy.configured_custom_fields.length > 0) {
|
|
1035
|
+
details.configured_custom_required_fields = [...metadataPolicy.configured_custom_fields];
|
|
1036
|
+
}
|
|
1037
|
+
attachMissingMetadataItemIds(details, metadataPolicy, missingByField, verboseDiagnostics);
|
|
1038
|
+
const closeReasonBackfillRows = buildCloseReasonBackfillRows(metadataPolicy, missingByField, itemsById);
|
|
1039
|
+
const estimateBackfillRows = buildEstimateBackfillRows(metadataPolicy, missingByField, itemsById);
|
|
992
1040
|
return {
|
|
993
1041
|
check: {
|
|
994
1042
|
name: "metadata",
|
|
@@ -1229,6 +1277,24 @@ function sharedDirectoryPrefixLength(left, right) {
|
|
|
1229
1277
|
}
|
|
1230
1278
|
return count;
|
|
1231
1279
|
}
|
|
1280
|
+
function scoreOrphanOwnerCandidate(pathValue, linkedPath) {
|
|
1281
|
+
const linkedDir = directoryOf(linkedPath);
|
|
1282
|
+
const orphanDir = directoryOf(pathValue);
|
|
1283
|
+
const directoryPrefix = linkedPath.endsWith("/") ? linkedPath : `${linkedPath}/`;
|
|
1284
|
+
const isDirectoryPrefix = pathValue.startsWith(directoryPrefix);
|
|
1285
|
+
const sameDirectory = linkedDir.length > 0 && linkedDir === orphanDir;
|
|
1286
|
+
const sharedPrefixLength = sharedDirectoryPrefixLength(pathValue, linkedPath);
|
|
1287
|
+
if (!isDirectoryPrefix && !sameDirectory && sharedPrefixLength === 0) {
|
|
1288
|
+
return null;
|
|
1289
|
+
}
|
|
1290
|
+
if (isDirectoryPrefix) {
|
|
1291
|
+
return { score: linkedPath.length + 1e3, confidence: "path_prefix" };
|
|
1292
|
+
}
|
|
1293
|
+
return sameDirectory ? { score: sharedPrefixLength + 500, confidence: "same_directory" } : { score: sharedPrefixLength, confidence: "shared_directory" };
|
|
1294
|
+
}
|
|
1295
|
+
function shouldReplaceOrphanOwnerCandidate(best, item, score) {
|
|
1296
|
+
return best === void 0 || score > best.score || score === best.score && item.id.localeCompare(best.item.id) < 0;
|
|
1297
|
+
}
|
|
1232
1298
|
function findOrphanOwnerCandidate(pathValue, classification, items) {
|
|
1233
1299
|
const linkKind = classification === "docs_unowned" ? "docs" : "files";
|
|
1234
1300
|
let best;
|
|
@@ -1242,21 +1308,15 @@ function findOrphanOwnerCandidate(pathValue, classification, items) {
|
|
|
1242
1308
|
if (linkedPath.length === 0 || linkedPath === pathValue) {
|
|
1243
1309
|
continue;
|
|
1244
1310
|
}
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1247
|
-
const directoryPrefix = linkedPath.endsWith("/") ? linkedPath : `${linkedPath}/`;
|
|
1248
|
-
const isDirectoryPrefix = pathValue.startsWith(directoryPrefix);
|
|
1249
|
-
const sameDirectory = linkedDir.length > 0 && linkedDir === orphanDir;
|
|
1250
|
-
const sharedPrefixLength = sharedDirectoryPrefixLength(pathValue, linkedPath);
|
|
1251
|
-
if (!isDirectoryPrefix && !sameDirectory && sharedPrefixLength === 0) {
|
|
1311
|
+
const scored = scoreOrphanOwnerCandidate(pathValue, linkedPath);
|
|
1312
|
+
if (scored === null) {
|
|
1252
1313
|
continue;
|
|
1253
1314
|
}
|
|
1254
|
-
|
|
1255
|
-
if (best === void 0 || score > best.score || score === best.score && item.id.localeCompare(best.item.id) < 0) {
|
|
1315
|
+
if (shouldReplaceOrphanOwnerCandidate(best, item, scored.score)) {
|
|
1256
1316
|
best = {
|
|
1257
1317
|
item,
|
|
1258
|
-
score,
|
|
1259
|
-
confidence:
|
|
1318
|
+
score: scored.score,
|
|
1319
|
+
confidence: scored.confidence
|
|
1260
1320
|
};
|
|
1261
1321
|
}
|
|
1262
1322
|
}
|
|
@@ -1289,74 +1349,74 @@ function buildOrphanedPathRows(orphanedFiles, items) {
|
|
|
1289
1349
|
function summarizeOrphanedPathRows(rows) {
|
|
1290
1350
|
return rows.map((row) => `${row.path}:${row.classification} owner_candidate=${row.owner_candidate?.id ?? "unowned"} hint=${JSON.stringify(row.remediation_hint)}`);
|
|
1291
1351
|
}
|
|
1292
|
-
function
|
|
1352
|
+
function closureLikeFieldsForItem(item, lifecyclePatternPolicy) {
|
|
1353
|
+
return Object.entries(lifecyclePatternPolicy.closure_like_metadata_field_patterns).filter(([field, patterns]) => {
|
|
1354
|
+
const value = toMeaningfulString(item[field]);
|
|
1355
|
+
return value ? patterns.some((pattern) => value.toLowerCase().includes(pattern)) : false;
|
|
1356
|
+
}).map(([field]) => field).sort((left, right) => left.localeCompare(right));
|
|
1357
|
+
}
|
|
1358
|
+
function buildTerminalParentFixRow(item, parent, itemsById, canonicalIdByLowercase, statusRegistry) {
|
|
1359
|
+
const grandparentId = toMeaningfulString(parent.parent);
|
|
1360
|
+
const grandparent = grandparentId ? itemsById.get(canonicalIdByLowercase.get(grandparentId.toLowerCase()) ?? grandparentId) : void 0;
|
|
1361
|
+
return {
|
|
1362
|
+
id: item.id,
|
|
1363
|
+
parent_id: parent.id,
|
|
1364
|
+
grandparent_id: grandparent?.id,
|
|
1365
|
+
grandparent_active: grandparent !== void 0 && !isTerminalStatus(grandparent.status, statusRegistry)
|
|
1366
|
+
};
|
|
1367
|
+
}
|
|
1368
|
+
function staleBlockerReasonsForItem(item, blockedStatuses, statusRegistry, lifecyclePatternPolicy) {
|
|
1369
|
+
const blockedBy = toMeaningfulString(item.blocked_by);
|
|
1370
|
+
const blockedReason = toMeaningfulString(item.blocked_reason);
|
|
1371
|
+
const blockedReasonNormalized = blockedReason?.toLowerCase();
|
|
1372
|
+
const normalizedStatus = normalizeStatusForRegistry(item.status, statusRegistry);
|
|
1373
|
+
const reasons = [];
|
|
1374
|
+
if (!blockedStatuses.has(normalizedStatus)) {
|
|
1375
|
+
if (blockedBy) {
|
|
1376
|
+
reasons.push("non_blocked_status_has_blocked_by");
|
|
1377
|
+
}
|
|
1378
|
+
if (blockedReason) {
|
|
1379
|
+
reasons.push("non_blocked_status_has_blocked_reason");
|
|
1380
|
+
}
|
|
1381
|
+
return reasons;
|
|
1382
|
+
}
|
|
1383
|
+
if (!blockedBy && !blockedReason) {
|
|
1384
|
+
reasons.push("blocked_status_missing_blocker_context");
|
|
1385
|
+
}
|
|
1386
|
+
if (blockedReasonNormalized?.includes("no active blocker")) {
|
|
1387
|
+
reasons.push("blocked_status_reason_reports_no_active_blocker");
|
|
1388
|
+
}
|
|
1389
|
+
if (blockedReasonNormalized && lifecyclePatternPolicy.stale_blocker_reason_patterns.some((pattern) => blockedReasonNormalized.includes(pattern))) {
|
|
1390
|
+
reasons.push("blocked_status_reason_matches_stale_pattern");
|
|
1391
|
+
}
|
|
1392
|
+
return reasons;
|
|
1393
|
+
}
|
|
1394
|
+
function collectLifecycleScanRows(items, includeStaleBlockers, statusRegistry, lifecyclePatternPolicy) {
|
|
1293
1395
|
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
1396
|
+
const canonicalIdByLowercase = new Map(items.map((item) => [item.id.toLowerCase(), item.id]));
|
|
1294
1397
|
const blockedStatuses = statusRegistry.blocked_statuses.size > 0 ? statusRegistry.blocked_statuses : /* @__PURE__ */ new Set(["blocked"]);
|
|
1295
|
-
const
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
return false;
|
|
1305
|
-
}
|
|
1306
|
-
const normalized = value.toLowerCase();
|
|
1307
|
-
return patterns.some((pattern) => normalized.includes(pattern));
|
|
1308
|
-
}).map(([field]) => field).sort((left, right) => left.localeCompare(right));
|
|
1398
|
+
const rows = {
|
|
1399
|
+
activeItems: items.filter((item) => !isTerminalStatus(item.status, statusRegistry)),
|
|
1400
|
+
closureLikeRows: [],
|
|
1401
|
+
terminalParentRows: [],
|
|
1402
|
+
terminalParentFixRows: [],
|
|
1403
|
+
staleBlockerRows: []
|
|
1404
|
+
};
|
|
1405
|
+
for (const item of rows.activeItems) {
|
|
1406
|
+
const closureLikeFields = closureLikeFieldsForItem(item, lifecyclePatternPolicy);
|
|
1309
1407
|
if (closureLikeFields.length > 0) {
|
|
1310
|
-
closureLikeRows.push({
|
|
1311
|
-
id: item.id,
|
|
1312
|
-
fields: closureLikeFields
|
|
1313
|
-
});
|
|
1408
|
+
rows.closureLikeRows.push({ id: item.id, fields: closureLikeFields });
|
|
1314
1409
|
}
|
|
1315
1410
|
const parentId = toMeaningfulString(item.parent);
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
id: item.id,
|
|
1321
|
-
parent_id: parent.id,
|
|
1322
|
-
parent_status: parent.status
|
|
1323
|
-
});
|
|
1324
|
-
const grandparentId = toMeaningfulString(parent.parent);
|
|
1325
|
-
const grandparent = grandparentId ? itemsById.get(grandparentId) : void 0;
|
|
1326
|
-
terminalParentFixRows.push({
|
|
1327
|
-
id: item.id,
|
|
1328
|
-
parent_id: parent.id,
|
|
1329
|
-
grandparent_id: grandparent?.id,
|
|
1330
|
-
grandparent_active: grandparent !== void 0 && !isTerminalStatus(grandparent.status, statusRegistry)
|
|
1331
|
-
});
|
|
1332
|
-
}
|
|
1411
|
+
const parent = parentId ? itemsById.get(canonicalIdByLowercase.get(parentId.toLowerCase()) ?? parentId) : void 0;
|
|
1412
|
+
if (parent && isTerminalStatus(parent.status, statusRegistry)) {
|
|
1413
|
+
rows.terminalParentRows.push({ id: item.id, parent_id: parent.id, parent_status: parent.status });
|
|
1414
|
+
rows.terminalParentFixRows.push(buildTerminalParentFixRow(item, parent, itemsById, canonicalIdByLowercase, statusRegistry));
|
|
1333
1415
|
}
|
|
1334
1416
|
if (includeStaleBlockers) {
|
|
1335
|
-
const
|
|
1336
|
-
const blockedReason = toMeaningfulString(item.blocked_reason);
|
|
1337
|
-
const blockedReasonNormalized = blockedReason?.toLowerCase();
|
|
1338
|
-
const reasons = [];
|
|
1339
|
-
const normalizedStatus = normalizeStatusForRegistry(item.status, statusRegistry);
|
|
1340
|
-
if (!blockedStatuses.has(normalizedStatus)) {
|
|
1341
|
-
if (blockedBy) {
|
|
1342
|
-
reasons.push("non_blocked_status_has_blocked_by");
|
|
1343
|
-
}
|
|
1344
|
-
if (blockedReason) {
|
|
1345
|
-
reasons.push("non_blocked_status_has_blocked_reason");
|
|
1346
|
-
}
|
|
1347
|
-
} else {
|
|
1348
|
-
if (!blockedBy && !blockedReason) {
|
|
1349
|
-
reasons.push("blocked_status_missing_blocker_context");
|
|
1350
|
-
}
|
|
1351
|
-
if (blockedReasonNormalized?.includes("no active blocker")) {
|
|
1352
|
-
reasons.push("blocked_status_reason_reports_no_active_blocker");
|
|
1353
|
-
}
|
|
1354
|
-
if (blockedReasonNormalized && lifecyclePatternPolicy.stale_blocker_reason_patterns.some((pattern) => blockedReasonNormalized.includes(pattern))) {
|
|
1355
|
-
reasons.push("blocked_status_reason_matches_stale_pattern");
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1417
|
+
const reasons = staleBlockerReasonsForItem(item, blockedStatuses, statusRegistry, lifecyclePatternPolicy);
|
|
1358
1418
|
if (reasons.length > 0) {
|
|
1359
|
-
staleBlockerRows.push({
|
|
1419
|
+
rows.staleBlockerRows.push({
|
|
1360
1420
|
id: item.id,
|
|
1361
1421
|
status: item.status,
|
|
1362
1422
|
reasons: [...new Set(reasons)].sort((left, right) => left.localeCompare(right))
|
|
@@ -1364,32 +1424,124 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
1364
1424
|
}
|
|
1365
1425
|
}
|
|
1366
1426
|
}
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1427
|
+
return rows;
|
|
1428
|
+
}
|
|
1429
|
+
function sortLifecycleScanRows(rows) {
|
|
1430
|
+
rows.closureLikeRows.sort((left, right) => left.id.localeCompare(right.id));
|
|
1431
|
+
rows.terminalParentRows.sort((left, right) => left.id.localeCompare(right.id) || left.parent_id.localeCompare(right.parent_id));
|
|
1432
|
+
rows.terminalParentFixRows.sort((left, right) => left.id.localeCompare(right.id) || left.parent_id.localeCompare(right.parent_id));
|
|
1433
|
+
rows.staleBlockerRows.sort((left, right) => left.id.localeCompare(right.id));
|
|
1434
|
+
}
|
|
1435
|
+
function lifecycleCycleWarningToken(prefix, severity, count) {
|
|
1436
|
+
if (count <= 0 || severity === "off") {
|
|
1437
|
+
return null;
|
|
1438
|
+
}
|
|
1439
|
+
return `${severity === "error" ? `${prefix}_error` : prefix}:${count}`;
|
|
1440
|
+
}
|
|
1441
|
+
function buildLifecycleWarnings(rows, includeStaleBlockers, dependencyCycleSeverity, parentCycleSeverity, dependencyCycleCount, parentCycleCount) {
|
|
1373
1442
|
const warnings = [];
|
|
1374
|
-
if (closureLikeRows.length > 0) {
|
|
1375
|
-
warnings.push(`validate_lifecycle_active_closure_like_metadata:${closureLikeRows.length}`);
|
|
1443
|
+
if (rows.closureLikeRows.length > 0) {
|
|
1444
|
+
warnings.push(`validate_lifecycle_active_closure_like_metadata:${rows.closureLikeRows.length}`);
|
|
1376
1445
|
}
|
|
1377
|
-
if (terminalParentRows.length > 0) {
|
|
1378
|
-
warnings.push(`validate_lifecycle_active_terminal_parent:${terminalParentRows.length}`);
|
|
1446
|
+
if (rows.terminalParentRows.length > 0) {
|
|
1447
|
+
warnings.push(`validate_lifecycle_active_terminal_parent:${rows.terminalParentRows.length}`);
|
|
1379
1448
|
}
|
|
1380
|
-
if (includeStaleBlockers && staleBlockerRows.length > 0) {
|
|
1381
|
-
warnings.push(`validate_lifecycle_stale_blockers:${staleBlockerRows.length}`);
|
|
1449
|
+
if (includeStaleBlockers && rows.staleBlockerRows.length > 0) {
|
|
1450
|
+
warnings.push(`validate_lifecycle_stale_blockers:${rows.staleBlockerRows.length}`);
|
|
1382
1451
|
}
|
|
1383
|
-
|
|
1384
|
-
|
|
1452
|
+
const dependencyWarning = lifecycleCycleWarningToken("validate_lifecycle_dependency_cycles", dependencyCycleSeverity, dependencyCycleCount);
|
|
1453
|
+
const parentWarning = lifecycleCycleWarningToken("validate_hierarchy_parent_cycle", parentCycleSeverity, parentCycleCount);
|
|
1454
|
+
return [...warnings, ...dependencyWarning ? [dependencyWarning] : [], ...parentWarning ? [parentWarning] : []];
|
|
1455
|
+
}
|
|
1456
|
+
function linkedArtifactPathExceedsFilesystemLimits(artifactPath) {
|
|
1457
|
+
const normalized = normalizeRelativePath(artifactPath);
|
|
1458
|
+
return normalized.length > LINKED_ARTIFACT_MAX_PATH_LENGTH || normalized.split(/[\\/]/).some((segment) => segment.length > LINKED_ARTIFACT_MAX_SEGMENT_LENGTH);
|
|
1459
|
+
}
|
|
1460
|
+
async function linkedArtifactIsMissing(workspaceRoot, artifactPath) {
|
|
1461
|
+
const absolutePath = path.isAbsolute(artifactPath) ? artifactPath : path.resolve(workspaceRoot, artifactPath);
|
|
1462
|
+
if (linkedArtifactPathExceedsFilesystemLimits(absolutePath)) {
|
|
1463
|
+
return false;
|
|
1464
|
+
}
|
|
1465
|
+
try {
|
|
1466
|
+
const stats = await fs.stat(absolutePath);
|
|
1467
|
+
return !stats.isFile() && !stats.isDirectory();
|
|
1468
|
+
} catch (error) {
|
|
1469
|
+
const code = typeof error === "object" && error !== null && "code" in error ? error.code : void 0;
|
|
1470
|
+
return code === "ENOENT" || code === "ENOTDIR";
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
async function collectLinkedPathScanState(items, workspaceRoot) {
|
|
1474
|
+
const state = {
|
|
1475
|
+
linkedProjectPaths: /* @__PURE__ */ new Set(),
|
|
1476
|
+
remoteLinkedPaths: /* @__PURE__ */ new Set(),
|
|
1477
|
+
missingLinkedPaths: [],
|
|
1478
|
+
staleLinkRows: []
|
|
1479
|
+
};
|
|
1480
|
+
for (const item of items) {
|
|
1481
|
+
const linkedArtifactGroups = [
|
|
1482
|
+
{ link_kind: "files", artifacts: item.files ?? [] },
|
|
1483
|
+
{ link_kind: "docs", artifacts: item.docs ?? [] }
|
|
1484
|
+
];
|
|
1485
|
+
for (const group of linkedArtifactGroups) {
|
|
1486
|
+
for (const artifact of group.artifacts) {
|
|
1487
|
+
if (artifact.scope !== "project") {
|
|
1488
|
+
continue;
|
|
1489
|
+
}
|
|
1490
|
+
if (isRemoteLinkedArtifactReference(artifact.path)) {
|
|
1491
|
+
state.remoteLinkedPaths.add(artifact.path.trim());
|
|
1492
|
+
continue;
|
|
1493
|
+
}
|
|
1494
|
+
const normalizedPath = normalizeRelativePath(artifact.path);
|
|
1495
|
+
if (normalizedPath.length === 0) {
|
|
1496
|
+
continue;
|
|
1497
|
+
}
|
|
1498
|
+
state.linkedProjectPaths.add(normalizedPath);
|
|
1499
|
+
if (await linkedArtifactIsMissing(workspaceRoot, artifact.path)) {
|
|
1500
|
+
state.missingLinkedPaths.push(normalizedPath);
|
|
1501
|
+
state.staleLinkRows.push({ item_id: item.id, path: normalizedPath, link_kind: group.link_kind });
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1385
1505
|
}
|
|
1386
|
-
|
|
1387
|
-
|
|
1506
|
+
return state;
|
|
1507
|
+
}
|
|
1508
|
+
function partitionFileCandidates(fileCandidates, pmRoot, workspaceRoot, fileScanMode, includePmInternals, verboseFileLists) {
|
|
1509
|
+
const strictTrackedAllMode = fileScanMode === "tracked-all-strict";
|
|
1510
|
+
const strictModeForcesPmInternals = strictTrackedAllMode && !includePmInternals;
|
|
1511
|
+
const includePmInternalsEffective = includePmInternals || strictTrackedAllMode;
|
|
1512
|
+
const pmInternalCandidatePrefixes = includePmInternalsEffective ? [] : resolvePmInternalCandidatePrefixes(pmRoot, workspaceRoot);
|
|
1513
|
+
const excludedPmInternalPaths = pmInternalCandidatePrefixes.length === 0 ? [] : fileCandidates.candidateFiles.filter((candidate) => hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1514
|
+
const candidateFiles = pmInternalCandidatePrefixes.length === 0 ? fileCandidates.candidateFiles : fileCandidates.candidateFiles.filter((candidate) => !hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1515
|
+
const excludedByReason = {};
|
|
1516
|
+
if (excludedPmInternalPaths.length > 0) {
|
|
1517
|
+
const summarizedPmInternalPaths = summarizeFileList(excludedPmInternalPaths, verboseFileLists);
|
|
1518
|
+
excludedByReason.pm_internals = {
|
|
1519
|
+
count: excludedPmInternalPaths.length,
|
|
1520
|
+
paths: summarizedPmInternalPaths.values,
|
|
1521
|
+
paths_truncated: summarizedPmInternalPaths.truncated,
|
|
1522
|
+
paths_total: summarizedPmInternalPaths.total
|
|
1523
|
+
};
|
|
1388
1524
|
}
|
|
1525
|
+
return {
|
|
1526
|
+
strictTrackedAllMode,
|
|
1527
|
+
strictModeForcesPmInternals,
|
|
1528
|
+
includePmInternalsEffective,
|
|
1529
|
+
pmInternalCandidatePrefixes,
|
|
1530
|
+
excludedPmInternalPaths,
|
|
1531
|
+
candidateFiles,
|
|
1532
|
+
excludedByReason
|
|
1533
|
+
};
|
|
1534
|
+
}
|
|
1535
|
+
function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverity, parentCycleSeverity, statusRegistry, lifecyclePatternPolicy, verboseDiagnostics, idPrefix = "pm") {
|
|
1536
|
+
const rows = collectLifecycleScanRows(items, includeStaleBlockers, statusRegistry, lifecyclePatternPolicy);
|
|
1537
|
+
sortLifecycleScanRows(rows);
|
|
1538
|
+
const dependencyCycleDiagnostics = detectLifecycleDependencyCycles(rows.activeItems, idPrefix);
|
|
1539
|
+
const parentCycleDiagnostics = detectLifecycleParentCycles(items);
|
|
1540
|
+
const warnings = buildLifecycleWarnings(rows, includeStaleBlockers, dependencyCycleSeverity, parentCycleSeverity, dependencyCycleDiagnostics.cycle_count, parentCycleDiagnostics.cycle_count);
|
|
1389
1541
|
const diagnosticLimit = verboseDiagnostics ? Number.POSITIVE_INFINITY : DIAGNOSTIC_LIST_SUMMARY_LIMIT;
|
|
1390
|
-
const summarizedClosureLikeRows = summarizeList(closureLikeRows.map((row) => `${row.id}:${row.fields.join(",")}`), diagnosticLimit);
|
|
1391
|
-
const summarizedTerminalParentRows = summarizeList(terminalParentRows.map((row) => `${row.id}:${row.parent_id}:${row.parent_status}`), diagnosticLimit);
|
|
1392
|
-
const summarizedStaleBlockerRows = summarizeList(staleBlockerRows.map((row) => `${row.id}:${row.status}:${row.reasons.join(",")}`), diagnosticLimit);
|
|
1542
|
+
const summarizedClosureLikeRows = summarizeList(rows.closureLikeRows.map((row) => `${row.id}:${row.fields.join(",")}`), diagnosticLimit);
|
|
1543
|
+
const summarizedTerminalParentRows = summarizeList(rows.terminalParentRows.map((row) => `${row.id}:${row.parent_id}:${row.parent_status}`), diagnosticLimit);
|
|
1544
|
+
const summarizedStaleBlockerRows = summarizeList(rows.staleBlockerRows.map((row) => `${row.id}:${row.status}:${row.reasons.join(",")}`), diagnosticLimit);
|
|
1393
1545
|
const summarizedDependencyCycleItemIds = summarizeList(dependencyCycleDiagnostics.cycle_item_ids, diagnosticLimit);
|
|
1394
1546
|
const summarizedDependencyCycleSamplePaths = summarizeList(dependencyCycleDiagnostics.cycle_sample_paths, diagnosticLimit);
|
|
1395
1547
|
const summarizedParentCycleItemIds = summarizeList(parentCycleDiagnostics.cycle_item_ids, diagnosticLimit);
|
|
@@ -1400,15 +1552,15 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
1400
1552
|
name: "lifecycle",
|
|
1401
1553
|
status: hasErrorSeverityCycle ? "error" : warnings.length === 0 ? "ok" : "warn",
|
|
1402
1554
|
details: {
|
|
1403
|
-
checked_active_items: activeItems.length,
|
|
1404
|
-
active_closure_like_metadata_items: closureLikeRows.length,
|
|
1555
|
+
checked_active_items: rows.activeItems.length,
|
|
1556
|
+
active_closure_like_metadata_items: rows.closureLikeRows.length,
|
|
1405
1557
|
active_closure_like_metadata_rows: summarizedClosureLikeRows.values,
|
|
1406
1558
|
active_closure_like_metadata_rows_truncated: summarizedClosureLikeRows.truncated,
|
|
1407
|
-
active_terminal_parent_items: terminalParentRows.length,
|
|
1559
|
+
active_terminal_parent_items: rows.terminalParentRows.length,
|
|
1408
1560
|
active_terminal_parent_rows: summarizedTerminalParentRows.values,
|
|
1409
1561
|
active_terminal_parent_rows_truncated: summarizedTerminalParentRows.truncated,
|
|
1410
1562
|
stale_blocker_checks_enabled: includeStaleBlockers,
|
|
1411
|
-
stale_blocker_items: staleBlockerRows.length,
|
|
1563
|
+
stale_blocker_items: rows.staleBlockerRows.length,
|
|
1412
1564
|
stale_blocker_rows: summarizedStaleBlockerRows.values,
|
|
1413
1565
|
stale_blocker_rows_truncated: summarizedStaleBlockerRows.truncated,
|
|
1414
1566
|
dependency_cycle_severity_policy: dependencyCycleSeverity,
|
|
@@ -1438,81 +1590,26 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
1438
1590
|
}
|
|
1439
1591
|
},
|
|
1440
1592
|
warnings,
|
|
1441
|
-
terminalParentFixRows
|
|
1593
|
+
terminalParentFixRows: rows.terminalParentFixRows
|
|
1442
1594
|
};
|
|
1443
1595
|
}
|
|
1444
1596
|
async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, includePmInternals, verboseFileLists) {
|
|
1445
|
-
const
|
|
1446
|
-
const remoteLinkedPaths = /* @__PURE__ */ new Set();
|
|
1447
|
-
const missingLinkedPaths = [];
|
|
1448
|
-
const staleLinkRows = [];
|
|
1597
|
+
const linkedPathState = await collectLinkedPathScanState(items, workspaceRoot);
|
|
1449
1598
|
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
1450
|
-
|
|
1451
|
-
const linkedArtifactGroups = [
|
|
1452
|
-
{ link_kind: "files", artifacts: item.files ?? [] },
|
|
1453
|
-
{ link_kind: "docs", artifacts: item.docs ?? [] }
|
|
1454
|
-
];
|
|
1455
|
-
for (const group of linkedArtifactGroups) {
|
|
1456
|
-
for (const artifact of group.artifacts) {
|
|
1457
|
-
if (artifact.scope !== "project") {
|
|
1458
|
-
continue;
|
|
1459
|
-
}
|
|
1460
|
-
if (isRemoteLinkedArtifactReference(artifact.path)) {
|
|
1461
|
-
remoteLinkedPaths.add(artifact.path.trim());
|
|
1462
|
-
continue;
|
|
1463
|
-
}
|
|
1464
|
-
const normalizedPath = normalizeRelativePath(artifact.path);
|
|
1465
|
-
if (normalizedPath.length === 0) {
|
|
1466
|
-
continue;
|
|
1467
|
-
}
|
|
1468
|
-
linkedProjectPaths.add(normalizedPath);
|
|
1469
|
-
const absolutePath = path.isAbsolute(artifact.path) ? artifact.path : path.resolve(workspaceRoot, artifact.path);
|
|
1470
|
-
let missing = false;
|
|
1471
|
-
try {
|
|
1472
|
-
const stats = await fs.stat(absolutePath);
|
|
1473
|
-
if (!stats.isFile() && !stats.isDirectory()) {
|
|
1474
|
-
missing = true;
|
|
1475
|
-
}
|
|
1476
|
-
} catch {
|
|
1477
|
-
missing = true;
|
|
1478
|
-
}
|
|
1479
|
-
if (missing) {
|
|
1480
|
-
missingLinkedPaths.push(normalizedPath);
|
|
1481
|
-
staleLinkRows.push({ item_id: item.id, path: normalizedPath, link_kind: group.link_kind });
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
const uniqueMissingLinkedPaths = [...new Set(missingLinkedPaths)].sort((left, right) => left.localeCompare(right));
|
|
1599
|
+
const uniqueMissingLinkedPaths = [...new Set(linkedPathState.missingLinkedPaths)].sort((left, right) => left.localeCompare(right));
|
|
1487
1600
|
const fileCandidates = await collectProjectFileCandidates(workspaceRoot, fileScanMode);
|
|
1488
|
-
const
|
|
1489
|
-
const
|
|
1490
|
-
const includePmInternalsEffective = includePmInternals || strictTrackedAllMode;
|
|
1491
|
-
const pmInternalCandidatePrefixes = includePmInternalsEffective ? [] : resolvePmInternalCandidatePrefixes(pmRoot, workspaceRoot);
|
|
1492
|
-
const excludedPmInternalPaths = pmInternalCandidatePrefixes.length === 0 ? [] : fileCandidates.candidateFiles.filter((candidate) => hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1493
|
-
const candidateFiles = pmInternalCandidatePrefixes.length === 0 ? fileCandidates.candidateFiles : fileCandidates.candidateFiles.filter((candidate) => !hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1494
|
-
const excludedPmInternalCount = excludedPmInternalPaths.length;
|
|
1495
|
-
const excludedByReason = {};
|
|
1496
|
-
if (excludedPmInternalCount > 0) {
|
|
1497
|
-
const summarizedPmInternalPaths = summarizeFileList(excludedPmInternalPaths, verboseFileLists);
|
|
1498
|
-
excludedByReason.pm_internals = {
|
|
1499
|
-
count: excludedPmInternalCount,
|
|
1500
|
-
paths: summarizedPmInternalPaths.values,
|
|
1501
|
-
paths_truncated: summarizedPmInternalPaths.truncated,
|
|
1502
|
-
paths_total: summarizedPmInternalPaths.total
|
|
1503
|
-
};
|
|
1504
|
-
}
|
|
1505
|
-
const orphanedFiles = candidateFiles.filter((candidate) => !linkedProjectPaths.has(candidate));
|
|
1601
|
+
const partition = partitionFileCandidates(fileCandidates, pmRoot, workspaceRoot, fileScanMode, includePmInternals, verboseFileLists);
|
|
1602
|
+
const orphanedFiles = partition.candidateFiles.filter((candidate) => !linkedPathState.linkedProjectPaths.has(candidate));
|
|
1506
1603
|
const orphanedPathRows = buildOrphanedPathRows(orphanedFiles, items);
|
|
1507
|
-
const classifiedStalePaths = classifyStaleLinkedPaths(uniqueMissingLinkedPaths, candidateFiles);
|
|
1604
|
+
const classifiedStalePaths = classifyStaleLinkedPaths(uniqueMissingLinkedPaths, partition.candidateFiles);
|
|
1508
1605
|
const classificationByPath = new Map(classifiedStalePaths.map((entry) => [entry.path, entry.classification]));
|
|
1509
1606
|
const movedStalePathCount = classifiedStalePaths.filter((entry) => entry.classification === "moved").length;
|
|
1510
|
-
const staleLinkPruneRows = staleLinkRows.map((row) => ({
|
|
1607
|
+
const staleLinkPruneRows = linkedPathState.staleLinkRows.map((row) => ({
|
|
1511
1608
|
...row,
|
|
1512
1609
|
classification: classificationByPath.get(row.path) ?? "deleted"
|
|
1513
1610
|
})).sort((left, right) => left.item_id.localeCompare(right.item_id) || left.path.localeCompare(right.path) || left.link_kind.localeCompare(right.link_kind));
|
|
1514
1611
|
const warnings = [];
|
|
1515
|
-
if (strictModeForcesPmInternals) {
|
|
1612
|
+
if (partition.strictModeForcesPmInternals) {
|
|
1516
1613
|
warnings.push("validate_files_tracked_all_strict_forces_pm_internals");
|
|
1517
1614
|
}
|
|
1518
1615
|
if (uniqueMissingLinkedPaths.length > 0) {
|
|
@@ -1521,7 +1618,7 @@ async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, inclu
|
|
|
1521
1618
|
if (orphanedFiles.length > 0) {
|
|
1522
1619
|
warnings.push(`validate_files_orphaned_paths:${orphanedFiles.length}`);
|
|
1523
1620
|
}
|
|
1524
|
-
const uniqueRemoteLinkedPaths = [...remoteLinkedPaths].sort((left, right) => left.localeCompare(right));
|
|
1621
|
+
const uniqueRemoteLinkedPaths = [...linkedPathState.remoteLinkedPaths].sort((left, right) => left.localeCompare(right));
|
|
1525
1622
|
const summarizedRemote = summarizeFileList(uniqueRemoteLinkedPaths, verboseFileLists);
|
|
1526
1623
|
const summarizedMissing = summarizeFileList(uniqueMissingLinkedPaths, verboseFileLists);
|
|
1527
1624
|
const summarizedOrphaned = summarizeFileList(orphanedFiles, verboseFileLists);
|
|
@@ -1547,28 +1644,28 @@ async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, inclu
|
|
|
1547
1644
|
workspace_root: workspaceRoot,
|
|
1548
1645
|
scan_mode_requested: fileCandidates.requestedMode,
|
|
1549
1646
|
scan_mode_applied: fileCandidates.appliedMode,
|
|
1550
|
-
strict_tracked_all_mode: strictTrackedAllMode,
|
|
1551
|
-
strict_mode_forces_pm_internals: strictModeForcesPmInternals,
|
|
1552
|
-
strict_mode_forces_pm_internals_notice: strictModeForcesPmInternals ? "tracked-all-strict force-enables PM internals; pass --include-pm-internals to make inclusion explicit." : null,
|
|
1647
|
+
strict_tracked_all_mode: partition.strictTrackedAllMode,
|
|
1648
|
+
strict_mode_forces_pm_internals: partition.strictModeForcesPmInternals,
|
|
1649
|
+
strict_mode_forces_pm_internals_notice: partition.strictModeForcesPmInternals ? "tracked-all-strict force-enables PM internals; pass --include-pm-internals to make inclusion explicit." : null,
|
|
1553
1650
|
file_list_detail_mode: verboseFileLists ? "full" : "summary",
|
|
1554
1651
|
file_list_summary_limit: FILE_LIST_SUMMARY_LIMIT,
|
|
1555
1652
|
candidate_scan_source: fileCandidates.source,
|
|
1556
|
-
include_pm_internals: includePmInternalsEffective,
|
|
1653
|
+
include_pm_internals: partition.includePmInternalsEffective,
|
|
1557
1654
|
include_pm_internals_requested: includePmInternals,
|
|
1558
|
-
pm_internal_candidate_prefixes: pmInternalCandidatePrefixes,
|
|
1559
|
-
pm_internal_excluded_count:
|
|
1560
|
-
excluded_total:
|
|
1561
|
-
excluded_by_reason: excludedByReason,
|
|
1562
|
-
linked_project_paths: linkedProjectPaths.size,
|
|
1655
|
+
pm_internal_candidate_prefixes: partition.pmInternalCandidatePrefixes,
|
|
1656
|
+
pm_internal_excluded_count: partition.excludedPmInternalPaths.length,
|
|
1657
|
+
excluded_total: partition.excludedPmInternalPaths.length,
|
|
1658
|
+
excluded_by_reason: partition.excludedByReason,
|
|
1659
|
+
linked_project_paths: linkedPathState.linkedProjectPaths.size,
|
|
1563
1660
|
remote_linked_paths_count: uniqueRemoteLinkedPaths.length,
|
|
1564
1661
|
remote_linked_paths_total: summarizedRemote.total,
|
|
1565
1662
|
remote_linked_paths: summarizedRemote.values,
|
|
1566
1663
|
remote_linked_paths_truncated: summarizedRemote.truncated,
|
|
1567
1664
|
candidate_total_raw: fileCandidates.candidateTotal,
|
|
1568
1665
|
candidate_scanned_raw: fileCandidates.candidateScanned,
|
|
1569
|
-
candidate_total: candidateFiles.length,
|
|
1570
|
-
candidate_scanned: candidateFiles.length,
|
|
1571
|
-
scanned_candidate_files: candidateFiles.length,
|
|
1666
|
+
candidate_total: partition.candidateFiles.length,
|
|
1667
|
+
candidate_scanned: partition.candidateFiles.length,
|
|
1668
|
+
scanned_candidate_files: partition.candidateFiles.length,
|
|
1572
1669
|
missing_linked_paths_count: uniqueMissingLinkedPaths.length,
|
|
1573
1670
|
missing_linked_paths_total: summarizedMissing.total,
|
|
1574
1671
|
missing_linked_paths: summarizedMissing.values,
|
|
@@ -1728,7 +1825,7 @@ async function applyValidateFix(fix, global) {
|
|
|
1728
1825
|
case "set_estimate":
|
|
1729
1826
|
case "reparent":
|
|
1730
1827
|
case "unset_parent": {
|
|
1731
|
-
const { runUpdate } = await import("./update-
|
|
1828
|
+
const { runUpdate } = await import("./update-IKJZWLQC.js");
|
|
1732
1829
|
const updateOptions = { message: VALIDATE_AUTO_FIX_MESSAGE };
|
|
1733
1830
|
if (fix.kind === "set_resolution") {
|
|
1734
1831
|
updateOptions.resolution = fix.value;
|
|
@@ -1788,10 +1885,10 @@ async function applyValidateFixes(applicable, global) {
|
|
|
1788
1885
|
const remove = batch.map((fix) => fix.path).filter((value) => typeof value === "string" && value.length > 0);
|
|
1789
1886
|
try {
|
|
1790
1887
|
if (first.kind === "prune_file_link") {
|
|
1791
|
-
const { runFiles } = await import("./files-
|
|
1888
|
+
const { runFiles } = await import("./files-6SGKHS6O.js");
|
|
1792
1889
|
await runFiles(first.item_id, { remove, message: VALIDATE_AUTO_FIX_MESSAGE }, global);
|
|
1793
1890
|
} else {
|
|
1794
|
-
const { runDocs } = await import("./docs-
|
|
1891
|
+
const { runDocs } = await import("./docs-6LQ3GLM7.js");
|
|
1795
1892
|
await runDocs(first.item_id, { remove, message: VALIDATE_AUTO_FIX_MESSAGE }, global);
|
|
1796
1893
|
}
|
|
1797
1894
|
applied.push(...batch);
|
|
@@ -1806,10 +1903,14 @@ var _testOnlyValidateCommand = {
|
|
|
1806
1903
|
applyValidateFixes,
|
|
1807
1904
|
attachValidateFixHints,
|
|
1808
1905
|
buildCommandReferencesCheck,
|
|
1906
|
+
buildCloseReasonBackfillRows,
|
|
1809
1907
|
buildFilesCheck,
|
|
1810
1908
|
buildLifecycleCheck,
|
|
1811
1909
|
buildLifecycleDependencyGraph,
|
|
1812
1910
|
buildLifecycleParentGraph,
|
|
1911
|
+
buildEstimateBackfillRows,
|
|
1912
|
+
buildMetadataCounts,
|
|
1913
|
+
buildMissingFieldOccurrences,
|
|
1813
1914
|
buildOrphanedPathRows,
|
|
1814
1915
|
classifyOrphanedPath,
|
|
1815
1916
|
collectDefaultProjectFileCandidates,
|
|
@@ -1820,6 +1921,7 @@ var _testOnlyValidateCommand = {
|
|
|
1820
1921
|
extractItemIds,
|
|
1821
1922
|
findLifecycleDependencyCycleComponents,
|
|
1822
1923
|
isMetadataFieldMissing,
|
|
1924
|
+
linkedArtifactPathExceedsFilesystemLimits,
|
|
1823
1925
|
listFilesRecursive,
|
|
1824
1926
|
resolveDependencyCycleSeverity,
|
|
1825
1927
|
resolveParentCycleSeverity,
|
|
@@ -1833,6 +1935,105 @@ var _testOnlyValidateCommand = {
|
|
|
1833
1935
|
summarizeDuplicateIssueCodes,
|
|
1834
1936
|
toMeaningfulString
|
|
1835
1937
|
};
|
|
1938
|
+
function recordValidateCheck(state, built, fixHintsEnabled) {
|
|
1939
|
+
if (fixHintsEnabled) {
|
|
1940
|
+
attachValidateFixHints(built.check, built.warnings);
|
|
1941
|
+
}
|
|
1942
|
+
state.checks.push(built.check);
|
|
1943
|
+
state.warnings.push(...built.warnings);
|
|
1944
|
+
}
|
|
1945
|
+
async function executeRequestedValidateChecks(params) {
|
|
1946
|
+
const state = {
|
|
1947
|
+
checks: [],
|
|
1948
|
+
warnings: [...params.initialWarnings],
|
|
1949
|
+
closeReasonBackfillRows: [],
|
|
1950
|
+
estimateBackfillRows: [],
|
|
1951
|
+
resolutionBackfillRows: [],
|
|
1952
|
+
terminalParentFixRows: [],
|
|
1953
|
+
staleLinkPruneRows: []
|
|
1954
|
+
};
|
|
1955
|
+
const fixHintsEnabled = params.options.fixHints === true;
|
|
1956
|
+
const fullDiagnostics = params.options.verboseDiagnostics === true || params.options.allAffectedIds === true || params.global.json === true;
|
|
1957
|
+
if (params.requestedChecks.has("metadata")) {
|
|
1958
|
+
const built = buildMetadataCheck(params.items, params.metadataPolicy, params.statusRegistry, fullDiagnostics);
|
|
1959
|
+
state.closeReasonBackfillRows = built.closeReasonBackfillRows;
|
|
1960
|
+
state.estimateBackfillRows = built.estimateBackfillRows;
|
|
1961
|
+
recordValidateCheck(state, built, fixHintsEnabled);
|
|
1962
|
+
}
|
|
1963
|
+
if (params.requestedChecks.has("resolution")) {
|
|
1964
|
+
const built = buildResolutionCheck(params.items, params.statusRegistry, fullDiagnostics);
|
|
1965
|
+
state.resolutionBackfillRows = built.resolutionBackfillRows;
|
|
1966
|
+
recordValidateCheck(state, built, fixHintsEnabled);
|
|
1967
|
+
}
|
|
1968
|
+
if (params.requestedChecks.has("lifecycle")) {
|
|
1969
|
+
const built = buildLifecycleCheck(params.items, Boolean(params.options.checkStaleBlockers), params.dependencyCycleSeverity, params.parentCycleSeverity, params.statusRegistry, params.lifecyclePatternPolicy, fullDiagnostics, params.settings.id_prefix);
|
|
1970
|
+
state.terminalParentFixRows = built.terminalParentFixRows;
|
|
1971
|
+
recordValidateCheck(state, built, fixHintsEnabled);
|
|
1972
|
+
}
|
|
1973
|
+
if (params.requestedChecks.has("files")) {
|
|
1974
|
+
const built = await buildFilesCheck(params.items, params.workspaceRoot, params.pmRoot, params.fileScanMode, Boolean(params.options.includePmInternals), Boolean(params.options.verboseFileLists));
|
|
1975
|
+
state.staleLinkPruneRows = built.staleLinkPruneRows;
|
|
1976
|
+
recordValidateCheck(state, built, fixHintsEnabled);
|
|
1977
|
+
}
|
|
1978
|
+
if (params.requestedChecks.has("command_references")) {
|
|
1979
|
+
recordValidateCheck(state, buildCommandReferencesCheck(params.items, params.settings.id_prefix, fullDiagnostics), fixHintsEnabled);
|
|
1980
|
+
}
|
|
1981
|
+
if (params.requestedChecks.has("history_drift")) {
|
|
1982
|
+
recordValidateCheck(state, await buildHistoryDriftCheck(params.pmRoot, params.items, fullDiagnostics), fixHintsEnabled);
|
|
1983
|
+
}
|
|
1984
|
+
if (params.requestedChecks.has("format_version")) {
|
|
1985
|
+
recordValidateCheck(state, buildFormatVersionCheck(params.items, fullDiagnostics), fixHintsEnabled);
|
|
1986
|
+
}
|
|
1987
|
+
return state;
|
|
1988
|
+
}
|
|
1989
|
+
function planValidateFixes(options, state, settings) {
|
|
1990
|
+
const planned = [];
|
|
1991
|
+
if (options.autoFix === true) {
|
|
1992
|
+
planned.push(...planCloseReasonBackfillFixes(state.closeReasonBackfillRows));
|
|
1993
|
+
planned.push(...planResolutionBackfillFixes(state.resolutionBackfillRows));
|
|
1994
|
+
planned.push(...planEstimateBackfillFixes(state.estimateBackfillRows, settings.validation.estimate_defaults_by_type));
|
|
1995
|
+
planned.push(...planTerminalParentFixes(state.terminalParentFixRows));
|
|
1996
|
+
}
|
|
1997
|
+
if (options.pruneMissing === true) {
|
|
1998
|
+
planned.push(...planStaleLinkPruneFixes(state.staleLinkPruneRows));
|
|
1999
|
+
}
|
|
2000
|
+
return planned;
|
|
2001
|
+
}
|
|
2002
|
+
async function buildValidateFixesSummary(options, state, settings, grantedFixScopes, global) {
|
|
2003
|
+
if (options.autoFix !== true && options.pruneMissing !== true) {
|
|
2004
|
+
return void 0;
|
|
2005
|
+
}
|
|
2006
|
+
const planned = planValidateFixes(options, state, settings);
|
|
2007
|
+
const { applicable, gated } = partitionFixesByGrant(planned, grantedFixScopes);
|
|
2008
|
+
const dryRun = options.dryRun === true;
|
|
2009
|
+
const appliedFixRows = [];
|
|
2010
|
+
const failedFixRows = [];
|
|
2011
|
+
if (!dryRun) {
|
|
2012
|
+
const applied = await applyValidateFixes(applicable, global);
|
|
2013
|
+
appliedFixRows.push(...applied.applied.map(toFixOutputRow));
|
|
2014
|
+
failedFixRows.push(...applied.failed.map(({ fix, error }) => ({
|
|
2015
|
+
...toFixOutputRow(fix),
|
|
2016
|
+
error: error instanceof Error ? error.message : String(error)
|
|
2017
|
+
})));
|
|
2018
|
+
}
|
|
2019
|
+
return {
|
|
2020
|
+
mode: dryRun ? "dry_run" : "apply",
|
|
2021
|
+
auto_fix: options.autoFix === true,
|
|
2022
|
+
prune_missing: options.pruneMissing === true,
|
|
2023
|
+
granted_fix_scopes: [...grantedFixScopes].sort((left, right) => left.localeCompare(right)),
|
|
2024
|
+
planned_count: planned.length,
|
|
2025
|
+
applied_count: appliedFixRows.length,
|
|
2026
|
+
gated_count: gated.length,
|
|
2027
|
+
failed_count: failedFixRows.length,
|
|
2028
|
+
planned_fixes: planned.map(toFixOutputRow),
|
|
2029
|
+
applied_fixes: appliedFixRows,
|
|
2030
|
+
gated_fixes: gated.map((fix) => ({
|
|
2031
|
+
...toFixOutputRow(fix),
|
|
2032
|
+
gate_hint: `Withheld: re-run with --fix-scope ${fix.gate} to apply.`
|
|
2033
|
+
})),
|
|
2034
|
+
failed_fixes: failedFixRows
|
|
2035
|
+
};
|
|
2036
|
+
}
|
|
1836
2037
|
async function runValidate(options, global) {
|
|
1837
2038
|
const fixesRequested = options.autoFix === true || options.pruneMissing === true;
|
|
1838
2039
|
if (options.dryRun === true && !fixesRequested) {
|
|
@@ -1860,100 +2061,29 @@ async function runValidate(options, global) {
|
|
|
1860
2061
|
const parentCycleSeverity = resolveParentCycleSeverity(options.parentCycleSeverity);
|
|
1861
2062
|
const fileScanMode = resolveFileScanMode(options.scanMode);
|
|
1862
2063
|
const workspaceRoot = resolveWorkspaceRoot(pmRoot);
|
|
1863
|
-
const
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
estimateBackfillRows = built.estimateBackfillRows;
|
|
1883
|
-
record(built);
|
|
1884
|
-
}
|
|
1885
|
-
if (requestedChecks.has("resolution")) {
|
|
1886
|
-
const built = buildResolutionCheck(items, statusRegistry, fullDiagnostics);
|
|
1887
|
-
resolutionBackfillRows = built.resolutionBackfillRows;
|
|
1888
|
-
record(built);
|
|
1889
|
-
}
|
|
1890
|
-
if (requestedChecks.has("lifecycle")) {
|
|
1891
|
-
const built = buildLifecycleCheck(items, Boolean(options.checkStaleBlockers), dependencyCycleSeverity, parentCycleSeverity, statusRegistry, lifecyclePatternPolicy, fullDiagnostics, settings.id_prefix);
|
|
1892
|
-
terminalParentFixRows = built.terminalParentFixRows;
|
|
1893
|
-
record(built);
|
|
1894
|
-
}
|
|
1895
|
-
if (requestedChecks.has("files")) {
|
|
1896
|
-
const built = await buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, Boolean(options.includePmInternals), Boolean(options.verboseFileLists));
|
|
1897
|
-
staleLinkPruneRows = built.staleLinkPruneRows;
|
|
1898
|
-
record(built);
|
|
1899
|
-
}
|
|
1900
|
-
if (requestedChecks.has("command_references")) {
|
|
1901
|
-
record(buildCommandReferencesCheck(items, settings.id_prefix, fullDiagnostics));
|
|
1902
|
-
}
|
|
1903
|
-
if (requestedChecks.has("history_drift")) {
|
|
1904
|
-
record(await buildHistoryDriftCheck(pmRoot, items, fullDiagnostics));
|
|
1905
|
-
}
|
|
1906
|
-
if (requestedChecks.has("format_version")) {
|
|
1907
|
-
record(buildFormatVersionCheck(items, fullDiagnostics));
|
|
1908
|
-
}
|
|
1909
|
-
let fixes;
|
|
1910
|
-
if (fixesRequested) {
|
|
1911
|
-
const planned = [];
|
|
1912
|
-
if (options.autoFix === true) {
|
|
1913
|
-
planned.push(...planCloseReasonBackfillFixes(closeReasonBackfillRows));
|
|
1914
|
-
planned.push(...planResolutionBackfillFixes(resolutionBackfillRows));
|
|
1915
|
-
planned.push(...planEstimateBackfillFixes(estimateBackfillRows, settings.validation.estimate_defaults_by_type));
|
|
1916
|
-
planned.push(...planTerminalParentFixes(terminalParentFixRows));
|
|
1917
|
-
}
|
|
1918
|
-
if (options.pruneMissing === true) {
|
|
1919
|
-
planned.push(...planStaleLinkPruneFixes(staleLinkPruneRows));
|
|
1920
|
-
}
|
|
1921
|
-
const { applicable, gated } = partitionFixesByGrant(planned, grantedFixScopes);
|
|
1922
|
-
const dryRun = options.dryRun === true;
|
|
1923
|
-
const appliedFixRows = [];
|
|
1924
|
-
const failedFixRows = [];
|
|
1925
|
-
if (!dryRun) {
|
|
1926
|
-
const applied = await applyValidateFixes(applicable, global);
|
|
1927
|
-
appliedFixRows.push(...applied.applied.map(toFixOutputRow));
|
|
1928
|
-
failedFixRows.push(...applied.failed.map(({ fix, error }) => ({
|
|
1929
|
-
...toFixOutputRow(fix),
|
|
1930
|
-
error: error instanceof Error ? error.message : String(error)
|
|
1931
|
-
})));
|
|
1932
|
-
}
|
|
1933
|
-
fixes = {
|
|
1934
|
-
mode: dryRun ? "dry_run" : "apply",
|
|
1935
|
-
auto_fix: options.autoFix === true,
|
|
1936
|
-
prune_missing: options.pruneMissing === true,
|
|
1937
|
-
granted_fix_scopes: [...grantedFixScopes].sort((left, right) => left.localeCompare(right)),
|
|
1938
|
-
planned_count: planned.length,
|
|
1939
|
-
applied_count: appliedFixRows.length,
|
|
1940
|
-
gated_count: gated.length,
|
|
1941
|
-
failed_count: failedFixRows.length,
|
|
1942
|
-
planned_fixes: planned.map(toFixOutputRow),
|
|
1943
|
-
applied_fixes: appliedFixRows,
|
|
1944
|
-
gated_fixes: gated.map((fix) => ({
|
|
1945
|
-
...toFixOutputRow(fix),
|
|
1946
|
-
gate_hint: `Withheld: re-run with --fix-scope ${fix.gate} to apply.`
|
|
1947
|
-
})),
|
|
1948
|
-
failed_fixes: failedFixRows
|
|
1949
|
-
};
|
|
1950
|
-
}
|
|
1951
|
-
const normalizedWarnings = [...new Set(warnings)].sort((left, right) => left.localeCompare(right));
|
|
1952
|
-
const hasErrors = checks.some((check) => check.status === "error");
|
|
2064
|
+
const state = await executeRequestedValidateChecks({
|
|
2065
|
+
requestedChecks,
|
|
2066
|
+
options,
|
|
2067
|
+
global,
|
|
2068
|
+
pmRoot,
|
|
2069
|
+
workspaceRoot,
|
|
2070
|
+
settings,
|
|
2071
|
+
items,
|
|
2072
|
+
statusRegistry,
|
|
2073
|
+
metadataPolicy,
|
|
2074
|
+
lifecyclePatternPolicy,
|
|
2075
|
+
dependencyCycleSeverity,
|
|
2076
|
+
parentCycleSeverity,
|
|
2077
|
+
fileScanMode,
|
|
2078
|
+
initialWarnings: [...new Set(itemReadWarnings)]
|
|
2079
|
+
});
|
|
2080
|
+
const fixes = fixesRequested ? await buildValidateFixesSummary(options, state, settings, grantedFixScopes, global) : void 0;
|
|
2081
|
+
const normalizedWarnings = [...new Set(state.warnings)].sort((left, right) => left.localeCompare(right));
|
|
2082
|
+
const hasErrors = state.checks.some((check) => check.status === "error");
|
|
1953
2083
|
return {
|
|
1954
2084
|
ok: !hasErrors,
|
|
1955
2085
|
has_warnings: normalizedWarnings.length > 0,
|
|
1956
|
-
checks,
|
|
2086
|
+
checks: state.checks,
|
|
1957
2087
|
warnings: normalizedWarnings,
|
|
1958
2088
|
...fixes !== void 0 ? { fixes } : {},
|
|
1959
2089
|
generated_at: nowIso()
|
|
@@ -1963,6 +2093,6 @@ export {
|
|
|
1963
2093
|
_testOnlyValidateCommand,
|
|
1964
2094
|
runValidate
|
|
1965
2095
|
};
|
|
1966
|
-
//# sourceMappingURL=validate-
|
|
2096
|
+
//# sourceMappingURL=validate-GAJ6FUSI.js.map
|
|
1967
2097
|
|
|
1968
|
-
//# debugId=
|
|
2098
|
+
//# debugId=a4633e01-6951-59e5-83cd-351f590aec99
|