@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,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
extractReferencedPmItemIdsFromCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YPWUSH72.js";
|
|
4
4
|
import {
|
|
5
5
|
buildRemediationCommands
|
|
6
6
|
} from "./chunk-JINYH2DB.js";
|
|
@@ -9,30 +9,30 @@ import {
|
|
|
9
9
|
} from "./chunk-7M2HAZEB.js";
|
|
10
10
|
import {
|
|
11
11
|
scanHistoryDrift
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-LOWVNZBZ.js";
|
|
13
|
+
import "./chunk-MDHWWBNZ.js";
|
|
14
|
+
import "./chunk-P5L7Z2O6.js";
|
|
15
|
+
import "./chunk-T4XBKJ3F.js";
|
|
16
|
+
import "./chunk-KS6ATO47.js";
|
|
17
|
+
import "./chunk-TQ6AX5SQ.js";
|
|
18
18
|
import "./chunk-5HIZDR5A.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-JPATY4SE.js";
|
|
20
|
+
import "./chunk-6NYJGMTY.js";
|
|
21
|
+
import "./chunk-NZ7QIUP5.js";
|
|
22
|
+
import "./chunk-T6AXEBOP.js";
|
|
23
|
+
import "./chunk-RAHINBVP.js";
|
|
24
24
|
import {
|
|
25
25
|
listAllFrontMatterWithBody
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6KRFL33E.js";
|
|
27
27
|
import {
|
|
28
28
|
CURRENT_ITEM_FORMAT_VERSION,
|
|
29
29
|
effectiveItemFormatVersion,
|
|
30
30
|
normalizeStatusInput,
|
|
31
31
|
scanItemFormatVersions
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-3W2HJKJX.js";
|
|
33
33
|
import {
|
|
34
34
|
nowIso
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-AJHYQCBJ.js";
|
|
36
36
|
import {
|
|
37
37
|
DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS,
|
|
38
38
|
DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
resolvePmRoot,
|
|
49
49
|
resolveRuntimeStatusRegistry,
|
|
50
50
|
toNonEmptyStringOrUndefined
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-KHVGM5CS.js";
|
|
52
52
|
|
|
53
53
|
// dist/cli/commands/validate.js
|
|
54
54
|
import fs from "node:fs/promises";
|
|
@@ -418,7 +418,7 @@ function summarizeMissingLinkedPathRows(rows) {
|
|
|
418
418
|
!(function() {
|
|
419
419
|
try {
|
|
420
420
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
421
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
421
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "d434e454-cb3f-5eaa-b841-d6f815e0446d");
|
|
422
422
|
} catch (e2) {
|
|
423
423
|
}
|
|
424
424
|
})();
|
|
@@ -510,6 +510,8 @@ var METADATA_TRUNCATED_KEY_BY_FIELD = {
|
|
|
510
510
|
var GIT_LS_FILES_MAX_BUFFER = 32 * 1024 * 1024;
|
|
511
511
|
var FILE_LIST_SUMMARY_LIMIT = 40;
|
|
512
512
|
var DIAGNOSTIC_LIST_SUMMARY_LIMIT = 5;
|
|
513
|
+
var LINKED_ARTIFACT_MAX_PATH_LENGTH = 4096;
|
|
514
|
+
var LINKED_ARTIFACT_MAX_SEGMENT_LENGTH = 255;
|
|
513
515
|
var execFileAsync = promisify(execFile);
|
|
514
516
|
function normalizeRelativePath(value) {
|
|
515
517
|
return value.replaceAll("\\", "/").replace(/^\.\/+/, "").replace(/^\/+/, "");
|
|
@@ -952,61 +954,59 @@ function summarizeDuplicateIssueCodes(duplicates, verboseDiagnostics) {
|
|
|
952
954
|
warnings: [`${DUPLICATE_ISSUE_CODE_WARNING_TOKEN}:${duplicates.length}`]
|
|
953
955
|
};
|
|
954
956
|
}
|
|
955
|
-
function
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
957
|
+
function initializeMissingMetadataByField() {
|
|
958
|
+
return Object.fromEntries(SUPPORTED_METADATA_REQUIRED_FIELDS.map((field) => [field, []]));
|
|
959
|
+
}
|
|
960
|
+
function collectMissingMetadataByField(items, statusRegistry, enforcePlanningFieldsOnTerminal) {
|
|
961
|
+
const missingByField = initializeMissingMetadataByField();
|
|
959
962
|
for (const item of items) {
|
|
960
963
|
for (const field of SUPPORTED_METADATA_REQUIRED_FIELDS) {
|
|
961
|
-
if (
|
|
962
|
-
|
|
964
|
+
if (isMetadataFieldMissing(item, field, statusRegistry, enforcePlanningFieldsOnTerminal)) {
|
|
965
|
+
missingByField[field].push(item.id);
|
|
963
966
|
}
|
|
964
|
-
missingByField[field].push(item.id);
|
|
965
967
|
}
|
|
966
968
|
}
|
|
969
|
+
return missingByField;
|
|
970
|
+
}
|
|
971
|
+
function buildMetadataWarningTokens(metadataPolicy, missingByField, duplicateWarnings) {
|
|
967
972
|
const warningTokens = [...metadataPolicy.warnings];
|
|
968
973
|
for (const field of metadataPolicy.required_fields) {
|
|
969
974
|
const missingItems = missingByField[field];
|
|
970
|
-
if (missingItems.length
|
|
971
|
-
|
|
975
|
+
if (missingItems.length > 0) {
|
|
976
|
+
warningTokens.push(`${METADATA_WARNING_TOKEN_BY_FIELD[field]}:${missingItems.length}`);
|
|
972
977
|
}
|
|
973
|
-
warningTokens.push(`${METADATA_WARNING_TOKEN_BY_FIELD[field]}:${missingItems.length}`);
|
|
974
978
|
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
979
|
+
warningTokens.push(...duplicateWarnings);
|
|
980
|
+
return warningTokens;
|
|
981
|
+
}
|
|
982
|
+
function buildMetadataCounts(metadataPolicy, missingByField) {
|
|
978
983
|
const counts = {};
|
|
979
984
|
for (const field of metadataPolicy.required_fields) {
|
|
980
|
-
const
|
|
985
|
+
const missing = missingByField[field];
|
|
986
|
+
const value = missing ? missing.length : 0;
|
|
981
987
|
const countKey = METADATA_COUNT_KEY_BY_FIELD[field];
|
|
982
988
|
if (value > 0 && countKey) {
|
|
983
989
|
counts[countKey] = value;
|
|
984
990
|
}
|
|
985
991
|
}
|
|
986
|
-
|
|
992
|
+
return counts;
|
|
993
|
+
}
|
|
994
|
+
function buildMissingFieldOccurrences(metadataPolicy, missingByField, itemsById) {
|
|
995
|
+
const occurrences = [];
|
|
987
996
|
for (const field of metadataPolicy.required_fields) {
|
|
988
|
-
|
|
997
|
+
const missing = missingByField[field];
|
|
998
|
+
if (!missing) {
|
|
999
|
+
continue;
|
|
1000
|
+
}
|
|
1001
|
+
for (const itemId of missing) {
|
|
989
1002
|
const itemType = itemsById.get(itemId)?.type;
|
|
990
|
-
|
|
1003
|
+
const normalizedItemType = typeof itemType === "string" && itemType.length > 0 ? itemType : "Unknown";
|
|
1004
|
+
occurrences.push({ item_type: normalizedItemType, field });
|
|
991
1005
|
}
|
|
992
1006
|
}
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
metadata_profile: metadataPolicy.profile,
|
|
997
|
-
metadata_profile_source: metadataPolicy.profile_source,
|
|
998
|
-
metadata_profile_fallback_to_core: metadataPolicy.fallback_to_core,
|
|
999
|
-
required_fields: [...metadataPolicy.required_fields],
|
|
1000
|
-
supported_required_fields: [...SUPPORTED_METADATA_REQUIRED_FIELDS],
|
|
1001
|
-
counts,
|
|
1002
|
-
missing_by_type: missingByType,
|
|
1003
|
-
duplicate_issue_codes_count: duplicateIssueCodes.length,
|
|
1004
|
-
duplicate_issue_codes: duplicateIssueCodeSummary.rows,
|
|
1005
|
-
duplicate_issue_codes_truncated: duplicateIssueCodeSummary.truncated
|
|
1006
|
-
};
|
|
1007
|
-
if (metadataPolicy.configured_custom_fields.length > 0) {
|
|
1008
|
-
details.configured_custom_required_fields = [...metadataPolicy.configured_custom_fields];
|
|
1009
|
-
}
|
|
1007
|
+
return occurrences;
|
|
1008
|
+
}
|
|
1009
|
+
function attachMissingMetadataItemIds(details, metadataPolicy, missingByField, verboseDiagnostics) {
|
|
1010
1010
|
for (const field of metadataPolicy.required_fields) {
|
|
1011
1011
|
const missing = missingByField[field];
|
|
1012
1012
|
if (!missing || missing.length === 0) {
|
|
@@ -1021,14 +1021,62 @@ function buildMetadataCheck(items, metadataPolicy, statusRegistry, verboseDiagno
|
|
|
1021
1021
|
details[idsKey] = summarized.values;
|
|
1022
1022
|
details[truncatedKey] = summarized.truncated;
|
|
1023
1023
|
}
|
|
1024
|
-
|
|
1024
|
+
}
|
|
1025
|
+
function buildCloseReasonBackfillRows(metadataPolicy, missingByField, itemsById) {
|
|
1026
|
+
if (!metadataPolicy.required_fields.includes("close_reason")) {
|
|
1027
|
+
return [];
|
|
1028
|
+
}
|
|
1029
|
+
const missing = missingByField.close_reason;
|
|
1030
|
+
if (!missing) {
|
|
1031
|
+
return [];
|
|
1032
|
+
}
|
|
1033
|
+
return missing.map((itemId) => ({
|
|
1025
1034
|
id: itemId,
|
|
1026
1035
|
resolution: toNonEmptyStringOrUndefined(itemsById.get(itemId)?.resolution)
|
|
1027
|
-
}))
|
|
1028
|
-
|
|
1036
|
+
}));
|
|
1037
|
+
}
|
|
1038
|
+
function buildEstimateBackfillRows(metadataPolicy, missingByField, itemsById) {
|
|
1039
|
+
if (!metadataPolicy.required_fields.includes("estimated_minutes")) {
|
|
1040
|
+
return [];
|
|
1041
|
+
}
|
|
1042
|
+
const missing = missingByField.estimated_minutes;
|
|
1043
|
+
if (!missing) {
|
|
1044
|
+
return [];
|
|
1045
|
+
}
|
|
1046
|
+
return missing.map((itemId) => ({
|
|
1029
1047
|
id: itemId,
|
|
1030
1048
|
type: toNonEmptyStringOrUndefined(itemsById.get(itemId)?.type)
|
|
1031
|
-
}))
|
|
1049
|
+
}));
|
|
1050
|
+
}
|
|
1051
|
+
function buildMetadataCheck(items, metadataPolicy, statusRegistry, verboseDiagnostics) {
|
|
1052
|
+
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
1053
|
+
const enforcePlanningFieldsOnTerminal = metadataPolicy.profile === "strict";
|
|
1054
|
+
const missingByField = collectMissingMetadataByField(items, statusRegistry, enforcePlanningFieldsOnTerminal);
|
|
1055
|
+
const duplicateIssueCodes = findDuplicateIssueCodes(items);
|
|
1056
|
+
const duplicateIssueCodeSummary = summarizeDuplicateIssueCodes(duplicateIssueCodes, verboseDiagnostics);
|
|
1057
|
+
const warningTokens = buildMetadataWarningTokens(metadataPolicy, missingByField, duplicateIssueCodeSummary.warnings);
|
|
1058
|
+
const counts = buildMetadataCounts(metadataPolicy, missingByField);
|
|
1059
|
+
const missingFieldOccurrences = buildMissingFieldOccurrences(metadataPolicy, missingByField, itemsById);
|
|
1060
|
+
const missingByType = buildMissingByTypeCounts(missingFieldOccurrences);
|
|
1061
|
+
const details = {
|
|
1062
|
+
checked_items: items.length,
|
|
1063
|
+
metadata_profile: metadataPolicy.profile,
|
|
1064
|
+
metadata_profile_source: metadataPolicy.profile_source,
|
|
1065
|
+
metadata_profile_fallback_to_core: metadataPolicy.fallback_to_core,
|
|
1066
|
+
required_fields: [...metadataPolicy.required_fields],
|
|
1067
|
+
supported_required_fields: [...SUPPORTED_METADATA_REQUIRED_FIELDS],
|
|
1068
|
+
counts,
|
|
1069
|
+
missing_by_type: missingByType,
|
|
1070
|
+
duplicate_issue_codes_count: duplicateIssueCodes.length,
|
|
1071
|
+
duplicate_issue_codes: duplicateIssueCodeSummary.rows,
|
|
1072
|
+
duplicate_issue_codes_truncated: duplicateIssueCodeSummary.truncated
|
|
1073
|
+
};
|
|
1074
|
+
if (metadataPolicy.configured_custom_fields.length > 0) {
|
|
1075
|
+
details.configured_custom_required_fields = [...metadataPolicy.configured_custom_fields];
|
|
1076
|
+
}
|
|
1077
|
+
attachMissingMetadataItemIds(details, metadataPolicy, missingByField, verboseDiagnostics);
|
|
1078
|
+
const closeReasonBackfillRows = buildCloseReasonBackfillRows(metadataPolicy, missingByField, itemsById);
|
|
1079
|
+
const estimateBackfillRows = buildEstimateBackfillRows(metadataPolicy, missingByField, itemsById);
|
|
1032
1080
|
return {
|
|
1033
1081
|
check: {
|
|
1034
1082
|
name: "metadata",
|
|
@@ -1269,6 +1317,24 @@ function sharedDirectoryPrefixLength(left, right) {
|
|
|
1269
1317
|
}
|
|
1270
1318
|
return count;
|
|
1271
1319
|
}
|
|
1320
|
+
function scoreOrphanOwnerCandidate(pathValue, linkedPath) {
|
|
1321
|
+
const linkedDir = directoryOf(linkedPath);
|
|
1322
|
+
const orphanDir = directoryOf(pathValue);
|
|
1323
|
+
const directoryPrefix = linkedPath.endsWith("/") ? linkedPath : `${linkedPath}/`;
|
|
1324
|
+
const isDirectoryPrefix = pathValue.startsWith(directoryPrefix);
|
|
1325
|
+
const sameDirectory = linkedDir.length > 0 && linkedDir === orphanDir;
|
|
1326
|
+
const sharedPrefixLength = sharedDirectoryPrefixLength(pathValue, linkedPath);
|
|
1327
|
+
if (!isDirectoryPrefix && !sameDirectory && sharedPrefixLength === 0) {
|
|
1328
|
+
return null;
|
|
1329
|
+
}
|
|
1330
|
+
if (isDirectoryPrefix) {
|
|
1331
|
+
return { score: linkedPath.length + 1e3, confidence: "path_prefix" };
|
|
1332
|
+
}
|
|
1333
|
+
return sameDirectory ? { score: sharedPrefixLength + 500, confidence: "same_directory" } : { score: sharedPrefixLength, confidence: "shared_directory" };
|
|
1334
|
+
}
|
|
1335
|
+
function shouldReplaceOrphanOwnerCandidate(best, item, score) {
|
|
1336
|
+
return best === void 0 || score > best.score || score === best.score && item.id.localeCompare(best.item.id) < 0;
|
|
1337
|
+
}
|
|
1272
1338
|
function findOrphanOwnerCandidate(pathValue, classification, items) {
|
|
1273
1339
|
const linkKind = classification === "docs_unowned" ? "docs" : "files";
|
|
1274
1340
|
let best;
|
|
@@ -1282,21 +1348,15 @@ function findOrphanOwnerCandidate(pathValue, classification, items) {
|
|
|
1282
1348
|
if (linkedPath.length === 0 || linkedPath === pathValue) {
|
|
1283
1349
|
continue;
|
|
1284
1350
|
}
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1287
|
-
const directoryPrefix = linkedPath.endsWith("/") ? linkedPath : `${linkedPath}/`;
|
|
1288
|
-
const isDirectoryPrefix = pathValue.startsWith(directoryPrefix);
|
|
1289
|
-
const sameDirectory = linkedDir.length > 0 && linkedDir === orphanDir;
|
|
1290
|
-
const sharedPrefixLength = sharedDirectoryPrefixLength(pathValue, linkedPath);
|
|
1291
|
-
if (!isDirectoryPrefix && !sameDirectory && sharedPrefixLength === 0) {
|
|
1351
|
+
const scored = scoreOrphanOwnerCandidate(pathValue, linkedPath);
|
|
1352
|
+
if (scored === null) {
|
|
1292
1353
|
continue;
|
|
1293
1354
|
}
|
|
1294
|
-
|
|
1295
|
-
if (best === void 0 || score > best.score || score === best.score && item.id.localeCompare(best.item.id) < 0) {
|
|
1355
|
+
if (shouldReplaceOrphanOwnerCandidate(best, item, scored.score)) {
|
|
1296
1356
|
best = {
|
|
1297
1357
|
item,
|
|
1298
|
-
score,
|
|
1299
|
-
confidence:
|
|
1358
|
+
score: scored.score,
|
|
1359
|
+
confidence: scored.confidence
|
|
1300
1360
|
};
|
|
1301
1361
|
}
|
|
1302
1362
|
}
|
|
@@ -1329,74 +1389,74 @@ function buildOrphanedPathRows(orphanedFiles, items) {
|
|
|
1329
1389
|
function summarizeOrphanedPathRows(rows) {
|
|
1330
1390
|
return rows.map((row) => `${row.path}:${row.classification} owner_candidate=${row.owner_candidate?.id ?? "unowned"} hint=${JSON.stringify(row.remediation_hint)}`);
|
|
1331
1391
|
}
|
|
1332
|
-
function
|
|
1392
|
+
function closureLikeFieldsForItem(item, lifecyclePatternPolicy) {
|
|
1393
|
+
return Object.entries(lifecyclePatternPolicy.closure_like_metadata_field_patterns).filter(([field, patterns]) => {
|
|
1394
|
+
const value = toMeaningfulString(item[field]);
|
|
1395
|
+
return value ? patterns.some((pattern) => value.toLowerCase().includes(pattern)) : false;
|
|
1396
|
+
}).map(([field]) => field).sort((left, right) => left.localeCompare(right));
|
|
1397
|
+
}
|
|
1398
|
+
function buildTerminalParentFixRow(item, parent, itemsById, canonicalIdByLowercase, statusRegistry) {
|
|
1399
|
+
const grandparentId = toMeaningfulString(parent.parent);
|
|
1400
|
+
const grandparent = grandparentId ? itemsById.get(canonicalIdByLowercase.get(grandparentId.toLowerCase()) ?? grandparentId) : void 0;
|
|
1401
|
+
return {
|
|
1402
|
+
id: item.id,
|
|
1403
|
+
parent_id: parent.id,
|
|
1404
|
+
grandparent_id: grandparent?.id,
|
|
1405
|
+
grandparent_active: grandparent !== void 0 && !isTerminalStatus(grandparent.status, statusRegistry)
|
|
1406
|
+
};
|
|
1407
|
+
}
|
|
1408
|
+
function staleBlockerReasonsForItem(item, blockedStatuses, statusRegistry, lifecyclePatternPolicy) {
|
|
1409
|
+
const blockedBy = toMeaningfulString(item.blocked_by);
|
|
1410
|
+
const blockedReason = toMeaningfulString(item.blocked_reason);
|
|
1411
|
+
const blockedReasonNormalized = blockedReason?.toLowerCase();
|
|
1412
|
+
const normalizedStatus = normalizeStatusForRegistry(item.status, statusRegistry);
|
|
1413
|
+
const reasons = [];
|
|
1414
|
+
if (!blockedStatuses.has(normalizedStatus)) {
|
|
1415
|
+
if (blockedBy) {
|
|
1416
|
+
reasons.push("non_blocked_status_has_blocked_by");
|
|
1417
|
+
}
|
|
1418
|
+
if (blockedReason) {
|
|
1419
|
+
reasons.push("non_blocked_status_has_blocked_reason");
|
|
1420
|
+
}
|
|
1421
|
+
return reasons;
|
|
1422
|
+
}
|
|
1423
|
+
if (!blockedBy && !blockedReason) {
|
|
1424
|
+
reasons.push("blocked_status_missing_blocker_context");
|
|
1425
|
+
}
|
|
1426
|
+
if (blockedReasonNormalized?.includes("no active blocker")) {
|
|
1427
|
+
reasons.push("blocked_status_reason_reports_no_active_blocker");
|
|
1428
|
+
}
|
|
1429
|
+
if (blockedReasonNormalized && lifecyclePatternPolicy.stale_blocker_reason_patterns.some((pattern) => blockedReasonNormalized.includes(pattern))) {
|
|
1430
|
+
reasons.push("blocked_status_reason_matches_stale_pattern");
|
|
1431
|
+
}
|
|
1432
|
+
return reasons;
|
|
1433
|
+
}
|
|
1434
|
+
function collectLifecycleScanRows(items, includeStaleBlockers, statusRegistry, lifecyclePatternPolicy) {
|
|
1333
1435
|
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
1436
|
+
const canonicalIdByLowercase = new Map(items.map((item) => [item.id.toLowerCase(), item.id]));
|
|
1334
1437
|
const blockedStatuses = statusRegistry.blocked_statuses.size > 0 ? statusRegistry.blocked_statuses : /* @__PURE__ */ new Set(["blocked"]);
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
return false;
|
|
1345
|
-
}
|
|
1346
|
-
const normalized = value.toLowerCase();
|
|
1347
|
-
return patterns.some((pattern) => normalized.includes(pattern));
|
|
1348
|
-
}).map(([field]) => field).sort((left, right) => left.localeCompare(right));
|
|
1438
|
+
const rows = {
|
|
1439
|
+
activeItems: items.filter((item) => !isTerminalStatus(item.status, statusRegistry)),
|
|
1440
|
+
closureLikeRows: [],
|
|
1441
|
+
terminalParentRows: [],
|
|
1442
|
+
terminalParentFixRows: [],
|
|
1443
|
+
staleBlockerRows: []
|
|
1444
|
+
};
|
|
1445
|
+
for (const item of rows.activeItems) {
|
|
1446
|
+
const closureLikeFields = closureLikeFieldsForItem(item, lifecyclePatternPolicy);
|
|
1349
1447
|
if (closureLikeFields.length > 0) {
|
|
1350
|
-
closureLikeRows.push({
|
|
1351
|
-
id: item.id,
|
|
1352
|
-
fields: closureLikeFields
|
|
1353
|
-
});
|
|
1448
|
+
rows.closureLikeRows.push({ id: item.id, fields: closureLikeFields });
|
|
1354
1449
|
}
|
|
1355
1450
|
const parentId = toMeaningfulString(item.parent);
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
id: item.id,
|
|
1361
|
-
parent_id: parent.id,
|
|
1362
|
-
parent_status: parent.status
|
|
1363
|
-
});
|
|
1364
|
-
const grandparentId = toMeaningfulString(parent.parent);
|
|
1365
|
-
const grandparent = grandparentId ? itemsById.get(grandparentId) : void 0;
|
|
1366
|
-
terminalParentFixRows.push({
|
|
1367
|
-
id: item.id,
|
|
1368
|
-
parent_id: parent.id,
|
|
1369
|
-
grandparent_id: grandparent?.id,
|
|
1370
|
-
grandparent_active: grandparent !== void 0 && !isTerminalStatus(grandparent.status, statusRegistry)
|
|
1371
|
-
});
|
|
1372
|
-
}
|
|
1451
|
+
const parent = parentId ? itemsById.get(canonicalIdByLowercase.get(parentId.toLowerCase()) ?? parentId) : void 0;
|
|
1452
|
+
if (parent && isTerminalStatus(parent.status, statusRegistry)) {
|
|
1453
|
+
rows.terminalParentRows.push({ id: item.id, parent_id: parent.id, parent_status: parent.status });
|
|
1454
|
+
rows.terminalParentFixRows.push(buildTerminalParentFixRow(item, parent, itemsById, canonicalIdByLowercase, statusRegistry));
|
|
1373
1455
|
}
|
|
1374
1456
|
if (includeStaleBlockers) {
|
|
1375
|
-
const
|
|
1376
|
-
const blockedReason = toMeaningfulString(item.blocked_reason);
|
|
1377
|
-
const blockedReasonNormalized = blockedReason?.toLowerCase();
|
|
1378
|
-
const reasons = [];
|
|
1379
|
-
const normalizedStatus = normalizeStatusForRegistry(item.status, statusRegistry);
|
|
1380
|
-
if (!blockedStatuses.has(normalizedStatus)) {
|
|
1381
|
-
if (blockedBy) {
|
|
1382
|
-
reasons.push("non_blocked_status_has_blocked_by");
|
|
1383
|
-
}
|
|
1384
|
-
if (blockedReason) {
|
|
1385
|
-
reasons.push("non_blocked_status_has_blocked_reason");
|
|
1386
|
-
}
|
|
1387
|
-
} else {
|
|
1388
|
-
if (!blockedBy && !blockedReason) {
|
|
1389
|
-
reasons.push("blocked_status_missing_blocker_context");
|
|
1390
|
-
}
|
|
1391
|
-
if (blockedReasonNormalized?.includes("no active blocker")) {
|
|
1392
|
-
reasons.push("blocked_status_reason_reports_no_active_blocker");
|
|
1393
|
-
}
|
|
1394
|
-
if (blockedReasonNormalized && lifecyclePatternPolicy.stale_blocker_reason_patterns.some((pattern) => blockedReasonNormalized.includes(pattern))) {
|
|
1395
|
-
reasons.push("blocked_status_reason_matches_stale_pattern");
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1457
|
+
const reasons = staleBlockerReasonsForItem(item, blockedStatuses, statusRegistry, lifecyclePatternPolicy);
|
|
1398
1458
|
if (reasons.length > 0) {
|
|
1399
|
-
staleBlockerRows.push({
|
|
1459
|
+
rows.staleBlockerRows.push({
|
|
1400
1460
|
id: item.id,
|
|
1401
1461
|
status: item.status,
|
|
1402
1462
|
reasons: [...new Set(reasons)].sort((left, right) => left.localeCompare(right))
|
|
@@ -1404,32 +1464,124 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
1404
1464
|
}
|
|
1405
1465
|
}
|
|
1406
1466
|
}
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1467
|
+
return rows;
|
|
1468
|
+
}
|
|
1469
|
+
function sortLifecycleScanRows(rows) {
|
|
1470
|
+
rows.closureLikeRows.sort((left, right) => left.id.localeCompare(right.id));
|
|
1471
|
+
rows.terminalParentRows.sort((left, right) => left.id.localeCompare(right.id) || left.parent_id.localeCompare(right.parent_id));
|
|
1472
|
+
rows.terminalParentFixRows.sort((left, right) => left.id.localeCompare(right.id) || left.parent_id.localeCompare(right.parent_id));
|
|
1473
|
+
rows.staleBlockerRows.sort((left, right) => left.id.localeCompare(right.id));
|
|
1474
|
+
}
|
|
1475
|
+
function lifecycleCycleWarningToken(prefix, severity, count) {
|
|
1476
|
+
if (count <= 0 || severity === "off") {
|
|
1477
|
+
return null;
|
|
1478
|
+
}
|
|
1479
|
+
return `${severity === "error" ? `${prefix}_error` : prefix}:${count}`;
|
|
1480
|
+
}
|
|
1481
|
+
function buildLifecycleWarnings(rows, includeStaleBlockers, dependencyCycleSeverity, parentCycleSeverity, dependencyCycleCount, parentCycleCount) {
|
|
1413
1482
|
const warnings = [];
|
|
1414
|
-
if (closureLikeRows.length > 0) {
|
|
1415
|
-
warnings.push(`validate_lifecycle_active_closure_like_metadata:${closureLikeRows.length}`);
|
|
1483
|
+
if (rows.closureLikeRows.length > 0) {
|
|
1484
|
+
warnings.push(`validate_lifecycle_active_closure_like_metadata:${rows.closureLikeRows.length}`);
|
|
1416
1485
|
}
|
|
1417
|
-
if (terminalParentRows.length > 0) {
|
|
1418
|
-
warnings.push(`validate_lifecycle_active_terminal_parent:${terminalParentRows.length}`);
|
|
1486
|
+
if (rows.terminalParentRows.length > 0) {
|
|
1487
|
+
warnings.push(`validate_lifecycle_active_terminal_parent:${rows.terminalParentRows.length}`);
|
|
1419
1488
|
}
|
|
1420
|
-
if (includeStaleBlockers && staleBlockerRows.length > 0) {
|
|
1421
|
-
warnings.push(`validate_lifecycle_stale_blockers:${staleBlockerRows.length}`);
|
|
1489
|
+
if (includeStaleBlockers && rows.staleBlockerRows.length > 0) {
|
|
1490
|
+
warnings.push(`validate_lifecycle_stale_blockers:${rows.staleBlockerRows.length}`);
|
|
1422
1491
|
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1492
|
+
const dependencyWarning = lifecycleCycleWarningToken("validate_lifecycle_dependency_cycles", dependencyCycleSeverity, dependencyCycleCount);
|
|
1493
|
+
const parentWarning = lifecycleCycleWarningToken("validate_hierarchy_parent_cycle", parentCycleSeverity, parentCycleCount);
|
|
1494
|
+
return [...warnings, ...dependencyWarning ? [dependencyWarning] : [], ...parentWarning ? [parentWarning] : []];
|
|
1495
|
+
}
|
|
1496
|
+
function linkedArtifactPathExceedsFilesystemLimits(artifactPath) {
|
|
1497
|
+
const normalized = normalizeRelativePath(artifactPath);
|
|
1498
|
+
return normalized.length > LINKED_ARTIFACT_MAX_PATH_LENGTH || normalized.split(/[\\/]/).some((segment) => segment.length > LINKED_ARTIFACT_MAX_SEGMENT_LENGTH);
|
|
1499
|
+
}
|
|
1500
|
+
async function linkedArtifactIsMissing(workspaceRoot, artifactPath) {
|
|
1501
|
+
const absolutePath = path.isAbsolute(artifactPath) ? artifactPath : path.resolve(workspaceRoot, artifactPath);
|
|
1502
|
+
if (linkedArtifactPathExceedsFilesystemLimits(absolutePath)) {
|
|
1503
|
+
return false;
|
|
1504
|
+
}
|
|
1505
|
+
try {
|
|
1506
|
+
const stats = await fs.stat(absolutePath);
|
|
1507
|
+
return !stats.isFile() && !stats.isDirectory();
|
|
1508
|
+
} catch (error) {
|
|
1509
|
+
const code = typeof error === "object" && error !== null && "code" in error ? error.code : void 0;
|
|
1510
|
+
return code === "ENOENT" || code === "ENOTDIR";
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
async function collectLinkedPathScanState(items, workspaceRoot) {
|
|
1514
|
+
const state = {
|
|
1515
|
+
linkedProjectPaths: /* @__PURE__ */ new Set(),
|
|
1516
|
+
remoteLinkedPaths: /* @__PURE__ */ new Set(),
|
|
1517
|
+
missingLinkedPaths: [],
|
|
1518
|
+
staleLinkRows: []
|
|
1519
|
+
};
|
|
1520
|
+
for (const item of items) {
|
|
1521
|
+
const linkedArtifactGroups = [
|
|
1522
|
+
{ link_kind: "files", artifacts: item.files ?? [] },
|
|
1523
|
+
{ link_kind: "docs", artifacts: item.docs ?? [] }
|
|
1524
|
+
];
|
|
1525
|
+
for (const group of linkedArtifactGroups) {
|
|
1526
|
+
for (const artifact of group.artifacts) {
|
|
1527
|
+
if (artifact.scope !== "project") {
|
|
1528
|
+
continue;
|
|
1529
|
+
}
|
|
1530
|
+
if (isRemoteLinkedArtifactReference(artifact.path)) {
|
|
1531
|
+
state.remoteLinkedPaths.add(artifact.path.trim());
|
|
1532
|
+
continue;
|
|
1533
|
+
}
|
|
1534
|
+
const normalizedPath = normalizeRelativePath(artifact.path);
|
|
1535
|
+
if (normalizedPath.length === 0) {
|
|
1536
|
+
continue;
|
|
1537
|
+
}
|
|
1538
|
+
state.linkedProjectPaths.add(normalizedPath);
|
|
1539
|
+
if (await linkedArtifactIsMissing(workspaceRoot, artifact.path)) {
|
|
1540
|
+
state.missingLinkedPaths.push(normalizedPath);
|
|
1541
|
+
state.staleLinkRows.push({ item_id: item.id, path: normalizedPath, link_kind: group.link_kind });
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1425
1545
|
}
|
|
1426
|
-
|
|
1427
|
-
|
|
1546
|
+
return state;
|
|
1547
|
+
}
|
|
1548
|
+
function partitionFileCandidates(fileCandidates, pmRoot, workspaceRoot, fileScanMode, includePmInternals, verboseFileLists) {
|
|
1549
|
+
const strictTrackedAllMode = fileScanMode === "tracked-all-strict";
|
|
1550
|
+
const strictModeForcesPmInternals = strictTrackedAllMode && !includePmInternals;
|
|
1551
|
+
const includePmInternalsEffective = includePmInternals || strictTrackedAllMode;
|
|
1552
|
+
const pmInternalCandidatePrefixes = includePmInternalsEffective ? [] : resolvePmInternalCandidatePrefixes(pmRoot, workspaceRoot);
|
|
1553
|
+
const excludedPmInternalPaths = pmInternalCandidatePrefixes.length === 0 ? [] : fileCandidates.candidateFiles.filter((candidate) => hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1554
|
+
const candidateFiles = pmInternalCandidatePrefixes.length === 0 ? fileCandidates.candidateFiles : fileCandidates.candidateFiles.filter((candidate) => !hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1555
|
+
const excludedByReason = {};
|
|
1556
|
+
if (excludedPmInternalPaths.length > 0) {
|
|
1557
|
+
const summarizedPmInternalPaths = summarizeFileList(excludedPmInternalPaths, verboseFileLists);
|
|
1558
|
+
excludedByReason.pm_internals = {
|
|
1559
|
+
count: excludedPmInternalPaths.length,
|
|
1560
|
+
paths: summarizedPmInternalPaths.values,
|
|
1561
|
+
paths_truncated: summarizedPmInternalPaths.truncated,
|
|
1562
|
+
paths_total: summarizedPmInternalPaths.total
|
|
1563
|
+
};
|
|
1428
1564
|
}
|
|
1565
|
+
return {
|
|
1566
|
+
strictTrackedAllMode,
|
|
1567
|
+
strictModeForcesPmInternals,
|
|
1568
|
+
includePmInternalsEffective,
|
|
1569
|
+
pmInternalCandidatePrefixes,
|
|
1570
|
+
excludedPmInternalPaths,
|
|
1571
|
+
candidateFiles,
|
|
1572
|
+
excludedByReason
|
|
1573
|
+
};
|
|
1574
|
+
}
|
|
1575
|
+
function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverity, parentCycleSeverity, statusRegistry, lifecyclePatternPolicy, verboseDiagnostics, idPrefix = "pm") {
|
|
1576
|
+
const rows = collectLifecycleScanRows(items, includeStaleBlockers, statusRegistry, lifecyclePatternPolicy);
|
|
1577
|
+
sortLifecycleScanRows(rows);
|
|
1578
|
+
const dependencyCycleDiagnostics = detectLifecycleDependencyCycles(rows.activeItems, idPrefix);
|
|
1579
|
+
const parentCycleDiagnostics = detectLifecycleParentCycles(items);
|
|
1580
|
+
const warnings = buildLifecycleWarnings(rows, includeStaleBlockers, dependencyCycleSeverity, parentCycleSeverity, dependencyCycleDiagnostics.cycle_count, parentCycleDiagnostics.cycle_count);
|
|
1429
1581
|
const diagnosticLimit = verboseDiagnostics ? Number.POSITIVE_INFINITY : DIAGNOSTIC_LIST_SUMMARY_LIMIT;
|
|
1430
|
-
const summarizedClosureLikeRows = summarizeList(closureLikeRows.map((row) => `${row.id}:${row.fields.join(",")}`), diagnosticLimit);
|
|
1431
|
-
const summarizedTerminalParentRows = summarizeList(terminalParentRows.map((row) => `${row.id}:${row.parent_id}:${row.parent_status}`), diagnosticLimit);
|
|
1432
|
-
const summarizedStaleBlockerRows = summarizeList(staleBlockerRows.map((row) => `${row.id}:${row.status}:${row.reasons.join(",")}`), diagnosticLimit);
|
|
1582
|
+
const summarizedClosureLikeRows = summarizeList(rows.closureLikeRows.map((row) => `${row.id}:${row.fields.join(",")}`), diagnosticLimit);
|
|
1583
|
+
const summarizedTerminalParentRows = summarizeList(rows.terminalParentRows.map((row) => `${row.id}:${row.parent_id}:${row.parent_status}`), diagnosticLimit);
|
|
1584
|
+
const summarizedStaleBlockerRows = summarizeList(rows.staleBlockerRows.map((row) => `${row.id}:${row.status}:${row.reasons.join(",")}`), diagnosticLimit);
|
|
1433
1585
|
const summarizedDependencyCycleItemIds = summarizeList(dependencyCycleDiagnostics.cycle_item_ids, diagnosticLimit);
|
|
1434
1586
|
const summarizedDependencyCycleSamplePaths = summarizeList(dependencyCycleDiagnostics.cycle_sample_paths, diagnosticLimit);
|
|
1435
1587
|
const summarizedParentCycleItemIds = summarizeList(parentCycleDiagnostics.cycle_item_ids, diagnosticLimit);
|
|
@@ -1440,15 +1592,15 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
1440
1592
|
name: "lifecycle",
|
|
1441
1593
|
status: hasErrorSeverityCycle ? "error" : warnings.length === 0 ? "ok" : "warn",
|
|
1442
1594
|
details: {
|
|
1443
|
-
checked_active_items: activeItems.length,
|
|
1444
|
-
active_closure_like_metadata_items: closureLikeRows.length,
|
|
1595
|
+
checked_active_items: rows.activeItems.length,
|
|
1596
|
+
active_closure_like_metadata_items: rows.closureLikeRows.length,
|
|
1445
1597
|
active_closure_like_metadata_rows: summarizedClosureLikeRows.values,
|
|
1446
1598
|
active_closure_like_metadata_rows_truncated: summarizedClosureLikeRows.truncated,
|
|
1447
|
-
active_terminal_parent_items: terminalParentRows.length,
|
|
1599
|
+
active_terminal_parent_items: rows.terminalParentRows.length,
|
|
1448
1600
|
active_terminal_parent_rows: summarizedTerminalParentRows.values,
|
|
1449
1601
|
active_terminal_parent_rows_truncated: summarizedTerminalParentRows.truncated,
|
|
1450
1602
|
stale_blocker_checks_enabled: includeStaleBlockers,
|
|
1451
|
-
stale_blocker_items: staleBlockerRows.length,
|
|
1603
|
+
stale_blocker_items: rows.staleBlockerRows.length,
|
|
1452
1604
|
stale_blocker_rows: summarizedStaleBlockerRows.values,
|
|
1453
1605
|
stale_blocker_rows_truncated: summarizedStaleBlockerRows.truncated,
|
|
1454
1606
|
dependency_cycle_severity_policy: dependencyCycleSeverity,
|
|
@@ -1478,81 +1630,26 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
1478
1630
|
}
|
|
1479
1631
|
},
|
|
1480
1632
|
warnings,
|
|
1481
|
-
terminalParentFixRows
|
|
1633
|
+
terminalParentFixRows: rows.terminalParentFixRows
|
|
1482
1634
|
};
|
|
1483
1635
|
}
|
|
1484
1636
|
async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, includePmInternals, verboseFileLists) {
|
|
1485
|
-
const
|
|
1486
|
-
const remoteLinkedPaths = /* @__PURE__ */ new Set();
|
|
1487
|
-
const missingLinkedPaths = [];
|
|
1488
|
-
const staleLinkRows = [];
|
|
1637
|
+
const linkedPathState = await collectLinkedPathScanState(items, workspaceRoot);
|
|
1489
1638
|
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
1490
|
-
|
|
1491
|
-
const linkedArtifactGroups = [
|
|
1492
|
-
{ link_kind: "files", artifacts: item.files ?? [] },
|
|
1493
|
-
{ link_kind: "docs", artifacts: item.docs ?? [] }
|
|
1494
|
-
];
|
|
1495
|
-
for (const group of linkedArtifactGroups) {
|
|
1496
|
-
for (const artifact of group.artifacts) {
|
|
1497
|
-
if (artifact.scope !== "project") {
|
|
1498
|
-
continue;
|
|
1499
|
-
}
|
|
1500
|
-
if (isRemoteLinkedArtifactReference(artifact.path)) {
|
|
1501
|
-
remoteLinkedPaths.add(artifact.path.trim());
|
|
1502
|
-
continue;
|
|
1503
|
-
}
|
|
1504
|
-
const normalizedPath = normalizeRelativePath(artifact.path);
|
|
1505
|
-
if (normalizedPath.length === 0) {
|
|
1506
|
-
continue;
|
|
1507
|
-
}
|
|
1508
|
-
linkedProjectPaths.add(normalizedPath);
|
|
1509
|
-
const absolutePath = path.isAbsolute(artifact.path) ? artifact.path : path.resolve(workspaceRoot, artifact.path);
|
|
1510
|
-
let missing = false;
|
|
1511
|
-
try {
|
|
1512
|
-
const stats = await fs.stat(absolutePath);
|
|
1513
|
-
if (!stats.isFile() && !stats.isDirectory()) {
|
|
1514
|
-
missing = true;
|
|
1515
|
-
}
|
|
1516
|
-
} catch {
|
|
1517
|
-
missing = true;
|
|
1518
|
-
}
|
|
1519
|
-
if (missing) {
|
|
1520
|
-
missingLinkedPaths.push(normalizedPath);
|
|
1521
|
-
staleLinkRows.push({ item_id: item.id, path: normalizedPath, link_kind: group.link_kind });
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
}
|
|
1525
|
-
}
|
|
1526
|
-
const uniqueMissingLinkedPaths = [...new Set(missingLinkedPaths)].sort((left, right) => left.localeCompare(right));
|
|
1639
|
+
const uniqueMissingLinkedPaths = [...new Set(linkedPathState.missingLinkedPaths)].sort((left, right) => left.localeCompare(right));
|
|
1527
1640
|
const fileCandidates = await collectProjectFileCandidates(workspaceRoot, fileScanMode);
|
|
1528
|
-
const
|
|
1529
|
-
const
|
|
1530
|
-
const includePmInternalsEffective = includePmInternals || strictTrackedAllMode;
|
|
1531
|
-
const pmInternalCandidatePrefixes = includePmInternalsEffective ? [] : resolvePmInternalCandidatePrefixes(pmRoot, workspaceRoot);
|
|
1532
|
-
const excludedPmInternalPaths = pmInternalCandidatePrefixes.length === 0 ? [] : fileCandidates.candidateFiles.filter((candidate) => hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1533
|
-
const candidateFiles = pmInternalCandidatePrefixes.length === 0 ? fileCandidates.candidateFiles : fileCandidates.candidateFiles.filter((candidate) => !hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1534
|
-
const excludedPmInternalCount = excludedPmInternalPaths.length;
|
|
1535
|
-
const excludedByReason = {};
|
|
1536
|
-
if (excludedPmInternalCount > 0) {
|
|
1537
|
-
const summarizedPmInternalPaths = summarizeFileList(excludedPmInternalPaths, verboseFileLists);
|
|
1538
|
-
excludedByReason.pm_internals = {
|
|
1539
|
-
count: excludedPmInternalCount,
|
|
1540
|
-
paths: summarizedPmInternalPaths.values,
|
|
1541
|
-
paths_truncated: summarizedPmInternalPaths.truncated,
|
|
1542
|
-
paths_total: summarizedPmInternalPaths.total
|
|
1543
|
-
};
|
|
1544
|
-
}
|
|
1545
|
-
const orphanedFiles = candidateFiles.filter((candidate) => !linkedProjectPaths.has(candidate));
|
|
1641
|
+
const partition = partitionFileCandidates(fileCandidates, pmRoot, workspaceRoot, fileScanMode, includePmInternals, verboseFileLists);
|
|
1642
|
+
const orphanedFiles = partition.candidateFiles.filter((candidate) => !linkedPathState.linkedProjectPaths.has(candidate));
|
|
1546
1643
|
const orphanedPathRows = buildOrphanedPathRows(orphanedFiles, items);
|
|
1547
|
-
const classifiedStalePaths = classifyStaleLinkedPaths(uniqueMissingLinkedPaths, candidateFiles);
|
|
1644
|
+
const classifiedStalePaths = classifyStaleLinkedPaths(uniqueMissingLinkedPaths, partition.candidateFiles);
|
|
1548
1645
|
const classificationByPath = new Map(classifiedStalePaths.map((entry) => [entry.path, entry.classification]));
|
|
1549
1646
|
const movedStalePathCount = classifiedStalePaths.filter((entry) => entry.classification === "moved").length;
|
|
1550
|
-
const staleLinkPruneRows = staleLinkRows.map((row) => ({
|
|
1647
|
+
const staleLinkPruneRows = linkedPathState.staleLinkRows.map((row) => ({
|
|
1551
1648
|
...row,
|
|
1552
1649
|
classification: classificationByPath.get(row.path) ?? "deleted"
|
|
1553
1650
|
})).sort((left, right) => left.item_id.localeCompare(right.item_id) || left.path.localeCompare(right.path) || left.link_kind.localeCompare(right.link_kind));
|
|
1554
1651
|
const warnings = [];
|
|
1555
|
-
if (strictModeForcesPmInternals) {
|
|
1652
|
+
if (partition.strictModeForcesPmInternals) {
|
|
1556
1653
|
warnings.push("validate_files_tracked_all_strict_forces_pm_internals");
|
|
1557
1654
|
}
|
|
1558
1655
|
if (uniqueMissingLinkedPaths.length > 0) {
|
|
@@ -1561,7 +1658,7 @@ async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, inclu
|
|
|
1561
1658
|
if (orphanedFiles.length > 0) {
|
|
1562
1659
|
warnings.push(`validate_files_orphaned_paths:${orphanedFiles.length}`);
|
|
1563
1660
|
}
|
|
1564
|
-
const uniqueRemoteLinkedPaths = [...remoteLinkedPaths].sort((left, right) => left.localeCompare(right));
|
|
1661
|
+
const uniqueRemoteLinkedPaths = [...linkedPathState.remoteLinkedPaths].sort((left, right) => left.localeCompare(right));
|
|
1565
1662
|
const summarizedRemote = summarizeFileList(uniqueRemoteLinkedPaths, verboseFileLists);
|
|
1566
1663
|
const summarizedMissing = summarizeFileList(uniqueMissingLinkedPaths, verboseFileLists);
|
|
1567
1664
|
const summarizedOrphaned = summarizeFileList(orphanedFiles, verboseFileLists);
|
|
@@ -1587,28 +1684,28 @@ async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, inclu
|
|
|
1587
1684
|
workspace_root: workspaceRoot,
|
|
1588
1685
|
scan_mode_requested: fileCandidates.requestedMode,
|
|
1589
1686
|
scan_mode_applied: fileCandidates.appliedMode,
|
|
1590
|
-
strict_tracked_all_mode: strictTrackedAllMode,
|
|
1591
|
-
strict_mode_forces_pm_internals: strictModeForcesPmInternals,
|
|
1592
|
-
strict_mode_forces_pm_internals_notice: strictModeForcesPmInternals ? "tracked-all-strict force-enables PM internals; pass --include-pm-internals to make inclusion explicit." : null,
|
|
1687
|
+
strict_tracked_all_mode: partition.strictTrackedAllMode,
|
|
1688
|
+
strict_mode_forces_pm_internals: partition.strictModeForcesPmInternals,
|
|
1689
|
+
strict_mode_forces_pm_internals_notice: partition.strictModeForcesPmInternals ? "tracked-all-strict force-enables PM internals; pass --include-pm-internals to make inclusion explicit." : null,
|
|
1593
1690
|
file_list_detail_mode: verboseFileLists ? "full" : "summary",
|
|
1594
1691
|
file_list_summary_limit: FILE_LIST_SUMMARY_LIMIT,
|
|
1595
1692
|
candidate_scan_source: fileCandidates.source,
|
|
1596
|
-
include_pm_internals: includePmInternalsEffective,
|
|
1693
|
+
include_pm_internals: partition.includePmInternalsEffective,
|
|
1597
1694
|
include_pm_internals_requested: includePmInternals,
|
|
1598
|
-
pm_internal_candidate_prefixes: pmInternalCandidatePrefixes,
|
|
1599
|
-
pm_internal_excluded_count:
|
|
1600
|
-
excluded_total:
|
|
1601
|
-
excluded_by_reason: excludedByReason,
|
|
1602
|
-
linked_project_paths: linkedProjectPaths.size,
|
|
1695
|
+
pm_internal_candidate_prefixes: partition.pmInternalCandidatePrefixes,
|
|
1696
|
+
pm_internal_excluded_count: partition.excludedPmInternalPaths.length,
|
|
1697
|
+
excluded_total: partition.excludedPmInternalPaths.length,
|
|
1698
|
+
excluded_by_reason: partition.excludedByReason,
|
|
1699
|
+
linked_project_paths: linkedPathState.linkedProjectPaths.size,
|
|
1603
1700
|
remote_linked_paths_count: uniqueRemoteLinkedPaths.length,
|
|
1604
1701
|
remote_linked_paths_total: summarizedRemote.total,
|
|
1605
1702
|
remote_linked_paths: summarizedRemote.values,
|
|
1606
1703
|
remote_linked_paths_truncated: summarizedRemote.truncated,
|
|
1607
1704
|
candidate_total_raw: fileCandidates.candidateTotal,
|
|
1608
1705
|
candidate_scanned_raw: fileCandidates.candidateScanned,
|
|
1609
|
-
candidate_total: candidateFiles.length,
|
|
1610
|
-
candidate_scanned: candidateFiles.length,
|
|
1611
|
-
scanned_candidate_files: candidateFiles.length,
|
|
1706
|
+
candidate_total: partition.candidateFiles.length,
|
|
1707
|
+
candidate_scanned: partition.candidateFiles.length,
|
|
1708
|
+
scanned_candidate_files: partition.candidateFiles.length,
|
|
1612
1709
|
missing_linked_paths_count: uniqueMissingLinkedPaths.length,
|
|
1613
1710
|
missing_linked_paths_total: summarizedMissing.total,
|
|
1614
1711
|
missing_linked_paths: summarizedMissing.values,
|
|
@@ -1768,7 +1865,7 @@ async function applyValidateFix(fix, global2) {
|
|
|
1768
1865
|
case "set_estimate":
|
|
1769
1866
|
case "reparent":
|
|
1770
1867
|
case "unset_parent": {
|
|
1771
|
-
const { runUpdate } = await import("./update-
|
|
1868
|
+
const { runUpdate } = await import("./update-A7EICML6.js");
|
|
1772
1869
|
const updateOptions = { message: VALIDATE_AUTO_FIX_MESSAGE };
|
|
1773
1870
|
if (fix.kind === "set_resolution") {
|
|
1774
1871
|
updateOptions.resolution = fix.value;
|
|
@@ -1828,10 +1925,10 @@ async function applyValidateFixes(applicable, global2) {
|
|
|
1828
1925
|
const remove = batch.map((fix) => fix.path).filter((value) => typeof value === "string" && value.length > 0);
|
|
1829
1926
|
try {
|
|
1830
1927
|
if (first.kind === "prune_file_link") {
|
|
1831
|
-
const { runFiles } = await import("./files-
|
|
1928
|
+
const { runFiles } = await import("./files-FUYPSOFJ.js");
|
|
1832
1929
|
await runFiles(first.item_id, { remove, message: VALIDATE_AUTO_FIX_MESSAGE }, global2);
|
|
1833
1930
|
} else {
|
|
1834
|
-
const { runDocs } = await import("./docs-
|
|
1931
|
+
const { runDocs } = await import("./docs-Z3X6JZLT.js");
|
|
1835
1932
|
await runDocs(first.item_id, { remove, message: VALIDATE_AUTO_FIX_MESSAGE }, global2);
|
|
1836
1933
|
}
|
|
1837
1934
|
applied.push(...batch);
|
|
@@ -1846,10 +1943,14 @@ var _testOnlyValidateCommand = {
|
|
|
1846
1943
|
applyValidateFixes,
|
|
1847
1944
|
attachValidateFixHints,
|
|
1848
1945
|
buildCommandReferencesCheck,
|
|
1946
|
+
buildCloseReasonBackfillRows,
|
|
1849
1947
|
buildFilesCheck,
|
|
1850
1948
|
buildLifecycleCheck,
|
|
1851
1949
|
buildLifecycleDependencyGraph,
|
|
1852
1950
|
buildLifecycleParentGraph,
|
|
1951
|
+
buildEstimateBackfillRows,
|
|
1952
|
+
buildMetadataCounts,
|
|
1953
|
+
buildMissingFieldOccurrences,
|
|
1853
1954
|
buildOrphanedPathRows,
|
|
1854
1955
|
classifyOrphanedPath,
|
|
1855
1956
|
collectDefaultProjectFileCandidates,
|
|
@@ -1860,6 +1961,7 @@ var _testOnlyValidateCommand = {
|
|
|
1860
1961
|
extractItemIds,
|
|
1861
1962
|
findLifecycleDependencyCycleComponents,
|
|
1862
1963
|
isMetadataFieldMissing,
|
|
1964
|
+
linkedArtifactPathExceedsFilesystemLimits,
|
|
1863
1965
|
listFilesRecursive,
|
|
1864
1966
|
resolveDependencyCycleSeverity,
|
|
1865
1967
|
resolveParentCycleSeverity,
|
|
@@ -1873,6 +1975,105 @@ var _testOnlyValidateCommand = {
|
|
|
1873
1975
|
summarizeDuplicateIssueCodes,
|
|
1874
1976
|
toMeaningfulString
|
|
1875
1977
|
};
|
|
1978
|
+
function recordValidateCheck(state, built, fixHintsEnabled) {
|
|
1979
|
+
if (fixHintsEnabled) {
|
|
1980
|
+
attachValidateFixHints(built.check, built.warnings);
|
|
1981
|
+
}
|
|
1982
|
+
state.checks.push(built.check);
|
|
1983
|
+
state.warnings.push(...built.warnings);
|
|
1984
|
+
}
|
|
1985
|
+
async function executeRequestedValidateChecks(params) {
|
|
1986
|
+
const state = {
|
|
1987
|
+
checks: [],
|
|
1988
|
+
warnings: [...params.initialWarnings],
|
|
1989
|
+
closeReasonBackfillRows: [],
|
|
1990
|
+
estimateBackfillRows: [],
|
|
1991
|
+
resolutionBackfillRows: [],
|
|
1992
|
+
terminalParentFixRows: [],
|
|
1993
|
+
staleLinkPruneRows: []
|
|
1994
|
+
};
|
|
1995
|
+
const fixHintsEnabled = params.options.fixHints === true;
|
|
1996
|
+
const fullDiagnostics = params.options.verboseDiagnostics === true || params.options.allAffectedIds === true || params.global.json === true;
|
|
1997
|
+
if (params.requestedChecks.has("metadata")) {
|
|
1998
|
+
const built = buildMetadataCheck(params.items, params.metadataPolicy, params.statusRegistry, fullDiagnostics);
|
|
1999
|
+
state.closeReasonBackfillRows = built.closeReasonBackfillRows;
|
|
2000
|
+
state.estimateBackfillRows = built.estimateBackfillRows;
|
|
2001
|
+
recordValidateCheck(state, built, fixHintsEnabled);
|
|
2002
|
+
}
|
|
2003
|
+
if (params.requestedChecks.has("resolution")) {
|
|
2004
|
+
const built = buildResolutionCheck(params.items, params.statusRegistry, fullDiagnostics);
|
|
2005
|
+
state.resolutionBackfillRows = built.resolutionBackfillRows;
|
|
2006
|
+
recordValidateCheck(state, built, fixHintsEnabled);
|
|
2007
|
+
}
|
|
2008
|
+
if (params.requestedChecks.has("lifecycle")) {
|
|
2009
|
+
const built = buildLifecycleCheck(params.items, Boolean(params.options.checkStaleBlockers), params.dependencyCycleSeverity, params.parentCycleSeverity, params.statusRegistry, params.lifecyclePatternPolicy, fullDiagnostics, params.settings.id_prefix);
|
|
2010
|
+
state.terminalParentFixRows = built.terminalParentFixRows;
|
|
2011
|
+
recordValidateCheck(state, built, fixHintsEnabled);
|
|
2012
|
+
}
|
|
2013
|
+
if (params.requestedChecks.has("files")) {
|
|
2014
|
+
const built = await buildFilesCheck(params.items, params.workspaceRoot, params.pmRoot, params.fileScanMode, Boolean(params.options.includePmInternals), Boolean(params.options.verboseFileLists));
|
|
2015
|
+
state.staleLinkPruneRows = built.staleLinkPruneRows;
|
|
2016
|
+
recordValidateCheck(state, built, fixHintsEnabled);
|
|
2017
|
+
}
|
|
2018
|
+
if (params.requestedChecks.has("command_references")) {
|
|
2019
|
+
recordValidateCheck(state, buildCommandReferencesCheck(params.items, params.settings.id_prefix, fullDiagnostics), fixHintsEnabled);
|
|
2020
|
+
}
|
|
2021
|
+
if (params.requestedChecks.has("history_drift")) {
|
|
2022
|
+
recordValidateCheck(state, await buildHistoryDriftCheck(params.pmRoot, params.items, fullDiagnostics), fixHintsEnabled);
|
|
2023
|
+
}
|
|
2024
|
+
if (params.requestedChecks.has("format_version")) {
|
|
2025
|
+
recordValidateCheck(state, buildFormatVersionCheck(params.items, fullDiagnostics), fixHintsEnabled);
|
|
2026
|
+
}
|
|
2027
|
+
return state;
|
|
2028
|
+
}
|
|
2029
|
+
function planValidateFixes(options, state, settings) {
|
|
2030
|
+
const planned = [];
|
|
2031
|
+
if (options.autoFix === true) {
|
|
2032
|
+
planned.push(...planCloseReasonBackfillFixes(state.closeReasonBackfillRows));
|
|
2033
|
+
planned.push(...planResolutionBackfillFixes(state.resolutionBackfillRows));
|
|
2034
|
+
planned.push(...planEstimateBackfillFixes(state.estimateBackfillRows, settings.validation.estimate_defaults_by_type));
|
|
2035
|
+
planned.push(...planTerminalParentFixes(state.terminalParentFixRows));
|
|
2036
|
+
}
|
|
2037
|
+
if (options.pruneMissing === true) {
|
|
2038
|
+
planned.push(...planStaleLinkPruneFixes(state.staleLinkPruneRows));
|
|
2039
|
+
}
|
|
2040
|
+
return planned;
|
|
2041
|
+
}
|
|
2042
|
+
async function buildValidateFixesSummary(options, state, settings, grantedFixScopes, global2) {
|
|
2043
|
+
if (options.autoFix !== true && options.pruneMissing !== true) {
|
|
2044
|
+
return void 0;
|
|
2045
|
+
}
|
|
2046
|
+
const planned = planValidateFixes(options, state, settings);
|
|
2047
|
+
const { applicable, gated } = partitionFixesByGrant(planned, grantedFixScopes);
|
|
2048
|
+
const dryRun = options.dryRun === true;
|
|
2049
|
+
const appliedFixRows = [];
|
|
2050
|
+
const failedFixRows = [];
|
|
2051
|
+
if (!dryRun) {
|
|
2052
|
+
const applied = await applyValidateFixes(applicable, global2);
|
|
2053
|
+
appliedFixRows.push(...applied.applied.map(toFixOutputRow));
|
|
2054
|
+
failedFixRows.push(...applied.failed.map(({ fix, error }) => ({
|
|
2055
|
+
...toFixOutputRow(fix),
|
|
2056
|
+
error: error instanceof Error ? error.message : String(error)
|
|
2057
|
+
})));
|
|
2058
|
+
}
|
|
2059
|
+
return {
|
|
2060
|
+
mode: dryRun ? "dry_run" : "apply",
|
|
2061
|
+
auto_fix: options.autoFix === true,
|
|
2062
|
+
prune_missing: options.pruneMissing === true,
|
|
2063
|
+
granted_fix_scopes: [...grantedFixScopes].sort((left, right) => left.localeCompare(right)),
|
|
2064
|
+
planned_count: planned.length,
|
|
2065
|
+
applied_count: appliedFixRows.length,
|
|
2066
|
+
gated_count: gated.length,
|
|
2067
|
+
failed_count: failedFixRows.length,
|
|
2068
|
+
planned_fixes: planned.map(toFixOutputRow),
|
|
2069
|
+
applied_fixes: appliedFixRows,
|
|
2070
|
+
gated_fixes: gated.map((fix) => ({
|
|
2071
|
+
...toFixOutputRow(fix),
|
|
2072
|
+
gate_hint: `Withheld: re-run with --fix-scope ${fix.gate} to apply.`
|
|
2073
|
+
})),
|
|
2074
|
+
failed_fixes: failedFixRows
|
|
2075
|
+
};
|
|
2076
|
+
}
|
|
1876
2077
|
async function runValidate(options, global2) {
|
|
1877
2078
|
const fixesRequested = options.autoFix === true || options.pruneMissing === true;
|
|
1878
2079
|
if (options.dryRun === true && !fixesRequested) {
|
|
@@ -1900,100 +2101,29 @@ async function runValidate(options, global2) {
|
|
|
1900
2101
|
const parentCycleSeverity = resolveParentCycleSeverity(options.parentCycleSeverity);
|
|
1901
2102
|
const fileScanMode = resolveFileScanMode(options.scanMode);
|
|
1902
2103
|
const workspaceRoot = resolveWorkspaceRoot(pmRoot);
|
|
1903
|
-
const
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
estimateBackfillRows = built.estimateBackfillRows;
|
|
1923
|
-
record(built);
|
|
1924
|
-
}
|
|
1925
|
-
if (requestedChecks.has("resolution")) {
|
|
1926
|
-
const built = buildResolutionCheck(items, statusRegistry, fullDiagnostics);
|
|
1927
|
-
resolutionBackfillRows = built.resolutionBackfillRows;
|
|
1928
|
-
record(built);
|
|
1929
|
-
}
|
|
1930
|
-
if (requestedChecks.has("lifecycle")) {
|
|
1931
|
-
const built = buildLifecycleCheck(items, Boolean(options.checkStaleBlockers), dependencyCycleSeverity, parentCycleSeverity, statusRegistry, lifecyclePatternPolicy, fullDiagnostics, settings.id_prefix);
|
|
1932
|
-
terminalParentFixRows = built.terminalParentFixRows;
|
|
1933
|
-
record(built);
|
|
1934
|
-
}
|
|
1935
|
-
if (requestedChecks.has("files")) {
|
|
1936
|
-
const built = await buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, Boolean(options.includePmInternals), Boolean(options.verboseFileLists));
|
|
1937
|
-
staleLinkPruneRows = built.staleLinkPruneRows;
|
|
1938
|
-
record(built);
|
|
1939
|
-
}
|
|
1940
|
-
if (requestedChecks.has("command_references")) {
|
|
1941
|
-
record(buildCommandReferencesCheck(items, settings.id_prefix, fullDiagnostics));
|
|
1942
|
-
}
|
|
1943
|
-
if (requestedChecks.has("history_drift")) {
|
|
1944
|
-
record(await buildHistoryDriftCheck(pmRoot, items, fullDiagnostics));
|
|
1945
|
-
}
|
|
1946
|
-
if (requestedChecks.has("format_version")) {
|
|
1947
|
-
record(buildFormatVersionCheck(items, fullDiagnostics));
|
|
1948
|
-
}
|
|
1949
|
-
let fixes;
|
|
1950
|
-
if (fixesRequested) {
|
|
1951
|
-
const planned = [];
|
|
1952
|
-
if (options.autoFix === true) {
|
|
1953
|
-
planned.push(...planCloseReasonBackfillFixes(closeReasonBackfillRows));
|
|
1954
|
-
planned.push(...planResolutionBackfillFixes(resolutionBackfillRows));
|
|
1955
|
-
planned.push(...planEstimateBackfillFixes(estimateBackfillRows, settings.validation.estimate_defaults_by_type));
|
|
1956
|
-
planned.push(...planTerminalParentFixes(terminalParentFixRows));
|
|
1957
|
-
}
|
|
1958
|
-
if (options.pruneMissing === true) {
|
|
1959
|
-
planned.push(...planStaleLinkPruneFixes(staleLinkPruneRows));
|
|
1960
|
-
}
|
|
1961
|
-
const { applicable, gated } = partitionFixesByGrant(planned, grantedFixScopes);
|
|
1962
|
-
const dryRun = options.dryRun === true;
|
|
1963
|
-
const appliedFixRows = [];
|
|
1964
|
-
const failedFixRows = [];
|
|
1965
|
-
if (!dryRun) {
|
|
1966
|
-
const applied = await applyValidateFixes(applicable, global2);
|
|
1967
|
-
appliedFixRows.push(...applied.applied.map(toFixOutputRow));
|
|
1968
|
-
failedFixRows.push(...applied.failed.map(({ fix, error }) => ({
|
|
1969
|
-
...toFixOutputRow(fix),
|
|
1970
|
-
error: error instanceof Error ? error.message : String(error)
|
|
1971
|
-
})));
|
|
1972
|
-
}
|
|
1973
|
-
fixes = {
|
|
1974
|
-
mode: dryRun ? "dry_run" : "apply",
|
|
1975
|
-
auto_fix: options.autoFix === true,
|
|
1976
|
-
prune_missing: options.pruneMissing === true,
|
|
1977
|
-
granted_fix_scopes: [...grantedFixScopes].sort((left, right) => left.localeCompare(right)),
|
|
1978
|
-
planned_count: planned.length,
|
|
1979
|
-
applied_count: appliedFixRows.length,
|
|
1980
|
-
gated_count: gated.length,
|
|
1981
|
-
failed_count: failedFixRows.length,
|
|
1982
|
-
planned_fixes: planned.map(toFixOutputRow),
|
|
1983
|
-
applied_fixes: appliedFixRows,
|
|
1984
|
-
gated_fixes: gated.map((fix) => ({
|
|
1985
|
-
...toFixOutputRow(fix),
|
|
1986
|
-
gate_hint: `Withheld: re-run with --fix-scope ${fix.gate} to apply.`
|
|
1987
|
-
})),
|
|
1988
|
-
failed_fixes: failedFixRows
|
|
1989
|
-
};
|
|
1990
|
-
}
|
|
1991
|
-
const normalizedWarnings = [...new Set(warnings)].sort((left, right) => left.localeCompare(right));
|
|
1992
|
-
const hasErrors = checks.some((check) => check.status === "error");
|
|
2104
|
+
const state = await executeRequestedValidateChecks({
|
|
2105
|
+
requestedChecks,
|
|
2106
|
+
options,
|
|
2107
|
+
global: global2,
|
|
2108
|
+
pmRoot,
|
|
2109
|
+
workspaceRoot,
|
|
2110
|
+
settings,
|
|
2111
|
+
items,
|
|
2112
|
+
statusRegistry,
|
|
2113
|
+
metadataPolicy,
|
|
2114
|
+
lifecyclePatternPolicy,
|
|
2115
|
+
dependencyCycleSeverity,
|
|
2116
|
+
parentCycleSeverity,
|
|
2117
|
+
fileScanMode,
|
|
2118
|
+
initialWarnings: [...new Set(itemReadWarnings)]
|
|
2119
|
+
});
|
|
2120
|
+
const fixes = fixesRequested ? await buildValidateFixesSummary(options, state, settings, grantedFixScopes, global2) : void 0;
|
|
2121
|
+
const normalizedWarnings = [...new Set(state.warnings)].sort((left, right) => left.localeCompare(right));
|
|
2122
|
+
const hasErrors = state.checks.some((check) => check.status === "error");
|
|
1993
2123
|
return {
|
|
1994
2124
|
ok: !hasErrors,
|
|
1995
2125
|
has_warnings: normalizedWarnings.length > 0,
|
|
1996
|
-
checks,
|
|
2126
|
+
checks: state.checks,
|
|
1997
2127
|
warnings: normalizedWarnings,
|
|
1998
2128
|
...fixes !== void 0 ? { fixes } : {},
|
|
1999
2129
|
generated_at: nowIso()
|
|
@@ -2003,4 +2133,4 @@ export {
|
|
|
2003
2133
|
_testOnlyValidateCommand,
|
|
2004
2134
|
runValidate
|
|
2005
2135
|
};
|
|
2006
|
-
//# sourceMappingURL=validate-
|
|
2136
|
+
//# sourceMappingURL=validate-NRY6MFXN.js.map
|