@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,1149 +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]="034228c0-2ef9-5500-a0de-723ef2544e22")}catch(e){}}();
|
|
3
|
-
import {
|
|
4
|
-
runActivity
|
|
5
|
-
} from "./chunk-Z2CRRZYF.js";
|
|
6
|
-
import {
|
|
7
|
-
runCalendar
|
|
8
|
-
} from "./chunk-KL22PY6L.js";
|
|
9
|
-
import {
|
|
10
|
-
runList
|
|
11
|
-
} from "./chunk-YSAH5FY5.js";
|
|
12
|
-
import {
|
|
13
|
-
parseIntegerLimit
|
|
14
|
-
} from "./chunk-YFIE7YK6.js";
|
|
15
|
-
import {
|
|
16
|
-
isTerminalStatus,
|
|
17
|
-
normalizeStatusForRegistry,
|
|
18
|
-
normalizeStatusInput
|
|
19
|
-
} from "./chunk-HK72NWAD.js";
|
|
20
|
-
import {
|
|
21
|
-
compareTimestampStrings
|
|
22
|
-
} from "./chunk-FJRKQREY.js";
|
|
23
|
-
import {
|
|
24
|
-
PmCliError,
|
|
25
|
-
readSettings
|
|
26
|
-
} from "./chunk-US3T3W5J.js";
|
|
27
|
-
import {
|
|
28
|
-
CONTEXT_DEPTH_VALUES,
|
|
29
|
-
CONTEXT_SECTION_VALUES,
|
|
30
|
-
EXIT_CODE,
|
|
31
|
-
SETTINGS_DEFAULTS,
|
|
32
|
-
resolvePmRoot,
|
|
33
|
-
resolveRuntimeStatusRegistry
|
|
34
|
-
} from "./chunk-YD5FML7K.js";
|
|
35
|
-
|
|
36
|
-
// dist/cli/commands/context.js
|
|
37
|
-
var CONTEXT_OUTPUT_VALUES = ["markdown", "toon", "json"];
|
|
38
|
-
var HIGH_LEVEL_TYPES = /* @__PURE__ */ new Set(["Epic", "Feature"]);
|
|
39
|
-
var DEFAULT_CONTEXT_LIMIT = 10;
|
|
40
|
-
var STANDARD_SECTIONS = ["hierarchy", "activity", "progress", "recently_created", "unparented", "workload"];
|
|
41
|
-
var DEEP_SECTIONS = [
|
|
42
|
-
...STANDARD_SECTIONS,
|
|
43
|
-
"blockers",
|
|
44
|
-
"files",
|
|
45
|
-
"staleness",
|
|
46
|
-
"tests"
|
|
47
|
-
];
|
|
48
|
-
var LEADING_HYPHEN_DATE = /^(\d{4})-(\d{2})-(\d{2})/;
|
|
49
|
-
var LEADING_COMPACT_DATE = /^(\d{4})(\d{2})(\d{2})(?:[T ]?\d{2}|$)/;
|
|
50
|
-
var COMPACT_DATE = /^(\d{4})(\d{2})(\d{2})$/;
|
|
51
|
-
var COMPACT_DATETIME = /^(\d{4})(\d{2})(\d{2})(?:[T\s]?)(\d{2})(\d{2})(\d{2})?(Z|[+-]\d{2}:?\d{2})?$/i;
|
|
52
|
-
function parseOutputFormat(raw) {
|
|
53
|
-
if (!raw)
|
|
54
|
-
return void 0;
|
|
55
|
-
const normalized = raw.trim().toLowerCase();
|
|
56
|
-
if (!CONTEXT_OUTPUT_VALUES.includes(normalized)) {
|
|
57
|
-
throw new PmCliError("Context format must be one of markdown|toon|json", EXIT_CODE.USAGE);
|
|
58
|
-
}
|
|
59
|
-
return normalized;
|
|
60
|
-
}
|
|
61
|
-
var FOCUS_PROJECTION_FIELDS = /* @__PURE__ */ new Set([
|
|
62
|
-
"id",
|
|
63
|
-
"title",
|
|
64
|
-
"type",
|
|
65
|
-
"status",
|
|
66
|
-
"priority",
|
|
67
|
-
"order",
|
|
68
|
-
"deadline",
|
|
69
|
-
"assignee",
|
|
70
|
-
"tags",
|
|
71
|
-
"updated_at",
|
|
72
|
-
"parent",
|
|
73
|
-
"children_total",
|
|
74
|
-
"children_closed",
|
|
75
|
-
"completion_pct",
|
|
76
|
-
"created_at"
|
|
77
|
-
]);
|
|
78
|
-
function parseContextFocusFields(raw) {
|
|
79
|
-
if (raw === void 0)
|
|
80
|
-
return void 0;
|
|
81
|
-
const fields = [];
|
|
82
|
-
for (const token of raw.split(",")) {
|
|
83
|
-
const normalized = token.trim().toLowerCase();
|
|
84
|
-
if (normalized.length === 0)
|
|
85
|
-
continue;
|
|
86
|
-
if (!FOCUS_PROJECTION_FIELDS.has(normalized)) {
|
|
87
|
-
throw new PmCliError(`Context --fields value not projectable: ${normalized} (valid: ${[...FOCUS_PROJECTION_FIELDS].join(", ")})`, EXIT_CODE.USAGE);
|
|
88
|
-
}
|
|
89
|
-
if (!fields.includes(normalized))
|
|
90
|
-
fields.push(normalized);
|
|
91
|
-
}
|
|
92
|
-
if (fields.length === 0) {
|
|
93
|
-
throw new PmCliError("Context --fields requires at least one field name", EXIT_CODE.USAGE);
|
|
94
|
-
}
|
|
95
|
-
return fields;
|
|
96
|
-
}
|
|
97
|
-
function projectContextFocusRows(rows, fields) {
|
|
98
|
-
return rows.map((row) => {
|
|
99
|
-
const projected = {};
|
|
100
|
-
const source = row;
|
|
101
|
-
for (const field of fields) {
|
|
102
|
-
projected[field] = source[field] ?? null;
|
|
103
|
-
}
|
|
104
|
-
return projected;
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
function resolveContextOutputFormat(options, global) {
|
|
108
|
-
const commandFormat = parseOutputFormat(options.format);
|
|
109
|
-
if (global.json && commandFormat && commandFormat !== "json") {
|
|
110
|
-
throw new PmCliError("Cannot combine --json with --format markdown|toon", EXIT_CODE.USAGE);
|
|
111
|
-
}
|
|
112
|
-
if (global.json) {
|
|
113
|
-
return "json";
|
|
114
|
-
}
|
|
115
|
-
return commandFormat ?? "toon";
|
|
116
|
-
}
|
|
117
|
-
function parseContextLimit(raw, depth) {
|
|
118
|
-
return parseIntegerLimit(raw, "--limit") ?? (depth === "full" ? Number.MAX_SAFE_INTEGER : DEFAULT_CONTEXT_LIMIT);
|
|
119
|
-
}
|
|
120
|
-
function parseContextDepth(raw, settings) {
|
|
121
|
-
if (!raw)
|
|
122
|
-
return settings.default_depth;
|
|
123
|
-
const normalized = raw.trim().toLowerCase();
|
|
124
|
-
if (!CONTEXT_DEPTH_VALUES.includes(normalized)) {
|
|
125
|
-
throw new PmCliError(`Context --depth must be one of ${CONTEXT_DEPTH_VALUES.join("|")}`, EXIT_CODE.USAGE);
|
|
126
|
-
}
|
|
127
|
-
return normalized;
|
|
128
|
-
}
|
|
129
|
-
function parseContextSections(raw, depth, settings) {
|
|
130
|
-
if (raw && raw.length > 0) {
|
|
131
|
-
const sections = [];
|
|
132
|
-
for (const value of raw) {
|
|
133
|
-
const normalized = value.trim().toLowerCase();
|
|
134
|
-
if (!CONTEXT_SECTION_VALUES.includes(normalized)) {
|
|
135
|
-
throw new PmCliError(`Context --section must be one of ${CONTEXT_SECTION_VALUES.join("|")}`, EXIT_CODE.USAGE);
|
|
136
|
-
}
|
|
137
|
-
if (!sections.includes(normalized)) {
|
|
138
|
-
sections.push(normalized);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
return sections;
|
|
142
|
-
}
|
|
143
|
-
if (depth === "brief")
|
|
144
|
-
return [];
|
|
145
|
-
if (depth === "full")
|
|
146
|
-
return [...CONTEXT_SECTION_VALUES];
|
|
147
|
-
const pool = depth === "deep" ? DEEP_SECTIONS : STANDARD_SECTIONS;
|
|
148
|
-
return pool.filter((section) => settings.sections[section]);
|
|
149
|
-
}
|
|
150
|
-
function parseActivityLimit(raw, settings) {
|
|
151
|
-
if (!raw)
|
|
152
|
-
return settings.activity_limit;
|
|
153
|
-
const parsed = parseIntegerLimit(raw, "--activity-limit");
|
|
154
|
-
return parsed ?? settings.activity_limit;
|
|
155
|
-
}
|
|
156
|
-
function parseStaleThresholdDays(raw, settings) {
|
|
157
|
-
if (!raw)
|
|
158
|
-
return settings.stale_threshold_days;
|
|
159
|
-
const trimmed = raw.trim().toLowerCase();
|
|
160
|
-
const match = /^(\d+)d?$/.exec(trimmed);
|
|
161
|
-
if (!match) {
|
|
162
|
-
throw new PmCliError("--stale-threshold must be a number of days (e.g. 7 or 7d)", EXIT_CODE.USAGE);
|
|
163
|
-
}
|
|
164
|
-
const days = parseInt(match[1], 10);
|
|
165
|
-
if (days <= 0) {
|
|
166
|
-
throw new PmCliError("--stale-threshold must be positive", EXIT_CODE.USAGE);
|
|
167
|
-
}
|
|
168
|
-
return days;
|
|
169
|
-
}
|
|
170
|
-
function statusRank(status, statusRegistry) {
|
|
171
|
-
const normalizedStatus = normalizeStatusForRegistry(status, statusRegistry);
|
|
172
|
-
const inProgressStatus = normalizeStatusInput("in_progress", statusRegistry);
|
|
173
|
-
const openStatus = normalizeStatusInput("open", statusRegistry);
|
|
174
|
-
const blockedStatus = normalizeStatusInput("blocked", statusRegistry);
|
|
175
|
-
const draftStatus = normalizeStatusInput("draft", statusRegistry);
|
|
176
|
-
if (inProgressStatus && normalizedStatus === inProgressStatus)
|
|
177
|
-
return 0;
|
|
178
|
-
if (openStatus && normalizedStatus === openStatus)
|
|
179
|
-
return 1;
|
|
180
|
-
if (blockedStatus && normalizedStatus === blockedStatus)
|
|
181
|
-
return 2;
|
|
182
|
-
if (draftStatus && normalizedStatus === draftStatus)
|
|
183
|
-
return 3;
|
|
184
|
-
if (statusRegistry.active_statuses.has(normalizedStatus))
|
|
185
|
-
return 4;
|
|
186
|
-
if (statusRegistry.blocked_statuses.has(normalizedStatus))
|
|
187
|
-
return 5;
|
|
188
|
-
if (statusRegistry.terminal_statuses.has(normalizedStatus))
|
|
189
|
-
return 7;
|
|
190
|
-
return 6;
|
|
191
|
-
}
|
|
192
|
-
function isClosedStatus(status, statusRegistry) {
|
|
193
|
-
const closeStatus = normalizeStatusInput("closed", statusRegistry);
|
|
194
|
-
return normalizeStatusForRegistry(status, statusRegistry) === closeStatus;
|
|
195
|
-
}
|
|
196
|
-
function isInProgressStatus(status, statusRegistry) {
|
|
197
|
-
const inProgressStatus = normalizeStatusInput("in_progress", statusRegistry);
|
|
198
|
-
return normalizeStatusForRegistry(status, statusRegistry) === inProgressStatus;
|
|
199
|
-
}
|
|
200
|
-
function isOpenStatus(status, statusRegistry) {
|
|
201
|
-
const openStatus = normalizeStatusInput("open", statusRegistry);
|
|
202
|
-
return normalizeStatusForRegistry(status, statusRegistry) === openStatus;
|
|
203
|
-
}
|
|
204
|
-
function isBlockedStatus(status, statusRegistry) {
|
|
205
|
-
return statusRegistry.blocked_statuses.has(normalizeStatusForRegistry(status, statusRegistry));
|
|
206
|
-
}
|
|
207
|
-
var LIST_PROJECTION_FLAGS = ["compact", "brief", "fields", "includeBody", "include_body", "parent"];
|
|
208
|
-
function stripListProjectionFlags(options) {
|
|
209
|
-
const copy = { ...options };
|
|
210
|
-
for (const key of LIST_PROJECTION_FLAGS) {
|
|
211
|
-
delete copy[key];
|
|
212
|
-
}
|
|
213
|
-
return copy;
|
|
214
|
-
}
|
|
215
|
-
function collectSubtreeIds(corpus, parentId) {
|
|
216
|
-
const target = parentId.trim().toLowerCase();
|
|
217
|
-
const anchor = corpus.find((item) => item.id.trim().toLowerCase() === target);
|
|
218
|
-
if (!anchor) {
|
|
219
|
-
return { ids: /* @__PURE__ */ new Set(), found: false };
|
|
220
|
-
}
|
|
221
|
-
const childrenByParent = buildChildrenByParent(corpus);
|
|
222
|
-
const descendants = collectDescendants(anchor.id, childrenByParent);
|
|
223
|
-
const ids = new Set([anchor.id, ...descendants.map((item) => item.id)].map((id) => id.trim().toLowerCase()));
|
|
224
|
-
return { ids, found: true };
|
|
225
|
-
}
|
|
226
|
-
function parseContextParent(raw) {
|
|
227
|
-
if (raw === void 0)
|
|
228
|
-
return void 0;
|
|
229
|
-
const trimmed = raw.trim();
|
|
230
|
-
if (trimmed.length === 0) {
|
|
231
|
-
throw new PmCliError("Context --parent requires an item id", EXIT_CODE.USAGE);
|
|
232
|
-
}
|
|
233
|
-
return trimmed;
|
|
234
|
-
}
|
|
235
|
-
function compareOptionalOrder(left, right) {
|
|
236
|
-
const leftValue = left ?? null;
|
|
237
|
-
const rightValue = right ?? null;
|
|
238
|
-
if (leftValue === null && rightValue === null)
|
|
239
|
-
return 0;
|
|
240
|
-
if (leftValue === null)
|
|
241
|
-
return 1;
|
|
242
|
-
if (rightValue === null)
|
|
243
|
-
return -1;
|
|
244
|
-
return leftValue - rightValue;
|
|
245
|
-
}
|
|
246
|
-
function compareOptionalDeadline(left, right) {
|
|
247
|
-
const leftValue = left ?? null;
|
|
248
|
-
const rightValue = right ?? null;
|
|
249
|
-
if (leftValue === null && rightValue === null)
|
|
250
|
-
return 0;
|
|
251
|
-
if (leftValue === null)
|
|
252
|
-
return 1;
|
|
253
|
-
if (rightValue === null)
|
|
254
|
-
return -1;
|
|
255
|
-
return compareTimestampStrings(leftValue, rightValue);
|
|
256
|
-
}
|
|
257
|
-
function daysInUtcMonth(year, monthIndex) {
|
|
258
|
-
return new Date(Date.UTC(year, monthIndex + 1, 0)).getUTCDate();
|
|
259
|
-
}
|
|
260
|
-
function hasNoInvalidDatePrefix(value) {
|
|
261
|
-
const match = LEADING_HYPHEN_DATE.exec(value) ?? LEADING_COMPACT_DATE.exec(value);
|
|
262
|
-
if (!match) {
|
|
263
|
-
return true;
|
|
264
|
-
}
|
|
265
|
-
const year = Number.parseInt(match[1], 10);
|
|
266
|
-
const month = Number.parseInt(match[2], 10);
|
|
267
|
-
const day = Number.parseInt(match[3], 10);
|
|
268
|
-
return month >= 1 && month <= 12 && day >= 1 && day <= daysInUtcMonth(year, month - 1);
|
|
269
|
-
}
|
|
270
|
-
function normalizeTimestampCandidate(value) {
|
|
271
|
-
const compactDate = COMPACT_DATE.exec(value);
|
|
272
|
-
if (compactDate) {
|
|
273
|
-
return `${compactDate[1]}-${compactDate[2]}-${compactDate[3]}`;
|
|
274
|
-
}
|
|
275
|
-
const compactDateTime = COMPACT_DATETIME.exec(value);
|
|
276
|
-
if (compactDateTime) {
|
|
277
|
-
const [, year, month, day, hour, minute, secondRaw, offsetRaw] = compactDateTime;
|
|
278
|
-
const second = secondRaw ? `:${secondRaw}` : "";
|
|
279
|
-
const offset = offsetRaw && offsetRaw.length === 5 && offsetRaw !== "Z" ? `${offsetRaw.slice(0, 3)}:${offsetRaw.slice(3)}` : offsetRaw ?? "";
|
|
280
|
-
return `${year}-${month}-${day}T${hour}:${minute}${second}${offset}`;
|
|
281
|
-
}
|
|
282
|
-
return value;
|
|
283
|
-
}
|
|
284
|
-
function parseContextTimestampMs(value) {
|
|
285
|
-
if (typeof value !== "string") {
|
|
286
|
-
return Number.NaN;
|
|
287
|
-
}
|
|
288
|
-
const trimmed = value.trim();
|
|
289
|
-
if (trimmed.length === 0 || !hasNoInvalidDatePrefix(trimmed)) {
|
|
290
|
-
return Number.NaN;
|
|
291
|
-
}
|
|
292
|
-
const parsed = Date.parse(normalizeTimestampCandidate(trimmed));
|
|
293
|
-
return Number.isFinite(parsed) ? parsed : Number.NaN;
|
|
294
|
-
}
|
|
295
|
-
function sortableTimestamp(value) {
|
|
296
|
-
const parsed = parseContextTimestampMs(value);
|
|
297
|
-
return Number.isFinite(parsed) ? new Date(parsed).toISOString() : "";
|
|
298
|
-
}
|
|
299
|
-
function dateTokenForTimestamp(value) {
|
|
300
|
-
const parsed = parseContextTimestampMs(value);
|
|
301
|
-
return Number.isFinite(parsed) ? new Date(parsed).toISOString().slice(0, 10) : "unknown";
|
|
302
|
-
}
|
|
303
|
-
function normalizedParentId(value) {
|
|
304
|
-
if (typeof value !== "string") {
|
|
305
|
-
return null;
|
|
306
|
-
}
|
|
307
|
-
const trimmed = value.trim();
|
|
308
|
-
return trimmed.length > 0 ? trimmed : null;
|
|
309
|
-
}
|
|
310
|
-
function compareCriticalItems(left, right, statusRegistry) {
|
|
311
|
-
const byStatus = statusRank(left.status, statusRegistry) - statusRank(right.status, statusRegistry);
|
|
312
|
-
if (byStatus !== 0)
|
|
313
|
-
return byStatus;
|
|
314
|
-
const byPriority = left.priority - right.priority;
|
|
315
|
-
if (byPriority !== 0)
|
|
316
|
-
return byPriority;
|
|
317
|
-
const byOrder = compareOptionalOrder(left.order, right.order);
|
|
318
|
-
if (byOrder !== 0)
|
|
319
|
-
return byOrder;
|
|
320
|
-
const byDeadline = compareOptionalDeadline(left.deadline, right.deadline);
|
|
321
|
-
if (byDeadline !== 0)
|
|
322
|
-
return byDeadline;
|
|
323
|
-
const byUpdated = compareTimestampStrings(sortableTimestamp(right.updated_at), sortableTimestamp(left.updated_at));
|
|
324
|
-
const byId = left.id.localeCompare(right.id);
|
|
325
|
-
return byUpdated !== 0 ? byUpdated : byId;
|
|
326
|
-
}
|
|
327
|
-
function completionPct(closed, total) {
|
|
328
|
-
return total > 0 ? Math.round(closed / total * 100) : 0;
|
|
329
|
-
}
|
|
330
|
-
function buildChildrenByParent(allItems) {
|
|
331
|
-
const childrenByParent = /* @__PURE__ */ new Map();
|
|
332
|
-
for (const item of allItems) {
|
|
333
|
-
const parent = normalizedParentId(item.parent);
|
|
334
|
-
if (!parent)
|
|
335
|
-
continue;
|
|
336
|
-
const children = childrenByParent.get(parent) ?? [];
|
|
337
|
-
children.push(item);
|
|
338
|
-
childrenByParent.set(parent, children);
|
|
339
|
-
}
|
|
340
|
-
return childrenByParent;
|
|
341
|
-
}
|
|
342
|
-
function toContextFocusItem(item, statusRegistry, childrenByParent) {
|
|
343
|
-
const focus = {
|
|
344
|
-
id: item.id,
|
|
345
|
-
title: item.title,
|
|
346
|
-
type: item.type,
|
|
347
|
-
status: item.status,
|
|
348
|
-
priority: item.priority,
|
|
349
|
-
order: item.order ?? null,
|
|
350
|
-
deadline: item.deadline ?? null,
|
|
351
|
-
assignee: item.assignee ?? null,
|
|
352
|
-
tags: Array.isArray(item.tags) ? [...item.tags] : [],
|
|
353
|
-
updated_at: item.updated_at,
|
|
354
|
-
parent: normalizedParentId(item.parent)
|
|
355
|
-
};
|
|
356
|
-
if (statusRegistry && childrenByParent) {
|
|
357
|
-
const descendants = collectDescendants(item.id, childrenByParent);
|
|
358
|
-
const total = descendants.length;
|
|
359
|
-
if (total > 0) {
|
|
360
|
-
const closed = descendants.filter((desc) => isClosedStatus(desc.status, statusRegistry)).length;
|
|
361
|
-
focus.children_total = total;
|
|
362
|
-
focus.children_closed = closed;
|
|
363
|
-
focus.completion_pct = completionPct(closed, total);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
return focus;
|
|
367
|
-
}
|
|
368
|
-
function summarizeAgenda(events) {
|
|
369
|
-
let deadlines = 0;
|
|
370
|
-
let reminders = 0;
|
|
371
|
-
let scheduled = 0;
|
|
372
|
-
const itemIds = /* @__PURE__ */ new Set();
|
|
373
|
-
for (const event of events) {
|
|
374
|
-
itemIds.add(event.item_id);
|
|
375
|
-
if (event.kind === "deadline") {
|
|
376
|
-
deadlines += 1;
|
|
377
|
-
continue;
|
|
378
|
-
}
|
|
379
|
-
if (event.kind === "reminder") {
|
|
380
|
-
reminders += 1;
|
|
381
|
-
continue;
|
|
382
|
-
}
|
|
383
|
-
scheduled += 1;
|
|
384
|
-
}
|
|
385
|
-
return {
|
|
386
|
-
events: events.length,
|
|
387
|
-
items: itemIds.size,
|
|
388
|
-
deadlines,
|
|
389
|
-
reminders,
|
|
390
|
-
scheduled
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
function mergeSortedWarnings(...warningGroups) {
|
|
394
|
-
return [...new Set(warningGroups.flatMap((group) => group ?? []))].sort((left, right) => left.localeCompare(right));
|
|
395
|
-
}
|
|
396
|
-
function filterTerminalCalendarEvents(events, statusRegistry) {
|
|
397
|
-
return events.filter((event) => !statusRegistry.terminal_statuses.has(normalizeStatusForRegistry(event.item_status, statusRegistry)));
|
|
398
|
-
}
|
|
399
|
-
function buildHierarchy(allItems, activeItems, statusRegistry, limit) {
|
|
400
|
-
const itemMap = /* @__PURE__ */ new Map();
|
|
401
|
-
for (const item of allItems) {
|
|
402
|
-
itemMap.set(item.id, item);
|
|
403
|
-
}
|
|
404
|
-
const childrenByParent = buildChildrenByParent(allItems);
|
|
405
|
-
const activeHighLevelIds = new Set(activeItems.filter((item) => HIGH_LEVEL_TYPES.has(item.type)).map((item) => item.id));
|
|
406
|
-
const nodes = [];
|
|
407
|
-
for (const parentId of activeHighLevelIds) {
|
|
408
|
-
const parent = itemMap.get(parentId);
|
|
409
|
-
if (!parent)
|
|
410
|
-
continue;
|
|
411
|
-
const allDescendants = collectDescendants(parentId, childrenByParent);
|
|
412
|
-
const childItems = childrenByParent.get(parentId) ?? [];
|
|
413
|
-
let closedCount = 0;
|
|
414
|
-
let openCount = 0;
|
|
415
|
-
let inProgressCount = 0;
|
|
416
|
-
let blockedCount = 0;
|
|
417
|
-
for (const desc of allDescendants) {
|
|
418
|
-
if (isClosedStatus(desc.status, statusRegistry))
|
|
419
|
-
closedCount++;
|
|
420
|
-
else if (isInProgressStatus(desc.status, statusRegistry))
|
|
421
|
-
inProgressCount++;
|
|
422
|
-
else if (isBlockedStatus(desc.status, statusRegistry))
|
|
423
|
-
blockedCount++;
|
|
424
|
-
else if (isOpenStatus(desc.status, statusRegistry))
|
|
425
|
-
openCount++;
|
|
426
|
-
}
|
|
427
|
-
const children = childItems.sort((a, b) => compareCriticalItems(a, b, statusRegistry)).slice(0, limit).map((child) => {
|
|
428
|
-
const grandchildren = collectDescendants(child.id, childrenByParent);
|
|
429
|
-
const gcClosed = grandchildren.filter((gc) => isClosedStatus(gc.status, statusRegistry)).length;
|
|
430
|
-
return {
|
|
431
|
-
id: child.id,
|
|
432
|
-
title: child.title,
|
|
433
|
-
type: child.type,
|
|
434
|
-
status: child.status,
|
|
435
|
-
children_total: grandchildren.length,
|
|
436
|
-
children_closed: gcClosed
|
|
437
|
-
};
|
|
438
|
-
});
|
|
439
|
-
nodes.push({
|
|
440
|
-
id: parent.id,
|
|
441
|
-
title: parent.title,
|
|
442
|
-
type: parent.type,
|
|
443
|
-
status: parent.status,
|
|
444
|
-
children_total: allDescendants.length,
|
|
445
|
-
children_closed: closedCount,
|
|
446
|
-
children_open: openCount,
|
|
447
|
-
children_in_progress: inProgressCount,
|
|
448
|
-
children_blocked: blockedCount,
|
|
449
|
-
children
|
|
450
|
-
});
|
|
451
|
-
}
|
|
452
|
-
return nodes.sort((a, b) => {
|
|
453
|
-
const aParent = itemMap.get(a.id);
|
|
454
|
-
const bParent = itemMap.get(b.id);
|
|
455
|
-
return compareCriticalItems(aParent, bParent, statusRegistry);
|
|
456
|
-
}).slice(0, limit);
|
|
457
|
-
}
|
|
458
|
-
function collectDescendants(parentId, childrenByParent) {
|
|
459
|
-
const result = [];
|
|
460
|
-
const stack = [parentId];
|
|
461
|
-
const visited = /* @__PURE__ */ new Set();
|
|
462
|
-
while (stack.length > 0) {
|
|
463
|
-
const current = stack.pop();
|
|
464
|
-
if (visited.has(current))
|
|
465
|
-
continue;
|
|
466
|
-
visited.add(current);
|
|
467
|
-
const children = childrenByParent.get(current) ?? [];
|
|
468
|
-
for (const child of children) {
|
|
469
|
-
result.push(child);
|
|
470
|
-
stack.push(child.id);
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
return result;
|
|
474
|
-
}
|
|
475
|
-
var _testOnly = {
|
|
476
|
-
buildActivity,
|
|
477
|
-
buildBlockers,
|
|
478
|
-
buildChildrenByParent,
|
|
479
|
-
buildHierarchy,
|
|
480
|
-
buildHotFiles,
|
|
481
|
-
buildProgress,
|
|
482
|
-
buildRecentlyCreated,
|
|
483
|
-
buildStaleness,
|
|
484
|
-
buildTestHealth,
|
|
485
|
-
buildUnparented,
|
|
486
|
-
buildWorkload,
|
|
487
|
-
collectDescendants,
|
|
488
|
-
collectSubtreeIds,
|
|
489
|
-
compareCriticalItems,
|
|
490
|
-
compareOptionalDeadline,
|
|
491
|
-
compareOptionalOrder,
|
|
492
|
-
completionPct,
|
|
493
|
-
dateTokenForTimestamp,
|
|
494
|
-
filterTerminalCalendarEvents,
|
|
495
|
-
isBlockedStatus,
|
|
496
|
-
isClosedStatus,
|
|
497
|
-
isInProgressStatus,
|
|
498
|
-
isOpenStatus,
|
|
499
|
-
mergeSortedWarnings,
|
|
500
|
-
normalizedParentId,
|
|
501
|
-
parseActivityLimit,
|
|
502
|
-
parseContextLimit,
|
|
503
|
-
parseContextParent,
|
|
504
|
-
parseContextTimestampMs,
|
|
505
|
-
parseStaleThresholdDays,
|
|
506
|
-
sortableTimestamp,
|
|
507
|
-
statusRank,
|
|
508
|
-
stripListProjectionFlags,
|
|
509
|
-
summarizeAgenda,
|
|
510
|
-
toContextFocusItem
|
|
511
|
-
};
|
|
512
|
-
async function buildActivity(activityLimit, global) {
|
|
513
|
-
const result = await runActivity({ compact: true, limit: String(activityLimit) }, global);
|
|
514
|
-
return result.compact_activity ?? [];
|
|
515
|
-
}
|
|
516
|
-
function buildProgress(allItems, activeItems, statusRegistry, limit) {
|
|
517
|
-
const childrenByParent = /* @__PURE__ */ new Map();
|
|
518
|
-
for (const item of allItems) {
|
|
519
|
-
if (!item.parent)
|
|
520
|
-
continue;
|
|
521
|
-
const children = childrenByParent.get(item.parent) ?? [];
|
|
522
|
-
children.push(item);
|
|
523
|
-
childrenByParent.set(item.parent, children);
|
|
524
|
-
}
|
|
525
|
-
const activeHighLevel = activeItems.filter((item) => HIGH_LEVEL_TYPES.has(item.type));
|
|
526
|
-
const entries = [];
|
|
527
|
-
for (const parent of activeHighLevel) {
|
|
528
|
-
const descendants = collectDescendants(parent.id, childrenByParent);
|
|
529
|
-
const total = descendants.length;
|
|
530
|
-
if (total === 0)
|
|
531
|
-
continue;
|
|
532
|
-
let closed = 0;
|
|
533
|
-
let open = 0;
|
|
534
|
-
let inProgress = 0;
|
|
535
|
-
let blocked = 0;
|
|
536
|
-
for (const desc of descendants) {
|
|
537
|
-
if (isClosedStatus(desc.status, statusRegistry))
|
|
538
|
-
closed++;
|
|
539
|
-
else if (isInProgressStatus(desc.status, statusRegistry))
|
|
540
|
-
inProgress++;
|
|
541
|
-
else if (isBlockedStatus(desc.status, statusRegistry))
|
|
542
|
-
blocked++;
|
|
543
|
-
else if (isOpenStatus(desc.status, statusRegistry))
|
|
544
|
-
open++;
|
|
545
|
-
}
|
|
546
|
-
entries.push({
|
|
547
|
-
id: parent.id,
|
|
548
|
-
title: parent.title,
|
|
549
|
-
type: parent.type,
|
|
550
|
-
total,
|
|
551
|
-
closed,
|
|
552
|
-
open,
|
|
553
|
-
in_progress: inProgress,
|
|
554
|
-
blocked,
|
|
555
|
-
completion_pct: completionPct(closed, total)
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
return entries.sort((a, b) => a.completion_pct - b.completion_pct).slice(0, limit);
|
|
559
|
-
}
|
|
560
|
-
function buildBlockers(blockedItems, itemMap, limit) {
|
|
561
|
-
return blockedItems.slice(0, limit).map((item) => {
|
|
562
|
-
const blockerItem = item.blocked_by ? itemMap.get(item.blocked_by) : void 0;
|
|
563
|
-
return {
|
|
564
|
-
id: item.id,
|
|
565
|
-
title: item.title,
|
|
566
|
-
blocked_by: item.blocked_by ?? null,
|
|
567
|
-
blocked_by_title: blockerItem?.title ?? null,
|
|
568
|
-
blocked_by_status: blockerItem?.status ?? null,
|
|
569
|
-
blocked_reason: item.blocked_reason ?? null,
|
|
570
|
-
unblock_note: item.unblock_note ?? null
|
|
571
|
-
};
|
|
572
|
-
});
|
|
573
|
-
}
|
|
574
|
-
function buildHotFiles(activeItems, limit) {
|
|
575
|
-
const fileMap = /* @__PURE__ */ new Map();
|
|
576
|
-
for (const item of activeItems) {
|
|
577
|
-
for (const file of item.files ?? []) {
|
|
578
|
-
const existing = fileMap.get(file.path) ?? /* @__PURE__ */ new Set();
|
|
579
|
-
existing.add(item.id);
|
|
580
|
-
fileMap.set(file.path, existing);
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
return [...fileMap.entries()].map(([filePath, itemIds]) => ({
|
|
584
|
-
path: filePath,
|
|
585
|
-
references: itemIds.size,
|
|
586
|
-
items: [...itemIds].sort()
|
|
587
|
-
})).sort((a, b) => b.references - a.references).slice(0, limit);
|
|
588
|
-
}
|
|
589
|
-
function buildWorkload(activeItems, statusRegistry, limit) {
|
|
590
|
-
const groups = /* @__PURE__ */ new Map();
|
|
591
|
-
for (const item of activeItems) {
|
|
592
|
-
const key = item.assignee ?? null;
|
|
593
|
-
const existing = groups.get(key) ?? [];
|
|
594
|
-
existing.push(item);
|
|
595
|
-
groups.set(key, existing);
|
|
596
|
-
}
|
|
597
|
-
return [...groups.entries()].map(([assignee, items]) => ({
|
|
598
|
-
assignee,
|
|
599
|
-
active: items.length,
|
|
600
|
-
in_progress: items.filter((item) => isInProgressStatus(item.status, statusRegistry)).length,
|
|
601
|
-
items: items.map((item) => item.id).sort()
|
|
602
|
-
})).sort((a, b) => b.active - a.active).slice(0, limit);
|
|
603
|
-
}
|
|
604
|
-
function buildStaleness(allNonTerminal, staleThresholdDays, now, limit) {
|
|
605
|
-
const cutoffMs = new Date(now).getTime() - staleThresholdDays * 24 * 60 * 60 * 1e3;
|
|
606
|
-
return allNonTerminal.filter((item) => new Date(item.updated_at).getTime() < cutoffMs).map((item) => ({
|
|
607
|
-
id: item.id,
|
|
608
|
-
title: item.title,
|
|
609
|
-
status: item.status,
|
|
610
|
-
updated_at: item.updated_at,
|
|
611
|
-
stale_days: Math.floor((new Date(now).getTime() - new Date(item.updated_at).getTime()) / (24 * 60 * 60 * 1e3))
|
|
612
|
-
})).sort((a, b) => b.stale_days - a.stale_days).slice(0, limit);
|
|
613
|
-
}
|
|
614
|
-
function buildRecentlyCreated(allNonTerminal, statusRegistry, childrenByParent, limit) {
|
|
615
|
-
return allNonTerminal.map((item) => ({ item, sortKey: sortableTimestamp(item.created_at) })).sort((left, right) => {
|
|
616
|
-
const byCreated = compareTimestampStrings(right.sortKey, left.sortKey);
|
|
617
|
-
return byCreated !== 0 ? byCreated : left.item.id.localeCompare(right.item.id);
|
|
618
|
-
}).slice(0, limit).map(({ item }) => ({
|
|
619
|
-
...toContextFocusItem(item, statusRegistry, childrenByParent),
|
|
620
|
-
created_at: item.created_at
|
|
621
|
-
}));
|
|
622
|
-
}
|
|
623
|
-
function buildUnparented(allNonTerminal, statusRegistry, childrenByParent, limit) {
|
|
624
|
-
return allNonTerminal.filter((item) => !normalizedParentId(item.parent) && !HIGH_LEVEL_TYPES.has(item.type)).sort((left, right) => compareCriticalItems(left, right, statusRegistry)).slice(0, limit).map((item) => toContextFocusItem(item, statusRegistry, childrenByParent));
|
|
625
|
-
}
|
|
626
|
-
function buildTestHealth(activeItems) {
|
|
627
|
-
let itemsWithTests = 0;
|
|
628
|
-
let itemsWithRecentRuns = 0;
|
|
629
|
-
let passed = 0;
|
|
630
|
-
let failed = 0;
|
|
631
|
-
let skipped = 0;
|
|
632
|
-
const itemsFailing = [];
|
|
633
|
-
for (const item of activeItems) {
|
|
634
|
-
if ((item.tests ?? []).length > 0) {
|
|
635
|
-
itemsWithTests++;
|
|
636
|
-
}
|
|
637
|
-
const runs = item.test_runs ?? [];
|
|
638
|
-
if (runs.length > 0) {
|
|
639
|
-
itemsWithRecentRuns++;
|
|
640
|
-
let itemHasFailure = false;
|
|
641
|
-
for (const run of runs) {
|
|
642
|
-
passed += run.passed ?? 0;
|
|
643
|
-
failed += run.failed ?? 0;
|
|
644
|
-
skipped += run.skipped ?? 0;
|
|
645
|
-
if ((run.failed ?? 0) > 0) {
|
|
646
|
-
itemHasFailure = true;
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
if (itemHasFailure) {
|
|
650
|
-
itemsFailing.push(item.id);
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
return {
|
|
655
|
-
items_with_tests: itemsWithTests,
|
|
656
|
-
items_with_recent_runs: itemsWithRecentRuns,
|
|
657
|
-
recent_runs: { passed, failed, skipped },
|
|
658
|
-
items_failing: itemsFailing.sort()
|
|
659
|
-
};
|
|
660
|
-
}
|
|
661
|
-
function formatClock(timestamp) {
|
|
662
|
-
return `${new Date(timestamp).toISOString().slice(11, 16)}Z`;
|
|
663
|
-
}
|
|
664
|
-
function formatFocusLine(item) {
|
|
665
|
-
const orderToken = item.order === null ? "-" : String(item.order);
|
|
666
|
-
const deadlineToken = item.deadline ?? "-";
|
|
667
|
-
const parentToken = item.parent ? ` parent:${item.parent}` : "";
|
|
668
|
-
const progressToken = item.children_total !== void 0 && item.children_closed !== void 0 && item.completion_pct !== void 0 ? ` children:${item.children_closed}/${item.children_total} done:${item.completion_pct}%` : "";
|
|
669
|
-
return `${item.id} p${item.priority} ${item.status} ${item.type} order:${orderToken} deadline:${deadlineToken}${parentToken}${progressToken} ${item.title}`;
|
|
670
|
-
}
|
|
671
|
-
function formatProjectedFocusLine(item, fields) {
|
|
672
|
-
const source = item;
|
|
673
|
-
return fields.map((field) => {
|
|
674
|
-
const value = source[field];
|
|
675
|
-
if (Array.isArray(value))
|
|
676
|
-
return `${field}:${value.join(",")}`;
|
|
677
|
-
return `${field}:${value ?? "-"}`;
|
|
678
|
-
}).join(" ");
|
|
679
|
-
}
|
|
680
|
-
function formatAgendaLine(event) {
|
|
681
|
-
const base = `${formatClock(event.at)} [${event.kind}] ${event.item_id} p${event.item_priority} ${event.item_status} ${event.item_title}`;
|
|
682
|
-
if (event.kind === "reminder") {
|
|
683
|
-
return `${base} \u2014 ${event.reminder_text}`;
|
|
684
|
-
}
|
|
685
|
-
if (event.kind === "event") {
|
|
686
|
-
const recurringSuffix = event.event_recurring ? " (recurring)" : "";
|
|
687
|
-
const title = event.event_title ?? event.item_title;
|
|
688
|
-
return `${base} \u2014 ${title}${recurringSuffix}`;
|
|
689
|
-
}
|
|
690
|
-
return base;
|
|
691
|
-
}
|
|
692
|
-
function pushContextFocusSection(lines, title, rows, emptyText, renderFocus) {
|
|
693
|
-
lines.push(`## ${title}`);
|
|
694
|
-
if (rows.length === 0) {
|
|
695
|
-
lines.push(emptyText);
|
|
696
|
-
} else {
|
|
697
|
-
for (const item of rows) {
|
|
698
|
-
lines.push(`- ${renderFocus(item)}`);
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
lines.push("");
|
|
702
|
-
}
|
|
703
|
-
function pushBlockedFallbackSection(lines, result, renderFocus) {
|
|
704
|
-
if (result.blocked_fallback.length === 0) {
|
|
705
|
-
return;
|
|
706
|
-
}
|
|
707
|
-
lines.push("## Blocked fallback");
|
|
708
|
-
for (const item of result.blocked_fallback) {
|
|
709
|
-
lines.push(`- ${renderFocus(item)}`);
|
|
710
|
-
}
|
|
711
|
-
lines.push("");
|
|
712
|
-
}
|
|
713
|
-
function pushAgendaSection(lines, result) {
|
|
714
|
-
lines.push("## Agenda");
|
|
715
|
-
lines.push(`- events: ${result.agenda.summary.events} (deadlines: ${result.agenda.summary.deadlines}, reminders: ${result.agenda.summary.reminders}, scheduled: ${result.agenda.summary.scheduled})`);
|
|
716
|
-
if (result.agenda.events.length === 0) {
|
|
717
|
-
lines.push("No agenda events matched the selected filters.");
|
|
718
|
-
} else {
|
|
719
|
-
for (const event of result.agenda.events) {
|
|
720
|
-
lines.push(`- ${formatAgendaLine(event)}`);
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
lines.push("");
|
|
724
|
-
}
|
|
725
|
-
function pushHierarchySection(lines, result) {
|
|
726
|
-
if (!result.hierarchy || result.hierarchy.length === 0) {
|
|
727
|
-
return;
|
|
728
|
-
}
|
|
729
|
-
lines.push("## Hierarchy");
|
|
730
|
-
for (const node of result.hierarchy) {
|
|
731
|
-
const pct = node.children_total > 0 ? Math.round(node.children_closed / node.children_total * 100) : 0;
|
|
732
|
-
lines.push(`- ${node.id} ${node.type} ${node.status} "${node.title}" [${node.children_closed}/${node.children_total} done ${pct}%]`);
|
|
733
|
-
for (const child of node.children) {
|
|
734
|
-
const cpct = child.children_total > 0 ? Math.round(child.children_closed / child.children_total * 100) : 0;
|
|
735
|
-
lines.push(` - ${child.id} ${child.type} ${child.status} "${child.title}" [${child.children_closed}/${child.children_total} done ${cpct}%]`);
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
lines.push("");
|
|
739
|
-
}
|
|
740
|
-
function pushProgressSection(lines, result) {
|
|
741
|
-
if (!result.progress || result.progress.length === 0) {
|
|
742
|
-
return;
|
|
743
|
-
}
|
|
744
|
-
lines.push("## Progress");
|
|
745
|
-
for (const entry of result.progress) {
|
|
746
|
-
lines.push(`- ${entry.id} "${entry.title}" ${entry.completion_pct}% (${entry.closed}/${entry.total} closed, ${entry.in_progress} wip, ${entry.open} open, ${entry.blocked} blocked)`);
|
|
747
|
-
}
|
|
748
|
-
lines.push("");
|
|
749
|
-
}
|
|
750
|
-
function pushRecentlyCreatedSection(lines, result, focusFields, renderFocus) {
|
|
751
|
-
if (!result.recently_created || result.recently_created.length === 0) {
|
|
752
|
-
return;
|
|
753
|
-
}
|
|
754
|
-
lines.push("## Recently created");
|
|
755
|
-
for (const item of result.recently_created) {
|
|
756
|
-
lines.push(focusFields ? `- ${renderFocus(item)}` : `- ${dateTokenForTimestamp(item.created_at)} ${formatFocusLine(item)}`);
|
|
757
|
-
}
|
|
758
|
-
lines.push("");
|
|
759
|
-
}
|
|
760
|
-
function pushUnparentedSection(lines, result, renderFocus) {
|
|
761
|
-
if (!result.unparented || result.unparented.length === 0) {
|
|
762
|
-
return;
|
|
763
|
-
}
|
|
764
|
-
lines.push("## Unparented");
|
|
765
|
-
for (const item of result.unparented) {
|
|
766
|
-
lines.push(`- ${renderFocus(item)}`);
|
|
767
|
-
}
|
|
768
|
-
lines.push("");
|
|
769
|
-
}
|
|
770
|
-
function pushActivitySection(lines, result) {
|
|
771
|
-
if (!result.activity || result.activity.length === 0) {
|
|
772
|
-
return;
|
|
773
|
-
}
|
|
774
|
-
lines.push("## Recent activity");
|
|
775
|
-
for (const entry of result.activity) {
|
|
776
|
-
const msg = entry.msg ? ` ${entry.msg}` : "";
|
|
777
|
-
lines.push(`- ${entry.ts.slice(0, 16)}Z ${entry.id} ${entry.op} by:${entry.author}${msg}`);
|
|
778
|
-
}
|
|
779
|
-
lines.push("");
|
|
780
|
-
}
|
|
781
|
-
function pushBlockersSection(lines, result) {
|
|
782
|
-
if (!result.blockers || result.blockers.length === 0) {
|
|
783
|
-
return;
|
|
784
|
-
}
|
|
785
|
-
lines.push("## Blockers");
|
|
786
|
-
for (const entry of result.blockers) {
|
|
787
|
-
const by = entry.blocked_by ? `blocked_by:${entry.blocked_by}(${entry.blocked_by_status ?? "?"})` : "blocked_by:-";
|
|
788
|
-
const reason = entry.blocked_reason ? ` reason:"${entry.blocked_reason}"` : "";
|
|
789
|
-
const note = entry.unblock_note ? ` unblock:"${entry.unblock_note}"` : "";
|
|
790
|
-
lines.push(`- ${entry.id} "${entry.title}" ${by}${reason}${note}`);
|
|
791
|
-
}
|
|
792
|
-
lines.push("");
|
|
793
|
-
}
|
|
794
|
-
function pushFilesSection(lines, result) {
|
|
795
|
-
if (!result.files || result.files.length === 0) {
|
|
796
|
-
return;
|
|
797
|
-
}
|
|
798
|
-
lines.push("## Hot files");
|
|
799
|
-
for (const file of result.files) {
|
|
800
|
-
lines.push(`- ${file.path} refs:${file.references} items:[${file.items.join(",")}]`);
|
|
801
|
-
}
|
|
802
|
-
lines.push("");
|
|
803
|
-
}
|
|
804
|
-
function pushWorkloadSection(lines, result) {
|
|
805
|
-
if (!result.workload || result.workload.length === 0) {
|
|
806
|
-
return;
|
|
807
|
-
}
|
|
808
|
-
lines.push("## Workload");
|
|
809
|
-
for (const entry of result.workload) {
|
|
810
|
-
const who = entry.assignee ?? "(unassigned)";
|
|
811
|
-
lines.push(`- ${who} active:${entry.active} wip:${entry.in_progress} items:[${entry.items.join(",")}]`);
|
|
812
|
-
}
|
|
813
|
-
lines.push("");
|
|
814
|
-
}
|
|
815
|
-
function pushStalenessSection(lines, result) {
|
|
816
|
-
if (!result.staleness || result.staleness.length === 0) {
|
|
817
|
-
return;
|
|
818
|
-
}
|
|
819
|
-
lines.push("## Stale items");
|
|
820
|
-
for (const entry of result.staleness) {
|
|
821
|
-
lines.push(`- ${entry.id} ${entry.status} stale:${entry.stale_days}d last:${entry.updated_at.slice(0, 10)} "${entry.title}"`);
|
|
822
|
-
}
|
|
823
|
-
lines.push("");
|
|
824
|
-
}
|
|
825
|
-
function pushTestHealthSection(lines, result) {
|
|
826
|
-
if (!result.tests) {
|
|
827
|
-
return;
|
|
828
|
-
}
|
|
829
|
-
lines.push("## Test health");
|
|
830
|
-
lines.push(`- items_with_tests: ${result.tests.items_with_tests}`);
|
|
831
|
-
lines.push(`- items_with_recent_runs: ${result.tests.items_with_recent_runs}`);
|
|
832
|
-
lines.push(`- passed: ${result.tests.recent_runs.passed}, failed: ${result.tests.recent_runs.failed}, skipped: ${result.tests.recent_runs.skipped}`);
|
|
833
|
-
if (result.tests.items_failing.length > 0) {
|
|
834
|
-
lines.push(`- items_failing: [${result.tests.items_failing.join(",")}]`);
|
|
835
|
-
}
|
|
836
|
-
lines.push("");
|
|
837
|
-
}
|
|
838
|
-
function pushEmptyContextSuggestions(lines, result) {
|
|
839
|
-
const isEmpty = result.summary.active_items === 0 && result.summary.blocked === 0 && result.agenda.summary.events === 0;
|
|
840
|
-
if (!isEmpty) {
|
|
841
|
-
return;
|
|
842
|
-
}
|
|
843
|
-
lines.push("## Suggestions");
|
|
844
|
-
lines.push("No active work items or upcoming events. Consider:");
|
|
845
|
-
lines.push('- `pm create --type Task --title "..."` to add a new work item');
|
|
846
|
-
lines.push("- `pm list --status closed --limit 5` to review recent completions");
|
|
847
|
-
lines.push("- `pm search <keywords>` to find related past work");
|
|
848
|
-
lines.push("- `pm aggregate` for a full project status overview");
|
|
849
|
-
}
|
|
850
|
-
function renderContextMarkdown(result) {
|
|
851
|
-
const lines = [];
|
|
852
|
-
const focusFields = result.focus_fields;
|
|
853
|
-
const renderFocus = (item) => focusFields ? formatProjectedFocusLine(item, focusFields) : formatFocusLine(item);
|
|
854
|
-
lines.push("# pm context");
|
|
855
|
-
lines.push("");
|
|
856
|
-
lines.push(`- now: ${result.now}`);
|
|
857
|
-
lines.push(`- depth: ${result.depth}`);
|
|
858
|
-
if (result.filters.parent) {
|
|
859
|
-
lines.push(`- scope: subtree of ${result.filters.parent}`);
|
|
860
|
-
}
|
|
861
|
-
lines.push(`- active_items: ${result.summary.active_items} (in_progress: ${result.summary.in_progress}, open: ${result.summary.open})`);
|
|
862
|
-
if (result.summary.total_items !== void 0) {
|
|
863
|
-
lines.push(`- total_items: ${result.summary.total_items} (closed: ${result.summary.closed ?? 0}, canceled: ${result.summary.canceled ?? 0})`);
|
|
864
|
-
}
|
|
865
|
-
lines.push(`- agenda_events: ${result.summary.agenda_events}`);
|
|
866
|
-
lines.push(`- blocked_fallback_used: ${result.summary.blocked_fallback_used}`);
|
|
867
|
-
const renderedSections = result.sections_included.filter((section) => section !== "blockers" || (result.blockers?.length ?? 0) > 0);
|
|
868
|
-
if (renderedSections.length > 0) {
|
|
869
|
-
lines.push(`- sections: ${renderedSections.join(", ")}`);
|
|
870
|
-
}
|
|
871
|
-
lines.push("");
|
|
872
|
-
pushContextFocusSection(lines, "High-level focus", result.high_level, "No high-level active items.", renderFocus);
|
|
873
|
-
pushContextFocusSection(lines, "Low-level focus", result.low_level, "No low-level active items.", renderFocus);
|
|
874
|
-
pushBlockedFallbackSection(lines, result, renderFocus);
|
|
875
|
-
pushAgendaSection(lines, result);
|
|
876
|
-
pushHierarchySection(lines, result);
|
|
877
|
-
pushProgressSection(lines, result);
|
|
878
|
-
pushRecentlyCreatedSection(lines, result, focusFields, renderFocus);
|
|
879
|
-
pushUnparentedSection(lines, result, renderFocus);
|
|
880
|
-
pushActivitySection(lines, result);
|
|
881
|
-
pushBlockersSection(lines, result);
|
|
882
|
-
pushFilesSection(lines, result);
|
|
883
|
-
pushWorkloadSection(lines, result);
|
|
884
|
-
pushStalenessSection(lines, result);
|
|
885
|
-
pushTestHealthSection(lines, result);
|
|
886
|
-
pushEmptyContextSuggestions(lines, result);
|
|
887
|
-
return lines.join("\n");
|
|
888
|
-
}
|
|
889
|
-
async function resolveContextRuntime(options, global) {
|
|
890
|
-
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
891
|
-
const settings = await readSettings(pmRoot);
|
|
892
|
-
const contextSettings = settings.context ?? SETTINGS_DEFAULTS.context;
|
|
893
|
-
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
894
|
-
const depth = parseContextDepth(options.depth, contextSettings);
|
|
895
|
-
return {
|
|
896
|
-
settings,
|
|
897
|
-
contextSettings,
|
|
898
|
-
statusRegistry,
|
|
899
|
-
depth,
|
|
900
|
-
limit: parseContextLimit(options.limit, depth),
|
|
901
|
-
sectionsIncluded: parseContextSections(options.section, depth, contextSettings),
|
|
902
|
-
activityLimit: parseActivityLimit(options.activityLimit, contextSettings),
|
|
903
|
-
staleThresholdDays: parseStaleThresholdDays(options.staleThreshold, contextSettings),
|
|
904
|
-
parentScope: parseContextParent(options.parent),
|
|
905
|
-
focusFields: parseContextFocusFields(options.fields),
|
|
906
|
-
baseListOptions: stripListProjectionFlags(options)
|
|
907
|
-
};
|
|
908
|
-
}
|
|
909
|
-
function contextNeedsAllItems(sectionsIncluded) {
|
|
910
|
-
return sectionsIncluded.some((section) => ["hierarchy", "progress", "blockers", "staleness", "recently_created", "unparented"].includes(section));
|
|
911
|
-
}
|
|
912
|
-
function buildUnpaginatedContextListOptions(baseListOptions, extra) {
|
|
913
|
-
return {
|
|
914
|
-
...baseListOptions,
|
|
915
|
-
...extra,
|
|
916
|
-
noTruncate: true,
|
|
917
|
-
limit: void 0,
|
|
918
|
-
offset: void 0
|
|
919
|
-
};
|
|
920
|
-
}
|
|
921
|
-
async function loadContextCorpus(options, global, runtime) {
|
|
922
|
-
const needsAllItems = contextNeedsAllItems(runtime.sectionsIncluded);
|
|
923
|
-
const listOptions = runtime.parentScope === void 0 ? { ...runtime.baseListOptions, excludeTerminal: true } : buildUnpaginatedContextListOptions(runtime.baseListOptions, { excludeTerminal: true });
|
|
924
|
-
const listed = await runList(void 0, listOptions, global);
|
|
925
|
-
let listedFrontMatter = listed.items;
|
|
926
|
-
let allItems = listedFrontMatter;
|
|
927
|
-
if (needsAllItems || runtime.parentScope !== void 0) {
|
|
928
|
-
const allListed = await runList(void 0, buildUnpaginatedContextListOptions(runtime.baseListOptions, { excludeTerminal: false }), global);
|
|
929
|
-
allItems = allListed.items;
|
|
930
|
-
}
|
|
931
|
-
const fullCorpus = allItems;
|
|
932
|
-
const subtreeIds = resolveContextSubtreeIds(runtime.parentScope, fullCorpus);
|
|
933
|
-
if (subtreeIds) {
|
|
934
|
-
listedFrontMatter = listedFrontMatter.filter((item) => subtreeIds.has(item.id.trim().toLowerCase()));
|
|
935
|
-
allItems = allItems.filter((item) => subtreeIds.has(item.id.trim().toLowerCase()));
|
|
936
|
-
}
|
|
937
|
-
return { listed, listedFrontMatter, allItems, fullCorpus, subtreeIds };
|
|
938
|
-
}
|
|
939
|
-
function resolveContextSubtreeIds(parentScope, fullCorpus) {
|
|
940
|
-
if (parentScope === void 0) {
|
|
941
|
-
return void 0;
|
|
942
|
-
}
|
|
943
|
-
const subtree = collectSubtreeIds(fullCorpus, parentScope);
|
|
944
|
-
if (!subtree.found) {
|
|
945
|
-
throw new PmCliError(`Context --parent item not found: ${parentScope}`, EXIT_CODE.NOT_FOUND);
|
|
946
|
-
}
|
|
947
|
-
return subtree.ids;
|
|
948
|
-
}
|
|
949
|
-
function resolveContextFocusGroups(listedFrontMatter, allItems, statusRegistry, sectionsIncluded, limit) {
|
|
950
|
-
const ranked = [...listedFrontMatter].sort((left, right) => compareCriticalItems(left, right, statusRegistry));
|
|
951
|
-
const activeStatuses = statusRegistry.active_statuses;
|
|
952
|
-
const activeItems = ranked.filter((item) => activeStatuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
|
|
953
|
-
const blockedItems = ranked.filter((item) => statusRegistry.blocked_statuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
|
|
954
|
-
const childrenByParent = buildChildrenByParent(allItems);
|
|
955
|
-
const focusChildrenByParent = contextNeedsAllItems(sectionsIncluded) ? childrenByParent : void 0;
|
|
956
|
-
const highLevel = activeItems.filter((item) => HIGH_LEVEL_TYPES.has(item.type)).slice(0, limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent));
|
|
957
|
-
const lowLevel = activeItems.filter((item) => !HIGH_LEVEL_TYPES.has(item.type)).slice(0, limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent));
|
|
958
|
-
const blockedFallbackUsed = activeItems.length === 0;
|
|
959
|
-
return {
|
|
960
|
-
activeItems,
|
|
961
|
-
blockedItems,
|
|
962
|
-
highLevel,
|
|
963
|
-
lowLevel,
|
|
964
|
-
blockedFallback: blockedFallbackUsed ? blockedItems.slice(0, limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent)) : [],
|
|
965
|
-
blockedFallbackUsed
|
|
966
|
-
};
|
|
967
|
-
}
|
|
968
|
-
async function buildContextAgenda(options, global, runtime, subtreeIds) {
|
|
969
|
-
const calendarOptions = {
|
|
970
|
-
...runtime.baseListOptions,
|
|
971
|
-
view: "agenda",
|
|
972
|
-
include: "all",
|
|
973
|
-
limit: runtime.parentScope === void 0 ? String(runtime.limit) : void 0
|
|
974
|
-
};
|
|
975
|
-
const agenda = await runCalendar(calendarOptions, global);
|
|
976
|
-
const scopedAgenda = subtreeIds === void 0 ? agenda.events : agenda.events.filter((event) => subtreeIds.has(event.item_id.trim().toLowerCase()));
|
|
977
|
-
const agendaEvents = filterTerminalCalendarEvents(scopedAgenda, runtime.statusRegistry).slice(0, runtime.limit);
|
|
978
|
-
return { agenda, agendaEvents, agendaSummary: summarizeAgenda(agendaEvents) };
|
|
979
|
-
}
|
|
980
|
-
function countContextStatus(items, status, statusRegistry) {
|
|
981
|
-
const targetStatus = String(status);
|
|
982
|
-
return items.filter((item) => normalizeStatusForRegistry(item.status, statusRegistry) === targetStatus).length;
|
|
983
|
-
}
|
|
984
|
-
async function buildOptionalContextSections(params) {
|
|
985
|
-
const { runtime, allItems, fullCorpus, focusGroups, now, global } = params;
|
|
986
|
-
const childrenByParent = buildChildrenByParent(allItems);
|
|
987
|
-
const itemMap = new Map(fullCorpus.map((item) => [item.id, item]));
|
|
988
|
-
const allNonTerminal = allItems.filter((item) => !isTerminalStatus(item.status, runtime.statusRegistry));
|
|
989
|
-
const has = (section) => runtime.sectionsIncluded.includes(section);
|
|
990
|
-
return {
|
|
991
|
-
hierarchy: has("hierarchy") ? buildHierarchy(allItems, focusGroups.activeItems, runtime.statusRegistry, runtime.limit) : void 0,
|
|
992
|
-
activity: has("activity") ? await buildActivity(runtime.activityLimit, global) : void 0,
|
|
993
|
-
progress: has("progress") ? buildProgress(allItems, focusGroups.activeItems, runtime.statusRegistry, runtime.limit) : void 0,
|
|
994
|
-
blockersSection: has("blockers") ? buildBlockers(focusGroups.blockedItems, itemMap, runtime.limit) : void 0,
|
|
995
|
-
recentlyCreated: has("recently_created") ? buildRecentlyCreated(allNonTerminal, runtime.statusRegistry, childrenByParent, runtime.limit) : void 0,
|
|
996
|
-
unparented: has("unparented") ? buildUnparented(allNonTerminal, runtime.statusRegistry, childrenByParent, runtime.limit) : void 0,
|
|
997
|
-
filesSection: has("files") ? buildHotFiles(focusGroups.activeItems, runtime.limit) : void 0,
|
|
998
|
-
workload: has("workload") ? buildWorkload(focusGroups.activeItems, runtime.statusRegistry, runtime.limit) : void 0,
|
|
999
|
-
staleness: has("staleness") ? buildStaleness(allNonTerminal, runtime.staleThresholdDays, now, runtime.limit) : void 0,
|
|
1000
|
-
tests: has("tests") ? buildTestHealth(focusGroups.activeItems) : void 0
|
|
1001
|
-
};
|
|
1002
|
-
}
|
|
1003
|
-
function buildContextSummaryExtras(needsAllItems, allItems, statusRegistry) {
|
|
1004
|
-
if (!needsAllItems) {
|
|
1005
|
-
return {};
|
|
1006
|
-
}
|
|
1007
|
-
const canceledStatus = normalizeStatusInput("canceled", statusRegistry);
|
|
1008
|
-
return {
|
|
1009
|
-
total_items: allItems.length,
|
|
1010
|
-
closed: allItems.filter((item) => isClosedStatus(item.status, statusRegistry)).length,
|
|
1011
|
-
canceled: allItems.filter((item) => normalizeStatusForRegistry(item.status, statusRegistry) === canceledStatus).length
|
|
1012
|
-
};
|
|
1013
|
-
}
|
|
1014
|
-
function attachOptionalContextSections(result, sections) {
|
|
1015
|
-
if (sections.hierarchy)
|
|
1016
|
-
result.hierarchy = sections.hierarchy;
|
|
1017
|
-
if (sections.activity)
|
|
1018
|
-
result.activity = sections.activity;
|
|
1019
|
-
if (sections.progress)
|
|
1020
|
-
result.progress = sections.progress;
|
|
1021
|
-
if (sections.blockersSection)
|
|
1022
|
-
result.blockers = sections.blockersSection;
|
|
1023
|
-
if (sections.recentlyCreated)
|
|
1024
|
-
result.recently_created = sections.recentlyCreated;
|
|
1025
|
-
if (sections.unparented)
|
|
1026
|
-
result.unparented = sections.unparented;
|
|
1027
|
-
if (sections.filesSection)
|
|
1028
|
-
result.files = sections.filesSection;
|
|
1029
|
-
if (sections.workload)
|
|
1030
|
-
result.workload = sections.workload;
|
|
1031
|
-
if (sections.staleness)
|
|
1032
|
-
result.staleness = sections.staleness;
|
|
1033
|
-
if (sections.tests)
|
|
1034
|
-
result.tests = sections.tests;
|
|
1035
|
-
}
|
|
1036
|
-
function applyContextFocusProjection(result, focusFields) {
|
|
1037
|
-
if (!focusFields) {
|
|
1038
|
-
return;
|
|
1039
|
-
}
|
|
1040
|
-
result.focus_fields = focusFields;
|
|
1041
|
-
result.high_level = projectContextFocusRows(result.high_level, focusFields);
|
|
1042
|
-
result.low_level = projectContextFocusRows(result.low_level, focusFields);
|
|
1043
|
-
result.blocked_fallback = projectContextFocusRows(result.blocked_fallback, focusFields);
|
|
1044
|
-
if (result.recently_created) {
|
|
1045
|
-
result.recently_created = projectContextFocusRows(result.recently_created, focusFields);
|
|
1046
|
-
}
|
|
1047
|
-
if (result.unparented) {
|
|
1048
|
-
result.unparented = projectContextFocusRows(result.unparented, focusFields);
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
function maybeAttachEmptyContextSuggestions(result, activeItems, blockedItems) {
|
|
1052
|
-
if (activeItems.length > 0 || blockedItems.length > 0 || result.agenda.events.length > 0) {
|
|
1053
|
-
return;
|
|
1054
|
-
}
|
|
1055
|
-
result.suggestions = [
|
|
1056
|
-
'pm create --type Task --title "..." to add a new work item',
|
|
1057
|
-
"pm list --status closed --limit 5 to review recent completions",
|
|
1058
|
-
"pm search <keywords> to find related past work",
|
|
1059
|
-
"pm aggregate for a full project status overview"
|
|
1060
|
-
];
|
|
1061
|
-
}
|
|
1062
|
-
async function runContext(options, global) {
|
|
1063
|
-
const runtime = await resolveContextRuntime(options, global);
|
|
1064
|
-
const corpus = await loadContextCorpus(options, global, runtime);
|
|
1065
|
-
const focusGroups = resolveContextFocusGroups(corpus.listedFrontMatter, corpus.allItems, runtime.statusRegistry, runtime.sectionsIncluded, runtime.limit);
|
|
1066
|
-
const agendaContext = await buildContextAgenda(options, global, runtime, corpus.subtreeIds);
|
|
1067
|
-
const warnings = mergeSortedWarnings(corpus.listed.warnings, agendaContext.agenda.warnings);
|
|
1068
|
-
const inProgressCount = countContextStatus(focusGroups.activeItems, normalizeStatusInput("in_progress", runtime.statusRegistry), runtime.statusRegistry);
|
|
1069
|
-
const openCount = countContextStatus(focusGroups.activeItems, normalizeStatusInput("open", runtime.statusRegistry), runtime.statusRegistry);
|
|
1070
|
-
const sections = await buildOptionalContextSections({
|
|
1071
|
-
runtime,
|
|
1072
|
-
allItems: corpus.allItems,
|
|
1073
|
-
fullCorpus: corpus.fullCorpus,
|
|
1074
|
-
focusGroups,
|
|
1075
|
-
now: agendaContext.agenda.now,
|
|
1076
|
-
global
|
|
1077
|
-
});
|
|
1078
|
-
const summaryExtras = buildContextSummaryExtras(contextNeedsAllItems(runtime.sectionsIncluded), corpus.allItems, runtime.statusRegistry);
|
|
1079
|
-
const result = {
|
|
1080
|
-
output_default: "toon",
|
|
1081
|
-
now: agendaContext.agenda.now,
|
|
1082
|
-
depth: runtime.depth,
|
|
1083
|
-
sections_included: runtime.sectionsIncluded,
|
|
1084
|
-
window: {
|
|
1085
|
-
anchor: agendaContext.agenda.anchor,
|
|
1086
|
-
start: agendaContext.agenda.range.start,
|
|
1087
|
-
end: agendaContext.agenda.range.end,
|
|
1088
|
-
past: agendaContext.agenda.range.past,
|
|
1089
|
-
from: agendaContext.agenda.range.from,
|
|
1090
|
-
to: agendaContext.agenda.range.to
|
|
1091
|
-
},
|
|
1092
|
-
filters: {
|
|
1093
|
-
type: options.type ?? null,
|
|
1094
|
-
tag: options.tag ?? null,
|
|
1095
|
-
priority: options.priority ?? null,
|
|
1096
|
-
assignee: options.assignee ?? null,
|
|
1097
|
-
assignee_filter: options.assigneeFilter ?? null,
|
|
1098
|
-
sprint: options.sprint ?? null,
|
|
1099
|
-
release: options.release ?? null,
|
|
1100
|
-
limit: options.limit ?? null,
|
|
1101
|
-
parent: runtime.parentScope ?? null,
|
|
1102
|
-
/* c8 ignore next -- listed/calendar runtime filters are always materialized by their command handlers */
|
|
1103
|
-
runtime_filters: corpus.listed.filters.runtime_filters ?? agendaContext.agenda.filters.runtime_filters ?? {}
|
|
1104
|
-
},
|
|
1105
|
-
summary: {
|
|
1106
|
-
active_items: focusGroups.activeItems.length,
|
|
1107
|
-
in_progress: inProgressCount,
|
|
1108
|
-
open: openCount,
|
|
1109
|
-
blocked: focusGroups.blockedItems.length,
|
|
1110
|
-
blocked_fallback_used: focusGroups.blockedFallbackUsed,
|
|
1111
|
-
high_level: focusGroups.highLevel.length,
|
|
1112
|
-
low_level: focusGroups.lowLevel.length,
|
|
1113
|
-
agenda_events: agendaContext.agendaSummary.events,
|
|
1114
|
-
...summaryExtras
|
|
1115
|
-
},
|
|
1116
|
-
high_level: focusGroups.highLevel,
|
|
1117
|
-
low_level: focusGroups.lowLevel,
|
|
1118
|
-
blocked_fallback: focusGroups.blockedFallback,
|
|
1119
|
-
agenda: {
|
|
1120
|
-
summary: agendaContext.agendaSummary,
|
|
1121
|
-
events: agendaContext.agendaEvents
|
|
1122
|
-
}
|
|
1123
|
-
};
|
|
1124
|
-
attachOptionalContextSections(result, sections);
|
|
1125
|
-
applyContextFocusProjection(result, runtime.focusFields);
|
|
1126
|
-
if (warnings.length > 0)
|
|
1127
|
-
result.warnings = warnings;
|
|
1128
|
-
maybeAttachEmptyContextSuggestions(result, focusGroups.activeItems, focusGroups.blockedItems);
|
|
1129
|
-
return result;
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
export {
|
|
1133
|
-
CONTEXT_OUTPUT_VALUES,
|
|
1134
|
-
parseContextFocusFields,
|
|
1135
|
-
projectContextFocusRows,
|
|
1136
|
-
resolveContextOutputFormat,
|
|
1137
|
-
parseContextDepth,
|
|
1138
|
-
parseContextSections,
|
|
1139
|
-
collectSubtreeIds,
|
|
1140
|
-
compareCriticalItems,
|
|
1141
|
-
buildChildrenByParent,
|
|
1142
|
-
toContextFocusItem,
|
|
1143
|
-
_testOnly,
|
|
1144
|
-
renderContextMarkdown,
|
|
1145
|
-
runContext
|
|
1146
|
-
};
|
|
1147
|
-
//# sourceMappingURL=chunk-STPSZ2XY.js.map
|
|
1148
|
-
|
|
1149
|
-
//# debugId=034228c0-2ef9-5500-a0de-723ef2544e22
|