@unbrained/pm-cli 2026.7.3 → 2026.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/CONTRIBUTING.md +36 -7
- package/README.md +1 -9
- package/dist/cli/commands/calendar.d.ts +3 -2
- package/dist/cli/commands/calendar.js +5 -5
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/claim.js +17 -3
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/close.js +34 -16
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +231 -345
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/copy.js +3 -3
- package/dist/cli/commands/copy.js.map +1 -1
- package/dist/cli/commands/create.d.ts +9 -59
- package/dist/cli/commands/create.js +162 -132
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.d.ts +6 -0
- package/dist/cli/commands/extension/bundled-catalog.js +15 -2
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +6 -3
- package/dist/cli/commands/extension/describe.js +21 -9
- package/dist/cli/commands/extension/describe.js.map +1 -1
- package/dist/cli/commands/extension/doctor.d.ts +0 -4
- package/dist/cli/commands/extension/doctor.js +3 -3
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.js +59 -133
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension/shared.d.ts +2 -7
- package/dist/cli/commands/extension/shared.js +4 -10
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/extension.js +33 -8
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/files.js +3 -3
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/history-compact.js +9 -18
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-repair.js +9 -19
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.js +133 -97
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.js +3 -3
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/item-filter-options.d.ts +2 -0
- package/dist/cli/commands/item-filter-options.js +2 -2
- package/dist/cli/commands/item-filter-options.js.map +1 -1
- package/dist/cli/commands/mutation-command-options.d.ts +78 -0
- package/dist/cli/commands/mutation-command-options.js +10 -0
- package/dist/cli/commands/mutation-command-options.js.map +1 -0
- package/dist/cli/commands/profile.js +3 -3
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/reindex.js +4 -4
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.js +3 -3
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.js +10 -10
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/shared-unset-fields.d.ts +19 -0
- package/dist/cli/commands/shared-unset-fields.js +31 -2
- package/dist/cli/commands/shared-unset-fields.js.map +1 -1
- package/dist/cli/commands/update.d.ts +2 -59
- package/dist/cli/commands/update.js +29 -98
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.js +4 -4
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +107 -7
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/main.d.ts +6 -2
- package/dist/cli/main.js +33 -12
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +4 -2
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/registration-helpers.js +12 -6
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +18 -0
- package/dist/cli-bundle/chunks/{activity-5YWLSPGE.js → activity-YKAKZTZ4.js} +11 -9
- package/dist/cli-bundle/chunks/{aggregate-2V2M3JZU.js → aggregate-EQX2RGB7.js} +16 -13
- package/dist/cli-bundle/chunks/{aggregate-2V2M3JZU.js.map → aggregate-EQX2RGB7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{aggregate-EK7DXML7.js → aggregate-PEGZGJXD.js} +18 -15
- package/dist/cli-bundle/chunks/{aggregate-EK7DXML7.js.map → aggregate-PEGZGJXD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-EZESUVJT.js → append-CZGUZ45Q.js} +11 -8
- package/dist/cli-bundle/chunks/{append-EZESUVJT.js.map → append-CZGUZ45Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-JFG4WQMG.js → append-NSQBCXZJ.js} +13 -10
- package/dist/cli-bundle/chunks/{append-JFG4WQMG.js.map → append-NSQBCXZJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js +1413 -0
- package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NOIEVOK5.js → chunk-3PL6LEKP.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-NOIEVOK5.js.map → chunk-3PL6LEKP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6KRFL33E.js → chunk-3U3VEWK6.js} +277 -119
- package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Z5F6XZXE.js → chunk-3Y4OESPP.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-Z5F6XZXE.js.map → chunk-3Y4OESPP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HB4FAT3O.js → chunk-4LRVSBO6.js} +21 -15
- package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-T3P7PMZP.js → chunk-4OFLJHX6.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-T3P7PMZP.js.map → chunk-4OFLJHX6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JPATY4SE.js → chunk-4QQ6PM7M.js} +45 -557
- package/dist/cli-bundle/chunks/chunk-4QQ6PM7M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6CDCWKSX.js → chunk-53BTLLAF.js} +68 -331
- package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4WB6S4YX.js → chunk-57C2RLW5.js} +277 -112
- package/dist/cli-bundle/chunks/chunk-57C2RLW5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PULUSQAV.js → chunk-5B3X4Y22.js} +52 -63
- package/dist/cli-bundle/chunks/{chunk-PULUSQAV.js.map → chunk-5B3X4Y22.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7LYO6S5A.js → chunk-5J2XPTAD.js} +10 -8
- package/dist/cli-bundle/chunks/{chunk-7LYO6S5A.js.map → chunk-5J2XPTAD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-QCDTQCMW.js → chunk-5JE6SMYS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MHRS5FUX.js → chunk-5JZ7APJU.js} +153 -108
- package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KHVGM5CS.js → chunk-5VVUKE3U.js} +544 -2368
- package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RJH5VQHW.js → chunk-75U6M5ZD.js} +22 -16
- package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +23 -0
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZFTKYWIF.js → chunk-7EQNAZX2.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-ZFTKYWIF.js.map → chunk-7EQNAZX2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-Z4DGFQDH.js → chunk-7LQKVMPA.js} +14 -4
- package/dist/cli-bundle/chunks/chunk-7LQKVMPA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ERG65A2L.js → chunk-7MDXZAZS.js} +29 -7
- package/dist/cli-bundle/chunks/chunk-7MDXZAZS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OGLGI22K.js → chunk-7QH7DHUB.js} +74 -8
- package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JBZ2NTKX.js → chunk-7WYXBPYQ.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-JBZ2NTKX.js.map → chunk-7WYXBPYQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js +150 -0
- package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-K5DT2YKM.js → chunk-ABRA3BHY.js} +18 -16
- package/dist/cli-bundle/chunks/{chunk-K5DT2YKM.js.map → chunk-ABRA3BHY.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js +47 -0
- package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7CLLC75T.js → chunk-BFVHCAOO.js} +9 -7
- package/dist/cli-bundle/chunks/{chunk-7CLLC75T.js.map → chunk-BFVHCAOO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MDHWWBNZ.js → chunk-BVEUCSH2.js} +6 -4
- package/dist/cli-bundle/chunks/{chunk-MDHWWBNZ.js.map → chunk-BVEUCSH2.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js +160 -0
- package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-T4XBKJ3F.js → chunk-D3UCE7RW.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-T4XBKJ3F.js.map → chunk-D3UCE7RW.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +275 -0
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js +634 -0
- package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AJHYQCBJ.js → chunk-DRBV5UC2.js} +8 -23
- package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NZ7QIUP5.js → chunk-E2FUG6GD.js} +67 -351
- package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4PFVUUYV.js → chunk-EEY54JMF.js} +5 -3
- package/dist/cli-bundle/chunks/{chunk-4PFVUUYV.js.map → chunk-EEY54JMF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3W2HJKJX.js → chunk-EZFKWSC7.js} +94 -16
- package/dist/cli-bundle/chunks/{chunk-3W2HJKJX.js.map → chunk-EZFKWSC7.js.map} +4 -4
- package/dist/cli-bundle/chunks/{chunk-F6WNBITZ.js → chunk-FDBARR33.js} +40 -19
- package/dist/cli-bundle/chunks/{chunk-F6WNBITZ.js.map → chunk-FDBARR33.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WRYERRZX.js → chunk-FGQKEDE4.js} +36 -12
- package/dist/cli-bundle/chunks/chunk-FGQKEDE4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CXR3CMBQ.js → chunk-FJRKQREY.js} +10 -18
- package/dist/cli-bundle/chunks/chunk-FJRKQREY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QNNQAAZ5.js → chunk-FUM6UMY4.js} +10 -11
- package/dist/cli-bundle/chunks/{chunk-QNNQAAZ5.js.map → chunk-FUM6UMY4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TQ6AX5SQ.js → chunk-GIWXVMZ3.js} +140 -334
- package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FZJM2TXF.js → chunk-HBYZDSK5.js} +19 -17
- package/dist/cli-bundle/chunks/{chunk-FZJM2TXF.js.map → chunk-HBYZDSK5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5IZUBZBR.js → chunk-HJE4JTKQ.js} +6 -4
- package/dist/cli-bundle/chunks/{chunk-5IZUBZBR.js.map → chunk-HJE4JTKQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YSDFIY7N.js → chunk-HK72NWAD.js} +89 -18
- package/dist/cli-bundle/chunks/chunk-HK72NWAD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LBE5QFMZ.js → chunk-IJ6CO3JV.js} +41 -20
- package/dist/cli-bundle/chunks/{chunk-LBE5QFMZ.js.map → chunk-IJ6CO3JV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YF746GTH.js → chunk-JFCVQXZX.js} +139 -326
- package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-A3OQ7TFW.js → chunk-JLA7EVYV.js} +12 -10
- package/dist/cli-bundle/chunks/{chunk-A3OQ7TFW.js.map → chunk-JLA7EVYV.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +76 -0
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-32IUNTG4.js → chunk-K3AGVXSF.js} +37 -13
- package/dist/cli-bundle/chunks/chunk-K3AGVXSF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +79 -0
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KGHH652T.js +44 -0
- package/dist/cli-bundle/chunks/chunk-KGHH652T.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +915 -0
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BI4R7HI2.js → chunk-KLG4ZULO.js} +12 -10
- package/dist/cli-bundle/chunks/{chunk-BI4R7HI2.js.map → chunk-KLG4ZULO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XRYSCRZR.js → chunk-LEKT4K7I.js} +74 -8
- package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-X74F2GSM.js → chunk-MNZ7DRNC.js} +13 -10
- package/dist/cli-bundle/chunks/{contracts-X74F2GSM.js.map → chunk-MNZ7DRNC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4EXFFP7T.js → chunk-MTTXDAK4.js} +206 -147
- package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KEZOIPCR.js → chunk-MZ7VNEVY.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-KEZOIPCR.js.map → chunk-MZ7VNEVY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5JIWFWOZ.js → chunk-N6DNM2FA.js} +2 -2
- package/dist/cli-bundle/chunks/{test-runs-QIR5MJPL.js → chunk-N7X4WP6L.js} +11 -8
- package/dist/cli-bundle/chunks/{test-runs-QIR5MJPL.js.map → chunk-N7X4WP6L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-U3S2B7TA.js → chunk-NBFCNJ7Q.js} +206 -147
- package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GVJE5T7Q.js → chunk-NER3KUUS.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +20 -0
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +918 -0
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YPWUSH72.js → chunk-OESSOFJ4.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-YPWUSH72.js.map → chunk-OESSOFJ4.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +238 -0
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FUFFPIYA.js → chunk-OWTIRHX4.js} +28 -6
- package/dist/cli-bundle/chunks/chunk-OWTIRHX4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Z7RPDF2Y.js → chunk-P3VRG72Q.js} +10 -8
- package/dist/cli-bundle/chunks/{chunk-Z7RPDF2Y.js.map → chunk-P3VRG72Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js +1423 -0
- package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +1977 -0
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-MEZZZBYX.js → chunk-PDXT6Q55.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EJ2OCBHF.js → chunk-PJ3A56YF.js} +46 -537
- package/dist/cli-bundle/chunks/chunk-PJ3A56YF.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-MG5VIGSK.js → chunk-PPAJG4GB.js} +13 -10
- package/dist/cli-bundle/chunks/{test-runs-MG5VIGSK.js.map → chunk-PPAJG4GB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-572FKBRL.js → chunk-PPE4YUQM.js} +1725 -1663
- package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ER4ME5U2.js → chunk-QHZO65XW.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-ER4ME5U2.js.map → chunk-QHZO65XW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-T6AXEBOP.js → chunk-R3ZBLGTC.js} +9 -10
- package/dist/cli-bundle/chunks/{chunk-T6AXEBOP.js.map → chunk-R3ZBLGTC.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js +624 -0
- package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YVKZ3ANP.js → chunk-RX3HQSYG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LOWVNZBZ.js → chunk-S4APD35C.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-FH2H3CBD.js → chunk-S5AYOUT5.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-FH2H3CBD.js.map → chunk-S5AYOUT5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SYE6WMV6.js → chunk-STPSZ2XY.js} +19 -744
- package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6NYJGMTY.js → chunk-T35XLYZF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P5L7Z2O6.js → chunk-T3ABIMGW.js} +5 -3
- package/dist/cli-bundle/chunks/{chunk-P5L7Z2O6.js.map → chunk-T3ABIMGW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SU2E4AWU.js → chunk-T3F4DF23.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-SU2E4AWU.js.map → chunk-T3F4DF23.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +272 -0
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js +5354 -0
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ECU6MMTQ.js → chunk-TSPKZRRW.js} +50 -116
- package/dist/cli-bundle/chunks/chunk-TSPKZRRW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BE2SR6QL.js → chunk-TT42JUMF.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +165 -0
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RAHINBVP.js → chunk-UI5BJ6DO.js} +1339 -1277
- package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +1932 -0
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +175 -0
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-B4O5S7I3.js → chunk-VUHVWI4C.js} +13 -3
- package/dist/cli-bundle/chunks/chunk-VUHVWI4C.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-L6ODXNUM.js → chunk-VZIYHZDX.js} +11 -8
- package/dist/cli-bundle/chunks/{contracts-L6ODXNUM.js.map → chunk-VZIYHZDX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-U5TR4N7J.js → chunk-WISPVC2E.js} +9 -7
- package/dist/cli-bundle/chunks/{chunk-U5TR4N7J.js.map → chunk-WISPVC2E.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js +5434 -0
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HQAF23Q2.js → chunk-XQCG2JGW.js} +17 -749
- package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-Y76TWC45.js +550 -0
- package/dist/cli-bundle/chunks/chunk-Y76TWC45.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-L4SLHV6G.js → chunk-YD5FML7K.js} +464 -2239
- package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YSGTMDWC.js → chunk-YFIE7YK6.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-YSGTMDWC.js.map → chunk-YFIE7YK6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-WYOIIFSE.js → chunk-YMABYTNG.js} +49 -115
- package/dist/cli-bundle/chunks/chunk-YMABYTNG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SU3TB4NS.js → chunk-YOF5VPKM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WJA3PXW7.js → chunk-YPPVU5GX.js} +11 -9
- package/dist/cli-bundle/chunks/{chunk-WJA3PXW7.js.map → chunk-YPPVU5GX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GUYNUXQT.js → chunk-YQMMMONE.js} +6 -4
- package/dist/cli-bundle/chunks/{chunk-GUYNUXQT.js.map → chunk-YQMMMONE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-AIKU3IIL.js → chunk-YSAH5FY5.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-AIKU3IIL.js.map → chunk-YSAH5FY5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-KS6ATO47.js → chunk-YZIR4R3U.js} +153 -108
- package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LCWQP6NM.js → chunk-Z2CRRZYF.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-LCWQP6NM.js.map → chunk-Z2CRRZYF.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js +533 -0
- package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UMNQZS4H.js → chunk-ZCJAA3JK.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-UMNQZS4H.js.map → chunk-ZCJAA3JK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EQURFOMH.js → chunk-ZD34OFFQ.js} +5 -3
- package/dist/cli-bundle/chunks/{chunk-EQURFOMH.js.map → chunk-ZD34OFFQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-67LARBDL.js → chunk-ZJB3UV5U.js} +54 -58
- package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5E7N4T2Z.js → chunk-ZMD35NYG.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +241 -0
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{claim-5GU7OE67.js → claim-4DROPSIS.js} +30 -13
- package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-2BGBGSVI.js → claim-VX54TV5U.js} +29 -12
- package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-AFVKPR57.js → close-3YRR3XY6.js} +9 -7
- package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +16 -0
- package/dist/cli-bundle/chunks/{close-many-JKUJMHLG.js → close-many-AP4MWU36.js} +21 -18
- package/dist/cli-bundle/chunks/{close-many-JKUJMHLG.js.map → close-many-AP4MWU36.js.map} +1 -1
- package/dist/cli-bundle/chunks/{close-many-7KLOSYLP.js → close-many-OMZIGZB4.js} +19 -16
- package/dist/cli-bundle/chunks/{close-many-7KLOSYLP.js.map → close-many-OMZIGZB4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-DNWHEBOS.js → comments-MIW5MZOX.js} +12 -9
- package/dist/cli-bundle/chunks/{comments-DNWHEBOS.js.map → comments-MIW5MZOX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-RW23R3VE.js → comments-SAG5LSKL.js} +14 -11
- package/dist/cli-bundle/chunks/{comments-RW23R3VE.js.map → comments-SAG5LSKL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-AUM5WBYA.js → config-DJJKZB5R.js} +20 -17
- package/dist/cli-bundle/chunks/{config-AUM5WBYA.js.map → config-DJJKZB5R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-OZWSA2NP.js → config-V57QD47V.js} +22 -19
- package/dist/cli-bundle/chunks/{config-OZWSA2NP.js.map → config-V57QD47V.js.map} +1 -1
- package/dist/cli-bundle/chunks/{context-PKCEHQY3.js → context-4OQGIPSO.js} +15 -12
- package/dist/cli-bundle/chunks/{context-OYXRGY7S.js → context-WLA6IAWE.js} +15 -12
- package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +12 -0
- package/dist/cli-bundle/chunks/contracts-OJEXMKVW.js +16 -0
- package/dist/cli-bundle/chunks/{copy-I4NCLBR4.js → copy-LEE6P6EM.js} +17 -14
- package/dist/cli-bundle/chunks/{copy-I4NCLBR4.js.map → copy-LEE6P6EM.js.map} +2 -2
- package/dist/cli-bundle/chunks/{copy-6XOR3HKN.js → copy-OTJOWFL6.js} +18 -15
- package/dist/cli-bundle/chunks/{copy-6XOR3HKN.js.map → copy-OTJOWFL6.js.map} +1 -1
- package/dist/cli-bundle/chunks/create-WKOZKPQR.js +30 -0
- package/dist/cli-bundle/chunks/{create-PM45M6PE.js → create-XWWQFQ6S.js} +14 -12
- package/dist/cli-bundle/chunks/{delete-7YXHYG67.js → delete-62JQTYT4.js} +10 -7
- package/dist/cli-bundle/chunks/{delete-7YXHYG67.js.map → delete-62JQTYT4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{delete-LPISP43T.js → delete-HQKGRNRZ.js} +12 -9
- package/dist/cli-bundle/chunks/{delete-LPISP43T.js.map → delete-HQKGRNRZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-WATKQDE3.js → deps-55FTG6Z5.js} +12 -9
- package/dist/cli-bundle/chunks/{deps-WATKQDE3.js.map → deps-55FTG6Z5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-N2T26FME.js → deps-L2FPIAD3.js} +10 -7
- package/dist/cli-bundle/chunks/{deps-N2T26FME.js.map → deps-L2FPIAD3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-6LQ3GLM7.js → docs-6CRCSVKK.js} +11 -9
- package/dist/cli-bundle/chunks/{docs-6LQ3GLM7.js.map → docs-6CRCSVKK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-Z3X6JZLT.js → docs-S6UTOTO5.js} +9 -7
- package/dist/cli-bundle/chunks/{docs-Z3X6JZLT.js.map → docs-S6UTOTO5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-6DCLG52D.js → eval-N6UHFWVO.js} +15 -11
- package/dist/cli-bundle/chunks/{eval-6DCLG52D.js.map → eval-N6UHFWVO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-Y3ZCUTHK.js → eval-PHOTWYHI.js} +17 -13
- package/dist/cli-bundle/chunks/{eval-Y3ZCUTHK.js.map → eval-PHOTWYHI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{extension-BNINIMT7.js → extension-NBAH62ML.js} +17 -11
- package/dist/cli-bundle/chunks/{extension-QWE4YYK5.js → extension-ZF6ZZPOU.js} +17 -11
- package/dist/cli-bundle/chunks/{files-FUYPSOFJ.js → files-6P57MRKL.js} +14 -11
- package/dist/cli-bundle/chunks/files-6P57MRKL.js.map +7 -0
- package/dist/cli-bundle/chunks/{files-6SGKHS6O.js → files-JPU3FNJ7.js} +15 -12
- package/dist/cli-bundle/chunks/files-JPU3FNJ7.js.map +1 -0
- package/dist/cli-bundle/chunks/{focus-2Q3K76G2.js → focus-LFZ6IDBR.js} +15 -11
- package/dist/cli-bundle/chunks/{focus-2Q3K76G2.js.map → focus-LFZ6IDBR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-ATLBWXXD.js → focus-WNMYCVYA.js} +13 -9
- package/dist/cli-bundle/chunks/{focus-ATLBWXXD.js.map → focus-WNMYCVYA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{gc-RUYEMNRF.js → gc-AETFKZ44.js} +10 -7
- package/dist/cli-bundle/chunks/{gc-RUYEMNRF.js.map → gc-AETFKZ44.js.map} +1 -1
- package/dist/cli-bundle/chunks/{gc-TDWSDR66.js → gc-RLBP4QVN.js} +12 -9
- package/dist/cli-bundle/chunks/{gc-TDWSDR66.js.map → gc-RLBP4QVN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{get-LY6M2JIM.js → get-NH2MPBCI.js} +18 -15
- package/dist/cli-bundle/chunks/{get-LY6M2JIM.js.map → get-NH2MPBCI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{get-2WGLX74N.js → get-P4ZQXCPZ.js} +16 -13
- package/dist/cli-bundle/chunks/{get-2WGLX74N.js.map → get-P4ZQXCPZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-4RKHYS3T.js → health-3GVPMQBL.js} +36 -29
- package/dist/cli-bundle/chunks/{health-4RKHYS3T.js.map → health-3GVPMQBL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-TMFVNYRA.js → health-DNTM72GJ.js} +34 -27
- package/dist/cli-bundle/chunks/{health-TMFVNYRA.js.map → health-DNTM72GJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/history-RYKLC72X.js +20 -0
- package/dist/cli-bundle/chunks/{history-SGRRS72R.js → history-SGPYRAFT.js} +10 -8
- package/dist/cli-bundle/chunks/{history-compact-LOED43R3.js → history-compact-3F6VELO7.js} +26 -30
- package/dist/cli-bundle/chunks/history-compact-3F6VELO7.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-compact-V5DNAQHH.js → history-compact-656Y2TN4.js} +27 -31
- package/dist/cli-bundle/chunks/history-compact-656Y2TN4.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-IRL7WJ3E.js → history-redact-54ICFKXM.js} +11 -9
- package/dist/cli-bundle/chunks/{history-repair-PGYQJMGD.js → history-repair-4N6SDVHK.js} +25 -30
- package/dist/cli-bundle/chunks/history-repair-4N6SDVHK.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-repair-4WVBVHFR.js → history-repair-EVTO6LIH.js} +26 -31
- package/dist/cli-bundle/chunks/history-repair-EVTO6LIH.js.map +1 -0
- package/dist/cli-bundle/chunks/init-RPIPQUNV.js +32 -0
- package/dist/cli-bundle/chunks/init-SKQAESQS.js +28 -0
- package/dist/cli-bundle/chunks/{learnings-4FJY7WIW.js → learnings-2HTPZNGZ.js} +10 -8
- package/dist/cli-bundle/chunks/{learnings-4FJY7WIW.js.map → learnings-2HTPZNGZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{learnings-4BHWFFUV.js → learnings-YBIHY3D6.js} +12 -10
- package/dist/cli-bundle/chunks/{learnings-4BHWFFUV.js.map → learnings-YBIHY3D6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{list-472TIOVK.js → list-64LHZ3HM.js} +10 -8
- package/dist/cli-bundle/chunks/{list-D7BF5CL2.js → list-7LXBTEKI.js} +10 -8
- package/dist/cli-bundle/chunks/{next-SFQZVX2B.js → next-7ODPAQ4U.js} +22 -18
- package/dist/cli-bundle/chunks/{next-SFQZVX2B.js.map → next-7ODPAQ4U.js.map} +1 -1
- package/dist/cli-bundle/chunks/{next-D5STGWI2.js → next-ODJUM4ZM.js} +24 -20
- package/dist/cli-bundle/chunks/{next-D5STGWI2.js.map → next-ODJUM4ZM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-6KNOSLIT.js → notes-72YXN5JX.js} +10 -8
- package/dist/cli-bundle/chunks/{notes-6KNOSLIT.js.map → notes-72YXN5JX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-W4UEICGF.js → notes-NJ7IQJX4.js} +12 -10
- package/dist/cli-bundle/chunks/{notes-W4UEICGF.js.map → notes-NJ7IQJX4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-MJQW5XK3.js → plan-R4NDQ27E.js} +18 -15
- package/dist/cli-bundle/chunks/{plan-MJQW5XK3.js.map → plan-R4NDQ27E.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-JO6V7BXO.js → plan-XWY5T67S.js} +20 -17
- package/dist/cli-bundle/chunks/{plan-JO6V7BXO.js.map → plan-XWY5T67S.js.map} +1 -1
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +397 -0
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +1 -0
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +400 -0
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-ELBHCCFI.js → register-list-query-5H66WFYF.js} +24 -21
- package/dist/cli-bundle/chunks/register-list-query-5H66WFYF.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-GAPQ6DM3.js → register-list-query-FB3FNDLZ.js} +25 -22
- package/dist/cli-bundle/chunks/{register-list-query-ELBHCCFI.js.map → register-list-query-FB3FNDLZ.js.map} +1 -7
- package/dist/cli-bundle/chunks/{register-mutation-SJWMVIJ2.js → register-mutation-UJO23C7R.js} +42 -39
- package/dist/cli-bundle/chunks/{register-mutation-SJWMVIJ2.js.map → register-mutation-UJO23C7R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-ROFE2YPC.js → register-mutation-Z2ETYHKS.js} +40 -37
- package/dist/cli-bundle/chunks/{register-mutation-ROFE2YPC.js.map → register-mutation-Z2ETYHKS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-MEKU3AKC.js → register-operations-A3XAM5J7.js} +39 -36
- package/dist/cli-bundle/chunks/{register-operations-MEKU3AKC.js.map → register-operations-A3XAM5J7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-IADFVH53.js → register-operations-SG7HBSUP.js} +37 -34
- package/dist/cli-bundle/chunks/{register-operations-IADFVH53.js.map → register-operations-SG7HBSUP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-AJWUSSQX.js → register-setup-I45OGJUV.js} +25 -19
- package/dist/cli-bundle/chunks/{register-setup-AJWUSSQX.js.map → register-setup-I45OGJUV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-3QJY43CY.js → register-setup-K6U3NVY5.js} +23 -17
- package/dist/cli-bundle/chunks/{register-setup-3QJY43CY.js.map → register-setup-K6U3NVY5.js.map} +1 -1
- package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +19 -0
- package/dist/cli-bundle/chunks/{restore-44IHMMZZ.js → restore-YJ2ET6AT.js} +11 -9
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-TSBK4AY5.js → scheduling-shortcuts-SSC4MYWQ.js} +14 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-TSBK4AY5.js.map → scheduling-shortcuts-SSC4MYWQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js → scheduling-shortcuts-ULRG7MNP.js} +16 -14
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js.map → scheduling-shortcuts-ULRG7MNP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{schema-VBCELP5G.js → schema-2PUXCZ25.js} +10 -7
- package/dist/cli-bundle/chunks/{schema-IB2NZZWD.js → schema-Y6DXXK2F.js} +10 -7
- package/dist/cli-bundle/chunks/{search-7UBETML4.js → search-3S72CTD6.js} +13 -10
- package/dist/cli-bundle/chunks/{search-R227JOL6.js → search-WNUNBQXO.js} +13 -10
- package/dist/cli-bundle/chunks/{stats-FAG7COEH.js → stats-IJYTRQGV.js} +13 -10
- package/dist/cli-bundle/chunks/{stats-FAG7COEH.js.map → stats-IJYTRQGV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{stats-MCK7PLYS.js → stats-L2D5Y2O5.js} +15 -12
- package/dist/cli-bundle/chunks/{stats-MCK7PLYS.js.map → stats-L2D5Y2O5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{telemetry-DRPDZMAO.js → telemetry-L2CVOKVN.js} +11 -8
- package/dist/cli-bundle/chunks/{telemetry-DRPDZMAO.js.map → telemetry-L2CVOKVN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{telemetry-GVVUQSJQ.js → telemetry-QBYWQA76.js} +13 -10
- package/dist/cli-bundle/chunks/{telemetry-GVVUQSJQ.js.map → telemetry-QBYWQA76.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-QY44WAMR.js → test-DQ2QFJ7W.js} +21 -15
- package/dist/cli-bundle/chunks/test-W7QBLVJS.js +41 -0
- package/dist/cli-bundle/chunks/{test-all-USPJHXFR.js → test-all-636NTRTT.js} +26 -19
- package/dist/cli-bundle/chunks/{test-all-USPJHXFR.js.map → test-all-636NTRTT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-QD6QAEG7.js → test-all-DWYK3RG6.js} +24 -17
- package/dist/cli-bundle/chunks/{test-all-QD6QAEG7.js.map → test-all-DWYK3RG6.js.map} +1 -1
- package/dist/cli-bundle/chunks/test-runs-245OINZR.js +28 -0
- package/dist/cli-bundle/chunks/test-runs-245OINZR.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +24 -0
- package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js.map +7 -0
- package/dist/cli-bundle/chunks/update-SFLZPJXX.js +30 -0
- package/dist/cli-bundle/chunks/update-SFLZPJXX.js.map +1 -0
- package/dist/cli-bundle/chunks/update-SJZ6S77U.js +26 -0
- package/dist/cli-bundle/chunks/update-SJZ6S77U.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-many-RATAARHU.js → update-many-DC7X3EWM.js} +32 -29
- package/dist/cli-bundle/chunks/{update-many-RATAARHU.js.map → update-many-DC7X3EWM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{update-many-BEMTDA2X.js → update-many-SLLAMHT7.js} +34 -31
- package/dist/cli-bundle/chunks/{update-many-BEMTDA2X.js.map → update-many-SLLAMHT7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-VU46BLJZ.js → upgrade-HFFXLZJA.js} +19 -12
- package/dist/cli-bundle/chunks/{upgrade-VU46BLJZ.js.map → upgrade-HFFXLZJA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-NWMR3VQL.js → upgrade-UYQKM7RF.js} +21 -14
- package/dist/cli-bundle/chunks/{upgrade-NWMR3VQL.js.map → upgrade-UYQKM7RF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-NRY6MFXN.js → validate-PA4FDTOV.js} +35 -28
- package/dist/cli-bundle/chunks/validate-PA4FDTOV.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-GAJ6FUSI.js → validate-Z7L75YEJ.js} +35 -28
- package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js.map +1 -0
- package/dist/cli-bundle/main.js +173 -57
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +247 -0
- package/dist/cli-bundle/sdk-runtime.js.map +7 -0
- package/dist/cli-bundle/sdk-testing.js +101 -0
- package/dist/cli-bundle/sdk-testing.js.map +7 -0
- package/dist/cli-bundle/sdk.js +787 -0
- package/dist/cli-bundle/sdk.js.map +7 -0
- package/dist/core/config/nested-settings.d.ts +4 -3
- package/dist/core/config/nested-settings.js +17 -6
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/extensions/activation-summary.d.ts +6 -0
- package/dist/core/extensions/activation-summary.js +10 -4
- package/dist/core/extensions/activation-summary.js.map +1 -1
- package/dist/core/extensions/capability-usage.d.ts +6 -0
- package/dist/core/extensions/capability-usage.js +10 -4
- package/dist/core/extensions/capability-usage.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +6 -2
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +3 -0
- package/dist/core/extensions/loader.js +11 -19
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/history-rewrite.d.ts +10 -0
- package/dist/core/history/history-rewrite.js +28 -4
- package/dist/core/history/history-rewrite.js.map +1 -1
- package/dist/core/item/parent-reference-policy.d.ts +9 -1
- package/dist/core/item/parent-reference-policy.js +28 -4
- package/dist/core/item/parent-reference-policy.js.map +1 -1
- package/dist/core/item/type-registry.d.ts +1 -0
- package/dist/core/item/type-registry.js +153 -177
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/lock/lock.d.ts +28 -1
- package/dist/core/lock/lock.js +254 -20
- package/dist/core/lock/lock.js.map +1 -1
- package/dist/core/search/background-refresh.js +7 -19
- package/dist/core/search/background-refresh.js.map +1 -1
- package/dist/core/search/http-client.d.ts +0 -1
- package/dist/core/search/http-client.js +3 -3
- package/dist/core/search/http-client.js.map +1 -1
- package/dist/core/shared/constants.js +3 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.d.ts +1 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/primitives.d.ts +12 -0
- package/dist/core/shared/primitives.js +29 -2
- package/dist/core/shared/primitives.js.map +1 -1
- package/dist/core/store/item-store.js +3 -3
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +1 -0
- package/dist/core/store/settings-validator.js +6 -3
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +3 -3
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/validate/fix-planning.d.ts +0 -2
- package/dist/core/validate/fix-planning.js +3 -3
- package/dist/core/validate/fix-planning.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +3 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +55 -94
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/errors.d.ts +21 -2
- package/dist/sdk/errors.js +8 -2
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/package-import-adapters.d.ts +90 -2
- package/dist/sdk/package-import-adapters.js +275 -3
- package/dist/sdk/package-import-adapters.js.map +1 -1
- package/dist/sdk/runtime.d.ts +1 -1
- package/dist/sdk/runtime.js +3 -3
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/testing.js +41 -19
- package/dist/sdk/testing.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/ARCHITECTURE.md +27 -0
- package/docs/CONFIGURATION.md +3 -0
- package/docs/README.md +1 -0
- package/docs/SDK_PRIMITIVE_INVENTORY.md +55 -0
- package/docs/TESTING.md +5 -1
- package/docs/examples/ci/github-actions-pm-extension-gate.yml +5 -5
- package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +1 -1
- package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +1 -1
- package/package.json +14 -26
- package/packages/pm-beads/extensions/beads/package.json +3 -0
- package/packages/pm-beads/extensions/beads/runtime-loader.ts +50 -41
- package/packages/pm-beads/extensions/beads/runtime.ts +106 -223
- package/packages/pm-calendar/extensions/calendar/package.json +3 -0
- package/packages/pm-calendar/extensions/calendar/runtime.ts +21 -18
- package/packages/pm-command-kit/extensions/command-kit/package.json +3 -0
- package/packages/pm-governance-audit/extensions/governance-audit/package.json +3 -0
- package/packages/pm-guide-shell/extensions/guide-shell/package.json +3 -0
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +9 -11
- package/packages/pm-kanban/extensions/kanban/package.json +3 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/package.json +3 -0
- package/packages/pm-search-advanced/extensions/search-advanced/package.json +3 -0
- package/packages/pm-templates/extensions/templates/package.json +3 -0
- package/packages/pm-todos/extensions/todos/package.json +3 -0
- package/packages/pm-todos/extensions/todos/runtime-loader.ts +62 -72
- package/packages/pm-todos/extensions/todos/runtime.ts +61 -257
- package/plugins/pm-claude/scripts/pm-mcp-server.mjs +73 -31
- package/plugins/pm-codex/scripts/pm-mcp-server.mjs +80 -34
- package/scripts/bundle-cli.mjs +12 -2
- package/scripts/install.ps1 +7 -7
- package/dist/cli-bundle/chunks/activity-BIML7K2D.js +0 -16
- package/dist/cli-bundle/chunks/chunk-32IUNTG4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4EXFFP7T.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4WB6S4YX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-572FKBRL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-67LARBDL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6CDCWKSX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6KRFL33E.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AJHYQCBJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B4O5S7I3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CXR3CMBQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ECU6MMTQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EJ2OCBHF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ERG65A2L.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FUFFPIYA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HB4FAT3O.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HQAF23Q2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JPATY4SE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KHVGM5CS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KS6ATO47.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-L4SLHV6G.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MHRS5FUX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NZ7QIUP5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OGLGI22K.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RAHINBVP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RJH5VQHW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SYE6WMV6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TQ6AX5SQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-U3S2B7TA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WRYERRZX.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WYOIIFSE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XRYSCRZR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YF746GTH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YSDFIY7N.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-Z4DGFQDH.js.map +0 -1
- package/dist/cli-bundle/chunks/claim-2BGBGSVI.js.map +0 -7
- package/dist/cli-bundle/chunks/claim-5GU7OE67.js.map +0 -1
- package/dist/cli-bundle/chunks/close-6YODBUIV.js +0 -14
- package/dist/cli-bundle/chunks/create-Z7YCH3BE.js +0 -28
- package/dist/cli-bundle/chunks/files-6SGKHS6O.js.map +0 -1
- package/dist/cli-bundle/chunks/files-FUYPSOFJ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-CGNQJXFE.js +0 -18
- package/dist/cli-bundle/chunks/history-compact-LOED43R3.js.map +0 -7
- package/dist/cli-bundle/chunks/history-compact-V5DNAQHH.js.map +0 -1
- package/dist/cli-bundle/chunks/history-redact-N3JK7VBW.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-4WVBVHFR.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-PGYQJMGD.js.map +0 -7
- package/dist/cli-bundle/chunks/init-4GESW7RM.js +0 -26
- package/dist/cli-bundle/chunks/init-XIDPABA4.js +0 -22
- package/dist/cli-bundle/chunks/profile-3TOTMUR4.js +0 -1243
- package/dist/cli-bundle/chunks/profile-3TOTMUR4.js.map +0 -7
- package/dist/cli-bundle/chunks/profile-WIQY2KCV.js +0 -1205
- package/dist/cli-bundle/chunks/profile-WIQY2KCV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-EXHU34EU.js +0 -17
- package/dist/cli-bundle/chunks/test-SY76DZTO.js +0 -35
- package/dist/cli-bundle/chunks/update-A7EICML6.js +0 -24
- package/dist/cli-bundle/chunks/update-IKJZWLQC.js +0 -28
- package/dist/cli-bundle/chunks/validate-GAJ6FUSI.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-NRY6MFXN.js.map +0 -7
- /package/dist/cli-bundle/chunks/{activity-BIML7K2D.js.map → activity-4XQIDNM5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-5YWLSPGE.js.map → activity-YKAKZTZ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QCDTQCMW.js.map → chunk-5JE6SMYS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5JIWFWOZ.js.map → chunk-N6DNM2FA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GVJE5T7Q.js.map → chunk-NER3KUUS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MEZZZBYX.js.map → chunk-PDXT6Q55.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YVKZ3ANP.js.map → chunk-RX3HQSYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LOWVNZBZ.js.map → chunk-S4APD35C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6NYJGMTY.js.map → chunk-T35XLYZF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BE2SR6QL.js.map → chunk-TT42JUMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SU3TB4NS.js.map → chunk-YOF5VPKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5E7N4T2Z.js.map → chunk-ZMD35NYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-AFVKPR57.js.map → close-3YRR3XY6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-6YODBUIV.js.map → close-OB2Y4QP5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-PKCEHQY3.js.map → context-4OQGIPSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-OYXRGY7S.js.map → context-WLA6IAWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-Z7YCH3BE.js.map → contracts-HXJLKCRI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-PM45M6PE.js.map → contracts-OJEXMKVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-BNINIMT7.js.map → create-WKOZKPQR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-QWE4YYK5.js.map → create-XWWQFQ6S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-CGNQJXFE.js.map → extension-NBAH62ML.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-SGRRS72R.js.map → extension-ZF6ZZPOU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-N3JK7VBW.js.map → history-RYKLC72X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-IRL7WJ3E.js.map → history-SGPYRAFT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-XIDPABA4.js.map → history-redact-4H3FCKF3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-4GESW7RM.js.map → history-redact-54ICFKXM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-D7BF5CL2.js.map → init-RPIPQUNV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-472TIOVK.js.map → init-SKQAESQS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-EXHU34EU.js.map → list-64LHZ3HM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-44IHMMZZ.js.map → list-7LXBTEKI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-VBCELP5G.js.map → restore-PXOFL6AM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-IB2NZZWD.js.map → restore-YJ2ET6AT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-R227JOL6.js.map → schema-2PUXCZ25.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-7UBETML4.js.map → schema-Y6DXXK2F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-QY44WAMR.js.map → search-3S72CTD6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-SY76DZTO.js.map → search-WNUNBQXO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-IKJZWLQC.js.map → test-DQ2QFJ7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-A7EICML6.js.map → test-W7QBLVJS.js.map} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm init agent guidance command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7987916d-4294-5753-925d-ceb787be0783")}catch(e){}}();
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import readline from "node:readline/promises";
|
|
@@ -31,6 +31,7 @@ const AGENT_GUIDANCE_TEMPLATE_VERSION = 1;
|
|
|
31
31
|
const AGENT_GUIDANCE_START_MARKER_PREFIX = "<!-- pm-cli:agent-guidance:start:";
|
|
32
32
|
const AGENT_GUIDANCE_START_MARKER = `<!-- pm-cli:agent-guidance:start:v${AGENT_GUIDANCE_TEMPLATE_VERSION} -->`;
|
|
33
33
|
const AGENT_GUIDANCE_END_MARKER = "<!-- pm-cli:agent-guidance:end -->";
|
|
34
|
+
const AGENT_GUIDANCE_ADD_LATER_HINT = "Add workflow guidance later: pm init --agent-guidance add";
|
|
34
35
|
export const _testOnly = {
|
|
35
36
|
toPortableRelativePath,
|
|
36
37
|
ensureTrailingNewline,
|
|
@@ -260,125 +261,160 @@ function buildInitAgentGuidanceSummary(params) {
|
|
|
260
261
|
async function refreshGuidanceScansAfterApply(applied, scans, projectRoot) {
|
|
261
262
|
return applied ? await scanGuidanceFiles(projectRoot) : scans;
|
|
262
263
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
const projectRoot = resolveProjectRoot(options.pm_root, options.cwd);
|
|
270
|
-
let scans = await scanGuidanceFiles(projectRoot);
|
|
271
|
-
const targetPath = resolveTargetGuidancePath(scans, projectRoot);
|
|
272
|
-
const targetRelativePath = toPortableRelativePath(projectRoot, targetPath);
|
|
273
|
-
const addLaterHint = "Add workflow guidance later: pm init --agent-guidance add";
|
|
274
|
-
let prompted = false;
|
|
275
|
-
let applied = false;
|
|
276
|
-
let skipped = false;
|
|
277
|
-
let state = normalizeAgentGuidanceState(options.settings);
|
|
278
|
-
const checkedFiles = scans.map((entry) => toPortableRelativePath(projectRoot, entry.file_path));
|
|
279
|
-
const presentBefore = scans.some((entry) => entry.has_guidance);
|
|
280
|
-
const markState = (partial) => {
|
|
281
|
-
state = {
|
|
282
|
-
...state,
|
|
283
|
-
...partial,
|
|
284
|
-
template_version: AGENT_GUIDANCE_TEMPLATE_VERSION,
|
|
285
|
-
last_checked_files: checkedFiles,
|
|
286
|
-
};
|
|
264
|
+
function markAgentGuidanceRunState(flow, checkedFiles, partial) {
|
|
265
|
+
flow.state = {
|
|
266
|
+
...flow.state,
|
|
267
|
+
...partial,
|
|
268
|
+
template_version: AGENT_GUIDANCE_TEMPLATE_VERSION,
|
|
269
|
+
last_checked_files: checkedFiles,
|
|
287
270
|
};
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
271
|
+
}
|
|
272
|
+
async function addAgentGuidanceBlockIfMissing(flow, context) {
|
|
273
|
+
if (context.presentBefore) {
|
|
274
|
+
return;
|
|
293
275
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
276
|
+
const writeResult = await writeGuidanceFile(context.targetPath);
|
|
277
|
+
flow.warnings.push(...writeResult.warnings);
|
|
278
|
+
if (writeResult.changed) {
|
|
279
|
+
flow.applied = true;
|
|
280
|
+
flow.warnings.push(`agent_guidance:added:${context.targetRelativePath}`);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
function handleAgentGuidanceStatusMode(flow, presentBefore) {
|
|
284
|
+
if (!presentBefore) {
|
|
285
|
+
flow.warnings.push("agent_guidance:missing");
|
|
286
|
+
pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
function handleAgentGuidanceSkipMode(flow, checkedFiles) {
|
|
290
|
+
flow.skipped = true;
|
|
291
|
+
markAgentGuidanceRunState(flow, checkedFiles, {
|
|
292
|
+
prompt_completed: true,
|
|
293
|
+
declined: true,
|
|
294
|
+
declined_at: flow.state.declined_at || new Date().toISOString(),
|
|
295
|
+
});
|
|
296
|
+
flow.warnings.push("agent_guidance:explicit_skip");
|
|
297
|
+
pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);
|
|
298
|
+
}
|
|
299
|
+
async function handleAgentGuidanceAddMode(flow, context) {
|
|
300
|
+
await addAgentGuidanceBlockIfMissing(flow, context);
|
|
301
|
+
markAgentGuidanceRunState(flow, context.checkedFiles, {
|
|
302
|
+
prompt_completed: true,
|
|
303
|
+
declined: false,
|
|
304
|
+
declined_at: "",
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
function handlePresentAgentGuidance(flow, checkedFiles) {
|
|
308
|
+
if (flow.state.declined) {
|
|
309
|
+
markAgentGuidanceRunState(flow, checkedFiles, {
|
|
297
310
|
prompt_completed: true,
|
|
298
|
-
declined:
|
|
299
|
-
declined_at:
|
|
311
|
+
declined: false,
|
|
312
|
+
declined_at: "",
|
|
300
313
|
});
|
|
301
|
-
warnings.push("agent_guidance:explicit_skip");
|
|
302
|
-
pushUnique(nextSteps, addLaterHint);
|
|
303
314
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
315
|
+
}
|
|
316
|
+
function handleDeclinedAgentGuidance(flow) {
|
|
317
|
+
flow.skipped = true;
|
|
318
|
+
flow.warnings.push("agent_guidance:skipped_declined");
|
|
319
|
+
pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);
|
|
320
|
+
}
|
|
321
|
+
async function handleInteractiveAgentGuidancePrompt(flow, context) {
|
|
322
|
+
flow.prompted = true;
|
|
323
|
+
const approved = await promptForGuidanceWrite(context.targetRelativePath);
|
|
324
|
+
if (approved) {
|
|
325
|
+
await addAgentGuidanceBlockIfMissing(flow, context);
|
|
326
|
+
markAgentGuidanceRunState(flow, context.checkedFiles, {
|
|
314
327
|
prompt_completed: true,
|
|
315
328
|
declined: false,
|
|
316
329
|
declined_at: "",
|
|
317
330
|
});
|
|
331
|
+
return;
|
|
318
332
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
333
|
+
flow.skipped = true;
|
|
334
|
+
markAgentGuidanceRunState(flow, context.checkedFiles, {
|
|
335
|
+
prompt_completed: true,
|
|
336
|
+
declined: true,
|
|
337
|
+
declined_at: new Date().toISOString(),
|
|
338
|
+
});
|
|
339
|
+
flow.warnings.push("agent_guidance:declined");
|
|
340
|
+
pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);
|
|
341
|
+
}
|
|
342
|
+
function handleNonInteractiveMissingAgentGuidance(flow) {
|
|
343
|
+
flow.warnings.push("agent_guidance:missing_non_interactive");
|
|
344
|
+
pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);
|
|
345
|
+
}
|
|
346
|
+
async function applyAgentGuidanceMode(initialState, context) {
|
|
347
|
+
const flow = {
|
|
348
|
+
warnings: [],
|
|
349
|
+
nextSteps: [],
|
|
350
|
+
prompted: false,
|
|
351
|
+
applied: false,
|
|
352
|
+
skipped: false,
|
|
353
|
+
state: initialState,
|
|
354
|
+
};
|
|
355
|
+
if (context.mode === "status") {
|
|
356
|
+
handleAgentGuidanceStatusMode(flow, context.presentBefore);
|
|
357
|
+
return flow;
|
|
327
358
|
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
pushUnique(nextSteps, addLaterHint);
|
|
359
|
+
if (context.mode === "skip") {
|
|
360
|
+
handleAgentGuidanceSkipMode(flow, context.checkedFiles);
|
|
361
|
+
return flow;
|
|
332
362
|
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
if (approved) {
|
|
337
|
-
const writeResult = await writeGuidanceFile(targetPath);
|
|
338
|
-
warnings.push(...writeResult.warnings);
|
|
339
|
-
if (writeResult.changed) {
|
|
340
|
-
applied = true;
|
|
341
|
-
warnings.push(`agent_guidance:added:${targetRelativePath}`);
|
|
342
|
-
}
|
|
343
|
-
markState({
|
|
344
|
-
prompt_completed: true,
|
|
345
|
-
declined: false,
|
|
346
|
-
declined_at: "",
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
else {
|
|
350
|
-
skipped = true;
|
|
351
|
-
markState({
|
|
352
|
-
prompt_completed: true,
|
|
353
|
-
declined: true,
|
|
354
|
-
declined_at: new Date().toISOString(),
|
|
355
|
-
});
|
|
356
|
-
warnings.push("agent_guidance:declined");
|
|
357
|
-
pushUnique(nextSteps, addLaterHint);
|
|
358
|
-
}
|
|
363
|
+
if (context.mode === "add") {
|
|
364
|
+
await handleAgentGuidanceAddMode(flow, context);
|
|
365
|
+
return flow;
|
|
359
366
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
367
|
+
if (context.presentBefore) {
|
|
368
|
+
handlePresentAgentGuidance(flow, context.checkedFiles);
|
|
369
|
+
return flow;
|
|
363
370
|
}
|
|
364
|
-
|
|
365
|
-
|
|
371
|
+
if (flow.state.prompt_completed && flow.state.declined) {
|
|
372
|
+
handleDeclinedAgentGuidance(flow);
|
|
373
|
+
return flow;
|
|
374
|
+
}
|
|
375
|
+
if (context.interactive) {
|
|
376
|
+
await handleInteractiveAgentGuidancePrompt(flow, context);
|
|
377
|
+
return flow;
|
|
378
|
+
}
|
|
379
|
+
handleNonInteractiveMissingAgentGuidance(flow);
|
|
380
|
+
return flow;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Implements run init agent guidance for the public runtime surface of this module.
|
|
384
|
+
*/
|
|
385
|
+
export async function runInitAgentGuidance(options) {
|
|
386
|
+
const projectRoot = resolveProjectRoot(options.pm_root, options.cwd);
|
|
387
|
+
let scans = await scanGuidanceFiles(projectRoot);
|
|
388
|
+
const targetPath = resolveTargetGuidancePath(scans, projectRoot);
|
|
389
|
+
const targetRelativePath = toPortableRelativePath(projectRoot, targetPath);
|
|
390
|
+
const checkedFiles = scans.map((entry) => toPortableRelativePath(projectRoot, entry.file_path));
|
|
391
|
+
const presentBefore = scans.some((entry) => entry.has_guidance);
|
|
392
|
+
const flow = await applyAgentGuidanceMode(normalizeAgentGuidanceState(options.settings), {
|
|
393
|
+
mode: options.mode,
|
|
394
|
+
interactive: options.interactive,
|
|
395
|
+
targetPath,
|
|
396
|
+
targetRelativePath,
|
|
397
|
+
checkedFiles,
|
|
398
|
+
presentBefore,
|
|
399
|
+
});
|
|
400
|
+
const stateUpdate = applyAgentGuidanceState(options.settings, flow.state);
|
|
401
|
+
scans = await refreshGuidanceScansAfterApply(flow.applied, scans, projectRoot);
|
|
366
402
|
const summary = buildInitAgentGuidanceSummary({
|
|
367
403
|
mode: options.mode,
|
|
368
404
|
scans,
|
|
369
405
|
projectRoot,
|
|
370
406
|
targetRelativePath,
|
|
371
|
-
prompted,
|
|
372
|
-
applied,
|
|
373
|
-
skipped,
|
|
374
|
-
state,
|
|
407
|
+
prompted: flow.prompted,
|
|
408
|
+
applied: flow.applied,
|
|
409
|
+
skipped: flow.skipped,
|
|
410
|
+
state: flow.state,
|
|
375
411
|
});
|
|
376
412
|
return {
|
|
377
413
|
summary,
|
|
378
|
-
warnings,
|
|
379
|
-
next_steps: nextSteps,
|
|
414
|
+
warnings: flow.warnings,
|
|
415
|
+
next_steps: flow.nextSteps,
|
|
380
416
|
settings_changed: stateUpdate.changed,
|
|
381
417
|
};
|
|
382
418
|
}
|
|
383
419
|
//# sourceMappingURL=init-agent-guidance.js.map
|
|
384
|
-
//# debugId=
|
|
420
|
+
//# debugId=7987916d-4294-5753-925d-ceb787be0783
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-agent-guidance.js","sources":["cli/commands/init-agent-guidance.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/init-agent-guidance\n *\n * Implements the pm init agent guidance command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport readline from \"node:readline/promises\";\nimport { stdin as input, stdout as output } from \"node:process\";\nimport { runActiveOnWriteHooks } from \"../../core/extensions/index.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport type { PmSettings } from \"../../types/index.js\";\n\n/**\n * Restricts init agent guidance mode values accepted by command, SDK, and storage contracts.\n */\nexport type InitAgentGuidanceMode = \"ask\" | \"add\" | \"skip\" | \"status\";\n\nexport const INIT_AGENT_GUIDANCE_MODE_VALUES: InitAgentGuidanceMode[] = [\"ask\", \"add\", \"skip\", \"status\"];\n\nconst AGENT_GUIDANCE_TARGET_FILENAMES = [\"AGENTS.md\", \"CLAUDE.md\"] as const;\nconst AGENT_GUIDANCE_REQUIRED_TOKENS = [\n \"pm init\",\n \"pm context\",\n \"pm search\",\n \"pm create\",\n \"pm claim\",\n \"pm files\",\n \"pm docs\",\n \"pm test --run\",\n \"pm close\",\n \"pm release\",\n \"pm_author\",\n] as const;\nconst AGENT_GUIDANCE_REQUIRED_TOKEN_THRESHOLD = 8;\nconst AGENT_GUIDANCE_TEMPLATE_VERSION = 1;\nconst AGENT_GUIDANCE_START_MARKER_PREFIX = \"<!-- pm-cli:agent-guidance:start:\";\nconst AGENT_GUIDANCE_START_MARKER = `<!-- pm-cli:agent-guidance:start:v${AGENT_GUIDANCE_TEMPLATE_VERSION} -->`;\nconst AGENT_GUIDANCE_END_MARKER = \"<!-- pm-cli:agent-guidance:end -->\";\n\nexport const _testOnly = {\n toPortableRelativePath,\n ensureTrailingNewline,\n detectLineEnding,\n findGuidanceBlockRange,\n buildAgentGuidanceBlock,\n upsertAgentGuidanceBlock,\n resolveProjectRoot,\n resolveTargetGuidancePath,\n parsePromptChoice,\n pushUnique,\n promptForGuidanceWrite,\n normalizeAgentGuidanceState,\n applyAgentGuidanceState,\n writeGuidanceFile,\n setAgentGuidanceReadlineFactoryForTests,\n};\n\ntype AgentGuidanceReadlineInterface = ReturnType<typeof readline.createInterface>;\nlet createAgentGuidanceReadlineInterface = (): AgentGuidanceReadlineInterface => readline.createInterface({ input, output });\n\nfunction setAgentGuidanceReadlineFactoryForTests(factory: (() => AgentGuidanceReadlineInterface) | undefined): void {\n createAgentGuidanceReadlineInterface = factory ?? (() => readline.createInterface({ input, output }));\n}\n\ninterface AgentGuidanceFileScan {\n file_path: string;\n exists: boolean;\n has_guidance: boolean;\n has_marker: boolean;\n}\n\ninterface AgentGuidanceBlockRange {\n start_index: number;\n end_index: number;\n}\n\n/**\n * Documents the init agent guidance summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface InitAgentGuidanceSummary {\n mode: InitAgentGuidanceMode;\n present: boolean;\n prompted: boolean;\n applied: boolean;\n skipped: boolean;\n declined: boolean;\n prompt_completed: boolean;\n template_version: number;\n target_file: string;\n checked_files: string[];\n files_with_guidance: string[];\n missing_files: string[];\n}\n\n/**\n * Documents the run init agent guidance options payload exchanged by command, SDK, and package integrations.\n */\nexport interface RunInitAgentGuidanceOptions {\n pm_root: string;\n cwd: string;\n mode: InitAgentGuidanceMode;\n interactive: boolean;\n settings: PmSettings;\n}\n\n/**\n * Documents the run init agent guidance result payload exchanged by command, SDK, and package integrations.\n */\nexport interface RunInitAgentGuidanceResult {\n summary: InitAgentGuidanceSummary;\n warnings: string[];\n next_steps: string[];\n settings_changed: boolean;\n}\n\nfunction toPortableRelativePath(projectRoot: string, targetPath: string): string {\n const relative = path.relative(projectRoot, targetPath);\n if (relative.length === 0) {\n return path.basename(targetPath);\n }\n return relative.split(path.sep).join(\"/\");\n}\n\nfunction ensureTrailingNewline(value: string): string {\n return value.endsWith(\"\\n\") ? value : `${value}\\n`;\n}\n\nfunction detectLineEnding(value: string): \"\\n\" | \"\\r\\n\" {\n return value.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n}\n\nfunction findGuidanceBlockRange(content: string): AgentGuidanceBlockRange | null {\n const startIndex = content.indexOf(AGENT_GUIDANCE_START_MARKER_PREFIX);\n if (startIndex === -1) {\n return null;\n }\n const endMarkerIndex = content.indexOf(AGENT_GUIDANCE_END_MARKER, startIndex);\n if (endMarkerIndex === -1) {\n return null;\n }\n return {\n start_index: startIndex,\n end_index: endMarkerIndex + AGENT_GUIDANCE_END_MARKER.length,\n };\n}\n\nfunction hasGuidanceMarker(content: string): boolean {\n return findGuidanceBlockRange(content) !== null;\n}\n\nfunction buildAgentGuidanceBlock(lineEnding: \"\\n\" | \"\\r\\n\"): string {\n const lines = [\n AGENT_GUIDANCE_START_MARKER,\n \"## pm Workflow (Agent Quickstart)\",\n \"\",\n \"- Orient before mutate: `pm context --limit 10`, `pm search \\\"<keywords>\\\" --limit 10`, `pm list-open --limit 20`.\",\n \"- Claim and execute: `pm claim <id>` then `pm update <id> --status in_progress`.\",\n \"- Link evidence while coding: `pm files <id> --add ...`, `pm docs <id> --add ...`, `pm test <id> --add command=\\\"node scripts/run-tests.mjs test -- ...\\\"`.\",\n \"- Verify and close: `pm test <id> --run --progress`, `pm close <id> \\\"<evidence>\\\" --validate-close warn`, `pm release <id>`.\",\n \"- Set `PM_AUTHOR=<stable-agent-id>` before mutation commands.\",\n \"\",\n AGENT_GUIDANCE_END_MARKER,\n \"\",\n ];\n return lines.join(lineEnding);\n}\n\nfunction upsertAgentGuidanceBlock(existingContent: string): { next_content: string; changed: boolean } {\n const lineEnding = detectLineEnding(existingContent);\n const nextBlock = buildAgentGuidanceBlock(lineEnding);\n const existingRange = findGuidanceBlockRange(existingContent);\n if (existingRange) {\n const trailingContent = existingContent.slice(existingRange.end_index);\n const normalizedTrailingContent = trailingContent.startsWith(\"\\r\\n\")\n ? trailingContent.slice(2)\n : trailingContent.startsWith(\"\\n\")\n ? trailingContent.slice(1)\n : trailingContent;\n const nextContent = ensureTrailingNewline(\n `${existingContent.slice(0, existingRange.start_index)}${nextBlock}${normalizedTrailingContent}`,\n );\n return {\n next_content: nextContent,\n changed: nextContent !== existingContent,\n };\n }\n const separator = existingContent.length === 0 ? \"\" : existingContent.endsWith(\"\\n\") ? \"\\n\" : \"\\n\\n\";\n const nextContent = ensureTrailingNewline(`${existingContent}${separator}${nextBlock}`);\n return {\n next_content: nextContent,\n changed: nextContent !== existingContent,\n };\n}\n\nfunction resolveProjectRoot(pmRoot: string, cwd: string): string {\n const parent = path.dirname(pmRoot);\n if (path.basename(pmRoot) === \"pm\" && path.basename(parent) === \".agents\") {\n return path.dirname(parent);\n }\n return path.resolve(cwd, pmRoot);\n}\n\nfunction resolveTargetGuidancePath(scans: AgentGuidanceFileScan[], projectRoot: string): string {\n const existingAgents = scans.find((entry) => path.basename(entry.file_path) === \"AGENTS.md\" && entry.exists);\n if (existingAgents) {\n return existingAgents.file_path;\n }\n const existingAny = scans.find((entry) => entry.exists);\n if (existingAny) {\n return existingAny.file_path;\n }\n return path.join(projectRoot, \"AGENTS.md\");\n}\n\nfunction parsePromptChoice(answer: string, currentDefault: boolean): boolean {\n const normalized = answer.trim().toLowerCase();\n if (normalized.length === 0) {\n return currentDefault;\n }\n if (normalized === \"y\" || normalized === \"yes\") {\n return true;\n }\n if (normalized === \"n\" || normalized === \"no\") {\n return false;\n }\n return currentDefault;\n}\n\nasync function promptForGuidanceWrite(targetRelativePath: string): Promise<boolean> {\n const rl = createAgentGuidanceReadlineInterface();\n try {\n output.write(\"\\nAgent guidance check\\n\");\n output.write(\"No AGENTS.md/CLAUDE.md file currently contains compact pm workflow guidance.\\n\");\n const answer = await rl.question(`Add a compact pm workflow section to ${targetRelativePath}? [Y/n] `);\n output.write(\"\\n\");\n return parsePromptChoice(answer, true);\n } finally {\n rl.close();\n }\n}\n\nfunction normalizeAgentGuidanceState(settings: PmSettings): PmSettings[\"agent_guidance\"] {\n const current = settings.agent_guidance;\n return {\n prompt_completed: current?.prompt_completed === true,\n declined: current?.declined === true,\n declined_at: typeof current?.declined_at === \"string\" ? current.declined_at : \"\",\n template_version:\n typeof current?.template_version === \"number\" && Number.isInteger(current.template_version) && current.template_version > 0\n ? current.template_version\n : AGENT_GUIDANCE_TEMPLATE_VERSION,\n last_checked_files: Array.isArray(current?.last_checked_files)\n ? [...new Set(current.last_checked_files.map((value) => value.trim()).filter((value) => value.length > 0))].sort(\n (left, right) => left.localeCompare(right),\n )\n : [],\n };\n}\n\nasync function scanGuidanceFiles(projectRoot: string): Promise<AgentGuidanceFileScan[]> {\n const scans: AgentGuidanceFileScan[] = [];\n for (const filename of AGENT_GUIDANCE_TARGET_FILENAMES) {\n const filePath = path.join(projectRoot, filename);\n const exists = await pathExists(filePath);\n if (!exists) {\n scans.push({\n file_path: filePath,\n exists,\n has_guidance: false,\n has_marker: false,\n });\n continue;\n }\n const content = await fs.readFile(filePath, \"utf8\");\n const contentLower = content.toLowerCase();\n const tokenHits = AGENT_GUIDANCE_REQUIRED_TOKENS.filter((token) => contentLower.includes(token));\n const hasMarker = hasGuidanceMarker(content);\n scans.push({\n file_path: filePath,\n exists,\n has_guidance: hasMarker || tokenHits.length >= AGENT_GUIDANCE_REQUIRED_TOKEN_THRESHOLD,\n has_marker: hasMarker,\n });\n }\n return scans;\n}\n\nfunction pushUnique(target: string[], value: string): void {\n if (!target.includes(value)) {\n target.push(value);\n }\n}\n\nfunction applyAgentGuidanceState(\n settings: PmSettings,\n currentState: PmSettings[\"agent_guidance\"],\n): { changed: boolean; state: PmSettings[\"agent_guidance\"] } {\n const existing = normalizeAgentGuidanceState(settings);\n const changed = JSON.stringify(existing) !== JSON.stringify(currentState);\n if (changed) {\n settings.agent_guidance = currentState;\n }\n return { changed, state: currentState };\n}\n\nasync function writeGuidanceFile(filePath: string): Promise<{ changed: boolean; warnings: string[] }> {\n const exists = await pathExists(filePath);\n const currentContent = exists ? await fs.readFile(filePath, \"utf8\") : \"\";\n const nextContent = upsertAgentGuidanceBlock(currentContent);\n if (!nextContent.changed) {\n return { changed: false, warnings: [] };\n }\n await fs.writeFile(filePath, nextContent.next_content, \"utf8\");\n return {\n changed: true,\n warnings: await runActiveOnWriteHooks({\n path: filePath,\n scope: \"project\",\n op: \"init:agent_guidance_file\",\n }),\n };\n}\n\nfunction buildInitAgentGuidanceSummary(params: {\n mode: InitAgentGuidanceMode;\n scans: AgentGuidanceFileScan[];\n projectRoot: string;\n targetRelativePath: string;\n prompted: boolean;\n applied: boolean;\n skipped: boolean;\n state: PmSettings[\"agent_guidance\"];\n}): InitAgentGuidanceSummary {\n return {\n mode: params.mode,\n present: params.scans.some((entry) => entry.has_guidance),\n prompted: params.prompted,\n applied: params.applied,\n skipped: params.skipped,\n declined: params.state.declined,\n prompt_completed: params.state.prompt_completed,\n template_version: params.state.template_version,\n target_file: params.targetRelativePath,\n checked_files: params.scans.map((entry) => toPortableRelativePath(params.projectRoot, entry.file_path)),\n files_with_guidance: params.scans\n .filter((entry) => entry.has_guidance)\n .map((entry) => toPortableRelativePath(params.projectRoot, entry.file_path)),\n missing_files: params.scans\n .filter((entry) => !entry.exists)\n .map((entry) => toPortableRelativePath(params.projectRoot, entry.file_path)),\n };\n}\n\nasync function refreshGuidanceScansAfterApply(\n applied: boolean,\n scans: AgentGuidanceFileScan[],\n projectRoot: string,\n): Promise<AgentGuidanceFileScan[]> {\n return applied ? await scanGuidanceFiles(projectRoot) : scans;\n}\n\n/**\n * Implements run init agent guidance for the public runtime surface of this module.\n */\nexport async function runInitAgentGuidance(options: RunInitAgentGuidanceOptions): Promise<RunInitAgentGuidanceResult> {\n const warnings: string[] = [];\n const nextSteps: string[] = [];\n const projectRoot = resolveProjectRoot(options.pm_root, options.cwd);\n let scans = await scanGuidanceFiles(projectRoot);\n const targetPath = resolveTargetGuidancePath(scans, projectRoot);\n const targetRelativePath = toPortableRelativePath(projectRoot, targetPath);\n const addLaterHint = \"Add workflow guidance later: pm init --agent-guidance add\";\n let prompted = false;\n let applied = false;\n let skipped = false;\n let state = normalizeAgentGuidanceState(options.settings);\n const checkedFiles = scans.map((entry) => toPortableRelativePath(projectRoot, entry.file_path));\n const presentBefore = scans.some((entry) => entry.has_guidance);\n\n const markState = (partial: Partial<PmSettings[\"agent_guidance\"]>): void => {\n state = {\n ...state,\n ...partial,\n template_version: AGENT_GUIDANCE_TEMPLATE_VERSION,\n last_checked_files: checkedFiles,\n };\n };\n\n if (options.mode === \"status\") {\n if (!presentBefore) {\n warnings.push(\"agent_guidance:missing\");\n pushUnique(nextSteps, addLaterHint);\n }\n } else if (options.mode === \"skip\") {\n skipped = true;\n markState({\n prompt_completed: true,\n declined: true,\n declined_at: state.declined_at.length > 0 ? state.declined_at : new Date().toISOString(),\n });\n warnings.push(\"agent_guidance:explicit_skip\");\n pushUnique(nextSteps, addLaterHint);\n } else if (options.mode === \"add\") {\n if (!presentBefore) {\n const writeResult = await writeGuidanceFile(targetPath);\n warnings.push(...writeResult.warnings);\n if (writeResult.changed) {\n applied = true;\n warnings.push(`agent_guidance:added:${targetRelativePath}`);\n }\n }\n markState({\n prompt_completed: true,\n declined: false,\n declined_at: \"\",\n });\n } else if (presentBefore) {\n if (state.declined) {\n markState({\n prompt_completed: true,\n declined: false,\n declined_at: \"\",\n });\n }\n } else if (state.prompt_completed && state.declined) {\n skipped = true;\n warnings.push(\"agent_guidance:skipped_declined\");\n pushUnique(nextSteps, addLaterHint);\n } else if (options.interactive) {\n prompted = true;\n const approved = await promptForGuidanceWrite(targetRelativePath);\n if (approved) {\n const writeResult = await writeGuidanceFile(targetPath);\n warnings.push(...writeResult.warnings);\n if (writeResult.changed) {\n applied = true;\n warnings.push(`agent_guidance:added:${targetRelativePath}`);\n }\n markState({\n prompt_completed: true,\n declined: false,\n declined_at: \"\",\n });\n } else {\n skipped = true;\n markState({\n prompt_completed: true,\n declined: true,\n declined_at: new Date().toISOString(),\n });\n warnings.push(\"agent_guidance:declined\");\n pushUnique(nextSteps, addLaterHint);\n }\n } else {\n warnings.push(\"agent_guidance:missing_non_interactive\");\n pushUnique(nextSteps, addLaterHint);\n }\n\n const stateUpdate = applyAgentGuidanceState(options.settings, state);\n scans = await refreshGuidanceScansAfterApply(applied, scans, projectRoot);\n\n const summary = buildInitAgentGuidanceSummary({\n mode: options.mode,\n scans,\n projectRoot,\n targetRelativePath,\n prompted,\n applied,\n skipped,\n state,\n });\n\n return {\n summary,\n warnings,\n next_steps: nextSteps,\n settings_changed: stateUpdate.changed,\n };\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,MAAM,kBAAkB,CA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AI,CAAC;gBACf,QAAQ,CAAC,IAAI,CAAC,wBAAwB,kBAAkB,EAAE,CAAC,CAAC;YAC9D,CAAC;YACD,SAAS,CAAC;gBACR,gBAAgB,EAAE,IAAI;gBACtB,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,EAAE;aAChB,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,IAAI,CAAC;YACf,SAAS,CAAC;gBACR,gBAAgB,EAAE,IAAI;gBACtB,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACtC,CAAC,CAAC;YACH,QAAQ,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;YACzC,UAAU,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,QAAQ,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;QACxD,UAAU,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,WAAW,GAAG,uBAAuB,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACrE,KAAK,GAAG,MAAM,8BAA8B,CAAC,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IAE1E,MAAM,OAAO,GAAG,6BAA6B,CAAC;QAC5C,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,KAAK;QACL,WAAW;QACX,kBAAkB;QAClB,QAAQ;QACR,OAAO;QACP,OAAO;QACP,KAAK;KACN,CAAC,CAAC;IAEH,OAAO;QACL,OAAO;QACP,QAAQ;QACR,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,WAAW,CAAC,OAAO;KACtC,CAAC;AACJ,CAAC","debugId":"2d5c3490-b204-56e4-a0b7-c515c05d4b1d"}
|
|
1
|
+
{"version":3,"file":"init-agent-guidance.js","sources":["cli/commands/init-agent-guidance.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/init-agent-guidance\n *\n * Implements the pm init agent guidance command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport readline from \"node:readline/promises\";\nimport { stdin as input, stdout as output } from \"node:process\";\nimport { runActiveOnWriteHooks } from \"../../core/extensions/index.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport type { PmSettings } from \"../../types/index.js\";\n\n/**\n * Restricts init agent guidance mode values accepted by command, SDK, and storage contracts.\n */\nexport type InitAgentGuidanceMode = \"ask\" | \"add\" | \"skip\" | \"status\";\n\nexport const INIT_AGENT_GUIDANCE_MODE_VALUES: InitAgentGuidanceMode[] = [\"ask\", \"add\", \"skip\", \"status\"];\n\nconst AGENT_GUIDANCE_TARGET_FILENAMES = [\"AGENTS.md\", \"CLAUDE.md\"] as const;\nconst AGENT_GUIDANCE_REQUIRED_TOKENS = [\n \"pm init\",\n \"pm context\",\n \"pm search\",\n \"pm create\",\n \"pm claim\",\n \"pm files\",\n \"pm docs\",\n \"pm test --run\",\n \"pm close\",\n \"pm release\",\n \"pm_author\",\n] as const;\nconst AGENT_GUIDANCE_REQUIRED_TOKEN_THRESHOLD = 8;\nconst AGENT_GUIDANCE_TEMPLATE_VERSION = 1;\nconst AGENT_GUIDANCE_START_MARKER_PREFIX = \"<!-- pm-cli:agent-guidance:start:\";\nconst AGENT_GUIDANCE_START_MARKER = `<!-- pm-cli:agent-guidance:start:v${AGENT_GUIDANCE_TEMPLATE_VERSION} -->`;\nconst AGENT_GUIDANCE_END_MARKER = \"<!-- pm-cli:agent-guidance:end -->\";\nconst AGENT_GUIDANCE_ADD_LATER_HINT = \"Add workflow guidance later: pm init --agent-guidance add\";\n\nexport const _testOnly = {\n toPortableRelativePath,\n ensureTrailingNewline,\n detectLineEnding,\n findGuidanceBlockRange,\n buildAgentGuidanceBlock,\n upsertAgentGuidanceBlock,\n resolveProjectRoot,\n resolveTargetGuidancePath,\n parsePromptChoice,\n pushUnique,\n promptForGuidanceWrite,\n normalizeAgentGuidanceState,\n applyAgentGuidanceState,\n writeGuidanceFile,\n setAgentGuidanceReadlineFactoryForTests,\n};\n\ntype AgentGuidanceReadlineInterface = ReturnType<typeof readline.createInterface>;\nlet createAgentGuidanceReadlineInterface = (): AgentGuidanceReadlineInterface => readline.createInterface({ input, output });\n\nfunction setAgentGuidanceReadlineFactoryForTests(factory: (() => AgentGuidanceReadlineInterface) | undefined): void {\n createAgentGuidanceReadlineInterface = factory ?? (() => readline.createInterface({ input, output }));\n}\n\ninterface AgentGuidanceFileScan {\n file_path: string;\n exists: boolean;\n has_guidance: boolean;\n has_marker: boolean;\n}\n\ninterface AgentGuidanceBlockRange {\n start_index: number;\n end_index: number;\n}\n\n/**\n * Documents the init agent guidance summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface InitAgentGuidanceSummary {\n mode: InitAgentGuidanceMode;\n present: boolean;\n prompted: boolean;\n applied: boolean;\n skipped: boolean;\n declined: boolean;\n prompt_completed: boolean;\n template_version: number;\n target_file: string;\n checked_files: string[];\n files_with_guidance: string[];\n missing_files: string[];\n}\n\n/**\n * Documents the run init agent guidance options payload exchanged by command, SDK, and package integrations.\n */\nexport interface RunInitAgentGuidanceOptions {\n pm_root: string;\n cwd: string;\n mode: InitAgentGuidanceMode;\n interactive: boolean;\n settings: PmSettings;\n}\n\n/**\n * Documents the run init agent guidance result payload exchanged by command, SDK, and package integrations.\n */\nexport interface RunInitAgentGuidanceResult {\n summary: InitAgentGuidanceSummary;\n warnings: string[];\n next_steps: string[];\n settings_changed: boolean;\n}\n\nfunction toPortableRelativePath(projectRoot: string, targetPath: string): string {\n const relative = path.relative(projectRoot, targetPath);\n if (relative.length === 0) {\n return path.basename(targetPath);\n }\n return relative.split(path.sep).join(\"/\");\n}\n\nfunction ensureTrailingNewline(value: string): string {\n return value.endsWith(\"\\n\") ? value : `${value}\\n`;\n}\n\nfunction detectLineEnding(value: string): \"\\n\" | \"\\r\\n\" {\n return value.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n}\n\nfunction findGuidanceBlockRange(content: string): AgentGuidanceBlockRange | null {\n const startIndex = content.indexOf(AGENT_GUIDANCE_START_MARKER_PREFIX);\n if (startIndex === -1) {\n return null;\n }\n const endMarkerIndex = content.indexOf(AGENT_GUIDANCE_END_MARKER, startIndex);\n if (endMarkerIndex === -1) {\n return null;\n }\n return {\n start_index: startIndex,\n end_index: endMarkerIndex + AGENT_GUIDANCE_END_MARKER.length,\n };\n}\n\nfunction hasGuidanceMarker(content: string): boolean {\n return findGuidanceBlockRange(content) !== null;\n}\n\nfunction buildAgentGuidanceBlock(lineEnding: \"\\n\" | \"\\r\\n\"): string {\n const lines = [\n AGENT_GUIDANCE_START_MARKER,\n \"## pm Workflow (Agent Quickstart)\",\n \"\",\n \"- Orient before mutate: `pm context --limit 10`, `pm search \\\"<keywords>\\\" --limit 10`, `pm list-open --limit 20`.\",\n \"- Claim and execute: `pm claim <id>` then `pm update <id> --status in_progress`.\",\n \"- Link evidence while coding: `pm files <id> --add ...`, `pm docs <id> --add ...`, `pm test <id> --add command=\\\"node scripts/run-tests.mjs test -- ...\\\"`.\",\n \"- Verify and close: `pm test <id> --run --progress`, `pm close <id> \\\"<evidence>\\\" --validate-close warn`, `pm release <id>`.\",\n \"- Set `PM_AUTHOR=<stable-agent-id>` before mutation commands.\",\n \"\",\n AGENT_GUIDANCE_END_MARKER,\n \"\",\n ];\n return lines.join(lineEnding);\n}\n\nfunction upsertAgentGuidanceBlock(existingContent: string): { next_content: string; changed: boolean } {\n const lineEnding = detectLineEnding(existingContent);\n const nextBlock = buildAgentGuidanceBlock(lineEnding);\n const existingRange = findGuidanceBlockRange(existingContent);\n if (existingRange) {\n const trailingContent = existingContent.slice(existingRange.end_index);\n const normalizedTrailingContent = trailingContent.startsWith(\"\\r\\n\")\n ? trailingContent.slice(2)\n : trailingContent.startsWith(\"\\n\")\n ? trailingContent.slice(1)\n : trailingContent;\n const nextContent = ensureTrailingNewline(\n `${existingContent.slice(0, existingRange.start_index)}${nextBlock}${normalizedTrailingContent}`,\n );\n return {\n next_content: nextContent,\n changed: nextContent !== existingContent,\n };\n }\n const separator = existingContent.length === 0 ? \"\" : existingContent.endsWith(\"\\n\") ? \"\\n\" : \"\\n\\n\";\n const nextContent = ensureTrailingNewline(`${existingContent}${separator}${nextBlock}`);\n return {\n next_content: nextContent,\n changed: nextContent !== existingContent,\n };\n}\n\nfunction resolveProjectRoot(pmRoot: string, cwd: string): string {\n const parent = path.dirname(pmRoot);\n if (path.basename(pmRoot) === \"pm\" && path.basename(parent) === \".agents\") {\n return path.dirname(parent);\n }\n return path.resolve(cwd, pmRoot);\n}\n\nfunction resolveTargetGuidancePath(scans: AgentGuidanceFileScan[], projectRoot: string): string {\n const existingAgents = scans.find((entry) => path.basename(entry.file_path) === \"AGENTS.md\" && entry.exists);\n if (existingAgents) {\n return existingAgents.file_path;\n }\n const existingAny = scans.find((entry) => entry.exists);\n if (existingAny) {\n return existingAny.file_path;\n }\n return path.join(projectRoot, \"AGENTS.md\");\n}\n\nfunction parsePromptChoice(answer: string, currentDefault: boolean): boolean {\n const normalized = answer.trim().toLowerCase();\n if (normalized.length === 0) {\n return currentDefault;\n }\n if (normalized === \"y\" || normalized === \"yes\") {\n return true;\n }\n if (normalized === \"n\" || normalized === \"no\") {\n return false;\n }\n return currentDefault;\n}\n\nasync function promptForGuidanceWrite(targetRelativePath: string): Promise<boolean> {\n const rl = createAgentGuidanceReadlineInterface();\n try {\n output.write(\"\\nAgent guidance check\\n\");\n output.write(\"No AGENTS.md/CLAUDE.md file currently contains compact pm workflow guidance.\\n\");\n const answer = await rl.question(`Add a compact pm workflow section to ${targetRelativePath}? [Y/n] `);\n output.write(\"\\n\");\n return parsePromptChoice(answer, true);\n } finally {\n rl.close();\n }\n}\n\nfunction normalizeAgentGuidanceState(settings: PmSettings): PmSettings[\"agent_guidance\"] {\n const current = settings.agent_guidance;\n return {\n prompt_completed: current?.prompt_completed === true,\n declined: current?.declined === true,\n declined_at: typeof current?.declined_at === \"string\" ? current.declined_at : \"\",\n template_version:\n typeof current?.template_version === \"number\" && Number.isInteger(current.template_version) && current.template_version > 0\n ? current.template_version\n : AGENT_GUIDANCE_TEMPLATE_VERSION,\n last_checked_files: Array.isArray(current?.last_checked_files)\n ? [...new Set(current.last_checked_files.map((value) => value.trim()).filter((value) => value.length > 0))].sort(\n (left, right) => left.localeCompare(right),\n )\n : [],\n };\n}\n\nasync function scanGuidanceFiles(projectRoot: string): Promise<AgentGuidanceFileScan[]> {\n const scans: AgentGuidanceFileScan[] = [];\n for (const filename of AGENT_GUIDANCE_TARGET_FILENAMES) {\n const filePath = path.join(projectRoot, filename);\n const exists = await pathExists(filePath);\n if (!exists) {\n scans.push({\n file_path: filePath,\n exists,\n has_guidance: false,\n has_marker: false,\n });\n continue;\n }\n const content = await fs.readFile(filePath, \"utf8\");\n const contentLower = content.toLowerCase();\n const tokenHits = AGENT_GUIDANCE_REQUIRED_TOKENS.filter((token) => contentLower.includes(token));\n const hasMarker = hasGuidanceMarker(content);\n scans.push({\n file_path: filePath,\n exists,\n has_guidance: hasMarker || tokenHits.length >= AGENT_GUIDANCE_REQUIRED_TOKEN_THRESHOLD,\n has_marker: hasMarker,\n });\n }\n return scans;\n}\n\nfunction pushUnique(target: string[], value: string): void {\n if (!target.includes(value)) {\n target.push(value);\n }\n}\n\nfunction applyAgentGuidanceState(\n settings: PmSettings,\n currentState: PmSettings[\"agent_guidance\"],\n): { changed: boolean; state: PmSettings[\"agent_guidance\"] } {\n const existing = normalizeAgentGuidanceState(settings);\n const changed = JSON.stringify(existing) !== JSON.stringify(currentState);\n if (changed) {\n settings.agent_guidance = currentState;\n }\n return { changed, state: currentState };\n}\n\nasync function writeGuidanceFile(filePath: string): Promise<{ changed: boolean; warnings: string[] }> {\n const exists = await pathExists(filePath);\n const currentContent = exists ? await fs.readFile(filePath, \"utf8\") : \"\";\n const nextContent = upsertAgentGuidanceBlock(currentContent);\n if (!nextContent.changed) {\n return { changed: false, warnings: [] };\n }\n await fs.writeFile(filePath, nextContent.next_content, \"utf8\");\n return {\n changed: true,\n warnings: await runActiveOnWriteHooks({\n path: filePath,\n scope: \"project\",\n op: \"init:agent_guidance_file\",\n }),\n };\n}\n\nfunction buildInitAgentGuidanceSummary(params: {\n mode: InitAgentGuidanceMode;\n scans: AgentGuidanceFileScan[];\n projectRoot: string;\n targetRelativePath: string;\n prompted: boolean;\n applied: boolean;\n skipped: boolean;\n state: PmSettings[\"agent_guidance\"];\n}): InitAgentGuidanceSummary {\n return {\n mode: params.mode,\n present: params.scans.some((entry) => entry.has_guidance),\n prompted: params.prompted,\n applied: params.applied,\n skipped: params.skipped,\n declined: params.state.declined,\n prompt_completed: params.state.prompt_completed,\n template_version: params.state.template_version,\n target_file: params.targetRelativePath,\n checked_files: params.scans.map((entry) => toPortableRelativePath(params.projectRoot, entry.file_path)),\n files_with_guidance: params.scans\n .filter((entry) => entry.has_guidance)\n .map((entry) => toPortableRelativePath(params.projectRoot, entry.file_path)),\n missing_files: params.scans\n .filter((entry) => !entry.exists)\n .map((entry) => toPortableRelativePath(params.projectRoot, entry.file_path)),\n };\n}\n\nasync function refreshGuidanceScansAfterApply(\n applied: boolean,\n scans: AgentGuidanceFileScan[],\n projectRoot: string,\n): Promise<AgentGuidanceFileScan[]> {\n return applied ? await scanGuidanceFiles(projectRoot) : scans;\n}\n\ninterface InitAgentGuidanceFlowState {\n warnings: string[];\n nextSteps: string[];\n prompted: boolean;\n applied: boolean;\n skipped: boolean;\n state: PmSettings[\"agent_guidance\"];\n}\n\ninterface InitAgentGuidanceModeContext {\n mode: InitAgentGuidanceMode;\n interactive: boolean;\n targetPath: string;\n targetRelativePath: string;\n checkedFiles: string[];\n presentBefore: boolean;\n}\n\nfunction markAgentGuidanceRunState(\n flow: InitAgentGuidanceFlowState,\n checkedFiles: string[],\n partial: Partial<PmSettings[\"agent_guidance\"]>,\n): void {\n flow.state = {\n ...flow.state,\n ...partial,\n template_version: AGENT_GUIDANCE_TEMPLATE_VERSION,\n last_checked_files: checkedFiles,\n };\n}\n\nasync function addAgentGuidanceBlockIfMissing(\n flow: InitAgentGuidanceFlowState,\n context: Pick<InitAgentGuidanceModeContext, \"presentBefore\" | \"targetPath\" | \"targetRelativePath\">,\n): Promise<void> {\n if (context.presentBefore) {\n return;\n }\n const writeResult = await writeGuidanceFile(context.targetPath);\n flow.warnings.push(...writeResult.warnings);\n if (writeResult.changed) {\n flow.applied = true;\n flow.warnings.push(`agent_guidance:added:${context.targetRelativePath}`);\n }\n}\n\nfunction handleAgentGuidanceStatusMode(flow: InitAgentGuidanceFlowState, presentBefore: boolean): void {\n if (!presentBefore) {\n flow.warnings.push(\"agent_guidance:missing\");\n pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);\n }\n}\n\nfunction handleAgentGuidanceSkipMode(flow: InitAgentGuidanceFlowState, checkedFiles: string[]): void {\n flow.skipped = true;\n markAgentGuidanceRunState(flow, checkedFiles, {\n prompt_completed: true,\n declined: true,\n declined_at: flow.state.declined_at || new Date().toISOString(),\n });\n flow.warnings.push(\"agent_guidance:explicit_skip\");\n pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);\n}\n\nasync function handleAgentGuidanceAddMode(\n flow: InitAgentGuidanceFlowState,\n context: InitAgentGuidanceModeContext,\n): Promise<void> {\n await addAgentGuidanceBlockIfMissing(flow, context);\n markAgentGuidanceRunState(flow, context.checkedFiles, {\n prompt_completed: true,\n declined: false,\n declined_at: \"\",\n });\n}\n\nfunction handlePresentAgentGuidance(flow: InitAgentGuidanceFlowState, checkedFiles: string[]): void {\n if (flow.state.declined) {\n markAgentGuidanceRunState(flow, checkedFiles, {\n prompt_completed: true,\n declined: false,\n declined_at: \"\",\n });\n }\n}\n\nfunction handleDeclinedAgentGuidance(flow: InitAgentGuidanceFlowState): void {\n flow.skipped = true;\n flow.warnings.push(\"agent_guidance:skipped_declined\");\n pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);\n}\n\nasync function handleInteractiveAgentGuidancePrompt(\n flow: InitAgentGuidanceFlowState,\n context: InitAgentGuidanceModeContext,\n): Promise<void> {\n flow.prompted = true;\n const approved = await promptForGuidanceWrite(context.targetRelativePath);\n if (approved) {\n await addAgentGuidanceBlockIfMissing(flow, context);\n markAgentGuidanceRunState(flow, context.checkedFiles, {\n prompt_completed: true,\n declined: false,\n declined_at: \"\",\n });\n return;\n }\n flow.skipped = true;\n markAgentGuidanceRunState(flow, context.checkedFiles, {\n prompt_completed: true,\n declined: true,\n declined_at: new Date().toISOString(),\n });\n flow.warnings.push(\"agent_guidance:declined\");\n pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);\n}\n\nfunction handleNonInteractiveMissingAgentGuidance(flow: InitAgentGuidanceFlowState): void {\n flow.warnings.push(\"agent_guidance:missing_non_interactive\");\n pushUnique(flow.nextSteps, AGENT_GUIDANCE_ADD_LATER_HINT);\n}\n\nasync function applyAgentGuidanceMode(\n initialState: PmSettings[\"agent_guidance\"],\n context: InitAgentGuidanceModeContext,\n): Promise<InitAgentGuidanceFlowState> {\n const flow: InitAgentGuidanceFlowState = {\n warnings: [],\n nextSteps: [],\n prompted: false,\n applied: false,\n skipped: false,\n state: initialState,\n };\n\n if (context.mode === \"status\") {\n handleAgentGuidanceStatusMode(flow, context.presentBefore);\n return flow;\n }\n if (context.mode === \"skip\") {\n handleAgentGuidanceSkipMode(flow, context.checkedFiles);\n return flow;\n }\n if (context.mode === \"add\") {\n await handleAgentGuidanceAddMode(flow, context);\n return flow;\n }\n if (context.presentBefore) {\n handlePresentAgentGuidance(flow, context.checkedFiles);\n return flow;\n }\n if (flow.state.prompt_completed && flow.state.declined) {\n handleDeclinedAgentGuidance(flow);\n return flow;\n }\n if (context.interactive) {\n await handleInteractiveAgentGuidancePrompt(flow, context);\n return flow;\n }\n handleNonInteractiveMissingAgentGuidance(flow);\n return flow;\n}\n\n/**\n * Implements run init agent guidance for the public runtime surface of this module.\n */\nexport async function runInitAgentGuidance(options: RunInitAgentGuidanceOptions): Promise<RunInitAgentGuidanceResult> {\n const projectRoot = resolveProjectRoot(options.pm_root, options.cwd);\n let scans = await scanGuidanceFiles(projectRoot);\n const targetPath = resolveTargetGuidancePath(scans, projectRoot);\n const targetRelativePath = toPortableRelativePath(projectRoot, targetPath);\n const checkedFiles = scans.map((entry) => toPortableRelativePath(projectRoot, entry.file_path));\n const presentBefore = scans.some((entry) => entry.has_guidance);\n const flow = await applyAgentGuidanceMode(normalizeAgentGuidanceState(options.settings), {\n mode: options.mode,\n interactive: options.interactive,\n targetPath,\n targetRelativePath,\n checkedFiles,\n presentBefore,\n });\n\n const stateUpdate = applyAgentGuidanceState(options.settings, flow.state);\n scans = await refreshGuidanceScansAfterApply(flow.applied, scans, projectRoot);\n\n const summary = buildInitAgentGuidanceSummary({\n mode: options.mode,\n scans,\n projectRoot,\n targetRelativePath,\n prompted: flow.prompted,\n applied: flow.applied,\n skipped: flow.skipped,\n state: flow.state,\n });\n\n return {\n summary,\n warnings: flow.warnings,\n next_steps: flow.nextSteps,\n settings_changed: stateUpdate.changed,\n };\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQvD,MAAM,CAAC,MAAM,+BAA+B,GAA4B,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AAEzG,MAAM,+BAA+B,GAAG,CAAC,WAAW,EAAE,WAAW,CAAU,CAAC;AAC5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GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,CAAC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAChG,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAChE,MAAM,IAAI,GAAG,MAAM,sBAAsB,CAAC,2BAA2B,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;QACvF,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU;QACV,kBAAkB;QAClB,YAAY;QACZ,aAAa;KACd,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,uBAAuB,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1E,KAAK,GAAG,MAAM,8BAA8B,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IAE/E,MAAM,OAAO,GAAG,6BAA6B,CAAC;QAC5C,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,KAAK;QACL,WAAW;QACX,kBAAkB;QAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,KAAK,EAAE,IAAI,CAAC,KAAK;KAClB,CAAC,CAAC;IAEH,OAAO;QACL,OAAO;QACP,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,UAAU,EAAE,IAAI,CAAC,SAAS;QAC1B,gBAAgB,EAAE,WAAW,CAAC,OAAO;KACtC,CAAC;AACJ,CAAC","debugId":"7987916d-4294-5753-925d-ceb787be0783"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm init command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="df631c25-0bdb-52e7-aec4-a83f25fdfa91")}catch(e){}}();
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import readline from "node:readline/promises";
|
|
@@ -556,7 +556,7 @@ export async function runInit(prefixArg, global, options = {}) {
|
|
|
556
556
|
const settingsPath = path.join(pmRoot, "settings.json");
|
|
557
557
|
const settingsExists = await pathExists(settingsPath);
|
|
558
558
|
const normalizedOptions = normalizeInitCommandOptions(options);
|
|
559
|
-
|
|
559
|
+
const settingsResolution = await resolveInitSettings({
|
|
560
560
|
pmRoot,
|
|
561
561
|
settingsPath,
|
|
562
562
|
settingsExists,
|
|
@@ -608,4 +608,4 @@ export async function runInit(prefixArg, global, options = {}) {
|
|
|
608
608
|
};
|
|
609
609
|
}
|
|
610
610
|
//# sourceMappingURL=init.js.map
|
|
611
|
-
//# debugId=
|
|
611
|
+
//# debugId=df631c25-0bdb-52e7-aec4-a83f25fdfa91
|