@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
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-WW4E2DC3.js";
|
|
4
4
|
import {
|
|
5
5
|
readHistoryEntries
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A6VOGKBA.js";
|
|
7
7
|
import {
|
|
8
8
|
EMPTY_REPLAY_DOCUMENT,
|
|
9
9
|
normalizeReplayPatchOps,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
replayToCanonicalItemDocument,
|
|
12
12
|
replayToItemDocument,
|
|
13
13
|
toReplayDocument
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-N2JSWVWG.js";
|
|
15
15
|
import {
|
|
16
16
|
acquireLock,
|
|
17
17
|
appendHistoryEntry,
|
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
normalizeItemId,
|
|
22
22
|
normalizeRawItemId,
|
|
23
23
|
readLocatedItem
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JXAUVO6X.js";
|
|
25
25
|
import {
|
|
26
26
|
canonicalDocument,
|
|
27
27
|
serializeItemDocument
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-IEEJQCZ4.js";
|
|
29
29
|
import {
|
|
30
30
|
nowIso
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-AIAIXG7I.js";
|
|
32
32
|
import {
|
|
33
33
|
EXIT_CODE,
|
|
34
34
|
PmCliError,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
resolvePmRoot,
|
|
46
46
|
runActiveOnWriteHooks,
|
|
47
47
|
writeFileAtomic
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-7NSPKJUS.js";
|
|
49
49
|
|
|
50
50
|
// dist/cli/commands/restore.js
|
|
51
51
|
import jsonPatch from "fast-json-patch";
|
|
@@ -53,7 +53,7 @@ import fs from "node:fs/promises";
|
|
|
53
53
|
!(function() {
|
|
54
54
|
try {
|
|
55
55
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
56
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
56
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "fdb88d94-5eca-54ba-9e29-56a4bf0583af");
|
|
57
57
|
} catch (e2) {
|
|
58
58
|
}
|
|
59
59
|
})();
|
|
@@ -109,6 +109,10 @@ function extractPatchFailureContext(patch, error) {
|
|
|
109
109
|
context.patchIndex = candidate.index;
|
|
110
110
|
}
|
|
111
111
|
const operationRecord = typeof candidate.operation === "object" && candidate.operation !== null ? candidate.operation : null;
|
|
112
|
+
enrichPatchFailureContext(context, operationRecord, patch);
|
|
113
|
+
return context;
|
|
114
|
+
}
|
|
115
|
+
function enrichPatchFailureContext(context, operationRecord, patch) {
|
|
112
116
|
if (operationRecord && typeof operationRecord.op === "string") {
|
|
113
117
|
context.op = operationRecord.op;
|
|
114
118
|
}
|
|
@@ -126,7 +130,6 @@ function extractPatchFailureContext(patch, error) {
|
|
|
126
130
|
context.from = context.from ?? fallback.from;
|
|
127
131
|
}
|
|
128
132
|
}
|
|
129
|
-
return context;
|
|
130
133
|
}
|
|
131
134
|
function applyHistoryPatch(current, patch, entryNumber, entryOp) {
|
|
132
135
|
try {
|
|
@@ -240,6 +243,71 @@ function changedFields(beforeDocument, afterDocument) {
|
|
|
240
243
|
}
|
|
241
244
|
return Array.from(fields).sort((a, b) => a.localeCompare(b));
|
|
242
245
|
}
|
|
246
|
+
async function loadRestoreStateUnderLock(params) {
|
|
247
|
+
const historyRawUnderLock = await readFileIfExists(params.subject.historyPath);
|
|
248
|
+
if (historyRawUnderLock !== params.historyRawBeforeLock) {
|
|
249
|
+
throw new PmCliError(`History for ${params.resolvedId} changed while waiting for lock; retry restore.`, EXIT_CODE.CONFLICT);
|
|
250
|
+
}
|
|
251
|
+
const locatedUnderLock = await locateItem(params.pmRoot, params.resolvedId, params.settings.id_prefix, params.settings.item_format, params.typeToFolder);
|
|
252
|
+
const loadedItemUnderLock = locatedUnderLock ? await readLocatedItem(locatedUnderLock, { schema: params.settings.schema }) : null;
|
|
253
|
+
if ((loadedItemUnderLock?.raw ?? null) !== params.currentItemRawBeforeLock) {
|
|
254
|
+
throw new PmCliError(`Item ${params.resolvedId} changed while waiting for lock; retry restore.`, EXIT_CODE.CONFLICT);
|
|
255
|
+
}
|
|
256
|
+
return { loadedItemUnderLock, existingItemPath: locatedUnderLock?.itemPath ?? null };
|
|
257
|
+
}
|
|
258
|
+
function resolveRestoreCurrentState(loadedItemUnderLock, history) {
|
|
259
|
+
if (loadedItemUnderLock) {
|
|
260
|
+
return { document: loadedItemUnderLock.document, originalRaw: loadedItemUnderLock.raw };
|
|
261
|
+
}
|
|
262
|
+
return { document: replayCurrentDocument(history), originalRaw: null };
|
|
263
|
+
}
|
|
264
|
+
function collectRestoreOwnershipWarnings(params) {
|
|
265
|
+
const assigned = params.document.metadata.assignee?.trim();
|
|
266
|
+
const hasOwnershipConflict = assigned && assigned !== params.author && !params.force;
|
|
267
|
+
if (!hasOwnershipConflict) {
|
|
268
|
+
return [];
|
|
269
|
+
}
|
|
270
|
+
if (params.enforcement === "strict") {
|
|
271
|
+
throw new PmCliError(`Item ${params.resolvedId} is assigned to ${assigned}. Use --force to override.`, EXIT_CODE.CONFLICT);
|
|
272
|
+
}
|
|
273
|
+
return params.enforcement === "warn" ? [`ownership_warning:assignee_conflict:${params.resolvedId}:${assigned}`] : [];
|
|
274
|
+
}
|
|
275
|
+
async function restorePreviousItemAfterHistoryFailure(params) {
|
|
276
|
+
if (params.existingItemPath && params.resolvedOriginalRaw !== null && params.restoredItemPath !== params.existingItemPath) {
|
|
277
|
+
await writeFileAtomic(params.existingItemPath, params.resolvedOriginalRaw);
|
|
278
|
+
await fs.rm(params.restoredItemPath, { force: true });
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
if (params.existingItemPath && params.resolvedOriginalRaw !== null) {
|
|
282
|
+
await writeFileAtomic(params.existingItemPath, params.resolvedOriginalRaw);
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
await fs.rm(params.restoredItemPath, { force: true });
|
|
286
|
+
}
|
|
287
|
+
async function runRestoreWriteHooks(params) {
|
|
288
|
+
return [
|
|
289
|
+
...await runActiveOnWriteHooks({
|
|
290
|
+
path: params.restoredItemPath,
|
|
291
|
+
scope: "project",
|
|
292
|
+
op: "restore",
|
|
293
|
+
item_id: params.after.metadata.id,
|
|
294
|
+
item_type: params.after.metadata.type,
|
|
295
|
+
before: params.before,
|
|
296
|
+
after: params.after,
|
|
297
|
+
changed_fields: ["restored"]
|
|
298
|
+
}),
|
|
299
|
+
...await runActiveOnWriteHooks({
|
|
300
|
+
path: params.historyPath,
|
|
301
|
+
scope: "project",
|
|
302
|
+
op: "restore:history",
|
|
303
|
+
item_id: params.after.metadata.id,
|
|
304
|
+
item_type: params.after.metadata.type,
|
|
305
|
+
before: params.before,
|
|
306
|
+
after: params.after,
|
|
307
|
+
changed_fields: ["restored"]
|
|
308
|
+
})
|
|
309
|
+
];
|
|
310
|
+
}
|
|
243
311
|
async function runRestore(id, target, options, global2) {
|
|
244
312
|
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
245
313
|
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
@@ -265,36 +333,24 @@ async function runRestore(id, target, options, global2) {
|
|
|
265
333
|
const author = resolveAuthor(options.author, settings.author_default);
|
|
266
334
|
const releaseLock = await acquireLock(pmRoot, resolvedId, settings.locks.ttl_seconds, author, Boolean(options.force), settings.governance.force_required_for_stale_lock);
|
|
267
335
|
try {
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
const existingItemPath = locatedUnderLock?.itemPath ?? null;
|
|
336
|
+
const { loadedItemUnderLock, existingItemPath } = await loadRestoreStateUnderLock({
|
|
337
|
+
pmRoot,
|
|
338
|
+
resolvedId,
|
|
339
|
+
subject,
|
|
340
|
+
settings,
|
|
341
|
+
typeToFolder: typeRegistry.type_to_folder,
|
|
342
|
+
historyRawBeforeLock,
|
|
343
|
+
currentItemRawBeforeLock
|
|
344
|
+
});
|
|
278
345
|
const itemFormat = "toon";
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
287
|
-
const assigned = resolvedCurrentDocument.metadata.assignee?.trim();
|
|
288
|
-
const ownershipWarnings = [];
|
|
289
|
-
const hasOwnershipConflict = assigned && assigned !== author && !options.force;
|
|
290
|
-
if (hasOwnershipConflict) {
|
|
291
|
-
if (settings.governance.ownership_enforcement === "strict") {
|
|
292
|
-
throw new PmCliError(`Item ${resolvedId} is assigned to ${assigned}. Use --force to override.`, EXIT_CODE.CONFLICT);
|
|
293
|
-
}
|
|
294
|
-
if (settings.governance.ownership_enforcement === "warn") {
|
|
295
|
-
ownershipWarnings.push(`ownership_warning:assignee_conflict:${resolvedId}:${assigned}`);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
346
|
+
const currentState = resolveRestoreCurrentState(loadedItemUnderLock, history);
|
|
347
|
+
const ownershipWarnings = collectRestoreOwnershipWarnings({
|
|
348
|
+
document: currentState.document,
|
|
349
|
+
author,
|
|
350
|
+
force: options.force,
|
|
351
|
+
enforcement: settings.governance.ownership_enforcement,
|
|
352
|
+
resolvedId
|
|
353
|
+
});
|
|
298
354
|
const serializedRestore = serializeItemDocument(restoredDocument, { format: itemFormat, schema: settings.schema });
|
|
299
355
|
const restoredItemPath = getItemPath(pmRoot, restoredDocument.metadata.type, resolvedId, itemFormat, typeRegistry.type_to_folder);
|
|
300
356
|
await writeFileAtomic(restoredItemPath, serializedRestore);
|
|
@@ -305,53 +361,34 @@ async function runRestore(id, target, options, global2) {
|
|
|
305
361
|
nowIso: nowIso(),
|
|
306
362
|
author,
|
|
307
363
|
op: "restore",
|
|
308
|
-
before:
|
|
364
|
+
before: currentState.document,
|
|
309
365
|
after: restoredDocument,
|
|
310
366
|
message: options.message
|
|
311
367
|
});
|
|
312
368
|
try {
|
|
313
369
|
await appendHistoryEntry(subject.historyPath, historyEntry);
|
|
314
370
|
} catch (error) {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
} else {
|
|
321
|
-
await fs.rm(restoredItemPath, { force: true });
|
|
322
|
-
}
|
|
371
|
+
await restorePreviousItemAfterHistoryFailure({
|
|
372
|
+
existingItemPath,
|
|
373
|
+
resolvedOriginalRaw: currentState.originalRaw,
|
|
374
|
+
restoredItemPath
|
|
375
|
+
});
|
|
323
376
|
throw error;
|
|
324
377
|
}
|
|
325
|
-
const restoreChangedFields = changedFields(
|
|
326
|
-
const hookWarnings =
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
item_type: restoredDocument.metadata.type,
|
|
333
|
-
before: resolvedCurrentDocument,
|
|
334
|
-
after: restoredDocument,
|
|
335
|
-
changed_fields: ["restored"]
|
|
336
|
-
}),
|
|
337
|
-
...await runActiveOnWriteHooks({
|
|
338
|
-
path: subject.historyPath,
|
|
339
|
-
scope: "project",
|
|
340
|
-
op: "restore:history",
|
|
341
|
-
item_id: restoredDocument.metadata.id,
|
|
342
|
-
item_type: restoredDocument.metadata.type,
|
|
343
|
-
before: resolvedCurrentDocument,
|
|
344
|
-
after: restoredDocument,
|
|
345
|
-
changed_fields: ["restored"]
|
|
346
|
-
})
|
|
347
|
-
];
|
|
378
|
+
const restoreChangedFields = changedFields(currentState.document, restoredDocument);
|
|
379
|
+
const hookWarnings = await runRestoreWriteHooks({
|
|
380
|
+
restoredItemPath,
|
|
381
|
+
historyPath: subject.historyPath,
|
|
382
|
+
before: currentState.document,
|
|
383
|
+
after: restoredDocument
|
|
384
|
+
});
|
|
348
385
|
recordAfterCommandAffectedItem({
|
|
349
386
|
id: restoredDocument.metadata.id,
|
|
350
387
|
op: "restore",
|
|
351
388
|
item_type: restoredDocument.metadata.type,
|
|
352
|
-
previous_status:
|
|
389
|
+
previous_status: currentState.document.metadata.status,
|
|
353
390
|
status: restoredDocument.metadata.status,
|
|
354
|
-
previous: projectAfterCommandItemSnapshot(
|
|
391
|
+
previous: projectAfterCommandItemSnapshot(currentState.document.metadata, restoreChangedFields),
|
|
355
392
|
current: projectAfterCommandItemSnapshot(restoredDocument.metadata, restoreChangedFields),
|
|
356
393
|
changed_fields: restoreChangedFields
|
|
357
394
|
});
|
|
@@ -387,4 +424,4 @@ export {
|
|
|
387
424
|
runRestore,
|
|
388
425
|
_testOnlyRestoreCommand
|
|
389
426
|
};
|
|
390
|
-
//# sourceMappingURL=chunk-
|
|
427
|
+
//# sourceMappingURL=chunk-4NUOWFBT.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../cli/commands/restore.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module cli/commands/restore\n *\n * Implements the pm restore command surface and its agent-facing runtime behavior.\n */\nimport jsonPatch from \"fast-json-patch\";\nimport fs from \"node:fs/promises\";\nimport { pathExists, readFileIfExists, writeFileAtomic } from \"../../core/fs/fs-utils.js\";\nimport { appendHistoryEntry, createHistoryEntry } from \"../../core/history/history.js\";\nimport {\n EMPTY_REPLAY_DOCUMENT,\n normalizeReplayPatchOps,\n replayHash,\n replayToCanonicalItemDocument,\n replayToItemDocument,\n toReplayDocument,\n type ReplayDocument as CanonicalReplayDocument,\n} from \"../../core/history/replay.js\";\nimport { enforceHistoryStreamPolicyForItem } from \"../../core/history/history-stream-policy.js\";\nimport { normalizeItemId, normalizeRawItemId } from \"../../core/item/id.js\";\nimport { canonicalDocument, serializeItemDocument } from \"../../core/item/item-format.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { acquireLock } from \"../../core/lock/lock.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 { nowIso } from \"../../core/shared/time.js\";\nimport {\n getActiveExtensionRegistrations,\n projectAfterCommandItemSnapshot,\n recordAfterCommandAffectedItem,\n runActiveOnWriteHooks,\n} from \"../../core/extensions/index.js\";\nimport { locateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getHistoryPath, getItemPath, getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport type { HistoryEntry, HistoryPatchOp, ItemDocument, ItemMetadata } from \"../../types/index.js\";\nimport { readHistoryEntries } from \"./history.js\";\n\ninterface ResolvedRestoreTarget {\n kind: \"version\" | \"timestamp\";\n raw: string;\n historyIndex: number;\n}\n\ninterface ResolvedRestoreSubject {\n id: string;\n historyPath: string;\n located: Awaited<ReturnType<typeof locateItem>>;\n historyPolicyWarnings: string[];\n}\n\ninterface RestoreCurrentState {\n document: ItemDocument;\n originalRaw: string | null;\n}\n\ninterface PatchFailureContext {\n patchIndex?: number;\n op?: string;\n path?: string;\n from?: string;\n reason?: string;\n}\n\n/**\n * Documents the restore command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface RestoreCommandOptions {\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the restore result payload exchanged by command, SDK, and package integrations.\n */\nexport interface RestoreResult {\n item: ItemMetadata;\n restored_from: {\n kind: \"version\" | \"timestamp\";\n target: string;\n history_index: number;\n entry_ts: string;\n entry_op: string;\n };\n changed_fields: string[];\n warnings: string[];\n}\n\nfunction ensureReplayTarget(target: string, history: HistoryEntry[]): ResolvedRestoreTarget {\n const trimmed = target.trim();\n if (!trimmed) {\n throw new PmCliError(\"Missing restore target. Use a timestamp or version number.\", EXIT_CODE.USAGE);\n }\n\n if (/^\\d+$/.test(trimmed)) {\n const version = Number(trimmed);\n if (!Number.isSafeInteger(version) || version < 1 || version > history.length) {\n throw new PmCliError(\n `Restore version must be between 1 and ${history.length} for this item.`,\n EXIT_CODE.USAGE,\n );\n }\n return {\n kind: \"version\",\n raw: trimmed,\n historyIndex: version - 1,\n };\n }\n\n const parsedTarget = Date.parse(trimmed);\n if (!Number.isFinite(parsedTarget)) {\n throw new PmCliError(\n `Invalid restore target \"${target}\". Use a positive version number or ISO timestamp.`,\n EXIT_CODE.USAGE,\n );\n }\n\n let index = -1;\n for (let i = 0; i < history.length; i += 1) {\n const entryTimestamp = Date.parse(history[i].ts);\n if (!Number.isFinite(entryTimestamp)) {\n throw new PmCliError(\n `History for this item contains invalid timestamp at entry ${i + 1}.`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n if (entryTimestamp <= parsedTarget) {\n index = i;\n }\n }\n\n if (index < 0) {\n throw new PmCliError(`No history entries exist at or before timestamp ${trimmed}.`, EXIT_CODE.USAGE);\n }\n\n return {\n kind: \"timestamp\",\n raw: trimmed,\n historyIndex: index,\n };\n}\n\nfunction extractPatchFailureContext(\n patch: HistoryPatchOp[],\n error: unknown,\n): PatchFailureContext {\n const context: PatchFailureContext = {};\n if (error instanceof Error && error.message.trim().length > 0) {\n context.reason = error.message.trim();\n }\n if (typeof error !== \"object\" || error === null) {\n return context;\n }\n const candidate = error as {\n index?: unknown;\n operation?: unknown;\n };\n /* c8 ignore start -- parser-generated patch errors may omit index metadata in current fixtures. */\n if (typeof candidate.index === \"number\" && Number.isInteger(candidate.index) && candidate.index >= 0) {\n context.patchIndex = candidate.index;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- operation payload metadata is optional in upstream json-patch failures. */\n const operationRecord =\n typeof candidate.operation === \"object\" && candidate.operation !== null\n ? (candidate.operation as { op?: unknown; path?: unknown; from?: unknown })\n : null;\n /* c8 ignore stop */\n enrichPatchFailureContext(context, operationRecord, patch);\n return context;\n}\n\nfunction enrichPatchFailureContext(\n context: PatchFailureContext,\n operationRecord: { op?: unknown; path?: unknown; from?: unknown } | null,\n patch: HistoryPatchOp[],\n): void {\n /* v8 ignore start -- operation replay records always carry a string op when present; this preserves context for malformed future rows */\n if (operationRecord && typeof operationRecord.op === \"string\") {\n context.op = operationRecord.op;\n }\n /* v8 ignore stop */\n if (operationRecord && typeof operationRecord.path === \"string\") {\n context.path = operationRecord.path;\n }\n if (operationRecord && typeof operationRecord.from === \"string\") {\n context.from = operationRecord.from;\n }\n if ((context.op === undefined || context.path === undefined) && context.patchIndex !== undefined) {\n const fallback = patch[context.patchIndex];\n /* c8 ignore start -- fallback enrichment paths are only exercised by malformed patch telemetry payloads. */\n if (fallback) {\n context.op = context.op ?? fallback.op;\n context.path = context.path ?? fallback.path;\n context.from = context.from ?? fallback.from;\n }\n /* c8 ignore stop */\n }\n}\n\nfunction applyHistoryPatch(\n current: CanonicalReplayDocument,\n patch: HistoryPatchOp[],\n entryNumber: number,\n entryOp: string,\n): CanonicalReplayDocument {\n try {\n const normalizedPatch = normalizeReplayPatchOps(patch);\n const applied = jsonPatch.applyPatch(\n structuredClone(current),\n normalizedPatch as jsonPatch.Operation[],\n true,\n false,\n ).newDocument as unknown;\n if (\n typeof applied !== \"object\" ||\n applied === null ||\n !(\"metadata\" in applied) ||\n !(\"body\" in applied) ||\n typeof (applied as { body: unknown }).body !== \"string\" ||\n typeof (applied as { metadata: unknown }).metadata !== \"object\" ||\n (applied as { metadata: unknown }).metadata === null\n ) {\n throw new PmCliError(\n `History replay produced an invalid document shape at entry ${entryNumber}.`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n const replay = applied as { metadata: Record<string, unknown>; body: string };\n return {\n metadata: replay.metadata,\n body: replay.body,\n };\n } catch (error: unknown) {\n if (error instanceof PmCliError) {\n throw error;\n }\n const failureContext = extractPatchFailureContext(patch, error);\n const contextTokens = [\n `history_op=${entryOp}`,\n /* c8 ignore next -- contextual fields are best-effort and may be absent depending on patch failure shape. */\n failureContext.patchIndex !== undefined ? `patch_index=${failureContext.patchIndex}` : null,\n /* c8 ignore next -- contextual fields are best-effort and may be absent depending on patch failure shape. */\n failureContext.op ? `op=${failureContext.op}` : null,\n /* c8 ignore next -- contextual fields are best-effort and may be absent depending on patch failure shape. */\n failureContext.path ? `path=${failureContext.path}` : null,\n /* c8 ignore next -- contextual fields are best-effort and may be absent depending on patch failure shape. */\n failureContext.from ? `from=${failureContext.from}` : null,\n ].filter((token): token is string => token !== null);\n /* c8 ignore start -- jsonPatch/structuredClone/normalizeReplayPatchOps always throw Error instances with non-empty messages here, so extractPatchFailureContext always sets reason; the empty-suffix fallback is unreachable through applyHistoryPatch. */\n const reasonSuffix = failureContext.reason ? ` ${failureContext.reason}` : \"\";\n /* c8 ignore stop */\n throw new PmCliError(\n `Failed to apply history patch at entry ${entryNumber} (${contextTokens.join(\", \")}).${reasonSuffix}`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n}\n\nfunction replayToTarget(history: HistoryEntry[], targetIndex: number): CanonicalReplayDocument {\n let document: CanonicalReplayDocument = structuredClone(EMPTY_REPLAY_DOCUMENT);\n\n for (let i = 0; i <= targetIndex; i += 1) {\n const entry = history[i];\n const beforeHash = replayHash(document);\n if (beforeHash !== entry.before_hash) {\n throw new PmCliError(\n `History hash mismatch before replay at entry ${i + 1}.`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n\n document = applyHistoryPatch(document, entry.patch, i + 1, entry.op);\n\n const afterHash = replayHash(document);\n if (afterHash !== entry.after_hash) {\n throw new PmCliError(\n `History hash mismatch after replay at entry ${i + 1}.`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n }\n\n return document;\n}\n\nfunction ensureMaterializedRestoreTarget(\n replayDocument: CanonicalReplayDocument,\n target: ResolvedRestoreTarget,\n): CanonicalReplayDocument {\n if (Object.keys(replayDocument.metadata).length > 0) {\n return replayDocument;\n }\n throw new PmCliError(\n `Restore target ${target.raw} resolves to a deleted state; choose a version or timestamp where the item exists.`,\n EXIT_CODE.USAGE,\n );\n}\n\nfunction replayCurrentDocument(history: HistoryEntry[]): ItemDocument {\n const currentReplay = replayToTarget(history, history.length - 1);\n if (Object.keys(currentReplay.metadata).length === 0) {\n return {\n metadata: {} as ItemMetadata,\n body: currentReplay.body,\n };\n }\n return canonicalDocument(replayToItemDocument(currentReplay));\n}\n\nasync function resolveRestoreSubject(\n pmRoot: string,\n id: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n typeToFolder: Record<string, string>,\n): Promise<ResolvedRestoreSubject> {\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeToFolder);\n if (located) {\n const historyPath = getHistoryPath(pmRoot, located.id);\n const historyPolicy = await enforceHistoryStreamPolicyForItem({\n pmRoot,\n settings,\n itemId: located.id,\n commandLabel: \"restore\",\n });\n return {\n id: located.id,\n historyPath,\n located,\n historyPolicyWarnings: historyPolicy.warnings,\n };\n }\n\n const normalizedId = normalizeItemId(id, settings.id_prefix);\n const rawNormalizedId = normalizeRawItemId(id);\n /* c8 ignore start -- raw-id fallback is covered by normalize-item-id utility tests. */\n const candidateIds = normalizedId === rawNormalizedId ? [normalizedId] : [normalizedId, rawNormalizedId];\n /* c8 ignore stop */\n for (const candidateId of candidateIds) {\n const historyPath = getHistoryPath(pmRoot, candidateId);\n if (await pathExists(historyPath)) {\n return {\n id: candidateId,\n historyPath,\n located: null,\n historyPolicyWarnings: [],\n };\n }\n }\n\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n}\n\nfunction changedFields(beforeDocument: ItemDocument, afterDocument: ItemDocument): string[] {\n const beforeReplay = toReplayDocument(beforeDocument);\n const afterReplay = toReplayDocument(afterDocument);\n const patch = jsonPatch.compare(beforeReplay, afterReplay) as HistoryPatchOp[];\n const fields = new Set<string>();\n\n for (const op of patch) {\n if (op.path === \"/body\" || op.path.startsWith(\"/body/\")) {\n fields.add(\"body\");\n continue;\n }\n const segment = op.path.replace(/^\\/(?:metadata|front_matter)\\/?/, \"\").split(\"/\")[0];\n fields.add(segment.replaceAll(\"~1\", \"/\").replaceAll(\"~0\", \"~\"));\n }\n\n return Array.from(fields).sort((a, b) => a.localeCompare(b));\n}\n\nasync function loadRestoreStateUnderLock(params: {\n pmRoot: string;\n resolvedId: string;\n subject: ResolvedRestoreSubject;\n settings: Awaited<ReturnType<typeof readSettings>>;\n typeToFolder: Record<string, string>;\n historyRawBeforeLock: string | null;\n currentItemRawBeforeLock: string | null;\n}): Promise<{ loadedItemUnderLock: Awaited<ReturnType<typeof readLocatedItem>> | null; existingItemPath: string | null }> {\n const historyRawUnderLock = await readFileIfExists(params.subject.historyPath);\n if (historyRawUnderLock !== params.historyRawBeforeLock) {\n throw new PmCliError(`History for ${params.resolvedId} changed while waiting for lock; retry restore.`, EXIT_CODE.CONFLICT);\n }\n const locatedUnderLock = await locateItem(\n params.pmRoot,\n params.resolvedId,\n params.settings.id_prefix,\n params.settings.item_format,\n params.typeToFolder,\n );\n const loadedItemUnderLock = locatedUnderLock ? await readLocatedItem(locatedUnderLock, { schema: params.settings.schema }) : null;\n if ((loadedItemUnderLock?.raw ?? null) !== params.currentItemRawBeforeLock) {\n throw new PmCliError(`Item ${params.resolvedId} changed while waiting for lock; retry restore.`, EXIT_CODE.CONFLICT);\n }\n return { loadedItemUnderLock, existingItemPath: locatedUnderLock?.itemPath ?? null };\n}\n\nfunction resolveRestoreCurrentState(\n loadedItemUnderLock: Awaited<ReturnType<typeof readLocatedItem>> | null,\n history: HistoryEntry[],\n): RestoreCurrentState {\n if (loadedItemUnderLock) {\n return { document: loadedItemUnderLock.document, originalRaw: loadedItemUnderLock.raw };\n }\n return { document: replayCurrentDocument(history), originalRaw: null };\n}\n\nfunction collectRestoreOwnershipWarnings(params: {\n document: ItemDocument;\n author: string;\n force: boolean | undefined;\n enforcement: \"strict\" | \"warn\" | \"none\";\n resolvedId: string;\n}): string[] {\n const assigned = params.document.metadata.assignee?.trim();\n const hasOwnershipConflict = assigned && assigned !== params.author && !params.force;\n if (!hasOwnershipConflict) {\n return [];\n }\n if (params.enforcement === \"strict\") {\n throw new PmCliError(`Item ${params.resolvedId} is assigned to ${assigned}. Use --force to override.`, EXIT_CODE.CONFLICT);\n }\n return params.enforcement === \"warn\" ? [`ownership_warning:assignee_conflict:${params.resolvedId}:${assigned}`] : [];\n}\n\nasync function restorePreviousItemAfterHistoryFailure(params: {\n existingItemPath: string | null;\n resolvedOriginalRaw: string | null;\n restoredItemPath: string;\n}): Promise<void> {\n if (params.existingItemPath && params.resolvedOriginalRaw !== null && params.restoredItemPath !== params.existingItemPath) {\n await writeFileAtomic(params.existingItemPath, params.resolvedOriginalRaw);\n await fs.rm(params.restoredItemPath, { force: true });\n return;\n }\n if (params.existingItemPath && params.resolvedOriginalRaw !== null) {\n await writeFileAtomic(params.existingItemPath, params.resolvedOriginalRaw);\n return;\n }\n await fs.rm(params.restoredItemPath, { force: true });\n}\n\nasync function runRestoreWriteHooks(params: {\n restoredItemPath: string;\n historyPath: string;\n before: ItemDocument;\n after: ItemDocument;\n}): Promise<string[]> {\n return [\n ...(await runActiveOnWriteHooks({\n path: params.restoredItemPath,\n scope: \"project\",\n op: \"restore\",\n item_id: params.after.metadata.id,\n item_type: params.after.metadata.type,\n before: params.before,\n after: params.after,\n changed_fields: [\"restored\"],\n })),\n ...(await runActiveOnWriteHooks({\n path: params.historyPath,\n scope: \"project\",\n op: \"restore:history\",\n item_id: params.after.metadata.id,\n item_type: params.after.metadata.type,\n before: params.before,\n after: params.after,\n changed_fields: [\"restored\"],\n })),\n ];\n}\n\n/**\n * Implements run restore for the public runtime surface of this module.\n */\nexport async function runRestore(\n id: string,\n target: string,\n options: RestoreCommandOptions,\n global: GlobalOptions,\n): Promise<RestoreResult> {\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\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const subject = await resolveRestoreSubject(pmRoot, id, settings, typeRegistry.type_to_folder);\n const resolvedId = subject.id;\n const historyRawBeforeLock = await readFileIfExists(subject.historyPath);\n const history = await readHistoryEntries(subject.historyPath, resolvedId);\n if (history.length === 0) {\n throw new PmCliError(`No history exists for ${resolvedId}; restore is unavailable.`, EXIT_CODE.NOT_FOUND);\n }\n\n const resolvedTarget = ensureReplayTarget(target, history);\n const replayDocument = ensureMaterializedRestoreTarget(replayToTarget(history, resolvedTarget.historyIndex), resolvedTarget);\n const restoredDocument = replayToCanonicalItemDocument(replayDocument, { schema: settings.schema });\n\n if (restoredDocument.metadata.id !== resolvedId) {\n throw new PmCliError(\n `Restore target resolved to item ${restoredDocument.metadata.id}, expected ${resolvedId}.`,\n EXIT_CODE.GENERIC_FAILURE,\n );\n }\n const loadedItemBeforeLock = subject.located ? await readLocatedItem(subject.located, { schema: settings.schema }) : null;\n const currentItemRawBeforeLock = loadedItemBeforeLock?.raw ?? null;\n\n const author = resolveAuthor(options.author, settings.author_default);\n const releaseLock = await acquireLock(\n pmRoot,\n resolvedId,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n settings.governance.force_required_for_stale_lock,\n );\n\n try {\n const { loadedItemUnderLock, existingItemPath } = await loadRestoreStateUnderLock({\n pmRoot,\n resolvedId,\n subject,\n settings,\n typeToFolder: typeRegistry.type_to_folder,\n historyRawBeforeLock,\n currentItemRawBeforeLock,\n });\n const itemFormat = \"toon\";\n const currentState = resolveRestoreCurrentState(loadedItemUnderLock, history);\n const ownershipWarnings = collectRestoreOwnershipWarnings({\n document: currentState.document,\n author,\n force: options.force,\n enforcement: settings.governance.ownership_enforcement,\n resolvedId,\n });\n\n const serializedRestore = serializeItemDocument(restoredDocument, { format: itemFormat, schema: settings.schema });\n /* c8 ignore next -- restored item path typing is exercised in restore integration workflows. */\n const restoredItemPath = getItemPath(\n pmRoot,\n restoredDocument.metadata.type,\n resolvedId,\n itemFormat,\n typeRegistry.type_to_folder,\n );\n await writeFileAtomic(restoredItemPath, serializedRestore);\n if (existingItemPath && restoredItemPath !== existingItemPath) {\n await fs.rm(existingItemPath);\n }\n\n const historyEntry = createHistoryEntry({\n nowIso: nowIso(),\n author,\n op: \"restore\",\n before: currentState.document,\n after: restoredDocument,\n message: options.message,\n });\n\n try {\n await appendHistoryEntry(subject.historyPath, historyEntry);\n } catch (error: unknown) {\n await restorePreviousItemAfterHistoryFailure({\n existingItemPath,\n resolvedOriginalRaw: currentState.originalRaw,\n restoredItemPath,\n });\n throw error;\n }\n const restoreChangedFields = changedFields(currentState.document, restoredDocument);\n const hookWarnings = await runRestoreWriteHooks({\n restoredItemPath,\n historyPath: subject.historyPath,\n before: currentState.document,\n after: restoredDocument,\n });\n recordAfterCommandAffectedItem({\n id: restoredDocument.metadata.id,\n op: \"restore\",\n item_type: restoredDocument.metadata.type,\n previous_status: currentState.document.metadata.status,\n status: restoredDocument.metadata.status,\n previous: projectAfterCommandItemSnapshot(currentState.document.metadata, restoreChangedFields),\n current: projectAfterCommandItemSnapshot(restoredDocument.metadata, restoreChangedFields),\n changed_fields: restoreChangedFields,\n });\n\n const targetEntry = history[resolvedTarget.historyIndex];\n return {\n item: restoredDocument.metadata,\n restored_from: {\n kind: resolvedTarget.kind,\n target: resolvedTarget.raw,\n history_index: resolvedTarget.historyIndex + 1,\n entry_ts: targetEntry.ts,\n entry_op: targetEntry.op,\n },\n changed_fields: restoreChangedFields,\n warnings: [...subject.historyPolicyWarnings, ...ownershipWarnings, ...hookWarnings],\n };\n } finally {\n await releaseLock();\n }\n}\n\nexport const _testOnlyRestoreCommand = {\n applyHistoryPatch,\n changedFields,\n ensureMaterializedRestoreTarget,\n ensureReplayTarget,\n extractPatchFailureContext,\n replayCurrentDocument,\n replayToTarget,\n resolveRestoreSubject,\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,eAAe;AACtB,OAAO,QAAQ;;;;;;;;AAqFf,SAAS,mBAAmB,QAAgB,SAAuB;AACjE,QAAM,UAAU,OAAO,KAAI;AAC3B,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,WAAW,8DAA8D,UAAU,KAAK;EACpG;AAEA,MAAI,QAAQ,KAAK,OAAO,GAAG;AACzB,UAAM,UAAU,OAAO,OAAO;AAC9B,QAAI,CAAC,OAAO,cAAc,OAAO,KAAK,UAAU,KAAK,UAAU,QAAQ,QAAQ;AAC7E,YAAM,IAAI,WACR,yCAAyC,QAAQ,MAAM,mBACvD,UAAU,KAAK;IAEnB;AACA,WAAO;MACL,MAAM;MACN,KAAK;MACL,cAAc,UAAU;;EAE5B;AAEA,QAAM,eAAe,KAAK,MAAM,OAAO;AACvC,MAAI,CAAC,OAAO,SAAS,YAAY,GAAG;AAClC,UAAM,IAAI,WACR,2BAA2B,MAAM,sDACjC,UAAU,KAAK;EAEnB;AAEA,MAAI,QAAQ;AACZ,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK,GAAG;AAC1C,UAAM,iBAAiB,KAAK,MAAM,QAAQ,CAAC,EAAE,EAAE;AAC/C,QAAI,CAAC,OAAO,SAAS,cAAc,GAAG;AACpC,YAAM,IAAI,WACR,6DAA6D,IAAI,CAAC,KAClE,UAAU,eAAe;IAE7B;AACA,QAAI,kBAAkB,cAAc;AAClC,cAAQ;IACV;EACF;AAEA,MAAI,QAAQ,GAAG;AACb,UAAM,IAAI,WAAW,mDAAmD,OAAO,KAAK,UAAU,KAAK;EACrG;AAEA,SAAO;IACL,MAAM;IACN,KAAK;IACL,cAAc;;AAElB;AAEA,SAAS,2BAC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,eAAe;QACvB,eAAe,eAAe,eAAe;QAC7C,UAAU,YAAY;QACtB,UAAU,YAAY;;MAExB,gBAAgB;MAChB,UAAU,CAAC,GAAG,QAAQ,uBAAuB,GAAG,mBAAmB,GAAG,YAAY;;EAEtF;AACE,UAAM,YAAW;EACnB;AACF;AAEO,IAAM,0BAA0B;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;",
|
|
6
|
+
"names": ["global"]
|
|
7
|
+
}
|
|
@@ -2,21 +2,21 @@
|
|
|
2
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]="8a2f4c69-d55e-5208-9766-d2dcf2a19d73")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
parseCsvKv
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KLXF7NCC.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveAuthor
|
|
8
8
|
} from "./chunk-T5RRNDA7.js";
|
|
9
9
|
import {
|
|
10
10
|
parseLimit
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2CHRYUXL.js";
|
|
12
12
|
import {
|
|
13
13
|
locateItem,
|
|
14
14
|
mutateItem,
|
|
15
15
|
readLocatedItem
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NRZS637N.js";
|
|
17
17
|
import {
|
|
18
18
|
nowIso
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-K2VYLVX4.js";
|
|
20
20
|
import {
|
|
21
21
|
EXIT_CODE,
|
|
22
22
|
PmCliError,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
readSettings,
|
|
27
27
|
resolveItemTypeRegistry,
|
|
28
28
|
resolvePmRoot
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-I66WE2HE.js";
|
|
30
30
|
|
|
31
31
|
// dist/cli/commands/annotation-command.js
|
|
32
32
|
function limitAnnotationEntries(values, limit) {
|
|
@@ -215,6 +215,6 @@ export {
|
|
|
215
215
|
wrapOwnershipConflict,
|
|
216
216
|
runAnnotationCommand
|
|
217
217
|
};
|
|
218
|
-
//# sourceMappingURL=chunk-
|
|
218
|
+
//# sourceMappingURL=chunk-55XRYWEG.js.map
|
|
219
219
|
|
|
220
220
|
//# debugId=8a2f4c69-d55e-5208-9766-d2dcf2a19d73
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
PLAN_MODE_VALUES,
|
|
12
12
|
PLAN_STEP_LINK_KIND_VALUES,
|
|
13
13
|
PLAN_STEP_STATUS_VALUES
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-I66WE2HE.js";
|
|
15
15
|
|
|
16
16
|
// dist/sdk/cli-contracts/commander-types.js
|
|
17
17
|
var LIST_COMMANDER_STRING_OPTION_CONTRACTS = [
|
|
@@ -4699,6 +4699,6 @@ export {
|
|
|
4699
4699
|
resolveSubcommandFlagContractsForCommand,
|
|
4700
4700
|
PM_TOOL_PARAMETERS_SCHEMA
|
|
4701
4701
|
};
|
|
4702
|
-
//# sourceMappingURL=chunk-
|
|
4702
|
+
//# sourceMappingURL=chunk-5GVTFFTC.js.map
|
|
4703
4703
|
|
|
4704
4704
|
//# debugId=43af9766-fa42-5af2-8e94-459bc0205f26
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
runActiveRendererOverride,
|
|
5
5
|
runActiveServiceOverrideSync,
|
|
6
6
|
setActiveCommandResult
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7NSPKJUS.js";
|
|
8
8
|
|
|
9
9
|
// dist/core/output/mutation-projection.js
|
|
10
10
|
!(function() {
|
|
11
11
|
try {
|
|
12
12
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
13
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
13
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "31ecd51a-b5e0-503b-b488-4e6a12815ffe");
|
|
14
14
|
} catch (e2) {
|
|
15
15
|
}
|
|
16
16
|
})();
|
|
@@ -51,12 +51,41 @@ function replaceRows(envelope, rows) {
|
|
|
51
51
|
projected[ROWS_KEY] = rows;
|
|
52
52
|
return projected;
|
|
53
53
|
}
|
|
54
|
+
function projectIdOnlyResult(result) {
|
|
55
|
+
if (!isPlainObject(result) || !isPlainObject(result.item)) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
const id = typeof result.item.id === "string" ? result.item.id : void 0;
|
|
59
|
+
const status = typeof result.item.status === "string" ? result.item.status : void 0;
|
|
60
|
+
if (!id) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
return status ? { id, status } : { id };
|
|
64
|
+
}
|
|
65
|
+
function compactUpdateManyRows(envelope) {
|
|
66
|
+
const rows = isUpdateManyMutationEnvelope(envelope) ? envelope[ROWS_KEY] : void 0;
|
|
67
|
+
if (!Array.isArray(rows)) {
|
|
68
|
+
return { projected: envelope, changed: false };
|
|
69
|
+
}
|
|
70
|
+
let rowsChanged = false;
|
|
71
|
+
const nextRows = rows.map((row) => {
|
|
72
|
+
if (!isPlainObject(row)) {
|
|
73
|
+
return row;
|
|
74
|
+
}
|
|
75
|
+
const compactedRow = compactOwnChangedFields(row);
|
|
76
|
+
if (compactedRow) {
|
|
77
|
+
rowsChanged = true;
|
|
78
|
+
return compactedRow;
|
|
79
|
+
}
|
|
80
|
+
return row;
|
|
81
|
+
});
|
|
82
|
+
return rowsChanged ? { projected: replaceRows(envelope, nextRows), changed: true } : { projected: envelope, changed: false };
|
|
83
|
+
}
|
|
54
84
|
function projectMutationResult(result, options = {}) {
|
|
55
|
-
if (options.idOnly === true
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return status ? { id, status } : { id };
|
|
85
|
+
if (options.idOnly === true) {
|
|
86
|
+
const idOnly = projectIdOnlyResult(result);
|
|
87
|
+
if (idOnly !== null) {
|
|
88
|
+
return idOnly;
|
|
60
89
|
}
|
|
61
90
|
}
|
|
62
91
|
const mode = options.changedFields ?? "full";
|
|
@@ -70,24 +99,10 @@ function projectMutationResult(result, options = {}) {
|
|
|
70
99
|
projected = compactedTop;
|
|
71
100
|
changed = true;
|
|
72
101
|
}
|
|
73
|
-
const
|
|
74
|
-
if (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (!isPlainObject(row)) {
|
|
78
|
-
return row;
|
|
79
|
-
}
|
|
80
|
-
const compactedRow = compactOwnChangedFields(row);
|
|
81
|
-
if (compactedRow) {
|
|
82
|
-
rowsChanged = true;
|
|
83
|
-
return compactedRow;
|
|
84
|
-
}
|
|
85
|
-
return row;
|
|
86
|
-
});
|
|
87
|
-
if (rowsChanged) {
|
|
88
|
-
projected = replaceRows(projected, nextRows);
|
|
89
|
-
changed = true;
|
|
90
|
-
}
|
|
102
|
+
const rowProjection = compactUpdateManyRows(projected);
|
|
103
|
+
if (rowProjection.changed) {
|
|
104
|
+
projected = rowProjection.projected;
|
|
105
|
+
changed = true;
|
|
91
106
|
}
|
|
92
107
|
return changed ? projected : result;
|
|
93
108
|
}
|
|
@@ -346,4 +361,4 @@ export {
|
|
|
346
361
|
printResult,
|
|
347
362
|
printError
|
|
348
363
|
};
|
|
349
|
-
//# sourceMappingURL=chunk-
|
|
364
|
+
//# sourceMappingURL=chunk-5PGBHRY3.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../core/output/mutation-projection.ts", "../../../../../../../../core/output/output.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Shared projection helper for mutation command results.\n *\n * Mutation commands (create/update/close/append/update-many) return a result\n * envelope that carries a `changed_fields` string array. On create this array simply\n * re-lists every field the command just set, which the item echo above it already\n * shows, so for high-volume agent loops it is ~50% redundant payload. This helper\n * lets the CLI (`--no-changed-fields`) and the MCP agent path trim that array down\n * to a deterministic `changed_field_count` without losing mutation evidence.\n *\n * Compaction is deliberately scoped to the mutation envelope only:\n * - the envelope's own top-level `changed_fields` (create/update/close/append), and\n * - `rows[*].changed_fields` (update-many reports its delta per row).\n * It does NOT recurse into arbitrary nested objects, so unrelated payloads that\n * legitimately carry `changed_fields` (for example `pm history --diff` entries, or a\n * custom runtime metadata field) are left untouched.\n *\n * The helper is pure and side-effect free, reused by both the output layer and the\n * MCP server, and returns the original reference unchanged when nothing is compacted.\n */\n\n/** Controls whether mutation output keeps full changed fields or compact counts. */\nexport type ChangedFieldsMode = \"full\" | \"compact\";\n\n/**\n * Documents the mutation projection options payload exchanged by command, SDK, and package integrations.\n */\nexport interface MutationProjectionOptions {\n /** Defaults to \"full\" (unchanged output). \"compact\" drops the array, keeping a count. */\n changedFields?: ChangedFieldsMode;\n /** Return only id/status for single-item mutation envelopes. */\n idOnly?: boolean;\n}\n\nconst CHANGED_FIELDS_KEY = \"changed_fields\";\nconst CHANGED_FIELD_COUNT_KEY = \"changed_field_count\";\nconst ROWS_KEY = \"rows\";\nconst UPDATE_MANY_MUTATION_MODES = new Set([\"apply\", \"rollback\"]);\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n return false;\n }\n const proto = Object.getPrototypeOf(value);\n return proto === null || proto === Object.prototype;\n}\n\n/** Replace a single envelope's own top-level `changed_fields` array with a count. */\nfunction compactOwnChangedFields(envelope: Record<string, unknown>): Record<string, unknown> | null {\n const changedFields = envelope[CHANGED_FIELDS_KEY];\n if (!Array.isArray(changedFields)) {\n return null;\n }\n const projected: Record<string, unknown> =\n Object.getPrototypeOf(envelope) === null ? Object.create(null) : {};\n for (const [key, value] of Object.entries(envelope)) {\n if (key !== CHANGED_FIELDS_KEY) {\n projected[key] = value;\n }\n }\n projected[CHANGED_FIELD_COUNT_KEY] = changedFields.length;\n return projected;\n}\n\nfunction isMutationEnvelope(value: Record<string, unknown>): boolean {\n return \"item\" in value && Array.isArray(value[CHANGED_FIELDS_KEY]);\n}\n\nfunction isUpdateManyMutationEnvelope(value: Record<string, unknown>): boolean {\n return (\n typeof value.mode === \"string\" &&\n UPDATE_MANY_MUTATION_MODES.has(value.mode) &&\n Array.isArray(value[ROWS_KEY])\n );\n}\n\nfunction replaceRows(envelope: Record<string, unknown>, rows: unknown[]): Record<string, unknown> {\n const projected: Record<string, unknown> =\n Object.getPrototypeOf(envelope) === null ? Object.create(null) : {};\n Object.assign(projected, envelope);\n projected[ROWS_KEY] = rows;\n return projected;\n}\n\nfunction projectIdOnlyResult(result: unknown): unknown | null {\n if (!isPlainObject(result) || !isPlainObject(result.item)) {\n return null;\n }\n const id = typeof result.item.id === \"string\" ? result.item.id : undefined;\n const status = typeof result.item.status === \"string\" ? result.item.status : undefined;\n if (!id) {\n return null;\n }\n return status ? { id, status } : { id };\n}\n\nfunction compactUpdateManyRows(envelope: Record<string, unknown>): { projected: Record<string, unknown>; changed: boolean } {\n const rows = isUpdateManyMutationEnvelope(envelope) ? envelope[ROWS_KEY] : undefined;\n if (!Array.isArray(rows)) {\n return { projected: envelope, changed: false };\n }\n let rowsChanged = false;\n const nextRows = rows.map((row) => {\n if (!isPlainObject(row)) {\n return row;\n }\n const compactedRow = compactOwnChangedFields(row);\n if (compactedRow) {\n rowsChanged = true;\n return compactedRow;\n }\n return row;\n });\n return rowsChanged\n ? { projected: replaceRows(envelope, nextRows), changed: true }\n : { projected: envelope, changed: false };\n}\n\n/**\n * Returns a copy of a mutation result with the envelope `changed_fields` arrays\n * replaced by `changed_field_count` when compact mode is requested. Inputs that are\n * not a mutation envelope (or full mode) are returned unchanged (same reference).\n */\nexport function projectMutationResult(result: unknown, options: MutationProjectionOptions = {}): unknown {\n if (options.idOnly === true) {\n const idOnly = projectIdOnlyResult(result);\n if (idOnly !== null) {\n return idOnly;\n }\n }\n\n const mode = options.changedFields ?? \"full\";\n if (mode === \"full\" || !isPlainObject(result)) {\n return result;\n }\n\n let changed = false;\n let projected: Record<string, unknown> = result;\n\n const compactedTop = isMutationEnvelope(result) ? compactOwnChangedFields(result) : null;\n if (compactedTop !== null) {\n projected = compactedTop;\n changed = true;\n }\n\n const rowProjection = compactUpdateManyRows(projected);\n if (rowProjection.changed) {\n projected = rowProjection.projected;\n changed = true;\n }\n\n return changed ? projected : result;\n}\n", "/**\n * @module core/output/output\n *\n * Formats compact human and machine output for Output.\n */\nimport {\n runActiveCommandOverride,\n runActiveRendererOverride,\n runActiveServiceOverrideSync,\n setActiveCommandResult,\n} from \"../extensions/index.js\";\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { projectMutationResult } from \"./mutation-projection.js\";\n\n/**\n * Documents the output options payload exchanged by command, SDK, and package integrations.\n */\nexport interface OutputOptions {\n json?: boolean;\n quiet?: boolean;\n /** When true, mutation results drop the verbose changed_fields array (keeps changed_field_count). */\n noChangedFields?: boolean;\n /** When true, single-item mutation results print only id and status. */\n idOnly?: boolean;\n defaultOutputFormat?: \"toon\" | \"json\";\n command?: string;\n commandArgs?: string[];\n commandOptions?: Record<string, unknown>;\n pmRoot?: string;\n}\n\ninterface NodeLikeError {\n code?: string;\n}\n\nconst NATIVE_OUTPUT_MARKER = \"__pm_native_output\";\n\nlet streamErrorHandlersInstalled = false;\ntype OutputStreamTarget = \"stdout\" | \"stderr\";\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction shouldUseNativeOutput(result: unknown): boolean {\n return isPlainObject(result) && result[NATIVE_OUTPUT_MARKER] === true;\n}\n\nfunction stripNativeOutputMarker<T>(result: T): T {\n if (!isPlainObject(result) || result[NATIVE_OUTPUT_MARKER] !== true) {\n return result;\n }\n const { [NATIVE_OUTPUT_MARKER]: _marker, ...rest } = result;\n return rest as T;\n}\n\nfunction isBrokenPipeError(error: unknown): boolean {\n return typeof error === \"object\" && error !== null && (error as NodeLikeError).code === \"EPIPE\";\n}\n\nfunction markStdoutBrokenPipeExitCode(): void {\n if (process.exitCode === undefined || process.exitCode === EXIT_CODE.SUCCESS) {\n process.exitCode = EXIT_CODE.SUCCESS;\n }\n}\n\nfunction markStderrBrokenPipeExitCode(): void {\n if (process.exitCode === undefined || process.exitCode === EXIT_CODE.SUCCESS) {\n process.exitCode = EXIT_CODE.GENERIC_FAILURE;\n }\n}\n\nfunction markBrokenPipeExitCode(target: OutputStreamTarget): void {\n if (target === \"stdout\") {\n markStdoutBrokenPipeExitCode();\n return;\n }\n markStderrBrokenPipeExitCode();\n}\n\nfunction handleUnhandledStreamError(error: unknown): void {\n const unhandled = error instanceof Error ? error : new Error(String(error));\n setImmediate(() => {\n throw unhandled;\n });\n}\n\nfunction installStreamErrorHandlers(): void {\n if (streamErrorHandlersInstalled) {\n return;\n }\n streamErrorHandlersInstalled = true;\n process.stdout.on(\"error\", (error: unknown) => {\n if (isBrokenPipeError(error)) {\n markBrokenPipeExitCode(\"stdout\");\n return;\n }\n handleUnhandledStreamError(error);\n });\n process.stderr.on(\"error\", (error: unknown) => {\n if (isBrokenPipeError(error)) {\n markBrokenPipeExitCode(\"stderr\");\n return;\n }\n handleUnhandledStreamError(error);\n });\n}\n\nfunction writeToStream(target: OutputStreamTarget, text: string): boolean {\n installStreamErrorHandlers();\n try {\n if (target === \"stdout\") {\n process.stdout.write(text);\n } else {\n process.stderr.write(text);\n }\n return true;\n } catch (error: unknown) {\n if (isBrokenPipeError(error)) {\n markBrokenPipeExitCode(target);\n return false;\n }\n throw error;\n }\n}\n\n/**\n * Implements write stdout for the public runtime surface of this module.\n */\nexport function writeStdout(text: string): boolean {\n return writeToStream(\"stdout\", text);\n}\n\n/**\n * Implements write stderr for the public runtime surface of this module.\n */\nexport function writeStderr(text: string): boolean {\n return writeToStream(\"stderr\", text);\n}\n\nfunction renderScalar(value: unknown): string {\n if (typeof value === \"string\") return JSON.stringify(value);\n if (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n if (value === null) return \"null\";\n return JSON.stringify(value);\n}\n\nfunction compactToonValue(value: unknown): unknown | undefined {\n if (value === null || value === undefined) {\n return undefined;\n }\n\n if (Array.isArray(value)) {\n const compactedEntries = value\n .map((entry) => compactToonValue(entry))\n .filter((entry): entry is unknown => entry !== undefined);\n return compactedEntries.length > 0 ? compactedEntries : undefined;\n }\n\n if (isPlainObject(value)) {\n const compacted: Record<string, unknown> = {};\n for (const [key, entry] of Object.entries(value)) {\n const compactedEntry = compactToonValue(entry);\n if (compactedEntry !== undefined) {\n compacted[key] = compactedEntry;\n }\n }\n return Object.keys(compacted).length > 0 ? compacted : undefined;\n }\n\n return value;\n}\n\nfunction renderToonValue(value: unknown, depth: number): string {\n const indent = \" \".repeat(depth);\n\n if (Array.isArray(value)) {\n if (value.length === 0) return \"[]\";\n return value\n .map((entry) => {\n if (!isPlainObject(entry) && !Array.isArray(entry)) {\n return `${indent}- ${renderScalar(entry)}`;\n }\n const rendered = renderToonValue(entry, depth + 1);\n const lines = rendered.split(\"\\n\");\n const [firstLine, ...rest] = lines;\n if (rest.length === 0) {\n return `${indent}- ${firstLine.trimStart()}`;\n }\n return `${indent}- ${firstLine.trimStart()}\\n${rest.join(\"\\n\")}`;\n })\n .join(\"\\n\");\n }\n\n if (isPlainObject(value)) {\n const entries = Object.entries(value);\n if (entries.length === 0) return \"{}\";\n return entries\n .map(([key, entry]) => {\n if (!isPlainObject(entry) && !Array.isArray(entry)) {\n return `${indent}${key}: ${renderScalar(entry)}`;\n }\n if (Array.isArray(entry) && entry.length === 0) {\n return `${indent}${key}: []`;\n }\n if (isPlainObject(entry) && Object.keys(entry).length === 0) {\n return `${indent}${key}: {}`;\n }\n return `${indent}${key}:\\n${renderToonValue(entry, depth + 1)}`;\n })\n .join(\"\\n\");\n }\n\n return `${indent}${renderScalar(value)}`;\n}\n\nfunction renderDefaultMarkdownResult(value: unknown): string | null {\n if (!isPlainObject(value) || value.output_default !== \"markdown\") {\n return null;\n }\n if (typeof value.view !== \"string\" || !Array.isArray(value.events) || !Array.isArray(value.days)) {\n return null;\n }\n const lines = [`# pm calendar (${value.view})`, \"\"];\n const summary = isPlainObject(value.summary) ? value.summary : {};\n lines.push(`- events: ${String(summary.events ?? 0)}`);\n lines.push(\"\");\n if (value.events.length === 0) {\n lines.push(\"No calendar events matched the selected filters.\");\n return `${lines.join(\"\\n\")}\\n`;\n }\n for (const event of value.events) {\n if (!isPlainObject(event)) {\n continue;\n }\n const kind = typeof event.kind === \"string\" ? event.kind : \"event\";\n const title = typeof event.item_title === \"string\" ? event.item_title : \"\";\n const itemId = typeof event.item_id === \"string\" ? event.item_id : \"\";\n const reminderText = typeof event.reminder_text === \"string\" && event.reminder_text.length > 0 ? ` ${event.reminder_text}` : \"\";\n lines.push(`- [${kind}] ${itemId} ${title}${reminderText}`.trim());\n }\n return `${lines.join(\"\\n\")}\\n`;\n}\n\n/**\n * Implements format output for the public runtime surface of this module.\n */\nexport function formatOutput(result: unknown, options: OutputOptions): string {\n const commandOverride = runActiveCommandOverride(result);\n const nativeOutput = shouldUseNativeOutput(commandOverride.result);\n const effectiveResult = stripNativeOutputMarker(commandOverride.result);\n setActiveCommandResult(effectiveResult);\n const format =\n options.json === true\n ? \"json\"\n : options.json === false\n ? \"toon\"\n : options.defaultOutputFormat === \"json\"\n ? \"json\"\n : \"toon\";\n const serviceOverride = nativeOutput ? { handled: false, result: effectiveResult } : runActiveServiceOverrideSync(\"output_format\", {\n command: options.command,\n args: options.commandArgs,\n command_options: options.commandOptions,\n global: { ...options },\n pm_root: options.pmRoot,\n format,\n options: { ...options },\n result: effectiveResult,\n });\n if (serviceOverride.handled && typeof serviceOverride.result === \"string\") {\n return serviceOverride.result.endsWith(\"\\n\") ? serviceOverride.result : `${serviceOverride.result}\\n`;\n }\n const outputResult = serviceOverride.handled ? serviceOverride.result : effectiveResult;\n if (format === \"toon\") {\n const markdownDefault = renderDefaultMarkdownResult(outputResult);\n if (markdownDefault !== null) {\n return markdownDefault;\n }\n }\n const rendererOverride = nativeOutput ? { rendered: null } : runActiveRendererOverride(format, outputResult);\n if (rendererOverride.rendered !== null) {\n return rendererOverride.rendered.endsWith(\"\\n\") ? rendererOverride.rendered : `${rendererOverride.rendered}\\n`;\n }\n if (format === \"json\") {\n return `${JSON.stringify(outputResult, null, 2)}\\n`;\n }\n const compactedToon = compactToonValue(outputResult);\n if (compactedToon === undefined) {\n return \"{}\\n\";\n }\n return `${renderToonValue(compactedToon, 0)}\\n`;\n}\n\n/**\n * Implements print result for the public runtime surface of this module.\n */\nexport function printResult(result: unknown, options: OutputOptions): void {\n const projected = options.idOnly\n ? projectMutationResult(result, { idOnly: true })\n : options.noChangedFields\n ? projectMutationResult(result, { changedFields: \"compact\" })\n : result;\n const rendered = formatOutput(projected, options);\n if (options.quiet) {\n return;\n }\n writeStdout(rendered);\n}\n\n/**\n * Implements print error for the public runtime surface of this module.\n */\nexport function printError(message: string): void {\n const override = runActiveServiceOverrideSync(\"error_format\", {\n message,\n });\n const rendered = override.handled && typeof override.result === \"string\" ? override.result : message;\n writeStderr(rendered.endsWith(\"\\n\") ? rendered : `${rendered}\\n`);\n}\n\nexport const outputTestOnly = {\n compactToonValue,\n renderToonValue,\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAkCA,IAAM,qBAAqB;AAC3B,IAAM,0BAA0B;AAChC,IAAM,WAAW;AACjB,IAAM,6BAA6B,oBAAI,IAAI,CAAC,SAAS,UAAU,CAAC;AAEhE,SAAS,cAAc,OAAc;AACnC,MAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK,GAAG;AACvE,WAAO;EACT;AACA,QAAM,QAAQ,OAAO,eAAe,KAAK;AACzC,SAAO,UAAU,QAAQ,UAAU,OAAO;AAC5C;AAGA,SAAS,wBAAwB,U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