@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,23 +1,19 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5249c38b-0c03-5818-a5d1-6f63742d0a73")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
collectBlockedByIds
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-P3MJJW7P.js";
|
|
6
6
|
import {
|
|
7
|
+
PmCliError,
|
|
7
8
|
buildItemNotFoundError,
|
|
9
|
+
isTerminalStatus,
|
|
8
10
|
listAllFrontMatterLight,
|
|
9
11
|
locateItem,
|
|
10
12
|
mutateItem,
|
|
11
13
|
readLocatedItem,
|
|
14
|
+
readSettings,
|
|
12
15
|
toItemRecord
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import {
|
|
15
|
-
isTerminalStatus
|
|
16
|
-
} from "./chunk-HK72NWAD.js";
|
|
17
|
-
import {
|
|
18
|
-
PmCliError,
|
|
19
|
-
readSettings
|
|
20
|
-
} from "./chunk-US3T3W5J.js";
|
|
16
|
+
} from "./chunk-GH73UOSJ.js";
|
|
21
17
|
import {
|
|
22
18
|
EXIT_CODE,
|
|
23
19
|
getSettingsPath,
|
|
@@ -25,7 +21,7 @@ import {
|
|
|
25
21
|
resolveItemTypeRegistry,
|
|
26
22
|
resolvePmRoot,
|
|
27
23
|
resolveRuntimeStatusRegistry
|
|
28
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-UO7XAZK6.js";
|
|
29
25
|
|
|
30
26
|
// dist/cli/commands/close.js
|
|
31
27
|
function toAuthor(candidate, defaultAuthor) {
|
|
@@ -439,6 +435,6 @@ export {
|
|
|
439
435
|
_testOnlyCloseCommand,
|
|
440
436
|
runClose
|
|
441
437
|
};
|
|
442
|
-
//# sourceMappingURL=chunk-
|
|
438
|
+
//# sourceMappingURL=chunk-6LCJRGPD.js.map
|
|
443
439
|
|
|
444
|
-
//# debugId=
|
|
440
|
+
//# debugId=5249c38b-0c03-5818-a5d1-6f63742d0a73
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/close.ts"],"sourcesContent":["/**\n * @module cli/commands/close\n *\n * Implements the pm close command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { collectBlockedByIds } from \"../../core/item/actionability.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport {\n buildItemNotFoundError,\n listAllFrontMatterLight,\n locateItem,\n mutateItem,\n readLocatedItem,\n} from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemFrontMatter } from \"../../types/index.js\";\n\n/**\n * Documents the close command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface CloseCommandOptions {\n author?: string;\n message?: string;\n validateClose?: string;\n force?: boolean;\n // pm-fl0c #11 (2026-05-28): allow setting the three closure validation\n // fields inline on `pm close` so agents do not have to issue a prior\n // `pm update` just to satisfy --validate-close warn|strict. These map 1:1\n // to ItemFrontMatter.{resolution,expected_result,actual_result}.\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n duplicateOf?: string;\n}\n\n/**\n * Documents the close result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CloseResult {\n item: Record<string, unknown>;\n changed_fields: string[];\n warnings: string[];\n}\n\ninterface AutoUnblockCandidate {\n id: string;\n blocker_ids: string[];\n}\n\ntype CloseInlineFieldKey = \"resolution\" | \"expected_result\" | \"actual_result\";\n\ninterface CloseMutationContext {\n statusRegistry: RuntimeStatusRegistry;\n force: boolean | undefined;\n options: CloseCommandOptions;\n duplicateOf: string | undefined;\n validateCloseMode: ValidateCloseMode;\n activeChildIds: string[];\n closeReason: string | undefined;\n}\n\nfunction toAuthor(candidate: string | undefined, defaultAuthor: string): string {\n const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;\n const trimmed = resolved.trim();\n return trimmed || \"unknown\";\n}\n\nfunction normalizeCloseReason(reasonText: string | undefined, required: boolean): string | undefined {\n const reason = (reasonText ?? \"\").trim();\n if (reason.length > 0) {\n return reason;\n }\n if (required) {\n throw new PmCliError(\n \"Close reason text is required because governance.require_close_reason is enabled\",\n EXIT_CODE.USAGE,\n {\n code: \"close_reason_required\",\n required: \"Provide a one-line closing summary as the positional text, --reason, or --message.\",\n why: \"governance.require_close_reason is enabled, so every close must record why the item is done.\",\n examples: [\n 'pm close <id> \"Done: <what changed and why>\"',\n 'pm close <id> --reason \"<closing summary>\"',\n 'pm close <id> -m \"<closing summary>\"',\n \"pm close <id> --duplicate-of <canonical-id>\",\n ],\n nextSteps: [\n \"Re-run the close with a closing summary.\",\n 'When closing as a duplicate, --duplicate-of <id> auto-fills the close reason as \"Duplicate of <id>\".',\n \"To stop requiring reasons, run: pm config set governance-require-close-reason --policy disabled\",\n ],\n },\n );\n }\n return undefined;\n}\n\ntype ValidateCloseMode = \"off\" | \"warn\" | \"strict\";\n\ninterface CloseReasonFallbackInput {\n closeReasonText: string | undefined;\n duplicateOf: string | undefined;\n resolution: string | undefined;\n message: string | undefined;\n requireCloseReason: boolean;\n}\n\nfunction resolveEffectiveCloseReasonText(input: CloseReasonFallbackInput): string | undefined {\n if ((input.closeReasonText ?? \"\").trim().length > 0) {\n return input.closeReasonText;\n }\n if (input.duplicateOf !== undefined) {\n return `Duplicate of ${input.duplicateOf}`;\n }\n const trimmedResolution = typeof input.resolution === \"string\" ? input.resolution.trim() : \"\";\n if (trimmedResolution.length > 0) {\n return trimmedResolution;\n }\n const trimmedMessage = typeof input.message === \"string\" ? input.message.trim() : \"\";\n if (input.requireCloseReason && trimmedMessage.length > 0) {\n return trimmedMessage;\n }\n return input.closeReasonText;\n}\n\nconst CLOSE_VALIDATION_FIELDS: Array<{ key: keyof Pick<ItemFrontMatter, \"resolution\" | \"expected_result\" | \"actual_result\">; label: string }> = [\n { key: \"resolution\", label: \"resolution\" },\n { key: \"expected_result\", label: \"expected_result\" },\n { key: \"actual_result\", label: \"actual_result\" },\n];\n\nfunction parseValidateCloseMode(raw: string | undefined): ValidateCloseMode | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (normalized.length === 0 || normalized === \"warn\") {\n return \"warn\";\n }\n if (normalized === \"off\" || normalized === \"none\" || normalized === \"disabled\") {\n return \"off\";\n }\n if (normalized === \"strict\") {\n return \"strict\";\n }\n throw new PmCliError(`Invalid --validate-close mode \"${raw}\" (expected \"off\", \"warn\", or \"strict\")`, EXIT_CODE.USAGE);\n}\n\nfunction findMissingCloseValidationFields(frontMatter: ItemFrontMatter): string[] {\n const missing: string[] = [];\n for (const field of CLOSE_VALIDATION_FIELDS) {\n const rawValue = frontMatter[field.key];\n if (typeof rawValue !== \"string\" || rawValue.trim().length === 0) {\n missing.push(field.label);\n }\n }\n return missing;\n}\n\nasync function duplicateChainReferencesClosingItem(\n loadItemById: (id: string) => Promise<ItemFrontMatter | null>,\n initialDuplicateOf: unknown,\n closingId: string,\n): Promise<boolean> {\n const visited = new Set<string>();\n let current = initialDuplicateOf;\n while (typeof current === \"string\" && current.trim().length > 0) {\n const currentId = current.trim();\n if (currentId === closingId) {\n return true;\n }\n if (visited.has(currentId)) {\n return false;\n }\n visited.add(currentId);\n current = (await loadItemById(currentId))?.duplicate_of;\n }\n return false;\n}\n\nfunction shouldApplyDuplicateFallback(value: unknown): boolean {\n return typeof value !== \"string\" || value.trim().length === 0;\n}\n\nasync function assertDuplicateTargetExists(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n duplicateOf: string | undefined,\n closingId: string,\n): Promise<string | undefined> {\n const rawTarget = duplicateOf?.trim();\n if (!rawTarget) {\n return undefined;\n }\n if (rawTarget === closingId) {\n throw new PmCliError(\"An item cannot be closed as a duplicate of itself.\", EXIT_CODE.USAGE, {\n code: \"duplicate_target_self\",\n why: \"--duplicate-of must identify the canonical item that should remain open or already represent the work.\",\n });\n }\n const typeRegistry = resolveItemTypeRegistry(settings);\n const itemCache = new Map<string, ItemFrontMatter | null>();\n const loadItemById = async (id: string): Promise<ItemFrontMatter | null> => {\n if (itemCache.has(id)) {\n return itemCache.get(id) ?? null;\n }\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n itemCache.set(id, null);\n return null;\n }\n const { document } = await readLocatedItem(located, { schema: settings.schema });\n itemCache.set(id, document.metadata);\n return document.metadata;\n };\n const target = await loadItemById(rawTarget);\n if (!target) {\n throw new PmCliError(`Duplicate target \"${rawTarget}\" was not found. Create or locate the canonical item first.`, EXIT_CODE.USAGE, {\n code: \"duplicate_target_missing\",\n why: \"Duplicate closure should point at a real canonical pm item so future dedupe and changelog tooling can trace the relationship.\",\n examples: [`pm close ${closingId} \"Duplicate of ${rawTarget}\" --duplicate-of ${rawTarget}`],\n nextSteps: [\"Run pm search/list to find the canonical item, then retry with --duplicate-of <id>.\"],\n });\n }\n if (await duplicateChainReferencesClosingItem(loadItemById, target.duplicate_of, closingId)) {\n throw new PmCliError(`Circular duplicate reference detected. Target \"${rawTarget}\" points back to \"${closingId}\".`, EXIT_CODE.USAGE, {\n code: \"duplicate_target_circular\",\n why: \"Circular duplicate relationships create loops for dedupe and status propagation tooling.\",\n nextSteps: [\"Choose the existing canonical item, or clear the target duplicate_of metadata before closing this item as a duplicate.\"],\n });\n }\n if (typeof target.duplicate_of === \"string\" && target.duplicate_of.trim().length > 0) {\n throw new PmCliError(`Duplicate target \"${rawTarget}\" is already marked as a duplicate of \"${target.duplicate_of.trim()}\".`, EXIT_CODE.USAGE, {\n code: \"duplicate_target_is_duplicate\",\n why: \"Duplicate closure should point directly at the canonical item, not another duplicate.\",\n examples: [`pm close ${closingId} \"Duplicate of ${target.duplicate_of.trim()}\" --duplicate-of ${target.duplicate_of.trim()}`],\n nextSteps: [\"Use the canonical item referenced by duplicate_of as the --duplicate-of target.\"],\n });\n }\n return target.id;\n}\n\nasync function findActiveChildIds(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n parentId: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<string[]> {\n const typeRegistry = resolveItemTypeRegistry(settings);\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n return items\n .filter((item) => item.parent === parentId && !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id)\n .sort((left, right) => left.localeCompare(right));\n}\n\nasync function findAutoUnblockCandidates(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n closedId: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<AutoUnblockCandidate[]> {\n const typeRegistry = resolveItemTypeRegistry(settings);\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n const itemsById = new Map(items.map((item) => [item.id, item]));\n const blockedStatuses = statusRegistry.blocked_statuses;\n return items\n .filter((item) => blockedStatuses.has(item.status))\n .map((item) => ({ item, blockerIds: collectBlockedByIds(item) }))\n .filter(({ blockerIds }) => blockerIds.includes(closedId))\n .filter(({ blockerIds }) =>\n blockerIds.every((blockerId) => {\n const blocker = itemsById.get(blockerId);\n return blocker !== undefined && isTerminalStatus(blocker.status, statusRegistry);\n }),\n )\n .map(({ item, blockerIds }) => ({ id: item.id, blocker_ids: blockerIds }))\n .sort((left, right) => left.id.localeCompare(right.id));\n}\n\nasync function autoUnblockResolvedDependents(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n closedId: string,\n author: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<string[]> {\n const candidates = await findAutoUnblockCandidates(pmRoot, settings, closedId, statusRegistry);\n const warnings: string[] = [];\n for (const candidate of candidates) {\n try {\n const unblocked = await mutateItem({\n pmRoot,\n settings,\n id: candidate.id,\n op: \"update\",\n author,\n message: `Auto-unblocked after blocker ${closedId} closed`,\n mutate(document) {\n /* c8 ignore start -- normal auto-unblock candidates carry dependency metadata; fallback preserves hand-edited scalar-only blockers. */\n const dependencies = document.metadata.dependencies ?? [];\n /* c8 ignore stop */\n const remainingDependencies = dependencies.filter((dependency) => {\n const dependencyId = dependency.id.trim();\n return dependency.kind !== \"blocked_by\" || !candidate.blocker_ids.includes(dependencyId);\n });\n document.metadata.status = statusRegistry.open_status;\n delete document.metadata.blocked_by;\n delete document.metadata.blocked_reason;\n document.metadata.unblock_note = `Auto-unblocked after blocker ${closedId} closed; all blockers resolved (${candidate.blocker_ids.join(\", \")}).`;\n if (remainingDependencies.length > 0) {\n document.metadata.dependencies = remainingDependencies;\n } else {\n delete document.metadata.dependencies;\n }\n const changedFields = [\"status\", \"blocked_by\", \"blocked_reason\", \"unblock_note\"];\n if (remainingDependencies.length !== dependencies.length) {\n changedFields.push(\"dependencies\");\n }\n return {\n changedFields,\n };\n },\n });\n warnings.push(`auto_unblocked:${unblocked.item.id}:resolved_blockers=${candidate.blocker_ids.join(\",\")}`);\n /* c8 ignore start -- defensive fan-out failure path; normal lock/claim state is auditable and still unblocks. */\n } catch (error) {\n const reason = error instanceof Error ? error.message.replace(/\\s+/g, \" \").trim() : \"unknown\";\n warnings.push(`auto_unblock_failed:${candidate.id}:${reason}`);\n }\n /* c8 ignore stop */\n }\n return warnings;\n}\n\nfunction applyInlineCloseFields(metadata: ItemFrontMatter, options: CloseCommandOptions): CloseInlineFieldKey[] {\n const changedFields: CloseInlineFieldKey[] = [];\n const inlineCloseFields: Array<{ option: string | undefined; key: CloseInlineFieldKey }> = [\n { option: options.resolution, key: \"resolution\" },\n { option: options.expectedResult, key: \"expected_result\" },\n { option: options.actualResult, key: \"actual_result\" },\n ];\n for (const { option, key } of inlineCloseFields) {\n if (typeof option !== \"string\") {\n continue;\n }\n const trimmed = option.trim();\n if (trimmed.length === 0) {\n continue;\n }\n metadata[key] = trimmed;\n changedFields.push(key);\n }\n return changedFields;\n}\n\nfunction applyDuplicateCloseMetadata(metadata: ItemFrontMatter, duplicateOf: string | undefined): CloseInlineFieldKey[] {\n if (duplicateOf === undefined) {\n return [];\n }\n metadata.duplicate_of = duplicateOf;\n const duplicateFallbackFields: CloseInlineFieldKey[] = [];\n const fallbackValues: Array<{ key: CloseInlineFieldKey; value: string }> = [\n { key: \"resolution\", value: `Duplicate of ${duplicateOf}` },\n { key: \"expected_result\", value: `Canonical item ${duplicateOf} tracks the work.` },\n { key: \"actual_result\", value: `Closed as duplicate of ${duplicateOf}.` },\n ];\n for (const { key, value } of fallbackValues) {\n if (shouldApplyDuplicateFallback(metadata[key])) {\n metadata[key] = value;\n duplicateFallbackFields.push(key);\n }\n }\n return duplicateFallbackFields;\n}\n\nfunction collectCloseValidationWarnings(\n metadata: ItemFrontMatter,\n validateCloseMode: ValidateCloseMode,\n activeChildIds: string[],\n): string[] {\n const warnings: string[] = [];\n if (validateCloseMode !== \"off\") {\n const missingFields = findMissingCloseValidationFields(metadata);\n if (missingFields.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${metadata.id}: missing ${missingFields.join(\", \")}. Populate fields or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n warnings.push(`close_validation_missing_fields:${metadata.id}:${missingFields.join(\",\")}`);\n }\n if (activeChildIds.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${metadata.id}: active child items remain open (${activeChildIds.join(\", \")}). Close, cancel, or re-parent them first, or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n warnings.push(`close_validation_active_children:${metadata.id}:${activeChildIds.join(\",\")}`);\n }\n return warnings;\n }\n if (activeChildIds.length > 0) {\n warnings.push(`closed_with_active_children:${metadata.id}:${activeChildIds.join(\",\")}`);\n }\n return warnings;\n}\n\nfunction applyCloseReason(metadata: ItemFrontMatter, closeReason: string | undefined): string[] {\n if (closeReason !== undefined) {\n metadata.close_reason = closeReason;\n return [\"close_reason\"];\n }\n if (metadata.close_reason !== undefined) {\n delete metadata.close_reason;\n return [\"close_reason\"];\n }\n return [];\n}\n\nfunction clearCloseAssignee(metadata: ItemFrontMatter): string[] {\n if (metadata.assignee === undefined) {\n return [];\n }\n delete metadata.assignee;\n return [\"assignee\"];\n}\n\nfunction clearClosedBlockerSignals(metadata: ItemFrontMatter): { changedFields: string[]; warnings: string[] } {\n const previousBlockedBy = typeof metadata.blocked_by === \"string\" ? metadata.blocked_by.trim() : \"\";\n const existingDeps = metadata.dependencies ?? [];\n const blockedByEdge = existingDeps.find((dep) => dep.kind === \"blocked_by\");\n const hadBlockedReason = metadata.blocked_reason !== undefined;\n if (previousBlockedBy.length === 0 && blockedByEdge === undefined && !hadBlockedReason) {\n return { changedFields: [], warnings: [] };\n }\n const changedFields: string[] = [];\n if (previousBlockedBy.length > 0) {\n delete metadata.blocked_by;\n changedFields.push(\"blocked_by\");\n }\n if (hadBlockedReason) {\n delete metadata.blocked_reason;\n changedFields.push(\"blocked_reason\");\n }\n if (blockedByEdge !== undefined) {\n const remainingDeps = existingDeps.filter((dep) => dep.kind !== \"blocked_by\");\n if (remainingDeps.length > 0) {\n metadata.dependencies = remainingDeps;\n } else {\n delete metadata.dependencies;\n }\n changedFields.push(\"dependencies\");\n }\n // A stale reason-only close has no blocker identity; omit the blocker-clear warning instead of inventing one.\n const reportedBlocker = previousBlockedBy || blockedByEdge?.id;\n return {\n changedFields,\n warnings: reportedBlocker ? [`closed_cleared_blocked_by:${metadata.id}:${reportedBlocker}`] : [],\n };\n}\n\nfunction mutateCloseMetadata(metadata: ItemFrontMatter, context: CloseMutationContext): { changedFields: string[]; warnings?: string[] } {\n if (isTerminalStatus(metadata.status, context.statusRegistry) && !context.force) {\n throw new PmCliError(`Item ${metadata.id} is already terminal; use --force to close again.`, EXIT_CODE.CONFLICT);\n }\n const inlineChangedFields = applyInlineCloseFields(metadata, context.options);\n const duplicateFallbackFields = applyDuplicateCloseMetadata(metadata, context.duplicateOf);\n const mutationWarnings = collectCloseValidationWarnings(metadata, context.validateCloseMode, context.activeChildIds);\n metadata.status = context.statusRegistry.close_status;\n const changedFields = [\n \"status\",\n ...applyCloseReason(metadata, context.closeReason),\n ...inlineChangedFields,\n ];\n if (context.duplicateOf !== undefined) {\n changedFields.push(\"duplicate_of\");\n for (const key of duplicateFallbackFields) {\n /* v8 ignore start -- duplicate fallback keys are already pre-deduped by applyDuplicateCloseMetadata in covered close paths */\n if (!changedFields.includes(key)) {\n changedFields.push(key);\n }\n /* v8 ignore stop */\n }\n }\n changedFields.push(...clearCloseAssignee(metadata));\n const blockerCleanup = clearClosedBlockerSignals(metadata);\n changedFields.push(...blockerCleanup.changedFields);\n mutationWarnings.push(...blockerCleanup.warnings);\n return {\n changedFields,\n ...(mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}),\n };\n}\n\nexport const _testOnlyCloseCommand = {\n blockedByIds: collectBlockedByIds,\n};\n\n/**\n * Implements run close for the public runtime surface of this module.\n */\nexport async function runClose(\n id: string,\n closeReasonText: string | undefined,\n options: CloseCommandOptions,\n global: GlobalOptions,\n): Promise<CloseResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const author = toAuthor(options.author, settings.author_default);\n // GH-250: verify the target item EXISTS before the governance close-reason\n // gate fires. Otherwise closing a typo'd id with no reason reports\n // \"Close reason text is required\" and hides the real cause (bad id) until a\n // reason is supplied. Existence is the more fundamental precondition, so it\n // is validated first regardless of whether a reason was provided.\n const typeToFolder = resolveItemTypeRegistry(settings).type_to_folder;\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeToFolder);\n if (!located) {\n throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeToFolder);\n }\n // GH-204: resolve the duplicate target BEFORE reason validation so\n // `pm close <id> --duplicate-of <canonical>` succeeds under\n // governance.require_close_reason without a manual reason — when no\n // positional/--reason text is provided the reason defaults to\n // \"Duplicate of <id>\" (mirroring the auto-filled closure metadata).\n // Explicit reason text still wins.\n const duplicateOf = await assertDuplicateTargetExists(pmRoot, settings, options.duplicateOf, id);\n // pm-7x8d / pm-9hry / GH-204: when no explicit positional/--reason text is given, derive\n // the close reason from the next-best closure signal instead of hard-blocking\n // under governance.require_close_reason. Precedence: explicit reason text >\n // --duplicate-of (\"Duplicate of <id>\") > --resolution summary > --message.\n // Resolution still writes metadata.resolution below; message still writes the\n // history entry through mutateItem. Reusing either as the close reason just lets\n // a single agent-authored close command succeed when it already supplied a\n // closure summary through another structured option.\n const effectiveCloseReasonText = resolveEffectiveCloseReasonText({\n closeReasonText,\n duplicateOf,\n resolution: options.resolution,\n message: options.message,\n requireCloseReason: settings.governance.require_close_reason,\n });\n const closeReason = normalizeCloseReason(effectiveCloseReasonText, settings.governance.require_close_reason);\n const validateCloseMode = parseValidateCloseMode(options.validateClose) ?? settings.governance.close_validation_default;\n // C3 (pm-fu5d): scan for active children even under minimal governance so\n // closing a parent is never silently orphaning — off mode emits an\n // informational note instead of the warn/strict validation warning.\n const activeChildIds = await findActiveChildIds(pmRoot, settings, id, statusRegistry);\n\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"close\",\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n return mutateCloseMetadata(document.metadata, {\n statusRegistry,\n force: options.force,\n options,\n duplicateOf,\n validateCloseMode,\n activeChildIds,\n closeReason,\n });\n },\n });\n\n return {\n item: toItemRecord(result.item),\n changed_fields: result.changedFields,\n warnings: [\n ...result.warnings,\n ...(await autoUnblockResolvedDependents(pmRoot, settings, located.id, author, statusRegistry)),\n ],\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,SAAS,SAAS,WAA+B,eAAqB;AACpE,QAAM,WAAW,aAAa,QAAQ,IAAI,aAAa;AACvD,QAAM,UAAU,SAAS,KAAI;AAC7B,SAAO,WAAW;AACpB;AAEA,SAAS,qBAAqB,YAAgC,UAAiB;AAC7E,QAAM,UAAU,cAAc,IAAI,KAAI;AACtC,MAAI,OAAO,SAAS,GAAG;AACrB,WAAO;EACT;AACA,MAAI,UAAU;AACZ,UAAM,IAAI,WACR,oFACA,UAAU,OACV;MACE,MAAM;MACN,UAAU;MACV,KAAK;MACL,UAAU;QACR;QACA;QACA;QACA;;MAEF,WAAW;QACT;QACA;QACA;;KAEH;EAEL;AACA,SAAO;AACT;AAYA,SAAS,gCAAgC,OAA+B;AACtE,OAAK,MAAM,mBAAmB,IAAI,KAAI,EAAG,SAAS,GAAG;AACnD,WAAO,MAAM;EACf;AACA,MAAI,MAAM,gBAAgB,QAAW;AACnC,WAAO,gBAAgB,MAAM,WAAW;EAC1C;AACA,QAAM,oBAAoB,OAAO,MAAM,eAAe,WAAW,MAAM,WAAW,KAAI,IAAK;AAC3F,MAAI,kBAAkB,SAAS,GAAG;AAChC,WAAO;EACT;AACA,QAAM,iBAAiB,OAAO,MAAM,YAAY,WAAW,MAAM,QAAQ,KAAI,IAAK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;IACf,OAAO,UAAQ;AACb,aAAO,oBAAoB,SAAS,UAAU;QAC5C;QACA,OAAO,QAAQ;QACf;QACA;QACA;QACA;QACA;OACD;IACH;GACD;AAED,SAAO;IACL,MAAM,aAAa,OAAO,IAAI;IAC9B,gBAAgB,OAAO;IACvB,UAAU;MACR,GAAG,OAAO;MACV,GAAI,MAAM,8BAA8B,QAAQ,UAAU,QAAQ,IAAI,QAAQ,cAAc;;;AAGlG","debugId":"0c02a002-ef0a-50f4-9165-676c2dcfcb8a"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/close.ts"],"sourcesContent":["/**\n * @module cli/commands/close\n *\n * Implements the pm close command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { collectBlockedByIds } from \"../../core/item/actionability.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport {\n buildItemNotFoundError,\n listAllFrontMatterLight,\n locateItem,\n mutateItem,\n readLocatedItem,\n} from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemFrontMatter } from \"../../types/index.js\";\n\n/**\n * Documents the close command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface CloseCommandOptions {\n author?: string;\n message?: string;\n validateClose?: string;\n force?: boolean;\n // pm-fl0c #11 (2026-05-28): allow setting the three closure validation\n // fields inline on `pm close` so agents do not have to issue a prior\n // `pm update` just to satisfy --validate-close warn|strict. These map 1:1\n // to ItemFrontMatter.{resolution,expected_result,actual_result}.\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n duplicateOf?: string;\n}\n\n/**\n * Documents the close result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CloseResult {\n item: Record<string, unknown>;\n changed_fields: string[];\n warnings: string[];\n}\n\ninterface AutoUnblockCandidate {\n id: string;\n blocker_ids: string[];\n}\n\ntype CloseInlineFieldKey = \"resolution\" | \"expected_result\" | \"actual_result\";\n\ninterface CloseMutationContext {\n statusRegistry: RuntimeStatusRegistry;\n force: boolean | undefined;\n options: CloseCommandOptions;\n duplicateOf: string | undefined;\n validateCloseMode: ValidateCloseMode;\n activeChildIds: string[];\n closeReason: string | undefined;\n}\n\nfunction toAuthor(candidate: string | undefined, defaultAuthor: string): string {\n const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;\n const trimmed = resolved.trim();\n return trimmed || \"unknown\";\n}\n\nfunction normalizeCloseReason(reasonText: string | undefined, required: boolean): string | undefined {\n const reason = (reasonText ?? \"\").trim();\n if (reason.length > 0) {\n return reason;\n }\n if (required) {\n throw new PmCliError(\n \"Close reason text is required because governance.require_close_reason is enabled\",\n EXIT_CODE.USAGE,\n {\n code: \"close_reason_required\",\n required: \"Provide a one-line closing summary as the positional text, --reason, or --message.\",\n why: \"governance.require_close_reason is enabled, so every close must record why the item is done.\",\n examples: [\n 'pm close <id> \"Done: <what changed and why>\"',\n 'pm close <id> --reason \"<closing summary>\"',\n 'pm close <id> -m \"<closing summary>\"',\n \"pm close <id> --duplicate-of <canonical-id>\",\n ],\n nextSteps: [\n \"Re-run the close with a closing summary.\",\n 'When closing as a duplicate, --duplicate-of <id> auto-fills the close reason as \"Duplicate of <id>\".',\n \"To stop requiring reasons, run: pm config set governance-require-close-reason --policy disabled\",\n ],\n },\n );\n }\n return undefined;\n}\n\ntype ValidateCloseMode = \"off\" | \"warn\" | \"strict\";\n\ninterface CloseReasonFallbackInput {\n closeReasonText: string | undefined;\n duplicateOf: string | undefined;\n resolution: string | undefined;\n message: string | undefined;\n requireCloseReason: boolean;\n}\n\nfunction resolveEffectiveCloseReasonText(input: CloseReasonFallbackInput): string | undefined {\n if ((input.closeReasonText ?? \"\").trim().length > 0) {\n return input.closeReasonText;\n }\n if (input.duplicateOf !== undefined) {\n return `Duplicate of ${input.duplicateOf}`;\n }\n const trimmedResolution = typeof input.resolution === \"string\" ? input.resolution.trim() : \"\";\n if (trimmedResolution.length > 0) {\n return trimmedResolution;\n }\n const trimmedMessage = typeof input.message === \"string\" ? input.message.trim() : \"\";\n if (input.requireCloseReason && trimmedMessage.length > 0) {\n return trimmedMessage;\n }\n return input.closeReasonText;\n}\n\nconst CLOSE_VALIDATION_FIELDS: Array<{ key: keyof Pick<ItemFrontMatter, \"resolution\" | \"expected_result\" | \"actual_result\">; label: string }> = [\n { key: \"resolution\", label: \"resolution\" },\n { key: \"expected_result\", label: \"expected_result\" },\n { key: \"actual_result\", label: \"actual_result\" },\n];\n\nfunction parseValidateCloseMode(raw: string | undefined): ValidateCloseMode | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (normalized.length === 0 || normalized === \"warn\") {\n return \"warn\";\n }\n if (normalized === \"off\" || normalized === \"none\" || normalized === \"disabled\") {\n return \"off\";\n }\n if (normalized === \"strict\") {\n return \"strict\";\n }\n throw new PmCliError(`Invalid --validate-close mode \"${raw}\" (expected \"off\", \"warn\", or \"strict\")`, EXIT_CODE.USAGE);\n}\n\nfunction findMissingCloseValidationFields(frontMatter: ItemFrontMatter): string[] {\n const missing: string[] = [];\n for (const field of CLOSE_VALIDATION_FIELDS) {\n const rawValue = frontMatter[field.key];\n if (typeof rawValue !== \"string\" || rawValue.trim().length === 0) {\n missing.push(field.label);\n }\n }\n return missing;\n}\n\nasync function duplicateChainReferencesClosingItem(\n loadItemById: (id: string) => Promise<ItemFrontMatter | null>,\n initialDuplicateOf: unknown,\n closingId: string,\n): Promise<boolean> {\n const visited = new Set<string>();\n let current = initialDuplicateOf;\n while (typeof current === \"string\" && current.trim().length > 0) {\n const currentId = current.trim();\n if (currentId === closingId) {\n return true;\n }\n if (visited.has(currentId)) {\n return false;\n }\n visited.add(currentId);\n current = (await loadItemById(currentId))?.duplicate_of;\n }\n return false;\n}\n\nfunction shouldApplyDuplicateFallback(value: unknown): boolean {\n return typeof value !== \"string\" || value.trim().length === 0;\n}\n\nasync function assertDuplicateTargetExists(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n duplicateOf: string | undefined,\n closingId: string,\n): Promise<string | undefined> {\n const rawTarget = duplicateOf?.trim();\n if (!rawTarget) {\n return undefined;\n }\n if (rawTarget === closingId) {\n throw new PmCliError(\"An item cannot be closed as a duplicate of itself.\", EXIT_CODE.USAGE, {\n code: \"duplicate_target_self\",\n why: \"--duplicate-of must identify the canonical item that should remain open or already represent the work.\",\n });\n }\n const typeRegistry = resolveItemTypeRegistry(settings);\n const itemCache = new Map<string, ItemFrontMatter | null>();\n const loadItemById = async (id: string): Promise<ItemFrontMatter | null> => {\n if (itemCache.has(id)) {\n return itemCache.get(id) ?? null;\n }\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n itemCache.set(id, null);\n return null;\n }\n const { document } = await readLocatedItem(located, { schema: settings.schema });\n itemCache.set(id, document.metadata);\n return document.metadata;\n };\n const target = await loadItemById(rawTarget);\n if (!target) {\n throw new PmCliError(`Duplicate target \"${rawTarget}\" was not found. Create or locate the canonical item first.`, EXIT_CODE.USAGE, {\n code: \"duplicate_target_missing\",\n why: \"Duplicate closure should point at a real canonical pm item so future dedupe and changelog tooling can trace the relationship.\",\n examples: [`pm close ${closingId} \"Duplicate of ${rawTarget}\" --duplicate-of ${rawTarget}`],\n nextSteps: [\"Run pm search/list to find the canonical item, then retry with --duplicate-of <id>.\"],\n });\n }\n if (await duplicateChainReferencesClosingItem(loadItemById, target.duplicate_of, closingId)) {\n throw new PmCliError(`Circular duplicate reference detected. Target \"${rawTarget}\" points back to \"${closingId}\".`, EXIT_CODE.USAGE, {\n code: \"duplicate_target_circular\",\n why: \"Circular duplicate relationships create loops for dedupe and status propagation tooling.\",\n nextSteps: [\"Choose the existing canonical item, or clear the target duplicate_of metadata before closing this item as a duplicate.\"],\n });\n }\n if (typeof target.duplicate_of === \"string\" && target.duplicate_of.trim().length > 0) {\n throw new PmCliError(`Duplicate target \"${rawTarget}\" is already marked as a duplicate of \"${target.duplicate_of.trim()}\".`, EXIT_CODE.USAGE, {\n code: \"duplicate_target_is_duplicate\",\n why: \"Duplicate closure should point directly at the canonical item, not another duplicate.\",\n examples: [`pm close ${closingId} \"Duplicate of ${target.duplicate_of.trim()}\" --duplicate-of ${target.duplicate_of.trim()}`],\n nextSteps: [\"Use the canonical item referenced by duplicate_of as the --duplicate-of target.\"],\n });\n }\n return target.id;\n}\n\nasync function findActiveChildIds(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n parentId: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<string[]> {\n const typeRegistry = resolveItemTypeRegistry(settings);\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n return items\n .filter((item) => item.parent === parentId && !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id)\n .sort((left, right) => left.localeCompare(right));\n}\n\nasync function findAutoUnblockCandidates(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n closedId: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<AutoUnblockCandidate[]> {\n const typeRegistry = resolveItemTypeRegistry(settings);\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n const itemsById = new Map(items.map((item) => [item.id, item]));\n const blockedStatuses = statusRegistry.blocked_statuses;\n return items\n .filter((item) => blockedStatuses.has(item.status))\n .map((item) => ({ item, blockerIds: collectBlockedByIds(item) }))\n .filter(({ blockerIds }) => blockerIds.includes(closedId))\n .filter(({ blockerIds }) =>\n blockerIds.every((blockerId) => {\n const blocker = itemsById.get(blockerId);\n return blocker !== undefined && isTerminalStatus(blocker.status, statusRegistry);\n }),\n )\n .map(({ item, blockerIds }) => ({ id: item.id, blocker_ids: blockerIds }))\n .sort((left, right) => left.id.localeCompare(right.id));\n}\n\nasync function autoUnblockResolvedDependents(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n closedId: string,\n author: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<string[]> {\n const candidates = await findAutoUnblockCandidates(pmRoot, settings, closedId, statusRegistry);\n const warnings: string[] = [];\n for (const candidate of candidates) {\n try {\n const unblocked = await mutateItem({\n pmRoot,\n settings,\n id: candidate.id,\n op: \"update\",\n author,\n message: `Auto-unblocked after blocker ${closedId} closed`,\n mutate(document) {\n /* c8 ignore start -- normal auto-unblock candidates carry dependency metadata; fallback preserves hand-edited scalar-only blockers. */\n const dependencies = document.metadata.dependencies ?? [];\n /* c8 ignore stop */\n const remainingDependencies = dependencies.filter((dependency) => {\n const dependencyId = dependency.id.trim();\n return dependency.kind !== \"blocked_by\" || !candidate.blocker_ids.includes(dependencyId);\n });\n document.metadata.status = statusRegistry.open_status;\n delete document.metadata.blocked_by;\n delete document.metadata.blocked_reason;\n document.metadata.unblock_note = `Auto-unblocked after blocker ${closedId} closed; all blockers resolved (${candidate.blocker_ids.join(\", \")}).`;\n if (remainingDependencies.length > 0) {\n document.metadata.dependencies = remainingDependencies;\n } else {\n delete document.metadata.dependencies;\n }\n const changedFields = [\"status\", \"blocked_by\", \"blocked_reason\", \"unblock_note\"];\n if (remainingDependencies.length !== dependencies.length) {\n changedFields.push(\"dependencies\");\n }\n return {\n changedFields,\n };\n },\n });\n warnings.push(`auto_unblocked:${unblocked.item.id}:resolved_blockers=${candidate.blocker_ids.join(\",\")}`);\n /* c8 ignore start -- defensive fan-out failure path; normal lock/claim state is auditable and still unblocks. */\n } catch (error) {\n const reason = error instanceof Error ? error.message.replace(/\\s+/g, \" \").trim() : \"unknown\";\n warnings.push(`auto_unblock_failed:${candidate.id}:${reason}`);\n }\n /* c8 ignore stop */\n }\n return warnings;\n}\n\nfunction applyInlineCloseFields(metadata: ItemFrontMatter, options: CloseCommandOptions): CloseInlineFieldKey[] {\n const changedFields: CloseInlineFieldKey[] = [];\n const inlineCloseFields: Array<{ option: string | undefined; key: CloseInlineFieldKey }> = [\n { option: options.resolution, key: \"resolution\" },\n { option: options.expectedResult, key: \"expected_result\" },\n { option: options.actualResult, key: \"actual_result\" },\n ];\n for (const { option, key } of inlineCloseFields) {\n if (typeof option !== \"string\") {\n continue;\n }\n const trimmed = option.trim();\n if (trimmed.length === 0) {\n continue;\n }\n metadata[key] = trimmed;\n changedFields.push(key);\n }\n return changedFields;\n}\n\nfunction applyDuplicateCloseMetadata(metadata: ItemFrontMatter, duplicateOf: string | undefined): CloseInlineFieldKey[] {\n if (duplicateOf === undefined) {\n return [];\n }\n metadata.duplicate_of = duplicateOf;\n const duplicateFallbackFields: CloseInlineFieldKey[] = [];\n const fallbackValues: Array<{ key: CloseInlineFieldKey; value: string }> = [\n { key: \"resolution\", value: `Duplicate of ${duplicateOf}` },\n { key: \"expected_result\", value: `Canonical item ${duplicateOf} tracks the work.` },\n { key: \"actual_result\", value: `Closed as duplicate of ${duplicateOf}.` },\n ];\n for (const { key, value } of fallbackValues) {\n if (shouldApplyDuplicateFallback(metadata[key])) {\n metadata[key] = value;\n duplicateFallbackFields.push(key);\n }\n }\n return duplicateFallbackFields;\n}\n\nfunction collectCloseValidationWarnings(\n metadata: ItemFrontMatter,\n validateCloseMode: ValidateCloseMode,\n activeChildIds: string[],\n): string[] {\n const warnings: string[] = [];\n if (validateCloseMode !== \"off\") {\n const missingFields = findMissingCloseValidationFields(metadata);\n if (missingFields.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${metadata.id}: missing ${missingFields.join(\", \")}. Populate fields or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n warnings.push(`close_validation_missing_fields:${metadata.id}:${missingFields.join(\",\")}`);\n }\n if (activeChildIds.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${metadata.id}: active child items remain open (${activeChildIds.join(\", \")}). Close, cancel, or re-parent them first, or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n warnings.push(`close_validation_active_children:${metadata.id}:${activeChildIds.join(\",\")}`);\n }\n return warnings;\n }\n if (activeChildIds.length > 0) {\n warnings.push(`closed_with_active_children:${metadata.id}:${activeChildIds.join(\",\")}`);\n }\n return warnings;\n}\n\nfunction applyCloseReason(metadata: ItemFrontMatter, closeReason: string | undefined): string[] {\n if (closeReason !== undefined) {\n metadata.close_reason = closeReason;\n return [\"close_reason\"];\n }\n if (metadata.close_reason !== undefined) {\n delete metadata.close_reason;\n return [\"close_reason\"];\n }\n return [];\n}\n\nfunction clearCloseAssignee(metadata: ItemFrontMatter): string[] {\n if (metadata.assignee === undefined) {\n return [];\n }\n delete metadata.assignee;\n return [\"assignee\"];\n}\n\nfunction clearClosedBlockerSignals(metadata: ItemFrontMatter): { changedFields: string[]; warnings: string[] } {\n const previousBlockedBy = typeof metadata.blocked_by === \"string\" ? metadata.blocked_by.trim() : \"\";\n const existingDeps = metadata.dependencies ?? [];\n const blockedByEdge = existingDeps.find((dep) => dep.kind === \"blocked_by\");\n const hadBlockedReason = metadata.blocked_reason !== undefined;\n if (previousBlockedBy.length === 0 && blockedByEdge === undefined && !hadBlockedReason) {\n return { changedFields: [], warnings: [] };\n }\n const changedFields: string[] = [];\n if (previousBlockedBy.length > 0) {\n delete metadata.blocked_by;\n changedFields.push(\"blocked_by\");\n }\n if (hadBlockedReason) {\n delete metadata.blocked_reason;\n changedFields.push(\"blocked_reason\");\n }\n if (blockedByEdge !== undefined) {\n const remainingDeps = existingDeps.filter((dep) => dep.kind !== \"blocked_by\");\n if (remainingDeps.length > 0) {\n metadata.dependencies = remainingDeps;\n } else {\n delete metadata.dependencies;\n }\n changedFields.push(\"dependencies\");\n }\n // A stale reason-only close has no blocker identity; omit the blocker-clear warning instead of inventing one.\n const reportedBlocker = previousBlockedBy || blockedByEdge?.id;\n return {\n changedFields,\n warnings: reportedBlocker ? [`closed_cleared_blocked_by:${metadata.id}:${reportedBlocker}`] : [],\n };\n}\n\nfunction mutateCloseMetadata(metadata: ItemFrontMatter, context: CloseMutationContext): { changedFields: string[]; warnings?: string[] } {\n if (isTerminalStatus(metadata.status, context.statusRegistry) && !context.force) {\n throw new PmCliError(`Item ${metadata.id} is already terminal; use --force to close again.`, EXIT_CODE.CONFLICT);\n }\n const inlineChangedFields = applyInlineCloseFields(metadata, context.options);\n const duplicateFallbackFields = applyDuplicateCloseMetadata(metadata, context.duplicateOf);\n const mutationWarnings = collectCloseValidationWarnings(metadata, context.validateCloseMode, context.activeChildIds);\n metadata.status = context.statusRegistry.close_status;\n const changedFields = [\n \"status\",\n ...applyCloseReason(metadata, context.closeReason),\n ...inlineChangedFields,\n ];\n if (context.duplicateOf !== undefined) {\n changedFields.push(\"duplicate_of\");\n for (const key of duplicateFallbackFields) {\n /* v8 ignore start -- duplicate fallback keys are already pre-deduped by applyDuplicateCloseMetadata in covered close paths */\n if (!changedFields.includes(key)) {\n changedFields.push(key);\n }\n /* v8 ignore stop */\n }\n }\n changedFields.push(...clearCloseAssignee(metadata));\n const blockerCleanup = clearClosedBlockerSignals(metadata);\n changedFields.push(...blockerCleanup.changedFields);\n mutationWarnings.push(...blockerCleanup.warnings);\n return {\n changedFields,\n ...(mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}),\n };\n}\n\nexport const _testOnlyCloseCommand = {\n blockedByIds: collectBlockedByIds,\n};\n\n/**\n * Implements run close for the public runtime surface of this module.\n */\nexport async function runClose(\n id: string,\n closeReasonText: string | undefined,\n options: CloseCommandOptions,\n global: GlobalOptions,\n): Promise<CloseResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const author = toAuthor(options.author, settings.author_default);\n // GH-250: verify the target item EXISTS before the governance close-reason\n // gate fires. Otherwise closing a typo'd id with no reason reports\n // \"Close reason text is required\" and hides the real cause (bad id) until a\n // reason is supplied. Existence is the more fundamental precondition, so it\n // is validated first regardless of whether a reason was provided.\n const typeToFolder = resolveItemTypeRegistry(settings).type_to_folder;\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeToFolder);\n if (!located) {\n throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeToFolder);\n }\n // GH-204: resolve the duplicate target BEFORE reason validation so\n // `pm close <id> --duplicate-of <canonical>` succeeds under\n // governance.require_close_reason without a manual reason — when no\n // positional/--reason text is provided the reason defaults to\n // \"Duplicate of <id>\" (mirroring the auto-filled closure metadata).\n // Explicit reason text still wins.\n const duplicateOf = await assertDuplicateTargetExists(pmRoot, settings, options.duplicateOf, id);\n // pm-7x8d / pm-9hry / GH-204: when no explicit positional/--reason text is given, derive\n // the close reason from the next-best closure signal instead of hard-blocking\n // under governance.require_close_reason. Precedence: explicit reason text >\n // --duplicate-of (\"Duplicate of <id>\") > --resolution summary > --message.\n // Resolution still writes metadata.resolution below; message still writes the\n // history entry through mutateItem. Reusing either as the close reason just lets\n // a single agent-authored close command succeed when it already supplied a\n // closure summary through another structured option.\n const effectiveCloseReasonText = resolveEffectiveCloseReasonText({\n closeReasonText,\n duplicateOf,\n resolution: options.resolution,\n message: options.message,\n requireCloseReason: settings.governance.require_close_reason,\n });\n const closeReason = normalizeCloseReason(effectiveCloseReasonText, settings.governance.require_close_reason);\n const validateCloseMode = parseValidateCloseMode(options.validateClose) ?? settings.governance.close_validation_default;\n // C3 (pm-fu5d): scan for active children even under minimal governance so\n // closing a parent is never silently orphaning — off mode emits an\n // informational note instead of the warn/strict validation warning.\n const activeChildIds = await findActiveChildIds(pmRoot, settings, id, statusRegistry);\n\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"close\",\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n return mutateCloseMetadata(document.metadata, {\n statusRegistry,\n force: options.force,\n options,\n duplicateOf,\n validateCloseMode,\n activeChildIds,\n closeReason,\n });\n },\n });\n\n return {\n item: toItemRecord(result.item),\n changed_fields: result.changedFields,\n warnings: [\n ...result.warnings,\n ...(await autoUnblockResolvedDependents(pmRoot, settings, located.id, author, statusRegistry)),\n ],\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,SAAS,SAAS,WAA+B,eAAqB;AACpE,QAAM,WAAW,aAAa,QAAQ,IAAI,aAAa;AACvD,QAAM,UAAU,SAAS,KAAI;AAC7B,SAAO,WAAW;AACpB;AAEA,SAAS,qBAAqB,YAAgC,UAAiB;AAC7E,QAAM,UAAU,cAAc,IAAI,KAAI;AACtC,MAAI,OAAO,SAAS,GAAG;AACrB,WAAO;EACT;AACA,MAAI,UAAU;AACZ,UAAM,IAAI,WACR,oFACA,UAAU,OACV;MACE,MAAM;MACN,UAAU;MACV,KAAK;MACL,UAAU;QACR;QACA;QACA;QACA;;MAEF,WAAW;QACT;QACA;QACA;;KAEH;EAEL;AACA,SAAO;AACT;AAYA,SAAS,gCAAgC,OAA+B;AACtE,OAAK,MAAM,mBAAmB,IAAI,KAAI,EAAG,SAAS,GAAG;AACnD,WAAO,MAAM;EACf;AACA,MAAI,MAAM,gBAAgB,QAAW;AACnC,WAAO,gBAAgB,MAAM,WAAW;EAC1C;AACA,QAAM,oBAAoB,OAAO,MAAM,eAAe,WAAW,MAAM,WAAW,KAAI,IAAK;AAC3F,MAAI,kBAAkB,SAAS,GAAG;AAChC,WAAO;EACT;AACA,QAAM,iBAAiB,OAAO,MAAM,YAAY,WAAW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QAAQ;IACjB,OAAO,QAAQ;IACf,OAAO,UAAQ;AACb,aAAO,oBAAoB,SAAS,UAAU;QAC5C;QACA,OAAO,QAAQ;QACf;QACA;QACA;QACA;QACA;OACD;IACH;GACD;AAED,SAAO;IACL,MAAM,aAAa,OAAO,IAAI;IAC9B,gBAAgB,OAAO;IACvB,UAAU;MACR,GAAG,OAAO;MACV,GAAI,MAAM,8BAA8B,QAAQ,UAAU,QAAQ,IAAI,QAAQ,cAAc;;;AAGlG","debugId":"5249c38b-0c03-5818-a5d1-6f63742d0a73"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e5aa93b8-d63d-557c-9183-bbd636aa5dee")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
|
+
PmCliError,
|
|
4
5
|
normalizeItemId
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
PmCliError
|
|
8
|
-
} from "./chunk-US3T3W5J.js";
|
|
6
|
+
} from "./chunk-GH73UOSJ.js";
|
|
9
7
|
import {
|
|
10
8
|
EXIT_CODE
|
|
11
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UO7XAZK6.js";
|
|
12
10
|
|
|
13
11
|
// dist/core/item/parent-reference-policy.js
|
|
14
12
|
var PLACEHOLDER_REFERENCE_TOKENS = /* @__PURE__ */ new Set(["none", "null", "undefined"]);
|
|
@@ -97,6 +95,6 @@ export {
|
|
|
97
95
|
normalizeSprintReleaseFormatPolicy,
|
|
98
96
|
validateSprintOrReleaseValue
|
|
99
97
|
};
|
|
100
|
-
//# sourceMappingURL=chunk-
|
|
98
|
+
//# sourceMappingURL=chunk-6UQCNWFV.js.map
|
|
101
99
|
|
|
102
|
-
//# debugId=
|
|
100
|
+
//# debugId=e5aa93b8-d63d-557c-9183-bbd636aa5dee
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../core/item/parent-reference-policy.ts","../../../../../../../../core/item/sprint-release-format.ts"],"sourcesContent":["/**\n * @module core/item/parent-reference-policy\n *\n * Defines item parsing, formatting, and lifecycle helpers for Parent Reference Policy.\n */\nimport type { ParentReferencePolicy } from \"../../types/index.js\";\nimport { normalizeItemId } from \"./id.js\";\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { PmCliError } from \"../shared/errors.js\";\n\nconst PLACEHOLDER_REFERENCE_TOKENS = new Set([\"none\", \"null\", \"undefined\"]);\n\n/**\n * Implements normalize parent reference policy for the public runtime surface of this module.\n */\nexport function normalizeParentReferencePolicy(value: string | undefined): ParentReferencePolicy {\n const normalized = value?.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized === \"warn\" || normalized === \"strict_error\") {\n return normalized;\n }\n if (normalized === \"strict\") {\n return \"strict_error\";\n }\n throw new PmCliError(\n \"Config set parent-reference-policy requires --policy with one of: warn, strict_error (alias: strict)\",\n EXIT_CODE.USAGE,\n );\n}\n\n/**\n * Implements normalize parent reference value for the public runtime surface of this module.\n */\nexport function normalizeParentReferenceValue(rawValue: unknown): string {\n if (typeof rawValue !== \"string\") {\n throw new PmCliError(\"--parent must be a string. Use --unset parent to clear this field.\", EXIT_CODE.USAGE);\n }\n const value = rawValue.trim();\n if (value.length === 0) {\n throw new PmCliError(\"--parent must not be empty. Use --parent none to unset.\", EXIT_CODE.USAGE);\n }\n if (isPlaceholderReferenceToken(value)) {\n throw new PmCliError(\n `--parent must not use placeholder token \"${value}\". Use --unset parent to clear this field.`,\n EXIT_CODE.USAGE,\n );\n }\n return value;\n}\n\n/**\n * Detects parent-style placeholder tokens that should never become stored ids.\n */\nexport function isPlaceholderReferenceToken(value: string): boolean {\n return PLACEHOLDER_REFERENCE_TOKENS.has(value.trim().toLowerCase());\n}\n\n/**\n * Implements validate missing parent reference for the public runtime surface of this module.\n */\nexport function validateMissingParentReference(\n parentId: string,\n policy: ParentReferencePolicy,\n): { warnings: string[] } {\n if (policy === \"strict_error\") {\n throw new PmCliError(\n `Parent item \"${parentId}\" was not found. Create it first or use --parent none.`,\n EXIT_CODE.USAGE,\n );\n }\n return {\n warnings: [`validation_warning:parent_reference_missing:${parentId}`],\n };\n}\n\n/**\n * Rejects the one-node hierarchy cycle where an item points at itself.\n */\nexport function assertParentReferenceIsNotSelf(itemId: string, parentId: string, prefix: string): void {\n const normalizedItemId = normalizeItemId(itemId, prefix);\n const normalizedParentId = normalizeItemId(parentId, prefix);\n if (normalizedItemId !== normalizedParentId) {\n return;\n }\n const normalizationDetail =\n parentId !== normalizedParentId || itemId !== normalizedItemId\n ? ` (normalized from parent \"${parentId}\" and item \"${itemId}\")`\n : \"\";\n throw new PmCliError(\n `Parent item \"${normalizedParentId}\" cannot be the same as item \"${normalizedItemId}\"${normalizationDetail}. Use --unset parent to clear this field.`,\n EXIT_CODE.USAGE,\n );\n}\n","/**\n * @module core/item/sprint-release-format\n *\n * Defines item parsing, formatting, and lifecycle helpers for Sprint Release Format.\n */\nimport type { SprintReleaseFormatPolicy } from \"../../types/index.js\";\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { PmCliError } from \"../shared/errors.js\";\n\nconst SPRINT_RELEASE_VALUE_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._/-]*$/;\nconst SPRINT_RELEASE_MAX_LENGTH = 64;\n\n/**\n * Implements normalize sprint release format policy for the public runtime surface of this module.\n */\nexport function normalizeSprintReleaseFormatPolicy(value: string | undefined): SprintReleaseFormatPolicy {\n const normalized = value?.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized === \"warn\" || normalized === \"strict_error\") {\n return normalized;\n }\n if (normalized === \"strict\") {\n return \"strict_error\";\n }\n throw new PmCliError(\n \"Config set sprint-release-format-policy requires --policy with one of: warn, strict_error (alias: strict)\",\n EXIT_CODE.USAGE,\n );\n}\n\n/**\n * Implements validate sprint or release value for the public runtime surface of this module.\n */\nexport function validateSprintOrReleaseValue(\n field: \"sprint\" | \"release\",\n rawValue: string,\n policy: SprintReleaseFormatPolicy,\n): { value: string; warnings: string[] } {\n const value = rawValue.trim();\n if (value.length === 0) {\n throw new PmCliError(`--${field} must not be empty. Use --${field} none to unset.`, EXIT_CODE.USAGE);\n }\n const isValid = value.length <= SPRINT_RELEASE_MAX_LENGTH && SPRINT_RELEASE_VALUE_PATTERN.test(value);\n if (isValid) {\n return { value, warnings: [] };\n }\n const guidance = \"Expected 1-64 characters matching [A-Za-z0-9][A-Za-z0-9._/-]* (no spaces).\";\n if (policy === \"strict_error\") {\n throw new PmCliError(`Invalid --${field} value \"${value}\". ${guidance}`, EXIT_CODE.USAGE);\n }\n return {\n value,\n warnings: [`validation_warning:${field}_format:${value}`],\n };\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../core/item/parent-reference-policy.ts","../../../../../../../../core/item/sprint-release-format.ts"],"sourcesContent":["/**\n * @module core/item/parent-reference-policy\n *\n * Defines item parsing, formatting, and lifecycle helpers for Parent Reference Policy.\n */\nimport type { ParentReferencePolicy } from \"../../types/index.js\";\nimport { normalizeItemId } from \"./id.js\";\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { PmCliError } from \"../shared/errors.js\";\n\nconst PLACEHOLDER_REFERENCE_TOKENS = new Set([\"none\", \"null\", \"undefined\"]);\n\n/**\n * Implements normalize parent reference policy for the public runtime surface of this module.\n */\nexport function normalizeParentReferencePolicy(value: string | undefined): ParentReferencePolicy {\n const normalized = value?.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized === \"warn\" || normalized === \"strict_error\") {\n return normalized;\n }\n if (normalized === \"strict\") {\n return \"strict_error\";\n }\n throw new PmCliError(\n \"Config set parent-reference-policy requires --policy with one of: warn, strict_error (alias: strict)\",\n EXIT_CODE.USAGE,\n );\n}\n\n/**\n * Implements normalize parent reference value for the public runtime surface of this module.\n */\nexport function normalizeParentReferenceValue(rawValue: unknown): string {\n if (typeof rawValue !== \"string\") {\n throw new PmCliError(\"--parent must be a string. Use --unset parent to clear this field.\", EXIT_CODE.USAGE);\n }\n const value = rawValue.trim();\n if (value.length === 0) {\n throw new PmCliError(\"--parent must not be empty. Use --parent none to unset.\", EXIT_CODE.USAGE);\n }\n if (isPlaceholderReferenceToken(value)) {\n throw new PmCliError(\n `--parent must not use placeholder token \"${value}\". Use --unset parent to clear this field.`,\n EXIT_CODE.USAGE,\n );\n }\n return value;\n}\n\n/**\n * Detects parent-style placeholder tokens that should never become stored ids.\n */\nexport function isPlaceholderReferenceToken(value: string): boolean {\n return PLACEHOLDER_REFERENCE_TOKENS.has(value.trim().toLowerCase());\n}\n\n/**\n * Implements validate missing parent reference for the public runtime surface of this module.\n */\nexport function validateMissingParentReference(\n parentId: string,\n policy: ParentReferencePolicy,\n): { warnings: string[] } {\n if (policy === \"strict_error\") {\n throw new PmCliError(\n `Parent item \"${parentId}\" was not found. Create it first or use --parent none.`,\n EXIT_CODE.USAGE,\n );\n }\n return {\n warnings: [`validation_warning:parent_reference_missing:${parentId}`],\n };\n}\n\n/**\n * Rejects the one-node hierarchy cycle where an item points at itself.\n */\nexport function assertParentReferenceIsNotSelf(itemId: string, parentId: string, prefix: string): void {\n const normalizedItemId = normalizeItemId(itemId, prefix);\n const normalizedParentId = normalizeItemId(parentId, prefix);\n if (normalizedItemId !== normalizedParentId) {\n return;\n }\n const normalizationDetail =\n parentId !== normalizedParentId || itemId !== normalizedItemId\n ? ` (normalized from parent \"${parentId}\" and item \"${itemId}\")`\n : \"\";\n throw new PmCliError(\n `Parent item \"${normalizedParentId}\" cannot be the same as item \"${normalizedItemId}\"${normalizationDetail}. Use --unset parent to clear this field.`,\n EXIT_CODE.USAGE,\n );\n}\n","/**\n * @module core/item/sprint-release-format\n *\n * Defines item parsing, formatting, and lifecycle helpers for Sprint Release Format.\n */\nimport type { SprintReleaseFormatPolicy } from \"../../types/index.js\";\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { PmCliError } from \"../shared/errors.js\";\n\nconst SPRINT_RELEASE_VALUE_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._/-]*$/;\nconst SPRINT_RELEASE_MAX_LENGTH = 64;\n\n/**\n * Implements normalize sprint release format policy for the public runtime surface of this module.\n */\nexport function normalizeSprintReleaseFormatPolicy(value: string | undefined): SprintReleaseFormatPolicy {\n const normalized = value?.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized === \"warn\" || normalized === \"strict_error\") {\n return normalized;\n }\n if (normalized === \"strict\") {\n return \"strict_error\";\n }\n throw new PmCliError(\n \"Config set sprint-release-format-policy requires --policy with one of: warn, strict_error (alias: strict)\",\n EXIT_CODE.USAGE,\n );\n}\n\n/**\n * Implements validate sprint or release value for the public runtime surface of this module.\n */\nexport function validateSprintOrReleaseValue(\n field: \"sprint\" | \"release\",\n rawValue: string,\n policy: SprintReleaseFormatPolicy,\n): { value: string; warnings: string[] } {\n const value = rawValue.trim();\n if (value.length === 0) {\n throw new PmCliError(`--${field} must not be empty. Use --${field} none to unset.`, EXIT_CODE.USAGE);\n }\n const isValid = value.length <= SPRINT_RELEASE_MAX_LENGTH && SPRINT_RELEASE_VALUE_PATTERN.test(value);\n if (isValid) {\n return { value, warnings: [] };\n }\n const guidance = \"Expected 1-64 characters matching [A-Za-z0-9][A-Za-z0-9._/-]* (no spaces).\";\n if (policy === \"strict_error\") {\n throw new PmCliError(`Invalid --${field} value \"${value}\". ${guidance}`, EXIT_CODE.USAGE);\n }\n return {\n value,\n warnings: [`validation_warning:${field}_format:${value}`],\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAUA,IA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