@unbrained/pm-cli 2026.7.6 → 2026.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -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/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/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 +3 -3
- 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/register-list-query.d.ts +1 -1
- package/dist/cli/register-list-query.js +18 -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 +113 -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-F7WPGIQL.js +11 -0
- package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js → append-PVCTBVJG.js} +8 -9
- package/dist/cli-bundle/chunks/{chunk-EGAP5OWD.js → chunk-2APXX4TZ.js} +16 -14
- package/dist/cli-bundle/chunks/chunk-2APXX4TZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js → chunk-2LEJGRQ7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js → chunk-2TILG6F2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js → chunk-3G6UMXT3.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js.map → chunk-3G6UMXT3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js → chunk-3TYOW6RR.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js → chunk-3X542TEY.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js → chunk-42LXP4VO.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js.map → chunk-42LXP4VO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CL36D4PC.js → chunk-43SIHQND.js} +36 -15
- package/dist/cli-bundle/chunks/chunk-43SIHQND.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js → chunk-43UQN754.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js.map → chunk-43UQN754.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js → chunk-43YSKY75.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js.map → chunk-43YSKY75.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js → chunk-4BKDAEDF.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js.map → chunk-4BKDAEDF.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4LELACOL.js → chunk-4IQKDKGE.js} +15 -23
- package/dist/cli-bundle/chunks/{chunk-4LELACOL.js.map → chunk-4IQKDKGE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js → chunk-4MZOKTI2.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js.map → chunk-4MZOKTI2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js → chunk-52NS7JDP.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js.map → chunk-52NS7JDP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js → chunk-565WYS5W.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js.map → chunk-565WYS5W.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js → chunk-5FIQ4EX3.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js.map → chunk-5FIQ4EX3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-DMRNBQOI.js → chunk-6G6O3OPQ.js} +256 -36
- package/dist/cli-bundle/chunks/chunk-6G6O3OPQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js → chunk-6LCJRGPD.js} +9 -13
- package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js.map → chunk-6LCJRGPD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js → chunk-6UQCNWFV.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js.map → chunk-6UQCNWFV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZSUS2OD3.js → chunk-6XTSYPPO.js} +1216 -387
- package/dist/cli-bundle/chunks/chunk-6XTSYPPO.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-7ML7JONU.js +5434 -0
- package/dist/cli-bundle/chunks/chunk-7ML7JONU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js → chunk-7PNQA24K.js} +30 -36
- package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js.map → chunk-7PNQA24K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js → chunk-7VQ3JJN5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js → chunk-7Y5N34HX.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js.map → chunk-7Y5N34HX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js → chunk-AGAVEDIE.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js → chunk-AJUON7E6.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js → chunk-ARKHKYYS.js} +13 -21
- package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js.map → chunk-ARKHKYYS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-46CUF5L6.js → chunk-C5ACVMOI.js} +99 -51
- package/dist/cli-bundle/chunks/chunk-C5ACVMOI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js → chunk-CJQM7O7R.js} +16 -20
- package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js.map → chunk-CJQM7O7R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js → chunk-D2DCTFTL.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js.map → chunk-D2DCTFTL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js → chunk-DDDWVPID.js} +8 -10
- package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js.map → chunk-DDDWVPID.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js → chunk-DG6BSXZ7.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js.map → chunk-DG6BSXZ7.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js → chunk-DR2V5OIV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js → chunk-E3LWJUGF.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js.map → chunk-E3LWJUGF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js → chunk-E3YQFSFE.js} +6 -10
- package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js.map → chunk-E3YQFSFE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XG625QP4.js → chunk-EDO7VXSO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js → chunk-EIUBK2LT.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js.map → chunk-EIUBK2LT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js → chunk-EMXPI36L.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js.map → chunk-EMXPI36L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MLIYFOE7.js → chunk-EOUVR7JN.js} +12 -8
- package/dist/cli-bundle/chunks/chunk-EOUVR7JN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js → chunk-EVEPHNXJ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js → chunk-F6MT7KKE.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js.map → chunk-F6MT7KKE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js → chunk-F6YC2A6X.js} +7 -11
- package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js.map → chunk-F6YC2A6X.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-FILL6BB2.js +5514 -0
- package/dist/cli-bundle/chunks/chunk-FILL6BB2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js → chunk-FN6SB4HU.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js +5359 -0
- package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-EKFNL33R.js → chunk-GLS6VMWI.js} +37 -16
- package/dist/cli-bundle/chunks/chunk-GLS6VMWI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js → chunk-GPIDUMMN.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js.map → chunk-GPIDUMMN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js → chunk-GTM5HQL4.js} +11 -15
- package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js.map → chunk-GTM5HQL4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-24YG75HI.js → chunk-H2SMKL2N.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-QLMX7SRD.js → chunk-HHEWQXPD.js} +6 -6
- package/dist/cli-bundle/chunks/chunk-HHEWQXPD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js → chunk-HX6QXV5P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js → chunk-I74FMIWA.js} +10 -16
- package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js.map → chunk-I74FMIWA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js → chunk-IDIBF4E2.js} +20 -24
- package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js.map → chunk-IDIBF4E2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js → chunk-II7R6KD4.js} +8 -7
- package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js.map → chunk-II7R6KD4.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-J2VGADNG.js +10320 -0
- package/dist/cli-bundle/chunks/chunk-J2VGADNG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js → chunk-J7BOLHAV.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js.map → chunk-J7BOLHAV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js → chunk-KTGJ2CBU.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js.map → chunk-KTGJ2CBU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js → chunk-LCFJ7XAM.js} +22 -2
- package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js.map → chunk-LCFJ7XAM.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js → chunk-LZQU6XJG.js} +28 -34
- package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js.map → chunk-LZQU6XJG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js → chunk-M62RO3XK.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js.map → chunk-M62RO3XK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js → chunk-MCEUKJKW.js} +12 -14
- package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js.map → chunk-MCEUKJKW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TKD5VCTD.js → chunk-MHNMCDWR.js} +343 -195
- package/dist/cli-bundle/chunks/chunk-MHNMCDWR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js → chunk-MRFWUSVA.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js.map → chunk-MRFWUSVA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js → chunk-N6ZHDLUY.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js.map → chunk-N6ZHDLUY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js → chunk-NWWL22C7.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js.map → chunk-NWWL22C7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js → chunk-P3MJJW7P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js → chunk-PDXJXEZJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js → chunk-Q64AYQYW.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js.map → chunk-Q64AYQYW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js → chunk-QDABF2RB.js} +26 -34
- package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js.map → chunk-QDABF2RB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TULGS6X6.js → chunk-QFBSP3NI.js} +529 -46
- package/dist/cli-bundle/chunks/chunk-QFBSP3NI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js → chunk-RB3KLPAH.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js.map → chunk-RB3KLPAH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3VHSI5FL.js → chunk-RY7PTTUB.js} +94 -53
- package/dist/cli-bundle/chunks/chunk-RY7PTTUB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-COSPOP7H.js → chunk-S547WBYG.js} +343 -195
- package/dist/cli-bundle/chunks/chunk-S547WBYG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js → chunk-S5BNGFN5.js} +24 -32
- package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js.map → chunk-S5BNGFN5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js → chunk-S6VC2A2K.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js.map → chunk-S6VC2A2K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js → chunk-SIM5JDON.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js.map → chunk-SIM5JDON.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VPIM42PC.js → chunk-SY75LYXR.js} +11 -7
- package/dist/cli-bundle/chunks/chunk-SY75LYXR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-K46RF36U.js → chunk-TEISGNSH.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-TEISGNSH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js → chunk-TEKZOS7M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-W572BIEB.js → chunk-TGUK6XN6.js} +14 -18
- package/dist/cli-bundle/chunks/{chunk-W572BIEB.js.map → chunk-TGUK6XN6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js → chunk-TNC6MZUD.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js.map → chunk-TNC6MZUD.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js +10498 -0
- package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-57NWPFF2.js → chunk-UO7XAZK6.js} +17 -4
- package/dist/cli-bundle/chunks/chunk-UO7XAZK6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js → chunk-V5ZWKJNY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js → chunk-VGO73OCK.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js.map → chunk-VGO73OCK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js → chunk-VLEA2UTQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js → chunk-W5HXHC7C.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js.map → chunk-W5HXHC7C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js → chunk-WCWVEXGA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-X47MKQXU.js +6690 -0
- package/dist/cli-bundle/chunks/chunk-X47MKQXU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js → chunk-XBX5CBRQ.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js.map → chunk-XBX5CBRQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SCUR7K7N.js → chunk-XC3X7BQR.js} +541 -44
- package/dist/cli-bundle/chunks/chunk-XC3X7BQR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js → chunk-XHCVAZGM.js} +13 -17
- package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js.map → chunk-XHCVAZGM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js → chunk-XPMXPR7K.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js.map → chunk-XPMXPR7K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js → chunk-XS2TMNXR.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js.map → chunk-XS2TMNXR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js → chunk-XXIYUTLK.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js.map → chunk-XXIYUTLK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EOKXK3R3.js → chunk-XZWL7VNE.js} +1220 -398
- package/dist/cli-bundle/chunks/chunk-XZWL7VNE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js +6624 -0
- package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js → chunk-Y7KYVCZM.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js.map → chunk-Y7KYVCZM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VIIUS6N6.js → chunk-YCVWWIKY.js} +16 -14
- package/dist/cli-bundle/chunks/chunk-YCVWWIKY.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js → chunk-YH5NBDFA.js} +22 -26
- package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js.map → chunk-YH5NBDFA.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js +5509 -0
- package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js → chunk-YPD7SQ5P.js} +7 -6
- package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js.map → chunk-YPD7SQ5P.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js → chunk-YPMZMKN7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js → chunk-YTD5GICJ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js → chunk-ZNEG2UDO.js} +261 -34
- package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js.map → chunk-ZNEG2UDO.js.map} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js → chunk-ZO7CLOY2.js} +3 -3
- package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js → close-3YYQ5OG2.js} +5 -9
- package/dist/cli-bundle/chunks/close-Z3Q4U7TS.js +12 -0
- package/dist/cli-bundle/chunks/close-many-3L2RXH3M.js +22 -0
- package/dist/cli-bundle/chunks/close-many-D366FTIG.js +26 -0
- package/dist/cli-bundle/chunks/comments-54XDJNFE.js +17 -0
- package/dist/cli-bundle/chunks/comments-HGHC2PN6.js +13 -0
- package/dist/cli-bundle/chunks/{copy-32ROBIDL.js → copy-44RT5GDW.js} +4 -8
- package/dist/cli-bundle/chunks/copy-UGMUGHZA.js +9 -0
- package/dist/cli-bundle/chunks/{create-E77SDCUP.js → create-4GWJWPXG.js} +9 -14
- package/dist/cli-bundle/chunks/create-AZXCUYKP.js +25 -0
- package/dist/cli-bundle/chunks/delete-Y6SXIQ4X.js +10 -0
- package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js → delete-YQ2VPXNF.js} +4 -8
- package/dist/cli-bundle/chunks/{deps-32SU7HO5.js → deps-BU5EBJDU.js} +4 -8
- package/dist/cli-bundle/chunks/deps-FMANWFRP.js +13 -0
- package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js → docs-OQBSJNIA.js} +6 -10
- package/dist/cli-bundle/chunks/docs-VNPBZXEL.js +14 -0
- package/dist/cli-bundle/chunks/files-72HZEBOE.js +18 -0
- package/dist/cli-bundle/chunks/{files-PYKR2UUG.js → files-HTSB2KJG.js} +6 -10
- package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js → focus-FOG4ALC2.js} +7 -9
- package/dist/cli-bundle/chunks/focus-SUTMKXGX.js +10 -0
- package/dist/cli-bundle/chunks/{history-compact-3MNXLKAT.js → history-compact-M6IFAMBP.js} +9 -13
- package/dist/cli-bundle/chunks/history-compact-NEXRPP2O.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-P6DYF55G.js → history-redact-NQX3OGZP.js} +7 -11
- package/dist/cli-bundle/chunks/history-redact-WQJBZ3PX.js +17 -0
- package/dist/cli-bundle/chunks/history-repair-CBHMHAJO.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-ZJQFMWPD.js → history-repair-NHOJG7WO.js} +9 -13
- package/dist/cli-bundle/chunks/learnings-M64NTSOR.js +13 -0
- package/dist/cli-bundle/chunks/{append-BGML6VLD.js → learnings-T63JGKKN.js} +9 -11
- package/dist/cli-bundle/chunks/notes-73WE2UV2.js +13 -0
- package/dist/cli-bundle/chunks/notes-U7L6HQQ2.js +17 -0
- package/dist/cli-bundle/chunks/plan-OSCNYFGC.js +24 -0
- package/dist/cli-bundle/chunks/{plan-CHVE7PBR.js → plan-TN537L24.js} +10 -15
- package/dist/cli-bundle/chunks/{profile-ZXGSKBJD.js → profile-MHAMXMHQ.js} +9 -13
- package/dist/cli-bundle/chunks/{profile-LD23PSI6.js → profile-TIGLAKJ7.js} +9 -13
- package/dist/cli-bundle/chunks/{register-list-query-OEYQHFXO.js → register-list-query-OHXD7G5N.js} +41 -33
- package/dist/cli-bundle/chunks/register-list-query-OHXD7G5N.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-B42JCCOI.js → register-list-query-ZCRABAPN.js} +42 -34
- package/dist/cli-bundle/chunks/register-list-query-ZCRABAPN.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js → register-mutation-P3G4XP6Q.js} +36 -41
- package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js.map → register-mutation-P3G4XP6Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js → register-mutation-XX4H56PE.js} +34 -39
- package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js.map → register-mutation-XX4H56PE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5BMM6XQY.js → register-operations-V6PIYEDU.js} +79 -46
- package/dist/cli-bundle/chunks/register-operations-V6PIYEDU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Z3U3U5KD.js → register-operations-V6VKTG54.js} +78 -45
- package/dist/cli-bundle/chunks/register-operations-V6VKTG54.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-3ZVVX2VN.js → register-setup-6RVAWT6W.js} +129 -29
- package/dist/cli-bundle/chunks/register-setup-6RVAWT6W.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-Q6KFNIOZ.js → register-setup-6YVUSQYD.js} +130 -30
- package/dist/cli-bundle/chunks/register-setup-6YVUSQYD.js.map +1 -0
- package/dist/cli-bundle/chunks/{restore-5RQHAPMA.js → restore-HC3YSWF7.js} +7 -11
- package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js +15 -0
- package/dist/cli-bundle/chunks/{schema-HBORFC6B.js → schema-DAGSYO6E.js} +6 -10
- package/dist/cli-bundle/chunks/{schema-245WW4G2.js → schema-UBXJCQAC.js} +6 -10
- package/dist/cli-bundle/chunks/update-CJGG5WMV.js +21 -0
- package/dist/cli-bundle/chunks/update-LKD64AFP.js +25 -0
- package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js +31 -0
- package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js +35 -0
- package/dist/cli-bundle/main.js +29 -31
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +129 -107
- package/dist/cli-bundle/sdk-testing.js +7 -8
- package/dist/cli-bundle/sdk.js +122 -117
- package/dist/cli-bundle/sdk.js.map +2 -2
- 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/flag-contracts.js +7 -7
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +9 -7
- 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 +151 -8
- package/dist/sdk/runtime.js +255 -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/SDK.md +35 -0
- package/docs/TESTING.md +3 -0
- package/package.json +1 -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-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-F7WPGIQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-Z6QUAUSG.js.map → append-PVCTBVJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js.map → chunk-2LEJGRQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js.map → chunk-2TILG6F2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js.map → chunk-3TYOW6RR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js.map → chunk-3X542TEY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js.map → chunk-7VQ3JJN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js.map → chunk-AGAVEDIE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js.map → chunk-AJUON7E6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js.map → chunk-DR2V5OIV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XG625QP4.js.map → chunk-EDO7VXSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js.map → chunk-EVEPHNXJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js.map → chunk-FN6SB4HU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-24YG75HI.js.map → chunk-H2SMKL2N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js.map → chunk-HX6QXV5P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js.map → chunk-P3MJJW7P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js.map → chunk-PDXJXEZJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js.map → chunk-TEKZOS7M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js.map → chunk-V5ZWKJNY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js.map → chunk-VLEA2UTQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js.map → chunk-WCWVEXGA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js.map → chunk-YPMZMKN7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js.map → chunk-YTD5GICJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js.map → chunk-ZO7CLOY2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-BDM6EIAR.js.map → close-3YYQ5OG2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-VQ2DHU3S.js.map → close-Z3Q4U7TS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-RKJYPU74.js.map → close-many-3L2RXH3M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-BGML6VLD.js.map → close-many-D366FTIG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-XP5AWZ5H.js.map → comments-54XDJNFE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-RFS7BROJ.js.map → comments-HGHC2PN6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js.map → copy-44RT5GDW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-GEANHQ2J.js.map → copy-UGMUGHZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-CMZW7ITN.js.map → create-4GWJWPXG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-ZFDIG6M7.js.map → create-AZXCUYKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-XUBPXDYX.js.map → delete-Y6SXIQ4X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-MFSYVNNU.js.map → delete-YQ2VPXNF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-T4FHBSYN.js.map → deps-BU5EBJDU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-D7XQMONX.js.map → deps-FMANWFRP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-DIU275XI.js.map → docs-OQBSJNIA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-JCOYB4LZ.js.map → docs-VNPBZXEL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-BVO7CSLK.js.map → files-72HZEBOE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js.map → files-HTSB2KJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-32ROBIDL.js.map → focus-FOG4ALC2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-NAGLGMHZ.js.map → focus-SUTMKXGX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-E77SDCUP.js.map → history-compact-M6IFAMBP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-4V7SWNBB.js.map → history-compact-NEXRPP2O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js.map → history-redact-NQX3OGZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-NQI5OSKN.js.map → history-redact-WQJBZ3PX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-T7SCWXEX.js.map → history-repair-CBHMHAJO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-32SU7HO5.js.map → history-repair-NHOJG7WO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-WL2IWGWV.js.map → learnings-M64NTSOR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js.map → learnings-T63JGKKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-NF2J5SHR.js.map → notes-73WE2UV2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-SKDT3MZU.js.map → notes-U7L6HQQ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-ZISPBRBC.js.map → plan-OSCNYFGC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-LAXKCAYE.js.map → plan-TN537L24.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-PYKR2UUG.js.map → profile-MHAMXMHQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-EWRQHGIS.js.map → profile-TIGLAKJ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-4T7TM4MT.js.map → restore-HC3YSWF7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-L3YUASOD.js.map → restore-LFAMMRYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-2PCTYYRI.js.map → schema-DAGSYO6E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js.map → schema-UBXJCQAC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-VKQXCXLL.js.map → update-CJGG5WMV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-7DMITJ3G.js.map → update-LKD64AFP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-CVSTAR2F.js.map → update-many-G4SM7BHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-TV3GKTFN.js.map → update-many-VLIV3D7R.js.map} +0 -0
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
// dist/core/lock/lock-gc.js
|
|
2
|
-
|
|
3
|
-
!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]="14efd147-017d-5bb5-9f15-6c3d12dda473")}catch(e){}}();
|
|
4
|
-
import fs from "node:fs/promises";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
function parseLock(raw) {
|
|
7
|
-
let parsed;
|
|
8
|
-
try {
|
|
9
|
-
parsed = JSON.parse(raw);
|
|
10
|
-
} catch {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
const candidate = parsed;
|
|
17
|
-
const { id, owner, created_at, ttl_seconds } = candidate;
|
|
18
|
-
if (typeof id !== "string" || typeof owner !== "string" || typeof created_at !== "string" || typeof ttl_seconds !== "number" || !Number.isFinite(ttl_seconds)) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
return { id, owner, created_at, ttl_seconds };
|
|
22
|
-
}
|
|
23
|
-
function isErrno(error, code) {
|
|
24
|
-
return typeof error === "object" && error !== null && "code" in error && error.code === code;
|
|
25
|
-
}
|
|
26
|
-
function classifyLockContent(file, raw, nowMs) {
|
|
27
|
-
const lock = parseLock(raw);
|
|
28
|
-
if (lock === null) {
|
|
29
|
-
return {
|
|
30
|
-
detail: "unparseable_json",
|
|
31
|
-
entry: {
|
|
32
|
-
file,
|
|
33
|
-
id: null,
|
|
34
|
-
owner: null,
|
|
35
|
-
created_at: null,
|
|
36
|
-
ttl_seconds: null,
|
|
37
|
-
age_seconds: null,
|
|
38
|
-
stale: false,
|
|
39
|
-
reason: "unparseable"
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
const createdAtMs = Date.parse(lock.created_at);
|
|
44
|
-
if (!Number.isFinite(createdAtMs)) {
|
|
45
|
-
return {
|
|
46
|
-
detail: "invalid_timestamp",
|
|
47
|
-
entry: {
|
|
48
|
-
file,
|
|
49
|
-
id: lock.id,
|
|
50
|
-
owner: lock.owner,
|
|
51
|
-
created_at: lock.created_at,
|
|
52
|
-
ttl_seconds: lock.ttl_seconds,
|
|
53
|
-
age_seconds: null,
|
|
54
|
-
stale: false,
|
|
55
|
-
reason: "unparseable"
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
const ageMs = nowMs - createdAtMs;
|
|
60
|
-
const age_seconds = Math.floor(ageMs / 1e3);
|
|
61
|
-
const stale = ageMs > lock.ttl_seconds * 1e3;
|
|
62
|
-
return {
|
|
63
|
-
detail: stale ? "expired" : "active",
|
|
64
|
-
entry: {
|
|
65
|
-
file,
|
|
66
|
-
id: lock.id,
|
|
67
|
-
owner: lock.owner,
|
|
68
|
-
created_at: lock.created_at,
|
|
69
|
-
ttl_seconds: lock.ttl_seconds,
|
|
70
|
-
age_seconds,
|
|
71
|
-
stale,
|
|
72
|
-
reason: stale ? "expired" : "active"
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
async function scanLockHealth(pmRoot, now) {
|
|
77
|
-
const nowMs = now ?? Date.now();
|
|
78
|
-
const locksDir = path.join(pmRoot, "locks");
|
|
79
|
-
const scan = {
|
|
80
|
-
scanned: 0,
|
|
81
|
-
active_lock_count: 0,
|
|
82
|
-
stale_lock_count: 0,
|
|
83
|
-
unreadable_lock_count: 0,
|
|
84
|
-
unparseable_lock_count: 0
|
|
85
|
-
};
|
|
86
|
-
let dirEntries;
|
|
87
|
-
try {
|
|
88
|
-
const rawDir = await fs.readdir(locksDir);
|
|
89
|
-
dirEntries = rawDir.filter((f) => f.endsWith(".lock")).sort();
|
|
90
|
-
} catch (error) {
|
|
91
|
-
if (isErrno(error, "ENOENT")) {
|
|
92
|
-
return scan;
|
|
93
|
-
}
|
|
94
|
-
throw error;
|
|
95
|
-
}
|
|
96
|
-
for (const file of dirEntries) {
|
|
97
|
-
let raw;
|
|
98
|
-
try {
|
|
99
|
-
raw = await fs.readFile(path.join(locksDir, file), "utf8");
|
|
100
|
-
} catch (readError) {
|
|
101
|
-
if (isErrno(readError, "ENOENT")) {
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
scan.scanned += 1;
|
|
105
|
-
scan.unreadable_lock_count += 1;
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
scan.scanned += 1;
|
|
109
|
-
const { detail } = classifyLockContent(file, raw, nowMs);
|
|
110
|
-
if (detail === "active") {
|
|
111
|
-
scan.active_lock_count += 1;
|
|
112
|
-
} else if (detail === "expired") {
|
|
113
|
-
scan.stale_lock_count += 1;
|
|
114
|
-
} else {
|
|
115
|
-
scan.unparseable_lock_count += 1;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return scan;
|
|
119
|
-
}
|
|
120
|
-
async function runLockGc(pmRoot, options) {
|
|
121
|
-
const { dryRun, hooks } = options;
|
|
122
|
-
const nowMs = options.now ?? Date.now();
|
|
123
|
-
const locksDir = path.join(pmRoot, "locks");
|
|
124
|
-
const result = {
|
|
125
|
-
scanned: 0,
|
|
126
|
-
removed: [],
|
|
127
|
-
retained: [],
|
|
128
|
-
warnings: [],
|
|
129
|
-
entries: []
|
|
130
|
-
};
|
|
131
|
-
let dirEntries;
|
|
132
|
-
try {
|
|
133
|
-
const raw = await fs.readdir(locksDir);
|
|
134
|
-
dirEntries = raw.filter((f) => f.endsWith(".lock")).sort();
|
|
135
|
-
} catch (error) {
|
|
136
|
-
if (isErrno(error, "ENOENT")) {
|
|
137
|
-
return result;
|
|
138
|
-
}
|
|
139
|
-
throw error;
|
|
140
|
-
}
|
|
141
|
-
for (const file of dirEntries) {
|
|
142
|
-
result.scanned += 1;
|
|
143
|
-
const absPath = path.join(locksDir, file);
|
|
144
|
-
const relPath = `locks/${file}`;
|
|
145
|
-
if (hooks?.onRead) {
|
|
146
|
-
const hookWarnings = await hooks.onRead(absPath);
|
|
147
|
-
result.warnings.push(...hookWarnings);
|
|
148
|
-
}
|
|
149
|
-
let raw;
|
|
150
|
-
try {
|
|
151
|
-
raw = await fs.readFile(absPath, "utf8");
|
|
152
|
-
} catch (readError) {
|
|
153
|
-
if (isErrno(readError, "ENOENT")) {
|
|
154
|
-
result.scanned -= 1;
|
|
155
|
-
continue;
|
|
156
|
-
}
|
|
157
|
-
result.warnings.push(`lock_unreadable:${file}`);
|
|
158
|
-
result.retained.push(relPath);
|
|
159
|
-
result.entries.push({
|
|
160
|
-
file,
|
|
161
|
-
id: null,
|
|
162
|
-
owner: null,
|
|
163
|
-
created_at: null,
|
|
164
|
-
ttl_seconds: null,
|
|
165
|
-
age_seconds: null,
|
|
166
|
-
stale: false,
|
|
167
|
-
reason: "unparseable"
|
|
168
|
-
});
|
|
169
|
-
continue;
|
|
170
|
-
}
|
|
171
|
-
const classified = classifyLockContent(file, raw, nowMs);
|
|
172
|
-
if (classified.detail === "unparseable_json") {
|
|
173
|
-
result.warnings.push(`lock_unparseable:${file}`);
|
|
174
|
-
result.retained.push(relPath);
|
|
175
|
-
result.entries.push(classified.entry);
|
|
176
|
-
continue;
|
|
177
|
-
}
|
|
178
|
-
if (classified.detail === "invalid_timestamp") {
|
|
179
|
-
result.warnings.push(`lock_invalid_timestamp:${file}`);
|
|
180
|
-
result.retained.push(relPath);
|
|
181
|
-
result.entries.push(classified.entry);
|
|
182
|
-
continue;
|
|
183
|
-
}
|
|
184
|
-
if (classified.detail === "active") {
|
|
185
|
-
result.retained.push(relPath);
|
|
186
|
-
result.entries.push(classified.entry);
|
|
187
|
-
continue;
|
|
188
|
-
}
|
|
189
|
-
if (!dryRun) {
|
|
190
|
-
try {
|
|
191
|
-
await fs.unlink(absPath);
|
|
192
|
-
} catch (unlinkError) {
|
|
193
|
-
if (!isErrno(unlinkError, "ENOENT")) {
|
|
194
|
-
result.warnings.push(`lock_remove_failed:${file}`);
|
|
195
|
-
result.retained.push(relPath);
|
|
196
|
-
result.entries.push(classified.entry);
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
if (hooks?.onWrite) {
|
|
201
|
-
const hookWarnings = await hooks.onWrite(absPath);
|
|
202
|
-
result.warnings.push(...hookWarnings);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
result.removed.push(relPath);
|
|
206
|
-
result.entries.push(classified.entry);
|
|
207
|
-
}
|
|
208
|
-
return result;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export {
|
|
212
|
-
scanLockHealth,
|
|
213
|
-
runLockGc
|
|
214
|
-
};
|
|
215
|
-
//# sourceMappingURL=chunk-37E72CNS.js.map
|
|
216
|
-
|
|
217
|
-
//# debugId=14efd147-017d-5bb5-9f15-6c3d12dda473
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../core/lock/lock-gc.ts"],"sourcesContent":["/**\n * lock-gc.ts — Stale lock file garbage collector.\n *\n * Safety-first policy: if a lock file cannot be read or parsed, it is RETAINED\n * rather than deleted. We only remove locks whose staleness can be conclusively\n * determined from the lock's own embedded `ttl_seconds` field.\n *\n * Staleness formula: (now_ms - Date.parse(created_at)) > ttl_seconds * 1000\n * Zero ttl means any lock older than 0 ms is stale. Negative ttl means always stale.\n */\n\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\n\n/**\n * Documents the stale lock scan entry payload exchanged by command, SDK, and package integrations.\n */\nexport interface StaleLockScanEntry {\n /** e.g. \"pm-abc1.lock\" */\n file: string;\n /** parsed id, or null if unparseable */\n id: string | null;\n owner: string | null;\n created_at: string | null;\n ttl_seconds: number | null;\n /** floor((now - created_at)/1000), null if unparseable */\n age_seconds: number | null;\n /** true only when classified expired */\n stale: boolean;\n reason: \"expired\" | \"active\" | \"unparseable\";\n}\n\n/**\n * Documents the lock gc hooks payload exchanged by command, SDK, and package integrations.\n */\nexport interface LockGcHooks {\n onRead?: (lockPath: string) => Promise<string[]> | string[];\n onWrite?: (lockPath: string) => Promise<string[]> | string[];\n}\n\n/**\n * Documents the lock gc options payload exchanged by command, SDK, and package integrations.\n */\nexport interface LockGcOptions {\n dryRun: boolean;\n /** epoch ms; defaults to Date.now() — injectable for deterministic tests */\n now?: number;\n hooks?: LockGcHooks;\n}\n\n/**\n * Documents the lock gc result payload exchanged by command, SDK, and package integrations.\n */\nexport interface LockGcResult {\n /** number of *.lock files examined */\n scanned: number;\n /** relative paths like \"locks/pm-abc1.lock\" (removed, or would-remove under dryRun) */\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 *.lock file, sorted by file name asc */\n entries: StaleLockScanEntry[];\n}\n\ninterface ParsedLock {\n id: string;\n owner: string;\n created_at: string;\n ttl_seconds: number;\n}\n\nfunction parseLock(raw: string): ParsedLock | 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 candidate = parsed as Record<string, unknown>;\n const { id, owner, created_at, ttl_seconds } = candidate;\n if (\n typeof id !== \"string\" ||\n typeof owner !== \"string\" ||\n typeof created_at !== \"string\" ||\n typeof ttl_seconds !== \"number\" ||\n !Number.isFinite(ttl_seconds)\n ) {\n return null;\n }\n return { id, owner, created_at, ttl_seconds };\n}\n\nfunction isErrno(error: unknown, code: string): boolean {\n return (\n typeof error === \"object\" &&\n error !== null &&\n \"code\" in error &&\n (error as { code?: string }).code === code\n );\n}\n\n/**\n * Fine-grained classification outcome for one readable lock file's content.\n * `unparseable_json` and `invalid_timestamp` both surface as the coarse\n * `reason: \"unparseable\"` on the scan entry (gc retains both), but stay\n * distinct here so callers can emit precise warnings.\n */\nexport type LockClassificationDetail = \"active\" | \"expired\" | \"unparseable_json\" | \"invalid_timestamp\";\n\n/**\n * Documents the lock content classification payload exchanged by command, SDK, and package integrations.\n */\nexport interface LockContentClassification {\n detail: LockClassificationDetail;\n entry: StaleLockScanEntry;\n}\n\n/**\n * Pure classification of one lock file's raw content against `nowMs`. This is\n * the single staleness/parse policy shared by `pm gc --scope locks` (which acts\n * on it) and the `pm health` locks check (which only reports it).\n */\nexport function classifyLockContent(file: string, raw: string, nowMs: number): LockContentClassification {\n const lock = parseLock(raw);\n if (lock === null) {\n return {\n detail: \"unparseable_json\",\n entry: {\n file,\n id: null,\n owner: null,\n created_at: null,\n ttl_seconds: null,\n age_seconds: null,\n stale: false,\n reason: \"unparseable\",\n },\n };\n }\n const createdAtMs = Date.parse(lock.created_at);\n if (!Number.isFinite(createdAtMs)) {\n return {\n detail: \"invalid_timestamp\",\n entry: {\n file,\n id: lock.id,\n owner: lock.owner,\n created_at: lock.created_at,\n ttl_seconds: lock.ttl_seconds,\n age_seconds: null,\n stale: false,\n reason: \"unparseable\",\n },\n };\n }\n const ageMs = nowMs - createdAtMs;\n const age_seconds = Math.floor(ageMs / 1000);\n const stale = ageMs > lock.ttl_seconds * 1000;\n return {\n detail: stale ? \"expired\" : \"active\",\n entry: {\n file,\n id: lock.id,\n owner: lock.owner,\n created_at: lock.created_at,\n ttl_seconds: lock.ttl_seconds,\n age_seconds,\n stale,\n reason: stale ? \"expired\" : \"active\",\n },\n };\n}\n\n/**\n * Documents the lock health scan payload exchanged by command, SDK, and package integrations.\n */\nexport interface LockHealthScan {\n /** number of *.lock files examined (ghost files that vanish mid-scan are skipped) */\n scanned: number;\n active_lock_count: number;\n stale_lock_count: number;\n unreadable_lock_count: number;\n /** invalid JSON, wrong shape, or an unparseable created_at timestamp */\n unparseable_lock_count: number;\n}\n\n/**\n * Read-only locks scan for `pm health`: classifies every lock file with the\n * same policy `pm gc --scope locks` uses but never removes anything.\n */\nexport async function scanLockHealth(pmRoot: string, now?: number): Promise<LockHealthScan> {\n const nowMs = now ?? Date.now();\n const locksDir = path.join(pmRoot, \"locks\");\n const scan: LockHealthScan = {\n scanned: 0,\n active_lock_count: 0,\n stale_lock_count: 0,\n unreadable_lock_count: 0,\n unparseable_lock_count: 0,\n };\n\n let dirEntries: string[];\n try {\n const rawDir = await fs.readdir(locksDir);\n dirEntries = rawDir.filter((f) => f.endsWith(\".lock\")).sort();\n } catch (error: unknown) {\n if (isErrno(error, \"ENOENT\")) {\n return scan;\n }\n throw error;\n }\n\n for (const file of dirEntries) {\n let raw: string;\n try {\n raw = await fs.readFile(path.join(locksDir, file), \"utf8\");\n } catch (readError: unknown) {\n if (isErrno(readError, \"ENOENT\")) {\n // Disappeared between readdir and readFile — treat as a ghost; skip quietly.\n continue;\n }\n scan.scanned += 1;\n scan.unreadable_lock_count += 1;\n continue;\n }\n scan.scanned += 1;\n const { detail } = classifyLockContent(file, raw, nowMs);\n if (detail === \"active\") {\n scan.active_lock_count += 1;\n } else if (detail === \"expired\") {\n scan.stale_lock_count += 1;\n } else {\n scan.unparseable_lock_count += 1;\n }\n }\n\n return scan;\n}\n\n/**\n * Implements run lock gc for the public runtime surface of this module.\n */\nexport async function runLockGc(pmRoot: string, options: LockGcOptions): Promise<LockGcResult> {\n const { dryRun, hooks } = options;\n const nowMs = options.now ?? Date.now();\n const locksDir = path.join(pmRoot, \"locks\");\n\n const result: LockGcResult = {\n scanned: 0,\n removed: [],\n retained: [],\n warnings: [],\n entries: [],\n };\n\n let dirEntries: string[];\n try {\n const raw = await fs.readdir(locksDir);\n dirEntries = raw.filter((f) => f.endsWith(\".lock\")).sort();\n } catch (error: unknown) {\n if (isErrno(error, \"ENOENT\")) {\n return result;\n }\n throw error;\n }\n\n for (const file of dirEntries) {\n result.scanned += 1;\n const absPath = path.join(locksDir, file);\n const relPath = `locks/${file}`;\n\n // --- onRead hook ---\n if (hooks?.onRead) {\n const hookWarnings = await hooks.onRead(absPath);\n result.warnings.push(...hookWarnings);\n }\n\n // --- read file ---\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(`lock_unreadable:${file}`);\n result.retained.push(relPath);\n result.entries.push({\n file,\n id: null,\n owner: null,\n created_at: null,\n ttl_seconds: null,\n age_seconds: null,\n stale: false,\n reason: \"unparseable\",\n });\n continue;\n }\n\n // --- classify (shared with the read-only pm health locks scan) ---\n const classified = classifyLockContent(file, raw, nowMs);\n if (classified.detail === \"unparseable_json\") {\n result.warnings.push(`lock_unparseable:${file}`);\n result.retained.push(relPath);\n result.entries.push(classified.entry);\n continue;\n }\n if (classified.detail === \"invalid_timestamp\") {\n result.warnings.push(`lock_invalid_timestamp:${file}`);\n result.retained.push(relPath);\n result.entries.push(classified.entry);\n continue;\n }\n if (classified.detail === \"active\") {\n result.retained.push(relPath);\n result.entries.push(classified.entry);\n continue;\n }\n\n // --- stale: remove or preview ---\n if (!dryRun) {\n try {\n await fs.unlink(absPath);\n } catch (unlinkError: unknown) {\n if (!isErrno(unlinkError, \"ENOENT\")) {\n result.warnings.push(`lock_remove_failed:${file}`);\n result.retained.push(relPath);\n result.entries.push(classified.entry);\n continue;\n }\n // ENOENT on unlink = already gone (race); treat as removed\n }\n // onWrite hook after successful removal\n if (hooks?.onWrite) {\n const hookWarnings = await hooks.onWrite(absPath);\n result.warnings.push(...hookWarnings);\n }\n }\n\n result.removed.push(relPath);\n result.entries.push(classified.entry);\n }\n\n return result;\n}\n"],"names":[],"mappings":";;;AAWA,OAAO,QAAQ;AACf,OAAO,UAAU;AA4DjB,SAAS,UAAU,KAAW;AAC5B,MAAI;AACJ,MAAI;AACF,aAAS,KAAK,MAAM,GAAG;EACzB,QAAQ;AACN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O,OAAO;MACzB,SAAS,aAAsB;AAC7B,YAAI,CAAC,QAAQ,aAAa,QAAQ,GAAG;AACnC,iBAAO,SAAS,KAAK,sBAAsB,IAAI,EAAE;AACjD,iBAAO,SAAS,KAAK,OAAO;AAC5B,iBAAO,QAAQ,KAAK,WAAW,KAAK;AACpC;QACF;MAEF;AAEA,UAAI,OAAO,SAAS;AAClB,cAAM,eAAe,MAAM,MAAM,QAAQ,OAAO;AAChD,eAAO,SAAS,KAAK,GAAG,YAAY;MACtC;IACF;AAEA,WAAO,QAAQ,KAAK,OAAO;AAC3B,WAAO,QAAQ,KAAK,WAAW,KAAK;EACtC;AAEA,SAAO;AACT","debugId":"14efd147-017d-5bb5-9f15-6c3d12dda473"}
|
|
@@ -1,228 +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]="6beae0c5-95ce-5ca2-9c64-67075f518c1a")}catch(e){}}();
|
|
3
|
-
import {
|
|
4
|
-
PmCliError
|
|
5
|
-
} from "./chunk-E3SZTQ4K.js";
|
|
6
|
-
import {
|
|
7
|
-
evictOldestMemoEntries
|
|
8
|
-
} from "./chunk-NNHHXJB2.js";
|
|
9
|
-
import {
|
|
10
|
-
EXIT_CODE
|
|
11
|
-
} from "./chunk-57NWPFF2.js";
|
|
12
|
-
|
|
13
|
-
// dist/core/shared/time.js
|
|
14
|
-
var RELATIVE_DEADLINE = /^([+-]?)(\d+)([hdwm])$/i;
|
|
15
|
-
var COMPOUND_RELATIVE_DEADLINE = /^[+-]?\d+[hdwm](?:[+-]\d+[hdwm])+$/i;
|
|
16
|
-
var COMPACT_DATE = /^(\d{4})(\d{2})(\d{2})$/;
|
|
17
|
-
var COMPACT_DATETIME = /^(\d{4})(\d{2})(\d{2})(?:[T\s]?)(\d{2})(\d{2})(\d{2})?([.,]\d{1,3})?(Z|[+-]\d{2}:?\d{2})?$/i;
|
|
18
|
-
var HYPHEN_TIME = /^(\d{4}-\d{2}-\d{2})[T\s](\d{2})-(\d{2})(?:-(\d{2}))?([.,]\d{1,3})?(Z|[+-]\d{2}:?\d{2})?$/i;
|
|
19
|
-
var COMPACT_TIME = /^(\d{4}-\d{2}-\d{2})[T\s](\d{2})(\d{2})(\d{2})?([.,]\d{1,3})?(Z|[+-]\d{2}:?\d{2})?$/i;
|
|
20
|
-
function nowIso() {
|
|
21
|
-
return (/* @__PURE__ */ new Date()).toISOString();
|
|
22
|
-
}
|
|
23
|
-
function isTimestampLiteral(input) {
|
|
24
|
-
return Number.isFinite(Date.parse(input));
|
|
25
|
-
}
|
|
26
|
-
var TIMESTAMP_PARSE_MEMO_MAX_ENTRIES = 1e4;
|
|
27
|
-
var timestampParseMemo = /* @__PURE__ */ new Map();
|
|
28
|
-
function parseTimestampMsMemoized(value) {
|
|
29
|
-
const memoized = timestampParseMemo.get(value);
|
|
30
|
-
if (memoized !== void 0) {
|
|
31
|
-
return memoized;
|
|
32
|
-
}
|
|
33
|
-
const parsed = Date.parse(value);
|
|
34
|
-
if (timestampParseMemo.size >= TIMESTAMP_PARSE_MEMO_MAX_ENTRIES) {
|
|
35
|
-
evictOldestMemoEntries(timestampParseMemo);
|
|
36
|
-
}
|
|
37
|
-
timestampParseMemo.set(value, parsed);
|
|
38
|
-
return parsed;
|
|
39
|
-
}
|
|
40
|
-
function compareTimestampStrings(left, right) {
|
|
41
|
-
const leftMs = parseTimestampMsMemoized(left);
|
|
42
|
-
const rightMs = parseTimestampMsMemoized(right);
|
|
43
|
-
if (Number.isFinite(leftMs) && Number.isFinite(rightMs) && leftMs !== rightMs) {
|
|
44
|
-
return leftMs - rightMs;
|
|
45
|
-
}
|
|
46
|
-
return left.localeCompare(right);
|
|
47
|
-
}
|
|
48
|
-
function normalizeFraction(raw) {
|
|
49
|
-
if (!raw)
|
|
50
|
-
return "";
|
|
51
|
-
const digits = raw.slice(1);
|
|
52
|
-
return `.${digits.padEnd(3, "0").slice(0, 3)}`;
|
|
53
|
-
}
|
|
54
|
-
function normalizeOffset(raw) {
|
|
55
|
-
if (!raw)
|
|
56
|
-
return "";
|
|
57
|
-
if (raw.toUpperCase() === "Z")
|
|
58
|
-
return "Z";
|
|
59
|
-
const compact = /^([+-]\d{2})(\d{2})$/.exec(raw);
|
|
60
|
-
if (compact)
|
|
61
|
-
return `${compact[1]}:${compact[2]}`;
|
|
62
|
-
return raw;
|
|
63
|
-
}
|
|
64
|
-
function pushTimestampCandidate(candidates, input, value) {
|
|
65
|
-
if (!value)
|
|
66
|
-
return;
|
|
67
|
-
if (value === input)
|
|
68
|
-
return;
|
|
69
|
-
if (candidates.includes(value))
|
|
70
|
-
return;
|
|
71
|
-
candidates.push(value);
|
|
72
|
-
}
|
|
73
|
-
function normalizeTimestampCandidates(input) {
|
|
74
|
-
const candidates = [];
|
|
75
|
-
const push = (value) => pushTimestampCandidate(candidates, input, value);
|
|
76
|
-
const compactDate = COMPACT_DATE.exec(input);
|
|
77
|
-
if (compactDate) {
|
|
78
|
-
const [, year, month, day] = compactDate;
|
|
79
|
-
push(`${year}-${month}-${day}`);
|
|
80
|
-
}
|
|
81
|
-
const compactDateTime = COMPACT_DATETIME.exec(input);
|
|
82
|
-
if (compactDateTime) {
|
|
83
|
-
const [, year, month, day, hour, minute, secondRaw, fractionRaw, offsetRaw] = compactDateTime;
|
|
84
|
-
const second = secondRaw ? `:${secondRaw}` : "";
|
|
85
|
-
push(`${year}-${month}-${day}T${hour}:${minute}${second}${normalizeFraction(fractionRaw)}${normalizeOffset(offsetRaw)}`);
|
|
86
|
-
}
|
|
87
|
-
const hyphenTime = HYPHEN_TIME.exec(input);
|
|
88
|
-
if (hyphenTime) {
|
|
89
|
-
const [, datePart, hour, minute, secondRaw, fractionRaw, offsetRaw] = hyphenTime;
|
|
90
|
-
const second = secondRaw ? `:${secondRaw}` : "";
|
|
91
|
-
push(`${datePart}T${hour}:${minute}${second}${normalizeFraction(fractionRaw)}${normalizeOffset(offsetRaw)}`);
|
|
92
|
-
}
|
|
93
|
-
const compactTime = COMPACT_TIME.exec(input);
|
|
94
|
-
if (compactTime) {
|
|
95
|
-
const [, datePart, hour, minute, secondRaw, fractionRaw, offsetRaw] = compactTime;
|
|
96
|
-
const second = secondRaw ? `:${secondRaw}` : "";
|
|
97
|
-
push(`${datePart}T${hour}:${minute}${second}${normalizeFraction(fractionRaw)}${normalizeOffset(offsetRaw)}`);
|
|
98
|
-
}
|
|
99
|
-
const datePrefixLength = 10;
|
|
100
|
-
const datePrefix = input.slice(0, datePrefixLength);
|
|
101
|
-
if (isHyphenDatePrefix(datePrefix)) {
|
|
102
|
-
let index = datePrefixLength;
|
|
103
|
-
while (index < input.length && isWhitespaceCharacter(input[index])) {
|
|
104
|
-
index += 1;
|
|
105
|
-
}
|
|
106
|
-
if (index < input.length) {
|
|
107
|
-
push(`${datePrefix}T${input.slice(index)}`);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return candidates;
|
|
111
|
-
}
|
|
112
|
-
function parseTimestampWithFallbacks(input) {
|
|
113
|
-
const direct = Date.parse(input);
|
|
114
|
-
if (Number.isFinite(direct))
|
|
115
|
-
return direct;
|
|
116
|
-
for (const candidate of normalizeTimestampCandidates(input)) {
|
|
117
|
-
const parsed = Date.parse(candidate);
|
|
118
|
-
if (Number.isFinite(parsed))
|
|
119
|
-
return parsed;
|
|
120
|
-
}
|
|
121
|
-
return Number.NaN;
|
|
122
|
-
}
|
|
123
|
-
function isHyphenDatePrefix(value) {
|
|
124
|
-
if (value.length !== 10) {
|
|
125
|
-
return false;
|
|
126
|
-
}
|
|
127
|
-
for (let index = 0; index < value.length; index += 1) {
|
|
128
|
-
const character = value[index];
|
|
129
|
-
if (index === 4 || index === 7) {
|
|
130
|
-
if (character !== "-") {
|
|
131
|
-
return false;
|
|
132
|
-
}
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
|
-
const code = character.charCodeAt(0);
|
|
136
|
-
if (code < 48 || code > 57) {
|
|
137
|
-
return false;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return true;
|
|
141
|
-
}
|
|
142
|
-
function isWhitespaceCharacter(character) {
|
|
143
|
-
if (!character) {
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
return character === " " || character === " " || character === "\n" || character === "\r" || character === "\f" || character === "\v";
|
|
147
|
-
}
|
|
148
|
-
function daysInUtcMonth(year, monthIndex) {
|
|
149
|
-
return new Date(Date.UTC(year, monthIndex + 1, 0)).getUTCDate();
|
|
150
|
-
}
|
|
151
|
-
var MONTH_NAMES = [
|
|
152
|
-
"January",
|
|
153
|
-
"February",
|
|
154
|
-
"March",
|
|
155
|
-
"April",
|
|
156
|
-
"May",
|
|
157
|
-
"June",
|
|
158
|
-
"July",
|
|
159
|
-
"August",
|
|
160
|
-
"September",
|
|
161
|
-
"October",
|
|
162
|
-
"November",
|
|
163
|
-
"December"
|
|
164
|
-
];
|
|
165
|
-
var LEADING_HYPHEN_DATE = /^(\d{4})-(\d{2})-(\d{2})/;
|
|
166
|
-
var LEADING_COMPACT_DATE = /^(\d{4})(\d{2})(\d{2})(?:[T ]?\d{2}|$)/;
|
|
167
|
-
function assertRealCalendarDate(originalInput, trimmed, fieldLabel) {
|
|
168
|
-
const match = LEADING_HYPHEN_DATE.exec(trimmed) ?? LEADING_COMPACT_DATE.exec(trimmed);
|
|
169
|
-
if (!match) {
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
const year = Number.parseInt(match[1], 10);
|
|
173
|
-
const month = Number.parseInt(match[2], 10);
|
|
174
|
-
const day = Number.parseInt(match[3], 10);
|
|
175
|
-
const label = fieldLabel?.trim() || "deadline";
|
|
176
|
-
if (month < 1 || month > 12) {
|
|
177
|
-
throw new PmCliError(`Invalid ${label} value "${originalInput}". Month "${match[2]}" is out of range \u2014 use a month between 01 and 12.`, EXIT_CODE.USAGE);
|
|
178
|
-
}
|
|
179
|
-
const maxDay = daysInUtcMonth(year, month - 1);
|
|
180
|
-
if (day < 1 || day > maxDay) {
|
|
181
|
-
throw new PmCliError(`Invalid ${label} value "${originalInput}". ${MONTH_NAMES[month - 1]} ${year} has ${maxDay} days, so day "${match[3]}" does not exist. Use a real YYYY-MM-DD calendar date.`, EXIT_CODE.USAGE);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
function addUtcMonths(now, amount) {
|
|
185
|
-
const result = new Date(now.getTime());
|
|
186
|
-
const startDay = result.getUTCDate();
|
|
187
|
-
const targetMonthIndex = result.getUTCMonth() + amount;
|
|
188
|
-
const targetYear = result.getUTCFullYear() + Math.floor(targetMonthIndex / 12);
|
|
189
|
-
const targetMonth = (targetMonthIndex % 12 + 12) % 12;
|
|
190
|
-
const day = Math.min(startDay, daysInUtcMonth(targetYear, targetMonth));
|
|
191
|
-
result.setUTCFullYear(targetYear, targetMonth, day);
|
|
192
|
-
return result;
|
|
193
|
-
}
|
|
194
|
-
function resolveIsoOrRelative(input, now = /* @__PURE__ */ new Date(), fieldLabel = "deadline") {
|
|
195
|
-
const trimmed = input.trim();
|
|
196
|
-
if (trimmed.toLowerCase() === "now") {
|
|
197
|
-
return now.toISOString();
|
|
198
|
-
}
|
|
199
|
-
const relative = RELATIVE_DEADLINE.exec(trimmed);
|
|
200
|
-
if (relative) {
|
|
201
|
-
const sign = relative[1] === "-" ? -1 : 1;
|
|
202
|
-
const amount = Number.parseInt(relative[2], 10) * sign;
|
|
203
|
-
const unit = relative[3].toLowerCase();
|
|
204
|
-
if (unit === "m") {
|
|
205
|
-
return addUtcMonths(now, amount).toISOString();
|
|
206
|
-
}
|
|
207
|
-
const msPerUnit = unit === "h" ? 60 * 60 * 1e3 : unit === "d" ? 24 * 60 * 60 * 1e3 : 7 * 24 * 60 * 60 * 1e3;
|
|
208
|
-
return new Date(now.getTime() + amount * msPerUnit).toISOString();
|
|
209
|
-
}
|
|
210
|
-
assertRealCalendarDate(input, trimmed, fieldLabel);
|
|
211
|
-
const timestamp = parseTimestampWithFallbacks(trimmed);
|
|
212
|
-
if (!Number.isFinite(timestamp)) {
|
|
213
|
-
const normalizedLabel = fieldLabel.trim().length > 0 ? fieldLabel.trim() : "deadline";
|
|
214
|
-
const guidance = COMPOUND_RELATIVE_DEADLINE.test(trimmed) ? "Compound relative expressions like +3d+1h are not supported; use a single relative token (for example +3d) or an ISO/date string." : 'Use ISO/date string input, "now", or relative +6h/-6h/+1d/-1d/+2w/-2w/+6m/-6m.';
|
|
215
|
-
throw new PmCliError(`Invalid ${normalizedLabel} value "${input}". ${guidance}`, EXIT_CODE.USAGE);
|
|
216
|
-
}
|
|
217
|
-
return new Date(timestamp).toISOString();
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export {
|
|
221
|
-
nowIso,
|
|
222
|
-
isTimestampLiteral,
|
|
223
|
-
compareTimestampStrings,
|
|
224
|
-
resolveIsoOrRelative
|
|
225
|
-
};
|
|
226
|
-
//# sourceMappingURL=chunk-3GCS5SKL.js.map
|
|
227
|
-
|
|
228
|
-
//# debugId=6beae0c5-95ce-5ca2-9c64-67075f518c1a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../core/shared/time.ts"],"sourcesContent":["/**\n * @module core/shared/time\n *\n * Provides shared primitives and utilities for Time.\n */\nimport { PmCliError } from \"./errors.js\";\nimport { evictOldestMemoEntries } from \"./memo.js\";\nimport { EXIT_CODE } from \"./constants.js\";\n\nconst RELATIVE_DEADLINE = /^([+-]?)(\\d+)([hdwm])$/i;\nconst COMPOUND_RELATIVE_DEADLINE = /^[+-]?\\d+[hdwm](?:[+-]\\d+[hdwm])+$/i;\nconst COMPACT_DATE = /^(\\d{4})(\\d{2})(\\d{2})$/;\nconst COMPACT_DATETIME = /^(\\d{4})(\\d{2})(\\d{2})(?:[T\\s]?)(\\d{2})(\\d{2})(\\d{2})?([.,]\\d{1,3})?(Z|[+-]\\d{2}:?\\d{2})?$/i;\nconst HYPHEN_TIME = /^(\\d{4}-\\d{2}-\\d{2})[T\\s](\\d{2})-(\\d{2})(?:-(\\d{2}))?([.,]\\d{1,3})?(Z|[+-]\\d{2}:?\\d{2})?$/i;\nconst COMPACT_TIME = /^(\\d{4}-\\d{2}-\\d{2})[T\\s](\\d{2})(\\d{2})(\\d{2})?([.,]\\d{1,3})?(Z|[+-]\\d{2}:?\\d{2})?$/i;\n\n/**\n * Implements now iso for the public runtime surface of this module.\n */\nexport function nowIso(): string {\n return new Date().toISOString();\n}\n\n/**\n * Implements check whether timestamp literal for the public runtime surface of this module.\n */\nexport function isTimestampLiteral(input: string): boolean {\n return Number.isFinite(Date.parse(input));\n}\n\n/**\n * Memoized `Date.parse` for {@link compareTimestampStrings}. Sort comparators call it\n * O(n log n) times over a corpus whose timestamp strings repeat heavily, and\n * `Date.parse` is expensive enough to show up in list/next/context profiles. The cap\n * bounds memory in long-lived hosts (the MCP server); half-eviction keeps the\n * newest-inserted half when the cap is hit.\n */\nconst TIMESTAMP_PARSE_MEMO_MAX_ENTRIES = 10_000;\nconst timestampParseMemo = new Map<string, number>();\n\nfunction parseTimestampMsMemoized(value: string): number {\n const memoized = timestampParseMemo.get(value);\n if (memoized !== undefined) {\n return memoized;\n }\n const parsed = Date.parse(value);\n if (timestampParseMemo.size >= TIMESTAMP_PARSE_MEMO_MAX_ENTRIES) {\n evictOldestMemoEntries(timestampParseMemo);\n }\n timestampParseMemo.set(value, parsed);\n return parsed;\n}\n\n/**\n * Implements compare timestamp strings for the public runtime surface of this module.\n */\nexport function compareTimestampStrings(left: string, right: string): number {\n const leftMs = parseTimestampMsMemoized(left);\n const rightMs = parseTimestampMsMemoized(right);\n if (Number.isFinite(leftMs) && Number.isFinite(rightMs) && leftMs !== rightMs) {\n return leftMs - rightMs;\n }\n return left.localeCompare(right);\n}\n\nfunction normalizeFraction(raw: string | undefined): string {\n if (!raw) return \"\";\n const digits = raw.slice(1);\n return `.${digits.padEnd(3, \"0\").slice(0, 3)}`;\n}\n\nfunction normalizeOffset(raw: string | undefined): string {\n if (!raw) return \"\";\n if (raw.toUpperCase() === \"Z\") return \"Z\";\n const compact = /^([+-]\\d{2})(\\d{2})$/.exec(raw);\n if (compact) return `${compact[1]}:${compact[2]}`;\n return raw;\n}\n\nfunction pushTimestampCandidate(candidates: string[], input: string, value: string | undefined): void {\n if (!value) return;\n if (value === input) return;\n if (candidates.includes(value)) return;\n candidates.push(value);\n}\n\nfunction normalizeTimestampCandidates(input: string): string[] {\n const candidates: string[] = [];\n const push = (value: string | undefined): void => pushTimestampCandidate(candidates, input, value);\n\n const compactDate = COMPACT_DATE.exec(input);\n if (compactDate) {\n const [, year, month, day] = compactDate;\n push(`${year}-${month}-${day}`);\n }\n\n const compactDateTime = COMPACT_DATETIME.exec(input);\n if (compactDateTime) {\n const [, year, month, day, hour, minute, secondRaw, fractionRaw, offsetRaw] = compactDateTime;\n const second = secondRaw ? `:${secondRaw}` : \"\";\n push(\n `${year}-${month}-${day}T${hour}:${minute}${second}${normalizeFraction(fractionRaw)}${normalizeOffset(offsetRaw)}`,\n );\n }\n\n const hyphenTime = HYPHEN_TIME.exec(input);\n if (hyphenTime) {\n const [, datePart, hour, minute, secondRaw, fractionRaw, offsetRaw] = hyphenTime;\n const second = secondRaw ? `:${secondRaw}` : \"\";\n push(`${datePart}T${hour}:${minute}${second}${normalizeFraction(fractionRaw)}${normalizeOffset(offsetRaw)}`);\n }\n\n const compactTime = COMPACT_TIME.exec(input);\n if (compactTime) {\n const [, datePart, hour, minute, secondRaw, fractionRaw, offsetRaw] = compactTime;\n const second = secondRaw ? `:${secondRaw}` : \"\";\n push(`${datePart}T${hour}:${minute}${second}${normalizeFraction(fractionRaw)}${normalizeOffset(offsetRaw)}`);\n }\n\n const datePrefixLength = 10;\n const datePrefix = input.slice(0, datePrefixLength);\n if (isHyphenDatePrefix(datePrefix)) {\n let index = datePrefixLength;\n while (index < input.length && isWhitespaceCharacter(input[index])) {\n index += 1;\n }\n if (index < input.length) {\n push(`${datePrefix}T${input.slice(index)}`);\n }\n }\n\n return candidates;\n}\n\nfunction parseTimestampWithFallbacks(input: string): number {\n const direct = Date.parse(input);\n if (Number.isFinite(direct)) return direct;\n for (const candidate of normalizeTimestampCandidates(input)) {\n const parsed = Date.parse(candidate);\n if (Number.isFinite(parsed)) return parsed;\n }\n return Number.NaN;\n}\n\nfunction isHyphenDatePrefix(value: string): boolean {\n if (value.length !== 10) {\n return false;\n }\n for (let index = 0; index < value.length; index += 1) {\n const character = value[index];\n if (index === 4 || index === 7) {\n if (character !== \"-\") {\n return false;\n }\n continue;\n }\n const code = character.charCodeAt(0);\n if (code < 48 || code > 57) {\n return false;\n }\n }\n return true;\n}\n\nfunction isWhitespaceCharacter(character: string | undefined): boolean {\n if (!character) {\n return false;\n }\n return (\n character === \" \" ||\n character === \"\\t\" ||\n character === \"\\n\" ||\n character === \"\\r\" ||\n character === \"\\f\" ||\n character === \"\\v\"\n );\n}\n\nfunction daysInUtcMonth(year: number, monthIndex: number): number {\n return new Date(Date.UTC(year, monthIndex + 1, 0)).getUTCDate();\n}\n\nconst MONTH_NAMES = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n] as const;\n\n// Leading literal calendar date in either hyphenated (`2026-02-30`) or compact\n// (`20260230`) form, optionally followed by any time/zone component. We validate\n// the digits the caller actually typed — not the parsed instant — so timezone\n// offsets never produce a false \"impossible date\" rejection. The hyphenated form\n// is unambiguous, so anything may follow (`T`/space time, `Z`, `+/-` offset). The\n// compact form must be followed by end-of-string or a time digit (with an optional\n// `T`/space separator) so a no-separator compact datetime like `20260230135900Z`\n// is still guarded and a 7-digit non-date is not misread as a date.\nconst LEADING_HYPHEN_DATE = /^(\\d{4})-(\\d{2})-(\\d{2})/;\nconst LEADING_COMPACT_DATE = /^(\\d{4})(\\d{2})(\\d{2})(?:[T ]?\\d{2}|$)/;\n\n/**\n * Reject literal calendar dates whose day cannot exist (e.g. `2026-02-30`, which JS\n * `Date` silently rolls forward to March 2). Without this, agents that pass an\n * impossible deadline get a silently-wrong stored date instead of an actionable\n * error. Only triggers on a leading literal date; relative tokens, \"now\", and pure\n * times are untouched. Month 00 / >12 is also rejected with a clear message rather\n * than falling through to the generic \"invalid value\" path.\n */\nfunction assertRealCalendarDate(originalInput: string, trimmed: string, fieldLabel: string): void {\n const match = LEADING_HYPHEN_DATE.exec(trimmed) ?? LEADING_COMPACT_DATE.exec(trimmed);\n if (!match) {\n return;\n }\n const year = Number.parseInt(match[1], 10);\n const month = Number.parseInt(match[2], 10);\n const day = Number.parseInt(match[3], 10);\n const label = fieldLabel?.trim() || \"deadline\";\n if (month < 1 || month > 12) {\n throw new PmCliError(\n `Invalid ${label} value \"${originalInput}\". Month \"${match[2]}\" is out of range — use a month between 01 and 12.`,\n EXIT_CODE.USAGE,\n );\n }\n const maxDay = daysInUtcMonth(year, month - 1);\n if (day < 1 || day > maxDay) {\n throw new PmCliError(\n `Invalid ${label} value \"${originalInput}\". ${MONTH_NAMES[month - 1]} ${year} has ${maxDay} days, so day \"${match[3]}\" does not exist. Use a real YYYY-MM-DD calendar date.`,\n EXIT_CODE.USAGE,\n );\n }\n}\n\nfunction addUtcMonths(now: Date, amount: number): Date {\n const result = new Date(now.getTime());\n const startDay = result.getUTCDate();\n const targetMonthIndex = result.getUTCMonth() + amount;\n const targetYear = result.getUTCFullYear() + Math.floor(targetMonthIndex / 12);\n const targetMonth = ((targetMonthIndex % 12) + 12) % 12;\n const day = Math.min(startDay, daysInUtcMonth(targetYear, targetMonth));\n result.setUTCFullYear(targetYear, targetMonth, day);\n return result;\n}\n\n/**\n * Implements resolve iso or relative for the public runtime surface of this module.\n */\nexport function resolveIsoOrRelative(\n input: string,\n now: Date = new Date(),\n fieldLabel = \"deadline\",\n): string {\n const trimmed = input.trim();\n if (trimmed.toLowerCase() === \"now\") {\n return now.toISOString();\n }\n const relative = RELATIVE_DEADLINE.exec(trimmed);\n if (relative) {\n const sign = relative[1] === \"-\" ? -1 : 1;\n const amount = Number.parseInt(relative[2], 10) * sign;\n const unit = relative[3].toLowerCase();\n if (unit === \"m\") {\n return addUtcMonths(now, amount).toISOString();\n }\n const msPerUnit = unit === \"h\" ? 60 * 60 * 1000 : unit === \"d\" ? 24 * 60 * 60 * 1000 : 7 * 24 * 60 * 60 * 1000;\n return new Date(now.getTime() + amount * msPerUnit).toISOString();\n }\n\n assertRealCalendarDate(input, trimmed, fieldLabel);\n\n const timestamp = parseTimestampWithFallbacks(trimmed);\n if (!Number.isFinite(timestamp)) {\n const normalizedLabel = fieldLabel.trim().length > 0 ? fieldLabel.trim() : \"deadline\";\n const guidance = COMPOUND_RELATIVE_DEADLINE.test(trimmed)\n ? \"Compound relative expressions like +3d+1h are not supported; use a single relative token (for example +3d) or an ISO/date string.\"\n : 'Use ISO/date string input, \"now\", or relative +6h/-6h/+1d/-1d/+2w/-2w/+6m/-6m.';\n throw new PmCliError(\n `Invalid ${normalizedLabel} value \"${input}\". ${guidance}`,\n EXIT_CODE.USAGE,\n );\n }\n return new Date(timestamp).toISOString();\n}\n\nexport const _testOnly = {\n normalizeOffset,\n pushTimestampCandidate,\n normalizeTimestampCandidates,\n parseTimestampWithFallbacks,\n isWhitespaceCharacter,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AASA,IAAM,oBAAoB;AAC1B,IAAM,6BAA6B;AACnC,IAAM,eAAe;AACrB,IAAM,mBAAmB;AACzB,IAAM,cAAc;AACpB,IAAM,eAAe;AAKf,SAAU,SAAM;AACpB,UAAO,oBAAI,KAAI,GAAG,YAAW;AAC/B;AAKM,SAAU,mBAAmB,OAAa;AAC9C,SAAO,OAAO,SAAS,KAAK,MAAM,KAAK,CAAC;AAC1C;AASA,IAAM,mCAAmC;AACzC,IAAM,qBAAqB,oBAAI,IAAG;AAElC,SAAS,yBAAyB,OAAa;AAC7C,QAAM,WAAW,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