@unbrained/pm-cli 2026.7.6 → 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 +32 -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/{gc-2DNMPXMC.js → append-PVCTBVJG.js} +8 -9
- package/dist/cli-bundle/chunks/{chunk-EGAP5OWD.js → chunk-2APXX4TZ.js} +16 -14
- package/dist/cli-bundle/chunks/chunk-2APXX4TZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js → chunk-2LEJGRQ7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js → chunk-2TILG6F2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js → chunk-3G6UMXT3.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js.map → chunk-3G6UMXT3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js → chunk-3TYOW6RR.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js → chunk-3X542TEY.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js → chunk-42LXP4VO.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js.map → chunk-42LXP4VO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CL36D4PC.js → chunk-43SIHQND.js} +36 -15
- package/dist/cli-bundle/chunks/chunk-43SIHQND.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js → chunk-43UQN754.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js.map → chunk-43UQN754.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js → chunk-43YSKY75.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js.map → chunk-43YSKY75.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js → chunk-4BKDAEDF.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js.map → chunk-4BKDAEDF.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4LELACOL.js → chunk-4IQKDKGE.js} +15 -23
- package/dist/cli-bundle/chunks/{chunk-4LELACOL.js.map → chunk-4IQKDKGE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js → chunk-4MZOKTI2.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js.map → chunk-4MZOKTI2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js → chunk-52NS7JDP.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js.map → chunk-52NS7JDP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js → chunk-565WYS5W.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js.map → chunk-565WYS5W.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js → chunk-5FIQ4EX3.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js.map → chunk-5FIQ4EX3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-DMRNBQOI.js → chunk-6G6O3OPQ.js} +256 -36
- package/dist/cli-bundle/chunks/chunk-6G6O3OPQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js → chunk-6LCJRGPD.js} +9 -13
- package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js.map → chunk-6LCJRGPD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js → chunk-6UQCNWFV.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js.map → chunk-6UQCNWFV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZSUS2OD3.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-ZZD4J5XY.js → chunk-7PNQA24K.js} +30 -36
- package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js.map → chunk-7PNQA24K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js → chunk-7VQ3JJN5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js → chunk-7Y5N34HX.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js.map → chunk-7Y5N34HX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js → chunk-AGAVEDIE.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js → chunk-AJUON7E6.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js → chunk-ARKHKYYS.js} +13 -21
- package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js.map → chunk-ARKHKYYS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-46CUF5L6.js → chunk-C5ACVMOI.js} +99 -51
- package/dist/cli-bundle/chunks/chunk-C5ACVMOI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js → chunk-CJQM7O7R.js} +16 -20
- package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js.map → chunk-CJQM7O7R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js → chunk-D2DCTFTL.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js.map → chunk-D2DCTFTL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js → chunk-DDDWVPID.js} +8 -10
- package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js.map → chunk-DDDWVPID.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js → chunk-DG6BSXZ7.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js.map → chunk-DG6BSXZ7.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js → chunk-DR2V5OIV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js → chunk-E3LWJUGF.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js.map → chunk-E3LWJUGF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js → chunk-E3YQFSFE.js} +6 -10
- package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js.map → chunk-E3YQFSFE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XG625QP4.js → chunk-EDO7VXSO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js → chunk-EIUBK2LT.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js.map → chunk-EIUBK2LT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js → chunk-EMXPI36L.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js.map → chunk-EMXPI36L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MLIYFOE7.js → chunk-EOUVR7JN.js} +12 -8
- package/dist/cli-bundle/chunks/chunk-EOUVR7JN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js → chunk-EVEPHNXJ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js → chunk-F6MT7KKE.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js.map → chunk-F6MT7KKE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js → chunk-F6YC2A6X.js} +7 -11
- package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.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-JDDLOQAE.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-EKFNL33R.js → chunk-GLS6VMWI.js} +37 -16
- package/dist/cli-bundle/chunks/chunk-GLS6VMWI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js → chunk-GPIDUMMN.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js.map → chunk-GPIDUMMN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js → chunk-GTM5HQL4.js} +11 -15
- package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js.map → chunk-GTM5HQL4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-24YG75HI.js → chunk-H2SMKL2N.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-QLMX7SRD.js → chunk-HHEWQXPD.js} +6 -6
- package/dist/cli-bundle/chunks/chunk-HHEWQXPD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js → chunk-HX6QXV5P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js → chunk-I74FMIWA.js} +10 -16
- package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js.map → chunk-I74FMIWA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js → chunk-IDIBF4E2.js} +20 -24
- package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js.map → chunk-IDIBF4E2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js → chunk-II7R6KD4.js} +8 -7
- package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.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-FT3QTERD.js → chunk-J7BOLHAV.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js.map → chunk-J7BOLHAV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js → chunk-KTGJ2CBU.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js.map → chunk-KTGJ2CBU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js → chunk-LCFJ7XAM.js} +22 -2
- package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js.map → chunk-LCFJ7XAM.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js → chunk-LZQU6XJG.js} +28 -34
- package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js.map → chunk-LZQU6XJG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js → chunk-M62RO3XK.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js.map → chunk-M62RO3XK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js → chunk-MCEUKJKW.js} +12 -14
- package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js.map → chunk-MCEUKJKW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TKD5VCTD.js → chunk-MHNMCDWR.js} +343 -195
- package/dist/cli-bundle/chunks/chunk-MHNMCDWR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js → chunk-MRFWUSVA.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js.map → chunk-MRFWUSVA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js → chunk-N6ZHDLUY.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js.map → chunk-N6ZHDLUY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js → chunk-NWWL22C7.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js.map → chunk-NWWL22C7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js → chunk-P3MJJW7P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js → chunk-PDXJXEZJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js → chunk-Q64AYQYW.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js.map → chunk-Q64AYQYW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js → chunk-QDABF2RB.js} +26 -34
- package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js.map → chunk-QDABF2RB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TULGS6X6.js → chunk-QFBSP3NI.js} +529 -46
- package/dist/cli-bundle/chunks/chunk-QFBSP3NI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js → chunk-RB3KLPAH.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js.map → chunk-RB3KLPAH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3VHSI5FL.js → chunk-RY7PTTUB.js} +94 -53
- package/dist/cli-bundle/chunks/chunk-RY7PTTUB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-COSPOP7H.js → chunk-S547WBYG.js} +343 -195
- package/dist/cli-bundle/chunks/chunk-S547WBYG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js → chunk-S5BNGFN5.js} +24 -32
- package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js.map → chunk-S5BNGFN5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js → chunk-S6VC2A2K.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js.map → chunk-S6VC2A2K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js → chunk-SIM5JDON.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js.map → chunk-SIM5JDON.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VPIM42PC.js → chunk-SY75LYXR.js} +11 -7
- package/dist/cli-bundle/chunks/chunk-SY75LYXR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-K46RF36U.js → chunk-TEISGNSH.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-TEISGNSH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js → chunk-TEKZOS7M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-W572BIEB.js → chunk-TGUK6XN6.js} +14 -18
- package/dist/cli-bundle/chunks/{chunk-W572BIEB.js.map → chunk-TGUK6XN6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js → chunk-TNC6MZUD.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-E42XTBSP.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-57NWPFF2.js → chunk-UO7XAZK6.js} +17 -4
- package/dist/cli-bundle/chunks/chunk-UO7XAZK6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js → chunk-V5ZWKJNY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js → chunk-VGO73OCK.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js.map → chunk-VGO73OCK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js → chunk-VLEA2UTQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js → chunk-W5HXHC7C.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js.map → chunk-W5HXHC7C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.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/{chunk-NB7RLQFW.js → chunk-XBX5CBRQ.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js.map → chunk-XBX5CBRQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SCUR7K7N.js → chunk-XC3X7BQR.js} +541 -44
- package/dist/cli-bundle/chunks/chunk-XC3X7BQR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js → chunk-XHCVAZGM.js} +13 -17
- package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js.map → chunk-XHCVAZGM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js → chunk-XPMXPR7K.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js.map → chunk-XPMXPR7K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js → chunk-XS2TMNXR.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js.map → chunk-XS2TMNXR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js → chunk-XXIYUTLK.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js.map → chunk-XXIYUTLK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EOKXK3R3.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-6LLVNJXT.js → chunk-Y7KYVCZM.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js.map → chunk-Y7KYVCZM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VIIUS6N6.js → chunk-YCVWWIKY.js} +16 -14
- package/dist/cli-bundle/chunks/chunk-YCVWWIKY.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js → chunk-YH5NBDFA.js} +22 -26
- package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js.map → chunk-YH5NBDFA.js.map} +1 -1
- 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/{chunk-NC33K5ZS.js → chunk-YPD7SQ5P.js} +7 -6
- package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js.map → chunk-YPD7SQ5P.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js → chunk-YPMZMKN7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js → chunk-YTD5GICJ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js → chunk-ZNEG2UDO.js} +261 -34
- package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js.map → chunk-ZNEG2UDO.js.map} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js → chunk-ZO7CLOY2.js} +3 -3
- package/dist/cli-bundle/chunks/{close-2SSSHHUZ.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-32ROBIDL.js → copy-44RT5GDW.js} +4 -8
- package/dist/cli-bundle/chunks/copy-UGMUGHZA.js +9 -0
- package/dist/cli-bundle/chunks/{create-E77SDCUP.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-RA5KTCLB.js → delete-YQ2VPXNF.js} +4 -8
- package/dist/cli-bundle/chunks/{deps-32SU7HO5.js → deps-BU5EBJDU.js} +4 -8
- package/dist/cli-bundle/chunks/deps-FMANWFRP.js +13 -0
- package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js → docs-OQBSJNIA.js} +6 -10
- 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/{files-PYKR2UUG.js → files-HTSB2KJG.js} +6 -10
- package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js → focus-FOG4ALC2.js} +7 -9
- package/dist/cli-bundle/chunks/focus-SUTMKXGX.js +10 -0
- package/dist/cli-bundle/chunks/{history-compact-3MNXLKAT.js → history-compact-M6IFAMBP.js} +9 -13
- package/dist/cli-bundle/chunks/history-compact-NEXRPP2O.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-P6DYF55G.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-ZJQFMWPD.js → history-repair-NHOJG7WO.js} +9 -13
- package/dist/cli-bundle/chunks/learnings-M64NTSOR.js +13 -0
- package/dist/cli-bundle/chunks/{append-BGML6VLD.js → learnings-T63JGKKN.js} +9 -11
- 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-CHVE7PBR.js → plan-TN537L24.js} +10 -15
- package/dist/cli-bundle/chunks/{profile-ZXGSKBJD.js → profile-MHAMXMHQ.js} +9 -13
- package/dist/cli-bundle/chunks/{profile-LD23PSI6.js → profile-TIGLAKJ7.js} +9 -13
- package/dist/cli-bundle/chunks/{register-list-query-OEYQHFXO.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-B42JCCOI.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-IAEST26S.js → register-mutation-P3G4XP6Q.js} +36 -41
- package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js.map → register-mutation-P3G4XP6Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js → register-mutation-XX4H56PE.js} +34 -39
- package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js.map → register-mutation-XX4H56PE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5BMM6XQY.js → register-operations-V6PIYEDU.js} +79 -46
- package/dist/cli-bundle/chunks/register-operations-V6PIYEDU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Z3U3U5KD.js → register-operations-V6VKTG54.js} +78 -45
- package/dist/cli-bundle/chunks/register-operations-V6VKTG54.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-3ZVVX2VN.js → register-setup-6RVAWT6W.js} +129 -29
- package/dist/cli-bundle/chunks/register-setup-6RVAWT6W.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-Q6KFNIOZ.js → register-setup-6YVUSQYD.js} +130 -30
- package/dist/cli-bundle/chunks/register-setup-6YVUSQYD.js.map +1 -0
- package/dist/cli-bundle/chunks/{restore-5RQHAPMA.js → restore-HC3YSWF7.js} +7 -11
- package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js +15 -0
- package/dist/cli-bundle/chunks/{schema-HBORFC6B.js → schema-DAGSYO6E.js} +6 -10
- package/dist/cli-bundle/chunks/{schema-245WW4G2.js → schema-UBXJCQAC.js} +6 -10
- package/dist/cli-bundle/chunks/update-CJGG5WMV.js +21 -0
- package/dist/cli-bundle/chunks/update-LKD64AFP.js +25 -0
- package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js +31 -0
- package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js +35 -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 +129 -107
- package/dist/cli-bundle/sdk-testing.js +7 -8
- package/dist/cli-bundle/sdk.js +122 -117
- 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 +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 +1 -1
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +151 -8
- package/dist/sdk/runtime.js +255 -14
- 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/docs/COMMANDS.md +10 -1
- package/docs/SDK.md +35 -0
- package/docs/TESTING.md +3 -0
- package/package.json +1 -1
- package/dist/cli-bundle/chunks/activity-WJCGCYPU.js +0 -18
- package/dist/cli-bundle/chunks/activity-Z6QUAUSG.js +0 -22
- package/dist/cli-bundle/chunks/aggregate-BDM6EIAR.js +0 -25
- package/dist/cli-bundle/chunks/aggregate-VQ2DHU3S.js +0 -21
- package/dist/cli-bundle/chunks/append-RKJYPU74.js +0 -15
- package/dist/cli-bundle/chunks/chunk-2XG4IZON.js +0 -218
- package/dist/cli-bundle/chunks/chunk-2XG4IZON.js.map +0 -7
- 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-3GCS5SKL.js +0 -228
- package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js +0 -2330
- package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3VHSI5FL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-425E4QL5.js +0 -278
- package/dist/cli-bundle/chunks/chunk-425E4QL5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-46CUF5L6.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-4HIFVN7N.js +0 -249
- package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js +0 -819
- package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js +0 -279
- package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-57NWPFF2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js +0 -268
- package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js +0 -1868
- package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js +0 -1749
- package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-64YKRTSV.js +0 -1961
- package/dist/cli-bundle/chunks/chunk-64YKRTSV.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-B7FRNMYN.js +0 -421
- package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js +0 -1985
- package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CL36D4PC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-COSPOP7H.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-COWTDV6B.js +0 -3461
- package/dist/cli-bundle/chunks/chunk-COWTDV6B.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js +0 -1858
- package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js +0 -1932
- package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EKFNL33R.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js +0 -1704
- package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EOKXK3R3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js +0 -231
- package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js +0 -2090
- package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js +0 -1570
- package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js +0 -239
- package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js +0 -530
- package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-GZRDYONU.js +0 -1005
- package/dist/cli-bundle/chunks/chunk-GZRDYONU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js +0 -277
- package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js +0 -309
- package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js.map +0 -7
- 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-JQXPY7DN.js +0 -2257
- package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-K46RF36U.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KERMZVY5.js +0 -371
- package/dist/cli-bundle/chunks/chunk-KERMZVY5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js +0 -76
- package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js +0 -140
- package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js +0 -1601
- package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js +0 -1031
- package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js +0 -995
- package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js +0 -296
- package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MLIYFOE7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js +0 -2043
- package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js +0 -2033
- package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N745W3B3.js +0 -1604
- package/dist/cli-bundle/chunks/chunk-N745W3B3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js +0 -1615
- package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js.map +0 -7
- 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-PZUGEOPS.js +0 -143
- package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QLMX7SRD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QX6HM775.js +0 -398
- package/dist/cli-bundle/chunks/chunk-QX6HM775.js.map +0 -7
- 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-RFNYTESG.js +0 -520
- package/dist/cli-bundle/chunks/chunk-RFNYTESG.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js +0 -79
- package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js +0 -282
- package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js +0 -274
- package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SCUR7K7N.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js +0 -1977
- package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js +0 -1041
- package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-T42JWV3F.js +0 -822
- package/dist/cli-bundle/chunks/chunk-T42JWV3F.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TULGS6X6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js +0 -2306
- package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VPIM42PC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VQRSPVME.js +0 -368
- package/dist/cli-bundle/chunks/chunk-VQRSPVME.js.map +0 -1
- 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-WG34ZNQQ.js +0 -3423
- package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WLSM645P.js +0 -2247
- package/dist/cli-bundle/chunks/chunk-WLSM645P.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WRTENIX3.js +0 -215
- package/dist/cli-bundle/chunks/chunk-WRTENIX3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js +0 -388
- package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XC5BURG2.js +0 -306
- package/dist/cli-bundle/chunks/chunk-XC5BURG2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js +0 -424
- package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js +0 -2128
- package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js +0 -299
- package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZSUS2OD3.js.map +0 -7
- package/dist/cli-bundle/chunks/claim-RFS7BROJ.js +0 -19
- package/dist/cli-bundle/chunks/claim-XP5AWZ5H.js +0 -23
- package/dist/cli-bundle/chunks/close-GEANHQ2J.js +0 -16
- package/dist/cli-bundle/chunks/close-many-CMZW7ITN.js +0 -31
- package/dist/cli-bundle/chunks/close-many-ZFDIG6M7.js +0 -27
- package/dist/cli-bundle/chunks/comments-MFSYVNNU.js +0 -21
- package/dist/cli-bundle/chunks/comments-XUBPXDYX.js +0 -17
- package/dist/cli-bundle/chunks/config-D7XQMONX.js +0 -18
- package/dist/cli-bundle/chunks/config-T4FHBSYN.js +0 -22
- package/dist/cli-bundle/chunks/context-DIU275XI.js +0 -48
- package/dist/cli-bundle/chunks/context-JCOYB4LZ.js +0 -44
- package/dist/cli-bundle/chunks/contracts-BVO7CSLK.js +0 -12
- package/dist/cli-bundle/chunks/copy-NAGLGMHZ.js +0 -13
- package/dist/cli-bundle/chunks/create-4V7SWNBB.js +0 -30
- package/dist/cli-bundle/chunks/delete-NQI5OSKN.js +0 -14
- package/dist/cli-bundle/chunks/deps-T7SCWXEX.js +0 -17
- package/dist/cli-bundle/chunks/docs-WL2IWGWV.js +0 -18
- package/dist/cli-bundle/chunks/eval-NF2J5SHR.js +0 -23
- package/dist/cli-bundle/chunks/eval-SKDT3MZU.js +0 -27
- package/dist/cli-bundle/chunks/extension-LAXKCAYE.js +0 -42
- package/dist/cli-bundle/chunks/extension-ZISPBRBC.js +0 -38
- package/dist/cli-bundle/chunks/files-EWRQHGIS.js +0 -22
- package/dist/cli-bundle/chunks/focus-4T7TM4MT.js +0 -18
- package/dist/cli-bundle/chunks/focus-L3YUASOD.js +0 -14
- package/dist/cli-bundle/chunks/gc-2PCTYYRI.js +0 -12
- package/dist/cli-bundle/chunks/get-7DMITJ3G.js +0 -23
- package/dist/cli-bundle/chunks/get-VKQXCXLL.js +0 -19
- package/dist/cli-bundle/chunks/health-CVSTAR2F.js +0 -31
- package/dist/cli-bundle/chunks/health-TV3GKTFN.js +0 -35
- package/dist/cli-bundle/chunks/history-D4JUX5XV.js +0 -20
- package/dist/cli-bundle/chunks/history-D4JUX5XV.js.map +0 -7
- package/dist/cli-bundle/chunks/history-LQ2UWZTE.js +0 -24
- package/dist/cli-bundle/chunks/history-LQ2UWZTE.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js +0 -25
- package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js +0 -21
- package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js +0 -23
- package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js.map +0 -1
- package/dist/cli-bundle/chunks/init-C3LJPWQZ.js +0 -30
- package/dist/cli-bundle/chunks/init-C3LJPWQZ.js.map +0 -1
- package/dist/cli-bundle/chunks/init-J3DPGWQI.js +0 -26
- package/dist/cli-bundle/chunks/init-J3DPGWQI.js.map +0 -7
- package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js +0 -21
- package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js.map +0 -1
- package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js +0 -17
- package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js.map +0 -7
- package/dist/cli-bundle/chunks/list-O5NZVSPN.js +0 -36
- package/dist/cli-bundle/chunks/list-O5NZVSPN.js.map +0 -1
- package/dist/cli-bundle/chunks/list-Z55YCNTC.js +0 -32
- package/dist/cli-bundle/chunks/list-Z55YCNTC.js.map +0 -7
- package/dist/cli-bundle/chunks/next-GBNTGXFC.js +0 -28
- package/dist/cli-bundle/chunks/next-GBNTGXFC.js.map +0 -7
- package/dist/cli-bundle/chunks/next-QKW7PTKE.js +0 -32
- package/dist/cli-bundle/chunks/next-QKW7PTKE.js.map +0 -1
- package/dist/cli-bundle/chunks/notes-R5FZTKWF.js +0 -17
- package/dist/cli-bundle/chunks/notes-R5FZTKWF.js.map +0 -7
- package/dist/cli-bundle/chunks/notes-WCGIULVG.js +0 -21
- package/dist/cli-bundle/chunks/notes-WCGIULVG.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-ADISFYH4.js +0 -29
- package/dist/cli-bundle/chunks/plan-ADISFYH4.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-CHVE7PBR.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-LD23PSI6.js.map +0 -7
- package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-B42JCCOI.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-OEYQHFXO.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js +0 -19
- package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js +0 -23
- package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-5RQHAPMA.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-PNEIBBLW.js +0 -19
- package/dist/cli-bundle/chunks/restore-PNEIBBLW.js.map +0 -7
- package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js +0 -29
- package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js.map +0 -1
- package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js +0 -25
- package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js.map +0 -7
- package/dist/cli-bundle/chunks/schema-245WW4G2.js.map +0 -1
- package/dist/cli-bundle/chunks/schema-HBORFC6B.js.map +0 -7
- package/dist/cli-bundle/chunks/search-AOZC5SIK.js +0 -34
- package/dist/cli-bundle/chunks/search-AOZC5SIK.js.map +0 -7
- package/dist/cli-bundle/chunks/search-DRXPGHD7.js +0 -38
- package/dist/cli-bundle/chunks/search-DRXPGHD7.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-NJG4NLHG.js +0 -21
- package/dist/cli-bundle/chunks/stats-NJG4NLHG.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-RG6AG4N2.js +0 -17
- package/dist/cli-bundle/chunks/stats-RG6AG4N2.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js +0 -14
- package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js +0 -18
- package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js.map +0 -1
- package/dist/cli-bundle/chunks/test-6CMOCWUC.js +0 -39
- package/dist/cli-bundle/chunks/test-6CMOCWUC.js.map +0 -7
- package/dist/cli-bundle/chunks/test-RI7XHBZL.js +0 -43
- package/dist/cli-bundle/chunks/test-RI7XHBZL.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js +0 -29
- package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-QEIORFYW.js +0 -33
- package/dist/cli-bundle/chunks/test-all-QEIORFYW.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js +0 -28
- package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js +0 -24
- package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js.map +0 -7
- package/dist/cli-bundle/chunks/update-QVJDFEAP.js +0 -30
- package/dist/cli-bundle/chunks/update-QVJDFEAP.js.map +0 -1
- package/dist/cli-bundle/chunks/update-VQVHAY6X.js +0 -26
- package/dist/cli-bundle/chunks/update-VQVHAY6X.js.map +0 -7
- package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js +0 -37
- package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js.map +0 -7
- package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js +0 -41
- package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js.map +0 -1
- package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js +0 -24
- package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js +0 -28
- package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-4NTXSB62.js +0 -36
- package/dist/cli-bundle/chunks/validate-4NTXSB62.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-MUFXQZMI.js +0 -32
- package/dist/cli-bundle/chunks/validate-MUFXQZMI.js.map +0 -7
- /package/dist/cli-bundle/chunks/{activity-WJCGCYPU.js.map → append-F7WPGIQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-Z6QUAUSG.js.map → append-PVCTBVJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js.map → chunk-2LEJGRQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js.map → chunk-2TILG6F2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js.map → chunk-3TYOW6RR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js.map → chunk-3X542TEY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js.map → chunk-7VQ3JJN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js.map → chunk-AGAVEDIE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js.map → chunk-AJUON7E6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js.map → chunk-DR2V5OIV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XG625QP4.js.map → chunk-EDO7VXSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js.map → chunk-EVEPHNXJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js.map → chunk-FN6SB4HU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-24YG75HI.js.map → chunk-H2SMKL2N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js.map → chunk-HX6QXV5P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js.map → chunk-P3MJJW7P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js.map → chunk-PDXJXEZJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js.map → chunk-TEKZOS7M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js.map → chunk-V5ZWKJNY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js.map → chunk-VLEA2UTQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js.map → chunk-WCWVEXGA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js.map → chunk-YPMZMKN7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js.map → chunk-YTD5GICJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js.map → chunk-ZO7CLOY2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-BDM6EIAR.js.map → close-3YYQ5OG2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-VQ2DHU3S.js.map → close-Z3Q4U7TS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-RKJYPU74.js.map → close-many-3L2RXH3M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-BGML6VLD.js.map → close-many-D366FTIG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-XP5AWZ5H.js.map → comments-54XDJNFE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-RFS7BROJ.js.map → comments-HGHC2PN6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js.map → copy-44RT5GDW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-GEANHQ2J.js.map → copy-UGMUGHZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-CMZW7ITN.js.map → create-4GWJWPXG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-ZFDIG6M7.js.map → create-AZXCUYKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-XUBPXDYX.js.map → delete-Y6SXIQ4X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-MFSYVNNU.js.map → delete-YQ2VPXNF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-T4FHBSYN.js.map → deps-BU5EBJDU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-D7XQMONX.js.map → deps-FMANWFRP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-DIU275XI.js.map → docs-OQBSJNIA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-JCOYB4LZ.js.map → docs-VNPBZXEL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-BVO7CSLK.js.map → files-72HZEBOE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js.map → files-HTSB2KJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-32ROBIDL.js.map → focus-FOG4ALC2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-NAGLGMHZ.js.map → focus-SUTMKXGX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-E77SDCUP.js.map → history-compact-M6IFAMBP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-4V7SWNBB.js.map → history-compact-NEXRPP2O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js.map → history-redact-NQX3OGZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-NQI5OSKN.js.map → history-redact-WQJBZ3PX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-T7SCWXEX.js.map → history-repair-CBHMHAJO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-32SU7HO5.js.map → history-repair-NHOJG7WO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-WL2IWGWV.js.map → learnings-M64NTSOR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js.map → learnings-T63JGKKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-NF2J5SHR.js.map → notes-73WE2UV2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-SKDT3MZU.js.map → notes-U7L6HQQ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-ZISPBRBC.js.map → plan-OSCNYFGC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-LAXKCAYE.js.map → plan-TN537L24.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-PYKR2UUG.js.map → profile-MHAMXMHQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-EWRQHGIS.js.map → profile-TIGLAKJ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-4T7TM4MT.js.map → restore-HC3YSWF7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-L3YUASOD.js.map → restore-LFAMMRYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-2PCTYYRI.js.map → schema-DAGSYO6E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js.map → schema-UBXJCQAC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-VKQXCXLL.js.map → update-CJGG5WMV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-7DMITJ3G.js.map → update-LKD64AFP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-CVSTAR2F.js.map → update-many-G4SM7BHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-TV3GKTFN.js.map → update-many-VLIV3D7R.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.7.7 - 2026-07-07
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Promote item lifecycle primitives to the public SDK: create, update, close, claim/release, copy, delete, restore, focus ([pm-98cz](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-98cz.toon))
|
|
8
|
+
- Promote query/read primitives to the public SDK: list, get, search, context, next, aggregate, stats ([pm-rjqr](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-rjqr.toon))
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- SDK client.run() rejects structured payloads for create: raw {type,title} fails with 'Missing required option --title' ([pm-395t](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-395t.toon))
|
|
13
|
+
- GH-427: Windows Node 24 nightly fails — POSIX-only error-code assertions (EACCES/EISDIR) in restore-command and history-rewrite specs ([pm-lt6n](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-lt6n.toon))
|
|
14
|
+
- Annotation --add silently stores flag-like tokens as content: pm notes <id\> --add --stdin records the literal note "--stdin" ([pm-vcu7](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-vcu7.toon))
|
|
15
|
+
- pm extension --install pm-<alias\> / @unbrained/pm-<alias\> fails with 'Local extension source does not exist' instead of suggesting the bundled catalog alias ([pm-jqd2](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-jqd2.toon))
|
|
16
|
+
- pm plan create silently ignores the root --id-only flag (prints full plan envelope) ([pm-oz0k](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-oz0k.toon))
|
|
17
|
+
- Bare extension command group (pm changelog / pm graph) exits 0 with zero output instead of rendering group help ([pm-1k57](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-1k57.toon))
|
|
18
|
+
- GH-463: linked PM tracker-read tests should auto-remediate or suggest --auto-pm-context ([pm-6e1d](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-6e1d.toon))
|
|
19
|
+
- Relative lancedb vector-store path resolves against process cwd, creating nested .agents/pm/.agents/pm stores ([pm-og1v](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-og1v.toon))
|
|
20
|
+
- GH-455: pm health auto-selects an uninstalled Ollama embedding model then fails vector refresh ([pm-aems](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-aems.toon))
|
|
21
|
+
|
|
22
|
+
### Other
|
|
23
|
+
|
|
24
|
+
- GH-458: claim/start-task reject --assignee with an untargeted recovery hint (alias or better hint) ([pm-qfte](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-qfte.toon))
|
|
25
|
+
- GH-468: clarify or publish the pm SDK npm package coordinates (@unbrained/pm-sdk is 404) ([pm-25d0](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-25d0.toon))
|
|
26
|
+
- 2026-07-07 ecosystem audit \#16: all-status review, long-horizon gap items (merge semantics, event stream, policy roles, flow metrics) ([pm-su60](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-su60.toon))
|
|
27
|
+
- 2026-07-06 ecosystem audit \#15: WIP hygiene, GH/commit coverage verification, grammar+SDK domain completions, horizon-4 planning ([pm-pvij](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-pvij.toon))
|
|
28
|
+
- chore: 2026-07-06 ecosystem audit \#14 — WIP status hygiene (docstring family reset) + stale in-progress detection backlog ([pm-6a1g](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-6a1g.toon))
|
|
29
|
+
- chore: 2026-07-06 ecosystem audit \#13 — Semgrep-issue metadata backfill, scale-out initiative pm-9rxu, composability contract set ([pm-lgim](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-lgim.toon))
|
|
30
|
+
- 2026-07-06 ecosystem audit \#12: GH-467..474 backlog coverage + code-scanning capability epic ([pm-3rgp](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-3rgp.toon))
|
|
31
|
+
- Unblock dependabot PRs: @types/node 26 type error, pnpm release-age cooldown, codeql-action lockstep group ([pm-2czc](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-2czc.toon))
|
|
32
|
+
- pm install should accept multiple package targets (help already advertises \[targets...\]) ([pm-hj9h](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-hj9h.toon))
|
|
33
|
+
- Triage: close stale dogfood reports GH-436 (pm next/focus) and GH-440 (context --fields) with shipped evidence ([pm-7cx8](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-7cx8.toon))
|
|
34
|
+
|
|
3
35
|
## 2026.7.6 - 2026-07-06
|
|
4
36
|
|
|
5
37
|
### Added
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm annotation command command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!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]="
|
|
7
|
+
!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]="5fd7e12e-f272-574b-8e22-e4d6d077b280")}catch(e){}}();
|
|
8
8
|
import { pathExists } from "../../core/fs/fs-utils.js";
|
|
9
9
|
import { getActiveExtensionRegistrations } from "../../core/extensions/index.js";
|
|
10
10
|
import { resolveItemTypeRegistry } from "../../core/item/type-registry.js";
|
|
@@ -81,6 +81,31 @@ export function wrapOwnershipConflict(error, guidance) {
|
|
|
81
81
|
}
|
|
82
82
|
throw error;
|
|
83
83
|
}
|
|
84
|
+
function annotationStdinHint(collectionKey) {
|
|
85
|
+
return collectionKey === "comments" ? "--stdin" : "--add -";
|
|
86
|
+
}
|
|
87
|
+
function assertAnnotationAddValueIsNotFlagLike(raw, config) {
|
|
88
|
+
const emptyFlag = config.input.emptyFlag ?? "--add";
|
|
89
|
+
if (emptyFlag !== "--add") {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const trimmed = raw.trim();
|
|
93
|
+
if (!/^-{1,2}[A-Za-z][\w-]*(?:=.*)?$/.test(trimmed)) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const stdinHint = annotationStdinHint(config.collectionKey);
|
|
97
|
+
const commandPrefix = config.input.mode === "edit"
|
|
98
|
+
? `pm ${config.collectionKey} <id> --edit <index>`
|
|
99
|
+
: `pm ${config.collectionKey} <id>`;
|
|
100
|
+
throw new PmCliError(`--add value "${trimmed}" looks like an option, not annotation text. Use ${stdinHint} to read stdin, or use text=${trimmed} for literal dash-leading text.`, EXIT_CODE.USAGE, {
|
|
101
|
+
code: "annotation_flag_like_value",
|
|
102
|
+
required: `Use ${stdinHint} for stdin input, pass plain text, or use text=${trimmed} when the text really starts with "-".`,
|
|
103
|
+
examples: [
|
|
104
|
+
`${commandPrefix} ${stdinHint}`,
|
|
105
|
+
`${commandPrefix} --add text=${trimmed}`,
|
|
106
|
+
],
|
|
107
|
+
});
|
|
108
|
+
}
|
|
84
109
|
/**
|
|
85
110
|
* Implements run annotation command for the public runtime surface of this module.
|
|
86
111
|
*/
|
|
@@ -130,6 +155,8 @@ export async function runAnnotationCommand(id, options, global, config) {
|
|
|
130
155
|
const allEntries = readAnnotationEntries(result.item, config.collectionKey);
|
|
131
156
|
return renderAnnotationResult(result.item.id, config.collectionKey, allEntries, limit, options.includeMeta === true);
|
|
132
157
|
}
|
|
158
|
+
const rawText = config.input.rawValue ?? config.input.value ?? "";
|
|
159
|
+
assertAnnotationAddValueIsNotFlagLike(rawText, config);
|
|
133
160
|
const text = config.parseText(config.input.value ?? "");
|
|
134
161
|
if (!text.trim()) {
|
|
135
162
|
throw new PmCliError(`${config.input.emptyFlag ?? "--add"} text cannot be empty`, EXIT_CODE.USAGE);
|
|
@@ -225,4 +252,4 @@ function renderAnnotationResult(id, collectionKey, allEntries, limit, includeMet
|
|
|
225
252
|
};
|
|
226
253
|
}
|
|
227
254
|
//# sourceMappingURL=annotation-command.js.map
|
|
228
|
-
//# debugId=
|
|
255
|
+
//# debugId=5fd7e12e-f272-574b-8e22-e4d6d077b280
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotation-command.js","sources":["cli/commands/annotation-command.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/annotation-command\n *\n * Implements the pm annotation command command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { parseCsvKv } from \"../../core/item/parse.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 { nowIso } from \"../../core/shared/time.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { locateItem, mutateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { parseLimit } from \"../shared-parsers.js\";\n\ninterface AnnotationEntry {\n created_at: string;\n author: string;\n text: string;\n edited_at?: string;\n}\n\ninterface AnnotationCommandOptions {\n limit?: string;\n author?: string;\n message?: string;\n force?: boolean;\n includeMeta?: boolean;\n}\n\ninterface AnnotationInput {\n mode: \"list\" | \"add\" | \"stdin\" | \"file\" | \"edit\" | \"delete\";\n value?: string;\n emptyFlag?: string;\n index?: number;\n}\n\ninterface OwnershipConflictGuidance {\n required: string;\n examples: string[];\n nextSteps: string[];\n}\n\ninterface AnnotationCommandConfig<TKey extends string> {\n input: AnnotationInput;\n collectionKey: TKey;\n op: Parameters<typeof mutateItem>[0][\"op\"];\n editOp?: Parameters<typeof mutateItem>[0][\"op\"];\n deleteOp?: Parameters<typeof mutateItem>[0][\"op\"];\n parseText: (raw: string) => string;\n allowAuditBypass: boolean;\n conflictGuidance: OwnershipConflictGuidance;\n}\n\ntype AnnotationCommandResult<TKey extends string, TEntry extends AnnotationEntry> = {\n id: string;\n count: number;\n} & Record<TKey, TEntry[]> & {\n total_count?: number;\n returned_count?: number;\n has_more?: boolean;\n limit?: number;\n };\n\n/**\n * Implements limit annotation entries for the public runtime surface of this module.\n */\nexport function limitAnnotationEntries<TEntry>(values: TEntry[], limit: number | undefined): TEntry[] {\n if (limit === undefined) return values;\n if (limit === 0) return [];\n return values.slice(Math.max(0, values.length - limit));\n}\n\n/**\n * Implements read annotation entries for the public runtime surface of this module.\n */\nexport function readAnnotationEntries<TEntry>(source: Record<string, unknown>, collectionKey: string): TEntry[] {\n const value = source[collectionKey];\n return Array.isArray(value) ? (value as TEntry[]) : [];\n}\n\n/**\n * Implements parse annotation text input for the public runtime surface of this module.\n */\nexport function parseAnnotationTextInput(raw: string, options: { stripPlainTextPrefix?: boolean } = {}): string {\n const trimmed = raw.trim();\n if (!trimmed) {\n return \"\";\n }\n const textPrefixMatch = /^(?:[-*+]\\s*)?text\\s*[:=]/i.exec(trimmed);\n if (options.stripPlainTextPrefix === true && textPrefixMatch && !trimmed.startsWith(\"```\")) {\n const text = trimmed.slice(textPrefixMatch[0].length).trim();\n return text || trimmed;\n }\n const looksStructured = /^(?:[-*+]\\s*)?text\\s*[:=]/im.test(trimmed) || trimmed.startsWith(\"```\");\n if (!looksStructured) {\n return trimmed;\n }\n try {\n const kv = parseCsvKv(trimmed, \"--add\");\n const keys = Object.keys(kv).map((key) => key.trim().toLowerCase());\n if (keys.some((key) => key !== \"text\")) {\n return trimmed;\n }\n const text = kv.text?.trim();\n return text || trimmed;\n } catch {\n return trimmed;\n }\n}\n\n/**\n * Implements wrap ownership conflict for the public runtime surface of this module.\n */\nexport function wrapOwnershipConflict(error: unknown, guidance: OwnershipConflictGuidance): never {\n if (\n error instanceof PmCliError &&\n error.exitCode === EXIT_CODE.CONFLICT &&\n error.message.includes(\"is assigned to\") &&\n error.message.includes(\"Use --force to override\")\n ) {\n throw new PmCliError(error.message, error.exitCode, {\n code: \"ownership_conflict\",\n required: guidance.required,\n examples: guidance.examples,\n nextSteps: guidance.nextSteps,\n });\n }\n throw error;\n}\n\n/**\n * Implements run annotation command for the public runtime surface of this module.\n */\nexport async function runAnnotationCommand<TKey extends string, TEntry extends AnnotationEntry>(\n id: string,\n options: AnnotationCommandOptions,\n global: GlobalOptions,\n config: AnnotationCommandConfig<TKey>,\n): Promise<AnnotationCommandResult<TKey, TEntry>> {\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 const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const limit = parseLimit(options.limit);\n\n if (config.input.mode === \"list\") {\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const allEntries = readAnnotationEntries<TEntry>(loaded.document.metadata, config.collectionKey);\n return renderAnnotationResult(located.id, config.collectionKey, allEntries, limit, options.includeMeta === true);\n }\n\n const author = resolveAuthor(options.author, settings.author_default);\n\n if (config.input.mode === \"delete\") {\n const op = config.deleteOp ?? config.op;\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op,\n author,\n message: options.message,\n force: options.force,\n bypassAssigneeConflict: config.allowAuditBypass,\n mutate(document) {\n const entries = readAnnotationEntries<TEntry>(document.metadata, config.collectionKey);\n const arrayIndex = resolveAnnotationIndex(config.input.index, entries.length, config.collectionKey);\n entries.splice(arrayIndex, 1);\n document.metadata[config.collectionKey] = entries as never;\n return { changedFields: [config.collectionKey] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, config.conflictGuidance);\n }\n const allEntries = readAnnotationEntries<TEntry>(result.item, config.collectionKey);\n return renderAnnotationResult(result.item.id, config.collectionKey, allEntries, limit, options.includeMeta === true);\n }\n\n const text = config.parseText(config.input.value ?? \"\");\n if (!text.trim()) {\n throw new PmCliError(`${config.input.emptyFlag ?? \"--add\"} text cannot be empty`, EXIT_CODE.USAGE);\n }\n\n if (config.input.mode === \"edit\") {\n const op = config.editOp ?? config.op;\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op,\n author,\n message: options.message,\n force: options.force,\n bypassAssigneeConflict: config.allowAuditBypass,\n mutate(document) {\n const entries = readAnnotationEntries<TEntry>(document.metadata, config.collectionKey);\n const arrayIndex = resolveAnnotationIndex(config.input.index, entries.length, config.collectionKey);\n const existing = entries[arrayIndex];\n entries[arrayIndex] = {\n ...existing,\n text,\n edited_at: nowIso(),\n } as TEntry;\n document.metadata[config.collectionKey] = entries as never;\n return { changedFields: [config.collectionKey] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, config.conflictGuidance);\n }\n const allEntries = readAnnotationEntries<TEntry>(result.item, config.collectionKey);\n return renderAnnotationResult(result.item.id, config.collectionKey, allEntries, limit, options.includeMeta === true);\n }\n\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: config.op,\n author,\n message: options.message,\n force: options.force,\n bypassAssigneeConflict: config.allowAuditBypass,\n mutate(document) {\n const entries = readAnnotationEntries<TEntry>(document.metadata, config.collectionKey);\n entries.push({\n created_at: nowIso(),\n author,\n text,\n } as TEntry);\n document.metadata[config.collectionKey] = entries as never;\n return { changedFields: [config.collectionKey] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, config.conflictGuidance);\n }\n\n const allEntries = readAnnotationEntries<TEntry>(result.item, config.collectionKey);\n return renderAnnotationResult(result.item.id, config.collectionKey, allEntries, limit, options.includeMeta === true);\n}\n\n/**\n * Implements resolve annotation index for the public runtime surface of this module.\n */\nexport function resolveAnnotationIndex(\n oneBasedIndex: number | undefined,\n count: number,\n collectionKey: string,\n): number {\n if (oneBasedIndex === undefined || !Number.isInteger(oneBasedIndex) || oneBasedIndex < 1 || oneBasedIndex > count) {\n const singular = collectionKey.replace(/s$/, \"\");\n const label = `${singular.charAt(0).toUpperCase()}${singular.slice(1)}`;\n const noun = count === 1 ? `1 ${singular}` : `${count} ${collectionKey}`;\n throw new PmCliError(\n `${label} index ${oneBasedIndex ?? \"(missing)\"} out of range (item has ${noun})`,\n EXIT_CODE.USAGE,\n );\n }\n return oneBasedIndex - 1;\n}\n\nfunction renderAnnotationResult<TKey extends string, TEntry extends AnnotationEntry>(\n id: string,\n collectionKey: TKey,\n allEntries: TEntry[],\n limit: number | undefined,\n includeMeta: boolean,\n): AnnotationCommandResult<TKey, TEntry> {\n const entries = limitAnnotationEntries(allEntries, limit);\n return {\n id,\n [collectionKey]: entries,\n count: entries.length,\n ...(includeMeta\n ? {\n total_count: allEntries.length,\n returned_count: entries.length,\n has_more: entries.length < allEntries.length,\n ...(limit !== undefined ? { limit } : {}),\n }\n : {}),\n } as AnnotationCommandResult<TKey, TEntry>;\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,UAAU,EAAE,M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":["/**\n * @module cli/commands/annotation-command\n *\n * Implements the pm annotation command command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { parseCsvKv } from \"../../core/item/parse.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 { nowIso } from \"../../core/shared/time.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { locateItem, mutateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { parseLimit } from \"../shared-parsers.js\";\n\ninterface AnnotationEntry {\n created_at: string;\n author: string;\n text: string;\n edited_at?: string;\n}\n\ninterface AnnotationCommandOptions {\n limit?: string;\n author?: string;\n message?: string;\n force?: boolean;\n includeMeta?: boolean;\n}\n\ninterface AnnotationInput {\n mode: \"list\" | \"add\" | \"stdin\" | \"file\" | \"edit\" | \"delete\";\n value?: string;\n rawValue?: string;\n emptyFlag?: string;\n index?: number;\n}\n\ninterface OwnershipConflictGuidance {\n required: string;\n examples: string[];\n nextSteps: string[];\n}\n\ninterface AnnotationCommandConfig<TKey extends string> {\n input: AnnotationInput;\n collectionKey: TKey;\n op: Parameters<typeof mutateItem>[0][\"op\"];\n editOp?: Parameters<typeof mutateItem>[0][\"op\"];\n deleteOp?: Parameters<typeof mutateItem>[0][\"op\"];\n parseText: (raw: string) => string;\n allowAuditBypass: boolean;\n conflictGuidance: OwnershipConflictGuidance;\n}\n\ntype AnnotationCommandResult<TKey extends string, TEntry extends AnnotationEntry> = {\n id: string;\n count: number;\n} & Record<TKey, TEntry[]> & {\n total_count?: number;\n returned_count?: number;\n has_more?: boolean;\n limit?: number;\n };\n\n/**\n * Implements limit annotation entries for the public runtime surface of this module.\n */\nexport function limitAnnotationEntries<TEntry>(values: TEntry[], limit: number | undefined): TEntry[] {\n if (limit === undefined) return values;\n if (limit === 0) return [];\n return values.slice(Math.max(0, values.length - limit));\n}\n\n/**\n * Implements read annotation entries for the public runtime surface of this module.\n */\nexport function readAnnotationEntries<TEntry>(source: Record<string, unknown>, collectionKey: string): TEntry[] {\n const value = source[collectionKey];\n return Array.isArray(value) ? (value as TEntry[]) : [];\n}\n\n/**\n * Implements parse annotation text input for the public runtime surface of this module.\n */\nexport function parseAnnotationTextInput(raw: string, options: { stripPlainTextPrefix?: boolean } = {}): string {\n const trimmed = raw.trim();\n if (!trimmed) {\n return \"\";\n }\n const textPrefixMatch = /^(?:[-*+]\\s*)?text\\s*[:=]/i.exec(trimmed);\n if (options.stripPlainTextPrefix === true && textPrefixMatch && !trimmed.startsWith(\"```\")) {\n const text = trimmed.slice(textPrefixMatch[0].length).trim();\n return text || trimmed;\n }\n const looksStructured = /^(?:[-*+]\\s*)?text\\s*[:=]/im.test(trimmed) || trimmed.startsWith(\"```\");\n if (!looksStructured) {\n return trimmed;\n }\n try {\n const kv = parseCsvKv(trimmed, \"--add\");\n const keys = Object.keys(kv).map((key) => key.trim().toLowerCase());\n if (keys.some((key) => key !== \"text\")) {\n return trimmed;\n }\n const text = kv.text?.trim();\n return text || trimmed;\n } catch {\n return trimmed;\n }\n}\n\n/**\n * Implements wrap ownership conflict for the public runtime surface of this module.\n */\nexport function wrapOwnershipConflict(error: unknown, guidance: OwnershipConflictGuidance): never {\n if (\n error instanceof PmCliError &&\n error.exitCode === EXIT_CODE.CONFLICT &&\n error.message.includes(\"is assigned to\") &&\n error.message.includes(\"Use --force to override\")\n ) {\n throw new PmCliError(error.message, error.exitCode, {\n code: \"ownership_conflict\",\n required: guidance.required,\n examples: guidance.examples,\n nextSteps: guidance.nextSteps,\n });\n }\n throw error;\n}\n\nfunction annotationStdinHint(collectionKey: string): string {\n return collectionKey === \"comments\" ? \"--stdin\" : \"--add -\";\n}\n\nfunction assertAnnotationAddValueIsNotFlagLike(raw: string, config: AnnotationCommandConfig<string>): void {\n const emptyFlag = config.input.emptyFlag ?? \"--add\";\n if (emptyFlag !== \"--add\") {\n return;\n }\n const trimmed = raw.trim();\n if (!/^-{1,2}[A-Za-z][\\w-]*(?:=.*)?$/.test(trimmed)) {\n return;\n }\n const stdinHint = annotationStdinHint(config.collectionKey);\n const commandPrefix =\n config.input.mode === \"edit\"\n ? `pm ${config.collectionKey} <id> --edit <index>`\n : `pm ${config.collectionKey} <id>`;\n throw new PmCliError(\n `--add value \"${trimmed}\" looks like an option, not annotation text. Use ${stdinHint} to read stdin, or use text=${trimmed} for literal dash-leading text.`,\n EXIT_CODE.USAGE,\n {\n code: \"annotation_flag_like_value\",\n required: `Use ${stdinHint} for stdin input, pass plain text, or use text=${trimmed} when the text really starts with \"-\".`,\n examples: [\n `${commandPrefix} ${stdinHint}`,\n `${commandPrefix} --add text=${trimmed}`,\n ],\n },\n );\n}\n\n/**\n * Implements run annotation command for the public runtime surface of this module.\n */\nexport async function runAnnotationCommand<TKey extends string, TEntry extends AnnotationEntry>(\n id: string,\n options: AnnotationCommandOptions,\n global: GlobalOptions,\n config: AnnotationCommandConfig<TKey>,\n): Promise<AnnotationCommandResult<TKey, TEntry>> {\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 const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const limit = parseLimit(options.limit);\n\n if (config.input.mode === \"list\") {\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const allEntries = readAnnotationEntries<TEntry>(loaded.document.metadata, config.collectionKey);\n return renderAnnotationResult(located.id, config.collectionKey, allEntries, limit, options.includeMeta === true);\n }\n\n const author = resolveAuthor(options.author, settings.author_default);\n\n if (config.input.mode === \"delete\") {\n const op = config.deleteOp ?? config.op;\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op,\n author,\n message: options.message,\n force: options.force,\n bypassAssigneeConflict: config.allowAuditBypass,\n mutate(document) {\n const entries = readAnnotationEntries<TEntry>(document.metadata, config.collectionKey);\n const arrayIndex = resolveAnnotationIndex(config.input.index, entries.length, config.collectionKey);\n entries.splice(arrayIndex, 1);\n document.metadata[config.collectionKey] = entries as never;\n return { changedFields: [config.collectionKey] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, config.conflictGuidance);\n }\n const allEntries = readAnnotationEntries<TEntry>(result.item, config.collectionKey);\n return renderAnnotationResult(result.item.id, config.collectionKey, allEntries, limit, options.includeMeta === true);\n }\n\n const rawText = config.input.rawValue ?? config.input.value ?? \"\";\n assertAnnotationAddValueIsNotFlagLike(rawText, config);\n const text = config.parseText(config.input.value ?? \"\");\n if (!text.trim()) {\n throw new PmCliError(`${config.input.emptyFlag ?? \"--add\"} text cannot be empty`, EXIT_CODE.USAGE);\n }\n\n if (config.input.mode === \"edit\") {\n const op = config.editOp ?? config.op;\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op,\n author,\n message: options.message,\n force: options.force,\n bypassAssigneeConflict: config.allowAuditBypass,\n mutate(document) {\n const entries = readAnnotationEntries<TEntry>(document.metadata, config.collectionKey);\n const arrayIndex = resolveAnnotationIndex(config.input.index, entries.length, config.collectionKey);\n const existing = entries[arrayIndex];\n entries[arrayIndex] = {\n ...existing,\n text,\n edited_at: nowIso(),\n } as TEntry;\n document.metadata[config.collectionKey] = entries as never;\n return { changedFields: [config.collectionKey] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, config.conflictGuidance);\n }\n const allEntries = readAnnotationEntries<TEntry>(result.item, config.collectionKey);\n return renderAnnotationResult(result.item.id, config.collectionKey, allEntries, limit, options.includeMeta === true);\n }\n\n let result: Awaited<ReturnType<typeof mutateItem>>;\n try {\n result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: config.op,\n author,\n message: options.message,\n force: options.force,\n bypassAssigneeConflict: config.allowAuditBypass,\n mutate(document) {\n const entries = readAnnotationEntries<TEntry>(document.metadata, config.collectionKey);\n entries.push({\n created_at: nowIso(),\n author,\n text,\n } as TEntry);\n document.metadata[config.collectionKey] = entries as never;\n return { changedFields: [config.collectionKey] };\n },\n });\n } catch (error: unknown) {\n wrapOwnershipConflict(error, config.conflictGuidance);\n }\n\n const allEntries = readAnnotationEntries<TEntry>(result.item, config.collectionKey);\n return renderAnnotationResult(result.item.id, config.collectionKey, allEntries, limit, options.includeMeta === true);\n}\n\n/**\n * Implements resolve annotation index for the public runtime surface of this module.\n */\nexport function resolveAnnotationIndex(\n oneBasedIndex: number | undefined,\n count: number,\n collectionKey: string,\n): number {\n if (oneBasedIndex === undefined || !Number.isInteger(oneBasedIndex) || oneBasedIndex < 1 || oneBasedIndex > count) {\n const singular = collectionKey.replace(/s$/, \"\");\n const label = `${singular.charAt(0).toUpperCase()}${singular.slice(1)}`;\n const noun = count === 1 ? `1 ${singular}` : `${count} ${collectionKey}`;\n throw new PmCliError(\n `${label} index ${oneBasedIndex ?? \"(missing)\"} out of range (item has ${noun})`,\n EXIT_CODE.USAGE,\n );\n }\n return oneBasedIndex - 1;\n}\n\nfunction renderAnnotationResult<TKey extends string, TEntry extends AnnotationEntry>(\n id: string,\n collectionKey: TKey,\n allEntries: TEntry[],\n limit: number | undefined,\n includeMeta: boolean,\n): AnnotationCommandResult<TKey, TEntry> {\n const entries = limitAnnotationEntries(allEntries, limit);\n return {\n id,\n [collectionKey]: entries,\n count: entries.length,\n ...(includeMeta\n ? {\n total_count: allEntries.length,\n returned_count: entries.length,\n has_more: entries.length < allEntries.length,\n ...(limit !== undefined ? { limit } : {}),\n }\n : {}),\n } as AnnotationCommandResult<TKey, TEntry>;\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAoDlD;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAS,MAAgB,EAAE,KAAyB;IACxF,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACvC,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC3B,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAS,MAA+B,EAAE,aAAqB;IAClG,MAAM,KAAK,GAAG,MAAM,CAAC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KACiC,CAAC;AAC7C,CAAC","debugId":"5fd7e12e-f272-574b-8e22-e4d6d077b280"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm comments command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!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]="
|
|
7
|
+
!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]="76f33725-4d43-5197-98c4-d7c8431df92b")}catch(e){}}();
|
|
8
8
|
import { readFile } from "node:fs/promises";
|
|
9
9
|
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
10
10
|
import { PmCliError } from "../../core/shared/errors.js";
|
|
@@ -89,12 +89,11 @@ export async function runComments(id, options, global) {
|
|
|
89
89
|
const stdinResolver = createStdinTokenResolver();
|
|
90
90
|
const commentInput = await resolveCommentInput(options, stdinResolver);
|
|
91
91
|
const shouldParseText = commentInput.mode === "add" || commentInput.mode === "edit";
|
|
92
|
-
// list/delete carry no text (value undefined → ""); add/edit/stdin/file always
|
|
93
|
-
// resolve to a string. Normalize once so neither branch below is unreachable.
|
|
94
92
|
const rawValue = commentInput.value ?? "";
|
|
95
93
|
return runAnnotationCommand(id, options, global, {
|
|
96
94
|
input: {
|
|
97
95
|
...commentInput,
|
|
96
|
+
rawValue: options.add ?? rawValue,
|
|
98
97
|
value: shouldParseText ? parseAnnotationTextInput(rawValue, { stripPlainTextPrefix: true }) : rawValue,
|
|
99
98
|
},
|
|
100
99
|
collectionKey: "comments",
|
|
@@ -114,4 +113,4 @@ export async function runComments(id, options, global) {
|
|
|
114
113
|
});
|
|
115
114
|
}
|
|
116
115
|
//# sourceMappingURL=comments.js.map
|
|
117
|
-
//# debugId=
|
|
116
|
+
//# debugId=76f33725-4d43-5197-98c4-d7c8431df92b
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments.js","sources":["cli/commands/comments.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/comments\n *\n * Implements the pm comments command surface and its agent-facing runtime behavior.\n */\nimport { readFile } from \"node:fs/promises\";\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 { createStdinTokenResolver } from \"../../core/item/parse.js\";\nimport type { Comment } from \"../../types/index.js\";\nimport { parseAnnotationTextInput, runAnnotationCommand } from \"./annotation-command.js\";\n\n/**\n * Documents the comments command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommentsCommandOptions {\n add?: string;\n stdin?: boolean;\n file?: string;\n edit?: number;\n delete?: number;\n limit?: string;\n includeMeta?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n allowAuditComment?: boolean;\n}\n\n/**\n * Documents the comments result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommentsResult {\n id: string;\n comments: Comment[];\n count: number;\n total_count?: number;\n returned_count?: number;\n has_more?: boolean;\n limit?: number;\n}\n\ninterface ResolvedCommentInput {\n mode: \"list\" | \"add\" | \"stdin\" | \"file\" | \"edit\" | \"delete\";\n value?: string;\n emptyFlag?: string;\n index?: number;\n}\n\nfunction isErrnoError(error: unknown): error is NodeJS.ErrnoException {\n return typeof error === \"object\" && error !== null && \"code\" in error;\n}\n\nasync function resolveCommentTextSource(\n options: CommentsCommandOptions,\n stdinResolver: ReturnType<typeof createStdinTokenResolver>,\n): Promise<{ value: string; emptyFlag: string } | undefined> {\n const hasAdd = options.add !== undefined;\n const hasStdin = options.stdin === true;\n const hasFile = typeof options.file === \"string\";\n const sourceCount = Number(hasAdd) + Number(hasStdin) + Number(hasFile);\n if (sourceCount === 0) {\n return undefined;\n }\n if (sourceCount > 1) {\n throw new PmCliError(\"Specify comment text using only one input source: --add, --stdin, or --file\", EXIT_CODE.USAGE);\n }\n if (hasAdd) {\n const addInput = await stdinResolver.resolveValue(options.add, \"--add\");\n return { value: addInput ?? \"\", emptyFlag: \"--add\" };\n }\n if (hasStdin) {\n const stdinInput = await stdinResolver.resolveValue(\"-\", \"--stdin\");\n return { value: stdinInput ?? \"\", emptyFlag: \"--stdin\" };\n }\n const filePath = (options.file as string).trim();\n if (!filePath) {\n throw new PmCliError(\"--file path cannot be empty\", EXIT_CODE.USAGE);\n }\n try {\n const fileInput = await readFile(filePath, \"utf8\");\n return { value: fileInput, emptyFlag: \"--file\" };\n } catch (error: unknown) {\n if (isErrnoError(error) && error.code === \"ENOENT\") {\n throw new PmCliError(`--file path not found: ${filePath}`, EXIT_CODE.USAGE);\n }\n const detail = error instanceof Error ? error.message : String(error);\n throw new PmCliError(`Failed to read --file path \"${filePath}\": ${detail}`, EXIT_CODE.USAGE);\n }\n}\n\nasync function resolveCommentInput(\n options: CommentsCommandOptions,\n stdinResolver: ReturnType<typeof createStdinTokenResolver>,\n): Promise<ResolvedCommentInput> {\n const hasEdit = options.edit !== undefined;\n const hasDelete = options.delete !== undefined;\n if (hasEdit && hasDelete) {\n throw new PmCliError(\"Specify only one of --edit or --delete\", EXIT_CODE.USAGE);\n }\n\n if (hasDelete) {\n const textSource = await resolveCommentTextSource(options, stdinResolver);\n if (textSource !== undefined) {\n throw new PmCliError(\"--delete does not take comment text\", EXIT_CODE.USAGE);\n }\n return { mode: \"delete\", index: options.delete };\n }\n\n if (hasEdit) {\n const textSource = await resolveCommentTextSource(options, stdinResolver);\n if (textSource === undefined) {\n throw new PmCliError(\n \"--edit requires replacement text via positional [text], --add, --stdin, or --file\",\n EXIT_CODE.USAGE,\n );\n }\n return {\n mode: \"edit\",\n index: options.edit,\n value: textSource.value,\n emptyFlag: textSource.emptyFlag,\n };\n }\n\n const textSource = await resolveCommentTextSource(options, stdinResolver);\n if (textSource === undefined) {\n return { mode: \"list\" };\n }\n // Map the single resolved input source back to its add/stdin/file mode so the\n // caller still knows whether to run plain-text markdown parsing (add-only).\n const mode = textSource.emptyFlag === \"--add\" ? \"add\" : textSource.emptyFlag === \"--stdin\" ? \"stdin\" : \"file\";\n return { mode, value: textSource.value, emptyFlag: textSource.emptyFlag };\n}\n\n/**\n * Implements run comments for the public runtime surface of this module.\n */\nexport async function runComments(id: string, options: CommentsCommandOptions, global: GlobalOptions): Promise<CommentsResult> {\n const stdinResolver = createStdinTokenResolver();\n const commentInput = await resolveCommentInput(options, stdinResolver);\n\n const shouldParseText = commentInput.mode === \"add\" || commentInput.mode === \"edit\";\n // list/delete carry no text (value undefined → \"\"); add/edit/stdin/file always\n // resolve to a string. Normalize once so neither branch below is unreachable.\n const rawValue = commentInput.value ?? \"\";\n return runAnnotationCommand<\"comments\", Comment>(id, options, global, {\n input: {\n ...commentInput,\n value: shouldParseText ? parseAnnotationTextInput(rawValue, { stripPlainTextPrefix: true }) : rawValue,\n },\n collectionKey: \"comments\",\n op: \"comment_add\",\n editOp: \"comment_edit\",\n deleteOp: \"comment_delete\",\n parseText: (raw) => raw,\n allowAuditBypass: Boolean(options.allowAuditComment),\n conflictGuidance: {\n required:\n \"For append-only comment audits on another owner's item, prefer --allow-audit-comment before considering --force.\",\n examples: ['pm comments pm-a1b2 --add \"audit note\" --author \"reviewer\" --allow-audit-comment'],\n nextSteps: [\n \"Retry with --allow-audit-comment for append-only audits that do not mutate item metadata beyond comments.\",\n \"Use --force only when an ownership override is explicitly approved.\",\n ],\n },\n });\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,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AAqB;IAClG,MAAM,aAAa,GAAG,wBAAwB,EAAE,CAAC;IACjD,MAAM,YAAY,GAAG,MAAM,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAEvE,MAAM,eAAe,GAAG,YAAY,CAAC,IAAI,KAAK,KAAK,IAAI,YAAY,CAAC,IAAI,KAAK,MAAM,CAAC;IACpF,+EAA+E;IAC/E,8EAA8E;IAC9E,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,IAAI,EAAE,CAAC;IAC1C,OAAO,oBAAoB,CAAsB,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACpE,KAAK,EAAE;YACL,GAAG,YAAY;YACf,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,wBAAwB,CAAC,QAAQ,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ;SACvG;QACD,aAAa,EAAE,UAAU;QACzB,EAAE,EAAE,aAAa;QACjB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,gBAAgB;QAC1B,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG;QACvB,gBAAgB,EAAE,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC;QACpD,gBAAgB,EAAE;YAChB,QAAQ,EACN,kHAAkH;YACpH,QAAQ,EAAE,CAAC,kFAAkF,CAAC;YAC9F,SAAS,EAAE;gBACT,2GAA2G;gBAC3G,qEAAqE;aACtE;SACF;KACF,CAAC,CAAC;AACL,CAAC","debugId":"6a6f6522-973f-5abd-a34d-7770ef5a367b"}
|
|
1
|
+
{"version":3,"file":"comments.js","sources":["cli/commands/comments.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/comments\n *\n * Implements the pm comments command surface and its agent-facing runtime behavior.\n */\nimport { readFile } from \"node:fs/promises\";\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 { createStdinTokenResolver } from \"../../core/item/parse.js\";\nimport type { Comment } from \"../../types/index.js\";\nimport { parseAnnotationTextInput, runAnnotationCommand } from \"./annotation-command.js\";\n\n/**\n * Documents the comments command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommentsCommandOptions {\n add?: string;\n stdin?: boolean;\n file?: string;\n edit?: number;\n delete?: number;\n limit?: string;\n includeMeta?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n allowAuditComment?: boolean;\n}\n\n/**\n * Documents the comments result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommentsResult {\n id: string;\n comments: Comment[];\n count: number;\n total_count?: number;\n returned_count?: number;\n has_more?: boolean;\n limit?: number;\n}\n\ninterface ResolvedCommentInput {\n mode: \"list\" | \"add\" | \"stdin\" | \"file\" | \"edit\" | \"delete\";\n value?: string;\n emptyFlag?: string;\n index?: number;\n}\n\nfunction isErrnoError(error: unknown): error is NodeJS.ErrnoException {\n return typeof error === \"object\" && error !== null && \"code\" in error;\n}\n\nasync function resolveCommentTextSource(\n options: CommentsCommandOptions,\n stdinResolver: ReturnType<typeof createStdinTokenResolver>,\n): Promise<{ value: string; emptyFlag: string } | undefined> {\n const hasAdd = options.add !== undefined;\n const hasStdin = options.stdin === true;\n const hasFile = typeof options.file === \"string\";\n const sourceCount = Number(hasAdd) + Number(hasStdin) + Number(hasFile);\n if (sourceCount === 0) {\n return undefined;\n }\n if (sourceCount > 1) {\n throw new PmCliError(\"Specify comment text using only one input source: --add, --stdin, or --file\", EXIT_CODE.USAGE);\n }\n if (hasAdd) {\n const addInput = await stdinResolver.resolveValue(options.add, \"--add\");\n return { value: addInput ?? \"\", emptyFlag: \"--add\" };\n }\n if (hasStdin) {\n const stdinInput = await stdinResolver.resolveValue(\"-\", \"--stdin\");\n return { value: stdinInput ?? \"\", emptyFlag: \"--stdin\" };\n }\n const filePath = (options.file as string).trim();\n if (!filePath) {\n throw new PmCliError(\"--file path cannot be empty\", EXIT_CODE.USAGE);\n }\n try {\n const fileInput = await readFile(filePath, \"utf8\");\n return { value: fileInput, emptyFlag: \"--file\" };\n } catch (error: unknown) {\n if (isErrnoError(error) && error.code === \"ENOENT\") {\n throw new PmCliError(`--file path not found: ${filePath}`, EXIT_CODE.USAGE);\n }\n const detail = error instanceof Error ? error.message : String(error);\n throw new PmCliError(`Failed to read --file path \"${filePath}\": ${detail}`, EXIT_CODE.USAGE);\n }\n}\n\nasync function resolveCommentInput(\n options: CommentsCommandOptions,\n stdinResolver: ReturnType<typeof createStdinTokenResolver>,\n): Promise<ResolvedCommentInput> {\n const hasEdit = options.edit !== undefined;\n const hasDelete = options.delete !== undefined;\n if (hasEdit && hasDelete) {\n throw new PmCliError(\"Specify only one of --edit or --delete\", EXIT_CODE.USAGE);\n }\n\n if (hasDelete) {\n const textSource = await resolveCommentTextSource(options, stdinResolver);\n if (textSource !== undefined) {\n throw new PmCliError(\"--delete does not take comment text\", EXIT_CODE.USAGE);\n }\n return { mode: \"delete\", index: options.delete };\n }\n\n if (hasEdit) {\n const textSource = await resolveCommentTextSource(options, stdinResolver);\n if (textSource === undefined) {\n throw new PmCliError(\n \"--edit requires replacement text via positional [text], --add, --stdin, or --file\",\n EXIT_CODE.USAGE,\n );\n }\n return {\n mode: \"edit\",\n index: options.edit,\n value: textSource.value,\n emptyFlag: textSource.emptyFlag,\n };\n }\n\n const textSource = await resolveCommentTextSource(options, stdinResolver);\n if (textSource === undefined) {\n return { mode: \"list\" };\n }\n // Map the single resolved input source back to its add/stdin/file mode so the\n // caller still knows whether to run plain-text markdown parsing (add-only).\n const mode = textSource.emptyFlag === \"--add\" ? \"add\" : textSource.emptyFlag === \"--stdin\" ? \"stdin\" : \"file\";\n return { mode, value: textSource.value, emptyFlag: textSource.emptyFlag };\n}\n\n/**\n * Implements run comments for the public runtime surface of this module.\n */\nexport async function runComments(id: string, options: CommentsCommandOptions, global: GlobalOptions): Promise<CommentsResult> {\n const stdinResolver = createStdinTokenResolver();\n const commentInput = await resolveCommentInput(options, stdinResolver);\n\n const shouldParseText = commentInput.mode === \"add\" || commentInput.mode === \"edit\";\n const rawValue = commentInput.value ?? \"\";\n return runAnnotationCommand<\"comments\", Comment>(id, options, global, {\n input: {\n ...commentInput,\n rawValue: options.add ?? rawValue,\n value: shouldParseText ? parseAnnotationTextInput(rawValue, { stripPlainTextPrefix: true }) : rawValue,\n },\n collectionKey: \"comments\",\n op: \"comment_add\",\n editOp: \"comment_edit\",\n deleteOp: \"comment_delete\",\n parseText: (raw) => raw,\n allowAuditBypass: Boolean(options.allowAuditComment),\n conflictGuidance: {\n required:\n \"For append-only comment audits on another owner's item, prefer --allow-audit-comment before considering --force.\",\n examples: ['pm comments pm-a1b2 --add \"audit note\" --author \"reviewer\" --allow-audit-comment'],\n nextSteps: [\n \"Retry with --allow-audit-comment for append-only audits that do not mutate item metadata beyond comments.\",\n \"Use --force only when an ownership override is explicitly approved.\",\n ],\n },\n });\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAuCzF,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,CAAC;AACxE,CAAC;AAED,KAAK,UAAU,wBAAwB,CACrC,OAA+B,EAC/B,aAA0D;IAE1D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,KAAK,SAAS,CAAC;IACzC,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,KAAK,IAAI,CAAC;IACxC,MAAM,OAAO,G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ACjC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,wBAAwB,CAAC,QAAQ,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ;SACvG;QACD,aAAa,EAAE,UAAU;QACzB,EAAE,EAAE,aAAa;QACjB,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,gBAAgB;QAC1B,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG;QACvB,gBAAgB,EAAE,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC;QACpD,gBAAgB,EAAE;YAChB,QAAQ,EACN,kHAAkH;YACpH,QAAQ,EAAE,CAAC,kFAAkF,CAAC;YAC9F,SAAS,EAAE;gBACT,2GAA2G;gBAC3G,qEAAqE;aACtE;SACF;KACF,CAAC,CAAC;AACL,CAAC","debugId":"76f33725-4d43-5197-98c4-d7c8431df92b"}
|
|
@@ -14,6 +14,9 @@ export declare function isBundledPackageInstallAllTarget(input: string): boolean
|
|
|
14
14
|
export declare function listBundledPackageAliases(): Promise<string[]>;
|
|
15
15
|
/**
|
|
16
16
|
* Implements resolve bundled package root for the public runtime surface of this module.
|
|
17
|
+
* Accepts every spelling agents naturally reach for: the catalog alias
|
|
18
|
+
* ("kanban"), the package directory ("pm-kanban"), and the published npm name
|
|
19
|
+
* ("@unbrained/pm-kanban").
|
|
17
20
|
*/
|
|
18
21
|
export declare function resolveBundledPackageRoot(alias: string): Promise<string | null>;
|
|
19
22
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements extension package-management support for Bundled Catalog.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!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]="
|
|
7
|
+
!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]="d4026cdd-6e38-5550-b33e-94d5c7b97e58")}catch(e){}}();
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { collectPackageExtensionDirectories, PM_PACKAGE_RESOURCE_KINDS, readPmPackageManifest } from "../../../core/packages/manifest.js";
|
|
@@ -74,6 +74,34 @@ export function isBundledPackageInstallAllTarget(input) {
|
|
|
74
74
|
function derivePackageAlias(packageDirectory) {
|
|
75
75
|
return packageDirectory.replace(/^pm-/i, "").trim().toLowerCase();
|
|
76
76
|
}
|
|
77
|
+
async function collectManifestPackageEntries(packagesRoot, entriesByAlias) {
|
|
78
|
+
const entries = await fs.readdir(packagesRoot, { withFileTypes: true });
|
|
79
|
+
for (const entry of entries) {
|
|
80
|
+
if (!entry.isDirectory() || !entry.name.startsWith("pm-")) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
const candidateRoot = path.join(packagesRoot, entry.name);
|
|
84
|
+
if (!(await pathExists(path.join(candidateRoot, "package.json")))) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
const manifest = await readPmPackageManifest(candidateRoot);
|
|
88
|
+
const aliases = manifest.aliases && manifest.aliases.length > 0
|
|
89
|
+
? manifest.aliases
|
|
90
|
+
: [derivePackageAlias(entry.name)];
|
|
91
|
+
for (const alias of aliases) {
|
|
92
|
+
const normalizedAlias = alias.trim().toLowerCase();
|
|
93
|
+
if (normalizedAlias.length === 0 || entriesByAlias.has(normalizedAlias)) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
entriesByAlias.set(normalizedAlias, {
|
|
97
|
+
alias: normalizedAlias,
|
|
98
|
+
package_directory: entry.name,
|
|
99
|
+
package_root: candidateRoot,
|
|
100
|
+
package_name: manifest.package_name ?? null,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
77
105
|
async function collectBundledPackageEntries() {
|
|
78
106
|
const entriesByAlias = new Map();
|
|
79
107
|
for (const packageRoot of resolvePackageRootCandidates()) {
|
|
@@ -81,31 +109,7 @@ async function collectBundledPackageEntries() {
|
|
|
81
109
|
if (!(await pathExists(packagesRoot))) {
|
|
82
110
|
continue;
|
|
83
111
|
}
|
|
84
|
-
|
|
85
|
-
for (const entry of entries) {
|
|
86
|
-
if (!entry.isDirectory() || !entry.name.startsWith("pm-")) {
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
const candidateRoot = path.join(packagesRoot, entry.name);
|
|
90
|
-
if (!(await pathExists(path.join(candidateRoot, "package.json")))) {
|
|
91
|
-
continue;
|
|
92
|
-
}
|
|
93
|
-
const manifest = await readPmPackageManifest(candidateRoot);
|
|
94
|
-
const aliases = manifest.aliases && manifest.aliases.length > 0
|
|
95
|
-
? manifest.aliases
|
|
96
|
-
: [derivePackageAlias(entry.name)];
|
|
97
|
-
for (const alias of aliases) {
|
|
98
|
-
const normalizedAlias = alias.trim().toLowerCase();
|
|
99
|
-
if (normalizedAlias.length === 0 || entriesByAlias.has(normalizedAlias)) {
|
|
100
|
-
continue;
|
|
101
|
-
}
|
|
102
|
-
entriesByAlias.set(normalizedAlias, {
|
|
103
|
-
alias: normalizedAlias,
|
|
104
|
-
package_directory: entry.name,
|
|
105
|
-
package_root: candidateRoot,
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
112
|
+
await collectManifestPackageEntries(packagesRoot, entriesByAlias);
|
|
109
113
|
}
|
|
110
114
|
for (const [alias, legacy] of Object.entries(LEGACY_BUNDLED_PACKAGE_ALIASES)) {
|
|
111
115
|
/* c8 ignore start -- canonical aliases are present in bundled package manifests */
|
|
@@ -121,6 +125,7 @@ async function collectBundledPackageEntries() {
|
|
|
121
125
|
alias,
|
|
122
126
|
package_directory: legacy.package_directory,
|
|
123
127
|
package_root: packagePath,
|
|
128
|
+
package_name: null,
|
|
124
129
|
});
|
|
125
130
|
break;
|
|
126
131
|
}
|
|
@@ -137,10 +142,15 @@ export async function listBundledPackageAliases() {
|
|
|
137
142
|
}
|
|
138
143
|
/**
|
|
139
144
|
* Implements resolve bundled package root for the public runtime surface of this module.
|
|
145
|
+
* Accepts every spelling agents naturally reach for: the catalog alias
|
|
146
|
+
* ("kanban"), the package directory ("pm-kanban"), and the published npm name
|
|
147
|
+
* ("@unbrained/pm-kanban").
|
|
140
148
|
*/
|
|
141
149
|
export async function resolveBundledPackageRoot(alias) {
|
|
142
150
|
const normalized = alias.trim().toLowerCase();
|
|
143
|
-
const entry = (await collectBundledPackageEntries()).find((candidate) => candidate.alias === normalized
|
|
151
|
+
const entry = (await collectBundledPackageEntries()).find((candidate) => candidate.alias === normalized ||
|
|
152
|
+
candidate.package_directory.toLowerCase() === normalized ||
|
|
153
|
+
candidate.package_name?.toLowerCase() === normalized);
|
|
144
154
|
return entry?.package_root ?? null;
|
|
145
155
|
}
|
|
146
156
|
/**
|
|
@@ -319,4 +329,4 @@ export const _testOnlyBundledCatalog = {
|
|
|
319
329
|
projectPackageCatalogEntry,
|
|
320
330
|
};
|
|
321
331
|
//# sourceMappingURL=bundled-catalog.js.map
|
|
322
|
-
//# debugId=
|
|
332
|
+
//# debugId=d4026cdd-6e38-5550-b33e-94d5c7b97e58
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundled-catalog.js","sources":["cli/commands/extension/bundled-catalog.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/extension/bundled-catalog\n *\n * Implements extension package-management support for Bundled Catalog.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { collectPackageExtensionDirectories, PM_PACKAGE_RESOURCE_KINDS, readPmPackageManifest } from \"../../../core/packages/manifest.js\";\nimport { resolvePmPackageRootFromModule } from \"../../../core/packages/root.js\";\nimport { pathExists } from \"../../../core/fs/fs-utils.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 { splitCommaList } from \"../../../core/shared/split-comma-list.js\";\nimport { resolveExtensionRoots } from \"../../../core/extensions/loader.js\";\nimport { resolvePmRoot } from \"../../../core/store/paths.js\";\nimport { validateExtensionDirectory } from \"./shared.js\";\nimport { readManagedExtensionState } from \"./managed-state.js\";\nimport type { ExtensionCommandOptions, ExtensionScope } from \"../extension.js\";\n\nconst PM_PACKAGE_ROOT_ENV = \"PM_CLI_PACKAGE_ROOT\";\nconst LEGACY_BUNDLED_PACKAGE_ALIASES: Record<string, { package_directory: string; legacy_extension_directory: string }> = {\n beads: {\n package_directory: \"pm-beads\",\n legacy_extension_directory: \"beads\",\n },\n todos: {\n package_directory: \"pm-todos\",\n legacy_extension_directory: \"todos\",\n },\n};\nconst BUNDLED_PACKAGE_INSTALL_ALL_TARGETS = new Set([\"*\", \"all\"]);\n\ninterface BundledPackageEntry {\n alias: string;\n package_directory: string;\n package_root: string;\n}\n\nfunction resolvePackageRootCandidates(): string[] {\n const candidates: string[] = [];\n const envRoot = process.env[PM_PACKAGE_ROOT_ENV];\n /* c8 ignore start -- env-root override branch is exercised by package-root integration tests */\n if (typeof envRoot === \"string\" && envRoot.trim().length > 0) {\n candidates.push(path.resolve(envRoot.trim()));\n }\n /* c8 ignore stop */\n candidates.push(resolvePmPackageRootFromModule(import.meta.url, [\"../../../..\"]));\n return [...new Set(candidates)];\n}\n\n/**\n * Implements resolve bundled extension alias source for the public runtime surface of this module.\n */\nexport async function resolveBundledExtensionAliasSource(input: string): Promise<string | null> {\n const normalized = input.trim().toLowerCase();\n const packageRoot = await resolveBundledPackageRoot(normalized);\n if (packageRoot) {\n return packageRoot;\n }\n\n const alias = LEGACY_BUNDLED_PACKAGE_ALIASES[normalized];\n /* c8 ignore start -- known aliases resolve through package manifests in normal runtime */\n if (!alias) {\n return null;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- exercised only when legacy extension paths exist without package manifests */\n for (const packageRoot of resolvePackageRootCandidates()) {\n const legacyExtensionPath = path.join(packageRoot, \".agents\", \"pm\", \"extensions\", alias.legacy_extension_directory);\n if (await pathExists(path.join(legacyExtensionPath, \"manifest.json\"))) {\n return legacyExtensionPath;\n }\n }\n return null;\n /* c8 ignore stop */\n}\n\n/**\n * Implements check whether bundled package install all target for the public runtime surface of this module.\n */\nexport function isBundledPackageInstallAllTarget(input: string): boolean {\n return BUNDLED_PACKAGE_INSTALL_ALL_TARGETS.has(input.trim().toLowerCase());\n}\n\nfunction derivePackageAlias(packageDirectory: string): string {\n return packageDirectory.replace(/^pm-/i, \"\").trim().toLowerCase();\n}\n\nasync function collectBundledPackageEntries(): Promise<BundledPackageEntry[]> {\n const entriesByAlias = new Map<string, BundledPackageEntry>();\n for (const packageRoot of resolvePackageRootCandidates()) {\n const packagesRoot = path.join(packageRoot, \"packages\");\n if (!(await pathExists(packagesRoot))) {\n continue;\n }\n const entries = await fs.readdir(packagesRoot, { withFileTypes: true });\n for (const entry of entries) {\n if (!entry.isDirectory() || !entry.name.startsWith(\"pm-\")) {\n continue;\n }\n const candidateRoot = path.join(packagesRoot, entry.name);\n if (!(await pathExists(path.join(candidateRoot, \"package.json\")))) {\n continue;\n }\n const manifest = await readPmPackageManifest(candidateRoot);\n const aliases = manifest.aliases && manifest.aliases.length > 0\n ? manifest.aliases\n : [derivePackageAlias(entry.name)];\n for (const alias of aliases) {\n const normalizedAlias = alias.trim().toLowerCase();\n if (normalizedAlias.length === 0 || entriesByAlias.has(normalizedAlias)) {\n continue;\n }\n entriesByAlias.set(normalizedAlias, {\n alias: normalizedAlias,\n package_directory: entry.name,\n package_root: candidateRoot,\n });\n }\n }\n }\n\n for (const [alias, legacy] of Object.entries(LEGACY_BUNDLED_PACKAGE_ALIASES)) {\n /* c8 ignore start -- canonical aliases are present in bundled package manifests */\n if (entriesByAlias.has(alias)) {\n continue;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- compatibility fallback when only legacy package layout exists */\n for (const packageRoot of resolvePackageRootCandidates()) {\n const packagePath = path.join(packageRoot, \"packages\", legacy.package_directory);\n if (await pathExists(path.join(packagePath, \"package.json\"))) {\n entriesByAlias.set(alias, {\n alias,\n package_directory: legacy.package_directory,\n package_root: packagePath,\n });\n break;\n }\n }\n /* c8 ignore stop */\n }\n\n return [...entriesByAlias.values()].sort((left, right) => left.alias.localeCompare(right.alias));\n}\n\n/**\n * Implements list bundled package aliases for the public runtime surface of this module.\n */\nexport async function listBundledPackageAliases(): Promise<string[]> {\n return (await collectBundledPackageEntries()).map((entry) => entry.alias);\n}\n\n/**\n * Implements resolve bundled package root for the public runtime surface of this module.\n */\nexport async function resolveBundledPackageRoot(alias: string): Promise<string | null> {\n const normalized = alias.trim().toLowerCase();\n const entry = (await collectBundledPackageEntries()).find((candidate) => candidate.alias === normalized);\n return entry?.package_root ?? null;\n}\n\n/**\n * Resolve the published npm package name for a bundled alias so install flows\n * can persist it as managed-source provenance (`source.package`). Returns null\n * when the alias is unknown or the bundled package manifest lacks a name.\n */\nexport async function resolveBundledPackageNpmName(alias: string): Promise<string | null> {\n const packageRoot = await resolveBundledPackageRoot(alias);\n if (!packageRoot) {\n return null;\n }\n const manifest = await readPmPackageManifest(packageRoot);\n return manifest.package_name ?? null;\n}\n\n/**\n * Implements resolve bundled alias manifest name for the public runtime surface of this module.\n */\nexport async function resolveBundledAliasManifestName(input: string): Promise<string | null> {\n const bundledAliasSource = await resolveBundledExtensionAliasSource(input);\n if (!bundledAliasSource) {\n return null;\n }\n try {\n const extensionDirectories = await collectPackageExtensionDirectories(bundledAliasSource);\n if (extensionDirectories.length !== 1) {\n return null;\n }\n const validated = await validateExtensionDirectory(extensionDirectories[0]);\n return validated.manifest.name;\n } catch {\n return null;\n }\n}\n\n/**\n * Resolve the catalog link block for a bundled package, preferring the explicit\n * `catalog.links.*` manifest fields and falling back to the package's\n * repository/bugs/homepage/npm metadata. The npm link is synthesized from the\n * package name unless the package is private or unnamed.\n */\nfunction buildBundledCatalogLinks(manifest: Awaited<ReturnType<typeof readPmPackageManifest>>): {\n docs: string | undefined;\n npm: string | undefined;\n repository: string | undefined;\n report: string | undefined;\n} {\n return {\n docs: manifest.catalog?.links?.docs ?? manifest.package_homepage,\n npm:\n manifest.catalog?.links?.npm ??\n (manifest.package_name && manifest.package_private !== true\n ? `https://www.npmjs.com/package/${encodeURIComponent(manifest.package_name)}`\n : undefined),\n repository: manifest.catalog?.links?.repository ?? manifest.package_repository_url,\n report: manifest.catalog?.links?.report ?? manifest.package_bugs_url,\n };\n}\n\n/**\n * Build one bundled-package catalog entry from its manifest, marking it\n * `installed` when the managed state for `scope` already records the package by\n * built-in alias or resolved location, and projecting the metadata-only resource\n * kinds (everything except installable `extensions`) that the package ships.\n */\nfunction buildBundledCatalogPackageEntry(\n manifest: Awaited<ReturnType<typeof readPmPackageManifest>>,\n bundledEntry: BundledPackageEntry,\n scope: ExtensionScope,\n installedBuiltinAliases: Set<string>,\n installedLocations: Set<string>,\n): Record<string, unknown> {\n const installScopeFlag = scope === \"global\" ? \"--global\" : \"--project\";\n const metadataOnlyResources = Object.fromEntries(\n PM_PACKAGE_RESOURCE_KINDS\n .filter((resourceKind) => resourceKind !== \"extensions\")\n .map((resourceKind) => [resourceKind, manifest.resources[resourceKind] ?? []])\n .filter(([, entries]) => Array.isArray(entries) && entries.length > 0),\n );\n return {\n alias: bundledEntry.alias,\n bundled: true,\n available: true,\n installed:\n installedBuiltinAliases.has(bundledEntry.alias) ||\n installedLocations.has(path.resolve(bundledEntry.package_root)),\n install_target: bundledEntry.alias,\n install_command: `pm install ${bundledEntry.alias} ${installScopeFlag}`,\n package_name: manifest.package_name,\n package_version: manifest.package_version,\n description: manifest.catalog?.summary ?? manifest.package_description,\n keywords: manifest.package_keywords ?? [],\n resources: manifest.resources,\n installable_resources: {\n extensions: manifest.resources.extensions ?? [],\n },\n metadata_only_resources: metadataOnlyResources,\n catalog: {\n display_name: manifest.catalog?.display_name,\n category: manifest.catalog?.category,\n tags: manifest.catalog?.tags ?? manifest.package_keywords ?? [],\n links: buildBundledCatalogLinks(manifest),\n media: manifest.catalog?.media,\n },\n };\n}\n\n/**\n * Implements build bundled package catalog for the public runtime surface of this module.\n */\nexport async function buildBundledPackageCatalog(scope: ExtensionScope, global: GlobalOptions, options: ExtensionCommandOptions = {}): Promise<{\n total: number;\n scope: ExtensionScope;\n installable_resource_kinds: string[];\n metadata_only_resource_kinds: string[];\n packages: Array<Record<string, unknown>>;\n}> {\n const roots = resolveExtensionRoots(resolvePmRoot(process.cwd(), global.path), process.cwd());\n const selectedRoot = scope === \"global\" ? roots.global : roots.project;\n const managedStateRead = await readManagedExtensionState(selectedRoot);\n const installedLocations = new Set(\n managedStateRead.state.entries\n .filter((entry) => entry.scope === scope)\n .filter((entry) => entry.source.kind !== \"builtin\")\n .map((entry) => path.resolve(entry.source.location)),\n );\n const installedBuiltinAliases = new Set(\n managedStateRead.state.entries\n .filter((entry) => entry.scope === scope && entry.source.kind === \"builtin\")\n .flatMap((entry) => [entry.source.name, entry.source.input, entry.source.location])\n .filter((value): value is string => typeof value === \"string\" && value.trim().length > 0)\n .map((value) => value.trim().toLowerCase()),\n );\n const packages: Array<Record<string, unknown>> = [];\n\n for (const bundledEntry of await collectBundledPackageEntries()) {\n const manifest = await readPmPackageManifest(bundledEntry.package_root);\n packages.push(\n buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installedBuiltinAliases, installedLocations),\n );\n }\n\n const fields = parsePackageCatalogFields(options.fields);\n const outputPackages = fields ? packages.map((entry) => projectPackageCatalogEntry(entry, fields)) : packages;\n return {\n total: outputPackages.length,\n scope,\n installable_resource_kinds: [\"extensions\"],\n metadata_only_resource_kinds: PM_PACKAGE_RESOURCE_KINDS.filter((resourceKind) => resourceKind !== \"extensions\"),\n packages: outputPackages,\n };\n}\n\nconst PACKAGE_CATALOG_FIELD_KEYS = new Set([\n \"alias\",\n \"bundled\",\n \"available\",\n \"installed\",\n \"install_target\",\n \"install_command\",\n \"package_name\",\n \"package_version\",\n \"description\",\n \"keywords\",\n \"resources\",\n \"installable_resources\",\n \"metadata_only_resources\",\n \"catalog\",\n \"category\",\n \"display_name\",\n]);\n\nfunction parsePackageCatalogFields(raw: string | undefined): string[] | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const fields = splitCommaList(raw);\n if (fields.length === 0) {\n throw new PmCliError(\"Package catalog --fields requires a comma-separated list of field names\", EXIT_CODE.USAGE);\n }\n const unknown = fields.filter((field) => !PACKAGE_CATALOG_FIELD_KEYS.has(field));\n if (unknown.length > 0) {\n throw new PmCliError(`Unknown package catalog --fields value(s): ${unknown.join(\", \")}`, EXIT_CODE.USAGE, {\n examples: [\n \"pm package list --project --fields alias,installed,install_command\",\n \"pm package catalog --project --fields alias,package_name,category\",\n ],\n });\n }\n return fields;\n}\n\nfunction projectPackageCatalogEntry(entry: Record<string, unknown>, fields: string[]): Record<string, unknown> {\n const projected: Record<string, unknown> = {};\n for (const field of fields) {\n if (field === \"category\") {\n projected[field] = (entry.catalog as { category?: unknown } | undefined)?.category ?? null;\n } else if (field === \"display_name\") {\n projected[field] = (entry.catalog as { display_name?: unknown } | undefined)?.display_name ?? null;\n } else {\n projected[field] = entry[field] ?? null;\n }\n }\n return projected;\n}\n\nexport const _testOnlyBundledCatalog = {\n parsePackageCatalogFields,\n projectPackageCatalogEntry,\n};\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kCAAkC,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC1I,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,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","debugId":"ce7070ac-9aa5-56b7-b6dd-80ff19b24553"}
|
|
1
|
+
{"version":3,"file":"bundled-catalog.js","sources":["cli/commands/extension/bundled-catalog.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/extension/bundled-catalog\n *\n * Implements extension package-management support for Bundled Catalog.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { collectPackageExtensionDirectories, PM_PACKAGE_RESOURCE_KINDS, readPmPackageManifest } from \"../../../core/packages/manifest.js\";\nimport { resolvePmPackageRootFromModule } from \"../../../core/packages/root.js\";\nimport { pathExists } from \"../../../core/fs/fs-utils.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 { splitCommaList } from \"../../../core/shared/split-comma-list.js\";\nimport { resolveExtensionRoots } from \"../../../core/extensions/loader.js\";\nimport { resolvePmRoot } from \"../../../core/store/paths.js\";\nimport { validateExtensionDirectory } from \"./shared.js\";\nimport { readManagedExtensionState } from \"./managed-state.js\";\nimport type { ExtensionCommandOptions, ExtensionScope } from \"../extension.js\";\n\nconst PM_PACKAGE_ROOT_ENV = \"PM_CLI_PACKAGE_ROOT\";\nconst LEGACY_BUNDLED_PACKAGE_ALIASES: Record<string, { package_directory: string; legacy_extension_directory: string }> = {\n beads: {\n package_directory: \"pm-beads\",\n legacy_extension_directory: \"beads\",\n },\n todos: {\n package_directory: \"pm-todos\",\n legacy_extension_directory: \"todos\",\n },\n};\nconst BUNDLED_PACKAGE_INSTALL_ALL_TARGETS = new Set([\"*\", \"all\"]);\n\ninterface BundledPackageEntry {\n alias: string;\n package_directory: string;\n package_root: string;\n package_name: string | null;\n}\n\nfunction resolvePackageRootCandidates(): string[] {\n const candidates: string[] = [];\n const envRoot = process.env[PM_PACKAGE_ROOT_ENV];\n /* c8 ignore start -- env-root override branch is exercised by package-root integration tests */\n if (typeof envRoot === \"string\" && envRoot.trim().length > 0) {\n candidates.push(path.resolve(envRoot.trim()));\n }\n /* c8 ignore stop */\n candidates.push(resolvePmPackageRootFromModule(import.meta.url, [\"../../../..\"]));\n return [...new Set(candidates)];\n}\n\n/**\n * Implements resolve bundled extension alias source for the public runtime surface of this module.\n */\nexport async function resolveBundledExtensionAliasSource(input: string): Promise<string | null> {\n const normalized = input.trim().toLowerCase();\n const packageRoot = await resolveBundledPackageRoot(normalized);\n if (packageRoot) {\n return packageRoot;\n }\n\n const alias = LEGACY_BUNDLED_PACKAGE_ALIASES[normalized];\n /* c8 ignore start -- known aliases resolve through package manifests in normal runtime */\n if (!alias) {\n return null;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- exercised only when legacy extension paths exist without package manifests */\n for (const packageRoot of resolvePackageRootCandidates()) {\n const legacyExtensionPath = path.join(packageRoot, \".agents\", \"pm\", \"extensions\", alias.legacy_extension_directory);\n if (await pathExists(path.join(legacyExtensionPath, \"manifest.json\"))) {\n return legacyExtensionPath;\n }\n }\n return null;\n /* c8 ignore stop */\n}\n\n/**\n * Implements check whether bundled package install all target for the public runtime surface of this module.\n */\nexport function isBundledPackageInstallAllTarget(input: string): boolean {\n return BUNDLED_PACKAGE_INSTALL_ALL_TARGETS.has(input.trim().toLowerCase());\n}\n\nfunction derivePackageAlias(packageDirectory: string): string {\n return packageDirectory.replace(/^pm-/i, \"\").trim().toLowerCase();\n}\n\nasync function collectManifestPackageEntries(\n packagesRoot: string,\n entriesByAlias: Map<string, BundledPackageEntry>,\n): Promise<void> {\n const entries = await fs.readdir(packagesRoot, { withFileTypes: true });\n for (const entry of entries) {\n if (!entry.isDirectory() || !entry.name.startsWith(\"pm-\")) {\n continue;\n }\n const candidateRoot = path.join(packagesRoot, entry.name);\n if (!(await pathExists(path.join(candidateRoot, \"package.json\")))) {\n continue;\n }\n const manifest = await readPmPackageManifest(candidateRoot);\n const aliases = manifest.aliases && manifest.aliases.length > 0\n ? manifest.aliases\n : [derivePackageAlias(entry.name)];\n for (const alias of aliases) {\n const normalizedAlias = alias.trim().toLowerCase();\n if (normalizedAlias.length === 0 || entriesByAlias.has(normalizedAlias)) {\n continue;\n }\n entriesByAlias.set(normalizedAlias, {\n alias: normalizedAlias,\n package_directory: entry.name,\n package_root: candidateRoot,\n package_name: manifest.package_name ?? null,\n });\n }\n }\n}\n\nasync function collectBundledPackageEntries(): Promise<BundledPackageEntry[]> {\n const entriesByAlias = new Map<string, BundledPackageEntry>();\n for (const packageRoot of resolvePackageRootCandidates()) {\n const packagesRoot = path.join(packageRoot, \"packages\");\n if (!(await pathExists(packagesRoot))) {\n continue;\n }\n await collectManifestPackageEntries(packagesRoot, entriesByAlias);\n }\n\n for (const [alias, legacy] of Object.entries(LEGACY_BUNDLED_PACKAGE_ALIASES)) {\n /* c8 ignore start -- canonical aliases are present in bundled package manifests */\n if (entriesByAlias.has(alias)) {\n continue;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- compatibility fallback when only legacy package layout exists */\n for (const packageRoot of resolvePackageRootCandidates()) {\n const packagePath = path.join(packageRoot, \"packages\", legacy.package_directory);\n if (await pathExists(path.join(packagePath, \"package.json\"))) {\n entriesByAlias.set(alias, {\n alias,\n package_directory: legacy.package_directory,\n package_root: packagePath,\n package_name: null,\n });\n break;\n }\n }\n /* c8 ignore stop */\n }\n\n return [...entriesByAlias.values()].sort((left, right) => left.alias.localeCompare(right.alias));\n}\n\n/**\n * Implements list bundled package aliases for the public runtime surface of this module.\n */\nexport async function listBundledPackageAliases(): Promise<string[]> {\n return (await collectBundledPackageEntries()).map((entry) => entry.alias);\n}\n\n/**\n * Implements resolve bundled package root for the public runtime surface of this module.\n * Accepts every spelling agents naturally reach for: the catalog alias\n * (\"kanban\"), the package directory (\"pm-kanban\"), and the published npm name\n * (\"@unbrained/pm-kanban\").\n */\nexport async function resolveBundledPackageRoot(alias: string): Promise<string | null> {\n const normalized = alias.trim().toLowerCase();\n const entry = (await collectBundledPackageEntries()).find(\n (candidate) =>\n candidate.alias === normalized ||\n candidate.package_directory.toLowerCase() === normalized ||\n candidate.package_name?.toLowerCase() === normalized,\n );\n return entry?.package_root ?? null;\n}\n\n/**\n * Resolve the published npm package name for a bundled alias so install flows\n * can persist it as managed-source provenance (`source.package`). Returns null\n * when the alias is unknown or the bundled package manifest lacks a name.\n */\nexport async function resolveBundledPackageNpmName(alias: string): Promise<string | null> {\n const packageRoot = await resolveBundledPackageRoot(alias);\n if (!packageRoot) {\n return null;\n }\n const manifest = await readPmPackageManifest(packageRoot);\n return manifest.package_name ?? null;\n}\n\n/**\n * Implements resolve bundled alias manifest name for the public runtime surface of this module.\n */\nexport async function resolveBundledAliasManifestName(input: string): Promise<string | null> {\n const bundledAliasSource = await resolveBundledExtensionAliasSource(input);\n if (!bundledAliasSource) {\n return null;\n }\n try {\n const extensionDirectories = await collectPackageExtensionDirectories(bundledAliasSource);\n if (extensionDirectories.length !== 1) {\n return null;\n }\n const validated = await validateExtensionDirectory(extensionDirectories[0]);\n return validated.manifest.name;\n } catch {\n return null;\n }\n}\n\n/**\n * Resolve the catalog link block for a bundled package, preferring the explicit\n * `catalog.links.*` manifest fields and falling back to the package's\n * repository/bugs/homepage/npm metadata. The npm link is synthesized from the\n * package name unless the package is private or unnamed.\n */\nfunction buildBundledCatalogLinks(manifest: Awaited<ReturnType<typeof readPmPackageManifest>>): {\n docs: string | undefined;\n npm: string | undefined;\n repository: string | undefined;\n report: string | undefined;\n} {\n return {\n docs: manifest.catalog?.links?.docs ?? manifest.package_homepage,\n npm:\n manifest.catalog?.links?.npm ??\n (manifest.package_name && manifest.package_private !== true\n ? `https://www.npmjs.com/package/${encodeURIComponent(manifest.package_name)}`\n : undefined),\n repository: manifest.catalog?.links?.repository ?? manifest.package_repository_url,\n report: manifest.catalog?.links?.report ?? manifest.package_bugs_url,\n };\n}\n\n/**\n * Build one bundled-package catalog entry from its manifest, marking it\n * `installed` when the managed state for `scope` already records the package by\n * built-in alias or resolved location, and projecting the metadata-only resource\n * kinds (everything except installable `extensions`) that the package ships.\n */\nfunction buildBundledCatalogPackageEntry(\n manifest: Awaited<ReturnType<typeof readPmPackageManifest>>,\n bundledEntry: BundledPackageEntry,\n scope: ExtensionScope,\n installedBuiltinAliases: Set<string>,\n installedLocations: Set<string>,\n): Record<string, unknown> {\n const installScopeFlag = scope === \"global\" ? \"--global\" : \"--project\";\n const metadataOnlyResources = Object.fromEntries(\n PM_PACKAGE_RESOURCE_KINDS\n .filter((resourceKind) => resourceKind !== \"extensions\")\n .map((resourceKind) => [resourceKind, manifest.resources[resourceKind] ?? []])\n .filter(([, entries]) => Array.isArray(entries) && entries.length > 0),\n );\n return {\n alias: bundledEntry.alias,\n bundled: true,\n available: true,\n installed:\n installedBuiltinAliases.has(bundledEntry.alias) ||\n installedLocations.has(path.resolve(bundledEntry.package_root)),\n install_target: bundledEntry.alias,\n install_command: `pm install ${bundledEntry.alias} ${installScopeFlag}`,\n package_name: manifest.package_name,\n package_version: manifest.package_version,\n description: manifest.catalog?.summary ?? manifest.package_description,\n keywords: manifest.package_keywords ?? [],\n resources: manifest.resources,\n installable_resources: {\n extensions: manifest.resources.extensions ?? [],\n },\n metadata_only_resources: metadataOnlyResources,\n catalog: {\n display_name: manifest.catalog?.display_name,\n category: manifest.catalog?.category,\n tags: manifest.catalog?.tags ?? manifest.package_keywords ?? [],\n links: buildBundledCatalogLinks(manifest),\n media: manifest.catalog?.media,\n },\n };\n}\n\n/**\n * Implements build bundled package catalog for the public runtime surface of this module.\n */\nexport async function buildBundledPackageCatalog(scope: ExtensionScope, global: GlobalOptions, options: ExtensionCommandOptions = {}): Promise<{\n total: number;\n scope: ExtensionScope;\n installable_resource_kinds: string[];\n metadata_only_resource_kinds: string[];\n packages: Array<Record<string, unknown>>;\n}> {\n const roots = resolveExtensionRoots(resolvePmRoot(process.cwd(), global.path), process.cwd());\n const selectedRoot = scope === \"global\" ? roots.global : roots.project;\n const managedStateRead = await readManagedExtensionState(selectedRoot);\n const installedLocations = new Set(\n managedStateRead.state.entries\n .filter((entry) => entry.scope === scope)\n .filter((entry) => entry.source.kind !== \"builtin\")\n .map((entry) => path.resolve(entry.source.location)),\n );\n const installedBuiltinAliases = new Set(\n managedStateRead.state.entries\n .filter((entry) => entry.scope === scope && entry.source.kind === \"builtin\")\n .flatMap((entry) => [entry.source.name, entry.source.input, entry.source.location])\n .filter((value): value is string => typeof value === \"string\" && value.trim().length > 0)\n .map((value) => value.trim().toLowerCase()),\n );\n const packages: Array<Record<string, unknown>> = [];\n\n for (const bundledEntry of await collectBundledPackageEntries()) {\n const manifest = await readPmPackageManifest(bundledEntry.package_root);\n packages.push(\n buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installedBuiltinAliases, installedLocations),\n );\n }\n\n const fields = parsePackageCatalogFields(options.fields);\n const outputPackages = fields ? packages.map((entry) => projectPackageCatalogEntry(entry, fields)) : packages;\n return {\n total: outputPackages.length,\n scope,\n installable_resource_kinds: [\"extensions\"],\n metadata_only_resource_kinds: PM_PACKAGE_RESOURCE_KINDS.filter((resourceKind) => resourceKind !== \"extensions\"),\n packages: outputPackages,\n };\n}\n\nconst PACKAGE_CATALOG_FIELD_KEYS = new Set([\n \"alias\",\n \"bundled\",\n \"available\",\n \"installed\",\n \"install_target\",\n \"install_command\",\n \"package_name\",\n \"package_version\",\n \"description\",\n \"keywords\",\n \"resources\",\n \"installable_resources\",\n \"metadata_only_resources\",\n \"catalog\",\n \"category\",\n \"display_name\",\n]);\n\nfunction parsePackageCatalogFields(raw: string | undefined): string[] | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const fields = splitCommaList(raw);\n if (fields.length === 0) {\n throw new PmCliError(\"Package catalog --fields requires a comma-separated list of field names\", EXIT_CODE.USAGE);\n }\n const unknown = fields.filter((field) => !PACKAGE_CATALOG_FIELD_KEYS.has(field));\n if (unknown.length > 0) {\n throw new PmCliError(`Unknown package catalog --fields value(s): ${unknown.join(\", \")}`, EXIT_CODE.USAGE, {\n examples: [\n \"pm package list --project --fields alias,installed,install_command\",\n \"pm package catalog --project --fields alias,package_name,category\",\n ],\n });\n }\n return fields;\n}\n\nfunction projectPackageCatalogEntry(entry: Record<string, unknown>, fields: string[]): Record<string, unknown> {\n const projected: Record<string, unknown> = {};\n for (const field of fields) {\n if (field === \"category\") {\n projected[field] = (entry.catalog as { category?: unknown } | undefined)?.category ?? null;\n } else if (field === \"display_name\") {\n projected[field] = (entry.catalog as { display_name?: unknown } | undefined)?.display_name ?? null;\n } else {\n projected[field] = entry[field] ?? null;\n }\n }\n return projected;\n}\n\nexport const _testOnlyBundledCatalog = {\n parsePackageCatalogFields,\n projectPackageCatalogEntry,\n};\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kCAAkC,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC1I,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAG/D,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAClD,MAAM,8BAA8B,GAAsF;IACxH,KAAK,EAAE;QACL,iBAAiB,EAAE,UAAU;QAC7B,0BAA0B,EAAE,OAAO;KACpC;IACD,KAAK,EAAE;QACL,iBAAiB,EAAE,U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