@unbrained/pm-cli 2026.6.5 → 2026.6.7
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 +77 -0
- package/CONTRIBUTING.md +1 -0
- package/README.md +17 -5
- package/dist/cli/commander-usage.js +74 -4
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/aggregate.d.ts +8 -0
- package/dist/cli/commands/aggregate.js +84 -7
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.js +10 -3
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.js +13 -10
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/close.d.ts +1 -1
- package/dist/cli/commands/close.js +20 -10
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +87 -18
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +5 -4
- package/dist/cli/commands/config.js +50 -2
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.js +6 -3
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/copy.d.ts +14 -0
- package/dist/cli/commands/copy.js +153 -0
- package/dist/cli/commands/copy.js.map +1 -0
- package/dist/cli/commands/extension/doctor.js +62 -2
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.d.ts +8 -0
- package/dist/cli/commands/extension/install-sources.js +82 -2
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +29 -0
- package/dist/cli/commands/extension.js +61 -2
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/gc.d.ts +8 -1
- package/dist/cli/commands/gc.js +26 -3
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.d.ts +9 -0
- package/dist/cli/commands/get.js +23 -2
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.js +15 -2
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.d.ts +39 -0
- package/dist/cli/commands/history-compact.js +262 -0
- package/dist/cli/commands/history-compact.js.map +1 -0
- package/dist/cli/commands/history.d.ts +4 -1
- package/dist/cli/commands/history.js +12 -24
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +3 -0
- package/dist/cli/commands/index.js +5 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/list.d.ts +2 -0
- package/dist/cli/commands/list.js +87 -9
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/reindex.js +8 -4
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/search.d.ts +1 -0
- package/dist/cli/commands/search.js +232 -35
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/stats.d.ts +8 -1
- package/dist/cli/commands/stats.js +18 -17
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/telemetry.d.ts +8 -0
- package/dist/cli/commands/telemetry.js +253 -0
- package/dist/cli/commands/telemetry.js.map +1 -0
- package/dist/cli/error-guidance.js +26 -2
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.d.ts +1 -0
- package/dist/cli/extension-command-help.js +3 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/help-content.js +19 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.js +13 -21
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +24 -6
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +52 -17
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +55 -8
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +5 -5
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +21 -3
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-5UROHJ3D.js +16 -0
- package/dist/cli-bundle/chunks/{activity-3RWRRNOW.js → activity-YVB3QRTE.js} +11 -11
- package/dist/cli-bundle/chunks/{aggregate-OOAGKWRG.js → aggregate-LH66F75F.js} +87 -17
- package/dist/cli-bundle/chunks/aggregate-LH66F75F.js.map +7 -0
- package/dist/cli-bundle/chunks/{aggregate-J35K7WZB.js → aggregate-OHSWFQJM.js} +88 -18
- package/dist/cli-bundle/chunks/aggregate-OHSWFQJM.js.map +1 -0
- package/dist/cli-bundle/chunks/{append-PNN6UIBZ.js → append-2PPYFAG5.js} +8 -8
- package/dist/cli-bundle/chunks/{append-5JE3YGXU.js → append-AUGT5W6J.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-26KTVXJW.js → chunk-2IF7WLB7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KA24HME7.js → chunk-2IXCHCLM.js} +5 -6
- package/dist/cli-bundle/chunks/chunk-2IXCHCLM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XX5LRINW.js → chunk-2OJHLWBZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ASQM3IF5.js → chunk-3A2CMEM7.js} +5 -4
- package/dist/cli-bundle/chunks/{chunk-S3CV7JGJ.js → chunk-3EOBJOF4.js} +5 -4
- package/dist/cli-bundle/chunks/{chunk-N5YF3VFN.js → chunk-42LOFGJS.js} +91 -16
- package/dist/cli-bundle/chunks/chunk-42LOFGJS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WIKR7KFL.js → chunk-4CHEG6UK.js} +108 -21
- package/dist/cli-bundle/chunks/chunk-4CHEG6UK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4QCR4QW3.js → chunk-4GHZR3BA.js} +56 -28
- package/dist/cli-bundle/chunks/chunk-4GHZR3BA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-B3N4TKNL.js → chunk-5AXMRKN5.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-JQI2HE55.js → chunk-6J4K6JLA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-V3JQ4IPL.js → chunk-6RZXO5M2.js} +102 -22
- package/dist/cli-bundle/chunks/chunk-6RZXO5M2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BNL6S7QH.js → chunk-AVJD6VTA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NQP3ECKF.js → chunk-B2KZGPM2.js} +39 -8
- package/dist/cli-bundle/chunks/chunk-B2KZGPM2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RQAWLSUU.js → chunk-B5RF3IP7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UFCG3SWR.js → chunk-C5W2UH56.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3OH4DAEB.js → chunk-CKLBZHS7.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-GNHVV4SY.js → chunk-CLD3XNCH.js} +124 -20
- package/dist/cli-bundle/chunks/chunk-CLD3XNCH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RANZIID5.js → chunk-FHHBD7PN.js} +38 -7
- package/dist/cli-bundle/chunks/chunk-FHHBD7PN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GFWHHMVV.js → chunk-FY6Z3FYY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-CCUFLH4J.js → chunk-GNIUOLZ2.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-ZRVSMOMR.js → chunk-GPXQBR3H.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-SZQCER6S.js → chunk-GUZBNB3G.js} +27 -5
- package/dist/cli-bundle/chunks/chunk-GUZBNB3G.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GPGAYASV.js → chunk-H7EO3QA3.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-MISYRLEP.js → chunk-HLC3KTLP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KK6YPGH3.js → chunk-HMMMWBK2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4PJQSECJ.js → chunk-HRMHZ4RV.js} +26 -4
- package/dist/cli-bundle/chunks/chunk-HRMHZ4RV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CJDQB2ED.js → chunk-HV5SSZXF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ATBVS6WW.js → chunk-IMCJBN2Q.js} +23 -14
- package/dist/cli-bundle/chunks/chunk-IMCJBN2Q.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FVXM3GKS.js → chunk-KNGVP5WJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OIQIXTNB.js → chunk-KR6R465K.js} +304 -215
- package/dist/cli-bundle/chunks/chunk-KR6R465K.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UOVLWB47.js → chunk-LI65XLJR.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-AXXKLVTW.js → chunk-LIN2BPJ7.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-LMTOY5HE.js +112 -0
- package/dist/cli-bundle/chunks/chunk-LMTOY5HE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Y2AKE2HS.js → chunk-LQHBENVW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-D5X7N6FI.js → chunk-LXO6V66E.js} +14 -14
- package/dist/cli-bundle/chunks/{chunk-TK633IVD.js → chunk-M2PW7EZU.js} +26 -7
- package/dist/cli-bundle/chunks/chunk-M2PW7EZU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DFIZGAI5.js → chunk-MOYM2C3J.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-ZQ4F6EC4.js → chunk-MWRS7Z4P.js} +127 -23
- package/dist/cli-bundle/chunks/chunk-MWRS7Z4P.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5PAOPUZX.js → chunk-NHR2QXXZ.js} +24 -15
- package/dist/cli-bundle/chunks/chunk-NHR2QXXZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OUF3ARDX.js → chunk-NQL32HQ5.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-TBQVUNVH.js → chunk-O7HSSFCC.js} +65 -16
- package/dist/cli-bundle/chunks/chunk-O7HSSFCC.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GCAVRLGE.js → chunk-OKSKJKHX.js} +9 -9
- package/dist/cli-bundle/chunks/chunk-QQL5QSTZ.js +1572 -0
- package/dist/cli-bundle/chunks/chunk-QQL5QSTZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-A6PEXMYN.js → chunk-R3V3YCMH.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-T2ORWB6D.js → chunk-RVPTZKBC.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-K47WAYQV.js → chunk-SFFVGNHC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-DFUSXJDE.js → chunk-SQPKRA54.js} +14 -14
- package/dist/cli-bundle/chunks/chunk-THDEID2Z.js +115 -0
- package/dist/cli-bundle/chunks/chunk-THDEID2Z.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-G5BACLYH.js → chunk-TINUJMWN.js} +92 -17
- package/dist/cli-bundle/chunks/chunk-TINUJMWN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JB4RGL4V.js → chunk-TNPBPNII.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-XG7RJYHV.js → chunk-TP4DDY27.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-ORTLYVA4.js → chunk-TYJJOTUA.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-HZOS2UG5.js → chunk-UAQOQ7IE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-D3WUNETC.js → chunk-UEWA73ZZ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-O5IBJE6S.js → chunk-UIIQC5YO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SRVKTWPR.js → chunk-UJUT6AHZ.js} +314 -39
- package/dist/cli-bundle/chunks/chunk-UJUT6AHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SSFMJCPF.js → chunk-UT6WFXW2.js} +6 -7
- package/dist/cli-bundle/chunks/chunk-UT6WFXW2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KBG47ZOY.js → chunk-UYQ7HXH4.js} +10 -6
- package/dist/cli-bundle/chunks/chunk-UYQ7HXH4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LDJK7SHN.js → chunk-V6EYFTRL.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-5IRA6IYD.js → chunk-WAA7UI6M.js} +58 -30
- package/dist/cli-bundle/chunks/chunk-WAA7UI6M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HPH6X4ZZ.js → chunk-WCQZBDDH.js} +10 -6
- package/dist/cli-bundle/chunks/{chunk-HPH6X4ZZ.js.map → chunk-WCQZBDDH.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-WR5567FH.js +1582 -0
- package/dist/cli-bundle/chunks/chunk-WR5567FH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TQ3ZK6VD.js → chunk-WYEXLDDY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-4LTBNUYT.js → chunk-X4IZKYHP.js} +307 -32
- package/dist/cli-bundle/chunks/chunk-X4IZKYHP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KCMIYKTA.js → chunk-X7UHMKPE.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7K24QB23.js → chunk-XS3O2TFJ.js} +27 -8
- package/dist/cli-bundle/chunks/chunk-XS3O2TFJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-EHXPIKKP.js → chunk-XYNT7UFP.js} +303 -207
- package/dist/cli-bundle/chunks/chunk-XYNT7UFP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-CWT53EYT.js → chunk-YBZW2QQ7.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-VGO2T3TY.js → chunk-YO3THIJF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-5KB4X7YY.js → chunk-YPH4ESA2.js} +66 -17
- package/dist/cli-bundle/chunks/chunk-YPH4ESA2.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-ZFA7HKU4.js → claim-BJ4QMPJC.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-AZLP7YFO.js → claim-KW743OSW.js} +10 -10
- package/dist/cli-bundle/chunks/close-P4ZBKODL.js +13 -0
- package/dist/cli-bundle/chunks/{close-65DFYAVS.js → close-SYHSRZDC.js} +8 -8
- package/dist/cli-bundle/chunks/{close-many-UKZSQGM7.js → close-many-DBLEYFOY.js} +29 -26
- package/dist/cli-bundle/chunks/close-many-DBLEYFOY.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-many-AKPZNSGI.js → close-many-LAC5VR4G.js} +30 -27
- package/dist/cli-bundle/chunks/close-many-LAC5VR4G.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-AGBNSJJH.js → comments-JEO6HHVM.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-CJWXQI7X.js → comments-YT2PQ5DD.js} +10 -10
- package/dist/cli-bundle/chunks/{config-DDPYIA6J.js → config-RZRVS3ZV.js} +127 -11
- package/dist/cli-bundle/chunks/config-RZRVS3ZV.js.map +1 -0
- package/dist/cli-bundle/chunks/{config-5ON3ADRH.js → config-YJSAAADD.js} +128 -12
- package/dist/cli-bundle/chunks/config-YJSAAADD.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-E6U3DWVM.js → context-LGYEEKAW.js} +14 -14
- package/dist/cli-bundle/chunks/{context-E6U3DWVM.js.map → context-LGYEEKAW.js.map} +2 -2
- package/dist/cli-bundle/chunks/{context-ZOJEN5VT.js → context-ZUH5IOOI.js} +15 -15
- package/dist/cli-bundle/chunks/context-ZUH5IOOI.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-CXSFM45B.js → contracts-YXJ6NXKH.js} +11 -5
- package/dist/cli-bundle/chunks/contracts-YXJ6NXKH.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-LCSX5R53.js → contracts-ZIBXROPE.js} +12 -6
- package/dist/cli-bundle/chunks/contracts-ZIBXROPE.js.map +1 -0
- package/dist/cli-bundle/chunks/copy-BZALX5MQ.js +182 -0
- package/dist/cli-bundle/chunks/copy-BZALX5MQ.js.map +1 -0
- package/dist/cli-bundle/chunks/copy-YPWEIAPD.js +185 -0
- package/dist/cli-bundle/chunks/copy-YPWEIAPD.js.map +7 -0
- package/dist/cli-bundle/chunks/create-4DS2QWQC.js +27 -0
- package/dist/cli-bundle/chunks/{create-WYFKN2U4.js → create-CF7EVRX7.js} +13 -13
- package/dist/cli-bundle/chunks/{delete-ZXWC56WO.js → delete-KR4VBWVE.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-RONNH4F4.js → delete-XLZRTRKR.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-WII3O4HB.js → deps-2YTXD3VM.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-EHXIFOZR.js → deps-GZMFMTGS.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-PDREIMLS.js → docs-SLROFEQ4.js} +9 -9
- package/dist/cli-bundle/chunks/{docs-JMVCFNHH.js → docs-ZHISRR2D.js} +9 -9
- package/dist/cli-bundle/chunks/{extension-G6UXSM5S.js → extension-3C7OOI4F.js} +8 -6
- package/dist/cli-bundle/chunks/{extension-B4ROVWJD.js → extension-XYCUXICD.js} +8 -6
- package/dist/cli-bundle/chunks/{files-2PN7UM2D.js → files-FUWF2FYJ.js} +9 -9
- package/dist/cli-bundle/chunks/{files-MXYS5W4M.js → files-J4I5IU4O.js} +9 -9
- package/dist/cli-bundle/chunks/gc-34NXSNSN.js +362 -0
- package/dist/cli-bundle/chunks/gc-34NXSNSN.js.map +1 -0
- package/dist/cli-bundle/chunks/gc-SPIIZX3A.js +372 -0
- package/dist/cli-bundle/chunks/gc-SPIIZX3A.js.map +7 -0
- package/dist/cli-bundle/chunks/{get-WXMLRG7M.js → get-SZKNRHMA.js} +34 -12
- package/dist/cli-bundle/chunks/get-SZKNRHMA.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-CINFEUIY.js → get-VITKYP6S.js} +33 -11
- package/dist/cli-bundle/chunks/get-VITKYP6S.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-IT5DBPRJ.js → health-4SNTA2TF.js} +27 -13
- package/dist/cli-bundle/chunks/health-4SNTA2TF.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-5VPOJQ53.js → health-7G3EPM57.js} +28 -14
- package/dist/cli-bundle/chunks/health-7G3EPM57.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-FLZIP7PM.js → history-SDAWYZR3.js} +10 -10
- package/dist/cli-bundle/chunks/history-YDUEILKP.js +20 -0
- package/dist/cli-bundle/chunks/history-compact-DMW536VH.js +287 -0
- package/dist/cli-bundle/chunks/history-compact-DMW536VH.js.map +1 -0
- package/dist/cli-bundle/chunks/history-compact-POTZGG7K.js +290 -0
- package/dist/cli-bundle/chunks/history-compact-POTZGG7K.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-redact-SSZBAD76.js → history-redact-EPJ7GENL.js} +11 -11
- package/dist/cli-bundle/chunks/history-redact-KASLLPE7.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-X7CO5JJZ.js → history-repair-IJ7LLBET.js} +11 -11
- package/dist/cli-bundle/chunks/{history-repair-KC5ZOJRZ.js → history-repair-YNESJRT6.js} +11 -11
- package/dist/cli-bundle/chunks/init-IGSS4GNH.js +17 -0
- package/dist/cli-bundle/chunks/{init-6MRFVOLH.js → init-YHVBTEET.js} +9 -8
- package/dist/cli-bundle/chunks/{learnings-DCX55BNX.js → learnings-4YBMIVCZ.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-A3CLB5CO.js → learnings-T4PF24YN.js} +10 -10
- package/dist/cli-bundle/chunks/{list-DBRECOG4.js → list-3KEVBOYW.js} +10 -10
- package/dist/cli-bundle/chunks/list-E44O2K64.js +20 -0
- package/dist/cli-bundle/chunks/{notes-42LIC3UE.js → notes-FLUCNJSH.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-P5O3VMQ3.js → notes-GJKALVZM.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-HDQXEUKD.js → plan-T5MMZLI3.js} +13 -13
- package/dist/cli-bundle/chunks/{plan-IGTE3WOJ.js → plan-YYMIL3HV.js} +13 -13
- package/dist/cli-bundle/chunks/{register-list-query-EMNSIUO4.js → register-list-query-I65EZ3HB.js} +33 -27
- package/dist/cli-bundle/chunks/register-list-query-I65EZ3HB.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-AG3XKXWL.js → register-list-query-OECMHO4G.js} +32 -26
- package/dist/cli-bundle/chunks/register-list-query-OECMHO4G.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-M3YS6XDO.js → register-mutation-2FLXORLR.js} +65 -47
- package/dist/cli-bundle/chunks/register-mutation-2FLXORLR.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-RSMT6DPK.js → register-mutation-5GPDEKHR.js} +64 -46
- package/dist/cli-bundle/chunks/register-mutation-5GPDEKHR.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-KYUOOOOD.js → register-operations-BNGAUMGK.js} +71 -35
- package/dist/cli-bundle/chunks/register-operations-BNGAUMGK.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-Q54JQZUN.js → register-operations-GQKT35H5.js} +70 -34
- package/dist/cli-bundle/chunks/register-operations-GQKT35H5.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-DI6P7X75.js → register-setup-DNDCGZ4O.js} +18 -18
- package/dist/cli-bundle/chunks/{register-setup-DI6P7X75.js.map → register-setup-DNDCGZ4O.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-YJKIQRKA.js → register-setup-EJY44FPH.js} +17 -17
- package/dist/cli-bundle/chunks/{register-setup-YJKIQRKA.js.map → register-setup-EJY44FPH.js.map} +2 -2
- package/dist/cli-bundle/chunks/{restore-2XVTBLKQ.js → restore-DDJGVZIN.js} +11 -11
- package/dist/cli-bundle/chunks/restore-SJSASGZP.js +17 -0
- package/dist/cli-bundle/chunks/{schema-V6BX65Q2.js → schema-B7NQ6XVP.js} +8 -8
- package/dist/cli-bundle/chunks/{schema-LVXZWFGY.js → schema-HEGYH6CE.js} +8 -8
- package/dist/cli-bundle/chunks/{search-C7NPB7G7.js → search-DVVQ4UO2.js} +421 -42
- package/dist/cli-bundle/chunks/search-DVVQ4UO2.js.map +1 -0
- package/dist/cli-bundle/chunks/{search-5A3BMFA7.js → search-JNEZJV7H.js} +427 -41
- package/dist/cli-bundle/chunks/search-JNEZJV7H.js.map +7 -0
- package/dist/cli-bundle/chunks/stats-7JDIJRDH.js +202 -0
- package/dist/cli-bundle/chunks/stats-7JDIJRDH.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-SYTJRR4Z.js +212 -0
- package/dist/cli-bundle/chunks/stats-SYTJRR4Z.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-4HHWD5Y7.js +251 -0
- package/dist/cli-bundle/chunks/telemetry-4HHWD5Y7.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-EGWP7ZUX.js +248 -0
- package/dist/cli-bundle/chunks/telemetry-EGWP7ZUX.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-OFYONO3C.js → test-IIELLSZX.js} +14 -13
- package/dist/cli-bundle/chunks/test-ML5RLWXE.js +32 -0
- package/dist/cli-bundle/chunks/{test-all-EEMKNTGU.js → test-all-7DNCMML7.js} +14 -13
- package/dist/cli-bundle/chunks/{test-all-EEMKNTGU.js.map → test-all-7DNCMML7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-OJE6CIO7.js → test-all-IHTUJRRC.js} +16 -15
- package/dist/cli-bundle/chunks/{test-all-OJE6CIO7.js.map → test-all-IHTUJRRC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-runs-IPOPFOAF.js → test-runs-5FEMBV3A.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-L2M7WKH7.js → test-runs-RNKZ37PS.js} +5 -5
- package/dist/cli-bundle/chunks/update-6C67X4KS.js +21 -0
- package/dist/cli-bundle/chunks/update-VF26YPT3.js +25 -0
- package/dist/cli-bundle/chunks/{update-many-322CCH2L.js → update-many-BSZZZYXY.js} +22 -22
- package/dist/cli-bundle/chunks/{update-many-DYWGW57M.js → update-many-BWKJJEBF.js} +22 -22
- package/dist/cli-bundle/chunks/{upgrade-3W3RVSNM.js → upgrade-RSE5PC44.js} +7 -6
- package/dist/cli-bundle/chunks/{upgrade-3W3RVSNM.js.map → upgrade-RSE5PC44.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-2U727SAM.js → upgrade-YWI5DJFA.js} +5 -4
- package/dist/cli-bundle/chunks/{upgrade-2U727SAM.js.map → upgrade-YWI5DJFA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-ZFVWPEEN.js → validate-NK3WKB7C.js} +18 -17
- package/dist/cli-bundle/chunks/{validate-ZFVWPEEN.js.map → validate-NK3WKB7C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-GZ24NYHO.js → validate-UCEOB7S6.js} +20 -19
- package/dist/cli-bundle/chunks/{validate-GZ24NYHO.js.map → validate-UCEOB7S6.js.map} +1 -1
- package/dist/cli-bundle/main.js +198 -1523
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/config/nested-settings.d.ts +8 -6
- package/dist/core/config/nested-settings.js +71 -5
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/config/positional-value.js +4 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +36 -0
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.js +46 -5
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/drift-scan.d.ts +3 -4
- package/dist/core/history/drift-scan.js +71 -18
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/history/history-diff.d.ts +47 -0
- package/dist/core/history/history-diff.js +152 -0
- package/dist/core/history/history-diff.js.map +1 -0
- package/dist/core/history/history-storage-stats.d.ts +31 -0
- package/dist/core/history/history-storage-stats.js +101 -0
- package/dist/core/history/history-storage-stats.js.map +1 -0
- package/dist/core/item/id.js +4 -5
- package/dist/core/item/id.js.map +1 -1
- package/dist/core/item/item-format.js +7 -3
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/toon-decode.d.ts +7 -0
- package/dist/core/item/toon-decode.js +11 -2
- package/dist/core/item/toon-decode.js.map +1 -1
- package/dist/core/item/type-registry.js +25 -7
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/lock/lock-gc.d.ts +46 -0
- package/dist/core/lock/lock-gc.js +194 -0
- package/dist/core/lock/lock-gc.js.map +1 -0
- package/dist/core/search/cache.js +5 -3
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/corpus.d.ts +6 -0
- package/dist/core/search/corpus.js +22 -9
- package/dist/core/search/corpus.js.map +1 -1
- package/dist/core/search/embedding-batches.js +10 -7
- package/dist/core/search/embedding-batches.js.map +1 -1
- package/dist/core/search/relevance.d.ts +29 -0
- package/dist/core/search/relevance.js +226 -0
- package/dist/core/search/relevance.js.map +1 -0
- package/dist/core/search/vector-stores.d.ts +3 -0
- package/dist/core/search/vector-stores.js +23 -10
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/shared/constants.js +15 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.d.ts +6 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/primitives.d.ts +8 -0
- package/dist/core/shared/primitives.js +29 -2
- package/dist/core/shared/primitives.js.map +1 -1
- package/dist/core/shared/serial-queue.d.ts +12 -0
- package/dist/core/shared/serial-queue.js +43 -0
- package/dist/core/shared/serial-queue.js.map +1 -0
- package/dist/core/shared/time.js +42 -6
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/paths.js +25 -7
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +11 -0
- package/dist/core/store/settings-validator.js +14 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.d.ts +19 -1
- package/dist/core/store/settings.js +199 -17
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/observability.js +3 -3
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.js +99 -6
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +187 -42
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
- package/dist/sdk/cli-contracts/commander-types.js +13 -2
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +8 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +7 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +39 -7
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +26 -1
- package/dist/sdk/cli-contracts.js +75 -11
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/testing.d.ts +51 -1
- package/dist/sdk/testing.js +93 -2
- package/dist/sdk/testing.js.map +1 -1
- package/dist/types.d.ts +14 -0
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +1 -1
- package/docs/ARCHITECTURE.md +11 -1
- package/docs/CLAUDE_CODE_PLUGIN.md +4 -4
- package/docs/CODEX_PLUGIN.md +1 -1
- package/docs/COMMANDS.md +42 -4
- package/docs/CONFIGURATION.md +31 -2
- package/docs/EXTENSIONS.md +28 -8
- package/docs/EXTENSION_AUTHOR_CONTRACTS.md +73 -0
- package/docs/ONBOARDING.md +165 -0
- package/docs/QUICKSTART.md +2 -2
- package/docs/README.md +12 -4
- package/docs/RELEASING.md +36 -1
- package/docs/SDK.md +66 -0
- package/docs/TESTING.md +33 -1
- package/package.json +6 -2
- package/packages/pm-governance-audit/README.md +14 -0
- package/packages/pm-governance-audit/extensions/governance-audit/index.js +39 -1
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +40 -2
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +1 -1
- package/packages/pm-governance-audit/package.json +4 -2
- package/packages/pm-lifecycle-hooks/README.md +21 -0
- package/packages/pm-search-advanced/README.md +38 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +17 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +17 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +216 -1
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +271 -2
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +11 -8
- package/plugins/pm-claude/agents/pm-coordinator.md +1 -1
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/plugins/pm-codex/README.md +1 -1
- package/dist/cli-bundle/chunks/activity-P5BUMWP3.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js.map +0 -1
- package/dist/cli-bundle/chunks/aggregate-OOAGKWRG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7K24QB23.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ATBVS6WW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-G5BACLYH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KA24HME7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RANZIID5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SZQCER6S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TK633IVD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WIKR7KFL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js.map +0 -7
- package/dist/cli-bundle/chunks/close-RMHQ3KWH.js +0 -13
- package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js.map +0 -1
- package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js.map +0 -7
- package/dist/cli-bundle/chunks/config-5ON3ADRH.js.map +0 -7
- package/dist/cli-bundle/chunks/config-DDPYIA6J.js.map +0 -1
- package/dist/cli-bundle/chunks/context-ZOJEN5VT.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-CXSFM45B.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-LCSX5R53.js.map +0 -1
- package/dist/cli-bundle/chunks/create-ATONSAZW.js +0 -27
- package/dist/cli-bundle/chunks/gc-GT552UJH.js +0 -178
- package/dist/cli-bundle/chunks/gc-GT552UJH.js.map +0 -1
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js +0 -181
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js.map +0 -7
- package/dist/cli-bundle/chunks/get-CINFEUIY.js.map +0 -7
- package/dist/cli-bundle/chunks/get-WXMLRG7M.js.map +0 -1
- package/dist/cli-bundle/chunks/health-5VPOJQ53.js.map +0 -1
- package/dist/cli-bundle/chunks/health-IT5DBPRJ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-6FC4H6HI.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js +0 -19
- package/dist/cli-bundle/chunks/init-KHX3FEEM.js +0 -16
- package/dist/cli-bundle/chunks/list-53LZ2AEO.js +0 -20
- package/dist/cli-bundle/chunks/register-list-query-AG3XKXWL.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-RSMT6DPK.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-Q54JQZUN.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-JL5QIH7H.js +0 -17
- package/dist/cli-bundle/chunks/search-5A3BMFA7.js.map +0 -7
- package/dist/cli-bundle/chunks/search-C7NPB7G7.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js +0 -120
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js +0 -123
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js.map +0 -7
- package/dist/cli-bundle/chunks/test-RJ4ZF35X.js +0 -31
- package/dist/cli-bundle/chunks/update-6YEHPVXH.js +0 -25
- package/dist/cli-bundle/chunks/update-PYLVHMRD.js +0 -21
- /package/dist/cli-bundle/chunks/{activity-P5BUMWP3.js.map → activity-5UROHJ3D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-3RWRRNOW.js.map → activity-YVB3QRTE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-PNN6UIBZ.js.map → append-2PPYFAG5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-5JE3YGXU.js.map → append-AUGT5W6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-26KTVXJW.js.map → chunk-2IF7WLB7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XX5LRINW.js.map → chunk-2OJHLWBZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ASQM3IF5.js.map → chunk-3A2CMEM7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S3CV7JGJ.js.map → chunk-3EOBJOF4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B3N4TKNL.js.map → chunk-5AXMRKN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JQI2HE55.js.map → chunk-6J4K6JLA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BNL6S7QH.js.map → chunk-AVJD6VTA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RQAWLSUU.js.map → chunk-B5RF3IP7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UFCG3SWR.js.map → chunk-C5W2UH56.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3OH4DAEB.js.map → chunk-CKLBZHS7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GFWHHMVV.js.map → chunk-FY6Z3FYY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CCUFLH4J.js.map → chunk-GNIUOLZ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZRVSMOMR.js.map → chunk-GPXQBR3H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GPGAYASV.js.map → chunk-H7EO3QA3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MISYRLEP.js.map → chunk-HLC3KTLP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KK6YPGH3.js.map → chunk-HMMMWBK2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CJDQB2ED.js.map → chunk-HV5SSZXF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FVXM3GKS.js.map → chunk-KNGVP5WJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UOVLWB47.js.map → chunk-LI65XLJR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AXXKLVTW.js.map → chunk-LIN2BPJ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y2AKE2HS.js.map → chunk-LQHBENVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D5X7N6FI.js.map → chunk-LXO6V66E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DFIZGAI5.js.map → chunk-MOYM2C3J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OUF3ARDX.js.map → chunk-NQL32HQ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GCAVRLGE.js.map → chunk-OKSKJKHX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A6PEXMYN.js.map → chunk-R3V3YCMH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T2ORWB6D.js.map → chunk-RVPTZKBC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K47WAYQV.js.map → chunk-SFFVGNHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DFUSXJDE.js.map → chunk-SQPKRA54.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JB4RGL4V.js.map → chunk-TNPBPNII.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XG7RJYHV.js.map → chunk-TP4DDY27.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ORTLYVA4.js.map → chunk-TYJJOTUA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HZOS2UG5.js.map → chunk-UAQOQ7IE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D3WUNETC.js.map → chunk-UEWA73ZZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-O5IBJE6S.js.map → chunk-UIIQC5YO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LDJK7SHN.js.map → chunk-V6EYFTRL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TQ3ZK6VD.js.map → chunk-WYEXLDDY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KCMIYKTA.js.map → chunk-X7UHMKPE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CWT53EYT.js.map → chunk-YBZW2QQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VGO2T3TY.js.map → chunk-YO3THIJF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-ZFA7HKU4.js.map → claim-BJ4QMPJC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-AZLP7YFO.js.map → claim-KW743OSW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-RMHQ3KWH.js.map → close-P4ZBKODL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-65DFYAVS.js.map → close-SYHSRZDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-AGBNSJJH.js.map → comments-JEO6HHVM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-CJWXQI7X.js.map → comments-YT2PQ5DD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-ATONSAZW.js.map → create-4DS2QWQC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-WYFKN2U4.js.map → create-CF7EVRX7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ZXWC56WO.js.map → delete-KR4VBWVE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-RONNH4F4.js.map → delete-XLZRTRKR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-WII3O4HB.js.map → deps-2YTXD3VM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-EHXIFOZR.js.map → deps-GZMFMTGS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-PDREIMLS.js.map → docs-SLROFEQ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-JMVCFNHH.js.map → docs-ZHISRR2D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-G6UXSM5S.js.map → extension-3C7OOI4F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-B4ROVWJD.js.map → extension-XYCUXICD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-2PN7UM2D.js.map → files-FUWF2FYJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-MXYS5W4M.js.map → files-J4I5IU4O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-FLZIP7PM.js.map → history-SDAWYZR3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-6FC4H6HI.js.map → history-YDUEILKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-SSZBAD76.js.map → history-redact-EPJ7GENL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-XKYEZDBL.js.map → history-redact-KASLLPE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-X7CO5JJZ.js.map → history-repair-IJ7LLBET.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-KC5ZOJRZ.js.map → history-repair-YNESJRT6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-KHX3FEEM.js.map → init-IGSS4GNH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-6MRFVOLH.js.map → init-YHVBTEET.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-DCX55BNX.js.map → learnings-4YBMIVCZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-A3CLB5CO.js.map → learnings-T4PF24YN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-DBRECOG4.js.map → list-3KEVBOYW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-53LZ2AEO.js.map → list-E44O2K64.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-42LIC3UE.js.map → notes-FLUCNJSH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-P5O3VMQ3.js.map → notes-GJKALVZM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-HDQXEUKD.js.map → plan-T5MMZLI3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-IGTE3WOJ.js.map → plan-YYMIL3HV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-2XVTBLKQ.js.map → restore-DDJGVZIN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-JL5QIH7H.js.map → restore-SJSASGZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-V6BX65Q2.js.map → schema-B7NQ6XVP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-LVXZWFGY.js.map → schema-HEGYH6CE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-OFYONO3C.js.map → test-IIELLSZX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-RJ4ZF35X.js.map → test-ML5RLWXE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-IPOPFOAF.js.map → test-runs-5FEMBV3A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-L2M7WKH7.js.map → test-runs-RNKZ37PS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-PYLVHMRD.js.map → update-6C67X4KS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-6YEHPVXH.js.map → update-VF26YPT3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-322CCH2L.js.map → update-many-BSZZZYXY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-DYWGW57M.js.map → update-many-BWKJJEBF.js.map} +0 -0
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
import {
|
|
4
4
|
normalizeItemId,
|
|
5
5
|
normalizeRawItemId
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UT6WFXW2.js";
|
|
7
7
|
import {
|
|
8
8
|
canonicalDocument,
|
|
9
9
|
parseItemDocument,
|
|
10
10
|
serializeItemDocument
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UYQ7HXH4.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveItemTypeRegistry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GUZBNB3G.js";
|
|
15
15
|
import {
|
|
16
16
|
nowIso
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-B2KZGPM2.js";
|
|
18
18
|
import {
|
|
19
19
|
EMPTY_CANONICAL_DOCUMENT,
|
|
20
20
|
EXIT_CODE,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
stableStringify,
|
|
43
43
|
toErrorMessage,
|
|
44
44
|
writeFileAtomic
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-X4IZKYHP.js";
|
|
46
46
|
|
|
47
47
|
// dist/core/extensions/item-fields.js
|
|
48
48
|
var RESERVED_ITEM_FIELD_NAMES = new Set(FRONT_MATTER_KEY_ORDER);
|
|
@@ -1335,6 +1335,6 @@ export {
|
|
|
1335
1335
|
mutateItem,
|
|
1336
1336
|
deleteItem
|
|
1337
1337
|
};
|
|
1338
|
-
//# sourceMappingURL=chunk-
|
|
1338
|
+
//# sourceMappingURL=chunk-YBZW2QQ7.js.map
|
|
1339
1339
|
|
|
1340
1340
|
//# debugId=83aa0c1e-d8e6-5e3e-ac80-b84dd7ee7bce
|
|
@@ -2,22 +2,22 @@
|
|
|
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]="ede3cf3f-6ca9-5eb0-aeb7-cd997702397f")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
readHistoryEntries
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6RZXO5M2.js";
|
|
6
6
|
import {
|
|
7
7
|
parseLimit
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FY6Z3FYY.js";
|
|
9
9
|
import {
|
|
10
10
|
enforceHistoryStreamPolicyForItems,
|
|
11
11
|
listAllFrontMatterLight
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YBZW2QQ7.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveItemTypeRegistry
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GUZBNB3G.js";
|
|
16
16
|
import {
|
|
17
17
|
compareTimestampStrings,
|
|
18
18
|
nowIso,
|
|
19
19
|
resolveIsoOrRelative
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-B2KZGPM2.js";
|
|
21
21
|
import {
|
|
22
22
|
EXIT_CODE,
|
|
23
23
|
PmCliError,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
readSettings,
|
|
28
28
|
resolvePmRoot,
|
|
29
29
|
runActiveOnReadHooks
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-X4IZKYHP.js";
|
|
31
31
|
|
|
32
32
|
// dist/cli/commands/activity.js
|
|
33
33
|
import fs from "node:fs/promises";
|
|
@@ -177,6 +177,6 @@ async function runActivity(options, global) {
|
|
|
177
177
|
export {
|
|
178
178
|
runActivity
|
|
179
179
|
};
|
|
180
|
-
//# sourceMappingURL=chunk-
|
|
180
|
+
//# sourceMappingURL=chunk-YO3THIJF.js.map
|
|
181
181
|
|
|
182
182
|
//# debugId=ede3cf3f-6ca9-5eb0-aeb7-cd997702397f
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a6f5399f-ddc1-5e27-8343-9912514306ee")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
verifyHistoryChain
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3A2CMEM7.js";
|
|
6
6
|
import {
|
|
7
7
|
hashDocument
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YBZW2QQ7.js";
|
|
9
9
|
import {
|
|
10
10
|
getHistoryPath,
|
|
11
11
|
writeFileAtomic
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-X4IZKYHP.js";
|
|
13
13
|
|
|
14
14
|
// dist/core/history/drift-scan.js
|
|
15
15
|
import fs from "fs/promises";
|
|
16
|
+
import { createHash } from "node:crypto";
|
|
16
17
|
import path from "node:path";
|
|
17
|
-
var DRIFT_CACHE_VERSION =
|
|
18
|
+
var DRIFT_CACHE_VERSION = 2;
|
|
18
19
|
var DRIFT_CACHE_FILENAME = "history-drift-cache.json";
|
|
19
20
|
function getDriftCachePath(pmRoot) {
|
|
20
21
|
return path.join(pmRoot, "runtime", DRIFT_CACHE_FILENAME);
|
|
@@ -34,8 +35,16 @@ async function loadDriftCache(pmRoot) {
|
|
|
34
35
|
function isErrno(error, code) {
|
|
35
36
|
return typeof error === "object" && error !== null && "code" in error && error.code === code;
|
|
36
37
|
}
|
|
38
|
+
function hashContent(raw) {
|
|
39
|
+
return createHash("sha256").update(raw).digest("hex");
|
|
40
|
+
}
|
|
41
|
+
async function readHistoryContentHash(historyPath) {
|
|
42
|
+
const raw = await fs.readFile(historyPath, "utf8");
|
|
43
|
+
return hashContent(raw);
|
|
44
|
+
}
|
|
37
45
|
async function verifyHistoryStream(historyPath) {
|
|
38
46
|
const raw = await fs.readFile(historyPath, "utf8");
|
|
47
|
+
const contentHash = hashContent(raw);
|
|
39
48
|
if (raw.trim().length === 0) {
|
|
40
49
|
return null;
|
|
41
50
|
}
|
|
@@ -56,7 +65,11 @@ async function verifyHistoryStream(historyPath) {
|
|
|
56
65
|
if (!latestAfterHash) {
|
|
57
66
|
return null;
|
|
58
67
|
}
|
|
59
|
-
return {
|
|
68
|
+
return {
|
|
69
|
+
latestAfterHash,
|
|
70
|
+
chainOk: verifyHistoryChain(entries).ok,
|
|
71
|
+
contentHash
|
|
72
|
+
};
|
|
60
73
|
}
|
|
61
74
|
async function scanHistoryDrift(pmRoot, items) {
|
|
62
75
|
const missingStreams = [];
|
|
@@ -80,24 +93,59 @@ async function scanHistoryDrift(pmRoot, items) {
|
|
|
80
93
|
}
|
|
81
94
|
continue;
|
|
82
95
|
}
|
|
96
|
+
const loadStreamVerification = async () => {
|
|
97
|
+
try {
|
|
98
|
+
return await verifyHistoryStream(historyPath);
|
|
99
|
+
} catch {
|
|
100
|
+
return "unreadable";
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const loadFreshVerification = async () => {
|
|
104
|
+
const loaded = await loadStreamVerification();
|
|
105
|
+
if (loaded === "unreadable") {
|
|
106
|
+
unreadableStreams.push(item.id);
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
if (!loaded) {
|
|
110
|
+
missingStreams.push(item.id);
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
return loaded;
|
|
114
|
+
};
|
|
83
115
|
const cached = previousEntries[item.id];
|
|
84
116
|
let verification;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
let
|
|
117
|
+
const metadataMatchesCache = cached !== void 0 && cached.mtime_ms === stat.mtimeMs && cached.ctime_ms === stat.ctimeMs && cached.size === stat.size;
|
|
118
|
+
const cachedContentHash = typeof cached?.content_hash === "string" && cached.content_hash.length > 0 ? cached.content_hash : void 0;
|
|
119
|
+
const canUseCache = metadataMatchesCache && cachedContentHash !== void 0;
|
|
120
|
+
if (canUseCache && cached) {
|
|
121
|
+
let currentContentHash;
|
|
90
122
|
try {
|
|
91
|
-
|
|
123
|
+
currentContentHash = await readHistoryContentHash(historyPath);
|
|
92
124
|
} catch {
|
|
93
125
|
unreadableStreams.push(item.id);
|
|
94
126
|
continue;
|
|
95
127
|
}
|
|
96
|
-
if (
|
|
97
|
-
|
|
128
|
+
if (currentContentHash === cachedContentHash) {
|
|
129
|
+
verification = {
|
|
130
|
+
latestAfterHash: cached.latest_after_hash,
|
|
131
|
+
chainOk: cached.chain_ok,
|
|
132
|
+
contentHash: currentContentHash
|
|
133
|
+
};
|
|
134
|
+
} else {
|
|
135
|
+
cacheDirty = true;
|
|
136
|
+
const refreshed = await loadFreshVerification();
|
|
137
|
+
if (!refreshed) {
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
verification = refreshed;
|
|
141
|
+
}
|
|
142
|
+
} else {
|
|
143
|
+
cacheDirty = true;
|
|
144
|
+
const refreshed = await loadFreshVerification();
|
|
145
|
+
if (!refreshed) {
|
|
98
146
|
continue;
|
|
99
147
|
}
|
|
100
|
-
verification =
|
|
148
|
+
verification = refreshed;
|
|
101
149
|
}
|
|
102
150
|
if (!verification.chainOk) {
|
|
103
151
|
chainMismatches.push(item.id);
|
|
@@ -106,6 +154,7 @@ async function scanHistoryDrift(pmRoot, items) {
|
|
|
106
154
|
mtime_ms: stat.mtimeMs,
|
|
107
155
|
ctime_ms: stat.ctimeMs,
|
|
108
156
|
size: stat.size,
|
|
157
|
+
content_hash: verification.contentHash,
|
|
109
158
|
latest_after_hash: verification.latestAfterHash,
|
|
110
159
|
chain_ok: verification.chainOk
|
|
111
160
|
};
|
|
@@ -407,6 +456,6 @@ export {
|
|
|
407
456
|
buildRemediationMap,
|
|
408
457
|
buildRemediationCommands
|
|
409
458
|
};
|
|
410
|
-
//# sourceMappingURL=chunk-
|
|
459
|
+
//# sourceMappingURL=chunk-YPH4ESA2.js.map
|
|
411
460
|
|
|
412
|
-
//# debugId=
|
|
461
|
+
//# debugId=a6f5399f-ddc1-5e27-8343-9912514306ee
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../core/history/drift-scan.ts","../../../../../../../../core/diagnostics/remediation.ts"],"sourcesContent":["import fs from \"fs/promises\";\nimport { createHash } from \"node:crypto\";\nimport path from \"node:path\";\nimport { getHistoryPath } from \"../store/paths.js\";\nimport { writeFileAtomic } from \"../fs/fs-utils.js\";\nimport { hashDocument } from \"./history.js\";\nimport { verifyHistoryChain } from \"./replay.js\";\nimport type { HistoryEntry, ItemMetadata } from \"../../types/index.js\";\n\nexport interface DriftScanResult {\n missingStreams: string[];\n unreadableStreams: string[];\n hashMismatches: string[];\n chainMismatches: string[];\n driftedItems: string[];\n}\n\nconst DRIFT_CACHE_VERSION = 2;\nconst DRIFT_CACHE_FILENAME = \"history-drift-cache.json\";\n\ninterface DriftCacheEntry {\n mtime_ms: number;\n ctime_ms: number;\n size: number;\n content_hash: string;\n latest_after_hash: string;\n chain_ok: boolean;\n}\n\ninterface DriftCacheEnvelope {\n version: number;\n entries: Record<string, DriftCacheEntry>;\n}\n\nfunction getDriftCachePath(pmRoot: string): string {\n return path.join(pmRoot, \"runtime\", DRIFT_CACHE_FILENAME);\n}\n\nasync function loadDriftCache(pmRoot: string): Promise<DriftCacheEnvelope | null> {\n try {\n const raw = await fs.readFile(getDriftCachePath(pmRoot), \"utf8\");\n const parsed = JSON.parse(raw) as DriftCacheEnvelope;\n if (parsed.version !== DRIFT_CACHE_VERSION || typeof parsed.entries !== \"object\" || parsed.entries === null) {\n return null;\n }\n return parsed;\n } catch {\n return null;\n }\n}\n\nfunction isErrno(error: unknown, code: string): boolean {\n return typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code === code;\n}\n\ninterface StreamVerification {\n latestAfterHash: string;\n chainOk: boolean;\n contentHash: string;\n}\n\nfunction hashContent(raw: string): string {\n return createHash(\"sha256\").update(raw).digest(\"hex\");\n}\n\nasync function readHistoryContentHash(historyPath: string): Promise<string> {\n const raw = await fs.readFile(historyPath, \"utf8\");\n return hashContent(raw);\n}\n\n/**\n * Read and fully verify one history stream's hash chain. Returns null for an\n * empty/missing stream (caller records it as a missing stream).\n */\nasync function verifyHistoryStream(historyPath: string): Promise<StreamVerification | null> {\n const raw = await fs.readFile(historyPath, \"utf8\");\n const contentHash = hashContent(raw);\n if (raw.trim().length === 0) {\n return null;\n }\n const entries: HistoryEntry[] = [];\n let latestAfterHash: string | null = null;\n for (const line of raw.split(/\\r?\\n/)) {\n const trimmed = line.trim();\n if (trimmed.length === 0) {\n continue;\n }\n const parsed = JSON.parse(trimmed) as HistoryEntry;\n if (typeof parsed.after_hash !== \"string\" || parsed.after_hash.trim().length === 0) {\n throw new Error(\"missing after_hash\");\n }\n entries.push(parsed);\n latestAfterHash = parsed.after_hash;\n }\n /* c8 ignore start -- defensive guard for future history schema changes. */\n if (!latestAfterHash) {\n return null;\n }\n /* c8 ignore stop */\n return {\n latestAfterHash,\n chainOk: verifyHistoryChain(entries).ok,\n contentHash,\n };\n}\n\n/**\n * Scan every item's history stream for drift (missing/unreadable streams, broken\n * hash chains, and item/history hash mismatches).\n *\n * Full chain re-verification of a 17MB+ history tree is the dominant cost of\n * `pm health`. We cache the per-stream verification keyed by the history file's\n * mtime/ctime/size + content hash: metadata-stable replacements (same stat tuple)\n * can still happen, so each metadata hit recomputes a content hash guard before\n * trusting the cached chain/hash verification.\n */\nexport async function scanHistoryDrift(\n pmRoot: string,\n items: Array<ItemMetadata & { body: string }>,\n): Promise<DriftScanResult> {\n const missingStreams: string[] = [];\n const unreadableStreams: string[] = [];\n const hashMismatches: string[] = [];\n const chainMismatches: string[] = [];\n\n const cache = await loadDriftCache(pmRoot);\n const previousEntries: Record<string, DriftCacheEntry> = cache?.entries ?? {};\n const nextEntries: Record<string, DriftCacheEntry> = {};\n let cacheDirty = false;\n\n for (const item of items) {\n const historyPath = getHistoryPath(pmRoot, item.id);\n\n let stat: Awaited<ReturnType<typeof fs.stat>>;\n try {\n stat = await fs.stat(historyPath);\n } catch (error: unknown) {\n if (isErrno(error, \"ENOENT\")) {\n missingStreams.push(item.id);\n } else {\n unreadableStreams.push(item.id);\n }\n continue;\n }\n\n const loadStreamVerification = async (): Promise<StreamVerification | null | \"unreadable\"> => {\n try {\n return await verifyHistoryStream(historyPath);\n } catch {\n return \"unreadable\";\n }\n };\n\n const loadFreshVerification = async (): Promise<StreamVerification | null> => {\n const loaded = await loadStreamVerification();\n if (loaded === \"unreadable\") {\n unreadableStreams.push(item.id);\n return null;\n }\n if (!loaded) {\n missingStreams.push(item.id);\n return null;\n }\n return loaded;\n };\n\n const cached = previousEntries[item.id];\n let verification: StreamVerification;\n const metadataMatchesCache =\n cached !== undefined &&\n cached.mtime_ms === stat.mtimeMs &&\n cached.ctime_ms === stat.ctimeMs &&\n cached.size === stat.size;\n const cachedContentHash =\n typeof cached?.content_hash === \"string\" && cached.content_hash.length > 0 ? cached.content_hash : undefined;\n const canUseCache = metadataMatchesCache && cachedContentHash !== undefined;\n if (canUseCache && cached) {\n let currentContentHash: string;\n try {\n currentContentHash = await readHistoryContentHash(historyPath);\n } catch {\n unreadableStreams.push(item.id);\n continue;\n }\n if (currentContentHash === cachedContentHash) {\n verification = {\n latestAfterHash: cached.latest_after_hash,\n chainOk: cached.chain_ok,\n contentHash: currentContentHash,\n };\n } else {\n cacheDirty = true;\n const refreshed = await loadFreshVerification();\n if (!refreshed) {\n continue;\n }\n verification = refreshed;\n }\n } else {\n cacheDirty = true;\n const refreshed = await loadFreshVerification();\n if (!refreshed) {\n continue;\n }\n verification = refreshed;\n }\n\n if (!verification.chainOk) {\n chainMismatches.push(item.id);\n }\n nextEntries[item.id] = {\n mtime_ms: stat.mtimeMs,\n ctime_ms: stat.ctimeMs,\n size: stat.size,\n content_hash: verification.contentHash,\n latest_after_hash: verification.latestAfterHash,\n chain_ok: verification.chainOk,\n };\n\n const { body, ...frontMatter } = item;\n const currentHash = hashDocument({\n metadata: frontMatter as ItemMetadata,\n body,\n });\n if (currentHash !== verification.latestAfterHash) {\n hashMismatches.push(item.id);\n }\n }\n\n if (cacheDirty || Object.keys(previousEntries).length !== Object.keys(nextEntries).length) {\n const cachePath = getDriftCachePath(pmRoot);\n try {\n await fs.mkdir(path.dirname(cachePath), { recursive: true });\n await writeFileAtomic(cachePath, JSON.stringify({ version: DRIFT_CACHE_VERSION, entries: nextEntries }));\n } catch {\n // Best-effort cache write: a failed persist must never fail a health scan.\n }\n }\n\n const driftedItems = [...new Set([...missingStreams, ...unreadableStreams, ...hashMismatches, ...chainMismatches])].sort((a, b) =>\n a.localeCompare(b),\n );\n return { missingStreams, unreadableStreams, hashMismatches, chainMismatches, driftedItems };\n}\n","/**\n * Shared machine-executable remediation registry.\n *\n * `pm health` and `pm validate` both emit stable, colon-delimited warning tokens\n * (for example `history_drift_missing_stream:pm-abcd` or\n * `validate_resolution_missing_fields:3`). Agents that gate on these commands\n * previously had to hardcode the mapping from a warning code to the `pm` command\n * that fixes it. This module is the single source of truth for that mapping so\n * `pm health --json` (per-check `remediation_map`) and `pm validate --fix-hints`\n * (per-check `fix_hints`) can both surface executable remediation without any\n * duplicated, drift-prone lookup tables.\n *\n * Semantics of {@link RemediationEntry.command}: the suggested next `pm` command\n * an operator/agent should run to resolve findings with that code. Per-item\n * findings use an `<id>` placeholder (callers that have the concrete id may\n * substitute it); findings whose only fix is a manual file edit point at the\n * most useful diagnostic/repair command and describe the manual step in\n * {@link RemediationEntry.summary}.\n */\n\nexport interface RemediationEntry {\n /**\n * Stable warning-code prefix this entry resolves. A warning matches when it\n * equals this code or begins with `<code>:`. Registry codes are mutually\n * exclusive under that colon-boundary rule (no code is a `:`-delimited prefix\n * of another — e.g. `settings:id_prefix_empty` is distinct from a bare\n * `settings`, which is intentionally not registered), so `resolveRemediation`\n * uses first-match with no ordering dependency.\n */\n readonly code: string;\n /** Executable `pm` command (or imperative) that resolves the finding. May contain an `<id>` placeholder. */\n readonly command: string;\n /** One-line description of what the command does / which manual step it covers. */\n readonly summary: string;\n}\n\n/**\n * Registry of every non-extension `pm health` / `pm validate` warning code and\n * its remediation. Extension findings keep their richer, contextual\n * `details.triage.remediation` produced by the extension health triage and are\n * intentionally excluded here (see pm-0hnu: \"all non-extension checks\").\n */\nexport const REMEDIATION_REGISTRY: readonly RemediationEntry[] = Object.freeze([\n // --- pm health: directories ---\n {\n code: \"missing_directory\",\n command: \"pm init\",\n summary: \"Recreate missing tracker directories (pm init is idempotent and restores the scaffold).\",\n },\n // --- pm health: settings (read/parse) ---\n {\n code: \"settings_read_invalid_json\",\n command: \"pm config list --json\",\n summary:\n \"settings.json is not valid JSON and pm fell back to defaults; fix the syntax error in the reported path, then re-run.\",\n },\n {\n code: \"settings_read_invalid_schema\",\n command: \"pm config list --json\",\n summary:\n \"settings.json failed schema validation and pm fell back to defaults; correct the reported key in the file, then re-run.\",\n },\n {\n code: \"settings_read_merge_failed\",\n command: \"pm config list --json\",\n summary: \"Global/project settings could not be merged; reconcile the conflicting keys in the reported settings files.\",\n },\n // --- pm health: settings_values ---\n {\n code: \"settings:id_prefix_empty\",\n command: \"pm config list --json\",\n summary: 'id_prefix is empty; set a non-empty \"id_prefix\" in settings.json so generated item ids are well-formed.',\n },\n {\n code: \"settings:locks_ttl_non_positive\",\n command: \"pm config list --json\",\n summary: 'locks.ttl_seconds must be positive; set a positive \"locks.ttl_seconds\" in settings.json.',\n },\n // --- pm health: telemetry (advisory) ---\n {\n code: \"telemetry_state_invalid_json\",\n command: \"pm health --check-telemetry\",\n summary: \"Local telemetry state file is corrupt; pm recreates it on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_invalid_rows\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry queue has unparseable rows; they are skipped on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_pending\",\n command: \"pm health --check-telemetry\",\n summary: \"Telemetry events are queued; they flush automatically on the next reachable command. Advisory only.\",\n },\n {\n code: \"telemetry_endpoint_probe_failed\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry endpoint is unreachable; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_endpoint_probe_http_status\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only.\",\n },\n // --- pm health: integrity ---\n {\n code: \"integrity_item_unreadable\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file could not be read; restore or repair the file at the reported path.\",\n },\n {\n code: \"integrity_item_parse_failed\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file failed to parse; fix the malformed front matter at the reported path.\",\n },\n {\n code: \"integrity_item_conflict_marker\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file contains Git conflict markers; resolve the <<<<<<< / >>>>>>> markers at the reported line.\",\n },\n {\n code: \"integrity_history_unreadable\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream could not be read; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_invalid_json\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream contains invalid JSON; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_conflict_marker\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain.\",\n },\n // --- pm health: history_drift ---\n {\n code: \"history_drift_missing_stream\",\n command: \"pm history-repair <id>\",\n summary: \"The item has no history stream; re-anchor the chain to rebuild it.\",\n },\n {\n code: \"history_drift_unreadable_stream\",\n command: \"pm history-repair <id>\",\n summary: \"The item's history stream is unreadable; re-anchor the chain.\",\n },\n {\n code: \"history_drift_hash_mismatch\",\n command: \"pm history-repair <id>\",\n summary: \"The item's content hash no longer matches its history; re-anchor the chain.\",\n },\n {\n code: \"history_drift_chain_mismatch\",\n command: \"pm history-repair <id>\",\n summary: \"The item's history chain is broken; re-anchor the chain.\",\n },\n // --- pm health: vectorization ---\n {\n code: \"vectorization_stale_items_remaining\",\n command: \"pm health --refresh-vectors\",\n summary: \"Some items have stale embeddings; refresh vectors so semantic search results stay current.\",\n },\n // --- pm validate: metadata ---\n // Note: validate_metadata_missing_author has no entry on purpose. `pm update\n // --author` sets the mutation/audit author (history), not the item's\n // `metadata.author` front-matter field, and there is no CLI flag that writes\n // that field — so emitting a command here would record an audit entry without\n // clearing the finding. A missing item author must be restored at the source.\n {\n code: \"validate_metadata_missing_acceptance_criteria\",\n command: 'pm update <id> --acceptance-criteria \"<criteria>\"',\n summary: \"Backfill the missing acceptance criteria on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_estimate\",\n command: 'pm update <id> --estimate \"<estimate>\"',\n summary: \"Backfill the missing estimate on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_close_reason\",\n command: 'pm update <id> --close-reason \"<reason>\"',\n summary: \"Backfill the missing close reason on the reported closed item(s).\",\n },\n {\n code: \"validate_metadata_missing_reviewer\",\n command: 'pm update <id> --reviewer \"<name>\"',\n summary: \"Backfill the missing reviewer on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_risk\",\n command: 'pm update <id> --risk \"<level>\"',\n summary: \"Backfill the missing risk on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_confidence\",\n command: 'pm update <id> --confidence \"<level>\"',\n summary: \"Backfill the missing confidence on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_sprint\",\n command: 'pm update <id> --sprint \"<sprint>\"',\n summary: \"Backfill the missing sprint on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_release\",\n command: 'pm update <id> --release \"<release>\"',\n summary: \"Backfill the missing release on the reported item(s).\",\n },\n {\n code: \"validate_metadata_custom_profile_missing_required_fields\",\n command: 'pm config set metadata-required-fields --criterion \"<field>\"',\n summary:\n \"Config-driven finding: the custom metadata profile has no required fields configured and falls back to core, so configure the fields rather than mutating items.\",\n },\n // --- pm validate: resolution ---\n {\n code: \"validate_resolution_missing_fields\",\n command: 'pm update <id> --resolution \"<how resolved>\"',\n summary: \"Backfill resolution / expected_result / actual_result on the reported closed item(s).\",\n },\n // --- pm validate: lifecycle ---\n {\n code: \"validate_lifecycle_active_closure_like_metadata\",\n command: \"pm update <id> --unset <closure-like-field>\",\n summary:\n \"Clear the closure-like field the validator flags on this active item — the detail row names it (resolution / actual-result / blocked-reason) — or close the item if it is actually done.\",\n },\n {\n code: \"validate_lifecycle_active_terminal_parent\",\n command: \"pm update <id> --parent <active-parent-id>\",\n summary: \"Reopen the terminal parent or move the active child under a non-terminal parent.\",\n },\n {\n code: \"validate_lifecycle_stale_blockers\",\n command: \"pm update <id> --unset blocked-by --unset blocked-reason\",\n summary:\n \"Resolve the stale blocker the validator flags: clear blocked-by/blocked-reason when they linger on a non-blocked item or report a resolved blocker; if instead a blocked item is missing blocker context, add the context or move it out of a blocked status.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles_error\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary: \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary: \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n // --- pm validate: files ---\n {\n code: \"validate_files_missing_linked_paths\",\n command: \"pm <files|docs> <id> --remove <path>\",\n summary:\n \"The check spans both item.files and item.docs under one code: restore the missing linked artifact, or unlink it with pm files (linked file) or pm docs (linked doc).\",\n },\n {\n code: \"validate_files_orphaned_paths\",\n command: \"pm <files|docs> <id> --add <path>\",\n summary:\n \"Link the orphaned artifact with pm files (file) or pm docs (doc), or remove it from the workspace.\",\n },\n {\n code: \"validate_files_tracked_all_strict_forces_pm_internals\",\n command: \"pm validate --check-files --include-pm-internals\",\n summary: \"tracked-all-strict scan flagged pm internals; re-run with --include-pm-internals or a softer --scan-mode.\",\n },\n // --- pm validate: history_drift ---\n {\n code: \"validate_history_drift_missing_streams\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items missing a history stream.\",\n },\n {\n code: \"validate_history_drift_unreadable_streams\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items with an unreadable history stream.\",\n },\n {\n code: \"validate_history_drift_hash_mismatches\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items whose content hash drifted.\",\n },\n {\n code: \"validate_history_drift_chain_mismatches\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items with a broken history chain.\",\n },\n // --- pm validate: command_references ---\n {\n code: \"validate_command_references_stale_pm_ids\",\n command: 'pm update <id> --replace-tests --test \"command=<corrected-command>\" [--test ...]',\n summary:\n \"Correct the stale pm-ID inside the item's linked test command (the check scans tests[].command, not the body). --replace-tests overwrites the entire tests list, so re-include the item's other linked tests in the same call.\",\n },\n]);\n\n/**\n * Resolve the remediation entry for a warning token, or `undefined` when no\n * entry is registered. A warning matches an entry when it equals the entry code\n * or begins with `<code>:` (the colon boundary keeps sibling codes such as\n * `validate_lifecycle_dependency_cycles` and\n * `validate_lifecycle_dependency_cycles_error` disjoint).\n *\n * First match is intentional and correct: registry codes are mutually exclusive\n * under the colon-boundary rule, so at most one entry can ever match a warning\n * and order is irrelevant. That invariant is enforced by a test (see\n * remediation-registry.spec.ts \"keeps every registry code mutually exclusive\"),\n * which is why this stays a simple linear scan rather than a longest-prefix\n * search — a longest-prefix tie-break is unreachable with disjoint codes.\n *\n * Accepts unknown input defensively (this is an exported helper SDK consumers\n * may call from untyped JS): a non-string `warning` resolves to `undefined`.\n */\nexport function resolveRemediation(warning: string): RemediationEntry | undefined {\n if (typeof warning !== \"string\") {\n return undefined;\n }\n const normalized = warning.trim();\n for (const entry of REMEDIATION_REGISTRY) {\n if (normalized === entry.code || normalized.startsWith(`${entry.code}:`)) {\n return entry;\n }\n }\n return undefined;\n}\n\n/**\n * Build a compact `remediation_map` (code -> command) for a set of warning\n * tokens. First match wins per code; unknown codes are skipped. Used by\n * `pm health --json` per-check details and as the source of deduped executable\n * commands for `pm validate --fix-hints`.\n */\nexport function buildRemediationMap(warnings: Iterable<string>): Record<string, string> {\n const map: Record<string, string> = {};\n for (const warning of warnings) {\n const entry = resolveRemediation(warning);\n if (entry !== undefined && !Object.prototype.hasOwnProperty.call(map, entry.code)) {\n map[entry.code] = entry.command;\n }\n }\n return map;\n}\n\n/**\n * Build a deduped, ordered list of executable remediation commands for a set of\n * warning tokens (one command per distinct matched code). Used by\n * `pm validate --fix-hints` for checks that do not already emit per-row\n * remediation commands.\n */\nexport function buildRemediationCommands(warnings: Iterable<string>): string[] {\n return Object.values(buildRemediationMap(warnings));\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,SAAS,kBAAkB;AAC3B,OAAO,UAAU;AAejB,IAAM,sBAAsB;AAC5B,IAAM,uBAAuB;AAgB7B,SAAS,kBAAkB,QAAc;AACvC,SAAO,KAAK,KAAK,QAAQ,WAAW,oBAAoB;AAC1D;AAEA,eAAe,eAAe,QAAc;AAC1C,MAAI;AACF,UAAM,MAAM,MAAM,GAAG,SAAS,kBAAkB,MAAM,GAAG,MAAM;AAC/D,UAAM,SAAS,KAAK,MAAM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;IACN,SAAS;IACT,SACE;;EAEJ;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SACE;;EAEJ;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;;EAGX;IACE,MAAM;IACN,SAAS;IACT,SACE;;EAEJ;IACE,MAAM;IACN,SAAS;IACT,SACE;;EAEJ;IACE,MAAM;IACN,SAAS;IACT,SAAS;;;EAGX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;;EAGX;IACE,MAAM;IACN,SAAS;IACT,SACE;;CAEL;AAmBK,SAAU,mBAAmB,SAAe;AAChD,MAAI,OAAO,YAAY,UAAU;AAC/B,WAAO;EACT;AACA,QAAM,aAAa,QAAQ,KAAI;AAC/B,aAAW,SAAS,sBAAsB;AACxC,QAAI,eAAe,MAAM,QAAQ,WAAW,WAAW,GAAG,MAAM,IAAI,GAAG,GAAG;AACxE,aAAO;IACT;EACF;AACA,SAAO;AACT;AAQM,SAAU,oBAAoB,UAA0B;AAC5D,QAAM,MAA8B,CAAA;AACpC,aAAW,WAAW,UAAU;AAC9B,UAAM,QAAQ,mBAAmB,OAAO;AACxC,QAAI,UAAU,UAAa,CAAC,OAAO,UAAU,eAAe,KAAK,KAAK,MAAM,IAAI,GAAG;AACjF,UAAI,MAAM,IAAI,IAAI,MAAM;IAC1B;EACF;AACA,SAAO;AACT;AAQM,SAAU,yBAAyB,UAA0B;AACjE,SAAO,OAAO,OAAO,oBAAoB,QAAQ,CAAC;AACpD","debugId":"a6f5399f-ddc1-5e27-8343-9912514306ee"}
|
|
@@ -2,20 +2,20 @@
|
|
|
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]="69440d9c-1dff-5d99-b0ac-dec73e521560")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
wrapOwnershipConflict
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GNIUOLZ2.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveAuthor
|
|
8
8
|
} from "./chunk-J27KIHTG.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-UIIQC5YO.js";
|
|
10
|
+
import "./chunk-FY6Z3FYY.js";
|
|
11
11
|
import {
|
|
12
12
|
mutateItem,
|
|
13
13
|
toItemRecord
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-YBZW2QQ7.js";
|
|
15
|
+
import "./chunk-UT6WFXW2.js";
|
|
16
|
+
import "./chunk-UYQ7HXH4.js";
|
|
17
|
+
import "./chunk-GUZBNB3G.js";
|
|
18
|
+
import "./chunk-B2KZGPM2.js";
|
|
19
19
|
import {
|
|
20
20
|
EXIT_CODE,
|
|
21
21
|
PmCliError,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
resolvePmRoot,
|
|
26
26
|
resolveRuntimeStatusRegistry,
|
|
27
27
|
statusIsTerminal
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-X4IZKYHP.js";
|
|
29
29
|
|
|
30
30
|
// dist/cli/commands/claim.js
|
|
31
31
|
async function runClaim(id, force, global, options = {}) {
|
|
@@ -124,6 +124,6 @@ export {
|
|
|
124
124
|
runClaim,
|
|
125
125
|
runRelease
|
|
126
126
|
};
|
|
127
|
-
//# sourceMappingURL=claim-
|
|
127
|
+
//# sourceMappingURL=claim-BJ4QMPJC.js.map
|
|
128
128
|
|
|
129
129
|
//# debugId=69440d9c-1dff-5d99-b0ac-dec73e521560
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
wrapOwnershipConflict
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-V6EYFTRL.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveAuthor
|
|
6
6
|
} from "./chunk-O7IWB35H.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-HV5SSZXF.js";
|
|
8
|
+
import "./chunk-SFFVGNHC.js";
|
|
9
9
|
import {
|
|
10
10
|
mutateItem,
|
|
11
11
|
toItemRecord
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-TP4DDY27.js";
|
|
13
|
+
import "./chunk-2IXCHCLM.js";
|
|
14
|
+
import "./chunk-WCQZBDDH.js";
|
|
15
|
+
import "./chunk-HRMHZ4RV.js";
|
|
16
|
+
import "./chunk-FHHBD7PN.js";
|
|
17
17
|
import {
|
|
18
18
|
EXIT_CODE,
|
|
19
19
|
PmCliError,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
resolvePmRoot,
|
|
24
24
|
resolveRuntimeStatusRegistry,
|
|
25
25
|
statusIsTerminal
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-UJUT6AHZ.js";
|
|
27
27
|
|
|
28
28
|
// dist/cli/commands/claim.js
|
|
29
29
|
!(function() {
|
|
@@ -129,4 +129,4 @@ export {
|
|
|
129
129
|
runClaim,
|
|
130
130
|
runRelease
|
|
131
131
|
};
|
|
132
|
-
//# sourceMappingURL=claim-
|
|
132
|
+
//# sourceMappingURL=claim-KW743OSW.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runClose
|
|
3
|
+
} from "./chunk-IMCJBN2Q.js";
|
|
4
|
+
import "./chunk-TP4DDY27.js";
|
|
5
|
+
import "./chunk-2IXCHCLM.js";
|
|
6
|
+
import "./chunk-WCQZBDDH.js";
|
|
7
|
+
import "./chunk-HRMHZ4RV.js";
|
|
8
|
+
import "./chunk-FHHBD7PN.js";
|
|
9
|
+
import "./chunk-UJUT6AHZ.js";
|
|
10
|
+
export {
|
|
11
|
+
runClose
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=close-P4ZBKODL.js.map
|
|
@@ -2,16 +2,16 @@
|
|
|
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]="45eac7fa-f181-5cca-93b7-cfb58909dbb3")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
runClose
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-NHR2QXXZ.js";
|
|
6
|
+
import "./chunk-YBZW2QQ7.js";
|
|
7
|
+
import "./chunk-UT6WFXW2.js";
|
|
8
|
+
import "./chunk-UYQ7HXH4.js";
|
|
9
|
+
import "./chunk-GUZBNB3G.js";
|
|
10
|
+
import "./chunk-B2KZGPM2.js";
|
|
11
|
+
import "./chunk-X4IZKYHP.js";
|
|
12
12
|
export {
|
|
13
13
|
runClose
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=close-
|
|
15
|
+
//# sourceMappingURL=close-SYHSRZDC.js.map
|
|
16
16
|
|
|
17
17
|
//# debugId=45eac7fa-f181-5cca-93b7-cfb58909dbb3
|
|
@@ -3,37 +3,37 @@ import {
|
|
|
3
3
|
loadMutationCheckpoint,
|
|
4
4
|
restoreCheckpointItems,
|
|
5
5
|
writeMutationCheckpoint
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WYEXLDDY.js";
|
|
7
|
+
import {
|
|
8
|
+
runClose
|
|
9
|
+
} from "./chunk-IMCJBN2Q.js";
|
|
7
10
|
import {
|
|
8
11
|
runRestore
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OKSKJKHX.js";
|
|
10
13
|
import {
|
|
11
14
|
resolveAuthor
|
|
12
15
|
} from "./chunk-O7IWB35H.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
runClose
|
|
17
|
-
} from "./chunk-ATBVS6WW.js";
|
|
16
|
+
import "./chunk-4CHEG6UK.js";
|
|
17
|
+
import "./chunk-3EOBJOF4.js";
|
|
18
18
|
import {
|
|
19
19
|
runList
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-42LOFGJS.js";
|
|
21
|
+
import "./chunk-B5RF3IP7.js";
|
|
22
|
+
import "./chunk-SFFVGNHC.js";
|
|
23
23
|
import "./chunk-EAOG77HM.js";
|
|
24
24
|
import {
|
|
25
25
|
listAllFrontMatterLight
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-TP4DDY27.js";
|
|
27
|
+
import "./chunk-2IXCHCLM.js";
|
|
28
28
|
import {
|
|
29
29
|
isTerminalStatus
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-WCQZBDDH.js";
|
|
31
31
|
import {
|
|
32
32
|
resolveItemTypeRegistry
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-HRMHZ4RV.js";
|
|
34
34
|
import {
|
|
35
35
|
nowIso
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-FHHBD7PN.js";
|
|
37
37
|
import {
|
|
38
38
|
EXIT_CODE,
|
|
39
39
|
PmCliError,
|
|
@@ -44,13 +44,13 @@ import {
|
|
|
44
44
|
resolvePmRoot,
|
|
45
45
|
resolveRuntimeStatusRegistry,
|
|
46
46
|
toErrorMessage
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-UJUT6AHZ.js";
|
|
48
48
|
|
|
49
49
|
// dist/cli/commands/close-many.js
|
|
50
50
|
!(function() {
|
|
51
51
|
try {
|
|
52
52
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
53
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
53
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "83584226-bf4b-5d89-b485-b5a4eaca2f85");
|
|
54
54
|
} catch (e2) {
|
|
55
55
|
}
|
|
56
56
|
})();
|
|
@@ -93,10 +93,13 @@ function activeListOptions(list) {
|
|
|
93
93
|
}
|
|
94
94
|
return active;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function resolveReason(reason, required) {
|
|
97
97
|
const trimmed = String(reason ?? "").trim();
|
|
98
|
-
if (trimmed.length
|
|
99
|
-
|
|
98
|
+
if (trimmed.length > 0) {
|
|
99
|
+
return trimmed;
|
|
100
|
+
}
|
|
101
|
+
if (required) {
|
|
102
|
+
throw new PmCliError("pm close-many requires a shared close reason via --reason because governance.require_close_reason is enabled.", EXIT_CODE.USAGE, {
|
|
100
103
|
code: "missing_required_argument",
|
|
101
104
|
examples: [
|
|
102
105
|
'pm close-many --filter-sprint S-12 --reason "Sprint S-12 acceptance criteria met"',
|
|
@@ -104,7 +107,7 @@ function ensureReason(reason) {
|
|
|
104
107
|
]
|
|
105
108
|
});
|
|
106
109
|
}
|
|
107
|
-
return
|
|
110
|
+
return void 0;
|
|
108
111
|
}
|
|
109
112
|
async function buildActiveChildrenByParent(pmRoot, settings) {
|
|
110
113
|
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
@@ -204,7 +207,7 @@ async function runCloseMany(options, global2) {
|
|
|
204
207
|
if (!hasCloseManyFilters(options.list, options.status)) {
|
|
205
208
|
throw new PmCliError(`close-many requires at least one filter to scope the close (for example: ${CLOSE_MANY_FILTER_GUIDANCE}). Refusing to match every item.`, EXIT_CODE.USAGE);
|
|
206
209
|
}
|
|
207
|
-
const reason =
|
|
210
|
+
const reason = resolveReason(options.reason, settings.governance.require_close_reason);
|
|
208
211
|
const validateCloseMode = options.validateClose;
|
|
209
212
|
const force = options.force === true;
|
|
210
213
|
const listOptions = activeListOptions(options.list);
|
|
@@ -234,7 +237,7 @@ async function runCloseMany(options, global2) {
|
|
|
234
237
|
mode: "dry_run",
|
|
235
238
|
matched_count: matched.length,
|
|
236
239
|
dry_run: true,
|
|
237
|
-
reason,
|
|
240
|
+
...reason !== void 0 ? { reason } : {},
|
|
238
241
|
filters: listed.filters,
|
|
239
242
|
...validateCloseMode ? { validate_close: validateCloseMode } : {},
|
|
240
243
|
item_plans: planRows,
|
|
@@ -253,7 +256,7 @@ async function runCloseMany(options, global2) {
|
|
|
253
256
|
id: checkpointId,
|
|
254
257
|
created_at: nowValue,
|
|
255
258
|
author: resolveAuthor(options.author, "unknown"),
|
|
256
|
-
reason,
|
|
259
|
+
...reason !== void 0 ? { reason } : {},
|
|
257
260
|
filters: listed.filters,
|
|
258
261
|
items: checkpointItems
|
|
259
262
|
});
|
|
@@ -297,7 +300,7 @@ async function runCloseMany(options, global2) {
|
|
|
297
300
|
mode: "apply",
|
|
298
301
|
matched_count: matched.length,
|
|
299
302
|
dry_run: false,
|
|
300
|
-
reason,
|
|
303
|
+
...reason !== void 0 ? { reason } : {},
|
|
301
304
|
filters: listed.filters,
|
|
302
305
|
...validateCloseMode ? { validate_close: validateCloseMode } : {},
|
|
303
306
|
...checkpointInfo ? { checkpoint: checkpointInfo } : {},
|
|
@@ -311,4 +314,4 @@ async function runCloseMany(options, global2) {
|
|
|
311
314
|
export {
|
|
312
315
|
runCloseMany
|
|
313
316
|
};
|
|
314
|
-
//# sourceMappingURL=close-many-
|
|
317
|
+
//# sourceMappingURL=close-many-DBLEYFOY.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../cli/commands/close-many.ts"],
|
|
4
|
+
"sourcesContent": ["import { pathExists } from \"../../core/fs/fs-utils.js\";\nimport {\n createCheckpointId,\n loadMutationCheckpoint,\n restoreCheckpointItems,\n writeMutationCheckpoint,\n type MutationCheckpointItem,\n} from \"../../core/checkpoint/mutation-checkpoint.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { toErrorMessage } from \"../../core/shared/primitives.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { runClose, type CloseCommandOptions } from \"./close.js\";\nimport { runList, type ListOptions, type ListedItem } from \"./list.js\";\nimport { runRestore } from \"./restore.js\";\n\nconst CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;\nconst CLOSE_MANY_CHECKPOINT_SUBDIR = \"close-many\";\n\nconst CLOSE_MANY_FILTER_GUIDANCE = [\n \"--filter-status\",\n \"--filter-type\",\n \"--filter-tag\",\n \"--filter-priority\",\n \"--filter-sprint\",\n \"--filter-release\",\n \"--filter-parent\",\n \"--filter-assignee\",\n \"--filter-updated-before\",\n \"--ids\",\n].join(\", \");\n\nexport interface CloseManyCommandOptions {\n status?: string;\n list?: ListOptions;\n reason?: string;\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n validateClose?: string;\n author?: string;\n message?: string;\n force?: boolean;\n dryRun?: boolean;\n rollback?: string;\n checkpoint?: boolean;\n}\n\ninterface CloseManyPlanRow {\n id: string;\n title: string;\n status: string;\n action: \"close\" | \"skip\";\n skip_reason?: string;\n active_child_ids?: string[];\n}\n\ninterface CloseManyApplyRow {\n id: string;\n status: \"closed\" | \"skipped\" | \"failed\";\n skip_reason?: string;\n changed_fields?: string[];\n warnings?: string[];\n error?: string;\n}\n\nexport interface CloseManyResult {\n mode: \"dry_run\" | \"apply\" | \"rollback\";\n matched_count: number;\n dry_run: boolean;\n reason?: string;\n filters?: Record<string, unknown>;\n validate_close?: string;\n item_plans?: CloseManyPlanRow[];\n checkpoint?: {\n id: string;\n created_at: string;\n path: string;\n rollback_command: string;\n };\n closed_count?: number;\n skipped_count?: number;\n failed_count?: number;\n restored_count?: number;\n rollback_checkpoint_id?: string;\n rows?: CloseManyApplyRow[] | Array<{ id: string; status: \"restored\" | \"failed\"; changed_fields?: string[]; warnings?: string[]; error?: string }>;\n ids: string[];\n}\n\nfunction hasCloseManyFilters(list: ListOptions | undefined, status: string | undefined): boolean {\n const isActive = (value: unknown): boolean =>\n value != null && (typeof value !== \"string\" || value.split(\",\").some((entry) => entry.trim().length > 0));\n return (\n isActive(status) ||\n isActive(list?.status) ||\n isActive(list?.type) ||\n isActive(list?.tag) ||\n isActive(list?.priority) ||\n isActive(list?.deadlineBefore) ||\n isActive(list?.deadlineAfter) ||\n isActive(list?.updatedAfter) ||\n isActive(list?.updatedBefore) ||\n isActive(list?.createdAfter) ||\n isActive(list?.createdBefore) ||\n isActive(list?.ids) ||\n isActive(list?.assignee) ||\n isActive(list?.assigneeFilter) ||\n isActive(list?.parent) ||\n isActive(list?.sprint) ||\n isActive(list?.release)\n );\n}\n\nfunction hasCloseManyRollbackConflicts(list: ListOptions | undefined, status: string | undefined): boolean {\n return (\n hasCloseManyFilters(list, status) ||\n (list?.limit != null && String(list.limit).trim().length > 0) ||\n (list?.offset != null && String(list.offset).trim().length > 0)\n );\n}\n\nfunction rejectBlankIdsFilter(list: ListOptions | undefined): void {\n if (list?.ids != null && String(list.ids).trim().length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n}\n\nfunction activeListOptions(list: ListOptions | undefined): ListOptions {\n const active: ListOptions = {};\n if (!list) {\n return active;\n }\n for (const [key, value] of Object.entries(list) as Array<[keyof ListOptions, unknown]>) {\n if (value == null || (typeof value === \"string\" && !value.split(\",\").some((entry) => entry.trim().length > 0))) {\n continue;\n }\n (active as Record<string, unknown>)[key] = value;\n }\n return active;\n}\n\nfunction resolveReason(reason: unknown, required: boolean): string | undefined {\n const trimmed = String(reason ?? \"\").trim();\n if (trimmed.length > 0) {\n return trimmed;\n }\n if (required) {\n throw new PmCliError(\n \"pm close-many requires a shared close reason via --reason because governance.require_close_reason is enabled.\",\n EXIT_CODE.USAGE,\n {\n code: \"missing_required_argument\",\n examples: [\n 'pm close-many --filter-sprint S-12 --reason \"Sprint S-12 acceptance criteria met\"',\n 'pm close-many --ids pm-a,pm-b --reason \"Superseded by redesign\"',\n ],\n },\n );\n }\n return undefined;\n}\n\n// Build a parent -> non-terminal child id map in a single light scan so each\n// matched parent can be annotated with the active children that closing it\n// would orphan (the same signal runClose surfaces per item on apply).\nasync function buildActiveChildrenByParent(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n): Promise<{ childrenByParent: Map<string, string[]>; parentByChild: Map<string, string> }> {\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n const childrenByParent = new Map<string, string[]>();\n const parentByChild = new Map<string, string>();\n for (const item of items) {\n if (typeof item.parent !== \"string\" || item.parent.length === 0) {\n continue;\n }\n parentByChild.set(item.id, item.parent);\n if (isTerminalStatus(item.status, statusRegistry)) {\n continue;\n }\n const existing = childrenByParent.get(item.parent);\n if (existing) {\n existing.push(item.id);\n } else {\n childrenByParent.set(item.parent, [item.id]);\n }\n }\n for (const ids of childrenByParent.values()) {\n ids.sort((left, right) => left.localeCompare(right));\n }\n return { childrenByParent, parentByChild };\n}\n\nfunction hierarchyDepth(id: string, parentByChild: Map<string, string>, cache?: Map<string, number>): number {\n const cached = cache?.get(id);\n if (cached !== undefined) {\n return cached;\n }\n let depth = 0;\n let current = parentByChild.get(id);\n const path: string[] = [];\n const visited = new Set<string>();\n let hasCycle = false;\n while (current !== undefined && !visited.has(current)) {\n const cachedCurrent = cache?.get(current);\n if (cachedCurrent !== undefined) {\n depth += cachedCurrent + 1;\n break;\n }\n visited.add(current);\n path.push(current);\n depth += 1;\n current = parentByChild.get(current);\n }\n if (current !== undefined && visited.has(current)) {\n hasCycle = true;\n }\n if (!hasCycle) {\n cache?.set(id, depth);\n for (const [index, ancestorId] of path.entries()) {\n cache?.set(ancestorId, depth - index - 1);\n }\n }\n return depth;\n}\n\nexport async function runCloseMany(options: CloseManyCommandOptions, global: GlobalOptions): Promise<CloseManyResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n\n const dryRun = options.dryRun === true;\n const rollbackId = typeof options.rollback === \"string\" ? options.rollback : undefined;\n rejectBlankIdsFilter(options.list);\n\n if (rollbackId) {\n if (dryRun) {\n throw new PmCliError(\"--dry-run cannot be combined with --rollback\", EXIT_CODE.USAGE);\n }\n if (hasCloseManyRollbackConflicts(options.list, options.status)) {\n throw new PmCliError(\"Rollback mode does not accept filter options\", EXIT_CODE.USAGE);\n }\n const checkpoint = await loadMutationCheckpoint(\n pmRoot,\n CLOSE_MANY_CHECKPOINT_SUBDIR,\n rollbackId,\n CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n );\n const restoreMessage = options.message ?? `Rollback close-many checkpoint ${checkpoint.id}`;\n const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) =>\n runRestore(id, targetUpdatedAt, { author: options.author, message: restoreMessage, force: true }, global),\n );\n return {\n mode: \"rollback\",\n matched_count: checkpoint.items.length,\n dry_run: false,\n rollback_checkpoint_id: checkpoint.id,\n checkpoint: {\n id: checkpoint.id,\n created_at: checkpoint.created_at,\n path: checkpoint.path,\n rollback_command: `pm close-many --rollback ${checkpoint.id}`,\n },\n restored_count: rollback.restored_ids.length,\n failed_count: rollback.failed_count,\n rows: rollback.rows,\n ids: rollback.restored_ids,\n };\n }\n\n if (!hasCloseManyFilters(options.list, options.status)) {\n throw new PmCliError(\n `close-many requires at least one filter to scope the close (for example: ${CLOSE_MANY_FILTER_GUIDANCE}). Refusing to match every item.`,\n EXIT_CODE.USAGE,\n );\n }\n\n const reason = resolveReason(options.reason, settings.governance.require_close_reason);\n const validateCloseMode = options.validateClose;\n const force = options.force === true;\n\n const listOptions = activeListOptions(options.list);\n const listed = await runList(options.status, listOptions, global);\n const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(pmRoot, settings);\n const depthCache = new Map<string, number>();\n const matched = [...(listed.items as ListedItem[])].sort((left, right) => {\n const depthDelta = hierarchyDepth(right.id, parentByChild, depthCache) - hierarchyDepth(left.id, parentByChild, depthCache);\n return depthDelta !== 0 ? depthDelta : left.id.localeCompare(right.id);\n });\n const closePlannedIds = new Set(\n matched\n .filter((item) => force || !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id),\n );\n\n const planRows: CloseManyPlanRow[] = matched.map((item) => {\n const alreadyTerminal = isTerminalStatus(item.status, statusRegistry);\n const activeChildIds = (childrenByParent.get(item.id) ?? []).filter((childId) => !closePlannedIds.has(childId));\n const willSkip = alreadyTerminal && !force;\n return {\n id: item.id,\n title: typeof item.title === \"string\" ? item.title : \"\",\n status: item.status,\n action: willSkip ? \"skip\" : \"close\",\n ...(willSkip ? { skip_reason: \"already_terminal\" } : {}),\n ...(activeChildIds.length > 0 ? { active_child_ids: activeChildIds } : {}),\n };\n });\n\n if (dryRun) {\n return {\n mode: \"dry_run\",\n matched_count: matched.length,\n dry_run: true,\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),\n item_plans: planRows,\n ids: [],\n };\n }\n\n const closableIds = new Set(planRows.filter((row) => row.action === \"close\").map((row) => row.id));\n\n const nowValue = nowIso();\n const checkpointId = createCheckpointId(CLOSE_MANY_CHECKPOINT_SUBDIR, nowValue);\n const checkpointEnabled = options.checkpoint !== false;\n let checkpointInfo: CloseManyResult[\"checkpoint\"] | undefined;\n if (checkpointEnabled && closableIds.size > 0) {\n const checkpointItems: MutationCheckpointItem[] = matched\n .filter((item) => closableIds.has(item.id))\n .map((item) => ({ id: item.id, target_updated_at: item.updated_at }));\n const checkpointPath = await writeMutationCheckpoint(pmRoot, CLOSE_MANY_CHECKPOINT_SUBDIR, checkpointId, {\n schema_version: CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n id: checkpointId,\n created_at: nowValue,\n author: resolveAuthor(options.author, \"unknown\"),\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n items: checkpointItems,\n });\n checkpointInfo = {\n id: checkpointId,\n created_at: nowValue,\n path: checkpointPath,\n rollback_command: `pm close-many --rollback ${checkpointId}`,\n };\n }\n\n const closeOptions: CloseCommandOptions = {\n author: options.author,\n message: options.message ?? `close-many apply ${checkpointId}`,\n validateClose: validateCloseMode,\n force,\n resolution: options.resolution,\n expectedResult: options.expectedResult,\n actualResult: options.actualResult,\n };\n\n const rows: CloseManyApplyRow[] = [];\n const closedIds: string[] = [];\n for (const item of matched) {\n if (!closableIds.has(item.id)) {\n rows.push({ id: item.id, status: \"skipped\", skip_reason: \"already_terminal\" });\n continue;\n }\n try {\n const result = await runClose(item.id, reason, closeOptions, global);\n rows.push({\n id: item.id,\n status: \"closed\",\n changed_fields: result.changed_fields,\n ...(result.warnings && result.warnings.length > 0 ? { warnings: result.warnings } : {}),\n });\n closedIds.push(item.id);\n } catch (error: unknown) {\n rows.push({ id: item.id, status: \"failed\", error: toErrorMessage(error) });\n }\n }\n\n return {\n mode: \"apply\",\n matched_count: matched.length,\n dry_run: false,\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),\n ...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),\n closed_count: rows.filter((row) => row.status === \"closed\").length,\n skipped_count: rows.filter((row) => row.status === \"skipped\").length,\n failed_count: rows.filter((row) => row.status === \"failed\").length,\n rows,\n ids: closedIds,\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAM,uCAAuC;AAC7C,IAAM,+BAA+B;AAErC,IAAM,6BAA6B;EACjC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,KAAK,IAAI;AA2DX,SAAS,oBAAoB,MAA+B,QAA0B;AACpF,QAAM,WAAW,CAAC,UAChB,SAAS,SAAS,OAAO,UAAU,YAAY,MAAM,MAAM,GAAG,EAAE,KAAK,CAAC,UAAU,MAAM,KAAI,EAAG,SAAS,CAAC;AACzG,SACE,SAAS,MAAM,KACf,SAAS,MAAM,MAAM,KACrB,SAAS,MAAM,IAAI,KACnB,SAAS,MAAM,GAAG,KAClB,SAAS,MAAM,QAAQ,KACvB,SAAS,MAA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