@unbrained/pm-cli 2026.7.5 → 2026.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist/cli/commands/annotation-command.d.ts +1 -0
- package/dist/cli/commands/annotation-command.js +29 -2
- package/dist/cli/commands/annotation-command.js.map +1 -1
- package/dist/cli/commands/comments.js +3 -4
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.d.ts +3 -0
- package/dist/cli/commands/extension/bundled-catalog.js +38 -28
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.js +81 -18
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/health.js +9 -5
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/learnings.js +5 -3
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/notes.js +5 -3
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/reindex.js +4 -3
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/search.js +3 -3
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test.d.ts +9 -0
- package/dist/cli/commands/test.js +144 -105
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/extension-command-help.js +10 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/register-list-query.d.ts +1 -1
- package/dist/cli/register-list-query.js +18 -27
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-operations.d.ts +0 -8
- package/dist/cli/register-operations.js +41 -46
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +113 -13
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +5 -1
- package/dist/cli/registration-helpers.js +14 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/append-F7WPGIQL.js +11 -0
- package/dist/cli-bundle/chunks/{contracts-OJEXMKVW.js → append-PVCTBVJG.js} +8 -9
- package/dist/cli-bundle/chunks/{chunk-PPE4YUQM.js → chunk-2APXX4TZ.js} +17 -28
- package/dist/cli-bundle/chunks/chunk-2APXX4TZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{docs-S6UTOTO5.js → chunk-2LEJGRQ7.js} +3 -12
- package/dist/cli-bundle/chunks/{docs-S6UTOTO5.js.map → chunk-2LEJGRQ7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-T3ABIMGW.js → chunk-2TILG6F2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-S5AYOUT5.js → chunk-3G6UMXT3.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-S5AYOUT5.js.map → chunk-3G6UMXT3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-RCT3YJOK.js → chunk-3TYOW6RR.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-3JZNEQBA.js → chunk-3X542TEY.js} +7 -7
- package/dist/cli-bundle/chunks/{history-repair-EVTO6LIH.js → chunk-42LXP4VO.js} +14 -21
- package/dist/cli-bundle/chunks/{history-repair-EVTO6LIH.js.map → chunk-42LXP4VO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5J2XPTAD.js → chunk-43SIHQND.js} +36 -15
- package/dist/cli-bundle/chunks/chunk-43SIHQND.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-repair-4N6SDVHK.js → chunk-43UQN754.js} +12 -19
- package/dist/cli-bundle/chunks/{history-repair-4N6SDVHK.js.map → chunk-43UQN754.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-OWTIRHX4.js → chunk-43YSKY75.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-OWTIRHX4.js.map → chunk-43YSKY75.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-72YXN5JX.js → chunk-4BKDAEDF.js} +6 -13
- package/dist/cli-bundle/chunks/{notes-72YXN5JX.js.map → chunk-4BKDAEDF.js.map} +2 -2
- package/dist/cli-bundle/chunks/{close-many-AP4MWU36.js → chunk-4IQKDKGE.js} +18 -32
- package/dist/cli-bundle/chunks/{close-many-AP4MWU36.js.map → chunk-4IQKDKGE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZCJAA3JK.js → chunk-4MZOKTI2.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-ZCJAA3JK.js.map → chunk-4MZOKTI2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IJ6CO3JV.js → chunk-52NS7JDP.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-IJ6CO3JV.js.map → chunk-52NS7JDP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-T3F4DF23.js → chunk-565WYS5W.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-T3F4DF23.js.map → chunk-565WYS5W.js.map} +1 -1
- package/dist/cli-bundle/chunks/{copy-OTJOWFL6.js → chunk-5FIQ4EX3.js} +13 -19
- package/dist/cli-bundle/chunks/{copy-OTJOWFL6.js.map → chunk-5FIQ4EX3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-V57QD47V.js → chunk-6G6O3OPQ.js} +259 -41
- package/dist/cli-bundle/chunks/chunk-6G6O3OPQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-K3AGVXSF.js → chunk-6LCJRGPD.js} +9 -13
- package/dist/cli-bundle/chunks/{chunk-K3AGVXSF.js.map → chunk-6LCJRGPD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7MDXZAZS.js → chunk-6UQCNWFV.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-7MDXZAZS.js.map → chunk-6UQCNWFV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-LEKT4K7I.js → chunk-6XTSYPPO.js} +1216 -387
- package/dist/cli-bundle/chunks/chunk-6XTSYPPO.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-7ML7JONU.js +5434 -0
- package/dist/cli-bundle/chunks/chunk-7ML7JONU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TSPKZRRW.js → chunk-7PNQA24K.js} +30 -36
- package/dist/cli-bundle/chunks/{chunk-TSPKZRRW.js.map → chunk-7PNQA24K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YOF5VPKM.js → chunk-7VQ3JJN5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BFVHCAOO.js → chunk-7Y5N34HX.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-BFVHCAOO.js.map → chunk-7Y5N34HX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-P5TFTLWW.js → chunk-AGAVEDIE.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-YFIE7YK6.js → chunk-AJUON7E6.js} +3 -3
- package/dist/cli-bundle/chunks/{close-many-OMZIGZB4.js → chunk-ARKHKYYS.js} +16 -30
- package/dist/cli-bundle/chunks/{close-many-OMZIGZB4.js.map → chunk-ARKHKYYS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7EQNAZX2.js → chunk-C5ACVMOI.js} +99 -51
- package/dist/cli-bundle/chunks/chunk-C5ACVMOI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PJ3A56YF.js → chunk-CJQM7O7R.js} +16 -20
- package/dist/cli-bundle/chunks/{chunk-PJ3A56YF.js.map → chunk-CJQM7O7R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-WISPVC2E.js → chunk-D2DCTFTL.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-WISPVC2E.js.map → chunk-D2DCTFTL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-CZGUZ45Q.js → chunk-DDDWVPID.js} +7 -11
- package/dist/cli-bundle/chunks/{append-CZGUZ45Q.js.map → chunk-DDDWVPID.js.map} +1 -1
- package/dist/cli-bundle/chunks/{learnings-2HTPZNGZ.js → chunk-DG6BSXZ7.js} +6 -13
- package/dist/cli-bundle/chunks/{learnings-2HTPZNGZ.js.map → chunk-DG6BSXZ7.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7WYXBPYQ.js → chunk-DR2V5OIV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YQMMMONE.js → chunk-E3LWJUGF.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-YQMMMONE.js.map → chunk-E3LWJUGF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-D3UCE7RW.js → chunk-E3YQFSFE.js} +6 -10
- package/dist/cli-bundle/chunks/{chunk-D3UCE7RW.js.map → chunk-E3YQFSFE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-PDXT6Q55.js → chunk-EDO7VXSO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FDBARR33.js → chunk-EIUBK2LT.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-FDBARR33.js.map → chunk-EIUBK2LT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HBYZDSK5.js → chunk-EMXPI36L.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-HBYZDSK5.js.map → chunk-EMXPI36L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4OFLJHX6.js → chunk-EOUVR7JN.js} +13 -8
- package/dist/cli-bundle/chunks/chunk-EOUVR7JN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FUM6UMY4.js → chunk-EVEPHNXJ.js} +4 -4
- package/dist/cli-bundle/chunks/{deps-L2FPIAD3.js → chunk-F6MT7KKE.js} +6 -10
- package/dist/cli-bundle/chunks/{deps-L2FPIAD3.js.map → chunk-F6MT7KKE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-FGQKEDE4.js → chunk-F6YC2A6X.js} +7 -11
- package/dist/cli-bundle/chunks/{chunk-FGQKEDE4.js.map → chunk-F6YC2A6X.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-FILL6BB2.js +5514 -0
- package/dist/cli-bundle/chunks/chunk-FILL6BB2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RX3HQSYG.js → chunk-FN6SB4HU.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js +5359 -0
- package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JLA7EVYV.js → chunk-GLS6VMWI.js} +37 -16
- package/dist/cli-bundle/chunks/chunk-GLS6VMWI.js.map +1 -0
- package/dist/cli-bundle/chunks/{files-JPU3FNJ7.js → chunk-GPIDUMMN.js} +10 -17
- package/dist/cli-bundle/chunks/{files-JPU3FNJ7.js.map → chunk-GPIDUMMN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-compact-3F6VELO7.js → chunk-GTM5HQL4.js} +15 -21
- package/dist/cli-bundle/chunks/{history-compact-3F6VELO7.js.map → chunk-GTM5HQL4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-DLQ4ZTCU.js → chunk-H2SMKL2N.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-S4APD35C.js → chunk-HHEWQXPD.js} +6 -6
- package/dist/cli-bundle/chunks/chunk-HHEWQXPD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-C3PMDWGX.js → chunk-HX6QXV5P.js} +2 -2
- package/dist/cli-bundle/chunks/{copy-LEE6P6EM.js → chunk-I74FMIWA.js} +11 -17
- package/dist/cli-bundle/chunks/{copy-LEE6P6EM.js.map → chunk-I74FMIWA.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-IDIBF4E2.js +804 -0
- package/dist/cli-bundle/chunks/chunk-IDIBF4E2.js.map +7 -0
- package/dist/cli-bundle/chunks/{comments-SAG5LSKL.js → chunk-II7R6KD4.js} +9 -13
- package/dist/cli-bundle/chunks/{comments-SAG5LSKL.js.map → chunk-II7R6KD4.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-J2VGADNG.js +10320 -0
- package/dist/cli-bundle/chunks/chunk-J2VGADNG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Y76TWC45.js → chunk-J7BOLHAV.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-Y76TWC45.js.map → chunk-J7BOLHAV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-QHZO65XW.js → chunk-KTGJ2CBU.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-QHZO65XW.js.map → chunk-KTGJ2CBU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5VVUKE3U.js → chunk-LCFJ7XAM.js} +32 -2
- package/dist/cli-bundle/chunks/{chunk-5VVUKE3U.js.map → chunk-LCFJ7XAM.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YMABYTNG.js → chunk-LZQU6XJG.js} +28 -34
- package/dist/cli-bundle/chunks/{chunk-YMABYTNG.js.map → chunk-LZQU6XJG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3Y4OESPP.js → chunk-M62RO3XK.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-3Y4OESPP.js.map → chunk-M62RO3XK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YPPVU5GX.js → chunk-MCEUKJKW.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-YPPVU5GX.js.map → chunk-MCEUKJKW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-T5Y3QSNF.js → chunk-MHNMCDWR.js} +1447 -86
- package/dist/cli-bundle/chunks/chunk-MHNMCDWR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HJE4JTKQ.js → chunk-MRFWUSVA.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-HJE4JTKQ.js.map → chunk-MRFWUSVA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-P3VRG72Q.js → chunk-N6ZHDLUY.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-P3VRG72Q.js.map → chunk-N6ZHDLUY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{delete-HQKGRNRZ.js → chunk-NWWL22C7.js} +8 -12
- package/dist/cli-bundle/chunks/{delete-HQKGRNRZ.js.map → chunk-NWWL22C7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-N6DNM2FA.js → chunk-P3MJJW7P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5JE6SMYS.js → chunk-PDXJXEZJ.js} +2 -2
- package/dist/cli-bundle/chunks/{append-NSQBCXZJ.js → chunk-Q64AYQYW.js} +9 -13
- package/dist/cli-bundle/chunks/{append-NSQBCXZJ.js.map → chunk-Q64AYQYW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{update-many-SLLAMHT7.js → chunk-QDABF2RB.js} +26 -47
- package/dist/cli-bundle/chunks/{update-many-SLLAMHT7.js.map → chunk-QDABF2RB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-NBFCNJ7Q.js → chunk-QFBSP3NI.js} +529 -46
- package/dist/cli-bundle/chunks/chunk-QFBSP3NI.js.map +1 -0
- package/dist/cli-bundle/chunks/{focus-LFZ6IDBR.js → chunk-RB3KLPAH.js} +11 -16
- package/dist/cli-bundle/chunks/{focus-LFZ6IDBR.js.map → chunk-RB3KLPAH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YSAH5FY5.js → chunk-RY7PTTUB.js} +94 -53
- package/dist/cli-bundle/chunks/chunk-RY7PTTUB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WVSGSZ6J.js → chunk-S547WBYG.js} +1477 -86
- package/dist/cli-bundle/chunks/chunk-S547WBYG.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-many-DC7X3EWM.js → chunk-S5BNGFN5.js} +24 -45
- package/dist/cli-bundle/chunks/{update-many-DC7X3EWM.js.map → chunk-S5BNGFN5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-WNMYCVYA.js → chunk-S6VC2A2K.js} +9 -14
- package/dist/cli-bundle/chunks/{focus-WNMYCVYA.js.map → chunk-S6VC2A2K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{learnings-YBIHY3D6.js → chunk-SIM5JDON.js} +7 -14
- package/dist/cli-bundle/chunks/{learnings-YBIHY3D6.js.map → chunk-SIM5JDON.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZD34OFFQ.js → chunk-SY75LYXR.js} +12 -7
- package/dist/cli-bundle/chunks/chunk-SY75LYXR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TT42JUMF.js → chunk-TEISGNSH.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-TEISGNSH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AAEQMOC6.js → chunk-TEKZOS7M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4QQ6PM7M.js → chunk-TGUK6XN6.js} +14 -18
- package/dist/cli-bundle/chunks/{chunk-4QQ6PM7M.js.map → chunk-TGUK6XN6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-R4NDQ27E.js → chunk-TNC6MZUD.js} +10 -21
- package/dist/cli-bundle/chunks/{plan-R4NDQ27E.js.map → chunk-TNC6MZUD.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js +10498 -0
- package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YD5FML7K.js → chunk-UO7XAZK6.js} +27 -4
- package/dist/cli-bundle/chunks/chunk-UO7XAZK6.js.map +1 -0
- package/dist/cli-bundle/chunks/{docs-6CRCSVKK.js → chunk-V5ZWKJNY.js} +5 -14
- package/dist/cli-bundle/chunks/{docs-6CRCSVKK.js.map → chunk-V5ZWKJNY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-NJ7IQJX4.js → chunk-VGO73OCK.js} +7 -14
- package/dist/cli-bundle/chunks/{notes-NJ7IQJX4.js.map → chunk-VGO73OCK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-NER3KUUS.js → chunk-VLEA2UTQ.js} +2 -2
- package/dist/cli-bundle/chunks/{files-6P57MRKL.js → chunk-W5HXHC7C.js} +8 -15
- package/dist/cli-bundle/chunks/{files-6P57MRKL.js.map → chunk-W5HXHC7C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZMD35NYG.js → chunk-WCWVEXGA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-X47MKQXU.js +6690 -0
- package/dist/cli-bundle/chunks/chunk-X47MKQXU.js.map +7 -0
- package/dist/cli-bundle/chunks/{delete-62JQTYT4.js → chunk-XBX5CBRQ.js} +6 -10
- package/dist/cli-bundle/chunks/{delete-62JQTYT4.js.map → chunk-XBX5CBRQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MTTXDAK4.js → chunk-XC3X7BQR.js} +541 -44
- package/dist/cli-bundle/chunks/chunk-XC3X7BQR.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-compact-656Y2TN4.js → chunk-XHCVAZGM.js} +17 -23
- package/dist/cli-bundle/chunks/{history-compact-656Y2TN4.js.map → chunk-XHCVAZGM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZAHXPXVY.js → chunk-XPMXPR7K.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-ZAHXPXVY.js.map → chunk-XPMXPR7K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-55FTG6Z5.js → chunk-XS2TMNXR.js} +8 -12
- package/dist/cli-bundle/chunks/{deps-55FTG6Z5.js.map → chunk-XS2TMNXR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-XWY5T67S.js → chunk-XXIYUTLK.js} +12 -23
- package/dist/cli-bundle/chunks/{plan-XWY5T67S.js.map → chunk-XXIYUTLK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7QH7DHUB.js → chunk-XZWL7VNE.js} +1220 -398
- package/dist/cli-bundle/chunks/chunk-XZWL7VNE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js +6624 -0
- package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ABRA3BHY.js → chunk-Y7KYVCZM.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-ABRA3BHY.js.map → chunk-Y7KYVCZM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-UI5BJ6DO.js → chunk-YCVWWIKY.js} +17 -28
- package/dist/cli-bundle/chunks/chunk-YCVWWIKY.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-YH5NBDFA.js +780 -0
- package/dist/cli-bundle/chunks/chunk-YH5NBDFA.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js +5509 -0
- package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js.map +7 -0
- package/dist/cli-bundle/chunks/{comments-MIW5MZOX.js → chunk-YPD7SQ5P.js} +8 -12
- package/dist/cli-bundle/chunks/{comments-MIW5MZOX.js.map → chunk-YPD7SQ5P.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-T35XLYZF.js → chunk-YPMZMKN7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-R3ZBLGTC.js → chunk-YTD5GICJ.js} +4 -4
- package/dist/cli-bundle/chunks/{config-DJJKZB5R.js → chunk-ZNEG2UDO.js} +264 -39
- package/dist/cli-bundle/chunks/{config-DJJKZB5R.js.map → chunk-ZNEG2UDO.js.map} +4 -4
- package/dist/cli-bundle/chunks/{chunk-EEY54JMF.js → chunk-ZO7CLOY2.js} +3 -3
- package/dist/cli-bundle/chunks/{close-3YRR3XY6.js → close-3YYQ5OG2.js} +5 -9
- package/dist/cli-bundle/chunks/close-Z3Q4U7TS.js +12 -0
- package/dist/cli-bundle/chunks/close-many-3L2RXH3M.js +22 -0
- package/dist/cli-bundle/chunks/close-many-D366FTIG.js +26 -0
- package/dist/cli-bundle/chunks/comments-54XDJNFE.js +17 -0
- package/dist/cli-bundle/chunks/comments-HGHC2PN6.js +13 -0
- package/dist/cli-bundle/chunks/copy-44RT5GDW.js +13 -0
- package/dist/cli-bundle/chunks/copy-UGMUGHZA.js +9 -0
- package/dist/cli-bundle/chunks/{create-XWWQFQ6S.js → create-4GWJWPXG.js} +9 -14
- package/dist/cli-bundle/chunks/create-AZXCUYKP.js +25 -0
- package/dist/cli-bundle/chunks/delete-Y6SXIQ4X.js +10 -0
- package/dist/cli-bundle/chunks/delete-YQ2VPXNF.js +14 -0
- package/dist/cli-bundle/chunks/deps-BU5EBJDU.js +17 -0
- package/dist/cli-bundle/chunks/deps-FMANWFRP.js +13 -0
- package/dist/cli-bundle/chunks/docs-OQBSJNIA.js +18 -0
- package/dist/cli-bundle/chunks/docs-VNPBZXEL.js +14 -0
- package/dist/cli-bundle/chunks/files-72HZEBOE.js +18 -0
- package/dist/cli-bundle/chunks/{activity-YKAKZTZ4.js → files-HTSB2KJG.js} +13 -13
- package/dist/cli-bundle/chunks/focus-FOG4ALC2.js +14 -0
- package/dist/cli-bundle/chunks/focus-SUTMKXGX.js +10 -0
- package/dist/cli-bundle/chunks/history-compact-M6IFAMBP.js +25 -0
- package/dist/cli-bundle/chunks/history-compact-NEXRPP2O.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-54ICFKXM.js → history-redact-NQX3OGZP.js} +7 -11
- package/dist/cli-bundle/chunks/history-redact-WQJBZ3PX.js +17 -0
- package/dist/cli-bundle/chunks/history-repair-CBHMHAJO.js +19 -0
- package/dist/cli-bundle/chunks/history-repair-NHOJG7WO.js +23 -0
- package/dist/cli-bundle/chunks/learnings-M64NTSOR.js +13 -0
- package/dist/cli-bundle/chunks/learnings-T63JGKKN.js +17 -0
- package/dist/cli-bundle/chunks/notes-73WE2UV2.js +13 -0
- package/dist/cli-bundle/chunks/notes-U7L6HQQ2.js +17 -0
- package/dist/cli-bundle/chunks/plan-OSCNYFGC.js +24 -0
- package/dist/cli-bundle/chunks/plan-OSCNYFGC.js.map +7 -0
- package/dist/cli-bundle/chunks/plan-TN537L24.js +28 -0
- package/dist/cli-bundle/chunks/plan-TN537L24.js.map +1 -0
- package/dist/cli-bundle/chunks/profile-MHAMXMHQ.js +37 -0
- package/dist/cli-bundle/chunks/profile-MHAMXMHQ.js.map +1 -0
- package/dist/cli-bundle/chunks/profile-TIGLAKJ7.js +33 -0
- package/dist/cli-bundle/chunks/profile-TIGLAKJ7.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-5H66WFYF.js → register-list-query-OHXD7G5N.js} +41 -33
- package/dist/cli-bundle/chunks/register-list-query-OHXD7G5N.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-FB3FNDLZ.js → register-list-query-ZCRABAPN.js} +42 -34
- package/dist/cli-bundle/chunks/register-list-query-ZCRABAPN.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-UJO23C7R.js → register-mutation-P3G4XP6Q.js} +36 -41
- package/dist/cli-bundle/chunks/{register-mutation-UJO23C7R.js.map → register-mutation-P3G4XP6Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-Z2ETYHKS.js → register-mutation-XX4H56PE.js} +34 -39
- package/dist/cli-bundle/chunks/{register-mutation-Z2ETYHKS.js.map → register-mutation-XX4H56PE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-A3XAM5J7.js → register-operations-V6PIYEDU.js} +80 -52
- package/dist/cli-bundle/chunks/register-operations-V6PIYEDU.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-SG7HBSUP.js → register-operations-V6VKTG54.js} +79 -51
- package/dist/cli-bundle/chunks/register-operations-V6VKTG54.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-K6U3NVY5.js → register-setup-6RVAWT6W.js} +129 -31
- package/dist/cli-bundle/chunks/register-setup-6RVAWT6W.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-I45OGJUV.js → register-setup-6YVUSQYD.js} +130 -32
- package/dist/cli-bundle/chunks/register-setup-6YVUSQYD.js.map +1 -0
- package/dist/cli-bundle/chunks/{restore-YJ2ET6AT.js → restore-HC3YSWF7.js} +7 -11
- package/dist/cli-bundle/chunks/restore-HC3YSWF7.js.map +1 -0
- package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js +15 -0
- package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{schema-2PUXCZ25.js → schema-DAGSYO6E.js} +6 -10
- package/dist/cli-bundle/chunks/schema-DAGSYO6E.js.map +7 -0
- package/dist/cli-bundle/chunks/{schema-Y6DXXK2F.js → schema-UBXJCQAC.js} +6 -10
- package/dist/cli-bundle/chunks/schema-UBXJCQAC.js.map +1 -0
- package/dist/cli-bundle/chunks/update-CJGG5WMV.js +21 -0
- package/dist/cli-bundle/chunks/update-CJGG5WMV.js.map +7 -0
- package/dist/cli-bundle/chunks/update-LKD64AFP.js +25 -0
- package/dist/cli-bundle/chunks/update-LKD64AFP.js.map +1 -0
- package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js +31 -0
- package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js +35 -0
- package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js.map +1 -0
- package/dist/cli-bundle/main.js +29 -31
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +136 -54
- package/dist/cli-bundle/sdk-testing.js +7 -8
- package/dist/cli-bundle/sdk.js +132 -84
- package/dist/cli-bundle/sdk.js.map +2 -2
- package/dist/core/history/drift-scan.js +3 -8
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/output/mutation-projection.js +11 -5
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/search/cache.js +3 -3
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/semantic-defaults.d.ts +2 -0
- package/dist/core/search/semantic-defaults.js +11 -4
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/vector-stores.d.ts +1 -1
- package/dist/core/search/vector-stores.js +33 -7
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/mcp/server.d.ts +22 -50
- package/dist/mcp/server.js +62 -916
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +7 -7
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +9 -7
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/index.d.ts +4 -2
- package/dist/sdk/index.js +4 -4
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +312 -5
- package/dist/sdk/runtime.js +1391 -26
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/start-task-status.d.ts +13 -0
- package/dist/sdk/start-task-status.js +19 -0
- package/dist/sdk/start-task-status.js.map +1 -0
- package/dist/sdk/workspace-contracts-cache.d.ts +17 -0
- package/dist/sdk/workspace-contracts-cache.js +36 -0
- package/dist/sdk/workspace-contracts-cache.js.map +1 -0
- package/docs/COMMANDS.md +10 -1
- package/docs/RELEASING.md +3 -1
- package/docs/SDK.md +81 -0
- package/docs/TESTING.md +3 -0
- package/docs/examples/sdk-app-embedding/run-embedded-pm.mjs +16 -2
- package/docs/examples/sdk-contract-consumer/inspect-contracts.mjs +16 -1
- package/package.json +1 -1
- package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +0 -18
- package/dist/cli-bundle/chunks/aggregate-EQX2RGB7.js +0 -375
- package/dist/cli-bundle/chunks/aggregate-EQX2RGB7.js.map +0 -7
- package/dist/cli-bundle/chunks/aggregate-PEGZGJXD.js +0 -372
- package/dist/cli-bundle/chunks/aggregate-PEGZGJXD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-37E72CNS.js +0 -217
- package/dist/cli-bundle/chunks/chunk-37E72CNS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3PL6LEKP.js +0 -1961
- package/dist/cli-bundle/chunks/chunk-3PL6LEKP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js +0 -1749
- package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +0 -87
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js +0 -822
- package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4OFLJHX6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-53BTLLAF.js +0 -2181
- package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-57C2RLW5.js +0 -1704
- package/dist/cli-bundle/chunks/chunk-57C2RLW5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5B3X4Y22.js +0 -2330
- package/dist/cli-bundle/chunks/chunk-5B3X4Y22.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5J2XPTAD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js +0 -995
- package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js +0 -819
- package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +0 -23
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7EQNAZX2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BVEUCSH2.js +0 -530
- package/dist/cli-bundle/chunks/chunk-BVEUCSH2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +0 -275
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js +0 -231
- package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js +0 -2184
- package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EZFKWSC7.js +0 -1615
- package/dist/cli-bundle/chunks/chunk-EZFKWSC7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FJRKQREY.js +0 -228
- package/dist/cli-bundle/chunks/chunk-FJRKQREY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js +0 -3237
- package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HK72NWAD.js +0 -1570
- package/dist/cli-bundle/chunks/chunk-HK72NWAD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js +0 -3206
- package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JINYH2DB.js +0 -371
- package/dist/cli-bundle/chunks/chunk-JINYH2DB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JLA7EVYV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +0 -76
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +0 -79
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +0 -915
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KLG4ZULO.js +0 -218
- package/dist/cli-bundle/chunks/chunk-KLG4ZULO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MNZ7DRNC.js +0 -1858
- package/dist/cli-bundle/chunks/chunk-MNZ7DRNC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MZ7VNEVY.js +0 -520
- package/dist/cli-bundle/chunks/chunk-MZ7VNEVY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N7X4WP6L.js +0 -1041
- package/dist/cli-bundle/chunks/chunk-N7X4WP6L.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +0 -20
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +0 -918
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OESSOFJ4.js +0 -1985
- package/dist/cli-bundle/chunks/chunk-OESSOFJ4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +0 -238
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +0 -1977
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PPAJG4GB.js +0 -1031
- package/dist/cli-bundle/chunks/chunk-PPAJG4GB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QZ342C63.js +0 -220
- package/dist/cli-bundle/chunks/chunk-QZ342C63.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js +0 -368
- package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-S4APD35C.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js +0 -1149
- package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +0 -272
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TT42JUMF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +0 -165
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +0 -1932
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +0 -175
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +0 -84
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VZIYHZDX.js +0 -1868
- package/dist/cli-bundle/chunks/chunk-VZIYHZDX.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js +0 -1152
- package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YSAH5FY5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js +0 -1005
- package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Z2CRRZYF.js +0 -215
- package/dist/cli-bundle/chunks/chunk-Z2CRRZYF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZD34OFFQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js +0 -2306
- package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +0 -241
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +0 -7
- package/dist/cli-bundle/chunks/claim-4DROPSIS.js +0 -144
- package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +0 -1
- package/dist/cli-bundle/chunks/claim-VX54TV5U.js +0 -147
- package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +0 -7
- package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +0 -16
- package/dist/cli-bundle/chunks/config-V57QD47V.js.map +0 -1
- package/dist/cli-bundle/chunks/context-4OQGIPSO.js +0 -45
- package/dist/cli-bundle/chunks/context-WLA6IAWE.js +0 -49
- package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +0 -12
- package/dist/cli-bundle/chunks/create-WKOZKPQR.js +0 -30
- package/dist/cli-bundle/chunks/eval-N6UHFWVO.js +0 -288
- package/dist/cli-bundle/chunks/eval-N6UHFWVO.js.map +0 -7
- package/dist/cli-bundle/chunks/eval-PHOTWYHI.js +0 -278
- package/dist/cli-bundle/chunks/eval-PHOTWYHI.js.map +0 -1
- package/dist/cli-bundle/chunks/extension-NBAH62ML.js +0 -40
- package/dist/cli-bundle/chunks/extension-ZF6ZZPOU.js +0 -44
- package/dist/cli-bundle/chunks/gc-AETFKZ44.js +0 -398
- package/dist/cli-bundle/chunks/gc-AETFKZ44.js.map +0 -7
- package/dist/cli-bundle/chunks/gc-RLBP4QVN.js +0 -388
- package/dist/cli-bundle/chunks/gc-RLBP4QVN.js.map +0 -1
- package/dist/cli-bundle/chunks/get-NH2MPBCI.js +0 -283
- package/dist/cli-bundle/chunks/get-NH2MPBCI.js.map +0 -1
- package/dist/cli-bundle/chunks/get-P4ZQXCPZ.js +0 -286
- package/dist/cli-bundle/chunks/get-P4ZQXCPZ.js.map +0 -7
- package/dist/cli-bundle/chunks/health-3GVPMQBL.js +0 -1612
- package/dist/cli-bundle/chunks/health-3GVPMQBL.js.map +0 -1
- package/dist/cli-bundle/chunks/health-DNTM72GJ.js +0 -1615
- package/dist/cli-bundle/chunks/health-DNTM72GJ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-RYKLC72X.js +0 -20
- package/dist/cli-bundle/chunks/history-SGPYRAFT.js +0 -24
- package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +0 -21
- package/dist/cli-bundle/chunks/init-RPIPQUNV.js +0 -32
- package/dist/cli-bundle/chunks/init-SKQAESQS.js +0 -28
- package/dist/cli-bundle/chunks/list-64LHZ3HM.js +0 -32
- package/dist/cli-bundle/chunks/list-7LXBTEKI.js +0 -36
- package/dist/cli-bundle/chunks/next-7ODPAQ4U.js +0 -306
- package/dist/cli-bundle/chunks/next-7ODPAQ4U.js.map +0 -7
- package/dist/cli-bundle/chunks/next-ODJUM4ZM.js +0 -303
- package/dist/cli-bundle/chunks/next-ODJUM4ZM.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +0 -397
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +0 -400
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-5H66WFYF.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-FB3FNDLZ.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-A3XAM5J7.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-SG7HBSUP.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-I45OGJUV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-K6U3NVY5.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +0 -19
- package/dist/cli-bundle/chunks/scheduling-shortcuts-SSC4MYWQ.js +0 -91
- package/dist/cli-bundle/chunks/scheduling-shortcuts-SSC4MYWQ.js.map +0 -7
- package/dist/cli-bundle/chunks/scheduling-shortcuts-ULRG7MNP.js +0 -88
- package/dist/cli-bundle/chunks/scheduling-shortcuts-ULRG7MNP.js.map +0 -1
- package/dist/cli-bundle/chunks/search-3S72CTD6.js +0 -38
- package/dist/cli-bundle/chunks/search-WNUNBQXO.js +0 -34
- package/dist/cli-bundle/chunks/stats-IJYTRQGV.js +0 -250
- package/dist/cli-bundle/chunks/stats-IJYTRQGV.js.map +0 -7
- package/dist/cli-bundle/chunks/stats-L2D5Y2O5.js +0 -240
- package/dist/cli-bundle/chunks/stats-L2D5Y2O5.js.map +0 -1
- package/dist/cli-bundle/chunks/telemetry-L2CVOKVN.js +0 -309
- package/dist/cli-bundle/chunks/telemetry-L2CVOKVN.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-QBYWQA76.js +0 -306
- package/dist/cli-bundle/chunks/telemetry-QBYWQA76.js.map +0 -1
- package/dist/cli-bundle/chunks/test-DQ2QFJ7W.js +0 -45
- package/dist/cli-bundle/chunks/test-W7QBLVJS.js +0 -41
- package/dist/cli-bundle/chunks/test-all-636NTRTT.js +0 -434
- package/dist/cli-bundle/chunks/test-all-636NTRTT.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-DWYK3RG6.js +0 -437
- package/dist/cli-bundle/chunks/test-all-DWYK3RG6.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-245OINZR.js +0 -28
- package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +0 -24
- package/dist/cli-bundle/chunks/update-SFLZPJXX.js +0 -30
- package/dist/cli-bundle/chunks/update-SJZ6S77U.js +0 -26
- package/dist/cli-bundle/chunks/upgrade-HFFXLZJA.js +0 -290
- package/dist/cli-bundle/chunks/upgrade-HFFXLZJA.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-UYQKM7RF.js +0 -287
- package/dist/cli-bundle/chunks/upgrade-UYQKM7RF.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-PA4FDTOV.js +0 -2143
- package/dist/cli-bundle/chunks/validate-PA4FDTOV.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js +0 -2105
- package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-4XQIDNM5.js.map → append-F7WPGIQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-YKAKZTZ4.js.map → append-PVCTBVJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T3ABIMGW.js.map → chunk-2TILG6F2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RCT3YJOK.js.map → chunk-3TYOW6RR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3JZNEQBA.js.map → chunk-3X542TEY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YOF5VPKM.js.map → chunk-7VQ3JJN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P5TFTLWW.js.map → chunk-AGAVEDIE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YFIE7YK6.js.map → chunk-AJUON7E6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7WYXBPYQ.js.map → chunk-DR2V5OIV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PDXT6Q55.js.map → chunk-EDO7VXSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FUM6UMY4.js.map → chunk-EVEPHNXJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RX3HQSYG.js.map → chunk-FN6SB4HU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DLQ4ZTCU.js.map → chunk-H2SMKL2N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-C3PMDWGX.js.map → chunk-HX6QXV5P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N6DNM2FA.js.map → chunk-P3MJJW7P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5JE6SMYS.js.map → chunk-PDXJXEZJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AAEQMOC6.js.map → chunk-TEKZOS7M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NER3KUUS.js.map → chunk-VLEA2UTQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZMD35NYG.js.map → chunk-WCWVEXGA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T35XLYZF.js.map → chunk-YPMZMKN7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R3ZBLGTC.js.map → chunk-YTD5GICJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EEY54JMF.js.map → chunk-ZO7CLOY2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-3YRR3XY6.js.map → close-3YYQ5OG2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-OB2Y4QP5.js.map → close-Z3Q4U7TS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-4OQGIPSO.js.map → close-many-3L2RXH3M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-WLA6IAWE.js.map → close-many-D366FTIG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-OJEXMKVW.js.map → comments-54XDJNFE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-HXJLKCRI.js.map → comments-HGHC2PN6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-XWWQFQ6S.js.map → copy-44RT5GDW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-WKOZKPQR.js.map → copy-UGMUGHZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-ZF6ZZPOU.js.map → create-4GWJWPXG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-NBAH62ML.js.map → create-AZXCUYKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-RYKLC72X.js.map → delete-Y6SXIQ4X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-SGPYRAFT.js.map → delete-YQ2VPXNF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-54ICFKXM.js.map → deps-BU5EBJDU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-4H3FCKF3.js.map → deps-FMANWFRP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-RPIPQUNV.js.map → docs-OQBSJNIA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-SKQAESQS.js.map → docs-VNPBZXEL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-64LHZ3HM.js.map → files-72HZEBOE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-7LXBTEKI.js.map → files-HTSB2KJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-YJ2ET6AT.js.map → focus-FOG4ALC2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-PXOFL6AM.js.map → focus-SUTMKXGX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-Y6DXXK2F.js.map → history-compact-M6IFAMBP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-2PUXCZ25.js.map → history-compact-NEXRPP2O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-3S72CTD6.js.map → history-redact-NQX3OGZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-WNUNBQXO.js.map → history-redact-WQJBZ3PX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-W7QBLVJS.js.map → history-repair-CBHMHAJO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-DQ2QFJ7W.js.map → history-repair-NHOJG7WO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-ZRD4GCTT.js.map → learnings-M64NTSOR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-245OINZR.js.map → learnings-T63JGKKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-SJZ6S77U.js.map → notes-73WE2UV2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-SFLZPJXX.js.map → notes-U7L6HQQ2.js.map} +0 -0
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9098e493-bd2c-5718-be4f-0f181a9fd126")}catch(e){}}();
|
|
3
|
-
import {
|
|
4
|
-
readHistoryEntries
|
|
5
|
-
} from "./chunk-T3F4DF23.js";
|
|
6
|
-
import "./chunk-BFVHCAOO.js";
|
|
7
|
-
import {
|
|
8
|
-
runList
|
|
9
|
-
} from "./chunk-YSAH5FY5.js";
|
|
10
|
-
import "./chunk-QB7XMHJW.js";
|
|
11
|
-
import "./chunk-5JE6SMYS.js";
|
|
12
|
-
import {
|
|
13
|
-
parseIntegerLimit
|
|
14
|
-
} from "./chunk-YFIE7YK6.js";
|
|
15
|
-
import {
|
|
16
|
-
buildItemNotFoundError,
|
|
17
|
-
listAllFrontMatterLight,
|
|
18
|
-
locateItem,
|
|
19
|
-
readLocatedItem,
|
|
20
|
-
toItemRecord
|
|
21
|
-
} from "./chunk-57C2RLW5.js";
|
|
22
|
-
import {
|
|
23
|
-
isTerminalStatus
|
|
24
|
-
} from "./chunk-HK72NWAD.js";
|
|
25
|
-
import "./chunk-FJRKQREY.js";
|
|
26
|
-
import {
|
|
27
|
-
PmCliError,
|
|
28
|
-
getActiveExtensionRegistrations,
|
|
29
|
-
readSettings
|
|
30
|
-
} from "./chunk-US3T3W5J.js";
|
|
31
|
-
import "./chunk-NNHHXJB2.js";
|
|
32
|
-
import {
|
|
33
|
-
EXIT_CODE,
|
|
34
|
-
FRONT_MATTER_KEY_ORDER,
|
|
35
|
-
getHistoryPath,
|
|
36
|
-
getSettingsPath,
|
|
37
|
-
pathExists,
|
|
38
|
-
resolveItemTypeRegistry,
|
|
39
|
-
resolvePmRoot,
|
|
40
|
-
resolveRuntimeFieldRegistry,
|
|
41
|
-
resolveRuntimeStatusRegistry
|
|
42
|
-
} from "./chunk-YD5FML7K.js";
|
|
43
|
-
|
|
44
|
-
// dist/cli/commands/get.js
|
|
45
|
-
var CHILD_ROLLUP_TYPES = /* @__PURE__ */ new Set(["milestone", "epic"]);
|
|
46
|
-
var GET_DEPTH_VALUES = ["brief", "standard", "deep"];
|
|
47
|
-
function toClaimHistoryContext(entry) {
|
|
48
|
-
return {
|
|
49
|
-
ts: entry.ts,
|
|
50
|
-
author: entry.author,
|
|
51
|
-
message: entry.message ?? null
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
function resolveClaimStateContext(assigneeValue, history) {
|
|
55
|
-
const assignee = assigneeValue?.trim();
|
|
56
|
-
const normalizedAssignee = assignee && assignee.length > 0 ? assignee : null;
|
|
57
|
-
const lastClaim = [...history].reverse().find((entry) => entry.op === "claim");
|
|
58
|
-
const lastRelease = [...history].reverse().find((entry) => entry.op === "release");
|
|
59
|
-
return {
|
|
60
|
-
claimed: normalizedAssignee !== null,
|
|
61
|
-
assignee: normalizedAssignee,
|
|
62
|
-
last_claim: lastClaim ? toClaimHistoryContext(lastClaim) : null,
|
|
63
|
-
last_release: lastRelease ? toClaimHistoryContext(lastRelease) : null
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function parseGetDepth(raw) {
|
|
67
|
-
if (raw === void 0 || raw.trim().length === 0) {
|
|
68
|
-
return "standard";
|
|
69
|
-
}
|
|
70
|
-
const normalized = raw.trim().toLowerCase();
|
|
71
|
-
if (normalized === "full") {
|
|
72
|
-
return "deep";
|
|
73
|
-
}
|
|
74
|
-
if (GET_DEPTH_VALUES.includes(normalized)) {
|
|
75
|
-
return normalized;
|
|
76
|
-
}
|
|
77
|
-
throw new PmCliError("Get --depth must be one of brief|standard|deep|full", EXIT_CODE.USAGE);
|
|
78
|
-
}
|
|
79
|
-
function projectItemForDepth(item, depth) {
|
|
80
|
-
if (depth === "deep") {
|
|
81
|
-
return item;
|
|
82
|
-
}
|
|
83
|
-
const { comments: _comments, notes: _notes, learnings: _learnings, files: _files, tests: _tests, docs: _docs, reminders: _reminders, events: _events, ...projected } = item;
|
|
84
|
-
return projected;
|
|
85
|
-
}
|
|
86
|
-
function parseGetFields(raw) {
|
|
87
|
-
if (raw === void 0) {
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
const fields = raw.split(",").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
91
|
-
if (fields.length === 0) {
|
|
92
|
-
throw new PmCliError("Get --fields requires a comma-separated list of field names", EXIT_CODE.USAGE);
|
|
93
|
-
}
|
|
94
|
-
return fields;
|
|
95
|
-
}
|
|
96
|
-
function normalizeGetField(field) {
|
|
97
|
-
return field.startsWith("item.") ? field.slice("item.".length) : field;
|
|
98
|
-
}
|
|
99
|
-
function validateGetFields(fields, runtimeMetadataKeys) {
|
|
100
|
-
if (fields === null) {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
const itemFields = /* @__PURE__ */ new Set([...FRONT_MATTER_KEY_ORDER, ...runtimeMetadataKeys]);
|
|
104
|
-
const allowedRootFields = /* @__PURE__ */ new Set(["body", "linked", "claim_state", "children"]);
|
|
105
|
-
const allowedLinkedFields = /* @__PURE__ */ new Set(["linked.files", "linked.tests", "linked.docs"]);
|
|
106
|
-
const allowedClaimStateFields = /* @__PURE__ */ new Set(["claim_state.claimed", "claim_state.assignee", "claim_state.last_claim", "claim_state.last_release"]);
|
|
107
|
-
const unknown = fields.filter((field) => {
|
|
108
|
-
const normalized = normalizeGetField(field);
|
|
109
|
-
return !itemFields.has(normalized) && !allowedRootFields.has(normalized) && !allowedLinkedFields.has(normalized) && !allowedClaimStateFields.has(normalized);
|
|
110
|
-
});
|
|
111
|
-
if (unknown.length > 0) {
|
|
112
|
-
throw new PmCliError(`Unknown get --fields value(s): ${unknown.join(", ")}`, EXIT_CODE.USAGE, {
|
|
113
|
-
code: "unknown_field_projection",
|
|
114
|
-
examples: [
|
|
115
|
-
"pm get <id> --fields id,title,status,type,updated_at",
|
|
116
|
-
"pm get <id> --fields id,title,claim_state",
|
|
117
|
-
"pm get <id> --fields id,title,body,linked.files"
|
|
118
|
-
]
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
function projectItemForFields(item, fields) {
|
|
123
|
-
const source = toItemRecord(item);
|
|
124
|
-
const projected = {};
|
|
125
|
-
for (const field of fields) {
|
|
126
|
-
const normalized = field.startsWith("item.") ? field.slice("item.".length) : field;
|
|
127
|
-
if (normalized === "body" || normalized === "linked" || normalized.startsWith("linked.")) {
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
projected[normalized] = source[normalized];
|
|
131
|
-
}
|
|
132
|
-
return projected;
|
|
133
|
-
}
|
|
134
|
-
function fieldsInclude(fields, name) {
|
|
135
|
-
return fields?.some((field) => field === name || field === `item.${name}`) ?? false;
|
|
136
|
-
}
|
|
137
|
-
function fieldsIncludeRoot(fields, name) {
|
|
138
|
-
return fields.some((field) => field === name || field.startsWith(`${name}.`));
|
|
139
|
-
}
|
|
140
|
-
function resolveGetProjection(options) {
|
|
141
|
-
if (options.full && (options.fields !== void 0 || options.depth !== void 0)) {
|
|
142
|
-
throw new PmCliError("Get projection options are mutually exclusive; remove the extra projection flag and retry.", EXIT_CODE.USAGE);
|
|
143
|
-
}
|
|
144
|
-
if (options.tree !== true && options.treeDepth !== void 0) {
|
|
145
|
-
throw new PmCliError("Get --tree-depth requires --tree", EXIT_CODE.USAGE);
|
|
146
|
-
}
|
|
147
|
-
return {
|
|
148
|
-
depth: options.full ? "deep" : parseGetDepth(options.depth),
|
|
149
|
-
treeDepth: options.tree === true ? parseIntegerLimit(options.treeDepth, "--tree-depth") : void 0,
|
|
150
|
-
fields: parseGetFields(options.fields),
|
|
151
|
-
fieldProjection: options.fields !== void 0
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
async function loadGetItemContext(id, global) {
|
|
155
|
-
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
156
|
-
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
157
|
-
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
158
|
-
}
|
|
159
|
-
const settings = await readSettings(pmRoot);
|
|
160
|
-
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
161
|
-
const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);
|
|
162
|
-
if (!located) {
|
|
163
|
-
throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeRegistry.type_to_folder);
|
|
164
|
-
}
|
|
165
|
-
const loaded = await readLocatedItem(located, { schema: settings.schema });
|
|
166
|
-
return {
|
|
167
|
-
pmRoot,
|
|
168
|
-
settings,
|
|
169
|
-
typeToFolder: typeRegistry.type_to_folder,
|
|
170
|
-
locatedId: located.id,
|
|
171
|
-
metadata: loaded.document.metadata,
|
|
172
|
-
body: loaded.document.body
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
function validateGetProjectionFields(fields, settings) {
|
|
176
|
-
const runtimeMetadataKeys = resolveRuntimeFieldRegistry(settings.schema).definitions.map((field) => field.metadata_key);
|
|
177
|
-
validateGetFields(fields, runtimeMetadataKeys);
|
|
178
|
-
}
|
|
179
|
-
function shouldIncludeGetField(params) {
|
|
180
|
-
const { fieldProjection, depth, fields, field, itemType } = params;
|
|
181
|
-
if (fieldProjection) {
|
|
182
|
-
if (field === "body" || field === "linked") {
|
|
183
|
-
return fieldsInclude(fields, field);
|
|
184
|
-
}
|
|
185
|
-
return fieldsIncludeRoot(fields, field);
|
|
186
|
-
}
|
|
187
|
-
if (field === "children") {
|
|
188
|
-
return depth !== "brief" && CHILD_ROLLUP_TYPES.has(itemType);
|
|
189
|
-
}
|
|
190
|
-
return depth !== "brief";
|
|
191
|
-
}
|
|
192
|
-
async function resolveGetClaimState(context, includeClaimState) {
|
|
193
|
-
if (!includeClaimState) {
|
|
194
|
-
return void 0;
|
|
195
|
-
}
|
|
196
|
-
const historyPath = getHistoryPath(context.pmRoot, context.locatedId);
|
|
197
|
-
const history = await readHistoryEntries(historyPath, context.locatedId);
|
|
198
|
-
return resolveClaimStateContext(context.metadata.assignee, history);
|
|
199
|
-
}
|
|
200
|
-
function attachGetLinked(result, context, fields, includeLinked) {
|
|
201
|
-
const includeLinkedFiles = includeLinked || fieldsInclude(fields, "linked.files");
|
|
202
|
-
const includeLinkedTests = includeLinked || fieldsInclude(fields, "linked.tests");
|
|
203
|
-
const includeLinkedDocs = includeLinked || fieldsInclude(fields, "linked.docs");
|
|
204
|
-
if (!includeLinked && !includeLinkedFiles && !includeLinkedTests && !includeLinkedDocs) {
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
result.linked = {
|
|
208
|
-
files: includeLinkedFiles ? context.metadata.files ?? [] : [],
|
|
209
|
-
tests: includeLinkedTests ? context.metadata.tests ?? [] : [],
|
|
210
|
-
docs: includeLinkedDocs ? context.metadata.docs ?? [] : []
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
async function buildGetChildrenRollup(context, includeChildren) {
|
|
214
|
-
if (!includeChildren) {
|
|
215
|
-
return void 0;
|
|
216
|
-
}
|
|
217
|
-
const statusRegistry = resolveRuntimeStatusRegistry(context.settings.schema);
|
|
218
|
-
const corpus = await listAllFrontMatterLight(context.pmRoot, context.settings.item_format, context.typeToFolder, void 0, context.settings.schema);
|
|
219
|
-
const byStatus = {};
|
|
220
|
-
let active = 0;
|
|
221
|
-
let count = 0;
|
|
222
|
-
const locatedId = context.locatedId.trim().toLowerCase();
|
|
223
|
-
for (const candidate of corpus) {
|
|
224
|
-
const parentId = typeof candidate.parent === "string" ? candidate.parent.trim().toLowerCase() : "";
|
|
225
|
-
if (parentId !== locatedId)
|
|
226
|
-
continue;
|
|
227
|
-
const candidateStatus = candidate.status.trim().toLowerCase();
|
|
228
|
-
count += 1;
|
|
229
|
-
byStatus[candidateStatus] = (byStatus[candidateStatus] ?? 0) + 1;
|
|
230
|
-
if (!isTerminalStatus(candidateStatus, statusRegistry)) {
|
|
231
|
-
active += 1;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
return { count, active, by_status: byStatus };
|
|
235
|
-
}
|
|
236
|
-
async function buildGetTree(context, options, treeDepth, global) {
|
|
237
|
-
if (options.tree !== true) {
|
|
238
|
-
return void 0;
|
|
239
|
-
}
|
|
240
|
-
const subtree = await runList(void 0, {
|
|
241
|
-
parent: context.locatedId,
|
|
242
|
-
tree: true,
|
|
243
|
-
treeDepth: treeDepth === void 0 ? void 0 : String(treeDepth),
|
|
244
|
-
full: true
|
|
245
|
-
}, global);
|
|
246
|
-
return {
|
|
247
|
-
root_id: context.locatedId,
|
|
248
|
-
root_title: context.metadata.title,
|
|
249
|
-
depth_limit: treeDepth ?? null,
|
|
250
|
-
count: subtree.count,
|
|
251
|
-
items: subtree.items.map((entry) => toItemRecord(entry))
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
async function runGet(id, global, options = {}) {
|
|
255
|
-
const projection = resolveGetProjection(options);
|
|
256
|
-
const context = await loadGetItemContext(id, global);
|
|
257
|
-
validateGetProjectionFields(projection.fields, context.settings);
|
|
258
|
-
const includeBody = shouldIncludeGetField({ ...projection, field: "body" });
|
|
259
|
-
const includeLinked = shouldIncludeGetField({ ...projection, field: "linked" });
|
|
260
|
-
const includeClaimState = shouldIncludeGetField({ ...projection, field: "claim_state" });
|
|
261
|
-
const itemType = context.metadata.type.trim().toLowerCase();
|
|
262
|
-
const includeChildren = shouldIncludeGetField({ ...projection, field: "children", itemType });
|
|
263
|
-
const claimState = await resolveGetClaimState(context, includeClaimState);
|
|
264
|
-
const result = {
|
|
265
|
-
item: projection.fieldProjection ? projectItemForFields(context.metadata, projection.fields) : projectItemForDepth(context.metadata, projection.depth)
|
|
266
|
-
};
|
|
267
|
-
if (includeBody) {
|
|
268
|
-
result.item.body = context.body;
|
|
269
|
-
}
|
|
270
|
-
attachGetLinked(result, context, projection.fields, includeLinked);
|
|
271
|
-
if (claimState) {
|
|
272
|
-
result.claim_state = claimState;
|
|
273
|
-
}
|
|
274
|
-
result.children = await buildGetChildrenRollup(context, includeChildren);
|
|
275
|
-
result.tree = await buildGetTree(context, options, projection.treeDepth, global);
|
|
276
|
-
return result;
|
|
277
|
-
}
|
|
278
|
-
export {
|
|
279
|
-
runGet
|
|
280
|
-
};
|
|
281
|
-
//# sourceMappingURL=get-NH2MPBCI.js.map
|
|
282
|
-
|
|
283
|
-
//# debugId=9098e493-bd2c-5718-be4f-0f181a9fd126
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/get.ts"],"sourcesContent":["/**\n * @module cli/commands/get\n *\n * Implements the pm get 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 { toItemRecord } from \"../../core/item/item-record.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { EXIT_CODE, FRONT_MATTER_KEY_ORDER } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { buildItemNotFoundError, listAllFrontMatterLight, locateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getHistoryPath, getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { parseIntegerLimit } from \"../shared-parsers.js\";\nimport type { ItemFrontMatter, LinkedDoc, LinkedFile, LinkedTest } from \"../../types/index.js\";\nimport { readHistoryEntries } from \"./history.js\";\nimport { runList } from \"./list.js\";\n\ninterface ClaimHistoryContext {\n ts: string;\n author: string;\n message: string | null;\n}\n\ninterface ClaimHistoryEntry {\n op: string;\n ts: string;\n author: string;\n message?: string;\n}\n\ninterface ClaimStateContext {\n claimed: boolean;\n assignee: string | null;\n last_claim: ClaimHistoryContext | null;\n last_release: ClaimHistoryContext | null;\n}\n\ninterface ChildRollupContext {\n count: number;\n active: number;\n by_status: Record<string, number>;\n}\n\n// GH-155 (pm-gcm3): only container types get the inline child rollup so leaf\n// item reads keep avoiding the corpus scan that the rollup requires.\nconst CHILD_ROLLUP_TYPES = new Set([\"milestone\", \"epic\"]);\n\n/**\n * Documents the get result payload exchanged by command, SDK, and package integrations.\n */\nexport interface GetResult {\n // `body` lives inside `item` (alongside `description`/`acceptance_criteria`)\n // for parity with `pm list --include-body`, so agents reliably find it at\n // `.item.body` in JSON output instead of a top-level sibling.\n item: Partial<ItemFrontMatter> & { body?: string };\n linked?: {\n files: LinkedFile[];\n tests: LinkedTest[];\n docs: LinkedDoc[];\n };\n claim_state?: ClaimStateContext;\n children?: ChildRollupContext;\n tree?: {\n root_id: string;\n root_title: string | null;\n depth_limit: number | null;\n count: number;\n items: Record<string, unknown>[];\n };\n}\n\nconst GET_DEPTH_VALUES = [\"brief\", \"standard\", \"deep\"] as const;\n\ntype GetDepth = (typeof GET_DEPTH_VALUES)[number];\n\n/**\n * Documents the get options payload exchanged by command, SDK, and package integrations.\n */\nexport interface GetOptions {\n depth?: string;\n fields?: string;\n full?: boolean;\n tree?: boolean;\n treeDepth?: string;\n}\n\nfunction toClaimHistoryContext(\n entry: ClaimHistoryEntry,\n): ClaimHistoryContext {\n return {\n ts: entry.ts,\n author: entry.author,\n message: entry.message ?? null,\n };\n}\n\nfunction resolveClaimStateContext(\n assigneeValue: string | undefined,\n history: ClaimHistoryEntry[],\n): ClaimStateContext {\n const assignee = assigneeValue?.trim();\n const normalizedAssignee = assignee && assignee.length > 0 ? assignee : null;\n const lastClaim = [...history].reverse().find((entry) => entry.op === \"claim\");\n const lastRelease = [...history].reverse().find((entry) => entry.op === \"release\");\n return {\n claimed: normalizedAssignee !== null,\n assignee: normalizedAssignee,\n last_claim: lastClaim ? toClaimHistoryContext(lastClaim) : null,\n last_release: lastRelease ? toClaimHistoryContext(lastRelease) : null,\n };\n}\n\nfunction parseGetDepth(raw: string | undefined): GetDepth {\n if (raw === undefined || raw.trim().length === 0) {\n return \"standard\";\n }\n const normalized = raw.trim().toLowerCase();\n if (normalized === \"full\") {\n return \"deep\";\n }\n if (GET_DEPTH_VALUES.includes(normalized as GetDepth)) {\n return normalized as GetDepth;\n }\n throw new PmCliError(\"Get --depth must be one of brief|standard|deep|full\", EXIT_CODE.USAGE);\n}\n\nfunction projectItemForDepth(item: ItemFrontMatter, depth: GetDepth): Partial<ItemFrontMatter> {\n if (depth === \"deep\") {\n return item;\n }\n const {\n comments: _comments,\n notes: _notes,\n learnings: _learnings,\n files: _files,\n tests: _tests,\n docs: _docs,\n reminders: _reminders,\n events: _events,\n ...projected\n } = item;\n return projected;\n}\n\nfunction parseGetFields(raw: string | undefined): string[] | null {\n if (raw === undefined) {\n return null;\n }\n const fields = raw\n .split(\",\")\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n if (fields.length === 0) {\n throw new PmCliError(\"Get --fields requires a comma-separated list of field names\", EXIT_CODE.USAGE);\n }\n return fields;\n}\n\nfunction normalizeGetField(field: string): string {\n return field.startsWith(\"item.\") ? field.slice(\"item.\".length) : field;\n}\n\nfunction validateGetFields(fields: string[] | null, runtimeMetadataKeys: Iterable<string>): void {\n if (fields === null) {\n return;\n }\n const itemFields = new Set([...FRONT_MATTER_KEY_ORDER, ...runtimeMetadataKeys]);\n const allowedRootFields = new Set([\"body\", \"linked\", \"claim_state\", \"children\"]);\n const allowedLinkedFields = new Set([\"linked.files\", \"linked.tests\", \"linked.docs\"]);\n const allowedClaimStateFields = new Set([\"claim_state.claimed\", \"claim_state.assignee\", \"claim_state.last_claim\", \"claim_state.last_release\"]);\n const unknown = fields.filter((field) => {\n const normalized = normalizeGetField(field);\n return (\n !itemFields.has(normalized) &&\n !allowedRootFields.has(normalized) &&\n !allowedLinkedFields.has(normalized) &&\n !allowedClaimStateFields.has(normalized)\n );\n });\n if (unknown.length > 0) {\n throw new PmCliError(`Unknown get --fields value(s): ${unknown.join(\", \")}`, EXIT_CODE.USAGE, {\n code: \"unknown_field_projection\",\n examples: [\n \"pm get <id> --fields id,title,status,type,updated_at\",\n \"pm get <id> --fields id,title,claim_state\",\n \"pm get <id> --fields id,title,body,linked.files\",\n ],\n });\n }\n}\n\nfunction projectItemForFields(item: ItemFrontMatter, fields: string[]): Partial<ItemFrontMatter> {\n const source = toItemRecord(item);\n const projected: Record<string, unknown> = {};\n for (const field of fields) {\n const normalized = field.startsWith(\"item.\") ? field.slice(\"item.\".length) : field;\n if (normalized === \"body\" || normalized === \"linked\" || normalized.startsWith(\"linked.\")) {\n continue;\n }\n projected[normalized] = source[normalized];\n }\n return projected as Partial<ItemFrontMatter>;\n}\n\nfunction fieldsInclude(fields: string[] | null, name: string): boolean {\n return fields?.some((field) => field === name || field === `item.${name}`) ?? false;\n}\n\nfunction fieldsIncludeRoot(fields: string[], name: string): boolean {\n return fields.some((field) => field === name || field.startsWith(`${name}.`));\n}\n\ninterface ResolvedGetProjection {\n depth: GetDepth;\n treeDepth: number | undefined;\n fields: string[] | null;\n fieldProjection: boolean;\n}\n\ninterface GetItemContext {\n pmRoot: string;\n settings: Awaited<ReturnType<typeof readSettings>>;\n typeToFolder: Record<string, string>;\n locatedId: string;\n metadata: ItemFrontMatter;\n body: string;\n}\n\nfunction resolveGetProjection(options: GetOptions): ResolvedGetProjection {\n if (options.full && (options.fields !== undefined || options.depth !== undefined)) {\n throw new PmCliError(\"Get projection options are mutually exclusive; remove the extra projection flag and retry.\", EXIT_CODE.USAGE);\n }\n if (options.tree !== true && options.treeDepth !== undefined) {\n throw new PmCliError(\"Get --tree-depth requires --tree\", EXIT_CODE.USAGE);\n }\n return {\n depth: options.full ? \"deep\" : parseGetDepth(options.depth),\n treeDepth: options.tree === true ? parseIntegerLimit(options.treeDepth, \"--tree-depth\") : undefined,\n fields: parseGetFields(options.fields),\n fieldProjection: options.fields !== undefined,\n };\n}\n\nasync function loadGetItemContext(id: string, global: GlobalOptions): Promise<GetItemContext> {\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 if (!located) {\n throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeRegistry.type_to_folder);\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n return {\n pmRoot,\n settings,\n typeToFolder: typeRegistry.type_to_folder,\n locatedId: located.id,\n metadata: loaded.document.metadata,\n body: loaded.document.body,\n };\n}\n\nfunction validateGetProjectionFields(fields: string[] | null, settings: Awaited<ReturnType<typeof readSettings>>): void {\n const runtimeMetadataKeys = resolveRuntimeFieldRegistry(settings.schema).definitions.map((field) => field.metadata_key);\n validateGetFields(fields, runtimeMetadataKeys);\n}\n\nfunction shouldIncludeGetField(params: {\n fieldProjection: boolean;\n depth: GetDepth;\n fields: string[] | null;\n field: \"body\" | \"linked\" | \"claim_state\" | \"children\";\n itemType?: string;\n}): boolean {\n const { fieldProjection, depth, fields, field, itemType } = params;\n if (fieldProjection) {\n if (field === \"body\" || field === \"linked\") {\n return fieldsInclude(fields, field);\n }\n return fieldsIncludeRoot(fields as string[], field);\n }\n if (field === \"children\") {\n return depth !== \"brief\" && CHILD_ROLLUP_TYPES.has(itemType as string);\n }\n return depth !== \"brief\";\n}\n\nasync function resolveGetClaimState(context: GetItemContext, includeClaimState: boolean): Promise<ClaimStateContext | undefined> {\n if (!includeClaimState) {\n return undefined;\n }\n const historyPath = getHistoryPath(context.pmRoot, context.locatedId);\n const history = await readHistoryEntries(historyPath, context.locatedId);\n return resolveClaimStateContext(context.metadata.assignee, history);\n}\n\nfunction attachGetLinked(\n result: GetResult,\n context: GetItemContext,\n fields: string[] | null,\n includeLinked: boolean,\n): void {\n const includeLinkedFiles = includeLinked || fieldsInclude(fields, \"linked.files\");\n const includeLinkedTests = includeLinked || fieldsInclude(fields, \"linked.tests\");\n const includeLinkedDocs = includeLinked || fieldsInclude(fields, \"linked.docs\");\n if (!includeLinked && !includeLinkedFiles && !includeLinkedTests && !includeLinkedDocs) {\n return;\n }\n result.linked = {\n files: includeLinkedFiles ? context.metadata.files ?? [] : [],\n tests: includeLinkedTests ? context.metadata.tests ?? [] : [],\n docs: includeLinkedDocs ? context.metadata.docs ?? [] : [],\n };\n}\n\nasync function buildGetChildrenRollup(context: GetItemContext, includeChildren: boolean): Promise<ChildRollupContext | undefined> {\n if (!includeChildren) {\n return undefined;\n }\n const statusRegistry = resolveRuntimeStatusRegistry(context.settings.schema);\n const corpus = await listAllFrontMatterLight(\n context.pmRoot,\n context.settings.item_format,\n context.typeToFolder,\n undefined,\n context.settings.schema,\n );\n const byStatus: Record<string, number> = {};\n let active = 0;\n let count = 0;\n const locatedId = context.locatedId.trim().toLowerCase();\n for (const candidate of corpus) {\n const parentId = typeof candidate.parent === \"string\" ? candidate.parent.trim().toLowerCase() : \"\";\n if (parentId !== locatedId) continue;\n const candidateStatus = candidate.status.trim().toLowerCase();\n count += 1;\n byStatus[candidateStatus] = (byStatus[candidateStatus] ?? 0) + 1;\n if (!isTerminalStatus(candidateStatus, statusRegistry)) {\n active += 1;\n }\n }\n return { count, active, by_status: byStatus };\n}\n\nasync function buildGetTree(\n context: GetItemContext,\n options: GetOptions,\n treeDepth: number | undefined,\n global: GlobalOptions,\n): Promise<GetResult[\"tree\"] | undefined> {\n if (options.tree !== true) {\n return undefined;\n }\n const subtree = await runList(\n undefined,\n {\n parent: context.locatedId,\n tree: true,\n treeDepth: treeDepth === undefined ? undefined : String(treeDepth),\n full: true,\n },\n global,\n );\n return {\n root_id: context.locatedId,\n root_title: context.metadata.title,\n depth_limit: treeDepth ?? null,\n count: subtree.count,\n items: subtree.items.map((entry) => toItemRecord(entry)),\n };\n}\n\n/**\n * Implements run get for the public runtime surface of this module.\n */\nexport async function runGet(id: string, global: GlobalOptions, options: GetOptions = {}): Promise<GetResult> {\n const projection = resolveGetProjection(options);\n const context = await loadGetItemContext(id, global);\n validateGetProjectionFields(projection.fields, context.settings);\n const includeBody = shouldIncludeGetField({ ...projection, field: \"body\" });\n const includeLinked = shouldIncludeGetField({ ...projection, field: \"linked\" });\n const includeClaimState = shouldIncludeGetField({ ...projection, field: \"claim_state\" });\n const itemType = context.metadata.type.trim().toLowerCase();\n const includeChildren = shouldIncludeGetField({ ...projection, field: \"children\", itemType });\n const claimState = await resolveGetClaimState(context, includeClaimState);\n const result: GetResult = {\n item: projection.fieldProjection\n ? projectItemForFields(context.metadata, projection.fields as string[])\n : projectItemForDepth(context.metadata, projection.depth),\n };\n if (includeBody) {\n result.item.body = context.body;\n }\n attachGetLinked(result, context, projection.fields, includeLinked);\n if (claimState) {\n result.claim_state = claimState;\n }\n result.children = await buildGetChildrenRollup(context, includeChildren);\n result.tree = await buildGetTree(context, options, projection.treeDepth, global);\n return result;\n}\n"],"names":[],"mappings":"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","debugId":"9098e493-bd2c-5718-be4f-0f181a9fd126"}
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
readHistoryEntries
|
|
3
|
-
} from "./chunk-3Y4OESPP.js";
|
|
4
|
-
import "./chunk-D3UCE7RW.js";
|
|
5
|
-
import {
|
|
6
|
-
runList
|
|
7
|
-
} from "./chunk-7EQNAZX2.js";
|
|
8
|
-
import "./chunk-R23CSHGI.js";
|
|
9
|
-
import "./chunk-RX3HQSYG.js";
|
|
10
|
-
import {
|
|
11
|
-
parseIntegerLimit
|
|
12
|
-
} from "./chunk-EEY54JMF.js";
|
|
13
|
-
import {
|
|
14
|
-
buildItemNotFoundError,
|
|
15
|
-
listAllFrontMatterLight,
|
|
16
|
-
locateItem,
|
|
17
|
-
readLocatedItem,
|
|
18
|
-
toItemRecord
|
|
19
|
-
} from "./chunk-3U3VEWK6.js";
|
|
20
|
-
import {
|
|
21
|
-
isTerminalStatus
|
|
22
|
-
} from "./chunk-EZFKWSC7.js";
|
|
23
|
-
import "./chunk-DRBV5UC2.js";
|
|
24
|
-
import {
|
|
25
|
-
PmCliError,
|
|
26
|
-
getActiveExtensionRegistrations,
|
|
27
|
-
readSettings
|
|
28
|
-
} from "./chunk-P5YORJRH.js";
|
|
29
|
-
import "./chunk-7C2O74AE.js";
|
|
30
|
-
import {
|
|
31
|
-
EXIT_CODE,
|
|
32
|
-
FRONT_MATTER_KEY_ORDER,
|
|
33
|
-
getHistoryPath,
|
|
34
|
-
getSettingsPath,
|
|
35
|
-
pathExists,
|
|
36
|
-
resolveItemTypeRegistry,
|
|
37
|
-
resolvePmRoot,
|
|
38
|
-
resolveRuntimeFieldRegistry,
|
|
39
|
-
resolveRuntimeStatusRegistry
|
|
40
|
-
} from "./chunk-5VVUKE3U.js";
|
|
41
|
-
|
|
42
|
-
// dist/cli/commands/get.js
|
|
43
|
-
!(function() {
|
|
44
|
-
try {
|
|
45
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
46
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ed20649d-dbe4-5e6b-9e36-2ff9e8eb0260");
|
|
47
|
-
} catch (e2) {
|
|
48
|
-
}
|
|
49
|
-
})();
|
|
50
|
-
var CHILD_ROLLUP_TYPES = /* @__PURE__ */ new Set(["milestone", "epic"]);
|
|
51
|
-
var GET_DEPTH_VALUES = ["brief", "standard", "deep"];
|
|
52
|
-
function toClaimHistoryContext(entry) {
|
|
53
|
-
return {
|
|
54
|
-
ts: entry.ts,
|
|
55
|
-
author: entry.author,
|
|
56
|
-
message: entry.message ?? null
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function resolveClaimStateContext(assigneeValue, history) {
|
|
60
|
-
const assignee = assigneeValue?.trim();
|
|
61
|
-
const normalizedAssignee = assignee && assignee.length > 0 ? assignee : null;
|
|
62
|
-
const lastClaim = [...history].reverse().find((entry) => entry.op === "claim");
|
|
63
|
-
const lastRelease = [...history].reverse().find((entry) => entry.op === "release");
|
|
64
|
-
return {
|
|
65
|
-
claimed: normalizedAssignee !== null,
|
|
66
|
-
assignee: normalizedAssignee,
|
|
67
|
-
last_claim: lastClaim ? toClaimHistoryContext(lastClaim) : null,
|
|
68
|
-
last_release: lastRelease ? toClaimHistoryContext(lastRelease) : null
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
function parseGetDepth(raw) {
|
|
72
|
-
if (raw === void 0 || raw.trim().length === 0) {
|
|
73
|
-
return "standard";
|
|
74
|
-
}
|
|
75
|
-
const normalized = raw.trim().toLowerCase();
|
|
76
|
-
if (normalized === "full") {
|
|
77
|
-
return "deep";
|
|
78
|
-
}
|
|
79
|
-
if (GET_DEPTH_VALUES.includes(normalized)) {
|
|
80
|
-
return normalized;
|
|
81
|
-
}
|
|
82
|
-
throw new PmCliError("Get --depth must be one of brief|standard|deep|full", EXIT_CODE.USAGE);
|
|
83
|
-
}
|
|
84
|
-
function projectItemForDepth(item, depth) {
|
|
85
|
-
if (depth === "deep") {
|
|
86
|
-
return item;
|
|
87
|
-
}
|
|
88
|
-
const { comments: _comments, notes: _notes, learnings: _learnings, files: _files, tests: _tests, docs: _docs, reminders: _reminders, events: _events, ...projected } = item;
|
|
89
|
-
return projected;
|
|
90
|
-
}
|
|
91
|
-
function parseGetFields(raw) {
|
|
92
|
-
if (raw === void 0) {
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
const fields = raw.split(",").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
96
|
-
if (fields.length === 0) {
|
|
97
|
-
throw new PmCliError("Get --fields requires a comma-separated list of field names", EXIT_CODE.USAGE);
|
|
98
|
-
}
|
|
99
|
-
return fields;
|
|
100
|
-
}
|
|
101
|
-
function normalizeGetField(field) {
|
|
102
|
-
return field.startsWith("item.") ? field.slice("item.".length) : field;
|
|
103
|
-
}
|
|
104
|
-
function validateGetFields(fields, runtimeMetadataKeys) {
|
|
105
|
-
if (fields === null) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
const itemFields = /* @__PURE__ */ new Set([...FRONT_MATTER_KEY_ORDER, ...runtimeMetadataKeys]);
|
|
109
|
-
const allowedRootFields = /* @__PURE__ */ new Set(["body", "linked", "claim_state", "children"]);
|
|
110
|
-
const allowedLinkedFields = /* @__PURE__ */ new Set(["linked.files", "linked.tests", "linked.docs"]);
|
|
111
|
-
const allowedClaimStateFields = /* @__PURE__ */ new Set(["claim_state.claimed", "claim_state.assignee", "claim_state.last_claim", "claim_state.last_release"]);
|
|
112
|
-
const unknown = fields.filter((field) => {
|
|
113
|
-
const normalized = normalizeGetField(field);
|
|
114
|
-
return !itemFields.has(normalized) && !allowedRootFields.has(normalized) && !allowedLinkedFields.has(normalized) && !allowedClaimStateFields.has(normalized);
|
|
115
|
-
});
|
|
116
|
-
if (unknown.length > 0) {
|
|
117
|
-
throw new PmCliError(`Unknown get --fields value(s): ${unknown.join(", ")}`, EXIT_CODE.USAGE, {
|
|
118
|
-
code: "unknown_field_projection",
|
|
119
|
-
examples: [
|
|
120
|
-
"pm get <id> --fields id,title,status,type,updated_at",
|
|
121
|
-
"pm get <id> --fields id,title,claim_state",
|
|
122
|
-
"pm get <id> --fields id,title,body,linked.files"
|
|
123
|
-
]
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
function projectItemForFields(item, fields) {
|
|
128
|
-
const source = toItemRecord(item);
|
|
129
|
-
const projected = {};
|
|
130
|
-
for (const field of fields) {
|
|
131
|
-
const normalized = field.startsWith("item.") ? field.slice("item.".length) : field;
|
|
132
|
-
if (normalized === "body" || normalized === "linked" || normalized.startsWith("linked.")) {
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
|
-
projected[normalized] = source[normalized];
|
|
136
|
-
}
|
|
137
|
-
return projected;
|
|
138
|
-
}
|
|
139
|
-
function fieldsInclude(fields, name) {
|
|
140
|
-
return fields?.some((field) => field === name || field === `item.${name}`) ?? false;
|
|
141
|
-
}
|
|
142
|
-
function fieldsIncludeRoot(fields, name) {
|
|
143
|
-
return fields.some((field) => field === name || field.startsWith(`${name}.`));
|
|
144
|
-
}
|
|
145
|
-
function resolveGetProjection(options) {
|
|
146
|
-
if (options.full && (options.fields !== void 0 || options.depth !== void 0)) {
|
|
147
|
-
throw new PmCliError("Get projection options are mutually exclusive; remove the extra projection flag and retry.", EXIT_CODE.USAGE);
|
|
148
|
-
}
|
|
149
|
-
if (options.tree !== true && options.treeDepth !== void 0) {
|
|
150
|
-
throw new PmCliError("Get --tree-depth requires --tree", EXIT_CODE.USAGE);
|
|
151
|
-
}
|
|
152
|
-
return {
|
|
153
|
-
depth: options.full ? "deep" : parseGetDepth(options.depth),
|
|
154
|
-
treeDepth: options.tree === true ? parseIntegerLimit(options.treeDepth, "--tree-depth") : void 0,
|
|
155
|
-
fields: parseGetFields(options.fields),
|
|
156
|
-
fieldProjection: options.fields !== void 0
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
async function loadGetItemContext(id, global2) {
|
|
160
|
-
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
161
|
-
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
162
|
-
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
163
|
-
}
|
|
164
|
-
const settings = await readSettings(pmRoot);
|
|
165
|
-
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
166
|
-
const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);
|
|
167
|
-
if (!located) {
|
|
168
|
-
throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeRegistry.type_to_folder);
|
|
169
|
-
}
|
|
170
|
-
const loaded = await readLocatedItem(located, { schema: settings.schema });
|
|
171
|
-
return {
|
|
172
|
-
pmRoot,
|
|
173
|
-
settings,
|
|
174
|
-
typeToFolder: typeRegistry.type_to_folder,
|
|
175
|
-
locatedId: located.id,
|
|
176
|
-
metadata: loaded.document.metadata,
|
|
177
|
-
body: loaded.document.body
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
function validateGetProjectionFields(fields, settings) {
|
|
181
|
-
const runtimeMetadataKeys = resolveRuntimeFieldRegistry(settings.schema).definitions.map((field) => field.metadata_key);
|
|
182
|
-
validateGetFields(fields, runtimeMetadataKeys);
|
|
183
|
-
}
|
|
184
|
-
function shouldIncludeGetField(params) {
|
|
185
|
-
const { fieldProjection, depth, fields, field, itemType } = params;
|
|
186
|
-
if (fieldProjection) {
|
|
187
|
-
if (field === "body" || field === "linked") {
|
|
188
|
-
return fieldsInclude(fields, field);
|
|
189
|
-
}
|
|
190
|
-
return fieldsIncludeRoot(fields, field);
|
|
191
|
-
}
|
|
192
|
-
if (field === "children") {
|
|
193
|
-
return depth !== "brief" && CHILD_ROLLUP_TYPES.has(itemType);
|
|
194
|
-
}
|
|
195
|
-
return depth !== "brief";
|
|
196
|
-
}
|
|
197
|
-
async function resolveGetClaimState(context, includeClaimState) {
|
|
198
|
-
if (!includeClaimState) {
|
|
199
|
-
return void 0;
|
|
200
|
-
}
|
|
201
|
-
const historyPath = getHistoryPath(context.pmRoot, context.locatedId);
|
|
202
|
-
const history = await readHistoryEntries(historyPath, context.locatedId);
|
|
203
|
-
return resolveClaimStateContext(context.metadata.assignee, history);
|
|
204
|
-
}
|
|
205
|
-
function attachGetLinked(result, context, fields, includeLinked) {
|
|
206
|
-
const includeLinkedFiles = includeLinked || fieldsInclude(fields, "linked.files");
|
|
207
|
-
const includeLinkedTests = includeLinked || fieldsInclude(fields, "linked.tests");
|
|
208
|
-
const includeLinkedDocs = includeLinked || fieldsInclude(fields, "linked.docs");
|
|
209
|
-
if (!includeLinked && !includeLinkedFiles && !includeLinkedTests && !includeLinkedDocs) {
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
result.linked = {
|
|
213
|
-
files: includeLinkedFiles ? context.metadata.files ?? [] : [],
|
|
214
|
-
tests: includeLinkedTests ? context.metadata.tests ?? [] : [],
|
|
215
|
-
docs: includeLinkedDocs ? context.metadata.docs ?? [] : []
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
async function buildGetChildrenRollup(context, includeChildren) {
|
|
219
|
-
if (!includeChildren) {
|
|
220
|
-
return void 0;
|
|
221
|
-
}
|
|
222
|
-
const statusRegistry = resolveRuntimeStatusRegistry(context.settings.schema);
|
|
223
|
-
const corpus = await listAllFrontMatterLight(context.pmRoot, context.settings.item_format, context.typeToFolder, void 0, context.settings.schema);
|
|
224
|
-
const byStatus = {};
|
|
225
|
-
let active = 0;
|
|
226
|
-
let count = 0;
|
|
227
|
-
const locatedId = context.locatedId.trim().toLowerCase();
|
|
228
|
-
for (const candidate of corpus) {
|
|
229
|
-
const parentId = typeof candidate.parent === "string" ? candidate.parent.trim().toLowerCase() : "";
|
|
230
|
-
if (parentId !== locatedId)
|
|
231
|
-
continue;
|
|
232
|
-
const candidateStatus = candidate.status.trim().toLowerCase();
|
|
233
|
-
count += 1;
|
|
234
|
-
byStatus[candidateStatus] = (byStatus[candidateStatus] ?? 0) + 1;
|
|
235
|
-
if (!isTerminalStatus(candidateStatus, statusRegistry)) {
|
|
236
|
-
active += 1;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
return { count, active, by_status: byStatus };
|
|
240
|
-
}
|
|
241
|
-
async function buildGetTree(context, options, treeDepth, global2) {
|
|
242
|
-
if (options.tree !== true) {
|
|
243
|
-
return void 0;
|
|
244
|
-
}
|
|
245
|
-
const subtree = await runList(void 0, {
|
|
246
|
-
parent: context.locatedId,
|
|
247
|
-
tree: true,
|
|
248
|
-
treeDepth: treeDepth === void 0 ? void 0 : String(treeDepth),
|
|
249
|
-
full: true
|
|
250
|
-
}, global2);
|
|
251
|
-
return {
|
|
252
|
-
root_id: context.locatedId,
|
|
253
|
-
root_title: context.metadata.title,
|
|
254
|
-
depth_limit: treeDepth ?? null,
|
|
255
|
-
count: subtree.count,
|
|
256
|
-
items: subtree.items.map((entry) => toItemRecord(entry))
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
async function runGet(id, global2, options = {}) {
|
|
260
|
-
const projection = resolveGetProjection(options);
|
|
261
|
-
const context = await loadGetItemContext(id, global2);
|
|
262
|
-
validateGetProjectionFields(projection.fields, context.settings);
|
|
263
|
-
const includeBody = shouldIncludeGetField({ ...projection, field: "body" });
|
|
264
|
-
const includeLinked = shouldIncludeGetField({ ...projection, field: "linked" });
|
|
265
|
-
const includeClaimState = shouldIncludeGetField({ ...projection, field: "claim_state" });
|
|
266
|
-
const itemType = context.metadata.type.trim().toLowerCase();
|
|
267
|
-
const includeChildren = shouldIncludeGetField({ ...projection, field: "children", itemType });
|
|
268
|
-
const claimState = await resolveGetClaimState(context, includeClaimState);
|
|
269
|
-
const result = {
|
|
270
|
-
item: projection.fieldProjection ? projectItemForFields(context.metadata, projection.fields) : projectItemForDepth(context.metadata, projection.depth)
|
|
271
|
-
};
|
|
272
|
-
if (includeBody) {
|
|
273
|
-
result.item.body = context.body;
|
|
274
|
-
}
|
|
275
|
-
attachGetLinked(result, context, projection.fields, includeLinked);
|
|
276
|
-
if (claimState) {
|
|
277
|
-
result.claim_state = claimState;
|
|
278
|
-
}
|
|
279
|
-
result.children = await buildGetChildrenRollup(context, includeChildren);
|
|
280
|
-
result.tree = await buildGetTree(context, options, projection.treeDepth, global2);
|
|
281
|
-
return result;
|
|
282
|
-
}
|
|
283
|
-
export {
|
|
284
|
-
runGet
|
|
285
|
-
};
|
|
286
|
-
//# sourceMappingURL=get-P4ZQXCPZ.js.map
|