@unbrained/pm-cli 2026.7.5 → 2026.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist/cli/commands/annotation-command.d.ts +1 -0
- package/dist/cli/commands/annotation-command.js +29 -2
- package/dist/cli/commands/annotation-command.js.map +1 -1
- package/dist/cli/commands/comments.js +3 -4
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.d.ts +3 -0
- package/dist/cli/commands/extension/bundled-catalog.js +38 -28
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.js +81 -18
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/health.js +9 -5
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/learnings.js +5 -3
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/notes.js +5 -3
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/reindex.js +4 -3
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/search.js +3 -3
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test.d.ts +9 -0
- package/dist/cli/commands/test.js +144 -105
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/extension-command-help.js +10 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/register-list-query.d.ts +1 -1
- package/dist/cli/register-list-query.js +18 -27
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-operations.d.ts +0 -8
- package/dist/cli/register-operations.js +41 -46
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +113 -13
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +5 -1
- package/dist/cli/registration-helpers.js +14 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/append-F7WPGIQL.js +11 -0
- package/dist/cli-bundle/chunks/{contracts-OJEXMKVW.js → append-PVCTBVJG.js} +8 -9
- package/dist/cli-bundle/chunks/{chunk-PPE4YUQM.js → chunk-2APXX4TZ.js} +17 -28
- package/dist/cli-bundle/chunks/chunk-2APXX4TZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{docs-S6UTOTO5.js → chunk-2LEJGRQ7.js} +3 -12
- package/dist/cli-bundle/chunks/{docs-S6UTOTO5.js.map → chunk-2LEJGRQ7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-T3ABIMGW.js → chunk-2TILG6F2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-S5AYOUT5.js → chunk-3G6UMXT3.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-S5AYOUT5.js.map → chunk-3G6UMXT3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-RCT3YJOK.js → chunk-3TYOW6RR.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-3JZNEQBA.js → chunk-3X542TEY.js} +7 -7
- package/dist/cli-bundle/chunks/{history-repair-EVTO6LIH.js → chunk-42LXP4VO.js} +14 -21
- package/dist/cli-bundle/chunks/{history-repair-EVTO6LIH.js.map → chunk-42LXP4VO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5J2XPTAD.js → chunk-43SIHQND.js} +36 -15
- package/dist/cli-bundle/chunks/chunk-43SIHQND.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-repair-4N6SDVHK.js → chunk-43UQN754.js} +12 -19
- package/dist/cli-bundle/chunks/{history-repair-4N6SDVHK.js.map → chunk-43UQN754.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-OWTIRHX4.js → chunk-43YSKY75.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-OWTIRHX4.js.map → chunk-43YSKY75.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-72YXN5JX.js → chunk-4BKDAEDF.js} +6 -13
- package/dist/cli-bundle/chunks/{notes-72YXN5JX.js.map → chunk-4BKDAEDF.js.map} +2 -2
- package/dist/cli-bundle/chunks/{close-many-AP4MWU36.js → chunk-4IQKDKGE.js} +18 -32
- package/dist/cli-bundle/chunks/{close-many-AP4MWU36.js.map → chunk-4IQKDKGE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZCJAA3JK.js → chunk-4MZOKTI2.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-ZCJAA3JK.js.map → chunk-4MZOKTI2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IJ6CO3JV.js → chunk-52NS7JDP.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-IJ6CO3JV.js.map → chunk-52NS7JDP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-T3F4DF23.js → chunk-565WYS5W.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-T3F4DF23.js.map → chunk-565WYS5W.js.map} +1 -1
- package/dist/cli-bundle/chunks/{copy-OTJOWFL6.js → chunk-5FIQ4EX3.js} +13 -19
- package/dist/cli-bundle/chunks/{copy-OTJOWFL6.js.map → chunk-5FIQ4EX3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-V57QD47V.js → chunk-6G6O3OPQ.js} +259 -41
- package/dist/cli-bundle/chunks/chunk-6G6O3OPQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-K3AGVXSF.js → chunk-6LCJRGPD.js} +9 -13
- package/dist/cli-bundle/chunks/{chunk-K3AGVXSF.js.map → chunk-6LCJRGPD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7MDXZAZS.js → chunk-6UQCNWFV.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-7MDXZAZS.js.map → chunk-6UQCNWFV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-LEKT4K7I.js → chunk-6XTSYPPO.js} +1216 -387
- package/dist/cli-bundle/chunks/chunk-6XTSYPPO.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-7ML7JONU.js +5434 -0
- package/dist/cli-bundle/chunks/chunk-7ML7JONU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TSPKZRRW.js → chunk-7PNQA24K.js} +30 -36
- package/dist/cli-bundle/chunks/{chunk-TSPKZRRW.js.map → chunk-7PNQA24K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YOF5VPKM.js → chunk-7VQ3JJN5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BFVHCAOO.js → chunk-7Y5N34HX.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-BFVHCAOO.js.map → chunk-7Y5N34HX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-P5TFTLWW.js → chunk-AGAVEDIE.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-YFIE7YK6.js → chunk-AJUON7E6.js} +3 -3
- package/dist/cli-bundle/chunks/{close-many-OMZIGZB4.js → chunk-ARKHKYYS.js} +16 -30
- package/dist/cli-bundle/chunks/{close-many-OMZIGZB4.js.map → chunk-ARKHKYYS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7EQNAZX2.js → chunk-C5ACVMOI.js} +99 -51
- package/dist/cli-bundle/chunks/chunk-C5ACVMOI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PJ3A56YF.js → chunk-CJQM7O7R.js} +16 -20
- package/dist/cli-bundle/chunks/{chunk-PJ3A56YF.js.map → chunk-CJQM7O7R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-WISPVC2E.js → chunk-D2DCTFTL.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-WISPVC2E.js.map → chunk-D2DCTFTL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-CZGUZ45Q.js → chunk-DDDWVPID.js} +7 -11
- package/dist/cli-bundle/chunks/{append-CZGUZ45Q.js.map → chunk-DDDWVPID.js.map} +1 -1
- package/dist/cli-bundle/chunks/{learnings-2HTPZNGZ.js → chunk-DG6BSXZ7.js} +6 -13
- package/dist/cli-bundle/chunks/{learnings-2HTPZNGZ.js.map → chunk-DG6BSXZ7.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7WYXBPYQ.js → chunk-DR2V5OIV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YQMMMONE.js → chunk-E3LWJUGF.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-YQMMMONE.js.map → chunk-E3LWJUGF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-D3UCE7RW.js → chunk-E3YQFSFE.js} +6 -10
- package/dist/cli-bundle/chunks/{chunk-D3UCE7RW.js.map → chunk-E3YQFSFE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-PDXT6Q55.js → chunk-EDO7VXSO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FDBARR33.js → chunk-EIUBK2LT.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-FDBARR33.js.map → chunk-EIUBK2LT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HBYZDSK5.js → chunk-EMXPI36L.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-HBYZDSK5.js.map → chunk-EMXPI36L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4OFLJHX6.js → chunk-EOUVR7JN.js} +13 -8
- package/dist/cli-bundle/chunks/chunk-EOUVR7JN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FUM6UMY4.js → chunk-EVEPHNXJ.js} +4 -4
- package/dist/cli-bundle/chunks/{deps-L2FPIAD3.js → chunk-F6MT7KKE.js} +6 -10
- package/dist/cli-bundle/chunks/{deps-L2FPIAD3.js.map → chunk-F6MT7KKE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-FGQKEDE4.js → chunk-F6YC2A6X.js} +7 -11
- package/dist/cli-bundle/chunks/{chunk-FGQKEDE4.js.map → chunk-F6YC2A6X.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-FILL6BB2.js +5514 -0
- package/dist/cli-bundle/chunks/chunk-FILL6BB2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RX3HQSYG.js → chunk-FN6SB4HU.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js +5359 -0
- package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JLA7EVYV.js → chunk-GLS6VMWI.js} +37 -16
- package/dist/cli-bundle/chunks/chunk-GLS6VMWI.js.map +1 -0
- package/dist/cli-bundle/chunks/{files-JPU3FNJ7.js → chunk-GPIDUMMN.js} +10 -17
- package/dist/cli-bundle/chunks/{files-JPU3FNJ7.js.map → chunk-GPIDUMMN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-compact-3F6VELO7.js → chunk-GTM5HQL4.js} +15 -21
- package/dist/cli-bundle/chunks/{history-compact-3F6VELO7.js.map → chunk-GTM5HQL4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-DLQ4ZTCU.js → chunk-H2SMKL2N.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-S4APD35C.js → chunk-HHEWQXPD.js} +6 -6
- package/dist/cli-bundle/chunks/chunk-HHEWQXPD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-C3PMDWGX.js → chunk-HX6QXV5P.js} +2 -2
- package/dist/cli-bundle/chunks/{copy-LEE6P6EM.js → chunk-I74FMIWA.js} +11 -17
- package/dist/cli-bundle/chunks/{copy-LEE6P6EM.js.map → chunk-I74FMIWA.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-IDIBF4E2.js +804 -0
- package/dist/cli-bundle/chunks/chunk-IDIBF4E2.js.map +7 -0
- package/dist/cli-bundle/chunks/{comments-SAG5LSKL.js → chunk-II7R6KD4.js} +9 -13
- package/dist/cli-bundle/chunks/{comments-SAG5LSKL.js.map → chunk-II7R6KD4.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-J2VGADNG.js +10320 -0
- package/dist/cli-bundle/chunks/chunk-J2VGADNG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Y76TWC45.js → chunk-J7BOLHAV.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-Y76TWC45.js.map → chunk-J7BOLHAV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-QHZO65XW.js → chunk-KTGJ2CBU.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-QHZO65XW.js.map → chunk-KTGJ2CBU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5VVUKE3U.js → chunk-LCFJ7XAM.js} +32 -2
- package/dist/cli-bundle/chunks/{chunk-5VVUKE3U.js.map → chunk-LCFJ7XAM.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YMABYTNG.js → chunk-LZQU6XJG.js} +28 -34
- package/dist/cli-bundle/chunks/{chunk-YMABYTNG.js.map → chunk-LZQU6XJG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3Y4OESPP.js → chunk-M62RO3XK.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-3Y4OESPP.js.map → chunk-M62RO3XK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YPPVU5GX.js → chunk-MCEUKJKW.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-YPPVU5GX.js.map → chunk-MCEUKJKW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-T5Y3QSNF.js → chunk-MHNMCDWR.js} +1447 -86
- package/dist/cli-bundle/chunks/chunk-MHNMCDWR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HJE4JTKQ.js → chunk-MRFWUSVA.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-HJE4JTKQ.js.map → chunk-MRFWUSVA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-P3VRG72Q.js → chunk-N6ZHDLUY.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-P3VRG72Q.js.map → chunk-N6ZHDLUY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{delete-HQKGRNRZ.js → chunk-NWWL22C7.js} +8 -12
- package/dist/cli-bundle/chunks/{delete-HQKGRNRZ.js.map → chunk-NWWL22C7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-N6DNM2FA.js → chunk-P3MJJW7P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5JE6SMYS.js → chunk-PDXJXEZJ.js} +2 -2
- package/dist/cli-bundle/chunks/{append-NSQBCXZJ.js → chunk-Q64AYQYW.js} +9 -13
- package/dist/cli-bundle/chunks/{append-NSQBCXZJ.js.map → chunk-Q64AYQYW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{update-many-SLLAMHT7.js → chunk-QDABF2RB.js} +26 -47
- package/dist/cli-bundle/chunks/{update-many-SLLAMHT7.js.map → chunk-QDABF2RB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-NBFCNJ7Q.js → chunk-QFBSP3NI.js} +529 -46
- package/dist/cli-bundle/chunks/chunk-QFBSP3NI.js.map +1 -0
- package/dist/cli-bundle/chunks/{focus-LFZ6IDBR.js → chunk-RB3KLPAH.js} +11 -16
- package/dist/cli-bundle/chunks/{focus-LFZ6IDBR.js.map → chunk-RB3KLPAH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YSAH5FY5.js → chunk-RY7PTTUB.js} +94 -53
- package/dist/cli-bundle/chunks/chunk-RY7PTTUB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WVSGSZ6J.js → chunk-S547WBYG.js} +1477 -86
- package/dist/cli-bundle/chunks/chunk-S547WBYG.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-many-DC7X3EWM.js → chunk-S5BNGFN5.js} +24 -45
- package/dist/cli-bundle/chunks/{update-many-DC7X3EWM.js.map → chunk-S5BNGFN5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-WNMYCVYA.js → chunk-S6VC2A2K.js} +9 -14
- package/dist/cli-bundle/chunks/{focus-WNMYCVYA.js.map → chunk-S6VC2A2K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{learnings-YBIHY3D6.js → chunk-SIM5JDON.js} +7 -14
- package/dist/cli-bundle/chunks/{learnings-YBIHY3D6.js.map → chunk-SIM5JDON.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZD34OFFQ.js → chunk-SY75LYXR.js} +12 -7
- package/dist/cli-bundle/chunks/chunk-SY75LYXR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TT42JUMF.js → chunk-TEISGNSH.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-TEISGNSH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AAEQMOC6.js → chunk-TEKZOS7M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4QQ6PM7M.js → chunk-TGUK6XN6.js} +14 -18
- package/dist/cli-bundle/chunks/{chunk-4QQ6PM7M.js.map → chunk-TGUK6XN6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-R4NDQ27E.js → chunk-TNC6MZUD.js} +10 -21
- package/dist/cli-bundle/chunks/{plan-R4NDQ27E.js.map → chunk-TNC6MZUD.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js +10498 -0
- package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YD5FML7K.js → chunk-UO7XAZK6.js} +27 -4
- package/dist/cli-bundle/chunks/chunk-UO7XAZK6.js.map +1 -0
- package/dist/cli-bundle/chunks/{docs-6CRCSVKK.js → chunk-V5ZWKJNY.js} +5 -14
- package/dist/cli-bundle/chunks/{docs-6CRCSVKK.js.map → chunk-V5ZWKJNY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-NJ7IQJX4.js → chunk-VGO73OCK.js} +7 -14
- package/dist/cli-bundle/chunks/{notes-NJ7IQJX4.js.map → chunk-VGO73OCK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-NER3KUUS.js → chunk-VLEA2UTQ.js} +2 -2
- package/dist/cli-bundle/chunks/{files-6P57MRKL.js → chunk-W5HXHC7C.js} +8 -15
- package/dist/cli-bundle/chunks/{files-6P57MRKL.js.map → chunk-W5HXHC7C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZMD35NYG.js → chunk-WCWVEXGA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-X47MKQXU.js +6690 -0
- package/dist/cli-bundle/chunks/chunk-X47MKQXU.js.map +7 -0
- package/dist/cli-bundle/chunks/{delete-62JQTYT4.js → chunk-XBX5CBRQ.js} +6 -10
- package/dist/cli-bundle/chunks/{delete-62JQTYT4.js.map → chunk-XBX5CBRQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MTTXDAK4.js → chunk-XC3X7BQR.js} +541 -44
- package/dist/cli-bundle/chunks/chunk-XC3X7BQR.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-compact-656Y2TN4.js → chunk-XHCVAZGM.js} +17 -23
- package/dist/cli-bundle/chunks/{history-compact-656Y2TN4.js.map → chunk-XHCVAZGM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZAHXPXVY.js → chunk-XPMXPR7K.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-ZAHXPXVY.js.map → chunk-XPMXPR7K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-55FTG6Z5.js → chunk-XS2TMNXR.js} +8 -12
- package/dist/cli-bundle/chunks/{deps-55FTG6Z5.js.map → chunk-XS2TMNXR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-XWY5T67S.js → chunk-XXIYUTLK.js} +12 -23
- package/dist/cli-bundle/chunks/{plan-XWY5T67S.js.map → chunk-XXIYUTLK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7QH7DHUB.js → chunk-XZWL7VNE.js} +1220 -398
- package/dist/cli-bundle/chunks/chunk-XZWL7VNE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js +6624 -0
- package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ABRA3BHY.js → chunk-Y7KYVCZM.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-ABRA3BHY.js.map → chunk-Y7KYVCZM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-UI5BJ6DO.js → chunk-YCVWWIKY.js} +17 -28
- package/dist/cli-bundle/chunks/chunk-YCVWWIKY.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-YH5NBDFA.js +780 -0
- package/dist/cli-bundle/chunks/chunk-YH5NBDFA.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js +5509 -0
- package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js.map +7 -0
- package/dist/cli-bundle/chunks/{comments-MIW5MZOX.js → chunk-YPD7SQ5P.js} +8 -12
- package/dist/cli-bundle/chunks/{comments-MIW5MZOX.js.map → chunk-YPD7SQ5P.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-T35XLYZF.js → chunk-YPMZMKN7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-R3ZBLGTC.js → chunk-YTD5GICJ.js} +4 -4
- package/dist/cli-bundle/chunks/{config-DJJKZB5R.js → chunk-ZNEG2UDO.js} +264 -39
- package/dist/cli-bundle/chunks/{config-DJJKZB5R.js.map → chunk-ZNEG2UDO.js.map} +4 -4
- package/dist/cli-bundle/chunks/{chunk-EEY54JMF.js → chunk-ZO7CLOY2.js} +3 -3
- package/dist/cli-bundle/chunks/{close-3YRR3XY6.js → close-3YYQ5OG2.js} +5 -9
- package/dist/cli-bundle/chunks/close-Z3Q4U7TS.js +12 -0
- package/dist/cli-bundle/chunks/close-many-3L2RXH3M.js +22 -0
- package/dist/cli-bundle/chunks/close-many-D366FTIG.js +26 -0
- package/dist/cli-bundle/chunks/comments-54XDJNFE.js +17 -0
- package/dist/cli-bundle/chunks/comments-HGHC2PN6.js +13 -0
- package/dist/cli-bundle/chunks/copy-44RT5GDW.js +13 -0
- package/dist/cli-bundle/chunks/copy-UGMUGHZA.js +9 -0
- package/dist/cli-bundle/chunks/{create-XWWQFQ6S.js → create-4GWJWPXG.js} +9 -14
- package/dist/cli-bundle/chunks/create-AZXCUYKP.js +25 -0
- package/dist/cli-bundle/chunks/delete-Y6SXIQ4X.js +10 -0
- package/dist/cli-bundle/chunks/delete-YQ2VPXNF.js +14 -0
- package/dist/cli-bundle/chunks/deps-BU5EBJDU.js +17 -0
- package/dist/cli-bundle/chunks/deps-FMANWFRP.js +13 -0
- package/dist/cli-bundle/chunks/docs-OQBSJNIA.js +18 -0
- package/dist/cli-bundle/chunks/docs-VNPBZXEL.js +14 -0
- package/dist/cli-bundle/chunks/files-72HZEBOE.js +18 -0
- package/dist/cli-bundle/chunks/{activity-YKAKZTZ4.js → files-HTSB2KJG.js} +13 -13
- package/dist/cli-bundle/chunks/focus-FOG4ALC2.js +14 -0
- package/dist/cli-bundle/chunks/focus-SUTMKXGX.js +10 -0
- package/dist/cli-bundle/chunks/history-compact-M6IFAMBP.js +25 -0
- package/dist/cli-bundle/chunks/history-compact-NEXRPP2O.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-54ICFKXM.js → history-redact-NQX3OGZP.js} +7 -11
- package/dist/cli-bundle/chunks/history-redact-WQJBZ3PX.js +17 -0
- package/dist/cli-bundle/chunks/history-repair-CBHMHAJO.js +19 -0
- package/dist/cli-bundle/chunks/history-repair-NHOJG7WO.js +23 -0
- package/dist/cli-bundle/chunks/learnings-M64NTSOR.js +13 -0
- package/dist/cli-bundle/chunks/learnings-T63JGKKN.js +17 -0
- package/dist/cli-bundle/chunks/notes-73WE2UV2.js +13 -0
- package/dist/cli-bundle/chunks/notes-U7L6HQQ2.js +17 -0
- package/dist/cli-bundle/chunks/plan-OSCNYFGC.js +24 -0
- package/dist/cli-bundle/chunks/plan-OSCNYFGC.js.map +7 -0
- package/dist/cli-bundle/chunks/plan-TN537L24.js +28 -0
- package/dist/cli-bundle/chunks/plan-TN537L24.js.map +1 -0
- package/dist/cli-bundle/chunks/profile-MHAMXMHQ.js +37 -0
- package/dist/cli-bundle/chunks/profile-MHAMXMHQ.js.map +1 -0
- package/dist/cli-bundle/chunks/profile-TIGLAKJ7.js +33 -0
- package/dist/cli-bundle/chunks/profile-TIGLAKJ7.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-5H66WFYF.js → register-list-query-OHXD7G5N.js} +41 -33
- package/dist/cli-bundle/chunks/register-list-query-OHXD7G5N.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-FB3FNDLZ.js → register-list-query-ZCRABAPN.js} +42 -34
- package/dist/cli-bundle/chunks/register-list-query-ZCRABAPN.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-UJO23C7R.js → register-mutation-P3G4XP6Q.js} +36 -41
- package/dist/cli-bundle/chunks/{register-mutation-UJO23C7R.js.map → register-mutation-P3G4XP6Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-Z2ETYHKS.js → register-mutation-XX4H56PE.js} +34 -39
- package/dist/cli-bundle/chunks/{register-mutation-Z2ETYHKS.js.map → register-mutation-XX4H56PE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-A3XAM5J7.js → register-operations-V6PIYEDU.js} +80 -52
- package/dist/cli-bundle/chunks/register-operations-V6PIYEDU.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-SG7HBSUP.js → register-operations-V6VKTG54.js} +79 -51
- package/dist/cli-bundle/chunks/register-operations-V6VKTG54.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-K6U3NVY5.js → register-setup-6RVAWT6W.js} +129 -31
- package/dist/cli-bundle/chunks/register-setup-6RVAWT6W.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-I45OGJUV.js → register-setup-6YVUSQYD.js} +130 -32
- package/dist/cli-bundle/chunks/register-setup-6YVUSQYD.js.map +1 -0
- package/dist/cli-bundle/chunks/{restore-YJ2ET6AT.js → restore-HC3YSWF7.js} +7 -11
- package/dist/cli-bundle/chunks/restore-HC3YSWF7.js.map +1 -0
- package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js +15 -0
- package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{schema-2PUXCZ25.js → schema-DAGSYO6E.js} +6 -10
- package/dist/cli-bundle/chunks/schema-DAGSYO6E.js.map +7 -0
- package/dist/cli-bundle/chunks/{schema-Y6DXXK2F.js → schema-UBXJCQAC.js} +6 -10
- package/dist/cli-bundle/chunks/schema-UBXJCQAC.js.map +1 -0
- package/dist/cli-bundle/chunks/update-CJGG5WMV.js +21 -0
- package/dist/cli-bundle/chunks/update-CJGG5WMV.js.map +7 -0
- package/dist/cli-bundle/chunks/update-LKD64AFP.js +25 -0
- package/dist/cli-bundle/chunks/update-LKD64AFP.js.map +1 -0
- package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js +31 -0
- package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js +35 -0
- package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js.map +1 -0
- package/dist/cli-bundle/main.js +29 -31
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +136 -54
- package/dist/cli-bundle/sdk-testing.js +7 -8
- package/dist/cli-bundle/sdk.js +132 -84
- package/dist/cli-bundle/sdk.js.map +2 -2
- package/dist/core/history/drift-scan.js +3 -8
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/output/mutation-projection.js +11 -5
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/search/cache.js +3 -3
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/semantic-defaults.d.ts +2 -0
- package/dist/core/search/semantic-defaults.js +11 -4
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/vector-stores.d.ts +1 -1
- package/dist/core/search/vector-stores.js +33 -7
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/mcp/server.d.ts +22 -50
- package/dist/mcp/server.js +62 -916
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +7 -7
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +9 -7
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/index.d.ts +4 -2
- package/dist/sdk/index.js +4 -4
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +312 -5
- package/dist/sdk/runtime.js +1391 -26
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/start-task-status.d.ts +13 -0
- package/dist/sdk/start-task-status.js +19 -0
- package/dist/sdk/start-task-status.js.map +1 -0
- package/dist/sdk/workspace-contracts-cache.d.ts +17 -0
- package/dist/sdk/workspace-contracts-cache.js +36 -0
- package/dist/sdk/workspace-contracts-cache.js.map +1 -0
- package/docs/COMMANDS.md +10 -1
- package/docs/RELEASING.md +3 -1
- package/docs/SDK.md +81 -0
- package/docs/TESTING.md +3 -0
- package/docs/examples/sdk-app-embedding/run-embedded-pm.mjs +16 -2
- package/docs/examples/sdk-contract-consumer/inspect-contracts.mjs +16 -1
- package/package.json +1 -1
- package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +0 -18
- package/dist/cli-bundle/chunks/aggregate-EQX2RGB7.js +0 -375
- package/dist/cli-bundle/chunks/aggregate-EQX2RGB7.js.map +0 -7
- package/dist/cli-bundle/chunks/aggregate-PEGZGJXD.js +0 -372
- package/dist/cli-bundle/chunks/aggregate-PEGZGJXD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-37E72CNS.js +0 -217
- package/dist/cli-bundle/chunks/chunk-37E72CNS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3PL6LEKP.js +0 -1961
- package/dist/cli-bundle/chunks/chunk-3PL6LEKP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js +0 -1749
- package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +0 -87
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js +0 -822
- package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4OFLJHX6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-53BTLLAF.js +0 -2181
- package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-57C2RLW5.js +0 -1704
- package/dist/cli-bundle/chunks/chunk-57C2RLW5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5B3X4Y22.js +0 -2330
- package/dist/cli-bundle/chunks/chunk-5B3X4Y22.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5J2XPTAD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js +0 -995
- package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js +0 -819
- package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +0 -23
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7EQNAZX2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BVEUCSH2.js +0 -530
- package/dist/cli-bundle/chunks/chunk-BVEUCSH2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +0 -275
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js +0 -231
- package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js +0 -2184
- package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EZFKWSC7.js +0 -1615
- package/dist/cli-bundle/chunks/chunk-EZFKWSC7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FJRKQREY.js +0 -228
- package/dist/cli-bundle/chunks/chunk-FJRKQREY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js +0 -3237
- package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HK72NWAD.js +0 -1570
- package/dist/cli-bundle/chunks/chunk-HK72NWAD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js +0 -3206
- package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JINYH2DB.js +0 -371
- package/dist/cli-bundle/chunks/chunk-JINYH2DB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JLA7EVYV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +0 -76
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +0 -79
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +0 -915
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KLG4ZULO.js +0 -218
- package/dist/cli-bundle/chunks/chunk-KLG4ZULO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MNZ7DRNC.js +0 -1858
- package/dist/cli-bundle/chunks/chunk-MNZ7DRNC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MZ7VNEVY.js +0 -520
- package/dist/cli-bundle/chunks/chunk-MZ7VNEVY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N7X4WP6L.js +0 -1041
- package/dist/cli-bundle/chunks/chunk-N7X4WP6L.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +0 -20
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +0 -918
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OESSOFJ4.js +0 -1985
- package/dist/cli-bundle/chunks/chunk-OESSOFJ4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +0 -238
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +0 -1977
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PPAJG4GB.js +0 -1031
- package/dist/cli-bundle/chunks/chunk-PPAJG4GB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QZ342C63.js +0 -220
- package/dist/cli-bundle/chunks/chunk-QZ342C63.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js +0 -368
- package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-S4APD35C.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js +0 -1149
- package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +0 -272
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TT42JUMF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +0 -165
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +0 -1932
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +0 -175
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +0 -84
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VZIYHZDX.js +0 -1868
- package/dist/cli-bundle/chunks/chunk-VZIYHZDX.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js +0 -1152
- package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YSAH5FY5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js +0 -1005
- package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Z2CRRZYF.js +0 -215
- package/dist/cli-bundle/chunks/chunk-Z2CRRZYF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZD34OFFQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js +0 -2306
- package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +0 -241
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +0 -7
- package/dist/cli-bundle/chunks/claim-4DROPSIS.js +0 -144
- package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +0 -1
- package/dist/cli-bundle/chunks/claim-VX54TV5U.js +0 -147
- package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +0 -7
- package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +0 -16
- package/dist/cli-bundle/chunks/config-V57QD47V.js.map +0 -1
- package/dist/cli-bundle/chunks/context-4OQGIPSO.js +0 -45
- package/dist/cli-bundle/chunks/context-WLA6IAWE.js +0 -49
- package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +0 -12
- package/dist/cli-bundle/chunks/create-WKOZKPQR.js +0 -30
- package/dist/cli-bundle/chunks/eval-N6UHFWVO.js +0 -288
- package/dist/cli-bundle/chunks/eval-N6UHFWVO.js.map +0 -7
- package/dist/cli-bundle/chunks/eval-PHOTWYHI.js +0 -278
- package/dist/cli-bundle/chunks/eval-PHOTWYHI.js.map +0 -1
- package/dist/cli-bundle/chunks/extension-NBAH62ML.js +0 -40
- package/dist/cli-bundle/chunks/extension-ZF6ZZPOU.js +0 -44
- package/dist/cli-bundle/chunks/gc-AETFKZ44.js +0 -398
- package/dist/cli-bundle/chunks/gc-AETFKZ44.js.map +0 -7
- package/dist/cli-bundle/chunks/gc-RLBP4QVN.js +0 -388
- package/dist/cli-bundle/chunks/gc-RLBP4QVN.js.map +0 -1
- package/dist/cli-bundle/chunks/get-NH2MPBCI.js +0 -283
- package/dist/cli-bundle/chunks/get-NH2MPBCI.js.map +0 -1
- package/dist/cli-bundle/chunks/get-P4ZQXCPZ.js +0 -286
- package/dist/cli-bundle/chunks/get-P4ZQXCPZ.js.map +0 -7
- package/dist/cli-bundle/chunks/health-3GVPMQBL.js +0 -1612
- package/dist/cli-bundle/chunks/health-3GVPMQBL.js.map +0 -1
- package/dist/cli-bundle/chunks/health-DNTM72GJ.js +0 -1615
- package/dist/cli-bundle/chunks/health-DNTM72GJ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-RYKLC72X.js +0 -20
- package/dist/cli-bundle/chunks/history-SGPYRAFT.js +0 -24
- package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +0 -21
- package/dist/cli-bundle/chunks/init-RPIPQUNV.js +0 -32
- package/dist/cli-bundle/chunks/init-SKQAESQS.js +0 -28
- package/dist/cli-bundle/chunks/list-64LHZ3HM.js +0 -32
- package/dist/cli-bundle/chunks/list-7LXBTEKI.js +0 -36
- package/dist/cli-bundle/chunks/next-7ODPAQ4U.js +0 -306
- package/dist/cli-bundle/chunks/next-7ODPAQ4U.js.map +0 -7
- package/dist/cli-bundle/chunks/next-ODJUM4ZM.js +0 -303
- package/dist/cli-bundle/chunks/next-ODJUM4ZM.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +0 -397
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +0 -400
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-5H66WFYF.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-FB3FNDLZ.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-A3XAM5J7.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-SG7HBSUP.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-I45OGJUV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-K6U3NVY5.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +0 -19
- package/dist/cli-bundle/chunks/scheduling-shortcuts-SSC4MYWQ.js +0 -91
- package/dist/cli-bundle/chunks/scheduling-shortcuts-SSC4MYWQ.js.map +0 -7
- package/dist/cli-bundle/chunks/scheduling-shortcuts-ULRG7MNP.js +0 -88
- package/dist/cli-bundle/chunks/scheduling-shortcuts-ULRG7MNP.js.map +0 -1
- package/dist/cli-bundle/chunks/search-3S72CTD6.js +0 -38
- package/dist/cli-bundle/chunks/search-WNUNBQXO.js +0 -34
- package/dist/cli-bundle/chunks/stats-IJYTRQGV.js +0 -250
- package/dist/cli-bundle/chunks/stats-IJYTRQGV.js.map +0 -7
- package/dist/cli-bundle/chunks/stats-L2D5Y2O5.js +0 -240
- package/dist/cli-bundle/chunks/stats-L2D5Y2O5.js.map +0 -1
- package/dist/cli-bundle/chunks/telemetry-L2CVOKVN.js +0 -309
- package/dist/cli-bundle/chunks/telemetry-L2CVOKVN.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-QBYWQA76.js +0 -306
- package/dist/cli-bundle/chunks/telemetry-QBYWQA76.js.map +0 -1
- package/dist/cli-bundle/chunks/test-DQ2QFJ7W.js +0 -45
- package/dist/cli-bundle/chunks/test-W7QBLVJS.js +0 -41
- package/dist/cli-bundle/chunks/test-all-636NTRTT.js +0 -434
- package/dist/cli-bundle/chunks/test-all-636NTRTT.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-DWYK3RG6.js +0 -437
- package/dist/cli-bundle/chunks/test-all-DWYK3RG6.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-245OINZR.js +0 -28
- package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +0 -24
- package/dist/cli-bundle/chunks/update-SFLZPJXX.js +0 -30
- package/dist/cli-bundle/chunks/update-SJZ6S77U.js +0 -26
- package/dist/cli-bundle/chunks/upgrade-HFFXLZJA.js +0 -290
- package/dist/cli-bundle/chunks/upgrade-HFFXLZJA.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-UYQKM7RF.js +0 -287
- package/dist/cli-bundle/chunks/upgrade-UYQKM7RF.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-PA4FDTOV.js +0 -2143
- package/dist/cli-bundle/chunks/validate-PA4FDTOV.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js +0 -2105
- package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-4XQIDNM5.js.map → append-F7WPGIQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-YKAKZTZ4.js.map → append-PVCTBVJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T3ABIMGW.js.map → chunk-2TILG6F2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RCT3YJOK.js.map → chunk-3TYOW6RR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3JZNEQBA.js.map → chunk-3X542TEY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YOF5VPKM.js.map → chunk-7VQ3JJN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P5TFTLWW.js.map → chunk-AGAVEDIE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YFIE7YK6.js.map → chunk-AJUON7E6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7WYXBPYQ.js.map → chunk-DR2V5OIV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PDXT6Q55.js.map → chunk-EDO7VXSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FUM6UMY4.js.map → chunk-EVEPHNXJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RX3HQSYG.js.map → chunk-FN6SB4HU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DLQ4ZTCU.js.map → chunk-H2SMKL2N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-C3PMDWGX.js.map → chunk-HX6QXV5P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N6DNM2FA.js.map → chunk-P3MJJW7P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5JE6SMYS.js.map → chunk-PDXJXEZJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AAEQMOC6.js.map → chunk-TEKZOS7M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NER3KUUS.js.map → chunk-VLEA2UTQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZMD35NYG.js.map → chunk-WCWVEXGA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T35XLYZF.js.map → chunk-YPMZMKN7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R3ZBLGTC.js.map → chunk-YTD5GICJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EEY54JMF.js.map → chunk-ZO7CLOY2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-3YRR3XY6.js.map → close-3YYQ5OG2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-OB2Y4QP5.js.map → close-Z3Q4U7TS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-4OQGIPSO.js.map → close-many-3L2RXH3M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-WLA6IAWE.js.map → close-many-D366FTIG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-OJEXMKVW.js.map → comments-54XDJNFE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-HXJLKCRI.js.map → comments-HGHC2PN6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-XWWQFQ6S.js.map → copy-44RT5GDW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-WKOZKPQR.js.map → copy-UGMUGHZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-ZF6ZZPOU.js.map → create-4GWJWPXG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-NBAH62ML.js.map → create-AZXCUYKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-RYKLC72X.js.map → delete-Y6SXIQ4X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-SGPYRAFT.js.map → delete-YQ2VPXNF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-54ICFKXM.js.map → deps-BU5EBJDU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-4H3FCKF3.js.map → deps-FMANWFRP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-RPIPQUNV.js.map → docs-OQBSJNIA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-SKQAESQS.js.map → docs-VNPBZXEL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-64LHZ3HM.js.map → files-72HZEBOE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-7LXBTEKI.js.map → files-HTSB2KJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-YJ2ET6AT.js.map → focus-FOG4ALC2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-PXOFL6AM.js.map → focus-SUTMKXGX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-Y6DXXK2F.js.map → history-compact-M6IFAMBP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-2PUXCZ25.js.map → history-compact-NEXRPP2O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-3S72CTD6.js.map → history-redact-NQX3OGZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-WNUNBQXO.js.map → history-redact-WQJBZ3PX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-W7QBLVJS.js.map → history-repair-CBHMHAJO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-DQ2QFJ7W.js.map → history-repair-NHOJG7WO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-ZRD4GCTT.js.map → learnings-M64NTSOR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-245OINZR.js.map → learnings-T63JGKKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-SJZ6S77U.js.map → notes-73WE2UV2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-SFLZPJXX.js.map → notes-U7L6HQQ2.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../core/schema/runtime-field-values.ts","../../../../../../../../core/item/item-format-version.ts","../../../../../../../../core/item/status.ts","../../../../../../../../core/shared/conflict-markers.ts","../../../../../../../../core/item/item-format.ts","../../../../../../../../core/item/toon-decode.ts","../../../../../../../../core/item/id.ts"],"sourcesContent":["/**\n * @module core/schema/runtime-field-values\n *\n * Resolves configurable schema, fields, statuses, and workflows for Runtime Field Values.\n */\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { PmCliError } from \"../shared/errors.js\";\nimport { runtimeFieldOptionTarget, type RuntimeFieldDefinitionResolved, type RuntimeFieldRegistry } from \"./runtime-schema.js\";\n\nfunction toCamelToken(value: string): string {\n const segments = value\n .trim()\n .replaceAll(/[^A-Za-z0-9]+/g, \" \")\n .split(/\\s+/)\n .filter((segment) => segment.length > 0)\n .map((segment) => segment.toLowerCase());\n if (segments.length === 0) {\n return value;\n }\n const [first, ...rest] = segments;\n return `${first}${rest.map((segment) => `${segment.slice(0, 1).toUpperCase()}${segment.slice(1)}`).join(\"\")}`;\n}\n\nfunction resolveCandidateOptionKeys(definition: RuntimeFieldDefinitionResolved): string[] {\n return [...new Set([\n runtimeFieldOptionTarget(definition),\n toCamelToken(definition.key),\n toCamelToken(definition.cli_flag),\n ...definition.cli_aliases.map((alias) => toCamelToken(alias)),\n ])];\n}\n\n/**\n * Implements read runtime field option value for the public runtime surface of this module.\n */\nexport function readRuntimeFieldOptionValue(\n options: Record<string, unknown>,\n definition: RuntimeFieldDefinitionResolved,\n): unknown {\n for (const candidateKey of resolveCandidateOptionKeys(definition)) {\n if (!Object.hasOwn(options, candidateKey)) {\n continue;\n }\n const value = options[candidateKey];\n if (value !== undefined) {\n return value;\n }\n }\n return undefined;\n}\n\nfunction normalizeStringArrayValue(value: unknown): string[] {\n if (Array.isArray(value)) {\n return value\n .flatMap((entry) => normalizeStringArrayValue(entry))\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n }\n if (typeof value === \"string\") {\n return value\n .split(/[,\\n|]/)\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n }\n if (value === undefined || value === null) {\n return [];\n }\n return [String(value).trim()].filter((entry) => entry.length > 0);\n}\n\nfunction parseBooleanValue(raw: unknown, label: string): boolean {\n if (typeof raw === \"boolean\") {\n return raw;\n }\n if (typeof raw === \"number\") {\n if (raw === 1) {\n return true;\n }\n if (raw === 0) {\n return false;\n }\n }\n if (typeof raw === \"string\") {\n const normalized = raw.trim().toLowerCase();\n if (normalized === \"true\" || normalized === \"1\" || normalized === \"yes\") {\n return true;\n }\n if (normalized === \"false\" || normalized === \"0\" || normalized === \"no\") {\n return false;\n }\n }\n throw new PmCliError(`${label} must be one of true|false|1|0|yes|no`, EXIT_CODE.USAGE);\n}\n\nfunction parseNumberValue(raw: unknown, label: string): number {\n if (typeof raw === \"number\" && Number.isFinite(raw)) {\n return raw;\n }\n const candidate = typeof raw === \"string\" ? raw.trim() : String(raw);\n const parsed = Number(candidate);\n if (!Number.isFinite(parsed)) {\n throw new PmCliError(`${label} must be a number`, EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\n/**\n * Implements coerce runtime field value for the public runtime surface of this module.\n */\nexport function coerceRuntimeFieldValue(\n definition: RuntimeFieldDefinitionResolved,\n rawValue: unknown,\n labelOverride?: string,\n): unknown {\n const label = labelOverride ?? `--${definition.cli_flag}`;\n if (definition.repeatable || definition.type === \"string_array\") {\n const values = normalizeStringArrayValue(rawValue);\n if (definition.type === \"number\") {\n return values.map((value) => parseNumberValue(value, label));\n }\n if (definition.type === \"boolean\") {\n return values.map((value) => parseBooleanValue(value, label));\n }\n return values;\n }\n\n const scalarRaw = Array.isArray(rawValue) ? rawValue[rawValue.length - 1] : rawValue;\n if (scalarRaw === undefined) {\n return undefined;\n }\n if (definition.type === \"number\") {\n return parseNumberValue(scalarRaw, label);\n }\n if (definition.type === \"boolean\") {\n return parseBooleanValue(scalarRaw, label);\n }\n return typeof scalarRaw === \"string\" ? scalarRaw : String(scalarRaw);\n}\n\nfunction shouldRequireFieldOnCreate(definition: RuntimeFieldDefinitionResolved, itemTypeName: string | undefined): boolean {\n if (!definition.required && !definition.required_on_create) {\n return false;\n }\n if (definition.required_types.length === 0) {\n return true;\n }\n if (!itemTypeName) {\n return false;\n }\n return definition.required_types.map((value) => value.toLowerCase()).includes(itemTypeName.trim().toLowerCase());\n}\n\n/**\n * Implements collect runtime create field values for the public runtime surface of this module.\n */\nexport function collectRuntimeCreateFieldValues(\n options: Record<string, unknown>,\n fieldRegistry: RuntimeFieldRegistry,\n itemTypeName: string | undefined,\n): { values: Record<string, unknown>; missing_required_flags: string[] } {\n const values: Record<string, unknown> = {};\n const missingRequiredFlags: string[] = [];\n for (const definition of fieldRegistry.command_to_fields.get(\"create\") ?? []) {\n const rawValue = readRuntimeFieldOptionValue(options, definition);\n if (rawValue === undefined) {\n if (shouldRequireFieldOnCreate(definition, itemTypeName)) {\n missingRequiredFlags.push(`--${definition.cli_flag}`);\n }\n continue;\n }\n values[definition.metadata_key] = coerceRuntimeFieldValue(definition, rawValue);\n }\n return {\n values,\n missing_required_flags: [...new Set(missingRequiredFlags)].sort((left, right) => left.localeCompare(right)),\n };\n}\n\n/**\n * Implements collect runtime update field values for the public runtime surface of this module.\n */\nexport function collectRuntimeUpdateFieldValues(\n options: Record<string, unknown>,\n fieldRegistry: RuntimeFieldRegistry,\n commands: Array<\"update\" | \"update_many\"> | null | undefined = [\"update\"],\n): Record<string, unknown> {\n const values: Record<string, unknown> = {};\n const definitions = (commands ?? [\"update\"]).flatMap((command) => fieldRegistry.command_to_fields.get(command) ?? []);\n const seen = new Set<string>();\n for (const definition of definitions) {\n const rawValue = readRuntimeFieldOptionValue(options, definition);\n if (rawValue === undefined) {\n continue;\n }\n if (seen.has(definition.metadata_key)) {\n continue;\n }\n seen.add(definition.metadata_key);\n values[definition.metadata_key] = coerceRuntimeFieldValue(definition, rawValue);\n }\n return values;\n}\n","/**\n * @module core/item/item-format-version\n *\n * Tracks the on-disk item front-matter format version so a future breaking\n * storage change can tell already-current items apart from items that a staged\n * migration must rewrite, without re-parsing and structurally guessing every\n * file. The version is an explicit, monotonically increasing integer stamped in\n * front-matter as `pm_format_version`.\n *\n * Token economy is a first-class constraint here: the baseline version (1) is\n * the implicit default and is never serialized, so today's corpus gains zero\n * bytes and zero churn. The field only materializes once an item reaches\n * version 2 or higher. Absence of the field is therefore always interpreted as\n * the baseline version, both now and after future bumps. The classification\n * helpers below power the advisory `pm health` integrity surface and the\n * `pm validate` format-version check.\n */\nimport type { ItemMetadata } from \"../../types/index.js\";\n\n/**\n * The original (and implicit) item front-matter format version. Items missing a\n * `pm_format_version` field are always treated as this version, so the baseline\n * is never written to disk and adds no per-item token cost.\n */\nexport const BASELINE_ITEM_FORMAT_VERSION = 1;\n\n/**\n * The format version this runtime writes and considers current. When a breaking\n * front-matter change ships, bump this constant and add a migration that\n * rewrites items whose {@link effectiveItemFormatVersion} is lower; items at or\n * above it need no migration. It stays equal to\n * {@link BASELINE_ITEM_FORMAT_VERSION} until the first such change.\n */\nexport const CURRENT_ITEM_FORMAT_VERSION = 1;\n\n/**\n * Resolve the format version an item is effectively stored at. A present,\n * positive-integer `pm_format_version` is taken verbatim (including versions\n * ahead of this runtime, so they can be flagged rather than silently clamped);\n * an absent, malformed, or sub-baseline value resolves to\n * {@link BASELINE_ITEM_FORMAT_VERSION}.\n */\nexport function effectiveItemFormatVersion(metadata: Pick<ItemMetadata, \"pm_format_version\">): number {\n const raw = metadata.pm_format_version;\n if (typeof raw === \"number\" && Number.isInteger(raw) && raw >= BASELINE_ITEM_FORMAT_VERSION) {\n return raw;\n }\n return BASELINE_ITEM_FORMAT_VERSION;\n}\n\n/**\n * Reduce an item's `pm_format_version` to its persisted form: the baseline\n * version (and any malformed or sub-baseline value) is dropped so it is never\n * serialized, while versions at or above {@link BASELINE_ITEM_FORMAT_VERSION}\n * plus one are preserved verbatim. This keeps the field absent for the entire\n * current corpus and only writes it once an item genuinely advances past the\n * implicit baseline.\n */\nexport function normalizeItemFormatVersion(value: unknown): number | undefined {\n if (typeof value !== \"number\" || !Number.isInteger(value) || value <= BASELINE_ITEM_FORMAT_VERSION) {\n return undefined;\n }\n return value;\n}\n\n/**\n * Relationship between an item's stored format version and the runtime's\n * current version: `outdated` (below current, a migration would rewrite it),\n * `ahead` (above current, written by a newer pm than this one), or `current`.\n */\nexport type ItemFormatVersionStatus = \"current\" | \"outdated\" | \"ahead\";\n\n/**\n * Classify a single stored format version against the runtime's current\n * version. Defaults to {@link CURRENT_ITEM_FORMAT_VERSION}; the `current`\n * parameter exists so callers (and tests) can evaluate against a hypothetical\n * future version without mutating the module constant.\n */\nexport function classifyItemFormatVersion(\n version: number,\n current: number = CURRENT_ITEM_FORMAT_VERSION,\n): ItemFormatVersionStatus {\n if (version < current) {\n return \"outdated\";\n }\n if (version > current) {\n return \"ahead\";\n }\n return \"current\";\n}\n\n/**\n * One item's reference (id or relative path) paired with the format version it\n * is stored at, used as input to {@link scanItemFormatVersions}.\n */\nexport interface ItemFormatVersionScanEntry {\n ref: string;\n version: number;\n}\n\n/**\n * Sorted references partitioned by how their stored format version compares to\n * the runtime's current version. References at the current version are omitted\n * from both lists.\n */\nexport interface ItemFormatVersionScanResult {\n outdated: string[];\n ahead: string[];\n}\n\n/**\n * Partition a set of items by format version into `outdated` (need migration)\n * and `ahead` (written by a newer pm) reference lists, each sorted for stable\n * diagnostics. Pushing all comparison branches into this pure, exhaustively\n * tested helper lets `pm health` and `pm validate` emit findings by iterating\n * the result lists, with no version-comparison branching of their own.\n */\nexport function scanItemFormatVersions(\n entries: readonly ItemFormatVersionScanEntry[],\n current: number = CURRENT_ITEM_FORMAT_VERSION,\n): ItemFormatVersionScanResult {\n const outdated: string[] = [];\n const ahead: string[] = [];\n for (const entry of entries) {\n const status = classifyItemFormatVersion(entry.version, current);\n if (status === \"outdated\") {\n outdated.push(entry.ref);\n } else if (status === \"ahead\") {\n ahead.push(entry.ref);\n }\n }\n return {\n outdated: outdated.sort((left, right) => left.localeCompare(right)),\n ahead: ahead.sort((left, right) => left.localeCompare(right)),\n };\n}\n","/**\n * @module core/item/status\n *\n * Defines item parsing, formatting, and lifecycle helpers for Status.\n */\nimport { STATUS_VALUES } from \"../../types/index.js\";\nimport type { ItemStatus } from \"../../types/index.js\";\nimport { normalizeStatusInputWithRegistry, type RuntimeStatusRegistry } from \"../schema/runtime-schema.js\";\n\nconst STATUS_ALIAS_MAP: Readonly<Record<string, ItemStatus>> = {\n \"in-progress\": \"in_progress\",\n cancelled: \"canceled\",\n};\n\n/**\n * Implements normalize status input for the public runtime surface of this module.\n */\nexport function normalizeStatusInput(value: unknown, registry?: RuntimeStatusRegistry): ItemStatus | undefined {\n if (registry) {\n const normalizedFromRegistry = normalizeStatusInputWithRegistry(value, registry);\n if (normalizedFromRegistry) {\n return normalizedFromRegistry;\n }\n }\n if (typeof value !== \"string\") {\n return undefined;\n }\n const normalized = value.trim().toLowerCase();\n if (!normalized) {\n return undefined;\n }\n const canonical = STATUS_ALIAS_MAP[normalized] ?? normalized;\n if (!(STATUS_VALUES as readonly string[]).includes(canonical)) {\n return undefined;\n }\n return canonical as ItemStatus;\n}\n\n/**\n * Normalize a status against the runtime registry, falling back to the original\n * value when normalization does not resolve to a known status. This preserves\n * the long-standing `normalizeStatusInput(status, registry) ?? status` pattern\n * used by query commands so that unknown/custom statuses still compare against\n * registry sets by their raw value.\n */\nexport function normalizeStatusForRegistry(status: ItemStatus, registry: RuntimeStatusRegistry): ItemStatus {\n return normalizeStatusInput(status, registry) ?? status;\n}\n\n/**\n * Determine whether a status is terminal according to the runtime status\n * registry, applying registry-aware normalization first (with raw fallback).\n */\nexport function isTerminalStatus(status: ItemStatus, registry: RuntimeStatusRegistry): boolean {\n return registry.terminal_statuses.has(normalizeStatusForRegistry(status, registry));\n}\n","/**\n * @module core/shared/conflict-markers\n *\n * Provides shared primitives and utilities for Conflict Markers.\n */\n/**\n * Describes a detected unresolved merge-conflict marker and its source location.\n */\nexport interface ConflictMarkerMatch {\n line: number;\n marker: \"<<<<<<<\" | \"=======\" | \">>>>>>>\";\n text: string;\n}\n\nconst CONFLICT_MARKER_PATTERN = /^\\s*(<<<<<<<|=======|>>>>>>>)(?:\\s.*)?$/;\n\n/**\n * Implements find merge conflict markers for the public runtime surface of this module.\n */\nexport function findMergeConflictMarkers(content: string): ConflictMarkerMatch[] {\n if (content.length === 0) {\n return [];\n }\n const lines = content.split(/\\r?\\n/);\n const matches: ConflictMarkerMatch[] = [];\n for (let index = 0; index < lines.length; index += 1) {\n const line = lines[index] ?? \"\";\n const markerMatch = line.match(CONFLICT_MARKER_PATTERN);\n if (!markerMatch) {\n continue;\n }\n const marker = markerMatch[1] as ConflictMarkerMatch[\"marker\"];\n matches.push({\n line: index + 1,\n marker,\n text: line,\n });\n }\n return matches;\n}\n\n/**\n * Implements find first merge conflict marker for the public runtime surface of this module.\n */\nexport function findFirstMergeConflictMarker(content: string): ConflictMarkerMatch | undefined {\n const matches = findMergeConflictMarkers(content);\n return matches[0];\n}\n","/**\n * @module core/item/item-format\n *\n * Defines item parsing, formatting, and lifecycle helpers for Item Format.\n */\nimport { encode as encodeToon } from \"@toon-format/toon\";\nimport type {\n CalendarEvent,\n Comment,\n Dependency,\n ItemDocument,\n ItemMetadata,\n RuntimeSchemaSettings,\n ItemTestRunSummary,\n LinkedDoc,\n LinkedFile,\n LinkedTest,\n LogNote,\n PlanDecision,\n PlanDiscovery,\n PlanStep,\n PlanStepDoc,\n PlanStepFile,\n PlanStepLink,\n PlanStepStatus,\n PlanValidationCheck,\n RecurrenceRule,\n Reminder,\n} from \"../../types/index.js\";\nimport type { ItemFormat } from \"../../types/index.js\";\nimport {\n CONFIDENCE_TEXT_VALUES,\n ISSUE_SEVERITY_VALUES,\n PLAN_STEP_STATUS_VALUES,\n RECURRENCE_FREQUENCY_VALUES,\n RECURRENCE_WEEKDAY_VALUES,\n STATUS_VALUES,\n weekdayOrderIndex,\n} from \"../../types/index.js\";\nimport { coerceRuntimeFieldValue } from \"../schema/runtime-field-values.js\";\nimport {\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n type RuntimeFieldRegistry,\n type RuntimeStatusRegistry,\n} from \"../schema/runtime-schema.js\";\nimport { BASELINE_ITEM_FORMAT_VERSION, normalizeItemFormatVersion } from \"./item-format-version.js\";\nimport { normalizeStatusInput } from \"./status.js\";\nimport { decodeToonItemContent } from \"./toon-decode.js\";\nimport { EXIT_CODE, FRONT_MATTER_KEY_ORDER } from \"../shared/constants.js\";\nimport { findFirstMergeConflictMarker } from \"../shared/conflict-markers.js\";\nimport { PmCliError } from \"../shared/errors.js\";\nimport { orderObject } from \"../shared/serialization.js\";\nimport { compareTimestampStrings, isTimestampLiteral } from \"../shared/time.js\";\n\nconst LINKED_TEST_PM_CONTEXT_MODE_VALUES = new Set([\"schema\", \"tracker\", \"auto\"]);\nconst ITEM_TEST_RUN_STATUS_VALUES = new Set([\"passed\", \"failed\", \"stopped\", \"canceled\"]);\nconst PLAN_STEP_STATUS_SET = new Set<string>(PLAN_STEP_STATUS_VALUES);\n\nfunction normalizePathValue(value: string): string {\n return value.replaceAll(\"\\\\\", \"/\");\n}\n\nfunction firstNonZeroComparison(comparisons: readonly number[]): number {\n for (const comparison of comparisons) {\n if (comparison !== 0) {\n return comparison;\n }\n }\n return 0;\n}\n\nfunction deleteUndefinedFields(record: Record<string, unknown>): void {\n for (const [key, value] of Object.entries(record)) {\n if (value === undefined) {\n delete record[key];\n }\n }\n}\n\nconst REQUIRED_STRING_FIELDS = [\n \"id\",\n \"title\",\n \"description\",\n \"created_at\",\n \"updated_at\",\n] as const;\n\nconst STATIC_FRONT_MATTER_FIELD_SET = new Set(FRONT_MATTER_KEY_ORDER);\n\ninterface RuntimeSchemaValidationContext {\n statusRegistry?: RuntimeStatusRegistry;\n fieldRegistry?: RuntimeFieldRegistry;\n unknownFieldPolicy: \"allow\" | \"warn\" | \"reject\";\n extensionFieldNames: ReadonlySet<string>;\n onWarning?: (warning: string) => void;\n}\n\n/**\n * Documents the item document format options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemDocumentFormatOptions {\n format?: ItemFormat;\n schema?: RuntimeSchemaSettings;\n extensionFieldNames?: readonly string[];\n onWarning?: (warning: string) => void;\n}\n\nfunction resolveRuntimeSchemaValidationContext(\n options: ItemDocumentFormatOptions | undefined,\n): RuntimeSchemaValidationContext | undefined {\n if (!options?.schema) {\n return undefined;\n }\n return {\n statusRegistry: resolveRuntimeStatusRegistry(options.schema),\n fieldRegistry: resolveRuntimeFieldRegistry(options.schema),\n unknownFieldPolicy: options.schema.unknown_field_policy ?? \"allow\",\n extensionFieldNames: new Set(options.extensionFieldNames ?? []),\n onWarning: options.onWarning,\n };\n}\n\nfunction runtimeFieldRequiredForType(definition: RuntimeFieldRegistry[\"definitions\"][number], typeName: string): boolean {\n if (!definition.required) {\n return false;\n }\n if (definition.required_types.length === 0) {\n return true;\n }\n return definition.required_types.map((value) => value.toLowerCase()).includes(typeName.trim().toLowerCase());\n}\n\nfunction validationError(message: string): never {\n throw new PmCliError(`Invalid item front matter: ${message}`, EXIT_CODE.GENERIC_FAILURE);\n}\n\nfunction buildKnownFrontMatterKeys(runtimeContext: RuntimeSchemaValidationContext): Set<string> {\n const knownKeys = new Set(STATIC_FRONT_MATTER_FIELD_SET);\n for (const definition of runtimeContext.fieldRegistry?.definitions ?? []) {\n knownKeys.add(definition.metadata_key);\n }\n for (const fieldName of runtimeContext.extensionFieldNames) {\n knownKeys.add(fieldName);\n }\n return knownKeys;\n}\n\nfunction assertFrontMatterCondition(condition: boolean, message: string): void {\n if (!condition) {\n validationError(message);\n }\n}\n\nfunction assertTimestampField(record: Record<string, unknown>, fieldName: \"created_at\" | \"updated_at\" | \"deadline\"): void {\n const rawValue = record[fieldName];\n assertFrontMatterCondition(typeof rawValue === \"string\", `${fieldName} must be a string`);\n const timestamp = rawValue as string;\n assertFrontMatterCondition(isTimestampLiteral(timestamp), `${fieldName} must be a valid ISO timestamp`);\n}\n\nfunction assertPositiveIntegerField(\n record: Record<string, unknown>,\n fieldName: string,\n messagePrefix: string,\n): void {\n const value = record[fieldName];\n if (value === undefined) {\n return;\n }\n assertFrontMatterCondition(\n typeof value === \"number\" && Number.isInteger(value) && value >= 1,\n `${messagePrefix} must be an integer >= 1`,\n );\n}\n\nfunction assertOptionalTimestampString(record: Record<string, unknown>, fieldName: string, messagePrefix: string): void {\n const value = record[fieldName];\n if (value === undefined) {\n return;\n }\n assertFrontMatterCondition(typeof value === \"string\", `${messagePrefix} must be a string`);\n assertFrontMatterCondition(isTimestampLiteral(value as string), `${messagePrefix} must be a valid ISO timestamp`);\n}\n\nfunction assertRecurrenceWeekdays(value: unknown): void {\n if (value === undefined) {\n return;\n }\n assertFrontMatterCondition(Array.isArray(value), \"event.recurrence.by_weekday must be an array\");\n for (const weekday of value as unknown[]) {\n assertFrontMatterCondition(typeof weekday === \"string\", \"event.recurrence.by_weekday entries must be strings\");\n const normalizedWeekday = (weekday as string).trim().toLowerCase();\n assertFrontMatterCondition(\n RECURRENCE_WEEKDAY_VALUES.includes(normalizedWeekday as (typeof RECURRENCE_WEEKDAY_VALUES)[number]),\n `event.recurrence.by_weekday entries must be one of: ${RECURRENCE_WEEKDAY_VALUES.join(\", \")}`,\n );\n }\n}\n\nfunction assertRecurrenceMonthDays(value: unknown): void {\n if (value === undefined) {\n return;\n }\n assertFrontMatterCondition(Array.isArray(value), \"event.recurrence.by_month_day must be an array\");\n for (const day of value as unknown[]) {\n assertFrontMatterCondition(\n typeof day === \"number\" && Number.isInteger(day) && day >= 1 && day <= 31,\n \"event.recurrence.by_month_day entries must be integers 1..31\",\n );\n }\n}\n\nfunction assertRecurrenceExdates(value: unknown): void {\n if (value === undefined) {\n return;\n }\n assertFrontMatterCondition(Array.isArray(value), \"event.recurrence.exdates must be an array\");\n for (const exdate of value as unknown[]) {\n assertFrontMatterCondition(typeof exdate === \"string\", \"event.recurrence.exdates entries must be strings\");\n assertFrontMatterCondition(isTimestampLiteral(exdate as string), \"event.recurrence.exdates entries must be valid ISO timestamps\");\n }\n}\n\nfunction assertValidRecurrenceRule(recurrence: unknown): void {\n assertFrontMatterCondition(\n typeof recurrence === \"object\" && recurrence !== null && !Array.isArray(recurrence),\n \"event.recurrence must be an object\",\n );\n const recurrenceRecord = recurrence as Record<string, unknown>;\n assertFrontMatterCondition(typeof recurrenceRecord.freq === \"string\", \"event.recurrence.freq must be a string\");\n const frequency = (recurrenceRecord.freq as string).trim().toLowerCase();\n assertFrontMatterCondition(\n RECURRENCE_FREQUENCY_VALUES.includes(frequency as (typeof RECURRENCE_FREQUENCY_VALUES)[number]),\n `event.recurrence.freq must be one of: ${RECURRENCE_FREQUENCY_VALUES.join(\", \")}`,\n );\n\n assertPositiveIntegerField(recurrenceRecord, \"interval\", \"event.recurrence.interval\");\n assertPositiveIntegerField(recurrenceRecord, \"count\", \"event.recurrence.count\");\n assertOptionalTimestampString(recurrenceRecord, \"until\", \"event.recurrence.until\");\n assertRecurrenceWeekdays(recurrenceRecord.by_weekday);\n assertRecurrenceMonthDays(recurrenceRecord.by_month_day);\n assertRecurrenceExdates(recurrenceRecord.exdates);\n}\n\nfunction assertRequiredFrontMatterFields(record: Record<string, unknown>): string {\n for (const fieldName of REQUIRED_STRING_FIELDS) {\n assertFrontMatterCondition(typeof record[fieldName] === \"string\", `${fieldName} is required and must be a string`);\n }\n\n const itemType = record.type;\n assertFrontMatterCondition(typeof itemType === \"string\" && itemType.trim().length > 0, \"type must be a non-empty string\");\n\n const formatVersion = record.pm_format_version;\n if (formatVersion !== undefined) {\n assertFrontMatterCondition(\n typeof formatVersion === \"number\" && Number.isInteger(formatVersion) && formatVersion >= BASELINE_ITEM_FORMAT_VERSION,\n `pm_format_version must be an integer >= ${BASELINE_ITEM_FORMAT_VERSION}`,\n );\n }\n return itemType as string;\n}\n\nfunction assertStatusFrontMatterField(record: Record<string, unknown>, runtimeContext?: RuntimeSchemaValidationContext): void {\n const status = record.status;\n assertFrontMatterCondition(\n typeof status === \"string\" && status.trim().length > 0,\n \"status must be a non-empty string\",\n );\n const statusRegistry = runtimeContext?.statusRegistry;\n const normalizedStatus = normalizeStatusInput(status as string, statusRegistry);\n const statusDomain = statusRegistry\n ? statusRegistry.definitions.map((definition) => definition.id)\n : [...STATUS_VALUES];\n assertFrontMatterCondition(normalizedStatus !== undefined, `status must be one of: ${statusDomain.join(\", \")}`);\n}\n\nfunction assertPriorityAndTags(record: Record<string, unknown>): void {\n const priority = record.priority;\n assertFrontMatterCondition(\n typeof priority === \"number\" && Number.isInteger(priority) && [0, 1, 2, 3, 4].includes(priority),\n \"priority must be an integer 0..4\",\n );\n\n const tags = record.tags;\n assertFrontMatterCondition(Array.isArray(tags), \"tags must be an array\");\n for (const tag of tags as unknown[]) {\n assertFrontMatterCondition(typeof tag === \"string\", \"tags entries must be strings\");\n }\n}\n\nfunction assertConfidenceFrontMatterField(record: Record<string, unknown>): void {\n const confidence = record.confidence;\n if (confidence === undefined) {\n return;\n }\n if (typeof confidence === \"number\") {\n assertFrontMatterCondition(\n Number.isInteger(confidence) && confidence >= 0 && confidence <= 100,\n \"confidence number value must be an integer 0..100\",\n );\n return;\n }\n if (typeof confidence === \"string\") {\n const normalizedConfidence = confidence.trim().toLowerCase();\n const isKnownTextConfidence =\n normalizedConfidence === \"med\" || CONFIDENCE_TEXT_VALUES.includes(normalizedConfidence as (typeof CONFIDENCE_TEXT_VALUES)[number]);\n assertFrontMatterCondition(\n isKnownTextConfidence,\n `confidence string value must be one of: ${[...CONFIDENCE_TEXT_VALUES, \"med\"].join(\", \")}`,\n );\n return;\n }\n assertFrontMatterCondition(false, \"confidence must be a number or string\");\n}\n\nfunction assertSeverityFrontMatterField(record: Record<string, unknown>): void {\n const severity = record.severity;\n if (severity === undefined) {\n return;\n }\n if (typeof severity !== \"string\") {\n validationError(\"severity must be a string\");\n }\n const normalizedSeverity = severity.trim().toLowerCase();\n const isKnownSeverity =\n normalizedSeverity === \"med\" || ISSUE_SEVERITY_VALUES.includes(normalizedSeverity as (typeof ISSUE_SEVERITY_VALUES)[number]);\n assertFrontMatterCondition(\n isKnownSeverity,\n `severity value must be one of: ${[...ISSUE_SEVERITY_VALUES, \"med\"].join(\", \")}`,\n );\n}\n\nfunction assertRegressionFrontMatterField(record: Record<string, unknown>): void {\n if (record.regression !== undefined && typeof record.regression !== \"boolean\") {\n validationError(\"regression must be a boolean\");\n }\n}\n\nfunction assertReminderEntries(record: Record<string, unknown>): void {\n const reminders = record.reminders;\n if (reminders === undefined) {\n return;\n }\n assertFrontMatterCondition(Array.isArray(reminders), \"reminders must be an array\");\n for (const reminder of reminders as unknown[]) {\n assertFrontMatterCondition(typeof reminder === \"object\" && reminder !== null && !Array.isArray(reminder), \"reminders entries must be objects\");\n const reminderRecord = reminder as Record<string, unknown>;\n assertFrontMatterCondition(typeof reminderRecord.at === \"string\", \"reminder.at must be a string\");\n assertFrontMatterCondition(isTimestampLiteral(reminderRecord.at as string), \"reminder.at must be a valid ISO timestamp\");\n assertFrontMatterCondition(typeof reminderRecord.text === \"string\", \"reminder.text must be a string\");\n assertFrontMatterCondition((reminderRecord.text as string).trim().length > 0, \"reminder.text must not be empty\");\n }\n}\n\nfunction assertEventStringFields(eventRecord: Record<string, unknown>): void {\n for (const stringField of [\"title\", \"description\", \"location\", \"timezone\"] as const) {\n if (eventRecord[stringField] !== undefined) {\n assertFrontMatterCondition(typeof eventRecord[stringField] === \"string\", `event.${stringField} must be a string`);\n assertFrontMatterCondition(\n (eventRecord[stringField] as string).trim().length > 0,\n `event.${stringField} must not be empty`,\n );\n }\n }\n}\n\nfunction assertEventRecurrence(eventRecord: Record<string, unknown>): void {\n if (eventRecord.recurrence === undefined) {\n return;\n }\n assertValidRecurrenceRule(eventRecord.recurrence);\n if ((eventRecord.recurrence as Record<string, unknown>).until !== undefined) {\n assertFrontMatterCondition(\n compareTimestampStrings(\n (eventRecord.recurrence as Record<string, unknown>).until as string,\n eventRecord.start_at as string,\n ) >= 0,\n \"event.recurrence.until must be at or after event.start_at\",\n );\n }\n}\n\nfunction assertCalendarEventEntry(event: unknown): void {\n assertFrontMatterCondition(typeof event === \"object\" && event !== null && !Array.isArray(event), \"events entries must be objects\");\n const eventRecord = event as Record<string, unknown>;\n assertFrontMatterCondition(typeof eventRecord.start_at === \"string\", \"event.start_at must be a string\");\n assertFrontMatterCondition(isTimestampLiteral(eventRecord.start_at as string), \"event.start_at must be a valid ISO timestamp\");\n\n if (eventRecord.end_at !== undefined) {\n assertFrontMatterCondition(typeof eventRecord.end_at === \"string\", \"event.end_at must be a string\");\n assertFrontMatterCondition(isTimestampLiteral(eventRecord.end_at as string), \"event.end_at must be a valid ISO timestamp\");\n assertFrontMatterCondition(\n compareTimestampStrings(eventRecord.end_at as string, eventRecord.start_at as string) > 0,\n \"event.end_at must be after event.start_at\",\n );\n }\n\n assertEventStringFields(eventRecord);\n if (eventRecord.all_day !== undefined) {\n assertFrontMatterCondition(typeof eventRecord.all_day === \"boolean\", \"event.all_day must be a boolean\");\n }\n assertEventRecurrence(eventRecord);\n}\n\nfunction assertCalendarEvents(record: Record<string, unknown>): void {\n const events = record.events;\n if (events === undefined) {\n return;\n }\n assertFrontMatterCondition(Array.isArray(events), \"events must be an array\");\n for (const event of events as unknown[]) {\n assertCalendarEventEntry(event);\n }\n}\n\nfunction assertOptionalStringFields(record: Record<string, unknown>): void {\n for (const fieldName of [\"source_type\", \"source_owner\", \"design\", \"external_ref\"] as const) {\n const value = record[fieldName];\n if (value !== undefined) {\n assertFrontMatterCondition(typeof value === \"string\", `${fieldName} must be a string`);\n }\n }\n}\n\nfunction assertTypeOptionsField(record: Record<string, unknown>): void {\n const typeOptions = record.type_options;\n if (typeOptions === undefined) {\n return;\n }\n assertFrontMatterCondition(\n typeof typeOptions === \"object\" && typeOptions !== null && !Array.isArray(typeOptions),\n \"type_options must be an object\",\n );\n for (const [optionKey, optionValue] of Object.entries(typeOptions as Record<string, unknown>)) {\n assertFrontMatterCondition(optionKey.trim().length > 0, \"type_options keys must be non-empty\");\n assertFrontMatterCondition(typeof optionValue === \"string\", \"type_options values must be strings\");\n const optionText = optionValue as string;\n assertFrontMatterCondition(optionText.trim().length > 0, \"type_options values must be non-empty strings\");\n }\n}\n\nfunction coerceRuntimeFrontMatterFields(\n record: Record<string, unknown>,\n itemType: string,\n runtimeContext?: RuntimeSchemaValidationContext,\n): void {\n if (!runtimeContext?.fieldRegistry) {\n return;\n }\n for (const definition of runtimeContext.fieldRegistry.definitions) {\n const fieldValue = record[definition.metadata_key];\n if (fieldValue === undefined) {\n if (runtimeFieldRequiredForType(definition, itemType)) {\n validationError(`missing required schema field: ${definition.metadata_key}`);\n }\n continue;\n }\n try {\n record[definition.metadata_key] = coerceRuntimeFieldValue(\n definition,\n fieldValue,\n `metadata field \"${definition.metadata_key}\"`,\n );\n } catch (error: unknown) {\n validationError(String((error as { message?: unknown })?.message).replace(/^Invalid\\s+/u, \"\"));\n }\n }\n}\n\nfunction assertRuntimeUnknownFrontMatterFields(\n record: Record<string, unknown>,\n runtimeContext?: RuntimeSchemaValidationContext,\n): void {\n if (!runtimeContext || runtimeContext.unknownFieldPolicy === \"allow\") {\n return;\n }\n const knownKeys = buildKnownFrontMatterKeys(runtimeContext);\n const unknownKeys = Object.keys(record).filter((key) => !knownKeys.has(key)).sort((left, right) => left.localeCompare(right));\n if (unknownKeys.length === 0) {\n return;\n }\n if (runtimeContext.unknownFieldPolicy === \"reject\") {\n validationError(`unknown schema fields are not allowed: ${unknownKeys.join(\", \")}`);\n } else {\n runtimeContext.onWarning?.(`item_unknown_schema_fields:${unknownKeys.join(\",\")}`);\n }\n}\n\nfunction assertValidFrontMatter(\n frontMatter: unknown,\n runtimeContext?: RuntimeSchemaValidationContext,\n): asserts frontMatter is ItemMetadata {\n assertFrontMatterCondition(\n typeof frontMatter === \"object\" && frontMatter !== null && !Array.isArray(frontMatter),\n \"front matter must be an object\",\n );\n\n const record = frontMatter as Record<string, unknown>;\n const itemType = assertRequiredFrontMatterFields(record);\n assertStatusFrontMatterField(record, runtimeContext);\n assertPriorityAndTags(record);\n assertConfidenceFrontMatterField(record);\n assertSeverityFrontMatterField(record);\n assertRegressionFrontMatterField(record);\n assertTimestampField(record, \"created_at\");\n assertTimestampField(record, \"updated_at\");\n if (record.deadline !== undefined) {\n assertTimestampField(record, \"deadline\");\n }\n assertReminderEntries(record);\n assertCalendarEvents(record);\n assertOptionalTimestampString(record, \"closed_at\", \"closed_at\");\n assertOptionalStringFields(record);\n assertTypeOptionsField(record);\n coerceRuntimeFrontMatterFields(record, itemType, runtimeContext);\n assertRuntimeUnknownFrontMatterFields(record, runtimeContext);\n}\n\nfunction sortDependencies(values: Dependency[] | undefined): Dependency[] | undefined {\n if (!values || values.length === 0) return undefined;\n return [...values]\n .map((value) => ({\n id: value.id.trim().toLowerCase(),\n kind: value.kind,\n created_at: value.created_at,\n author: value.author?.trim() || undefined,\n source_kind: value.source_kind?.trim() || undefined,\n }))\n .sort((a, b) => {\n const byCreated = compareTimestampStrings(a.created_at, b.created_at);\n if (byCreated !== 0) return byCreated;\n const byId = a.id.localeCompare(b.id);\n if (byId !== 0) return byId;\n const byKind = a.kind.localeCompare(b.kind);\n if (byKind !== 0) return byKind;\n return (a.source_kind ?? \"\").localeCompare(b.source_kind ?? \"\");\n });\n}\n\nfunction sortLogValues<T extends Comment | LogNote>(values: T[] | undefined): T[] | undefined {\n if (!values || values.length === 0) return undefined;\n return [...values].sort((a, b) => {\n const byCreated = compareTimestampStrings(a.created_at, b.created_at);\n if (byCreated !== 0) return byCreated;\n const byText = a.text.localeCompare(b.text);\n if (byText !== 0) return byText;\n return a.author.localeCompare(b.author);\n });\n}\n\nfunction sortReminders(values: Reminder[] | undefined): Reminder[] | undefined {\n if (!values || values.length === 0) return undefined;\n const normalized = [...values]\n .map((value) => ({\n at: value.at,\n text: value.text.trim(),\n }))\n .filter((value) => value.text.length > 0)\n .sort((a, b) => {\n const byAt = compareTimestampStrings(a.at, b.at);\n if (byAt !== 0) return byAt;\n return a.text.localeCompare(b.text);\n });\n return normalized.length === 0 ? undefined : normalized;\n}\n\nfunction normalizeRecurrenceRule(value: RecurrenceRule | undefined): RecurrenceRule | undefined {\n if (!value) {\n return undefined;\n }\n const normalizedFrequency = value.freq.trim().toLowerCase();\n if (!RECURRENCE_FREQUENCY_VALUES.includes(normalizedFrequency as (typeof RECURRENCE_FREQUENCY_VALUES)[number])) {\n return undefined;\n }\n\n const byWeekday = Array.from(\n new Set(\n (value.by_weekday ?? [])\n .map((weekday) => weekday.trim().toLowerCase())\n .filter((weekday) => RECURRENCE_WEEKDAY_VALUES.includes(weekday as (typeof RECURRENCE_WEEKDAY_VALUES)[number])),\n ),\n ).sort(\n (a, b) =>\n weekdayOrderIndex(a as (typeof RECURRENCE_WEEKDAY_VALUES)[number]) -\n weekdayOrderIndex(b as (typeof RECURRENCE_WEEKDAY_VALUES)[number]),\n );\n\n const byMonthDay = Array.from(\n new Set(\n (value.by_month_day ?? [])\n .filter((day) => Number.isInteger(day) && day >= 1 && day <= 31)\n .map((day) => day as number),\n ),\n ).sort((a, b) => a - b);\n\n const exdates = Array.from(\n new Set(\n (value.exdates ?? [])\n .map((timestamp) => timestamp.trim())\n .filter((timestamp) => isTimestampLiteral(timestamp)),\n ),\n ).sort((a, b) => compareTimestampStrings(a, b));\n\n const normalized: RecurrenceRule = {\n freq: normalizedFrequency as (typeof RECURRENCE_FREQUENCY_VALUES)[number],\n interval: value.interval !== undefined && value.interval > 1 ? value.interval : undefined,\n count: value.count,\n until: value.until?.trim() || undefined,\n by_weekday: byWeekday.length > 0 ? (byWeekday as (typeof RECURRENCE_WEEKDAY_VALUES)[number][]) : undefined,\n by_month_day: byMonthDay.length > 0 ? byMonthDay : undefined,\n exdates: exdates.length > 0 ? exdates : undefined,\n };\n for (const [key, fieldValue] of Object.entries(normalized)) {\n if (fieldValue === undefined) {\n delete (normalized as unknown as Record<string, unknown>)[key];\n }\n }\n return normalized;\n}\n\nfunction sortEvents(values: CalendarEvent[] | undefined): CalendarEvent[] | undefined {\n if (!Array.isArray(values) || values.length === 0) {\n return undefined;\n }\n const normalized = [...values].map(normalizeCalendarEvent).sort(compareCalendarEvents);\n return normalized;\n}\n\nfunction normalizeCalendarEvent(value: CalendarEvent): CalendarEvent {\n const event: CalendarEvent = {\n start_at: value.start_at,\n end_at: value.end_at || undefined,\n title: value.title?.trim() || undefined,\n description: value.description?.trim() || undefined,\n location: value.location?.trim() || undefined,\n all_day: value.all_day,\n timezone: value.timezone?.trim() || undefined,\n recurrence: normalizeRecurrenceRule(value.recurrence),\n };\n deleteUndefinedFields(event as unknown as Record<string, unknown>);\n return event;\n}\n\nfunction compareCalendarEvents(a: CalendarEvent, b: CalendarEvent): number {\n return firstNonZeroComparison([\n compareTimestampStrings(a.start_at, b.start_at),\n (a.end_at ?? \"\").localeCompare(b.end_at ?? \"\"),\n (a.title ?? \"\").localeCompare(b.title ?? \"\"),\n Number(Boolean(a.all_day)) - Number(Boolean(b.all_day)),\n (a.timezone ?? \"\").localeCompare(b.timezone ?? \"\"),\n (a.location ?? \"\").localeCompare(b.location ?? \"\"),\n (a.description ?? \"\").localeCompare(b.description ?? \"\"),\n JSON.stringify(a.recurrence ?? {}).localeCompare(JSON.stringify(b.recurrence ?? {})),\n ]);\n}\n\nfunction normalizeFiles(values: LinkedFile[] | undefined): LinkedFile[] | undefined {\n if (!values || values.length === 0) return undefined;\n return values\n .map((value) => ({\n path: normalizePathValue(value.path),\n scope: value.scope,\n note: value.note?.trim() || undefined,\n }));\n}\n\nfunction normalizeTestRunSummaries(values: ItemTestRunSummary[] | undefined): ItemTestRunSummary[] | undefined {\n if (!values || values.length === 0) return undefined;\n const normalized = values\n .map(normalizeTestRunSummary)\n .filter((value) => value.run_id.length > 0 && value.started_at.length > 0 && value.finished_at.length > 0 && value.recorded_at.length > 0)\n .sort((a, b) =>\n firstNonZeroComparison([\n compareTimestampStrings(a.recorded_at, b.recorded_at),\n a.run_id.localeCompare(b.run_id),\n a.kind.localeCompare(b.kind),\n ]),\n );\n return normalized.length > 0 ? normalized : undefined;\n}\n\nfunction normalizeNonNegativeInteger(value: unknown): number | undefined {\n return typeof value === \"number\" && Number.isFinite(value) && value >= 0 ? Math.floor(value) : undefined;\n}\n\nfunction normalizePositiveInteger(value: unknown): number | undefined {\n return typeof value === \"number\" && Number.isFinite(value) && value >= 1 ? Math.floor(value) : undefined;\n}\n\nfunction stringOrEmpty(value: unknown): string {\n return typeof value === \"string\" ? value : \"\";\n}\n\nfunction normalizeTestRunSummary(value: ItemTestRunSummary): ItemTestRunSummary {\n const runId = typeof value.run_id === \"string\" ? value.run_id.trim() : \"\";\n const kind = value.kind === \"test\" || value.kind === \"test-all\" ? value.kind : \"test\";\n const status = ITEM_TEST_RUN_STATUS_VALUES.has(value.status) ? value.status : \"failed\";\n const summary: ItemTestRunSummary = {\n run_id: runId,\n kind,\n status,\n started_at: stringOrEmpty(value.started_at),\n finished_at: stringOrEmpty(value.finished_at),\n recorded_at: stringOrEmpty(value.recorded_at),\n attempt: normalizePositiveInteger(value.attempt),\n resumed_from: value.resumed_from?.trim() || undefined,\n passed: normalizeNonNegativeInteger(value.passed) ?? 0,\n failed: normalizeNonNegativeInteger(value.failed) ?? 0,\n skipped: normalizeNonNegativeInteger(value.skipped) ?? 0,\n items: normalizeNonNegativeInteger(value.items),\n linked_tests: normalizeNonNegativeInteger(value.linked_tests),\n fail_on_skipped_triggered: value.fail_on_skipped_triggered === true ? true : undefined,\n };\n deleteUndefinedFields(summary as unknown as Record<string, unknown>);\n return summary;\n}\n\nfunction sortTests(values: LinkedTest[] | undefined): LinkedTest[] | undefined {\n if (!Array.isArray(values) || values.length === 0) return undefined;\n return [...values].map(normalizeLinkedTest).sort(compareLinkedTests);\n}\n\nfunction normalizeTrimmedStringList(value: readonly string[] | undefined): string[] | undefined {\n if (!Array.isArray(value)) {\n return undefined;\n }\n const normalized = [\n ...new Set(\n value\n .filter((entry) => typeof entry === \"string\")\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0),\n ),\n ].sort((a, b) => a.localeCompare(b));\n return normalized.length > 0 ? normalized : undefined;\n}\n\nfunction isPlainObjectRecord(value: unknown): value is Record<string, unknown> {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return false;\n }\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\n\nfunction isUnsafeObjectKey(key: string): boolean {\n return key === \"__proto__\" || key === \"constructor\" || key === \"prototype\";\n}\n\nfunction normalizeStringRecord(value: Record<string, string> | undefined): Record<string, string> | undefined {\n if (!isPlainObjectRecord(value)) {\n return undefined;\n }\n const entries = Object.entries(value)\n .map(([key, recordValue]) => [key.trim(), String(recordValue).trim()] as const)\n .filter(([key, recordValue]) => key.length > 0 && !isUnsafeObjectKey(key) && recordValue.length > 0)\n .sort(([left], [right]) => left.localeCompare(right));\n return entries.length > 0 ? Object.fromEntries(entries) : undefined;\n}\n\nfunction normalizeNumericRecord(value: Record<string, number> | undefined): Record<string, number> | undefined {\n if (!isPlainObjectRecord(value)) {\n return undefined;\n }\n const entries = Object.entries(value)\n .map(([key, recordValue]) => [key.trim(), Number(recordValue)] as const)\n .filter(([key, recordValue]) => key.length > 0 && !isUnsafeObjectKey(key) && Number.isFinite(recordValue))\n .sort(([left], [right]) => left.localeCompare(right));\n return entries.length > 0 ? Object.fromEntries(entries) : undefined;\n}\n\nfunction normalizeLinkedTestContextMode(value: string | undefined): LinkedTest[\"pm_context_mode\"] | undefined {\n const normalized = value?.trim().toLowerCase();\n if (!normalized || !LINKED_TEST_PM_CONTEXT_MODE_VALUES.has(normalized)) {\n return undefined;\n }\n return normalized as LinkedTest[\"pm_context_mode\"];\n}\n\nfunction normalizeLinkedTest(value: LinkedTest): LinkedTest {\n const test: LinkedTest = {\n command: value.command?.trim() || undefined,\n path: value.path ? normalizePathValue(value.path) : undefined,\n scope: value.scope,\n timeout_seconds:\n typeof value.timeout_seconds === \"number\" && Number.isFinite(value.timeout_seconds) && value.timeout_seconds > 0\n ? value.timeout_seconds\n : undefined,\n pm_context_mode: normalizeLinkedTestContextMode(value.pm_context_mode),\n env_set: normalizeStringRecord(value.env_set),\n env_clear: normalizeTrimmedStringList(value.env_clear),\n shared_host_safe: value.shared_host_safe === true ? true : undefined,\n assert_stdout_contains: normalizeTrimmedStringList(value.assert_stdout_contains),\n assert_stdout_regex: normalizeTrimmedStringList(value.assert_stdout_regex),\n assert_stderr_contains: normalizeTrimmedStringList(value.assert_stderr_contains),\n assert_stderr_regex: normalizeTrimmedStringList(value.assert_stderr_regex),\n assert_stdout_min_lines: normalizeNonNegativeInteger(value.assert_stdout_min_lines),\n assert_json_field_equals: normalizeStringRecord(value.assert_json_field_equals),\n assert_json_field_gte: normalizeNumericRecord(value.assert_json_field_gte),\n note: value.note?.trim() || undefined,\n };\n deleteUndefinedFields(test as unknown as Record<string, unknown>);\n return test;\n}\n\nfunction compareLinkedTests(a: LinkedTest, b: LinkedTest): number {\n return firstNonZeroComparison([\n a.scope.localeCompare(b.scope),\n compareOptionalStrings(a.path, b.path),\n compareOptionalStrings(a.command, b.command),\n compareOptionalNumbers(a.timeout_seconds, b.timeout_seconds),\n compareOptionalStrings(a.pm_context_mode, b.pm_context_mode),\n Number(Boolean(a.shared_host_safe)) - Number(Boolean(b.shared_host_safe)),\n compareJsonValues(a.env_clear, b.env_clear, []),\n compareJsonValues(a.env_set, b.env_set, {}),\n compareJsonValues(a.assert_stdout_contains, b.assert_stdout_contains, []),\n compareJsonValues(a.assert_stdout_regex, b.assert_stdout_regex, []),\n compareJsonValues(a.assert_stderr_contains, b.assert_stderr_contains, []),\n compareJsonValues(a.assert_stderr_regex, b.assert_stderr_regex, []),\n compareOptionalNumbers(a.assert_stdout_min_lines, b.assert_stdout_min_lines),\n compareJsonValues(a.assert_json_field_equals, b.assert_json_field_equals, {}),\n compareJsonValues(a.assert_json_field_gte, b.assert_json_field_gte, {}),\n compareOptionalStrings(a.note, b.note),\n ]);\n}\n\nfunction compareOptionalStrings(left: string | undefined, right: string | undefined): number {\n return (left ?? \"\").localeCompare(right ?? \"\");\n}\n\nfunction compareOptionalNumbers(left: number | undefined, right: number | undefined): number {\n return (left ?? 0) - (right ?? 0);\n}\n\nfunction compareJsonValues(left: unknown, right: unknown, fallback: unknown): number {\n return JSON.stringify(left ?? fallback).localeCompare(JSON.stringify(right ?? fallback));\n}\n\nfunction sortDocs(values: LinkedDoc[] | undefined): LinkedDoc[] | undefined {\n if (!values || values.length === 0) return undefined;\n return [...values]\n .map((value) => ({\n path: normalizePathValue(value.path),\n scope: value.scope,\n note: value.note?.trim() || undefined,\n }))\n .sort((a, b) => {\n const byScope = a.scope.localeCompare(b.scope);\n if (byScope !== 0) return byScope;\n const byPath = a.path.localeCompare(b.path);\n if (byPath !== 0) return byPath;\n return (a.note ?? \"\").localeCompare(b.note ?? \"\");\n });\n}\n\nfunction trimStringOrUndefined(value: unknown): string | undefined {\n if (typeof value !== \"string\") return undefined;\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\nfunction normalizePlanStepLinks(value: unknown): PlanStepLink[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanStepLink[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const id = trimStringOrUndefined(record.id);\n const kind = trimStringOrUndefined(record.kind);\n if (!id || !kind) continue;\n const link: PlanStepLink = { id, kind: kind as PlanStepLink[\"kind\"] };\n const note = trimStringOrUndefined(record.note);\n if (note) link.note = note;\n if (record.required_before_step === true) link.required_before_step = true;\n out.push(link);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanStepFiles(value: unknown): PlanStepFile[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanStepFile[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const path = trimStringOrUndefined(record.path);\n if (!path) continue;\n const file: PlanStepFile = { path: normalizePathValue(path) };\n if (record.scope === \"project\" || record.scope === \"global\") file.scope = record.scope;\n const note = trimStringOrUndefined(record.note);\n if (note) file.note = note;\n out.push(file);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanStepTests(value: unknown): { command?: string; path?: string; note?: string }[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: { command?: string; path?: string; note?: string }[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const command = trimStringOrUndefined(record.command);\n const path = trimStringOrUndefined(record.path);\n if (!command && !path) continue;\n const test: { command?: string; path?: string; note?: string } = {};\n if (command) test.command = command;\n if (path) test.path = normalizePathValue(path);\n const note = trimStringOrUndefined(record.note);\n if (note) test.note = note;\n out.push(test);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanStepDocs(value: unknown): PlanStepDoc[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanStepDoc[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const path = trimStringOrUndefined(record.path);\n if (!path) continue;\n const doc: PlanStepDoc = { path: normalizePathValue(path) };\n if (record.scope === \"project\" || record.scope === \"global\") doc.scope = record.scope;\n const note = trimStringOrUndefined(record.note);\n if (note) doc.note = note;\n out.push(doc);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanStepEntry(entry: unknown): PlanStep | undefined {\n if (entry === null || typeof entry !== \"object\") {\n return undefined;\n }\n const record = entry as Record<string, unknown>;\n const id = trimStringOrUndefined(record.id);\n const title = trimStringOrUndefined(record.title);\n const statusRaw = trimStringOrUndefined(record.status);\n const status = statusRaw && PLAN_STEP_STATUS_SET.has(statusRaw) ? (statusRaw as PlanStepStatus) : undefined;\n const orderRaw = record.order;\n const order =\n typeof orderRaw === \"number\" && Number.isFinite(orderRaw)\n ? orderRaw\n : typeof orderRaw === \"string\" && orderRaw.trim().length > 0\n ? Number(orderRaw)\n : Number.NaN;\n const created_at = typeof record.created_at === \"string\" ? record.created_at : \"\";\n const updated_at = typeof record.updated_at === \"string\" ? record.updated_at : \"\";\n if (!id || !title || !status || !Number.isFinite(order) || !created_at || !updated_at) {\n return undefined;\n }\n const step: PlanStep = {\n id,\n order,\n title,\n status,\n created_at,\n updated_at,\n };\n applyPlanStepOptionalFields(step, record);\n return step;\n}\n\nfunction applyPlanStepOptionalFields(step: PlanStep, record: Record<string, unknown>): void {\n const stringFields = [\n [\"body\", \"body\"],\n [\"owner\", \"owner\"],\n [\"evidence\", \"evidence\"],\n [\"blocked_reason\", \"blocked_reason\"],\n [\"superseded_by\", \"superseded_by\"],\n ] as const satisfies readonly (readonly [keyof PlanStep, string])[];\n for (const [target, source] of stringFields) {\n const value = trimStringOrUndefined(record[source]);\n if (value) {\n step[target] = value as never;\n }\n }\n const completedAt = typeof record.completed_at === \"string\" ? record.completed_at : undefined;\n if (completedAt && completedAt.length > 0) {\n step.completed_at = completedAt;\n }\n const collectionFields = [\n [\"linked_items\", \"linked_items\", normalizePlanStepLinks],\n [\"files\", \"files\", normalizePlanStepFiles],\n [\"tests\", \"tests\", normalizePlanStepTests],\n [\"docs\", \"docs\", normalizePlanStepDocs],\n ] as const;\n for (const [target, source, normalize] of collectionFields) {\n const value = normalize(record[source]);\n if (value) {\n step[target] = value as never;\n }\n }\n}\n\nfunction normalizePlanSteps(value: unknown): PlanStep[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out = value.flatMap((entry) => {\n const step = normalizePlanStepEntry(entry);\n return step ? [step] : [];\n });\n out.sort((left, right) => left.order - right.order);\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanDecisions(value: unknown): PlanDecision[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanDecision[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const ts = typeof record.ts === \"string\" ? record.ts : \"\";\n const author = typeof record.author === \"string\" ? record.author : \"\";\n const decision = trimStringOrUndefined(record.decision);\n if (!ts || !author || !decision) continue;\n const item: PlanDecision = { ts, author, decision };\n const rationale = trimStringOrUndefined(record.rationale);\n if (rationale) item.rationale = rationale;\n const evidence = trimStringOrUndefined(record.evidence);\n if (evidence) item.evidence = evidence;\n const stepId = trimStringOrUndefined(record.step_id);\n if (stepId) item.step_id = stepId;\n out.push(item);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanDiscoveries(value: unknown): PlanDiscovery[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanDiscovery[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const ts = typeof record.ts === \"string\" ? record.ts : \"\";\n const author = typeof record.author === \"string\" ? record.author : \"\";\n const text = trimStringOrUndefined(record.text);\n if (!ts || !author || !text) continue;\n const item: PlanDiscovery = { ts, author, text };\n const stepId = trimStringOrUndefined(record.step_id);\n if (stepId) item.step_id = stepId;\n out.push(item);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanValidation(value: unknown): PlanValidationCheck[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanValidationCheck[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const text = trimStringOrUndefined(record.text);\n if (!text) continue;\n const item: PlanValidationCheck = { text };\n const command = trimStringOrUndefined(record.command);\n if (command) item.command = command;\n const expected = trimStringOrUndefined(record.expected);\n if (expected) item.expected = expected;\n out.push(item);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizeTypeOptions(values: Record<string, string> | undefined): Record<string, string> | undefined {\n if (!values) {\n return undefined;\n }\n const normalizedEntries = Object.entries(values)\n .map(([key, value]) => [key.trim(), value.trim()] as const)\n .filter(([key, value]) => key.length > 0 && value.length > 0)\n .sort((left, right) => left[0].localeCompare(right[0]));\n if (normalizedEntries.length === 0) {\n return undefined;\n }\n return Object.fromEntries(normalizedEntries);\n}\n\nfunction normalizeBody(body: string): string {\n let start = 0;\n while (start < body.length && body[start] === \"\\n\") {\n start += 1;\n }\n return body.slice(start).trimEnd();\n}\n\nfunction normalizeConfidenceValue(value: ItemMetadata[\"confidence\"] | undefined): ItemMetadata[\"confidence\"] | undefined {\n if (value === undefined) {\n return undefined;\n }\n if (typeof value === \"number\") {\n return value;\n }\n const normalized = value.trim().toLowerCase();\n if (normalized === \"med\") {\n return \"medium\";\n }\n if (CONFIDENCE_TEXT_VALUES.includes(normalized as (typeof CONFIDENCE_TEXT_VALUES)[number])) {\n return normalized as (typeof CONFIDENCE_TEXT_VALUES)[number];\n }\n return undefined;\n}\n\nfunction normalizeSeverityValue(value: ItemMetadata[\"severity\"] | undefined): ItemMetadata[\"severity\"] | undefined {\n if (value === undefined) {\n return undefined;\n }\n const normalized = value.trim().toLowerCase();\n if (normalized === \"med\") {\n return \"medium\";\n }\n if (ISSUE_SEVERITY_VALUES.includes(normalized as (typeof ISSUE_SEVERITY_VALUES)[number])) {\n return normalized as (typeof ISSUE_SEVERITY_VALUES)[number];\n }\n return undefined;\n}\n\nfunction emptyStringToUndefined(value: string | undefined): string | undefined {\n return value || undefined;\n}\n\nfunction copyExtensionFrontMatterFields(normalized: ItemMetadata, source: ItemMetadata): void {\n const targetRecord = normalized as unknown as Record<string, unknown>;\n const sourceRecord = source as unknown as Record<string, unknown>;\n for (const [key, value] of Object.entries(sourceRecord)) {\n if (isUnsafeObjectKey(key) || Object.prototype.hasOwnProperty.call(targetRecord, key) || value === undefined) {\n continue;\n }\n targetRecord[key] = value;\n }\n}\n\nfunction coerceNormalizedRuntimeFields(\n normalized: ItemMetadata,\n runtimeContext: RuntimeSchemaValidationContext | undefined,\n): void {\n if (!runtimeContext?.fieldRegistry) {\n return;\n }\n const record = normalized as unknown as Record<string, unknown>;\n for (const definition of runtimeContext.fieldRegistry.definitions) {\n const currentValue = record[definition.metadata_key];\n if (currentValue === undefined) {\n continue;\n }\n record[definition.metadata_key] = coerceRuntimeFieldValue(\n definition,\n currentValue,\n `metadata field \"${definition.metadata_key}\"`,\n );\n }\n}\n\nfunction assertNormalizedUnknownFields(\n normalized: ItemMetadata,\n runtimeContext: RuntimeSchemaValidationContext | undefined,\n): void {\n if (!runtimeContext || runtimeContext.unknownFieldPolicy === \"allow\") {\n return;\n }\n const knownKeys = buildKnownFrontMatterKeys(runtimeContext);\n const record = normalized as unknown as Record<string, unknown>;\n const unknownKeys = Object.keys(record)\n .filter((key) => !knownKeys.has(key))\n .sort((left, right) => left.localeCompare(right));\n if (unknownKeys.length > 0 && runtimeContext.unknownFieldPolicy === \"reject\") {\n validationError(`unknown schema fields are not allowed: ${unknownKeys.join(\", \")}`);\n }\n if (unknownKeys.length > 0) {\n runtimeContext.onWarning?.(`item_unknown_schema_fields:${unknownKeys.join(\",\")}`);\n }\n}\n\n/**\n * Implements normalize front matter for the public runtime surface of this module.\n */\nexport function normalizeFrontMatter(\n frontMatter: ItemMetadata,\n options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\"> = {},\n): ItemMetadata {\n const runtimeContext = resolveRuntimeSchemaValidationContext(options);\n const normalizedStatus = normalizeStatusInput(frontMatter.status, runtimeContext?.statusRegistry) ?? frontMatter.status;\n const tags = Array.from(new Set(frontMatter.tags.map((tag) => tag.trim().toLowerCase()).filter(Boolean))).sort((a, b) =>\n a.localeCompare(b),\n );\n const normalized: ItemMetadata = {\n id: frontMatter.id,\n title: frontMatter.title,\n description: frontMatter.description,\n type: frontMatter.type,\n pm_format_version: normalizeItemFormatVersion(frontMatter.pm_format_version),\n source_type: trimStringOrUndefined(frontMatter.source_type),\n type_options: normalizeTypeOptions(frontMatter.type_options),\n status: normalizedStatus,\n priority: frontMatter.priority,\n tags,\n created_at: frontMatter.created_at,\n updated_at: frontMatter.updated_at,\n dependencies: sortDependencies(frontMatter.dependencies),\n comments: sortLogValues(frontMatter.comments),\n notes: sortLogValues(frontMatter.notes),\n learnings: sortLogValues(frontMatter.learnings),\n files: normalizeFiles(frontMatter.files),\n tests: sortTests(frontMatter.tests),\n test_runs: normalizeTestRunSummaries(frontMatter.test_runs),\n docs: sortDocs(frontMatter.docs),\n deadline: emptyStringToUndefined(frontMatter.deadline),\n reminders: sortReminders(frontMatter.reminders),\n events: sortEvents(frontMatter.events),\n closed_at: emptyStringToUndefined(frontMatter.closed_at),\n assignee: trimStringOrUndefined(frontMatter.assignee),\n source_owner: trimStringOrUndefined(frontMatter.source_owner),\n author: emptyStringToUndefined(frontMatter.author),\n estimated_minutes: frontMatter.estimated_minutes,\n acceptance_criteria: frontMatter.acceptance_criteria ?? undefined,\n design: frontMatter.design ?? undefined,\n external_ref: frontMatter.external_ref ?? undefined,\n definition_of_ready: trimStringOrUndefined(frontMatter.definition_of_ready),\n order: frontMatter.order,\n goal: trimStringOrUndefined(frontMatter.goal),\n objective: trimStringOrUndefined(frontMatter.objective),\n value: trimStringOrUndefined(frontMatter.value),\n impact: trimStringOrUndefined(frontMatter.impact),\n outcome: trimStringOrUndefined(frontMatter.outcome),\n why_now: trimStringOrUndefined(frontMatter.why_now),\n parent: trimStringOrUndefined(frontMatter.parent),\n reviewer: trimStringOrUndefined(frontMatter.reviewer),\n risk: frontMatter.risk ?? undefined,\n confidence: normalizeConfidenceValue(frontMatter.confidence),\n sprint: trimStringOrUndefined(frontMatter.sprint),\n release: trimStringOrUndefined(frontMatter.release),\n blocked_by: trimStringOrUndefined(frontMatter.blocked_by),\n blocked_reason: trimStringOrUndefined(frontMatter.blocked_reason),\n unblock_note: trimStringOrUndefined(frontMatter.unblock_note),\n reporter: trimStringOrUndefined(frontMatter.reporter),\n severity: normalizeSeverityValue(frontMatter.severity),\n environment: trimStringOrUndefined(frontMatter.environment),\n repro_steps: trimStringOrUndefined(frontMatter.repro_steps),\n resolution: trimStringOrUndefined(frontMatter.resolution),\n expected_result: trimStringOrUndefined(frontMatter.expected_result),\n actual_result: trimStringOrUndefined(frontMatter.actual_result),\n affected_version: trimStringOrUndefined(frontMatter.affected_version),\n fixed_version: trimStringOrUndefined(frontMatter.fixed_version),\n component: trimStringOrUndefined(frontMatter.component),\n regression: frontMatter.regression,\n customer_impact: trimStringOrUndefined(frontMatter.customer_impact),\n close_reason: emptyStringToUndefined(frontMatter.close_reason),\n plan_mode: trimStringOrUndefined(frontMatter.plan_mode) as ItemMetadata[\"plan_mode\"],\n plan_scope: trimStringOrUndefined(frontMatter.plan_scope),\n plan_harness: trimStringOrUndefined(frontMatter.plan_harness) as ItemMetadata[\"plan_harness\"],\n plan_resume_context: trimStringOrUndefined(frontMatter.plan_resume_context),\n plan_steps: normalizePlanSteps(frontMatter.plan_steps),\n plan_decisions: normalizePlanDecisions(frontMatter.plan_decisions),\n plan_discoveries: normalizePlanDiscoveries(frontMatter.plan_discoveries),\n plan_validation: normalizePlanValidation(frontMatter.plan_validation),\n };\n copyExtensionFrontMatterFields(normalized, frontMatter);\n coerceNormalizedRuntimeFields(normalized, runtimeContext);\n assertNormalizedUnknownFields(normalized, runtimeContext);\n deleteUndefinedFields(normalized as unknown as Record<string, unknown>);\n return normalized;\n}\n\nfunction orderFrontMatter(frontMatter: ItemMetadata): Record<string, unknown> {\n return orderObject(frontMatter as unknown as Record<string, unknown>, FRONT_MATTER_KEY_ORDER);\n}\n\nfunction findJsonObjectEnd(content: string): number {\n let depth = 0;\n let inString = false;\n let escaped = false;\n\n for (let i = 0; i < content.length; i += 1) {\n const char = content[i];\n if (inString) {\n if (escaped) {\n escaped = false;\n continue;\n }\n if (char === \"\\\\\") {\n escaped = true;\n continue;\n }\n if (char === \"\\\"\") {\n inString = false;\n }\n continue;\n }\n if (char === \"\\\"\") {\n inString = true;\n continue;\n }\n if (char === \"{\") {\n depth += 1;\n continue;\n }\n if (char === \"}\") {\n depth -= 1;\n if (depth === 0) {\n return i;\n }\n }\n }\n\n return -1;\n}\n\n/**\n * Implements split front matter for the public runtime surface of this module.\n */\nexport function splitFrontMatter(content: string): { frontMatter: string; body: string } {\n if (!content.startsWith(\"{\")) {\n return { frontMatter: \"\", body: content };\n }\n const end = findJsonObjectEnd(content);\n if (end < 0) {\n return { frontMatter: \"\", body: content };\n }\n const frontMatter = content.slice(0, end + 1);\n const body = content.slice(end + 1).replace(/^\\r?\\n+/, \"\");\n return { frontMatter, body };\n}\n\nfunction stripLeadingYamlDocument(content: string): { content: string; stripped: boolean } {\n const normalizedContent = content.charCodeAt(0) === 0xfeff ? content.slice(1) : content;\n const opener = normalizedContent.match(/^[ \\t]*---[ \\t]*(?:\\r?\\n|$)/);\n if (!opener) {\n return { content: normalizedContent, stripped: false };\n }\n\n let cursor = opener[0].length;\n while (cursor < normalizedContent.length) {\n const nextNewline = normalizedContent.indexOf(\"\\n\", cursor);\n const lineEnd = nextNewline === -1 ? normalizedContent.length : nextNewline;\n const line = normalizedContent.slice(cursor, lineEnd).replace(/\\r$/, \"\");\n const afterLine = nextNewline === -1 ? lineEnd : lineEnd + 1;\n if (line.trim() === \"---\") {\n return { content: normalizedContent.slice(afterLine).replace(/^\\s+/, \"\"), stripped: true };\n }\n cursor = afterLine;\n }\n\n return { content: normalizedContent, stripped: false };\n}\n\nfunction normalizeParsedFrontMatter(\n frontMatter: ItemMetadata,\n options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\">,\n): ItemMetadata {\n return normalizeFrontMatter(frontMatter, { ...options, onWarning: undefined });\n}\n\nfunction parseJsonMarkdownItemDocument(\n content: string,\n runtimeContext?: RuntimeSchemaValidationContext,\n options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\"> = {},\n): ItemDocument {\n const normalized = stripLeadingYamlDocument(content);\n if (normalized.stripped) {\n options.onWarning?.(\"json_markdown_leading_yaml_frontmatter_ignored\");\n }\n const { frontMatter, body } = splitFrontMatter(normalized.content);\n if (!frontMatter) {\n const trimmed = content.trimStart();\n if (trimmed.startsWith(\"{\")) {\n validationError(\"JSON front matter is not valid JSON\");\n }\n validationError(\"missing JSON front matter\");\n }\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(frontMatter);\n } catch {\n validationError(\"JSON front matter is not valid JSON\");\n }\n assertValidFrontMatter(parsed, runtimeContext);\n\n return {\n metadata: normalizeParsedFrontMatter(parsed, options),\n body: normalizeBody(body),\n };\n}\n\nfunction parseToonItemDocument(\n content: string,\n runtimeContext?: RuntimeSchemaValidationContext,\n options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\"> = {},\n): ItemDocument {\n let parsed: unknown;\n try {\n // decodeToonItemContent transparently recovers documents that the upstream\n // strict decoder rejects (bracketed-token-then-colon inside a quoted value;\n // see toon-decode.ts). The recovery is lossless, so it stays silent rather\n // than emitting a per-read warning that would perpetually flip pm health\n // red for legacy files. The behavior is pinned by toon-decode.spec.ts.\n parsed = decodeToonItemContent(content).value;\n } catch {\n validationError(\"TOON item document is not valid TOON\");\n }\n assertFrontMatterCondition(\n typeof parsed === \"object\" && parsed !== null && !Array.isArray(parsed),\n \"TOON item document must be an object\",\n );\n const record = parsed as Record<string, unknown>;\n\n if (Object.prototype.hasOwnProperty.call(record, \"front_matter\")) {\n assertValidFrontMatter(record.front_matter, runtimeContext);\n assertFrontMatterCondition(\n record.body === undefined || typeof record.body === \"string\",\n \"TOON item document body must be a string\",\n );\n return {\n metadata: normalizeParsedFrontMatter(record.front_matter, options),\n body: normalizeBody(typeof record.body === \"string\" ? record.body : \"\"),\n };\n }\n\n const { body, ...frontMatterRecord } = record;\n assertFrontMatterCondition(\n body === undefined || typeof body === \"string\",\n \"TOON item document body must be a string\",\n );\n assertValidFrontMatter(frontMatterRecord, runtimeContext);\n return {\n metadata: normalizeParsedFrontMatter(frontMatterRecord, options),\n body: normalizeBody(typeof body === \"string\" ? body : \"\"),\n };\n}\n\nfunction serializeJsonMarkdownItemDocument(\n document: ItemDocument,\n options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\"> = {},\n): string {\n const normalizedFrontMatter = normalizeFrontMatter(document.metadata, options);\n const orderedFrontMatter = orderFrontMatter(normalizedFrontMatter);\n const serializedFrontMatter = JSON.stringify(orderedFrontMatter, null, 2);\n const normalizedBody = normalizeBody(document.body ?? \"\");\n if (!normalizedBody) {\n return `${serializedFrontMatter}\\n`;\n }\n return `${serializedFrontMatter}\\n\\n${normalizedBody}\\n`;\n}\n\nfunction serializeToonItemDocument(\n document: ItemDocument,\n options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\"> = {},\n): string {\n const normalizedFrontMatter = normalizeFrontMatter(document.metadata, options);\n const orderedFrontMatter = orderFrontMatter(normalizedFrontMatter);\n const normalizedBody = normalizeBody(document.body ?? \"\");\n return `${encodeToon({ ...orderedFrontMatter, body: normalizedBody })}\\n`;\n}\n\n/**\n * Implements parse item document for the public runtime surface of this module.\n */\nexport function parseItemDocument(content: string, options: ItemDocumentFormatOptions = {}): ItemDocument {\n const conflictMarker = findFirstMergeConflictMarker(content);\n if (conflictMarker) {\n throw new PmCliError(\n `Merge conflict markers detected in item document at line ${conflictMarker.line} (${conflictMarker.marker}). Resolve <<<<<<< ======= >>>>>>> markers and retry.`,\n EXIT_CODE.GENERIC_FAILURE,\n {\n code: \"merge_conflict_markers_detected\",\n required: \"Resolve merge-conflict markers in the item file before parsing or mutation commands.\",\n why: \"Partially merged documents can corrupt item metadata and history integrity.\",\n examples: [\"git status\", \"git add <resolved-file> && git commit\"],\n nextSteps: [\"Resolve conflicts, save the file, then rerun the pm command.\"],\n },\n );\n }\n const format = options.format ?? \"toon\";\n const runtimeContext = resolveRuntimeSchemaValidationContext(options);\n return format === \"toon\"\n ? parseToonItemDocument(content, runtimeContext, options)\n : parseJsonMarkdownItemDocument(content, runtimeContext, options);\n}\n\n/**\n * Implements serialize item document for the public runtime surface of this module.\n */\nexport function serializeItemDocument(document: ItemDocument, options: ItemDocumentFormatOptions = {}): string {\n const format = options.format ?? \"toon\";\n return format === \"toon\" ? serializeToonItemDocument(document, options) : serializeJsonMarkdownItemDocument(document, options);\n}\n\n/**\n * Implements canonical document for the public runtime surface of this module.\n */\nexport function canonicalDocument(document: ItemDocument, options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\"> = {}): ItemDocument {\n return {\n metadata: normalizeFrontMatter(document.metadata, options),\n body: normalizeBody(document.body ?? \"\"),\n };\n}\n\nexport const _testOnlyItemFormat = {\n buildKnownFrontMatterKeys,\n firstNonZeroComparison,\n normalizeBody,\n normalizePlanDecisions,\n normalizePlanDiscoveries,\n normalizePlanStepDocs,\n normalizePlanStepFiles,\n normalizePlanStepLinks,\n normalizePlanSteps,\n normalizePlanStepTests,\n normalizePlanValidation,\n normalizeTestRunSummaries,\n normalizeTypeOptions,\n runtimeFieldRequiredForType,\n sortTests,\n};\n","/**\n * @module core/item/toon-decode\n *\n * Defines item parsing, formatting, and lifecycle helpers for Toon Decode.\n */\nimport { decode as decodeToon } from \"@toon-format/toon\";\n\nexport const TOON_SCALAR_BRACKET_ESCAPE_UPSTREAM_PR = \"https://github.com/toon-format/toon/pull/314\" as const;\n\nexport const TOON_SCALAR_BRACKET_ESCAPE_TRACKING = {\n dependency: \"@toon-format/toon\",\n affected_versions: \"<=2.3.0\",\n upstream_pr: TOON_SCALAR_BRACKET_ESCAPE_UPSTREAM_PR,\n removal_condition:\n \"Remove escapeBracketsInQuotedScalars retry once the upstream strict decoder fix ships in a released @toon-format/toon version and this repository upgrades to it.\",\n} as const;\n\n/**\n * Documents the toon decode result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ToonDecodeResult {\n /** The decoded TOON document. */\n value: unknown;\n /** True when the strict decode required the scalar-bracket escape workaround. */\n usedScalarBracketEscape: boolean;\n}\n\n/**\n * Escape `[` as `\\u005b` inside quoted scalar values so the upstream\n * `@toon-format/toon` strict decoder cannot mis-read them.\n *\n * The upstream bug: the strict decoder's array-header detection scans the whole\n * line for an opening bracket when the key is unquoted, so a quoted scalar value\n * that contains a bracketed token followed (anywhere later on the line) by a\n * colon, e.g. `body: \"POST [redacted]: ok\"` or `desc: \"sntr[ysu]_ ... :\"`, is\n * mis-detected as a `key`+bracket+colon array header and throws. The library's\n * own `encode()` emits exactly this otherwise-correctly-quoted form, so strict\n * decode cannot read the encoder's own output for such values.\n *\n * A line is treated as a scalar `key: value` (not an array header) only when its\n * `\": \"` key/value separator occurs before the first `[`; array-header lines\n * (`tags[3]:`, `comments[6]{...}:`) have the bracket first and are left\n * untouched, as are non-string (unquoted) values. Within a matched quoted value\n * every `[` becomes `\\u005b`, which the decoder unescapes back to `[`, so the\n * decoded value is byte-for-byte identical. Crucially, this neutralises only the\n * bracket trigger and nothing else, so the retry stays in strict mode and every\n * other strict invariant (duplicate sibling keys, array-count mismatches, tabs\n * in indentation, ...) is still enforced.\n *\n * Upstream tracking metadata lives in {@link TOON_SCALAR_BRACKET_ESCAPE_TRACKING}.\n */\nfunction escapeBracketsInQuotedScalars(content: string): string {\n return content\n .split(\"\\n\")\n .map((line) => {\n const separatorIndex = line.indexOf(\": \");\n const bracketIndex = line.indexOf(\"[\");\n if (separatorIndex === -1 || bracketIndex === -1 || bracketIndex < separatorIndex) {\n return line;\n }\n const key = line.slice(0, separatorIndex + 2);\n const value = line.slice(separatorIndex + 2);\n if (!value.startsWith('\"')) {\n return line;\n }\n return key + value.replaceAll(\"[\", \"\\\\u005b\");\n })\n .join(\"\\n\");\n}\n\n/**\n * Decode a TOON item document, working around the upstream bracket mis-parse\n * bug described in {@link escapeBracketsInQuotedScalars}.\n *\n * Strict decode is attempted first (the fast path for all well-formed\n * documents). Only if it fails is the scalar-bracket escape applied and strict\n * decode retried, so the workaround never relaxes strict validation; it only\n * removes the specific trigger. If the escaped content is identical to the\n * original (no quoted-scalar bracket to neutralise) the original strict error is\n * surfaced unchanged; if the retry itself fails the document has a genuine\n * problem beyond the bracket bug and that error propagates.\n */\nexport function decodeToonItemContent(content: string): ToonDecodeResult {\n try {\n return { value: decodeToon(content), usedScalarBracketEscape: false };\n } catch (strictError) {\n const escaped = escapeBracketsInQuotedScalars(content);\n if (escaped === content) {\n throw strictError;\n }\n return { value: decodeToon(escaped), usedScalarBracketEscape: true };\n }\n}\n","/**\n * @module core/item/id\n *\n * Defines item parsing, formatting, and lifecycle helpers for Id.\n */\nimport crypto from \"node:crypto\";\nimport path from \"node:path\";\nimport { TYPE_TO_FOLDER } from \"../shared/constants.js\";\nimport { pathExists } from \"../fs/fs-utils.js\";\n\n/**\n * Implements normalize prefix for the public runtime surface of this module.\n */\nexport function normalizePrefix(input: string | undefined): string {\n const normalized = (input ?? \"\").trim().toLowerCase();\n if (!normalized) return \"pm-\";\n return normalized.endsWith(\"-\") ? normalized : `${normalized}-`;\n}\n\n/**\n * Implements normalize raw item id for the public runtime surface of this module.\n */\nexport function normalizeRawItemId(input: string): string {\n let normalized = input.trim().toLowerCase();\n if (normalized.startsWith(\"#\")) {\n normalized = normalized.slice(1);\n }\n return normalized;\n}\n\n/**\n * Implements normalize item id for the public runtime surface of this module.\n */\nexport function normalizeItemId(input: string, prefix: string): string {\n const canonicalPrefix = normalizePrefix(prefix);\n const normalized = normalizeRawItemId(input);\n if (normalized.startsWith(canonicalPrefix)) {\n return normalized;\n }\n return `${canonicalPrefix}${normalized}`;\n}\n\nfunction randomToken(length: number): string {\n let token = \"\";\n for (let index = 0; index < length; index += 1) {\n token += crypto.randomInt(0, 36).toString(36);\n }\n return token;\n}\n\nasync function idExists(pmRoot: string, id: string): Promise<boolean> {\n const checks = Object.values(TYPE_TO_FOLDER).flatMap((folder) => [\n path.join(pmRoot, folder, `${id}.md`),\n path.join(pmRoot, folder, `${id}.toon`),\n ]);\n for (const target of checks) {\n if (await pathExists(target)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Implements generate item id for the public runtime surface of this module.\n */\nexport async function generateItemId(pmRoot: string, prefix: string): Promise<string> {\n let tokenLength = 4;\n let attempts = 0;\n\n while (tokenLength <= 10) {\n for (let i = 0; i < 32; i += 1) {\n const id = `${normalizePrefix(prefix)}${randomToken(tokenLength)}`;\n if (!(await idExists(pmRoot, id))) {\n return id;\n }\n attempts += 1;\n }\n tokenLength += 1;\n }\n\n throw new Error(`Unable to generate unique id after ${attempts} attempts`);\n}\n"],"names":["path"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,SAAS,aAAa,OAAa;AACjC,QAAM,WAAW,MACd,KAAI,EACJ,WAAW,kBAAkB,GAAG,EAChC,MAAM,KAAK,EACX,OAAO,CAAC,YAAY,QAAQ,SAAS,CAAC,EACtC,IAAI,CAAC,YAAY,QAAQ,YAAW,CAAE;AACzC,MAAI,SAAS,WAAW,GAAG;AACzB,WAAO;EACT;AACA,QAAM,CAAC,OAAO,GAAG,IAAI,IAAI;AACzB,SAAO,GAAG,KAAK,GAAG,KAAK,IAAI,CAAC,YAAY,GAAG,QAAQ,MAAM,GAAG,CAAC,EAAE,YAAW,CAAE,GAAG,QAAQ,MAAM,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC;AAC7G;AAEA,SAAS,2BAA2B,YAA0C;AAC5E,SAAO,CAAC,GAAG,oBAAI,IAAI;IACjB,yBAAyB,UAAU;IACnC,aAAa,WAAW,GAAG;IAC3B,aAAa,WAAW,QAAQ;IAChC,GAAG,WAAW,YAAY,IAAI,CAAC,UAAU,aAAa,KAAK,CAAC;GAC7D,CAAC;AACJ;AAKM,SAAU,4BACd,SACA,YAA0C;AAE1C,aAAW,gBAAgB,2BAA2B,UAAU,GAAG;AACjE,QAAI,CAAC,OAAO,OAAO,SAAS,YAAY,GAAG;AACzC;IACF;AACA,UAAM,QAAQ,QAAQ,YAAY;AAClC,QAAI,UAAU,QAAW;AACvB,aAAO;IACT;EACF;AACA,SAAO;AACT;AAEA,SAAS,0BAA0B,OAAc;AAC/C,MAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,WAAO,MACJ,QAAQ,CAAC,UAAU,0BAA0B,KAAK,CAAC,EAC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