@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/gc.ts","../../../../../../../../core/checkpoint/checkpoint-gc.ts"],"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"],"names":["fs","path","isErrno","path","fs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAOA,SAAQ;AACf,OAAOC,WAAU;;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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","debugId":"52b00cfe-1e1c-59ca-97d5-09a82f0704c1"}
|
|
@@ -1,306 +0,0 @@
|
|
|
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]="57b0282e-66d2-530b-847a-2179588ea248")}catch(e){}}();
|
|
3
|
-
import {
|
|
4
|
-
flushTelemetryQueueNow
|
|
5
|
-
} from "./chunk-SQYJ4HF2.js";
|
|
6
|
-
import {
|
|
7
|
-
nowIso
|
|
8
|
-
} from "./chunk-3GCS5SKL.js";
|
|
9
|
-
import {
|
|
10
|
-
PmCliError,
|
|
11
|
-
readSettings,
|
|
12
|
-
writeSettings
|
|
13
|
-
} from "./chunk-E3SZTQ4K.js";
|
|
14
|
-
import {
|
|
15
|
-
EXIT_CODE,
|
|
16
|
-
pathExists,
|
|
17
|
-
readFileIfExists,
|
|
18
|
-
resolveGlobalPmRoot
|
|
19
|
-
} from "./chunk-57NWPFF2.js";
|
|
20
|
-
|
|
21
|
-
// dist/cli/commands/telemetry.js
|
|
22
|
-
import fs from "node:fs/promises";
|
|
23
|
-
import path from "node:path";
|
|
24
|
-
var TELEMETRY_QUEUE_RELATIVE_PATH = path.join("runtime", "telemetry", "events.jsonl");
|
|
25
|
-
var TELEMETRY_STATE_RELATIVE_PATH = path.join("runtime", "telemetry", "state.json");
|
|
26
|
-
var TELEMETRY_RUNTIME_RELATIVE_PATH = path.join("runtime", "telemetry");
|
|
27
|
-
var DEFAULT_STATS_LIMIT = 20;
|
|
28
|
-
var TELEMETRY_SUBCOMMANDS = ["status", "flush", "stats", "clear"];
|
|
29
|
-
function nearestRankPercentile(sortedAscending, fraction) {
|
|
30
|
-
const rank = Math.ceil(fraction * sortedAscending.length);
|
|
31
|
-
const index = Math.min(sortedAscending.length - 1, Math.max(0, rank - 1));
|
|
32
|
-
return sortedAscending[index];
|
|
33
|
-
}
|
|
34
|
-
function normalizeTelemetryQueueEntry(entry) {
|
|
35
|
-
const command = typeof entry.event.command === "string" && entry.event.command.trim().length > 0 ? entry.event.command : "<unknown>";
|
|
36
|
-
const eventType = typeof entry.event.event_type === "string" && entry.event.event_type.trim().length > 0 ? entry.event.event_type : "unknown";
|
|
37
|
-
const eventSchemaVersion = typeof entry.event.schema_version === "number" && Number.isFinite(entry.event.schema_version) ? Math.trunc(entry.event.schema_version) : void 0;
|
|
38
|
-
const clientSchemaVersion = typeof entry.client_schema_version === "number" && Number.isFinite(entry.client_schema_version) ? Math.trunc(entry.client_schema_version) : void 0;
|
|
39
|
-
return { command, eventType, eventSchemaVersion, clientSchemaVersion };
|
|
40
|
-
}
|
|
41
|
-
function createTelemetryStatsAccumulator() {
|
|
42
|
-
return {
|
|
43
|
-
count: 0,
|
|
44
|
-
max_attempts: 0,
|
|
45
|
-
event_type_counts: {},
|
|
46
|
-
event_schema_versions: /* @__PURE__ */ new Set(),
|
|
47
|
-
client_schema_versions: /* @__PURE__ */ new Set(),
|
|
48
|
-
finish_durations_ms: [],
|
|
49
|
-
ok_count: 0,
|
|
50
|
-
error_count: 0,
|
|
51
|
-
resolution_counts: {}
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
function recordTelemetryFinishPayload(current, payload) {
|
|
55
|
-
const durationMs = typeof payload?.duration_ms === "number" && Number.isFinite(payload.duration_ms) ? payload.duration_ms : void 0;
|
|
56
|
-
if (durationMs !== void 0) {
|
|
57
|
-
current.finish_durations_ms.push(durationMs);
|
|
58
|
-
}
|
|
59
|
-
if (payload?.ok === true) {
|
|
60
|
-
current.ok_count += 1;
|
|
61
|
-
} else {
|
|
62
|
-
current.error_count += 1;
|
|
63
|
-
}
|
|
64
|
-
const resolution = typeof payload?.command_resolution === "string" && payload.command_resolution.trim().length > 0 ? payload.command_resolution : void 0;
|
|
65
|
-
if (resolution !== void 0) {
|
|
66
|
-
current.resolution_counts[resolution] = (current.resolution_counts[resolution] ?? 0) + 1;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function recordTelemetryQueueEntry(grouped, entry) {
|
|
70
|
-
const normalized = normalizeTelemetryQueueEntry(entry);
|
|
71
|
-
const current = grouped.get(normalized.command) ?? createTelemetryStatsAccumulator();
|
|
72
|
-
const attempts = Number.isFinite(entry.attempts) ? Math.max(0, Math.trunc(entry.attempts)) : 0;
|
|
73
|
-
current.count += 1;
|
|
74
|
-
current.max_attempts = Math.max(current.max_attempts, attempts);
|
|
75
|
-
current.event_type_counts[normalized.eventType] = (current.event_type_counts[normalized.eventType] ?? 0) + 1;
|
|
76
|
-
if (normalized.eventSchemaVersion !== void 0) {
|
|
77
|
-
current.event_schema_versions.add(normalized.eventSchemaVersion);
|
|
78
|
-
}
|
|
79
|
-
if (normalized.clientSchemaVersion !== void 0) {
|
|
80
|
-
current.client_schema_versions.add(normalized.clientSchemaVersion);
|
|
81
|
-
}
|
|
82
|
-
if (normalized.eventType === "command_finish") {
|
|
83
|
-
recordTelemetryFinishPayload(current, entry.event.payload);
|
|
84
|
-
}
|
|
85
|
-
grouped.set(normalized.command, current);
|
|
86
|
-
}
|
|
87
|
-
function buildTelemetryStatsBucket(command, value) {
|
|
88
|
-
const finishCount = value.ok_count + value.error_count;
|
|
89
|
-
const sortedDurations = [...value.finish_durations_ms].sort((left, right) => left - right);
|
|
90
|
-
const resolutionEntries = Object.entries(value.resolution_counts).sort((left, right) => left[0].localeCompare(right[0]));
|
|
91
|
-
return {
|
|
92
|
-
command,
|
|
93
|
-
count: value.count,
|
|
94
|
-
event_type_counts: Object.fromEntries(Object.entries(value.event_type_counts).sort((left, right) => left[0].localeCompare(right[0]))),
|
|
95
|
-
max_attempts: value.max_attempts,
|
|
96
|
-
event_schema_versions: [...value.event_schema_versions].sort((left, right) => left - right),
|
|
97
|
-
client_schema_versions: [...value.client_schema_versions].sort((left, right) => left - right),
|
|
98
|
-
...sortedDurations.length > 0 ? {
|
|
99
|
-
duration_p50_ms: nearestRankPercentile(sortedDurations, 0.5),
|
|
100
|
-
duration_p95_ms: nearestRankPercentile(sortedDurations, 0.95),
|
|
101
|
-
duration_max_ms: sortedDurations[sortedDurations.length - 1]
|
|
102
|
-
} : {},
|
|
103
|
-
...finishCount > 0 ? {
|
|
104
|
-
ok_count: value.ok_count,
|
|
105
|
-
error_count: value.error_count,
|
|
106
|
-
error_rate: value.error_count / finishCount
|
|
107
|
-
} : {},
|
|
108
|
-
...resolutionEntries.length > 0 ? { command_resolution_counts: Object.fromEntries(resolutionEntries) } : {}
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
function normalizeTelemetrySubcommand(value) {
|
|
112
|
-
const normalized = (value ?? "status").trim().toLowerCase();
|
|
113
|
-
if (TELEMETRY_SUBCOMMANDS.includes(normalized)) {
|
|
114
|
-
return normalized;
|
|
115
|
-
}
|
|
116
|
-
throw new PmCliError(`Unknown pm telemetry subcommand "${value}". Allowed: ${TELEMETRY_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, {
|
|
117
|
-
code: "unknown_subcommand",
|
|
118
|
-
examples: [
|
|
119
|
-
"pm telemetry status",
|
|
120
|
-
"pm telemetry flush",
|
|
121
|
-
"pm telemetry stats --limit 10",
|
|
122
|
-
"pm telemetry clear"
|
|
123
|
-
]
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
function parseTelemetryStatsLimit(raw) {
|
|
127
|
-
if (raw === void 0) {
|
|
128
|
-
return DEFAULT_STATS_LIMIT;
|
|
129
|
-
}
|
|
130
|
-
if (typeof raw === "number") {
|
|
131
|
-
if (!Number.isFinite(raw) || !Number.isInteger(raw) || raw <= 0) {
|
|
132
|
-
throw new PmCliError("--limit must be a positive integer", EXIT_CODE.USAGE);
|
|
133
|
-
}
|
|
134
|
-
return raw;
|
|
135
|
-
}
|
|
136
|
-
const trimmed = raw.trim();
|
|
137
|
-
if (trimmed.length === 0 || !/^\d+$/.test(trimmed)) {
|
|
138
|
-
throw new PmCliError("--limit must be a positive integer", EXIT_CODE.USAGE);
|
|
139
|
-
}
|
|
140
|
-
const parsed = Number.parseInt(trimmed, 10);
|
|
141
|
-
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
142
|
-
throw new PmCliError("--limit must be a positive integer", EXIT_CODE.USAGE);
|
|
143
|
-
}
|
|
144
|
-
return parsed;
|
|
145
|
-
}
|
|
146
|
-
function parseTelemetryQueue(raw) {
|
|
147
|
-
if (raw === null || raw.trim().length === 0) {
|
|
148
|
-
return {
|
|
149
|
-
rows_total: 0,
|
|
150
|
-
valid_entries: 0,
|
|
151
|
-
invalid_rows: 0,
|
|
152
|
-
entries: []
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
const entries = [];
|
|
156
|
-
let rowsTotal = 0;
|
|
157
|
-
let invalidRows = 0;
|
|
158
|
-
for (const line of raw.split("\n")) {
|
|
159
|
-
const trimmed = line.trim();
|
|
160
|
-
if (trimmed.length === 0) {
|
|
161
|
-
continue;
|
|
162
|
-
}
|
|
163
|
-
rowsTotal += 1;
|
|
164
|
-
try {
|
|
165
|
-
const parsed = JSON.parse(trimmed);
|
|
166
|
-
if (typeof parsed === "object" && parsed !== null && typeof parsed.attempts === "number" && typeof parsed.event === "object" && parsed.event !== null) {
|
|
167
|
-
entries.push(parsed);
|
|
168
|
-
} else {
|
|
169
|
-
invalidRows += 1;
|
|
170
|
-
}
|
|
171
|
-
} catch {
|
|
172
|
-
invalidRows += 1;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
return {
|
|
176
|
-
rows_total: rowsTotal,
|
|
177
|
-
valid_entries: entries.length,
|
|
178
|
-
invalid_rows: invalidRows,
|
|
179
|
-
entries
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
async function readTelemetryRuntimeState(statePath) {
|
|
183
|
-
const stateRaw = await readFileIfExists(statePath);
|
|
184
|
-
if (stateRaw === null || stateRaw.trim().length === 0) {
|
|
185
|
-
return {};
|
|
186
|
-
}
|
|
187
|
-
try {
|
|
188
|
-
const parsed = JSON.parse(stateRaw);
|
|
189
|
-
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
|
|
190
|
-
return parsed;
|
|
191
|
-
}
|
|
192
|
-
} catch {
|
|
193
|
-
}
|
|
194
|
-
return {};
|
|
195
|
-
}
|
|
196
|
-
async function buildTelemetryStatusSummary(globalPmRoot) {
|
|
197
|
-
const settings = await readSettings(globalPmRoot);
|
|
198
|
-
const queuePath = path.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH);
|
|
199
|
-
const statePath = path.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH);
|
|
200
|
-
const queueRaw = await readFileIfExists(queuePath);
|
|
201
|
-
const queue = parseTelemetryQueue(queueRaw);
|
|
202
|
-
const runtimeState = await readTelemetryRuntimeState(statePath);
|
|
203
|
-
return {
|
|
204
|
-
enabled: settings.telemetry.enabled,
|
|
205
|
-
endpoint: settings.telemetry.endpoint,
|
|
206
|
-
queue_path: queuePath,
|
|
207
|
-
state_path: statePath,
|
|
208
|
-
queue_rows_total: queue.rows_total,
|
|
209
|
-
queue_entries: queue.valid_entries,
|
|
210
|
-
queue_invalid_rows: queue.invalid_rows,
|
|
211
|
-
queue_size_bytes: queueRaw === null ? 0 : Buffer.byteLength(queueRaw, "utf8"),
|
|
212
|
-
last_attempted_flush_at: runtimeState.last_attempted_flush_at ?? null,
|
|
213
|
-
last_successful_flush_at: runtimeState.last_successful_flush_at ?? null,
|
|
214
|
-
last_failed_flush_at: runtimeState.last_failed_flush_at ?? null,
|
|
215
|
-
last_failed_flush_error: runtimeState.last_failed_flush_error ?? null
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
function buildTelemetryStatsBuckets(entries) {
|
|
219
|
-
const grouped = /* @__PURE__ */ new Map();
|
|
220
|
-
for (const entry of entries) {
|
|
221
|
-
recordTelemetryQueueEntry(grouped, entry);
|
|
222
|
-
}
|
|
223
|
-
return [...grouped.entries()].map(([command, value]) => buildTelemetryStatsBucket(command, value)).sort((left, right) => right.count - left.count || left.command.localeCompare(right.command));
|
|
224
|
-
}
|
|
225
|
-
async function runTelemetry(options, _global) {
|
|
226
|
-
void _global;
|
|
227
|
-
const subcommand = normalizeTelemetrySubcommand(options.subcommand);
|
|
228
|
-
const globalPmRoot = resolveGlobalPmRoot(process.cwd());
|
|
229
|
-
const queuePath = path.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH);
|
|
230
|
-
const statePath = path.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH);
|
|
231
|
-
if (subcommand === "status") {
|
|
232
|
-
return {
|
|
233
|
-
action: "telemetry",
|
|
234
|
-
subcommand,
|
|
235
|
-
status: await buildTelemetryStatusSummary(globalPmRoot),
|
|
236
|
-
generated_at: nowIso()
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
if (subcommand === "flush") {
|
|
240
|
-
const before = await buildTelemetryStatusSummary(globalPmRoot);
|
|
241
|
-
await flushTelemetryQueueNow(globalPmRoot);
|
|
242
|
-
const after = await buildTelemetryStatusSummary(globalPmRoot);
|
|
243
|
-
return {
|
|
244
|
-
action: "telemetry",
|
|
245
|
-
subcommand,
|
|
246
|
-
queue_entries_before: before.queue_entries,
|
|
247
|
-
queue_entries_after: after.queue_entries,
|
|
248
|
-
queue_drained: after.queue_entries < before.queue_entries,
|
|
249
|
-
status: after,
|
|
250
|
-
generated_at: nowIso()
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
if (subcommand === "stats") {
|
|
254
|
-
const limit = parseTelemetryStatsLimit(options.limit);
|
|
255
|
-
const queueRaw = await readFileIfExists(queuePath);
|
|
256
|
-
const queue = parseTelemetryQueue(queueRaw);
|
|
257
|
-
const buckets = buildTelemetryStatsBuckets(queue.entries);
|
|
258
|
-
const selected = buckets.slice(0, limit);
|
|
259
|
-
return {
|
|
260
|
-
action: "telemetry",
|
|
261
|
-
subcommand,
|
|
262
|
-
limit,
|
|
263
|
-
total_commands: buckets.length,
|
|
264
|
-
queue_entries: queue.valid_entries,
|
|
265
|
-
queue_invalid_rows: queue.invalid_rows,
|
|
266
|
-
queue_rows_total: queue.rows_total,
|
|
267
|
-
truncated: buckets.length > selected.length,
|
|
268
|
-
stats: selected,
|
|
269
|
-
generated_at: nowIso()
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
const settings = await readSettings(globalPmRoot);
|
|
273
|
-
const previousEnabled = settings.telemetry.enabled;
|
|
274
|
-
const previousInstallationId = settings.telemetry.installation_id;
|
|
275
|
-
const previousFirstRunPromptCompleted = settings.telemetry.first_run_prompt_completed;
|
|
276
|
-
settings.telemetry.enabled = false;
|
|
277
|
-
settings.telemetry.first_run_prompt_completed = true;
|
|
278
|
-
settings.telemetry.installation_id = "";
|
|
279
|
-
const settingsChanged = previousEnabled !== settings.telemetry.enabled || previousInstallationId !== settings.telemetry.installation_id || previousFirstRunPromptCompleted !== settings.telemetry.first_run_prompt_completed;
|
|
280
|
-
if (settingsChanged) {
|
|
281
|
-
await writeSettings(globalPmRoot, settings, "telemetry:clear");
|
|
282
|
-
}
|
|
283
|
-
const telemetryRuntimePath = path.join(globalPmRoot, TELEMETRY_RUNTIME_RELATIVE_PATH);
|
|
284
|
-
const existed = await pathExists(telemetryRuntimePath);
|
|
285
|
-
await fs.rm(telemetryRuntimePath, { recursive: true, force: true });
|
|
286
|
-
const queueExistsAfter = await pathExists(queuePath);
|
|
287
|
-
const stateExistsAfter = await pathExists(statePath);
|
|
288
|
-
return {
|
|
289
|
-
action: "telemetry",
|
|
290
|
-
subcommand,
|
|
291
|
-
settings_changed: settingsChanged,
|
|
292
|
-
runtime_dir_removed: existed && !await pathExists(telemetryRuntimePath),
|
|
293
|
-
queue_exists_after: queueExistsAfter,
|
|
294
|
-
state_exists_after: stateExistsAfter,
|
|
295
|
-
status: await buildTelemetryStatusSummary(globalPmRoot),
|
|
296
|
-
generated_at: nowIso()
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
export {
|
|
301
|
-
TELEMETRY_SUBCOMMANDS,
|
|
302
|
-
runTelemetry
|
|
303
|
-
};
|
|
304
|
-
//# sourceMappingURL=chunk-XC5BURG2.js.map
|
|
305
|
-
|
|
306
|
-
//# debugId=57b0282e-66d2-530b-847a-2179588ea248
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/telemetry.ts"],"sourcesContent":["/**\n * @module cli/commands/telemetry\n *\n * Implements the pm telemetry command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { pathExists, readFileIfExists } from \"../../core/fs/fs-utils.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 { resolveGlobalPmRoot } from \"../../core/store/paths.js\";\nimport { readSettings, writeSettings } from \"../../core/store/settings.js\";\nimport { flushTelemetryQueueNow } from \"../../core/telemetry/runtime.js\";\n\nconst TELEMETRY_QUEUE_RELATIVE_PATH = path.join(\"runtime\", \"telemetry\", \"events.jsonl\");\nconst TELEMETRY_STATE_RELATIVE_PATH = path.join(\"runtime\", \"telemetry\", \"state.json\");\nconst TELEMETRY_RUNTIME_RELATIVE_PATH = path.join(\"runtime\", \"telemetry\");\nconst DEFAULT_STATS_LIMIT = 20;\n\nexport const TELEMETRY_SUBCOMMANDS = [\"status\", \"flush\", \"stats\", \"clear\"] as const;\n/**\n * Restricts telemetry subcommand values accepted by command, SDK, and storage contracts.\n */\nexport type TelemetrySubcommand = (typeof TELEMETRY_SUBCOMMANDS)[number];\n\ninterface TelemetryRuntimeStateRecord {\n endpoint?: string;\n queue_entries?: number;\n last_attempted_flush_at?: string;\n last_successful_flush_at?: string;\n last_failed_flush_at?: string;\n last_failed_flush_error?: string;\n}\n\ninterface QueuedTelemetryEventRecord {\n attempts: number;\n client_schema_version?: number;\n event: {\n event_id?: string;\n event_type?: string;\n schema_version?: number;\n command?: string;\n payload?: Record<string, unknown>;\n };\n}\n\ninterface ParsedTelemetryQueue {\n rows_total: number;\n valid_entries: number;\n invalid_rows: number;\n entries: QueuedTelemetryEventRecord[];\n}\n\ninterface TelemetryStatusSummary {\n enabled: boolean;\n endpoint: string;\n queue_path: string;\n state_path: string;\n queue_rows_total: number;\n queue_entries: number;\n queue_invalid_rows: number;\n queue_size_bytes: number;\n last_attempted_flush_at: string | null;\n last_successful_flush_at: string | null;\n last_failed_flush_at: string | null;\n last_failed_flush_error: string | null;\n}\n\n/**\n * Documents the telemetry command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface TelemetryCommandOptions {\n subcommand?: string;\n limit?: string | number;\n}\n\ninterface TelemetryStatsBucket {\n command: string;\n count: number;\n event_type_counts: Record<string, number>;\n max_attempts: number;\n event_schema_versions: number[];\n client_schema_versions: number[];\n /**\n * Latency percentiles (nearest-rank) over `duration_ms` from the bucket's\n * `command_finish` events. Present only when at least one finish event carries\n * a finite `duration_ms`; `command_start`/`command_error` events are excluded.\n */\n duration_p50_ms?: number;\n duration_p95_ms?: number;\n duration_max_ms?: number;\n /**\n * Success/failure tally derived from `command_finish` payload `ok`. A finish\n * event whose `ok` is missing or not strictly `true` is counted as an error\n * (conservative). Present only when the bucket has at least one finish event;\n * `ok_count + error_count` equals that finish-event count.\n */\n ok_count?: number;\n error_count?: number;\n error_rate?: number;\n /** Distribution of `command_resolution` over `command_finish` events; present only when non-empty. */\n command_resolution_counts?: Record<string, number>;\n}\n\ninterface TelemetryStatsBucketAccumulator {\n count: number;\n max_attempts: number;\n event_type_counts: Record<string, number>;\n event_schema_versions: Set<number>;\n client_schema_versions: Set<number>;\n finish_durations_ms: number[];\n ok_count: number;\n error_count: number;\n resolution_counts: Record<string, number>;\n}\n\ninterface NormalizedTelemetryQueueEntry {\n command: string;\n eventType: string;\n eventSchemaVersion: number | undefined;\n clientSchemaVersion: number | undefined;\n}\n\n/**\n * Returns the nearest-rank percentile of an ascending-sorted, non-empty array.\n *\n * Uses the nearest-rank method (rank = ceil(fraction × n), 1-based, clamped into\n * range) so the result is always an observed sample value with no interpolation.\n */\nfunction nearestRankPercentile(sortedAscending: number[], fraction: number): number {\n const rank = Math.ceil(fraction * sortedAscending.length);\n const index = Math.min(sortedAscending.length - 1, Math.max(0, rank - 1));\n return sortedAscending[index];\n}\n\nfunction normalizeTelemetryQueueEntry(entry: QueuedTelemetryEventRecord): NormalizedTelemetryQueueEntry {\n const command = typeof entry.event.command === \"string\" && entry.event.command.trim().length > 0\n ? entry.event.command\n : \"<unknown>\";\n const eventType = typeof entry.event.event_type === \"string\" && entry.event.event_type.trim().length > 0\n ? entry.event.event_type\n : \"unknown\";\n const eventSchemaVersion = typeof entry.event.schema_version === \"number\" && Number.isFinite(entry.event.schema_version)\n ? Math.trunc(entry.event.schema_version)\n : undefined;\n const clientSchemaVersion =\n typeof entry.client_schema_version === \"number\" && Number.isFinite(entry.client_schema_version)\n ? Math.trunc(entry.client_schema_version)\n : undefined;\n return { command, eventType, eventSchemaVersion, clientSchemaVersion };\n}\n\nfunction createTelemetryStatsAccumulator(): TelemetryStatsBucketAccumulator {\n return {\n count: 0,\n max_attempts: 0,\n event_type_counts: {},\n event_schema_versions: new Set<number>(),\n client_schema_versions: new Set<number>(),\n finish_durations_ms: [],\n ok_count: 0,\n error_count: 0,\n resolution_counts: {},\n };\n}\n\nfunction recordTelemetryFinishPayload(current: TelemetryStatsBucketAccumulator, payload: Record<string, unknown> | undefined): void {\n const durationMs = typeof payload?.duration_ms === \"number\" && Number.isFinite(payload.duration_ms)\n ? payload.duration_ms\n : undefined;\n if (durationMs !== undefined) {\n current.finish_durations_ms.push(durationMs);\n }\n if (payload?.ok === true) {\n current.ok_count += 1;\n } else {\n current.error_count += 1;\n }\n const resolution = typeof payload?.command_resolution === \"string\" && payload.command_resolution.trim().length > 0\n ? payload.command_resolution\n : undefined;\n if (resolution !== undefined) {\n current.resolution_counts[resolution] = (current.resolution_counts[resolution] ?? 0) + 1;\n }\n}\n\nfunction recordTelemetryQueueEntry(\n grouped: Map<string, TelemetryStatsBucketAccumulator>,\n entry: QueuedTelemetryEventRecord,\n): void {\n const normalized = normalizeTelemetryQueueEntry(entry);\n const current = grouped.get(normalized.command) ?? createTelemetryStatsAccumulator();\n const attempts = Number.isFinite(entry.attempts) ? Math.max(0, Math.trunc(entry.attempts)) : 0;\n current.count += 1;\n current.max_attempts = Math.max(current.max_attempts, attempts);\n current.event_type_counts[normalized.eventType] = (current.event_type_counts[normalized.eventType] ?? 0) + 1;\n if (normalized.eventSchemaVersion !== undefined) {\n current.event_schema_versions.add(normalized.eventSchemaVersion);\n }\n if (normalized.clientSchemaVersion !== undefined) {\n current.client_schema_versions.add(normalized.clientSchemaVersion);\n }\n if (normalized.eventType === \"command_finish\") {\n recordTelemetryFinishPayload(current, entry.event.payload);\n }\n grouped.set(normalized.command, current);\n}\n\nfunction buildTelemetryStatsBucket(command: string, value: TelemetryStatsBucketAccumulator): TelemetryStatsBucket {\n const finishCount = value.ok_count + value.error_count;\n const sortedDurations = [...value.finish_durations_ms].sort((left, right) => left - right);\n const resolutionEntries = Object.entries(value.resolution_counts).sort((left, right) => left[0].localeCompare(right[0]));\n return {\n command,\n count: value.count,\n event_type_counts: Object.fromEntries(\n Object.entries(value.event_type_counts).sort((left, right) => left[0].localeCompare(right[0])),\n ),\n max_attempts: value.max_attempts,\n event_schema_versions: [...value.event_schema_versions].sort((left, right) => left - right),\n client_schema_versions: [...value.client_schema_versions].sort((left, right) => left - right),\n ...(sortedDurations.length > 0\n ? {\n duration_p50_ms: nearestRankPercentile(sortedDurations, 0.5),\n duration_p95_ms: nearestRankPercentile(sortedDurations, 0.95),\n duration_max_ms: sortedDurations[sortedDurations.length - 1],\n }\n : {}),\n ...(finishCount > 0\n ? {\n ok_count: value.ok_count,\n error_count: value.error_count,\n error_rate: value.error_count / finishCount,\n }\n : {}),\n ...(resolutionEntries.length > 0 ? { command_resolution_counts: Object.fromEntries(resolutionEntries) } : {}),\n };\n}\n\nfunction normalizeTelemetrySubcommand(value: string | undefined): TelemetrySubcommand {\n const normalized = (value ?? \"status\").trim().toLowerCase();\n if ((TELEMETRY_SUBCOMMANDS as readonly string[]).includes(normalized)) {\n return normalized as TelemetrySubcommand;\n }\n // `value` is always a defined string here: an undefined subcommand normalizes\n // to \"status\" above (a valid value) and never reaches this throw.\n throw new PmCliError(\n `Unknown pm telemetry subcommand \"${value}\". Allowed: ${TELEMETRY_SUBCOMMANDS.join(\", \")}`,\n EXIT_CODE.USAGE,\n {\n code: \"unknown_subcommand\",\n examples: [\n \"pm telemetry status\",\n \"pm telemetry flush\",\n \"pm telemetry stats --limit 10\",\n \"pm telemetry clear\",\n ],\n },\n );\n}\n\nfunction parseTelemetryStatsLimit(raw: string | number | undefined): number {\n if (raw === undefined) {\n return DEFAULT_STATS_LIMIT;\n }\n if (typeof raw === \"number\") {\n if (!Number.isFinite(raw) || !Number.isInteger(raw) || raw <= 0) {\n throw new PmCliError(\"--limit must be a positive integer\", EXIT_CODE.USAGE);\n }\n return raw;\n }\n const trimmed = raw.trim();\n if (trimmed.length === 0 || !/^\\d+$/.test(trimmed)) {\n throw new PmCliError(\"--limit must be a positive integer\", EXIT_CODE.USAGE);\n }\n const parsed = Number.parseInt(trimmed, 10);\n if (!Number.isFinite(parsed) || parsed <= 0) {\n throw new PmCliError(\"--limit must be a positive integer\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\nfunction parseTelemetryQueue(raw: string | null): ParsedTelemetryQueue {\n if (raw === null || raw.trim().length === 0) {\n return {\n rows_total: 0,\n valid_entries: 0,\n invalid_rows: 0,\n entries: [],\n };\n }\n const entries: QueuedTelemetryEventRecord[] = [];\n let rowsTotal = 0;\n let invalidRows = 0;\n for (const line of raw.split(\"\\n\")) {\n const trimmed = line.trim();\n if (trimmed.length === 0) {\n continue;\n }\n rowsTotal += 1;\n try {\n const parsed = JSON.parse(trimmed) as QueuedTelemetryEventRecord;\n if (\n typeof parsed === \"object\" &&\n parsed !== null &&\n typeof parsed.attempts === \"number\" &&\n typeof parsed.event === \"object\" &&\n parsed.event !== null\n ) {\n entries.push(parsed);\n } else {\n invalidRows += 1;\n }\n } catch {\n invalidRows += 1;\n }\n }\n return {\n rows_total: rowsTotal,\n valid_entries: entries.length,\n invalid_rows: invalidRows,\n entries,\n };\n}\n\nasync function readTelemetryRuntimeState(statePath: string): Promise<TelemetryRuntimeStateRecord> {\n const stateRaw = await readFileIfExists(statePath);\n if (stateRaw === null || stateRaw.trim().length === 0) {\n return {};\n }\n try {\n const parsed = JSON.parse(stateRaw) as TelemetryRuntimeStateRecord;\n if (typeof parsed === \"object\" && parsed !== null && !Array.isArray(parsed)) {\n return parsed;\n }\n } catch {\n // Ignore malformed state files; status command is observational.\n }\n return {};\n}\n\nasync function buildTelemetryStatusSummary(globalPmRoot: string): Promise<TelemetryStatusSummary> {\n const settings = await readSettings(globalPmRoot);\n const queuePath = path.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH);\n const statePath = path.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH);\n const queueRaw = await readFileIfExists(queuePath);\n const queue = parseTelemetryQueue(queueRaw);\n const runtimeState = await readTelemetryRuntimeState(statePath);\n return {\n enabled: settings.telemetry.enabled,\n endpoint: settings.telemetry.endpoint,\n queue_path: queuePath,\n state_path: statePath,\n queue_rows_total: queue.rows_total,\n queue_entries: queue.valid_entries,\n queue_invalid_rows: queue.invalid_rows,\n queue_size_bytes: queueRaw === null ? 0 : Buffer.byteLength(queueRaw, \"utf8\"),\n last_attempted_flush_at: runtimeState.last_attempted_flush_at ?? null,\n last_successful_flush_at: runtimeState.last_successful_flush_at ?? null,\n last_failed_flush_at: runtimeState.last_failed_flush_at ?? null,\n last_failed_flush_error: runtimeState.last_failed_flush_error ?? null,\n };\n}\n\nfunction buildTelemetryStatsBuckets(entries: QueuedTelemetryEventRecord[]): TelemetryStatsBucket[] {\n const grouped = new Map<string, TelemetryStatsBucketAccumulator>();\n for (const entry of entries) {\n // Latency + outcome distribution come from command_finish payloads only:\n // command_finish always carries duration_ms/ok/command_resolution at every\n // capture level, while start/error events do not.\n recordTelemetryQueueEntry(grouped, entry);\n }\n return [...grouped.entries()]\n .map(([command, value]) => buildTelemetryStatsBucket(command, value))\n .sort((left, right) => right.count - left.count || left.command.localeCompare(right.command));\n}\n\n/**\n * Implements run telemetry for the public runtime surface of this module.\n */\nexport async function runTelemetry(options: TelemetryCommandOptions, _global: GlobalOptions): Promise<Record<string, unknown>> {\n void _global;\n const subcommand = normalizeTelemetrySubcommand(options.subcommand);\n const globalPmRoot = resolveGlobalPmRoot(process.cwd());\n const queuePath = path.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH);\n const statePath = path.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH);\n if (subcommand === \"status\") {\n return {\n action: \"telemetry\",\n subcommand,\n status: await buildTelemetryStatusSummary(globalPmRoot),\n generated_at: nowIso(),\n };\n }\n\n if (subcommand === \"flush\") {\n const before = await buildTelemetryStatusSummary(globalPmRoot);\n await flushTelemetryQueueNow(globalPmRoot);\n const after = await buildTelemetryStatusSummary(globalPmRoot);\n return {\n action: \"telemetry\",\n subcommand,\n queue_entries_before: before.queue_entries,\n queue_entries_after: after.queue_entries,\n queue_drained: after.queue_entries < before.queue_entries,\n status: after,\n generated_at: nowIso(),\n };\n }\n\n if (subcommand === \"stats\") {\n const limit = parseTelemetryStatsLimit(options.limit);\n const queueRaw = await readFileIfExists(queuePath);\n const queue = parseTelemetryQueue(queueRaw);\n const buckets = buildTelemetryStatsBuckets(queue.entries);\n const selected = buckets.slice(0, limit);\n return {\n action: \"telemetry\",\n subcommand,\n limit,\n total_commands: buckets.length,\n queue_entries: queue.valid_entries,\n queue_invalid_rows: queue.invalid_rows,\n queue_rows_total: queue.rows_total,\n truncated: buckets.length > selected.length,\n stats: selected,\n generated_at: nowIso(),\n };\n }\n\n const settings = await readSettings(globalPmRoot);\n const previousEnabled = settings.telemetry.enabled;\n const previousInstallationId = settings.telemetry.installation_id;\n const previousFirstRunPromptCompleted = settings.telemetry.first_run_prompt_completed;\n settings.telemetry.enabled = false;\n settings.telemetry.first_run_prompt_completed = true;\n settings.telemetry.installation_id = \"\";\n const settingsChanged =\n previousEnabled !== settings.telemetry.enabled ||\n previousInstallationId !== settings.telemetry.installation_id ||\n previousFirstRunPromptCompleted !== settings.telemetry.first_run_prompt_completed;\n if (settingsChanged) {\n await writeSettings(globalPmRoot, settings, \"telemetry:clear\");\n }\n\n const telemetryRuntimePath = path.join(globalPmRoot, TELEMETRY_RUNTIME_RELATIVE_PATH);\n const existed = await pathExists(telemetryRuntimePath);\n await fs.rm(telemetryRuntimePath, { recursive: true, force: true });\n const queueExistsAfter = await pathExists(queuePath);\n const stateExistsAfter = await pathExists(statePath);\n return {\n action: \"telemetry\",\n subcommand,\n settings_changed: settingsChanged,\n runtime_dir_removed: existed && !(await pathExists(telemetryRuntimePath)),\n queue_exists_after: queueExistsA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