@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../core/extensions/index.ts","../../../../../../../../core/shared/errors.ts","../../../../../../../../core/shared/serialization.ts","../../../../../../../../core/store/settings-validator.ts","../../../../../../../../core/validate/estimate-defaults.ts","../../../../../../../../core/store/settings-read-cache.ts","../../../../../../../../core/store/settings.ts"],"sourcesContent":["/**\n * @module core/extensions/index\n *\n * Implements extension runtime contracts and governance for Index.\n */\nimport {\n runCommandHandler,\n runCommandOverride,\n runOnIndexHooks,\n runParserOverride,\n runPreflightOverride,\n runOnReadHooks,\n runRendererOverride,\n runServiceOverride,\n runServiceOverrideSync,\n runOnWriteHooks,\n type CommandHandlerContext,\n type CommandHandlerResult,\n type CommandOverrideContext,\n type CommandOverrideResult,\n type ExtensionCommandRegistry,\n type ExtensionHookRegistry,\n type ExtensionParserRegistry,\n type ExtensionPreflightRegistry,\n type ExtensionRegistrationRegistry,\n type ExtensionRendererRegistry,\n type ExtensionServiceName,\n type ExtensionServiceRegistry,\n type AfterCommandAffectedItem,\n type OnIndexHookContext,\n type OnReadHookContext,\n type OnWriteHookContext,\n type OutputRendererFormat,\n type ParserOverrideContext,\n type ParserOverrideResult,\n type PreflightOverrideContext,\n type PreflightOverrideResult,\n type RendererOverrideResult,\n type ServiceOverrideResult,\n} from \"./loader.js\";\nimport type { ItemFrontMatter } from \"../../types/index.js\";\n\nlet activeExtensionHooks: ExtensionHookRegistry | null = null;\nlet activeExtensionCommands: ExtensionCommandRegistry | null = null;\nlet activeExtensionParsers: ExtensionParserRegistry | null = null;\nlet activeExtensionPreflight: ExtensionPreflightRegistry | null = null;\nlet activeExtensionServices: ExtensionServiceRegistry | null = null;\nlet activeExtensionRenderers: ExtensionRendererRegistry | null = null;\nlet activeExtensionRegistrations: ExtensionRegistrationRegistry | null = null;\nlet activeCommandContext: Omit<CommandOverrideContext, \"result\"> | null = null;\nlet activeCommandResult: unknown = undefined;\nlet activeAfterCommandAffectedItems: AfterCommandAffectedItem[] = [];\nconst AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS = new Set([\n \"body\",\n \"comments\",\n \"dependencies\",\n \"docs\",\n \"events\",\n \"files\",\n \"learnings\",\n \"notes\",\n \"reminders\",\n \"test_runs\",\n \"tests\",\n]);\n\n/**\n * Implements set active extension hooks for the public runtime surface of this module.\n */\nexport function setActiveExtensionHooks(hooks: ExtensionHookRegistry | null): void {\n activeExtensionHooks = hooks;\n}\n\n/**\n * Implements set active extension commands for the public runtime surface of this module.\n */\nexport function setActiveExtensionCommands(commands: ExtensionCommandRegistry | null): void {\n activeExtensionCommands = commands;\n}\n\n/**\n * Implements set active extension parsers for the public runtime surface of this module.\n */\nexport function setActiveExtensionParsers(parsers: ExtensionParserRegistry | null): void {\n activeExtensionParsers = parsers;\n}\n\n/**\n * Implements set active extension preflight for the public runtime surface of this module.\n */\nexport function setActiveExtensionPreflight(preflight: ExtensionPreflightRegistry | null): void {\n activeExtensionPreflight = preflight;\n}\n\n/**\n * Implements set active extension services for the public runtime surface of this module.\n */\nexport function setActiveExtensionServices(services: ExtensionServiceRegistry | null): void {\n activeExtensionServices = services;\n}\n\n/**\n * Implements set active extension renderers for the public runtime surface of this module.\n */\nexport function setActiveExtensionRenderers(renderers: ExtensionRendererRegistry | null): void {\n activeExtensionRenderers = renderers;\n}\n\n/**\n * Implements set active extension registrations for the public runtime surface of this module.\n */\nexport function setActiveExtensionRegistrations(registrations: ExtensionRegistrationRegistry | null): void {\n activeExtensionRegistrations = registrations;\n}\n\n/**\n * Implements get active extension registrations for the public runtime surface of this module.\n */\nexport function getActiveExtensionRegistrations(): ExtensionRegistrationRegistry | null {\n return activeExtensionRegistrations;\n}\n\n/**\n * Implements set active command context for the public runtime surface of this module.\n */\nexport function setActiveCommandContext(context: Omit<CommandOverrideContext, \"result\"> | null): void {\n activeCommandContext = context;\n}\n\n/**\n * Implements set active command result for the public runtime surface of this module.\n */\nexport function setActiveCommandResult(result: unknown): void {\n activeCommandResult = result;\n}\n\n/**\n * Implements get active command result for the public runtime surface of this module.\n */\nexport function getActiveCommandResult(): unknown {\n return activeCommandResult;\n}\n\n/**\n * Implements record after command affected item for the public runtime surface of this module.\n */\nexport function recordAfterCommandAffectedItem(item: AfterCommandAffectedItem): void {\n if (!item || (activeExtensionHooks?.afterCommand?.length ?? 0) === 0) {\n return;\n }\n activeAfterCommandAffectedItems.push(item);\n}\n\n/**\n * Implements project after command item snapshot for the public runtime surface of this module.\n */\nexport function projectAfterCommandItemSnapshot(\n metadata: ItemFrontMatter,\n changedFields: readonly string[],\n): Partial<ItemFrontMatter> {\n if (!metadata || !metadata.id) {\n return {};\n }\n const snapshot: Record<string, unknown> = {\n id: metadata.id,\n type: metadata.type,\n status: metadata.status,\n };\n if (!Array.isArray(changedFields)) {\n return snapshot as Partial<ItemFrontMatter>;\n }\n const source = metadata as unknown as Record<string, unknown>;\n for (const field of changedFields) {\n if (typeof field !== \"string\") {\n continue;\n }\n const actualField = field.startsWith(\"unset:\") ? field.slice(\"unset:\".length) : field;\n if (\n actualField === \"id\" ||\n actualField === \"type\" ||\n actualField === \"status\" ||\n AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS.has(actualField)\n ) {\n continue;\n }\n if (Object.hasOwn(source, actualField) && source[actualField] !== undefined) {\n snapshot[actualField] = source[actualField];\n }\n }\n return snapshot as Partial<ItemFrontMatter>;\n}\n\n/**\n * Implements consume after command affected items for the public runtime surface of this module.\n */\nexport function consumeAfterCommandAffectedItems(): AfterCommandAffectedItem[] | undefined {\n if (activeAfterCommandAffectedItems.length === 0) {\n return undefined;\n }\n const affected = activeAfterCommandAffectedItems;\n activeAfterCommandAffectedItems = [];\n return affected;\n}\n\n/**\n * Implements clear active extension hooks for the public runtime surface of this module.\n */\nexport function clearActiveExtensionHooks(): void {\n activeExtensionHooks = null;\n activeExtensionCommands = null;\n activeExtensionParsers = null;\n activeExtensionPreflight = null;\n activeExtensionServices = null;\n activeExtensionRenderers = null;\n activeExtensionRegistrations = null;\n activeCommandContext = null;\n activeCommandResult = undefined;\n activeAfterCommandAffectedItems = [];\n}\n\n/**\n * Implements run active on write hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnWriteHooks(context: OnWriteHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnWriteHooks(activeExtensionHooks, context);\n}\n\n/**\n * Implements run active on read hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnReadHooks(context: OnReadHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnReadHooks(activeExtensionHooks, context);\n}\n\n/**\n * Synchronous fast-path predicate: true only when at least one onRead hook is\n * registered. Bulk readers (e.g. the metadata cache scanning hundreds of files)\n * use this to skip per-file `await runActiveOnReadHooks(...)` calls entirely when\n * no extension observes reads, avoiding hundreds of needless microtasks.\n */\nexport function hasActiveOnReadHooks(): boolean {\n return (activeExtensionHooks?.onRead?.length ?? 0) > 0;\n}\n\n/**\n * Implements run active on index hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnIndexHooks(context: OnIndexHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnIndexHooks(activeExtensionHooks, context);\n}\n\n/**\n * Implements run active command override for the public runtime surface of this module.\n */\nexport function runActiveCommandOverride(result: unknown): CommandOverrideResult {\n if (!activeExtensionCommands || !activeCommandContext) {\n return {\n overridden: false,\n result,\n warnings: [],\n };\n }\n return runCommandOverride(activeExtensionCommands, {\n command: activeCommandContext.command,\n args: [...activeCommandContext.args],\n options: activeCommandContext.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext.pm_root,\n result,\n });\n}\n\n/**\n * Implements run active command handler for the public runtime surface of this module.\n */\nexport async function runActiveCommandHandler(context: CommandHandlerContext): Promise<CommandHandlerResult> {\n if (!activeExtensionCommands) {\n return {\n handled: false,\n result: null,\n warnings: [],\n };\n }\n return runCommandHandler(activeExtensionCommands, context);\n}\n\n/**\n * Implements run active parser override for the public runtime surface of this module.\n */\nexport async function runActiveParserOverride(context: ParserOverrideContext): Promise<ParserOverrideResult> {\n if (!activeExtensionParsers) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n warnings: [],\n };\n }\n return runParserOverride(activeExtensionParsers, context);\n}\n\n/**\n * Implements run active preflight override for the public runtime surface of this module.\n */\nexport async function runActivePreflightOverride(context: PreflightOverrideContext): Promise<PreflightOverrideResult> {\n if (!activeExtensionPreflight) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n decision: { ...context.decision },\n warnings: [],\n };\n }\n return runPreflightOverride(activeExtensionPreflight, context);\n}\n\n/**\n * Implements run active renderer override for the public runtime surface of this module.\n */\nexport function runActiveRendererOverride(format: OutputRendererFormat, result: unknown): RendererOverrideResult {\n if (!activeExtensionRenderers) {\n return {\n overridden: false,\n rendered: null,\n warnings: [],\n };\n }\n return runRendererOverride(activeExtensionRenderers, {\n format,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext?.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext?.pm_root,\n result,\n });\n}\n\nfunction buildServiceContext(service: ExtensionServiceName, payload: unknown) {\n return {\n service,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext?.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext?.pm_root,\n payload,\n };\n}\n\n/**\n * Implements run active service override for the public runtime surface of this module.\n */\nexport async function runActiveServiceOverride(\n service: ExtensionServiceName,\n payload: unknown,\n): Promise<ServiceOverrideResult> {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverride(activeExtensionServices, buildServiceContext(service, payload));\n}\n\n/**\n * Implements run active service override sync for the public runtime surface of this module.\n */\nexport function runActiveServiceOverrideSync(service: ExtensionServiceName, payload: unknown): ServiceOverrideResult {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));\n}\n\nexport * from \"./loader.js\";\nexport {\n EXTENSION_CAPABILITY_REGISTRATION_SURFACES,\n collectUsedExtensionCapabilities,\n reconcileExtensionCapabilityUsage,\n type CollectUsedExtensionCapabilitiesOptions,\n type ExtensionCapabilityUsageReconciliation,\n} from \"./capability-usage.js\";\n","/**\n * @module core/shared/errors\n *\n * Provides shared primitives and utilities for Errors.\n */\n/**\n * Carries structured recovery guidance attached to expected pm CLI errors.\n */\nexport interface PmCliErrorRecoveryPayload {\n recovery_mode?: \"compact\";\n attempted_command?: string;\n normalized_args?: string[];\n provided_fields?: string[];\n missing?: string[];\n missing_required_fields?: string[];\n suggested_flags?: string[];\n suggested_retry?: string;\n retry_after_ms?: number;\n fallback_candidates?: Array<{\n source: string;\n command: string;\n reason: string;\n }>;\n next_best_command?: string;\n}\n\n/**\n * Documents the pm cli error context payload exchanged by command, SDK, and package integrations.\n */\nexport interface PmCliErrorContext {\n code?: string;\n type?: string;\n required?: string;\n why?: string;\n examples?: string[];\n nextSteps?: string[];\n recovery?: PmCliErrorRecoveryPayload;\n}\n\n/**\n * Implements the exported pm cli error runtime abstraction for core/shared/errors.ts.\n */\nexport class PmCliError extends Error {\n public readonly exitCode: number;\n public readonly context: PmCliErrorContext;\n\n constructor(message: string, exitCode: number, context: PmCliErrorContext = {}) {\n super(message);\n this.name = \"PmCliError\";\n this.exitCode = exitCode;\n this.context = context;\n }\n}\n","/**\n * @module core/shared/serialization\n *\n * Provides shared primitives and utilities for Serialization.\n */\nimport crypto from \"node:crypto\";\n\ntype JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue };\n\nfunction sortScalarValue(value: unknown): JsonValue | undefined {\n if (value === null) return null;\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return value;\n }\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n if (value === undefined) {\n return \"undefined\";\n }\n if (typeof value === \"symbol\") {\n return value.toString();\n }\n if (typeof value === \"function\") {\n return `[function:${value.name || \"anonymous\"}]`;\n }\n return undefined;\n}\n\nfunction sortPlainObjectKeys(value: Record<string, unknown>): Record<string, JsonValue> {\n // Use locale-independent Unicode code-unit ordering so canonical hashes stay reproducible.\n const sortedKeys = Object.keys(value).sort();\n const result: Record<string, JsonValue> = {};\n for (const key of sortedKeys) {\n const nested = value[key];\n if (nested === undefined) {\n continue;\n }\n result[key] = sortObjectKeys(nested);\n }\n return result;\n}\n\nfunction sortObjectKeys(value: unknown): JsonValue {\n const scalarValue = sortScalarValue(value);\n if (scalarValue !== undefined) {\n return scalarValue;\n }\n if (Array.isArray(value)) {\n return value.map((entry) => sortObjectKeys(entry));\n }\n if (value instanceof Date) {\n return value.toISOString();\n }\n const maybeJson = value as { toJSON?: () => unknown };\n if (typeof maybeJson.toJSON === \"function\") {\n const normalized = maybeJson.toJSON();\n if (normalized !== value) {\n return sortObjectKeys(normalized);\n }\n }\n return sortPlainObjectKeys(value as Record<string, unknown>);\n}\n\n/**\n * Implements stable stringify for the public runtime surface of this module.\n */\nexport function stableStringify(value: unknown): string {\n return JSON.stringify(sortObjectKeys(value));\n}\n\nfunction hasUnmatchedEquivalent<T>(\n leftValue: T,\n rightValues: readonly T[],\n matchedIndexes: Set<number>,\n equals: (leftEntry: T, rightEntry: T) => boolean,\n): boolean {\n for (let index = 0; index < rightValues.length; index += 1) {\n if (matchedIndexes.has(index)) {\n continue;\n }\n if (equals(leftValue, rightValues[index] as T)) {\n matchedIndexes.add(index);\n return true;\n }\n }\n return false;\n}\n\nfunction compareRegExpValues(left: unknown, right: unknown): boolean | undefined {\n if (!(left instanceof RegExp || right instanceof RegExp)) {\n return undefined;\n }\n return left instanceof RegExp && right instanceof RegExp && left.toString() === right.toString();\n}\n\nfunction compareDateValues(left: unknown, right: unknown): boolean | undefined {\n if (!(left instanceof Date || right instanceof Date)) {\n return undefined;\n }\n return left instanceof Date && right instanceof Date && left.getTime() === right.getTime();\n}\n\nfunction compareSetValues(left: unknown, right: unknown): boolean | undefined {\n if (!(left instanceof Set || right instanceof Set)) {\n return undefined;\n }\n if (!(left instanceof Set && right instanceof Set) || left.size !== right.size) {\n return false;\n }\n const rightValues = [...right];\n const matched = new Set<number>();\n for (const leftValue of left) {\n if (!hasUnmatchedEquivalent(leftValue, rightValues, matched, stableValueEquals)) {\n return false;\n }\n }\n return true;\n}\n\nfunction compareMapValues(left: unknown, right: unknown): boolean | undefined {\n if (!(left instanceof Map || right instanceof Map)) {\n return undefined;\n }\n if (!(left instanceof Map && right instanceof Map) || left.size !== right.size) {\n return false;\n }\n const rightEntries = [...right.entries()];\n const matched = new Set<number>();\n for (const [leftKey, leftValue] of left.entries()) {\n const leftEntry: [unknown, unknown] = [leftKey, leftValue];\n if (\n !hasUnmatchedEquivalent(leftEntry, rightEntries, matched, ([candidateKey, candidateValue], [rightKey, rightValue]) =>\n stableValueEquals(candidateKey, rightKey) && stableValueEquals(candidateValue, rightValue),\n )\n ) {\n return false;\n }\n }\n return true;\n}\n\nfunction compareArrayValues(left: unknown, right: unknown): boolean | undefined {\n if (!(Array.isArray(left) || Array.isArray(right))) {\n return undefined;\n }\n if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) {\n return false;\n }\n return left.every((value, index) => stableValueEquals(value, right[index]));\n}\n\nfunction comparePlainObjectValues(left: object, right: object): boolean {\n const leftKeys = Object.keys(left).sort((a, b) => a.localeCompare(b));\n const rightKeys = Object.keys(right).sort((a, b) => a.localeCompare(b));\n if (leftKeys.length !== rightKeys.length) {\n return false;\n }\n for (let index = 0; index < leftKeys.length; index += 1) {\n const leftKey = leftKeys[index]!;\n if (leftKey !== rightKeys[index]) {\n return false;\n }\n if (!stableValueEquals((left as Record<string, unknown>)[leftKey], (right as Record<string, unknown>)[leftKey])) {\n return false;\n }\n }\n return true;\n}\n\nconst SPECIALIZED_STABLE_VALUE_COMPARISONS = [\n compareRegExpValues,\n compareDateValues,\n compareSetValues,\n compareMapValues,\n compareArrayValues,\n] as const;\n\n/**\n * Implements stable value equals for the public runtime surface of this module.\n */\nexport function stableValueEquals(left: unknown, right: unknown): boolean {\n if (Object.is(left, right)) {\n return true;\n }\n if (left === null || right === null || typeof left !== \"object\" || typeof right !== \"object\") {\n return false;\n }\n for (const compare of SPECIALIZED_STABLE_VALUE_COMPARISONS) {\n const result = compare(left, right);\n if (result !== undefined) {\n return result;\n }\n }\n return comparePlainObjectValues(left, right);\n}\n\n/**\n * Implements sha256 hex for the public runtime surface of this module.\n */\nexport function sha256Hex(value: string): string {\n return crypto.createHash(\"sha256\").update(value, \"utf8\").digest(\"hex\");\n}\n\n/**\n * Implements order object for the public runtime surface of this module.\n */\nexport function orderObject<T extends Record<string, unknown>>(\n value: T,\n keyOrder: ReadonlyArray<string>,\n): Record<string, unknown> {\n const ordered: Record<string, unknown> = {};\n\n for (const key of keyOrder) {\n const entry = value[key];\n if (entry !== undefined) {\n ordered[key] = entry;\n }\n }\n\n const unknownKeys = Object.keys(value)\n .filter((key) => !keyOrder.includes(key))\n .sort((a, b) => a.localeCompare(b));\n\n for (const key of unknownKeys) {\n const entry = value[key];\n if (entry !== undefined) {\n ordered[key] = entry;\n }\n }\n\n return ordered;\n}\n","/**\n * Dependency-free settings validator.\n *\n * Mirrors the previous `zod` schema for `settings.json` exactly (type checks,\n * required-vs-optional fields, integer/positive constraints, literal unions, and\n * unknown-key stripping with all-or-nothing failure semantics) without paying\n * the ~85ms cost of importing `zod` on every command's hot read path.\n *\n * The validator intentionally reproduces the zod schema's shape — including\n * fields that `PmSettings` carries but the schema does not (e.g. `search.tuning`)\n * are stripped here just as zod stripped them — so settings behavior is\n * byte-identical to the previous implementation.\n */\nimport {\n GOVERNANCE_PRESET_VALUES,\n RUNTIME_FIELD_COMMAND_VALUES,\n RUNTIME_FIELD_TYPE_VALUES,\n RUNTIME_STATUS_ROLE_VALUES,\n RUNTIME_UNKNOWN_FIELD_POLICY_VALUES,\n} from \"../../types.js\";\nimport type {\n AgentGuidanceSettings,\n ExtensionPolicySettings,\n GovernanceSettings,\n ItemTypeDefinition,\n RuntimeSchemaSettings,\n} from \"../../types.js\";\nimport type { PmMaxVersionExceededModeSetting } from \"../extensions/extension-types.js\";\n\n/** Validated, unknown-key-stripped settings input (pre-merge), matching the legacy zod inference. */\nexport interface ParsedSettings {\n version: number;\n id_prefix: string;\n author_default: string;\n item_format?: \"toon\" | \"json_markdown\";\n locks: { ttl_seconds: number; wait_ms?: number };\n checkpoints?: { retention_days?: number };\n output: { default_format: \"toon\" | \"json\" };\n history?: {\n missing_stream: \"auto_create\" | \"strict_error\";\n compact_policy?: {\n enabled?: boolean;\n max_entries?: number;\n trigger?: \"health_warn\" | \"auto\";\n };\n };\n validation?: {\n sprint_release_format: \"warn\" | \"strict_error\";\n parent_reference?: \"warn\" | \"strict_error\";\n metadata_profile?: \"core\" | \"strict\" | \"custom\";\n metadata_required_fields?: string[];\n lifecycle_stale_blocker_reason_patterns?: string[];\n lifecycle_closure_like_blocked_reason_patterns?: string[];\n lifecycle_closure_like_resolution_patterns?: string[];\n lifecycle_closure_like_actual_result_patterns?: string[];\n estimate_defaults_by_type?: Record<string, number>;\n };\n governance?: Partial<GovernanceSettings>;\n workflow?: { definition_of_done: string[] };\n testing?: { record_results_to_items: boolean };\n telemetry?: {\n enabled: boolean;\n first_run_prompt_completed?: boolean;\n capture_level?: \"minimal\" | \"redacted\" | \"max\";\n endpoint?: string;\n installation_id?: string;\n retention_days?: number;\n };\n agent_guidance?: Partial<AgentGuidanceSettings>;\n item_types?: { definitions: ItemTypeDefinition[] };\n schema?: Partial<RuntimeSchemaSettings>;\n context?: {\n default_depth?: \"brief\" | \"standard\" | \"deep\";\n activity_limit?: number;\n stale_threshold_days?: number;\n sections?: {\n hierarchy?: boolean;\n activity?: boolean;\n progress?: boolean;\n blockers?: boolean;\n files?: boolean;\n workload?: boolean;\n staleness?: boolean;\n tests?: boolean;\n };\n };\n extensions: {\n enabled: string[];\n disabled: string[];\n policy?: Partial<ExtensionPolicySettings> & {\n pm_max_version_exceeded_mode?: PmMaxVersionExceededModeSetting;\n };\n };\n search: {\n score_threshold: number;\n hybrid_semantic_weight?: number;\n max_results: number;\n embedding_model: string;\n embedding_corpus_max_characters?: number;\n embedding_batch_size: number;\n embedding_timeout_ms?: number;\n scanner_max_batch_retries: number;\n provider?: string;\n corpus_fields?: string[];\n mutation_refresh_policy?: \"cache_only\" | \"semantic_configured\" | \"semantic_auto\";\n query_expansion?: {\n enabled?: boolean;\n provider?: string;\n };\n rerank?: {\n enabled?: boolean;\n model?: string;\n top_k?: number;\n };\n bm25?: {\n k1?: number;\n b?: number;\n };\n };\n providers: {\n openai: { base_url: string; api_key: string; model: string };\n ollama: { base_url: string; model: string };\n };\n vector_store: {\n adapter?: string;\n collection_name?: string;\n qdrant: { url: string; api_key: string };\n lancedb: { path: string };\n };\n}\n\n/**\n * Restricts settings validation result values accepted by command, SDK, and storage contracts.\n */\nexport type SettingsValidationResult = { success: true; data: ParsedSettings } | { success: false };\n\ntype Outcome<T> = { ok: true; value: T } | { ok: false };\ntype Check<T> = (input: unknown) => Outcome<T>;\n\n// Generic over `never` so it is assignable to every `Outcome<T>`.\nconst FAIL: Outcome<never> = { ok: false };\n\nconst vString: Check<string> = (input) => (typeof input === \"string\" ? { ok: true, value: input } : FAIL);\nconst vBoolean: Check<boolean> = (input) => (typeof input === \"boolean\" ? { ok: true, value: input } : FAIL);\n\nfunction vNumber(options: { int?: boolean; positive?: boolean; min?: number } = {}): Check<number> {\n return (input) => {\n // `Number.isFinite` rejects non-numbers, NaN, and ±Infinity in one check.\n if (typeof input !== \"number\" || !Number.isFinite(input)) {\n return FAIL;\n }\n if (options.int && (!Number.isInteger(input) || !Number.isSafeInteger(input))) {\n return FAIL;\n }\n if (options.positive && input <= 0) {\n return FAIL;\n }\n if (typeof options.min === \"number\" && input < options.min) {\n return FAIL;\n }\n return { ok: true, value: input };\n };\n}\n\nfunction vLiteral<const T extends string>(...allowed: readonly T[]): Check<T> {\n return (input) =>\n typeof input === \"string\" && (allowed as readonly string[]).includes(input)\n ? { ok: true, value: input as T }\n : FAIL;\n}\n\nfunction vArray<T>(item: Check<T>): Check<T[]> {\n return (input) => {\n if (!Array.isArray(input)) {\n return FAIL;\n }\n const value: T[] = [];\n for (const element of input) {\n const result = item(element);\n if (!result.ok) {\n return FAIL;\n }\n value.push(result.value);\n }\n return { ok: true, value };\n };\n}\n\nfunction vOptional<T>(inner: Check<T>): Check<T | undefined> {\n return (input) => (input === undefined ? { ok: true, value: undefined } : inner(input));\n}\n\n/**\n * A plain object with arbitrary string keys whose values each pass `valueCheck`.\n * Rejects arrays and null. Used for free-form maps like\n * `validation.estimate_defaults_by_type` (item-type -> default minutes).\n */\nfunction vRecordOf<T>(valueCheck: Check<T>): Check<Record<string, T>> {\n return (input) => {\n if (typeof input !== \"object\" || input === null || Array.isArray(input)) {\n return FAIL;\n }\n const value: Record<string, T> = {};\n for (const [key, raw] of Object.entries(input as Record<string, unknown>)) {\n const result = valueCheck(raw);\n if (!result.ok) {\n return FAIL;\n }\n value[key] = result.value;\n }\n return { ok: true, value };\n };\n}\n\nfunction vObject(shape: Record<string, Check<unknown>>): Check<Record<string, unknown>> {\n return (input) => {\n if (typeof input !== \"object\" || input === null || Array.isArray(input)) {\n return FAIL;\n }\n const record = input as Record<string, unknown>;\n const value: Record<string, unknown> = {};\n for (const [key, check] of Object.entries(shape)) {\n const result = check(record[key]);\n if (!result.ok) {\n return FAIL;\n }\n // Mirror zod: absent optional keys are omitted; unknown keys are dropped.\n if (result.value !== undefined) {\n value[key] = result.value;\n }\n }\n return { ok: true, value };\n };\n}\n\nconst itemTypeOption = vObject({\n key: vString,\n values: vArray(vString),\n required: vOptional(vBoolean),\n aliases: vOptional(vArray(vString)),\n description: vOptional(vString),\n});\n\nconst itemTypeCommandOptionPolicy = vObject({\n command: vLiteral(\"create\", \"update\"),\n option: vString,\n required: vOptional(vBoolean),\n visible: vOptional(vBoolean),\n enabled: vOptional(vBoolean),\n});\n\nconst itemTypeDefinition = vObject({\n name: vString,\n description: vOptional(vString),\n // Per-type create-time default status (config-driven); preserved so inline\n // settings.item_types.definitions behave identically to schema/types.json.\n default_status: vOptional(vString),\n folder: vOptional(vString),\n aliases: vOptional(vArray(vString)),\n required_create_fields: vOptional(vArray(vString)),\n required_create_repeatables: vOptional(vArray(vString)),\n options: vOptional(vArray(itemTypeOption)),\n command_option_policies: vOptional(vArray(itemTypeCommandOptionPolicy)),\n});\n\nconst runtimeStatusDefinition = vObject({\n id: vString,\n aliases: vOptional(vArray(vString)),\n roles: vOptional(vArray(vLiteral(...RUNTIME_STATUS_ROLE_VALUES))),\n description: vOptional(vString),\n order: vOptional(vNumber()),\n});\n\nconst runtimeFieldDefinition = vObject({\n key: vString,\n metadata_key: vOptional(vString),\n front_matter_key: vOptional(vString),\n cli_flag: vOptional(vString),\n cli_aliases: vOptional(vArray(vString)),\n description: vOptional(vString),\n type: vOptional(vLiteral(...RUNTIME_FIELD_TYPE_VALUES)),\n commands: vOptional(vArray(vLiteral(...RUNTIME_FIELD_COMMAND_VALUES))),\n repeatable: vOptional(vBoolean),\n required: vOptional(vBoolean),\n required_on_create: vOptional(vBoolean),\n required_types: vOptional(vArray(vString)),\n allow_unset: vOptional(vBoolean),\n});\n\nconst statusTransitionPair: Check<[string, string]> = (input) => {\n if (!Array.isArray(input) || input.length !== 2) {\n return FAIL;\n }\n const [from, to] = input;\n if (typeof from !== \"string\" || typeof to !== \"string\") {\n return FAIL;\n }\n return { ok: true, value: [from, to] };\n};\n\nconst typeWorkflowDefinition = vObject({\n type: vString,\n allowed_transitions: vArray(statusTransitionPair),\n});\n\nconst runtimeSchemaSettings = vOptional(\n vObject({\n version: vOptional(vNumber({ int: true })),\n files: vOptional(\n vObject({\n types: vOptional(vString),\n statuses: vOptional(vString),\n fields: vOptional(vString),\n workflows: vOptional(vString),\n }),\n ),\n statuses: vOptional(vArray(runtimeStatusDefinition)),\n fields: vOptional(vArray(runtimeFieldDefinition)),\n workflow: vOptional(\n vObject({\n draft_status: vOptional(vString),\n open_status: vOptional(vString),\n in_progress_status: vOptional(vString),\n blocked_status: vOptional(vString),\n close_status: vOptional(vString),\n canceled_status: vOptional(vString),\n }),\n ),\n type_workflows: vOptional(vArray(typeWorkflowDefinition)),\n unknown_field_policy: vOptional(vLiteral(...RUNTIME_UNKNOWN_FIELD_POLICY_VALUES)),\n }),\n);\n\nconst governanceSettings = vOptional(\n vObject({\n preset: vOptional(vLiteral(...GOVERNANCE_PRESET_VALUES)),\n ownership_enforcement: vOptional(vLiteral(\"none\", \"warn\", \"strict\")),\n create_mode_default: vOptional(vLiteral(\"progressive\", \"strict\")),\n close_validation_default: vOptional(vLiteral(\"off\", \"warn\", \"strict\")),\n require_close_reason: vOptional(vBoolean),\n parent_reference: vOptional(vLiteral(\"warn\", \"strict_error\")),\n metadata_profile: vOptional(vLiteral(\"core\", \"strict\", \"custom\")),\n force_required_for_stale_lock: vOptional(vBoolean),\n create_default_type: vOptional(vString),\n workflow_enforcement: vOptional(vLiteral(\"off\", \"warn\", \"strict\")),\n }),\n);\n\nconst extensionPolicyOverride = vObject({\n name: vString,\n disabled: vOptional(vBoolean),\n require_trusted: vOptional(vBoolean),\n require_provenance: vOptional(vBoolean),\n sandbox_profile: vOptional(vLiteral(\"none\", \"restricted\", \"strict\")),\n allowed_capabilities: vOptional(vArray(vString)),\n blocked_capabilities: vOptional(vArray(vString)),\n allowed_surfaces: vOptional(vArray(vString)),\n blocked_surfaces: vOptional(vArray(vString)),\n allowed_commands: vOptional(vArray(vString)),\n blocked_commands: vOptional(vArray(vString)),\n allowed_actions: vOptional(vArray(vString)),\n blocked_actions: vOptional(vArray(vString)),\n allowed_services: vOptional(vArray(vString)),\n blocked_services: vOptional(vArray(vString)),\n});\n\n// `pm_max_version_exceeded_mode` accepts either a single mode literal or a\n// per-layer override object (pm-k5e8); any other shape fails validation.\nconst pmMaxVersionExceededModeLiteral = vLiteral(\"block\", \"warn\");\nconst pmMaxVersionExceededMode: Check<unknown> = (input) =>\n typeof input === \"string\"\n ? pmMaxVersionExceededModeLiteral(input)\n : vObject({\n global: vOptional(pmMaxVersionExceededModeLiteral),\n project: vOptional(pmMaxVersionExceededModeLiteral),\n })(input);\n\nconst extensionPolicy = vOptional(\n vObject({\n mode: vOptional(vLiteral(\"off\", \"warn\", \"enforce\")),\n trust_mode: vOptional(vLiteral(\"off\", \"warn\", \"enforce\")),\n pm_max_version_exceeded_mode: vOptional(pmMaxVersionExceededMode),\n require_provenance: vOptional(vBoolean),\n trusted_extensions: vOptional(vArray(vString)),\n default_sandbox_profile: vOptional(vLiteral(\"none\", \"restricted\", \"strict\")),\n allowed_extensions: vOptional(vArray(vString)),\n blocked_extensions: vOptional(vArray(vString)),\n allowed_capabilities: vOptional(vArray(vString)),\n blocked_capabilities: vOptional(vArray(vString)),\n allowed_surfaces: vOptional(vArray(vString)),\n blocked_surfaces: vOptional(vArray(vString)),\n allowed_commands: vOptional(vArray(vString)),\n blocked_commands: vOptional(vArray(vString)),\n allowed_actions: vOptional(vArray(vString)),\n blocked_actions: vOptional(vArray(vString)),\n allowed_services: vOptional(vArray(vString)),\n blocked_services: vOptional(vArray(vString)),\n extension_overrides: vOptional(vArray(extensionPolicyOverride)),\n }),\n);\n\nconst settingsCheck = vObject({\n version: vNumber({ int: true }),\n id_prefix: vString,\n author_default: vString,\n item_format: vOptional(vLiteral(\"toon\", \"json_markdown\")),\n locks: vObject({ ttl_seconds: vNumber({ int: true }), wait_ms: vOptional(vNumber({ int: true, min: 0 })) }),\n checkpoints: vOptional(vObject({ retention_days: vOptional(vNumber({ int: true, positive: true })) })),\n output: vObject({ default_format: vLiteral(\"toon\", \"json\") }),\n history: vOptional(\n vObject({\n missing_stream: vLiteral(\"auto_create\", \"strict_error\"),\n compact_policy: vOptional(\n vObject({\n enabled: vOptional(vBoolean),\n max_entries: vOptional(vNumber({ int: true, positive: true })),\n trigger: vOptional(vLiteral(\"health_warn\", \"auto\")),\n }),\n ),\n }),\n ),\n validation: vOptional(\n vObject({\n sprint_release_format: vLiteral(\"warn\", \"strict_error\"),\n parent_reference: vOptional(vLiteral(\"warn\", \"strict_error\")),\n metadata_profile: vOptional(vLiteral(\"core\", \"strict\", \"custom\")),\n metadata_required_fields: vOptional(vArray(vString)),\n lifecycle_stale_blocker_reason_patterns: vOptional(vArray(vString)),\n lifecycle_closure_like_blocked_reason_patterns: vOptional(vArray(vString)),\n lifecycle_closure_like_resolution_patterns: vOptional(vArray(vString)),\n lifecycle_closure_like_actual_result_patterns: vOptional(vArray(vString)),\n estimate_defaults_by_type: vOptional(vRecordOf(vNumber({ int: true, positive: true }))),\n }),\n ),\n governance: governanceSettings,\n workflow: vOptional(vObject({ definition_of_done: vArray(vString) })),\n testing: vOptional(vObject({ record_results_to_items: vBoolean })),\n telemetry: vOptional(\n vObject({\n enabled: vBoolean,\n first_run_prompt_completed: vOptional(vBoolean),\n capture_level: vOptional(vLiteral(\"minimal\", \"redacted\", \"max\")),\n endpoint: vOptional(vString),\n installation_id: vOptional(vString),\n retention_days: vOptional(vNumber({ int: true, positive: true })),\n }),\n ),\n agent_guidance: vOptional(\n vObject({\n prompt_completed: vOptional(vBoolean),\n declined: vOptional(vBoolean),\n declined_at: vOptional(vString),\n template_version: vOptional(vNumber({ int: true, positive: true })),\n last_checked_files: vOptional(vArray(vString)),\n }),\n ),\n item_types: vOptional(vObject({ definitions: vArray(itemTypeDefinition) })),\n schema: runtimeSchemaSettings,\n context: vOptional(\n vObject({\n default_depth: vOptional(vLiteral(\"brief\", \"standard\", \"deep\")),\n activity_limit: vOptional(vNumber({ int: true, positive: true })),\n stale_threshold_days: vOptional(vNumber({ int: true, positive: true })),\n sections: vOptional(\n vObject({\n hierarchy: vOptional(vBoolean),\n activity: vOptional(vBoolean),\n progress: vOptional(vBoolean),\n recently_created: vOptional(vBoolean),\n unparented: vOptional(vBoolean),\n blockers: vOptional(vBoolean),\n files: vOptional(vBoolean),\n workload: vOptional(vBoolean),\n staleness: vOptional(vBoolean),\n tests: vOptional(vBoolean),\n }),\n ),\n }),\n ),\n extensions: vObject({\n enabled: vArray(vString),\n disabled: vArray(vString),\n policy: extensionPolicy,\n }),\n search: vObject({\n score_threshold: vNumber(),\n hybrid_semantic_weight: vOptional(vNumber()),\n max_results: vNumber({ int: true }),\n embedding_model: vString,\n embedding_corpus_max_characters: vOptional(vNumber()),\n embedding_batch_size: vNumber({ int: true }),\n embedding_timeout_ms: vOptional(vNumber({ int: true })),\n scanner_max_batch_retries: vNumber({ int: true }),\n provider: vOptional(vString),\n corpus_fields: vOptional(vArray(vString)),\n mutation_refresh_policy: vOptional(vLiteral(\"cache_only\", \"semantic_configured\", \"semantic_auto\")),\n query_expansion: vOptional(\n vObject({\n enabled: vOptional(vBoolean),\n provider: vOptional(vString),\n }),\n ),\n rerank: vOptional(\n vObject({\n enabled: vOptional(vBoolean),\n model: vOptional(vString),\n top_k: vOptional(vNumber({ int: true, positive: true })),\n }),\n ),\n // pm-75k9: offline BM25 tuning. Unlike `search.tuning` (intentionally\n // stripped for legacy zod parity), bm25 is validated so it persists across\n // writeSettings round-trips — these knobs must survive to take effect.\n bm25: vOptional(\n vObject({\n k1: vOptional(vNumber()),\n b: vOptional(vNumber()),\n }),\n ),\n }),\n providers: vObject({\n openai: vObject({ base_url: vString, api_key: vString, model: vString }),\n ollama: vObject({ base_url: vString, model: vString }),\n }),\n vector_store: vObject({\n adapter: vOptional(vString),\n collection_name: vOptional(vString),\n qdrant: vObject({ url: vString, api_key: vString }),\n lancedb: vObject({ path: vString }),\n }),\n});\n\n/** Validate raw settings, returning stripped, type-checked data or failure (matching the legacy zod safeParse). */\nexport function validateSettings(raw: unknown): SettingsValidationResult {\n const result = settingsCheck(raw);\n if (!result.ok) {\n return { success: false };\n }\n return { success: true, data: result.value as unknown as ParsedSettings };\n}\n","/**\n * Per-type default estimate resolution for `pm validate --auto-fix` (GH-212).\n *\n * When an item is missing `estimated_minutes`, the auto-fix path backfills a\n * config-driven default based on the item's type. This module is the pure\n * resolution layer: given an item type and an optional settings-derived override\n * map, it returns the default estimate in minutes. The planning + apply path is\n * wired separately by the validate command.\n *\n * Pure module: no filesystem access, no heavy imports. Bad input is never\n * thrown on — invalid override entries are dropped, not errored (mirrors the\n * deterministic, non-throwing style of stale-file-classification.ts).\n */\n\n/**\n * Built-in per-type default estimates in MINUTES used by `pm validate --auto-fix`\n * (GH-212) to backfill missing `estimated_minutes`. Keys are canonical built-in\n * type names. Lookups are case-insensitive (see resolveEstimateDefaultMinutes).\n */\nexport const DEFAULT_ESTIMATE_MINUTES_BY_TYPE: Readonly<Record<string, number>> = {\n Epic: 2880,\n Feature: 480,\n Story: 480,\n Milestone: 2880,\n Task: 120,\n Issue: 60,\n Bug: 60,\n Chore: 30,\n Decision: 15,\n Plan: 120,\n};\n\n/** Fallback when neither overrides nor the built-in map have the type. */\nexport const FALLBACK_ESTIMATE_MINUTES = 120;\n\n/** A value is honored only when it is a finite number strictly greater than zero. */\nfunction isHonoredMinutes(value: unknown): value is number {\n return typeof value === \"number\" && Number.isFinite(value) && value > 0;\n}\n\n/**\n * Build a case-insensitive lookup keyed by lowercased type name. When two source\n * keys collide case-insensitively, last-wins (later entries overwrite earlier\n * ones); callers normalize overrides up front so collisions are rare.\n */\nfunction toLowercasedLookup(source: Readonly<Record<string, number>>): Map<string, number> {\n const lookup = new Map<string, number>();\n for (const [key, value] of Object.entries(source)) {\n lookup.set(key.toLowerCase(), value);\n }\n return lookup;\n}\n\n/** Built-in lookup is type-static, so build the lowercased index once. */\nconst BUILTIN_LOWERCASED_LOOKUP = toLowercasedLookup(DEFAULT_ESTIMATE_MINUTES_BY_TYPE);\n\n/**\n * Cache lowercased override lookups keyed on the override object reference so a\n * backfill that resolves once per item does not rebuild the same Map each call.\n * A WeakMap keeps this allocation-free for callers that reuse one normalized\n * settings map across the whole run.\n */\nconst OVERRIDE_LOOKUP_CACHE = new WeakMap<Readonly<Record<string, number>>, Map<string, number>>();\n\nfunction lowercasedOverrideLookup(overrides: Readonly<Record<string, number>>): Map<string, number> {\n const cached = OVERRIDE_LOOKUP_CACHE.get(overrides);\n if (cached) {\n return cached;\n }\n const lookup = toLowercasedLookup(overrides);\n OVERRIDE_LOOKUP_CACHE.set(overrides, lookup);\n return lookup;\n}\n\n/**\n * Resolve the default estimated-minutes for an item type.\n * Precedence: overrides (case-insensitive key match) > DEFAULT_ESTIMATE_MINUTES_BY_TYPE\n * (case-insensitive) > FALLBACK_ESTIMATE_MINUTES.\n * - `type` undefined/empty -> FALLBACK.\n * - Only finite values > 0 are honored from overrides/defaults; a non-positive or\n * non-finite override value is ignored and resolution continues to the next tier.\n * - Returned value is a positive integer (floor of the resolved value).\n */\nexport function resolveEstimateDefaultMinutes(\n type: string | undefined,\n overrides?: Readonly<Record<string, number>>,\n): number {\n const key = (type ?? \"\").trim().toLowerCase();\n if (key.length === 0) {\n return FALLBACK_ESTIMATE_MINUTES;\n }\n\n if (overrides) {\n const overrideValue = lowercasedOverrideLookup(overrides).get(key);\n if (isHonoredMinutes(overrideValue)) {\n return Math.floor(overrideValue);\n }\n }\n\n const builtinValue = BUILTIN_LOWERCASED_LOOKUP.get(key);\n if (isHonoredMinutes(builtinValue)) {\n return Math.floor(builtinValue);\n }\n\n return FALLBACK_ESTIMATE_MINUTES;\n}\n\n/**\n * Validate + normalize a raw `validation.estimate_defaults_by_type` settings object\n * into a clean Record<string, number> of positive integers, dropping invalid entries.\n * Used so the pure resolver always receives a sane override map. Returns {} for\n * undefined/null/non-object input. Trims keys; ignores empty keys and non-positive /\n * non-finite / non-number values. Floors values to integers.\n */\nexport function normalizeEstimateDefaultOverrides(raw: unknown): Record<string, number> {\n const normalized: Record<string, number> = {};\n if (raw === null || typeof raw !== \"object\" || Array.isArray(raw)) {\n return normalized;\n }\n\n for (const [rawKey, rawValue] of Object.entries(raw as Record<string, unknown>)) {\n const key = rawKey.trim();\n if (key.length === 0 || !isHonoredMinutes(rawValue)) {\n continue;\n }\n normalized[key] = Math.floor(rawValue);\n }\n\n return normalized;\n}\n","/**\n * @module core/store/settings-read-cache\n *\n * Reads and writes tracker storage with format-aware helpers for Settings Read Cache.\n */\nimport { stat } from \"node:fs/promises\";\n\n/**\n * Documents the settings read cache path signature payload exchanged by command, SDK, and package integrations.\n */\nexport interface SettingsReadCachePathSignature {\n path: string;\n mtime_ms: number | null;\n size: number | null;\n}\n\n/**\n * Documents the settings read cache entry payload exchanged by command, SDK, and package integrations.\n */\nexport interface SettingsReadCacheEntry<T> {\n tracked_paths: string[];\n signatures: SettingsReadCachePathSignature[];\n value: T;\n}\n\nconst settingsReadCacheByRoot = new Map<string, SettingsReadCacheEntry<unknown>>();\n\nfunction normalizeTrackedPaths(paths: string[]): string[] {\n return [...new Set(paths.map((pathValue) => pathValue.trim()).filter((pathValue) => pathValue.length > 0))].sort((left, right) =>\n left.localeCompare(right),\n );\n}\n\nasync function readPathSignature(targetPath: string): Promise<SettingsReadCachePathSignature> {\n try {\n const targetStats = await stat(targetPath);\n return {\n path: targetPath,\n mtime_ms: targetStats.mtimeMs,\n size: targetStats.size,\n };\n } catch {\n return {\n path: targetPath,\n mtime_ms: null,\n size: null,\n };\n }\n}\n\n/**\n * Implements collect settings read cache signatures for the public runtime surface of this module.\n */\nexport async function collectSettingsReadCacheSignatures(paths: string[]): Promise<SettingsReadCachePathSignature[]> {\n const normalizedPaths = normalizeTrackedPaths(paths);\n const signatures = await Promise.all(normalizedPaths.map((targetPath) => readPathSignature(targetPath)));\n signatures.sort((left, right) => left.path.localeCompare(right.path));\n return signatures;\n}\n\n/**\n * Implements settings read cache signatures equal for the public runtime surface of this module.\n */\nexport function settingsReadCacheSignaturesEqual(\n left: SettingsReadCachePathSignature[],\n right: SettingsReadCachePathSignature[],\n): boolean {\n if (left.length !== right.length) {\n return false;\n }\n for (let index = 0; index < left.length; index += 1) {\n const leftEntry = left[index];\n const rightEntry = right[index];\n if (\n leftEntry.path !== rightEntry.path ||\n leftEntry.mtime_ms !== rightEntry.mtime_ms ||\n leftEntry.size !== rightEntry.size\n ) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Implements get settings read cache entry for the public runtime surface of this module.\n */\nexport function getSettingsReadCacheEntry<T>(pmRoot: string): SettingsReadCacheEntry<T> | undefined {\n return settingsReadCacheByRoot.get(pmRoot) as SettingsReadCacheEntry<T> | undefined;\n}\n\n/**\n * Implements set settings read cache entry for the public runtime surface of this module.\n */\nexport function setSettingsReadCacheEntry<T>(pmRoot: string, entry: SettingsReadCacheEntry<T>): void {\n const normalizedTrackedPaths = normalizeTrackedPaths(entry.tracked_paths);\n const normalizedSignatures = [...entry.signatures]\n .map((signature) => ({\n path: signature.path,\n mtime_ms: signature.mtime_ms,\n size: signature.size,\n }))\n .sort((left, right) => left.path.localeCompare(right.path));\n settingsReadCacheByRoot.set(pmRoot, {\n tracked_paths: normalizedTrackedPaths,\n signatures: normalizedSignatures,\n value: entry.value,\n });\n}\n\n/**\n * Implements clear settings read cache for the public runtime surface of this module.\n */\nexport function clearSettingsReadCache(pmRoot?: string): void {\n if (pmRoot) {\n settingsReadCacheByRoot.delete(pmRoot);\n return;\n }\n settingsReadCacheByRoot.clear();\n}\n","/**\n * @module core/store/settings\n *\n * Reads and writes tracker storage with format-aware helpers for Settings.\n */\nimport { validateSettings, type ParsedSettings } from \"./settings-validator.js\";\nimport { runActiveOnReadHooks, runActiveOnWriteHooks } from \"../extensions/index.js\";\nimport { GOVERNANCE_PRESET_DEFAULTS, SETTINGS_DEFAULTS } from \"../shared/constants.js\";\nimport { readFileIfExists, writeFileAtomic } from \"../fs/fs-utils.js\";\nimport {\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,\n ensureRuntimeSchemaFileScaffold,\n filePathForSchemaSection,\n loadRuntimeSchemaFromOptionalFiles,\n normalizeRuntimeSchemaSettings,\n} from \"../schema/runtime-schema.js\";\nimport { getSettingsPath } from \"./paths.js\";\nimport { orderObject, stableValueEquals } from \"../shared/serialization.js\";\nimport { normalizeItemTypeDefinition } from \"../item/item-type-definition.js\";\nimport { normalizeEstimateDefaultOverrides } from \"../validate/estimate-defaults.js\";\nimport {\n clearSettingsReadCache,\n collectSettingsReadCacheSignatures,\n getSettingsReadCacheEntry,\n setSettingsReadCacheEntry,\n settingsReadCacheSignaturesEqual,\n} from \"./settings-read-cache.js\";\nimport type {\n ExtensionGovernancePolicy,\n PmMaxVersionExceededMode,\n PmMaxVersionExceededModeSetting,\n} from \"../extensions/extension-types.js\";\nimport type {\n ExtensionSandboxProfile,\n ExtensionPolicyMode,\n ExtensionPolicyOverrideSettings,\n ExtensionPolicySettings,\n ExtensionTrustMode,\n GovernanceSettings,\n ItemTypeDefinition,\n PmSettings,\n GovernancePreset,\n SearchMutationRefreshPolicy,\n ValidateMetadataRequiredField,\n} from \"../../types/index.js\";\n\nconst SETTINGS_WRITE_OP = \"settings:write\";\nconst SETTINGS_PERSIST_SOURCE_SYMBOL = Symbol(\"pm.settings.persist_source\");\nconst MAX_VECTOR_STORE_COLLECTION_NAME_LENGTH = 128;\n\ninterface SettingsPersistSourceSnapshot {\n has_source_item_type_definitions: boolean;\n source_item_type_definitions: ItemTypeDefinition[];\n has_source_schema_statuses: boolean;\n source_schema_statuses: PmSettings[\"schema\"][\"statuses\"];\n has_source_schema_fields: boolean;\n source_schema_fields: PmSettings[\"schema\"][\"fields\"];\n has_source_schema_type_workflows: boolean;\n source_schema_type_workflows: NonNullable<PmSettings[\"schema\"][\"type_workflows\"]>;\n runtime_item_type_definitions: ItemTypeDefinition[];\n runtime_schema_statuses: PmSettings[\"schema\"][\"statuses\"];\n runtime_schema_fields: PmSettings[\"schema\"][\"fields\"];\n runtime_schema_type_workflows: NonNullable<PmSettings[\"schema\"][\"type_workflows\"]>;\n}\n\ninterface SerializeSettingsOptions {\n persist_source?: SettingsPersistSourceSnapshot;\n}\n\n/**\n * Documents the settings read metadata payload exchanged by command, SDK, and package integrations.\n */\nexport interface SettingsReadMetadata {\n has_explicit_item_format: boolean;\n}\n\n/**\n * Documents the settings read result payload exchanged by command, SDK, and package integrations.\n */\nexport interface SettingsReadResult {\n settings: PmSettings;\n metadata: SettingsReadMetadata;\n warnings: string[];\n}\n\nfunction resolveGovernanceKnobsFromPreset(preset: Exclude<GovernancePreset, \"custom\">): Omit<GovernanceSettings, \"preset\"> {\n return structuredClone(GOVERNANCE_PRESET_DEFAULTS[preset]);\n}\n\nfunction normalizeGovernancePreset(value: GovernancePreset | undefined): GovernancePreset {\n if (value === \"minimal\" || value === \"default\" || value === \"strict\" || value === \"custom\") {\n return value;\n }\n return SETTINGS_DEFAULTS.governance.preset;\n}\n\n// `create_default_type` and `workflow_enforcement` are orthogonal to the\n// governance preset (they tune create/update behavior, not the preset knobs),\n// so they must survive a write regardless of preset — otherwise a project on a\n// non-custom preset would silently drop them on every settings write.\nfunction withGovernanceExtras(\n base: Partial<GovernanceSettings> & { preset: GovernancePreset },\n governance: GovernanceSettings,\n): Partial<GovernanceSettings> & { preset: GovernancePreset } {\n const createDefaultType =\n typeof governance.create_default_type === \"string\" ? governance.create_default_type.trim() : undefined;\n if (createDefaultType && createDefaultType.length > 0) {\n base.create_default_type = createDefaultType;\n }\n if (\n governance.workflow_enforcement === \"off\" ||\n governance.workflow_enforcement === \"warn\" ||\n governance.workflow_enforcement === \"strict\"\n ) {\n base.workflow_enforcement = governance.workflow_enforcement;\n }\n if (governance.require_close_reason === false) {\n base.require_close_reason = false;\n }\n return base;\n}\n\nfunction normalizeGovernanceForPersist(governance: GovernanceSettings): Partial<GovernanceSettings> & { preset: GovernancePreset } {\n if (governance.preset === \"custom\") {\n return withGovernanceExtras(\n {\n preset: \"custom\",\n ownership_enforcement: governance.ownership_enforcement,\n create_mode_default: governance.create_mode_default,\n close_validation_default: governance.close_validation_default,\n parent_reference: governance.parent_reference,\n metadata_profile: governance.metadata_profile,\n force_required_for_stale_lock: governance.force_required_for_stale_lock,\n },\n governance,\n );\n }\n return withGovernanceExtras(\n {\n preset: governance.preset,\n },\n governance,\n );\n}\n\n// Preset-orthogonal knobs that must be carried through resolve from the raw\n// governance regardless of preset (see normalizeGovernanceForPersist).\nfunction resolveGovernanceExtras(\n rawGovernance: Partial<GovernanceSettings>,\n): Partial<Pick<GovernanceSettings, \"create_default_type\" | \"workflow_enforcement\" | \"require_close_reason\">> {\n const createDefaultType =\n typeof rawGovernance.create_default_type === \"string\" ? rawGovernance.create_default_type.trim() : undefined;\n const extras: Partial<Pick<GovernanceSettings, \"create_default_type\" | \"workflow_enforcement\" | \"require_close_reason\">> =\n {};\n if (createDefaultType && createDefaultType.length > 0) {\n extras.create_default_type = createDefaultType;\n }\n if (\n rawGovernance.workflow_enforcement === \"off\" ||\n rawGovernance.workflow_enforcement === \"warn\" ||\n rawGovernance.workflow_enforcement === \"strict\"\n ) {\n extras.workflow_enforcement = rawGovernance.workflow_enforcement;\n }\n if (typeof rawGovernance.require_close_reason === \"boolean\") {\n extras.require_close_reason = rawGovernance.require_close_reason;\n }\n return extras;\n}\n\n/**\n * Implements resolve governance knobs for the public runtime surface of this module.\n */\nexport function resolveGovernanceKnobs(\n settings: Pick<PmSettings, \"governance\"> | { governance?: Partial<GovernanceSettings> },\n): GovernanceSettings {\n const rawGovernance = settings.governance ?? {};\n const preset = normalizeGovernancePreset(rawGovernance.preset);\n const extras = resolveGovernanceExtras(rawGovernance);\n if (preset === \"custom\") {\n const baseline = resolveGovernanceKnobsFromPreset(\"default\");\n const requireCloseReason = extras.require_close_reason ?? baseline.require_close_reason;\n return {\n preset,\n ownership_enforcement: rawGovernance.ownership_enforcement ?? baseline.ownership_enforcement,\n create_mode_default: rawGovernance.create_mode_default ?? baseline.create_mode_default,\n close_validation_default: rawGovernance.close_validation_default ?? baseline.close_validation_default,\n parent_reference: rawGovernance.parent_reference ?? baseline.parent_reference,\n metadata_profile: rawGovernance.metadata_profile ?? baseline.metadata_profile,\n force_required_for_stale_lock: rawGovernance.force_required_for_stale_lock ?? baseline.force_required_for_stale_lock,\n ...extras,\n require_close_reason: requireCloseReason,\n };\n }\n const baseline = resolveGovernanceKnobsFromPreset(preset);\n const requireCloseReason = extras.require_close_reason ?? baseline.require_close_reason;\n return {\n preset,\n ...baseline,\n ...extras,\n require_close_reason: requireCloseReason,\n };\n}\n\nfunction cloneDefaults(): PmSettings {\n return structuredClone(SETTINGS_DEFAULTS);\n}\n\nfunction normalizeSearchMutationRefreshPolicy(value: unknown): SearchMutationRefreshPolicy {\n if (value === \"cache_only\" || value === \"semantic_configured\" || value === \"semantic_auto\") {\n return value;\n }\n return SETTINGS_DEFAULTS.search.mutation_refresh_policy;\n}\n\nfunction normalizeSearchQueryExpansionEnabled(value: unknown): boolean {\n if (typeof value === \"boolean\") {\n return value;\n }\n return SETTINGS_DEFAULTS.search.query_expansion.enabled;\n}\n\nfunction normalizeSearchQueryExpansionProvider(value: unknown): string {\n if (typeof value !== \"string\") {\n return SETTINGS_DEFAULTS.search.query_expansion.provider;\n }\n return value.trim();\n}\n\nfunction normalizeSearchRerankEnabled(value: unknown): boolean {\n if (typeof value === \"boolean\") {\n return value;\n }\n return SETTINGS_DEFAULTS.search.rerank.enabled;\n}\n\nfunction normalizeSearchRerankModel(value: unknown): string {\n if (typeof value !== \"string\") {\n return SETTINGS_DEFAULTS.search.rerank.model;\n }\n return value.trim();\n}\n\nfunction normalizeSearchRerankTopK(value: unknown): number {\n if (typeof value === \"number\" && Number.isFinite(value) && Number.isInteger(value) && value > 0) {\n return value;\n }\n return SETTINGS_DEFAULTS.search.rerank.top_k;\n}\n\nfunction normalizeVectorStoreCollectionName(value: unknown): string {\n if (typeof value !== \"string\") {\n return SETTINGS_DEFAULTS.vector_store.collection_name;\n }\n const sanitized = value.trim().replaceAll(/[^a-zA-Z0-9_-]/g, \"_\");\n const truncated = sanitized.slice(0, MAX_VECTOR_STORE_COLLECTION_NAME_LENGTH);\n return truncated.length > 0 ? truncated : SETTINGS_DEFAULTS.vector_store.collection_name;\n}\n\nfunction buildSettingsPersistSourceSnapshot(\n parsedSettings: ParsedSettings,\n runtimeSettings: PmSettings,\n): SettingsPersistSourceSnapshot {\n const sourceSchema = parsedSettings.schema;\n const sourceStatuses = Array.isArray(sourceSchema?.statuses) ? sourceSchema?.statuses : undefined;\n const sourceFields = Array.isArray(sourceSchema?.fields) ? sourceSchema?.fields : undefined;\n const sourceTypeWorkflows = Array.isArray(sourceSchema?.type_workflows) ? sourceSchema?.type_workflows : undefined;\n return {\n has_source_item_type_definitions: Array.isArray(parsedSettings.item_types?.definitions),\n source_item_type_definitions: normalizeItemTypeDefinitions(parsedSettings.item_types?.definitions),\n has_source_schema_statuses: sourceStatuses !== undefined,\n source_schema_statuses: sourceStatuses ? structuredClone(sourceStatuses) : [],\n has_source_schema_fields: sourceFields !== undefined,\n source_schema_fields: sourceFields ? structuredClone(sourceFields) : [],\n has_source_schema_type_workflows: sourceTypeWorkflows !== undefined,\n source_schema_type_workflows: sourceTypeWorkflows ? structuredClone(sourceTypeWorkflows) : [],\n runtime_item_type_definitions: normalizeItemTypeDefinitions(runtimeSettings.item_types?.definitions),\n runtime_schema_statuses: structuredClone(runtimeSettings.schema.statuses),\n runtime_schema_fields: structuredClone(runtimeSettings.schema.fields),\n runtime_schema_type_workflows: structuredClone(runtimeSettings.schema.type_workflows ?? []),\n };\n}\n\nfunction attachSettingsPersistSourceSnapshot(settings: PmSettings, source: SettingsPersistSourceSnapshot): void {\n Object.defineProperty(settings as unknown as Record<PropertyKey, unknown>, SETTINGS_PERSIST_SOURCE_SYMBOL, {\n value: source,\n writable: true,\n configurable: true,\n enumerable: false,\n });\n}\n\nfunction getSettingsPersistSourceSnapshot(settings: PmSettings): SettingsPersistSourceSnapshot | undefined {\n const candidate = (settings as unknown as Record<PropertyKey, unknown>)[SETTINGS_PERSIST_SOURCE_SYMBOL];\n if (!candidate || typeof candidate !== \"object\") {\n return undefined;\n }\n return candidate as SettingsPersistSourceSnapshot;\n}\n\nfunction cloneSettingsReadResult(result: SettingsReadResult): SettingsReadResult {\n const clonedSettings = structuredClone(result.settings);\n const persistSource = getSettingsPersistSourceSnapshot(result.settings);\n if (persistSource) {\n attachSettingsPersistSourceSnapshot(clonedSettings, structuredClone(persistSource));\n }\n return {\n settings: clonedSettings,\n metadata: {\n has_explicit_item_format: result.metadata.has_explicit_item_format,\n },\n warnings: [...result.warnings],\n };\n}\n\nfunction resolveSettingsReadTrackedPaths(pmRoot: string, schema: PmSettings[\"schema\"], settingsPath: string): string[] {\n const normalizedSchema = normalizeRuntimeSchemaSettings(schema);\n return [\n settingsPath,\n filePathForSchemaSection(pmRoot, normalizedSchema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types),\n filePathForSchemaSection(pmRoot, normalizedSchema.files.statuses, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses),\n filePathForSchemaSection(pmRoot, normalizedSchema.files.fields, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields),\n filePathForSchemaSection(pmRoot, normalizedSchema.files.workflows, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.workflows),\n ];\n}\n\nasync function cacheSettingsReadResult(pmRoot: string, trackedPaths: string[], result: SettingsReadResult): Promise<void> {\n const signatures = await collectSettingsReadCacheSignatures(trackedPaths);\n setSettingsReadCacheEntry(pmRoot, {\n tracked_paths: trackedPaths,\n signatures,\n value: cloneSettingsReadResult(result),\n });\n}\n\nasync function cacheSettingsReadResultSafe(pmRoot: string, trackedPaths: string[], result: SettingsReadResult): Promise<void> {\n try {\n await cacheSettingsReadResult(pmRoot, trackedPaths, result);\n } catch {\n clearSettingsReadCache(pmRoot);\n }\n}\n\ntype SettingsReadCacheSignatures = Awaited<ReturnType<typeof collectSettingsReadCacheSignatures>>;\n\nfunction findSettingsReadCacheSignature(signatures: SettingsReadCacheSignatures, targetPath: string) {\n return signatures.find((signature) => signature.path === targetPath);\n}\n\nfunction selectedSettingsReadCacheSignaturesEqual(\n before: SettingsReadCacheSignatures,\n after: SettingsReadCacheSignatures,\n targetPaths: string[],\n): boolean {\n for (const targetPath of targetPaths) {\n const beforeSignature = findSettingsReadCacheSignature(before, targetPath);\n const afterSignature = findSettingsReadCacheSignature(after, targetPath);\n if (\n !beforeSignature ||\n !afterSignature ||\n !settingsReadCacheSignaturesEqual([beforeSignature], [afterSignature])\n ) {\n return false;\n }\n }\n return true;\n}\n\nasync function cacheSettingsReadResultIfStable(\n pmRoot: string,\n trackedPaths: string[],\n result: SettingsReadResult,\n stableSignatures: SettingsReadCacheSignatures,\n stablePaths: string[],\n): Promise<void> {\n try {\n const currentSignatures = await collectSettingsReadCacheSignatures(trackedPaths);\n if (!selectedSettingsReadCacheSignaturesEqual(stableSignatures, currentSignatures, stablePaths)) {\n clearSettingsReadCache(pmRoot);\n return;\n }\n setSettingsReadCacheEntry(pmRoot, {\n tracked_paths: trackedPaths,\n signatures: currentSignatures,\n value: cloneSettingsReadResult(result),\n });\n } catch {\n clearSettingsReadCache(pmRoot);\n }\n}\n\nfunction resolvePersistedFileBackedSchemaSections(\n settings: PmSettings,\n source: SettingsPersistSourceSnapshot | undefined,\n): {\n item_type_definitions: ItemTypeDefinition[];\n schema_statuses: PmSettings[\"schema\"][\"statuses\"];\n schema_fields: PmSettings[\"schema\"][\"fields\"];\n schema_type_workflows: PmSettings[\"schema\"][\"type_workflows\"];\n} {\n const normalizedSchema = normalizeRuntimeSchemaSettings(settings.schema);\n const currentItemTypeDefinitions = normalizeItemTypeDefinitions(settings.item_types?.definitions);\n if (!source) {\n return {\n item_type_definitions: currentItemTypeDefinitions,\n schema_statuses: normalizedSchema.statuses,\n schema_fields: normalizedSchema.fields,\n schema_type_workflows: normalizedSchema.type_workflows,\n };\n }\n\n const currentTypeWorkflows = normalizedSchema.type_workflows ?? [];\n const itemTypeDefinitionsUnchanged = stableValueEquals(currentItemTypeDefinitions, source.runtime_item_type_definitions);\n const schemaStatusesUnchanged = stableValueEquals(normalizedSchema.statuses, source.runtime_schema_statuses);\n const schemaFieldsUnchanged = stableValueEquals(normalizedSchema.fields, source.runtime_schema_fields);\n const schemaTypeWorkflowsUnchanged = stableValueEquals(currentTypeWorkflows, source.runtime_schema_type_workflows);\n\n return {\n item_type_definitions: itemTypeDefinitionsUnchanged\n ? source.has_source_item_type_definitions\n ? normalizeItemTypeDefinitions(source.source_item_type_definitions)\n : []\n : currentItemTypeDefinitions,\n schema_statuses: schemaStatusesUnchanged\n ? source.has_source_schema_statuses\n ? structuredClone(source.source_schema_statuses)\n : []\n : normalizedSchema.statuses,\n schema_fields: schemaFieldsUnchanged\n ? source.has_source_schema_fields\n ? structuredClone(source.source_schema_fields)\n : []\n : normalizedSchema.fields,\n schema_type_workflows: schemaTypeWorkflowsUnchanged\n ? source.has_source_schema_type_workflows\n ? structuredClone(source.source_schema_type_workflows)\n : undefined\n : normalizedSchema.type_workflows,\n };\n}\n\nfunction buildFallbackSettingsReadResult(warning?: string): SettingsReadResult {\n return {\n settings: cloneDefaults(),\n metadata: {\n has_explicit_item_format: false,\n },\n warnings: warning ? [warning] : [],\n };\n}\n\nfunction hasExplicitItemFormat(raw: unknown): boolean {\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n return false;\n }\n const itemFormat = (raw as Record<string, unknown>).item_format;\n return itemFormat === \"toon\" || itemFormat === \"json_markdown\";\n}\n\nfunction normalizeStringList(values: string[] | undefined): string[] {\n return [...new Set((values ?? []).map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) =>\n left.localeCompare(right),\n );\n}\n\nfunction normalizeAgentGuidanceSettings(\n value: Partial<PmSettings[\"agent_guidance\"]> | undefined,\n): PmSettings[\"agent_guidance\"] {\n const defaults = SETTINGS_DEFAULTS.agent_guidance;\n const templateVersion = value?.template_version;\n return {\n prompt_completed: value?.prompt_completed === true,\n declined: value?.declined === true,\n declined_at: typeof value?.declined_at === \"string\" ? value.declined_at : defaults.declined_at,\n template_version:\n typeof templateVersion === \"number\" && Number.isInteger(templateVersion) && templateVersion > 0\n ? templateVersion\n : defaults.template_version,\n last_checked_files: normalizeStringList(value?.last_checked_files ?? defaults.last_checked_files),\n };\n}\n\nfunction normalizeLowerStringList(values: string[] | undefined): string[] {\n return [...new Set((values ?? []).map((value) => value.trim().toLowerCase()).filter((value) => value.length > 0))].sort(\n (left, right) => left.localeCompare(right),\n );\n}\n\nfunction normalizeExtensionPolicyMode(value: ExtensionPolicyMode | undefined): ExtensionPolicyMode {\n if (value === \"off\" || value === \"warn\" || value === \"enforce\") {\n return value;\n }\n return SETTINGS_DEFAULTS.extensions.policy.mode;\n}\n\nfunction normalizeExtensionTrustMode(value: ExtensionTrustMode | undefined): ExtensionTrustMode {\n if (value === \"off\" || value === \"warn\" || value === \"enforce\") {\n return value;\n }\n return SETTINGS_DEFAULTS.extensions.policy.trust_mode;\n}\n\nfunction normalizeExtensionSandboxProfile(value: ExtensionSandboxProfile | undefined): ExtensionSandboxProfile {\n if (value === \"none\" || value === \"restricted\" || value === \"strict\") {\n return value;\n }\n return SETTINGS_DEFAULTS.extensions.policy.default_sandbox_profile;\n}\n\nfunction normalizeExtensionPolicyOverride(\n override: ExtensionPolicyOverrideSettings,\n): ExtensionPolicyOverrideSettings | null {\n const name = override.name.trim().toLowerCase();\n if (name.length === 0) {\n return null;\n }\n const normalized: ExtensionPolicyOverrideSettings = {\n name,\n };\n if (override.disabled === true) {\n normalized.disabled = true;\n }\n if (override.require_trusted === true) {\n normalized.require_trusted = true;\n }\n if (override.require_provenance === true) {\n normalized.require_provenance = true;\n }\n if (override.sandbox_profile !== undefined) {\n normalized.sandbox_profile = normalizeExtensionSandboxProfile(override.sandbox_profile);\n }\n const allowedCapabilities = normalizeLowerStringList(override.allowed_capabilities);\n const blockedCapabilities = normalizeLowerStringList(override.blocked_capabilities);\n const allowedSurfaces = normalizeLowerStringList(override.allowed_surfaces);\n const blockedSurfaces = normalizeLowerStringList(override.blocked_surfaces);\n const allowedCommands = normalizeLowerStringList(override.allowed_commands);\n const blockedCommands = normalizeLowerStringList(override.blocked_commands);\n const allowedActions = normalizeLowerStringList(override.allowed_actions);\n const blockedActions = normalizeLowerStringList(override.blocked_actions);\n const allowedServices = normalizeLowerStringList(override.allowed_services);\n const blockedServices = normalizeLowerStringList(override.blocked_services);\n if (allowedCapabilities.length > 0) {\n normalized.allowed_capabilities = allowedCapabilities;\n }\n if (blockedCapabilities.length > 0) {\n normalized.blocked_capabilities = blockedCapabilities;\n }\n if (allowedSurfaces.length > 0) {\n normalized.allowed_surfaces = allowedSurfaces;\n }\n if (blockedSurfaces.length > 0) {\n normalized.blocked_surfaces = blockedSurfaces;\n }\n if (allowedCommands.length > 0) {\n normalized.allowed_commands = allowedCommands;\n }\n if (blockedCommands.length > 0) {\n normalized.blocked_commands = blockedCommands;\n }\n if (allowedActions.length > 0) {\n normalized.allowed_actions = allowedActions;\n }\n if (blockedActions.length > 0) {\n normalized.blocked_actions = blockedActions;\n }\n if (allowedServices.length > 0) {\n normalized.allowed_services = allowedServices;\n }\n if (blockedServices.length > 0) {\n normalized.blocked_services = blockedServices;\n }\n return normalized;\n}\n\nfunction normalizeExtensionPolicyOverrides(\n overrides: ExtensionPolicyOverrideSettings[] | undefined,\n): ExtensionPolicyOverrideSettings[] {\n const dedupedByName = new Map<string, ExtensionPolicyOverrideSettings>();\n for (const override of overrides ?? []) {\n const normalized = normalizeExtensionPolicyOverride(override);\n if (!normalized) {\n continue;\n }\n dedupedByName.set(normalized.name, normalized);\n }\n return [...dedupedByName.values()].sort((left, right) => left.name.localeCompare(right.name));\n}\n\nfunction normalizePmMaxVersionExceededModeValue(value: unknown): PmMaxVersionExceededMode | undefined {\n return value === \"block\" || value === \"warn\" ? value : undefined;\n}\n\n/**\n * Preserve a configured `pm_max_version_exceeded_mode` (string mode or per-layer\n * override object) through settings normalization. Unset/invalid values are\n * omitted so existing settings.json files round-trip byte-identically and the\n * loader applies its safe default (\"block\").\n */\nfunction normalizePmMaxVersionExceededModeSetting(\n value: PmMaxVersionExceededModeSetting | undefined,\n): PmMaxVersionExceededModeSetting | undefined {\n if (typeof value === \"string\") {\n return normalizePmMaxVersionExceededModeValue(value);\n }\n if (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n const global = normalizePmMaxVersionExceededModeValue(value.global);\n const project = normalizePmMaxVersionExceededModeValue(value.project);\n if (global === undefined && project === undefined) {\n return undefined;\n }\n return {\n ...(global !== undefined ? { global } : {}),\n ...(project !== undefined ? { project } : {}),\n };\n }\n return undefined;\n}\n\ntype ExtensionPolicyListKey =\n | \"trusted_extensions\"\n | \"allowed_extensions\"\n | \"blocked_extensions\"\n | \"allowed_capabilities\"\n | \"blocked_capabilities\"\n | \"allowed_surfaces\"\n | \"blocked_surfaces\"\n | \"allowed_commands\"\n | \"blocked_commands\"\n | \"allowed_actions\"\n | \"blocked_actions\"\n | \"allowed_services\"\n | \"blocked_services\";\n\nfunction normalizeExtensionPolicyList(\n policy: Partial<ExtensionGovernancePolicy> | undefined,\n key: ExtensionPolicyListKey,\n): string[] {\n return normalizeLowerStringList(policy?.[key] ?? SETTINGS_DEFAULTS.extensions.policy[key]);\n}\n\nfunction normalizeExtensionPolicySettings(\n policy: Partial<ExtensionGovernancePolicy> | undefined,\n): ExtensionGovernancePolicy {\n const pmMaxVersionExceededMode = normalizePmMaxVersionExceededModeSetting(policy?.pm_max_version_exceeded_mode);\n return {\n mode: normalizeExtensionPolicyMode(policy?.mode),\n trust_mode: normalizeExtensionTrustMode(policy?.trust_mode),\n ...(pmMaxVersionExceededMode !== undefined ? { pm_max_version_exceeded_mode: pmMaxVersionExceededMode } : {}),\n require_provenance: policy?.require_provenance === true,\n trusted_extensions: normalizeExtensionPolicyList(policy, \"trusted_extensions\"),\n default_sandbox_profile: normalizeExtensionSandboxProfile(policy?.default_sandbox_profile),\n allowed_extensions: normalizeExtensionPolicyList(policy, \"allowed_extensions\"),\n blocked_extensions: normalizeExtensionPolicyList(policy, \"blocked_extensions\"),\n allowed_capabilities: normalizeExtensionPolicyList(policy, \"allowed_capabilities\"),\n blocked_capabilities: normalizeExtensionPolicyList(policy, \"blocked_capabilities\"),\n allowed_surfaces: normalizeExtensionPolicyList(policy, \"allowed_surfaces\"),\n blocked_surfaces: normalizeExtensionPolicyList(policy, \"blocked_surfaces\"),\n allowed_commands: normalizeExtensionPolicyList(policy, \"allowed_commands\"),\n blocked_commands: normalizeExtensionPolicyList(policy, \"blocked_commands\"),\n allowed_actions: normalizeExtensionPolicyList(policy, \"allowed_actions\"),\n blocked_actions: normalizeExtensionPolicyList(policy, \"blocked_actions\"),\n allowed_services: normalizeExtensionPolicyList(policy, \"allowed_services\"),\n blocked_services: normalizeExtensionPolicyList(policy, \"blocked_services\"),\n extension_overrides: normalizeExtensionPolicyOverrides(\n policy?.extension_overrides ?? SETTINGS_DEFAULTS.extensions.policy.extension_overrides,\n ),\n };\n}\n\nfunction normalizeValidationMetadataRequiredFields(values: string[] | undefined): ValidateMetadataRequiredField[] {\n const normalized = [...new Set((values ?? []).map((value) => value.trim().toLowerCase().replaceAll(\"-\", \"_\")))]\n .filter((value) => value.length > 0)\n .sort((left, right) => left.localeCompare(right));\n return normalized.filter((value): value is ValidateMetadataRequiredField =>\n [\n \"author\",\n \"acceptance_criteria\",\n \"estimated_minutes\",\n \"close_reason\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n ].includes(value),\n );\n}\n\nfunction normalizeValidationPatternList(values: string[] | undefined): string[] {\n return [...new Set((values ?? []).map((value) => value.trim().toLowerCase()).filter((value) => value.length > 0))].sort(\n (left, right) => left.localeCompare(right),\n );\n}\n\nfunction valueOrDefault<T>(value: T | undefined, fallback: T): T {\n return value === undefined ? fallback : value;\n}\n\nfunction recordOrEmpty(value: unknown): Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value) ? (value as Record<string, unknown>) : {};\n}\n\nfunction arrayOrEmpty<T>(value: unknown): T[] {\n return Array.isArray(value) ? (value as T[]) : [];\n}\n\nfunction buildValidationSettings(settings: ParsedSettings, defaults: PmSettings, governance: GovernanceSettings): PmSettings[\"validation\"] {\n return {\n ...defaults.validation,\n ...settings.validation,\n parent_reference: governance.parent_reference,\n metadata_profile: governance.metadata_profile,\n metadata_required_fields: normalizeValidationMetadataRequiredFields(settings.validation?.metadata_required_fields),\n lifecycle_stale_blocker_reason_patterns: normalizeValidationPatternList(\n settings.validation?.lifecycle_stale_blocker_reason_patterns ??\n defaults.validation.lifecycle_stale_blocker_reason_patterns,\n ),\n lifecycle_closure_like_blocked_reason_patterns: normalizeValidationPatternList(\n settings.validation?.lifecycle_closure_like_blocked_reason_patterns ??\n defaults.validation.lifecycle_closure_like_blocked_reason_patterns,\n ),\n lifecycle_closure_like_resolution_patterns: normalizeValidationPatternList(\n settings.validation?.lifecycle_closure_like_resolution_patterns ??\n defaults.validation.lifecycle_closure_like_resolution_patterns,\n ),\n lifecycle_closure_like_actual_result_patterns: normalizeValidationPatternList(\n settings.validation?.lifecycle_closure_like_actual_result_patterns ??\n defaults.validation.lifecycle_closure_like_actual_result_patterns,\n ),\n estimate_defaults_by_type: normalizeEstimateDefaultOverrides(settings.validation?.estimate_defaults_by_type),\n };\n}\n\nfunction buildTelemetrySettings(settings: ParsedSettings, defaults: PmSettings): PmSettings[\"telemetry\"] {\n return {\n enabled: settings.telemetry?.enabled ?? defaults.telemetry.enabled,\n first_run_prompt_completed: settings.telemetry?.first_run_prompt_completed ?? defaults.telemetry.first_run_prompt_completed,\n capture_level: settings.telemetry?.capture_level ?? defaults.telemetry.capture_level,\n endpoint: settings.telemetry?.endpoint ?? defaults.telemetry.endpoint,\n installation_id: settings.telemetry?.installation_id ?? defaults.telemetry.installation_id,\n retention_days: settings.telemetry?.retention_days ?? defaults.telemetry.retention_days,\n };\n}\n\nfunction buildSearchSettings(settings: ParsedSettings, defaults: PmSettings): PmSettings[\"search\"] {\n return {\n ...defaults.search,\n ...settings.search,\n mutation_refresh_policy: normalizeSearchMutationRefreshPolicy(settings.search?.mutation_refresh_policy),\n query_expansion: {\n ...defaults.search.query_expansion,\n ...settings.search?.query_expansion,\n enabled: normalizeSearchQueryExpansionEnabled(settings.search?.query_expansion?.enabled),\n provider: normalizeSearchQueryExpansionProvider(settings.search?.query_expansion?.provider),\n },\n rerank: {\n ...defaults.search.rerank,\n ...settings.search?.rerank,\n enabled: normalizeSearchRerankEnabled(settings.search?.rerank?.enabled),\n model: normalizeSearchRerankModel(settings.search?.rerank?.model),\n top_k: normalizeSearchRerankTopK(settings.search?.rerank?.top_k),\n },\n };\n}\n\nfunction buildVectorStoreSettings(settings: ParsedSettings, defaults: PmSettings): PmSettings[\"vector_store\"] {\n return {\n adapter: settings.vector_store.adapter ?? defaults.vector_store.adapter,\n collection_name: normalizeVectorStoreCollectionName(settings.vector_store.collection_name),\n qdrant: { ...defaults.vector_store.qdrant, ...settings.vector_store.qdrant },\n lancedb: { ...defaults.vector_store.lancedb, ...settings.vector_store.lancedb },\n };\n}\n\nfunction normalizeSettingsItemFormat(settings: ParsedSettings, defaults: PmSettings): PmSettings[\"item_format\"] {\n if (settings.item_format === \"json_markdown\") {\n return \"toon\";\n }\n return settings.item_format ?? defaults.item_format;\n}\n\nfunction buildContextSettings(settings: ParsedSettings, defaults: PmSettings): PmSettings[\"context\"] {\n return {\n default_depth: settings.context?.default_depth ?? defaults.context.default_depth,\n activity_limit: settings.context?.activity_limit ?? defaults.context.activity_limit,\n stale_threshold_days: settings.context?.stale_threshold_days ?? defaults.context.stale_threshold_days,\n sections: {\n ...defaults.context.sections,\n ...settings.context?.sections,\n },\n };\n}\n\nfunction buildProviderSettings(settings: ParsedSettings, defaults: PmSettings): PmSettings[\"providers\"] {\n return {\n openai: { ...defaults.providers.openai, ...settings.providers.openai },\n ollama: { ...defaults.providers.ollama, ...settings.providers.ollama },\n };\n}\n\n/**\n * Implements normalize item type definitions for the public runtime surface of this module.\n */\nexport function normalizeItemTypeDefinitions(definitions: ItemTypeDefinition[] | undefined): ItemTypeDefinition[] {\n const normalized = (definitions ?? [])\n .map((definition) => normalizeItemTypeDefinition(definition))\n .filter((definition): definition is ItemTypeDefinition => definition !== null);\n const dedupedByName = new Map<string, ItemTypeDefinition>();\n for (const definition of normalized) {\n dedupedByName.set(definition.name.toLowerCase(), definition);\n }\n return [...dedupedByName.values()].sort((left, right) => left.name.localeCompare(right.name));\n}\n\nfunction mergeSettings(settings: ParsedSettings): PmSettings {\n const defaults = cloneDefaults();\n const governance = resolveGovernanceKnobs({\n governance: settings.governance ?? { preset: \"default\" },\n });\n return {\n ...defaults,\n ...settings,\n item_format: normalizeSettingsItemFormat(settings, defaults),\n locks: { ...defaults.locks, ...settings.locks },\n checkpoints: { ...defaults.checkpoints, ...settings.checkpoints },\n output: { ...defaults.output, ...settings.output },\n history: {\n ...defaults.history,\n ...settings.history,\n compact_policy: {\n ...defaults.history.compact_policy,\n ...settings.history?.compact_policy,\n },\n },\n validation: buildValidationSettings(settings, defaults, governance),\n governance,\n workflow: {\n definition_of_done: [...(settings.workflow?.definition_of_done ?? defaults.workflow.definition_of_done)],\n },\n testing: {\n record_results_to_items: settings.testing?.record_results_to_items ?? defaults.testing.record_results_to_items,\n },\n telemetry: buildTelemetrySettings(settings, defaults),\n agent_guidance: normalizeAgentGuidanceSettings(settings.agent_guidance ?? defaults.agent_guidance),\n item_types: {\n definitions: normalizeItemTypeDefinitions(settings.item_types?.definitions),\n },\n schema: normalizeRuntimeSchemaSettings(settings.schema ?? defaults.schema),\n context: buildContextSettings(settings, defaults),\n extensions: {\n enabled: [...settings.extensions.enabled],\n disabled: [...settings.extensions.disabled],\n policy: normalizeExtensionPolicySettings(settings.extensions.policy ?? defaults.extensions.policy),\n },\n search: buildSearchSettings(settings, defaults),\n providers: buildProviderSettings(settings, defaults),\n vector_store: buildVectorStoreSettings(settings, defaults),\n };\n}\n\nfunction orderSerializedSettingsSections(ordered: Record<string, unknown>): void {\n ordered.locks = orderObject(ordered.locks as Record<string, unknown>, [\"ttl_seconds\", \"wait_ms\"]);\n ordered.checkpoints = orderObject(ordered.checkpoints as Record<string, unknown>, [\"retention_days\"]);\n ordered.output = orderObject(ordered.output as Record<string, unknown>, [\"default_format\"]);\n ordered.history = orderObject(ordered.history as Record<string, unknown>, [\"missing_stream\", \"compact_policy\"]);\n ordered.validation = orderObject(ordered.validation as Record<string, unknown>, [\n \"sprint_release_format\",\n \"parent_reference\",\n \"metadata_profile\",\n \"metadata_required_fields\",\n \"lifecycle_stale_blocker_reason_patterns\",\n \"lifecycle_closure_like_blocked_reason_patterns\",\n \"lifecycle_closure_like_resolution_patterns\",\n \"lifecycle_closure_like_actual_result_patterns\",\n \"estimate_defaults_by_type\",\n ]);\n ordered.governance = orderObject(ordered.governance as Record<string, unknown>, [\n \"preset\",\n \"ownership_enforcement\",\n \"create_mode_default\",\n \"close_validation_default\",\n \"require_close_reason\",\n \"parent_reference\",\n \"metadata_profile\",\n \"force_required_for_stale_lock\",\n \"create_default_type\",\n \"workflow_enforcement\",\n ]);\n ordered.workflow = orderObject(ordered.workflow as Record<string, unknown>, [\"definition_of_done\"]);\n ordered.testing = orderObject(ordered.testing as Record<string, unknown>, [\"record_results_to_items\"]);\n ordered.telemetry = orderObject(ordered.telemetry as Record<string, unknown>, [\n \"enabled\",\n \"first_run_prompt_completed\",\n \"capture_level\",\n \"endpoint\",\n \"installation_id\",\n \"retention_days\",\n ]);\n ordered.agent_guidance = orderObject(ordered.agent_guidance as Record<string, unknown>, [\n \"prompt_completed\",\n \"declined\",\n \"declined_at\",\n \"template_version\",\n \"last_checked_files\",\n ]);\n ordered.item_types = orderObject(ordered.item_types as Record<string, unknown>, [\"definitions\"]);\n ordered.schema = orderObject(ordered.schema as Record<string, unknown>, [\n \"version\",\n \"files\",\n \"statuses\",\n \"fields\",\n \"workflow\",\n \"type_workflows\",\n \"unknown_field_policy\",\n ]);\n (ordered.schema as Record<string, unknown>).files = orderObject(\n recordOrEmpty((ordered.schema as Record<string, unknown>).files),\n [\"types\", \"statuses\", \"fields\", \"workflows\"],\n );\n (ordered.schema as Record<string, unknown>).workflow = orderObject(\n recordOrEmpty((ordered.schema as Record<string, unknown>).workflow),\n [\"draft_status\", \"open_status\", \"in_progress_status\", \"blocked_status\", \"close_status\", \"canceled_status\"],\n );\n ordered.context = orderObject(ordered.context as Record<string, unknown>, [\n \"default_depth\",\n \"activity_limit\",\n \"stale_threshold_days\",\n \"sections\",\n ]);\n (ordered.context as Record<string, unknown>).sections = orderObject(\n recordOrEmpty((ordered.context as Record<string, unknown>).sections),\n [\"hierarchy\", \"activity\", \"progress\", \"blockers\", \"files\", \"workload\", \"staleness\", \"tests\"],\n );\n ordered.extensions = orderObject(ordered.extensions as Record<string, unknown>, [\"enabled\", \"disabled\", \"policy\"]);\n (ordered.extensions as Record<string, unknown>).policy = orderObject(\n recordOrEmpty((ordered.extensions as Record<string, unknown>).policy),\n [\n \"mode\",\n \"trust_mode\",\n \"pm_max_version_exceeded_mode\",\n \"require_provenance\",\n \"trusted_extensions\",\n \"default_sandbox_profile\",\n \"allowed_extensions\",\n \"blocked_extensions\",\n \"allowed_capabilities\",\n \"blocked_capabilities\",\n \"allowed_surfaces\",\n \"blocked_surfaces\",\n \"allowed_commands\",\n \"blocked_commands\",\n \"allowed_actions\",\n \"blocked_actions\",\n \"allowed_services\",\n \"blocked_services\",\n \"extension_overrides\",\n ],\n );\n ((ordered.extensions as Record<string, unknown>).policy as Record<string, unknown>).extension_overrides = (\n arrayOrEmpty(((ordered.extensions as Record<string, unknown>).policy as Record<string, unknown>).extension_overrides)\n ).map((entry) =>\n orderObject(recordOrEmpty(entry), [\n \"name\",\n \"disabled\",\n \"require_trusted\",\n \"require_provenance\",\n \"sandbox_profile\",\n \"allowed_capabilities\",\n \"blocked_capabilities\",\n \"allowed_surfaces\",\n \"blocked_surfaces\",\n \"allowed_commands\",\n \"blocked_commands\",\n \"allowed_actions\",\n \"blocked_actions\",\n \"allowed_services\",\n \"blocked_services\",\n ]),\n );\n ordered.search = orderObject(ordered.search as Record<string, unknown>, [\n \"score_threshold\",\n \"hybrid_semantic_weight\",\n \"max_results\",\n \"embedding_model\",\n \"embedding_corpus_max_characters\",\n \"embedding_batch_size\",\n \"embedding_timeout_ms\",\n \"scanner_max_batch_retries\",\n \"provider\",\n \"mutation_refresh_policy\",\n \"query_expansion\",\n \"rerank\",\n ]);\n (ordered.search as Record<string, unknown>).query_expansion = orderObject(\n recordOrEmpty((ordered.search as Record<string, unknown>).query_expansion),\n [\"enabled\", \"provider\"],\n );\n (ordered.search as Record<string, unknown>).rerank = orderObject(\n recordOrEmpty((ordered.search as Record<string, unknown>).rerank),\n [\"enabled\", \"model\", \"top_k\"],\n );\n ordered.providers = orderObject(ordered.providers as Record<string, unknown>, [\"openai\", \"ollama\"]);\n (ordered.providers as Record<string, unknown>).openai = orderObject(\n recordOrEmpty((ordered.providers as Record<string, unknown>).openai),\n [\"base_url\", \"api_key\", \"model\"],\n );\n (ordered.providers as Record<string, unknown>).ollama = orderObject(\n recordOrEmpty((ordered.providers as Record<string, unknown>).ollama),\n [\"base_url\", \"model\"],\n );\n ordered.vector_store = orderObject(ordered.vector_store as Record<string, unknown>, [\n \"adapter\",\n \"collection_name\",\n \"qdrant\",\n \"lancedb\",\n ]);\n (ordered.vector_store as Record<string, unknown>).qdrant = orderObject(\n recordOrEmpty((ordered.vector_store as Record<string, unknown>).qdrant),\n [\"url\", \"api_key\"],\n );\n (ordered.vector_store as Record<string, unknown>).lancedb = orderObject(\n recordOrEmpty((ordered.vector_store as Record<string, unknown>).lancedb),\n [\"path\"],\n );\n}\n\nfunction buildSerializeBaseSettings(settings: PmSettings): PmSettings {\n return {\n ...settings,\n locks: valueOrDefault(settings.locks, SETTINGS_DEFAULTS.locks),\n checkpoints: valueOrDefault(settings.checkpoints, SETTINGS_DEFAULTS.checkpoints),\n output: valueOrDefault(settings.output, SETTINGS_DEFAULTS.output),\n history: valueOrDefault(settings.history, SETTINGS_DEFAULTS.history),\n validation: valueOrDefault(settings.validation, SETTINGS_DEFAULTS.validation),\n workflow: valueOrDefault(settings.workflow, SETTINGS_DEFAULTS.workflow),\n testing: valueOrDefault(settings.testing, SETTINGS_DEFAULTS.testing),\n telemetry: valueOrDefault(settings.telemetry, SETTINGS_DEFAULTS.telemetry),\n agent_guidance: valueOrDefault(settings.agent_guidance, SETTINGS_DEFAULTS.agent_guidance),\n item_types: valueOrDefault(settings.item_types, SETTINGS_DEFAULTS.item_types),\n schema: valueOrDefault(settings.schema, SETTINGS_DEFAULTS.schema),\n context: valueOrDefault(settings.context, SETTINGS_DEFAULTS.context),\n extensions: valueOrDefault(settings.extensions, SETTINGS_DEFAULTS.extensions),\n search: valueOrDefault(settings.search, SETTINGS_DEFAULTS.search),\n providers: valueOrDefault(settings.providers, SETTINGS_DEFAULTS.providers),\n vector_store: valueOrDefault(settings.vector_store, SETTINGS_DEFAULTS.vector_store),\n } as PmSettings;\n}\n\nfunction buildSerializedValidationSettings(baseSettings: PmSettings, governance: GovernanceSettings): PmSettings[\"validation\"] {\n return {\n ...baseSettings.validation,\n parent_reference: governance.parent_reference,\n metadata_profile: governance.metadata_profile,\n metadata_required_fields: normalizeValidationMetadataRequiredFields(baseSettings.validation?.metadata_required_fields),\n lifecycle_stale_blocker_reason_patterns: normalizeValidationPatternList(\n baseSettings.validation?.lifecycle_stale_blocker_reason_patterns ??\n SETTINGS_DEFAULTS.validation.lifecycle_stale_blocker_reason_patterns,\n ),\n lifecycle_closure_like_blocked_reason_patterns: normalizeValidationPatternList(\n baseSettings.validation?.lifecycle_closure_like_blocked_reason_patterns ??\n SETTINGS_DEFAULTS.validation.lifecycle_closure_like_blocked_reason_patterns,\n ),\n lifecycle_closure_like_resolution_patterns: normalizeValidationPatternList(\n baseSettings.validation?.lifecycle_closure_like_resolution_patterns ??\n SETTINGS_DEFAULTS.validation.lifecycle_closure_like_resolution_patterns,\n ),\n lifecycle_closure_like_actual_result_patterns: normalizeValidationPatternList(\n baseSettings.validation?.lifecycle_closure_like_actual_result_patterns ??\n SETTINGS_DEFAULTS.validation.lifecycle_closure_like_actual_result_patterns,\n ),\n estimate_defaults_by_type: normalizeEstimateDefaultOverrides(baseSettings.validation?.estimate_defaults_by_type),\n };\n}\n\nfunction buildSerializedSearchSettings(baseSettings: PmSettings): PmSettings[\"search\"] {\n return {\n ...SETTINGS_DEFAULTS.search,\n ...baseSettings.search,\n mutation_refresh_policy: normalizeSearchMutationRefreshPolicy(baseSettings.search?.mutation_refresh_policy),\n query_expansion: {\n ...SETTINGS_DEFAULTS.search.query_expansion,\n ...baseSettings.search?.query_expansion,\n enabled: normalizeSearchQueryExpansionEnabled(baseSettings.search?.query_expansion?.enabled),\n provider: normalizeSearchQueryExpansionProvider(baseSettings.search?.query_expansion?.provider),\n },\n rerank: {\n ...SETTINGS_DEFAULTS.search.rerank,\n ...baseSettings.search?.rerank,\n enabled: normalizeSearchRerankEnabled(baseSettings.search?.rerank?.enabled),\n model: normalizeSearchRerankModel(baseSettings.search?.rerank?.model),\n top_k: normalizeSearchRerankTopK(baseSettings.search?.rerank?.top_k),\n },\n };\n}\n\nfunction buildSerializedContextSettings(baseSettings: PmSettings): PmSettings[\"context\"] {\n return {\n default_depth: baseSettings.context?.default_depth ?? SETTINGS_DEFAULTS.context.default_depth,\n activity_limit: baseSettings.context?.activity_limit ?? SETTINGS_DEFAULTS.context.activity_limit,\n stale_threshold_days: baseSettings.context?.stale_threshold_days ?? SETTINGS_DEFAULTS.context.stale_threshold_days,\n sections: {\n ...SETTINGS_DEFAULTS.context.sections,\n ...baseSettings.context?.sections,\n },\n };\n}\n\nfunction buildSerializedVectorStoreSettings(baseSettings: PmSettings): PmSettings[\"vector_store\"] {\n return {\n ...baseSettings.vector_store,\n adapter: baseSettings.vector_store?.adapter ?? SETTINGS_DEFAULTS.vector_store.adapter,\n collection_name: normalizeVectorStoreCollectionName(baseSettings.vector_store?.collection_name),\n qdrant: { ...baseSettings.vector_store?.qdrant },\n lancedb: { ...baseSettings.vector_store?.lancedb },\n };\n}\n\nfunction buildNormalizedSettingsForSerialization(\n baseSettings: PmSettings,\n governance: GovernanceSettings,\n normalizedSchema: PmSettings[\"schema\"],\n persistedFileBackedSections: ReturnType<typeof resolvePersistedFileBackedSchemaSections>,\n): PmSettings {\n return {\n ...baseSettings,\n item_format: \"toon\",\n validation: buildSerializedValidationSettings(baseSettings, governance),\n governance,\n agent_guidance: normalizeAgentGuidanceSettings(baseSettings.agent_guidance),\n item_types: {\n definitions: persistedFileBackedSections.item_type_definitions,\n },\n schema: {\n ...normalizedSchema,\n statuses: persistedFileBackedSections.schema_statuses,\n fields: persistedFileBackedSections.schema_fields,\n type_workflows: persistedFileBackedSections.schema_type_workflows,\n },\n search: buildSerializedSearchSettings(baseSettings),\n context: buildSerializedContextSettings(baseSettings),\n extensions: {\n enabled: normalizeStringList(baseSettings.extensions?.enabled),\n disabled: normalizeStringList(baseSettings.extensions?.disabled),\n policy: normalizeExtensionPolicySettings(baseSettings.extensions?.policy),\n },\n vector_store: buildSerializedVectorStoreSettings(baseSettings),\n };\n}\n\n/**\n * Implements serialize settings for the public runtime surface of this module.\n */\nexport function serializeSettings(settings: PmSettings, options: SerializeSettingsOptions = {}): string {\n const baseSettings = buildSerializeBaseSettings(settings);\n const governance = resolveGovernanceKnobs(baseSettings);\n const normalizedSchema = normalizeRuntimeSchemaSettings(baseSettings.schema);\n const persistedFileBackedSections = resolvePersistedFileBackedSchemaSections(baseSettings, options.persist_source);\n const normalizedSettings = buildNormalizedSettingsForSerialization(\n baseSettings,\n governance,\n normalizedSchema,\n persistedFileBackedSections,\n );\n const ordered = orderObject(\n {\n ...(normalizedSettings as unknown as Record<string, unknown>),\n governance: normalizeGovernanceForPersist(governance) as unknown,\n },\n [\n \"version\",\n \"id_prefix\",\n \"author_default\",\n \"item_format\",\n \"locks\",\n \"checkpoints\",\n \"output\",\n \"history\",\n \"validation\",\n \"governance\",\n \"workflow\",\n \"testing\",\n \"telemetry\",\n \"agent_guidance\",\n \"item_types\",\n \"schema\",\n \"context\",\n \"extensions\",\n \"search\",\n \"providers\",\n \"vector_store\",\n ],\n );\n orderSerializedSettingsSections(ordered);\n\n return `${JSON.stringify(ordered, null, 2)}\\n`;\n}\n\n/**\n * Implements read settings with metadata for the public runtime surface of this module.\n */\nexport async function readSettingsWithMetadata(pmRoot: string): Promise<SettingsReadResult> {\n const settingsPath = getSettingsPath(pmRoot);\n let trackedPathsForFailure: string[] = [settingsPath];\n await runActiveOnReadHooks({\n path: settingsPath,\n scope: \"project\",\n });\n\n const cachedResult = getSettingsReadCacheEntry<SettingsReadResult>(pmRoot);\n if (cachedResult) {\n const currentSignatures = await collectSettingsReadCacheSignatures(cachedResult.tracked_paths);\n if (settingsReadCacheSignaturesEqual(currentSignatures, cachedResult.signatures)) {\n return cloneSettingsReadResult(cachedResult.value);\n }\n }\n\n const settingsOnlySignatures = await collectSettingsReadCacheSignatures([settingsPath]);\n const raw = await readFileIfExists(settingsPath);\n if (raw === null) {\n const fallback = buildFallbackSettingsReadResult();\n await cacheSettingsReadResultIfStable(pmRoot, [settingsPath], fallback, settingsOnlySignatures, [settingsPath]);\n return fallback;\n }\n\n const settingsSignaturesAfterRead = await collectSettingsReadCacheSignatures([settingsPath]);\n if (!settingsReadCacheSignaturesEqual(settingsOnlySignatures, settingsSignaturesAfterRead)) {\n clearSettingsReadCache(pmRoot);\n return readSettingsWithMetadata(pmRoot);\n }\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw) as unknown;\n } catch {\n const fallback = buildFallbackSettingsReadResult(\"settings_read_invalid_json\");\n await cacheSettingsReadResultIfStable(pmRoot, [settingsPath], fallback, settingsSignaturesAfterRead, [settingsPath]);\n return fallback;\n }\n\n const validated = validateSettings(parsed);\n if (!validated.success) {\n const fallback = buildFallbackSettingsReadResult(\"settings_read_invalid_schema\");\n await cacheSettingsReadResultIfStable(pmRoot, [settingsPath], fallback, settingsSignaturesAfterRead, [settingsPath]);\n return fallback;\n }\n\n try {\n const mergedSettings = mergeSettings(validated.data);\n const trackedPaths = resolveSettingsReadTrackedPaths(pmRoot, mergedSettings.schema, settingsPath);\n trackedPathsForFailure = trackedPaths;\n const signaturesBeforeSchemaLoad = await collectSettingsReadCacheSignatures(trackedPaths);\n const schemaScaffold = await ensureRuntimeSchemaFileScaffold(pmRoot, mergedSettings.schema);\n const loadedSchemaSections = await loadRuntimeSchemaFromOptionalFiles(pmRoot, mergedSettings.schema);\n const signaturesAfterSchemaLoad = await collectSettingsReadCacheSignatures(trackedPaths);\n const settings: PmSettings = {\n ...mergedSettings,\n item_types: {\n definitions: normalizeItemTypeDefinitions([\n ...mergedSettings.item_types.definitions,\n ...arrayOrEmpty<ItemTypeDefinition>(loadedSchemaSections.type_definitions_from_file),\n ]),\n },\n schema: loadedSchemaSections.schema,\n };\n attachSettingsPersistSourceSnapshot(settings, buildSettingsPersistSourceSnapshot(validated.data, settings));\n const result: SettingsReadResult = {\n settings,\n metadata: {\n has_explicit_item_format: hasExplicitItemFormat(parsed),\n },\n warnings: [\n ...(validated.data.item_format === \"json_markdown\"\n ? [\"settings_item_format_legacy_json_markdown_coerced_to_toon\"]\n : []),\n ...schemaScaffold.created_paths.map((createdPath) => `runtime_schema_bootstrap_created:${createdPath}`),\n ...loadedSchemaSections.warnings,\n ],\n };\n if (schemaScaffold.created_paths.length === 0) {\n if (!settingsReadCacheSignaturesEqual(signaturesBeforeSchemaLoad, signaturesAfterSchemaLoad)) {\n clearSettingsReadCache(pmRoot);\n } else {\n setSettingsReadCacheEntry(pmRoot, {\n tracked_paths: trackedPaths,\n signatures: signaturesAfterSchemaLoad,\n value: cloneSettingsReadResult(result),\n });\n }\n } else {\n // Bootstrap warnings are intentionally one-shot and should not be replayed from cache.\n clearSettingsReadCache(pmRoot);\n }\n return result;\n } catch {\n const fallback = buildFallbackSettingsReadResult(\"settings_read_merge_failed\");\n await cacheSettingsReadResultSafe(pmRoot, trackedPathsForFailure, fallback);\n return fallback;\n }\n}\n\n/**\n * Implements read settings for the public runtime surface of this module.\n */\nexport async function readSettings(pmRoot: string): Promise<PmSettings> {\n return (await readSettingsWithMetadata(pmRoot)).settings;\n}\n\n/**\n * Implements write settings for the public runtime surface of this module.\n */\nexport async function writeSettings(pmRoot: string, settings: PmSettings, op = SETTINGS_WRITE_OP): Promise<void> {\n const settingsPath = getSettingsPath(pmRoot);\n await writeFileAtomic(\n settingsPath,\n serializeSettings(settings, {\n persist_source: getSettingsPersistSourceSnapshot(settings),\n }),\n );\n try {\n await runActiveOnWriteHooks({\n path: settingsPath,\n scope: \"project\",\n op,\n });\n } finally {\n clearSettingsReadCache(pmRoot);\n }\n}\n\nexport const settingsStoreTestOnly = {\n hasExplicitItemFormat,\n buildSettingsPersistSourceSnapshot,\n cacheSettingsReadResultIfStable,\n cacheSettingsReadResultSafe,\n mergeSettings,\n normalizeExtensionPolicySettings,\n normalizeExtensionPolicyOverride,\n normalizeExtensionPolicyOverrides,\n normalizeExtensionPolicyMode,\n normalizePmMaxVersionExceededModeSetting,\n normalizeExtensionSandboxProfile,\n normalizeExtensionTrustMode,\n normalizeLowerStringList,\n normalizeStringList,\n valueOrDefault,\n arrayOrEmpty,\n normalizeValidationPatternList,\n normalizeValidationMetadataRequiredFields,\n resolveSettingsReadTrackedPaths,\n resolvePersistedFileBackedSchemaSections,\n selectedSettingsReadCacheSignaturesEqual,\n};\n"],"names":["baseline","requireCloseReason","pmMaxVersionExceededMode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,IAAI,uBAAqD;AACzD,IAAI,0BAA2D;AAC/D,IAAI,yBAAyD;AAC7D,IAAI,2BAA8D;AAClE,IAAI,0BAA2D;AAC/D,IAAI,2BAA6D;AACjE,IAAI,+BAAqE;AACzE,IAAI,uBAAsE;AAC1E,IAAI,sBAA+B;AACnC,IAAI,kCAA8D,CAAA;AAClE,IAAM,wCAAwC,oBAAI,IAAI;EACpD;E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AAG;AAC5F,+BAAuB,MAAM;MAC/B,OAAO;AACL,kCAA0B,QAAQ;UAChC,eAAe;UACf,YAAY;UACZ,OAAO,wBAAwB,MAAM;SACtC;MACH;IACF,OAAO;AAEL,6BAAuB,MAAM;IAC/B;AACA,WAAO;EACT,QAAQ;AACN,UAAM,WAAW,gCAAgC,4BAA4B;AAC7E,UAAM,4BAA4B,QAAQ,wBAAwB,QAAQ;AAC1E,WAAO;EACT;AACF;AAKA,eAAsB,aAAa,QAAc;AAC/C,UAAQ,MAAM,yBAAyB,MAAM,GAAG;AAClD;AAKA,eAAsB,cAAc,QAAgB,UAAsB,KAAK,mBAAiB;AAC9F,QAAM,eAAe,gBAAgB,MAAM;AAC3C,QAAM,gBACJ,cACA,kBAAkB,UAAU;IAC1B,gBAAgB,iCAAiC,QAAQ;GAC1D,CAAC;AAEJ,MAAI;AACF,UAAM,sBAAsB;MAC1B,MAAM;MACN,OAAO;MACP;KACD;EACH;AACE,2BAAuB,MAAM;EAC/B;AACF","debugId":"d4ede2fb-7525-501d-a1f0-77276019f794"}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
normalizeAddFieldInput,
|
|
3
|
-
normalizeAddStatusInput,
|
|
4
|
-
parseFieldsFile,
|
|
5
|
-
parseStatusDefsFile,
|
|
6
|
-
serializeFieldsFile,
|
|
7
|
-
serializeStatusDefsFile,
|
|
8
|
-
upsertField,
|
|
9
|
-
upsertStatusDef
|
|
10
|
-
} from "./chunk-Y76TWC45.js";
|
|
11
|
-
import {
|
|
12
|
-
parseNestedSettingValue,
|
|
13
|
-
readNestedSettingValue,
|
|
14
|
-
resolveNestedSettingDescriptor
|
|
15
|
-
} from "./chunk-VUHVWI4C.js";
|
|
16
|
-
import {
|
|
17
|
-
normalizeAddTypeInput,
|
|
18
|
-
parseItemTypesFile,
|
|
19
|
-
serializeItemTypesFile,
|
|
20
|
-
upsertItemType
|
|
21
|
-
} from "./chunk-T35XLYZF.js";
|
|
22
|
-
|
|
23
|
-
// dist/core/profile/profile-describe.js
|
|
24
|
-
!(function() {
|
|
25
|
-
try {
|
|
26
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
27
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a291c588-5fe0-5377-a302-b1c2471217bc");
|
|
28
|
-
} catch (e2) {
|
|
29
|
-
}
|
|
30
|
-
})();
|
|
31
|
-
function describeProfileComposition(profile) {
|
|
32
|
-
return {
|
|
33
|
-
types: profile.types.length,
|
|
34
|
-
statuses: profile.statuses.length,
|
|
35
|
-
fields: profile.fields.length,
|
|
36
|
-
workflows: profile.workflows.length,
|
|
37
|
-
config: profile.config.length,
|
|
38
|
-
templates: profile.templates.length,
|
|
39
|
-
packages: profile.packages.length
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function describeProjectProfile(profile) {
|
|
43
|
-
return {
|
|
44
|
-
name: profile.name,
|
|
45
|
-
title: profile.title,
|
|
46
|
-
summary: profile.summary,
|
|
47
|
-
composition: describeProfileComposition(profile),
|
|
48
|
-
types: profile.types.map((type) => lenientIdentifier(() => normalizeAddTypeInput(type).name, () => String(type.name ?? ""))),
|
|
49
|
-
statuses: profile.statuses.map((status) => lenientIdentifier(() => normalizeAddStatusInput(status).id, () => String(status.id ?? ""))),
|
|
50
|
-
fields: profile.fields.map((field) => lenientIdentifier(() => normalizeAddFieldInput(field).key, () => String(field.key ?? ""))),
|
|
51
|
-
workflows: profile.workflows.map((workflow) => workflow.type),
|
|
52
|
-
config: profile.config.map((entry) => `${entry.key}=${entry.value}`),
|
|
53
|
-
templates: profile.templates.map((template) => template.name),
|
|
54
|
-
packages: profile.packages.map((recommendation) => ({ spec: recommendation.spec, reason: recommendation.reason }))
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function lenientIdentifier(normalize, raw) {
|
|
58
|
-
try {
|
|
59
|
-
return normalize();
|
|
60
|
-
} catch {
|
|
61
|
-
return raw();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// dist/core/profile/profile-plan.js
|
|
66
|
-
!(function() {
|
|
67
|
-
try {
|
|
68
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
69
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "4435194d-79d2-5bb2-ae11-3959340e495b");
|
|
70
|
-
} catch (e2) {
|
|
71
|
-
}
|
|
72
|
-
})();
|
|
73
|
-
function planSchemaComponent(initialFile, inputs, keyOf, serialize, upsert) {
|
|
74
|
-
let file = initialFile;
|
|
75
|
-
const changes = [];
|
|
76
|
-
for (const input of inputs) {
|
|
77
|
-
const before = serialize(file);
|
|
78
|
-
const result = upsert(file, input);
|
|
79
|
-
const after = serialize(result.file);
|
|
80
|
-
file = result.file;
|
|
81
|
-
const status = before === after ? "unchanged" : result.replaced ? "update" : "add";
|
|
82
|
-
changes.push({ key: keyOf(input), status });
|
|
83
|
-
}
|
|
84
|
-
return { file, changes, changed: changes.some((change) => change.status !== "unchanged") };
|
|
85
|
-
}
|
|
86
|
-
function canonicalTransitions(transitions) {
|
|
87
|
-
return JSON.stringify(transitions.map((pair) => pair.join("\0")).sort());
|
|
88
|
-
}
|
|
89
|
-
function planWorkflows(current, desired) {
|
|
90
|
-
const result = current.map((entry) => ({ ...entry }));
|
|
91
|
-
const changes = [];
|
|
92
|
-
for (const workflow of desired) {
|
|
93
|
-
const index = result.findIndex((entry) => entry.type === workflow.type);
|
|
94
|
-
const next = { type: workflow.type, allowed_transitions: workflow.allowed_transitions };
|
|
95
|
-
if (index < 0) {
|
|
96
|
-
result.push(next);
|
|
97
|
-
changes.push({ type: workflow.type, status: "add" });
|
|
98
|
-
} else if (canonicalTransitions(result[index].allowed_transitions) === canonicalTransitions(workflow.allowed_transitions)) {
|
|
99
|
-
changes.push({ type: workflow.type, status: "unchanged" });
|
|
100
|
-
} else {
|
|
101
|
-
result[index] = next;
|
|
102
|
-
changes.push({ type: workflow.type, status: "update" });
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return { changes, result, changed: changes.some((change) => change.status !== "unchanged") };
|
|
106
|
-
}
|
|
107
|
-
function planConfig(profile, settings) {
|
|
108
|
-
const changes = [];
|
|
109
|
-
for (const entry of profile.config) {
|
|
110
|
-
const descriptor = resolveNestedSettingDescriptor(entry.key);
|
|
111
|
-
if (descriptor === void 0) {
|
|
112
|
-
throw new Error(`Profile "${profile.name}" references unknown config key "${entry.key}".`);
|
|
113
|
-
}
|
|
114
|
-
const parsed = parseNestedSettingValue(descriptor, entry.value);
|
|
115
|
-
if (!parsed.ok) {
|
|
116
|
-
throw new Error(`Profile "${profile.name}" config ${entry.key}: ${parsed.error.message}`);
|
|
117
|
-
}
|
|
118
|
-
const current = readNestedSettingValue(settings, descriptor);
|
|
119
|
-
const status = current === null ? "add" : current === parsed.parsed.value ? "unchanged" : "update";
|
|
120
|
-
changes.push({ key: descriptor.key, path: descriptor.path, value: parsed.parsed.value, status });
|
|
121
|
-
}
|
|
122
|
-
return { changes, changed: changes.some((change) => change.status !== "unchanged") };
|
|
123
|
-
}
|
|
124
|
-
function canonicalTemplateOptions(options) {
|
|
125
|
-
const sorted = Object.entries(options).sort(([left], [right]) => left.localeCompare(right));
|
|
126
|
-
return JSON.stringify(sorted);
|
|
127
|
-
}
|
|
128
|
-
function planTemplates(profile, existing) {
|
|
129
|
-
const changes = [];
|
|
130
|
-
for (const template of profile.templates) {
|
|
131
|
-
const current = existing.get(template.name);
|
|
132
|
-
let status;
|
|
133
|
-
if (current === void 0) {
|
|
134
|
-
status = "add";
|
|
135
|
-
} else if (canonicalTemplateOptions(current) === canonicalTemplateOptions(template.options)) {
|
|
136
|
-
status = "unchanged";
|
|
137
|
-
} else {
|
|
138
|
-
status = "update";
|
|
139
|
-
}
|
|
140
|
-
changes.push({ name: template.name, options: template.options, status });
|
|
141
|
-
}
|
|
142
|
-
return { changes, changed: changes.some((change) => change.status !== "unchanged") };
|
|
143
|
-
}
|
|
144
|
-
function planProfileApplication(profile, current) {
|
|
145
|
-
const types = planSchemaComponent(parseItemTypesFile(current.typesRaw), profile.types, (input) => normalizeAddTypeInput(input).name, serializeItemTypesFile, (file, input) => upsertItemType(file, normalizeAddTypeInput(input)));
|
|
146
|
-
const statuses = planSchemaComponent(parseStatusDefsFile(current.statusesRaw), profile.statuses, (input) => normalizeAddStatusInput(input).id, serializeStatusDefsFile, (file, input) => upsertStatusDef(file, normalizeAddStatusInput(input)));
|
|
147
|
-
const fields = planSchemaComponent(parseFieldsFile(current.fieldsRaw), profile.fields, (input) => normalizeAddFieldInput(input).key, serializeFieldsFile, (file, input) => upsertField(file, normalizeAddFieldInput(input)));
|
|
148
|
-
const workflows = planWorkflows(current.workflows, profile.workflows);
|
|
149
|
-
const config = planConfig(profile, current.settings);
|
|
150
|
-
const templates = planTemplates(profile, current.templates);
|
|
151
|
-
const packages = profile.packages.map((recommendation) => ({
|
|
152
|
-
spec: recommendation.spec,
|
|
153
|
-
reason: recommendation.reason,
|
|
154
|
-
status: current.installedPackages.has(recommendation.spec) ? "installed" : "recommended"
|
|
155
|
-
}));
|
|
156
|
-
const changed = types.changed || statuses.changed || fields.changed || workflows.changed || config.changed || templates.changed;
|
|
157
|
-
return {
|
|
158
|
-
profile: { name: profile.name, title: profile.title, summary: profile.summary },
|
|
159
|
-
types,
|
|
160
|
-
statuses,
|
|
161
|
-
fields,
|
|
162
|
-
workflows,
|
|
163
|
-
config,
|
|
164
|
-
templates,
|
|
165
|
-
packages,
|
|
166
|
-
changed
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export {
|
|
171
|
-
describeProfileComposition,
|
|
172
|
-
describeProjectProfile,
|
|
173
|
-
planProfileApplication
|
|
174
|
-
};
|
|
175
|
-
//# sourceMappingURL=chunk-UZRDBL6W.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../../core/profile/profile-describe.ts", "../../../../../../../../core/profile/profile-plan.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module core/profile/profile-describe\n *\n * Author-time *describe* primitive for a {@link ProjectProfileDefinition}: the\n * project-profile analogue of the extension surface's `describeExtensionBlueprint`.\n * It distills a profile into a deterministic, side-effect-free summary — the\n * per-dimension counts plus the resolved entry identifiers — so the CLI\n * `pm profile show`/`list` formatters and SDK consumers share one source of truth\n * for \"what does this profile stage?\" rather than each recomputing it inline.\n *\n * Identifier derivation deliberately mirrors what {@link module:core/profile/profile-plan}\n * upserts: item type names, status ids, and field keys all flow through the same\n * `normalizeAddTypeInput` / `normalizeAddStatusInput` / `normalizeAddFieldInput`\n * canonicalization the planner uses, so describe reports the exact ids/keys\n * `pm profile apply` stages (not the author's raw casing/spelling). Workflows,\n * config, templates, and packages surface their authored identity verbatim.\n *\n * Describe is intentionally lenient: it feeds read-only `pm profile show`/`list`,\n * so a semantically-invalid entry from an untrusted extension-contributed profile\n * (a built-in-named or empty type/status/field the normalizer rejects) falls back\n * to its raw identifier rather than throwing — surfacing the actual defect is the\n * job of {@link module:core/profile/profile-lint lintProjectProfile}, not describe.\n */\nimport { normalizeAddFieldInput } from \"../schema/fields-file.js\";\nimport { normalizeAddStatusInput } from \"../schema/status-defs-file.js\";\nimport { normalizeAddTypeInput } from \"../schema/item-types-file.js\";\nimport type { ProjectProfileDefinition } from \"./profile-presets.js\";\n\n/** Per-dimension counts summarizing how much a profile stages. */\nexport interface ProjectProfileComposition {\n /** Number of item types the profile registers. */\n types: number;\n /** Number of custom statuses. */\n statuses: number;\n /** Number of custom fields. */\n fields: number;\n /** Number of per-type workflows. */\n workflows: number;\n /** Number of config knobs. */\n config: number;\n /** Number of create templates. */\n templates: number;\n /** Number of recommended packages. */\n packages: number;\n}\n\n/** A package recommendation distilled to its spec and rationale. */\nexport interface ProjectProfilePackageSummary {\n /** Catalog alias or install spec. */\n spec: string;\n /** Why the archetype benefits from the package. */\n reason: string;\n}\n\n/** Deterministic summary of a profile's composition produced by {@link describeProjectProfile}. */\nexport interface ProjectProfileDescription {\n /** Profile name. */\n name: string;\n /** Display title. */\n title: string;\n /** One-line archetype summary. */\n summary: string;\n /** Per-dimension counts. */\n composition: ProjectProfileComposition;\n /** Canonical item type names the profile registers. */\n types: string[];\n /** Custom status ids. */\n statuses: string[];\n /** Custom field keys. */\n fields: string[];\n /** Item types governed by a staged workflow. */\n workflows: string[];\n /** Config knobs as `key=value` pairs. */\n config: string[];\n /** Template names the profile stages. */\n templates: string[];\n /** Recommended package specs with rationale. */\n packages: ProjectProfilePackageSummary[];\n}\n\n/**\n * Computes the per-dimension counts for a profile.\n */\nexport function describeProfileComposition(profile: ProjectProfileDefinition): ProjectProfileComposition {\n return {\n types: profile.types.length,\n statuses: profile.statuses.length,\n fields: profile.fields.length,\n workflows: profile.workflows.length,\n config: profile.config.length,\n templates: profile.templates.length,\n packages: profile.packages.length,\n };\n}\n\n/**\n * Distills a profile definition into a deterministic composition summary. Pure\n * and tracker-independent; the resolved identifiers match exactly what\n * `pm profile apply` stages for each dimension.\n *\n * @param profile The profile definition to describe.\n * @returns The profile's metadata, per-dimension counts, and resolved entry\n * identifiers.\n */\nexport function describeProjectProfile(profile: ProjectProfileDefinition): ProjectProfileDescription {\n return {\n name: profile.name,\n title: profile.title,\n summary: profile.summary,\n composition: describeProfileComposition(profile),\n types: profile.types.map((type) =>\n lenientIdentifier(() => normalizeAddTypeInput(type).name, () => String(type.name ?? \"\")),\n ),\n statuses: profile.statuses.map((status) =>\n lenientIdentifier(() => normalizeAddStatusInput(status).id, () => String(status.id ?? \"\")),\n ),\n fields: profile.fields.map((field) =>\n lenientIdentifier(() => normalizeAddFieldInput(field).key, () => String(field.key ?? \"\")),\n ),\n workflows: profile.workflows.map((workflow) => workflow.type),\n config: profile.config.map((entry) => `${entry.key}=${entry.value}`),\n templates: profile.templates.map((template) => template.name),\n packages: profile.packages.map((recommendation) => ({ spec: recommendation.spec, reason: recommendation.reason })),\n };\n}\n\n/**\n * Resolves a dimension entry's identifier through the planner's canonicalizing\n * normalizer so describe reports exactly what `pm profile apply` stages, falling\n * back to the entry's raw identifier when the normalizer rejects a semantically\n * invalid value (a built-in-named or empty type/status/field) — surfacing the\n * defect is the job of {@link module:core/profile/profile-lint}, not describe.\n */\nfunction lenientIdentifier(normalize: () => string, raw: () => string): string {\n try {\n return normalize();\n } catch {\n return raw();\n }\n}\n", "/**\n * @module core/profile/profile-plan\n *\n * Pure planning for `pm profile apply`. Given a {@link ProjectProfileDefinition}\n * and a snapshot of the current tracker state, computes an idempotent diff across\n * every profile dimension (item types, statuses, fields, per-type workflows,\n * config knobs, templates, and package recommendations) without touching disk.\n *\n * Idempotency is structural: each schema component is upserted onto a clone and\n * the canonical serialization is compared before/after, so re-running `apply`\n * against an already-applied profile reports every entry as `unchanged` and the\n * command performs zero writes. The resulting files/settings the planner returns\n * are exactly what the apply step persists, guaranteeing the dry-run preview and\n * the real mutation never diverge.\n */\nimport {\n normalizeAddTypeInput,\n parseItemTypesFile,\n serializeItemTypesFile,\n upsertItemType,\n type ItemTypesFile,\n} from \"../schema/item-types-file.js\";\nimport {\n normalizeAddStatusInput,\n parseStatusDefsFile,\n serializeStatusDefsFile,\n upsertStatusDef,\n type StatusDefsFile,\n} from \"../schema/status-defs-file.js\";\nimport {\n normalizeAddFieldInput,\n parseFieldsFile,\n serializeFieldsFile,\n upsertField,\n type FieldsFile,\n} from \"../schema/fields-file.js\";\nimport {\n parseNestedSettingValue,\n readNestedSettingValue,\n resolveNestedSettingDescriptor,\n} from \"../config/nested-settings.js\";\nimport type { TypeWorkflowDefinition } from \"../../types.js\";\nimport type {\n ProfileTemplateOptions,\n ProjectProfileDefinition,\n} from \"./profile-presets.js\";\n\n/** Per-entry change classification used across every profile dimension. */\nexport type ProfileChangeStatus = \"add\" | \"update\" | \"unchanged\";\n\n/** A single staged change keyed by its component identifier. */\nexport interface ProfileComponentChange {\n /** Component identity (type name, status id, field key, etc.). */\n key: string;\n /** Whether the entry is new, an overwrite, or already current. */\n status: ProfileChangeStatus;\n}\n\n/** Plan for a file-backed schema component (types/statuses/fields). */\nexport interface ProfileSchemaPlan<TFile> {\n /** Serialized file content to persist when `changed`. */\n file: TFile;\n /** Per-entry classifications in profile order. */\n changes: ProfileComponentChange[];\n /** True when at least one entry is add/update. */\n changed: boolean;\n}\n\n/** A staged per-type workflow change plus the merged result list. */\nexport interface ProfileWorkflowChange {\n /** Item type the workflow governs. */\n type: string;\n /** Whether the workflow is new, changed, or already current. */\n status: ProfileChangeStatus;\n}\n\n/** Plan for the `schema.type_workflows` settings subtree. */\nexport interface ProfileWorkflowPlan {\n /** Per-workflow classifications in profile order. */\n changes: ProfileWorkflowChange[];\n /** Full merged workflow list to persist when `changed`. */\n result: TypeWorkflowDefinition[];\n /** True when at least one workflow is add/update. */\n changed: boolean;\n}\n\n/** A staged config knob plus the resolved settings path and typed value. */\nexport interface ProfileConfigChange {\n /** Descriptor key (snake_case). */\n key: string;\n /** Dotted PmSettings path the value writes to. */\n path: string;\n /** Typed leaf value to persist. */\n value: string | number | boolean;\n /** Whether the leaf is new, changed, or already current. */\n status: ProfileChangeStatus;\n}\n\n/** Plan for the nested-settings knobs a profile stages. */\nexport interface ProfileConfigPlan {\n /** Per-knob classifications in profile order. */\n changes: ProfileConfigChange[];\n /** True when at least one knob is add/update. */\n changed: boolean;\n}\n\n/** A staged create-template change. */\nexport interface ProfileTemplateChange {\n /** Template name. */\n name: string;\n /** Option payload to persist for the template. */\n options: ProfileTemplateOptions;\n /** Whether the template is new, changed, or already current. */\n status: ProfileChangeStatus;\n}\n\n/** Plan for the create templates a profile stages. */\nexport interface ProfileTemplatePlan {\n /** Per-template classifications in profile order. */\n changes: ProfileTemplateChange[];\n /** True when at least one template is add/update. */\n changed: boolean;\n}\n\n/** Advisory package recommendation with install status. */\nexport interface ProfilePackagePlan {\n /** Catalog alias or install spec. */\n spec: string;\n /** Why the archetype benefits from the package. */\n reason: string;\n /** `installed` when already present, otherwise `recommended`. */\n status: \"installed\" | \"recommended\";\n}\n\n/** Current tracker state the planner diffs the profile against. */\nexport interface ProfileCurrentState {\n /** Raw `schema/types.json` content (or null when absent). */\n typesRaw: string | null;\n /** Raw status-defs file content (or null when absent). */\n statusesRaw: string | null;\n /** Raw fields file content (or null when absent). */\n fieldsRaw: string | null;\n /** Current `schema.type_workflows` entries. */\n workflows: readonly TypeWorkflowDefinition[];\n /** Settings object used to read current config leaf values. */\n settings: unknown;\n /** Existing stored template options keyed by template name. */\n templates: ReadonlyMap<string, ProfileTemplateOptions>;\n /** Install specs/aliases already present in the project. */\n installedPackages: ReadonlySet<string>;\n}\n\n/** Complete idempotent plan for applying a profile. */\nexport interface ProfileApplicationPlan {\n /** Identifying metadata for the planned profile. */\n profile: { name: string; title: string; summary: string };\n /** Item-type plan. */\n types: ProfileSchemaPlan<ItemTypesFile>;\n /** Status plan. */\n statuses: ProfileSchemaPlan<StatusDefsFile>;\n /** Field plan. */\n fields: ProfileSchemaPlan<FieldsFile>;\n /** Per-type workflow plan. */\n workflows: ProfileWorkflowPlan;\n /** Config-knob plan. */\n config: ProfileConfigPlan;\n /** Template plan. */\n templates: ProfileTemplatePlan;\n /** Advisory package recommendations. */\n packages: ProfilePackagePlan[];\n /** True when any dimension stages an add/update. */\n changed: boolean;\n}\n\n/**\n * Plans a file-backed schema component by upserting each normalized input onto a\n * working clone and comparing canonical serializations to classify add/update/\n * unchanged. Shared by the type, status, and field planners.\n */\nfunction planSchemaComponent<TInput, TFile>(\n initialFile: TFile,\n inputs: readonly TInput[],\n keyOf: (input: TInput) => string,\n serialize: (file: TFile) => string,\n upsert: (file: TFile, input: TInput) => { file: TFile; replaced: boolean },\n): ProfileSchemaPlan<TFile> {\n let file = initialFile;\n const changes: ProfileComponentChange[] = [];\n for (const input of inputs) {\n const before = serialize(file);\n const result = upsert(file, input);\n const after = serialize(result.file);\n file = result.file;\n const status: ProfileChangeStatus = before === after ? \"unchanged\" : result.replaced ? \"update\" : \"add\";\n changes.push({ key: keyOf(input), status });\n }\n return { file, changes, changed: changes.some((change) => change.status !== \"unchanged\") };\n}\n\n/**\n * Canonicalizes an allowed-transition list to an order-independent string. The\n * transitions are a set of `[from, to]` pairs, so a stored list that merely\n * reorders the same pairs must not register as a spurious `update`.\n */\nfunction canonicalTransitions(transitions: readonly [string, string][]): string {\n return JSON.stringify(transitions.map((pair) => pair.join(\"\u0000\")).sort());\n}\n\n/**\n * Plans the per-type workflow merge. A workflow whose transition set matches the\n * current entry (order-independent) is `unchanged`; a new type is `add`; a\n * changed transition set is `update`. The merged result preserves untouched\n * entries.\n */\nfunction planWorkflows(\n current: readonly TypeWorkflowDefinition[],\n desired: readonly TypeWorkflowDefinition[],\n): ProfileWorkflowPlan {\n const result = current.map((entry) => ({ ...entry }));\n const changes: ProfileWorkflowChange[] = [];\n for (const workflow of desired) {\n const index = result.findIndex((entry) => entry.type === workflow.type);\n const next: TypeWorkflowDefinition = { type: workflow.type, allowed_transitions: workflow.allowed_transitions };\n if (index < 0) {\n result.push(next);\n changes.push({ type: workflow.type, status: \"add\" });\n } else if (canonicalTransitions(result[index].allowed_transitions) === canonicalTransitions(workflow.allowed_transitions)) {\n changes.push({ type: workflow.type, status: \"unchanged\" });\n } else {\n result[index] = next;\n changes.push({ type: workflow.type, status: \"update\" });\n }\n }\n return { changes, result, changed: changes.some((change) => change.status !== \"unchanged\") };\n}\n\n/**\n * Plans config knobs by resolving each descriptor, coercing the value, and\n * comparing it against the current settings leaf. Throws a plain Error for an\n * unknown key or invalid value so the CLI can map it to a USAGE exit code.\n */\nfunction planConfig(profile: ProjectProfileDefinition, settings: unknown): ProfileConfigPlan {\n const changes: ProfileConfigChange[] = [];\n for (const entry of profile.config) {\n const descriptor = resolveNestedSettingDescriptor(entry.key);\n if (descriptor === undefined) {\n throw new Error(`Profile \"${profile.name}\" references unknown config key \"${entry.key}\".`);\n }\n const parsed = parseNestedSettingValue(descriptor, entry.value);\n if (!parsed.ok) {\n throw new Error(`Profile \"${profile.name}\" config ${entry.key}: ${parsed.error.message}`);\n }\n // readNestedSettingValue returns `null` (never `undefined`) when the leaf is\n // absent, so a null current is an unambiguous \"add\".\n const current = readNestedSettingValue(settings, descriptor);\n const status: ProfileChangeStatus =\n current === null ? \"add\" : current === parsed.parsed.value ? \"unchanged\" : \"update\";\n changes.push({ key: descriptor.key, path: descriptor.path, value: parsed.parsed.value, status });\n }\n return { changes, changed: changes.some((change) => change.status !== \"unchanged\") };\n}\n\n/**\n * Canonicalizes a template option payload to a key-order-independent string so a\n * profile's authored option order never produces a spurious `update` against the\n * key-sorted form `pm templates save` persists.\n */\nfunction canonicalTemplateOptions(options: ProfileTemplateOptions): string {\n const sorted = Object.entries(options).sort(([left], [right]) => left.localeCompare(right));\n return JSON.stringify(sorted);\n}\n\n/**\n * Plans create templates by comparing each profile template's option payload\n * against the stored template (if any). Equality is canonical so option key\n * ordering never produces a spurious `update`.\n */\nfunction planTemplates(\n profile: ProjectProfileDefinition,\n existing: ReadonlyMap<string, ProfileTemplateOptions>,\n): ProfileTemplatePlan {\n const changes: ProfileTemplateChange[] = [];\n for (const template of profile.templates) {\n const current = existing.get(template.name);\n let status: ProfileChangeStatus;\n if (current === undefined) {\n status = \"add\";\n } else if (canonicalTemplateOptions(current) === canonicalTemplateOptions(template.options)) {\n status = \"unchanged\";\n } else {\n status = \"update\";\n }\n changes.push({ name: template.name, options: template.options, status });\n }\n return { changes, changed: changes.some((change) => change.status !== \"unchanged\") };\n}\n\n/**\n * Computes the complete idempotent application plan for a profile against the\n * supplied tracker snapshot. The returned files/settings are exactly what the\n * apply step persists; nothing here touches disk.\n */\nexport function planProfileApplication(\n profile: ProjectProfileDefinition,\n current: ProfileCurrentState,\n): ProfileApplicationPlan {\n const types = planSchemaComponent(\n parseItemTypesFile(current.typesRaw),\n profile.types,\n (input) => normalizeAddTypeInput(input).name,\n serializeItemTypesFile,\n (file, input) => upsertItemType(file, normalizeAddTypeInput(input)),\n );\n const statuses = planSchemaComponent(\n parseStatusDefsFile(current.statusesRaw),\n profile.statuses,\n (input) => normalizeAddStatusInput(input).id,\n serializeStatusDefsFile,\n (file, input) => upsertStatusDef(file, normalizeAddStatusInput(input)),\n );\n const fields = planSchemaComponent(\n parseFieldsFile(current.fieldsRaw),\n profile.fields,\n (input) => normalizeAddFieldInput(input).key,\n serializeFieldsFile,\n (file, input) => upsertField(file, normalizeAddFieldInput(input)),\n );\n const workflows = planWorkflows(current.workflows, profile.workflows);\n const config = planConfig(profile, current.settings);\n const templates = planTemplates(profile, current.templates);\n const packages = profile.packages.map((recommendation) => ({\n spec: recommendation.spec,\n reason: recommendation.reason,\n status: current.installedPackages.has(recommendation.spec) ? (\"installed\" as const) : (\"recommended\" as const),\n }));\n const changed = types.changed || statuses.changed || fields.changed || workflows.changed || config.changed || templates.changed;\n return {\n profile: { name: profile.name, title: profile.title, summary: profile.summary },\n types,\n statuses,\n fields,\n workflows,\n config,\n templates,\n packages,\n changed,\n };\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFM,SAAU,2BAA2B,SAAiC;AAC1E,SAAO;IACL,OAAO,QAAQ,MAAM;IACrB,UAAU,QAAQ,SAAS;IAC3B,QAAQ,QAAQ,OAAO;IACvB,WAAW,QAAQ,UAAU;IAC7B,QAAQ,QAAQ,OAAO;IACvB,WAAW,QAAQ,UAAU;IAC7B,UAAU,QAAQ,SAAS;;AAE/B;AAWM,SAAU,uBAAuB,SAAiC;AACtE,SAAO;IACL,MAAM,QAAQ;IACd,OAAO,QAAQ;IACf,SAAS,QAAQ;IACjB,aAAa,2BAA2B,OAAO;IAC/C,OAAO,QAAQ,MAAM,IAAI,CAAC,SACxB,kBAAkB,MAAM,sBAAsB,IAAI,E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