@unbrained/pm-cli 2026.6.30 → 2026.7.2
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/AGENTS.md +2 -0
- package/CHANGELOG.md +26 -0
- package/dist/cli/bootstrap-args.js +89 -79
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.d.ts +2 -0
- package/dist/cli/commander-usage.js +58 -47
- package/dist/cli/commander-usage.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 +339 -303
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.js +89 -68
- 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 +483 -434
- 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/bundled-catalog.js +59 -46
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/doctor.js +129 -78
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/managed-state.js +101 -57
- package/dist/cli/commands/extension/managed-state.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.d.ts +7 -0
- package/dist/cli/commands/extension/scaffold.js +214 -186
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +6 -1
- package/dist/cli/commands/extension.js +1034 -902
- package/dist/cli/commands/extension.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 +446 -307
- 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.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-filter-shared.js +55 -48
- package/dist/cli/commands/list-filter-shared.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 +49 -32
- 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/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 +595 -536
- 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 +530 -464
- 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 +764 -747
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +18 -1
- package/dist/cli/commands/validate.js +466 -343
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +399 -357
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-options.js +48 -21
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/main.d.ts +47 -0
- package/dist/cli/main.js +428 -341
- 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 +94 -105
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +400 -416
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +86 -66
- 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.js +117 -122
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/{activity-MVSEND6D.js → activity-CUC4JY3U.js} +9 -9
- package/dist/cli-bundle/chunks/activity-WEIEMM73.js +16 -0
- package/dist/cli-bundle/chunks/{aggregate-MOC4TR2G.js → aggregate-DKUTRY6R.js} +109 -85
- package/dist/cli-bundle/chunks/aggregate-DKUTRY6R.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-XJHLZQ5X.js → aggregate-SW5PNGCS.js} +108 -84
- package/dist/cli-bundle/chunks/{aggregate-XJHLZQ5X.js.map → aggregate-SW5PNGCS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{append-KDHT4GHI.js → append-H32VOR2Y.js} +6 -6
- package/dist/cli-bundle/chunks/{append-LEDBAM3K.js → append-UBM632FK.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-Z55WX4IQ.js → chunk-2227673O.js} +158 -114
- package/dist/cli-bundle/chunks/chunk-2227673O.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SJZTPVFT.js → chunk-2ASNV4DH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-JVQ7UOYC.js → chunk-2CHRYUXL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QE5UFCCO.js → chunk-2KWL5NPW.js} +42 -27
- package/dist/cli-bundle/chunks/chunk-2KWL5NPW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZEATCVAC.js → chunk-36UGKF4O.js} +21 -29
- package/dist/cli-bundle/chunks/chunk-36UGKF4O.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JZG5ADVE.js → chunk-3AZUFQK6.js} +1103 -963
- package/dist/cli-bundle/chunks/chunk-3AZUFQK6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-DRPF274X.js → chunk-3LCUASYG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JJ4SG243.js → chunk-3Q2HBMTI.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +87 -0
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GF7EAR22.js → chunk-4NUOWFBT.js} +109 -72
- package/dist/cli-bundle/chunks/chunk-4NUOWFBT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TQ6E76BE.js → chunk-55XRYWEG.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-5IRVSKPS.js → chunk-5GVTFFTC.js} +150 -224
- package/dist/cli-bundle/chunks/chunk-5GVTFFTC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-CHRNYKNI.js → chunk-5PGBHRY3.js} +41 -26
- package/dist/cli-bundle/chunks/chunk-5PGBHRY3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-53ARXF2O.js → chunk-66Z3X7ZG.js} +261 -161
- package/dist/cli-bundle/chunks/chunk-66Z3X7ZG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-A3UNLXNJ.js → chunk-6ITZLD4T.js} +738 -688
- package/dist/cli-bundle/chunks/chunk-6ITZLD4T.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JTRKME24.js → chunk-6YCYF2AI.js} +262 -162
- package/dist/cli-bundle/chunks/chunk-6YCYF2AI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RM6MHL6A.js → chunk-6ZMBJRDJ.js} +580 -467
- package/dist/cli-bundle/chunks/chunk-6ZMBJRDJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RPRW26NG.js → chunk-7MYWF4ZX.js} +110 -73
- package/dist/cli-bundle/chunks/chunk-7MYWF4ZX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SNUK7H5J.js → chunk-7NSPKJUS.js} +716 -606
- package/dist/cli-bundle/chunks/chunk-7NSPKJUS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KYDYQMNW.js → chunk-7TH5NMVB.js} +95 -53
- package/dist/cli-bundle/chunks/chunk-7TH5NMVB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VD3LKZFX.js → chunk-7W4H4K26.js} +739 -689
- package/dist/cli-bundle/chunks/chunk-7W4H4K26.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IBU2LLWM.js → chunk-A6VOGKBA.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-MLHX6DN5.js → chunk-AIAIXG7I.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NIBP3I7A.js → chunk-AJEBCRIY.js} +128 -126
- package/dist/cli-bundle/chunks/chunk-AJEBCRIY.js.map +1 -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-5ABGFWR4.js → chunk-BTX5MIQF.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-BVZZN2LH.js +809 -0
- package/dist/cli-bundle/chunks/chunk-BVZZN2LH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3JWQCLR5.js → chunk-CYBDUHNO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WFJZDUM7.js → chunk-CZPVDLD2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-FDEVKXC4.js → chunk-EMPGXBUF.js} +22 -30
- package/dist/cli-bundle/chunks/chunk-EMPGXBUF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HUYYMTGW.js → chunk-EUKTMRN3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EVWYAG46.js → chunk-FFOQHGNH.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-IF4ERU6A.js → chunk-GFMSLORL.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-IZQOJR2B.js → chunk-GRRG3MCT.js} +198 -189
- package/dist/cli-bundle/chunks/chunk-GRRG3MCT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IDYCAK35.js → chunk-H4GRLYJS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VMY7MZEM.js → chunk-HQTPRV4D.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-CY5IJMUM.js → chunk-I66WE2HE.js} +712 -602
- package/dist/cli-bundle/chunks/chunk-I66WE2HE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZFIEEDTJ.js → chunk-IEEJQCZ4.js} +509 -363
- package/dist/cli-bundle/chunks/chunk-IEEJQCZ4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DU66JUGT.js → chunk-IG5JYZGU.js} +488 -420
- package/dist/cli-bundle/chunks/chunk-IG5JYZGU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7L6TXOOC.js → chunk-JMK5GCK2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LBH7UYKY.js → chunk-JXAUVO6X.js} +258 -169
- package/dist/cli-bundle/chunks/{chunk-LBH7UYKY.js.map → chunk-JXAUVO6X.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KRASIL6M.js → chunk-K2VYLVX4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4YIMPANT.js → chunk-KCO2EAN5.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-T7ZMQI4J.js → chunk-KIYCOJ63.js} +198 -189
- package/dist/cli-bundle/chunks/chunk-KIYCOJ63.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-D6USKAMA.js → chunk-KLXF7NCC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-V3KLX7U7.js → chunk-KN3URLKS.js} +510 -364
- package/dist/cli-bundle/chunks/chunk-KN3URLKS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OB3RJV5F.js → chunk-LRKMWUUV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-74PUWBGN.js → chunk-LTRAF2D7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5T6WPLRO.js → chunk-MNBPX5JS.js} +394 -354
- package/dist/cli-bundle/chunks/chunk-MNBPX5JS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4TXTVZL3.js → chunk-MRD4T5LF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-E2Q2ULMR.js → chunk-N2JSWVWG.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7WDETKGP.js → chunk-N3QCJS4M.js} +1105 -965
- package/dist/cli-bundle/chunks/chunk-N3QCJS4M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KGQ3W65B.js → chunk-NRZS637N.js} +258 -169
- package/dist/cli-bundle/chunks/chunk-NRZS637N.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-OTUJZKGI.js +799 -0
- package/dist/cli-bundle/chunks/chunk-OTUJZKGI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZIE6WXJ2.js → chunk-Q6K2OACU.js} +153 -90
- package/dist/cli-bundle/chunks/chunk-Q6K2OACU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-K46GQ265.js → chunk-Q6NXOHS6.js} +489 -421
- package/dist/cli-bundle/chunks/chunk-Q6NXOHS6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7RIJGN4R.js → chunk-QH3FSKRJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UB3V5WUI.js → chunk-RM37OPYK.js} +394 -354
- package/dist/cli-bundle/chunks/chunk-RM37OPYK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OUQ5JEFM.js → chunk-S62UANU7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NO6Y6FB2.js → chunk-SPM2XLWI.js} +37 -28
- package/dist/cli-bundle/chunks/chunk-SPM2XLWI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DORJSBGJ.js → chunk-SYNKD3ZG.js} +127 -125
- package/dist/cli-bundle/chunks/chunk-SYNKD3ZG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6YRAMXRS.js → chunk-SYVUU7EK.js} +581 -468
- package/dist/cli-bundle/chunks/chunk-SYVUU7EK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-D5LYZVGB.js → chunk-TPOFWBMY.js} +95 -53
- package/dist/cli-bundle/chunks/chunk-TPOFWBMY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IHXXUIXS.js → chunk-TTHCEV5Q.js} +92 -77
- package/dist/cli-bundle/chunks/chunk-TTHCEV5Q.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-DLDCPF5X.js → chunk-U2BEEM2X.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-Z5BM2FKQ.js → chunk-UGLU6Q2I.js} +91 -76
- package/dist/cli-bundle/chunks/chunk-UGLU6Q2I.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-73PTKMAE.js → chunk-UT73HUPC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-F7G53BOA.js → chunk-UTSH5GWX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-AWN4PPH5.js → chunk-UWKEJMZU.js} +157 -113
- package/dist/cli-bundle/chunks/chunk-UWKEJMZU.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +84 -0
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KTMMTOIP.js → chunk-W47SML5B.js} +152 -89
- package/dist/cli-bundle/chunks/chunk-W47SML5B.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UFKNF23C.js → chunk-WJAMWAHZ.js} +157 -118
- package/dist/cli-bundle/chunks/chunk-WJAMWAHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HIBK6H4S.js → chunk-XCHUVHKU.js} +685 -544
- package/dist/cli-bundle/chunks/chunk-XCHUVHKU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-DJDXAU74.js → chunk-XEWQKDYZ.js} +685 -544
- package/dist/cli-bundle/chunks/chunk-XEWQKDYZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-BOWQWXLI.js → chunk-XTHQWXVC.js} +158 -119
- package/dist/cli-bundle/chunks/chunk-XTHQWXVC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6T5ZIWBS.js → chunk-XWGEMNBR.js} +150 -224
- package/dist/cli-bundle/chunks/chunk-XWGEMNBR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JIP67N2K.js → chunk-Y4NRKBFW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WTRUDJ3R.js → chunk-YLZZ6T54.js} +38 -29
- package/dist/cli-bundle/chunks/chunk-YLZZ6T54.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FBZ5XAAF.js → chunk-YPKFV2JR.js} +6 -6
- 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-BN3CWK6G.js → chunk-ZNHEYCDD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YEDFE4DC.js → chunk-ZNT7KEWE.js} +2 -2
- package/dist/cli-bundle/chunks/{claim-HMCLSLUE.js → claim-SENTPZBN.js} +8 -8
- package/dist/cli-bundle/chunks/{claim-6NINZYB3.js → claim-Z7MEQCBT.js} +8 -8
- package/dist/cli-bundle/chunks/{close-OP3LK7Z2.js → close-424MX4CU.js} +7 -7
- package/dist/cli-bundle/chunks/close-YCWQQPDS.js +14 -0
- package/dist/cli-bundle/chunks/{close-many-CXJBOWWY.js → close-many-2IV4J2TR.js} +103 -82
- package/dist/cli-bundle/chunks/close-many-2IV4J2TR.js.map +1 -0
- package/dist/cli-bundle/chunks/{close-many-BFMP6HHK.js → close-many-SWY34BII.js} +102 -81
- package/dist/cli-bundle/chunks/close-many-SWY34BII.js.map +7 -0
- package/dist/cli-bundle/chunks/{comments-ETHABIY6.js → comments-4FGNTSNV.js} +8 -8
- package/dist/cli-bundle/chunks/{comments-MU2WMBUY.js → comments-7YS5MY5X.js} +8 -8
- package/dist/cli-bundle/chunks/config-BZJKK7FZ.js +1062 -0
- package/dist/cli-bundle/chunks/config-BZJKK7FZ.js.map +1 -0
- package/dist/cli-bundle/chunks/config-G74GISC4.js +1072 -0
- package/dist/cli-bundle/chunks/config-G74GISC4.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-7ZEZV3BV.js → context-LHVKJSPJ.js} +12 -12
- package/dist/cli-bundle/chunks/{context-XDI4DKKT.js → context-ZQY54JNS.js} +12 -12
- package/dist/cli-bundle/chunks/{contracts-SMOAN5NF.js → contracts-CP2EZJC7.js} +320 -199
- package/dist/cli-bundle/chunks/contracts-CP2EZJC7.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-KP4QAGVW.js → contracts-FIZLMP7O.js} +321 -200
- package/dist/cli-bundle/chunks/contracts-FIZLMP7O.js.map +1 -0
- package/dist/cli-bundle/chunks/{copy-JJ3KOQW2.js → copy-GYNQQPW2.js} +5 -5
- package/dist/cli-bundle/chunks/{copy-CWM6SBY6.js → copy-TLW7JTQT.js} +5 -5
- package/dist/cli-bundle/chunks/{create-J5Q2ELZT.js → create-VSKYSOCD.js} +12 -12
- package/dist/cli-bundle/chunks/create-XTMAPS7I.js +28 -0
- package/dist/cli-bundle/chunks/{delete-2GZLQEUQ.js → delete-4W5JYCEG.js} +5 -5
- package/dist/cli-bundle/chunks/{delete-OOQS4KVD.js → delete-ANTOTI2I.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-IF4IGL4R.js → deps-HPPE6MJN.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-ZVGGCRR6.js → deps-ZQZN54EZ.js} +5 -5
- package/dist/cli-bundle/chunks/{docs-NFTBCQQC.js → docs-RPOVFMP3.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-2TIFR62T.js → docs-XJNYBJGE.js} +7 -7
- package/dist/cli-bundle/chunks/{eval-2F6EH4XN.js → eval-DM6JBZTS.js} +10 -10
- package/dist/cli-bundle/chunks/{eval-PFKXQR3B.js → eval-RFBI5FGS.js} +10 -10
- package/dist/cli-bundle/chunks/{extension-GMVOIP4O.js → extension-B3YY4WY5.js} +11 -10
- package/dist/cli-bundle/chunks/{extension-3LRYX7SW.js → extension-TTSEFQTS.js} +11 -10
- package/dist/cli-bundle/chunks/{files-DF3HO6XK.js → files-5D65CHGE.js} +7 -7
- package/dist/cli-bundle/chunks/{files-T5ODMETM.js → files-GPIG77EN.js} +7 -7
- package/dist/cli-bundle/chunks/{focus-MY5ARIEK.js → focus-C3PEJV2C.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-DLXKK4AH.js → focus-ZHN7WIGX.js} +6 -6
- package/dist/cli-bundle/chunks/{gc-MDGRR2SU.js → gc-D4JQ6OWN.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-FULIVYR4.js → gc-VZIXDL32.js} +3 -3
- package/dist/cli-bundle/chunks/{get-VYPIICPC.js → get-GIBRUUOP.js} +121 -81
- package/dist/cli-bundle/chunks/get-GIBRUUOP.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-AWK324RS.js → get-IOVAN6RU.js} +120 -80
- package/dist/cli-bundle/chunks/get-IOVAN6RU.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-Q66C43GN.js → health-L2U3AFKV.js} +437 -264
- package/dist/cli-bundle/chunks/health-L2U3AFKV.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-FBCVZGSX.js → health-MM7AWXYF.js} +436 -263
- package/dist/cli-bundle/chunks/health-MM7AWXYF.js.map +7 -0
- package/dist/cli-bundle/chunks/history-DD7L7BNL.js +18 -0
- package/dist/cli-bundle/chunks/{history-X4OSES6K.js → history-IL7XCEX2.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-2GHT32UX.js → history-compact-HALOTOU7.js} +214 -135
- package/dist/cli-bundle/chunks/history-compact-HALOTOU7.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-compact-WLCQEKXS.js → history-compact-MV25P7DM.js} +213 -134
- package/dist/cli-bundle/chunks/history-compact-MV25P7DM.js.map +7 -0
- package/dist/cli-bundle/chunks/history-redact-IX4YEWMY.js +19 -0
- package/dist/cli-bundle/chunks/{history-redact-45YW65BK.js → history-redact-VYCWQFK7.js} +9 -9
- package/dist/cli-bundle/chunks/{history-repair-FY75IC26.js → history-repair-44MODPQF.js} +124 -84
- package/dist/cli-bundle/chunks/history-repair-44MODPQF.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-GABSDSVD.js → history-repair-CPNAOCNF.js} +123 -83
- package/dist/cli-bundle/chunks/history-repair-CPNAOCNF.js.map +7 -0
- package/dist/cli-bundle/chunks/{init-KO7CGIRQ.js → init-F27NHENZ.js} +12 -11
- package/dist/cli-bundle/chunks/init-HHVQQP6C.js +22 -0
- package/dist/cli-bundle/chunks/{learnings-LHZT5BHW.js → learnings-HJVDQIGY.js} +8 -8
- package/dist/cli-bundle/chunks/{learnings-3F7YLI45.js → learnings-XSFSUUWK.js} +8 -8
- package/dist/cli-bundle/chunks/{list-Y6AU5BJS.js → list-HPMEKCAA.js} +8 -8
- package/dist/cli-bundle/chunks/{list-ROT7JF62.js → list-VMPWTURB.js} +8 -8
- package/dist/cli-bundle/chunks/{next-66BJB4N2.js → next-ETXF2ZCN.js} +59 -37
- package/dist/cli-bundle/chunks/next-ETXF2ZCN.js.map +7 -0
- package/dist/cli-bundle/chunks/{next-N5MWJTBY.js → next-QM6YJIIS.js} +60 -38
- package/dist/cli-bundle/chunks/next-QM6YJIIS.js.map +1 -0
- package/dist/cli-bundle/chunks/{notes-FW6YFLND.js → notes-GDZIKGR6.js} +8 -8
- package/dist/cli-bundle/chunks/{notes-EVJZ3VAB.js → notes-WDDBPC4D.js} +8 -8
- package/dist/cli-bundle/chunks/{plan-ZHKZ7JVF.js → plan-BGDR73Z6.js} +373 -279
- package/dist/cli-bundle/chunks/plan-BGDR73Z6.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-DQ7G4EDC.js → plan-C5IMM335.js} +372 -278
- package/dist/cli-bundle/chunks/plan-C5IMM335.js.map +7 -0
- package/dist/cli-bundle/chunks/{profile-CHAW6SEA.js → profile-CCOKZ2IQ.js} +9 -9
- package/dist/cli-bundle/chunks/{profile-UPZGCDOG.js → profile-HUCENIEQ.js} +9 -9
- package/dist/cli-bundle/chunks/{register-list-query-Y2VRHPCL.js → register-list-query-ROSNIL52.js} +80 -83
- package/dist/cli-bundle/chunks/register-list-query-ROSNIL52.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-KY6Z6WV7.js → register-list-query-XN4ZRHSV.js} +79 -82
- package/dist/cli-bundle/chunks/register-list-query-XN4ZRHSV.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-PCARIGZS.js → register-mutation-CFSB2MS3.js} +406 -385
- package/dist/cli-bundle/chunks/register-mutation-CFSB2MS3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-N6AYSKPM.js → register-mutation-KRLAHEL2.js} +405 -384
- package/dist/cli-bundle/chunks/register-mutation-KRLAHEL2.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-L6CYTOIH.js → register-operations-4PASGJDB.js} +112 -93
- package/dist/cli-bundle/chunks/register-operations-4PASGJDB.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-YAT6FUUB.js → register-operations-MBN4KGUM.js} +113 -94
- package/dist/cli-bundle/chunks/register-operations-MBN4KGUM.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-N7UGXYJC.js → register-setup-VIAWYFP5.js} +129 -104
- package/dist/cli-bundle/chunks/register-setup-VIAWYFP5.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-MPANILQF.js → register-setup-ZCGKHDKL.js} +128 -103
- package/dist/cli-bundle/chunks/register-setup-ZCGKHDKL.js.map +7 -0
- package/dist/cli-bundle/chunks/{restore-DKMCLPI5.js → restore-4CBWUMCX.js} +9 -9
- package/dist/cli-bundle/chunks/restore-5UEAGG3W.js +17 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-3F4QUEDH.js → scheduling-shortcuts-6VFKNKCM.js} +12 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-BNZLQK36.js → scheduling-shortcuts-ERHCVTEM.js} +12 -12
- package/dist/cli-bundle/chunks/{schema-OLT6LVKH.js → schema-TDGK6N3I.js} +7 -7
- package/dist/cli-bundle/chunks/{schema-XJXKJQF5.js → schema-UE5KKAUX.js} +7 -7
- package/dist/cli-bundle/chunks/{search-KP6H7COV.js → search-FP7MEU4S.js} +10 -10
- package/dist/cli-bundle/chunks/{search-CX5UMV4H.js → search-K4CFLQ5S.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-QZUG6MX5.js → stats-NJJCALEZ.js} +6 -6
- package/dist/cli-bundle/chunks/{stats-7XW4OEMK.js → stats-XT6QRKQY.js} +6 -6
- package/dist/cli-bundle/chunks/{telemetry-DIFPXCAT.js → telemetry-5SQ5UDXC.js} +84 -70
- package/dist/cli-bundle/chunks/telemetry-5SQ5UDXC.js.map +7 -0
- package/dist/cli-bundle/chunks/{telemetry-WTYFUPRL.js → telemetry-HVXFZA2U.js} +85 -71
- package/dist/cli-bundle/chunks/telemetry-HVXFZA2U.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-QNDXZQCW.js → test-UFSJ5YIO.js} +15 -14
- package/dist/cli-bundle/chunks/{test-HU2BS7EY.js → test-YCDAUBWF.js} +15 -14
- package/dist/cli-bundle/chunks/test-all-2BWKY3GQ.js +427 -0
- package/dist/cli-bundle/chunks/test-all-2BWKY3GQ.js.map +1 -0
- package/dist/cli-bundle/chunks/test-all-PM7UYN42.js +430 -0
- package/dist/cli-bundle/chunks/test-all-PM7UYN42.js.map +7 -0
- package/dist/cli-bundle/chunks/{test-runs-CA6K32RD.js → test-runs-FK5E75AA.js} +185 -147
- package/dist/cli-bundle/chunks/test-runs-FK5E75AA.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-LANLLPVO.js → test-runs-H4TGWGRN.js} +184 -146
- package/dist/cli-bundle/chunks/test-runs-H4TGWGRN.js.map +7 -0
- package/dist/cli-bundle/chunks/update-MTCFES6X.js +24 -0
- package/dist/cli-bundle/chunks/{update-DJKWLBWJ.js → update-Y5WQVT5O.js} +15 -15
- package/dist/cli-bundle/chunks/{update-many-LU3SCNK5.js → update-many-6YAYYRLE.js} +83 -68
- package/dist/cli-bundle/chunks/{update-many-LU3SCNK5.js.map → update-many-6YAYYRLE.js.map} +2 -2
- package/dist/cli-bundle/chunks/{update-many-VW5DGF3S.js → update-many-JTKKSA7Y.js} +84 -69
- package/dist/cli-bundle/chunks/{update-many-VW5DGF3S.js.map → update-many-JTKKSA7Y.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-ICXY244R.js → upgrade-DTAHZ236.js} +11 -10
- package/dist/cli-bundle/chunks/{upgrade-ICXY244R.js.map → upgrade-DTAHZ236.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-77FRUAXN.js → upgrade-JUDU7YL4.js} +13 -12
- package/dist/cli-bundle/chunks/{upgrade-77FRUAXN.js.map → upgrade-JUDU7YL4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-2G566PKQ.js → validate-732RWS5W.js} +440 -319
- package/dist/cli-bundle/chunks/validate-732RWS5W.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-BDPVXHHH.js → validate-W7H5TEDC.js} +441 -320
- package/dist/cli-bundle/chunks/validate-W7H5TEDC.js.map +1 -0
- package/dist/cli-bundle/main.js +986 -1500
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/config/nested-settings.js +89 -67
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/extensions/activation-summary-markdown.js +23 -12
- package/dist/core/extensions/activation-summary-markdown.js.map +1 -1
- package/dist/core/extensions/extension-policy.d.ts +18 -3
- package/dist/core/extensions/extension-policy.js +116 -106
- package/dist/core/extensions/extension-policy.js.map +1 -1
- package/dist/core/extensions/loader.js +310 -232
- package/dist/core/extensions/loader.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-format.js +523 -410
- package/dist/core/item/item-format.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 +87 -82
- 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 +34 -28
- package/dist/core/schema/runtime-schema.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/store/front-matter-cache.js +239 -153
- 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/mcp/server.js +387 -367
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +111 -180
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +76 -45
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/compose.d.ts +4 -1
- package/dist/sdk/compose.js +181 -115
- package/dist/sdk/compose.js.map +1 -1
- package/docs/RELEASING.md +2 -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/dist/cli-bundle/chunks/activity-EJBMXUBH.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-MOC4TR2G.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-53ARXF2O.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5IRVSKPS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5T6WPLRO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6T5ZIWBS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6YRAMXRS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7WDETKGP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-A3UNLXNJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AWN4PPH5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BOWQWXLI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-C2KCIZKZ.js +0 -115
- package/dist/cli-bundle/chunks/chunk-C2KCIZKZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CHRNYKNI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CY5IJMUM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-D5LYZVGB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DJDXAU74.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DORJSBGJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DU66JUGT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-F6VH3LFC.js +0 -118
- package/dist/cli-bundle/chunks/chunk-F6VH3LFC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FDEVKXC4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GF7EAR22.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HIBK6H4S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IHXXUIXS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ISEKN64V.js +0 -35
- package/dist/cli-bundle/chunks/chunk-ISEKN64V.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IZQOJR2B.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JTRKME24.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JZG5ADVE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-K46GQ265.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KGQ3W65B.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KTMMTOIP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KYDYQMNW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NIBP3I7A.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NO6Y6FB2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QE5UFCCO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RM6MHL6A.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RPRW26NG.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SNUK7H5J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-T7ZMQI4J.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UB3V5WUI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UFKNF23C.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-V3KLX7U7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VD3LKZFX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js +0 -32
- package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WTRUDJ3R.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-Z55WX4IQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-Z5BM2FKQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZEATCVAC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZFIEEDTJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZIE6WXJ2.js.map +0 -1
- package/dist/cli-bundle/chunks/close-37KEHLYM.js +0 -14
- package/dist/cli-bundle/chunks/close-many-BFMP6HHK.js.map +0 -7
- package/dist/cli-bundle/chunks/close-many-CXJBOWWY.js.map +0 -1
- package/dist/cli-bundle/chunks/config-FIXJZEQK.js +0 -1541
- package/dist/cli-bundle/chunks/config-FIXJZEQK.js.map +0 -7
- package/dist/cli-bundle/chunks/config-X3ZVCUUG.js +0 -1531
- package/dist/cli-bundle/chunks/config-X3ZVCUUG.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-KP4QAGVW.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-SMOAN5NF.js.map +0 -7
- package/dist/cli-bundle/chunks/create-DFMNBKBS.js +0 -28
- package/dist/cli-bundle/chunks/get-AWK324RS.js.map +0 -7
- package/dist/cli-bundle/chunks/get-VYPIICPC.js.map +0 -1
- package/dist/cli-bundle/chunks/health-FBCVZGSX.js.map +0 -7
- package/dist/cli-bundle/chunks/health-Q66C43GN.js.map +0 -1
- package/dist/cli-bundle/chunks/history-5XUSLAJA.js +0 -18
- package/dist/cli-bundle/chunks/history-compact-2GHT32UX.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-WLCQEKXS.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-BVHWDXPR.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-FY75IC26.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-GABSDSVD.js.map +0 -7
- package/dist/cli-bundle/chunks/init-TRYJELH4.js +0 -21
- package/dist/cli-bundle/chunks/next-66BJB4N2.js.map +0 -7
- package/dist/cli-bundle/chunks/next-N5MWJTBY.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-DQ7G4EDC.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-ZHKZ7JVF.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-KY6Z6WV7.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-Y2VRHPCL.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-N6AYSKPM.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-PCARIGZS.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-L6CYTOIH.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-YAT6FUUB.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-MPANILQF.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-N7UGXYJC.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-IRAKSWIW.js +0 -17
- package/dist/cli-bundle/chunks/telemetry-DIFPXCAT.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-WTYFUPRL.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-PZTBLLQ6.js +0 -360
- package/dist/cli-bundle/chunks/test-all-PZTBLLQ6.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-XLPI4USF.js +0 -357
- package/dist/cli-bundle/chunks/test-all-XLPI4USF.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-CA6K32RD.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-LANLLPVO.js.map +0 -7
- package/dist/cli-bundle/chunks/update-UXDLTEOZ.js +0 -24
- package/dist/cli-bundle/chunks/validate-2G566PKQ.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-BDPVXHHH.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-MVSEND6D.js.map → activity-CUC4JY3U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-EJBMXUBH.js.map → activity-WEIEMM73.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-KDHT4GHI.js.map → append-H32VOR2Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-LEDBAM3K.js.map → append-UBM632FK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SJZTPVFT.js.map → chunk-2ASNV4DH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JVQ7UOYC.js.map → chunk-2CHRYUXL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DRPF274X.js.map → chunk-3LCUASYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JJ4SG243.js.map → chunk-3Q2HBMTI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TQ6E76BE.js.map → chunk-55XRYWEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IBU2LLWM.js.map → chunk-A6VOGKBA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MLHX6DN5.js.map → chunk-AIAIXG7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5ABGFWR4.js.map → chunk-BTX5MIQF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3JWQCLR5.js.map → chunk-CYBDUHNO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WFJZDUM7.js.map → chunk-CZPVDLD2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HUYYMTGW.js.map → chunk-EUKTMRN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EVWYAG46.js.map → chunk-FFOQHGNH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IF4ERU6A.js.map → chunk-GFMSLORL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IDYCAK35.js.map → chunk-H4GRLYJS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VMY7MZEM.js.map → chunk-HQTPRV4D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7L6TXOOC.js.map → chunk-JMK5GCK2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KRASIL6M.js.map → chunk-K2VYLVX4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4YIMPANT.js.map → chunk-KCO2EAN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D6USKAMA.js.map → chunk-KLXF7NCC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OB3RJV5F.js.map → chunk-LRKMWUUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-74PUWBGN.js.map → chunk-LTRAF2D7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4TXTVZL3.js.map → chunk-MRD4T5LF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E2Q2ULMR.js.map → chunk-N2JSWVWG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7RIJGN4R.js.map → chunk-QH3FSKRJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OUQ5JEFM.js.map → chunk-S62UANU7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DLDCPF5X.js.map → chunk-U2BEEM2X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-73PTKMAE.js.map → chunk-UT73HUPC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F7G53BOA.js.map → chunk-UTSH5GWX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JIP67N2K.js.map → chunk-Y4NRKBFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FBZ5XAAF.js.map → chunk-YPKFV2JR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BN3CWK6G.js.map → chunk-ZNHEYCDD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YEDFE4DC.js.map → chunk-ZNT7KEWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-HMCLSLUE.js.map → claim-SENTPZBN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-6NINZYB3.js.map → claim-Z7MEQCBT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-OP3LK7Z2.js.map → close-424MX4CU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-37KEHLYM.js.map → close-YCWQQPDS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-ETHABIY6.js.map → comments-4FGNTSNV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-MU2WMBUY.js.map → comments-7YS5MY5X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-7ZEZV3BV.js.map → context-LHVKJSPJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-XDI4DKKT.js.map → context-ZQY54JNS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-JJ3KOQW2.js.map → copy-GYNQQPW2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-CWM6SBY6.js.map → copy-TLW7JTQT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-J5Q2ELZT.js.map → create-VSKYSOCD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-DFMNBKBS.js.map → create-XTMAPS7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-2GZLQEUQ.js.map → delete-4W5JYCEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-OOQS4KVD.js.map → delete-ANTOTI2I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-IF4IGL4R.js.map → deps-HPPE6MJN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-ZVGGCRR6.js.map → deps-ZQZN54EZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-NFTBCQQC.js.map → docs-RPOVFMP3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-2TIFR62T.js.map → docs-XJNYBJGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-2F6EH4XN.js.map → eval-DM6JBZTS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-PFKXQR3B.js.map → eval-RFBI5FGS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-GMVOIP4O.js.map → extension-B3YY4WY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-3LRYX7SW.js.map → extension-TTSEFQTS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-DF3HO6XK.js.map → files-5D65CHGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-T5ODMETM.js.map → files-GPIG77EN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-MY5ARIEK.js.map → focus-C3PEJV2C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-DLXKK4AH.js.map → focus-ZHN7WIGX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-MDGRR2SU.js.map → gc-D4JQ6OWN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-FULIVYR4.js.map → gc-VZIXDL32.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-5XUSLAJA.js.map → history-DD7L7BNL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-X4OSES6K.js.map → history-IL7XCEX2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-BVHWDXPR.js.map → history-redact-IX4YEWMY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-45YW65BK.js.map → history-redact-VYCWQFK7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-KO7CGIRQ.js.map → init-F27NHENZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-TRYJELH4.js.map → init-HHVQQP6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-LHZT5BHW.js.map → learnings-HJVDQIGY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-3F7YLI45.js.map → learnings-XSFSUUWK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-Y6AU5BJS.js.map → list-HPMEKCAA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-ROT7JF62.js.map → list-VMPWTURB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-FW6YFLND.js.map → notes-GDZIKGR6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-EVJZ3VAB.js.map → notes-WDDBPC4D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-CHAW6SEA.js.map → profile-CCOKZ2IQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-UPZGCDOG.js.map → profile-HUCENIEQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-DKMCLPI5.js.map → restore-4CBWUMCX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-IRAKSWIW.js.map → restore-5UEAGG3W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-3F4QUEDH.js.map → scheduling-shortcuts-6VFKNKCM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-BNZLQK36.js.map → scheduling-shortcuts-ERHCVTEM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-OLT6LVKH.js.map → schema-TDGK6N3I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-XJXKJQF5.js.map → schema-UE5KKAUX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-KP6H7COV.js.map → search-FP7MEU4S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-CX5UMV4H.js.map → search-K4CFLQ5S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-QZUG6MX5.js.map → stats-NJJCALEZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-7XW4OEMK.js.map → stats-XT6QRKQY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-QNDXZQCW.js.map → test-UFSJ5YIO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-HU2BS7EY.js.map → test-YCDAUBWF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-UXDLTEOZ.js.map → update-MTCFES6X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-DJKWLBWJ.js.map → update-Y5WQVT5O.js.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0642e966-0611-51ff-ad2f-1a0d7416c80b")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
extractReferencedPmItemIdsFromCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Q6NXOHS6.js";
|
|
6
6
|
import {
|
|
7
7
|
buildRemediationCommands
|
|
8
8
|
} from "./chunk-R2EMWY7Q.js";
|
|
@@ -11,29 +11,30 @@ import {
|
|
|
11
11
|
} from "./chunk-IBMFIKVS.js";
|
|
12
12
|
import {
|
|
13
13
|
scanHistoryDrift
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-TTHCEV5Q.js";
|
|
15
|
+
import "./chunk-KCO2EAN5.js";
|
|
16
|
+
import "./chunk-KLXF7NCC.js";
|
|
17
|
+
import "./chunk-2ASNV4DH.js";
|
|
18
|
+
import "./chunk-6YCYF2AI.js";
|
|
19
|
+
import "./chunk-3AZUFQK6.js";
|
|
20
20
|
import "./chunk-P4SESZGT.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-YLZZ6T54.js";
|
|
22
|
+
import "./chunk-ZNT7KEWE.js";
|
|
23
|
+
import "./chunk-KIYCOJ63.js";
|
|
24
|
+
import "./chunk-OTUJZKGI.js";
|
|
25
|
+
import "./chunk-5GVTFFTC.js";
|
|
25
26
|
import {
|
|
26
27
|
listAllFrontMatterWithBody
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-NRZS637N.js";
|
|
28
29
|
import {
|
|
29
30
|
CURRENT_ITEM_FORMAT_VERSION,
|
|
30
31
|
effectiveItemFormatVersion,
|
|
31
32
|
normalizeStatusInput,
|
|
32
33
|
scanItemFormatVersions
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-KN3URLKS.js";
|
|
34
35
|
import {
|
|
35
36
|
nowIso
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-K2VYLVX4.js";
|
|
37
38
|
import {
|
|
38
39
|
DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS,
|
|
39
40
|
DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS,
|
|
@@ -49,7 +50,7 @@ import {
|
|
|
49
50
|
resolvePmRoot,
|
|
50
51
|
resolveRuntimeStatusRegistry,
|
|
51
52
|
toNonEmptyStringOrUndefined
|
|
52
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-I66WE2HE.js";
|
|
53
54
|
|
|
54
55
|
// dist/cli/commands/validate.js
|
|
55
56
|
import fs from "node:fs/promises";
|
|
@@ -911,61 +912,59 @@ function summarizeDuplicateIssueCodes(duplicates, verboseDiagnostics) {
|
|
|
911
912
|
warnings: [`${DUPLICATE_ISSUE_CODE_WARNING_TOKEN}:${duplicates.length}`]
|
|
912
913
|
};
|
|
913
914
|
}
|
|
914
|
-
function
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
915
|
+
function initializeMissingMetadataByField() {
|
|
916
|
+
return Object.fromEntries(SUPPORTED_METADATA_REQUIRED_FIELDS.map((field) => [field, []]));
|
|
917
|
+
}
|
|
918
|
+
function collectMissingMetadataByField(items, statusRegistry, enforcePlanningFieldsOnTerminal) {
|
|
919
|
+
const missingByField = initializeMissingMetadataByField();
|
|
918
920
|
for (const item of items) {
|
|
919
921
|
for (const field of SUPPORTED_METADATA_REQUIRED_FIELDS) {
|
|
920
|
-
if (
|
|
921
|
-
|
|
922
|
+
if (isMetadataFieldMissing(item, field, statusRegistry, enforcePlanningFieldsOnTerminal)) {
|
|
923
|
+
missingByField[field].push(item.id);
|
|
922
924
|
}
|
|
923
|
-
missingByField[field].push(item.id);
|
|
924
925
|
}
|
|
925
926
|
}
|
|
927
|
+
return missingByField;
|
|
928
|
+
}
|
|
929
|
+
function buildMetadataWarningTokens(metadataPolicy, missingByField, duplicateWarnings) {
|
|
926
930
|
const warningTokens = [...metadataPolicy.warnings];
|
|
927
931
|
for (const field of metadataPolicy.required_fields) {
|
|
928
932
|
const missingItems = missingByField[field];
|
|
929
|
-
if (missingItems.length
|
|
930
|
-
|
|
933
|
+
if (missingItems.length > 0) {
|
|
934
|
+
warningTokens.push(`${METADATA_WARNING_TOKEN_BY_FIELD[field]}:${missingItems.length}`);
|
|
931
935
|
}
|
|
932
|
-
warningTokens.push(`${METADATA_WARNING_TOKEN_BY_FIELD[field]}:${missingItems.length}`);
|
|
933
936
|
}
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
+
warningTokens.push(...duplicateWarnings);
|
|
938
|
+
return warningTokens;
|
|
939
|
+
}
|
|
940
|
+
function buildMetadataCounts(metadataPolicy, missingByField) {
|
|
937
941
|
const counts = {};
|
|
938
942
|
for (const field of metadataPolicy.required_fields) {
|
|
939
|
-
const
|
|
943
|
+
const missing = missingByField[field];
|
|
944
|
+
const value = missing ? missing.length : 0;
|
|
940
945
|
const countKey = METADATA_COUNT_KEY_BY_FIELD[field];
|
|
941
946
|
if (value > 0 && countKey) {
|
|
942
947
|
counts[countKey] = value;
|
|
943
948
|
}
|
|
944
949
|
}
|
|
945
|
-
|
|
950
|
+
return counts;
|
|
951
|
+
}
|
|
952
|
+
function buildMissingFieldOccurrences(metadataPolicy, missingByField, itemsById) {
|
|
953
|
+
const occurrences = [];
|
|
946
954
|
for (const field of metadataPolicy.required_fields) {
|
|
947
|
-
|
|
955
|
+
const missing = missingByField[field];
|
|
956
|
+
if (!missing) {
|
|
957
|
+
continue;
|
|
958
|
+
}
|
|
959
|
+
for (const itemId of missing) {
|
|
948
960
|
const itemType = itemsById.get(itemId)?.type;
|
|
949
|
-
|
|
961
|
+
const normalizedItemType = typeof itemType === "string" && itemType.length > 0 ? itemType : "Unknown";
|
|
962
|
+
occurrences.push({ item_type: normalizedItemType, field });
|
|
950
963
|
}
|
|
951
964
|
}
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
metadata_profile: metadataPolicy.profile,
|
|
956
|
-
metadata_profile_source: metadataPolicy.profile_source,
|
|
957
|
-
metadata_profile_fallback_to_core: metadataPolicy.fallback_to_core,
|
|
958
|
-
required_fields: [...metadataPolicy.required_fields],
|
|
959
|
-
supported_required_fields: [...SUPPORTED_METADATA_REQUIRED_FIELDS],
|
|
960
|
-
counts,
|
|
961
|
-
missing_by_type: missingByType,
|
|
962
|
-
duplicate_issue_codes_count: duplicateIssueCodes.length,
|
|
963
|
-
duplicate_issue_codes: duplicateIssueCodeSummary.rows,
|
|
964
|
-
duplicate_issue_codes_truncated: duplicateIssueCodeSummary.truncated
|
|
965
|
-
};
|
|
966
|
-
if (metadataPolicy.configured_custom_fields.length > 0) {
|
|
967
|
-
details.configured_custom_required_fields = [...metadataPolicy.configured_custom_fields];
|
|
968
|
-
}
|
|
965
|
+
return occurrences;
|
|
966
|
+
}
|
|
967
|
+
function attachMissingMetadataItemIds(details, metadataPolicy, missingByField, verboseDiagnostics) {
|
|
969
968
|
for (const field of metadataPolicy.required_fields) {
|
|
970
969
|
const missing = missingByField[field];
|
|
971
970
|
if (!missing || missing.length === 0) {
|
|
@@ -980,14 +979,62 @@ function buildMetadataCheck(items, metadataPolicy, statusRegistry, verboseDiagno
|
|
|
980
979
|
details[idsKey] = summarized.values;
|
|
981
980
|
details[truncatedKey] = summarized.truncated;
|
|
982
981
|
}
|
|
983
|
-
|
|
982
|
+
}
|
|
983
|
+
function buildCloseReasonBackfillRows(metadataPolicy, missingByField, itemsById) {
|
|
984
|
+
if (!metadataPolicy.required_fields.includes("close_reason")) {
|
|
985
|
+
return [];
|
|
986
|
+
}
|
|
987
|
+
const missing = missingByField.close_reason;
|
|
988
|
+
if (!missing) {
|
|
989
|
+
return [];
|
|
990
|
+
}
|
|
991
|
+
return missing.map((itemId) => ({
|
|
984
992
|
id: itemId,
|
|
985
993
|
resolution: toNonEmptyStringOrUndefined(itemsById.get(itemId)?.resolution)
|
|
986
|
-
}))
|
|
987
|
-
|
|
994
|
+
}));
|
|
995
|
+
}
|
|
996
|
+
function buildEstimateBackfillRows(metadataPolicy, missingByField, itemsById) {
|
|
997
|
+
if (!metadataPolicy.required_fields.includes("estimated_minutes")) {
|
|
998
|
+
return [];
|
|
999
|
+
}
|
|
1000
|
+
const missing = missingByField.estimated_minutes;
|
|
1001
|
+
if (!missing) {
|
|
1002
|
+
return [];
|
|
1003
|
+
}
|
|
1004
|
+
return missing.map((itemId) => ({
|
|
988
1005
|
id: itemId,
|
|
989
1006
|
type: toNonEmptyStringOrUndefined(itemsById.get(itemId)?.type)
|
|
990
|
-
}))
|
|
1007
|
+
}));
|
|
1008
|
+
}
|
|
1009
|
+
function buildMetadataCheck(items, metadataPolicy, statusRegistry, verboseDiagnostics) {
|
|
1010
|
+
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
1011
|
+
const enforcePlanningFieldsOnTerminal = metadataPolicy.profile === "strict";
|
|
1012
|
+
const missingByField = collectMissingMetadataByField(items, statusRegistry, enforcePlanningFieldsOnTerminal);
|
|
1013
|
+
const duplicateIssueCodes = findDuplicateIssueCodes(items);
|
|
1014
|
+
const duplicateIssueCodeSummary = summarizeDuplicateIssueCodes(duplicateIssueCodes, verboseDiagnostics);
|
|
1015
|
+
const warningTokens = buildMetadataWarningTokens(metadataPolicy, missingByField, duplicateIssueCodeSummary.warnings);
|
|
1016
|
+
const counts = buildMetadataCounts(metadataPolicy, missingByField);
|
|
1017
|
+
const missingFieldOccurrences = buildMissingFieldOccurrences(metadataPolicy, missingByField, itemsById);
|
|
1018
|
+
const missingByType = buildMissingByTypeCounts(missingFieldOccurrences);
|
|
1019
|
+
const details = {
|
|
1020
|
+
checked_items: items.length,
|
|
1021
|
+
metadata_profile: metadataPolicy.profile,
|
|
1022
|
+
metadata_profile_source: metadataPolicy.profile_source,
|
|
1023
|
+
metadata_profile_fallback_to_core: metadataPolicy.fallback_to_core,
|
|
1024
|
+
required_fields: [...metadataPolicy.required_fields],
|
|
1025
|
+
supported_required_fields: [...SUPPORTED_METADATA_REQUIRED_FIELDS],
|
|
1026
|
+
counts,
|
|
1027
|
+
missing_by_type: missingByType,
|
|
1028
|
+
duplicate_issue_codes_count: duplicateIssueCodes.length,
|
|
1029
|
+
duplicate_issue_codes: duplicateIssueCodeSummary.rows,
|
|
1030
|
+
duplicate_issue_codes_truncated: duplicateIssueCodeSummary.truncated
|
|
1031
|
+
};
|
|
1032
|
+
if (metadataPolicy.configured_custom_fields.length > 0) {
|
|
1033
|
+
details.configured_custom_required_fields = [...metadataPolicy.configured_custom_fields];
|
|
1034
|
+
}
|
|
1035
|
+
attachMissingMetadataItemIds(details, metadataPolicy, missingByField, verboseDiagnostics);
|
|
1036
|
+
const closeReasonBackfillRows = buildCloseReasonBackfillRows(metadataPolicy, missingByField, itemsById);
|
|
1037
|
+
const estimateBackfillRows = buildEstimateBackfillRows(metadataPolicy, missingByField, itemsById);
|
|
991
1038
|
return {
|
|
992
1039
|
check: {
|
|
993
1040
|
name: "metadata",
|
|
@@ -1228,6 +1275,24 @@ function sharedDirectoryPrefixLength(left, right) {
|
|
|
1228
1275
|
}
|
|
1229
1276
|
return count;
|
|
1230
1277
|
}
|
|
1278
|
+
function scoreOrphanOwnerCandidate(pathValue, linkedPath) {
|
|
1279
|
+
const linkedDir = directoryOf(linkedPath);
|
|
1280
|
+
const orphanDir = directoryOf(pathValue);
|
|
1281
|
+
const directoryPrefix = linkedPath.endsWith("/") ? linkedPath : `${linkedPath}/`;
|
|
1282
|
+
const isDirectoryPrefix = pathValue.startsWith(directoryPrefix);
|
|
1283
|
+
const sameDirectory = linkedDir.length > 0 && linkedDir === orphanDir;
|
|
1284
|
+
const sharedPrefixLength = sharedDirectoryPrefixLength(pathValue, linkedPath);
|
|
1285
|
+
if (!isDirectoryPrefix && !sameDirectory && sharedPrefixLength === 0) {
|
|
1286
|
+
return null;
|
|
1287
|
+
}
|
|
1288
|
+
if (isDirectoryPrefix) {
|
|
1289
|
+
return { score: linkedPath.length + 1e3, confidence: "path_prefix" };
|
|
1290
|
+
}
|
|
1291
|
+
return sameDirectory ? { score: sharedPrefixLength + 500, confidence: "same_directory" } : { score: sharedPrefixLength, confidence: "shared_directory" };
|
|
1292
|
+
}
|
|
1293
|
+
function shouldReplaceOrphanOwnerCandidate(best, item, score) {
|
|
1294
|
+
return best === void 0 || score > best.score || score === best.score && item.id.localeCompare(best.item.id) < 0;
|
|
1295
|
+
}
|
|
1231
1296
|
function findOrphanOwnerCandidate(pathValue, classification, items) {
|
|
1232
1297
|
const linkKind = classification === "docs_unowned" ? "docs" : "files";
|
|
1233
1298
|
let best;
|
|
@@ -1241,21 +1306,15 @@ function findOrphanOwnerCandidate(pathValue, classification, items) {
|
|
|
1241
1306
|
if (linkedPath.length === 0 || linkedPath === pathValue) {
|
|
1242
1307
|
continue;
|
|
1243
1308
|
}
|
|
1244
|
-
const
|
|
1245
|
-
|
|
1246
|
-
const directoryPrefix = linkedPath.endsWith("/") ? linkedPath : `${linkedPath}/`;
|
|
1247
|
-
const isDirectoryPrefix = pathValue.startsWith(directoryPrefix);
|
|
1248
|
-
const sameDirectory = linkedDir.length > 0 && linkedDir === orphanDir;
|
|
1249
|
-
const sharedPrefixLength = sharedDirectoryPrefixLength(pathValue, linkedPath);
|
|
1250
|
-
if (!isDirectoryPrefix && !sameDirectory && sharedPrefixLength === 0) {
|
|
1309
|
+
const scored = scoreOrphanOwnerCandidate(pathValue, linkedPath);
|
|
1310
|
+
if (scored === null) {
|
|
1251
1311
|
continue;
|
|
1252
1312
|
}
|
|
1253
|
-
|
|
1254
|
-
if (best === void 0 || score > best.score || score === best.score && item.id.localeCompare(best.item.id) < 0) {
|
|
1313
|
+
if (shouldReplaceOrphanOwnerCandidate(best, item, scored.score)) {
|
|
1255
1314
|
best = {
|
|
1256
1315
|
item,
|
|
1257
|
-
score,
|
|
1258
|
-
confidence:
|
|
1316
|
+
score: scored.score,
|
|
1317
|
+
confidence: scored.confidence
|
|
1259
1318
|
};
|
|
1260
1319
|
}
|
|
1261
1320
|
}
|
|
@@ -1288,74 +1347,74 @@ function buildOrphanedPathRows(orphanedFiles, items) {
|
|
|
1288
1347
|
function summarizeOrphanedPathRows(rows) {
|
|
1289
1348
|
return rows.map((row) => `${row.path}:${row.classification} owner_candidate=${row.owner_candidate?.id ?? "unowned"} hint=${JSON.stringify(row.remediation_hint)}`);
|
|
1290
1349
|
}
|
|
1291
|
-
function
|
|
1350
|
+
function closureLikeFieldsForItem(item, lifecyclePatternPolicy) {
|
|
1351
|
+
return Object.entries(lifecyclePatternPolicy.closure_like_metadata_field_patterns).filter(([field, patterns]) => {
|
|
1352
|
+
const value = toMeaningfulString(item[field]);
|
|
1353
|
+
return value ? patterns.some((pattern) => value.toLowerCase().includes(pattern)) : false;
|
|
1354
|
+
}).map(([field]) => field).sort((left, right) => left.localeCompare(right));
|
|
1355
|
+
}
|
|
1356
|
+
function buildTerminalParentFixRow(item, parent, itemsById, canonicalIdByLowercase, statusRegistry) {
|
|
1357
|
+
const grandparentId = toMeaningfulString(parent.parent);
|
|
1358
|
+
const grandparent = grandparentId ? itemsById.get(canonicalIdByLowercase.get(grandparentId.toLowerCase()) ?? grandparentId) : void 0;
|
|
1359
|
+
return {
|
|
1360
|
+
id: item.id,
|
|
1361
|
+
parent_id: parent.id,
|
|
1362
|
+
grandparent_id: grandparent?.id,
|
|
1363
|
+
grandparent_active: grandparent !== void 0 && !isTerminalStatus(grandparent.status, statusRegistry)
|
|
1364
|
+
};
|
|
1365
|
+
}
|
|
1366
|
+
function staleBlockerReasonsForItem(item, blockedStatuses, statusRegistry, lifecyclePatternPolicy) {
|
|
1367
|
+
const blockedBy = toMeaningfulString(item.blocked_by);
|
|
1368
|
+
const blockedReason = toMeaningfulString(item.blocked_reason);
|
|
1369
|
+
const blockedReasonNormalized = blockedReason?.toLowerCase();
|
|
1370
|
+
const normalizedStatus = normalizeStatusForRegistry(item.status, statusRegistry);
|
|
1371
|
+
const reasons = [];
|
|
1372
|
+
if (!blockedStatuses.has(normalizedStatus)) {
|
|
1373
|
+
if (blockedBy) {
|
|
1374
|
+
reasons.push("non_blocked_status_has_blocked_by");
|
|
1375
|
+
}
|
|
1376
|
+
if (blockedReason) {
|
|
1377
|
+
reasons.push("non_blocked_status_has_blocked_reason");
|
|
1378
|
+
}
|
|
1379
|
+
return reasons;
|
|
1380
|
+
}
|
|
1381
|
+
if (!blockedBy && !blockedReason) {
|
|
1382
|
+
reasons.push("blocked_status_missing_blocker_context");
|
|
1383
|
+
}
|
|
1384
|
+
if (blockedReasonNormalized?.includes("no active blocker")) {
|
|
1385
|
+
reasons.push("blocked_status_reason_reports_no_active_blocker");
|
|
1386
|
+
}
|
|
1387
|
+
if (blockedReasonNormalized && lifecyclePatternPolicy.stale_blocker_reason_patterns.some((pattern) => blockedReasonNormalized.includes(pattern))) {
|
|
1388
|
+
reasons.push("blocked_status_reason_matches_stale_pattern");
|
|
1389
|
+
}
|
|
1390
|
+
return reasons;
|
|
1391
|
+
}
|
|
1392
|
+
function collectLifecycleScanRows(items, includeStaleBlockers, statusRegistry, lifecyclePatternPolicy) {
|
|
1292
1393
|
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
1394
|
+
const canonicalIdByLowercase = new Map(items.map((item) => [item.id.toLowerCase(), item.id]));
|
|
1293
1395
|
const blockedStatuses = statusRegistry.blocked_statuses.size > 0 ? statusRegistry.blocked_statuses : /* @__PURE__ */ new Set(["blocked"]);
|
|
1294
|
-
const
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
return false;
|
|
1304
|
-
}
|
|
1305
|
-
const normalized = value.toLowerCase();
|
|
1306
|
-
return patterns.some((pattern) => normalized.includes(pattern));
|
|
1307
|
-
}).map(([field]) => field).sort((left, right) => left.localeCompare(right));
|
|
1396
|
+
const rows = {
|
|
1397
|
+
activeItems: items.filter((item) => !isTerminalStatus(item.status, statusRegistry)),
|
|
1398
|
+
closureLikeRows: [],
|
|
1399
|
+
terminalParentRows: [],
|
|
1400
|
+
terminalParentFixRows: [],
|
|
1401
|
+
staleBlockerRows: []
|
|
1402
|
+
};
|
|
1403
|
+
for (const item of rows.activeItems) {
|
|
1404
|
+
const closureLikeFields = closureLikeFieldsForItem(item, lifecyclePatternPolicy);
|
|
1308
1405
|
if (closureLikeFields.length > 0) {
|
|
1309
|
-
closureLikeRows.push({
|
|
1310
|
-
id: item.id,
|
|
1311
|
-
fields: closureLikeFields
|
|
1312
|
-
});
|
|
1406
|
+
rows.closureLikeRows.push({ id: item.id, fields: closureLikeFields });
|
|
1313
1407
|
}
|
|
1314
1408
|
const parentId = toMeaningfulString(item.parent);
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
id: item.id,
|
|
1320
|
-
parent_id: parent.id,
|
|
1321
|
-
parent_status: parent.status
|
|
1322
|
-
});
|
|
1323
|
-
const grandparentId = toMeaningfulString(parent.parent);
|
|
1324
|
-
const grandparent = grandparentId ? itemsById.get(grandparentId) : void 0;
|
|
1325
|
-
terminalParentFixRows.push({
|
|
1326
|
-
id: item.id,
|
|
1327
|
-
parent_id: parent.id,
|
|
1328
|
-
grandparent_id: grandparent?.id,
|
|
1329
|
-
grandparent_active: grandparent !== void 0 && !isTerminalStatus(grandparent.status, statusRegistry)
|
|
1330
|
-
});
|
|
1331
|
-
}
|
|
1409
|
+
const parent = parentId ? itemsById.get(canonicalIdByLowercase.get(parentId.toLowerCase()) ?? parentId) : void 0;
|
|
1410
|
+
if (parent && isTerminalStatus(parent.status, statusRegistry)) {
|
|
1411
|
+
rows.terminalParentRows.push({ id: item.id, parent_id: parent.id, parent_status: parent.status });
|
|
1412
|
+
rows.terminalParentFixRows.push(buildTerminalParentFixRow(item, parent, itemsById, canonicalIdByLowercase, statusRegistry));
|
|
1332
1413
|
}
|
|
1333
1414
|
if (includeStaleBlockers) {
|
|
1334
|
-
const
|
|
1335
|
-
const blockedReason = toMeaningfulString(item.blocked_reason);
|
|
1336
|
-
const blockedReasonNormalized = blockedReason?.toLowerCase();
|
|
1337
|
-
const reasons = [];
|
|
1338
|
-
const normalizedStatus = normalizeStatusForRegistry(item.status, statusRegistry);
|
|
1339
|
-
if (!blockedStatuses.has(normalizedStatus)) {
|
|
1340
|
-
if (blockedBy) {
|
|
1341
|
-
reasons.push("non_blocked_status_has_blocked_by");
|
|
1342
|
-
}
|
|
1343
|
-
if (blockedReason) {
|
|
1344
|
-
reasons.push("non_blocked_status_has_blocked_reason");
|
|
1345
|
-
}
|
|
1346
|
-
} else {
|
|
1347
|
-
if (!blockedBy && !blockedReason) {
|
|
1348
|
-
reasons.push("blocked_status_missing_blocker_context");
|
|
1349
|
-
}
|
|
1350
|
-
if (blockedReasonNormalized?.includes("no active blocker")) {
|
|
1351
|
-
reasons.push("blocked_status_reason_reports_no_active_blocker");
|
|
1352
|
-
}
|
|
1353
|
-
if (blockedReasonNormalized && lifecyclePatternPolicy.stale_blocker_reason_patterns.some((pattern) => blockedReasonNormalized.includes(pattern))) {
|
|
1354
|
-
reasons.push("blocked_status_reason_matches_stale_pattern");
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1415
|
+
const reasons = staleBlockerReasonsForItem(item, blockedStatuses, statusRegistry, lifecyclePatternPolicy);
|
|
1357
1416
|
if (reasons.length > 0) {
|
|
1358
|
-
staleBlockerRows.push({
|
|
1417
|
+
rows.staleBlockerRows.push({
|
|
1359
1418
|
id: item.id,
|
|
1360
1419
|
status: item.status,
|
|
1361
1420
|
reasons: [...new Set(reasons)].sort((left, right) => left.localeCompare(right))
|
|
@@ -1363,32 +1422,117 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
1363
1422
|
}
|
|
1364
1423
|
}
|
|
1365
1424
|
}
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1425
|
+
return rows;
|
|
1426
|
+
}
|
|
1427
|
+
function sortLifecycleScanRows(rows) {
|
|
1428
|
+
rows.closureLikeRows.sort((left, right) => left.id.localeCompare(right.id));
|
|
1429
|
+
rows.terminalParentRows.sort((left, right) => left.id.localeCompare(right.id) || left.parent_id.localeCompare(right.parent_id));
|
|
1430
|
+
rows.terminalParentFixRows.sort((left, right) => left.id.localeCompare(right.id) || left.parent_id.localeCompare(right.parent_id));
|
|
1431
|
+
rows.staleBlockerRows.sort((left, right) => left.id.localeCompare(right.id));
|
|
1432
|
+
}
|
|
1433
|
+
function lifecycleCycleWarningToken(prefix, severity, count) {
|
|
1434
|
+
if (count <= 0 || severity === "off") {
|
|
1435
|
+
return null;
|
|
1436
|
+
}
|
|
1437
|
+
return `${severity === "error" ? `${prefix}_error` : prefix}:${count}`;
|
|
1438
|
+
}
|
|
1439
|
+
function buildLifecycleWarnings(rows, includeStaleBlockers, dependencyCycleSeverity, parentCycleSeverity, dependencyCycleCount, parentCycleCount) {
|
|
1372
1440
|
const warnings = [];
|
|
1373
|
-
if (closureLikeRows.length > 0) {
|
|
1374
|
-
warnings.push(`validate_lifecycle_active_closure_like_metadata:${closureLikeRows.length}`);
|
|
1441
|
+
if (rows.closureLikeRows.length > 0) {
|
|
1442
|
+
warnings.push(`validate_lifecycle_active_closure_like_metadata:${rows.closureLikeRows.length}`);
|
|
1375
1443
|
}
|
|
1376
|
-
if (terminalParentRows.length > 0) {
|
|
1377
|
-
warnings.push(`validate_lifecycle_active_terminal_parent:${terminalParentRows.length}`);
|
|
1444
|
+
if (rows.terminalParentRows.length > 0) {
|
|
1445
|
+
warnings.push(`validate_lifecycle_active_terminal_parent:${rows.terminalParentRows.length}`);
|
|
1378
1446
|
}
|
|
1379
|
-
if (includeStaleBlockers && staleBlockerRows.length > 0) {
|
|
1380
|
-
warnings.push(`validate_lifecycle_stale_blockers:${staleBlockerRows.length}`);
|
|
1447
|
+
if (includeStaleBlockers && rows.staleBlockerRows.length > 0) {
|
|
1448
|
+
warnings.push(`validate_lifecycle_stale_blockers:${rows.staleBlockerRows.length}`);
|
|
1381
1449
|
}
|
|
1382
|
-
|
|
1383
|
-
|
|
1450
|
+
const dependencyWarning = lifecycleCycleWarningToken("validate_lifecycle_dependency_cycles", dependencyCycleSeverity, dependencyCycleCount);
|
|
1451
|
+
const parentWarning = lifecycleCycleWarningToken("validate_hierarchy_parent_cycle", parentCycleSeverity, parentCycleCount);
|
|
1452
|
+
return [...warnings, ...dependencyWarning ? [dependencyWarning] : [], ...parentWarning ? [parentWarning] : []];
|
|
1453
|
+
}
|
|
1454
|
+
async function linkedArtifactIsMissing(workspaceRoot, artifactPath) {
|
|
1455
|
+
const absolutePath = path.isAbsolute(artifactPath) ? artifactPath : path.resolve(workspaceRoot, artifactPath);
|
|
1456
|
+
try {
|
|
1457
|
+
const stats = await fs.stat(absolutePath);
|
|
1458
|
+
return !stats.isFile() && !stats.isDirectory();
|
|
1459
|
+
} catch (error) {
|
|
1460
|
+
const code = typeof error === "object" && error !== null && "code" in error ? error.code : void 0;
|
|
1461
|
+
return code === "ENOENT" || code === "ENOTDIR";
|
|
1384
1462
|
}
|
|
1385
|
-
|
|
1386
|
-
|
|
1463
|
+
}
|
|
1464
|
+
async function collectLinkedPathScanState(items, workspaceRoot) {
|
|
1465
|
+
const state = {
|
|
1466
|
+
linkedProjectPaths: /* @__PURE__ */ new Set(),
|
|
1467
|
+
remoteLinkedPaths: /* @__PURE__ */ new Set(),
|
|
1468
|
+
missingLinkedPaths: [],
|
|
1469
|
+
staleLinkRows: []
|
|
1470
|
+
};
|
|
1471
|
+
for (const item of items) {
|
|
1472
|
+
const linkedArtifactGroups = [
|
|
1473
|
+
{ link_kind: "files", artifacts: item.files ?? [] },
|
|
1474
|
+
{ link_kind: "docs", artifacts: item.docs ?? [] }
|
|
1475
|
+
];
|
|
1476
|
+
for (const group of linkedArtifactGroups) {
|
|
1477
|
+
for (const artifact of group.artifacts) {
|
|
1478
|
+
if (artifact.scope !== "project") {
|
|
1479
|
+
continue;
|
|
1480
|
+
}
|
|
1481
|
+
if (isRemoteLinkedArtifactReference(artifact.path)) {
|
|
1482
|
+
state.remoteLinkedPaths.add(artifact.path.trim());
|
|
1483
|
+
continue;
|
|
1484
|
+
}
|
|
1485
|
+
const normalizedPath = normalizeRelativePath(artifact.path);
|
|
1486
|
+
if (normalizedPath.length === 0) {
|
|
1487
|
+
continue;
|
|
1488
|
+
}
|
|
1489
|
+
state.linkedProjectPaths.add(normalizedPath);
|
|
1490
|
+
if (await linkedArtifactIsMissing(workspaceRoot, artifact.path)) {
|
|
1491
|
+
state.missingLinkedPaths.push(normalizedPath);
|
|
1492
|
+
state.staleLinkRows.push({ item_id: item.id, path: normalizedPath, link_kind: group.link_kind });
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
return state;
|
|
1498
|
+
}
|
|
1499
|
+
function partitionFileCandidates(fileCandidates, pmRoot, workspaceRoot, fileScanMode, includePmInternals, verboseFileLists) {
|
|
1500
|
+
const strictTrackedAllMode = fileScanMode === "tracked-all-strict";
|
|
1501
|
+
const strictModeForcesPmInternals = strictTrackedAllMode && !includePmInternals;
|
|
1502
|
+
const includePmInternalsEffective = includePmInternals || strictTrackedAllMode;
|
|
1503
|
+
const pmInternalCandidatePrefixes = includePmInternalsEffective ? [] : resolvePmInternalCandidatePrefixes(pmRoot, workspaceRoot);
|
|
1504
|
+
const excludedPmInternalPaths = pmInternalCandidatePrefixes.length === 0 ? [] : fileCandidates.candidateFiles.filter((candidate) => hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1505
|
+
const candidateFiles = pmInternalCandidatePrefixes.length === 0 ? fileCandidates.candidateFiles : fileCandidates.candidateFiles.filter((candidate) => !hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1506
|
+
const excludedByReason = {};
|
|
1507
|
+
if (excludedPmInternalPaths.length > 0) {
|
|
1508
|
+
const summarizedPmInternalPaths = summarizeFileList(excludedPmInternalPaths, verboseFileLists);
|
|
1509
|
+
excludedByReason.pm_internals = {
|
|
1510
|
+
count: excludedPmInternalPaths.length,
|
|
1511
|
+
paths: summarizedPmInternalPaths.values,
|
|
1512
|
+
paths_truncated: summarizedPmInternalPaths.truncated,
|
|
1513
|
+
paths_total: summarizedPmInternalPaths.total
|
|
1514
|
+
};
|
|
1387
1515
|
}
|
|
1516
|
+
return {
|
|
1517
|
+
strictTrackedAllMode,
|
|
1518
|
+
strictModeForcesPmInternals,
|
|
1519
|
+
includePmInternalsEffective,
|
|
1520
|
+
pmInternalCandidatePrefixes,
|
|
1521
|
+
excludedPmInternalPaths,
|
|
1522
|
+
candidateFiles,
|
|
1523
|
+
excludedByReason
|
|
1524
|
+
};
|
|
1525
|
+
}
|
|
1526
|
+
function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverity, parentCycleSeverity, statusRegistry, lifecyclePatternPolicy, verboseDiagnostics, idPrefix = "pm") {
|
|
1527
|
+
const rows = collectLifecycleScanRows(items, includeStaleBlockers, statusRegistry, lifecyclePatternPolicy);
|
|
1528
|
+
sortLifecycleScanRows(rows);
|
|
1529
|
+
const dependencyCycleDiagnostics = detectLifecycleDependencyCycles(rows.activeItems, idPrefix);
|
|
1530
|
+
const parentCycleDiagnostics = detectLifecycleParentCycles(items);
|
|
1531
|
+
const warnings = buildLifecycleWarnings(rows, includeStaleBlockers, dependencyCycleSeverity, parentCycleSeverity, dependencyCycleDiagnostics.cycle_count, parentCycleDiagnostics.cycle_count);
|
|
1388
1532
|
const diagnosticLimit = verboseDiagnostics ? Number.POSITIVE_INFINITY : DIAGNOSTIC_LIST_SUMMARY_LIMIT;
|
|
1389
|
-
const summarizedClosureLikeRows = summarizeList(closureLikeRows.map((row) => `${row.id}:${row.fields.join(",")}`), diagnosticLimit);
|
|
1390
|
-
const summarizedTerminalParentRows = summarizeList(terminalParentRows.map((row) => `${row.id}:${row.parent_id}:${row.parent_status}`), diagnosticLimit);
|
|
1391
|
-
const summarizedStaleBlockerRows = summarizeList(staleBlockerRows.map((row) => `${row.id}:${row.status}:${row.reasons.join(",")}`), diagnosticLimit);
|
|
1533
|
+
const summarizedClosureLikeRows = summarizeList(rows.closureLikeRows.map((row) => `${row.id}:${row.fields.join(",")}`), diagnosticLimit);
|
|
1534
|
+
const summarizedTerminalParentRows = summarizeList(rows.terminalParentRows.map((row) => `${row.id}:${row.parent_id}:${row.parent_status}`), diagnosticLimit);
|
|
1535
|
+
const summarizedStaleBlockerRows = summarizeList(rows.staleBlockerRows.map((row) => `${row.id}:${row.status}:${row.reasons.join(",")}`), diagnosticLimit);
|
|
1392
1536
|
const summarizedDependencyCycleItemIds = summarizeList(dependencyCycleDiagnostics.cycle_item_ids, diagnosticLimit);
|
|
1393
1537
|
const summarizedDependencyCycleSamplePaths = summarizeList(dependencyCycleDiagnostics.cycle_sample_paths, diagnosticLimit);
|
|
1394
1538
|
const summarizedParentCycleItemIds = summarizeList(parentCycleDiagnostics.cycle_item_ids, diagnosticLimit);
|
|
@@ -1399,15 +1543,15 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
1399
1543
|
name: "lifecycle",
|
|
1400
1544
|
status: hasErrorSeverityCycle ? "error" : warnings.length === 0 ? "ok" : "warn",
|
|
1401
1545
|
details: {
|
|
1402
|
-
checked_active_items: activeItems.length,
|
|
1403
|
-
active_closure_like_metadata_items: closureLikeRows.length,
|
|
1546
|
+
checked_active_items: rows.activeItems.length,
|
|
1547
|
+
active_closure_like_metadata_items: rows.closureLikeRows.length,
|
|
1404
1548
|
active_closure_like_metadata_rows: summarizedClosureLikeRows.values,
|
|
1405
1549
|
active_closure_like_metadata_rows_truncated: summarizedClosureLikeRows.truncated,
|
|
1406
|
-
active_terminal_parent_items: terminalParentRows.length,
|
|
1550
|
+
active_terminal_parent_items: rows.terminalParentRows.length,
|
|
1407
1551
|
active_terminal_parent_rows: summarizedTerminalParentRows.values,
|
|
1408
1552
|
active_terminal_parent_rows_truncated: summarizedTerminalParentRows.truncated,
|
|
1409
1553
|
stale_blocker_checks_enabled: includeStaleBlockers,
|
|
1410
|
-
stale_blocker_items: staleBlockerRows.length,
|
|
1554
|
+
stale_blocker_items: rows.staleBlockerRows.length,
|
|
1411
1555
|
stale_blocker_rows: summarizedStaleBlockerRows.values,
|
|
1412
1556
|
stale_blocker_rows_truncated: summarizedStaleBlockerRows.truncated,
|
|
1413
1557
|
dependency_cycle_severity_policy: dependencyCycleSeverity,
|
|
@@ -1437,81 +1581,26 @@ function buildLifecycleCheck(items, includeStaleBlockers, dependencyCycleSeverit
|
|
|
1437
1581
|
}
|
|
1438
1582
|
},
|
|
1439
1583
|
warnings,
|
|
1440
|
-
terminalParentFixRows
|
|
1584
|
+
terminalParentFixRows: rows.terminalParentFixRows
|
|
1441
1585
|
};
|
|
1442
1586
|
}
|
|
1443
1587
|
async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, includePmInternals, verboseFileLists) {
|
|
1444
|
-
const
|
|
1445
|
-
const remoteLinkedPaths = /* @__PURE__ */ new Set();
|
|
1446
|
-
const missingLinkedPaths = [];
|
|
1447
|
-
const staleLinkRows = [];
|
|
1588
|
+
const linkedPathState = await collectLinkedPathScanState(items, workspaceRoot);
|
|
1448
1589
|
const itemsById = new Map(items.map((item) => [item.id, item]));
|
|
1449
|
-
|
|
1450
|
-
const linkedArtifactGroups = [
|
|
1451
|
-
{ link_kind: "files", artifacts: item.files ?? [] },
|
|
1452
|
-
{ link_kind: "docs", artifacts: item.docs ?? [] }
|
|
1453
|
-
];
|
|
1454
|
-
for (const group of linkedArtifactGroups) {
|
|
1455
|
-
for (const artifact of group.artifacts) {
|
|
1456
|
-
if (artifact.scope !== "project") {
|
|
1457
|
-
continue;
|
|
1458
|
-
}
|
|
1459
|
-
if (isRemoteLinkedArtifactReference(artifact.path)) {
|
|
1460
|
-
remoteLinkedPaths.add(artifact.path.trim());
|
|
1461
|
-
continue;
|
|
1462
|
-
}
|
|
1463
|
-
const normalizedPath = normalizeRelativePath(artifact.path);
|
|
1464
|
-
if (normalizedPath.length === 0) {
|
|
1465
|
-
continue;
|
|
1466
|
-
}
|
|
1467
|
-
linkedProjectPaths.add(normalizedPath);
|
|
1468
|
-
const absolutePath = path.isAbsolute(artifact.path) ? artifact.path : path.resolve(workspaceRoot, artifact.path);
|
|
1469
|
-
let missing = false;
|
|
1470
|
-
try {
|
|
1471
|
-
const stats = await fs.stat(absolutePath);
|
|
1472
|
-
if (!stats.isFile() && !stats.isDirectory()) {
|
|
1473
|
-
missing = true;
|
|
1474
|
-
}
|
|
1475
|
-
} catch {
|
|
1476
|
-
missing = true;
|
|
1477
|
-
}
|
|
1478
|
-
if (missing) {
|
|
1479
|
-
missingLinkedPaths.push(normalizedPath);
|
|
1480
|
-
staleLinkRows.push({ item_id: item.id, path: normalizedPath, link_kind: group.link_kind });
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
}
|
|
1485
|
-
const uniqueMissingLinkedPaths = [...new Set(missingLinkedPaths)].sort((left, right) => left.localeCompare(right));
|
|
1590
|
+
const uniqueMissingLinkedPaths = [...new Set(linkedPathState.missingLinkedPaths)].sort((left, right) => left.localeCompare(right));
|
|
1486
1591
|
const fileCandidates = await collectProjectFileCandidates(workspaceRoot, fileScanMode);
|
|
1487
|
-
const
|
|
1488
|
-
const
|
|
1489
|
-
const includePmInternalsEffective = includePmInternals || strictTrackedAllMode;
|
|
1490
|
-
const pmInternalCandidatePrefixes = includePmInternalsEffective ? [] : resolvePmInternalCandidatePrefixes(pmRoot, workspaceRoot);
|
|
1491
|
-
const excludedPmInternalPaths = pmInternalCandidatePrefixes.length === 0 ? [] : fileCandidates.candidateFiles.filter((candidate) => hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1492
|
-
const candidateFiles = pmInternalCandidatePrefixes.length === 0 ? fileCandidates.candidateFiles : fileCandidates.candidateFiles.filter((candidate) => !hasPathPrefix(candidate, pmInternalCandidatePrefixes));
|
|
1493
|
-
const excludedPmInternalCount = excludedPmInternalPaths.length;
|
|
1494
|
-
const excludedByReason = {};
|
|
1495
|
-
if (excludedPmInternalCount > 0) {
|
|
1496
|
-
const summarizedPmInternalPaths = summarizeFileList(excludedPmInternalPaths, verboseFileLists);
|
|
1497
|
-
excludedByReason.pm_internals = {
|
|
1498
|
-
count: excludedPmInternalCount,
|
|
1499
|
-
paths: summarizedPmInternalPaths.values,
|
|
1500
|
-
paths_truncated: summarizedPmInternalPaths.truncated,
|
|
1501
|
-
paths_total: summarizedPmInternalPaths.total
|
|
1502
|
-
};
|
|
1503
|
-
}
|
|
1504
|
-
const orphanedFiles = candidateFiles.filter((candidate) => !linkedProjectPaths.has(candidate));
|
|
1592
|
+
const partition = partitionFileCandidates(fileCandidates, pmRoot, workspaceRoot, fileScanMode, includePmInternals, verboseFileLists);
|
|
1593
|
+
const orphanedFiles = partition.candidateFiles.filter((candidate) => !linkedPathState.linkedProjectPaths.has(candidate));
|
|
1505
1594
|
const orphanedPathRows = buildOrphanedPathRows(orphanedFiles, items);
|
|
1506
|
-
const classifiedStalePaths = classifyStaleLinkedPaths(uniqueMissingLinkedPaths, candidateFiles);
|
|
1595
|
+
const classifiedStalePaths = classifyStaleLinkedPaths(uniqueMissingLinkedPaths, partition.candidateFiles);
|
|
1507
1596
|
const classificationByPath = new Map(classifiedStalePaths.map((entry) => [entry.path, entry.classification]));
|
|
1508
1597
|
const movedStalePathCount = classifiedStalePaths.filter((entry) => entry.classification === "moved").length;
|
|
1509
|
-
const staleLinkPruneRows = staleLinkRows.map((row) => ({
|
|
1598
|
+
const staleLinkPruneRows = linkedPathState.staleLinkRows.map((row) => ({
|
|
1510
1599
|
...row,
|
|
1511
1600
|
classification: classificationByPath.get(row.path) ?? "deleted"
|
|
1512
1601
|
})).sort((left, right) => left.item_id.localeCompare(right.item_id) || left.path.localeCompare(right.path) || left.link_kind.localeCompare(right.link_kind));
|
|
1513
1602
|
const warnings = [];
|
|
1514
|
-
if (strictModeForcesPmInternals) {
|
|
1603
|
+
if (partition.strictModeForcesPmInternals) {
|
|
1515
1604
|
warnings.push("validate_files_tracked_all_strict_forces_pm_internals");
|
|
1516
1605
|
}
|
|
1517
1606
|
if (uniqueMissingLinkedPaths.length > 0) {
|
|
@@ -1520,7 +1609,7 @@ async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, inclu
|
|
|
1520
1609
|
if (orphanedFiles.length > 0) {
|
|
1521
1610
|
warnings.push(`validate_files_orphaned_paths:${orphanedFiles.length}`);
|
|
1522
1611
|
}
|
|
1523
|
-
const uniqueRemoteLinkedPaths = [...remoteLinkedPaths].sort((left, right) => left.localeCompare(right));
|
|
1612
|
+
const uniqueRemoteLinkedPaths = [...linkedPathState.remoteLinkedPaths].sort((left, right) => left.localeCompare(right));
|
|
1524
1613
|
const summarizedRemote = summarizeFileList(uniqueRemoteLinkedPaths, verboseFileLists);
|
|
1525
1614
|
const summarizedMissing = summarizeFileList(uniqueMissingLinkedPaths, verboseFileLists);
|
|
1526
1615
|
const summarizedOrphaned = summarizeFileList(orphanedFiles, verboseFileLists);
|
|
@@ -1546,28 +1635,28 @@ async function buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, inclu
|
|
|
1546
1635
|
workspace_root: workspaceRoot,
|
|
1547
1636
|
scan_mode_requested: fileCandidates.requestedMode,
|
|
1548
1637
|
scan_mode_applied: fileCandidates.appliedMode,
|
|
1549
|
-
strict_tracked_all_mode: strictTrackedAllMode,
|
|
1550
|
-
strict_mode_forces_pm_internals: strictModeForcesPmInternals,
|
|
1551
|
-
strict_mode_forces_pm_internals_notice: strictModeForcesPmInternals ? "tracked-all-strict force-enables PM internals; pass --include-pm-internals to make inclusion explicit." : null,
|
|
1638
|
+
strict_tracked_all_mode: partition.strictTrackedAllMode,
|
|
1639
|
+
strict_mode_forces_pm_internals: partition.strictModeForcesPmInternals,
|
|
1640
|
+
strict_mode_forces_pm_internals_notice: partition.strictModeForcesPmInternals ? "tracked-all-strict force-enables PM internals; pass --include-pm-internals to make inclusion explicit." : null,
|
|
1552
1641
|
file_list_detail_mode: verboseFileLists ? "full" : "summary",
|
|
1553
1642
|
file_list_summary_limit: FILE_LIST_SUMMARY_LIMIT,
|
|
1554
1643
|
candidate_scan_source: fileCandidates.source,
|
|
1555
|
-
include_pm_internals: includePmInternalsEffective,
|
|
1644
|
+
include_pm_internals: partition.includePmInternalsEffective,
|
|
1556
1645
|
include_pm_internals_requested: includePmInternals,
|
|
1557
|
-
pm_internal_candidate_prefixes: pmInternalCandidatePrefixes,
|
|
1558
|
-
pm_internal_excluded_count:
|
|
1559
|
-
excluded_total:
|
|
1560
|
-
excluded_by_reason: excludedByReason,
|
|
1561
|
-
linked_project_paths: linkedProjectPaths.size,
|
|
1646
|
+
pm_internal_candidate_prefixes: partition.pmInternalCandidatePrefixes,
|
|
1647
|
+
pm_internal_excluded_count: partition.excludedPmInternalPaths.length,
|
|
1648
|
+
excluded_total: partition.excludedPmInternalPaths.length,
|
|
1649
|
+
excluded_by_reason: partition.excludedByReason,
|
|
1650
|
+
linked_project_paths: linkedPathState.linkedProjectPaths.size,
|
|
1562
1651
|
remote_linked_paths_count: uniqueRemoteLinkedPaths.length,
|
|
1563
1652
|
remote_linked_paths_total: summarizedRemote.total,
|
|
1564
1653
|
remote_linked_paths: summarizedRemote.values,
|
|
1565
1654
|
remote_linked_paths_truncated: summarizedRemote.truncated,
|
|
1566
1655
|
candidate_total_raw: fileCandidates.candidateTotal,
|
|
1567
1656
|
candidate_scanned_raw: fileCandidates.candidateScanned,
|
|
1568
|
-
candidate_total: candidateFiles.length,
|
|
1569
|
-
candidate_scanned: candidateFiles.length,
|
|
1570
|
-
scanned_candidate_files: candidateFiles.length,
|
|
1657
|
+
candidate_total: partition.candidateFiles.length,
|
|
1658
|
+
candidate_scanned: partition.candidateFiles.length,
|
|
1659
|
+
scanned_candidate_files: partition.candidateFiles.length,
|
|
1571
1660
|
missing_linked_paths_count: uniqueMissingLinkedPaths.length,
|
|
1572
1661
|
missing_linked_paths_total: summarizedMissing.total,
|
|
1573
1662
|
missing_linked_paths: summarizedMissing.values,
|
|
@@ -1727,7 +1816,7 @@ async function applyValidateFix(fix, global) {
|
|
|
1727
1816
|
case "set_estimate":
|
|
1728
1817
|
case "reparent":
|
|
1729
1818
|
case "unset_parent": {
|
|
1730
|
-
const { runUpdate } = await import("./update-
|
|
1819
|
+
const { runUpdate } = await import("./update-Y5WQVT5O.js");
|
|
1731
1820
|
const updateOptions = { message: VALIDATE_AUTO_FIX_MESSAGE };
|
|
1732
1821
|
if (fix.kind === "set_resolution") {
|
|
1733
1822
|
updateOptions.resolution = fix.value;
|
|
@@ -1787,10 +1876,10 @@ async function applyValidateFixes(applicable, global) {
|
|
|
1787
1876
|
const remove = batch.map((fix) => fix.path).filter((value) => typeof value === "string" && value.length > 0);
|
|
1788
1877
|
try {
|
|
1789
1878
|
if (first.kind === "prune_file_link") {
|
|
1790
|
-
const { runFiles } = await import("./files-
|
|
1879
|
+
const { runFiles } = await import("./files-5D65CHGE.js");
|
|
1791
1880
|
await runFiles(first.item_id, { remove, message: VALIDATE_AUTO_FIX_MESSAGE }, global);
|
|
1792
1881
|
} else {
|
|
1793
|
-
const { runDocs } = await import("./docs-
|
|
1882
|
+
const { runDocs } = await import("./docs-RPOVFMP3.js");
|
|
1794
1883
|
await runDocs(first.item_id, { remove, message: VALIDATE_AUTO_FIX_MESSAGE }, global);
|
|
1795
1884
|
}
|
|
1796
1885
|
applied.push(...batch);
|
|
@@ -1805,10 +1894,14 @@ var _testOnlyValidateCommand = {
|
|
|
1805
1894
|
applyValidateFixes,
|
|
1806
1895
|
attachValidateFixHints,
|
|
1807
1896
|
buildCommandReferencesCheck,
|
|
1897
|
+
buildCloseReasonBackfillRows,
|
|
1808
1898
|
buildFilesCheck,
|
|
1809
1899
|
buildLifecycleCheck,
|
|
1810
1900
|
buildLifecycleDependencyGraph,
|
|
1811
1901
|
buildLifecycleParentGraph,
|
|
1902
|
+
buildEstimateBackfillRows,
|
|
1903
|
+
buildMetadataCounts,
|
|
1904
|
+
buildMissingFieldOccurrences,
|
|
1812
1905
|
buildOrphanedPathRows,
|
|
1813
1906
|
classifyOrphanedPath,
|
|
1814
1907
|
collectDefaultProjectFileCandidates,
|
|
@@ -1832,6 +1925,105 @@ var _testOnlyValidateCommand = {
|
|
|
1832
1925
|
summarizeDuplicateIssueCodes,
|
|
1833
1926
|
toMeaningfulString
|
|
1834
1927
|
};
|
|
1928
|
+
function recordValidateCheck(state, built, fixHintsEnabled) {
|
|
1929
|
+
if (fixHintsEnabled) {
|
|
1930
|
+
attachValidateFixHints(built.check, built.warnings);
|
|
1931
|
+
}
|
|
1932
|
+
state.checks.push(built.check);
|
|
1933
|
+
state.warnings.push(...built.warnings);
|
|
1934
|
+
}
|
|
1935
|
+
async function executeRequestedValidateChecks(params) {
|
|
1936
|
+
const state = {
|
|
1937
|
+
checks: [],
|
|
1938
|
+
warnings: [...params.initialWarnings],
|
|
1939
|
+
closeReasonBackfillRows: [],
|
|
1940
|
+
estimateBackfillRows: [],
|
|
1941
|
+
resolutionBackfillRows: [],
|
|
1942
|
+
terminalParentFixRows: [],
|
|
1943
|
+
staleLinkPruneRows: []
|
|
1944
|
+
};
|
|
1945
|
+
const fixHintsEnabled = params.options.fixHints === true;
|
|
1946
|
+
const fullDiagnostics = params.options.verboseDiagnostics === true || params.options.allAffectedIds === true || params.global.json === true;
|
|
1947
|
+
if (params.requestedChecks.has("metadata")) {
|
|
1948
|
+
const built = buildMetadataCheck(params.items, params.metadataPolicy, params.statusRegistry, fullDiagnostics);
|
|
1949
|
+
state.closeReasonBackfillRows = built.closeReasonBackfillRows;
|
|
1950
|
+
state.estimateBackfillRows = built.estimateBackfillRows;
|
|
1951
|
+
recordValidateCheck(state, built, fixHintsEnabled);
|
|
1952
|
+
}
|
|
1953
|
+
if (params.requestedChecks.has("resolution")) {
|
|
1954
|
+
const built = buildResolutionCheck(params.items, params.statusRegistry, fullDiagnostics);
|
|
1955
|
+
state.resolutionBackfillRows = built.resolutionBackfillRows;
|
|
1956
|
+
recordValidateCheck(state, built, fixHintsEnabled);
|
|
1957
|
+
}
|
|
1958
|
+
if (params.requestedChecks.has("lifecycle")) {
|
|
1959
|
+
const built = buildLifecycleCheck(params.items, Boolean(params.options.checkStaleBlockers), params.dependencyCycleSeverity, params.parentCycleSeverity, params.statusRegistry, params.lifecyclePatternPolicy, fullDiagnostics, params.settings.id_prefix);
|
|
1960
|
+
state.terminalParentFixRows = built.terminalParentFixRows;
|
|
1961
|
+
recordValidateCheck(state, built, fixHintsEnabled);
|
|
1962
|
+
}
|
|
1963
|
+
if (params.requestedChecks.has("files")) {
|
|
1964
|
+
const built = await buildFilesCheck(params.items, params.workspaceRoot, params.pmRoot, params.fileScanMode, Boolean(params.options.includePmInternals), Boolean(params.options.verboseFileLists));
|
|
1965
|
+
state.staleLinkPruneRows = built.staleLinkPruneRows;
|
|
1966
|
+
recordValidateCheck(state, built, fixHintsEnabled);
|
|
1967
|
+
}
|
|
1968
|
+
if (params.requestedChecks.has("command_references")) {
|
|
1969
|
+
recordValidateCheck(state, buildCommandReferencesCheck(params.items, params.settings.id_prefix, fullDiagnostics), fixHintsEnabled);
|
|
1970
|
+
}
|
|
1971
|
+
if (params.requestedChecks.has("history_drift")) {
|
|
1972
|
+
recordValidateCheck(state, await buildHistoryDriftCheck(params.pmRoot, params.items, fullDiagnostics), fixHintsEnabled);
|
|
1973
|
+
}
|
|
1974
|
+
if (params.requestedChecks.has("format_version")) {
|
|
1975
|
+
recordValidateCheck(state, buildFormatVersionCheck(params.items, fullDiagnostics), fixHintsEnabled);
|
|
1976
|
+
}
|
|
1977
|
+
return state;
|
|
1978
|
+
}
|
|
1979
|
+
function planValidateFixes(options, state, settings) {
|
|
1980
|
+
const planned = [];
|
|
1981
|
+
if (options.autoFix === true) {
|
|
1982
|
+
planned.push(...planCloseReasonBackfillFixes(state.closeReasonBackfillRows));
|
|
1983
|
+
planned.push(...planResolutionBackfillFixes(state.resolutionBackfillRows));
|
|
1984
|
+
planned.push(...planEstimateBackfillFixes(state.estimateBackfillRows, settings.validation.estimate_defaults_by_type));
|
|
1985
|
+
planned.push(...planTerminalParentFixes(state.terminalParentFixRows));
|
|
1986
|
+
}
|
|
1987
|
+
if (options.pruneMissing === true) {
|
|
1988
|
+
planned.push(...planStaleLinkPruneFixes(state.staleLinkPruneRows));
|
|
1989
|
+
}
|
|
1990
|
+
return planned;
|
|
1991
|
+
}
|
|
1992
|
+
async function buildValidateFixesSummary(options, state, settings, grantedFixScopes, global) {
|
|
1993
|
+
if (options.autoFix !== true && options.pruneMissing !== true) {
|
|
1994
|
+
return void 0;
|
|
1995
|
+
}
|
|
1996
|
+
const planned = planValidateFixes(options, state, settings);
|
|
1997
|
+
const { applicable, gated } = partitionFixesByGrant(planned, grantedFixScopes);
|
|
1998
|
+
const dryRun = options.dryRun === true;
|
|
1999
|
+
const appliedFixRows = [];
|
|
2000
|
+
const failedFixRows = [];
|
|
2001
|
+
if (!dryRun) {
|
|
2002
|
+
const applied = await applyValidateFixes(applicable, global);
|
|
2003
|
+
appliedFixRows.push(...applied.applied.map(toFixOutputRow));
|
|
2004
|
+
failedFixRows.push(...applied.failed.map(({ fix, error }) => ({
|
|
2005
|
+
...toFixOutputRow(fix),
|
|
2006
|
+
error: error instanceof Error ? error.message : String(error)
|
|
2007
|
+
})));
|
|
2008
|
+
}
|
|
2009
|
+
return {
|
|
2010
|
+
mode: dryRun ? "dry_run" : "apply",
|
|
2011
|
+
auto_fix: options.autoFix === true,
|
|
2012
|
+
prune_missing: options.pruneMissing === true,
|
|
2013
|
+
granted_fix_scopes: [...grantedFixScopes].sort((left, right) => left.localeCompare(right)),
|
|
2014
|
+
planned_count: planned.length,
|
|
2015
|
+
applied_count: appliedFixRows.length,
|
|
2016
|
+
gated_count: gated.length,
|
|
2017
|
+
failed_count: failedFixRows.length,
|
|
2018
|
+
planned_fixes: planned.map(toFixOutputRow),
|
|
2019
|
+
applied_fixes: appliedFixRows,
|
|
2020
|
+
gated_fixes: gated.map((fix) => ({
|
|
2021
|
+
...toFixOutputRow(fix),
|
|
2022
|
+
gate_hint: `Withheld: re-run with --fix-scope ${fix.gate} to apply.`
|
|
2023
|
+
})),
|
|
2024
|
+
failed_fixes: failedFixRows
|
|
2025
|
+
};
|
|
2026
|
+
}
|
|
1835
2027
|
async function runValidate(options, global) {
|
|
1836
2028
|
const fixesRequested = options.autoFix === true || options.pruneMissing === true;
|
|
1837
2029
|
if (options.dryRun === true && !fixesRequested) {
|
|
@@ -1859,100 +2051,29 @@ async function runValidate(options, global) {
|
|
|
1859
2051
|
const parentCycleSeverity = resolveParentCycleSeverity(options.parentCycleSeverity);
|
|
1860
2052
|
const fileScanMode = resolveFileScanMode(options.scanMode);
|
|
1861
2053
|
const workspaceRoot = resolveWorkspaceRoot(pmRoot);
|
|
1862
|
-
const
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
estimateBackfillRows = built.estimateBackfillRows;
|
|
1882
|
-
record(built);
|
|
1883
|
-
}
|
|
1884
|
-
if (requestedChecks.has("resolution")) {
|
|
1885
|
-
const built = buildResolutionCheck(items, statusRegistry, fullDiagnostics);
|
|
1886
|
-
resolutionBackfillRows = built.resolutionBackfillRows;
|
|
1887
|
-
record(built);
|
|
1888
|
-
}
|
|
1889
|
-
if (requestedChecks.has("lifecycle")) {
|
|
1890
|
-
const built = buildLifecycleCheck(items, Boolean(options.checkStaleBlockers), dependencyCycleSeverity, parentCycleSeverity, statusRegistry, lifecyclePatternPolicy, fullDiagnostics, settings.id_prefix);
|
|
1891
|
-
terminalParentFixRows = built.terminalParentFixRows;
|
|
1892
|
-
record(built);
|
|
1893
|
-
}
|
|
1894
|
-
if (requestedChecks.has("files")) {
|
|
1895
|
-
const built = await buildFilesCheck(items, workspaceRoot, pmRoot, fileScanMode, Boolean(options.includePmInternals), Boolean(options.verboseFileLists));
|
|
1896
|
-
staleLinkPruneRows = built.staleLinkPruneRows;
|
|
1897
|
-
record(built);
|
|
1898
|
-
}
|
|
1899
|
-
if (requestedChecks.has("command_references")) {
|
|
1900
|
-
record(buildCommandReferencesCheck(items, settings.id_prefix, fullDiagnostics));
|
|
1901
|
-
}
|
|
1902
|
-
if (requestedChecks.has("history_drift")) {
|
|
1903
|
-
record(await buildHistoryDriftCheck(pmRoot, items, fullDiagnostics));
|
|
1904
|
-
}
|
|
1905
|
-
if (requestedChecks.has("format_version")) {
|
|
1906
|
-
record(buildFormatVersionCheck(items, fullDiagnostics));
|
|
1907
|
-
}
|
|
1908
|
-
let fixes;
|
|
1909
|
-
if (fixesRequested) {
|
|
1910
|
-
const planned = [];
|
|
1911
|
-
if (options.autoFix === true) {
|
|
1912
|
-
planned.push(...planCloseReasonBackfillFixes(closeReasonBackfillRows));
|
|
1913
|
-
planned.push(...planResolutionBackfillFixes(resolutionBackfillRows));
|
|
1914
|
-
planned.push(...planEstimateBackfillFixes(estimateBackfillRows, settings.validation.estimate_defaults_by_type));
|
|
1915
|
-
planned.push(...planTerminalParentFixes(terminalParentFixRows));
|
|
1916
|
-
}
|
|
1917
|
-
if (options.pruneMissing === true) {
|
|
1918
|
-
planned.push(...planStaleLinkPruneFixes(staleLinkPruneRows));
|
|
1919
|
-
}
|
|
1920
|
-
const { applicable, gated } = partitionFixesByGrant(planned, grantedFixScopes);
|
|
1921
|
-
const dryRun = options.dryRun === true;
|
|
1922
|
-
const appliedFixRows = [];
|
|
1923
|
-
const failedFixRows = [];
|
|
1924
|
-
if (!dryRun) {
|
|
1925
|
-
const applied = await applyValidateFixes(applicable, global);
|
|
1926
|
-
appliedFixRows.push(...applied.applied.map(toFixOutputRow));
|
|
1927
|
-
failedFixRows.push(...applied.failed.map(({ fix, error }) => ({
|
|
1928
|
-
...toFixOutputRow(fix),
|
|
1929
|
-
error: error instanceof Error ? error.message : String(error)
|
|
1930
|
-
})));
|
|
1931
|
-
}
|
|
1932
|
-
fixes = {
|
|
1933
|
-
mode: dryRun ? "dry_run" : "apply",
|
|
1934
|
-
auto_fix: options.autoFix === true,
|
|
1935
|
-
prune_missing: options.pruneMissing === true,
|
|
1936
|
-
granted_fix_scopes: [...grantedFixScopes].sort((left, right) => left.localeCompare(right)),
|
|
1937
|
-
planned_count: planned.length,
|
|
1938
|
-
applied_count: appliedFixRows.length,
|
|
1939
|
-
gated_count: gated.length,
|
|
1940
|
-
failed_count: failedFixRows.length,
|
|
1941
|
-
planned_fixes: planned.map(toFixOutputRow),
|
|
1942
|
-
applied_fixes: appliedFixRows,
|
|
1943
|
-
gated_fixes: gated.map((fix) => ({
|
|
1944
|
-
...toFixOutputRow(fix),
|
|
1945
|
-
gate_hint: `Withheld: re-run with --fix-scope ${fix.gate} to apply.`
|
|
1946
|
-
})),
|
|
1947
|
-
failed_fixes: failedFixRows
|
|
1948
|
-
};
|
|
1949
|
-
}
|
|
1950
|
-
const normalizedWarnings = [...new Set(warnings)].sort((left, right) => left.localeCompare(right));
|
|
1951
|
-
const hasErrors = checks.some((check) => check.status === "error");
|
|
2054
|
+
const state = await executeRequestedValidateChecks({
|
|
2055
|
+
requestedChecks,
|
|
2056
|
+
options,
|
|
2057
|
+
global,
|
|
2058
|
+
pmRoot,
|
|
2059
|
+
workspaceRoot,
|
|
2060
|
+
settings,
|
|
2061
|
+
items,
|
|
2062
|
+
statusRegistry,
|
|
2063
|
+
metadataPolicy,
|
|
2064
|
+
lifecyclePatternPolicy,
|
|
2065
|
+
dependencyCycleSeverity,
|
|
2066
|
+
parentCycleSeverity,
|
|
2067
|
+
fileScanMode,
|
|
2068
|
+
initialWarnings: [...new Set(itemReadWarnings)]
|
|
2069
|
+
});
|
|
2070
|
+
const fixes = fixesRequested ? await buildValidateFixesSummary(options, state, settings, grantedFixScopes, global) : void 0;
|
|
2071
|
+
const normalizedWarnings = [...new Set(state.warnings)].sort((left, right) => left.localeCompare(right));
|
|
2072
|
+
const hasErrors = state.checks.some((check) => check.status === "error");
|
|
1952
2073
|
return {
|
|
1953
2074
|
ok: !hasErrors,
|
|
1954
2075
|
has_warnings: normalizedWarnings.length > 0,
|
|
1955
|
-
checks,
|
|
2076
|
+
checks: state.checks,
|
|
1956
2077
|
warnings: normalizedWarnings,
|
|
1957
2078
|
...fixes !== void 0 ? { fixes } : {},
|
|
1958
2079
|
generated_at: nowIso()
|
|
@@ -1962,6 +2083,6 @@ export {
|
|
|
1962
2083
|
_testOnlyValidateCommand,
|
|
1963
2084
|
runValidate
|
|
1964
2085
|
};
|
|
1965
|
-
//# sourceMappingURL=validate-
|
|
2086
|
+
//# sourceMappingURL=validate-W7H5TEDC.js.map
|
|
1966
2087
|
|
|
1967
|
-
//# debugId=
|
|
2088
|
+
//# debugId=0642e966-0611-51ff-ad2f-1a0d7416c80b
|