@unbrained/pm-cli 2026.7.6 → 2026.7.8
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 +50 -0
- package/dist/cli/commands/annotation-command.d.ts +1 -0
- package/dist/cli/commands/annotation-command.js +29 -2
- package/dist/cli/commands/annotation-command.js.map +1 -1
- package/dist/cli/commands/comments.js +3 -4
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/completion.js +10 -2
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/context.d.ts +1 -0
- package/dist/cli/commands/context.js +4 -4
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.d.ts +3 -0
- package/dist/cli/commands/extension/bundled-catalog.js +38 -28
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.js +81 -18
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +23 -19
- package/dist/cli/commands/extension.js +167 -57
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/health.js +9 -5
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/learnings.js +5 -3
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/notes.js +5 -3
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/reindex.js +4 -3
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/search.js +4 -4
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test.d.ts +9 -0
- package/dist/cli/commands/test.js +144 -105
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/extension-command-help.js +10 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/help-content.js +28 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/register-list-query.d.ts +1 -1
- package/dist/cli/register-list-query.js +19 -27
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-operations.d.ts +0 -8
- package/dist/cli/register-operations.js +41 -46
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +119 -13
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +5 -1
- package/dist/cli/registration-helpers.js +14 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/append-CDPAYYSB.js +11 -0
- package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js → append-RSPHC423.js} +8 -9
- package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js → chunk-2BVD4ZD2.js} +288 -233
- package/dist/cli-bundle/chunks/chunk-2BVD4ZD2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TKD5VCTD.js → chunk-2RADY7IB.js} +517 -195
- package/dist/cli-bundle/chunks/chunk-2RADY7IB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-COSPOP7H.js → chunk-3FRNNVWY.js} +518 -196
- package/dist/cli-bundle/chunks/chunk-3FRNNVWY.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-24YG75HI.js → chunk-3FUXM574.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js → chunk-3SHDAKMF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js → chunk-3UXIMY62.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js.map → chunk-3UXIMY62.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js → chunk-3V5C7PUH.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js → chunk-3YJDIJIE.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js.map → chunk-3YJDIJIE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js → chunk-4I7KS5ES.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js → chunk-4OCWJ2AP.js} +13 -17
- package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js.map → chunk-4OCWJ2AP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js → chunk-5STY7NVM.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js → chunk-5VAZHYVQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js → chunk-6FU5BVRB.js} +12 -14
- package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js.map → chunk-6FU5BVRB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js → chunk-6RR4XM5H.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-K46RF36U.js → chunk-6TD5QGIB.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-6TD5QGIB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js → chunk-6WCXSC5V.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js.map → chunk-6WCXSC5V.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js → chunk-6ZKDMEVT.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js.map → chunk-6ZKDMEVT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js → chunk-7QKSLAHB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js → chunk-7TBUV7XS.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js.map → chunk-7TBUV7XS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js → chunk-7UCBLJDF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js → chunk-AEOFBBWO.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js.map → chunk-AEOFBBWO.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-ASMRSIDX.js +10498 -0
- package/dist/cli-bundle/chunks/chunk-ASMRSIDX.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js → chunk-BFNFTHWQ.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-BPJ5NYSJ.js +5509 -0
- package/dist/cli-bundle/chunks/chunk-BPJ5NYSJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js → chunk-C3YU3TXX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VPIM42PC.js → chunk-C6XSTACC.js} +11 -7
- package/dist/cli-bundle/chunks/chunk-C6XSTACC.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js → chunk-CGDUIPJL.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js → chunk-CXH7EMSB.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js.map → chunk-CXH7EMSB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-DMRNBQOI.js → chunk-D63PEJTB.js} +256 -36
- package/dist/cli-bundle/chunks/chunk-D63PEJTB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js → chunk-D6J5673C.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js.map → chunk-D6J5673C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js → chunk-DUBC6TI3.js} +28 -34
- package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js.map → chunk-DUBC6TI3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js → chunk-EEJKHF7M.js} +7 -6
- package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js.map → chunk-EEJKHF7M.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XG625QP4.js → chunk-EP2CKDS7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js → chunk-EYPIUFWJ.js} +24 -32
- package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js.map → chunk-EYPIUFWJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js → chunk-F5DDGY6R.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js.map → chunk-F5DDGY6R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js → chunk-FFB3WITE.js} +10 -16
- package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js.map → chunk-FFB3WITE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js → chunk-FJR2S7S4.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js.map → chunk-FJR2S7S4.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-FL625JJM.js +6792 -0
- package/dist/cli-bundle/chunks/chunk-FL625JJM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js → chunk-FOJEBRDD.js} +16 -20
- package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js.map → chunk-FOJEBRDD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EOKXK3R3.js → chunk-G4FKP4ID.js} +1220 -398
- package/dist/cli-bundle/chunks/chunk-G4FKP4ID.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GE44TQMC.js +6726 -0
- package/dist/cli-bundle/chunks/chunk-GE44TQMC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js → chunk-GLMJLBLR.js} +6 -10
- package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js.map → chunk-GLMJLBLR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js → chunk-GO2X6ZRB.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js.map → chunk-GO2X6ZRB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js → chunk-GQOKFX2G.js} +22 -26
- package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js.map → chunk-GQOKFX2G.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js → chunk-GSQVQINP.js} +8 -10
- package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js.map → chunk-GSQVQINP.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-HI27UADG.js +5434 -0
- package/dist/cli-bundle/chunks/chunk-HI27UADG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js → chunk-HZZ3AC27.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js.map → chunk-HZZ3AC27.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js → chunk-IINCZYM3.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js.map → chunk-IINCZYM3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EKFNL33R.js → chunk-INOWVPUD.js} +37 -16
- package/dist/cli-bundle/chunks/chunk-INOWVPUD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4LELACOL.js → chunk-IYRG5AEC.js} +15 -23
- package/dist/cli-bundle/chunks/{chunk-4LELACOL.js.map → chunk-IYRG5AEC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js → chunk-J6AD3GWC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js → chunk-JH5XDDYS.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js.map → chunk-JH5XDDYS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js → chunk-JYVPLGOW.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js.map → chunk-JYVPLGOW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js → chunk-K52C6YPA.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js.map → chunk-K52C6YPA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js → chunk-KFL3XHMA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-KMXVZ2P7.js +10320 -0
- package/dist/cli-bundle/chunks/chunk-KMXVZ2P7.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js → chunk-LD2NBQ5T.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js.map → chunk-LD2NBQ5T.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js → chunk-LG4N6YOK.js} +8 -7
- package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js.map → chunk-LG4N6YOK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js → chunk-LHDHS4Z6.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js.map → chunk-LHDHS4Z6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js → chunk-MCH6IKK7.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js.map → chunk-MCH6IKK7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-57NWPFF2.js → chunk-MFLLULHU.js} +281 -233
- package/dist/cli-bundle/chunks/chunk-MFLLULHU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-EGAP5OWD.js → chunk-ML27MHNM.js} +35 -17
- package/dist/cli-bundle/chunks/chunk-ML27MHNM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js → chunk-MYHFZNBO.js} +20 -24
- package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js.map → chunk-MYHFZNBO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js → chunk-NGBWEYNY.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js.map → chunk-NGBWEYNY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js → chunk-NRMDT4OV.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js.map → chunk-NRMDT4OV.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-NTOOEVJ4.js +5359 -0
- package/dist/cli-bundle/chunks/chunk-NTOOEVJ4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js → chunk-P2WE5KCU.js} +261 -34
- package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js.map → chunk-P2WE5KCU.js.map} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js → chunk-PAWPLIWW.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js.map → chunk-PAWPLIWW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js → chunk-PCBZ2VJD.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-ZSUS2OD3.js → chunk-PJPZTE7P.js} +1216 -387
- package/dist/cli-bundle/chunks/chunk-PJPZTE7P.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js → chunk-Q3CFSOQZ.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js → chunk-QJZM5WO5.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js.map → chunk-QJZM5WO5.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QLMX7SRD.js → chunk-QLEH6FTQ.js} +6 -6
- package/dist/cli-bundle/chunks/chunk-QLEH6FTQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js → chunk-QYZMZD4L.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js.map → chunk-QYZMZD4L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js → chunk-RDJXIAJB.js} +7 -11
- package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js.map → chunk-RDJXIAJB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js → chunk-RFHLRMLQ.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js.map → chunk-RFHLRMLQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js → chunk-RL24NAUX.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js.map → chunk-RL24NAUX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-46CUF5L6.js → chunk-RLHQ3G4M.js} +99 -51
- package/dist/cli-bundle/chunks/chunk-RLHQ3G4M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js → chunk-SCJPFQQT.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js.map → chunk-SCJPFQQT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js → chunk-SIQGG335.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js.map → chunk-SIQGG335.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js → chunk-SN5X5GTU.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js.map → chunk-SN5X5GTU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CL36D4PC.js → chunk-TKWTJGD6.js} +36 -15
- package/dist/cli-bundle/chunks/chunk-TKWTJGD6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VIIUS6N6.js → chunk-TR2C6V5T.js} +37 -19
- package/dist/cli-bundle/chunks/chunk-TR2C6V5T.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-TTCJCKUJ.js +5514 -0
- package/dist/cli-bundle/chunks/chunk-TTCJCKUJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js → chunk-TU5P744I.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-TULGS6X6.js → chunk-TUDAYIO7.js} +529 -46
- package/dist/cli-bundle/chunks/chunk-TUDAYIO7.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MLIYFOE7.js → chunk-U72GF3I2.js} +12 -8
- package/dist/cli-bundle/chunks/chunk-U72GF3I2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js → chunk-UCRYCT5M.js} +30 -36
- package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js.map → chunk-UCRYCT5M.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js → chunk-UEATYUZW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js → chunk-UFNFHCAC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js → chunk-UH6VFRV6.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js.map → chunk-UH6VFRV6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js → chunk-UIHDZS6X.js} +11 -15
- package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js.map → chunk-UIHDZS6X.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-W572BIEB.js → chunk-UURYLDDC.js} +14 -18
- package/dist/cli-bundle/chunks/{chunk-W572BIEB.js.map → chunk-UURYLDDC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js → chunk-UVFJSKTF.js} +9 -13
- package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js.map → chunk-UVFJSKTF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js → chunk-W2VFNVSJ.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js.map → chunk-W2VFNVSJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js → chunk-WVEMZZCR.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js.map → chunk-WVEMZZCR.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3VHSI5FL.js → chunk-XN5BEN2B.js} +94 -53
- package/dist/cli-bundle/chunks/chunk-XN5BEN2B.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SCUR7K7N.js → chunk-XPSGJ4IV.js} +541 -44
- package/dist/cli-bundle/chunks/chunk-XPSGJ4IV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js → chunk-YQEKE4FO.js} +13 -21
- package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js.map → chunk-YQEKE4FO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js → chunk-YR5R4FMQ.js} +26 -34
- package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js.map → chunk-YR5R4FMQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js → chunk-YSRXFGNV.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js.map → chunk-YSRXFGNV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js → chunk-YUCKM3MD.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js.map → chunk-YUCKM3MD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js → chunk-YUMNZS3X.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js.map → chunk-YUMNZS3X.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js → chunk-Z2JQH2MG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js → chunk-Z6RLSNUX.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js.map → chunk-Z6RLSNUX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js → chunk-ZMOPZFVT.js} +4 -4
- package/dist/cli-bundle/chunks/close-E3RLZSP2.js +12 -0
- package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js → close-K6BFI3OX.js} +5 -9
- package/dist/cli-bundle/chunks/close-many-6NBL3PM4.js +26 -0
- package/dist/cli-bundle/chunks/close-many-X4YKS3RO.js +22 -0
- package/dist/cli-bundle/chunks/comments-PLFK5ZKK.js +17 -0
- package/dist/cli-bundle/chunks/comments-ZNOD5PTV.js +13 -0
- package/dist/cli-bundle/chunks/copy-F7BUFY4J.js +9 -0
- package/dist/cli-bundle/chunks/{copy-32ROBIDL.js → copy-VH3L4MN2.js} +4 -8
- package/dist/cli-bundle/chunks/create-AMBMYP6F.js +25 -0
- package/dist/cli-bundle/chunks/{create-E77SDCUP.js → create-TRIBYORN.js} +9 -14
- package/dist/cli-bundle/chunks/delete-6KQHZYIP.js +10 -0
- package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js → delete-ZNXUNCZR.js} +4 -8
- package/dist/cli-bundle/chunks/deps-CVDY7FFK.js +13 -0
- package/dist/cli-bundle/chunks/{deps-32SU7HO5.js → deps-SZXQHV73.js} +4 -8
- package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js → docs-DR74ITCD.js} +6 -10
- package/dist/cli-bundle/chunks/docs-WCVYY6I7.js +14 -0
- package/dist/cli-bundle/chunks/files-H5YCA74Z.js +18 -0
- package/dist/cli-bundle/chunks/{files-PYKR2UUG.js → files-QEFQ2M3H.js} +6 -10
- package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js → focus-55TRYSNA.js} +7 -9
- package/dist/cli-bundle/chunks/focus-N2QGNS5D.js +10 -0
- package/dist/cli-bundle/chunks/history-compact-GWQ4UOEI.js +21 -0
- package/dist/cli-bundle/chunks/{history-compact-3MNXLKAT.js → history-compact-JJZ4EFL3.js} +9 -13
- package/dist/cli-bundle/chunks/history-redact-4GJOLXCM.js +17 -0
- package/dist/cli-bundle/chunks/{history-redact-P6DYF55G.js → history-redact-TPPUT3A5.js} +7 -11
- package/dist/cli-bundle/chunks/history-repair-HVCVCGUF.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-ZJQFMWPD.js → history-repair-J7PIZ6ZP.js} +9 -13
- package/dist/cli-bundle/chunks/{append-BGML6VLD.js → learnings-KB6BT4NR.js} +9 -11
- package/dist/cli-bundle/chunks/learnings-YYY3U2Y7.js +13 -0
- package/dist/cli-bundle/chunks/notes-BGG7VL72.js +13 -0
- package/dist/cli-bundle/chunks/notes-ZTHXVOKM.js +17 -0
- package/dist/cli-bundle/chunks/{plan-CHVE7PBR.js → plan-CJPKFRBK.js} +10 -15
- package/dist/cli-bundle/chunks/plan-MK2QY3GA.js +24 -0
- package/dist/cli-bundle/chunks/{profile-ZXGSKBJD.js → profile-AQNHXOYA.js} +9 -13
- package/dist/cli-bundle/chunks/{profile-LD23PSI6.js → profile-HTBFINKQ.js} +9 -13
- package/dist/cli-bundle/chunks/{register-list-query-B42JCCOI.js → register-list-query-EEF33SUJ.js} +43 -34
- package/dist/cli-bundle/chunks/register-list-query-EEF33SUJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-OEYQHFXO.js → register-list-query-S4FBWIWN.js} +42 -33
- package/dist/cli-bundle/chunks/register-list-query-S4FBWIWN.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js → register-mutation-L5Q7AUDN.js} +34 -39
- package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js.map → register-mutation-L5Q7AUDN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js → register-mutation-QFLRBCI7.js} +36 -41
- package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js.map → register-mutation-QFLRBCI7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5BMM6XQY.js → register-operations-HDE4FVW4.js} +79 -46
- package/dist/cli-bundle/chunks/register-operations-HDE4FVW4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Z3U3U5KD.js → register-operations-QDU43FCG.js} +78 -45
- package/dist/cli-bundle/chunks/register-operations-QDU43FCG.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-Q6KFNIOZ.js → register-setup-EGMTAXDC.js} +134 -32
- package/dist/cli-bundle/chunks/register-setup-EGMTAXDC.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-3ZVVX2VN.js → register-setup-PNIO3L2P.js} +133 -31
- package/dist/cli-bundle/chunks/register-setup-PNIO3L2P.js.map +7 -0
- package/dist/cli-bundle/chunks/{restore-5RQHAPMA.js → restore-BTBEZ5CK.js} +7 -11
- package/dist/cli-bundle/chunks/restore-EX4UUZL6.js +15 -0
- package/dist/cli-bundle/chunks/{schema-HBORFC6B.js → schema-DGSTYYQB.js} +6 -10
- package/dist/cli-bundle/chunks/{schema-245WW4G2.js → schema-HAIBEE24.js} +6 -10
- package/dist/cli-bundle/chunks/update-MP4XLU56.js +25 -0
- package/dist/cli-bundle/chunks/update-SDIRJGSY.js +21 -0
- package/dist/cli-bundle/chunks/update-many-34AIU6W7.js +31 -0
- package/dist/cli-bundle/chunks/update-many-JUPCNOKV.js +35 -0
- package/dist/cli-bundle/main.js +56 -32
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +161 -107
- package/dist/cli-bundle/sdk-testing.js +7 -8
- package/dist/cli-bundle/sdk.js +154 -117
- package/dist/cli-bundle/sdk.js.map +2 -2
- package/dist/core/extensions/extension-types.d.ts +1 -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 +268 -231
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/drift-scan.js +3 -8
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/output/mutation-projection.js +11 -5
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/search/cache.js +3 -3
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/semantic-defaults.d.ts +2 -0
- package/dist/core/search/semantic-defaults.js +11 -4
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/vector-stores.d.ts +1 -1
- package/dist/core/search/vector-stores.js +33 -7
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +3 -3
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +12 -8
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +10 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +14 -8
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +282 -8
- package/dist/sdk/runtime.js +453 -14
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/start-task-status.d.ts +13 -0
- package/dist/sdk/start-task-status.js +19 -0
- package/dist/sdk/start-task-status.js.map +1 -0
- package/docs/COMMANDS.md +10 -1
- package/docs/EXTENSIONS.md +7 -20
- package/docs/RELEASING.md +6 -0
- package/docs/SDK.md +65 -0
- package/docs/TESTING.md +3 -0
- package/package.json +2 -1
- package/dist/cli-bundle/chunks/activity-WJCGCYPU.js +0 -18
- package/dist/cli-bundle/chunks/activity-Z6QUAUSG.js +0 -22
- package/dist/cli-bundle/chunks/aggregate-BDM6EIAR.js +0 -25
- package/dist/cli-bundle/chunks/aggregate-VQ2DHU3S.js +0 -21
- package/dist/cli-bundle/chunks/append-RKJYPU74.js +0 -15
- package/dist/cli-bundle/chunks/chunk-2XG4IZON.js +0 -218
- package/dist/cli-bundle/chunks/chunk-2XG4IZON.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-37E72CNS.js +0 -217
- package/dist/cli-bundle/chunks/chunk-37E72CNS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js +0 -228
- package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js +0 -2330
- package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3VHSI5FL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-425E4QL5.js +0 -278
- package/dist/cli-bundle/chunks/chunk-425E4QL5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-46CUF5L6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +0 -87
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js +0 -249
- package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js +0 -819
- package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js +0 -279
- package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-57NWPFF2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js +0 -268
- package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js +0 -1868
- package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js +0 -1749
- package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-64YKRTSV.js +0 -1961
- package/dist/cli-bundle/chunks/chunk-64YKRTSV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +0 -23
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js +0 -421
- package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js +0 -1985
- package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CL36D4PC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-COSPOP7H.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-COWTDV6B.js +0 -3461
- package/dist/cli-bundle/chunks/chunk-COWTDV6B.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js +0 -1858
- package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js +0 -1932
- package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EKFNL33R.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js +0 -1704
- package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EOKXK3R3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js +0 -231
- package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js +0 -2090
- package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js +0 -1570
- package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js +0 -239
- package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js +0 -530
- package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-GZRDYONU.js +0 -1005
- package/dist/cli-bundle/chunks/chunk-GZRDYONU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js +0 -277
- package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js +0 -309
- package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JINYH2DB.js +0 -371
- package/dist/cli-bundle/chunks/chunk-JINYH2DB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js +0 -2257
- package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-K46RF36U.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KERMZVY5.js +0 -371
- package/dist/cli-bundle/chunks/chunk-KERMZVY5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js +0 -76
- package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LK6XLOGP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js +0 -140
- package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js +0 -1601
- package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js +0 -1031
- package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js +0 -995
- package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js +0 -296
- package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MLIYFOE7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js +0 -2043
- package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js +0 -2033
- package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N745W3B3.js +0 -1604
- package/dist/cli-bundle/chunks/chunk-N745W3B3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js +0 -1615
- package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +0 -20
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js +0 -143
- package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QLMX7SRD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QX6HM775.js +0 -398
- package/dist/cli-bundle/chunks/chunk-QX6HM775.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QZ342C63.js +0 -220
- package/dist/cli-bundle/chunks/chunk-QZ342C63.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js +0 -368
- package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RFNYTESG.js +0 -520
- package/dist/cli-bundle/chunks/chunk-RFNYTESG.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js +0 -79
- package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js +0 -282
- package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js +0 -274
- package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SCUR7K7N.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js +0 -1977
- package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js +0 -1041
- package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-T42JWV3F.js +0 -822
- package/dist/cli-bundle/chunks/chunk-T42JWV3F.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TULGS6X6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js +0 -2306
- package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VPIM42PC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VQRSPVME.js +0 -368
- package/dist/cli-bundle/chunks/chunk-VQRSPVME.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +0 -84
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js +0 -3423
- package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WLSM645P.js +0 -2247
- package/dist/cli-bundle/chunks/chunk-WLSM645P.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WRTENIX3.js +0 -215
- package/dist/cli-bundle/chunks/chunk-WRTENIX3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js +0 -388
- package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XC5BURG2.js +0 -306
- package/dist/cli-bundle/chunks/chunk-XC5BURG2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js +0 -424
- package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js +0 -2128
- package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js +0 -299
- package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZSUS2OD3.js.map +0 -7
- package/dist/cli-bundle/chunks/claim-RFS7BROJ.js +0 -19
- package/dist/cli-bundle/chunks/claim-XP5AWZ5H.js +0 -23
- package/dist/cli-bundle/chunks/close-GEANHQ2J.js +0 -16
- package/dist/cli-bundle/chunks/close-many-CMZW7ITN.js +0 -31
- package/dist/cli-bundle/chunks/close-many-ZFDIG6M7.js +0 -27
- package/dist/cli-bundle/chunks/comments-MFSYVNNU.js +0 -21
- package/dist/cli-bundle/chunks/comments-XUBPXDYX.js +0 -17
- package/dist/cli-bundle/chunks/config-D7XQMONX.js +0 -18
- package/dist/cli-bundle/chunks/config-T4FHBSYN.js +0 -22
- package/dist/cli-bundle/chunks/context-DIU275XI.js +0 -48
- package/dist/cli-bundle/chunks/context-JCOYB4LZ.js +0 -44
- package/dist/cli-bundle/chunks/contracts-BVO7CSLK.js +0 -12
- package/dist/cli-bundle/chunks/copy-NAGLGMHZ.js +0 -13
- package/dist/cli-bundle/chunks/create-4V7SWNBB.js +0 -30
- package/dist/cli-bundle/chunks/delete-NQI5OSKN.js +0 -14
- package/dist/cli-bundle/chunks/deps-T7SCWXEX.js +0 -17
- package/dist/cli-bundle/chunks/docs-WL2IWGWV.js +0 -18
- package/dist/cli-bundle/chunks/eval-NF2J5SHR.js +0 -23
- package/dist/cli-bundle/chunks/eval-SKDT3MZU.js +0 -27
- package/dist/cli-bundle/chunks/extension-LAXKCAYE.js +0 -42
- package/dist/cli-bundle/chunks/extension-ZISPBRBC.js +0 -38
- package/dist/cli-bundle/chunks/files-EWRQHGIS.js +0 -22
- package/dist/cli-bundle/chunks/focus-4T7TM4MT.js +0 -18
- package/dist/cli-bundle/chunks/focus-L3YUASOD.js +0 -14
- package/dist/cli-bundle/chunks/gc-2PCTYYRI.js +0 -12
- package/dist/cli-bundle/chunks/get-7DMITJ3G.js +0 -23
- package/dist/cli-bundle/chunks/get-VKQXCXLL.js +0 -19
- package/dist/cli-bundle/chunks/health-CVSTAR2F.js +0 -31
- package/dist/cli-bundle/chunks/health-TV3GKTFN.js +0 -35
- package/dist/cli-bundle/chunks/history-D4JUX5XV.js +0 -20
- package/dist/cli-bundle/chunks/history-D4JUX5XV.js.map +0 -7
- package/dist/cli-bundle/chunks/history-LQ2UWZTE.js +0 -24
- package/dist/cli-bundle/chunks/history-LQ2UWZTE.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js +0 -25
- package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js +0 -21
- package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js +0 -23
- package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js.map +0 -1
- package/dist/cli-bundle/chunks/init-C3LJPWQZ.js +0 -30
- package/dist/cli-bundle/chunks/init-C3LJPWQZ.js.map +0 -1
- package/dist/cli-bundle/chunks/init-J3DPGWQI.js +0 -26
- package/dist/cli-bundle/chunks/init-J3DPGWQI.js.map +0 -7
- package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js +0 -21
- package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js.map +0 -1
- package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js +0 -17
- package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js.map +0 -7
- package/dist/cli-bundle/chunks/list-O5NZVSPN.js +0 -36
- package/dist/cli-bundle/chunks/list-O5NZVSPN.js.map +0 -1
- package/dist/cli-bundle/chunks/list-Z55YCNTC.js +0 -32
- package/dist/cli-bundle/chunks/list-Z55YCNTC.js.map +0 -7
- package/dist/cli-bundle/chunks/next-GBNTGXFC.js +0 -28
- package/dist/cli-bundle/chunks/next-GBNTGXFC.js.map +0 -7
- package/dist/cli-bundle/chunks/next-QKW7PTKE.js +0 -32
- package/dist/cli-bundle/chunks/next-QKW7PTKE.js.map +0 -1
- package/dist/cli-bundle/chunks/notes-R5FZTKWF.js +0 -17
- package/dist/cli-bundle/chunks/notes-R5FZTKWF.js.map +0 -7
- package/dist/cli-bundle/chunks/notes-WCGIULVG.js +0 -21
- package/dist/cli-bundle/chunks/notes-WCGIULVG.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-ADISFYH4.js +0 -29
- package/dist/cli-bundle/chunks/plan-ADISFYH4.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-CHVE7PBR.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-LD23PSI6.js.map +0 -7
- package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-B42JCCOI.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-OEYQHFXO.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js +0 -19
- package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js +0 -23
- package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-5RQHAPMA.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-PNEIBBLW.js +0 -19
- package/dist/cli-bundle/chunks/restore-PNEIBBLW.js.map +0 -7
- package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js +0 -29
- package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js.map +0 -1
- package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js +0 -25
- package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js.map +0 -7
- package/dist/cli-bundle/chunks/schema-245WW4G2.js.map +0 -1
- package/dist/cli-bundle/chunks/schema-HBORFC6B.js.map +0 -7
- package/dist/cli-bundle/chunks/search-AOZC5SIK.js +0 -34
- package/dist/cli-bundle/chunks/search-AOZC5SIK.js.map +0 -7
- package/dist/cli-bundle/chunks/search-DRXPGHD7.js +0 -38
- package/dist/cli-bundle/chunks/search-DRXPGHD7.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-NJG4NLHG.js +0 -21
- package/dist/cli-bundle/chunks/stats-NJG4NLHG.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-RG6AG4N2.js +0 -17
- package/dist/cli-bundle/chunks/stats-RG6AG4N2.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js +0 -14
- package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js +0 -18
- package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js.map +0 -1
- package/dist/cli-bundle/chunks/test-6CMOCWUC.js +0 -39
- package/dist/cli-bundle/chunks/test-6CMOCWUC.js.map +0 -7
- package/dist/cli-bundle/chunks/test-RI7XHBZL.js +0 -43
- package/dist/cli-bundle/chunks/test-RI7XHBZL.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js +0 -29
- package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-QEIORFYW.js +0 -33
- package/dist/cli-bundle/chunks/test-all-QEIORFYW.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js +0 -28
- package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js +0 -24
- package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js.map +0 -7
- package/dist/cli-bundle/chunks/update-QVJDFEAP.js +0 -30
- package/dist/cli-bundle/chunks/update-QVJDFEAP.js.map +0 -1
- package/dist/cli-bundle/chunks/update-VQVHAY6X.js +0 -26
- package/dist/cli-bundle/chunks/update-VQVHAY6X.js.map +0 -7
- package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js +0 -37
- package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js.map +0 -7
- package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js +0 -41
- package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js.map +0 -1
- package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js +0 -24
- package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js +0 -28
- package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-4NTXSB62.js +0 -36
- package/dist/cli-bundle/chunks/validate-4NTXSB62.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-MUFXQZMI.js +0 -32
- package/dist/cli-bundle/chunks/validate-MUFXQZMI.js.map +0 -7
- /package/dist/cli-bundle/chunks/{activity-WJCGCYPU.js.map → append-CDPAYYSB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-Z6QUAUSG.js.map → append-RSPHC423.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-24YG75HI.js.map → chunk-3FUXM574.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js.map → chunk-3SHDAKMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js.map → chunk-3V5C7PUH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js.map → chunk-4I7KS5ES.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js.map → chunk-5STY7NVM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js.map → chunk-5VAZHYVQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js.map → chunk-6RR4XM5H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js.map → chunk-7QKSLAHB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js.map → chunk-7UCBLJDF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js.map → chunk-BFNFTHWQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js.map → chunk-C3YU3TXX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js.map → chunk-CGDUIPJL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XG625QP4.js.map → chunk-EP2CKDS7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js.map → chunk-J6AD3GWC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js.map → chunk-KFL3XHMA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js.map → chunk-PCBZ2VJD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js.map → chunk-Q3CFSOQZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js.map → chunk-TU5P744I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js.map → chunk-UEATYUZW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js.map → chunk-UFNFHCAC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js.map → chunk-Z2JQH2MG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js.map → chunk-ZMOPZFVT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-VQ2DHU3S.js.map → close-E3RLZSP2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-BDM6EIAR.js.map → close-K6BFI3OX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-BGML6VLD.js.map → close-many-6NBL3PM4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-RKJYPU74.js.map → close-many-X4YKS3RO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-XP5AWZ5H.js.map → comments-PLFK5ZKK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-RFS7BROJ.js.map → comments-ZNOD5PTV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-GEANHQ2J.js.map → copy-F7BUFY4J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js.map → copy-VH3L4MN2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-ZFDIG6M7.js.map → create-AMBMYP6F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-CMZW7ITN.js.map → create-TRIBYORN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-XUBPXDYX.js.map → delete-6KQHZYIP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-MFSYVNNU.js.map → delete-ZNXUNCZR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-D7XQMONX.js.map → deps-CVDY7FFK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-T4FHBSYN.js.map → deps-SZXQHV73.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-DIU275XI.js.map → docs-DR74ITCD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-JCOYB4LZ.js.map → docs-WCVYY6I7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-BVO7CSLK.js.map → files-H5YCA74Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js.map → files-QEFQ2M3H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-32ROBIDL.js.map → focus-55TRYSNA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-NAGLGMHZ.js.map → focus-N2QGNS5D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-4V7SWNBB.js.map → history-compact-GWQ4UOEI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-E77SDCUP.js.map → history-compact-JJZ4EFL3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-NQI5OSKN.js.map → history-redact-4GJOLXCM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js.map → history-redact-TPPUT3A5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-T7SCWXEX.js.map → history-repair-HVCVCGUF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-32SU7HO5.js.map → history-repair-J7PIZ6ZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js.map → learnings-KB6BT4NR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-WL2IWGWV.js.map → learnings-YYY3U2Y7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-NF2J5SHR.js.map → notes-BGG7VL72.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-SKDT3MZU.js.map → notes-ZTHXVOKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-LAXKCAYE.js.map → plan-CJPKFRBK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-ZISPBRBC.js.map → plan-MK2QY3GA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-PYKR2UUG.js.map → profile-AQNHXOYA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-EWRQHGIS.js.map → profile-HTBFINKQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-4T7TM4MT.js.map → restore-BTBEZ5CK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-L3YUASOD.js.map → restore-EX4UUZL6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-2PCTYYRI.js.map → schema-DGSTYYQB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js.map → schema-HAIBEE24.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-7DMITJ3G.js.map → update-MP4XLU56.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-VKQXCXLL.js.map → update-SDIRJGSY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-CVSTAR2F.js.map → update-many-34AIU6W7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-TV3GKTFN.js.map → update-many-JUPCNOKV.js.map} +0 -0
|
@@ -1,398 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
runLockGc
|
|
3
|
-
} from "./chunk-QZ342C63.js";
|
|
4
|
-
import {
|
|
5
|
-
nowIso
|
|
6
|
-
} from "./chunk-FLZSGSQR.js";
|
|
7
|
-
import {
|
|
8
|
-
PmCliError,
|
|
9
|
-
readSettings,
|
|
10
|
-
runActiveOnIndexHooks,
|
|
11
|
-
runActiveOnReadHooks,
|
|
12
|
-
runActiveOnWriteHooks
|
|
13
|
-
} from "./chunk-SHQY2IDC.js";
|
|
14
|
-
import {
|
|
15
|
-
EXIT_CODE,
|
|
16
|
-
getSettingsPath,
|
|
17
|
-
pathExists,
|
|
18
|
-
resolvePmRoot
|
|
19
|
-
} from "./chunk-LK6XLOGP.js";
|
|
20
|
-
|
|
21
|
-
// dist/cli/commands/gc.js
|
|
22
|
-
import fs2 from "node:fs/promises";
|
|
23
|
-
import path2 from "node:path";
|
|
24
|
-
|
|
25
|
-
// dist/core/checkpoint/checkpoint-gc.js
|
|
26
|
-
import fs from "node:fs/promises";
|
|
27
|
-
import path from "node:path";
|
|
28
|
-
!(function() {
|
|
29
|
-
try {
|
|
30
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
31
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "83dc8421-d6b4-5ef6-ac77-bfca9e10ffb1");
|
|
32
|
-
} catch (e2) {
|
|
33
|
-
}
|
|
34
|
-
})();
|
|
35
|
-
var MILLISECONDS_PER_DAY = 864e5;
|
|
36
|
-
function isErrno(error, code) {
|
|
37
|
-
return typeof error === "object" && error !== null && "code" in error && error.code === code;
|
|
38
|
-
}
|
|
39
|
-
function readCheckpointCreatedAt(raw) {
|
|
40
|
-
let parsed;
|
|
41
|
-
try {
|
|
42
|
-
parsed = JSON.parse(raw);
|
|
43
|
-
} catch {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
const createdAt = parsed.created_at;
|
|
50
|
-
return typeof createdAt === "string" ? createdAt : null;
|
|
51
|
-
}
|
|
52
|
-
async function collectCheckpointFiles(checkpointsDir, warnings) {
|
|
53
|
-
let dirEntries;
|
|
54
|
-
try {
|
|
55
|
-
dirEntries = await fs.readdir(checkpointsDir, { withFileTypes: true });
|
|
56
|
-
} catch (error) {
|
|
57
|
-
if (isErrno(error, "ENOENT")) {
|
|
58
|
-
return [];
|
|
59
|
-
}
|
|
60
|
-
throw error;
|
|
61
|
-
}
|
|
62
|
-
const files = [];
|
|
63
|
-
for (const entry of dirEntries) {
|
|
64
|
-
if (entry.isDirectory()) {
|
|
65
|
-
const subdir = path.join(checkpointsDir, entry.name);
|
|
66
|
-
let nested;
|
|
67
|
-
try {
|
|
68
|
-
nested = await fs.readdir(subdir);
|
|
69
|
-
} catch (error) {
|
|
70
|
-
if (!isErrno(error, "ENOENT")) {
|
|
71
|
-
warnings.push(`checkpoint_subdir_unreadable:${entry.name}`);
|
|
72
|
-
}
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
for (const file of nested) {
|
|
76
|
-
if (file.endsWith(".json")) {
|
|
77
|
-
files.push(`${entry.name}/${file}`);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
} else if (entry.name.endsWith(".json")) {
|
|
81
|
-
files.push(entry.name);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return files.sort();
|
|
85
|
-
}
|
|
86
|
-
async function runCheckpointGc(pmRoot, options) {
|
|
87
|
-
const { dryRun, hooks } = options;
|
|
88
|
-
const nowMs = options.now ?? Date.now();
|
|
89
|
-
const retentionMs = Math.max(0, options.retentionDays) * MILLISECONDS_PER_DAY;
|
|
90
|
-
const checkpointsDir = path.join(pmRoot, "checkpoints");
|
|
91
|
-
const result = {
|
|
92
|
-
scanned: 0,
|
|
93
|
-
removed: [],
|
|
94
|
-
retained: [],
|
|
95
|
-
warnings: [],
|
|
96
|
-
entries: []
|
|
97
|
-
};
|
|
98
|
-
const files = await collectCheckpointFiles(checkpointsDir, result.warnings);
|
|
99
|
-
for (const relName of files) {
|
|
100
|
-
const absPath = path.join(checkpointsDir, relName);
|
|
101
|
-
const relPath = `checkpoints/${relName}`;
|
|
102
|
-
result.scanned += 1;
|
|
103
|
-
if (hooks?.onRead) {
|
|
104
|
-
result.warnings.push(...await hooks.onRead(absPath));
|
|
105
|
-
}
|
|
106
|
-
let raw;
|
|
107
|
-
try {
|
|
108
|
-
raw = await fs.readFile(absPath, "utf8");
|
|
109
|
-
} catch (readError) {
|
|
110
|
-
if (isErrno(readError, "ENOENT")) {
|
|
111
|
-
result.scanned -= 1;
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
result.warnings.push(`checkpoint_unreadable:${relName}`);
|
|
115
|
-
result.retained.push(relPath);
|
|
116
|
-
result.entries.push({ file: relPath, created_at: null, age_seconds: null, stale: false, reason: "unparseable" });
|
|
117
|
-
continue;
|
|
118
|
-
}
|
|
119
|
-
const createdAt = readCheckpointCreatedAt(raw);
|
|
120
|
-
const createdAtMs = createdAt === null ? Number.NaN : Date.parse(createdAt);
|
|
121
|
-
if (!Number.isFinite(createdAtMs)) {
|
|
122
|
-
result.warnings.push(`checkpoint_unparseable:${relName}`);
|
|
123
|
-
result.retained.push(relPath);
|
|
124
|
-
result.entries.push({
|
|
125
|
-
file: relPath,
|
|
126
|
-
created_at: createdAt,
|
|
127
|
-
age_seconds: null,
|
|
128
|
-
stale: false,
|
|
129
|
-
reason: "unparseable"
|
|
130
|
-
});
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
const ageMs = nowMs - createdAtMs;
|
|
134
|
-
const entry = {
|
|
135
|
-
file: relPath,
|
|
136
|
-
created_at: createdAt,
|
|
137
|
-
age_seconds: Math.floor(ageMs / 1e3),
|
|
138
|
-
stale: ageMs > retentionMs,
|
|
139
|
-
reason: ageMs > retentionMs ? "expired" : "active"
|
|
140
|
-
};
|
|
141
|
-
if (!entry.stale) {
|
|
142
|
-
result.retained.push(relPath);
|
|
143
|
-
result.entries.push(entry);
|
|
144
|
-
continue;
|
|
145
|
-
}
|
|
146
|
-
if (!dryRun) {
|
|
147
|
-
try {
|
|
148
|
-
await fs.unlink(absPath);
|
|
149
|
-
} catch (unlinkError) {
|
|
150
|
-
if (!isErrno(unlinkError, "ENOENT")) {
|
|
151
|
-
result.warnings.push(`checkpoint_remove_failed:${relName}`);
|
|
152
|
-
result.retained.push(relPath);
|
|
153
|
-
result.entries.push(entry);
|
|
154
|
-
continue;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
if (hooks?.onWrite) {
|
|
158
|
-
result.warnings.push(...await hooks.onWrite(absPath));
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
result.removed.push(relPath);
|
|
162
|
-
result.entries.push(entry);
|
|
163
|
-
}
|
|
164
|
-
return result;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// dist/cli/commands/gc.js
|
|
168
|
-
!(function() {
|
|
169
|
-
try {
|
|
170
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
171
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "15ee0289-1af7-5b11-b023-f19cfc3363fc");
|
|
172
|
-
} catch (e2) {
|
|
173
|
-
}
|
|
174
|
-
})();
|
|
175
|
-
var GC_SCOPE_VALUES = ["index", "embeddings", "runtime", "locks", "checkpoints"];
|
|
176
|
-
var GC_TARGETS = [
|
|
177
|
-
{
|
|
178
|
-
scope: "index",
|
|
179
|
-
relativePath: "index/manifest.json",
|
|
180
|
-
kind: "file"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
scope: "embeddings",
|
|
184
|
-
relativePath: "search/embeddings.jsonl",
|
|
185
|
-
kind: "file"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
scope: "embeddings",
|
|
189
|
-
relativePath: "search/vectorization-status.json",
|
|
190
|
-
kind: "file"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
scope: "embeddings",
|
|
194
|
-
relativePath: "search/lancedb",
|
|
195
|
-
kind: "directory"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
// Removing embeddings invalidates the whole semantic index, so the queued
|
|
199
|
-
// background-refresh work is also meaningless: a worker draining a stale
|
|
200
|
-
// queue against an empty ledger would rebuild a partial, inconsistent index
|
|
201
|
-
// (only the queued items vectorized). Clear the queue and its gate so the
|
|
202
|
-
// next mutation re-seeds from a clean slate. See core/search/background-refresh.ts.
|
|
203
|
-
scope: "embeddings",
|
|
204
|
-
relativePath: "search/pending-refresh.json",
|
|
205
|
-
kind: "file"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
scope: "embeddings",
|
|
209
|
-
relativePath: "search/pending-refresh.gate.lock",
|
|
210
|
-
kind: "directory"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
scope: "runtime",
|
|
214
|
-
relativePath: "runtime/test-runs",
|
|
215
|
-
kind: "directory"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
scope: "runtime",
|
|
219
|
-
relativePath: "runtime/history-drift-cache.json",
|
|
220
|
-
kind: "file"
|
|
221
|
-
}
|
|
222
|
-
];
|
|
223
|
-
function isErrno2(error, code) {
|
|
224
|
-
return typeof error === "object" && error !== null && "code" in error && error.code === code;
|
|
225
|
-
}
|
|
226
|
-
async function removeCacheFile(pmRoot, target, dryRun) {
|
|
227
|
-
const relativePath = target.relativePath;
|
|
228
|
-
const absolutePath = path2.join(pmRoot, relativePath);
|
|
229
|
-
const warnings = await runActiveOnReadHooks({
|
|
230
|
-
path: absolutePath,
|
|
231
|
-
scope: "project"
|
|
232
|
-
});
|
|
233
|
-
try {
|
|
234
|
-
const stats = await fs2.stat(absolutePath);
|
|
235
|
-
if (target.kind === "file" && !stats.isFile()) {
|
|
236
|
-
return {
|
|
237
|
-
removed: false,
|
|
238
|
-
warnings: [...warnings, `not_a_file:${relativePath}`]
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
if (target.kind === "directory" && !stats.isDirectory()) {
|
|
242
|
-
return {
|
|
243
|
-
removed: false,
|
|
244
|
-
warnings: [...warnings, `not_a_directory:${relativePath}`]
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
if (dryRun) {
|
|
248
|
-
return {
|
|
249
|
-
removed: true,
|
|
250
|
-
warnings
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
if (target.kind === "file") {
|
|
254
|
-
await fs2.unlink(absolutePath);
|
|
255
|
-
} else {
|
|
256
|
-
await fs2.rm(absolutePath, { recursive: true, force: true });
|
|
257
|
-
}
|
|
258
|
-
const writeWarnings = await runActiveOnWriteHooks({
|
|
259
|
-
path: absolutePath,
|
|
260
|
-
scope: "project",
|
|
261
|
-
op: "gc:remove"
|
|
262
|
-
});
|
|
263
|
-
return {
|
|
264
|
-
removed: true,
|
|
265
|
-
warnings: [...warnings, ...writeWarnings]
|
|
266
|
-
};
|
|
267
|
-
} catch (error) {
|
|
268
|
-
if (isErrno2(error, "ENOENT")) {
|
|
269
|
-
return {
|
|
270
|
-
removed: false,
|
|
271
|
-
warnings
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
throw error;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
function parseScopes(raw) {
|
|
278
|
-
if (!raw || raw.length === 0) {
|
|
279
|
-
return [...GC_SCOPE_VALUES];
|
|
280
|
-
}
|
|
281
|
-
const tokens = raw.flatMap((entry) => entry.split(",")).map((entry) => entry.trim().toLowerCase()).filter((entry) => entry.length > 0);
|
|
282
|
-
if (tokens.length === 0) {
|
|
283
|
-
throw new PmCliError(`--scope requires at least one value (${GC_SCOPE_VALUES.join(",")})`, EXIT_CODE.USAGE);
|
|
284
|
-
}
|
|
285
|
-
const resolved = /* @__PURE__ */ new Set();
|
|
286
|
-
for (const token of tokens) {
|
|
287
|
-
if (!GC_SCOPE_VALUES.includes(token)) {
|
|
288
|
-
throw new PmCliError(`Invalid --scope value "${token}". Expected one or more of: ${GC_SCOPE_VALUES.join(", ")}`, EXIT_CODE.USAGE);
|
|
289
|
-
}
|
|
290
|
-
resolved.add(token);
|
|
291
|
-
}
|
|
292
|
-
return GC_SCOPE_VALUES.filter((scope) => resolved.has(scope));
|
|
293
|
-
}
|
|
294
|
-
function buildGcGuidance(params) {
|
|
295
|
-
const guidance = [];
|
|
296
|
-
if (params.dryRun) {
|
|
297
|
-
guidance.push("Dry-run preview only: no cache artifacts were deleted.");
|
|
298
|
-
}
|
|
299
|
-
const searchScopeSelected = params.scopes.includes("index") || params.scopes.includes("embeddings");
|
|
300
|
-
const searchArtifactsAffected = params.removed.some((entry) => entry === "index/manifest.json" || entry === "search/embeddings.jsonl" || entry === "search/vectorization-status.json" || entry === "search/lancedb" || entry === "search/pending-refresh.json" || entry === "search/pending-refresh.gate.lock");
|
|
301
|
-
if (searchScopeSelected && searchArtifactsAffected) {
|
|
302
|
-
guidance.push('Search artifacts were removed; the semantic index (including any queued background refresh) is invalidated. Run "pm install search-advanced --project" if reindex is unavailable, then "pm reindex --mode keyword" (and "--mode semantic" when semantic search is enabled) before search-heavy workflows.');
|
|
303
|
-
}
|
|
304
|
-
if (params.removed.includes("runtime/history-drift-cache.json")) {
|
|
305
|
-
guidance.push('History drift cache was removed; the next "pm health" run performs a full history-drift re-scan.');
|
|
306
|
-
}
|
|
307
|
-
if (!params.dryRun && params.removed.some((entry) => entry.startsWith("checkpoints/"))) {
|
|
308
|
-
guidance.push('Aged rollback checkpoints were removed; their "pm update-many"/"pm close-many --rollback" windows are no longer recoverable.');
|
|
309
|
-
}
|
|
310
|
-
return guidance;
|
|
311
|
-
}
|
|
312
|
-
async function runGc(global2, options = {}) {
|
|
313
|
-
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
314
|
-
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
315
|
-
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
316
|
-
}
|
|
317
|
-
const settings = await readSettings(pmRoot);
|
|
318
|
-
const dryRun = options.dryRun === true;
|
|
319
|
-
const scopes = parseScopes(options.scope);
|
|
320
|
-
const selectedTargets = GC_TARGETS.filter((target) => scopes.includes(target.scope));
|
|
321
|
-
const removed = [];
|
|
322
|
-
const retained = [];
|
|
323
|
-
const warnings = [];
|
|
324
|
-
for (const target of selectedTargets) {
|
|
325
|
-
const result = await removeCacheFile(pmRoot, target, dryRun);
|
|
326
|
-
if (result.removed) {
|
|
327
|
-
removed.push(target.relativePath);
|
|
328
|
-
} else {
|
|
329
|
-
retained.push(target.relativePath);
|
|
330
|
-
}
|
|
331
|
-
warnings.push(...result.warnings);
|
|
332
|
-
}
|
|
333
|
-
let locksSummary;
|
|
334
|
-
if (scopes.includes("locks")) {
|
|
335
|
-
const lockResult = await runLockGc(pmRoot, {
|
|
336
|
-
dryRun,
|
|
337
|
-
hooks: {
|
|
338
|
-
onRead: (lockPath) => runActiveOnReadHooks({ path: lockPath, scope: "project" }),
|
|
339
|
-
onWrite: (lockPath) => runActiveOnWriteHooks({ path: lockPath, scope: "project", op: "gc:lock_remove" })
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
removed.push(...lockResult.removed);
|
|
343
|
-
retained.push(...lockResult.retained);
|
|
344
|
-
warnings.push(...lockResult.warnings);
|
|
345
|
-
locksSummary = {
|
|
346
|
-
scanned: lockResult.scanned,
|
|
347
|
-
removed: lockResult.removed.length,
|
|
348
|
-
retained: lockResult.retained.length
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
let checkpointsSummary;
|
|
352
|
-
if (scopes.includes("checkpoints")) {
|
|
353
|
-
const retentionDays = settings.checkpoints.retention_days;
|
|
354
|
-
const checkpointResult = await runCheckpointGc(pmRoot, {
|
|
355
|
-
dryRun,
|
|
356
|
-
retentionDays,
|
|
357
|
-
hooks: {
|
|
358
|
-
onRead: (checkpointPath) => runActiveOnReadHooks({ path: checkpointPath, scope: "project" }),
|
|
359
|
-
onWrite: (checkpointPath) => runActiveOnWriteHooks({ path: checkpointPath, scope: "project", op: "gc:checkpoint_remove" })
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
removed.push(...checkpointResult.removed);
|
|
363
|
-
retained.push(...checkpointResult.retained);
|
|
364
|
-
warnings.push(...checkpointResult.warnings);
|
|
365
|
-
checkpointsSummary = {
|
|
366
|
-
scanned: checkpointResult.scanned,
|
|
367
|
-
removed: checkpointResult.removed.length,
|
|
368
|
-
retained: checkpointResult.retained.length,
|
|
369
|
-
retention_days: retentionDays
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
warnings.push(...await runActiveOnIndexHooks({
|
|
373
|
-
mode: dryRun ? "gc:dry-run" : "gc",
|
|
374
|
-
total_items: selectedTargets.length
|
|
375
|
-
}));
|
|
376
|
-
const guidance = buildGcGuidance({
|
|
377
|
-
dryRun,
|
|
378
|
-
scopes,
|
|
379
|
-
removed
|
|
380
|
-
});
|
|
381
|
-
return {
|
|
382
|
-
ok: warnings.length === 0,
|
|
383
|
-
dry_run: dryRun,
|
|
384
|
-
scope: scopes,
|
|
385
|
-
removed,
|
|
386
|
-
retained,
|
|
387
|
-
warnings,
|
|
388
|
-
...locksSummary ? { locks: locksSummary } : {},
|
|
389
|
-
...checkpointsSummary ? { checkpoints: checkpointsSummary } : {},
|
|
390
|
-
guidance,
|
|
391
|
-
generated_at: nowIso()
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
export {
|
|
396
|
-
runGc
|
|
397
|
-
};
|
|
398
|
-
//# sourceMappingURL=chunk-QX6HM775.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../../cli/commands/gc.ts", "../../../../../../../../core/checkpoint/checkpoint-gc.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module cli/commands/gc\n *\n * Implements the pm gc command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { runCheckpointGc } from \"../../core/checkpoint/checkpoint-gc.js\";\nimport { runActiveOnIndexHooks, runActiveOnReadHooks, runActiveOnWriteHooks } from \"../../core/extensions/index.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { runLockGc } from \"../../core/lock/lock-gc.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\n\nconst GC_SCOPE_VALUES = [\"index\", \"embeddings\", \"runtime\", \"locks\", \"checkpoints\"] as const;\ntype GcScope = (typeof GC_SCOPE_VALUES)[number];\n\ninterface GcTarget {\n scope: GcScope;\n relativePath: string;\n kind: \"file\" | \"directory\";\n}\n\nconst GC_TARGETS: readonly GcTarget[] = [\n {\n scope: \"index\",\n relativePath: \"index/manifest.json\",\n kind: \"file\",\n },\n {\n scope: \"embeddings\",\n relativePath: \"search/embeddings.jsonl\",\n kind: \"file\",\n },\n {\n scope: \"embeddings\",\n relativePath: \"search/vectorization-status.json\",\n kind: \"file\",\n },\n {\n scope: \"embeddings\",\n relativePath: \"search/lancedb\",\n kind: \"directory\",\n },\n {\n // Removing embeddings invalidates the whole semantic index, so the queued\n // background-refresh work is also meaningless: a worker draining a stale\n // queue against an empty ledger would rebuild a partial, inconsistent index\n // (only the queued items vectorized). Clear the queue and its gate so the\n // next mutation re-seeds from a clean slate. See core/search/background-refresh.ts.\n scope: \"embeddings\",\n relativePath: \"search/pending-refresh.json\",\n kind: \"file\",\n },\n {\n scope: \"embeddings\",\n relativePath: \"search/pending-refresh.gate.lock\",\n kind: \"directory\",\n },\n {\n scope: \"runtime\",\n relativePath: \"runtime/test-runs\",\n kind: \"directory\",\n },\n {\n scope: \"runtime\",\n relativePath: \"runtime/history-drift-cache.json\",\n kind: \"file\",\n },\n] as const;\n\n/**\n * Documents the gc command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface GcCommandOptions {\n dryRun?: boolean;\n scope?: string[];\n}\n\n/**\n * Documents the gc locks summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface GcLocksSummary {\n scanned: number;\n removed: number;\n retained: number;\n}\n\n/**\n * Documents the gc checkpoints summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface GcCheckpointsSummary {\n scanned: number;\n removed: number;\n retained: number;\n retention_days: number;\n}\n\n/**\n * Documents the gc result payload exchanged by command, SDK, and package integrations.\n */\nexport interface GcResult {\n ok: boolean;\n dry_run: boolean;\n scope: GcScope[];\n removed: string[];\n retained: string[];\n warnings: string[];\n guidance: string[];\n /** Present only when the locks scope was selected. Summarizes the stale-lock sweep. */\n locks?: GcLocksSummary;\n /** Present only when the checkpoints scope was selected. Summarizes the rollback-checkpoint sweep. */\n checkpoints?: GcCheckpointsSummary;\n generated_at: string;\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\nasync function removeCacheFile(\n pmRoot: string,\n target: GcTarget,\n dryRun: boolean,\n): Promise<{ removed: boolean; warnings: string[] }> {\n const relativePath = target.relativePath;\n const absolutePath = path.join(pmRoot, relativePath);\n const warnings = await runActiveOnReadHooks({\n path: absolutePath,\n scope: \"project\",\n });\n try {\n const stats = await fs.stat(absolutePath);\n if (target.kind === \"file\" && !stats.isFile()) {\n return {\n removed: false,\n warnings: [...warnings, `not_a_file:${relativePath}`],\n };\n }\n if (target.kind === \"directory\" && !stats.isDirectory()) {\n return {\n removed: false,\n warnings: [...warnings, `not_a_directory:${relativePath}`],\n };\n }\n if (dryRun) {\n return {\n removed: true,\n warnings,\n };\n }\n if (target.kind === \"file\") {\n await fs.unlink(absolutePath);\n } else {\n await fs.rm(absolutePath, { recursive: true, force: true });\n }\n const writeWarnings = await runActiveOnWriteHooks({\n path: absolutePath,\n scope: \"project\",\n op: \"gc:remove\",\n });\n return {\n removed: true,\n warnings: [...warnings, ...writeWarnings],\n };\n } catch (error: unknown) {\n if (isErrno(error, \"ENOENT\")) {\n return {\n removed: false,\n warnings,\n };\n }\n throw error;\n }\n}\n\nfunction parseScopes(raw: string[] | undefined): GcScope[] {\n if (!raw || raw.length === 0) {\n return [...GC_SCOPE_VALUES];\n }\n const tokens = raw\n .flatMap((entry) => entry.split(\",\"))\n .map((entry) => entry.trim().toLowerCase())\n .filter((entry) => entry.length > 0);\n if (tokens.length === 0) {\n throw new PmCliError(`--scope requires at least one value (${GC_SCOPE_VALUES.join(\",\")})`, EXIT_CODE.USAGE);\n }\n const resolved = new Set<GcScope>();\n for (const token of tokens) {\n if (!(GC_SCOPE_VALUES as readonly string[]).includes(token)) {\n throw new PmCliError(\n `Invalid --scope value \"${token}\". Expected one or more of: ${GC_SCOPE_VALUES.join(\", \")}`,\n EXIT_CODE.USAGE,\n );\n }\n resolved.add(token as GcScope);\n }\n return GC_SCOPE_VALUES.filter((scope) => resolved.has(scope));\n}\n\nfunction buildGcGuidance(params: {\n dryRun: boolean;\n scopes: GcScope[];\n removed: string[];\n}): string[] {\n const guidance: string[] = [];\n if (params.dryRun) {\n guidance.push(\"Dry-run preview only: no cache artifacts were deleted.\");\n }\n const searchScopeSelected = params.scopes.includes(\"index\") || params.scopes.includes(\"embeddings\");\n const searchArtifactsAffected = params.removed.some(\n (entry) =>\n entry === \"index/manifest.json\" ||\n entry === \"search/embeddings.jsonl\" ||\n entry === \"search/vectorization-status.json\" ||\n entry === \"search/lancedb\" ||\n entry === \"search/pending-refresh.json\" ||\n entry === \"search/pending-refresh.gate.lock\",\n );\n if (searchScopeSelected && searchArtifactsAffected) {\n guidance.push(\n 'Search artifacts were removed; the semantic index (including any queued background refresh) is invalidated. Run \"pm install search-advanced --project\" if reindex is unavailable, then \"pm reindex --mode keyword\" (and \"--mode semantic\" when semantic search is enabled) before search-heavy workflows.',\n );\n }\n if (params.removed.includes(\"runtime/history-drift-cache.json\")) {\n guidance.push('History drift cache was removed; the next \"pm health\" run performs a full history-drift re-scan.');\n }\n if (!params.dryRun && params.removed.some((entry) => entry.startsWith(\"checkpoints/\"))) {\n guidance.push(\n 'Aged rollback checkpoints were removed; their \"pm update-many\"/\"pm close-many --rollback\" windows are no longer recoverable.',\n );\n }\n return guidance;\n}\n\n/**\n * Implements run gc for the public runtime surface of this module.\n */\nexport async function runGc(global: GlobalOptions, options: GcCommandOptions = {}): Promise<GcResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const dryRun = options.dryRun === true;\n const scopes = parseScopes(options.scope);\n const selectedTargets = GC_TARGETS.filter((target) => scopes.includes(target.scope));\n\n const removed: string[] = [];\n const retained: string[] = [];\n const warnings: string[] = [];\n\n for (const target of selectedTargets) {\n const result = await removeCacheFile(pmRoot, target, dryRun);\n if (result.removed) {\n removed.push(target.relativePath);\n } else {\n retained.push(target.relativePath);\n }\n warnings.push(...result.warnings);\n }\n\n // The locks scope is not a path-based GC_TARGET: it sweeps the locks/ directory\n // and removes only locks whose own embedded ttl has expired (crashed-process\n // debris), retaining active and unparseable locks. See core/lock/lock-gc.ts.\n let locksSummary: GcLocksSummary | undefined;\n if (scopes.includes(\"locks\")) {\n const lockResult = await runLockGc(pmRoot, {\n dryRun,\n hooks: {\n onRead: (lockPath) => runActiveOnReadHooks({ path: lockPath, scope: \"project\" }),\n onWrite: (lockPath) => runActiveOnWriteHooks({ path: lockPath, scope: \"project\", op: \"gc:lock_remove\" }),\n },\n });\n removed.push(...lockResult.removed);\n retained.push(...lockResult.retained);\n warnings.push(...lockResult.warnings);\n locksSummary = {\n scanned: lockResult.scanned,\n removed: lockResult.removed.length,\n retained: lockResult.retained.length,\n };\n }\n\n // The checkpoints scope is also not a path-based GC_TARGET: it sweeps\n // checkpoints/ and removes only rollback checkpoints older than the configured\n // checkpoints.retention_days, retaining active and unparseable files. See\n // core/checkpoint/checkpoint-gc.ts.\n let checkpointsSummary: GcCheckpointsSummary | undefined;\n if (scopes.includes(\"checkpoints\")) {\n const retentionDays = settings.checkpoints.retention_days;\n const checkpointResult = await runCheckpointGc(pmRoot, {\n dryRun,\n retentionDays,\n hooks: {\n onRead: (checkpointPath) => runActiveOnReadHooks({ path: checkpointPath, scope: \"project\" }),\n onWrite: (checkpointPath) =>\n runActiveOnWriteHooks({ path: checkpointPath, scope: \"project\", op: \"gc:checkpoint_remove\" }),\n },\n });\n removed.push(...checkpointResult.removed);\n retained.push(...checkpointResult.retained);\n warnings.push(...checkpointResult.warnings);\n checkpointsSummary = {\n scanned: checkpointResult.scanned,\n removed: checkpointResult.removed.length,\n retained: checkpointResult.retained.length,\n retention_days: retentionDays,\n };\n }\n\n warnings.push(\n ...(await runActiveOnIndexHooks({\n mode: dryRun ? \"gc:dry-run\" : \"gc\",\n total_items: selectedTargets.length,\n })),\n );\n const guidance = buildGcGuidance({\n dryRun,\n scopes,\n removed,\n });\n\n return {\n ok: warnings.length === 0,\n dry_run: dryRun,\n scope: scopes,\n removed,\n retained,\n warnings,\n ...(locksSummary ? { locks: locksSummary } : {}),\n ...(checkpointsSummary ? { checkpoints: checkpointsSummary } : {}),\n guidance,\n generated_at: nowIso(),\n };\n}\n", "/**\n * @module core/checkpoint/checkpoint-gc\n *\n * Age-based garbage collector for bulk-mutation rollback checkpoints written by\n * `update-many`/`close-many` under `checkpoints/<subdir>/<id>.json`.\n *\n * Safety-first policy (mirroring the stale-lock sweep in `lock/lock-gc.ts`): a\n * checkpoint whose JSON cannot be read or whose `created_at` cannot be parsed is\n * RETAINED rather than deleted. We only prune checkpoints whose age can be\n * conclusively determined from their own `created_at` field and that exceed the\n * configured `checkpoints.retention_days` policy.\n *\n * Staleness formula: (now_ms - Date.parse(created_at)) > retention_days * 86_400_000.\n * A zero/negative age (a future `created_at`) is always treated as active.\n */\n\nimport type { Dirent } from \"node:fs\";\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\n\nconst MILLISECONDS_PER_DAY = 86_400_000;\n\n/**\n * Documents the checkpoint gc scan entry payload exchanged by command, SDK, and package integrations.\n */\nexport interface CheckpointGcEntry {\n /** Relative path like \"checkpoints/update-many/update-many-20260619-abc123.json\". */\n file: string;\n /** Parsed `created_at`, or null when missing/unparseable. */\n created_at: string | null;\n /** floor((now - created_at)/1000), null when unparseable. */\n age_seconds: number | null;\n /** True only when classified as expired (older than the retention window). */\n stale: boolean;\n reason: \"expired\" | \"active\" | \"unparseable\";\n}\n\n/**\n * Documents the checkpoint gc hooks payload exchanged by command, SDK, and package integrations.\n */\nexport interface CheckpointGcHooks {\n onRead?: (checkpointPath: string) => Promise<string[]> | string[];\n onWrite?: (checkpointPath: string) => Promise<string[]> | string[];\n}\n\n/**\n * Documents the checkpoint gc options payload exchanged by command, SDK, and package integrations.\n */\nexport interface CheckpointGcOptions {\n dryRun: boolean;\n /**\n * Prune checkpoints older than this many days. Negative values are clamped to\n * zero (prune everything aged); a non-finite value (NaN/Infinity) disables\n * pruning entirely so bad input never deletes recoverable checkpoints.\n */\n retentionDays: number;\n /** Epoch ms; defaults to Date.now() — injectable for deterministic tests. */\n now?: number;\n hooks?: CheckpointGcHooks;\n}\n\n/**\n * Documents the checkpoint gc result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CheckpointGcResult {\n /** Number of *.json checkpoint files examined. */\n scanned: number;\n /** Relative paths removed (or would-remove under dryRun), sorted by file name asc. */\n removed: string[];\n /** Relative paths retained (active OR unparseable — never delete what we can't reason about). */\n retained: string[];\n warnings: string[];\n /** One per scanned checkpoint file, sorted by file name asc. */\n entries: CheckpointGcEntry[];\n}\n\nfunction isErrno(error: unknown, code: string): boolean {\n return (\n typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code === code\n );\n}\n\n/** Extract a parseable `created_at` from a checkpoint's raw JSON, or null. */\nfunction readCheckpointCreatedAt(raw: string): string | null {\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw) as unknown;\n } catch {\n return null;\n }\n if (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) {\n return null;\n }\n const createdAt = (parsed as Record<string, unknown>).created_at;\n return typeof createdAt === \"string\" ? createdAt : null;\n}\n\n/**\n * Collect relative `checkpoints/<subdir>/<file>.json` (and top-level `<file>.json`)\n * paths under the checkpoints root. Subdirectory reads are resilient to\n * concurrent races: a subdir that vanishes between the parent `readdir` and its\n * own `readdir` (ENOENT) is skipped quietly, and any other read failure (e.g. a\n * permission error) is surfaced as a `checkpoint_subdir_unreadable:<name>`\n * warning rather than aborting the whole sweep.\n */\nasync function collectCheckpointFiles(checkpointsDir: string, warnings: string[]): Promise<string[]> {\n let dirEntries: Dirent[];\n try {\n dirEntries = await fs.readdir(checkpointsDir, { withFileTypes: true });\n } catch (error: unknown) {\n if (isErrno(error, \"ENOENT\")) {\n return [];\n }\n throw error;\n }\n const files: string[] = [];\n for (const entry of dirEntries) {\n if (entry.isDirectory()) {\n const subdir = path.join(checkpointsDir, entry.name);\n let nested: string[];\n try {\n nested = await fs.readdir(subdir);\n } catch (error: unknown) {\n if (!isErrno(error, \"ENOENT\")) {\n warnings.push(`checkpoint_subdir_unreadable:${entry.name}`);\n }\n continue;\n }\n for (const file of nested) {\n if (file.endsWith(\".json\")) {\n files.push(`${entry.name}/${file}`);\n }\n }\n } else if (entry.name.endsWith(\".json\")) {\n files.push(entry.name);\n }\n }\n return files.sort();\n}\n\n/**\n * Implements run checkpoint gc for the public runtime surface of this module.\n */\nexport async function runCheckpointGc(pmRoot: string, options: CheckpointGcOptions): Promise<CheckpointGcResult> {\n const { dryRun, hooks } = options;\n const nowMs = options.now ?? Date.now();\n const retentionMs = Math.max(0, options.retentionDays) * MILLISECONDS_PER_DAY;\n const checkpointsDir = path.join(pmRoot, \"checkpoints\");\n // A non-finite retentionMs (NaN/Infinity from a non-finite retentionDays)\n // makes every `ageMs > retentionMs` comparison false, so nothing is pruned —\n // pruning is disabled rather than risking deletion under bad input.\n\n const result: CheckpointGcResult = {\n scanned: 0,\n removed: [],\n retained: [],\n warnings: [],\n entries: [],\n };\n\n const files = await collectCheckpointFiles(checkpointsDir, result.warnings);\n for (const relName of files) {\n const absPath = path.join(checkpointsDir, relName);\n const relPath = `checkpoints/${relName}`;\n result.scanned += 1;\n\n if (hooks?.onRead) {\n result.warnings.push(...(await hooks.onRead(absPath)));\n }\n\n let raw: string;\n try {\n raw = await fs.readFile(absPath, \"utf8\");\n } catch (readError: unknown) {\n if (isErrno(readError, \"ENOENT\")) {\n // Disappeared between readdir and readFile — treat as a ghost; skip quietly.\n result.scanned -= 1;\n continue;\n }\n result.warnings.push(`checkpoint_unreadable:${relName}`);\n result.retained.push(relPath);\n result.entries.push({ file: relPath, created_at: null, age_seconds: null, stale: false, reason: \"unparseable\" });\n continue;\n }\n\n const createdAt = readCheckpointCreatedAt(raw);\n const createdAtMs = createdAt === null ? Number.NaN : Date.parse(createdAt);\n if (!Number.isFinite(createdAtMs)) {\n result.warnings.push(`checkpoint_unparseable:${relName}`);\n result.retained.push(relPath);\n result.entries.push({\n file: relPath,\n created_at: createdAt,\n age_seconds: null,\n stale: false,\n reason: \"unparseable\",\n });\n continue;\n }\n\n const ageMs = nowMs - createdAtMs;\n const entry: CheckpointGcEntry = {\n file: relPath,\n created_at: createdAt,\n age_seconds: Math.floor(ageMs / 1000),\n stale: ageMs > retentionMs,\n reason: ageMs > retentionMs ? \"expired\" : \"active\",\n };\n if (!entry.stale) {\n result.retained.push(relPath);\n result.entries.push(entry);\n continue;\n }\n\n if (!dryRun) {\n try {\n await fs.unlink(absPath);\n } catch (unlinkError: unknown) {\n if (!isErrno(unlinkError, \"ENOENT\")) {\n result.warnings.push(`checkpoint_remove_failed:${relName}`);\n result.retained.push(relPath);\n result.entries.push(entry);\n continue;\n }\n // ENOENT on unlink = already gone (race); treat as removed.\n }\n if (hooks?.onWrite) {\n result.warnings.push(...(await hooks.onWrite(absPath)));\n }\n }\n result.removed.push(relPath);\n result.entries.push(entry);\n }\n\n return result;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAKA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BAAsB,CAAE;;KAEjG;AACD,YAAQ,KAAK,GAAG,iBAAiB,OAAO;AACxC,aAAS,KAAK,GAAG,iBAAiB,QAAQ;AAC1C,aAAS,KAAK,GAAG,iBAAiB,QAAQ;AAC1C,yBAAqB;MACnB,SAAS,iBAAiB;MAC1B,SAAS,iBAAiB,QAAQ;MAClC,UAAU,iBAAiB,SAAS;MACpC,gBAAgB;;EAEpB;AAEA,WAAS,KACP,GAAI,MAAM,sBAAsB;IAC9B,MAAM,SAAS,eAAe;IAC9B,aAAa,gBAAgB;GAC9B,CAAE;AAEL,QAAM,WAAW,gBAAgB;IAC/B;IACA;IACA;GACD;AAED,SAAO;IACL,IAAI,SAAS,WAAW;IACxB,SAAS;IACT,OAAO;IACP;IACA;IACA;IACA,GAAI,eAAe,EAAE,OAAO,aAAY,IAAK,CAAA;IAC7C,GAAI,qBAAqB,EAAE,aAAa,mBAAkB,IAAK,CAAA;IAC/D;IACA,cAAc,OAAM;;AAExB;",
|
|
6
|
-
"names": ["fs", "path", "isErrno", "path", "fs", "global"]
|
|
7
|
-
}
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
// dist/core/lock/lock-gc.js
|
|
2
|
-
import fs from "node:fs/promises";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
!(function() {
|
|
5
|
-
try {
|
|
6
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
7
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e9910e08-e968-52b7-b6cb-01167fa89d4c");
|
|
8
|
-
} catch (e2) {
|
|
9
|
-
}
|
|
10
|
-
})();
|
|
11
|
-
function parseLock(raw) {
|
|
12
|
-
let parsed;
|
|
13
|
-
try {
|
|
14
|
-
parsed = JSON.parse(raw);
|
|
15
|
-
} catch {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
const candidate = parsed;
|
|
22
|
-
const { id, owner, created_at, ttl_seconds } = candidate;
|
|
23
|
-
if (typeof id !== "string" || typeof owner !== "string" || typeof created_at !== "string" || typeof ttl_seconds !== "number" || !Number.isFinite(ttl_seconds)) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
return { id, owner, created_at, ttl_seconds };
|
|
27
|
-
}
|
|
28
|
-
function isErrno(error, code) {
|
|
29
|
-
return typeof error === "object" && error !== null && "code" in error && error.code === code;
|
|
30
|
-
}
|
|
31
|
-
function classifyLockContent(file, raw, nowMs) {
|
|
32
|
-
const lock = parseLock(raw);
|
|
33
|
-
if (lock === null) {
|
|
34
|
-
return {
|
|
35
|
-
detail: "unparseable_json",
|
|
36
|
-
entry: {
|
|
37
|
-
file,
|
|
38
|
-
id: null,
|
|
39
|
-
owner: null,
|
|
40
|
-
created_at: null,
|
|
41
|
-
ttl_seconds: null,
|
|
42
|
-
age_seconds: null,
|
|
43
|
-
stale: false,
|
|
44
|
-
reason: "unparseable"
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
const createdAtMs = Date.parse(lock.created_at);
|
|
49
|
-
if (!Number.isFinite(createdAtMs)) {
|
|
50
|
-
return {
|
|
51
|
-
detail: "invalid_timestamp",
|
|
52
|
-
entry: {
|
|
53
|
-
file,
|
|
54
|
-
id: lock.id,
|
|
55
|
-
owner: lock.owner,
|
|
56
|
-
created_at: lock.created_at,
|
|
57
|
-
ttl_seconds: lock.ttl_seconds,
|
|
58
|
-
age_seconds: null,
|
|
59
|
-
stale: false,
|
|
60
|
-
reason: "unparseable"
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
const ageMs = nowMs - createdAtMs;
|
|
65
|
-
const age_seconds = Math.floor(ageMs / 1e3);
|
|
66
|
-
const stale = ageMs > lock.ttl_seconds * 1e3;
|
|
67
|
-
return {
|
|
68
|
-
detail: stale ? "expired" : "active",
|
|
69
|
-
entry: {
|
|
70
|
-
file,
|
|
71
|
-
id: lock.id,
|
|
72
|
-
owner: lock.owner,
|
|
73
|
-
created_at: lock.created_at,
|
|
74
|
-
ttl_seconds: lock.ttl_seconds,
|
|
75
|
-
age_seconds,
|
|
76
|
-
stale,
|
|
77
|
-
reason: stale ? "expired" : "active"
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
async function scanLockHealth(pmRoot, now) {
|
|
82
|
-
const nowMs = now ?? Date.now();
|
|
83
|
-
const locksDir = path.join(pmRoot, "locks");
|
|
84
|
-
const scan = {
|
|
85
|
-
scanned: 0,
|
|
86
|
-
active_lock_count: 0,
|
|
87
|
-
stale_lock_count: 0,
|
|
88
|
-
unreadable_lock_count: 0,
|
|
89
|
-
unparseable_lock_count: 0
|
|
90
|
-
};
|
|
91
|
-
let dirEntries;
|
|
92
|
-
try {
|
|
93
|
-
const rawDir = await fs.readdir(locksDir);
|
|
94
|
-
dirEntries = rawDir.filter((f) => f.endsWith(".lock")).sort();
|
|
95
|
-
} catch (error) {
|
|
96
|
-
if (isErrno(error, "ENOENT")) {
|
|
97
|
-
return scan;
|
|
98
|
-
}
|
|
99
|
-
throw error;
|
|
100
|
-
}
|
|
101
|
-
for (const file of dirEntries) {
|
|
102
|
-
let raw;
|
|
103
|
-
try {
|
|
104
|
-
raw = await fs.readFile(path.join(locksDir, file), "utf8");
|
|
105
|
-
} catch (readError) {
|
|
106
|
-
if (isErrno(readError, "ENOENT")) {
|
|
107
|
-
continue;
|
|
108
|
-
}
|
|
109
|
-
scan.scanned += 1;
|
|
110
|
-
scan.unreadable_lock_count += 1;
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
scan.scanned += 1;
|
|
114
|
-
const { detail } = classifyLockContent(file, raw, nowMs);
|
|
115
|
-
if (detail === "active") {
|
|
116
|
-
scan.active_lock_count += 1;
|
|
117
|
-
} else if (detail === "expired") {
|
|
118
|
-
scan.stale_lock_count += 1;
|
|
119
|
-
} else {
|
|
120
|
-
scan.unparseable_lock_count += 1;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return scan;
|
|
124
|
-
}
|
|
125
|
-
async function runLockGc(pmRoot, options) {
|
|
126
|
-
const { dryRun, hooks } = options;
|
|
127
|
-
const nowMs = options.now ?? Date.now();
|
|
128
|
-
const locksDir = path.join(pmRoot, "locks");
|
|
129
|
-
const result = {
|
|
130
|
-
scanned: 0,
|
|
131
|
-
removed: [],
|
|
132
|
-
retained: [],
|
|
133
|
-
warnings: [],
|
|
134
|
-
entries: []
|
|
135
|
-
};
|
|
136
|
-
let dirEntries;
|
|
137
|
-
try {
|
|
138
|
-
const raw = await fs.readdir(locksDir);
|
|
139
|
-
dirEntries = raw.filter((f) => f.endsWith(".lock")).sort();
|
|
140
|
-
} catch (error) {
|
|
141
|
-
if (isErrno(error, "ENOENT")) {
|
|
142
|
-
return result;
|
|
143
|
-
}
|
|
144
|
-
throw error;
|
|
145
|
-
}
|
|
146
|
-
for (const file of dirEntries) {
|
|
147
|
-
result.scanned += 1;
|
|
148
|
-
const absPath = path.join(locksDir, file);
|
|
149
|
-
const relPath = `locks/${file}`;
|
|
150
|
-
if (hooks?.onRead) {
|
|
151
|
-
const hookWarnings = await hooks.onRead(absPath);
|
|
152
|
-
result.warnings.push(...hookWarnings);
|
|
153
|
-
}
|
|
154
|
-
let raw;
|
|
155
|
-
try {
|
|
156
|
-
raw = await fs.readFile(absPath, "utf8");
|
|
157
|
-
} catch (readError) {
|
|
158
|
-
if (isErrno(readError, "ENOENT")) {
|
|
159
|
-
result.scanned -= 1;
|
|
160
|
-
continue;
|
|
161
|
-
}
|
|
162
|
-
result.warnings.push(`lock_unreadable:${file}`);
|
|
163
|
-
result.retained.push(relPath);
|
|
164
|
-
result.entries.push({
|
|
165
|
-
file,
|
|
166
|
-
id: null,
|
|
167
|
-
owner: null,
|
|
168
|
-
created_at: null,
|
|
169
|
-
ttl_seconds: null,
|
|
170
|
-
age_seconds: null,
|
|
171
|
-
stale: false,
|
|
172
|
-
reason: "unparseable"
|
|
173
|
-
});
|
|
174
|
-
continue;
|
|
175
|
-
}
|
|
176
|
-
const classified = classifyLockContent(file, raw, nowMs);
|
|
177
|
-
if (classified.detail === "unparseable_json") {
|
|
178
|
-
result.warnings.push(`lock_unparseable:${file}`);
|
|
179
|
-
result.retained.push(relPath);
|
|
180
|
-
result.entries.push(classified.entry);
|
|
181
|
-
continue;
|
|
182
|
-
}
|
|
183
|
-
if (classified.detail === "invalid_timestamp") {
|
|
184
|
-
result.warnings.push(`lock_invalid_timestamp:${file}`);
|
|
185
|
-
result.retained.push(relPath);
|
|
186
|
-
result.entries.push(classified.entry);
|
|
187
|
-
continue;
|
|
188
|
-
}
|
|
189
|
-
if (classified.detail === "active") {
|
|
190
|
-
result.retained.push(relPath);
|
|
191
|
-
result.entries.push(classified.entry);
|
|
192
|
-
continue;
|
|
193
|
-
}
|
|
194
|
-
if (!dryRun) {
|
|
195
|
-
try {
|
|
196
|
-
await fs.unlink(absPath);
|
|
197
|
-
} catch (unlinkError) {
|
|
198
|
-
if (!isErrno(unlinkError, "ENOENT")) {
|
|
199
|
-
result.warnings.push(`lock_remove_failed:${file}`);
|
|
200
|
-
result.retained.push(relPath);
|
|
201
|
-
result.entries.push(classified.entry);
|
|
202
|
-
continue;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
if (hooks?.onWrite) {
|
|
206
|
-
const hookWarnings = await hooks.onWrite(absPath);
|
|
207
|
-
result.warnings.push(...hookWarnings);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
result.removed.push(relPath);
|
|
211
|
-
result.entries.push(classified.entry);
|
|
212
|
-
}
|
|
213
|
-
return result;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export {
|
|
217
|
-
scanLockHealth,
|
|
218
|
-
runLockGc
|
|
219
|
-
};
|
|
220
|
-
//# sourceMappingURL=chunk-QZ342C63.js.map
|