@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
|
@@ -1,995 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="60eff3e2-3dae-547d-af75-15d1de75a9b5")}catch(e){}}();
|
|
3
|
-
import {
|
|
4
|
-
runExtension
|
|
5
|
-
} from "./chunk-WG34ZNQQ.js";
|
|
6
|
-
import {
|
|
7
|
-
TYPE_PRESET_NAMES,
|
|
8
|
-
normalizeTypePresetName,
|
|
9
|
-
resolveTypePresetDefinitions
|
|
10
|
-
} from "./chunk-XB7KFVFI.js";
|
|
11
|
-
import {
|
|
12
|
-
normalizePrefix
|
|
13
|
-
} from "./chunk-G24G7ZAV.js";
|
|
14
|
-
import {
|
|
15
|
-
PmCliError,
|
|
16
|
-
getActiveExtensionRegistrations,
|
|
17
|
-
readSettings,
|
|
18
|
-
runActiveOnWriteHooks,
|
|
19
|
-
writeSettings
|
|
20
|
-
} from "./chunk-E3SZTQ4K.js";
|
|
21
|
-
import {
|
|
22
|
-
parseItemTypesFile,
|
|
23
|
-
serializeItemTypesFile,
|
|
24
|
-
upsertItemType
|
|
25
|
-
} from "./chunk-KUOOJR35.js";
|
|
26
|
-
import {
|
|
27
|
-
DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
|
|
28
|
-
EXIT_CODE,
|
|
29
|
-
GOVERNANCE_PRESET_DEFAULTS,
|
|
30
|
-
PM_REQUIRED_SUBDIRS,
|
|
31
|
-
SETTINGS_DEFAULTS,
|
|
32
|
-
ensureRuntimeSchemaFileScaffold,
|
|
33
|
-
filePathForSchemaSection,
|
|
34
|
-
normalizeRuntimeSchemaSettings,
|
|
35
|
-
pathExists,
|
|
36
|
-
readFileIfExists,
|
|
37
|
-
resolveItemTypeRegistry,
|
|
38
|
-
resolvePmRoot,
|
|
39
|
-
writeFileAtomic
|
|
40
|
-
} from "./chunk-57NWPFF2.js";
|
|
41
|
-
|
|
42
|
-
// dist/cli/commands/init.js
|
|
43
|
-
import fs2 from "node:fs/promises";
|
|
44
|
-
import path2 from "node:path";
|
|
45
|
-
import readline2 from "node:readline/promises";
|
|
46
|
-
import { stdin as input2, stdout as output2 } from "node:process";
|
|
47
|
-
|
|
48
|
-
// dist/cli/commands/init-agent-guidance.js
|
|
49
|
-
import fs from "node:fs/promises";
|
|
50
|
-
import path from "node:path";
|
|
51
|
-
import readline from "node:readline/promises";
|
|
52
|
-
import { stdin as input, stdout as output } from "node:process";
|
|
53
|
-
var INIT_AGENT_GUIDANCE_MODE_VALUES = ["ask", "add", "skip", "status"];
|
|
54
|
-
var AGENT_GUIDANCE_TARGET_FILENAMES = ["AGENTS.md", "CLAUDE.md"];
|
|
55
|
-
var AGENT_GUIDANCE_REQUIRED_TOKENS = [
|
|
56
|
-
"pm init",
|
|
57
|
-
"pm context",
|
|
58
|
-
"pm search",
|
|
59
|
-
"pm create",
|
|
60
|
-
"pm claim",
|
|
61
|
-
"pm files",
|
|
62
|
-
"pm docs",
|
|
63
|
-
"pm test --run",
|
|
64
|
-
"pm close",
|
|
65
|
-
"pm release",
|
|
66
|
-
"pm_author"
|
|
67
|
-
];
|
|
68
|
-
var AGENT_GUIDANCE_REQUIRED_TOKEN_THRESHOLD = 8;
|
|
69
|
-
var AGENT_GUIDANCE_TEMPLATE_VERSION = 1;
|
|
70
|
-
var AGENT_GUIDANCE_START_MARKER_PREFIX = "<!-- pm-cli:agent-guidance:start:";
|
|
71
|
-
var AGENT_GUIDANCE_START_MARKER = `<!-- pm-cli:agent-guidance:start:v${AGENT_GUIDANCE_TEMPLATE_VERSION} -->`;
|
|
72
|
-
var AGENT_GUIDANCE_END_MARKER = "<!-- pm-cli:agent-guidance:end -->";
|
|
73
|
-
var AGENT_GUIDANCE_ADD_LATER_HINT = "Add workflow guidance later: pm init --agent-guidance add";
|
|
74
|
-
var createAgentGuidanceReadlineInterface = () => readline.createInterface({ input, output });
|
|
75
|
-
function toPortableRelativePath(projectRoot, targetPath) {
|
|
76
|
-
const relative = path.relative(projectRoot, targetPath);
|
|
77
|
-
if (relative.length === 0) {
|
|
78
|
-
return path.basename(targetPath);
|
|
79
|
-
}
|
|
80
|
-
return relative.split(path.sep).join("/");
|
|
81
|
-
}
|
|
82
|
-
function ensureTrailingNewline(value) {
|
|
83
|
-
return value.endsWith("\n") ? value : `${value}
|
|
84
|
-
`;
|
|
85
|
-
}
|
|
86
|
-
function detectLineEnding(value) {
|
|
87
|
-
return value.includes("\r\n") ? "\r\n" : "\n";
|
|
88
|
-
}
|
|
89
|
-
function findGuidanceBlockRange(content) {
|
|
90
|
-
const startIndex = content.indexOf(AGENT_GUIDANCE_START_MARKER_PREFIX);
|
|
91
|
-
if (startIndex === -1) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
const endMarkerIndex = content.indexOf(AGENT_GUIDANCE_END_MARKER, startIndex);
|
|
95
|
-
if (endMarkerIndex === -1) {
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
return {
|
|
99
|
-
start_index: startIndex,
|
|
100
|
-
end_index: endMarkerIndex + AGENT_GUIDANCE_END_MARKER.length
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
function hasGuidanceMarker(content) {
|
|
104
|
-
return findGuidanceBlockRange(content) !== null;
|
|
105
|
-
}
|
|
106
|
-
function buildAgentGuidanceBlock(lineEnding) {
|
|
107
|
-
const lines = [
|
|
108
|
-
AGENT_GUIDANCE_START_MARKER,
|
|
109
|
-
"## pm Workflow (Agent Quickstart)",
|
|
110
|
-
"",
|
|
111
|
-
'- Orient before mutate: `pm context --limit 10`, `pm search "<keywords>" --limit 10`, `pm list-open --limit 20`.',
|
|
112
|
-
"- Claim and execute: `pm claim <id>` then `pm update <id> --status in_progress`.",
|
|
113
|
-
'- Link evidence while coding: `pm files <id> --add ...`, `pm docs <id> --add ...`, `pm test <id> --add command="node scripts/run-tests.mjs test -- ..."`.',
|
|
114
|
-
'- Verify and close: `pm test <id> --run --progress`, `pm close <id> "<evidence>" --validate-close warn`, `pm release <id>`.',
|
|
115
|
-
"- Set `PM_AUTHOR=<stable-agent-id>` before mutation commands.",
|
|
116
|
-
"",
|
|
117
|
-
AGENT_GUIDANCE_END_MARKER,
|
|
118
|
-
""
|
|
119
|
-
];
|
|
120
|
-
return lines.join(lineEnding);
|
|
121
|
-
}
|
|
122
|
-
function upsertAgentGuidanceBlock(existingContent) {
|
|
123
|
-
const lineEnding = detectLineEnding(existingContent);
|
|
124
|
-
const nextBlock = buildAgentGuidanceBlock(lineEnding);
|
|
125
|
-
const existingRange = findGuidanceBlockRange(existingContent);
|
|
126
|
-
if (existingRange) {
|
|
127
|
-
const trailingContent = existingContent.slice(existingRange.end_index);
|
|
128
|
-
const normalizedTrailingContent = trailingContent.startsWith("\r\n") ? trailingContent.slice(2) : trailingContent.startsWith("\n") ? trailingContent.slice(1) : trailingContent;
|
|
129
|
-
const nextContent2 = ensureTrailingNewline(`${existingContent.slice(0, existingRange.start_index)}${nextBlock}${normalizedTrailingContent}`);
|
|
130
|
-
return {
|
|
131
|
-
next_content: nextContent2,
|
|
132
|
-
changed: nextContent2 !== existingContent
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
const separator = existingContent.length === 0 ? "" : existingContent.endsWith("\n") ? "\n" : "\n\n";
|
|
136
|
-
const nextContent = ensureTrailingNewline(`${existingContent}${separator}${nextBlock}`);
|
|
137
|
-
return {
|
|
138
|
-
next_content: nextContent,
|
|
139
|
-
changed: nextContent !== existingContent
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
function resolveProjectRoot(pmRoot, cwd) {
|
|
143
|
-
const parent = path.dirname(pmRoot);
|
|
144
|
-
if (path.basename(pmRoot) === "pm" && path.basename(parent) === ".agents") {
|
|
145
|
-
return path.dirname(parent);
|
|
146
|
-
}
|
|
147
|
-
return path.resolve(cwd, pmRoot);
|
|
148
|
-
}
|
|
149
|
-
function resolveTargetGuidancePath(scans, projectRoot) {
|
|
150
|
-
const existingAgents = scans.find((entry) => path.basename(entry.file_path) === "AGENTS.md" && entry.exists);
|
|
151
|
-
if (existingAgents) {
|
|
152
|
-
return existingAgents.file_path;
|
|
153
|
-
}
|
|
154
|
-
const existingAny = scans.find((entry) => entry.exists);
|
|
155
|
-
if (existingAny) {
|
|
156
|
-
return existingAny.file_path;
|
|
157
|
-
}
|
|
158
|
-
return path.join(projectRoot, "AGENTS.md");
|
|
159
|
-
}
|
|
160
|
-
function parsePromptChoice(answer, currentDefault) {
|
|
161
|
-
const normalized = answer.trim().toLowerCase();
|
|
162
|
-
if (normalized.length === 0) {
|
|
163
|
-
return currentDefault;
|
|
164
|
-
}
|
|
165
|
-
if (normalized === "y" || normalized === "yes") {
|
|
166
|
-
return true;
|
|
167
|
-
}
|
|
168
|
-
if (normalized === "n" || normalized === "no") {
|
|
169
|
-
return false;
|
|
170
|
-
}
|
|
171
|
-
return currentDefault;
|
|
172
|
-
}
|
|
173
|
-
async function promptForGuidanceWrite(targetRelativePath) {
|
|
174
|
-
const rl = createAgentGuidanceReadlineInterface();
|
|
175
|
-
try {
|
|
176
|
-
output.write("\nAgent guidance check\n");
|
|
177
|
-
output.write("No AGENTS.md/CLAUDE.md file currently contains compact pm workflow guidance.\n");
|
|
178
|
-
const answer = await rl.question(`Add a compact pm workflow section to ${targetRelativePath}? [Y/n] `);
|
|
179
|
-
output.write("\n");
|
|
180
|
-
return parsePromptChoice(answer, true);
|
|
181
|
-
} finally {
|
|
182
|
-
rl.close();
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
function normalizeAgentGuidanceState(settings) {
|
|
186
|
-
const current = settings.agent_guidance;
|
|
187
|
-
return {
|
|
188
|
-
prompt_completed: current?.prompt_completed === true,
|
|
189
|
-
declined: current?.declined === true,
|
|
190
|
-
declined_at: typeof current?.declined_at === "string" ? current.declined_at : "",
|
|
191
|
-
template_version: typeof current?.template_version === "number" && Number.isInteger(current.template_version) && current.template_version > 0 ? current.template_version : AGENT_GUIDANCE_TEMPLATE_VERSION,
|
|
192
|
-
last_checked_files: Array.isArray(current?.last_checked_files) ? [...new Set(current.last_checked_files.map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right)) : []
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
async function scanGuidanceFiles(projectRoot) {
|
|
196
|
-
const scans = [];
|
|
197
|
-
for (const filename of AGENT_GUIDANCE_TARGET_FILENAMES) {
|
|
198
|
-
const filePath = path.join(projectRoot, filename);
|
|
199
|
-
const exists = await pathExists(filePath);
|
|
200
|
-
if (!exists) {
|
|
201
|
-
scans.push({
|
|
202
|
-
file_path: filePath,
|
|
203
|
-
exists,
|
|
204
|
-
has_guidance: false,
|
|
205
|
-
has_marker: false
|
|
206
|
-
});
|
|
207
|
-
continue;
|
|
208
|
-
}
|
|
209
|
-
const content = await fs.readFile(filePath, "utf8");
|
|
210
|
-
const contentLower = content.toLowerCase();
|
|
211
|
-
const tokenHits = AGENT_GUIDANCE_REQUIRED_TOKENS.filter((token) => contentLower.includes(token));
|
|
212
|
-
const hasMarker = hasGuidanceMarker(content);
|
|
213
|
-
scans.push({
|
|
214
|
-
file_path: filePath,
|
|
215
|
-
exists,
|
|
216
|
-
has_guidance: hasMarker || tokenHits.length >= AGENT_GUIDANCE_REQUIRED_TOKEN_THRESHOLD,
|
|
217
|
-
has_marker: hasMarker
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
return scans;
|
|
221
|
-
}
|
|
222
|
-
function pushUnique(target, value) {
|
|
223
|
-
if (!target.includes(value)) {
|
|
224
|
-
target.push(value);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
function applyAgentGuidanceState(settings, currentState) {
|
|
228
|
-
const existing = normalizeAgentGuidanceState(settings);
|
|
229
|
-
const changed = JSON.stringify(existing) !== JSON.stringify(currentState);
|
|
230
|
-
if (changed) {
|
|
231
|
-
settings.agent_guidance = currentState;
|
|
232
|
-
}
|
|
233
|
-
return { changed, state: currentState };
|
|
234
|
-
}
|
|
235
|
-
async function writeGuidanceFile(filePath) {
|
|
236
|
-
const exists = await pathExists(filePath);
|
|
237
|
-
const currentContent = exists ? await fs.readFile(filePath, "utf8") : "";
|
|
238
|
-
const nextContent = upsertAgentGuidanceBlock(currentContent);
|
|
239
|
-
if (!nextContent.changed) {
|
|
240
|
-
return { changed: false, warnings: [] };
|
|
241
|
-
}
|
|
242
|
-
await fs.writeFile(filePath, nextContent.next_content, "utf8");
|
|
243
|
-
return {
|
|
244
|
-
changed: true,
|
|
245
|
-
warnings: await runActiveOnWriteHooks({
|
|
246
|
-
path: filePath,
|
|
247
|
-
scope: "project",
|
|
248
|
-
op: "init:agent_guidance_file"
|
|
249
|
-
})
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
function buildInitAgentGuidanceSummary(params) {
|
|
253
|
-
return {
|
|
254
|
-
mode: params.mode,
|
|
255
|
-
present: params.scans.some((entry) => entry.has_guidance),
|
|
256
|
-
prompted: params.prompted,
|
|
257
|
-
applied: params.applied,
|
|
258
|
-
skipped: params.skipped,
|
|
259
|
-
declined: params.state.declined,
|
|
260
|
-
prompt_completed: params.state.prompt_completed,
|
|
261
|
-
template_version: params.state.template_version,
|
|
262
|
-
target_file: params.targetRelativePath,
|
|
263
|
-
checked_files: params.scans.map((entry) => toPortableRelativePath(params.projectRoot, entry.file_path)),
|
|
264
|
-
files_with_guidance: params.scans.filter((entry) => entry.has_guidance).map((entry) => toPortableRelativePath(params.projectRoot, entry.file_path)),
|
|
265
|
-
missing_files: params.scans.filter((entry) => !entry.exists).map((entry) => toPortableRelativePath(params.projectRoot, entry.file_path))
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
async function refreshGuidanceScansAfterApply(applied, scans, projectRoot) {
|
|
269
|
-
return applied ? await scanGuidanceFiles(projectRoot) : scans;
|
|
270
|
-
}
|
|
271
|
-
function markAgentGuidanceRunState(flow, checkedFiles, partial) {
|
|
272
|
-
flow.state = {
|
|
273
|
-
...flow.state,
|
|
274
|
-
...partial,
|
|
275
|
-
template_version: AGENT_GUIDANCE_TEMPLATE_VERSION,
|
|
276
|
-
last_checked_files: checkedFiles
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
async function addAgentGuidanceBlockIfMissing(flow, context) {
|
|
280
|
-
if (context.presentBefore) {
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
const writeResult = await writeGuidanceFile(context.targetPath);
|
|
284
|
-
flow.warnings.push(...writeResult.warnings);
|
|
285
|
-
if (writeResult.changed) {
|
|
286
|
-
flow.applied = true;
|
|
287
|
-
flow.warnings.push(`agent_guidance:added:${context.targetRelativePath}`);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
function handleAgentGuidanceStatusMode(flow, presentBefore) {
|
|
291
|
-
if (!presentBefore) {
|
|
292
|
-
flow.warnings.push("agent_guidance:missing");
|
|
293
|
-
pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
function handleAgentGuidanceSkipMode(flow, checkedFiles) {
|
|
297
|
-
flow.skipped = true;
|
|
298
|
-
markAgentGuidanceRunState(flow, checkedFiles, {
|
|
299
|
-
prompt_completed: true,
|
|
300
|
-
declined: true,
|
|
301
|
-
declined_at: flow.state.declined_at || (/* @__PURE__ */ new Date()).toISOString()
|
|
302
|
-
});
|
|
303
|
-
flow.warnings.push("agent_guidance:explicit_skip");
|
|
304
|
-
pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);
|
|
305
|
-
}
|
|
306
|
-
async function handleAgentGuidanceAddMode(flow, context) {
|
|
307
|
-
await addAgentGuidanceBlockIfMissing(flow, context);
|
|
308
|
-
markAgentGuidanceRunState(flow, context.checkedFiles, {
|
|
309
|
-
prompt_completed: true,
|
|
310
|
-
declined: false,
|
|
311
|
-
declined_at: ""
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
function handlePresentAgentGuidance(flow, checkedFiles) {
|
|
315
|
-
if (flow.state.declined) {
|
|
316
|
-
markAgentGuidanceRunState(flow, checkedFiles, {
|
|
317
|
-
prompt_completed: true,
|
|
318
|
-
declined: false,
|
|
319
|
-
declined_at: ""
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
function handleDeclinedAgentGuidance(flow) {
|
|
324
|
-
flow.skipped = true;
|
|
325
|
-
flow.warnings.push("agent_guidance:skipped_declined");
|
|
326
|
-
pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);
|
|
327
|
-
}
|
|
328
|
-
async function handleInteractiveAgentGuidancePrompt(flow, context) {
|
|
329
|
-
flow.prompted = true;
|
|
330
|
-
const approved = await promptForGuidanceWrite(context.targetRelativePath);
|
|
331
|
-
if (approved) {
|
|
332
|
-
await addAgentGuidanceBlockIfMissing(flow, context);
|
|
333
|
-
markAgentGuidanceRunState(flow, context.checkedFiles, {
|
|
334
|
-
prompt_completed: true,
|
|
335
|
-
declined: false,
|
|
336
|
-
declined_at: ""
|
|
337
|
-
});
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
flow.skipped = true;
|
|
341
|
-
markAgentGuidanceRunState(flow, context.checkedFiles, {
|
|
342
|
-
prompt_completed: true,
|
|
343
|
-
declined: true,
|
|
344
|
-
declined_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
345
|
-
});
|
|
346
|
-
flow.warnings.push("agent_guidance:declined");
|
|
347
|
-
pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);
|
|
348
|
-
}
|
|
349
|
-
function handleNonInteractiveMissingAgentGuidance(flow) {
|
|
350
|
-
flow.warnings.push("agent_guidance:missing_non_interactive");
|
|
351
|
-
pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);
|
|
352
|
-
}
|
|
353
|
-
async function applyAgentGuidanceMode(initialState, context) {
|
|
354
|
-
const flow = {
|
|
355
|
-
warnings: [],
|
|
356
|
-
nextSteps: [],
|
|
357
|
-
prompted: false,
|
|
358
|
-
applied: false,
|
|
359
|
-
skipped: false,
|
|
360
|
-
state: initialState
|
|
361
|
-
};
|
|
362
|
-
if (context.mode === "status") {
|
|
363
|
-
handleAgentGuidanceStatusMode(flow, context.presentBefore);
|
|
364
|
-
return flow;
|
|
365
|
-
}
|
|
366
|
-
if (context.mode === "skip") {
|
|
367
|
-
handleAgentGuidanceSkipMode(flow, context.checkedFiles);
|
|
368
|
-
return flow;
|
|
369
|
-
}
|
|
370
|
-
if (context.mode === "add") {
|
|
371
|
-
await handleAgentGuidanceAddMode(flow, context);
|
|
372
|
-
return flow;
|
|
373
|
-
}
|
|
374
|
-
if (context.presentBefore) {
|
|
375
|
-
handlePresentAgentGuidance(flow, context.checkedFiles);
|
|
376
|
-
return flow;
|
|
377
|
-
}
|
|
378
|
-
if (flow.state.prompt_completed && flow.state.declined) {
|
|
379
|
-
handleDeclinedAgentGuidance(flow);
|
|
380
|
-
return flow;
|
|
381
|
-
}
|
|
382
|
-
if (context.interactive) {
|
|
383
|
-
await handleInteractiveAgentGuidancePrompt(flow, context);
|
|
384
|
-
return flow;
|
|
385
|
-
}
|
|
386
|
-
handleNonInteractiveMissingAgentGuidance(flow);
|
|
387
|
-
return flow;
|
|
388
|
-
}
|
|
389
|
-
async function runInitAgentGuidance(options) {
|
|
390
|
-
const projectRoot = resolveProjectRoot(options.pm_root, options.cwd);
|
|
391
|
-
let scans = await scanGuidanceFiles(projectRoot);
|
|
392
|
-
const targetPath = resolveTargetGuidancePath(scans, projectRoot);
|
|
393
|
-
const targetRelativePath = toPortableRelativePath(projectRoot, targetPath);
|
|
394
|
-
const checkedFiles = scans.map((entry) => toPortableRelativePath(projectRoot, entry.file_path));
|
|
395
|
-
const presentBefore = scans.some((entry) => entry.has_guidance);
|
|
396
|
-
const flow = await applyAgentGuidanceMode(normalizeAgentGuidanceState(options.settings), {
|
|
397
|
-
mode: options.mode,
|
|
398
|
-
interactive: options.interactive,
|
|
399
|
-
targetPath,
|
|
400
|
-
targetRelativePath,
|
|
401
|
-
checkedFiles,
|
|
402
|
-
presentBefore
|
|
403
|
-
});
|
|
404
|
-
const stateUpdate = applyAgentGuidanceState(options.settings, flow.state);
|
|
405
|
-
scans = await refreshGuidanceScansAfterApply(flow.applied, scans, projectRoot);
|
|
406
|
-
const summary = buildInitAgentGuidanceSummary({
|
|
407
|
-
mode: options.mode,
|
|
408
|
-
scans,
|
|
409
|
-
projectRoot,
|
|
410
|
-
targetRelativePath,
|
|
411
|
-
prompted: flow.prompted,
|
|
412
|
-
applied: flow.applied,
|
|
413
|
-
skipped: flow.skipped,
|
|
414
|
-
state: flow.state
|
|
415
|
-
});
|
|
416
|
-
return {
|
|
417
|
-
summary,
|
|
418
|
-
warnings: flow.warnings,
|
|
419
|
-
next_steps: flow.nextSteps,
|
|
420
|
-
settings_changed: stateUpdate.changed
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
// dist/cli/commands/init.js
|
|
425
|
-
function summarizeInitResult(result) {
|
|
426
|
-
return {
|
|
427
|
-
ok: result.ok,
|
|
428
|
-
path: result.path,
|
|
429
|
-
id_prefix: result.settings.id_prefix,
|
|
430
|
-
governance_preset: result.governance_preset,
|
|
431
|
-
telemetry: {
|
|
432
|
-
enabled: result.settings.telemetry.enabled,
|
|
433
|
-
capture_level: result.settings.telemetry.capture_level
|
|
434
|
-
},
|
|
435
|
-
output_format: result.settings.output.default_format,
|
|
436
|
-
created_dirs_count: result.created_dirs.length,
|
|
437
|
-
created_dirs: result.created_dirs,
|
|
438
|
-
warnings: result.warnings,
|
|
439
|
-
wizard_used: result.wizard_used,
|
|
440
|
-
...result.registered_type_preset ? { registered_type_preset: result.registered_type_preset } : {},
|
|
441
|
-
...result.installed_packages ? { installed_packages: result.installed_packages } : {},
|
|
442
|
-
next_steps: result.next_steps,
|
|
443
|
-
agent_guidance: result.agent_guidance,
|
|
444
|
-
hint: "Re-run with --verbose for the full settings tree."
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
var _testOnly = {
|
|
448
|
-
normalizeInitGovernancePreset,
|
|
449
|
-
normalizeInitTypePreset,
|
|
450
|
-
normalizeOptionalInitAuthor,
|
|
451
|
-
normalizeInitAgentGuidanceMode,
|
|
452
|
-
isPathLikeInitTarget,
|
|
453
|
-
resolveInitInvocation,
|
|
454
|
-
parseYesNoChoice,
|
|
455
|
-
applyGovernancePreset,
|
|
456
|
-
runInitWizard,
|
|
457
|
-
setInitReadlineFactoryForTests,
|
|
458
|
-
summarizeInstalledPackages,
|
|
459
|
-
registerInitTypePreset,
|
|
460
|
-
assertExplicitTrackerPathIsNotWorkspaceRoot,
|
|
461
|
-
isLikelyWorkspaceRoot
|
|
462
|
-
};
|
|
463
|
-
var createInitReadlineInterface = () => readline2.createInterface({ input: input2, output: output2 });
|
|
464
|
-
function setInitReadlineFactoryForTests(factory) {
|
|
465
|
-
createInitReadlineInterface = factory ?? (() => readline2.createInterface({ input: input2, output: output2 }));
|
|
466
|
-
}
|
|
467
|
-
function cloneDefaults() {
|
|
468
|
-
return structuredClone(SETTINGS_DEFAULTS);
|
|
469
|
-
}
|
|
470
|
-
var BUILTIN_GOVERNANCE_PRESETS = ["minimal", "default", "strict"];
|
|
471
|
-
function normalizeInitGovernancePreset(rawValue) {
|
|
472
|
-
if (rawValue === void 0) {
|
|
473
|
-
return void 0;
|
|
474
|
-
}
|
|
475
|
-
const normalized = rawValue.trim().toLowerCase().replaceAll("-", "_");
|
|
476
|
-
if (normalized.length === 0) {
|
|
477
|
-
throw new PmCliError("--preset must not be empty", EXIT_CODE.USAGE);
|
|
478
|
-
}
|
|
479
|
-
if (normalized === "minimal" || normalized === "default" || normalized === "strict") {
|
|
480
|
-
return normalized;
|
|
481
|
-
}
|
|
482
|
-
if (normalized === "lite" || normalized === "minimum") {
|
|
483
|
-
return "minimal";
|
|
484
|
-
}
|
|
485
|
-
throw new PmCliError(`Invalid --preset value "${rawValue}". Allowed: ${BUILTIN_GOVERNANCE_PRESETS.join(", ")}`, EXIT_CODE.USAGE);
|
|
486
|
-
}
|
|
487
|
-
function normalizeInitTypePreset(rawValue) {
|
|
488
|
-
if (rawValue === void 0) {
|
|
489
|
-
return void 0;
|
|
490
|
-
}
|
|
491
|
-
if (rawValue.trim().length === 0) {
|
|
492
|
-
throw new PmCliError("--type-preset must not be empty", EXIT_CODE.USAGE);
|
|
493
|
-
}
|
|
494
|
-
try {
|
|
495
|
-
return normalizeTypePresetName(rawValue);
|
|
496
|
-
} catch {
|
|
497
|
-
throw new PmCliError(`Invalid --type-preset value "${rawValue}". Allowed: ${TYPE_PRESET_NAMES.join(", ")}`, EXIT_CODE.USAGE);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
function normalizeOptionalInitAuthor(rawValue) {
|
|
501
|
-
if (rawValue === void 0) {
|
|
502
|
-
return void 0;
|
|
503
|
-
}
|
|
504
|
-
const normalized = rawValue.trim();
|
|
505
|
-
if (normalized.length === 0) {
|
|
506
|
-
throw new PmCliError("--author must not be empty", EXIT_CODE.USAGE);
|
|
507
|
-
}
|
|
508
|
-
return normalized;
|
|
509
|
-
}
|
|
510
|
-
function isPathLikeInitTarget(rawValue) {
|
|
511
|
-
if (rawValue === void 0) {
|
|
512
|
-
return false;
|
|
513
|
-
}
|
|
514
|
-
const trimmed = rawValue.trim();
|
|
515
|
-
if (trimmed.length === 0) {
|
|
516
|
-
return false;
|
|
517
|
-
}
|
|
518
|
-
return path2.isAbsolute(trimmed) || trimmed.startsWith(".") || trimmed.includes("/") || trimmed.includes("\\");
|
|
519
|
-
}
|
|
520
|
-
function resolveInitInvocation(cwd, global, prefixArg) {
|
|
521
|
-
if (global.path === void 0 && isPathLikeInitTarget(prefixArg)) {
|
|
522
|
-
const positionalTarget = path2.resolve(cwd, prefixArg.trim());
|
|
523
|
-
return {
|
|
524
|
-
pmRoot: positionalTarget,
|
|
525
|
-
prefixArg: void 0,
|
|
526
|
-
positional_target: positionalTarget
|
|
527
|
-
};
|
|
528
|
-
}
|
|
529
|
-
return {
|
|
530
|
-
pmRoot: resolvePmRoot(cwd, global.path),
|
|
531
|
-
prefixArg
|
|
532
|
-
};
|
|
533
|
-
}
|
|
534
|
-
function normalizeInitAgentGuidanceMode(rawValue) {
|
|
535
|
-
if (rawValue === void 0) {
|
|
536
|
-
return "ask";
|
|
537
|
-
}
|
|
538
|
-
const normalized = rawValue.trim().toLowerCase().replaceAll("-", "_");
|
|
539
|
-
if (normalized.length === 0) {
|
|
540
|
-
throw new PmCliError("--agent-guidance must not be empty", EXIT_CODE.USAGE);
|
|
541
|
-
}
|
|
542
|
-
if (normalized === "ask" || normalized === "add" || normalized === "skip" || normalized === "status") {
|
|
543
|
-
return normalized;
|
|
544
|
-
}
|
|
545
|
-
throw new PmCliError(`Invalid --agent-guidance value "${rawValue}". Allowed: ${INIT_AGENT_GUIDANCE_MODE_VALUES.join(", ")}`, EXIT_CODE.USAGE);
|
|
546
|
-
}
|
|
547
|
-
function parseYesNoChoice(answer, currentDefault) {
|
|
548
|
-
const normalized = answer.trim().toLowerCase();
|
|
549
|
-
if (normalized.length === 0) {
|
|
550
|
-
return currentDefault;
|
|
551
|
-
}
|
|
552
|
-
if (normalized === "y" || normalized === "yes") {
|
|
553
|
-
return true;
|
|
554
|
-
}
|
|
555
|
-
if (normalized === "n" || normalized === "no") {
|
|
556
|
-
return false;
|
|
557
|
-
}
|
|
558
|
-
return currentDefault;
|
|
559
|
-
}
|
|
560
|
-
function applyGovernancePreset(settings, preset) {
|
|
561
|
-
const knobs = GOVERNANCE_PRESET_DEFAULTS[preset];
|
|
562
|
-
settings.governance = {
|
|
563
|
-
preset,
|
|
564
|
-
...knobs
|
|
565
|
-
};
|
|
566
|
-
settings.validation.parent_reference = knobs.parent_reference;
|
|
567
|
-
settings.validation.metadata_profile = knobs.metadata_profile;
|
|
568
|
-
}
|
|
569
|
-
function isInstalledPackageEntry(value) {
|
|
570
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
571
|
-
}
|
|
572
|
-
function summarizeInstalledPackages(result) {
|
|
573
|
-
const details = result.details;
|
|
574
|
-
return {
|
|
575
|
-
installed_all: details.installed_all === true,
|
|
576
|
-
installed_count: typeof details.installed_count === "number" ? details.installed_count : 0,
|
|
577
|
-
packages: Array.isArray(details.packages) ? details.packages.filter(isInstalledPackageEntry).map((entry) => ({
|
|
578
|
-
alias: typeof entry.alias === "string" ? entry.alias : "",
|
|
579
|
-
ok: entry.ok === true
|
|
580
|
-
})) : []
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
async function registerInitTypePreset(pmRoot, settings, preset) {
|
|
584
|
-
const schema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
585
|
-
const typesPath = filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);
|
|
586
|
-
const parsed = parseItemTypesFile(await readFileIfExists(typesPath));
|
|
587
|
-
let nextFile = parsed;
|
|
588
|
-
const registered = [];
|
|
589
|
-
const updated = [];
|
|
590
|
-
for (const normalized of resolveTypePresetDefinitions(preset)) {
|
|
591
|
-
const upsert = upsertItemType(nextFile, normalized);
|
|
592
|
-
nextFile = upsert.file;
|
|
593
|
-
(upsert.replaced ? updated : registered).push(upsert.definition.name);
|
|
594
|
-
}
|
|
595
|
-
await writeFileAtomic(typesPath, serializeItemTypesFile(nextFile));
|
|
596
|
-
return {
|
|
597
|
-
name: preset,
|
|
598
|
-
registered,
|
|
599
|
-
updated,
|
|
600
|
-
file: typesPath
|
|
601
|
-
};
|
|
602
|
-
}
|
|
603
|
-
async function isLikelyWorkspaceRoot(candidate) {
|
|
604
|
-
const indicators = [
|
|
605
|
-
".git",
|
|
606
|
-
"package.json",
|
|
607
|
-
"pnpm-workspace.yaml",
|
|
608
|
-
"AGENTS.md",
|
|
609
|
-
path2.join(".agents", "pm")
|
|
610
|
-
];
|
|
611
|
-
for (const indicator of indicators) {
|
|
612
|
-
if (await pathExists(path2.join(candidate, indicator))) {
|
|
613
|
-
return true;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
return false;
|
|
617
|
-
}
|
|
618
|
-
async function assertExplicitTrackerPathIsNotWorkspaceRoot(pmRoot, global, force) {
|
|
619
|
-
if (global.path === void 0 || force) {
|
|
620
|
-
return;
|
|
621
|
-
}
|
|
622
|
-
if (await pathExists(path2.join(pmRoot, "settings.json"))) {
|
|
623
|
-
return;
|
|
624
|
-
}
|
|
625
|
-
if (!await isLikelyWorkspaceRoot(pmRoot)) {
|
|
626
|
-
return;
|
|
627
|
-
}
|
|
628
|
-
const nestedTracker = path2.join(pmRoot, ".agents", "pm");
|
|
629
|
-
throw new PmCliError(`Refusing to initialize tracker files directly in workspace root "${pmRoot}".`, EXIT_CODE.USAGE, {
|
|
630
|
-
code: "workspace_root_pm_path",
|
|
631
|
-
type: "urn:pm-cli:error:workspace_root_pm_path",
|
|
632
|
-
why: "--pm-path/--path points at the tracker storage directory itself, not the repository workspace. Point it at .agents/pm or pass --force if you intentionally want root-level tracker files.",
|
|
633
|
-
examples: [
|
|
634
|
-
`pm --pm-path ${nestedTracker} init --yes`,
|
|
635
|
-
"pm init --yes",
|
|
636
|
-
`pm --pm-path ${pmRoot} init --yes --force`
|
|
637
|
-
],
|
|
638
|
-
nextSteps: [
|
|
639
|
-
"Use --pm-path <repo>/.agents/pm for repository-local tracker storage.",
|
|
640
|
-
"Use PM_PATH only for sandboxed tests or explicit tracker roots.",
|
|
641
|
-
"Pass --force only when root-level tracker files are intentional."
|
|
642
|
-
],
|
|
643
|
-
recovery: {
|
|
644
|
-
next_best_command: `pm --pm-path ${nestedTracker} init --yes`
|
|
645
|
-
}
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
async function ensureInitDirectories(pmRoot, subdirs) {
|
|
649
|
-
const createdDirs = [];
|
|
650
|
-
const warnings = [];
|
|
651
|
-
for (const subdir of subdirs) {
|
|
652
|
-
const target = subdir ? path2.join(pmRoot, subdir) : pmRoot;
|
|
653
|
-
const existed = await pathExists(target);
|
|
654
|
-
await fs2.mkdir(target, { recursive: true });
|
|
655
|
-
if (existed) {
|
|
656
|
-
warnings.push(`already_exists:${target}`);
|
|
657
|
-
} else {
|
|
658
|
-
createdDirs.push(target);
|
|
659
|
-
}
|
|
660
|
-
warnings.push(...await runActiveOnWriteHooks({
|
|
661
|
-
path: target,
|
|
662
|
-
scope: "project",
|
|
663
|
-
op: "init:ensure_dir"
|
|
664
|
-
}));
|
|
665
|
-
}
|
|
666
|
-
return { createdDirs, warnings };
|
|
667
|
-
}
|
|
668
|
-
async function runInitWizard(initialPrefix, telemetryDefault) {
|
|
669
|
-
const rl = createInitReadlineInterface();
|
|
670
|
-
try {
|
|
671
|
-
output2.write("pm init setup wizard (agent-optimized)\n");
|
|
672
|
-
output2.write("This walkthrough is non-destructive and each choice can be changed later with pm config.\n\n");
|
|
673
|
-
output2.write("1/3 Item ID prefix\n");
|
|
674
|
-
output2.write("Prefix is prepended to generated IDs (for example pm-a1b2).\n");
|
|
675
|
-
const prefixAnswer = await rl.question(`Item ID prefix [${initialPrefix}]: `);
|
|
676
|
-
const resolvedPrefix = prefixAnswer.trim().length > 0 ? normalizePrefix(prefixAnswer) : initialPrefix;
|
|
677
|
-
output2.write("\n2/3 Governance preset\n");
|
|
678
|
-
output2.write("minimal: no ownership blocking, progressive create defaults, close validation off.\n");
|
|
679
|
-
output2.write("default: ownership conflict warnings, progressive create defaults, close validation warn.\n");
|
|
680
|
-
output2.write("strict: ownership blocking, strict create defaults, close validation strict.\n");
|
|
681
|
-
const presetAnswer = await rl.question("Governance preset [minimal/default/strict] (default: minimal): ");
|
|
682
|
-
const presetChoice = presetAnswer.trim().length > 0 ? presetAnswer.trim() : "minimal";
|
|
683
|
-
let resolvedPreset = "minimal";
|
|
684
|
-
try {
|
|
685
|
-
resolvedPreset = normalizeInitGovernancePreset(presetChoice);
|
|
686
|
-
} catch {
|
|
687
|
-
output2.write(`Unrecognized governance preset "${presetChoice}"; using minimal.
|
|
688
|
-
`);
|
|
689
|
-
}
|
|
690
|
-
output2.write("\n3/3 Project telemetry\n");
|
|
691
|
-
output2.write("Telemetry helps improve reliability and can be disabled anytime via pm config.\n");
|
|
692
|
-
const telemetryLabel = telemetryDefault ? "Y/n" : "y/N";
|
|
693
|
-
const telemetryAnswer = await rl.question(`Enable telemetry for this project? [${telemetryLabel}] `);
|
|
694
|
-
const telemetryEnabled = parseYesNoChoice(telemetryAnswer, telemetryDefault);
|
|
695
|
-
output2.write("\n");
|
|
696
|
-
return {
|
|
697
|
-
prefix: resolvedPrefix,
|
|
698
|
-
preset: resolvedPreset,
|
|
699
|
-
telemetry_enabled: telemetryEnabled
|
|
700
|
-
};
|
|
701
|
-
} finally {
|
|
702
|
-
rl.close();
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
function normalizeInitCommandOptions(options) {
|
|
706
|
-
return {
|
|
707
|
-
presetFromOption: normalizeInitGovernancePreset(options.preset),
|
|
708
|
-
useDefaults: options.defaults === true,
|
|
709
|
-
authorFromOption: normalizeOptionalInitAuthor(options.author),
|
|
710
|
-
installBundledPackages: options.withPackages === true,
|
|
711
|
-
agentGuidanceMode: normalizeInitAgentGuidanceMode(options.agentGuidance),
|
|
712
|
-
typePreset: normalizeInitTypePreset(options.typePreset)
|
|
713
|
-
};
|
|
714
|
-
}
|
|
715
|
-
function collectExistingSettingsPendingChanges(params) {
|
|
716
|
-
const pendingChanges = [];
|
|
717
|
-
if (params.prefixArg !== void 0 && params.settings.id_prefix !== params.normalizedPrefix) {
|
|
718
|
-
pendingChanges.push("id_prefix");
|
|
719
|
-
}
|
|
720
|
-
if (params.presetFromOption !== void 0 && params.settings.governance.preset !== params.presetFromOption) {
|
|
721
|
-
pendingChanges.push("governance_preset");
|
|
722
|
-
}
|
|
723
|
-
if (params.authorFromOption !== void 0 && params.settings.author_default !== params.authorFromOption) {
|
|
724
|
-
pendingChanges.push("author_default");
|
|
725
|
-
}
|
|
726
|
-
return pendingChanges;
|
|
727
|
-
}
|
|
728
|
-
function assertExistingSettingsUpdateAllowed(settingsPath, pendingChanges, force) {
|
|
729
|
-
if (pendingChanges.length === 0 || force) {
|
|
730
|
-
return;
|
|
731
|
-
}
|
|
732
|
-
throw new PmCliError(`Refusing to update existing tracker settings at ${settingsPath} without --force.`, EXIT_CODE.USAGE, {
|
|
733
|
-
code: "init_existing_settings_requires_force",
|
|
734
|
-
type: "urn:pm-cli:error:init_existing_settings_requires_force",
|
|
735
|
-
required: `--force for ${pendingChanges.join(", ")}`,
|
|
736
|
-
why: "pm init is safe to rerun, but changing id prefix, governance preset, or default author on an existing tracker can corrupt long-lived project context when an agent meant to initialize a sandbox path.",
|
|
737
|
-
examples: [
|
|
738
|
-
"pm init --yes",
|
|
739
|
-
"pm init ./sandbox-pm --yes",
|
|
740
|
-
"pm init acme --yes --force"
|
|
741
|
-
],
|
|
742
|
-
nextSteps: [
|
|
743
|
-
"If you meant to initialize a sandbox tracker, pass a path-like positional such as ./sandbox-pm or /tmp/pm-test.",
|
|
744
|
-
"If you intentionally want to rewrite this existing tracker's init-managed settings, rerun with --force."
|
|
745
|
-
]
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
function applyExistingSettingsUpdates(params) {
|
|
749
|
-
let changed = false;
|
|
750
|
-
if (params.prefixArg !== void 0 && params.settings.id_prefix !== params.normalizedPrefix) {
|
|
751
|
-
params.settings.id_prefix = params.normalizedPrefix;
|
|
752
|
-
params.warnings.push(`updated:id_prefix:${params.normalizedPrefix}`);
|
|
753
|
-
changed = true;
|
|
754
|
-
}
|
|
755
|
-
if (params.presetFromOption !== void 0 && params.settings.governance.preset !== params.presetFromOption) {
|
|
756
|
-
applyGovernancePreset(params.settings, params.presetFromOption);
|
|
757
|
-
params.warnings.push(`updated:governance_preset:${params.presetFromOption}`);
|
|
758
|
-
changed = true;
|
|
759
|
-
}
|
|
760
|
-
if (params.authorFromOption !== void 0 && params.settings.author_default !== params.authorFromOption) {
|
|
761
|
-
params.settings.author_default = params.authorFromOption;
|
|
762
|
-
params.warnings.push(`updated:author_default:${params.authorFromOption}`);
|
|
763
|
-
changed = true;
|
|
764
|
-
}
|
|
765
|
-
return changed;
|
|
766
|
-
}
|
|
767
|
-
async function loadExistingInitSettings(params) {
|
|
768
|
-
const settings = await readSettings(params.pmRoot);
|
|
769
|
-
params.warnings.push(`already_exists:${params.settingsPath}`);
|
|
770
|
-
const pendingChanges = collectExistingSettingsPendingChanges({
|
|
771
|
-
settings,
|
|
772
|
-
normalizedPrefix: params.normalizedPrefix,
|
|
773
|
-
prefixArg: params.prefixArg,
|
|
774
|
-
presetFromOption: params.normalizedOptions.presetFromOption,
|
|
775
|
-
authorFromOption: params.normalizedOptions.authorFromOption
|
|
776
|
-
});
|
|
777
|
-
assertExistingSettingsUpdateAllowed(params.settingsPath, pendingChanges, params.options.force === true);
|
|
778
|
-
if (applyExistingSettingsUpdates({
|
|
779
|
-
settings,
|
|
780
|
-
normalizedPrefix: params.normalizedPrefix,
|
|
781
|
-
prefixArg: params.prefixArg,
|
|
782
|
-
presetFromOption: params.normalizedOptions.presetFromOption,
|
|
783
|
-
authorFromOption: params.normalizedOptions.authorFromOption,
|
|
784
|
-
warnings: params.warnings
|
|
785
|
-
})) {
|
|
786
|
-
await writeSettings(params.pmRoot, settings);
|
|
787
|
-
}
|
|
788
|
-
return {
|
|
789
|
-
settings,
|
|
790
|
-
normalizedPrefix: params.normalizedPrefix,
|
|
791
|
-
chosenPreset: params.normalizedOptions.presetFromOption,
|
|
792
|
-
wizardUsed: false
|
|
793
|
-
};
|
|
794
|
-
}
|
|
795
|
-
async function createNewInitSettings(params) {
|
|
796
|
-
let normalizedPrefix = params.normalizedPrefix;
|
|
797
|
-
let chosenPreset = params.normalizedOptions.presetFromOption;
|
|
798
|
-
let chosenTelemetryEnabled;
|
|
799
|
-
let wizardUsed = false;
|
|
800
|
-
if (params.normalizedOptions.presetFromOption === void 0 && !params.normalizedOptions.useDefaults && process.stdin.isTTY === true && process.stdout.isTTY === true) {
|
|
801
|
-
const wizardChoices = await runInitWizard(normalizedPrefix, SETTINGS_DEFAULTS.telemetry.enabled);
|
|
802
|
-
normalizedPrefix = wizardChoices.prefix;
|
|
803
|
-
chosenPreset = wizardChoices.preset;
|
|
804
|
-
chosenTelemetryEnabled = wizardChoices.telemetry_enabled;
|
|
805
|
-
wizardUsed = true;
|
|
806
|
-
}
|
|
807
|
-
const effectivePreset = chosenPreset ?? "minimal";
|
|
808
|
-
const settings = cloneDefaults();
|
|
809
|
-
settings.id_prefix = normalizedPrefix;
|
|
810
|
-
applyGovernancePreset(settings, effectivePreset);
|
|
811
|
-
if (params.normalizedOptions.authorFromOption !== void 0) {
|
|
812
|
-
settings.author_default = params.normalizedOptions.authorFromOption;
|
|
813
|
-
}
|
|
814
|
-
if (chosenTelemetryEnabled !== void 0) {
|
|
815
|
-
settings.telemetry.enabled = chosenTelemetryEnabled;
|
|
816
|
-
settings.telemetry.first_run_prompt_completed = true;
|
|
817
|
-
}
|
|
818
|
-
await writeSettings(params.pmRoot, settings);
|
|
819
|
-
return {
|
|
820
|
-
settings,
|
|
821
|
-
normalizedPrefix,
|
|
822
|
-
chosenPreset,
|
|
823
|
-
wizardUsed
|
|
824
|
-
};
|
|
825
|
-
}
|
|
826
|
-
async function resolveInitSettings(params) {
|
|
827
|
-
if (params.settingsExists) {
|
|
828
|
-
return await loadExistingInitSettings(params);
|
|
829
|
-
}
|
|
830
|
-
return await createNewInitSettings({
|
|
831
|
-
pmRoot: params.pmRoot,
|
|
832
|
-
normalizedPrefix: params.normalizedPrefix,
|
|
833
|
-
normalizedOptions: params.normalizedOptions
|
|
834
|
-
});
|
|
835
|
-
}
|
|
836
|
-
async function applyInitAgentGuidance(params) {
|
|
837
|
-
const agentGuidanceResult = await runInitAgentGuidance({
|
|
838
|
-
pm_root: params.pmRoot,
|
|
839
|
-
cwd: params.cwd,
|
|
840
|
-
mode: params.agentGuidanceMode,
|
|
841
|
-
interactive: process.stdin.isTTY === true && process.stdout.isTTY === true,
|
|
842
|
-
settings: params.settings
|
|
843
|
-
});
|
|
844
|
-
params.warnings.push(...agentGuidanceResult.warnings);
|
|
845
|
-
if (agentGuidanceResult.settings_changed) {
|
|
846
|
-
await writeSettings(params.pmRoot, params.settings);
|
|
847
|
-
}
|
|
848
|
-
return {
|
|
849
|
-
...agentGuidanceResult.summary,
|
|
850
|
-
next_steps: agentGuidanceResult.next_steps
|
|
851
|
-
};
|
|
852
|
-
}
|
|
853
|
-
async function ensureInitRuntimeSchemaFiles(pmRoot, settings) {
|
|
854
|
-
const createdDirs = [];
|
|
855
|
-
const warnings = [];
|
|
856
|
-
const runtimeSchemaScaffold = await ensureRuntimeSchemaFileScaffold(pmRoot, settings.schema);
|
|
857
|
-
for (const createdPath of runtimeSchemaScaffold.created_paths) {
|
|
858
|
-
createdDirs.push(createdPath);
|
|
859
|
-
warnings.push(...await runActiveOnWriteHooks({
|
|
860
|
-
path: createdPath,
|
|
861
|
-
scope: "project",
|
|
862
|
-
op: "init:runtime_schema_file"
|
|
863
|
-
}));
|
|
864
|
-
}
|
|
865
|
-
return { createdDirs, warnings };
|
|
866
|
-
}
|
|
867
|
-
async function maybeRegisterInitTypePreset(params) {
|
|
868
|
-
if (params.typePreset === void 0) {
|
|
869
|
-
return void 0;
|
|
870
|
-
}
|
|
871
|
-
const registeredTypePreset = await registerInitTypePreset(params.pmRoot, params.settings, params.typePreset);
|
|
872
|
-
params.warnings.push(`registered_type_preset:${params.typePreset}`);
|
|
873
|
-
params.warnings.push(...await runActiveOnWriteHooks({
|
|
874
|
-
path: registeredTypePreset.file,
|
|
875
|
-
scope: "project",
|
|
876
|
-
op: "init:type_preset"
|
|
877
|
-
}));
|
|
878
|
-
return registeredTypePreset;
|
|
879
|
-
}
|
|
880
|
-
async function ensureInitTypeDirectories(params) {
|
|
881
|
-
const typeRegistry = resolveItemTypeRegistry(params.settings, getActiveExtensionRegistrations());
|
|
882
|
-
const customTypeFolders = typeRegistry.folders.filter((folder) => !PM_REQUIRED_SUBDIRS.includes(folder));
|
|
883
|
-
const scaffold = await ensureInitDirectories(params.pmRoot, customTypeFolders);
|
|
884
|
-
params.createdDirs.push(...scaffold.createdDirs);
|
|
885
|
-
params.warnings.push(...scaffold.warnings);
|
|
886
|
-
}
|
|
887
|
-
async function maybeInstallInitBundledPackages(installBundledPackages, global, warnings) {
|
|
888
|
-
if (!installBundledPackages) {
|
|
889
|
-
return void 0;
|
|
890
|
-
}
|
|
891
|
-
const packageInstallResult = await runExtension("all", { install: true, project: true }, global);
|
|
892
|
-
warnings.push(...packageInstallResult.warnings);
|
|
893
|
-
const installedPackages = summarizeInstalledPackages(packageInstallResult);
|
|
894
|
-
if (!installedPackages.installed_all || installedPackages.packages.some((entry) => !entry.ok)) {
|
|
895
|
-
throw new PmCliError("pm init --with-packages did not install all bundled packages successfully.", EXIT_CODE.GENERIC_FAILURE);
|
|
896
|
-
}
|
|
897
|
-
return installedPackages;
|
|
898
|
-
}
|
|
899
|
-
function buildInitNextSteps(params) {
|
|
900
|
-
const nextSteps = [
|
|
901
|
-
'Create your first item: pm create --type Task --title "<title>"',
|
|
902
|
-
"List active items: pm list",
|
|
903
|
-
"Get agent-friendly project context: pm context"
|
|
904
|
-
];
|
|
905
|
-
if (!params.installBundledPackages) {
|
|
906
|
-
nextSteps.push("Add optional packages for richer workflows: pm install calendar --project, pm install templates --project, pm install guide-shell --project");
|
|
907
|
-
nextSteps.push("Or install everything bundled: pm init --with-packages (idempotent on re-run)");
|
|
908
|
-
} else {
|
|
909
|
-
nextSteps.push("Explore newly-available commands: pm cal, pm templates, pm guide");
|
|
910
|
-
}
|
|
911
|
-
if (params.registeredTypePreset) {
|
|
912
|
-
nextSteps.push(`Inspect registered preset types: pm schema list, pm schema show ${params.registeredTypePreset.registered[0] ?? params.registeredTypePreset.updated[0]}`);
|
|
913
|
-
}
|
|
914
|
-
nextSteps.push("Set PM_AUTHOR=<your-agent-id> so mutations attribute to the right caller.");
|
|
915
|
-
for (const guidanceNextStep of params.agentGuidanceNextSteps) {
|
|
916
|
-
if (!nextSteps.includes(guidanceNextStep)) {
|
|
917
|
-
nextSteps.push(guidanceNextStep);
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
return nextSteps;
|
|
921
|
-
}
|
|
922
|
-
async function runInit(prefixArg, global, options = {}) {
|
|
923
|
-
const cwd = process.cwd();
|
|
924
|
-
const invocation = resolveInitInvocation(cwd, global, prefixArg);
|
|
925
|
-
const pmRoot = invocation.pmRoot;
|
|
926
|
-
prefixArg = invocation.prefixArg;
|
|
927
|
-
await assertExplicitTrackerPathIsNotWorkspaceRoot(pmRoot, global, options.force === true);
|
|
928
|
-
const createdDirs = [];
|
|
929
|
-
const warnings = [];
|
|
930
|
-
const baseDirs = await ensureInitDirectories(pmRoot, PM_REQUIRED_SUBDIRS);
|
|
931
|
-
createdDirs.push(...baseDirs.createdDirs);
|
|
932
|
-
warnings.push(...baseDirs.warnings);
|
|
933
|
-
const settingsPath = path2.join(pmRoot, "settings.json");
|
|
934
|
-
const settingsExists = await pathExists(settingsPath);
|
|
935
|
-
const normalizedOptions = normalizeInitCommandOptions(options);
|
|
936
|
-
const settingsResolution = await resolveInitSettings({
|
|
937
|
-
pmRoot,
|
|
938
|
-
settingsPath,
|
|
939
|
-
settingsExists,
|
|
940
|
-
normalizedPrefix: normalizePrefix(prefixArg),
|
|
941
|
-
prefixArg,
|
|
942
|
-
options,
|
|
943
|
-
normalizedOptions,
|
|
944
|
-
warnings
|
|
945
|
-
});
|
|
946
|
-
let { settings } = settingsResolution;
|
|
947
|
-
const agentGuidance = await applyInitAgentGuidance({
|
|
948
|
-
pmRoot,
|
|
949
|
-
cwd,
|
|
950
|
-
agentGuidanceMode: normalizedOptions.agentGuidanceMode,
|
|
951
|
-
settings,
|
|
952
|
-
warnings
|
|
953
|
-
});
|
|
954
|
-
const schemaFiles = await ensureInitRuntimeSchemaFiles(pmRoot, settings);
|
|
955
|
-
createdDirs.push(...schemaFiles.createdDirs);
|
|
956
|
-
warnings.push(...schemaFiles.warnings);
|
|
957
|
-
const registeredTypePreset = await maybeRegisterInitTypePreset({
|
|
958
|
-
pmRoot,
|
|
959
|
-
settings,
|
|
960
|
-
typePreset: normalizedOptions.typePreset,
|
|
961
|
-
warnings
|
|
962
|
-
});
|
|
963
|
-
if (registeredTypePreset) {
|
|
964
|
-
settings = await readSettings(pmRoot);
|
|
965
|
-
}
|
|
966
|
-
await ensureInitTypeDirectories({ pmRoot, settings, createdDirs, warnings });
|
|
967
|
-
const installedPackages = await maybeInstallInitBundledPackages(normalizedOptions.installBundledPackages, global, warnings);
|
|
968
|
-
const nextSteps = buildInitNextSteps({
|
|
969
|
-
installBundledPackages: normalizedOptions.installBundledPackages,
|
|
970
|
-
registeredTypePreset,
|
|
971
|
-
agentGuidanceNextSteps: agentGuidance.next_steps
|
|
972
|
-
});
|
|
973
|
-
return {
|
|
974
|
-
ok: true,
|
|
975
|
-
path: pmRoot,
|
|
976
|
-
settings,
|
|
977
|
-
created_dirs: createdDirs,
|
|
978
|
-
warnings,
|
|
979
|
-
governance_preset: settings.governance.preset,
|
|
980
|
-
wizard_used: settingsResolution.wizardUsed,
|
|
981
|
-
...registeredTypePreset ? { registered_type_preset: registeredTypePreset } : {},
|
|
982
|
-
...installedPackages ? { installed_packages: installedPackages } : {},
|
|
983
|
-
next_steps: nextSteps,
|
|
984
|
-
agent_guidance: agentGuidance
|
|
985
|
-
};
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
export {
|
|
989
|
-
summarizeInitResult,
|
|
990
|
-
_testOnly,
|
|
991
|
-
runInit
|
|
992
|
-
};
|
|
993
|
-
//# sourceMappingURL=chunk-MFSCBT5Q.js.map
|
|
994
|
-
|
|
995
|
-
//# debugId=60eff3e2-3dae-547d-af75-15d1de75a9b5
|