@unbrained/pm-cli 2026.7.3 → 2026.7.5
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 +36 -0
- package/CONTRIBUTING.md +36 -7
- package/README.md +1 -9
- package/dist/cli/commands/calendar.d.ts +3 -2
- package/dist/cli/commands/calendar.js +5 -5
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/claim.js +17 -3
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/close.js +34 -16
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +231 -345
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/copy.js +3 -3
- package/dist/cli/commands/copy.js.map +1 -1
- package/dist/cli/commands/create.d.ts +9 -59
- package/dist/cli/commands/create.js +162 -132
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.d.ts +6 -0
- package/dist/cli/commands/extension/bundled-catalog.js +15 -2
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +6 -3
- package/dist/cli/commands/extension/describe.js +21 -9
- package/dist/cli/commands/extension/describe.js.map +1 -1
- package/dist/cli/commands/extension/doctor.d.ts +0 -4
- package/dist/cli/commands/extension/doctor.js +3 -3
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.js +59 -133
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension/shared.d.ts +2 -7
- package/dist/cli/commands/extension/shared.js +4 -10
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/extension.js +33 -8
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/files.js +3 -3
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/history-compact.js +9 -18
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-repair.js +9 -19
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.js +133 -97
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.js +3 -3
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/item-filter-options.d.ts +2 -0
- package/dist/cli/commands/item-filter-options.js +2 -2
- package/dist/cli/commands/item-filter-options.js.map +1 -1
- package/dist/cli/commands/mutation-command-options.d.ts +78 -0
- package/dist/cli/commands/mutation-command-options.js +10 -0
- package/dist/cli/commands/mutation-command-options.js.map +1 -0
- package/dist/cli/commands/profile.js +3 -3
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/reindex.js +4 -4
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.js +3 -3
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.js +10 -10
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/shared-unset-fields.d.ts +19 -0
- package/dist/cli/commands/shared-unset-fields.js +31 -2
- package/dist/cli/commands/shared-unset-fields.js.map +1 -1
- package/dist/cli/commands/update.d.ts +2 -59
- package/dist/cli/commands/update.js +29 -98
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.js +4 -4
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +107 -7
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/main.d.ts +6 -2
- package/dist/cli/main.js +33 -12
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +4 -2
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/registration-helpers.js +12 -6
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +18 -0
- package/dist/cli-bundle/chunks/{activity-5YWLSPGE.js → activity-YKAKZTZ4.js} +11 -9
- package/dist/cli-bundle/chunks/{aggregate-2V2M3JZU.js → aggregate-EQX2RGB7.js} +16 -13
- package/dist/cli-bundle/chunks/{aggregate-2V2M3JZU.js.map → aggregate-EQX2RGB7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{aggregate-EK7DXML7.js → aggregate-PEGZGJXD.js} +18 -15
- package/dist/cli-bundle/chunks/{aggregate-EK7DXML7.js.map → aggregate-PEGZGJXD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-EZESUVJT.js → append-CZGUZ45Q.js} +11 -8
- package/dist/cli-bundle/chunks/{append-EZESUVJT.js.map → append-CZGUZ45Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-JFG4WQMG.js → append-NSQBCXZJ.js} +13 -10
- package/dist/cli-bundle/chunks/{append-JFG4WQMG.js.map → append-NSQBCXZJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js +1413 -0
- package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NOIEVOK5.js → chunk-3PL6LEKP.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-NOIEVOK5.js.map → chunk-3PL6LEKP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6KRFL33E.js → chunk-3U3VEWK6.js} +277 -119
- package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Z5F6XZXE.js → chunk-3Y4OESPP.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-Z5F6XZXE.js.map → chunk-3Y4OESPP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HB4FAT3O.js → chunk-4LRVSBO6.js} +21 -15
- package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-T3P7PMZP.js → chunk-4OFLJHX6.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-T3P7PMZP.js.map → chunk-4OFLJHX6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JPATY4SE.js → chunk-4QQ6PM7M.js} +45 -557
- package/dist/cli-bundle/chunks/chunk-4QQ6PM7M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6CDCWKSX.js → chunk-53BTLLAF.js} +68 -331
- package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4WB6S4YX.js → chunk-57C2RLW5.js} +277 -112
- package/dist/cli-bundle/chunks/chunk-57C2RLW5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PULUSQAV.js → chunk-5B3X4Y22.js} +52 -63
- package/dist/cli-bundle/chunks/{chunk-PULUSQAV.js.map → chunk-5B3X4Y22.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7LYO6S5A.js → chunk-5J2XPTAD.js} +10 -8
- package/dist/cli-bundle/chunks/{chunk-7LYO6S5A.js.map → chunk-5J2XPTAD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-QCDTQCMW.js → chunk-5JE6SMYS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MHRS5FUX.js → chunk-5JZ7APJU.js} +153 -108
- package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KHVGM5CS.js → chunk-5VVUKE3U.js} +544 -2368
- package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RJH5VQHW.js → chunk-75U6M5ZD.js} +22 -16
- package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +23 -0
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZFTKYWIF.js → chunk-7EQNAZX2.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-ZFTKYWIF.js.map → chunk-7EQNAZX2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-Z4DGFQDH.js → chunk-7LQKVMPA.js} +14 -4
- package/dist/cli-bundle/chunks/chunk-7LQKVMPA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ERG65A2L.js → chunk-7MDXZAZS.js} +29 -7
- package/dist/cli-bundle/chunks/chunk-7MDXZAZS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OGLGI22K.js → chunk-7QH7DHUB.js} +74 -8
- package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JBZ2NTKX.js → chunk-7WYXBPYQ.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-JBZ2NTKX.js.map → chunk-7WYXBPYQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js +150 -0
- package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-K5DT2YKM.js → chunk-ABRA3BHY.js} +18 -16
- package/dist/cli-bundle/chunks/{chunk-K5DT2YKM.js.map → chunk-ABRA3BHY.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js +47 -0
- package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7CLLC75T.js → chunk-BFVHCAOO.js} +9 -7
- package/dist/cli-bundle/chunks/{chunk-7CLLC75T.js.map → chunk-BFVHCAOO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MDHWWBNZ.js → chunk-BVEUCSH2.js} +6 -4
- package/dist/cli-bundle/chunks/{chunk-MDHWWBNZ.js.map → chunk-BVEUCSH2.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js +160 -0
- package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-T4XBKJ3F.js → chunk-D3UCE7RW.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-T4XBKJ3F.js.map → chunk-D3UCE7RW.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +275 -0
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js +634 -0
- package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AJHYQCBJ.js → chunk-DRBV5UC2.js} +8 -23
- package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NZ7QIUP5.js → chunk-E2FUG6GD.js} +67 -351
- package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4PFVUUYV.js → chunk-EEY54JMF.js} +5 -3
- package/dist/cli-bundle/chunks/{chunk-4PFVUUYV.js.map → chunk-EEY54JMF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3W2HJKJX.js → chunk-EZFKWSC7.js} +94 -16
- package/dist/cli-bundle/chunks/{chunk-3W2HJKJX.js.map → chunk-EZFKWSC7.js.map} +4 -4
- package/dist/cli-bundle/chunks/{chunk-F6WNBITZ.js → chunk-FDBARR33.js} +40 -19
- package/dist/cli-bundle/chunks/{chunk-F6WNBITZ.js.map → chunk-FDBARR33.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WRYERRZX.js → chunk-FGQKEDE4.js} +36 -12
- package/dist/cli-bundle/chunks/chunk-FGQKEDE4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CXR3CMBQ.js → chunk-FJRKQREY.js} +10 -18
- package/dist/cli-bundle/chunks/chunk-FJRKQREY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QNNQAAZ5.js → chunk-FUM6UMY4.js} +10 -11
- package/dist/cli-bundle/chunks/{chunk-QNNQAAZ5.js.map → chunk-FUM6UMY4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TQ6AX5SQ.js → chunk-GIWXVMZ3.js} +140 -334
- package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FZJM2TXF.js → chunk-HBYZDSK5.js} +19 -17
- package/dist/cli-bundle/chunks/{chunk-FZJM2TXF.js.map → chunk-HBYZDSK5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5IZUBZBR.js → chunk-HJE4JTKQ.js} +6 -4
- package/dist/cli-bundle/chunks/{chunk-5IZUBZBR.js.map → chunk-HJE4JTKQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YSDFIY7N.js → chunk-HK72NWAD.js} +89 -18
- package/dist/cli-bundle/chunks/chunk-HK72NWAD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LBE5QFMZ.js → chunk-IJ6CO3JV.js} +41 -20
- package/dist/cli-bundle/chunks/{chunk-LBE5QFMZ.js.map → chunk-IJ6CO3JV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YF746GTH.js → chunk-JFCVQXZX.js} +139 -326
- package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-A3OQ7TFW.js → chunk-JLA7EVYV.js} +12 -10
- package/dist/cli-bundle/chunks/{chunk-A3OQ7TFW.js.map → chunk-JLA7EVYV.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +76 -0
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-32IUNTG4.js → chunk-K3AGVXSF.js} +37 -13
- package/dist/cli-bundle/chunks/chunk-K3AGVXSF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +79 -0
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KGHH652T.js +44 -0
- package/dist/cli-bundle/chunks/chunk-KGHH652T.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +915 -0
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BI4R7HI2.js → chunk-KLG4ZULO.js} +12 -10
- package/dist/cli-bundle/chunks/{chunk-BI4R7HI2.js.map → chunk-KLG4ZULO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XRYSCRZR.js → chunk-LEKT4K7I.js} +74 -8
- package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-X74F2GSM.js → chunk-MNZ7DRNC.js} +13 -10
- package/dist/cli-bundle/chunks/{contracts-X74F2GSM.js.map → chunk-MNZ7DRNC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4EXFFP7T.js → chunk-MTTXDAK4.js} +206 -147
- package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KEZOIPCR.js → chunk-MZ7VNEVY.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-KEZOIPCR.js.map → chunk-MZ7VNEVY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5JIWFWOZ.js → chunk-N6DNM2FA.js} +2 -2
- package/dist/cli-bundle/chunks/{test-runs-QIR5MJPL.js → chunk-N7X4WP6L.js} +11 -8
- package/dist/cli-bundle/chunks/{test-runs-QIR5MJPL.js.map → chunk-N7X4WP6L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-U3S2B7TA.js → chunk-NBFCNJ7Q.js} +206 -147
- package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GVJE5T7Q.js → chunk-NER3KUUS.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +20 -0
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +918 -0
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YPWUSH72.js → chunk-OESSOFJ4.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-YPWUSH72.js.map → chunk-OESSOFJ4.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +238 -0
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FUFFPIYA.js → chunk-OWTIRHX4.js} +28 -6
- package/dist/cli-bundle/chunks/chunk-OWTIRHX4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Z7RPDF2Y.js → chunk-P3VRG72Q.js} +10 -8
- package/dist/cli-bundle/chunks/{chunk-Z7RPDF2Y.js.map → chunk-P3VRG72Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js +1423 -0
- package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +1977 -0
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-MEZZZBYX.js → chunk-PDXT6Q55.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EJ2OCBHF.js → chunk-PJ3A56YF.js} +46 -537
- package/dist/cli-bundle/chunks/chunk-PJ3A56YF.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-MG5VIGSK.js → chunk-PPAJG4GB.js} +13 -10
- package/dist/cli-bundle/chunks/{test-runs-MG5VIGSK.js.map → chunk-PPAJG4GB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-572FKBRL.js → chunk-PPE4YUQM.js} +1725 -1663
- package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ER4ME5U2.js → chunk-QHZO65XW.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-ER4ME5U2.js.map → chunk-QHZO65XW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-T6AXEBOP.js → chunk-R3ZBLGTC.js} +9 -10
- package/dist/cli-bundle/chunks/{chunk-T6AXEBOP.js.map → chunk-R3ZBLGTC.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js +624 -0
- package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YVKZ3ANP.js → chunk-RX3HQSYG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LOWVNZBZ.js → chunk-S4APD35C.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-FH2H3CBD.js → chunk-S5AYOUT5.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-FH2H3CBD.js.map → chunk-S5AYOUT5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SYE6WMV6.js → chunk-STPSZ2XY.js} +19 -744
- package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6NYJGMTY.js → chunk-T35XLYZF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P5L7Z2O6.js → chunk-T3ABIMGW.js} +5 -3
- package/dist/cli-bundle/chunks/{chunk-P5L7Z2O6.js.map → chunk-T3ABIMGW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SU2E4AWU.js → chunk-T3F4DF23.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-SU2E4AWU.js.map → chunk-T3F4DF23.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +272 -0
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js +5354 -0
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ECU6MMTQ.js → chunk-TSPKZRRW.js} +50 -116
- package/dist/cli-bundle/chunks/chunk-TSPKZRRW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BE2SR6QL.js → chunk-TT42JUMF.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +165 -0
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RAHINBVP.js → chunk-UI5BJ6DO.js} +1339 -1277
- package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +1932 -0
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +175 -0
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-B4O5S7I3.js → chunk-VUHVWI4C.js} +13 -3
- package/dist/cli-bundle/chunks/chunk-VUHVWI4C.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-L6ODXNUM.js → chunk-VZIYHZDX.js} +11 -8
- package/dist/cli-bundle/chunks/{contracts-L6ODXNUM.js.map → chunk-VZIYHZDX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-U5TR4N7J.js → chunk-WISPVC2E.js} +9 -7
- package/dist/cli-bundle/chunks/{chunk-U5TR4N7J.js.map → chunk-WISPVC2E.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js +5434 -0
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HQAF23Q2.js → chunk-XQCG2JGW.js} +17 -749
- package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-Y76TWC45.js +550 -0
- package/dist/cli-bundle/chunks/chunk-Y76TWC45.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-L4SLHV6G.js → chunk-YD5FML7K.js} +464 -2239
- package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YSGTMDWC.js → chunk-YFIE7YK6.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-YSGTMDWC.js.map → chunk-YFIE7YK6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-WYOIIFSE.js → chunk-YMABYTNG.js} +49 -115
- package/dist/cli-bundle/chunks/chunk-YMABYTNG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SU3TB4NS.js → chunk-YOF5VPKM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WJA3PXW7.js → chunk-YPPVU5GX.js} +11 -9
- package/dist/cli-bundle/chunks/{chunk-WJA3PXW7.js.map → chunk-YPPVU5GX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GUYNUXQT.js → chunk-YQMMMONE.js} +6 -4
- package/dist/cli-bundle/chunks/{chunk-GUYNUXQT.js.map → chunk-YQMMMONE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-AIKU3IIL.js → chunk-YSAH5FY5.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-AIKU3IIL.js.map → chunk-YSAH5FY5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-KS6ATO47.js → chunk-YZIR4R3U.js} +153 -108
- package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LCWQP6NM.js → chunk-Z2CRRZYF.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-LCWQP6NM.js.map → chunk-Z2CRRZYF.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js +533 -0
- package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UMNQZS4H.js → chunk-ZCJAA3JK.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-UMNQZS4H.js.map → chunk-ZCJAA3JK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EQURFOMH.js → chunk-ZD34OFFQ.js} +5 -3
- package/dist/cli-bundle/chunks/{chunk-EQURFOMH.js.map → chunk-ZD34OFFQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-67LARBDL.js → chunk-ZJB3UV5U.js} +54 -58
- package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5E7N4T2Z.js → chunk-ZMD35NYG.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +241 -0
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{claim-5GU7OE67.js → claim-4DROPSIS.js} +30 -13
- package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-2BGBGSVI.js → claim-VX54TV5U.js} +29 -12
- package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-AFVKPR57.js → close-3YRR3XY6.js} +9 -7
- package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +16 -0
- package/dist/cli-bundle/chunks/{close-many-JKUJMHLG.js → close-many-AP4MWU36.js} +21 -18
- package/dist/cli-bundle/chunks/{close-many-JKUJMHLG.js.map → close-many-AP4MWU36.js.map} +1 -1
- package/dist/cli-bundle/chunks/{close-many-7KLOSYLP.js → close-many-OMZIGZB4.js} +19 -16
- package/dist/cli-bundle/chunks/{close-many-7KLOSYLP.js.map → close-many-OMZIGZB4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-DNWHEBOS.js → comments-MIW5MZOX.js} +12 -9
- package/dist/cli-bundle/chunks/{comments-DNWHEBOS.js.map → comments-MIW5MZOX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-RW23R3VE.js → comments-SAG5LSKL.js} +14 -11
- package/dist/cli-bundle/chunks/{comments-RW23R3VE.js.map → comments-SAG5LSKL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-AUM5WBYA.js → config-DJJKZB5R.js} +20 -17
- package/dist/cli-bundle/chunks/{config-AUM5WBYA.js.map → config-DJJKZB5R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-OZWSA2NP.js → config-V57QD47V.js} +22 -19
- package/dist/cli-bundle/chunks/{config-OZWSA2NP.js.map → config-V57QD47V.js.map} +1 -1
- package/dist/cli-bundle/chunks/{context-PKCEHQY3.js → context-4OQGIPSO.js} +15 -12
- package/dist/cli-bundle/chunks/{context-OYXRGY7S.js → context-WLA6IAWE.js} +15 -12
- package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +12 -0
- package/dist/cli-bundle/chunks/contracts-OJEXMKVW.js +16 -0
- package/dist/cli-bundle/chunks/{copy-I4NCLBR4.js → copy-LEE6P6EM.js} +17 -14
- package/dist/cli-bundle/chunks/{copy-I4NCLBR4.js.map → copy-LEE6P6EM.js.map} +2 -2
- package/dist/cli-bundle/chunks/{copy-6XOR3HKN.js → copy-OTJOWFL6.js} +18 -15
- package/dist/cli-bundle/chunks/{copy-6XOR3HKN.js.map → copy-OTJOWFL6.js.map} +1 -1
- package/dist/cli-bundle/chunks/create-WKOZKPQR.js +30 -0
- package/dist/cli-bundle/chunks/{create-PM45M6PE.js → create-XWWQFQ6S.js} +14 -12
- package/dist/cli-bundle/chunks/{delete-7YXHYG67.js → delete-62JQTYT4.js} +10 -7
- package/dist/cli-bundle/chunks/{delete-7YXHYG67.js.map → delete-62JQTYT4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{delete-LPISP43T.js → delete-HQKGRNRZ.js} +12 -9
- package/dist/cli-bundle/chunks/{delete-LPISP43T.js.map → delete-HQKGRNRZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-WATKQDE3.js → deps-55FTG6Z5.js} +12 -9
- package/dist/cli-bundle/chunks/{deps-WATKQDE3.js.map → deps-55FTG6Z5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-N2T26FME.js → deps-L2FPIAD3.js} +10 -7
- package/dist/cli-bundle/chunks/{deps-N2T26FME.js.map → deps-L2FPIAD3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-6LQ3GLM7.js → docs-6CRCSVKK.js} +11 -9
- package/dist/cli-bundle/chunks/{docs-6LQ3GLM7.js.map → docs-6CRCSVKK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-Z3X6JZLT.js → docs-S6UTOTO5.js} +9 -7
- package/dist/cli-bundle/chunks/{docs-Z3X6JZLT.js.map → docs-S6UTOTO5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-6DCLG52D.js → eval-N6UHFWVO.js} +15 -11
- package/dist/cli-bundle/chunks/{eval-6DCLG52D.js.map → eval-N6UHFWVO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-Y3ZCUTHK.js → eval-PHOTWYHI.js} +17 -13
- package/dist/cli-bundle/chunks/{eval-Y3ZCUTHK.js.map → eval-PHOTWYHI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{extension-BNINIMT7.js → extension-NBAH62ML.js} +17 -11
- package/dist/cli-bundle/chunks/{extension-QWE4YYK5.js → extension-ZF6ZZPOU.js} +17 -11
- package/dist/cli-bundle/chunks/{files-FUYPSOFJ.js → files-6P57MRKL.js} +14 -11
- package/dist/cli-bundle/chunks/files-6P57MRKL.js.map +7 -0
- package/dist/cli-bundle/chunks/{files-6SGKHS6O.js → files-JPU3FNJ7.js} +15 -12
- package/dist/cli-bundle/chunks/files-JPU3FNJ7.js.map +1 -0
- package/dist/cli-bundle/chunks/{focus-2Q3K76G2.js → focus-LFZ6IDBR.js} +15 -11
- package/dist/cli-bundle/chunks/{focus-2Q3K76G2.js.map → focus-LFZ6IDBR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-ATLBWXXD.js → focus-WNMYCVYA.js} +13 -9
- package/dist/cli-bundle/chunks/{focus-ATLBWXXD.js.map → focus-WNMYCVYA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{gc-RUYEMNRF.js → gc-AETFKZ44.js} +10 -7
- package/dist/cli-bundle/chunks/{gc-RUYEMNRF.js.map → gc-AETFKZ44.js.map} +1 -1
- package/dist/cli-bundle/chunks/{gc-TDWSDR66.js → gc-RLBP4QVN.js} +12 -9
- package/dist/cli-bundle/chunks/{gc-TDWSDR66.js.map → gc-RLBP4QVN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{get-LY6M2JIM.js → get-NH2MPBCI.js} +18 -15
- package/dist/cli-bundle/chunks/{get-LY6M2JIM.js.map → get-NH2MPBCI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{get-2WGLX74N.js → get-P4ZQXCPZ.js} +16 -13
- package/dist/cli-bundle/chunks/{get-2WGLX74N.js.map → get-P4ZQXCPZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-4RKHYS3T.js → health-3GVPMQBL.js} +36 -29
- package/dist/cli-bundle/chunks/{health-4RKHYS3T.js.map → health-3GVPMQBL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-TMFVNYRA.js → health-DNTM72GJ.js} +34 -27
- package/dist/cli-bundle/chunks/{health-TMFVNYRA.js.map → health-DNTM72GJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/history-RYKLC72X.js +20 -0
- package/dist/cli-bundle/chunks/{history-SGRRS72R.js → history-SGPYRAFT.js} +10 -8
- package/dist/cli-bundle/chunks/{history-compact-LOED43R3.js → history-compact-3F6VELO7.js} +26 -30
- package/dist/cli-bundle/chunks/history-compact-3F6VELO7.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-compact-V5DNAQHH.js → history-compact-656Y2TN4.js} +27 -31
- package/dist/cli-bundle/chunks/history-compact-656Y2TN4.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-IRL7WJ3E.js → history-redact-54ICFKXM.js} +11 -9
- package/dist/cli-bundle/chunks/{history-repair-PGYQJMGD.js → history-repair-4N6SDVHK.js} +25 -30
- package/dist/cli-bundle/chunks/history-repair-4N6SDVHK.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-repair-4WVBVHFR.js → history-repair-EVTO6LIH.js} +26 -31
- package/dist/cli-bundle/chunks/history-repair-EVTO6LIH.js.map +1 -0
- package/dist/cli-bundle/chunks/init-RPIPQUNV.js +32 -0
- package/dist/cli-bundle/chunks/init-SKQAESQS.js +28 -0
- package/dist/cli-bundle/chunks/{learnings-4FJY7WIW.js → learnings-2HTPZNGZ.js} +10 -8
- package/dist/cli-bundle/chunks/{learnings-4FJY7WIW.js.map → learnings-2HTPZNGZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{learnings-4BHWFFUV.js → learnings-YBIHY3D6.js} +12 -10
- package/dist/cli-bundle/chunks/{learnings-4BHWFFUV.js.map → learnings-YBIHY3D6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{list-472TIOVK.js → list-64LHZ3HM.js} +10 -8
- package/dist/cli-bundle/chunks/{list-D7BF5CL2.js → list-7LXBTEKI.js} +10 -8
- package/dist/cli-bundle/chunks/{next-SFQZVX2B.js → next-7ODPAQ4U.js} +22 -18
- package/dist/cli-bundle/chunks/{next-SFQZVX2B.js.map → next-7ODPAQ4U.js.map} +1 -1
- package/dist/cli-bundle/chunks/{next-D5STGWI2.js → next-ODJUM4ZM.js} +24 -20
- package/dist/cli-bundle/chunks/{next-D5STGWI2.js.map → next-ODJUM4ZM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-6KNOSLIT.js → notes-72YXN5JX.js} +10 -8
- package/dist/cli-bundle/chunks/{notes-6KNOSLIT.js.map → notes-72YXN5JX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-W4UEICGF.js → notes-NJ7IQJX4.js} +12 -10
- package/dist/cli-bundle/chunks/{notes-W4UEICGF.js.map → notes-NJ7IQJX4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-MJQW5XK3.js → plan-R4NDQ27E.js} +18 -15
- package/dist/cli-bundle/chunks/{plan-MJQW5XK3.js.map → plan-R4NDQ27E.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-JO6V7BXO.js → plan-XWY5T67S.js} +20 -17
- package/dist/cli-bundle/chunks/{plan-JO6V7BXO.js.map → plan-XWY5T67S.js.map} +1 -1
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +397 -0
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +1 -0
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +400 -0
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-ELBHCCFI.js → register-list-query-5H66WFYF.js} +24 -21
- package/dist/cli-bundle/chunks/register-list-query-5H66WFYF.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-GAPQ6DM3.js → register-list-query-FB3FNDLZ.js} +25 -22
- package/dist/cli-bundle/chunks/{register-list-query-ELBHCCFI.js.map → register-list-query-FB3FNDLZ.js.map} +1 -7
- package/dist/cli-bundle/chunks/{register-mutation-SJWMVIJ2.js → register-mutation-UJO23C7R.js} +42 -39
- package/dist/cli-bundle/chunks/{register-mutation-SJWMVIJ2.js.map → register-mutation-UJO23C7R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-ROFE2YPC.js → register-mutation-Z2ETYHKS.js} +40 -37
- package/dist/cli-bundle/chunks/{register-mutation-ROFE2YPC.js.map → register-mutation-Z2ETYHKS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-MEKU3AKC.js → register-operations-A3XAM5J7.js} +39 -36
- package/dist/cli-bundle/chunks/{register-operations-MEKU3AKC.js.map → register-operations-A3XAM5J7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-IADFVH53.js → register-operations-SG7HBSUP.js} +37 -34
- package/dist/cli-bundle/chunks/{register-operations-IADFVH53.js.map → register-operations-SG7HBSUP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-AJWUSSQX.js → register-setup-I45OGJUV.js} +25 -19
- package/dist/cli-bundle/chunks/{register-setup-AJWUSSQX.js.map → register-setup-I45OGJUV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-3QJY43CY.js → register-setup-K6U3NVY5.js} +23 -17
- package/dist/cli-bundle/chunks/{register-setup-3QJY43CY.js.map → register-setup-K6U3NVY5.js.map} +1 -1
- package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +19 -0
- package/dist/cli-bundle/chunks/{restore-44IHMMZZ.js → restore-YJ2ET6AT.js} +11 -9
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-TSBK4AY5.js → scheduling-shortcuts-SSC4MYWQ.js} +14 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-TSBK4AY5.js.map → scheduling-shortcuts-SSC4MYWQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js → scheduling-shortcuts-ULRG7MNP.js} +16 -14
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js.map → scheduling-shortcuts-ULRG7MNP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{schema-VBCELP5G.js → schema-2PUXCZ25.js} +10 -7
- package/dist/cli-bundle/chunks/{schema-IB2NZZWD.js → schema-Y6DXXK2F.js} +10 -7
- package/dist/cli-bundle/chunks/{search-7UBETML4.js → search-3S72CTD6.js} +13 -10
- package/dist/cli-bundle/chunks/{search-R227JOL6.js → search-WNUNBQXO.js} +13 -10
- package/dist/cli-bundle/chunks/{stats-FAG7COEH.js → stats-IJYTRQGV.js} +13 -10
- package/dist/cli-bundle/chunks/{stats-FAG7COEH.js.map → stats-IJYTRQGV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{stats-MCK7PLYS.js → stats-L2D5Y2O5.js} +15 -12
- package/dist/cli-bundle/chunks/{stats-MCK7PLYS.js.map → stats-L2D5Y2O5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{telemetry-DRPDZMAO.js → telemetry-L2CVOKVN.js} +11 -8
- package/dist/cli-bundle/chunks/{telemetry-DRPDZMAO.js.map → telemetry-L2CVOKVN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{telemetry-GVVUQSJQ.js → telemetry-QBYWQA76.js} +13 -10
- package/dist/cli-bundle/chunks/{telemetry-GVVUQSJQ.js.map → telemetry-QBYWQA76.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-QY44WAMR.js → test-DQ2QFJ7W.js} +21 -15
- package/dist/cli-bundle/chunks/test-W7QBLVJS.js +41 -0
- package/dist/cli-bundle/chunks/{test-all-USPJHXFR.js → test-all-636NTRTT.js} +26 -19
- package/dist/cli-bundle/chunks/{test-all-USPJHXFR.js.map → test-all-636NTRTT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-QD6QAEG7.js → test-all-DWYK3RG6.js} +24 -17
- package/dist/cli-bundle/chunks/{test-all-QD6QAEG7.js.map → test-all-DWYK3RG6.js.map} +1 -1
- package/dist/cli-bundle/chunks/test-runs-245OINZR.js +28 -0
- package/dist/cli-bundle/chunks/test-runs-245OINZR.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +24 -0
- package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js.map +7 -0
- package/dist/cli-bundle/chunks/update-SFLZPJXX.js +30 -0
- package/dist/cli-bundle/chunks/update-SFLZPJXX.js.map +1 -0
- package/dist/cli-bundle/chunks/update-SJZ6S77U.js +26 -0
- package/dist/cli-bundle/chunks/update-SJZ6S77U.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-many-RATAARHU.js → update-many-DC7X3EWM.js} +32 -29
- package/dist/cli-bundle/chunks/{update-many-RATAARHU.js.map → update-many-DC7X3EWM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{update-many-BEMTDA2X.js → update-many-SLLAMHT7.js} +34 -31
- package/dist/cli-bundle/chunks/{update-many-BEMTDA2X.js.map → update-many-SLLAMHT7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-VU46BLJZ.js → upgrade-HFFXLZJA.js} +19 -12
- package/dist/cli-bundle/chunks/{upgrade-VU46BLJZ.js.map → upgrade-HFFXLZJA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-NWMR3VQL.js → upgrade-UYQKM7RF.js} +21 -14
- package/dist/cli-bundle/chunks/{upgrade-NWMR3VQL.js.map → upgrade-UYQKM7RF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-NRY6MFXN.js → validate-PA4FDTOV.js} +35 -28
- package/dist/cli-bundle/chunks/validate-PA4FDTOV.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-GAJ6FUSI.js → validate-Z7L75YEJ.js} +35 -28
- package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js.map +1 -0
- package/dist/cli-bundle/main.js +173 -57
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +247 -0
- package/dist/cli-bundle/sdk-runtime.js.map +7 -0
- package/dist/cli-bundle/sdk-testing.js +101 -0
- package/dist/cli-bundle/sdk-testing.js.map +7 -0
- package/dist/cli-bundle/sdk.js +787 -0
- package/dist/cli-bundle/sdk.js.map +7 -0
- package/dist/core/config/nested-settings.d.ts +4 -3
- package/dist/core/config/nested-settings.js +17 -6
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/extensions/activation-summary.d.ts +6 -0
- package/dist/core/extensions/activation-summary.js +10 -4
- package/dist/core/extensions/activation-summary.js.map +1 -1
- package/dist/core/extensions/capability-usage.d.ts +6 -0
- package/dist/core/extensions/capability-usage.js +10 -4
- package/dist/core/extensions/capability-usage.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +6 -2
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +3 -0
- package/dist/core/extensions/loader.js +11 -19
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/history-rewrite.d.ts +10 -0
- package/dist/core/history/history-rewrite.js +28 -4
- package/dist/core/history/history-rewrite.js.map +1 -1
- package/dist/core/item/parent-reference-policy.d.ts +9 -1
- package/dist/core/item/parent-reference-policy.js +28 -4
- package/dist/core/item/parent-reference-policy.js.map +1 -1
- package/dist/core/item/type-registry.d.ts +1 -0
- package/dist/core/item/type-registry.js +153 -177
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/lock/lock.d.ts +28 -1
- package/dist/core/lock/lock.js +254 -20
- package/dist/core/lock/lock.js.map +1 -1
- package/dist/core/search/background-refresh.js +7 -19
- package/dist/core/search/background-refresh.js.map +1 -1
- package/dist/core/search/http-client.d.ts +0 -1
- package/dist/core/search/http-client.js +3 -3
- package/dist/core/search/http-client.js.map +1 -1
- package/dist/core/shared/constants.js +3 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.d.ts +1 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/primitives.d.ts +12 -0
- package/dist/core/shared/primitives.js +29 -2
- package/dist/core/shared/primitives.js.map +1 -1
- package/dist/core/store/item-store.js +3 -3
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +1 -0
- package/dist/core/store/settings-validator.js +6 -3
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +3 -3
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/validate/fix-planning.d.ts +0 -2
- package/dist/core/validate/fix-planning.js +3 -3
- package/dist/core/validate/fix-planning.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +3 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +55 -94
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/errors.d.ts +21 -2
- package/dist/sdk/errors.js +8 -2
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/package-import-adapters.d.ts +90 -2
- package/dist/sdk/package-import-adapters.js +275 -3
- package/dist/sdk/package-import-adapters.js.map +1 -1
- package/dist/sdk/runtime.d.ts +1 -1
- package/dist/sdk/runtime.js +3 -3
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/testing.js +41 -19
- package/dist/sdk/testing.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/ARCHITECTURE.md +27 -0
- package/docs/CONFIGURATION.md +3 -0
- package/docs/README.md +1 -0
- package/docs/SDK_PRIMITIVE_INVENTORY.md +55 -0
- package/docs/TESTING.md +5 -1
- package/docs/examples/ci/github-actions-pm-extension-gate.yml +5 -5
- package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +1 -1
- package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +1 -1
- package/package.json +14 -26
- package/packages/pm-beads/extensions/beads/package.json +3 -0
- package/packages/pm-beads/extensions/beads/runtime-loader.ts +50 -41
- package/packages/pm-beads/extensions/beads/runtime.ts +106 -223
- package/packages/pm-calendar/extensions/calendar/package.json +3 -0
- package/packages/pm-calendar/extensions/calendar/runtime.ts +21 -18
- package/packages/pm-command-kit/extensions/command-kit/package.json +3 -0
- package/packages/pm-governance-audit/extensions/governance-audit/package.json +3 -0
- package/packages/pm-guide-shell/extensions/guide-shell/package.json +3 -0
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +9 -11
- package/packages/pm-kanban/extensions/kanban/package.json +3 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/package.json +3 -0
- package/packages/pm-search-advanced/extensions/search-advanced/package.json +3 -0
- package/packages/pm-templates/extensions/templates/package.json +3 -0
- package/packages/pm-todos/extensions/todos/package.json +3 -0
- package/packages/pm-todos/extensions/todos/runtime-loader.ts +62 -72
- package/packages/pm-todos/extensions/todos/runtime.ts +61 -257
- package/plugins/pm-claude/scripts/pm-mcp-server.mjs +73 -31
- package/plugins/pm-codex/scripts/pm-mcp-server.mjs +80 -34
- package/scripts/bundle-cli.mjs +12 -2
- package/scripts/install.ps1 +7 -7
- package/dist/cli-bundle/chunks/activity-BIML7K2D.js +0 -16
- package/dist/cli-bundle/chunks/chunk-32IUNTG4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4EXFFP7T.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4WB6S4YX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-572FKBRL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-67LARBDL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6CDCWKSX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6KRFL33E.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AJHYQCBJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B4O5S7I3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CXR3CMBQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ECU6MMTQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EJ2OCBHF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ERG65A2L.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FUFFPIYA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HB4FAT3O.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HQAF23Q2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JPATY4SE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KHVGM5CS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KS6ATO47.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-L4SLHV6G.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MHRS5FUX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NZ7QIUP5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OGLGI22K.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RAHINBVP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RJH5VQHW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SYE6WMV6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TQ6AX5SQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-U3S2B7TA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WRYERRZX.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WYOIIFSE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XRYSCRZR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YF746GTH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YSDFIY7N.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-Z4DGFQDH.js.map +0 -1
- package/dist/cli-bundle/chunks/claim-2BGBGSVI.js.map +0 -7
- package/dist/cli-bundle/chunks/claim-5GU7OE67.js.map +0 -1
- package/dist/cli-bundle/chunks/close-6YODBUIV.js +0 -14
- package/dist/cli-bundle/chunks/create-Z7YCH3BE.js +0 -28
- package/dist/cli-bundle/chunks/files-6SGKHS6O.js.map +0 -1
- package/dist/cli-bundle/chunks/files-FUYPSOFJ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-CGNQJXFE.js +0 -18
- package/dist/cli-bundle/chunks/history-compact-LOED43R3.js.map +0 -7
- package/dist/cli-bundle/chunks/history-compact-V5DNAQHH.js.map +0 -1
- package/dist/cli-bundle/chunks/history-redact-N3JK7VBW.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-4WVBVHFR.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-PGYQJMGD.js.map +0 -7
- package/dist/cli-bundle/chunks/init-4GESW7RM.js +0 -26
- package/dist/cli-bundle/chunks/init-XIDPABA4.js +0 -22
- package/dist/cli-bundle/chunks/profile-3TOTMUR4.js +0 -1243
- package/dist/cli-bundle/chunks/profile-3TOTMUR4.js.map +0 -7
- package/dist/cli-bundle/chunks/profile-WIQY2KCV.js +0 -1205
- package/dist/cli-bundle/chunks/profile-WIQY2KCV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-EXHU34EU.js +0 -17
- package/dist/cli-bundle/chunks/test-SY76DZTO.js +0 -35
- package/dist/cli-bundle/chunks/update-A7EICML6.js +0 -24
- package/dist/cli-bundle/chunks/update-IKJZWLQC.js +0 -28
- package/dist/cli-bundle/chunks/validate-GAJ6FUSI.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-NRY6MFXN.js.map +0 -7
- /package/dist/cli-bundle/chunks/{activity-BIML7K2D.js.map → activity-4XQIDNM5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-5YWLSPGE.js.map → activity-YKAKZTZ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QCDTQCMW.js.map → chunk-5JE6SMYS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5JIWFWOZ.js.map → chunk-N6DNM2FA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GVJE5T7Q.js.map → chunk-NER3KUUS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MEZZZBYX.js.map → chunk-PDXT6Q55.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YVKZ3ANP.js.map → chunk-RX3HQSYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LOWVNZBZ.js.map → chunk-S4APD35C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6NYJGMTY.js.map → chunk-T35XLYZF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BE2SR6QL.js.map → chunk-TT42JUMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SU3TB4NS.js.map → chunk-YOF5VPKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5E7N4T2Z.js.map → chunk-ZMD35NYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-AFVKPR57.js.map → close-3YRR3XY6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-6YODBUIV.js.map → close-OB2Y4QP5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-PKCEHQY3.js.map → context-4OQGIPSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-OYXRGY7S.js.map → context-WLA6IAWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-Z7YCH3BE.js.map → contracts-HXJLKCRI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-PM45M6PE.js.map → contracts-OJEXMKVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-BNINIMT7.js.map → create-WKOZKPQR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-QWE4YYK5.js.map → create-XWWQFQ6S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-CGNQJXFE.js.map → extension-NBAH62ML.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-SGRRS72R.js.map → extension-ZF6ZZPOU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-N3JK7VBW.js.map → history-RYKLC72X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-IRL7WJ3E.js.map → history-SGPYRAFT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-XIDPABA4.js.map → history-redact-4H3FCKF3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-4GESW7RM.js.map → history-redact-54ICFKXM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-D7BF5CL2.js.map → init-RPIPQUNV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-472TIOVK.js.map → init-SKQAESQS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-EXHU34EU.js.map → list-64LHZ3HM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-44IHMMZZ.js.map → list-7LXBTEKI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-VBCELP5G.js.map → restore-PXOFL6AM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-IB2NZZWD.js.map → restore-YJ2ET6AT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-R227JOL6.js.map → schema-2PUXCZ25.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-7UBETML4.js.map → schema-Y6DXXK2F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-QY44WAMR.js.map → search-3S72CTD6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-SY76DZTO.js.map → search-WNUNBQXO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-IKJZWLQC.js.map → test-DQ2QFJ7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-A7EICML6.js.map → test-W7QBLVJS.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../cli/commands/files.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module cli/commands/files\n *\n * Implements the pm files command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.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 { locateItem, mutateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { isPathWithinDirectory } from \"../../core/fs/path-utils.js\";\nimport type { ItemDocument, LinkedFile, LinkScope } from \"../../types/index.js\";\nimport {\n dedupeLinkedArtifacts,\n normalizeLinkedPath,\n renameArtifactsResultKey,\n runLinkedArtifacts,\n sortLinkedArtifacts,\n type LinkedArtifactResult,\n type LinkedPathAuditEntry,\n type LinkedPathValidation,\n} from \"./linked-artifacts.js\";\n\n/**\n * Documents the files command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface FilesCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n /** GH-170 (pm-pfnx): standalone note applied to every --add/--add-glob link in this invocation. */\n note?: string;\n list?: boolean;\n appendStable?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the files discover options payload exchanged by command, SDK, and package integrations.\n */\nexport interface FilesDiscoverOptions {\n apply?: boolean;\n appendStable?: boolean;\n note?: string;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the files discovery candidate payload exchanged by command, SDK, and package integrations.\n */\nexport interface FilesDiscoveryCandidate {\n path: string;\n scope: LinkScope;\n status: \"addable\" | \"already_linked\";\n source_count: number;\n source_fields: string[];\n original_paths: string[];\n}\n\n/**\n * Documents the files result payload exchanged by command, SDK, and package integrations.\n */\nexport interface FilesResult {\n id: string;\n files: LinkedFile[];\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n}\n\n/**\n * Documents the files discover result payload exchanged by command, SDK, and package integrations.\n */\nexport interface FilesDiscoverResult {\n id: string;\n files: LinkedFile[];\n changed: boolean;\n apply: boolean;\n count: number;\n candidate_count: number;\n addable_count: number;\n added_count: number;\n skipped_existing_count: number;\n candidates: FilesDiscoveryCandidate[];\n added: LinkedFile[];\n skipped_existing: FilesDiscoveryCandidate[];\n}\n\ninterface TextReference {\n field: string;\n value: string;\n}\n\ninterface RawPathReference {\n field: string;\n value: string;\n}\n\nfunction normalizeCandidatePathForOutput(value: string): string {\n return normalizeLinkedPath(path.normalize(value));\n}\n\nasync function realpathForContainment(inputPath: string): Promise<string> {\n try {\n return await fs.realpath(inputPath);\n } catch {\n return path.resolve(inputPath);\n }\n}\n\nfunction linkedFileResolvedKey(linkedFile: Pick<LinkedFile, \"path\" | \"scope\">, projectRoot: string): string {\n const resolvedPath = path.isAbsolute(linkedFile.path)\n ? path.resolve(linkedFile.path)\n : path.resolve(projectRoot, linkedFile.path);\n return `${normalizeCandidatePathForOutput(resolvedPath)}::${linkedFile.scope}`;\n}\n\nfunction collectTextReferences(value: unknown, fieldPath: string, references: TextReference[]): void {\n if (typeof value === \"string\") {\n const trimmed = value.trim();\n if (trimmed.length > 0) {\n references.push({ field: fieldPath, value: trimmed });\n }\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((entry, index) => collectTextReferences(entry, `${fieldPath}[${index}]`, references));\n return;\n }\n if (typeof value === \"object\" && value !== null) {\n for (const [key, nested] of Object.entries(value)) {\n /* c8 ignore next -- root-level object traversal always carries a non-empty field path in current callers. */\n collectTextReferences(nested, fieldPath ? `${fieldPath}.${key}` : key, references);\n }\n }\n}\n\nfunction collectItemTextReferences(document: ItemDocument): TextReference[] {\n const references: TextReference[] = [];\n collectTextReferences(document.metadata, \"metadata\", references);\n collectTextReferences(document.body, \"body\", references);\n return references;\n}\n\nfunction cleanupPathToken(value: string): string {\n let next = value.trim();\n next = next.replace(/^[`\"'<([{]+/u, \"\");\n next = next.replace(/[`\"'>)\\]},;!?]+$/u, \"\");\n next = next.replace(/[.]+$/u, \"\");\n next = next.replace(/:(?:\\d+)(?::\\d+)?$/u, \"\");\n next = next.replace(/[.]+$/u, \"\");\n return next;\n}\n\nfunction extractRawPathReferences(references: TextReference[]): RawPathReference[] {\n const rawReferences: RawPathReference[] = [];\n const absolutePattern = /(?:[A-Za-z]:[\\\\/]|\\/)[^\\s\"'`<>()[\\]{},;]+/gu;\n const relativePattern =\n /(?:\\.{1,2}[\\\\/])?(?:(?:[A-Za-z0-9_.@-]+[\\\\/])+[A-Za-z0-9_.@-]+|[A-Za-z0-9_.@-]+\\.[A-Za-z0-9][A-Za-z0-9._-]*)/gu;\n for (const reference of references) {\n const seenInField = new Set<string>();\n for (const pattern of [absolutePattern, relativePattern]) {\n pattern.lastIndex = 0;\n for (const match of reference.value.matchAll(pattern)) {\n /* c8 ignore next -- RegExp match arrays always expose capture [0]. */\n const token = cleanupPathToken(match[0] ?? \"\");\n if (!token || seenInField.has(token)) {\n continue;\n }\n seenInField.add(token);\n rawReferences.push({ field: reference.field, value: token });\n }\n }\n }\n return rawReferences;\n}\n\nasync function resolveDiscoveredFile(\n rawPath: string,\n projectRoot: string,\n): Promise<Pick<LinkedFile, \"path\" | \"scope\"> | undefined> {\n const absolutePath = path.isAbsolute(rawPath) ? path.resolve(rawPath) : path.resolve(projectRoot, rawPath);\n let stats;\n try {\n stats = await fs.stat(absolutePath);\n } catch {\n return undefined;\n }\n if (!stats.isFile()) {\n return undefined;\n }\n const [canonicalProjectRoot, canonicalAbsolutePath] = await Promise.all([\n realpathForContainment(projectRoot),\n realpathForContainment(absolutePath),\n ]);\n if (isPathWithinDirectory(canonicalProjectRoot, canonicalAbsolutePath)) {\n const relativePath = path.relative(canonicalProjectRoot, canonicalAbsolutePath);\n if (!relativePath || relativePath.startsWith(\"..\") || path.isAbsolute(relativePath)) {\n return undefined;\n }\n return {\n path: normalizeCandidatePathForOutput(relativePath),\n scope: \"project\",\n };\n }\n return {\n path: normalizeCandidatePathForOutput(absolutePath),\n scope: \"global\",\n };\n}\n\nasync function discoverReferencedFiles(document: ItemDocument, projectRoot: string): Promise<FilesDiscoveryCandidate[]> {\n const existingResolvedKeys = new Set((document.metadata.files ?? []).map((entry) => linkedFileResolvedKey(entry, projectRoot)));\n const grouped = new Map<\n string,\n {\n path: string;\n scope: LinkScope;\n sourceFields: Set<string>;\n originalPaths: Set<string>;\n sourceCount: number;\n }\n >();\n const rawReferences = extractRawPathReferences(collectItemTextReferences(document));\n for (const reference of rawReferences) {\n const resolved = await resolveDiscoveredFile(reference.value, projectRoot);\n if (!resolved) {\n continue;\n }\n const key = linkedFileResolvedKey(resolved, projectRoot);\n const existing = grouped.get(key) ?? {\n path: resolved.path,\n scope: resolved.scope,\n sourceFields: new Set<string>(),\n originalPaths: new Set<string>(),\n sourceCount: 0,\n };\n existing.sourceFields.add(reference.field);\n existing.originalPaths.add(reference.value);\n existing.sourceCount += 1;\n grouped.set(key, existing);\n }\n return [...grouped.entries()]\n .map(([key, entry]) => ({\n path: entry.path,\n scope: entry.scope,\n status: existingResolvedKeys.has(key) ? (\"already_linked\" as const) : (\"addable\" as const),\n source_count: entry.sourceCount,\n source_fields: [...entry.sourceFields].sort((left, right) => left.localeCompare(right)),\n original_paths: [...entry.originalPaths].sort((left, right) => left.localeCompare(right)),\n }))\n .sort((left, right) => {\n const byStatus = left.status.localeCompare(right.status);\n if (byStatus !== 0) return byStatus;\n const byPath = left.path.localeCompare(right.path);\n if (byPath !== 0) return byPath;\n /* c8 ignore next -- path+status collisions are uncommon in deterministic fixtures. */\n return left.scope.localeCompare(right.scope);\n });\n}\n\nexport const _testOnly = {\n normalizeCandidatePathForOutput,\n realpathForContainment,\n linkedFileResolvedKey,\n collectTextReferences,\n collectItemTextReferences,\n cleanupPathToken,\n extractRawPathReferences,\n resolveDiscoveredFile,\n discoverReferencedFiles,\n};\n\n/**\n * Implements run files for the public runtime surface of this module.\n */\nexport async function runFiles(id: string, options: FilesCommandOptions, global: GlobalOptions): Promise<FilesResult> {\n const result: LinkedArtifactResult = await runLinkedArtifacts(id, options, global, {\n metadataKey: \"files\",\n op: \"files_add\",\n bareNoun: \"file\",\n supportsAppendStable: true,\n });\n return renameArtifactsResultKey(result, \"files\") as unknown as FilesResult;\n}\n\n/**\n * Implements run files discover for the public runtime surface of this module.\n */\nexport async function runFilesDiscover(\n id: string,\n options: FilesDiscoverOptions,\n global: GlobalOptions,\n): Promise<FilesDiscoverResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n /* c8 ignore next -- not-found behavior is validated by CLI integration coverage. */\n if (!located) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const candidates = await discoverReferencedFiles(loaded.document, process.cwd());\n const addableCandidates = candidates.filter((candidate) => candidate.status === \"addable\");\n const skippedExisting = candidates.filter((candidate) => candidate.status === \"already_linked\");\n const requestedApply = options.apply === true;\n const note = options.note?.trim() || \"discovered from item text\";\n\n if (!requestedApply || addableCandidates.length === 0) {\n const files = loaded.document.metadata.files ?? [];\n return {\n id: located.id,\n files,\n changed: false,\n apply: requestedApply,\n count: files.length,\n candidate_count: candidates.length,\n addable_count: addableCandidates.length,\n added_count: 0,\n skipped_existing_count: skippedExisting.length,\n candidates,\n added: [],\n skipped_existing: skippedExisting,\n };\n }\n\n const author = resolveAuthor(options.author, settings.author_default);\n const discoveredAdds: LinkedFile[] = addableCandidates.map((candidate) => ({\n path: candidate.path,\n scope: candidate.scope,\n note,\n }));\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"files_discover\",\n author,\n message: options.message ?? \"Discover referenced file links\",\n force: options.force,\n mutate(document) {\n const next = [...(document.metadata.files ?? [])];\n const existingResolvedKeys = new Set(next.map((entry) => linkedFileResolvedKey(entry, process.cwd())));\n const appliedAdds: LinkedFile[] = [];\n for (const add of discoveredAdds) {\n const resolvedKey = linkedFileResolvedKey(add, process.cwd());\n /* c8 ignore next -- duplicate-key race paths are exercised in broader CLI race tests. */\n if (existingResolvedKeys.has(resolvedKey)) {\n continue;\n }\n next.push(add);\n existingResolvedKeys.add(resolvedKey);\n appliedAdds.push(add);\n }\n const deduped = dedupeLinkedArtifacts(next);\n /* c8 ignore next -- appendStable branch is covered through runFiles command contract tests. */\n const normalized = options.appendStable ? deduped : sortLinkedArtifacts(deduped);\n if (normalized.length > 0) {\n document.metadata.files = normalized;\n } else {\n delete document.metadata.files;\n }\n return {\n /* c8 ignore next -- no-op mutation responses may emit empty changedFields for skipped discover batches. */\n changedFields: appliedAdds.length > 0 ? [\"files\"] : [],\n /* c8 ignore next -- warning emission is exercised by race-aware integration tests. */\n warnings: appliedAdds.length !== discoveredAdds.length ? [`files_discover_skipped_existing:${discoveredAdds.length - appliedAdds.length}`] : [],\n };\n },\n });\n\n const files = result.item.files ?? [];\n const addedResolvedKeys = new Set(discoveredAdds.map((entry) => linkedFileResolvedKey(entry, process.cwd())));\n const added = files.filter((entry) => addedResolvedKeys.has(linkedFileResolvedKey(entry, process.cwd())));\n return {\n id: result.item.id,\n files,\n changed: added.length > 0,\n apply: true,\n count: files.length,\n candidate_count: candidates.length,\n addable_count: addableCandidates.length,\n added_count: added.length,\n skipped_existing_count: skippedExisting.length,\n candidates,\n added,\n skipped_existing: skippedExisting,\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,QAAQ;AACf,OAAO,UAAU;;;;;;;;AA4GjB,SAAS,gCAAgC,OAAa;AACpD,SAAO,oBAAoB,KAAK,UAAU,KAAK,CAAC;AAClD;AAEA,eAAe,uBAAuB,WAAiB;AACrD,MAAI;AACF,WAAO,MAAM,GAAG,SAAS,SAAS;EACpC,QAAQ;AACN,WAAO,KAAK,QAAQ,SAAS;EAC/B;AACF;AAEA,SAAS,sBAAsB,YAAgD,aAAmB;AAChG,QAAM,eAAe,KAAK,WAAW,WAAW,IAAI,IAChD,KAAK,QAAQ,WAAW,IAAI,IAC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ACA,SAAS,MAAM,SAAS;IACxB,OAAO;IACP,OAAO,MAAM;IACb,iBAAiB,WAAW;IAC5B,eAAe,kBAAkB;IACjC,aAAa,MAAM;IACnB,wBAAwB,gBAAgB;IACxC;IACA;IACA,kBAAkB;;AAEtB;",
|
|
6
|
+
"names": ["global", "files"]
|
|
7
|
+
}
|
|
@@ -1,36 +1,39 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6179dd4d-1596-513b-a554-40cba753daff")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
dedupeLinkedArtifacts,
|
|
5
5
|
normalizeLinkedPath,
|
|
6
6
|
renameArtifactsResultKey,
|
|
7
7
|
runLinkedArtifacts,
|
|
8
8
|
sortLinkedArtifacts
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YPPVU5GX.js";
|
|
10
10
|
import "./chunk-IBMFIKVS.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveAuthor
|
|
13
13
|
} from "./chunk-T5RRNDA7.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-7WYXBPYQ.js";
|
|
15
15
|
import "./chunk-P4SESZGT.js";
|
|
16
16
|
import {
|
|
17
17
|
locateItem,
|
|
18
18
|
mutateItem,
|
|
19
19
|
readLocatedItem
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-57C2RLW5.js";
|
|
21
|
+
import "./chunk-HK72NWAD.js";
|
|
22
|
+
import "./chunk-FJRKQREY.js";
|
|
23
23
|
import {
|
|
24
|
-
EXIT_CODE,
|
|
25
24
|
PmCliError,
|
|
26
25
|
getActiveExtensionRegistrations,
|
|
26
|
+
readSettings
|
|
27
|
+
} from "./chunk-US3T3W5J.js";
|
|
28
|
+
import "./chunk-NNHHXJB2.js";
|
|
29
|
+
import {
|
|
30
|
+
EXIT_CODE,
|
|
27
31
|
getSettingsPath,
|
|
28
32
|
isPathWithinDirectory,
|
|
29
33
|
pathExists,
|
|
30
|
-
readSettings,
|
|
31
34
|
resolveItemTypeRegistry,
|
|
32
35
|
resolvePmRoot
|
|
33
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-YD5FML7K.js";
|
|
34
37
|
|
|
35
38
|
// dist/cli/commands/files.js
|
|
36
39
|
import fs from "node:fs/promises";
|
|
@@ -84,7 +87,7 @@ function cleanupPathToken(value) {
|
|
|
84
87
|
}
|
|
85
88
|
function extractRawPathReferences(references) {
|
|
86
89
|
const rawReferences = [];
|
|
87
|
-
const absolutePattern = /(?:[A-Za-z]:[\\/]|\/)[^\s"'`<>()
|
|
90
|
+
const absolutePattern = /(?:[A-Za-z]:[\\/]|\/)[^\s"'`<>()[\]{},;]+/gu;
|
|
88
91
|
const relativePattern = /(?:\.{1,2}[\\/])?(?:(?:[A-Za-z0-9_.@-]+[\\/])+[A-Za-z0-9_.@-]+|[A-Za-z0-9_.@-]+\.[A-Za-z0-9][A-Za-z0-9._-]*)/gu;
|
|
89
92
|
for (const reference of references) {
|
|
90
93
|
const seenInField = /* @__PURE__ */ new Set();
|
|
@@ -290,6 +293,6 @@ export {
|
|
|
290
293
|
runFiles,
|
|
291
294
|
runFilesDiscover
|
|
292
295
|
};
|
|
293
|
-
//# sourceMappingURL=files-
|
|
296
|
+
//# sourceMappingURL=files-JPU3FNJ7.js.map
|
|
294
297
|
|
|
295
|
-
//# debugId=
|
|
298
|
+
//# debugId=6179dd4d-1596-513b-a554-40cba753daff
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/files.ts"],"sourcesContent":["/**\n * @module cli/commands/files\n *\n * Implements the pm files command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.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 { locateItem, mutateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { isPathWithinDirectory } from \"../../core/fs/path-utils.js\";\nimport type { ItemDocument, LinkedFile, LinkScope } from \"../../types/index.js\";\nimport {\n dedupeLinkedArtifacts,\n normalizeLinkedPath,\n renameArtifactsResultKey,\n runLinkedArtifacts,\n sortLinkedArtifacts,\n type LinkedArtifactResult,\n type LinkedPathAuditEntry,\n type LinkedPathValidation,\n} from \"./linked-artifacts.js\";\n\n/**\n * Documents the files command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface FilesCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n /** GH-170 (pm-pfnx): standalone note applied to every --add/--add-glob link in this invocation. */\n note?: string;\n list?: boolean;\n appendStable?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the files discover options payload exchanged by command, SDK, and package integrations.\n */\nexport interface FilesDiscoverOptions {\n apply?: boolean;\n appendStable?: boolean;\n note?: string;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the files discovery candidate payload exchanged by command, SDK, and package integrations.\n */\nexport interface FilesDiscoveryCandidate {\n path: string;\n scope: LinkScope;\n status: \"addable\" | \"already_linked\";\n source_count: number;\n source_fields: string[];\n original_paths: string[];\n}\n\n/**\n * Documents the files result payload exchanged by command, SDK, and package integrations.\n */\nexport interface FilesResult {\n id: string;\n files: LinkedFile[];\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n}\n\n/**\n * Documents the files discover result payload exchanged by command, SDK, and package integrations.\n */\nexport interface FilesDiscoverResult {\n id: string;\n files: LinkedFile[];\n changed: boolean;\n apply: boolean;\n count: number;\n candidate_count: number;\n addable_count: number;\n added_count: number;\n skipped_existing_count: number;\n candidates: FilesDiscoveryCandidate[];\n added: LinkedFile[];\n skipped_existing: FilesDiscoveryCandidate[];\n}\n\ninterface TextReference {\n field: string;\n value: string;\n}\n\ninterface RawPathReference {\n field: string;\n value: string;\n}\n\nfunction normalizeCandidatePathForOutput(value: string): string {\n return normalizeLinkedPath(path.normalize(value));\n}\n\nasync function realpathForContainment(inputPath: string): Promise<string> {\n try {\n return await fs.realpath(inputPath);\n } catch {\n return path.resolve(inputPath);\n }\n}\n\nfunction linkedFileResolvedKey(linkedFile: Pick<LinkedFile, \"path\" | \"scope\">, projectRoot: string): string {\n const resolvedPath = path.isAbsolute(linkedFile.path)\n ? path.resolve(linkedFile.path)\n : path.resolve(projectRoot, linkedFile.path);\n return `${normalizeCandidatePathForOutput(resolvedPath)}::${linkedFile.scope}`;\n}\n\nfunction collectTextReferences(value: unknown, fieldPath: string, references: TextReference[]): void {\n if (typeof value === \"string\") {\n const trimmed = value.trim();\n if (trimmed.length > 0) {\n references.push({ field: fieldPath, value: trimmed });\n }\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((entry, index) => collectTextReferences(entry, `${fieldPath}[${index}]`, references));\n return;\n }\n if (typeof value === \"object\" && value !== null) {\n for (const [key, nested] of Object.entries(value)) {\n /* c8 ignore next -- root-level object traversal always carries a non-empty field path in current callers. */\n collectTextReferences(nested, fieldPath ? `${fieldPath}.${key}` : key, references);\n }\n }\n}\n\nfunction collectItemTextReferences(document: ItemDocument): TextReference[] {\n const references: TextReference[] = [];\n collectTextReferences(document.metadata, \"metadata\", references);\n collectTextReferences(document.body, \"body\", references);\n return references;\n}\n\nfunction cleanupPathToken(value: string): string {\n let next = value.trim();\n next = next.replace(/^[`\"'<([{]+/u, \"\");\n next = next.replace(/[`\"'>)\\]},;!?]+$/u, \"\");\n next = next.replace(/[.]+$/u, \"\");\n next = next.replace(/:(?:\\d+)(?::\\d+)?$/u, \"\");\n next = next.replace(/[.]+$/u, \"\");\n return next;\n}\n\nfunction extractRawPathReferences(references: TextReference[]): RawPathReference[] {\n const rawReferences: RawPathReference[] = [];\n const absolutePattern = /(?:[A-Za-z]:[\\\\/]|\\/)[^\\s\"'`<>()[\\]{},;]+/gu;\n const relativePattern =\n /(?:\\.{1,2}[\\\\/])?(?:(?:[A-Za-z0-9_.@-]+[\\\\/])+[A-Za-z0-9_.@-]+|[A-Za-z0-9_.@-]+\\.[A-Za-z0-9][A-Za-z0-9._-]*)/gu;\n for (const reference of references) {\n const seenInField = new Set<string>();\n for (const pattern of [absolutePattern, relativePattern]) {\n pattern.lastIndex = 0;\n for (const match of reference.value.matchAll(pattern)) {\n /* c8 ignore next -- RegExp match arrays always expose capture [0]. */\n const token = cleanupPathToken(match[0] ?? \"\");\n if (!token || seenInField.has(token)) {\n continue;\n }\n seenInField.add(token);\n rawReferences.push({ field: reference.field, value: token });\n }\n }\n }\n return rawReferences;\n}\n\nasync function resolveDiscoveredFile(\n rawPath: string,\n projectRoot: string,\n): Promise<Pick<LinkedFile, \"path\" | \"scope\"> | undefined> {\n const absolutePath = path.isAbsolute(rawPath) ? path.resolve(rawPath) : path.resolve(projectRoot, rawPath);\n let stats;\n try {\n stats = await fs.stat(absolutePath);\n } catch {\n return undefined;\n }\n if (!stats.isFile()) {\n return undefined;\n }\n const [canonicalProjectRoot, canonicalAbsolutePath] = await Promise.all([\n realpathForContainment(projectRoot),\n realpathForContainment(absolutePath),\n ]);\n if (isPathWithinDirectory(canonicalProjectRoot, canonicalAbsolutePath)) {\n const relativePath = path.relative(canonicalProjectRoot, canonicalAbsolutePath);\n if (!relativePath || relativePath.startsWith(\"..\") || path.isAbsolute(relativePath)) {\n return undefined;\n }\n return {\n path: normalizeCandidatePathForOutput(relativePath),\n scope: \"project\",\n };\n }\n return {\n path: normalizeCandidatePathForOutput(absolutePath),\n scope: \"global\",\n };\n}\n\nasync function discoverReferencedFiles(document: ItemDocument, projectRoot: string): Promise<FilesDiscoveryCandidate[]> {\n const existingResolvedKeys = new Set((document.metadata.files ?? []).map((entry) => linkedFileResolvedKey(entry, projectRoot)));\n const grouped = new Map<\n string,\n {\n path: string;\n scope: LinkScope;\n sourceFields: Set<string>;\n originalPaths: Set<string>;\n sourceCount: number;\n }\n >();\n const rawReferences = extractRawPathReferences(collectItemTextReferences(document));\n for (const reference of rawReferences) {\n const resolved = await resolveDiscoveredFile(reference.value, projectRoot);\n if (!resolved) {\n continue;\n }\n const key = linkedFileResolvedKey(resolved, projectRoot);\n const existing = grouped.get(key) ?? {\n path: resolved.path,\n scope: resolved.scope,\n sourceFields: new Set<string>(),\n originalPaths: new Set<string>(),\n sourceCount: 0,\n };\n existing.sourceFields.add(reference.field);\n existing.originalPaths.add(reference.value);\n existing.sourceCount += 1;\n grouped.set(key, existing);\n }\n return [...grouped.entries()]\n .map(([key, entry]) => ({\n path: entry.path,\n scope: entry.scope,\n status: existingResolvedKeys.has(key) ? (\"already_linked\" as const) : (\"addable\" as const),\n source_count: entry.sourceCount,\n source_fields: [...entry.sourceFields].sort((left, right) => left.localeCompare(right)),\n original_paths: [...entry.originalPaths].sort((left, right) => left.localeCompare(right)),\n }))\n .sort((left, right) => {\n const byStatus = left.status.localeCompare(right.status);\n if (byStatus !== 0) return byStatus;\n const byPath = left.path.localeCompare(right.path);\n if (byPath !== 0) return byPath;\n /* c8 ignore next -- path+status collisions are uncommon in deterministic fixtures. */\n return left.scope.localeCompare(right.scope);\n });\n}\n\nexport const _testOnly = {\n normalizeCandidatePathForOutput,\n realpathForContainment,\n linkedFileResolvedKey,\n collectTextReferences,\n collectItemTextReferences,\n cleanupPathToken,\n extractRawPathReferences,\n resolveDiscoveredFile,\n discoverReferencedFiles,\n};\n\n/**\n * Implements run files for the public runtime surface of this module.\n */\nexport async function runFiles(id: string, options: FilesCommandOptions, global: GlobalOptions): Promise<FilesResult> {\n const result: LinkedArtifactResult = await runLinkedArtifacts(id, options, global, {\n metadataKey: \"files\",\n op: \"files_add\",\n bareNoun: \"file\",\n supportsAppendStable: true,\n });\n return renameArtifactsResultKey(result, \"files\") as unknown as FilesResult;\n}\n\n/**\n * Implements run files discover for the public runtime surface of this module.\n */\nexport async function runFilesDiscover(\n id: string,\n options: FilesDiscoverOptions,\n global: GlobalOptions,\n): Promise<FilesDiscoverResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n /* c8 ignore next -- not-found behavior is validated by CLI integration coverage. */\n if (!located) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const candidates = await discoverReferencedFiles(loaded.document, process.cwd());\n const addableCandidates = candidates.filter((candidate) => candidate.status === \"addable\");\n const skippedExisting = candidates.filter((candidate) => candidate.status === \"already_linked\");\n const requestedApply = options.apply === true;\n const note = options.note?.trim() || \"discovered from item text\";\n\n if (!requestedApply || addableCandidates.length === 0) {\n const files = loaded.document.metadata.files ?? [];\n return {\n id: located.id,\n files,\n changed: false,\n apply: requestedApply,\n count: files.length,\n candidate_count: candidates.length,\n addable_count: addableCandidates.length,\n added_count: 0,\n skipped_existing_count: skippedExisting.length,\n candidates,\n added: [],\n skipped_existing: skippedExisting,\n };\n }\n\n const author = resolveAuthor(options.author, settings.author_default);\n const discoveredAdds: LinkedFile[] = addableCandidates.map((candidate) => ({\n path: candidate.path,\n scope: candidate.scope,\n note,\n }));\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"files_discover\",\n author,\n message: options.message ?? \"Discover referenced file links\",\n force: options.force,\n mutate(document) {\n const next = [...(document.metadata.files ?? [])];\n const existingResolvedKeys = new Set(next.map((entry) => linkedFileResolvedKey(entry, process.cwd())));\n const appliedAdds: LinkedFile[] = [];\n for (const add of discoveredAdds) {\n const resolvedKey = linkedFileResolvedKey(add, process.cwd());\n /* c8 ignore next -- duplicate-key race paths are exercised in broader CLI race tests. */\n if (existingResolvedKeys.has(resolvedKey)) {\n continue;\n }\n next.push(add);\n existingResolvedKeys.add(resolvedKey);\n appliedAdds.push(add);\n }\n const deduped = dedupeLinkedArtifacts(next);\n /* c8 ignore next -- appendStable branch is covered through runFiles command contract tests. */\n const normalized = options.appendStable ? deduped : sortLinkedArtifacts(deduped);\n if (normalized.length > 0) {\n document.metadata.files = normalized;\n } else {\n delete document.metadata.files;\n }\n return {\n /* c8 ignore next -- no-op mutation responses may emit empty changedFields for skipped discover batches. */\n changedFields: appliedAdds.length > 0 ? [\"files\"] : [],\n /* c8 ignore next -- warning emission is exercised by race-aware integration tests. */\n warnings: appliedAdds.length !== discoveredAdds.length ? [`files_discover_skipped_existing:${discoveredAdds.length - appliedAdds.length}`] : [],\n };\n },\n });\n\n const files = result.item.files ?? [];\n const addedResolvedKeys = new Set(discoveredAdds.map((entry) => linkedFileResolvedKey(entry, process.cwd())));\n const added = files.filter((entry) => addedResolvedKeys.has(linkedFileResolvedKey(entry, process.cwd())));\n return {\n id: result.item.id,\n files,\n changed: added.length > 0,\n apply: true,\n count: files.length,\n candidate_count: candidates.length,\n addable_count: addableCandidates.length,\n added_count: added.length,\n skipped_existing_count: skippedExisting.length,\n candidates,\n added,\n skipped_existing: skippedExisting,\n };\n}\n"],"names":["files"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,QAAQ;AACf,OAAO,UAAU;AA4GjB,SAAS,gCAAgC,OAAa;AACpD,SAAO,oBAAoB,KAAK,UAAU,KAAK,CAAC;AAClD;AAEA,eAAe,uBAAuB,WAAiB;AACrD,MAAI;AACF,WAAO,MAAM,GAAG,SAAS,SAAS;EACpC,QAAQ;AACN,WAAO,KAAK,QAAQ,SAAS;EAC/B;AACF;AAEA,SAAS,sBAAsB,YAAgD,aAAmB;AAChG,QAAM,eAAe,KAAK,WAAW,WAAW,IAAI,IAChD,KAAK,QAAQ,WAAW,IAAI,IAC5B,KAAK,QAAQ,aAAa,WAAW,IAAI;AAC7C,SAAO,GAAG,gCAAgC,YAAY,CAAC,KAAK,WAAW,KAAK;AAC9E;AAEA,SAAS,sBAAsB,OAAgB,WAAmB,YAA2B;AAC3F,MAAI,OAAO,UAAU,UAAU;AAC7B,UAAM,UAAU,MAAM,KAAI;AAC1B,QAAI,QAAQ,SAAS,GAAG;AACtB,iBAAW,KAAK,EAAE,OAAO,WAAW,OAAO,QAAO,CAAE;IACtD;AACA;EACF;AACA,MAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,UAAM,QAAQ,CAAC,OAAO,UAAU,sBAAsB,OAAO,GAAG,SAAS,IAAI,KAAK,KAAK,UAAU,CAAC;AAClG;EACF;AACA,MAAI,OAAO,UAAU,YAAY,UAAU,MAAM;AAC/C,eAAW,CAAC,KAAK,MAAM,KAAK,OAAO,QAAQ,KAAK,GAAG;AAEjD,4BAAsB,QAAQ,YAAY,GAAG,SAAS,IAAI,GAAG,KAAK,KAAK,UAAU;IACnF;EACF;AACF;AAEA,SAAS,0BAA0B,UAAsB;AACvD,QAAM,aAA8B,CAA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G;AACzB,iBAAS,SAAS,QAAQ;MAC5B,OAAO;AACL,eAAO,SAAS,SAAS;MAC3B;AACA,aAAO;;QAEL,eAAe,YAAY,SAAS,IAAI,CAAC,OAAO,IAAI,CAAA;;QAEpD,UAAU,YAAY,WAAW,eAAe,SAAS,CAAC,mCAAmC,eAAe,SAAS,YAAY,MAAM,EAAE,IAAI,CAAA;;IAEjJ;GACD;AAED,QAAM,QAAQ,OAAO,KAAK,SAAS,CAAA;AACnC,QAAM,oBAAoB,IAAI,IAAI,eAAe,IAAI,CAAC,UAAU,sBAAsB,OAAO,QAAQ,IAAG,CAAE,CAAC,CAAC;AAC5G,QAAM,QAAQ,MAAM,OAAO,CAAC,UAAU,kBAAkB,IAAI,sBAAsB,OAAO,QAAQ,IAAG,CAAE,CAAC,CAAC;AACxG,SAAO;IACL,IAAI,OAAO,KAAK;IAChB;IACA,SAAS,MAAM,SAAS;IACxB,OAAO;IACP,OAAO,MAAM;IACb,iBAAiB,WAAW;IAC5B,eAAe,kBAAkB;IACjC,aAAa,MAAM;IACnB,wBAAwB,gBAAgB;IACxC;IACA;IACA,kBAAkB;;AAEtB","debugId":"6179dd4d-1596-513b-a554-40cba753daff"}
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="879316e1-22fd-544f-a0d4-8d9d4ce1dfa8")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
clearFocusedItem,
|
|
5
5
|
getFocusedItem,
|
|
6
6
|
setFocusedItem
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PDXT6Q55.js";
|
|
8
8
|
import {
|
|
9
9
|
buildItemNotFoundError,
|
|
10
10
|
locateItem,
|
|
11
|
-
normalizeItemId,
|
|
12
11
|
readLocatedItem
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import
|
|
15
|
-
|
|
12
|
+
} from "./chunk-57C2RLW5.js";
|
|
13
|
+
import {
|
|
14
|
+
normalizeItemId
|
|
15
|
+
} from "./chunk-HK72NWAD.js";
|
|
16
|
+
import "./chunk-FJRKQREY.js";
|
|
16
17
|
import {
|
|
17
|
-
EXIT_CODE,
|
|
18
18
|
PmCliError,
|
|
19
19
|
getActiveExtensionRegistrations,
|
|
20
|
+
readSettings
|
|
21
|
+
} from "./chunk-US3T3W5J.js";
|
|
22
|
+
import "./chunk-NNHHXJB2.js";
|
|
23
|
+
import {
|
|
24
|
+
EXIT_CODE,
|
|
20
25
|
getSettingsPath,
|
|
21
26
|
pathExists,
|
|
22
|
-
readSettings,
|
|
23
27
|
resolveItemTypeRegistry,
|
|
24
28
|
resolvePmRoot
|
|
25
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-YD5FML7K.js";
|
|
26
30
|
|
|
27
31
|
// dist/cli/commands/focus.js
|
|
28
32
|
async function ensureInitialized(pmRoot) {
|
|
@@ -97,6 +101,6 @@ function nonEmptyTitleOrNull(title) {
|
|
|
97
101
|
export {
|
|
98
102
|
runFocus
|
|
99
103
|
};
|
|
100
|
-
//# sourceMappingURL=focus-
|
|
104
|
+
//# sourceMappingURL=focus-LFZ6IDBR.js.map
|
|
101
105
|
|
|
102
|
-
//# debugId=
|
|
106
|
+
//# debugId=879316e1-22fd-544f-a0d4-8d9d4ce1dfa8
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/focus.ts"],"sourcesContent":["/**\n * @module cli/commands/focus\n *\n * Implements the pm focus command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { normalizeItemId } from \"../../core/item/id.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.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 {\n clearFocusedItem,\n getFocusedItem,\n setFocusedItem,\n} from \"../../core/session/session-state.js\";\nimport { buildItemNotFoundError, locateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\n\n/**\n * Documents the focus options payload exchanged by command, SDK, and package integrations.\n */\nexport interface FocusOptions {\n clear?: boolean;\n}\n\n/**\n * Documents the focus result payload exchanged by command, SDK, and package integrations.\n */\nexport interface FocusResult {\n action: \"set\" | \"clear\" | \"show\";\n focused_item: string | null;\n title: string | null;\n message: string;\n}\n\nasync function ensureInitialized(pmRoot: string): Promise<void> {\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\n/**\n * Implements run focus for the public runtime surface of this module.\n */\nexport async function runFocus(\n id: string | undefined,\n options: FocusOptions,\n global: GlobalOptions,\n): Promise<FocusResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n const clear = options.clear === true;\n\n if (clear) {\n if (id !== undefined) {\n throw new PmCliError(\n \"pm focus --clear does not take an item id. Use 'pm focus --clear' to clear focus or 'pm focus <id>' to set it.\",\n EXIT_CODE.USAGE,\n );\n }\n await clearFocusedItem(pmRoot);\n return {\n action: \"clear\",\n focused_item: null,\n title: null,\n message: \"Focus cleared. New items will not inherit a default parent.\",\n };\n }\n\n if (id === undefined) {\n const current = await getFocusedItem(pmRoot);\n if (current === undefined) {\n return {\n action: \"show\",\n focused_item: null,\n title: null,\n message: \"No focus set. Use 'pm focus <id>' to set a default parent for new items.\",\n };\n }\n const title = await resolveFocusedTitle(pmRoot, current);\n return {\n action: \"show\",\n focused_item: current,\n title,\n message: `Focused on ${current}${title ? ` (${title})` : \"\"}. New items default --parent to it.`,\n };\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeRegistry.type_to_folder);\n }\n const normalizedId = normalizeItemId(located.id, settings.id_prefix);\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const title = nonEmptyTitleOrNull(loaded.document.metadata.title);\n await setFocusedItem(pmRoot, normalizedId);\n return {\n action: \"set\",\n focused_item: normalizedId,\n title,\n message: `Focused on ${normalizedId}${title ? ` (${title})` : \"\"}. New items default --parent to it (override with --parent or clear via 'pm focus --clear').`,\n };\n}\n\nasync function resolveFocusedTitle(pmRoot: string, id: string): Promise<string | null> {\n // The tracker is already known to be initialized (ensureInitialized ran), so\n // readSettings/locateItem behave like the `pm get` read path: a deleted/stale\n // focused item simply locates to null and yields no title hint.\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n return null;\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n return nonEmptyTitleOrNull(loaded.document.metadata.title);\n}\n\nfunction nonEmptyTitleOrNull(title: string): string | null {\n return title.trim().length > 0 ? title : null;\n}\n"],"names":["title"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/focus.ts"],"sourcesContent":["/**\n * @module cli/commands/focus\n *\n * Implements the pm focus command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { normalizeItemId } from \"../../core/item/id.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.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 {\n clearFocusedItem,\n getFocusedItem,\n setFocusedItem,\n} from \"../../core/session/session-state.js\";\nimport { buildItemNotFoundError, locateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\n\n/**\n * Documents the focus options payload exchanged by command, SDK, and package integrations.\n */\nexport interface FocusOptions {\n clear?: boolean;\n}\n\n/**\n * Documents the focus result payload exchanged by command, SDK, and package integrations.\n */\nexport interface FocusResult {\n action: \"set\" | \"clear\" | \"show\";\n focused_item: string | null;\n title: string | null;\n message: string;\n}\n\nasync function ensureInitialized(pmRoot: string): Promise<void> {\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\n/**\n * Implements run focus for the public runtime surface of this module.\n */\nexport async function runFocus(\n id: string | undefined,\n options: FocusOptions,\n global: GlobalOptions,\n): Promise<FocusResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n const clear = options.clear === true;\n\n if (clear) {\n if (id !== undefined) {\n throw new PmCliError(\n \"pm focus --clear does not take an item id. Use 'pm focus --clear' to clear focus or 'pm focus <id>' to set it.\",\n EXIT_CODE.USAGE,\n );\n }\n await clearFocusedItem(pmRoot);\n return {\n action: \"clear\",\n focused_item: null,\n title: null,\n message: \"Focus cleared. New items will not inherit a default parent.\",\n };\n }\n\n if (id === undefined) {\n const current = await getFocusedItem(pmRoot);\n if (current === undefined) {\n return {\n action: \"show\",\n focused_item: null,\n title: null,\n message: \"No focus set. Use 'pm focus <id>' to set a default parent for new items.\",\n };\n }\n const title = await resolveFocusedTitle(pmRoot, current);\n return {\n action: \"show\",\n focused_item: current,\n title,\n message: `Focused on ${current}${title ? ` (${title})` : \"\"}. New items default --parent to it.`,\n };\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeRegistry.type_to_folder);\n }\n const normalizedId = normalizeItemId(located.id, settings.id_prefix);\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const title = nonEmptyTitleOrNull(loaded.document.metadata.title);\n await setFocusedItem(pmRoot, normalizedId);\n return {\n action: \"set\",\n focused_item: normalizedId,\n title,\n message: `Focused on ${normalizedId}${title ? ` (${title})` : \"\"}. New items default --parent to it (override with --parent or clear via 'pm focus --clear').`,\n };\n}\n\nasync function resolveFocusedTitle(pmRoot: string, id: string): Promise<string | null> {\n // The tracker is already known to be initialized (ensureInitialized ran), so\n // readSettings/locateItem behave like the `pm get` read path: a deleted/stale\n // focused item simply locates to null and yields no title hint.\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n return null;\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n return nonEmptyTitleOrNull(loaded.document.metadata.title);\n}\n\nfunction nonEmptyTitleOrNull(title: string): string | null {\n return title.trim().length > 0 ? title : null;\n}\n"],"names":["title"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,eAAe,kBAAkB,QAAc;AAC7C,MAAI,CAAE,MAAM,WAAW,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cAAc;IACd;IACA,SAAS,cAAc,YAAY,GAAG,QAAQ,KAAK,KAAK,MAAM,EAAE;;AAEpE;AAEA,eAAe,oBAAoB,QAAgB,IAAU;AAI3D,QAAM,WAAW,MAAM,aAAa,MAAM;AAC1C,QAAM,eAAe,wBAAwB,UAAU,gCAA+B,CAAE;AACxF,QAAM,UAAU,MAAM,WAAW,QAAQ,IAAI,SAAS,WAAW,SAAS,aAAa,aAAa,cAAc;AAClH,MAAI,CAAC,SAAS;AACZ,WAAO;EACT;AACA,QAAM,SAAS,MAAM,gBAAgB,SAAS,EAAE,QAAQ,SAAS,OAAM,CAAE;AACzE,SAAO,oBAAoB,OAAO,SAAS,SAAS,KAAK;AAC3D;AAEA,SAAS,oBAAoB,OAAa;AACxC,SAAO,MAAM,KAAI,EAAG,SAAS,IAAI,QAAQ;AAC3C","debugId":"879316e1-22fd-544f-a0d4-8d9d4ce1dfa8"}
|
|
@@ -2,25 +2,29 @@ import {
|
|
|
2
2
|
clearFocusedItem,
|
|
3
3
|
getFocusedItem,
|
|
4
4
|
setFocusedItem
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZMD35NYG.js";
|
|
6
6
|
import {
|
|
7
7
|
buildItemNotFoundError,
|
|
8
8
|
locateItem,
|
|
9
|
-
normalizeItemId,
|
|
10
9
|
readLocatedItem
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import
|
|
13
|
-
|
|
10
|
+
} from "./chunk-3U3VEWK6.js";
|
|
11
|
+
import {
|
|
12
|
+
normalizeItemId
|
|
13
|
+
} from "./chunk-EZFKWSC7.js";
|
|
14
|
+
import "./chunk-DRBV5UC2.js";
|
|
14
15
|
import {
|
|
15
|
-
EXIT_CODE,
|
|
16
16
|
PmCliError,
|
|
17
17
|
getActiveExtensionRegistrations,
|
|
18
|
+
readSettings
|
|
19
|
+
} from "./chunk-P5YORJRH.js";
|
|
20
|
+
import "./chunk-7C2O74AE.js";
|
|
21
|
+
import {
|
|
22
|
+
EXIT_CODE,
|
|
18
23
|
getSettingsPath,
|
|
19
24
|
pathExists,
|
|
20
|
-
readSettings,
|
|
21
25
|
resolveItemTypeRegistry,
|
|
22
26
|
resolvePmRoot
|
|
23
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5VVUKE3U.js";
|
|
24
28
|
|
|
25
29
|
// dist/cli/commands/focus.js
|
|
26
30
|
!(function() {
|
|
@@ -102,4 +106,4 @@ function nonEmptyTitleOrNull(title) {
|
|
|
102
106
|
export {
|
|
103
107
|
runFocus
|
|
104
108
|
};
|
|
105
|
-
//# sourceMappingURL=focus-
|
|
109
|
+
//# sourceMappingURL=focus-WNMYCVYA.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../cli/commands/focus.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @module cli/commands/focus\n *\n * Implements the pm focus command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { normalizeItemId } from \"../../core/item/id.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.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 {\n clearFocusedItem,\n getFocusedItem,\n setFocusedItem,\n} from \"../../core/session/session-state.js\";\nimport { buildItemNotFoundError, locateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\n\n/**\n * Documents the focus options payload exchanged by command, SDK, and package integrations.\n */\nexport interface FocusOptions {\n clear?: boolean;\n}\n\n/**\n * Documents the focus result payload exchanged by command, SDK, and package integrations.\n */\nexport interface FocusResult {\n action: \"set\" | \"clear\" | \"show\";\n focused_item: string | null;\n title: string | null;\n message: string;\n}\n\nasync function ensureInitialized(pmRoot: string): Promise<void> {\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\n/**\n * Implements run focus for the public runtime surface of this module.\n */\nexport async function runFocus(\n id: string | undefined,\n options: FocusOptions,\n global: GlobalOptions,\n): Promise<FocusResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n const clear = options.clear === true;\n\n if (clear) {\n if (id !== undefined) {\n throw new PmCliError(\n \"pm focus --clear does not take an item id. Use 'pm focus --clear' to clear focus or 'pm focus <id>' to set it.\",\n EXIT_CODE.USAGE,\n );\n }\n await clearFocusedItem(pmRoot);\n return {\n action: \"clear\",\n focused_item: null,\n title: null,\n message: \"Focus cleared. New items will not inherit a default parent.\",\n };\n }\n\n if (id === undefined) {\n const current = await getFocusedItem(pmRoot);\n if (current === undefined) {\n return {\n action: \"show\",\n focused_item: null,\n title: null,\n message: \"No focus set. Use 'pm focus <id>' to set a default parent for new items.\",\n };\n }\n const title = await resolveFocusedTitle(pmRoot, current);\n return {\n action: \"show\",\n focused_item: current,\n title,\n message: `Focused on ${current}${title ? ` (${title})` : \"\"}. New items default --parent to it.`,\n };\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeRegistry.type_to_folder);\n }\n const normalizedId = normalizeItemId(located.id, settings.id_prefix);\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const title = nonEmptyTitleOrNull(loaded.document.metadata.title);\n await setFocusedItem(pmRoot, normalizedId);\n return {\n action: \"set\",\n focused_item: normalizedId,\n title,\n message: `Focused on ${normalizedId}${title ? ` (${title})` : \"\"}. New items default --parent to it (override with --parent or clear via 'pm focus --clear').`,\n };\n}\n\nasync function resolveFocusedTitle(pmRoot: string, id: string): Promise<string | null> {\n // The tracker is already known to be initialized (ensureInitialized ran), so\n // readSettings/locateItem behave like the `pm get` read path: a deleted/stale\n // focused item simply locates to null and yields no title hint.\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n return null;\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n return nonEmptyTitleOrNull(loaded.document.metadata.title);\n}\n\nfunction nonEmptyTitleOrNull(title: string): string | null {\n return title.trim().length > 0 ? title : null;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,eAAe,kBAAkB,QAAc;AAC7C,MAAI,CAAE,MAAM,WAAW,gBAAgB,MAAM,CAAC,GAAI;AAChD,UAAM,IAAI,WAAW,iCAAiC,MAAM,wBAAwB,UAAU,SAAS;EACzG;AACF;AAKA,eAAsB,SACpB,IACA,SACAA,SAAqB;AAErB,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAIA,QAAO,IAAI;AACvD,QAAM,kBAAkB,MAAM;AAE9B,QAAM,QAAQ,QAAQ,UAAU;AAEhC,MAAI,OAAO;AACT,QAAI,OAAO,QAAW;AACpB,YAAM,IAAI,WACR,kHACA,UAAU,KAAK;IAEnB;AACA,UAAM,iBAAiB,MAAM;AAC7B,WAAO;MACL,QAAQ;MACR,cAAc;MACd,OAAO;MACP,SAAS;;EAEb;AAEA,MAAI,OAAO,QAAW;AACpB,UAAM,UAAU,MAAM,eAAe,MAAM;AAC3C,QAAI,YAAY,QAAW;AACzB,aAAO;QACL,QAAQ;QACR,cAAc;QACd,OAAO;QACP,SAAS;;IAEb;AACA,UAAMC,SAAQ,MAAM,oBAAoB,QAAQ,O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342C63.js";
|
|
4
4
|
import {
|
|
5
5
|
nowIso
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DRBV5UC2.js";
|
|
7
7
|
import {
|
|
8
|
-
EXIT_CODE,
|
|
9
8
|
PmCliError,
|
|
10
|
-
getSettingsPath,
|
|
11
|
-
pathExists,
|
|
12
9
|
readSettings,
|
|
13
|
-
resolvePmRoot,
|
|
14
10
|
runActiveOnIndexHooks,
|
|
15
11
|
runActiveOnReadHooks,
|
|
16
12
|
runActiveOnWriteHooks
|
|
17
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-P5YORJRH.js";
|
|
14
|
+
import "./chunk-7C2O74AE.js";
|
|
15
|
+
import {
|
|
16
|
+
EXIT_CODE,
|
|
17
|
+
getSettingsPath,
|
|
18
|
+
pathExists,
|
|
19
|
+
resolvePmRoot
|
|
20
|
+
} from "./chunk-5VVUKE3U.js";
|
|
18
21
|
|
|
19
22
|
// dist/cli/commands/gc.js
|
|
20
23
|
import fs2 from "node:fs/promises";
|
|
@@ -392,4 +395,4 @@ async function runGc(global2, options = {}) {
|
|
|
392
395
|
export {
|
|
393
396
|
runGc
|
|
394
397
|
};
|
|
395
|
-
//# sourceMappingURL=gc-
|
|
398
|
+
//# sourceMappingURL=gc-AETFKZ44.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../cli/commands/gc.ts", "../../../../../../../../core/checkpoint/checkpoint-gc.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @module cli/commands/gc\n *\n * Implements the pm gc command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { runCheckpointGc } from \"../../core/checkpoint/checkpoint-gc.js\";\nimport { runActiveOnIndexHooks, runActiveOnReadHooks, runActiveOnWriteHooks } from \"../../core/extensions/index.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { runLockGc } from \"../../core/lock/lock-gc.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\n\nconst GC_SCOPE_VALUES = [\"index\", \"embeddings\", \"runtime\", \"locks\", \"checkpoints\"] as const;\ntype GcScope = (typeof GC_SCOPE_VALUES)[number];\n\ninterface GcTarget {\n scope: GcScope;\n relativePath: string;\n kind: \"file\" | \"directory\";\n}\n\nconst GC_TARGETS: readonly GcTarget[] = [\n {\n scope: \"index\",\n relativePath: \"index/manifest.json\",\n kind: \"file\",\n },\n {\n scope: \"embeddings\",\n relativePath: \"search/embeddings.jsonl\",\n kind: \"file\",\n },\n {\n scope: \"embeddings\",\n relativePath: \"search/vectorization-status.json\",\n kind: \"file\",\n },\n {\n scope: \"embeddings\",\n relativePath: \"search/lancedb\",\n kind: \"directory\",\n },\n {\n // Removing embeddings invalidates the whole semantic index, so the queued\n // background-refresh work is also meaningless: a worker draining a stale\n // queue against an empty ledger would rebuild a partial, inconsistent index\n // (only the queued items vectorized). Clear the queue and its gate so the\n // next mutation re-seeds from a clean slate. See core/search/background-refresh.ts.\n scope: \"embeddings\",\n relativePath: \"search/pending-refresh.json\",\n kind: \"file\",\n },\n {\n scope: \"embeddings\",\n relativePath: \"search/pending-refresh.gate.lock\",\n kind: \"directory\",\n },\n {\n scope: \"runtime\",\n relativePath: \"runtime/test-runs\",\n kind: \"directory\",\n },\n {\n scope: \"runtime\",\n relativePath: \"runtime/history-drift-cache.json\",\n kind: \"file\",\n },\n] as const;\n\n/**\n * Documents the gc command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface GcCommandOptions {\n dryRun?: boolean;\n scope?: string[];\n}\n\n/**\n * Documents the gc locks summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface GcLocksSummary {\n scanned: number;\n removed: number;\n retained: number;\n}\n\n/**\n * Documents the gc checkpoints summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface GcCheckpointsSummary {\n scanned: number;\n removed: number;\n retained: number;\n retention_days: number;\n}\n\n/**\n * Documents the gc result payload exchanged by command, SDK, and package integrations.\n */\nexport interface GcResult {\n ok: boolean;\n dry_run: boolean;\n scope: GcScope[];\n removed: string[];\n retained: string[];\n warnings: string[];\n guidance: string[];\n /** Present only when the locks scope was selected. Summarizes the stale-lock sweep. */\n locks?: GcLocksSummary;\n /** Present only when the checkpoints scope was selected. Summarizes the rollback-checkpoint sweep. */\n checkpoints?: GcCheckpointsSummary;\n generated_at: string;\n}\n\nfunction isErrno(error: unknown, code: string): boolean {\n return typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code === code;\n}\n\nasync function removeCacheFile(\n pmRoot: string,\n target: GcTarget,\n dryRun: boolean,\n): Promise<{ removed: boolean; warnings: string[] }> {\n const relativePath = target.relativePath;\n const absolutePath = path.join(pmRoot, relativePath);\n const warnings = await runActiveOnReadHooks({\n path: absolutePath,\n scope: \"project\",\n });\n try {\n const stats = await fs.stat(absolutePath);\n if (target.kind === \"file\" && !stats.isFile()) {\n return {\n removed: false,\n warnings: [...warnings, `not_a_file:${relativePath}`],\n };\n }\n if (target.kind === \"directory\" && !stats.isDirectory()) {\n return {\n removed: false,\n warnings: [...warnings, `not_a_directory:${relativePath}`],\n };\n }\n if (dryRun) {\n return {\n removed: true,\n warnings,\n };\n }\n if (target.kind === \"file\") {\n await fs.unlink(absolutePath);\n } else {\n await fs.rm(absolutePath, { recursive: true, force: true });\n }\n const writeWarnings = await runActiveOnWriteHooks({\n path: absolutePath,\n scope: \"project\",\n op: \"gc:remove\",\n });\n return {\n removed: true,\n warnings: [...warnings, ...writeWarnings],\n };\n } catch (error: unknown) {\n if (isErrno(error, \"ENOENT\")) {\n return {\n removed: false,\n warnings,\n };\n }\n throw error;\n }\n}\n\nfunction parseScopes(raw: string[] | undefined): GcScope[] {\n if (!raw || raw.length === 0) {\n return [...GC_SCOPE_VALUES];\n }\n const tokens = raw\n .flatMap((entry) => entry.split(\",\"))\n .map((entry) => entry.trim().toLowerCase())\n .filter((entry) => entry.length > 0);\n if (tokens.length === 0) {\n throw new PmCliError(`--scope requires at least one value (${GC_SCOPE_VALUES.join(\",\")})`, EXIT_CODE.USAGE);\n }\n const resolved = new Set<GcScope>();\n for (const token of tokens) {\n if (!(GC_SCOPE_VALUES as readonly string[]).includes(token)) {\n throw new PmCliError(\n `Invalid --scope value \"${token}\". Expected one or more of: ${GC_SCOPE_VALUES.join(\", \")}`,\n EXIT_CODE.USAGE,\n );\n }\n resolved.add(token as GcScope);\n }\n return GC_SCOPE_VALUES.filter((scope) => resolved.has(scope));\n}\n\nfunction buildGcGuidance(params: {\n dryRun: boolean;\n scopes: GcScope[];\n removed: string[];\n}): string[] {\n const guidance: string[] = [];\n if (params.dryRun) {\n guidance.push(\"Dry-run preview only: no cache artifacts were deleted.\");\n }\n const searchScopeSelected = params.scopes.includes(\"index\") || params.scopes.includes(\"embeddings\");\n const searchArtifactsAffected = params.removed.some(\n (entry) =>\n entry === \"index/manifest.json\" ||\n entry === \"search/embeddings.jsonl\" ||\n entry === \"search/vectorization-status.json\" ||\n entry === \"search/lancedb\" ||\n entry === \"search/pending-refresh.json\" ||\n entry === \"search/pending-refresh.gate.lock\",\n );\n if (searchScopeSelected && searchArtifactsAffected) {\n guidance.push(\n 'Search artifacts were removed; the semantic index (including any queued background refresh) is invalidated. Run \"pm install search-advanced --project\" if reindex is unavailable, then \"pm reindex --mode keyword\" (and \"--mode semantic\" when semantic search is enabled) before search-heavy workflows.',\n );\n }\n if (params.removed.includes(\"runtime/history-drift-cache.json\")) {\n guidance.push('History drift cache was removed; the next \"pm health\" run performs a full history-drift re-scan.');\n }\n if (!params.dryRun && params.removed.some((entry) => entry.startsWith(\"checkpoints/\"))) {\n guidance.push(\n 'Aged rollback checkpoints were removed; their \"pm update-many\"/\"pm close-many --rollback\" windows are no longer recoverable.',\n );\n }\n return guidance;\n}\n\n/**\n * Implements run gc for the public runtime surface of this module.\n */\nexport async function runGc(global: GlobalOptions, options: GcCommandOptions = {}): Promise<GcResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const dryRun = options.dryRun === true;\n const scopes = parseScopes(options.scope);\n const selectedTargets = GC_TARGETS.filter((target) => scopes.includes(target.scope));\n\n const removed: string[] = [];\n const retained: string[] = [];\n const warnings: string[] = [];\n\n for (const target of selectedTargets) {\n const result = await removeCacheFile(pmRoot, target, dryRun);\n if (result.removed) {\n removed.push(target.relativePath);\n } else {\n retained.push(target.relativePath);\n }\n warnings.push(...result.warnings);\n }\n\n // The locks scope is not a path-based GC_TARGET: it sweeps the locks/ directory\n // and removes only locks whose own embedded ttl has expired (crashed-process\n // debris), retaining active and unparseable locks. See core/lock/lock-gc.ts.\n let locksSummary: GcLocksSummary | undefined;\n if (scopes.includes(\"locks\")) {\n const lockResult = await runLockGc(pmRoot, {\n dryRun,\n hooks: {\n onRead: (lockPath) => runActiveOnReadHooks({ path: lockPath, scope: \"project\" }),\n onWrite: (lockPath) => runActiveOnWriteHooks({ path: lockPath, scope: \"project\", op: \"gc:lock_remove\" }),\n },\n });\n removed.push(...lockResult.removed);\n retained.push(...lockResult.retained);\n warnings.push(...lockResult.warnings);\n locksSummary = {\n scanned: lockResult.scanned,\n removed: lockResult.removed.length,\n retained: lockResult.retained.length,\n };\n }\n\n // The checkpoints scope is also not a path-based GC_TARGET: it sweeps\n // checkpoints/ and removes only rollback checkpoints older than the configured\n // checkpoints.retention_days, retaining active and unparseable files. See\n // core/checkpoint/checkpoint-gc.ts.\n let checkpointsSummary: GcCheckpointsSummary | undefined;\n if (scopes.includes(\"checkpoints\")) {\n const retentionDays = settings.checkpoints.retention_days;\n const checkpointResult = await runCheckpointGc(pmRoot, {\n dryRun,\n retentionDays,\n hooks: {\n onRead: (checkpointPath) => runActiveOnReadHooks({ path: checkpointPath, scope: \"project\" }),\n onWrite: (checkpointPath) =>\n runActiveOnWriteHooks({ path: checkpointPath, scope: \"project\", op: \"gc:checkpoint_remove\" }),\n },\n });\n removed.push(...checkpointResult.removed);\n retained.push(...checkpointResult.retained);\n warnings.push(...checkpointResult.warnings);\n checkpointsSummary = {\n scanned: checkpointResult.scanned,\n removed: checkpointResult.removed.length,\n retained: checkpointResult.retained.length,\n retention_days: retentionDays,\n };\n }\n\n warnings.push(\n ...(await runActiveOnIndexHooks({\n mode: dryRun ? \"gc:dry-run\" : \"gc\",\n total_items: selectedTargets.length,\n })),\n );\n const guidance = buildGcGuidance({\n dryRun,\n scopes,\n removed,\n });\n\n return {\n ok: warnings.length === 0,\n dry_run: dryRun,\n scope: scopes,\n removed,\n retained,\n warnings,\n ...(locksSummary ? { locks: locksSummary } : {}),\n ...(checkpointsSummary ? { checkpoints: checkpointsSummary } : {}),\n guidance,\n generated_at: nowIso(),\n };\n}\n", "/**\n * @module core/checkpoint/checkpoint-gc\n *\n * Age-based garbage collector for bulk-mutation rollback checkpoints written by\n * `update-many`/`close-many` under `checkpoints/<subdir>/<id>.json`.\n *\n * Safety-first policy (mirroring the stale-lock sweep in `lock/lock-gc.ts`): a\n * checkpoint whose JSON cannot be read or whose `created_at` cannot be parsed is\n * RETAINED rather than deleted. We only prune checkpoints whose age can be\n * conclusively determined from their own `created_at` field and that exceed the\n * configured `checkpoints.retention_days` policy.\n *\n * Staleness formula: (now_ms - Date.parse(created_at)) > retention_days * 86_400_000.\n * A zero/negative age (a future `created_at`) is always treated as active.\n */\n\nimport type { Dirent } from \"node:fs\";\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\n\nconst MILLISECONDS_PER_DAY = 86_400_000;\n\n/**\n * Documents the checkpoint gc scan entry payload exchanged by command, SDK, and package integrations.\n */\nexport interface CheckpointGcEntry {\n /** Relative path like \"checkpoints/update-many/update-many-20260619-abc123.json\". */\n file: string;\n /** Parsed `created_at`, or null when missing/unparseable. */\n created_at: string | null;\n /** floor((now - created_at)/1000), null when unparseable. */\n age_seconds: number | null;\n /** True only when classified as expired (older than the retention window). */\n stale: boolean;\n reason: \"expired\" | \"active\" | \"unparseable\";\n}\n\n/**\n * Documents the checkpoint gc hooks payload exchanged by command, SDK, and package integrations.\n */\nexport interface CheckpointGcHooks {\n onRead?: (checkpointPath: string) => Promise<string[]> | string[];\n onWrite?: (checkpointPath: string) => Promise<string[]> | string[];\n}\n\n/**\n * Documents the checkpoint gc options payload exchanged by command, SDK, and package integrations.\n */\nexport interface CheckpointGcOptions {\n dryRun: boolean;\n /**\n * Prune checkpoints older than this many days. Negative values are clamped to\n * zero (prune everything aged); a non-finite value (NaN/Infinity) disables\n * pruning entirely so bad input never deletes recoverable checkpoints.\n */\n retentionDays: number;\n /** Epoch ms; defaults to Date.now() — injectable for deterministic tests. */\n now?: number;\n hooks?: CheckpointGcHooks;\n}\n\n/**\n * Documents the checkpoint gc result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CheckpointGcResult {\n /** Number of *.json checkpoint files examined. */\n scanned: number;\n /** Relative paths removed (or would-remove under dryRun), sorted by file name asc. */\n removed: string[];\n /** Relative paths retained (active OR unparseable — never delete what we can't reason about). */\n retained: string[];\n warnings: string[];\n /** One per scanned checkpoint file, sorted by file name asc. */\n entries: CheckpointGcEntry[];\n}\n\nfunction isErrno(error: unknown, code: string): boolean {\n return (\n typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code === code\n );\n}\n\n/** Extract a parseable `created_at` from a checkpoint's raw JSON, or null. */\nfunction readCheckpointCreatedAt(raw: string): string | null {\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw) as unknown;\n } catch {\n return null;\n }\n if (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) {\n return null;\n }\n const createdAt = (parsed as Record<string, unknown>).created_at;\n return typeof createdAt === \"string\" ? createdAt : null;\n}\n\n/**\n * Collect relative `checkpoints/<subdir>/<file>.json` (and top-level `<file>.json`)\n * paths under the checkpoints root. Subdirectory reads are resilient to\n * concurrent races: a subdir that vanishes between the parent `readdir` and its\n * own `readdir` (ENOENT) is skipped quietly, and any other read failure (e.g. a\n * permission error) is surfaced as a `checkpoint_subdir_unreadable:<name>`\n * warning rather than aborting the whole sweep.\n */\nasync function collectCheckpointFiles(checkpointsDir: string, warnings: string[]): Promise<string[]> {\n let dirEntries: Dirent[];\n try {\n dirEntries = await fs.readdir(checkpointsDir, { withFileTypes: true });\n } catch (error: unknown) {\n if (isErrno(error, \"ENOENT\")) {\n return [];\n }\n throw error;\n }\n const files: string[] = [];\n for (const entry of dirEntries) {\n if (entry.isDirectory()) {\n const subdir = path.join(checkpointsDir, entry.name);\n let nested: string[];\n try {\n nested = await fs.readdir(subdir);\n } catch (error: unknown) {\n if (!isErrno(error, \"ENOENT\")) {\n warnings.push(`checkpoint_subdir_unreadable:${entry.name}`);\n }\n continue;\n }\n for (const file of nested) {\n if (file.endsWith(\".json\")) {\n files.push(`${entry.name}/${file}`);\n }\n }\n } else if (entry.name.endsWith(\".json\")) {\n files.push(entry.name);\n }\n }\n return files.sort();\n}\n\n/**\n * Implements run checkpoint gc for the public runtime surface of this module.\n */\nexport async function runCheckpointGc(pmRoot: string, options: CheckpointGcOptions): Promise<CheckpointGcResult> {\n const { dryRun, hooks } = options;\n const nowMs = options.now ?? Date.now();\n const retentionMs = Math.max(0, options.retentionDays) * MILLISECONDS_PER_DAY;\n const checkpointsDir = path.join(pmRoot, \"checkpoints\");\n // A non-finite retentionMs (NaN/Infinity from a non-finite retentionDays)\n // makes every `ageMs > retentionMs` comparison false, so nothing is pruned —\n // pruning is disabled rather than risking deletion under bad input.\n\n const result: CheckpointGcResult = {\n scanned: 0,\n removed: [],\n retained: [],\n warnings: [],\n entries: [],\n };\n\n const files = await collectCheckpointFiles(checkpointsDir, result.warnings);\n for (const relName of files) {\n const absPath = path.join(checkpointsDir, relName);\n const relPath = `checkpoints/${relName}`;\n result.scanned += 1;\n\n if (hooks?.onRead) {\n result.warnings.push(...(await hooks.onRead(absPath)));\n }\n\n let raw: string;\n try {\n raw = await fs.readFile(absPath, \"utf8\");\n } catch (readError: unknown) {\n if (isErrno(readError, \"ENOENT\")) {\n // Disappeared between readdir and readFile — treat as a ghost; skip quietly.\n result.scanned -= 1;\n continue;\n }\n result.warnings.push(`checkpoint_unreadable:${relName}`);\n result.retained.push(relPath);\n result.entries.push({ file: relPath, created_at: null, age_seconds: null, stale: false, reason: \"unparseable\" });\n continue;\n }\n\n const createdAt = readCheckpointCreatedAt(raw);\n const createdAtMs = createdAt === null ? Number.NaN : Date.parse(createdAt);\n if (!Number.isFinite(createdAtMs)) {\n result.warnings.push(`checkpoint_unparseable:${relName}`);\n result.retained.push(relPath);\n result.entries.push({\n file: relPath,\n created_at: createdAt,\n age_seconds: null,\n stale: false,\n reason: \"unparseable\",\n });\n continue;\n }\n\n const ageMs = nowMs - createdAtMs;\n const entry: CheckpointGcEntry = {\n file: relPath,\n created_at: createdAt,\n age_seconds: Math.floor(ageMs / 1000),\n stale: ageMs > retentionMs,\n reason: ageMs > retentionMs ? \"expired\" : \"active\",\n };\n if (!entry.stale) {\n result.retained.push(relPath);\n result.entries.push(entry);\n continue;\n }\n\n if (!dryRun) {\n try {\n await fs.unlink(absPath);\n } catch (unlinkError: unknown) {\n if (!isErrno(unlinkError, \"ENOENT\")) {\n result.warnings.push(`checkpoint_remove_failed:${relName}`);\n result.retained.push(relPath);\n result.entries.push(entry);\n continue;\n }\n // ENOENT on unlink = already gone (race); treat as removed.\n }\n if (hooks?.onWrite) {\n result.warnings.push(...(await hooks.onWrite(absPath)));\n }\n }\n result.removed.push(relPath);\n result.entries.push(entry);\n }\n\n return result;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;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,WAAW,IAAI,uBAAsB,CAAE;;KAEjG;AACD,YAAQ,KAAK,GAAG,iBAAiB,OAAO;AACxC,aAAS,KAAK,GAAG,iBAAiB,QAAQ;AAC1C,aAAS,KAAK,GAAG,iBAAiB,QAAQ;AAC1C,yBAAqB;MACnB,SAAS,iBAAiB;MAC1B,SAAS,iBAAiB,QAAQ;MAClC,UAAU,iBAAiB,SAAS;MACpC,gBAAgB;;EAEpB;AAEA,WAAS,KACP,GAAI,MAAM,sBAAsB;IAC9B,MAAM,SAAS,eAAe;IAC9B,aAAa,gBAAgB;GAC9B,CAAE;AAEL,QAAM,WAAW,gBAAgB;IAC/B;IACA;IACA;GACD;AAED,SAAO;IACL,IAAI,SAAS,WAAW;IACxB,SAAS;IACT,OAAO;IACP;IACA;IACA;IACA,GAAI,eAAe,EAAE,OAAO,aAAY,IAAK,CAAA;IAC7C,GAAI,qBAAqB,EAAE,aAAa,mBAAkB,IAAK,CAAA;IAC/D;IACA,cAAc,OAAM;;AAExB;",
|
|
6
6
|
"names": ["fs", "path", "isErrno", "path", "fs", "global"]
|
|
7
7
|
}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="42245c95-2db8-5974-a821-89c21ed1a28a")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
runLockGc
|
|
5
5
|
} from "./chunk-37E72CNS.js";
|
|
6
6
|
import {
|
|
7
7
|
nowIso
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FJRKQREY.js";
|
|
9
9
|
import {
|
|
10
|
-
EXIT_CODE,
|
|
11
10
|
PmCliError,
|
|
12
|
-
getSettingsPath,
|
|
13
|
-
pathExists,
|
|
14
11
|
readSettings,
|
|
15
|
-
resolvePmRoot,
|
|
16
12
|
runActiveOnIndexHooks,
|
|
17
13
|
runActiveOnReadHooks,
|
|
18
14
|
runActiveOnWriteHooks
|
|
19
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-US3T3W5J.js";
|
|
16
|
+
import "./chunk-NNHHXJB2.js";
|
|
17
|
+
import {
|
|
18
|
+
EXIT_CODE,
|
|
19
|
+
getSettingsPath,
|
|
20
|
+
pathExists,
|
|
21
|
+
resolvePmRoot
|
|
22
|
+
} from "./chunk-YD5FML7K.js";
|
|
20
23
|
|
|
21
24
|
// dist/cli/commands/gc.js
|
|
22
25
|
import fs2 from "node:fs/promises";
|
|
@@ -380,6 +383,6 @@ async function runGc(global, options = {}) {
|
|
|
380
383
|
export {
|
|
381
384
|
runGc
|
|
382
385
|
};
|
|
383
|
-
//# sourceMappingURL=gc-
|
|
386
|
+
//# sourceMappingURL=gc-RLBP4QVN.js.map
|
|
384
387
|
|
|
385
|
-
//# debugId=
|
|
388
|
+
//# debugId=42245c95-2db8-5974-a821-89c21ed1a28a
|