@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
|
@@ -0,0 +1,804 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveAuthor
|
|
3
|
+
} from "./chunk-WW4E2DC3.js";
|
|
4
|
+
import {
|
|
5
|
+
lintProjectProfile,
|
|
6
|
+
resolveProfileCatalog,
|
|
7
|
+
resolveProfileEntry
|
|
8
|
+
} from "./chunk-H2SMKL2N.js";
|
|
9
|
+
import {
|
|
10
|
+
parseNestedSettingValue,
|
|
11
|
+
readNestedSettingValue,
|
|
12
|
+
resolveNestedSettingDescriptor,
|
|
13
|
+
writeNestedSettingValue
|
|
14
|
+
} from "./chunk-VUHVWI4C.js";
|
|
15
|
+
import {
|
|
16
|
+
ensureTypeFolderScaffold
|
|
17
|
+
} from "./chunk-TGUK6XN6.js";
|
|
18
|
+
import {
|
|
19
|
+
normalizeAddFieldInput,
|
|
20
|
+
normalizeAddStatusInput,
|
|
21
|
+
parseFieldsFile,
|
|
22
|
+
parseStatusDefsFile,
|
|
23
|
+
serializeFieldsFile,
|
|
24
|
+
serializeStatusDefsFile,
|
|
25
|
+
upsertField,
|
|
26
|
+
upsertStatusDef
|
|
27
|
+
} from "./chunk-J7BOLHAV.js";
|
|
28
|
+
import {
|
|
29
|
+
CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS
|
|
30
|
+
} from "./chunk-YCVWWIKY.js";
|
|
31
|
+
import {
|
|
32
|
+
normalizeAddTypeInput,
|
|
33
|
+
parseItemTypesFile,
|
|
34
|
+
serializeItemTypesFile,
|
|
35
|
+
upsertItemType
|
|
36
|
+
} from "./chunk-YPMZMKN7.js";
|
|
37
|
+
import {
|
|
38
|
+
PmCliError,
|
|
39
|
+
acquireLock,
|
|
40
|
+
getActiveExtensionRegistrations,
|
|
41
|
+
nowIso,
|
|
42
|
+
readSettings,
|
|
43
|
+
resolveGovernanceKnobs,
|
|
44
|
+
runActiveOnWriteHooks,
|
|
45
|
+
writeSettings
|
|
46
|
+
} from "./chunk-YNCFP5AR.js";
|
|
47
|
+
import {
|
|
48
|
+
DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
|
|
49
|
+
EXIT_CODE,
|
|
50
|
+
filePathForSchemaSection,
|
|
51
|
+
getSettingsPath,
|
|
52
|
+
normalizeRuntimeSchemaSettings,
|
|
53
|
+
pathExists,
|
|
54
|
+
readFileIfExists,
|
|
55
|
+
resolvePmRoot,
|
|
56
|
+
writeFileAtomic
|
|
57
|
+
} from "./chunk-LCFJ7XAM.js";
|
|
58
|
+
|
|
59
|
+
// dist/cli/commands/profile.js
|
|
60
|
+
import path2 from "node:path";
|
|
61
|
+
|
|
62
|
+
// dist/core/profile/profile-describe.js
|
|
63
|
+
!(function() {
|
|
64
|
+
try {
|
|
65
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
66
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a291c588-5fe0-5377-a302-b1c2471217bc");
|
|
67
|
+
} catch (e2) {
|
|
68
|
+
}
|
|
69
|
+
})();
|
|
70
|
+
function describeProfileComposition(profile) {
|
|
71
|
+
return {
|
|
72
|
+
types: profile.types.length,
|
|
73
|
+
statuses: profile.statuses.length,
|
|
74
|
+
fields: profile.fields.length,
|
|
75
|
+
workflows: profile.workflows.length,
|
|
76
|
+
config: profile.config.length,
|
|
77
|
+
templates: profile.templates.length,
|
|
78
|
+
packages: profile.packages.length
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function describeProjectProfile(profile) {
|
|
82
|
+
return {
|
|
83
|
+
name: profile.name,
|
|
84
|
+
title: profile.title,
|
|
85
|
+
summary: profile.summary,
|
|
86
|
+
composition: describeProfileComposition(profile),
|
|
87
|
+
types: profile.types.map((type) => lenientIdentifier(() => normalizeAddTypeInput(type).name, () => String(type.name ?? ""))),
|
|
88
|
+
statuses: profile.statuses.map((status) => lenientIdentifier(() => normalizeAddStatusInput(status).id, () => String(status.id ?? ""))),
|
|
89
|
+
fields: profile.fields.map((field) => lenientIdentifier(() => normalizeAddFieldInput(field).key, () => String(field.key ?? ""))),
|
|
90
|
+
workflows: profile.workflows.map((workflow) => workflow.type),
|
|
91
|
+
config: profile.config.map((entry) => `${entry.key}=${entry.value}`),
|
|
92
|
+
templates: profile.templates.map((template) => template.name),
|
|
93
|
+
packages: profile.packages.map((recommendation) => ({ spec: recommendation.spec, reason: recommendation.reason }))
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function lenientIdentifier(normalize, raw) {
|
|
97
|
+
try {
|
|
98
|
+
return normalize();
|
|
99
|
+
} catch {
|
|
100
|
+
return raw();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// dist/core/profile/profile-plan.js
|
|
105
|
+
!(function() {
|
|
106
|
+
try {
|
|
107
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
108
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "4435194d-79d2-5bb2-ae11-3959340e495b");
|
|
109
|
+
} catch (e2) {
|
|
110
|
+
}
|
|
111
|
+
})();
|
|
112
|
+
function planSchemaComponent(initialFile, inputs, keyOf, serialize, upsert) {
|
|
113
|
+
let file = initialFile;
|
|
114
|
+
const changes = [];
|
|
115
|
+
for (const input of inputs) {
|
|
116
|
+
const before = serialize(file);
|
|
117
|
+
const result = upsert(file, input);
|
|
118
|
+
const after = serialize(result.file);
|
|
119
|
+
file = result.file;
|
|
120
|
+
const status = before === after ? "unchanged" : result.replaced ? "update" : "add";
|
|
121
|
+
changes.push({ key: keyOf(input), status });
|
|
122
|
+
}
|
|
123
|
+
return { file, changes, changed: changes.some((change) => change.status !== "unchanged") };
|
|
124
|
+
}
|
|
125
|
+
function canonicalTransitions(transitions) {
|
|
126
|
+
return JSON.stringify(transitions.map((pair) => pair.join("\0")).sort());
|
|
127
|
+
}
|
|
128
|
+
function planWorkflows(current, desired) {
|
|
129
|
+
const result = current.map((entry) => ({ ...entry }));
|
|
130
|
+
const changes = [];
|
|
131
|
+
for (const workflow of desired) {
|
|
132
|
+
const index = result.findIndex((entry) => entry.type === workflow.type);
|
|
133
|
+
const next = { type: workflow.type, allowed_transitions: workflow.allowed_transitions };
|
|
134
|
+
if (index < 0) {
|
|
135
|
+
result.push(next);
|
|
136
|
+
changes.push({ type: workflow.type, status: "add" });
|
|
137
|
+
} else if (canonicalTransitions(result[index].allowed_transitions) === canonicalTransitions(workflow.allowed_transitions)) {
|
|
138
|
+
changes.push({ type: workflow.type, status: "unchanged" });
|
|
139
|
+
} else {
|
|
140
|
+
result[index] = next;
|
|
141
|
+
changes.push({ type: workflow.type, status: "update" });
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return { changes, result, changed: changes.some((change) => change.status !== "unchanged") };
|
|
145
|
+
}
|
|
146
|
+
function planConfig(profile, settings) {
|
|
147
|
+
const changes = [];
|
|
148
|
+
for (const entry of profile.config) {
|
|
149
|
+
const descriptor = resolveNestedSettingDescriptor(entry.key);
|
|
150
|
+
if (descriptor === void 0) {
|
|
151
|
+
throw new Error(`Profile "${profile.name}" references unknown config key "${entry.key}".`);
|
|
152
|
+
}
|
|
153
|
+
const parsed = parseNestedSettingValue(descriptor, entry.value);
|
|
154
|
+
if (!parsed.ok) {
|
|
155
|
+
throw new Error(`Profile "${profile.name}" config ${entry.key}: ${parsed.error.message}`);
|
|
156
|
+
}
|
|
157
|
+
const current = readNestedSettingValue(settings, descriptor);
|
|
158
|
+
const status = current === null ? "add" : current === parsed.parsed.value ? "unchanged" : "update";
|
|
159
|
+
changes.push({ key: descriptor.key, path: descriptor.path, value: parsed.parsed.value, status });
|
|
160
|
+
}
|
|
161
|
+
return { changes, changed: changes.some((change) => change.status !== "unchanged") };
|
|
162
|
+
}
|
|
163
|
+
function canonicalTemplateOptions(options) {
|
|
164
|
+
const sorted = Object.entries(options).sort(([left], [right]) => left.localeCompare(right));
|
|
165
|
+
return JSON.stringify(sorted);
|
|
166
|
+
}
|
|
167
|
+
function planTemplates(profile, existing) {
|
|
168
|
+
const changes = [];
|
|
169
|
+
for (const template of profile.templates) {
|
|
170
|
+
const current = existing.get(template.name);
|
|
171
|
+
let status;
|
|
172
|
+
if (current === void 0) {
|
|
173
|
+
status = "add";
|
|
174
|
+
} else if (canonicalTemplateOptions(current) === canonicalTemplateOptions(template.options)) {
|
|
175
|
+
status = "unchanged";
|
|
176
|
+
} else {
|
|
177
|
+
status = "update";
|
|
178
|
+
}
|
|
179
|
+
changes.push({ name: template.name, options: template.options, status });
|
|
180
|
+
}
|
|
181
|
+
return { changes, changed: changes.some((change) => change.status !== "unchanged") };
|
|
182
|
+
}
|
|
183
|
+
function planProfileApplication(profile, current) {
|
|
184
|
+
const types = planSchemaComponent(parseItemTypesFile(current.typesRaw), profile.types, (input) => normalizeAddTypeInput(input).name, serializeItemTypesFile, (file, input) => upsertItemType(file, normalizeAddTypeInput(input)));
|
|
185
|
+
const statuses = planSchemaComponent(parseStatusDefsFile(current.statusesRaw), profile.statuses, (input) => normalizeAddStatusInput(input).id, serializeStatusDefsFile, (file, input) => upsertStatusDef(file, normalizeAddStatusInput(input)));
|
|
186
|
+
const fields = planSchemaComponent(parseFieldsFile(current.fieldsRaw), profile.fields, (input) => normalizeAddFieldInput(input).key, serializeFieldsFile, (file, input) => upsertField(file, normalizeAddFieldInput(input)));
|
|
187
|
+
const workflows = planWorkflows(current.workflows, profile.workflows);
|
|
188
|
+
const config = planConfig(profile, current.settings);
|
|
189
|
+
const templates = planTemplates(profile, current.templates);
|
|
190
|
+
const packages = profile.packages.map((recommendation) => ({
|
|
191
|
+
spec: recommendation.spec,
|
|
192
|
+
reason: recommendation.reason,
|
|
193
|
+
status: current.installedPackages.has(recommendation.spec) ? "installed" : "recommended"
|
|
194
|
+
}));
|
|
195
|
+
const changed = types.changed || statuses.changed || fields.changed || workflows.changed || config.changed || templates.changed;
|
|
196
|
+
return {
|
|
197
|
+
profile: { name: profile.name, title: profile.title, summary: profile.summary },
|
|
198
|
+
types,
|
|
199
|
+
statuses,
|
|
200
|
+
fields,
|
|
201
|
+
workflows,
|
|
202
|
+
config,
|
|
203
|
+
templates,
|
|
204
|
+
packages,
|
|
205
|
+
changed
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// dist/cli/commands/templates.js
|
|
210
|
+
import fs from "node:fs/promises";
|
|
211
|
+
import path from "node:path";
|
|
212
|
+
!(function() {
|
|
213
|
+
try {
|
|
214
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
215
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "4ac1eb25-6b3f-549e-b7f5-6b4c53071b9a");
|
|
216
|
+
} catch (e2) {
|
|
217
|
+
}
|
|
218
|
+
})();
|
|
219
|
+
var TEMPLATE_DIRECTORY_NAME = "templates";
|
|
220
|
+
var TEMPLATE_FILE_EXTENSION = ".json";
|
|
221
|
+
var TEMPLATE_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
|
|
222
|
+
var TEMPLATE_OPTION_REPEATABLE_KEYS = CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS.map((entry) => entry.target);
|
|
223
|
+
var TEMPLATE_OPTION_REPEATABLE_KEY_SET = new Set(TEMPLATE_OPTION_REPEATABLE_KEYS);
|
|
224
|
+
var BUILTIN_TEMPLATE_TIMESTAMP = "1970-01-01T00:00:00.000Z";
|
|
225
|
+
var BUILTIN_TEMPLATES = {
|
|
226
|
+
bug: {
|
|
227
|
+
type: "Issue",
|
|
228
|
+
priority: "1",
|
|
229
|
+
tags: "bug",
|
|
230
|
+
acceptanceCriteria: "Bug no longer reproduces with the steps below and a regression test guards it.",
|
|
231
|
+
expectedResult: "Describe the correct behavior.",
|
|
232
|
+
actualResult: "Describe the observed (buggy) behavior.",
|
|
233
|
+
body: "## Repro steps\n1. \n2. \n3. \n\n## Expected\n\n## Actual\n"
|
|
234
|
+
},
|
|
235
|
+
feature: {
|
|
236
|
+
type: "Feature",
|
|
237
|
+
priority: "2",
|
|
238
|
+
tags: "feature",
|
|
239
|
+
acceptanceCriteria: "Feature is shipped behind agreed scope with tests and docs updated.",
|
|
240
|
+
whyNow: "Explain why this is worth doing now (impact / urgency).",
|
|
241
|
+
body: "## Goal\n\n## Why now\n\n## Out of scope\n"
|
|
242
|
+
},
|
|
243
|
+
spike: {
|
|
244
|
+
type: "Task",
|
|
245
|
+
priority: "2",
|
|
246
|
+
tags: "spike",
|
|
247
|
+
estimatedMinutes: "120",
|
|
248
|
+
acceptanceCriteria: "Timeboxed investigation complete; findings and a recommendation are recorded.",
|
|
249
|
+
body: "## Question to answer\n\n## Timebox\n2h\n\n## Findings\n\n## Recommendation\n"
|
|
250
|
+
},
|
|
251
|
+
chore: {
|
|
252
|
+
type: "Chore",
|
|
253
|
+
priority: "3",
|
|
254
|
+
tags: "chore",
|
|
255
|
+
acceptanceCriteria: "Maintenance task done with no behavior change and green checks.",
|
|
256
|
+
body: "## What\n\n## Why\n"
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
function normalizeTemplateName(rawName) {
|
|
260
|
+
const name = rawName.trim();
|
|
261
|
+
if (!TEMPLATE_NAME_PATTERN.test(name)) {
|
|
262
|
+
throw new PmCliError(`Invalid template name "${rawName}". Expected 1-64 characters matching [A-Za-z0-9][A-Za-z0-9._-]*.`, EXIT_CODE.USAGE);
|
|
263
|
+
}
|
|
264
|
+
return name;
|
|
265
|
+
}
|
|
266
|
+
function templatesDirectory(pmRoot) {
|
|
267
|
+
return path.join(pmRoot, TEMPLATE_DIRECTORY_NAME);
|
|
268
|
+
}
|
|
269
|
+
function templatePath(pmRoot, normalizedName) {
|
|
270
|
+
return path.join(templatesDirectory(pmRoot), `${normalizedName}${TEMPLATE_FILE_EXTENSION}`);
|
|
271
|
+
}
|
|
272
|
+
async function ensureTrackerInitialized(pmRoot) {
|
|
273
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
274
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function sortTemplateOptions(options) {
|
|
278
|
+
return Object.fromEntries(Object.entries(options).sort(([left], [right]) => left.localeCompare(right)));
|
|
279
|
+
}
|
|
280
|
+
function extractTemplateOptions(rawOptions) {
|
|
281
|
+
const next = {};
|
|
282
|
+
for (const [key, value] of Object.entries(rawOptions)) {
|
|
283
|
+
if (value === void 0) {
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
if (TEMPLATE_OPTION_REPEATABLE_KEY_SET.has(key)) {
|
|
287
|
+
if (typeof value === "string") {
|
|
288
|
+
next[key] = [value];
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
if (!Array.isArray(value)) {
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
const values = value.filter((entry) => typeof entry === "string");
|
|
295
|
+
if (values.length > 0) {
|
|
296
|
+
next[key] = values;
|
|
297
|
+
}
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
if (typeof value === "string") {
|
|
301
|
+
next[key] = value;
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
if (Array.isArray(value) && value.every((entry) => typeof entry === "string")) {
|
|
305
|
+
next[key] = [...value];
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return sortTemplateOptions(next);
|
|
309
|
+
}
|
|
310
|
+
function parseStoredTemplateOptions(rawOptions, templateName) {
|
|
311
|
+
if (typeof rawOptions !== "object" || rawOptions === null || Array.isArray(rawOptions)) {
|
|
312
|
+
throw new PmCliError(`Template "${templateName}" has invalid options payload.`, EXIT_CODE.GENERIC_FAILURE);
|
|
313
|
+
}
|
|
314
|
+
const optionsRecord = rawOptions;
|
|
315
|
+
const normalized = {};
|
|
316
|
+
for (const [key, value] of Object.entries(optionsRecord)) {
|
|
317
|
+
const normalizedKey = key.trim();
|
|
318
|
+
if (normalizedKey.length === 0) {
|
|
319
|
+
throw new PmCliError(`Template "${templateName}" contains an empty option key.`, EXIT_CODE.GENERIC_FAILURE);
|
|
320
|
+
}
|
|
321
|
+
if (typeof value === "string") {
|
|
322
|
+
normalized[normalizedKey] = value;
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
if (Array.isArray(value) && value.every((entry) => typeof entry === "string")) {
|
|
326
|
+
normalized[normalizedKey] = [...value];
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
throw new PmCliError(`Template "${templateName}" contains invalid value for option "${normalizedKey}".`, EXIT_CODE.GENERIC_FAILURE);
|
|
330
|
+
}
|
|
331
|
+
return sortTemplateOptions(normalized);
|
|
332
|
+
}
|
|
333
|
+
function parseStoredTemplateDocument(raw, normalizedName) {
|
|
334
|
+
let parsed;
|
|
335
|
+
try {
|
|
336
|
+
parsed = JSON.parse(raw);
|
|
337
|
+
} catch {
|
|
338
|
+
throw new PmCliError(`Template "${normalizedName}" contains invalid JSON.`, EXIT_CODE.GENERIC_FAILURE);
|
|
339
|
+
}
|
|
340
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
341
|
+
throw new PmCliError(`Template "${normalizedName}" has invalid document shape.`, EXIT_CODE.GENERIC_FAILURE);
|
|
342
|
+
}
|
|
343
|
+
const record = parsed;
|
|
344
|
+
const options = parseStoredTemplateOptions(record.options, normalizedName);
|
|
345
|
+
const now = nowIso();
|
|
346
|
+
return {
|
|
347
|
+
name: typeof record.name === "string" && record.name.trim().length > 0 ? record.name.trim() : normalizedName,
|
|
348
|
+
created_at: typeof record.created_at === "string" ? record.created_at : now,
|
|
349
|
+
updated_at: typeof record.updated_at === "string" ? record.updated_at : now,
|
|
350
|
+
options
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
function builtinTemplateDocument(normalizedName) {
|
|
354
|
+
const options = BUILTIN_TEMPLATES[normalizedName];
|
|
355
|
+
if (!options) {
|
|
356
|
+
return null;
|
|
357
|
+
}
|
|
358
|
+
return {
|
|
359
|
+
name: normalizedName,
|
|
360
|
+
created_at: BUILTIN_TEMPLATE_TIMESTAMP,
|
|
361
|
+
updated_at: BUILTIN_TEMPLATE_TIMESTAMP,
|
|
362
|
+
options: sortTemplateOptions({ ...options })
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
async function resolveTemplateDocument(pmRoot, normalizedName) {
|
|
366
|
+
const raw = await readFileIfExists(templatePath(pmRoot, normalizedName));
|
|
367
|
+
if (raw !== null) {
|
|
368
|
+
return { document: parseStoredTemplateDocument(raw, normalizedName), source: "user" };
|
|
369
|
+
}
|
|
370
|
+
const builtin = builtinTemplateDocument(normalizedName);
|
|
371
|
+
if (builtin) {
|
|
372
|
+
return { document: builtin, source: "builtin" };
|
|
373
|
+
}
|
|
374
|
+
throw new PmCliError(`Template "${normalizedName}" not found`, EXIT_CODE.NOT_FOUND);
|
|
375
|
+
}
|
|
376
|
+
async function readStoredTemplateDocument(pmRoot, normalizedName) {
|
|
377
|
+
const raw = await readFileIfExists(templatePath(pmRoot, normalizedName));
|
|
378
|
+
if (raw === null) {
|
|
379
|
+
throw new PmCliError(`Template "${normalizedName}" not found`, EXIT_CODE.NOT_FOUND);
|
|
380
|
+
}
|
|
381
|
+
return parseStoredTemplateDocument(raw, normalizedName);
|
|
382
|
+
}
|
|
383
|
+
async function loadCreateTemplateOptions(pmRoot, rawTemplateName) {
|
|
384
|
+
const normalizedName = normalizeTemplateName(rawTemplateName);
|
|
385
|
+
const { document } = await resolveTemplateDocument(pmRoot, normalizedName);
|
|
386
|
+
return document.options;
|
|
387
|
+
}
|
|
388
|
+
async function runTemplatesSave(rawTemplateName, options, global2) {
|
|
389
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
390
|
+
await ensureTrackerInitialized(pmRoot);
|
|
391
|
+
const normalizedName = normalizeTemplateName(rawTemplateName);
|
|
392
|
+
const nextOptions = extractTemplateOptions(options);
|
|
393
|
+
if (Object.keys(nextOptions).length === 0) {
|
|
394
|
+
throw new PmCliError("templates save requires at least one create option flag", EXIT_CODE.USAGE);
|
|
395
|
+
}
|
|
396
|
+
const now = nowIso();
|
|
397
|
+
const storedPath = templatePath(pmRoot, normalizedName);
|
|
398
|
+
let createdAt = now;
|
|
399
|
+
if (await pathExists(storedPath)) {
|
|
400
|
+
const existing = await readStoredTemplateDocument(pmRoot, normalizedName);
|
|
401
|
+
createdAt = existing.created_at;
|
|
402
|
+
}
|
|
403
|
+
const document = {
|
|
404
|
+
name: normalizedName,
|
|
405
|
+
created_at: createdAt,
|
|
406
|
+
updated_at: now,
|
|
407
|
+
options: nextOptions
|
|
408
|
+
};
|
|
409
|
+
await fs.mkdir(templatesDirectory(pmRoot), { recursive: true });
|
|
410
|
+
await writeFileAtomic(storedPath, `${JSON.stringify(document, null, 2)}
|
|
411
|
+
`);
|
|
412
|
+
return {
|
|
413
|
+
name: document.name,
|
|
414
|
+
created_at: document.created_at,
|
|
415
|
+
updated_at: document.updated_at,
|
|
416
|
+
path: storedPath,
|
|
417
|
+
options: document.options
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
async function readUserTemplateNames(pmRoot) {
|
|
421
|
+
const dirPath = templatesDirectory(pmRoot);
|
|
422
|
+
if (!await pathExists(dirPath)) {
|
|
423
|
+
return [];
|
|
424
|
+
}
|
|
425
|
+
const entries = await fs.readdir(dirPath);
|
|
426
|
+
return entries.filter((entry) => entry.toLowerCase().endsWith(TEMPLATE_FILE_EXTENSION)).map((entry) => entry.slice(0, -TEMPLATE_FILE_EXTENSION.length)).filter((entry) => TEMPLATE_NAME_PATTERN.test(entry));
|
|
427
|
+
}
|
|
428
|
+
async function runTemplatesList(global2) {
|
|
429
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
430
|
+
await ensureTrackerInitialized(pmRoot);
|
|
431
|
+
const userTemplates = await readUserTemplateNames(pmRoot);
|
|
432
|
+
const userTemplateSet = new Set(userTemplates);
|
|
433
|
+
const builtinTemplates = Object.keys(BUILTIN_TEMPLATES).filter((name) => !userTemplateSet.has(name));
|
|
434
|
+
const sortedUser = [...userTemplates].sort((left, right) => left.localeCompare(right));
|
|
435
|
+
const sortedBuiltin = [...builtinTemplates].sort((left, right) => left.localeCompare(right));
|
|
436
|
+
const templates = [.../* @__PURE__ */ new Set([...sortedUser, ...sortedBuiltin])].sort((left, right) => left.localeCompare(right));
|
|
437
|
+
return {
|
|
438
|
+
templates,
|
|
439
|
+
count: templates.length,
|
|
440
|
+
builtin_templates: sortedBuiltin,
|
|
441
|
+
user_templates: sortedUser
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
async function runTemplatesShow(rawTemplateName, global2) {
|
|
445
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
446
|
+
await ensureTrackerInitialized(pmRoot);
|
|
447
|
+
const normalizedName = normalizeTemplateName(rawTemplateName);
|
|
448
|
+
const { document, source } = await resolveTemplateDocument(pmRoot, normalizedName);
|
|
449
|
+
return {
|
|
450
|
+
name: document.name,
|
|
451
|
+
source,
|
|
452
|
+
created_at: document.created_at,
|
|
453
|
+
updated_at: document.updated_at,
|
|
454
|
+
path: source === "builtin" ? `builtin:${normalizedName}` : templatePath(pmRoot, normalizedName),
|
|
455
|
+
options: document.options
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
// dist/cli/commands/profile.js
|
|
460
|
+
!(function() {
|
|
461
|
+
try {
|
|
462
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
463
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "530a50d9-2afd-5b74-99f5-9eb95ed54c26");
|
|
464
|
+
} catch (e2) {
|
|
465
|
+
}
|
|
466
|
+
})();
|
|
467
|
+
var PROFILE_SUBCOMMANDS = ["list", "show", "apply", "lint"];
|
|
468
|
+
var PROFILE_TYPES_LOCK_ID = "schema-types";
|
|
469
|
+
var PROFILE_STATUSES_LOCK_ID = "schema-statuses";
|
|
470
|
+
var PROFILE_FIELDS_LOCK_ID = "schema-fields";
|
|
471
|
+
function collectExtensionProfileContributions() {
|
|
472
|
+
const registrations = getActiveExtensionRegistrations();
|
|
473
|
+
if (registrations === null) {
|
|
474
|
+
return [];
|
|
475
|
+
}
|
|
476
|
+
return registrations.profiles.map((entry) => ({ name: entry.name, profile: entry.profile }));
|
|
477
|
+
}
|
|
478
|
+
function runProfileList() {
|
|
479
|
+
const { profiles, warnings } = resolveProfileCatalog(collectExtensionProfileContributions());
|
|
480
|
+
return {
|
|
481
|
+
action: "list",
|
|
482
|
+
profiles: profiles.map((resolved) => ({
|
|
483
|
+
name: resolved.definition.name,
|
|
484
|
+
title: resolved.definition.title,
|
|
485
|
+
summary: resolved.definition.summary,
|
|
486
|
+
source: resolved.source,
|
|
487
|
+
...resolved.package !== void 0 ? { package: resolved.package } : {},
|
|
488
|
+
composition: describeProfileComposition(resolved.definition)
|
|
489
|
+
})),
|
|
490
|
+
warnings,
|
|
491
|
+
generated_at: nowIso()
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
function runProfileShow(name) {
|
|
495
|
+
let entry;
|
|
496
|
+
try {
|
|
497
|
+
entry = resolveProfileEntry(name, collectExtensionProfileContributions());
|
|
498
|
+
} catch (error) {
|
|
499
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
|
|
500
|
+
}
|
|
501
|
+
const { resolved } = entry;
|
|
502
|
+
return {
|
|
503
|
+
action: "show",
|
|
504
|
+
...describeProjectProfile(resolved.definition),
|
|
505
|
+
source: resolved.source,
|
|
506
|
+
...resolved.package !== void 0 ? { package: resolved.package } : {},
|
|
507
|
+
warnings: entry.warnings,
|
|
508
|
+
generated_at: nowIso()
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
function runProfileLint(name) {
|
|
512
|
+
let entry;
|
|
513
|
+
try {
|
|
514
|
+
entry = resolveProfileEntry(name, collectExtensionProfileContributions());
|
|
515
|
+
} catch (error) {
|
|
516
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
|
|
517
|
+
}
|
|
518
|
+
const { resolved } = entry;
|
|
519
|
+
const report = lintProjectProfile(resolved.definition);
|
|
520
|
+
return {
|
|
521
|
+
action: "lint",
|
|
522
|
+
name: resolved.definition.name,
|
|
523
|
+
title: resolved.definition.title,
|
|
524
|
+
source: resolved.source,
|
|
525
|
+
...resolved.package !== void 0 ? { package: resolved.package } : {},
|
|
526
|
+
ok: report.ok,
|
|
527
|
+
error_count: report.errorCount,
|
|
528
|
+
warning_count: report.warningCount,
|
|
529
|
+
findings: report.findings,
|
|
530
|
+
warnings: entry.warnings,
|
|
531
|
+
generated_at: nowIso()
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
function templateFilePath(pmRoot, name) {
|
|
535
|
+
return path2.join(pmRoot, "templates", `${name}.json`);
|
|
536
|
+
}
|
|
537
|
+
async function readStoredTemplateOptions(pmRoot, name) {
|
|
538
|
+
const raw = await readFileIfExists(templateFilePath(pmRoot, name));
|
|
539
|
+
if (raw === null) {
|
|
540
|
+
return void 0;
|
|
541
|
+
}
|
|
542
|
+
try {
|
|
543
|
+
const parsed = JSON.parse(raw);
|
|
544
|
+
if (parsed !== null && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
545
|
+
const options = parsed.options;
|
|
546
|
+
if (options !== null && typeof options === "object" && !Array.isArray(options)) {
|
|
547
|
+
return options;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
} catch {
|
|
551
|
+
}
|
|
552
|
+
return void 0;
|
|
553
|
+
}
|
|
554
|
+
async function loadProfileCurrentState(pmRoot, schema, settings, profile) {
|
|
555
|
+
const templates = /* @__PURE__ */ new Map();
|
|
556
|
+
for (const template of profile.templates) {
|
|
557
|
+
const stored = await readStoredTemplateOptions(pmRoot, template.name);
|
|
558
|
+
if (stored !== void 0) {
|
|
559
|
+
templates.set(template.name, stored);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
return {
|
|
563
|
+
typesRaw: await readFileIfExists(filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types)),
|
|
564
|
+
statusesRaw: await readFileIfExists(filePathForSchemaSection(pmRoot, schema.files.statuses, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses)),
|
|
565
|
+
fieldsRaw: await readFileIfExists(filePathForSchemaSection(pmRoot, schema.files.fields, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields)),
|
|
566
|
+
workflows: settings.schema.type_workflows ?? [],
|
|
567
|
+
settings,
|
|
568
|
+
templates,
|
|
569
|
+
// Package recommendations are advisory: apply never installs and never
|
|
570
|
+
// inspects install state, so every recommendation surfaces as "recommended".
|
|
571
|
+
// The planner still supports an install-state set for SDK consumers that want
|
|
572
|
+
// richer reporting.
|
|
573
|
+
installedPackages: /* @__PURE__ */ new Set()
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
function dimensionFrom(changes) {
|
|
577
|
+
const added = [];
|
|
578
|
+
const updated = [];
|
|
579
|
+
const unchanged = [];
|
|
580
|
+
for (const change of changes) {
|
|
581
|
+
(change.status === "add" ? added : change.status === "update" ? updated : unchanged).push(change.key);
|
|
582
|
+
}
|
|
583
|
+
return { added, updated, unchanged };
|
|
584
|
+
}
|
|
585
|
+
function buildApplyResult(profile, plan, applied, dryRun, warnings) {
|
|
586
|
+
return {
|
|
587
|
+
action: "apply",
|
|
588
|
+
name: profile.name,
|
|
589
|
+
title: profile.title,
|
|
590
|
+
applied,
|
|
591
|
+
dry_run: dryRun,
|
|
592
|
+
changed: plan.changed,
|
|
593
|
+
types: dimensionFrom(plan.types.changes),
|
|
594
|
+
statuses: dimensionFrom(plan.statuses.changes),
|
|
595
|
+
fields: dimensionFrom(plan.fields.changes),
|
|
596
|
+
workflows: dimensionFrom(plan.workflows.changes.map((change) => ({ key: change.type, status: change.status }))),
|
|
597
|
+
config: dimensionFrom(plan.config.changes),
|
|
598
|
+
templates: dimensionFrom(plan.templates.changes.map((change) => ({ key: change.name, status: change.status }))),
|
|
599
|
+
packages: plan.packages,
|
|
600
|
+
warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
|
|
601
|
+
generated_at: nowIso()
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
async function assertProfileTrackerInitialized(pmRoot) {
|
|
605
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
606
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
function resolveProfileForCommand(name) {
|
|
610
|
+
try {
|
|
611
|
+
const entry = resolveProfileEntry(name, collectExtensionProfileContributions());
|
|
612
|
+
return {
|
|
613
|
+
profile: entry.resolved.definition,
|
|
614
|
+
warnings: entry.warnings
|
|
615
|
+
};
|
|
616
|
+
} catch (error) {
|
|
617
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
async function runProfileApply(name, options, global2) {
|
|
621
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
622
|
+
await assertProfileTrackerInitialized(pmRoot);
|
|
623
|
+
const resolvedProfile = resolveProfileForCommand(name);
|
|
624
|
+
const profile = resolvedProfile.profile;
|
|
625
|
+
const mergeWarnings = resolvedProfile.warnings;
|
|
626
|
+
const dryRun = options.dryRun === true;
|
|
627
|
+
const settings = await readSettings(pmRoot);
|
|
628
|
+
const schema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
629
|
+
if (dryRun) {
|
|
630
|
+
const state = await loadProfileCurrentState(pmRoot, schema, settings, profile);
|
|
631
|
+
const plan2 = planProfile(profile, state);
|
|
632
|
+
return buildApplyResult(profile, plan2, false, true, [...mergeWarnings]);
|
|
633
|
+
}
|
|
634
|
+
const author = resolveAuthor(options.author, settings.author_default);
|
|
635
|
+
const governance = resolveGovernanceKnobs(settings);
|
|
636
|
+
const force = Boolean(options.force);
|
|
637
|
+
const warnings = [...mergeWarnings];
|
|
638
|
+
const releasers = [];
|
|
639
|
+
const acquire = async (lockId) => {
|
|
640
|
+
releasers.push(await acquireLock(pmRoot, lockId, settings.locks.ttl_seconds, author, force, governance.force_required_for_stale_lock, settings.locks.wait_ms));
|
|
641
|
+
};
|
|
642
|
+
let plan;
|
|
643
|
+
try {
|
|
644
|
+
await acquire(PROFILE_TYPES_LOCK_ID);
|
|
645
|
+
await acquire(PROFILE_STATUSES_LOCK_ID);
|
|
646
|
+
await acquire(PROFILE_FIELDS_LOCK_ID);
|
|
647
|
+
const state = await loadProfileCurrentState(pmRoot, schema, settings, profile);
|
|
648
|
+
plan = planProfile(profile, state);
|
|
649
|
+
if (plan.types.changed) {
|
|
650
|
+
const typesPath = filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);
|
|
651
|
+
await writeFileAtomic(typesPath, serializeItemTypesFile(plan.types.file));
|
|
652
|
+
const stagedNames = new Set(profile.types.map((type) => normalizeAddTypeInput(type).name));
|
|
653
|
+
const stagedDefinitions = plan.types.file.definitions.filter((definition) => stagedNames.has(definition.name));
|
|
654
|
+
await ensureTypeFolderScaffold(pmRoot, stagedDefinitions, warnings, "profile:apply-type-folder");
|
|
655
|
+
warnings.push(...await runActiveOnWriteHooks({ path: typesPath, scope: "project", op: "profile:apply-types" }));
|
|
656
|
+
}
|
|
657
|
+
if (plan.statuses.changed) {
|
|
658
|
+
const statusesPath = filePathForSchemaSection(pmRoot, schema.files.statuses, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses);
|
|
659
|
+
await writeFileAtomic(statusesPath, serializeStatusDefsFile(plan.statuses.file));
|
|
660
|
+
warnings.push(...await runActiveOnWriteHooks({ path: statusesPath, scope: "project", op: "profile:apply-statuses" }));
|
|
661
|
+
}
|
|
662
|
+
if (plan.fields.changed) {
|
|
663
|
+
const fieldsPath = filePathForSchemaSection(pmRoot, schema.files.fields, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields);
|
|
664
|
+
await writeFileAtomic(fieldsPath, serializeFieldsFile(plan.fields.file));
|
|
665
|
+
warnings.push(...await runActiveOnWriteHooks({ path: fieldsPath, scope: "project", op: "profile:apply-fields" }));
|
|
666
|
+
}
|
|
667
|
+
if (plan.config.changed || plan.workflows.changed) {
|
|
668
|
+
for (const change of plan.config.changes) {
|
|
669
|
+
if (change.status === "unchanged") {
|
|
670
|
+
continue;
|
|
671
|
+
}
|
|
672
|
+
const descriptor = resolveNestedSettingDescriptor(change.key);
|
|
673
|
+
if (descriptor !== void 0) {
|
|
674
|
+
writeNestedSettingValue(settings, descriptor, change.value);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
settings.schema.type_workflows = plan.workflows.result;
|
|
678
|
+
await writeSettings(pmRoot, settings, "profile:apply-config");
|
|
679
|
+
}
|
|
680
|
+
for (const change of plan.templates.changes) {
|
|
681
|
+
if (change.status === "unchanged") {
|
|
682
|
+
continue;
|
|
683
|
+
}
|
|
684
|
+
await runTemplatesSave(change.name, { ...change.options }, global2);
|
|
685
|
+
}
|
|
686
|
+
} finally {
|
|
687
|
+
for (const release of releasers.reverse()) {
|
|
688
|
+
try {
|
|
689
|
+
await release();
|
|
690
|
+
} catch {
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
return buildApplyResult(profile, plan, plan.changed, false, warnings);
|
|
695
|
+
}
|
|
696
|
+
function planProfile(profile, state) {
|
|
697
|
+
try {
|
|
698
|
+
return planProfileApplication(profile, state);
|
|
699
|
+
} catch (error) {
|
|
700
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
function formatDimensionLine(label, dimension) {
|
|
704
|
+
const segments = [];
|
|
705
|
+
if (dimension.added.length > 0) {
|
|
706
|
+
segments.push(`+${dimension.added.join(", ")}`);
|
|
707
|
+
}
|
|
708
|
+
if (dimension.updated.length > 0) {
|
|
709
|
+
segments.push(`~${dimension.updated.join(", ")}`);
|
|
710
|
+
}
|
|
711
|
+
if (segments.length === 0) {
|
|
712
|
+
return void 0;
|
|
713
|
+
}
|
|
714
|
+
return ` ${label}: ${segments.join(" ")}`;
|
|
715
|
+
}
|
|
716
|
+
function formatProfileListHuman(result) {
|
|
717
|
+
const lines = ["Project profiles:"];
|
|
718
|
+
for (const profile of result.profiles) {
|
|
719
|
+
const origin = profile.source === "extension" ? ` [${profile.package ?? "extension"}]` : "";
|
|
720
|
+
lines.push(` ${profile.name} \u2014 ${profile.title}: ${profile.summary}${origin}`);
|
|
721
|
+
}
|
|
722
|
+
for (const warning of result.warnings) {
|
|
723
|
+
lines.push(` warning: ${warning}`);
|
|
724
|
+
}
|
|
725
|
+
return lines.join("\n");
|
|
726
|
+
}
|
|
727
|
+
function formatProfileShowHuman(result) {
|
|
728
|
+
const origin = result.source === "extension" ? ` [${result.package ?? "extension"}]` : "";
|
|
729
|
+
const lines = [`${result.name} \u2014 ${result.title}${origin}`, result.summary, ""];
|
|
730
|
+
lines.push(`types: ${result.types.join(", ") || "(none)"}`);
|
|
731
|
+
lines.push(`statuses: ${result.statuses.join(", ") || "(none)"}`);
|
|
732
|
+
lines.push(`fields: ${result.fields.join(", ") || "(none)"}`);
|
|
733
|
+
lines.push(`workflows: ${result.workflows.join(", ") || "(none)"}`);
|
|
734
|
+
lines.push(`config: ${result.config.join(", ") || "(none)"}`);
|
|
735
|
+
lines.push(`templates: ${result.templates.join(", ") || "(none)"}`);
|
|
736
|
+
lines.push(`packages: ${result.packages.map((pkg) => pkg.spec).join(", ") || "(none)"}`);
|
|
737
|
+
for (const warning of result.warnings) {
|
|
738
|
+
lines.push(`warning: ${warning}`);
|
|
739
|
+
}
|
|
740
|
+
return lines.join("\n");
|
|
741
|
+
}
|
|
742
|
+
function formatProfileLintHuman(result) {
|
|
743
|
+
const origin = result.source === "extension" ? ` [${result.package ?? "extension"}]` : "";
|
|
744
|
+
const totalWarningCount = result.warning_count + result.warnings.length;
|
|
745
|
+
const verdict = result.ok ? `Profile ${result.name}${origin}: ok (${totalWarningCount} warning${totalWarningCount === 1 ? "" : "s"})` : `Profile ${result.name}${origin}: ${result.error_count} error${result.error_count === 1 ? "" : "s"}, ${totalWarningCount} warning${totalWarningCount === 1 ? "" : "s"}`;
|
|
746
|
+
const lines = [verdict];
|
|
747
|
+
for (const finding of result.findings) {
|
|
748
|
+
const target = finding.target !== void 0 ? ` (${finding.target})` : "";
|
|
749
|
+
lines.push(` ${finding.severity} [${finding.code}] ${finding.dimension}${target}: ${finding.message}`);
|
|
750
|
+
}
|
|
751
|
+
for (const warning of result.warnings) {
|
|
752
|
+
lines.push(` warning: ${warning}`);
|
|
753
|
+
}
|
|
754
|
+
return lines.join("\n");
|
|
755
|
+
}
|
|
756
|
+
function formatProfileApplyHuman(result) {
|
|
757
|
+
const mode = result.dry_run ? "dry-run" : result.applied ? "applied" : "no changes";
|
|
758
|
+
const lines = [`Profile ${result.name} (${mode})`];
|
|
759
|
+
if (!result.changed) {
|
|
760
|
+
lines.push(" already up to date");
|
|
761
|
+
} else {
|
|
762
|
+
for (const [label, dimension] of [
|
|
763
|
+
["types", result.types],
|
|
764
|
+
["statuses", result.statuses],
|
|
765
|
+
["fields", result.fields],
|
|
766
|
+
["workflows", result.workflows],
|
|
767
|
+
["config", result.config],
|
|
768
|
+
["templates", result.templates]
|
|
769
|
+
]) {
|
|
770
|
+
const line = formatDimensionLine(label, dimension);
|
|
771
|
+
if (line !== void 0) {
|
|
772
|
+
lines.push(line);
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
const recommended = result.packages.filter((pkg) => pkg.status === "recommended");
|
|
777
|
+
if (recommended.length > 0) {
|
|
778
|
+
lines.push(` recommended packages: ${recommended.map((pkg) => pkg.spec).join(", ")}`);
|
|
779
|
+
}
|
|
780
|
+
for (const warning of result.warnings) {
|
|
781
|
+
lines.push(` warning: ${warning}`);
|
|
782
|
+
}
|
|
783
|
+
return lines.join("\n");
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
export {
|
|
787
|
+
describeProfileComposition,
|
|
788
|
+
describeProjectProfile,
|
|
789
|
+
planProfileApplication,
|
|
790
|
+
loadCreateTemplateOptions,
|
|
791
|
+
runTemplatesSave,
|
|
792
|
+
runTemplatesList,
|
|
793
|
+
runTemplatesShow,
|
|
794
|
+
PROFILE_SUBCOMMANDS,
|
|
795
|
+
runProfileList,
|
|
796
|
+
runProfileShow,
|
|
797
|
+
runProfileLint,
|
|
798
|
+
runProfileApply,
|
|
799
|
+
formatProfileListHuman,
|
|
800
|
+
formatProfileShowHuman,
|
|
801
|
+
formatProfileLintHuman,
|
|
802
|
+
formatProfileApplyHuman
|
|
803
|
+
};
|
|
804
|
+
//# sourceMappingURL=chunk-IDIBF4E2.js.map
|