@unbrained/pm-cli 2026.7.1 → 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/CHANGELOG.md +6 -0
- 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 +278 -243
- 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/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/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.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 +503 -470
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/telemetry.js +98 -87
- package/dist/cli/commands/telemetry.js.map +1 -1
- package/dist/cli/commands/test-all.js +237 -168
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test.d.ts +6 -5
- package/dist/cli/commands/test.js +424 -344
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +57 -42
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +1 -1
- package/dist/cli/commands/update.js +738 -671
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +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/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-bundle/chunks/{activity-DBLQVIP6.js → activity-CUC4JY3U.js} +9 -9
- package/dist/cli-bundle/chunks/activity-WEIEMM73.js +16 -0
- package/dist/cli-bundle/chunks/{aggregate-JTEF4BP7.js → aggregate-DKUTRY6R.js} +108 -84
- package/dist/cli-bundle/chunks/aggregate-DKUTRY6R.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js → aggregate-SW5PNGCS.js} +107 -83
- package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js.map → aggregate-SW5PNGCS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{append-QCFJSDFL.js → append-H32VOR2Y.js} +6 -6
- package/dist/cli-bundle/chunks/{append-LOVPGVPT.js → append-UBM632FK.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-RLDHZHQS.js → chunk-2227673O.js} +158 -114
- package/dist/cli-bundle/chunks/chunk-2227673O.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js → chunk-2ASNV4DH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js → chunk-2CHRYUXL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NWMZWYYB.js → chunk-2KWL5NPW.js} +42 -27
- package/dist/cli-bundle/chunks/chunk-2KWL5NPW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NFDPYAIP.js → chunk-36UGKF4O.js} +21 -29
- package/dist/cli-bundle/chunks/chunk-36UGKF4O.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js → chunk-3AZUFQK6.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js → chunk-3LCUASYG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js → chunk-3Q2HBMTI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IPYBJWTE.js → chunk-4NUOWFBT.js} +109 -72
- package/dist/cli-bundle/chunks/chunk-4NUOWFBT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js → chunk-55XRYWEG.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-HXTQJXWT.js → chunk-5GVTFFTC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BDTISOSD.js → chunk-5PGBHRY3.js} +41 -26
- package/dist/cli-bundle/chunks/chunk-5PGBHRY3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YITK2PJ6.js → chunk-66Z3X7ZG.js} +261 -161
- package/dist/cli-bundle/chunks/chunk-66Z3X7ZG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NUHHPVVS.js → chunk-6ITZLD4T.js} +712 -612
- package/dist/cli-bundle/chunks/chunk-6ITZLD4T.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-V3NOKJF2.js → chunk-6YCYF2AI.js} +262 -162
- package/dist/cli-bundle/chunks/chunk-6YCYF2AI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BZCEN4JA.js → chunk-6ZMBJRDJ.js} +492 -403
- package/dist/cli-bundle/chunks/chunk-6ZMBJRDJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CF7RL6FR.js → chunk-7MYWF4ZX.js} +110 -73
- package/dist/cli-bundle/chunks/chunk-7MYWF4ZX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RVUALSJF.js → chunk-7NSPKJUS.js} +356 -285
- package/dist/cli-bundle/chunks/chunk-7NSPKJUS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4DSGXSBL.js → chunk-7TH5NMVB.js} +95 -53
- package/dist/cli-bundle/chunks/chunk-7TH5NMVB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZETXE4SE.js → chunk-7W4H4K26.js} +713 -613
- package/dist/cli-bundle/chunks/chunk-7W4H4K26.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js → chunk-A6VOGKBA.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-WYDHYJPO.js → chunk-AIAIXG7I.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CWFNTKQJ.js → chunk-AJEBCRIY.js} +5 -5
- 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-NOLPZMSV.js → chunk-BTX5MIQF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js → chunk-BVZZN2LH.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js → chunk-CYBDUHNO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js → chunk-CZPVDLD2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-3VGN2UWE.js → chunk-EMPGXBUF.js} +22 -30
- package/dist/cli-bundle/chunks/chunk-EMPGXBUF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JPECA746.js → chunk-EUKTMRN3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2466X6E4.js → chunk-FFOQHGNH.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-JLM7BHI7.js → chunk-GFMSLORL.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js → chunk-GRRG3MCT.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js → chunk-H4GRLYJS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js → chunk-HQTPRV4D.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-7R4QEMZZ.js → chunk-I66WE2HE.js} +354 -283
- package/dist/cli-bundle/chunks/chunk-I66WE2HE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js → chunk-IEEJQCZ4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js → chunk-IG5JYZGU.js} +390 -312
- package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js.map → chunk-IG5JYZGU.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js → chunk-JMK5GCK2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3K2M5OYU.js → chunk-JXAUVO6X.js} +258 -169
- package/dist/cli-bundle/chunks/{chunk-3K2M5OYU.js.map → chunk-JXAUVO6X.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AXIDKKAT.js → chunk-K2VYLVX4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js → chunk-KCO2EAN5.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js → chunk-KIYCOJ63.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js → chunk-KLXF7NCC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js → chunk-KN3URLKS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js → chunk-LRKMWUUV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js → chunk-LTRAF2D7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VARHOHYV.js → chunk-MNBPX5JS.js} +55 -36
- package/dist/cli-bundle/chunks/chunk-MNBPX5JS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js → chunk-MRD4T5LF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js → chunk-N2JSWVWG.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js → chunk-N3QCJS4M.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-JSU5P7VS.js → chunk-NRZS637N.js} +258 -169
- package/dist/cli-bundle/chunks/chunk-NRZS637N.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js → chunk-OTUJZKGI.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5CGRF3L5.js → chunk-Q6K2OACU.js} +153 -90
- package/dist/cli-bundle/chunks/chunk-Q6K2OACU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3XZCOZ5J.js → chunk-Q6NXOHS6.js} +391 -313
- package/dist/cli-bundle/chunks/chunk-Q6NXOHS6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js → chunk-QH3FSKRJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4XOIEKSD.js → chunk-RM37OPYK.js} +56 -37
- package/dist/cli-bundle/chunks/chunk-RM37OPYK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js → chunk-S62UANU7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RMMQ74TG.js → chunk-SPM2XLWI.js} +37 -28
- package/dist/cli-bundle/chunks/chunk-SPM2XLWI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3J6JRJ3I.js → chunk-SYNKD3ZG.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-FFMQB7WR.js → chunk-SYVUU7EK.js} +493 -404
- package/dist/cli-bundle/chunks/chunk-SYVUU7EK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UYUYDGIB.js → chunk-TPOFWBMY.js} +95 -53
- package/dist/cli-bundle/chunks/chunk-TPOFWBMY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OTUHB4HS.js → chunk-TTHCEV5Q.js} +92 -77
- package/dist/cli-bundle/chunks/chunk-TTHCEV5Q.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js → chunk-U2BEEM2X.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KNPEF7QG.js → chunk-UGLU6Q2I.js} +91 -76
- package/dist/cli-bundle/chunks/chunk-UGLU6Q2I.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js → chunk-UT73HUPC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js → chunk-UTSH5GWX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-IZBR4NRW.js → chunk-UWKEJMZU.js} +157 -113
- package/dist/cli-bundle/chunks/chunk-UWKEJMZU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3S2KT7NG.js → chunk-W47SML5B.js} +152 -89
- package/dist/cli-bundle/chunks/chunk-W47SML5B.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RGEMWD6Q.js → chunk-WJAMWAHZ.js} +157 -118
- package/dist/cli-bundle/chunks/chunk-WJAMWAHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JWXRETDF.js → chunk-XCHUVHKU.js} +626 -484
- package/dist/cli-bundle/chunks/chunk-XCHUVHKU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-55SNVXRQ.js → chunk-XEWQKDYZ.js} +626 -484
- package/dist/cli-bundle/chunks/chunk-XEWQKDYZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TP5Q5ZD3.js → chunk-XTHQWXVC.js} +158 -119
- package/dist/cli-bundle/chunks/chunk-XTHQWXVC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MDPEOIGN.js → chunk-XWGEMNBR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js → chunk-Y4NRKBFW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2D4HATP2.js → chunk-YLZZ6T54.js} +38 -29
- package/dist/cli-bundle/chunks/chunk-YLZZ6T54.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-22WKIL3H.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-DDPTYJIM.js → chunk-ZNHEYCDD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js → chunk-ZNT7KEWE.js} +2 -2
- package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js → claim-SENTPZBN.js} +8 -8
- package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js → claim-Z7MEQCBT.js} +8 -8
- package/dist/cli-bundle/chunks/{close-TQYAAFJP.js → close-424MX4CU.js} +7 -7
- package/dist/cli-bundle/chunks/close-YCWQQPDS.js +14 -0
- package/dist/cli-bundle/chunks/{close-many-LDRVEQY2.js → close-many-2IV4J2TR.js} +102 -81
- package/dist/cli-bundle/chunks/close-many-2IV4J2TR.js.map +1 -0
- package/dist/cli-bundle/chunks/{close-many-BG5QQIDQ.js → close-many-SWY34BII.js} +101 -80
- package/dist/cli-bundle/chunks/close-many-SWY34BII.js.map +7 -0
- package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js → comments-4FGNTSNV.js} +8 -8
- package/dist/cli-bundle/chunks/{comments-QCKR2YY2.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-OCZ3FJ4Z.js → context-LHVKJSPJ.js} +12 -12
- package/dist/cli-bundle/chunks/{context-B6275WPX.js → context-ZQY54JNS.js} +12 -12
- package/dist/cli-bundle/chunks/{contracts-HN7ABKLP.js → contracts-CP2EZJC7.js} +320 -199
- package/dist/cli-bundle/chunks/contracts-CP2EZJC7.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-W4FZVVD6.js → contracts-FIZLMP7O.js} +321 -200
- package/dist/cli-bundle/chunks/contracts-FIZLMP7O.js.map +1 -0
- package/dist/cli-bundle/chunks/{copy-DEM4DATS.js → copy-GYNQQPW2.js} +5 -5
- package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js → copy-TLW7JTQT.js} +5 -5
- package/dist/cli-bundle/chunks/{create-RLRJMRTM.js → create-VSKYSOCD.js} +12 -12
- package/dist/cli-bundle/chunks/create-XTMAPS7I.js +28 -0
- package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js → delete-4W5JYCEG.js} +5 -5
- package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js → delete-ANTOTI2I.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js → deps-HPPE6MJN.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js → deps-ZQZN54EZ.js} +5 -5
- package/dist/cli-bundle/chunks/{docs-GYZNVS26.js → docs-RPOVFMP3.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-26S44RXU.js → docs-XJNYBJGE.js} +7 -7
- package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js → eval-DM6JBZTS.js} +10 -10
- package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js → eval-RFBI5FGS.js} +10 -10
- package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js → extension-B3YY4WY5.js} +11 -11
- package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js → extension-TTSEFQTS.js} +11 -11
- package/dist/cli-bundle/chunks/{files-NQHEXUZD.js → files-5D65CHGE.js} +7 -7
- package/dist/cli-bundle/chunks/{files-MBNICQFM.js → files-GPIG77EN.js} +7 -7
- package/dist/cli-bundle/chunks/{focus-XZW5423D.js → focus-C3PEJV2C.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js → focus-ZHN7WIGX.js} +6 -6
- package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js → gc-D4JQ6OWN.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js → gc-VZIXDL32.js} +3 -3
- package/dist/cli-bundle/chunks/{get-DSDEKJ3L.js → get-GIBRUUOP.js} +121 -81
- package/dist/cli-bundle/chunks/get-GIBRUUOP.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-A7MAOHCU.js → get-IOVAN6RU.js} +120 -80
- package/dist/cli-bundle/chunks/get-IOVAN6RU.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-3IPFLKXB.js → health-L2U3AFKV.js} +437 -265
- package/dist/cli-bundle/chunks/health-L2U3AFKV.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-GZXGBZ36.js → health-MM7AWXYF.js} +436 -264
- 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-NERDJNUB.js → history-IL7XCEX2.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-HR7BB4LR.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-2WRZ2WK4.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-O3NBCNWC.js → history-redact-VYCWQFK7.js} +9 -9
- package/dist/cli-bundle/chunks/{history-repair-XA3LC4GA.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-LCMOS45X.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-64XDLQJB.js → init-F27NHENZ.js} +12 -12
- package/dist/cli-bundle/chunks/init-HHVQQP6C.js +22 -0
- package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js → learnings-HJVDQIGY.js} +8 -8
- package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js → learnings-XSFSUUWK.js} +8 -8
- package/dist/cli-bundle/chunks/{list-G5Y65VF6.js → list-HPMEKCAA.js} +8 -8
- package/dist/cli-bundle/chunks/{list-DNBJVO3E.js → list-VMPWTURB.js} +8 -8
- package/dist/cli-bundle/chunks/{next-BCERKDUR.js → next-ETXF2ZCN.js} +59 -37
- package/dist/cli-bundle/chunks/next-ETXF2ZCN.js.map +7 -0
- package/dist/cli-bundle/chunks/{next-FYTQF6HG.js → next-QM6YJIIS.js} +60 -38
- package/dist/cli-bundle/chunks/next-QM6YJIIS.js.map +1 -0
- package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js → notes-GDZIKGR6.js} +8 -8
- package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js → notes-WDDBPC4D.js} +8 -8
- package/dist/cli-bundle/chunks/{plan-RKZHQVXR.js → plan-BGDR73Z6.js} +373 -279
- package/dist/cli-bundle/chunks/plan-BGDR73Z6.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-4WXEQCTN.js → plan-C5IMM335.js} +372 -278
- package/dist/cli-bundle/chunks/plan-C5IMM335.js.map +7 -0
- package/dist/cli-bundle/chunks/{profile-QLER5ENE.js → profile-CCOKZ2IQ.js} +9 -9
- package/dist/cli-bundle/chunks/{profile-4OMM32CD.js → profile-HUCENIEQ.js} +9 -9
- package/dist/cli-bundle/chunks/{register-list-query-7LV46VAU.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-SNG5PGA4.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-ENNDUAZG.js → register-mutation-CFSB2MS3.js} +403 -382
- package/dist/cli-bundle/chunks/register-mutation-CFSB2MS3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-KK7PHYYU.js → register-mutation-KRLAHEL2.js} +402 -381
- package/dist/cli-bundle/chunks/register-mutation-KRLAHEL2.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-HZ6XERQG.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-C6OWLDSH.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-P67EMBDJ.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-ZKJ53RS7.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-4MHZFJ2E.js → restore-4CBWUMCX.js} +9 -9
- package/dist/cli-bundle/chunks/restore-5UEAGG3W.js +17 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js → scheduling-shortcuts-6VFKNKCM.js} +12 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js → scheduling-shortcuts-ERHCVTEM.js} +12 -12
- package/dist/cli-bundle/chunks/{schema-73HR2OJW.js → schema-TDGK6N3I.js} +7 -7
- package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js → schema-UE5KKAUX.js} +7 -7
- package/dist/cli-bundle/chunks/{search-KILGT37L.js → search-FP7MEU4S.js} +10 -10
- package/dist/cli-bundle/chunks/{search-AXPXKZER.js → search-K4CFLQ5S.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js → stats-NJJCALEZ.js} +6 -6
- package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js → stats-XT6QRKQY.js} +6 -6
- package/dist/cli-bundle/chunks/{telemetry-GAHHQTOS.js → telemetry-5SQ5UDXC.js} +84 -70
- package/dist/cli-bundle/chunks/telemetry-5SQ5UDXC.js.map +7 -0
- package/dist/cli-bundle/chunks/{telemetry-BZUF6H7G.js → telemetry-HVXFZA2U.js} +85 -71
- package/dist/cli-bundle/chunks/telemetry-HVXFZA2U.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-ACD52Z3S.js → test-UFSJ5YIO.js} +15 -15
- package/dist/cli-bundle/chunks/{test-PWDIZ255.js → test-YCDAUBWF.js} +15 -15
- 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-UXIXPDKU.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-PLRAZEFW.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-KFX2SIAC.js → update-Y5WQVT5O.js} +15 -15
- package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js → update-many-6YAYYRLE.js} +82 -67
- package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js.map → update-many-6YAYYRLE.js.map} +2 -2
- package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js → update-many-JTKKSA7Y.js} +83 -68
- package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js.map → update-many-JTKKSA7Y.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js → upgrade-DTAHZ236.js} +11 -11
- package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js → upgrade-JUDU7YL4.js} +11 -11
- package/dist/cli-bundle/chunks/{validate-MTUVL5VC.js → validate-732RWS5W.js} +440 -320
- package/dist/cli-bundle/chunks/validate-732RWS5W.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-X5W76YJL.js → validate-W7H5TEDC.js} +441 -321
- package/dist/cli-bundle/chunks/validate-W7H5TEDC.js.map +1 -0
- package/dist/cli-bundle/main.js +945 -812
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/core/config/nested-settings.js +89 -67
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/governance/metadata-coverage.js +20 -28
- package/dist/core/governance/metadata-coverage.js.map +1 -1
- package/dist/core/history/drift-scan.js +93 -81
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/item/item-type-definition.js +14 -14
- package/dist/core/item/item-type-definition.js.map +1 -1
- package/dist/core/item/type-registry.js +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/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-AW6XVFH6.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-JTEF4BP7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2D4HATP2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3S2KT7NG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3VGN2UWE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3XZCOZ5J.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4DSGXSBL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4XOIEKSD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-55SNVXRQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5CGRF3L5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7R4QEMZZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BDTISOSD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BZCEN4JA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CF7RL6FR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FFMQB7WR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IPYBJWTE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IZBR4NRW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JSU5P7VS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JWXRETDF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KNPEF7QG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NFDPYAIP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NUHHPVVS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NWMZWYYB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OTUHB4HS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RGEMWD6Q.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RLDHZHQS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RMMQ74TG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RVUALSJF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TP5Q5ZD3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UYUYDGIB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-V3NOKJF2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VARHOHYV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YITK2PJ6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZETXE4SE.js.map +0 -1
- package/dist/cli-bundle/chunks/close-E6ZZGCJY.js +0 -14
- package/dist/cli-bundle/chunks/close-many-BG5QQIDQ.js.map +0 -7
- package/dist/cli-bundle/chunks/close-many-LDRVEQY2.js.map +0 -1
- package/dist/cli-bundle/chunks/config-DMSU64QO.js +0 -1541
- package/dist/cli-bundle/chunks/config-DMSU64QO.js.map +0 -7
- package/dist/cli-bundle/chunks/config-QH2DICD6.js +0 -1531
- package/dist/cli-bundle/chunks/config-QH2DICD6.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-HN7ABKLP.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-W4FZVVD6.js.map +0 -1
- package/dist/cli-bundle/chunks/create-OH3BDGBB.js +0 -28
- package/dist/cli-bundle/chunks/get-A7MAOHCU.js.map +0 -7
- package/dist/cli-bundle/chunks/get-DSDEKJ3L.js.map +0 -1
- package/dist/cli-bundle/chunks/health-3IPFLKXB.js.map +0 -1
- package/dist/cli-bundle/chunks/health-GZXGBZ36.js.map +0 -7
- package/dist/cli-bundle/chunks/history-WSZHY3PN.js +0 -18
- package/dist/cli-bundle/chunks/history-compact-2WRZ2WK4.js.map +0 -7
- package/dist/cli-bundle/chunks/history-compact-HR7BB4LR.js.map +0 -1
- package/dist/cli-bundle/chunks/history-redact-MP6CH7U5.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-LCMOS45X.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-XA3LC4GA.js.map +0 -1
- package/dist/cli-bundle/chunks/init-PAX32BJA.js +0 -22
- package/dist/cli-bundle/chunks/next-BCERKDUR.js.map +0 -7
- package/dist/cli-bundle/chunks/next-FYTQF6HG.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-4WXEQCTN.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-RKZHQVXR.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-ENNDUAZG.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-KK7PHYYU.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-C6OWLDSH.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-HZ6XERQG.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-P67EMBDJ.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-ZKJ53RS7.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-YALDGTQR.js +0 -17
- package/dist/cli-bundle/chunks/telemetry-BZUF6H7G.js.map +0 -1
- package/dist/cli-bundle/chunks/telemetry-GAHHQTOS.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js +0 -358
- package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js +0 -361
- package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-PLRAZEFW.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-UXIXPDKU.js.map +0 -1
- package/dist/cli-bundle/chunks/update-AMRSOIWP.js +0 -24
- package/dist/cli-bundle/chunks/validate-MTUVL5VC.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-X5W76YJL.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js.map → activity-CUC4JY3U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-AW6XVFH6.js.map → activity-WEIEMM73.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-QCFJSDFL.js.map → append-H32VOR2Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-LOVPGVPT.js.map → append-UBM632FK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js.map → chunk-2ASNV4DH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js.map → chunk-2CHRYUXL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js.map → chunk-3AZUFQK6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js.map → chunk-3LCUASYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js.map → chunk-3Q2HBMTI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js.map → chunk-55XRYWEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HXTQJXWT.js.map → chunk-5GVTFFTC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js.map → chunk-A6VOGKBA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WYDHYJPO.js.map → chunk-AIAIXG7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CWFNTKQJ.js.map → chunk-AJEBCRIY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js.map → chunk-BTX5MIQF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js.map → chunk-BVZZN2LH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js.map → chunk-CYBDUHNO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js.map → chunk-CZPVDLD2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JPECA746.js.map → chunk-EUKTMRN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2466X6E4.js.map → chunk-FFOQHGNH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JLM7BHI7.js.map → chunk-GFMSLORL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js.map → chunk-GRRG3MCT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js.map → chunk-H4GRLYJS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js.map → chunk-HQTPRV4D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js.map → chunk-IEEJQCZ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js.map → chunk-JMK5GCK2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AXIDKKAT.js.map → chunk-K2VYLVX4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js.map → chunk-KCO2EAN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js.map → chunk-KIYCOJ63.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js.map → chunk-KLXF7NCC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js.map → chunk-KN3URLKS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js.map → chunk-LRKMWUUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js.map → chunk-LTRAF2D7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js.map → chunk-MRD4T5LF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js.map → chunk-N2JSWVWG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js.map → chunk-N3QCJS4M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js.map → chunk-OTUJZKGI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js.map → chunk-QH3FSKRJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js.map → chunk-S62UANU7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3J6JRJ3I.js.map → chunk-SYNKD3ZG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js.map → chunk-U2BEEM2X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js.map → chunk-UT73HUPC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js.map → chunk-UTSH5GWX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MDPEOIGN.js.map → chunk-XWGEMNBR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js.map → chunk-Y4NRKBFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-22WKIL3H.js.map → chunk-YPKFV2JR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js.map → chunk-ZNHEYCDD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js.map → chunk-ZNT7KEWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js.map → claim-SENTPZBN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js.map → claim-Z7MEQCBT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-TQYAAFJP.js.map → close-424MX4CU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-E6ZZGCJY.js.map → close-YCWQQPDS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js.map → comments-4FGNTSNV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js.map → comments-7YS5MY5X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js.map → context-LHVKJSPJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-B6275WPX.js.map → context-ZQY54JNS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-DEM4DATS.js.map → copy-GYNQQPW2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js.map → copy-TLW7JTQT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-RLRJMRTM.js.map → create-VSKYSOCD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-OH3BDGBB.js.map → create-XTMAPS7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js.map → delete-4W5JYCEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js.map → delete-ANTOTI2I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js.map → deps-HPPE6MJN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js.map → deps-ZQZN54EZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-GYZNVS26.js.map → docs-RPOVFMP3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-26S44RXU.js.map → docs-XJNYBJGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js.map → eval-DM6JBZTS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js.map → eval-RFBI5FGS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js.map → extension-B3YY4WY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js.map → extension-TTSEFQTS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-NQHEXUZD.js.map → files-5D65CHGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-MBNICQFM.js.map → files-GPIG77EN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-XZW5423D.js.map → focus-C3PEJV2C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js.map → focus-ZHN7WIGX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js.map → gc-D4JQ6OWN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js.map → gc-VZIXDL32.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-WSZHY3PN.js.map → history-DD7L7BNL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-NERDJNUB.js.map → history-IL7XCEX2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-MP6CH7U5.js.map → history-redact-IX4YEWMY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js.map → history-redact-VYCWQFK7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-64XDLQJB.js.map → init-F27NHENZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-PAX32BJA.js.map → init-HHVQQP6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js.map → learnings-HJVDQIGY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js.map → learnings-XSFSUUWK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-G5Y65VF6.js.map → list-HPMEKCAA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-DNBJVO3E.js.map → list-VMPWTURB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js.map → notes-GDZIKGR6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js.map → notes-WDDBPC4D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-QLER5ENE.js.map → profile-CCOKZ2IQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-4OMM32CD.js.map → profile-HUCENIEQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js.map → restore-4CBWUMCX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-YALDGTQR.js.map → restore-5UEAGG3W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js.map → scheduling-shortcuts-6VFKNKCM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js.map → scheduling-shortcuts-ERHCVTEM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-73HR2OJW.js.map → schema-TDGK6N3I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js.map → schema-UE5KKAUX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-KILGT37L.js.map → search-FP7MEU4S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-AXPXKZER.js.map → search-K4CFLQ5S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js.map → stats-NJJCALEZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js.map → stats-XT6QRKQY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-ACD52Z3S.js.map → test-UFSJ5YIO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-PWDIZ255.js.map → test-YCDAUBWF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-AMRSOIWP.js.map → update-MTCFES6X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-KFX2SIAC.js.map → update-Y5WQVT5O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js.map → upgrade-DTAHZ236.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js.map → upgrade-JUDU7YL4.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close-many.js","sources":["cli/commands/close-many.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/close-many\n *\n * Implements the pm close many command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport {\n createCheckpointId,\n loadMutationCheckpoint,\n restoreCheckpointItems,\n writeMutationCheckpoint,\n type MutationCheckpointItem,\n} from \"../../core/checkpoint/mutation-checkpoint.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { toErrorMessage } from \"../../core/shared/primitives.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { runClose, type CloseCommandOptions } from \"./close.js\";\nimport { hasListFilters } from \"./list-filter-shared.js\";\nimport { runList, type ListOptions, type ListedItem } from \"./list.js\";\nimport { runRestore } from \"./restore.js\";\n\nconst CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;\nconst CLOSE_MANY_CHECKPOINT_SUBDIR = \"close-many\";\n\nconst CLOSE_MANY_FILTER_GUIDANCE = [\n \"--filter-status\",\n \"--filter-type\",\n \"--filter-tag\",\n \"--filter-priority\",\n \"--filter-sprint\",\n \"--filter-release\",\n \"--filter-parent\",\n \"--filter-assignee\",\n \"--filter-updated-before\",\n \"--ids\",\n].join(\", \");\n\n/**\n * Documents the close many command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface CloseManyCommandOptions {\n status?: string;\n list?: ListOptions;\n reason?: string;\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n validateClose?: string;\n author?: string;\n message?: string;\n force?: boolean;\n dryRun?: boolean;\n rollback?: string;\n checkpoint?: boolean;\n}\n\ninterface CloseManyPlanRow {\n id: string;\n title: string;\n status: string;\n action: \"close\" | \"skip\";\n skip_reason?: string;\n active_child_ids?: string[];\n}\n\ninterface CloseManyApplyRow {\n id: string;\n status: \"closed\" | \"skipped\" | \"failed\";\n skip_reason?: string;\n changed_fields?: string[];\n warnings?: string[];\n error?: string;\n}\n\n/**\n * Documents the close many result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CloseManyResult {\n mode: \"dry_run\" | \"apply\" | \"rollback\";\n matched_count: number;\n dry_run: boolean;\n reason?: string;\n filters?: Record<string, unknown>;\n validate_close?: string;\n item_plans?: CloseManyPlanRow[];\n checkpoint?: {\n id: string;\n created_at: string;\n path: string;\n rollback_command: string;\n };\n closed_count?: number;\n skipped_count?: number;\n failed_count?: number;\n restored_count?: number;\n rollback_checkpoint_id?: string;\n rows?: CloseManyApplyRow[] | Array<{ id: string; status: \"restored\" | \"failed\"; changed_fields?: string[]; warnings?: string[]; error?: string }>;\n ids: string[];\n}\n\nfunction hasCloseManyFilters(list: ListOptions | undefined, status: string | undefined): boolean {\n return hasListFilters(list, status, { includePagination: false });\n}\n\nfunction hasCloseManyRollbackConflicts(list: ListOptions | undefined, status: string | undefined): boolean {\n return hasListFilters(list, status);\n}\n\nfunction rejectBlankIdsFilter(list: ListOptions | undefined): void {\n if (list?.ids != null && String(list.ids).trim().length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n}\n\nfunction activeListOptions(list: ListOptions | undefined): ListOptions {\n const active: ListOptions = {};\n if (!list) {\n return active;\n }\n for (const [key, value] of Object.entries(list) as Array<[keyof ListOptions, unknown]>) {\n if (value == null || (typeof value === \"string\" && !value.split(\",\").some((entry) => entry.trim().length > 0))) {\n continue;\n }\n (active as Record<string, unknown>)[key] = value;\n }\n return active;\n}\n\nfunction resolveReason(reason: unknown, required: boolean): string | undefined {\n const trimmed = String(reason ?? \"\").trim();\n if (trimmed.length > 0) {\n return trimmed;\n }\n if (required) {\n throw new PmCliError(\n \"pm close-many requires a shared close reason via --reason because governance.require_close_reason is enabled.\",\n EXIT_CODE.USAGE,\n {\n code: \"close_reason_required\",\n required: \"Provide a shared closing summary via --reason for the whole batch.\",\n why: \"governance.require_close_reason is enabled, so every close must record why the items are done.\",\n examples: [\n 'pm close-many --filter-sprint S-12 --reason \"Sprint S-12 acceptance criteria met\"',\n 'pm close-many --ids pm-a,pm-b --reason \"Superseded by redesign\"',\n ],\n nextSteps: [\n \"Re-run with --reason describing the shared outcome.\",\n \"To stop requiring reasons, run: pm config set governance-require-close-reason --policy disabled\",\n ],\n },\n );\n }\n return undefined;\n}\n\n// Build a parent -> non-terminal child id map in a single light scan so each\n// matched parent can be annotated with the active children that closing it\n// would orphan (the same signal runClose surfaces per item on apply).\nasync function buildActiveChildrenByParent(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n): Promise<{ childrenByParent: Map<string, string[]>; parentByChild: Map<string, string> }> {\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n const childrenByParent = new Map<string, string[]>();\n const parentByChild = new Map<string, string>();\n for (const item of items) {\n if (typeof item.parent !== \"string\" || item.parent.length === 0) {\n continue;\n }\n parentByChild.set(item.id, item.parent);\n if (isTerminalStatus(item.status, statusRegistry)) {\n continue;\n }\n const existing = childrenByParent.get(item.parent);\n if (existing) {\n existing.push(item.id);\n } else {\n childrenByParent.set(item.parent, [item.id]);\n }\n }\n for (const ids of childrenByParent.values()) {\n ids.sort((left, right) => left.localeCompare(right));\n }\n return { childrenByParent, parentByChild };\n}\n\nfunction hierarchyDepth(id: string, parentByChild: Map<string, string>, cache?: Map<string, number>): number {\n const cached = cache?.get(id);\n if (cached !== undefined) {\n return cached;\n }\n let depth = 0;\n let current = parentByChild.get(id);\n const path: string[] = [];\n const visited = new Set<string>();\n let hasCycle = false;\n while (current !== undefined && !visited.has(current)) {\n const cachedCurrent = cache?.get(current);\n if (cachedCurrent !== undefined) {\n depth += cachedCurrent + 1;\n break;\n }\n visited.add(current);\n path.push(current);\n depth += 1;\n current = parentByChild.get(current);\n }\n if (current !== undefined && visited.has(current)) {\n hasCycle = true;\n }\n if (!hasCycle) {\n cache?.set(id, depth);\n for (const [index, ancestorId] of path.entries()) {\n cache?.set(ancestorId, depth - index - 1);\n }\n }\n return depth;\n}\n\n/**\n * Implements run close many for the public runtime surface of this module.\n */\nexport async function runCloseMany(options: CloseManyCommandOptions, global: GlobalOptions): Promise<CloseManyResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n\n const dryRun = options.dryRun === true;\n const rollbackId = typeof options.rollback === \"string\" ? options.rollback : undefined;\n rejectBlankIdsFilter(options.list);\n\n if (rollbackId) {\n if (dryRun) {\n throw new PmCliError(\"--dry-run cannot be combined with --rollback\", EXIT_CODE.USAGE);\n }\n if (hasCloseManyRollbackConflicts(options.list, options.status)) {\n throw new PmCliError(\"Rollback mode does not accept filter options\", EXIT_CODE.USAGE);\n }\n const checkpoint = await loadMutationCheckpoint(\n pmRoot,\n CLOSE_MANY_CHECKPOINT_SUBDIR,\n rollbackId,\n CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n );\n const restoreMessage = options.message ?? `Rollback close-many checkpoint ${checkpoint.id}`;\n const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) =>\n runRestore(id, targetUpdatedAt, { author: options.author, message: restoreMessage, force: true }, global),\n );\n return {\n mode: \"rollback\",\n matched_count: checkpoint.items.length,\n dry_run: false,\n rollback_checkpoint_id: checkpoint.id,\n checkpoint: {\n id: checkpoint.id,\n created_at: checkpoint.created_at,\n path: checkpoint.path,\n rollback_command: `pm close-many --rollback ${checkpoint.id}`,\n },\n restored_count: rollback.restored_ids.length,\n failed_count: rollback.failed_count,\n rows: rollback.rows,\n ids: rollback.restored_ids,\n };\n }\n\n if (!hasCloseManyFilters(options.list, options.status)) {\n throw new PmCliError(\n `close-many requires at least one filter to scope the close (for example: ${CLOSE_MANY_FILTER_GUIDANCE}). Refusing to match every item.`,\n EXIT_CODE.USAGE,\n );\n }\n\n const reason = resolveReason(options.reason, settings.governance.require_close_reason);\n const validateCloseMode = options.validateClose;\n const force = options.force === true;\n\n const listOptions = activeListOptions(options.list);\n const listed = await runList(options.status, listOptions, global);\n const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(pmRoot, settings);\n const depthCache = new Map<string, number>();\n const matched = [...(listed.items as ListedItem[])].sort((left, right) => {\n const depthDelta = hierarchyDepth(right.id, parentByChild, depthCache) - hierarchyDepth(left.id, parentByChild, depthCache);\n return depthDelta !== 0 ? depthDelta : left.id.localeCompare(right.id);\n });\n const closePlannedIds = new Set(\n matched\n .filter((item) => force || !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id),\n );\n\n const planRows: CloseManyPlanRow[] = matched.map((item) => {\n const alreadyTerminal = isTerminalStatus(item.status, statusRegistry);\n const activeChildIds = (childrenByParent.get(item.id) ?? []).filter((childId) => !closePlannedIds.has(childId));\n const willSkip = alreadyTerminal && !force;\n return {\n id: item.id,\n title: typeof item.title === \"string\" ? item.title : \"\",\n status: item.status,\n action: willSkip ? \"skip\" : \"close\",\n ...(willSkip ? { skip_reason: \"already_terminal\" } : {}),\n ...(activeChildIds.length > 0 ? { active_child_ids: activeChildIds } : {}),\n };\n });\n\n if (dryRun) {\n return {\n mode: \"dry_run\",\n matched_count: matched.length,\n dry_run: true,\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),\n item_plans: planRows,\n ids: [],\n };\n }\n\n const closableIds = new Set(planRows.filter((row) => row.action === \"close\").map((row) => row.id));\n\n const nowValue = nowIso();\n const checkpointId = createCheckpointId(CLOSE_MANY_CHECKPOINT_SUBDIR, nowValue);\n const checkpointEnabled = options.checkpoint !== false;\n let checkpointInfo: CloseManyResult[\"checkpoint\"] | undefined;\n if (checkpointEnabled && closableIds.size > 0) {\n const checkpointItems: MutationCheckpointItem[] = matched\n .filter((item) => closableIds.has(item.id))\n .map((item) => ({ id: item.id, target_updated_at: item.updated_at }));\n const checkpointPath = await writeMutationCheckpoint(pmRoot, CLOSE_MANY_CHECKPOINT_SUBDIR, checkpointId, {\n schema_version: CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n id: checkpointId,\n created_at: nowValue,\n author: resolveAuthor(options.author, \"unknown\"),\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n items: checkpointItems,\n });\n checkpointInfo = {\n id: checkpointId,\n created_at: nowValue,\n path: checkpointPath,\n rollback_command: `pm close-many --rollback ${checkpointId}`,\n };\n }\n\n const closeOptions: CloseCommandOptions = {\n author: options.author,\n message: options.message ?? `close-many apply ${checkpointId}`,\n validateClose: validateCloseMode,\n force,\n resolution: options.resolution,\n expectedResult: options.expectedResult,\n actualResult: options.actualResult,\n };\n\n const rows: CloseManyApplyRow[] = [];\n const closedIds: string[] = [];\n for (const item of matched) {\n if (!closableIds.has(item.id)) {\n rows.push({ id: item.id, status: \"skipped\", skip_reason: \"already_terminal\" });\n continue;\n }\n try {\n const result = await runClose(item.id, reason, closeOptions, global);\n rows.push({\n id: item.id,\n status: \"closed\",\n changed_fields: result.changed_fields,\n ...(result.warnings && result.warnings.length > 0 ? { warnings: result.warnings } : {}),\n });\n closedIds.push(item.id);\n } catch (error: unknown) {\n rows.push({ id: item.id, status: \"failed\", error: toErrorMessage(error) });\n }\n }\n\n return {\n mode: \"apply\",\n matched_count: matched.length,\n dry_run: false,\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),\n ...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),\n closed_count: rows.filter((row) => row.status === \"closed\").length,\n skipped_count: rows.filter((row) => row.status === \"skipped\").length,\n failed_count: rows.filter((row) => row.status === \"failed\").length,\n rows,\n ids: closedIds,\n };\n}\n\nexport const _testOnly = {\n activeListOptions,\n buildActiveChildrenByParent,\n hasCloseManyFilters,\n hasCloseManyRollbackConflicts,\n hierarchyDepth,\n rejectBlankIdsFilter,\n resolveReason,\n};\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,GAExB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAA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GAAG,EAAE,SAAS;KACf,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,iBAAiB;IACjB,2BAA2B;IAC3B,mBAAmB;IACnB,6BAA6B;IAC7B,cAAc;IACd,oBAAoB;IACpB,aAAa;CACd,CAAC","debugId":"189f7e8b-1edb-5a03-b43f-9ab994ab5573"}
|
|
1
|
+
{"version":3,"file":"close-many.js","sources":["cli/commands/close-many.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/close-many\n *\n * Implements the pm close many command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport {\n createCheckpointId,\n loadMutationCheckpoint,\n restoreCheckpointItems,\n writeMutationCheckpoint,\n type MutationCheckpointItem,\n} from \"../../core/checkpoint/mutation-checkpoint.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { toErrorMessage } from \"../../core/shared/primitives.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { runClose, type CloseCommandOptions } from \"./close.js\";\nimport { hasListFilters } from \"./list-filter-shared.js\";\nimport { runList, type ListOptions, type ListedItem } from \"./list.js\";\nimport { runRestore } from \"./restore.js\";\n\nconst CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;\nconst CLOSE_MANY_CHECKPOINT_SUBDIR = \"close-many\";\n\nconst CLOSE_MANY_FILTER_GUIDANCE = [\n \"--filter-status\",\n \"--filter-type\",\n \"--filter-tag\",\n \"--filter-priority\",\n \"--filter-sprint\",\n \"--filter-release\",\n \"--filter-parent\",\n \"--filter-assignee\",\n \"--filter-updated-before\",\n \"--ids\",\n].join(\", \");\n\n/**\n * Documents the close many command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface CloseManyCommandOptions {\n status?: string;\n list?: ListOptions;\n reason?: string;\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n validateClose?: string;\n author?: string;\n message?: string;\n force?: boolean;\n dryRun?: boolean;\n rollback?: string;\n checkpoint?: boolean;\n}\n\ninterface CloseManyPlanRow {\n id: string;\n title: string;\n status: string;\n action: \"close\" | \"skip\";\n skip_reason?: string;\n active_child_ids?: string[];\n}\n\ninterface CloseManyApplyRow {\n id: string;\n status: \"closed\" | \"skipped\" | \"failed\";\n skip_reason?: string;\n changed_fields?: string[];\n warnings?: string[];\n error?: string;\n}\n\n/**\n * Documents the close many result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CloseManyResult {\n mode: \"dry_run\" | \"apply\" | \"rollback\";\n matched_count: number;\n dry_run: boolean;\n reason?: string;\n filters?: Record<string, unknown>;\n validate_close?: string;\n item_plans?: CloseManyPlanRow[];\n checkpoint?: {\n id: string;\n created_at: string;\n path: string;\n rollback_command: string;\n };\n closed_count?: number;\n skipped_count?: number;\n failed_count?: number;\n restored_count?: number;\n rollback_checkpoint_id?: string;\n rows?: CloseManyApplyRow[] | Array<{ id: string; status: \"restored\" | \"failed\"; changed_fields?: string[]; warnings?: string[]; error?: string }>;\n ids: string[];\n}\n\nfunction hasCloseManyFilters(list: ListOptions | undefined, status: string | undefined): boolean {\n return hasListFilters(list, status, { includePagination: false });\n}\n\nfunction hasCloseManyRollbackConflicts(list: ListOptions | undefined, status: string | undefined): boolean {\n return hasListFilters(list, status);\n}\n\nfunction rejectBlankIdsFilter(list: ListOptions | undefined): void {\n if (list?.ids != null && String(list.ids).trim().length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n}\n\nfunction activeListOptions(list: ListOptions | undefined): ListOptions {\n const active: ListOptions = {};\n if (!list) {\n return active;\n }\n for (const [key, value] of Object.entries(list) as Array<[keyof ListOptions, unknown]>) {\n if (value == null || (typeof value === \"string\" && !value.split(\",\").some((entry) => entry.trim().length > 0))) {\n continue;\n }\n (active as Record<string, unknown>)[key] = value;\n }\n return active;\n}\n\nfunction resolveReason(reason: unknown, required: boolean): string | undefined {\n const trimmed = String(reason ?? \"\").trim();\n if (trimmed.length > 0) {\n return trimmed;\n }\n if (required) {\n throw new PmCliError(\n \"pm close-many requires a shared close reason via --reason because governance.require_close_reason is enabled.\",\n EXIT_CODE.USAGE,\n {\n code: \"close_reason_required\",\n required: \"Provide a shared closing summary via --reason for the whole batch.\",\n why: \"governance.require_close_reason is enabled, so every close must record why the items are done.\",\n examples: [\n 'pm close-many --filter-sprint S-12 --reason \"Sprint S-12 acceptance criteria met\"',\n 'pm close-many --ids pm-a,pm-b --reason \"Superseded by redesign\"',\n ],\n nextSteps: [\n \"Re-run with --reason describing the shared outcome.\",\n \"To stop requiring reasons, run: pm config set governance-require-close-reason --policy disabled\",\n ],\n },\n );\n }\n return undefined;\n}\n\n// Build a parent -> non-terminal child id map in a single light scan so each\n// matched parent can be annotated with the active children that closing it\n// would orphan (the same signal runClose surfaces per item on apply).\nasync function buildActiveChildrenByParent(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n): Promise<{ childrenByParent: Map<string, string[]>; parentByChild: Map<string, string> }> {\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n const childrenByParent = new Map<string, string[]>();\n const parentByChild = new Map<string, string>();\n for (const item of items) {\n if (typeof item.parent !== \"string\" || item.parent.length === 0) {\n continue;\n }\n parentByChild.set(item.id, item.parent);\n if (isTerminalStatus(item.status, statusRegistry)) {\n continue;\n }\n const existing = childrenByParent.get(item.parent);\n if (existing) {\n existing.push(item.id);\n } else {\n childrenByParent.set(item.parent, [item.id]);\n }\n }\n for (const ids of childrenByParent.values()) {\n ids.sort((left, right) => left.localeCompare(right));\n }\n return { childrenByParent, parentByChild };\n}\n\nfunction hierarchyDepth(id: string, parentByChild: Map<string, string>, cache?: Map<string, number>): number {\n const cached = cache?.get(id);\n if (cached !== undefined) {\n return cached;\n }\n let depth = 0;\n let current = parentByChild.get(id);\n const path: string[] = [];\n const visited = new Set<string>();\n let hasCycle = false;\n while (current !== undefined && !visited.has(current)) {\n const cachedCurrent = cache?.get(current);\n if (cachedCurrent !== undefined) {\n depth += cachedCurrent + 1;\n break;\n }\n visited.add(current);\n path.push(current);\n depth += 1;\n current = parentByChild.get(current);\n }\n if (current !== undefined && visited.has(current)) {\n hasCycle = true;\n }\n if (!hasCycle) {\n cache?.set(id, depth);\n for (const [index, ancestorId] of path.entries()) {\n cache?.set(ancestorId, depth - index - 1);\n }\n }\n return depth;\n}\n\nasync function runCloseManyRollback(params: {\n pmRoot: string;\n rollbackId: string;\n options: CloseManyCommandOptions;\n global: GlobalOptions;\n}): Promise<CloseManyResult> {\n const checkpoint = await loadMutationCheckpoint(\n params.pmRoot,\n CLOSE_MANY_CHECKPOINT_SUBDIR,\n params.rollbackId,\n CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n );\n const restoreMessage = params.options.message ?? `Rollback close-many checkpoint ${checkpoint.id}`;\n const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) =>\n runRestore(id, targetUpdatedAt, { author: params.options.author, message: restoreMessage, force: true }, params.global),\n );\n return {\n mode: \"rollback\",\n matched_count: checkpoint.items.length,\n dry_run: false,\n rollback_checkpoint_id: checkpoint.id,\n checkpoint: {\n id: checkpoint.id,\n created_at: checkpoint.created_at,\n path: checkpoint.path,\n rollback_command: `pm close-many --rollback ${checkpoint.id}`,\n },\n restored_count: rollback.restored_ids.length,\n failed_count: rollback.failed_count,\n rows: rollback.rows,\n ids: rollback.restored_ids,\n };\n}\n\nfunction planCloseManyRows(\n matched: ListedItem[],\n childrenByParent: Map<string, string[]>,\n closePlannedIds: Set<string>,\n statusRegistry: ReturnType<typeof resolveRuntimeStatusRegistry>,\n force: boolean,\n): CloseManyPlanRow[] {\n return matched.map((item) => {\n const alreadyTerminal = isTerminalStatus(item.status, statusRegistry);\n const activeChildIds = (childrenByParent.get(item.id) ?? []).filter((childId) => !closePlannedIds.has(childId));\n const willSkip = alreadyTerminal && !force;\n return {\n id: item.id,\n title: typeof item.title === \"string\" ? item.title : \"\",\n status: item.status,\n action: willSkip ? \"skip\" : \"close\",\n ...(willSkip ? { skip_reason: \"already_terminal\" } : {}),\n ...(activeChildIds.length > 0 ? { active_child_ids: activeChildIds } : {}),\n };\n });\n}\n\nasync function writeCloseManyCheckpoint(params: {\n pmRoot: string;\n checkpointId: string;\n nowValue: string;\n options: CloseManyCommandOptions;\n reason: string | undefined;\n filters: Record<string, unknown>;\n checkpointItems: MutationCheckpointItem[];\n}): Promise<CloseManyResult[\"checkpoint\"]> {\n const checkpointPath = await writeMutationCheckpoint(params.pmRoot, CLOSE_MANY_CHECKPOINT_SUBDIR, params.checkpointId, {\n schema_version: CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n id: params.checkpointId,\n created_at: params.nowValue,\n author: resolveAuthor(params.options.author, \"unknown\"),\n ...(params.reason !== undefined ? { reason: params.reason } : {}),\n filters: params.filters,\n items: params.checkpointItems,\n });\n return {\n id: params.checkpointId,\n created_at: params.nowValue,\n path: checkpointPath,\n rollback_command: `pm close-many --rollback ${params.checkpointId}`,\n };\n}\n\nasync function applyCloseManyRows(params: {\n matched: ListedItem[];\n closableIds: Set<string>;\n reason: string | undefined;\n closeOptions: CloseCommandOptions;\n global: GlobalOptions;\n}): Promise<{ rows: CloseManyApplyRow[]; closedIds: string[] }> {\n const rows: CloseManyApplyRow[] = [];\n const closedIds: string[] = [];\n for (const item of params.matched) {\n if (!params.closableIds.has(item.id)) {\n rows.push({ id: item.id, status: \"skipped\", skip_reason: \"already_terminal\" });\n continue;\n }\n try {\n const result = await runClose(item.id, params.reason, params.closeOptions, params.global);\n rows.push({\n id: item.id,\n status: \"closed\",\n changed_fields: result.changed_fields,\n ...(result.warnings && result.warnings.length > 0 ? { warnings: result.warnings } : {}),\n });\n closedIds.push(item.id);\n } catch (error: unknown) {\n rows.push({ id: item.id, status: \"failed\", error: toErrorMessage(error) });\n }\n }\n return { rows, closedIds };\n}\n\n/**\n * Implements run close many for the public runtime surface of this module.\n */\nexport async function runCloseMany(options: CloseManyCommandOptions, global: GlobalOptions): Promise<CloseManyResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n\n const dryRun = options.dryRun === true;\n const rollbackId = typeof options.rollback === \"string\" ? options.rollback : undefined;\n rejectBlankIdsFilter(options.list);\n\n if (rollbackId) {\n if (dryRun) {\n throw new PmCliError(\"--dry-run cannot be combined with --rollback\", EXIT_CODE.USAGE);\n }\n if (hasCloseManyRollbackConflicts(options.list, options.status)) {\n throw new PmCliError(\"Rollback mode does not accept filter options\", EXIT_CODE.USAGE);\n }\n return runCloseManyRollback({ pmRoot, rollbackId, options, global });\n }\n\n if (!hasCloseManyFilters(options.list, options.status)) {\n throw new PmCliError(\n `close-many requires at least one filter to scope the close (for example: ${CLOSE_MANY_FILTER_GUIDANCE}). Refusing to match every item.`,\n EXIT_CODE.USAGE,\n );\n }\n\n const reason = resolveReason(options.reason, settings.governance.require_close_reason);\n const validateCloseMode = options.validateClose;\n const force = options.force === true;\n\n const listOptions = activeListOptions(options.list);\n const listed = await runList(options.status, listOptions, global);\n const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(pmRoot, settings);\n const depthCache = new Map<string, number>();\n const matched = [...(listed.items as ListedItem[])].sort((left, right) => {\n const depthDelta = hierarchyDepth(right.id, parentByChild, depthCache) - hierarchyDepth(left.id, parentByChild, depthCache);\n return depthDelta !== 0 ? depthDelta : left.id.localeCompare(right.id);\n });\n const closePlannedIds = new Set(\n matched\n .filter((item) => force || !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id),\n );\n\n const planRows = planCloseManyRows(matched, childrenByParent, closePlannedIds, statusRegistry, force);\n\n if (dryRun) {\n return {\n mode: \"dry_run\",\n matched_count: matched.length,\n dry_run: true,\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),\n item_plans: planRows,\n ids: [],\n };\n }\n\n const closableIds = new Set(planRows.filter((row) => row.action === \"close\").map((row) => row.id));\n\n const nowValue = nowIso();\n const checkpointId = createCheckpointId(CLOSE_MANY_CHECKPOINT_SUBDIR, nowValue);\n const checkpointEnabled = options.checkpoint !== false;\n let checkpointInfo: CloseManyResult[\"checkpoint\"] | undefined;\n if (checkpointEnabled && closableIds.size > 0) {\n const checkpointItems: MutationCheckpointItem[] = matched\n .filter((item) => closableIds.has(item.id))\n .map((item) => ({ id: item.id, target_updated_at: item.updated_at }));\n checkpointInfo = await writeCloseManyCheckpoint({\n pmRoot,\n checkpointId,\n nowValue,\n options,\n reason,\n filters: listed.filters,\n checkpointItems,\n });\n }\n\n const closeOptions: CloseCommandOptions = {\n author: options.author,\n message: options.message ?? `close-many apply ${checkpointId}`,\n validateClose: validateCloseMode,\n force,\n resolution: options.resolution,\n expectedResult: options.expectedResult,\n actualResult: options.actualResult,\n };\n\n const { rows, closedIds } = await applyCloseManyRows({ matched, closableIds, reason, closeOptions, global });\n\n return {\n mode: \"apply\",\n matched_count: matched.length,\n dry_run: false,\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),\n ...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),\n closed_count: rows.filter((row) => row.status === \"closed\").length,\n skipped_count: rows.filter((row) => row.status === \"skipped\").length,\n failed_count: rows.filter((row) => row.status === \"failed\").length,\n rows,\n ids: closedIds,\n };\n}\n\nexport const _testOnly = {\n activeListOptions,\n buildActiveChildrenByParent,\n hasCloseManyFilters,\n hasCloseManyRollbackConflicts,\n hierarchyDepth,\n rejectBlankIdsFilter,\n resolveReason,\n};\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,GAExB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,QAAQ,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QACL,IAAI,EAAE,OAAO;QACb,aAAa,EAAE,OAAO,CAAC,MAAM;QAC7B,OAAO,EAAE,KAAK;QACd,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnE,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzD,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,MAAM;QAClE,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,MAAM;QACpE,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,MAAM;QAClE,IAAI;QACJ,GAAG,EAAE,SAAS;KACf,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,iBAAiB;IACjB,2BAA2B;IAC3B,mBAAmB;IACnB,6BAA6B;IAC7B,cAAc;IACd,oBAAoB;IACpB,aAAa;CACd,CAAC","debugId":"6134e48e-82f6-57ac-8c76-23104bfee7bd"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm close command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!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]="
|
|
7
|
+
!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]="b66319bc-0c15-5e2a-9400-f38fe46b9b58")}catch(e){}}();
|
|
8
8
|
import { pathExists } from "../../core/fs/fs-utils.js";
|
|
9
9
|
import { collectBlockedByIds } from "../../core/item/actionability.js";
|
|
10
10
|
import { toItemRecord } from "../../core/item/item-record.js";
|
|
@@ -221,6 +221,152 @@ async function autoUnblockResolvedDependents(pmRoot, settings, closedId, author,
|
|
|
221
221
|
}
|
|
222
222
|
return warnings;
|
|
223
223
|
}
|
|
224
|
+
function applyInlineCloseFields(metadata, options) {
|
|
225
|
+
const changedFields = [];
|
|
226
|
+
const inlineCloseFields = [
|
|
227
|
+
{ option: options.resolution, key: "resolution" },
|
|
228
|
+
{ option: options.expectedResult, key: "expected_result" },
|
|
229
|
+
{ option: options.actualResult, key: "actual_result" },
|
|
230
|
+
];
|
|
231
|
+
for (const { option, key } of inlineCloseFields) {
|
|
232
|
+
if (typeof option !== "string") {
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
const trimmed = option.trim();
|
|
236
|
+
if (trimmed.length === 0) {
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
metadata[key] = trimmed;
|
|
240
|
+
changedFields.push(key);
|
|
241
|
+
}
|
|
242
|
+
return changedFields;
|
|
243
|
+
}
|
|
244
|
+
function applyDuplicateCloseMetadata(metadata, duplicateOf) {
|
|
245
|
+
if (duplicateOf === undefined) {
|
|
246
|
+
return [];
|
|
247
|
+
}
|
|
248
|
+
metadata.duplicate_of = duplicateOf;
|
|
249
|
+
const duplicateFallbackFields = [];
|
|
250
|
+
const fallbackValues = [
|
|
251
|
+
{ key: "resolution", value: `Duplicate of ${duplicateOf}` },
|
|
252
|
+
{ key: "expected_result", value: `Canonical item ${duplicateOf} tracks the work.` },
|
|
253
|
+
{ key: "actual_result", value: `Closed as duplicate of ${duplicateOf}.` },
|
|
254
|
+
];
|
|
255
|
+
for (const { key, value } of fallbackValues) {
|
|
256
|
+
if (shouldApplyDuplicateFallback(metadata[key])) {
|
|
257
|
+
metadata[key] = value;
|
|
258
|
+
duplicateFallbackFields.push(key);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return duplicateFallbackFields;
|
|
262
|
+
}
|
|
263
|
+
function collectCloseValidationWarnings(metadata, validateCloseMode, activeChildIds) {
|
|
264
|
+
const warnings = [];
|
|
265
|
+
if (validateCloseMode !== "off") {
|
|
266
|
+
const missingFields = findMissingCloseValidationFields(metadata);
|
|
267
|
+
if (missingFields.length > 0) {
|
|
268
|
+
if (validateCloseMode === "strict") {
|
|
269
|
+
throw new PmCliError(`Cannot close item ${metadata.id}: missing ${missingFields.join(", ")}. Populate fields or use --validate-close warn.`, EXIT_CODE.USAGE);
|
|
270
|
+
}
|
|
271
|
+
warnings.push(`close_validation_missing_fields:${metadata.id}:${missingFields.join(",")}`);
|
|
272
|
+
}
|
|
273
|
+
if (activeChildIds.length > 0) {
|
|
274
|
+
if (validateCloseMode === "strict") {
|
|
275
|
+
throw new PmCliError(`Cannot close item ${metadata.id}: active child items remain open (${activeChildIds.join(", ")}). Close, cancel, or re-parent them first, or use --validate-close warn.`, EXIT_CODE.USAGE);
|
|
276
|
+
}
|
|
277
|
+
warnings.push(`close_validation_active_children:${metadata.id}:${activeChildIds.join(",")}`);
|
|
278
|
+
}
|
|
279
|
+
return warnings;
|
|
280
|
+
}
|
|
281
|
+
if (activeChildIds.length > 0) {
|
|
282
|
+
warnings.push(`closed_with_active_children:${metadata.id}:${activeChildIds.join(",")}`);
|
|
283
|
+
}
|
|
284
|
+
return warnings;
|
|
285
|
+
}
|
|
286
|
+
function applyCloseReason(metadata, closeReason) {
|
|
287
|
+
if (closeReason !== undefined) {
|
|
288
|
+
metadata.close_reason = closeReason;
|
|
289
|
+
return ["close_reason"];
|
|
290
|
+
}
|
|
291
|
+
if (metadata.close_reason !== undefined) {
|
|
292
|
+
delete metadata.close_reason;
|
|
293
|
+
return ["close_reason"];
|
|
294
|
+
}
|
|
295
|
+
return [];
|
|
296
|
+
}
|
|
297
|
+
function clearCloseAssignee(metadata) {
|
|
298
|
+
if (metadata.assignee === undefined) {
|
|
299
|
+
return [];
|
|
300
|
+
}
|
|
301
|
+
delete metadata.assignee;
|
|
302
|
+
return ["assignee"];
|
|
303
|
+
}
|
|
304
|
+
function clearClosedBlockerSignals(metadata) {
|
|
305
|
+
const previousBlockedBy = typeof metadata.blocked_by === "string" ? metadata.blocked_by.trim() : "";
|
|
306
|
+
const existingDeps = metadata.dependencies ?? [];
|
|
307
|
+
const blockedByEdge = existingDeps.find((dep) => dep.kind === "blocked_by");
|
|
308
|
+
const hadBlockedReason = metadata.blocked_reason !== undefined;
|
|
309
|
+
if (previousBlockedBy.length === 0 && blockedByEdge === undefined && !hadBlockedReason) {
|
|
310
|
+
return { changedFields: [], warnings: [] };
|
|
311
|
+
}
|
|
312
|
+
const changedFields = [];
|
|
313
|
+
if (previousBlockedBy.length > 0) {
|
|
314
|
+
delete metadata.blocked_by;
|
|
315
|
+
changedFields.push("blocked_by");
|
|
316
|
+
}
|
|
317
|
+
if (hadBlockedReason) {
|
|
318
|
+
delete metadata.blocked_reason;
|
|
319
|
+
changedFields.push("blocked_reason");
|
|
320
|
+
}
|
|
321
|
+
if (blockedByEdge !== undefined) {
|
|
322
|
+
const remainingDeps = existingDeps.filter((dep) => dep.kind !== "blocked_by");
|
|
323
|
+
if (remainingDeps.length > 0) {
|
|
324
|
+
metadata.dependencies = remainingDeps;
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
delete metadata.dependencies;
|
|
328
|
+
}
|
|
329
|
+
changedFields.push("dependencies");
|
|
330
|
+
}
|
|
331
|
+
// A stale reason-only close has no blocker identity; omit the blocker-clear warning instead of inventing one.
|
|
332
|
+
const reportedBlocker = previousBlockedBy || blockedByEdge?.id;
|
|
333
|
+
return {
|
|
334
|
+
changedFields,
|
|
335
|
+
warnings: reportedBlocker ? [`closed_cleared_blocked_by:${metadata.id}:${reportedBlocker}`] : [],
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
function mutateCloseMetadata(metadata, context) {
|
|
339
|
+
if (isTerminalStatus(metadata.status, context.statusRegistry) && !context.force) {
|
|
340
|
+
throw new PmCliError(`Item ${metadata.id} is already terminal; use --force to close again.`, EXIT_CODE.CONFLICT);
|
|
341
|
+
}
|
|
342
|
+
const inlineChangedFields = applyInlineCloseFields(metadata, context.options);
|
|
343
|
+
const duplicateFallbackFields = applyDuplicateCloseMetadata(metadata, context.duplicateOf);
|
|
344
|
+
const mutationWarnings = collectCloseValidationWarnings(metadata, context.validateCloseMode, context.activeChildIds);
|
|
345
|
+
metadata.status = context.statusRegistry.close_status;
|
|
346
|
+
const changedFields = [
|
|
347
|
+
"status",
|
|
348
|
+
...applyCloseReason(metadata, context.closeReason),
|
|
349
|
+
...inlineChangedFields,
|
|
350
|
+
];
|
|
351
|
+
if (context.duplicateOf !== undefined) {
|
|
352
|
+
changedFields.push("duplicate_of");
|
|
353
|
+
for (const key of duplicateFallbackFields) {
|
|
354
|
+
/* v8 ignore start -- duplicate fallback keys are already pre-deduped by applyDuplicateCloseMetadata in covered close paths */
|
|
355
|
+
if (!changedFields.includes(key)) {
|
|
356
|
+
changedFields.push(key);
|
|
357
|
+
}
|
|
358
|
+
/* v8 ignore stop */
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
changedFields.push(...clearCloseAssignee(metadata));
|
|
362
|
+
const blockerCleanup = clearClosedBlockerSignals(metadata);
|
|
363
|
+
changedFields.push(...blockerCleanup.changedFields);
|
|
364
|
+
mutationWarnings.push(...blockerCleanup.warnings);
|
|
365
|
+
return {
|
|
366
|
+
changedFields,
|
|
367
|
+
...(mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}),
|
|
368
|
+
};
|
|
369
|
+
}
|
|
224
370
|
export const _testOnlyCloseCommand = {
|
|
225
371
|
blockedByIds: collectBlockedByIds,
|
|
226
372
|
};
|
|
@@ -282,133 +428,15 @@ export async function runClose(id, closeReasonText, options, global) {
|
|
|
282
428
|
message: options.message,
|
|
283
429
|
force: options.force,
|
|
284
430
|
mutate(document) {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
{ option: options.resolution, key: "resolution" },
|
|
295
|
-
{ option: options.expectedResult, key: "expected_result" },
|
|
296
|
-
{ option: options.actualResult, key: "actual_result" },
|
|
297
|
-
];
|
|
298
|
-
const duplicateFallbackFields = [];
|
|
299
|
-
for (const { option, key } of inlineCloseFields) {
|
|
300
|
-
if (typeof option !== "string")
|
|
301
|
-
continue;
|
|
302
|
-
const trimmed = option.trim();
|
|
303
|
-
if (trimmed.length === 0)
|
|
304
|
-
continue;
|
|
305
|
-
document.metadata[key] = trimmed;
|
|
306
|
-
}
|
|
307
|
-
if (duplicateOf !== undefined) {
|
|
308
|
-
document.metadata.duplicate_of = duplicateOf;
|
|
309
|
-
const duplicateResolution = `Duplicate of ${duplicateOf}`;
|
|
310
|
-
const duplicateExpectedResult = `Canonical item ${duplicateOf} tracks the work.`;
|
|
311
|
-
const duplicateActualResult = `Closed as duplicate of ${duplicateOf}.`;
|
|
312
|
-
if (shouldApplyDuplicateFallback(document.metadata.resolution)) {
|
|
313
|
-
document.metadata.resolution = duplicateResolution;
|
|
314
|
-
duplicateFallbackFields.push("resolution");
|
|
315
|
-
}
|
|
316
|
-
if (shouldApplyDuplicateFallback(document.metadata.expected_result)) {
|
|
317
|
-
document.metadata.expected_result = duplicateExpectedResult;
|
|
318
|
-
duplicateFallbackFields.push("expected_result");
|
|
319
|
-
}
|
|
320
|
-
if (shouldApplyDuplicateFallback(document.metadata.actual_result)) {
|
|
321
|
-
document.metadata.actual_result = duplicateActualResult;
|
|
322
|
-
duplicateFallbackFields.push("actual_result");
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
if (validateCloseMode !== "off") {
|
|
326
|
-
const missingFields = findMissingCloseValidationFields(document.metadata);
|
|
327
|
-
if (missingFields.length > 0) {
|
|
328
|
-
if (validateCloseMode === "strict") {
|
|
329
|
-
throw new PmCliError(`Cannot close item ${document.metadata.id}: missing ${missingFields.join(", ")}. Populate fields or use --validate-close warn.`, EXIT_CODE.USAGE);
|
|
330
|
-
}
|
|
331
|
-
mutationWarnings.push(`close_validation_missing_fields:${document.metadata.id}:${missingFields.join(",")}`);
|
|
332
|
-
}
|
|
333
|
-
if (activeChildIds.length > 0) {
|
|
334
|
-
if (validateCloseMode === "strict") {
|
|
335
|
-
throw new PmCliError(`Cannot close item ${document.metadata.id}: active child items remain open (${activeChildIds.join(", ")}). Close, cancel, or re-parent them first, or use --validate-close warn.`, EXIT_CODE.USAGE);
|
|
336
|
-
}
|
|
337
|
-
mutationWarnings.push(`close_validation_active_children:${document.metadata.id}:${activeChildIds.join(",")}`);
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
else if (activeChildIds.length > 0) {
|
|
341
|
-
// C3: minimal governance (validate-close off) should still tell the
|
|
342
|
-
// agent it just closed a parent with open children, without blocking.
|
|
343
|
-
mutationWarnings.push(`closed_with_active_children:${document.metadata.id}:${activeChildIds.join(",")}`);
|
|
344
|
-
}
|
|
345
|
-
document.metadata.status = statusRegistry.close_status;
|
|
346
|
-
const changedFields = ["status"];
|
|
347
|
-
if (closeReason !== undefined) {
|
|
348
|
-
document.metadata.close_reason = closeReason;
|
|
349
|
-
changedFields.push("close_reason");
|
|
350
|
-
}
|
|
351
|
-
else if (document.metadata.close_reason !== undefined) {
|
|
352
|
-
delete document.metadata.close_reason;
|
|
353
|
-
changedFields.push("close_reason");
|
|
354
|
-
}
|
|
355
|
-
for (const { option, key } of inlineCloseFields) {
|
|
356
|
-
if (typeof option === "string" && option.trim().length > 0) {
|
|
357
|
-
changedFields.push(key);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
if (duplicateOf !== undefined) {
|
|
361
|
-
changedFields.push("duplicate_of");
|
|
362
|
-
if (duplicateFallbackFields.includes("resolution") && !changedFields.includes("resolution")) {
|
|
363
|
-
changedFields.push("resolution");
|
|
364
|
-
}
|
|
365
|
-
if (duplicateFallbackFields.includes("expected_result") && !changedFields.includes("expected_result")) {
|
|
366
|
-
changedFields.push("expected_result");
|
|
367
|
-
}
|
|
368
|
-
if (duplicateFallbackFields.includes("actual_result") && !changedFields.includes("actual_result")) {
|
|
369
|
-
changedFields.push("actual_result");
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
if (document.metadata.assignee !== undefined) {
|
|
373
|
-
delete document.metadata.assignee;
|
|
374
|
-
changedFields.push("assignee");
|
|
375
|
-
}
|
|
376
|
-
// C4 (pm-fu5d): a terminal item is no longer blocked. Clear every active
|
|
377
|
-
// blocker signal independently — scalar blocked_by, blocked_reason, and the
|
|
378
|
-
// blocked_by dependency edges (kept consistent with the kyd6 invariant) —
|
|
379
|
-
// even if only some are present (e.g. an orphaned edge or a stale
|
|
380
|
-
// blocked_reason left by manual edits), so closed work stops surfacing in
|
|
381
|
-
// blockers views, and annotate the cleanup.
|
|
382
|
-
const previousBlockedBy = typeof document.metadata.blocked_by === "string" ? document.metadata.blocked_by.trim() : "";
|
|
383
|
-
const existingDeps = document.metadata.dependencies ?? [];
|
|
384
|
-
const blockedByEdge = existingDeps.find((dep) => dep.kind === "blocked_by");
|
|
385
|
-
const hadBlockedReason = document.metadata.blocked_reason !== undefined;
|
|
386
|
-
if (previousBlockedBy.length > 0 || blockedByEdge !== undefined || hadBlockedReason) {
|
|
387
|
-
if (previousBlockedBy.length > 0) {
|
|
388
|
-
delete document.metadata.blocked_by;
|
|
389
|
-
changedFields.push("blocked_by");
|
|
390
|
-
}
|
|
391
|
-
if (hadBlockedReason) {
|
|
392
|
-
delete document.metadata.blocked_reason;
|
|
393
|
-
changedFields.push("blocked_reason");
|
|
394
|
-
}
|
|
395
|
-
if (blockedByEdge !== undefined) {
|
|
396
|
-
const remainingDeps = existingDeps.filter((dep) => dep.kind !== "blocked_by");
|
|
397
|
-
if (remainingDeps.length > 0) {
|
|
398
|
-
document.metadata.dependencies = remainingDeps;
|
|
399
|
-
}
|
|
400
|
-
else {
|
|
401
|
-
delete document.metadata.dependencies;
|
|
402
|
-
}
|
|
403
|
-
changedFields.push("dependencies");
|
|
404
|
-
}
|
|
405
|
-
const reportedBlocker = previousBlockedBy || blockedByEdge?.id || "unknown";
|
|
406
|
-
mutationWarnings.push(`closed_cleared_blocked_by:${document.metadata.id}:${reportedBlocker}`);
|
|
407
|
-
}
|
|
408
|
-
return {
|
|
409
|
-
changedFields,
|
|
410
|
-
...(mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}),
|
|
411
|
-
};
|
|
431
|
+
return mutateCloseMetadata(document.metadata, {
|
|
432
|
+
statusRegistry,
|
|
433
|
+
force: options.force,
|
|
434
|
+
options,
|
|
435
|
+
duplicateOf,
|
|
436
|
+
validateCloseMode,
|
|
437
|
+
activeChildIds,
|
|
438
|
+
closeReason,
|
|
439
|
+
});
|
|
412
440
|
},
|
|
413
441
|
});
|
|
414
442
|
return {
|
|
@@ -421,4 +449,4 @@ export async function runClose(id, closeReasonText, options, global) {
|
|
|
421
449
|
};
|
|
422
450
|
}
|
|
423
451
|
//# sourceMappingURL=close.js.map
|
|
424
|
-
//# debugId=
|
|
452
|
+
//# debugId=b66319bc-0c15-5e2a-9400-f38fe46b9b58
|