@unbrained/pm-cli 2026.7.4 → 2026.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +1 -5
- package/dist/cli/commands/calendar.d.ts +3 -2
- package/dist/cli/commands/calendar.js +4 -4
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/claim.js +17 -3
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/close.js +34 -16
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/copy.js +3 -3
- package/dist/cli/commands/copy.js.map +1 -1
- package/dist/cli/commands/create.d.ts +7 -0
- package/dist/cli/commands/create.js +156 -110
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.d.ts +6 -0
- package/dist/cli/commands/extension/bundled-catalog.js +15 -2
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +6 -3
- package/dist/cli/commands/extension/describe.js +21 -9
- package/dist/cli/commands/extension/describe.js.map +1 -1
- package/dist/cli/commands/extension/doctor.d.ts +0 -4
- package/dist/cli/commands/extension/doctor.js +3 -3
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.js +7 -2
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension/shared.d.ts +2 -7
- package/dist/cli/commands/extension/shared.js +4 -10
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/extension.js +33 -8
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/profile.js +3 -3
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/reindex.js +3 -3
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.js +3 -3
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.js +10 -10
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/update.js +5 -3
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/error-guidance.js +107 -7
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/main.d.ts +6 -2
- package/dist/cli/main.js +33 -12
- package/dist/cli/main.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +18 -0
- package/dist/cli-bundle/chunks/{activity-OENQCYZD.js → activity-YKAKZTZ4.js} +11 -9
- package/dist/cli-bundle/chunks/{aggregate-EC4LWS3U.js → aggregate-EQX2RGB7.js} +16 -13
- package/dist/cli-bundle/chunks/{aggregate-EC4LWS3U.js.map → aggregate-EQX2RGB7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{aggregate-RCB3QJJE.js → aggregate-PEGZGJXD.js} +18 -15
- package/dist/cli-bundle/chunks/{aggregate-RCB3QJJE.js.map → aggregate-PEGZGJXD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-XLEKVVWB.js → append-CZGUZ45Q.js} +11 -8
- package/dist/cli-bundle/chunks/{append-XLEKVVWB.js.map → append-CZGUZ45Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-ADBOI3A6.js → append-NSQBCXZJ.js} +13 -10
- package/dist/cli-bundle/chunks/{append-ADBOI3A6.js.map → append-NSQBCXZJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js +1413 -0
- package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2LRMWMZ6.js → chunk-3PL6LEKP.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-2LRMWMZ6.js.map → chunk-3PL6LEKP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CN4OAA2G.js → chunk-3U3VEWK6.js} +277 -119
- package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EB4BBEZD.js → chunk-3Y4OESPP.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-EB4BBEZD.js.map → chunk-3Y4OESPP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-NHDR3UCW.js → chunk-4LRVSBO6.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-NHDR3UCW.js.map → chunk-4LRVSBO6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6YB7HG2J.js → chunk-4OFLJHX6.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-6YB7HG2J.js.map → chunk-4OFLJHX6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SBNT6SLO.js → chunk-4QQ6PM7M.js} +45 -557
- package/dist/cli-bundle/chunks/chunk-4QQ6PM7M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-M34MVAOP.js → chunk-53BTLLAF.js} +16 -200
- package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UYLA5ROU.js → chunk-57C2RLW5.js} +277 -112
- package/dist/cli-bundle/chunks/chunk-57C2RLW5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-R7EMP4JG.js → chunk-5B3X4Y22.js} +52 -63
- package/dist/cli-bundle/chunks/{chunk-R7EMP4JG.js.map → chunk-5B3X4Y22.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-XBIYI23P.js → chunk-5J2XPTAD.js} +10 -8
- package/dist/cli-bundle/chunks/{chunk-XBIYI23P.js.map → chunk-5J2XPTAD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4SHME4VR.js → chunk-5JE6SMYS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4KPQQ42D.js → chunk-5JZ7APJU.js} +18 -16
- package/dist/cli-bundle/chunks/{chunk-4KPQQ42D.js.map → chunk-5JZ7APJU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-BDDYM4LH.js → chunk-5VVUKE3U.js} +424 -2228
- package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QFXFKYNQ.js → chunk-75U6M5ZD.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-QFXFKYNQ.js.map → chunk-75U6M5ZD.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +23 -0
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-A222YWOQ.js → chunk-7EQNAZX2.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-A222YWOQ.js.map → chunk-7EQNAZX2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-Z4DGFQDH.js → chunk-7LQKVMPA.js} +14 -4
- package/dist/cli-bundle/chunks/chunk-7LQKVMPA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-EH23N5FX.js → chunk-7MDXZAZS.js} +29 -7
- package/dist/cli-bundle/chunks/chunk-7MDXZAZS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-XQCWTSLO.js → chunk-7QH7DHUB.js} +74 -8
- package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3C5T3ZEO.js → chunk-7WYXBPYQ.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-3C5T3ZEO.js.map → chunk-7WYXBPYQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js +150 -0
- package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-CQISNF3Z.js → chunk-ABRA3BHY.js} +18 -16
- package/dist/cli-bundle/chunks/{chunk-CQISNF3Z.js.map → chunk-ABRA3BHY.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js +47 -0
- package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Y2VSCQ77.js → chunk-BFVHCAOO.js} +9 -7
- package/dist/cli-bundle/chunks/{chunk-Y2VSCQ77.js.map → chunk-BFVHCAOO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7ITQSEBL.js → chunk-BVEUCSH2.js} +6 -4
- package/dist/cli-bundle/chunks/{chunk-7ITQSEBL.js.map → chunk-BVEUCSH2.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js +160 -0
- package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HL742IBM.js → chunk-D3UCE7RW.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-HL742IBM.js.map → chunk-D3UCE7RW.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +275 -0
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js +634 -0
- package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-MZG6I2Q2.js → chunk-DRBV5UC2.js} +8 -23
- package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DEIDJQZK.js → chunk-E2FUG6GD.js} +15 -220
- package/dist/cli-bundle/chunks/{chunk-DEIDJQZK.js.map → chunk-E2FUG6GD.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3MLQZI3H.js → chunk-EEY54JMF.js} +5 -3
- package/dist/cli-bundle/chunks/{chunk-3MLQZI3H.js.map → chunk-EEY54JMF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CQFZRLXQ.js → chunk-EZFKWSC7.js} +94 -16
- package/dist/cli-bundle/chunks/{chunk-CQFZRLXQ.js.map → chunk-EZFKWSC7.js.map} +4 -4
- package/dist/cli-bundle/chunks/{chunk-4PJYRA3V.js → chunk-FDBARR33.js} +17 -15
- package/dist/cli-bundle/chunks/{chunk-4PJYRA3V.js.map → chunk-FDBARR33.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NGDK3KEZ.js → chunk-FGQKEDE4.js} +36 -12
- package/dist/cli-bundle/chunks/chunk-FGQKEDE4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FMWQRMHS.js → chunk-FJRKQREY.js} +10 -18
- package/dist/cli-bundle/chunks/chunk-FJRKQREY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6QY2NA2M.js → chunk-FUM6UMY4.js} +10 -11
- package/dist/cli-bundle/chunks/{chunk-6QY2NA2M.js.map → chunk-FUM6UMY4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-UGDONITK.js → chunk-GIWXVMZ3.js} +140 -334
- package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OTSP6UEX.js → chunk-HBYZDSK5.js} +19 -17
- package/dist/cli-bundle/chunks/{chunk-OTSP6UEX.js.map → chunk-HBYZDSK5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-D2LDM35X.js → chunk-HJE4JTKQ.js} +6 -4
- package/dist/cli-bundle/chunks/{chunk-D2LDM35X.js.map → chunk-HJE4JTKQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-AOP2EMK3.js → chunk-HK72NWAD.js} +89 -18
- package/dist/cli-bundle/chunks/chunk-HK72NWAD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2ONH3WG6.js → chunk-IJ6CO3JV.js} +18 -16
- package/dist/cli-bundle/chunks/{chunk-2ONH3WG6.js.map → chunk-IJ6CO3JV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-J4KNRDI3.js → chunk-JFCVQXZX.js} +139 -326
- package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-V655JQ5J.js → chunk-JLA7EVYV.js} +12 -10
- package/dist/cli-bundle/chunks/{chunk-V655JQ5J.js.map → chunk-JLA7EVYV.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +76 -0
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WBWRQS32.js → chunk-K3AGVXSF.js} +37 -13
- package/dist/cli-bundle/chunks/chunk-K3AGVXSF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +79 -0
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KGHH652T.js +44 -0
- package/dist/cli-bundle/chunks/chunk-KGHH652T.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +915 -0
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JZJJEJBR.js → chunk-KLG4ZULO.js} +12 -10
- package/dist/cli-bundle/chunks/{chunk-JZJJEJBR.js.map → chunk-KLG4ZULO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-KKHIQOTN.js → chunk-LEKT4K7I.js} +74 -8
- package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-CVBINC7C.js → chunk-MNZ7DRNC.js} +13 -10
- package/dist/cli-bundle/chunks/{contracts-CVBINC7C.js.map → chunk-MNZ7DRNC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-2VK677OA.js → chunk-MTTXDAK4.js} +176 -125
- package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Q2266G4S.js → chunk-MZ7VNEVY.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-Q2266G4S.js.map → chunk-MZ7VNEVY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4EVY7CQN.js → chunk-N6DNM2FA.js} +2 -2
- package/dist/cli-bundle/chunks/{test-runs-5SLLV3XU.js → chunk-N7X4WP6L.js} +11 -8
- package/dist/cli-bundle/chunks/{test-runs-5SLLV3XU.js.map → chunk-N7X4WP6L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-AZMPKLIA.js → chunk-NBFCNJ7Q.js} +177 -126
- package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YZR7UMZ6.js → chunk-NER3KUUS.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +20 -0
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +918 -0
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DJ5S2LDY.js → chunk-OESSOFJ4.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-DJ5S2LDY.js.map → chunk-OESSOFJ4.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +238 -0
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TUV7SIWZ.js → chunk-OWTIRHX4.js} +28 -6
- package/dist/cli-bundle/chunks/chunk-OWTIRHX4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PV5JS7MP.js → chunk-P3VRG72Q.js} +10 -8
- package/dist/cli-bundle/chunks/{chunk-PV5JS7MP.js.map → chunk-P3VRG72Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js +1423 -0
- package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +1977 -0
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WTXDLBSZ.js → chunk-PDXT6Q55.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YZWXMDNH.js → chunk-PJ3A56YF.js} +46 -537
- package/dist/cli-bundle/chunks/chunk-PJ3A56YF.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-L3WKLO67.js → chunk-PPAJG4GB.js} +13 -10
- package/dist/cli-bundle/chunks/{test-runs-L3WKLO67.js.map → chunk-PPAJG4GB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-LLQLLAKU.js → chunk-PPE4YUQM.js} +1670 -1573
- package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TO4KCIOT.js → chunk-QHZO65XW.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-TO4KCIOT.js.map → chunk-QHZO65XW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4OXNQHKQ.js → chunk-R3ZBLGTC.js} +9 -10
- package/dist/cli-bundle/chunks/{chunk-4OXNQHKQ.js.map → chunk-R3ZBLGTC.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js +624 -0
- package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-724VLYDJ.js → chunk-RX3HQSYG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PUVPC5DL.js → chunk-S4APD35C.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-T5RTYLZJ.js → chunk-S5AYOUT5.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-T5RTYLZJ.js.map → chunk-S5AYOUT5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-75VMARGO.js → chunk-STPSZ2XY.js} +19 -744
- package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-A2W3XKAD.js → chunk-T35XLYZF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-N2LOJUBB.js → chunk-T3ABIMGW.js} +5 -3
- package/dist/cli-bundle/chunks/{chunk-N2LOJUBB.js.map → chunk-T3ABIMGW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-FDNJMYZB.js → chunk-T3F4DF23.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-FDNJMYZB.js.map → chunk-T3F4DF23.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +272 -0
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js +5354 -0
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-XFO2NJY6.js → chunk-TSPKZRRW.js} +33 -28
- package/dist/cli-bundle/chunks/chunk-TSPKZRRW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZZWMJVW2.js → chunk-TT42JUMF.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +165 -0
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7745CXNI.js → chunk-UI5BJ6DO.js} +1231 -1134
- package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +1932 -0
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +175 -0
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-B4O5S7I3.js → chunk-VUHVWI4C.js} +13 -3
- package/dist/cli-bundle/chunks/chunk-VUHVWI4C.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-NLCDIZAT.js → chunk-VZIYHZDX.js} +11 -8
- package/dist/cli-bundle/chunks/{contracts-NLCDIZAT.js.map → chunk-VZIYHZDX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TGYDJEJH.js → chunk-WISPVC2E.js} +9 -7
- package/dist/cli-bundle/chunks/{chunk-TGYDJEJH.js.map → chunk-WISPVC2E.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js +5434 -0
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-MTB4PRA3.js → chunk-XQCG2JGW.js} +17 -749
- package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-Y76TWC45.js +550 -0
- package/dist/cli-bundle/chunks/chunk-Y76TWC45.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SL2ANJSV.js → chunk-YD5FML7K.js} +418 -2173
- package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NHKXOMZ5.js → chunk-YFIE7YK6.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-NHKXOMZ5.js.map → chunk-YFIE7YK6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5FYY76HR.js → chunk-YMABYTNG.js} +32 -27
- package/dist/cli-bundle/chunks/chunk-YMABYTNG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-W5X3AHJN.js → chunk-YOF5VPKM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-M6PR5BC6.js → chunk-YPPVU5GX.js} +11 -9
- package/dist/cli-bundle/chunks/{chunk-M6PR5BC6.js.map → chunk-YPPVU5GX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZIEGTQCY.js → chunk-YQMMMONE.js} +6 -4
- package/dist/cli-bundle/chunks/{chunk-ZIEGTQCY.js.map → chunk-YQMMMONE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4IW7STMB.js → chunk-YSAH5FY5.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-4IW7STMB.js.map → chunk-YSAH5FY5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JYLFF7GJ.js → chunk-YZIR4R3U.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-JYLFF7GJ.js.map → chunk-YZIR4R3U.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7G5SUU6F.js → chunk-Z2CRRZYF.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-7G5SUU6F.js.map → chunk-Z2CRRZYF.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js +533 -0
- package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WOOB7PV7.js → chunk-ZCJAA3JK.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-WOOB7PV7.js.map → chunk-ZCJAA3JK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-WSDIALO4.js → chunk-ZD34OFFQ.js} +5 -3
- package/dist/cli-bundle/chunks/{chunk-WSDIALO4.js.map → chunk-ZD34OFFQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-Q3XVLRCJ.js → chunk-ZJB3UV5U.js} +54 -58
- package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MZ4NH46V.js → chunk-ZMD35NYG.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +241 -0
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{claim-D6L33A5Y.js → claim-4DROPSIS.js} +30 -13
- package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-YAFUTPVK.js → claim-VX54TV5U.js} +29 -12
- package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-TGYXG7TV.js → close-3YRR3XY6.js} +9 -7
- package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +16 -0
- package/dist/cli-bundle/chunks/{close-many-SNA6LNZH.js → close-many-AP4MWU36.js} +21 -18
- package/dist/cli-bundle/chunks/{close-many-SNA6LNZH.js.map → close-many-AP4MWU36.js.map} +1 -1
- package/dist/cli-bundle/chunks/{close-many-4QSWKCRU.js → close-many-OMZIGZB4.js} +19 -16
- package/dist/cli-bundle/chunks/{close-many-4QSWKCRU.js.map → close-many-OMZIGZB4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-QC6ARR5X.js → comments-MIW5MZOX.js} +12 -9
- package/dist/cli-bundle/chunks/{comments-QC6ARR5X.js.map → comments-MIW5MZOX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-ZHVYGUVC.js → comments-SAG5LSKL.js} +14 -11
- package/dist/cli-bundle/chunks/{comments-ZHVYGUVC.js.map → comments-SAG5LSKL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-O6W2EU2G.js → config-DJJKZB5R.js} +20 -17
- package/dist/cli-bundle/chunks/{config-O6W2EU2G.js.map → config-DJJKZB5R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-XQRFJXJP.js → config-V57QD47V.js} +22 -19
- package/dist/cli-bundle/chunks/{config-XQRFJXJP.js.map → config-V57QD47V.js.map} +1 -1
- package/dist/cli-bundle/chunks/{context-IHE3IXN5.js → context-4OQGIPSO.js} +15 -12
- package/dist/cli-bundle/chunks/{context-WSYWBEUL.js → context-WLA6IAWE.js} +15 -12
- package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +12 -0
- package/dist/cli-bundle/chunks/contracts-OJEXMKVW.js +16 -0
- package/dist/cli-bundle/chunks/{copy-7MUQC44A.js → copy-LEE6P6EM.js} +17 -14
- package/dist/cli-bundle/chunks/{copy-7MUQC44A.js.map → copy-LEE6P6EM.js.map} +2 -2
- package/dist/cli-bundle/chunks/{copy-ANWXDJVC.js → copy-OTJOWFL6.js} +18 -15
- package/dist/cli-bundle/chunks/{copy-ANWXDJVC.js.map → copy-OTJOWFL6.js.map} +1 -1
- package/dist/cli-bundle/chunks/create-WKOZKPQR.js +30 -0
- package/dist/cli-bundle/chunks/{create-JIA2IFCO.js → create-XWWQFQ6S.js} +14 -12
- package/dist/cli-bundle/chunks/{delete-5OLYWQIC.js → delete-62JQTYT4.js} +10 -7
- package/dist/cli-bundle/chunks/{delete-5OLYWQIC.js.map → delete-62JQTYT4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{delete-INHKCIRN.js → delete-HQKGRNRZ.js} +12 -9
- package/dist/cli-bundle/chunks/{delete-INHKCIRN.js.map → delete-HQKGRNRZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-IYEID3QX.js → deps-55FTG6Z5.js} +12 -9
- package/dist/cli-bundle/chunks/{deps-IYEID3QX.js.map → deps-55FTG6Z5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-CCSWGZW7.js → deps-L2FPIAD3.js} +10 -7
- package/dist/cli-bundle/chunks/{deps-CCSWGZW7.js.map → deps-L2FPIAD3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-PKO7OEIM.js → docs-6CRCSVKK.js} +11 -9
- package/dist/cli-bundle/chunks/{docs-PKO7OEIM.js.map → docs-6CRCSVKK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-3XZK22WF.js → docs-S6UTOTO5.js} +9 -7
- package/dist/cli-bundle/chunks/{docs-3XZK22WF.js.map → docs-S6UTOTO5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-5XYP6NMY.js → eval-N6UHFWVO.js} +15 -11
- package/dist/cli-bundle/chunks/{eval-5XYP6NMY.js.map → eval-N6UHFWVO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-O4WGQYDI.js → eval-PHOTWYHI.js} +17 -13
- package/dist/cli-bundle/chunks/{eval-O4WGQYDI.js.map → eval-PHOTWYHI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{extension-T7JNTAAA.js → extension-NBAH62ML.js} +17 -11
- package/dist/cli-bundle/chunks/{extension-PVGRRZZG.js → extension-ZF6ZZPOU.js} +17 -11
- package/dist/cli-bundle/chunks/{files-W7HH5EOD.js → files-6P57MRKL.js} +12 -9
- package/dist/cli-bundle/chunks/{files-W7HH5EOD.js.map → files-6P57MRKL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{files-7IU56S6R.js → files-JPU3FNJ7.js} +14 -11
- package/dist/cli-bundle/chunks/{files-7IU56S6R.js.map → files-JPU3FNJ7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-6FA5KYRY.js → focus-LFZ6IDBR.js} +15 -11
- package/dist/cli-bundle/chunks/{focus-6FA5KYRY.js.map → focus-LFZ6IDBR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-CQ63JFDG.js → focus-WNMYCVYA.js} +13 -9
- package/dist/cli-bundle/chunks/{focus-CQ63JFDG.js.map → focus-WNMYCVYA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{gc-3BG67KTO.js → gc-AETFKZ44.js} +10 -7
- package/dist/cli-bundle/chunks/{gc-3BG67KTO.js.map → gc-AETFKZ44.js.map} +1 -1
- package/dist/cli-bundle/chunks/{gc-PEZYGNVB.js → gc-RLBP4QVN.js} +12 -9
- package/dist/cli-bundle/chunks/{gc-PEZYGNVB.js.map → gc-RLBP4QVN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{get-J6CSJ4SX.js → get-NH2MPBCI.js} +18 -15
- package/dist/cli-bundle/chunks/{get-J6CSJ4SX.js.map → get-NH2MPBCI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{get-KJTKGNEQ.js → get-P4ZQXCPZ.js} +16 -13
- package/dist/cli-bundle/chunks/{get-KJTKGNEQ.js.map → get-P4ZQXCPZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-32UQICEL.js → health-3GVPMQBL.js} +36 -29
- package/dist/cli-bundle/chunks/{health-32UQICEL.js.map → health-3GVPMQBL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-ZUZG5ULV.js → health-DNTM72GJ.js} +34 -27
- package/dist/cli-bundle/chunks/{health-ZUZG5ULV.js.map → health-DNTM72GJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/history-RYKLC72X.js +20 -0
- package/dist/cli-bundle/chunks/{history-W6QVR6FA.js → history-SGPYRAFT.js} +10 -8
- package/dist/cli-bundle/chunks/{history-compact-JQ6ZGYSJ.js → history-compact-3F6VELO7.js} +18 -15
- package/dist/cli-bundle/chunks/{history-compact-JQ6ZGYSJ.js.map → history-compact-3F6VELO7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-compact-F355EGL4.js → history-compact-656Y2TN4.js} +20 -17
- package/dist/cli-bundle/chunks/{history-compact-F355EGL4.js.map → history-compact-656Y2TN4.js.map} +1 -1
- package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-TUWOUYX5.js → history-redact-54ICFKXM.js} +11 -9
- package/dist/cli-bundle/chunks/{history-repair-ZKS3LKPV.js → history-repair-4N6SDVHK.js} +17 -14
- package/dist/cli-bundle/chunks/{history-repair-ZKS3LKPV.js.map → history-repair-4N6SDVHK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-repair-MPCAIKYE.js → history-repair-EVTO6LIH.js} +19 -16
- package/dist/cli-bundle/chunks/{history-repair-MPCAIKYE.js.map → history-repair-EVTO6LIH.js.map} +1 -1
- package/dist/cli-bundle/chunks/init-RPIPQUNV.js +32 -0
- package/dist/cli-bundle/chunks/init-SKQAESQS.js +28 -0
- package/dist/cli-bundle/chunks/{learnings-EYC3OKS2.js → learnings-2HTPZNGZ.js} +10 -8
- package/dist/cli-bundle/chunks/{learnings-EYC3OKS2.js.map → learnings-2HTPZNGZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{learnings-HKJJUVTA.js → learnings-YBIHY3D6.js} +12 -10
- package/dist/cli-bundle/chunks/{learnings-HKJJUVTA.js.map → learnings-YBIHY3D6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{list-KN3TL5Y5.js → list-64LHZ3HM.js} +10 -8
- package/dist/cli-bundle/chunks/{list-HFD5737R.js → list-7LXBTEKI.js} +10 -8
- package/dist/cli-bundle/chunks/{next-DQUMFAHG.js → next-7ODPAQ4U.js} +22 -18
- package/dist/cli-bundle/chunks/{next-DQUMFAHG.js.map → next-7ODPAQ4U.js.map} +1 -1
- package/dist/cli-bundle/chunks/{next-JUEYC5HE.js → next-ODJUM4ZM.js} +24 -20
- package/dist/cli-bundle/chunks/{next-JUEYC5HE.js.map → next-ODJUM4ZM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-ZG6RLZXB.js → notes-72YXN5JX.js} +10 -8
- package/dist/cli-bundle/chunks/{notes-ZG6RLZXB.js.map → notes-72YXN5JX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-XATYT43P.js → notes-NJ7IQJX4.js} +12 -10
- package/dist/cli-bundle/chunks/{notes-XATYT43P.js.map → notes-NJ7IQJX4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-DVVLX7LK.js → plan-R4NDQ27E.js} +18 -15
- package/dist/cli-bundle/chunks/{plan-DVVLX7LK.js.map → plan-R4NDQ27E.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-5NWQL2DH.js → plan-XWY5T67S.js} +20 -17
- package/dist/cli-bundle/chunks/{plan-5NWQL2DH.js.map → plan-XWY5T67S.js.map} +1 -1
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +397 -0
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +1 -0
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +400 -0
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-WRS6ACUW.js → register-list-query-5H66WFYF.js} +22 -19
- package/dist/cli-bundle/chunks/{register-list-query-WRS6ACUW.js.map → register-list-query-5H66WFYF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-list-query-PNRAHNIQ.js → register-list-query-FB3FNDLZ.js} +24 -21
- package/dist/cli-bundle/chunks/{register-list-query-PNRAHNIQ.js.map → register-list-query-FB3FNDLZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-K2MNRWGI.js → register-mutation-UJO23C7R.js} +42 -39
- package/dist/cli-bundle/chunks/{register-mutation-K2MNRWGI.js.map → register-mutation-UJO23C7R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-ET6E4VLE.js → register-mutation-Z2ETYHKS.js} +40 -37
- package/dist/cli-bundle/chunks/{register-mutation-ET6E4VLE.js.map → register-mutation-Z2ETYHKS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-6DQRUTIX.js → register-operations-A3XAM5J7.js} +39 -36
- package/dist/cli-bundle/chunks/{register-operations-6DQRUTIX.js.map → register-operations-A3XAM5J7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-73UDWMVB.js → register-operations-SG7HBSUP.js} +37 -34
- package/dist/cli-bundle/chunks/{register-operations-73UDWMVB.js.map → register-operations-SG7HBSUP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-LYYCMQFV.js → register-setup-I45OGJUV.js} +25 -19
- package/dist/cli-bundle/chunks/{register-setup-LYYCMQFV.js.map → register-setup-I45OGJUV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-FXZJ2CEJ.js → register-setup-K6U3NVY5.js} +23 -17
- package/dist/cli-bundle/chunks/{register-setup-FXZJ2CEJ.js.map → register-setup-K6U3NVY5.js.map} +1 -1
- package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +19 -0
- package/dist/cli-bundle/chunks/{restore-R6YJHQK3.js → restore-YJ2ET6AT.js} +11 -9
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-OGODPUBL.js → scheduling-shortcuts-SSC4MYWQ.js} +14 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-OGODPUBL.js.map → scheduling-shortcuts-SSC4MYWQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-LE4S7OI7.js → scheduling-shortcuts-ULRG7MNP.js} +16 -14
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-LE4S7OI7.js.map → scheduling-shortcuts-ULRG7MNP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{schema-ICCD3HOP.js → schema-2PUXCZ25.js} +10 -7
- package/dist/cli-bundle/chunks/{schema-RHH23PQX.js → schema-Y6DXXK2F.js} +10 -7
- package/dist/cli-bundle/chunks/{search-Z2VGP2Q5.js → search-3S72CTD6.js} +13 -10
- package/dist/cli-bundle/chunks/{search-HDDKOPFE.js → search-WNUNBQXO.js} +13 -10
- package/dist/cli-bundle/chunks/{stats-ETFP37MB.js → stats-IJYTRQGV.js} +13 -10
- package/dist/cli-bundle/chunks/{stats-ETFP37MB.js.map → stats-IJYTRQGV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{stats-DHMRXHOB.js → stats-L2D5Y2O5.js} +15 -12
- package/dist/cli-bundle/chunks/{stats-DHMRXHOB.js.map → stats-L2D5Y2O5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{telemetry-ZRBM22QD.js → telemetry-L2CVOKVN.js} +11 -8
- package/dist/cli-bundle/chunks/{telemetry-ZRBM22QD.js.map → telemetry-L2CVOKVN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{telemetry-NUZNKDCP.js → telemetry-QBYWQA76.js} +13 -10
- package/dist/cli-bundle/chunks/{telemetry-NUZNKDCP.js.map → telemetry-QBYWQA76.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-XNKTIP4Y.js → test-DQ2QFJ7W.js} +21 -15
- package/dist/cli-bundle/chunks/test-W7QBLVJS.js +41 -0
- package/dist/cli-bundle/chunks/{test-all-APCBSXQI.js → test-all-636NTRTT.js} +26 -19
- package/dist/cli-bundle/chunks/{test-all-APCBSXQI.js.map → test-all-636NTRTT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-KIK3OYBY.js → test-all-DWYK3RG6.js} +24 -17
- package/dist/cli-bundle/chunks/{test-all-KIK3OYBY.js.map → test-all-DWYK3RG6.js.map} +1 -1
- package/dist/cli-bundle/chunks/test-runs-245OINZR.js +28 -0
- package/dist/cli-bundle/chunks/test-runs-245OINZR.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +24 -0
- package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js.map +7 -0
- package/dist/cli-bundle/chunks/update-SFLZPJXX.js +30 -0
- package/dist/cli-bundle/chunks/update-SFLZPJXX.js.map +1 -0
- package/dist/cli-bundle/chunks/update-SJZ6S77U.js +26 -0
- package/dist/cli-bundle/chunks/update-SJZ6S77U.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-many-XGTJ7QIU.js → update-many-DC7X3EWM.js} +32 -29
- package/dist/cli-bundle/chunks/{update-many-XGTJ7QIU.js.map → update-many-DC7X3EWM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{update-many-GFCQG6ZQ.js → update-many-SLLAMHT7.js} +34 -31
- package/dist/cli-bundle/chunks/{update-many-GFCQG6ZQ.js.map → update-many-SLLAMHT7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-KJ3JGELR.js → upgrade-HFFXLZJA.js} +19 -12
- package/dist/cli-bundle/chunks/{upgrade-KJ3JGELR.js.map → upgrade-HFFXLZJA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-RBRQ7PQU.js → upgrade-UYQKM7RF.js} +21 -14
- package/dist/cli-bundle/chunks/{upgrade-RBRQ7PQU.js.map → upgrade-UYQKM7RF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-EW6TGC7R.js → validate-PA4FDTOV.js} +34 -27
- package/dist/cli-bundle/chunks/{validate-EW6TGC7R.js.map → validate-PA4FDTOV.js.map} +2 -2
- package/dist/cli-bundle/chunks/{validate-T6PR5WAL.js → validate-Z7L75YEJ.js} +35 -28
- package/dist/cli-bundle/chunks/{validate-T6PR5WAL.js.map → validate-Z7L75YEJ.js.map} +1 -1
- package/dist/cli-bundle/main.js +173 -57
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +247 -0
- package/dist/cli-bundle/sdk-runtime.js.map +7 -0
- package/dist/cli-bundle/sdk-testing.js +101 -0
- package/dist/cli-bundle/sdk-testing.js.map +7 -0
- package/dist/cli-bundle/sdk.js +787 -0
- package/dist/cli-bundle/sdk.js.map +7 -0
- package/dist/core/config/nested-settings.d.ts +4 -3
- package/dist/core/config/nested-settings.js +17 -6
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/extensions/activation-summary.d.ts +6 -0
- package/dist/core/extensions/activation-summary.js +10 -4
- package/dist/core/extensions/activation-summary.js.map +1 -1
- package/dist/core/extensions/capability-usage.d.ts +6 -0
- package/dist/core/extensions/capability-usage.js +10 -4
- package/dist/core/extensions/capability-usage.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +5 -0
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +3 -0
- package/dist/core/extensions/loader.js +11 -19
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/history-rewrite.js +3 -3
- package/dist/core/history/history-rewrite.js.map +1 -1
- package/dist/core/item/parent-reference-policy.d.ts +9 -1
- package/dist/core/item/parent-reference-policy.js +28 -4
- package/dist/core/item/parent-reference-policy.js.map +1 -1
- package/dist/core/lock/lock.d.ts +28 -1
- package/dist/core/lock/lock.js +254 -20
- package/dist/core/lock/lock.js.map +1 -1
- package/dist/core/search/background-refresh.js +7 -19
- package/dist/core/search/background-refresh.js.map +1 -1
- package/dist/core/search/http-client.d.ts +0 -1
- package/dist/core/search/http-client.js +3 -3
- package/dist/core/search/http-client.js.map +1 -1
- package/dist/core/shared/constants.js +3 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.d.ts +1 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/primitives.d.ts +12 -0
- package/dist/core/shared/primitives.js +29 -2
- package/dist/core/shared/primitives.js.map +1 -1
- package/dist/core/store/item-store.js +3 -3
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +1 -0
- package/dist/core/store/settings-validator.js +6 -3
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +3 -3
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/validate/fix-planning.d.ts +0 -2
- package/dist/core/validate/fix-planning.js +3 -3
- package/dist/core/validate/fix-planning.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +3 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +3 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/errors.d.ts +21 -2
- package/dist/sdk/errors.js +8 -2
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/package-import-adapters.js +3 -3
- package/dist/sdk/package-import-adapters.js.map +1 -1
- package/dist/sdk/testing.js +41 -19
- package/dist/sdk/testing.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/ARCHITECTURE.md +27 -0
- package/docs/CONFIGURATION.md +3 -0
- package/docs/README.md +1 -0
- package/docs/SDK_PRIMITIVE_INVENTORY.md +55 -0
- package/docs/TESTING.md +5 -1
- package/docs/examples/ci/github-actions-pm-extension-gate.yml +5 -5
- package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +1 -1
- package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +1 -1
- package/package.json +11 -24
- package/packages/pm-beads/extensions/beads/package.json +3 -0
- package/packages/pm-beads/extensions/beads/runtime-loader.ts +24 -2
- package/packages/pm-calendar/extensions/calendar/package.json +3 -0
- package/packages/pm-command-kit/extensions/command-kit/package.json +3 -0
- package/packages/pm-governance-audit/extensions/governance-audit/package.json +3 -0
- package/packages/pm-guide-shell/extensions/guide-shell/package.json +3 -0
- package/packages/pm-kanban/extensions/kanban/package.json +3 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/package.json +3 -0
- package/packages/pm-search-advanced/extensions/search-advanced/package.json +3 -0
- package/packages/pm-templates/extensions/templates/package.json +3 -0
- package/packages/pm-todos/extensions/todos/package.json +3 -0
- package/packages/pm-todos/extensions/todos/runtime-loader.ts +21 -3
- package/scripts/bundle-cli.mjs +12 -2
- package/dist/cli-bundle/chunks/activity-IDS5GSYG.js +0 -16
- package/dist/cli-bundle/chunks/chunk-2VK677OA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5FYY76HR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-75VMARGO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7745CXNI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AOP2EMK3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-AZMPKLIA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-B4O5S7I3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BDDYM4LH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CN4OAA2G.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EH23N5FX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FMWQRMHS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-J4KNRDI3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KKHIQOTN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LLQLLAKU.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-M34MVAOP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MTB4PRA3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MZG6I2Q2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NGDK3KEZ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Q3XVLRCJ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SBNT6SLO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SL2ANJSV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TUV7SIWZ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-UGDONITK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-UYLA5ROU.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WBWRQS32.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XFO2NJY6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XQCWTSLO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YZWXMDNH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-Z4DGFQDH.js.map +0 -1
- package/dist/cli-bundle/chunks/claim-D6L33A5Y.js.map +0 -1
- package/dist/cli-bundle/chunks/claim-YAFUTPVK.js.map +0 -7
- package/dist/cli-bundle/chunks/close-KLDLHAOP.js +0 -14
- package/dist/cli-bundle/chunks/create-AJ6HUR5W.js +0 -28
- package/dist/cli-bundle/chunks/history-IOH6FKG7.js +0 -18
- package/dist/cli-bundle/chunks/history-redact-VVDOARNO.js +0 -19
- package/dist/cli-bundle/chunks/init-CZLEEE6Q.js +0 -22
- package/dist/cli-bundle/chunks/init-MAA6UMNQ.js +0 -26
- package/dist/cli-bundle/chunks/profile-54DZ4CLB.js +0 -1205
- package/dist/cli-bundle/chunks/profile-54DZ4CLB.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-PLIQVEOY.js +0 -1243
- package/dist/cli-bundle/chunks/profile-PLIQVEOY.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-L27TMMCF.js +0 -17
- package/dist/cli-bundle/chunks/test-H36PM746.js +0 -35
- package/dist/cli-bundle/chunks/update-RQKI3AMW.js +0 -24
- package/dist/cli-bundle/chunks/update-ZM7NJWHY.js +0 -28
- /package/dist/cli-bundle/chunks/{activity-IDS5GSYG.js.map → activity-4XQIDNM5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-OENQCYZD.js.map → activity-YKAKZTZ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4SHME4VR.js.map → chunk-5JE6SMYS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4EVY7CQN.js.map → chunk-N6DNM2FA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YZR7UMZ6.js.map → chunk-NER3KUUS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WTXDLBSZ.js.map → chunk-PDXT6Q55.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-724VLYDJ.js.map → chunk-RX3HQSYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PUVPC5DL.js.map → chunk-S4APD35C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A2W3XKAD.js.map → chunk-T35XLYZF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZZWMJVW2.js.map → chunk-TT42JUMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W5X3AHJN.js.map → chunk-YOF5VPKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MZ4NH46V.js.map → chunk-ZMD35NYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-TGYXG7TV.js.map → close-3YRR3XY6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-KLDLHAOP.js.map → close-OB2Y4QP5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-IHE3IXN5.js.map → context-4OQGIPSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-WSYWBEUL.js.map → context-WLA6IAWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-AJ6HUR5W.js.map → contracts-HXJLKCRI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-JIA2IFCO.js.map → contracts-OJEXMKVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-T7JNTAAA.js.map → create-WKOZKPQR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-PVGRRZZG.js.map → create-XWWQFQ6S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-IOH6FKG7.js.map → extension-NBAH62ML.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-W6QVR6FA.js.map → extension-ZF6ZZPOU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-VVDOARNO.js.map → history-RYKLC72X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-TUWOUYX5.js.map → history-SGPYRAFT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-CZLEEE6Q.js.map → history-redact-4H3FCKF3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-MAA6UMNQ.js.map → history-redact-54ICFKXM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-HFD5737R.js.map → init-RPIPQUNV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-KN3TL5Y5.js.map → init-SKQAESQS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-L27TMMCF.js.map → list-64LHZ3HM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-R6YJHQK3.js.map → list-7LXBTEKI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-ICCD3HOP.js.map → restore-PXOFL6AM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-RHH23PQX.js.map → restore-YJ2ET6AT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-HDDKOPFE.js.map → schema-2PUXCZ25.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-Z2VGP2Q5.js.map → schema-Y6DXXK2F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-XNKTIP4Y.js.map → search-3S72CTD6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-H36PM746.js.map → search-WNUNBQXO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-ZM7NJWHY.js.map → test-DQ2QFJ7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-RQKI3AMW.js.map → test-W7QBLVJS.js.map} +0 -0
|
@@ -0,0 +1,1932 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d4ede2fb-7525-501d-a1f0-77276019f794")}catch(e){}}();
|
|
3
|
+
import {
|
|
4
|
+
DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
|
|
5
|
+
GOVERNANCE_PRESET_DEFAULTS,
|
|
6
|
+
GOVERNANCE_PRESET_VALUES,
|
|
7
|
+
RUNTIME_FIELD_COMMAND_VALUES,
|
|
8
|
+
RUNTIME_FIELD_TYPE_VALUES,
|
|
9
|
+
RUNTIME_STATUS_ROLE_VALUES,
|
|
10
|
+
RUNTIME_UNKNOWN_FIELD_POLICY_VALUES,
|
|
11
|
+
SETTINGS_DEFAULTS,
|
|
12
|
+
ensureRuntimeSchemaFileScaffold,
|
|
13
|
+
filePathForSchemaSection,
|
|
14
|
+
getSettingsPath,
|
|
15
|
+
loadRuntimeSchemaFromOptionalFiles,
|
|
16
|
+
normalizeItemTypeDefinition,
|
|
17
|
+
normalizeRuntimeSchemaSettings,
|
|
18
|
+
readFileIfExists,
|
|
19
|
+
runCommandHandler,
|
|
20
|
+
runCommandOverride,
|
|
21
|
+
runOnIndexHooks,
|
|
22
|
+
runOnReadHooks,
|
|
23
|
+
runOnWriteHooks,
|
|
24
|
+
runParserOverride,
|
|
25
|
+
runPreflightOverride,
|
|
26
|
+
runRendererOverride,
|
|
27
|
+
runServiceOverride,
|
|
28
|
+
runServiceOverrideSync,
|
|
29
|
+
writeFileAtomic
|
|
30
|
+
} from "./chunk-YD5FML7K.js";
|
|
31
|
+
|
|
32
|
+
// dist/core/extensions/index.js
|
|
33
|
+
var activeExtensionHooks = null;
|
|
34
|
+
var activeExtensionCommands = null;
|
|
35
|
+
var activeExtensionParsers = null;
|
|
36
|
+
var activeExtensionPreflight = null;
|
|
37
|
+
var activeExtensionServices = null;
|
|
38
|
+
var activeExtensionRenderers = null;
|
|
39
|
+
var activeExtensionRegistrations = null;
|
|
40
|
+
var activeCommandContext = null;
|
|
41
|
+
var activeCommandResult = void 0;
|
|
42
|
+
var activeAfterCommandAffectedItems = [];
|
|
43
|
+
var AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS = /* @__PURE__ */ new Set([
|
|
44
|
+
"body",
|
|
45
|
+
"comments",
|
|
46
|
+
"dependencies",
|
|
47
|
+
"docs",
|
|
48
|
+
"events",
|
|
49
|
+
"files",
|
|
50
|
+
"learnings",
|
|
51
|
+
"notes",
|
|
52
|
+
"reminders",
|
|
53
|
+
"test_runs",
|
|
54
|
+
"tests"
|
|
55
|
+
]);
|
|
56
|
+
function setActiveExtensionHooks(hooks) {
|
|
57
|
+
activeExtensionHooks = hooks;
|
|
58
|
+
}
|
|
59
|
+
function setActiveExtensionCommands(commands) {
|
|
60
|
+
activeExtensionCommands = commands;
|
|
61
|
+
}
|
|
62
|
+
function setActiveExtensionParsers(parsers) {
|
|
63
|
+
activeExtensionParsers = parsers;
|
|
64
|
+
}
|
|
65
|
+
function setActiveExtensionPreflight(preflight) {
|
|
66
|
+
activeExtensionPreflight = preflight;
|
|
67
|
+
}
|
|
68
|
+
function setActiveExtensionServices(services) {
|
|
69
|
+
activeExtensionServices = services;
|
|
70
|
+
}
|
|
71
|
+
function setActiveExtensionRenderers(renderers) {
|
|
72
|
+
activeExtensionRenderers = renderers;
|
|
73
|
+
}
|
|
74
|
+
function setActiveExtensionRegistrations(registrations) {
|
|
75
|
+
activeExtensionRegistrations = registrations;
|
|
76
|
+
}
|
|
77
|
+
function getActiveExtensionRegistrations() {
|
|
78
|
+
return activeExtensionRegistrations;
|
|
79
|
+
}
|
|
80
|
+
function setActiveCommandContext(context) {
|
|
81
|
+
activeCommandContext = context;
|
|
82
|
+
}
|
|
83
|
+
function setActiveCommandResult(result) {
|
|
84
|
+
activeCommandResult = result;
|
|
85
|
+
}
|
|
86
|
+
function getActiveCommandResult() {
|
|
87
|
+
return activeCommandResult;
|
|
88
|
+
}
|
|
89
|
+
function recordAfterCommandAffectedItem(item) {
|
|
90
|
+
if (!item || (activeExtensionHooks?.afterCommand?.length ?? 0) === 0) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
activeAfterCommandAffectedItems.push(item);
|
|
94
|
+
}
|
|
95
|
+
function projectAfterCommandItemSnapshot(metadata, changedFields) {
|
|
96
|
+
if (!metadata || !metadata.id) {
|
|
97
|
+
return {};
|
|
98
|
+
}
|
|
99
|
+
const snapshot = {
|
|
100
|
+
id: metadata.id,
|
|
101
|
+
type: metadata.type,
|
|
102
|
+
status: metadata.status
|
|
103
|
+
};
|
|
104
|
+
if (!Array.isArray(changedFields)) {
|
|
105
|
+
return snapshot;
|
|
106
|
+
}
|
|
107
|
+
const source = metadata;
|
|
108
|
+
for (const field of changedFields) {
|
|
109
|
+
if (typeof field !== "string") {
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
const actualField = field.startsWith("unset:") ? field.slice("unset:".length) : field;
|
|
113
|
+
if (actualField === "id" || actualField === "type" || actualField === "status" || AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS.has(actualField)) {
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (Object.hasOwn(source, actualField) && source[actualField] !== void 0) {
|
|
117
|
+
snapshot[actualField] = source[actualField];
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return snapshot;
|
|
121
|
+
}
|
|
122
|
+
function consumeAfterCommandAffectedItems() {
|
|
123
|
+
if (activeAfterCommandAffectedItems.length === 0) {
|
|
124
|
+
return void 0;
|
|
125
|
+
}
|
|
126
|
+
const affected = activeAfterCommandAffectedItems;
|
|
127
|
+
activeAfterCommandAffectedItems = [];
|
|
128
|
+
return affected;
|
|
129
|
+
}
|
|
130
|
+
function clearActiveExtensionHooks() {
|
|
131
|
+
activeExtensionHooks = null;
|
|
132
|
+
activeExtensionCommands = null;
|
|
133
|
+
activeExtensionParsers = null;
|
|
134
|
+
activeExtensionPreflight = null;
|
|
135
|
+
activeExtensionServices = null;
|
|
136
|
+
activeExtensionRenderers = null;
|
|
137
|
+
activeExtensionRegistrations = null;
|
|
138
|
+
activeCommandContext = null;
|
|
139
|
+
activeCommandResult = void 0;
|
|
140
|
+
activeAfterCommandAffectedItems = [];
|
|
141
|
+
}
|
|
142
|
+
async function runActiveOnWriteHooks(context) {
|
|
143
|
+
if (!activeExtensionHooks) {
|
|
144
|
+
return [];
|
|
145
|
+
}
|
|
146
|
+
return runOnWriteHooks(activeExtensionHooks, context);
|
|
147
|
+
}
|
|
148
|
+
async function runActiveOnReadHooks(context) {
|
|
149
|
+
if (!activeExtensionHooks) {
|
|
150
|
+
return [];
|
|
151
|
+
}
|
|
152
|
+
return runOnReadHooks(activeExtensionHooks, context);
|
|
153
|
+
}
|
|
154
|
+
function hasActiveOnReadHooks() {
|
|
155
|
+
return (activeExtensionHooks?.onRead?.length ?? 0) > 0;
|
|
156
|
+
}
|
|
157
|
+
async function runActiveOnIndexHooks(context) {
|
|
158
|
+
if (!activeExtensionHooks) {
|
|
159
|
+
return [];
|
|
160
|
+
}
|
|
161
|
+
return runOnIndexHooks(activeExtensionHooks, context);
|
|
162
|
+
}
|
|
163
|
+
function runActiveCommandOverride(result) {
|
|
164
|
+
if (!activeExtensionCommands || !activeCommandContext) {
|
|
165
|
+
return {
|
|
166
|
+
overridden: false,
|
|
167
|
+
result,
|
|
168
|
+
warnings: []
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
return runCommandOverride(activeExtensionCommands, {
|
|
172
|
+
command: activeCommandContext.command,
|
|
173
|
+
args: [...activeCommandContext.args],
|
|
174
|
+
options: activeCommandContext.options ? { ...activeCommandContext.options } : {},
|
|
175
|
+
global: activeCommandContext.global ? { ...activeCommandContext.global } : void 0,
|
|
176
|
+
pm_root: activeCommandContext.pm_root,
|
|
177
|
+
result
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
async function runActiveCommandHandler(context) {
|
|
181
|
+
if (!activeExtensionCommands) {
|
|
182
|
+
return {
|
|
183
|
+
handled: false,
|
|
184
|
+
result: null,
|
|
185
|
+
warnings: []
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
return runCommandHandler(activeExtensionCommands, context);
|
|
189
|
+
}
|
|
190
|
+
async function runActiveParserOverride(context) {
|
|
191
|
+
if (!activeExtensionParsers) {
|
|
192
|
+
return {
|
|
193
|
+
overridden: false,
|
|
194
|
+
context: {
|
|
195
|
+
command: context.command,
|
|
196
|
+
args: [...context.args],
|
|
197
|
+
options: { ...context.options },
|
|
198
|
+
global: { ...context.global },
|
|
199
|
+
pm_root: context.pm_root
|
|
200
|
+
},
|
|
201
|
+
warnings: []
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
return runParserOverride(activeExtensionParsers, context);
|
|
205
|
+
}
|
|
206
|
+
async function runActivePreflightOverride(context) {
|
|
207
|
+
if (!activeExtensionPreflight) {
|
|
208
|
+
return {
|
|
209
|
+
overridden: false,
|
|
210
|
+
context: {
|
|
211
|
+
command: context.command,
|
|
212
|
+
args: [...context.args],
|
|
213
|
+
options: { ...context.options },
|
|
214
|
+
global: { ...context.global },
|
|
215
|
+
pm_root: context.pm_root
|
|
216
|
+
},
|
|
217
|
+
decision: { ...context.decision },
|
|
218
|
+
warnings: []
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
return runPreflightOverride(activeExtensionPreflight, context);
|
|
222
|
+
}
|
|
223
|
+
function runActiveRendererOverride(format, result) {
|
|
224
|
+
if (!activeExtensionRenderers) {
|
|
225
|
+
return {
|
|
226
|
+
overridden: false,
|
|
227
|
+
rendered: null,
|
|
228
|
+
warnings: []
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
return runRendererOverride(activeExtensionRenderers, {
|
|
232
|
+
format,
|
|
233
|
+
command: activeCommandContext?.command,
|
|
234
|
+
args: activeCommandContext ? [...activeCommandContext.args] : [],
|
|
235
|
+
options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},
|
|
236
|
+
global: activeCommandContext?.global ? { ...activeCommandContext.global } : void 0,
|
|
237
|
+
pm_root: activeCommandContext?.pm_root,
|
|
238
|
+
result
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function buildServiceContext(service, payload) {
|
|
242
|
+
return {
|
|
243
|
+
service,
|
|
244
|
+
command: activeCommandContext?.command,
|
|
245
|
+
args: activeCommandContext ? [...activeCommandContext.args] : [],
|
|
246
|
+
options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},
|
|
247
|
+
global: activeCommandContext?.global ? { ...activeCommandContext.global } : void 0,
|
|
248
|
+
pm_root: activeCommandContext?.pm_root,
|
|
249
|
+
payload
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
async function runActiveServiceOverride(service, payload) {
|
|
253
|
+
if (!activeExtensionServices) {
|
|
254
|
+
return {
|
|
255
|
+
handled: false,
|
|
256
|
+
result: payload,
|
|
257
|
+
warnings: []
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
return runServiceOverride(activeExtensionServices, buildServiceContext(service, payload));
|
|
261
|
+
}
|
|
262
|
+
function runActiveServiceOverrideSync(service, payload) {
|
|
263
|
+
if (!activeExtensionServices) {
|
|
264
|
+
return {
|
|
265
|
+
handled: false,
|
|
266
|
+
result: payload,
|
|
267
|
+
warnings: []
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// dist/core/shared/errors.js
|
|
274
|
+
var PmCliError = class extends Error {
|
|
275
|
+
exitCode;
|
|
276
|
+
context;
|
|
277
|
+
constructor(message, exitCode, context = {}) {
|
|
278
|
+
super(message);
|
|
279
|
+
this.name = "PmCliError";
|
|
280
|
+
this.exitCode = exitCode;
|
|
281
|
+
this.context = context;
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
// dist/core/shared/serialization.js
|
|
286
|
+
import crypto from "node:crypto";
|
|
287
|
+
function sortScalarValue(value) {
|
|
288
|
+
if (value === null)
|
|
289
|
+
return null;
|
|
290
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
291
|
+
return value;
|
|
292
|
+
}
|
|
293
|
+
if (typeof value === "bigint") {
|
|
294
|
+
return value.toString();
|
|
295
|
+
}
|
|
296
|
+
if (value === void 0) {
|
|
297
|
+
return "undefined";
|
|
298
|
+
}
|
|
299
|
+
if (typeof value === "symbol") {
|
|
300
|
+
return value.toString();
|
|
301
|
+
}
|
|
302
|
+
if (typeof value === "function") {
|
|
303
|
+
return `[function:${value.name || "anonymous"}]`;
|
|
304
|
+
}
|
|
305
|
+
return void 0;
|
|
306
|
+
}
|
|
307
|
+
function sortPlainObjectKeys(value) {
|
|
308
|
+
const sortedKeys = Object.keys(value).sort();
|
|
309
|
+
const result = {};
|
|
310
|
+
for (const key of sortedKeys) {
|
|
311
|
+
const nested = value[key];
|
|
312
|
+
if (nested === void 0) {
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
result[key] = sortObjectKeys(nested);
|
|
316
|
+
}
|
|
317
|
+
return result;
|
|
318
|
+
}
|
|
319
|
+
function sortObjectKeys(value) {
|
|
320
|
+
const scalarValue = sortScalarValue(value);
|
|
321
|
+
if (scalarValue !== void 0) {
|
|
322
|
+
return scalarValue;
|
|
323
|
+
}
|
|
324
|
+
if (Array.isArray(value)) {
|
|
325
|
+
return value.map((entry) => sortObjectKeys(entry));
|
|
326
|
+
}
|
|
327
|
+
if (value instanceof Date) {
|
|
328
|
+
return value.toISOString();
|
|
329
|
+
}
|
|
330
|
+
const maybeJson = value;
|
|
331
|
+
if (typeof maybeJson.toJSON === "function") {
|
|
332
|
+
const normalized = maybeJson.toJSON();
|
|
333
|
+
if (normalized !== value) {
|
|
334
|
+
return sortObjectKeys(normalized);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
return sortPlainObjectKeys(value);
|
|
338
|
+
}
|
|
339
|
+
function stableStringify(value) {
|
|
340
|
+
return JSON.stringify(sortObjectKeys(value));
|
|
341
|
+
}
|
|
342
|
+
function hasUnmatchedEquivalent(leftValue, rightValues, matchedIndexes, equals) {
|
|
343
|
+
for (let index = 0; index < rightValues.length; index += 1) {
|
|
344
|
+
if (matchedIndexes.has(index)) {
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
if (equals(leftValue, rightValues[index])) {
|
|
348
|
+
matchedIndexes.add(index);
|
|
349
|
+
return true;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
function compareRegExpValues(left, right) {
|
|
355
|
+
if (!(left instanceof RegExp || right instanceof RegExp)) {
|
|
356
|
+
return void 0;
|
|
357
|
+
}
|
|
358
|
+
return left instanceof RegExp && right instanceof RegExp && left.toString() === right.toString();
|
|
359
|
+
}
|
|
360
|
+
function compareDateValues(left, right) {
|
|
361
|
+
if (!(left instanceof Date || right instanceof Date)) {
|
|
362
|
+
return void 0;
|
|
363
|
+
}
|
|
364
|
+
return left instanceof Date && right instanceof Date && left.getTime() === right.getTime();
|
|
365
|
+
}
|
|
366
|
+
function compareSetValues(left, right) {
|
|
367
|
+
if (!(left instanceof Set || right instanceof Set)) {
|
|
368
|
+
return void 0;
|
|
369
|
+
}
|
|
370
|
+
if (!(left instanceof Set && right instanceof Set) || left.size !== right.size) {
|
|
371
|
+
return false;
|
|
372
|
+
}
|
|
373
|
+
const rightValues = [...right];
|
|
374
|
+
const matched = /* @__PURE__ */ new Set();
|
|
375
|
+
for (const leftValue of left) {
|
|
376
|
+
if (!hasUnmatchedEquivalent(leftValue, rightValues, matched, stableValueEquals)) {
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
return true;
|
|
381
|
+
}
|
|
382
|
+
function compareMapValues(left, right) {
|
|
383
|
+
if (!(left instanceof Map || right instanceof Map)) {
|
|
384
|
+
return void 0;
|
|
385
|
+
}
|
|
386
|
+
if (!(left instanceof Map && right instanceof Map) || left.size !== right.size) {
|
|
387
|
+
return false;
|
|
388
|
+
}
|
|
389
|
+
const rightEntries = [...right.entries()];
|
|
390
|
+
const matched = /* @__PURE__ */ new Set();
|
|
391
|
+
for (const [leftKey, leftValue] of left.entries()) {
|
|
392
|
+
const leftEntry = [leftKey, leftValue];
|
|
393
|
+
if (!hasUnmatchedEquivalent(leftEntry, rightEntries, matched, ([candidateKey, candidateValue], [rightKey, rightValue]) => stableValueEquals(candidateKey, rightKey) && stableValueEquals(candidateValue, rightValue))) {
|
|
394
|
+
return false;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
return true;
|
|
398
|
+
}
|
|
399
|
+
function compareArrayValues(left, right) {
|
|
400
|
+
if (!(Array.isArray(left) || Array.isArray(right))) {
|
|
401
|
+
return void 0;
|
|
402
|
+
}
|
|
403
|
+
if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) {
|
|
404
|
+
return false;
|
|
405
|
+
}
|
|
406
|
+
return left.every((value, index) => stableValueEquals(value, right[index]));
|
|
407
|
+
}
|
|
408
|
+
function comparePlainObjectValues(left, right) {
|
|
409
|
+
const leftKeys = Object.keys(left).sort((a, b) => a.localeCompare(b));
|
|
410
|
+
const rightKeys = Object.keys(right).sort((a, b) => a.localeCompare(b));
|
|
411
|
+
if (leftKeys.length !== rightKeys.length) {
|
|
412
|
+
return false;
|
|
413
|
+
}
|
|
414
|
+
for (let index = 0; index < leftKeys.length; index += 1) {
|
|
415
|
+
const leftKey = leftKeys[index];
|
|
416
|
+
if (leftKey !== rightKeys[index]) {
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
419
|
+
if (!stableValueEquals(left[leftKey], right[leftKey])) {
|
|
420
|
+
return false;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
return true;
|
|
424
|
+
}
|
|
425
|
+
var SPECIALIZED_STABLE_VALUE_COMPARISONS = [
|
|
426
|
+
compareRegExpValues,
|
|
427
|
+
compareDateValues,
|
|
428
|
+
compareSetValues,
|
|
429
|
+
compareMapValues,
|
|
430
|
+
compareArrayValues
|
|
431
|
+
];
|
|
432
|
+
function stableValueEquals(left, right) {
|
|
433
|
+
if (Object.is(left, right)) {
|
|
434
|
+
return true;
|
|
435
|
+
}
|
|
436
|
+
if (left === null || right === null || typeof left !== "object" || typeof right !== "object") {
|
|
437
|
+
return false;
|
|
438
|
+
}
|
|
439
|
+
for (const compare of SPECIALIZED_STABLE_VALUE_COMPARISONS) {
|
|
440
|
+
const result = compare(left, right);
|
|
441
|
+
if (result !== void 0) {
|
|
442
|
+
return result;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
return comparePlainObjectValues(left, right);
|
|
446
|
+
}
|
|
447
|
+
function sha256Hex(value) {
|
|
448
|
+
return crypto.createHash("sha256").update(value, "utf8").digest("hex");
|
|
449
|
+
}
|
|
450
|
+
function orderObject(value, keyOrder) {
|
|
451
|
+
const ordered = {};
|
|
452
|
+
for (const key of keyOrder) {
|
|
453
|
+
const entry = value[key];
|
|
454
|
+
if (entry !== void 0) {
|
|
455
|
+
ordered[key] = entry;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
const unknownKeys = Object.keys(value).filter((key) => !keyOrder.includes(key)).sort((a, b) => a.localeCompare(b));
|
|
459
|
+
for (const key of unknownKeys) {
|
|
460
|
+
const entry = value[key];
|
|
461
|
+
if (entry !== void 0) {
|
|
462
|
+
ordered[key] = entry;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
return ordered;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
// dist/core/store/settings-validator.js
|
|
469
|
+
var FAIL = { ok: false };
|
|
470
|
+
var vString = (input) => typeof input === "string" ? { ok: true, value: input } : FAIL;
|
|
471
|
+
var vBoolean = (input) => typeof input === "boolean" ? { ok: true, value: input } : FAIL;
|
|
472
|
+
function vNumber(options = {}) {
|
|
473
|
+
return (input) => {
|
|
474
|
+
if (typeof input !== "number" || !Number.isFinite(input)) {
|
|
475
|
+
return FAIL;
|
|
476
|
+
}
|
|
477
|
+
if (options.int && (!Number.isInteger(input) || !Number.isSafeInteger(input))) {
|
|
478
|
+
return FAIL;
|
|
479
|
+
}
|
|
480
|
+
if (options.positive && input <= 0) {
|
|
481
|
+
return FAIL;
|
|
482
|
+
}
|
|
483
|
+
if (typeof options.min === "number" && input < options.min) {
|
|
484
|
+
return FAIL;
|
|
485
|
+
}
|
|
486
|
+
return { ok: true, value: input };
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
function vLiteral(...allowed) {
|
|
490
|
+
return (input) => typeof input === "string" && allowed.includes(input) ? { ok: true, value: input } : FAIL;
|
|
491
|
+
}
|
|
492
|
+
function vArray(item) {
|
|
493
|
+
return (input) => {
|
|
494
|
+
if (!Array.isArray(input)) {
|
|
495
|
+
return FAIL;
|
|
496
|
+
}
|
|
497
|
+
const value = [];
|
|
498
|
+
for (const element of input) {
|
|
499
|
+
const result = item(element);
|
|
500
|
+
if (!result.ok) {
|
|
501
|
+
return FAIL;
|
|
502
|
+
}
|
|
503
|
+
value.push(result.value);
|
|
504
|
+
}
|
|
505
|
+
return { ok: true, value };
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
function vOptional(inner) {
|
|
509
|
+
return (input) => input === void 0 ? { ok: true, value: void 0 } : inner(input);
|
|
510
|
+
}
|
|
511
|
+
function vRecordOf(valueCheck) {
|
|
512
|
+
return (input) => {
|
|
513
|
+
if (typeof input !== "object" || input === null || Array.isArray(input)) {
|
|
514
|
+
return FAIL;
|
|
515
|
+
}
|
|
516
|
+
const value = {};
|
|
517
|
+
for (const [key, raw] of Object.entries(input)) {
|
|
518
|
+
const result = valueCheck(raw);
|
|
519
|
+
if (!result.ok) {
|
|
520
|
+
return FAIL;
|
|
521
|
+
}
|
|
522
|
+
value[key] = result.value;
|
|
523
|
+
}
|
|
524
|
+
return { ok: true, value };
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
function vObject(shape) {
|
|
528
|
+
return (input) => {
|
|
529
|
+
if (typeof input !== "object" || input === null || Array.isArray(input)) {
|
|
530
|
+
return FAIL;
|
|
531
|
+
}
|
|
532
|
+
const record = input;
|
|
533
|
+
const value = {};
|
|
534
|
+
for (const [key, check] of Object.entries(shape)) {
|
|
535
|
+
const result = check(record[key]);
|
|
536
|
+
if (!result.ok) {
|
|
537
|
+
return FAIL;
|
|
538
|
+
}
|
|
539
|
+
if (result.value !== void 0) {
|
|
540
|
+
value[key] = result.value;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
return { ok: true, value };
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
var itemTypeOption = vObject({
|
|
547
|
+
key: vString,
|
|
548
|
+
values: vArray(vString),
|
|
549
|
+
required: vOptional(vBoolean),
|
|
550
|
+
aliases: vOptional(vArray(vString)),
|
|
551
|
+
description: vOptional(vString)
|
|
552
|
+
});
|
|
553
|
+
var itemTypeCommandOptionPolicy = vObject({
|
|
554
|
+
command: vLiteral("create", "update"),
|
|
555
|
+
option: vString,
|
|
556
|
+
required: vOptional(vBoolean),
|
|
557
|
+
visible: vOptional(vBoolean),
|
|
558
|
+
enabled: vOptional(vBoolean)
|
|
559
|
+
});
|
|
560
|
+
var itemTypeDefinition = vObject({
|
|
561
|
+
name: vString,
|
|
562
|
+
description: vOptional(vString),
|
|
563
|
+
// Per-type create-time default status (config-driven); preserved so inline
|
|
564
|
+
// settings.item_types.definitions behave identically to schema/types.json.
|
|
565
|
+
default_status: vOptional(vString),
|
|
566
|
+
folder: vOptional(vString),
|
|
567
|
+
aliases: vOptional(vArray(vString)),
|
|
568
|
+
required_create_fields: vOptional(vArray(vString)),
|
|
569
|
+
required_create_repeatables: vOptional(vArray(vString)),
|
|
570
|
+
options: vOptional(vArray(itemTypeOption)),
|
|
571
|
+
command_option_policies: vOptional(vArray(itemTypeCommandOptionPolicy))
|
|
572
|
+
});
|
|
573
|
+
var runtimeStatusDefinition = vObject({
|
|
574
|
+
id: vString,
|
|
575
|
+
aliases: vOptional(vArray(vString)),
|
|
576
|
+
roles: vOptional(vArray(vLiteral(...RUNTIME_STATUS_ROLE_VALUES))),
|
|
577
|
+
description: vOptional(vString),
|
|
578
|
+
order: vOptional(vNumber())
|
|
579
|
+
});
|
|
580
|
+
var runtimeFieldDefinition = vObject({
|
|
581
|
+
key: vString,
|
|
582
|
+
metadata_key: vOptional(vString),
|
|
583
|
+
front_matter_key: vOptional(vString),
|
|
584
|
+
cli_flag: vOptional(vString),
|
|
585
|
+
cli_aliases: vOptional(vArray(vString)),
|
|
586
|
+
description: vOptional(vString),
|
|
587
|
+
type: vOptional(vLiteral(...RUNTIME_FIELD_TYPE_VALUES)),
|
|
588
|
+
commands: vOptional(vArray(vLiteral(...RUNTIME_FIELD_COMMAND_VALUES))),
|
|
589
|
+
repeatable: vOptional(vBoolean),
|
|
590
|
+
required: vOptional(vBoolean),
|
|
591
|
+
required_on_create: vOptional(vBoolean),
|
|
592
|
+
required_types: vOptional(vArray(vString)),
|
|
593
|
+
allow_unset: vOptional(vBoolean)
|
|
594
|
+
});
|
|
595
|
+
var statusTransitionPair = (input) => {
|
|
596
|
+
if (!Array.isArray(input) || input.length !== 2) {
|
|
597
|
+
return FAIL;
|
|
598
|
+
}
|
|
599
|
+
const [from, to] = input;
|
|
600
|
+
if (typeof from !== "string" || typeof to !== "string") {
|
|
601
|
+
return FAIL;
|
|
602
|
+
}
|
|
603
|
+
return { ok: true, value: [from, to] };
|
|
604
|
+
};
|
|
605
|
+
var typeWorkflowDefinition = vObject({
|
|
606
|
+
type: vString,
|
|
607
|
+
allowed_transitions: vArray(statusTransitionPair)
|
|
608
|
+
});
|
|
609
|
+
var runtimeSchemaSettings = vOptional(vObject({
|
|
610
|
+
version: vOptional(vNumber({ int: true })),
|
|
611
|
+
files: vOptional(vObject({
|
|
612
|
+
types: vOptional(vString),
|
|
613
|
+
statuses: vOptional(vString),
|
|
614
|
+
fields: vOptional(vString),
|
|
615
|
+
workflows: vOptional(vString)
|
|
616
|
+
})),
|
|
617
|
+
statuses: vOptional(vArray(runtimeStatusDefinition)),
|
|
618
|
+
fields: vOptional(vArray(runtimeFieldDefinition)),
|
|
619
|
+
workflow: vOptional(vObject({
|
|
620
|
+
draft_status: vOptional(vString),
|
|
621
|
+
open_status: vOptional(vString),
|
|
622
|
+
in_progress_status: vOptional(vString),
|
|
623
|
+
blocked_status: vOptional(vString),
|
|
624
|
+
close_status: vOptional(vString),
|
|
625
|
+
canceled_status: vOptional(vString)
|
|
626
|
+
})),
|
|
627
|
+
type_workflows: vOptional(vArray(typeWorkflowDefinition)),
|
|
628
|
+
unknown_field_policy: vOptional(vLiteral(...RUNTIME_UNKNOWN_FIELD_POLICY_VALUES))
|
|
629
|
+
}));
|
|
630
|
+
var governanceSettings = vOptional(vObject({
|
|
631
|
+
preset: vOptional(vLiteral(...GOVERNANCE_PRESET_VALUES)),
|
|
632
|
+
ownership_enforcement: vOptional(vLiteral("none", "warn", "strict")),
|
|
633
|
+
create_mode_default: vOptional(vLiteral("progressive", "strict")),
|
|
634
|
+
close_validation_default: vOptional(vLiteral("off", "warn", "strict")),
|
|
635
|
+
require_close_reason: vOptional(vBoolean),
|
|
636
|
+
parent_reference: vOptional(vLiteral("warn", "strict_error")),
|
|
637
|
+
metadata_profile: vOptional(vLiteral("core", "strict", "custom")),
|
|
638
|
+
force_required_for_stale_lock: vOptional(vBoolean),
|
|
639
|
+
create_default_type: vOptional(vString),
|
|
640
|
+
workflow_enforcement: vOptional(vLiteral("off", "warn", "strict"))
|
|
641
|
+
}));
|
|
642
|
+
var extensionPolicyOverride = vObject({
|
|
643
|
+
name: vString,
|
|
644
|
+
disabled: vOptional(vBoolean),
|
|
645
|
+
require_trusted: vOptional(vBoolean),
|
|
646
|
+
require_provenance: vOptional(vBoolean),
|
|
647
|
+
sandbox_profile: vOptional(vLiteral("none", "restricted", "strict")),
|
|
648
|
+
allowed_capabilities: vOptional(vArray(vString)),
|
|
649
|
+
blocked_capabilities: vOptional(vArray(vString)),
|
|
650
|
+
allowed_surfaces: vOptional(vArray(vString)),
|
|
651
|
+
blocked_surfaces: vOptional(vArray(vString)),
|
|
652
|
+
allowed_commands: vOptional(vArray(vString)),
|
|
653
|
+
blocked_commands: vOptional(vArray(vString)),
|
|
654
|
+
allowed_actions: vOptional(vArray(vString)),
|
|
655
|
+
blocked_actions: vOptional(vArray(vString)),
|
|
656
|
+
allowed_services: vOptional(vArray(vString)),
|
|
657
|
+
blocked_services: vOptional(vArray(vString))
|
|
658
|
+
});
|
|
659
|
+
var pmMaxVersionExceededModeLiteral = vLiteral("block", "warn");
|
|
660
|
+
var pmMaxVersionExceededMode = (input) => typeof input === "string" ? pmMaxVersionExceededModeLiteral(input) : vObject({
|
|
661
|
+
global: vOptional(pmMaxVersionExceededModeLiteral),
|
|
662
|
+
project: vOptional(pmMaxVersionExceededModeLiteral)
|
|
663
|
+
})(input);
|
|
664
|
+
var extensionPolicy = vOptional(vObject({
|
|
665
|
+
mode: vOptional(vLiteral("off", "warn", "enforce")),
|
|
666
|
+
trust_mode: vOptional(vLiteral("off", "warn", "enforce")),
|
|
667
|
+
pm_max_version_exceeded_mode: vOptional(pmMaxVersionExceededMode),
|
|
668
|
+
require_provenance: vOptional(vBoolean),
|
|
669
|
+
trusted_extensions: vOptional(vArray(vString)),
|
|
670
|
+
default_sandbox_profile: vOptional(vLiteral("none", "restricted", "strict")),
|
|
671
|
+
allowed_extensions: vOptional(vArray(vString)),
|
|
672
|
+
blocked_extensions: vOptional(vArray(vString)),
|
|
673
|
+
allowed_capabilities: vOptional(vArray(vString)),
|
|
674
|
+
blocked_capabilities: vOptional(vArray(vString)),
|
|
675
|
+
allowed_surfaces: vOptional(vArray(vString)),
|
|
676
|
+
blocked_surfaces: vOptional(vArray(vString)),
|
|
677
|
+
allowed_commands: vOptional(vArray(vString)),
|
|
678
|
+
blocked_commands: vOptional(vArray(vString)),
|
|
679
|
+
allowed_actions: vOptional(vArray(vString)),
|
|
680
|
+
blocked_actions: vOptional(vArray(vString)),
|
|
681
|
+
allowed_services: vOptional(vArray(vString)),
|
|
682
|
+
blocked_services: vOptional(vArray(vString)),
|
|
683
|
+
extension_overrides: vOptional(vArray(extensionPolicyOverride))
|
|
684
|
+
}));
|
|
685
|
+
var settingsCheck = vObject({
|
|
686
|
+
version: vNumber({ int: true }),
|
|
687
|
+
id_prefix: vString,
|
|
688
|
+
author_default: vString,
|
|
689
|
+
item_format: vOptional(vLiteral("toon", "json_markdown")),
|
|
690
|
+
locks: vObject({ ttl_seconds: vNumber({ int: true }), wait_ms: vOptional(vNumber({ int: true, min: 0 })) }),
|
|
691
|
+
checkpoints: vOptional(vObject({ retention_days: vOptional(vNumber({ int: true, positive: true })) })),
|
|
692
|
+
output: vObject({ default_format: vLiteral("toon", "json") }),
|
|
693
|
+
history: vOptional(vObject({
|
|
694
|
+
missing_stream: vLiteral("auto_create", "strict_error"),
|
|
695
|
+
compact_policy: vOptional(vObject({
|
|
696
|
+
enabled: vOptional(vBoolean),
|
|
697
|
+
max_entries: vOptional(vNumber({ int: true, positive: true })),
|
|
698
|
+
trigger: vOptional(vLiteral("health_warn", "auto"))
|
|
699
|
+
}))
|
|
700
|
+
})),
|
|
701
|
+
validation: vOptional(vObject({
|
|
702
|
+
sprint_release_format: vLiteral("warn", "strict_error"),
|
|
703
|
+
parent_reference: vOptional(vLiteral("warn", "strict_error")),
|
|
704
|
+
metadata_profile: vOptional(vLiteral("core", "strict", "custom")),
|
|
705
|
+
metadata_required_fields: vOptional(vArray(vString)),
|
|
706
|
+
lifecycle_stale_blocker_reason_patterns: vOptional(vArray(vString)),
|
|
707
|
+
lifecycle_closure_like_blocked_reason_patterns: vOptional(vArray(vString)),
|
|
708
|
+
lifecycle_closure_like_resolution_patterns: vOptional(vArray(vString)),
|
|
709
|
+
lifecycle_closure_like_actual_result_patterns: vOptional(vArray(vString)),
|
|
710
|
+
estimate_defaults_by_type: vOptional(vRecordOf(vNumber({ int: true, positive: true })))
|
|
711
|
+
})),
|
|
712
|
+
governance: governanceSettings,
|
|
713
|
+
workflow: vOptional(vObject({ definition_of_done: vArray(vString) })),
|
|
714
|
+
testing: vOptional(vObject({ record_results_to_items: vBoolean })),
|
|
715
|
+
telemetry: vOptional(vObject({
|
|
716
|
+
enabled: vBoolean,
|
|
717
|
+
first_run_prompt_completed: vOptional(vBoolean),
|
|
718
|
+
capture_level: vOptional(vLiteral("minimal", "redacted", "max")),
|
|
719
|
+
endpoint: vOptional(vString),
|
|
720
|
+
installation_id: vOptional(vString),
|
|
721
|
+
retention_days: vOptional(vNumber({ int: true, positive: true }))
|
|
722
|
+
})),
|
|
723
|
+
agent_guidance: vOptional(vObject({
|
|
724
|
+
prompt_completed: vOptional(vBoolean),
|
|
725
|
+
declined: vOptional(vBoolean),
|
|
726
|
+
declined_at: vOptional(vString),
|
|
727
|
+
template_version: vOptional(vNumber({ int: true, positive: true })),
|
|
728
|
+
last_checked_files: vOptional(vArray(vString))
|
|
729
|
+
})),
|
|
730
|
+
item_types: vOptional(vObject({ definitions: vArray(itemTypeDefinition) })),
|
|
731
|
+
schema: runtimeSchemaSettings,
|
|
732
|
+
context: vOptional(vObject({
|
|
733
|
+
default_depth: vOptional(vLiteral("brief", "standard", "deep")),
|
|
734
|
+
activity_limit: vOptional(vNumber({ int: true, positive: true })),
|
|
735
|
+
stale_threshold_days: vOptional(vNumber({ int: true, positive: true })),
|
|
736
|
+
sections: vOptional(vObject({
|
|
737
|
+
hierarchy: vOptional(vBoolean),
|
|
738
|
+
activity: vOptional(vBoolean),
|
|
739
|
+
progress: vOptional(vBoolean),
|
|
740
|
+
recently_created: vOptional(vBoolean),
|
|
741
|
+
unparented: vOptional(vBoolean),
|
|
742
|
+
blockers: vOptional(vBoolean),
|
|
743
|
+
files: vOptional(vBoolean),
|
|
744
|
+
workload: vOptional(vBoolean),
|
|
745
|
+
staleness: vOptional(vBoolean),
|
|
746
|
+
tests: vOptional(vBoolean)
|
|
747
|
+
}))
|
|
748
|
+
})),
|
|
749
|
+
extensions: vObject({
|
|
750
|
+
enabled: vArray(vString),
|
|
751
|
+
disabled: vArray(vString),
|
|
752
|
+
policy: extensionPolicy
|
|
753
|
+
}),
|
|
754
|
+
search: vObject({
|
|
755
|
+
score_threshold: vNumber(),
|
|
756
|
+
hybrid_semantic_weight: vOptional(vNumber()),
|
|
757
|
+
max_results: vNumber({ int: true }),
|
|
758
|
+
embedding_model: vString,
|
|
759
|
+
embedding_corpus_max_characters: vOptional(vNumber()),
|
|
760
|
+
embedding_batch_size: vNumber({ int: true }),
|
|
761
|
+
embedding_timeout_ms: vOptional(vNumber({ int: true })),
|
|
762
|
+
scanner_max_batch_retries: vNumber({ int: true }),
|
|
763
|
+
provider: vOptional(vString),
|
|
764
|
+
corpus_fields: vOptional(vArray(vString)),
|
|
765
|
+
mutation_refresh_policy: vOptional(vLiteral("cache_only", "semantic_configured", "semantic_auto")),
|
|
766
|
+
query_expansion: vOptional(vObject({
|
|
767
|
+
enabled: vOptional(vBoolean),
|
|
768
|
+
provider: vOptional(vString)
|
|
769
|
+
})),
|
|
770
|
+
rerank: vOptional(vObject({
|
|
771
|
+
enabled: vOptional(vBoolean),
|
|
772
|
+
model: vOptional(vString),
|
|
773
|
+
top_k: vOptional(vNumber({ int: true, positive: true }))
|
|
774
|
+
})),
|
|
775
|
+
// pm-75k9: offline BM25 tuning. Unlike `search.tuning` (intentionally
|
|
776
|
+
// stripped for legacy zod parity), bm25 is validated so it persists across
|
|
777
|
+
// writeSettings round-trips — these knobs must survive to take effect.
|
|
778
|
+
bm25: vOptional(vObject({
|
|
779
|
+
k1: vOptional(vNumber()),
|
|
780
|
+
b: vOptional(vNumber())
|
|
781
|
+
}))
|
|
782
|
+
}),
|
|
783
|
+
providers: vObject({
|
|
784
|
+
openai: vObject({ base_url: vString, api_key: vString, model: vString }),
|
|
785
|
+
ollama: vObject({ base_url: vString, model: vString })
|
|
786
|
+
}),
|
|
787
|
+
vector_store: vObject({
|
|
788
|
+
adapter: vOptional(vString),
|
|
789
|
+
collection_name: vOptional(vString),
|
|
790
|
+
qdrant: vObject({ url: vString, api_key: vString }),
|
|
791
|
+
lancedb: vObject({ path: vString })
|
|
792
|
+
})
|
|
793
|
+
});
|
|
794
|
+
function validateSettings(raw) {
|
|
795
|
+
const result = settingsCheck(raw);
|
|
796
|
+
if (!result.ok) {
|
|
797
|
+
return { success: false };
|
|
798
|
+
}
|
|
799
|
+
return { success: true, data: result.value };
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// dist/core/validate/estimate-defaults.js
|
|
803
|
+
var DEFAULT_ESTIMATE_MINUTES_BY_TYPE = {
|
|
804
|
+
Epic: 2880,
|
|
805
|
+
Feature: 480,
|
|
806
|
+
Story: 480,
|
|
807
|
+
Milestone: 2880,
|
|
808
|
+
Task: 120,
|
|
809
|
+
Issue: 60,
|
|
810
|
+
Bug: 60,
|
|
811
|
+
Chore: 30,
|
|
812
|
+
Decision: 15,
|
|
813
|
+
Plan: 120
|
|
814
|
+
};
|
|
815
|
+
var FALLBACK_ESTIMATE_MINUTES = 120;
|
|
816
|
+
function isHonoredMinutes(value) {
|
|
817
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
818
|
+
}
|
|
819
|
+
function toLowercasedLookup(source) {
|
|
820
|
+
const lookup = /* @__PURE__ */ new Map();
|
|
821
|
+
for (const [key, value] of Object.entries(source)) {
|
|
822
|
+
lookup.set(key.toLowerCase(), value);
|
|
823
|
+
}
|
|
824
|
+
return lookup;
|
|
825
|
+
}
|
|
826
|
+
var BUILTIN_LOWERCASED_LOOKUP = toLowercasedLookup(DEFAULT_ESTIMATE_MINUTES_BY_TYPE);
|
|
827
|
+
var OVERRIDE_LOOKUP_CACHE = /* @__PURE__ */ new WeakMap();
|
|
828
|
+
function lowercasedOverrideLookup(overrides) {
|
|
829
|
+
const cached = OVERRIDE_LOOKUP_CACHE.get(overrides);
|
|
830
|
+
if (cached) {
|
|
831
|
+
return cached;
|
|
832
|
+
}
|
|
833
|
+
const lookup = toLowercasedLookup(overrides);
|
|
834
|
+
OVERRIDE_LOOKUP_CACHE.set(overrides, lookup);
|
|
835
|
+
return lookup;
|
|
836
|
+
}
|
|
837
|
+
function resolveEstimateDefaultMinutes(type, overrides) {
|
|
838
|
+
const key = (type ?? "").trim().toLowerCase();
|
|
839
|
+
if (key.length === 0) {
|
|
840
|
+
return FALLBACK_ESTIMATE_MINUTES;
|
|
841
|
+
}
|
|
842
|
+
if (overrides) {
|
|
843
|
+
const overrideValue = lowercasedOverrideLookup(overrides).get(key);
|
|
844
|
+
if (isHonoredMinutes(overrideValue)) {
|
|
845
|
+
return Math.floor(overrideValue);
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
const builtinValue = BUILTIN_LOWERCASED_LOOKUP.get(key);
|
|
849
|
+
if (isHonoredMinutes(builtinValue)) {
|
|
850
|
+
return Math.floor(builtinValue);
|
|
851
|
+
}
|
|
852
|
+
return FALLBACK_ESTIMATE_MINUTES;
|
|
853
|
+
}
|
|
854
|
+
function normalizeEstimateDefaultOverrides(raw) {
|
|
855
|
+
const normalized = {};
|
|
856
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) {
|
|
857
|
+
return normalized;
|
|
858
|
+
}
|
|
859
|
+
for (const [rawKey, rawValue] of Object.entries(raw)) {
|
|
860
|
+
const key = rawKey.trim();
|
|
861
|
+
if (key.length === 0 || !isHonoredMinutes(rawValue)) {
|
|
862
|
+
continue;
|
|
863
|
+
}
|
|
864
|
+
normalized[key] = Math.floor(rawValue);
|
|
865
|
+
}
|
|
866
|
+
return normalized;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
// dist/core/store/settings-read-cache.js
|
|
870
|
+
import { stat } from "node:fs/promises";
|
|
871
|
+
var settingsReadCacheByRoot = /* @__PURE__ */ new Map();
|
|
872
|
+
function normalizeTrackedPaths(paths) {
|
|
873
|
+
return [...new Set(paths.map((pathValue) => pathValue.trim()).filter((pathValue) => pathValue.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
874
|
+
}
|
|
875
|
+
async function readPathSignature(targetPath) {
|
|
876
|
+
try {
|
|
877
|
+
const targetStats = await stat(targetPath);
|
|
878
|
+
return {
|
|
879
|
+
path: targetPath,
|
|
880
|
+
mtime_ms: targetStats.mtimeMs,
|
|
881
|
+
size: targetStats.size
|
|
882
|
+
};
|
|
883
|
+
} catch {
|
|
884
|
+
return {
|
|
885
|
+
path: targetPath,
|
|
886
|
+
mtime_ms: null,
|
|
887
|
+
size: null
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
async function collectSettingsReadCacheSignatures(paths) {
|
|
892
|
+
const normalizedPaths = normalizeTrackedPaths(paths);
|
|
893
|
+
const signatures = await Promise.all(normalizedPaths.map((targetPath) => readPathSignature(targetPath)));
|
|
894
|
+
signatures.sort((left, right) => left.path.localeCompare(right.path));
|
|
895
|
+
return signatures;
|
|
896
|
+
}
|
|
897
|
+
function settingsReadCacheSignaturesEqual(left, right) {
|
|
898
|
+
if (left.length !== right.length) {
|
|
899
|
+
return false;
|
|
900
|
+
}
|
|
901
|
+
for (let index = 0; index < left.length; index += 1) {
|
|
902
|
+
const leftEntry = left[index];
|
|
903
|
+
const rightEntry = right[index];
|
|
904
|
+
if (leftEntry.path !== rightEntry.path || leftEntry.mtime_ms !== rightEntry.mtime_ms || leftEntry.size !== rightEntry.size) {
|
|
905
|
+
return false;
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
return true;
|
|
909
|
+
}
|
|
910
|
+
function getSettingsReadCacheEntry(pmRoot) {
|
|
911
|
+
return settingsReadCacheByRoot.get(pmRoot);
|
|
912
|
+
}
|
|
913
|
+
function setSettingsReadCacheEntry(pmRoot, entry) {
|
|
914
|
+
const normalizedTrackedPaths = normalizeTrackedPaths(entry.tracked_paths);
|
|
915
|
+
const normalizedSignatures = [...entry.signatures].map((signature) => ({
|
|
916
|
+
path: signature.path,
|
|
917
|
+
mtime_ms: signature.mtime_ms,
|
|
918
|
+
size: signature.size
|
|
919
|
+
})).sort((left, right) => left.path.localeCompare(right.path));
|
|
920
|
+
settingsReadCacheByRoot.set(pmRoot, {
|
|
921
|
+
tracked_paths: normalizedTrackedPaths,
|
|
922
|
+
signatures: normalizedSignatures,
|
|
923
|
+
value: entry.value
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
function clearSettingsReadCache(pmRoot) {
|
|
927
|
+
if (pmRoot) {
|
|
928
|
+
settingsReadCacheByRoot.delete(pmRoot);
|
|
929
|
+
return;
|
|
930
|
+
}
|
|
931
|
+
settingsReadCacheByRoot.clear();
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
// dist/core/store/settings.js
|
|
935
|
+
var SETTINGS_WRITE_OP = "settings:write";
|
|
936
|
+
var SETTINGS_PERSIST_SOURCE_SYMBOL = /* @__PURE__ */ Symbol("pm.settings.persist_source");
|
|
937
|
+
var MAX_VECTOR_STORE_COLLECTION_NAME_LENGTH = 128;
|
|
938
|
+
function resolveGovernanceKnobsFromPreset(preset) {
|
|
939
|
+
return structuredClone(GOVERNANCE_PRESET_DEFAULTS[preset]);
|
|
940
|
+
}
|
|
941
|
+
function normalizeGovernancePreset(value) {
|
|
942
|
+
if (value === "minimal" || value === "default" || value === "strict" || value === "custom") {
|
|
943
|
+
return value;
|
|
944
|
+
}
|
|
945
|
+
return SETTINGS_DEFAULTS.governance.preset;
|
|
946
|
+
}
|
|
947
|
+
function withGovernanceExtras(base, governance) {
|
|
948
|
+
const createDefaultType = typeof governance.create_default_type === "string" ? governance.create_default_type.trim() : void 0;
|
|
949
|
+
if (createDefaultType && createDefaultType.length > 0) {
|
|
950
|
+
base.create_default_type = createDefaultType;
|
|
951
|
+
}
|
|
952
|
+
if (governance.workflow_enforcement === "off" || governance.workflow_enforcement === "warn" || governance.workflow_enforcement === "strict") {
|
|
953
|
+
base.workflow_enforcement = governance.workflow_enforcement;
|
|
954
|
+
}
|
|
955
|
+
if (governance.require_close_reason === false) {
|
|
956
|
+
base.require_close_reason = false;
|
|
957
|
+
}
|
|
958
|
+
return base;
|
|
959
|
+
}
|
|
960
|
+
function normalizeGovernanceForPersist(governance) {
|
|
961
|
+
if (governance.preset === "custom") {
|
|
962
|
+
return withGovernanceExtras({
|
|
963
|
+
preset: "custom",
|
|
964
|
+
ownership_enforcement: governance.ownership_enforcement,
|
|
965
|
+
create_mode_default: governance.create_mode_default,
|
|
966
|
+
close_validation_default: governance.close_validation_default,
|
|
967
|
+
parent_reference: governance.parent_reference,
|
|
968
|
+
metadata_profile: governance.metadata_profile,
|
|
969
|
+
force_required_for_stale_lock: governance.force_required_for_stale_lock
|
|
970
|
+
}, governance);
|
|
971
|
+
}
|
|
972
|
+
return withGovernanceExtras({
|
|
973
|
+
preset: governance.preset
|
|
974
|
+
}, governance);
|
|
975
|
+
}
|
|
976
|
+
function resolveGovernanceExtras(rawGovernance) {
|
|
977
|
+
const createDefaultType = typeof rawGovernance.create_default_type === "string" ? rawGovernance.create_default_type.trim() : void 0;
|
|
978
|
+
const extras = {};
|
|
979
|
+
if (createDefaultType && createDefaultType.length > 0) {
|
|
980
|
+
extras.create_default_type = createDefaultType;
|
|
981
|
+
}
|
|
982
|
+
if (rawGovernance.workflow_enforcement === "off" || rawGovernance.workflow_enforcement === "warn" || rawGovernance.workflow_enforcement === "strict") {
|
|
983
|
+
extras.workflow_enforcement = rawGovernance.workflow_enforcement;
|
|
984
|
+
}
|
|
985
|
+
if (typeof rawGovernance.require_close_reason === "boolean") {
|
|
986
|
+
extras.require_close_reason = rawGovernance.require_close_reason;
|
|
987
|
+
}
|
|
988
|
+
return extras;
|
|
989
|
+
}
|
|
990
|
+
function resolveGovernanceKnobs(settings) {
|
|
991
|
+
const rawGovernance = settings.governance ?? {};
|
|
992
|
+
const preset = normalizeGovernancePreset(rawGovernance.preset);
|
|
993
|
+
const extras = resolveGovernanceExtras(rawGovernance);
|
|
994
|
+
if (preset === "custom") {
|
|
995
|
+
const baseline2 = resolveGovernanceKnobsFromPreset("default");
|
|
996
|
+
const requireCloseReason2 = extras.require_close_reason ?? baseline2.require_close_reason;
|
|
997
|
+
return {
|
|
998
|
+
preset,
|
|
999
|
+
ownership_enforcement: rawGovernance.ownership_enforcement ?? baseline2.ownership_enforcement,
|
|
1000
|
+
create_mode_default: rawGovernance.create_mode_default ?? baseline2.create_mode_default,
|
|
1001
|
+
close_validation_default: rawGovernance.close_validation_default ?? baseline2.close_validation_default,
|
|
1002
|
+
parent_reference: rawGovernance.parent_reference ?? baseline2.parent_reference,
|
|
1003
|
+
metadata_profile: rawGovernance.metadata_profile ?? baseline2.metadata_profile,
|
|
1004
|
+
force_required_for_stale_lock: rawGovernance.force_required_for_stale_lock ?? baseline2.force_required_for_stale_lock,
|
|
1005
|
+
...extras,
|
|
1006
|
+
require_close_reason: requireCloseReason2
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
const baseline = resolveGovernanceKnobsFromPreset(preset);
|
|
1010
|
+
const requireCloseReason = extras.require_close_reason ?? baseline.require_close_reason;
|
|
1011
|
+
return {
|
|
1012
|
+
preset,
|
|
1013
|
+
...baseline,
|
|
1014
|
+
...extras,
|
|
1015
|
+
require_close_reason: requireCloseReason
|
|
1016
|
+
};
|
|
1017
|
+
}
|
|
1018
|
+
function cloneDefaults() {
|
|
1019
|
+
return structuredClone(SETTINGS_DEFAULTS);
|
|
1020
|
+
}
|
|
1021
|
+
function normalizeSearchMutationRefreshPolicy(value) {
|
|
1022
|
+
if (value === "cache_only" || value === "semantic_configured" || value === "semantic_auto") {
|
|
1023
|
+
return value;
|
|
1024
|
+
}
|
|
1025
|
+
return SETTINGS_DEFAULTS.search.mutation_refresh_policy;
|
|
1026
|
+
}
|
|
1027
|
+
function normalizeSearchQueryExpansionEnabled(value) {
|
|
1028
|
+
if (typeof value === "boolean") {
|
|
1029
|
+
return value;
|
|
1030
|
+
}
|
|
1031
|
+
return SETTINGS_DEFAULTS.search.query_expansion.enabled;
|
|
1032
|
+
}
|
|
1033
|
+
function normalizeSearchQueryExpansionProvider(value) {
|
|
1034
|
+
if (typeof value !== "string") {
|
|
1035
|
+
return SETTINGS_DEFAULTS.search.query_expansion.provider;
|
|
1036
|
+
}
|
|
1037
|
+
return value.trim();
|
|
1038
|
+
}
|
|
1039
|
+
function normalizeSearchRerankEnabled(value) {
|
|
1040
|
+
if (typeof value === "boolean") {
|
|
1041
|
+
return value;
|
|
1042
|
+
}
|
|
1043
|
+
return SETTINGS_DEFAULTS.search.rerank.enabled;
|
|
1044
|
+
}
|
|
1045
|
+
function normalizeSearchRerankModel(value) {
|
|
1046
|
+
if (typeof value !== "string") {
|
|
1047
|
+
return SETTINGS_DEFAULTS.search.rerank.model;
|
|
1048
|
+
}
|
|
1049
|
+
return value.trim();
|
|
1050
|
+
}
|
|
1051
|
+
function normalizeSearchRerankTopK(value) {
|
|
1052
|
+
if (typeof value === "number" && Number.isFinite(value) && Number.isInteger(value) && value > 0) {
|
|
1053
|
+
return value;
|
|
1054
|
+
}
|
|
1055
|
+
return SETTINGS_DEFAULTS.search.rerank.top_k;
|
|
1056
|
+
}
|
|
1057
|
+
function normalizeVectorStoreCollectionName(value) {
|
|
1058
|
+
if (typeof value !== "string") {
|
|
1059
|
+
return SETTINGS_DEFAULTS.vector_store.collection_name;
|
|
1060
|
+
}
|
|
1061
|
+
const sanitized = value.trim().replaceAll(/[^a-zA-Z0-9_-]/g, "_");
|
|
1062
|
+
const truncated = sanitized.slice(0, MAX_VECTOR_STORE_COLLECTION_NAME_LENGTH);
|
|
1063
|
+
return truncated.length > 0 ? truncated : SETTINGS_DEFAULTS.vector_store.collection_name;
|
|
1064
|
+
}
|
|
1065
|
+
function buildSettingsPersistSourceSnapshot(parsedSettings, runtimeSettings) {
|
|
1066
|
+
const sourceSchema = parsedSettings.schema;
|
|
1067
|
+
const sourceStatuses = Array.isArray(sourceSchema?.statuses) ? sourceSchema?.statuses : void 0;
|
|
1068
|
+
const sourceFields = Array.isArray(sourceSchema?.fields) ? sourceSchema?.fields : void 0;
|
|
1069
|
+
const sourceTypeWorkflows = Array.isArray(sourceSchema?.type_workflows) ? sourceSchema?.type_workflows : void 0;
|
|
1070
|
+
return {
|
|
1071
|
+
has_source_item_type_definitions: Array.isArray(parsedSettings.item_types?.definitions),
|
|
1072
|
+
source_item_type_definitions: normalizeItemTypeDefinitions(parsedSettings.item_types?.definitions),
|
|
1073
|
+
has_source_schema_statuses: sourceStatuses !== void 0,
|
|
1074
|
+
source_schema_statuses: sourceStatuses ? structuredClone(sourceStatuses) : [],
|
|
1075
|
+
has_source_schema_fields: sourceFields !== void 0,
|
|
1076
|
+
source_schema_fields: sourceFields ? structuredClone(sourceFields) : [],
|
|
1077
|
+
has_source_schema_type_workflows: sourceTypeWorkflows !== void 0,
|
|
1078
|
+
source_schema_type_workflows: sourceTypeWorkflows ? structuredClone(sourceTypeWorkflows) : [],
|
|
1079
|
+
runtime_item_type_definitions: normalizeItemTypeDefinitions(runtimeSettings.item_types?.definitions),
|
|
1080
|
+
runtime_schema_statuses: structuredClone(runtimeSettings.schema.statuses),
|
|
1081
|
+
runtime_schema_fields: structuredClone(runtimeSettings.schema.fields),
|
|
1082
|
+
runtime_schema_type_workflows: structuredClone(runtimeSettings.schema.type_workflows ?? [])
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
function attachSettingsPersistSourceSnapshot(settings, source) {
|
|
1086
|
+
Object.defineProperty(settings, SETTINGS_PERSIST_SOURCE_SYMBOL, {
|
|
1087
|
+
value: source,
|
|
1088
|
+
writable: true,
|
|
1089
|
+
configurable: true,
|
|
1090
|
+
enumerable: false
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
function getSettingsPersistSourceSnapshot(settings) {
|
|
1094
|
+
const candidate = settings[SETTINGS_PERSIST_SOURCE_SYMBOL];
|
|
1095
|
+
if (!candidate || typeof candidate !== "object") {
|
|
1096
|
+
return void 0;
|
|
1097
|
+
}
|
|
1098
|
+
return candidate;
|
|
1099
|
+
}
|
|
1100
|
+
function cloneSettingsReadResult(result) {
|
|
1101
|
+
const clonedSettings = structuredClone(result.settings);
|
|
1102
|
+
const persistSource = getSettingsPersistSourceSnapshot(result.settings);
|
|
1103
|
+
if (persistSource) {
|
|
1104
|
+
attachSettingsPersistSourceSnapshot(clonedSettings, structuredClone(persistSource));
|
|
1105
|
+
}
|
|
1106
|
+
return {
|
|
1107
|
+
settings: clonedSettings,
|
|
1108
|
+
metadata: {
|
|
1109
|
+
has_explicit_item_format: result.metadata.has_explicit_item_format
|
|
1110
|
+
},
|
|
1111
|
+
warnings: [...result.warnings]
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
function resolveSettingsReadTrackedPaths(pmRoot, schema, settingsPath) {
|
|
1115
|
+
const normalizedSchema = normalizeRuntimeSchemaSettings(schema);
|
|
1116
|
+
return [
|
|
1117
|
+
settingsPath,
|
|
1118
|
+
filePathForSchemaSection(pmRoot, normalizedSchema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types),
|
|
1119
|
+
filePathForSchemaSection(pmRoot, normalizedSchema.files.statuses, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses),
|
|
1120
|
+
filePathForSchemaSection(pmRoot, normalizedSchema.files.fields, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields),
|
|
1121
|
+
filePathForSchemaSection(pmRoot, normalizedSchema.files.workflows, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.workflows)
|
|
1122
|
+
];
|
|
1123
|
+
}
|
|
1124
|
+
async function cacheSettingsReadResult(pmRoot, trackedPaths, result) {
|
|
1125
|
+
const signatures = await collectSettingsReadCacheSignatures(trackedPaths);
|
|
1126
|
+
setSettingsReadCacheEntry(pmRoot, {
|
|
1127
|
+
tracked_paths: trackedPaths,
|
|
1128
|
+
signatures,
|
|
1129
|
+
value: cloneSettingsReadResult(result)
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
async function cacheSettingsReadResultSafe(pmRoot, trackedPaths, result) {
|
|
1133
|
+
try {
|
|
1134
|
+
await cacheSettingsReadResult(pmRoot, trackedPaths, result);
|
|
1135
|
+
} catch {
|
|
1136
|
+
clearSettingsReadCache(pmRoot);
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
function findSettingsReadCacheSignature(signatures, targetPath) {
|
|
1140
|
+
return signatures.find((signature) => signature.path === targetPath);
|
|
1141
|
+
}
|
|
1142
|
+
function selectedSettingsReadCacheSignaturesEqual(before, after, targetPaths) {
|
|
1143
|
+
for (const targetPath of targetPaths) {
|
|
1144
|
+
const beforeSignature = findSettingsReadCacheSignature(before, targetPath);
|
|
1145
|
+
const afterSignature = findSettingsReadCacheSignature(after, targetPath);
|
|
1146
|
+
if (!beforeSignature || !afterSignature || !settingsReadCacheSignaturesEqual([beforeSignature], [afterSignature])) {
|
|
1147
|
+
return false;
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
return true;
|
|
1151
|
+
}
|
|
1152
|
+
async function cacheSettingsReadResultIfStable(pmRoot, trackedPaths, result, stableSignatures, stablePaths) {
|
|
1153
|
+
try {
|
|
1154
|
+
const currentSignatures = await collectSettingsReadCacheSignatures(trackedPaths);
|
|
1155
|
+
if (!selectedSettingsReadCacheSignaturesEqual(stableSignatures, currentSignatures, stablePaths)) {
|
|
1156
|
+
clearSettingsReadCache(pmRoot);
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
setSettingsReadCacheEntry(pmRoot, {
|
|
1160
|
+
tracked_paths: trackedPaths,
|
|
1161
|
+
signatures: currentSignatures,
|
|
1162
|
+
value: cloneSettingsReadResult(result)
|
|
1163
|
+
});
|
|
1164
|
+
} catch {
|
|
1165
|
+
clearSettingsReadCache(pmRoot);
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
function resolvePersistedFileBackedSchemaSections(settings, source) {
|
|
1169
|
+
const normalizedSchema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
1170
|
+
const currentItemTypeDefinitions = normalizeItemTypeDefinitions(settings.item_types?.definitions);
|
|
1171
|
+
if (!source) {
|
|
1172
|
+
return {
|
|
1173
|
+
item_type_definitions: currentItemTypeDefinitions,
|
|
1174
|
+
schema_statuses: normalizedSchema.statuses,
|
|
1175
|
+
schema_fields: normalizedSchema.fields,
|
|
1176
|
+
schema_type_workflows: normalizedSchema.type_workflows
|
|
1177
|
+
};
|
|
1178
|
+
}
|
|
1179
|
+
const currentTypeWorkflows = normalizedSchema.type_workflows ?? [];
|
|
1180
|
+
const itemTypeDefinitionsUnchanged = stableValueEquals(currentItemTypeDefinitions, source.runtime_item_type_definitions);
|
|
1181
|
+
const schemaStatusesUnchanged = stableValueEquals(normalizedSchema.statuses, source.runtime_schema_statuses);
|
|
1182
|
+
const schemaFieldsUnchanged = stableValueEquals(normalizedSchema.fields, source.runtime_schema_fields);
|
|
1183
|
+
const schemaTypeWorkflowsUnchanged = stableValueEquals(currentTypeWorkflows, source.runtime_schema_type_workflows);
|
|
1184
|
+
return {
|
|
1185
|
+
item_type_definitions: itemTypeDefinitionsUnchanged ? source.has_source_item_type_definitions ? normalizeItemTypeDefinitions(source.source_item_type_definitions) : [] : currentItemTypeDefinitions,
|
|
1186
|
+
schema_statuses: schemaStatusesUnchanged ? source.has_source_schema_statuses ? structuredClone(source.source_schema_statuses) : [] : normalizedSchema.statuses,
|
|
1187
|
+
schema_fields: schemaFieldsUnchanged ? source.has_source_schema_fields ? structuredClone(source.source_schema_fields) : [] : normalizedSchema.fields,
|
|
1188
|
+
schema_type_workflows: schemaTypeWorkflowsUnchanged ? source.has_source_schema_type_workflows ? structuredClone(source.source_schema_type_workflows) : void 0 : normalizedSchema.type_workflows
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1191
|
+
function buildFallbackSettingsReadResult(warning) {
|
|
1192
|
+
return {
|
|
1193
|
+
settings: cloneDefaults(),
|
|
1194
|
+
metadata: {
|
|
1195
|
+
has_explicit_item_format: false
|
|
1196
|
+
},
|
|
1197
|
+
warnings: warning ? [warning] : []
|
|
1198
|
+
};
|
|
1199
|
+
}
|
|
1200
|
+
function hasExplicitItemFormat(raw) {
|
|
1201
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
1202
|
+
return false;
|
|
1203
|
+
}
|
|
1204
|
+
const itemFormat = raw.item_format;
|
|
1205
|
+
return itemFormat === "toon" || itemFormat === "json_markdown";
|
|
1206
|
+
}
|
|
1207
|
+
function normalizeStringList(values) {
|
|
1208
|
+
return [...new Set((values ?? []).map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
1209
|
+
}
|
|
1210
|
+
function normalizeAgentGuidanceSettings(value) {
|
|
1211
|
+
const defaults = SETTINGS_DEFAULTS.agent_guidance;
|
|
1212
|
+
const templateVersion = value?.template_version;
|
|
1213
|
+
return {
|
|
1214
|
+
prompt_completed: value?.prompt_completed === true,
|
|
1215
|
+
declined: value?.declined === true,
|
|
1216
|
+
declined_at: typeof value?.declined_at === "string" ? value.declined_at : defaults.declined_at,
|
|
1217
|
+
template_version: typeof templateVersion === "number" && Number.isInteger(templateVersion) && templateVersion > 0 ? templateVersion : defaults.template_version,
|
|
1218
|
+
last_checked_files: normalizeStringList(value?.last_checked_files ?? defaults.last_checked_files)
|
|
1219
|
+
};
|
|
1220
|
+
}
|
|
1221
|
+
function normalizeLowerStringList(values) {
|
|
1222
|
+
return [...new Set((values ?? []).map((value) => value.trim().toLowerCase()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
1223
|
+
}
|
|
1224
|
+
function normalizeExtensionPolicyMode(value) {
|
|
1225
|
+
if (value === "off" || value === "warn" || value === "enforce") {
|
|
1226
|
+
return value;
|
|
1227
|
+
}
|
|
1228
|
+
return SETTINGS_DEFAULTS.extensions.policy.mode;
|
|
1229
|
+
}
|
|
1230
|
+
function normalizeExtensionTrustMode(value) {
|
|
1231
|
+
if (value === "off" || value === "warn" || value === "enforce") {
|
|
1232
|
+
return value;
|
|
1233
|
+
}
|
|
1234
|
+
return SETTINGS_DEFAULTS.extensions.policy.trust_mode;
|
|
1235
|
+
}
|
|
1236
|
+
function normalizeExtensionSandboxProfile(value) {
|
|
1237
|
+
if (value === "none" || value === "restricted" || value === "strict") {
|
|
1238
|
+
return value;
|
|
1239
|
+
}
|
|
1240
|
+
return SETTINGS_DEFAULTS.extensions.policy.default_sandbox_profile;
|
|
1241
|
+
}
|
|
1242
|
+
function normalizeExtensionPolicyOverride(override) {
|
|
1243
|
+
const name = override.name.trim().toLowerCase();
|
|
1244
|
+
if (name.length === 0) {
|
|
1245
|
+
return null;
|
|
1246
|
+
}
|
|
1247
|
+
const normalized = {
|
|
1248
|
+
name
|
|
1249
|
+
};
|
|
1250
|
+
if (override.disabled === true) {
|
|
1251
|
+
normalized.disabled = true;
|
|
1252
|
+
}
|
|
1253
|
+
if (override.require_trusted === true) {
|
|
1254
|
+
normalized.require_trusted = true;
|
|
1255
|
+
}
|
|
1256
|
+
if (override.require_provenance === true) {
|
|
1257
|
+
normalized.require_provenance = true;
|
|
1258
|
+
}
|
|
1259
|
+
if (override.sandbox_profile !== void 0) {
|
|
1260
|
+
normalized.sandbox_profile = normalizeExtensionSandboxProfile(override.sandbox_profile);
|
|
1261
|
+
}
|
|
1262
|
+
const allowedCapabilities = normalizeLowerStringList(override.allowed_capabilities);
|
|
1263
|
+
const blockedCapabilities = normalizeLowerStringList(override.blocked_capabilities);
|
|
1264
|
+
const allowedSurfaces = normalizeLowerStringList(override.allowed_surfaces);
|
|
1265
|
+
const blockedSurfaces = normalizeLowerStringList(override.blocked_surfaces);
|
|
1266
|
+
const allowedCommands = normalizeLowerStringList(override.allowed_commands);
|
|
1267
|
+
const blockedCommands = normalizeLowerStringList(override.blocked_commands);
|
|
1268
|
+
const allowedActions = normalizeLowerStringList(override.allowed_actions);
|
|
1269
|
+
const blockedActions = normalizeLowerStringList(override.blocked_actions);
|
|
1270
|
+
const allowedServices = normalizeLowerStringList(override.allowed_services);
|
|
1271
|
+
const blockedServices = normalizeLowerStringList(override.blocked_services);
|
|
1272
|
+
if (allowedCapabilities.length > 0) {
|
|
1273
|
+
normalized.allowed_capabilities = allowedCapabilities;
|
|
1274
|
+
}
|
|
1275
|
+
if (blockedCapabilities.length > 0) {
|
|
1276
|
+
normalized.blocked_capabilities = blockedCapabilities;
|
|
1277
|
+
}
|
|
1278
|
+
if (allowedSurfaces.length > 0) {
|
|
1279
|
+
normalized.allowed_surfaces = allowedSurfaces;
|
|
1280
|
+
}
|
|
1281
|
+
if (blockedSurfaces.length > 0) {
|
|
1282
|
+
normalized.blocked_surfaces = blockedSurfaces;
|
|
1283
|
+
}
|
|
1284
|
+
if (allowedCommands.length > 0) {
|
|
1285
|
+
normalized.allowed_commands = allowedCommands;
|
|
1286
|
+
}
|
|
1287
|
+
if (blockedCommands.length > 0) {
|
|
1288
|
+
normalized.blocked_commands = blockedCommands;
|
|
1289
|
+
}
|
|
1290
|
+
if (allowedActions.length > 0) {
|
|
1291
|
+
normalized.allowed_actions = allowedActions;
|
|
1292
|
+
}
|
|
1293
|
+
if (blockedActions.length > 0) {
|
|
1294
|
+
normalized.blocked_actions = blockedActions;
|
|
1295
|
+
}
|
|
1296
|
+
if (allowedServices.length > 0) {
|
|
1297
|
+
normalized.allowed_services = allowedServices;
|
|
1298
|
+
}
|
|
1299
|
+
if (blockedServices.length > 0) {
|
|
1300
|
+
normalized.blocked_services = blockedServices;
|
|
1301
|
+
}
|
|
1302
|
+
return normalized;
|
|
1303
|
+
}
|
|
1304
|
+
function normalizeExtensionPolicyOverrides(overrides) {
|
|
1305
|
+
const dedupedByName = /* @__PURE__ */ new Map();
|
|
1306
|
+
for (const override of overrides ?? []) {
|
|
1307
|
+
const normalized = normalizeExtensionPolicyOverride(override);
|
|
1308
|
+
if (!normalized) {
|
|
1309
|
+
continue;
|
|
1310
|
+
}
|
|
1311
|
+
dedupedByName.set(normalized.name, normalized);
|
|
1312
|
+
}
|
|
1313
|
+
return [...dedupedByName.values()].sort((left, right) => left.name.localeCompare(right.name));
|
|
1314
|
+
}
|
|
1315
|
+
function normalizePmMaxVersionExceededModeValue(value) {
|
|
1316
|
+
return value === "block" || value === "warn" ? value : void 0;
|
|
1317
|
+
}
|
|
1318
|
+
function normalizePmMaxVersionExceededModeSetting(value) {
|
|
1319
|
+
if (typeof value === "string") {
|
|
1320
|
+
return normalizePmMaxVersionExceededModeValue(value);
|
|
1321
|
+
}
|
|
1322
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
1323
|
+
const global = normalizePmMaxVersionExceededModeValue(value.global);
|
|
1324
|
+
const project = normalizePmMaxVersionExceededModeValue(value.project);
|
|
1325
|
+
if (global === void 0 && project === void 0) {
|
|
1326
|
+
return void 0;
|
|
1327
|
+
}
|
|
1328
|
+
return {
|
|
1329
|
+
...global !== void 0 ? { global } : {},
|
|
1330
|
+
...project !== void 0 ? { project } : {}
|
|
1331
|
+
};
|
|
1332
|
+
}
|
|
1333
|
+
return void 0;
|
|
1334
|
+
}
|
|
1335
|
+
function normalizeExtensionPolicyList(policy, key) {
|
|
1336
|
+
return normalizeLowerStringList(policy?.[key] ?? SETTINGS_DEFAULTS.extensions.policy[key]);
|
|
1337
|
+
}
|
|
1338
|
+
function normalizeExtensionPolicySettings(policy) {
|
|
1339
|
+
const pmMaxVersionExceededMode2 = normalizePmMaxVersionExceededModeSetting(policy?.pm_max_version_exceeded_mode);
|
|
1340
|
+
return {
|
|
1341
|
+
mode: normalizeExtensionPolicyMode(policy?.mode),
|
|
1342
|
+
trust_mode: normalizeExtensionTrustMode(policy?.trust_mode),
|
|
1343
|
+
...pmMaxVersionExceededMode2 !== void 0 ? { pm_max_version_exceeded_mode: pmMaxVersionExceededMode2 } : {},
|
|
1344
|
+
require_provenance: policy?.require_provenance === true,
|
|
1345
|
+
trusted_extensions: normalizeExtensionPolicyList(policy, "trusted_extensions"),
|
|
1346
|
+
default_sandbox_profile: normalizeExtensionSandboxProfile(policy?.default_sandbox_profile),
|
|
1347
|
+
allowed_extensions: normalizeExtensionPolicyList(policy, "allowed_extensions"),
|
|
1348
|
+
blocked_extensions: normalizeExtensionPolicyList(policy, "blocked_extensions"),
|
|
1349
|
+
allowed_capabilities: normalizeExtensionPolicyList(policy, "allowed_capabilities"),
|
|
1350
|
+
blocked_capabilities: normalizeExtensionPolicyList(policy, "blocked_capabilities"),
|
|
1351
|
+
allowed_surfaces: normalizeExtensionPolicyList(policy, "allowed_surfaces"),
|
|
1352
|
+
blocked_surfaces: normalizeExtensionPolicyList(policy, "blocked_surfaces"),
|
|
1353
|
+
allowed_commands: normalizeExtensionPolicyList(policy, "allowed_commands"),
|
|
1354
|
+
blocked_commands: normalizeExtensionPolicyList(policy, "blocked_commands"),
|
|
1355
|
+
allowed_actions: normalizeExtensionPolicyList(policy, "allowed_actions"),
|
|
1356
|
+
blocked_actions: normalizeExtensionPolicyList(policy, "blocked_actions"),
|
|
1357
|
+
allowed_services: normalizeExtensionPolicyList(policy, "allowed_services"),
|
|
1358
|
+
blocked_services: normalizeExtensionPolicyList(policy, "blocked_services"),
|
|
1359
|
+
extension_overrides: normalizeExtensionPolicyOverrides(policy?.extension_overrides ?? SETTINGS_DEFAULTS.extensions.policy.extension_overrides)
|
|
1360
|
+
};
|
|
1361
|
+
}
|
|
1362
|
+
function normalizeValidationMetadataRequiredFields(values) {
|
|
1363
|
+
const normalized = [...new Set((values ?? []).map((value) => value.trim().toLowerCase().replaceAll("-", "_")))].filter((value) => value.length > 0).sort((left, right) => left.localeCompare(right));
|
|
1364
|
+
return normalized.filter((value) => [
|
|
1365
|
+
"author",
|
|
1366
|
+
"acceptance_criteria",
|
|
1367
|
+
"estimated_minutes",
|
|
1368
|
+
"close_reason",
|
|
1369
|
+
"reviewer",
|
|
1370
|
+
"risk",
|
|
1371
|
+
"confidence",
|
|
1372
|
+
"sprint",
|
|
1373
|
+
"release"
|
|
1374
|
+
].includes(value));
|
|
1375
|
+
}
|
|
1376
|
+
function normalizeValidationPatternList(values) {
|
|
1377
|
+
return [...new Set((values ?? []).map((value) => value.trim().toLowerCase()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
1378
|
+
}
|
|
1379
|
+
function valueOrDefault(value, fallback) {
|
|
1380
|
+
return value === void 0 ? fallback : value;
|
|
1381
|
+
}
|
|
1382
|
+
function recordOrEmpty(value) {
|
|
1383
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : {};
|
|
1384
|
+
}
|
|
1385
|
+
function arrayOrEmpty(value) {
|
|
1386
|
+
return Array.isArray(value) ? value : [];
|
|
1387
|
+
}
|
|
1388
|
+
function buildValidationSettings(settings, defaults, governance) {
|
|
1389
|
+
return {
|
|
1390
|
+
...defaults.validation,
|
|
1391
|
+
...settings.validation,
|
|
1392
|
+
parent_reference: governance.parent_reference,
|
|
1393
|
+
metadata_profile: governance.metadata_profile,
|
|
1394
|
+
metadata_required_fields: normalizeValidationMetadataRequiredFields(settings.validation?.metadata_required_fields),
|
|
1395
|
+
lifecycle_stale_blocker_reason_patterns: normalizeValidationPatternList(settings.validation?.lifecycle_stale_blocker_reason_patterns ?? defaults.validation.lifecycle_stale_blocker_reason_patterns),
|
|
1396
|
+
lifecycle_closure_like_blocked_reason_patterns: normalizeValidationPatternList(settings.validation?.lifecycle_closure_like_blocked_reason_patterns ?? defaults.validation.lifecycle_closure_like_blocked_reason_patterns),
|
|
1397
|
+
lifecycle_closure_like_resolution_patterns: normalizeValidationPatternList(settings.validation?.lifecycle_closure_like_resolution_patterns ?? defaults.validation.lifecycle_closure_like_resolution_patterns),
|
|
1398
|
+
lifecycle_closure_like_actual_result_patterns: normalizeValidationPatternList(settings.validation?.lifecycle_closure_like_actual_result_patterns ?? defaults.validation.lifecycle_closure_like_actual_result_patterns),
|
|
1399
|
+
estimate_defaults_by_type: normalizeEstimateDefaultOverrides(settings.validation?.estimate_defaults_by_type)
|
|
1400
|
+
};
|
|
1401
|
+
}
|
|
1402
|
+
function buildTelemetrySettings(settings, defaults) {
|
|
1403
|
+
return {
|
|
1404
|
+
enabled: settings.telemetry?.enabled ?? defaults.telemetry.enabled,
|
|
1405
|
+
first_run_prompt_completed: settings.telemetry?.first_run_prompt_completed ?? defaults.telemetry.first_run_prompt_completed,
|
|
1406
|
+
capture_level: settings.telemetry?.capture_level ?? defaults.telemetry.capture_level,
|
|
1407
|
+
endpoint: settings.telemetry?.endpoint ?? defaults.telemetry.endpoint,
|
|
1408
|
+
installation_id: settings.telemetry?.installation_id ?? defaults.telemetry.installation_id,
|
|
1409
|
+
retention_days: settings.telemetry?.retention_days ?? defaults.telemetry.retention_days
|
|
1410
|
+
};
|
|
1411
|
+
}
|
|
1412
|
+
function buildSearchSettings(settings, defaults) {
|
|
1413
|
+
return {
|
|
1414
|
+
...defaults.search,
|
|
1415
|
+
...settings.search,
|
|
1416
|
+
mutation_refresh_policy: normalizeSearchMutationRefreshPolicy(settings.search?.mutation_refresh_policy),
|
|
1417
|
+
query_expansion: {
|
|
1418
|
+
...defaults.search.query_expansion,
|
|
1419
|
+
...settings.search?.query_expansion,
|
|
1420
|
+
enabled: normalizeSearchQueryExpansionEnabled(settings.search?.query_expansion?.enabled),
|
|
1421
|
+
provider: normalizeSearchQueryExpansionProvider(settings.search?.query_expansion?.provider)
|
|
1422
|
+
},
|
|
1423
|
+
rerank: {
|
|
1424
|
+
...defaults.search.rerank,
|
|
1425
|
+
...settings.search?.rerank,
|
|
1426
|
+
enabled: normalizeSearchRerankEnabled(settings.search?.rerank?.enabled),
|
|
1427
|
+
model: normalizeSearchRerankModel(settings.search?.rerank?.model),
|
|
1428
|
+
top_k: normalizeSearchRerankTopK(settings.search?.rerank?.top_k)
|
|
1429
|
+
}
|
|
1430
|
+
};
|
|
1431
|
+
}
|
|
1432
|
+
function buildVectorStoreSettings(settings, defaults) {
|
|
1433
|
+
return {
|
|
1434
|
+
adapter: settings.vector_store.adapter ?? defaults.vector_store.adapter,
|
|
1435
|
+
collection_name: normalizeVectorStoreCollectionName(settings.vector_store.collection_name),
|
|
1436
|
+
qdrant: { ...defaults.vector_store.qdrant, ...settings.vector_store.qdrant },
|
|
1437
|
+
lancedb: { ...defaults.vector_store.lancedb, ...settings.vector_store.lancedb }
|
|
1438
|
+
};
|
|
1439
|
+
}
|
|
1440
|
+
function normalizeSettingsItemFormat(settings, defaults) {
|
|
1441
|
+
if (settings.item_format === "json_markdown") {
|
|
1442
|
+
return "toon";
|
|
1443
|
+
}
|
|
1444
|
+
return settings.item_format ?? defaults.item_format;
|
|
1445
|
+
}
|
|
1446
|
+
function buildContextSettings(settings, defaults) {
|
|
1447
|
+
return {
|
|
1448
|
+
default_depth: settings.context?.default_depth ?? defaults.context.default_depth,
|
|
1449
|
+
activity_limit: settings.context?.activity_limit ?? defaults.context.activity_limit,
|
|
1450
|
+
stale_threshold_days: settings.context?.stale_threshold_days ?? defaults.context.stale_threshold_days,
|
|
1451
|
+
sections: {
|
|
1452
|
+
...defaults.context.sections,
|
|
1453
|
+
...settings.context?.sections
|
|
1454
|
+
}
|
|
1455
|
+
};
|
|
1456
|
+
}
|
|
1457
|
+
function buildProviderSettings(settings, defaults) {
|
|
1458
|
+
return {
|
|
1459
|
+
openai: { ...defaults.providers.openai, ...settings.providers.openai },
|
|
1460
|
+
ollama: { ...defaults.providers.ollama, ...settings.providers.ollama }
|
|
1461
|
+
};
|
|
1462
|
+
}
|
|
1463
|
+
function normalizeItemTypeDefinitions(definitions) {
|
|
1464
|
+
const normalized = (definitions ?? []).map((definition) => normalizeItemTypeDefinition(definition)).filter((definition) => definition !== null);
|
|
1465
|
+
const dedupedByName = /* @__PURE__ */ new Map();
|
|
1466
|
+
for (const definition of normalized) {
|
|
1467
|
+
dedupedByName.set(definition.name.toLowerCase(), definition);
|
|
1468
|
+
}
|
|
1469
|
+
return [...dedupedByName.values()].sort((left, right) => left.name.localeCompare(right.name));
|
|
1470
|
+
}
|
|
1471
|
+
function mergeSettings(settings) {
|
|
1472
|
+
const defaults = cloneDefaults();
|
|
1473
|
+
const governance = resolveGovernanceKnobs({
|
|
1474
|
+
governance: settings.governance ?? { preset: "default" }
|
|
1475
|
+
});
|
|
1476
|
+
return {
|
|
1477
|
+
...defaults,
|
|
1478
|
+
...settings,
|
|
1479
|
+
item_format: normalizeSettingsItemFormat(settings, defaults),
|
|
1480
|
+
locks: { ...defaults.locks, ...settings.locks },
|
|
1481
|
+
checkpoints: { ...defaults.checkpoints, ...settings.checkpoints },
|
|
1482
|
+
output: { ...defaults.output, ...settings.output },
|
|
1483
|
+
history: {
|
|
1484
|
+
...defaults.history,
|
|
1485
|
+
...settings.history,
|
|
1486
|
+
compact_policy: {
|
|
1487
|
+
...defaults.history.compact_policy,
|
|
1488
|
+
...settings.history?.compact_policy
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
validation: buildValidationSettings(settings, defaults, governance),
|
|
1492
|
+
governance,
|
|
1493
|
+
workflow: {
|
|
1494
|
+
definition_of_done: [...settings.workflow?.definition_of_done ?? defaults.workflow.definition_of_done]
|
|
1495
|
+
},
|
|
1496
|
+
testing: {
|
|
1497
|
+
record_results_to_items: settings.testing?.record_results_to_items ?? defaults.testing.record_results_to_items
|
|
1498
|
+
},
|
|
1499
|
+
telemetry: buildTelemetrySettings(settings, defaults),
|
|
1500
|
+
agent_guidance: normalizeAgentGuidanceSettings(settings.agent_guidance ?? defaults.agent_guidance),
|
|
1501
|
+
item_types: {
|
|
1502
|
+
definitions: normalizeItemTypeDefinitions(settings.item_types?.definitions)
|
|
1503
|
+
},
|
|
1504
|
+
schema: normalizeRuntimeSchemaSettings(settings.schema ?? defaults.schema),
|
|
1505
|
+
context: buildContextSettings(settings, defaults),
|
|
1506
|
+
extensions: {
|
|
1507
|
+
enabled: [...settings.extensions.enabled],
|
|
1508
|
+
disabled: [...settings.extensions.disabled],
|
|
1509
|
+
policy: normalizeExtensionPolicySettings(settings.extensions.policy ?? defaults.extensions.policy)
|
|
1510
|
+
},
|
|
1511
|
+
search: buildSearchSettings(settings, defaults),
|
|
1512
|
+
providers: buildProviderSettings(settings, defaults),
|
|
1513
|
+
vector_store: buildVectorStoreSettings(settings, defaults)
|
|
1514
|
+
};
|
|
1515
|
+
}
|
|
1516
|
+
function orderSerializedSettingsSections(ordered) {
|
|
1517
|
+
ordered.locks = orderObject(ordered.locks, ["ttl_seconds", "wait_ms"]);
|
|
1518
|
+
ordered.checkpoints = orderObject(ordered.checkpoints, ["retention_days"]);
|
|
1519
|
+
ordered.output = orderObject(ordered.output, ["default_format"]);
|
|
1520
|
+
ordered.history = orderObject(ordered.history, ["missing_stream", "compact_policy"]);
|
|
1521
|
+
ordered.validation = orderObject(ordered.validation, [
|
|
1522
|
+
"sprint_release_format",
|
|
1523
|
+
"parent_reference",
|
|
1524
|
+
"metadata_profile",
|
|
1525
|
+
"metadata_required_fields",
|
|
1526
|
+
"lifecycle_stale_blocker_reason_patterns",
|
|
1527
|
+
"lifecycle_closure_like_blocked_reason_patterns",
|
|
1528
|
+
"lifecycle_closure_like_resolution_patterns",
|
|
1529
|
+
"lifecycle_closure_like_actual_result_patterns",
|
|
1530
|
+
"estimate_defaults_by_type"
|
|
1531
|
+
]);
|
|
1532
|
+
ordered.governance = orderObject(ordered.governance, [
|
|
1533
|
+
"preset",
|
|
1534
|
+
"ownership_enforcement",
|
|
1535
|
+
"create_mode_default",
|
|
1536
|
+
"close_validation_default",
|
|
1537
|
+
"require_close_reason",
|
|
1538
|
+
"parent_reference",
|
|
1539
|
+
"metadata_profile",
|
|
1540
|
+
"force_required_for_stale_lock",
|
|
1541
|
+
"create_default_type",
|
|
1542
|
+
"workflow_enforcement"
|
|
1543
|
+
]);
|
|
1544
|
+
ordered.workflow = orderObject(ordered.workflow, ["definition_of_done"]);
|
|
1545
|
+
ordered.testing = orderObject(ordered.testing, ["record_results_to_items"]);
|
|
1546
|
+
ordered.telemetry = orderObject(ordered.telemetry, [
|
|
1547
|
+
"enabled",
|
|
1548
|
+
"first_run_prompt_completed",
|
|
1549
|
+
"capture_level",
|
|
1550
|
+
"endpoint",
|
|
1551
|
+
"installation_id",
|
|
1552
|
+
"retention_days"
|
|
1553
|
+
]);
|
|
1554
|
+
ordered.agent_guidance = orderObject(ordered.agent_guidance, [
|
|
1555
|
+
"prompt_completed",
|
|
1556
|
+
"declined",
|
|
1557
|
+
"declined_at",
|
|
1558
|
+
"template_version",
|
|
1559
|
+
"last_checked_files"
|
|
1560
|
+
]);
|
|
1561
|
+
ordered.item_types = orderObject(ordered.item_types, ["definitions"]);
|
|
1562
|
+
ordered.schema = orderObject(ordered.schema, [
|
|
1563
|
+
"version",
|
|
1564
|
+
"files",
|
|
1565
|
+
"statuses",
|
|
1566
|
+
"fields",
|
|
1567
|
+
"workflow",
|
|
1568
|
+
"type_workflows",
|
|
1569
|
+
"unknown_field_policy"
|
|
1570
|
+
]);
|
|
1571
|
+
ordered.schema.files = orderObject(recordOrEmpty(ordered.schema.files), ["types", "statuses", "fields", "workflows"]);
|
|
1572
|
+
ordered.schema.workflow = orderObject(recordOrEmpty(ordered.schema.workflow), ["draft_status", "open_status", "in_progress_status", "blocked_status", "close_status", "canceled_status"]);
|
|
1573
|
+
ordered.context = orderObject(ordered.context, [
|
|
1574
|
+
"default_depth",
|
|
1575
|
+
"activity_limit",
|
|
1576
|
+
"stale_threshold_days",
|
|
1577
|
+
"sections"
|
|
1578
|
+
]);
|
|
1579
|
+
ordered.context.sections = orderObject(recordOrEmpty(ordered.context.sections), ["hierarchy", "activity", "progress", "blockers", "files", "workload", "staleness", "tests"]);
|
|
1580
|
+
ordered.extensions = orderObject(ordered.extensions, ["enabled", "disabled", "policy"]);
|
|
1581
|
+
ordered.extensions.policy = orderObject(recordOrEmpty(ordered.extensions.policy), [
|
|
1582
|
+
"mode",
|
|
1583
|
+
"trust_mode",
|
|
1584
|
+
"pm_max_version_exceeded_mode",
|
|
1585
|
+
"require_provenance",
|
|
1586
|
+
"trusted_extensions",
|
|
1587
|
+
"default_sandbox_profile",
|
|
1588
|
+
"allowed_extensions",
|
|
1589
|
+
"blocked_extensions",
|
|
1590
|
+
"allowed_capabilities",
|
|
1591
|
+
"blocked_capabilities",
|
|
1592
|
+
"allowed_surfaces",
|
|
1593
|
+
"blocked_surfaces",
|
|
1594
|
+
"allowed_commands",
|
|
1595
|
+
"blocked_commands",
|
|
1596
|
+
"allowed_actions",
|
|
1597
|
+
"blocked_actions",
|
|
1598
|
+
"allowed_services",
|
|
1599
|
+
"blocked_services",
|
|
1600
|
+
"extension_overrides"
|
|
1601
|
+
]);
|
|
1602
|
+
ordered.extensions.policy.extension_overrides = arrayOrEmpty(ordered.extensions.policy.extension_overrides).map((entry) => orderObject(recordOrEmpty(entry), [
|
|
1603
|
+
"name",
|
|
1604
|
+
"disabled",
|
|
1605
|
+
"require_trusted",
|
|
1606
|
+
"require_provenance",
|
|
1607
|
+
"sandbox_profile",
|
|
1608
|
+
"allowed_capabilities",
|
|
1609
|
+
"blocked_capabilities",
|
|
1610
|
+
"allowed_surfaces",
|
|
1611
|
+
"blocked_surfaces",
|
|
1612
|
+
"allowed_commands",
|
|
1613
|
+
"blocked_commands",
|
|
1614
|
+
"allowed_actions",
|
|
1615
|
+
"blocked_actions",
|
|
1616
|
+
"allowed_services",
|
|
1617
|
+
"blocked_services"
|
|
1618
|
+
]));
|
|
1619
|
+
ordered.search = orderObject(ordered.search, [
|
|
1620
|
+
"score_threshold",
|
|
1621
|
+
"hybrid_semantic_weight",
|
|
1622
|
+
"max_results",
|
|
1623
|
+
"embedding_model",
|
|
1624
|
+
"embedding_corpus_max_characters",
|
|
1625
|
+
"embedding_batch_size",
|
|
1626
|
+
"embedding_timeout_ms",
|
|
1627
|
+
"scanner_max_batch_retries",
|
|
1628
|
+
"provider",
|
|
1629
|
+
"mutation_refresh_policy",
|
|
1630
|
+
"query_expansion",
|
|
1631
|
+
"rerank"
|
|
1632
|
+
]);
|
|
1633
|
+
ordered.search.query_expansion = orderObject(recordOrEmpty(ordered.search.query_expansion), ["enabled", "provider"]);
|
|
1634
|
+
ordered.search.rerank = orderObject(recordOrEmpty(ordered.search.rerank), ["enabled", "model", "top_k"]);
|
|
1635
|
+
ordered.providers = orderObject(ordered.providers, ["openai", "ollama"]);
|
|
1636
|
+
ordered.providers.openai = orderObject(recordOrEmpty(ordered.providers.openai), ["base_url", "api_key", "model"]);
|
|
1637
|
+
ordered.providers.ollama = orderObject(recordOrEmpty(ordered.providers.ollama), ["base_url", "model"]);
|
|
1638
|
+
ordered.vector_store = orderObject(ordered.vector_store, [
|
|
1639
|
+
"adapter",
|
|
1640
|
+
"collection_name",
|
|
1641
|
+
"qdrant",
|
|
1642
|
+
"lancedb"
|
|
1643
|
+
]);
|
|
1644
|
+
ordered.vector_store.qdrant = orderObject(recordOrEmpty(ordered.vector_store.qdrant), ["url", "api_key"]);
|
|
1645
|
+
ordered.vector_store.lancedb = orderObject(recordOrEmpty(ordered.vector_store.lancedb), ["path"]);
|
|
1646
|
+
}
|
|
1647
|
+
function buildSerializeBaseSettings(settings) {
|
|
1648
|
+
return {
|
|
1649
|
+
...settings,
|
|
1650
|
+
locks: valueOrDefault(settings.locks, SETTINGS_DEFAULTS.locks),
|
|
1651
|
+
checkpoints: valueOrDefault(settings.checkpoints, SETTINGS_DEFAULTS.checkpoints),
|
|
1652
|
+
output: valueOrDefault(settings.output, SETTINGS_DEFAULTS.output),
|
|
1653
|
+
history: valueOrDefault(settings.history, SETTINGS_DEFAULTS.history),
|
|
1654
|
+
validation: valueOrDefault(settings.validation, SETTINGS_DEFAULTS.validation),
|
|
1655
|
+
workflow: valueOrDefault(settings.workflow, SETTINGS_DEFAULTS.workflow),
|
|
1656
|
+
testing: valueOrDefault(settings.testing, SETTINGS_DEFAULTS.testing),
|
|
1657
|
+
telemetry: valueOrDefault(settings.telemetry, SETTINGS_DEFAULTS.telemetry),
|
|
1658
|
+
agent_guidance: valueOrDefault(settings.agent_guidance, SETTINGS_DEFAULTS.agent_guidance),
|
|
1659
|
+
item_types: valueOrDefault(settings.item_types, SETTINGS_DEFAULTS.item_types),
|
|
1660
|
+
schema: valueOrDefault(settings.schema, SETTINGS_DEFAULTS.schema),
|
|
1661
|
+
context: valueOrDefault(settings.context, SETTINGS_DEFAULTS.context),
|
|
1662
|
+
extensions: valueOrDefault(settings.extensions, SETTINGS_DEFAULTS.extensions),
|
|
1663
|
+
search: valueOrDefault(settings.search, SETTINGS_DEFAULTS.search),
|
|
1664
|
+
providers: valueOrDefault(settings.providers, SETTINGS_DEFAULTS.providers),
|
|
1665
|
+
vector_store: valueOrDefault(settings.vector_store, SETTINGS_DEFAULTS.vector_store)
|
|
1666
|
+
};
|
|
1667
|
+
}
|
|
1668
|
+
function buildSerializedValidationSettings(baseSettings, governance) {
|
|
1669
|
+
return {
|
|
1670
|
+
...baseSettings.validation,
|
|
1671
|
+
parent_reference: governance.parent_reference,
|
|
1672
|
+
metadata_profile: governance.metadata_profile,
|
|
1673
|
+
metadata_required_fields: normalizeValidationMetadataRequiredFields(baseSettings.validation?.metadata_required_fields),
|
|
1674
|
+
lifecycle_stale_blocker_reason_patterns: normalizeValidationPatternList(baseSettings.validation?.lifecycle_stale_blocker_reason_patterns ?? SETTINGS_DEFAULTS.validation.lifecycle_stale_blocker_reason_patterns),
|
|
1675
|
+
lifecycle_closure_like_blocked_reason_patterns: normalizeValidationPatternList(baseSettings.validation?.lifecycle_closure_like_blocked_reason_patterns ?? SETTINGS_DEFAULTS.validation.lifecycle_closure_like_blocked_reason_patterns),
|
|
1676
|
+
lifecycle_closure_like_resolution_patterns: normalizeValidationPatternList(baseSettings.validation?.lifecycle_closure_like_resolution_patterns ?? SETTINGS_DEFAULTS.validation.lifecycle_closure_like_resolution_patterns),
|
|
1677
|
+
lifecycle_closure_like_actual_result_patterns: normalizeValidationPatternList(baseSettings.validation?.lifecycle_closure_like_actual_result_patterns ?? SETTINGS_DEFAULTS.validation.lifecycle_closure_like_actual_result_patterns),
|
|
1678
|
+
estimate_defaults_by_type: normalizeEstimateDefaultOverrides(baseSettings.validation?.estimate_defaults_by_type)
|
|
1679
|
+
};
|
|
1680
|
+
}
|
|
1681
|
+
function buildSerializedSearchSettings(baseSettings) {
|
|
1682
|
+
return {
|
|
1683
|
+
...SETTINGS_DEFAULTS.search,
|
|
1684
|
+
...baseSettings.search,
|
|
1685
|
+
mutation_refresh_policy: normalizeSearchMutationRefreshPolicy(baseSettings.search?.mutation_refresh_policy),
|
|
1686
|
+
query_expansion: {
|
|
1687
|
+
...SETTINGS_DEFAULTS.search.query_expansion,
|
|
1688
|
+
...baseSettings.search?.query_expansion,
|
|
1689
|
+
enabled: normalizeSearchQueryExpansionEnabled(baseSettings.search?.query_expansion?.enabled),
|
|
1690
|
+
provider: normalizeSearchQueryExpansionProvider(baseSettings.search?.query_expansion?.provider)
|
|
1691
|
+
},
|
|
1692
|
+
rerank: {
|
|
1693
|
+
...SETTINGS_DEFAULTS.search.rerank,
|
|
1694
|
+
...baseSettings.search?.rerank,
|
|
1695
|
+
enabled: normalizeSearchRerankEnabled(baseSettings.search?.rerank?.enabled),
|
|
1696
|
+
model: normalizeSearchRerankModel(baseSettings.search?.rerank?.model),
|
|
1697
|
+
top_k: normalizeSearchRerankTopK(baseSettings.search?.rerank?.top_k)
|
|
1698
|
+
}
|
|
1699
|
+
};
|
|
1700
|
+
}
|
|
1701
|
+
function buildSerializedContextSettings(baseSettings) {
|
|
1702
|
+
return {
|
|
1703
|
+
default_depth: baseSettings.context?.default_depth ?? SETTINGS_DEFAULTS.context.default_depth,
|
|
1704
|
+
activity_limit: baseSettings.context?.activity_limit ?? SETTINGS_DEFAULTS.context.activity_limit,
|
|
1705
|
+
stale_threshold_days: baseSettings.context?.stale_threshold_days ?? SETTINGS_DEFAULTS.context.stale_threshold_days,
|
|
1706
|
+
sections: {
|
|
1707
|
+
...SETTINGS_DEFAULTS.context.sections,
|
|
1708
|
+
...baseSettings.context?.sections
|
|
1709
|
+
}
|
|
1710
|
+
};
|
|
1711
|
+
}
|
|
1712
|
+
function buildSerializedVectorStoreSettings(baseSettings) {
|
|
1713
|
+
return {
|
|
1714
|
+
...baseSettings.vector_store,
|
|
1715
|
+
adapter: baseSettings.vector_store?.adapter ?? SETTINGS_DEFAULTS.vector_store.adapter,
|
|
1716
|
+
collection_name: normalizeVectorStoreCollectionName(baseSettings.vector_store?.collection_name),
|
|
1717
|
+
qdrant: { ...baseSettings.vector_store?.qdrant },
|
|
1718
|
+
lancedb: { ...baseSettings.vector_store?.lancedb }
|
|
1719
|
+
};
|
|
1720
|
+
}
|
|
1721
|
+
function buildNormalizedSettingsForSerialization(baseSettings, governance, normalizedSchema, persistedFileBackedSections) {
|
|
1722
|
+
return {
|
|
1723
|
+
...baseSettings,
|
|
1724
|
+
item_format: "toon",
|
|
1725
|
+
validation: buildSerializedValidationSettings(baseSettings, governance),
|
|
1726
|
+
governance,
|
|
1727
|
+
agent_guidance: normalizeAgentGuidanceSettings(baseSettings.agent_guidance),
|
|
1728
|
+
item_types: {
|
|
1729
|
+
definitions: persistedFileBackedSections.item_type_definitions
|
|
1730
|
+
},
|
|
1731
|
+
schema: {
|
|
1732
|
+
...normalizedSchema,
|
|
1733
|
+
statuses: persistedFileBackedSections.schema_statuses,
|
|
1734
|
+
fields: persistedFileBackedSections.schema_fields,
|
|
1735
|
+
type_workflows: persistedFileBackedSections.schema_type_workflows
|
|
1736
|
+
},
|
|
1737
|
+
search: buildSerializedSearchSettings(baseSettings),
|
|
1738
|
+
context: buildSerializedContextSettings(baseSettings),
|
|
1739
|
+
extensions: {
|
|
1740
|
+
enabled: normalizeStringList(baseSettings.extensions?.enabled),
|
|
1741
|
+
disabled: normalizeStringList(baseSettings.extensions?.disabled),
|
|
1742
|
+
policy: normalizeExtensionPolicySettings(baseSettings.extensions?.policy)
|
|
1743
|
+
},
|
|
1744
|
+
vector_store: buildSerializedVectorStoreSettings(baseSettings)
|
|
1745
|
+
};
|
|
1746
|
+
}
|
|
1747
|
+
function serializeSettings(settings, options = {}) {
|
|
1748
|
+
const baseSettings = buildSerializeBaseSettings(settings);
|
|
1749
|
+
const governance = resolveGovernanceKnobs(baseSettings);
|
|
1750
|
+
const normalizedSchema = normalizeRuntimeSchemaSettings(baseSettings.schema);
|
|
1751
|
+
const persistedFileBackedSections = resolvePersistedFileBackedSchemaSections(baseSettings, options.persist_source);
|
|
1752
|
+
const normalizedSettings = buildNormalizedSettingsForSerialization(baseSettings, governance, normalizedSchema, persistedFileBackedSections);
|
|
1753
|
+
const ordered = orderObject({
|
|
1754
|
+
...normalizedSettings,
|
|
1755
|
+
governance: normalizeGovernanceForPersist(governance)
|
|
1756
|
+
}, [
|
|
1757
|
+
"version",
|
|
1758
|
+
"id_prefix",
|
|
1759
|
+
"author_default",
|
|
1760
|
+
"item_format",
|
|
1761
|
+
"locks",
|
|
1762
|
+
"checkpoints",
|
|
1763
|
+
"output",
|
|
1764
|
+
"history",
|
|
1765
|
+
"validation",
|
|
1766
|
+
"governance",
|
|
1767
|
+
"workflow",
|
|
1768
|
+
"testing",
|
|
1769
|
+
"telemetry",
|
|
1770
|
+
"agent_guidance",
|
|
1771
|
+
"item_types",
|
|
1772
|
+
"schema",
|
|
1773
|
+
"context",
|
|
1774
|
+
"extensions",
|
|
1775
|
+
"search",
|
|
1776
|
+
"providers",
|
|
1777
|
+
"vector_store"
|
|
1778
|
+
]);
|
|
1779
|
+
orderSerializedSettingsSections(ordered);
|
|
1780
|
+
return `${JSON.stringify(ordered, null, 2)}
|
|
1781
|
+
`;
|
|
1782
|
+
}
|
|
1783
|
+
async function readSettingsWithMetadata(pmRoot) {
|
|
1784
|
+
const settingsPath = getSettingsPath(pmRoot);
|
|
1785
|
+
let trackedPathsForFailure = [settingsPath];
|
|
1786
|
+
await runActiveOnReadHooks({
|
|
1787
|
+
path: settingsPath,
|
|
1788
|
+
scope: "project"
|
|
1789
|
+
});
|
|
1790
|
+
const cachedResult = getSettingsReadCacheEntry(pmRoot);
|
|
1791
|
+
if (cachedResult) {
|
|
1792
|
+
const currentSignatures = await collectSettingsReadCacheSignatures(cachedResult.tracked_paths);
|
|
1793
|
+
if (settingsReadCacheSignaturesEqual(currentSignatures, cachedResult.signatures)) {
|
|
1794
|
+
return cloneSettingsReadResult(cachedResult.value);
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
const settingsOnlySignatures = await collectSettingsReadCacheSignatures([settingsPath]);
|
|
1798
|
+
const raw = await readFileIfExists(settingsPath);
|
|
1799
|
+
if (raw === null) {
|
|
1800
|
+
const fallback = buildFallbackSettingsReadResult();
|
|
1801
|
+
await cacheSettingsReadResultIfStable(pmRoot, [settingsPath], fallback, settingsOnlySignatures, [settingsPath]);
|
|
1802
|
+
return fallback;
|
|
1803
|
+
}
|
|
1804
|
+
const settingsSignaturesAfterRead = await collectSettingsReadCacheSignatures([settingsPath]);
|
|
1805
|
+
if (!settingsReadCacheSignaturesEqual(settingsOnlySignatures, settingsSignaturesAfterRead)) {
|
|
1806
|
+
clearSettingsReadCache(pmRoot);
|
|
1807
|
+
return readSettingsWithMetadata(pmRoot);
|
|
1808
|
+
}
|
|
1809
|
+
let parsed;
|
|
1810
|
+
try {
|
|
1811
|
+
parsed = JSON.parse(raw);
|
|
1812
|
+
} catch {
|
|
1813
|
+
const fallback = buildFallbackSettingsReadResult("settings_read_invalid_json");
|
|
1814
|
+
await cacheSettingsReadResultIfStable(pmRoot, [settingsPath], fallback, settingsSignaturesAfterRead, [settingsPath]);
|
|
1815
|
+
return fallback;
|
|
1816
|
+
}
|
|
1817
|
+
const validated = validateSettings(parsed);
|
|
1818
|
+
if (!validated.success) {
|
|
1819
|
+
const fallback = buildFallbackSettingsReadResult("settings_read_invalid_schema");
|
|
1820
|
+
await cacheSettingsReadResultIfStable(pmRoot, [settingsPath], fallback, settingsSignaturesAfterRead, [settingsPath]);
|
|
1821
|
+
return fallback;
|
|
1822
|
+
}
|
|
1823
|
+
try {
|
|
1824
|
+
const mergedSettings = mergeSettings(validated.data);
|
|
1825
|
+
const trackedPaths = resolveSettingsReadTrackedPaths(pmRoot, mergedSettings.schema, settingsPath);
|
|
1826
|
+
trackedPathsForFailure = trackedPaths;
|
|
1827
|
+
const signaturesBeforeSchemaLoad = await collectSettingsReadCacheSignatures(trackedPaths);
|
|
1828
|
+
const schemaScaffold = await ensureRuntimeSchemaFileScaffold(pmRoot, mergedSettings.schema);
|
|
1829
|
+
const loadedSchemaSections = await loadRuntimeSchemaFromOptionalFiles(pmRoot, mergedSettings.schema);
|
|
1830
|
+
const signaturesAfterSchemaLoad = await collectSettingsReadCacheSignatures(trackedPaths);
|
|
1831
|
+
const settings = {
|
|
1832
|
+
...mergedSettings,
|
|
1833
|
+
item_types: {
|
|
1834
|
+
definitions: normalizeItemTypeDefinitions([
|
|
1835
|
+
...mergedSettings.item_types.definitions,
|
|
1836
|
+
...arrayOrEmpty(loadedSchemaSections.type_definitions_from_file)
|
|
1837
|
+
])
|
|
1838
|
+
},
|
|
1839
|
+
schema: loadedSchemaSections.schema
|
|
1840
|
+
};
|
|
1841
|
+
attachSettingsPersistSourceSnapshot(settings, buildSettingsPersistSourceSnapshot(validated.data, settings));
|
|
1842
|
+
const result = {
|
|
1843
|
+
settings,
|
|
1844
|
+
metadata: {
|
|
1845
|
+
has_explicit_item_format: hasExplicitItemFormat(parsed)
|
|
1846
|
+
},
|
|
1847
|
+
warnings: [
|
|
1848
|
+
...validated.data.item_format === "json_markdown" ? ["settings_item_format_legacy_json_markdown_coerced_to_toon"] : [],
|
|
1849
|
+
...schemaScaffold.created_paths.map((createdPath) => `runtime_schema_bootstrap_created:${createdPath}`),
|
|
1850
|
+
...loadedSchemaSections.warnings
|
|
1851
|
+
]
|
|
1852
|
+
};
|
|
1853
|
+
if (schemaScaffold.created_paths.length === 0) {
|
|
1854
|
+
if (!settingsReadCacheSignaturesEqual(signaturesBeforeSchemaLoad, signaturesAfterSchemaLoad)) {
|
|
1855
|
+
clearSettingsReadCache(pmRoot);
|
|
1856
|
+
} else {
|
|
1857
|
+
setSettingsReadCacheEntry(pmRoot, {
|
|
1858
|
+
tracked_paths: trackedPaths,
|
|
1859
|
+
signatures: signaturesAfterSchemaLoad,
|
|
1860
|
+
value: cloneSettingsReadResult(result)
|
|
1861
|
+
});
|
|
1862
|
+
}
|
|
1863
|
+
} else {
|
|
1864
|
+
clearSettingsReadCache(pmRoot);
|
|
1865
|
+
}
|
|
1866
|
+
return result;
|
|
1867
|
+
} catch {
|
|
1868
|
+
const fallback = buildFallbackSettingsReadResult("settings_read_merge_failed");
|
|
1869
|
+
await cacheSettingsReadResultSafe(pmRoot, trackedPathsForFailure, fallback);
|
|
1870
|
+
return fallback;
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
async function readSettings(pmRoot) {
|
|
1874
|
+
return (await readSettingsWithMetadata(pmRoot)).settings;
|
|
1875
|
+
}
|
|
1876
|
+
async function writeSettings(pmRoot, settings, op = SETTINGS_WRITE_OP) {
|
|
1877
|
+
const settingsPath = getSettingsPath(pmRoot);
|
|
1878
|
+
await writeFileAtomic(settingsPath, serializeSettings(settings, {
|
|
1879
|
+
persist_source: getSettingsPersistSourceSnapshot(settings)
|
|
1880
|
+
}));
|
|
1881
|
+
try {
|
|
1882
|
+
await runActiveOnWriteHooks({
|
|
1883
|
+
path: settingsPath,
|
|
1884
|
+
scope: "project",
|
|
1885
|
+
op
|
|
1886
|
+
});
|
|
1887
|
+
} finally {
|
|
1888
|
+
clearSettingsReadCache(pmRoot);
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
export {
|
|
1893
|
+
setActiveExtensionHooks,
|
|
1894
|
+
setActiveExtensionCommands,
|
|
1895
|
+
setActiveExtensionParsers,
|
|
1896
|
+
setActiveExtensionPreflight,
|
|
1897
|
+
setActiveExtensionServices,
|
|
1898
|
+
setActiveExtensionRenderers,
|
|
1899
|
+
setActiveExtensionRegistrations,
|
|
1900
|
+
getActiveExtensionRegistrations,
|
|
1901
|
+
setActiveCommandContext,
|
|
1902
|
+
setActiveCommandResult,
|
|
1903
|
+
getActiveCommandResult,
|
|
1904
|
+
recordAfterCommandAffectedItem,
|
|
1905
|
+
projectAfterCommandItemSnapshot,
|
|
1906
|
+
consumeAfterCommandAffectedItems,
|
|
1907
|
+
clearActiveExtensionHooks,
|
|
1908
|
+
runActiveOnWriteHooks,
|
|
1909
|
+
runActiveOnReadHooks,
|
|
1910
|
+
hasActiveOnReadHooks,
|
|
1911
|
+
runActiveOnIndexHooks,
|
|
1912
|
+
runActiveCommandOverride,
|
|
1913
|
+
runActiveCommandHandler,
|
|
1914
|
+
runActiveParserOverride,
|
|
1915
|
+
runActivePreflightOverride,
|
|
1916
|
+
runActiveRendererOverride,
|
|
1917
|
+
runActiveServiceOverride,
|
|
1918
|
+
runActiveServiceOverrideSync,
|
|
1919
|
+
PmCliError,
|
|
1920
|
+
stableStringify,
|
|
1921
|
+
stableValueEquals,
|
|
1922
|
+
sha256Hex,
|
|
1923
|
+
orderObject,
|
|
1924
|
+
resolveEstimateDefaultMinutes,
|
|
1925
|
+
resolveGovernanceKnobs,
|
|
1926
|
+
readSettingsWithMetadata,
|
|
1927
|
+
readSettings,
|
|
1928
|
+
writeSettings
|
|
1929
|
+
};
|
|
1930
|
+
//# sourceMappingURL=chunk-US3T3W5J.js.map
|
|
1931
|
+
|
|
1932
|
+
//# debugId=d4ede2fb-7525-501d-a1f0-77276019f794
|