@unbrained/pm-cli 2026.7.3 → 2026.7.4
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 +10 -0
- package/CONTRIBUTING.md +36 -7
- package/README.md +0 -4
- package/dist/cli/commands/calendar.js +3 -3
- package/dist/cli/commands/calendar.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/create.d.ts +2 -59
- package/dist/cli/commands/create.js +8 -24
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.js +54 -133
- package/dist/cli/commands/extension/scaffold.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/reindex.js +3 -3
- package/dist/cli/commands/reindex.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 +26 -97
- 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/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-IDS5GSYG.js +16 -0
- package/dist/cli-bundle/chunks/{activity-5YWLSPGE.js → activity-OENQCYZD.js} +9 -9
- package/dist/cli-bundle/chunks/{aggregate-2V2M3JZU.js → aggregate-EC4LWS3U.js} +8 -8
- package/dist/cli-bundle/chunks/{aggregate-EK7DXML7.js → aggregate-RCB3QJJE.js} +8 -8
- package/dist/cli-bundle/chunks/{append-JFG4WQMG.js → append-ADBOI3A6.js} +6 -6
- package/dist/cli-bundle/chunks/{append-EZESUVJT.js → append-XLEKVVWB.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-NOIEVOK5.js → chunk-2LRMWMZ6.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-LBE5QFMZ.js → chunk-2ONH3WG6.js} +32 -13
- package/dist/cli-bundle/chunks/{chunk-LBE5QFMZ.js.map → chunk-2ONH3WG6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4EXFFP7T.js → chunk-2VK677OA.js} +42 -34
- package/dist/cli-bundle/chunks/chunk-2VK677OA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JBZ2NTKX.js → chunk-3C5T3ZEO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4PFVUUYV.js → chunk-3MLQZI3H.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5JIWFWOZ.js → chunk-4EVY7CQN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AIKU3IIL.js → chunk-4IW7STMB.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-MHRS5FUX.js → chunk-4KPQQ42D.js} +143 -100
- package/dist/cli-bundle/chunks/chunk-4KPQQ42D.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-T6AXEBOP.js → chunk-4OXNQHKQ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-F6WNBITZ.js → chunk-4PJYRA3V.js} +31 -12
- package/dist/cli-bundle/chunks/{chunk-F6WNBITZ.js.map → chunk-4PJYRA3V.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-QCDTQCMW.js → chunk-4SHME4VR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WYOIIFSE.js → chunk-5FYY76HR.js} +28 -99
- package/dist/cli-bundle/chunks/chunk-5FYY76HR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QNNQAAZ5.js → chunk-6QY2NA2M.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-T3P7PMZP.js → chunk-6YB7HG2J.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YVKZ3ANP.js → chunk-724VLYDJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SYE6WMV6.js → chunk-75VMARGO.js} +11 -11
- package/dist/cli-bundle/chunks/chunk-75VMARGO.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RAHINBVP.js → chunk-7745CXNI.js} +62 -97
- package/dist/cli-bundle/chunks/chunk-7745CXNI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LCWQP6NM.js → chunk-7G5SUU6F.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-MDHWWBNZ.js → chunk-7ITQSEBL.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZFTKYWIF.js → chunk-A222YWOQ.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-6NYJGMTY.js → chunk-A2W3XKAD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YSDFIY7N.js → chunk-AOP2EMK3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-U3S2B7TA.js → chunk-AZMPKLIA.js} +42 -34
- package/dist/cli-bundle/chunks/chunk-AZMPKLIA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KHVGM5CS.js → chunk-BDDYM4LH.js} +151 -171
- package/dist/cli-bundle/chunks/chunk-BDDYM4LH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6KRFL33E.js → chunk-CN4OAA2G.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-3W2HJKJX.js → chunk-CQFZRLXQ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-K5DT2YKM.js → chunk-CQISNF3Z.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-5IZUBZBR.js → chunk-D2LDM35X.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NZ7QIUP5.js → chunk-DEIDJQZK.js} +57 -136
- package/dist/cli-bundle/chunks/chunk-DEIDJQZK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YPWUSH72.js → chunk-DJ5S2LDY.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-Z5F6XZXE.js → chunk-EB4BBEZD.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-ERG65A2L.js → chunk-EH23N5FX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SU2E4AWU.js → chunk-FDNJMYZB.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-CXR3CMBQ.js → chunk-FMWQRMHS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-T4XBKJ3F.js → chunk-HL742IBM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YF746GTH.js → chunk-J4KNRDI3.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-KS6ATO47.js → chunk-JYLFF7GJ.js} +143 -100
- package/dist/cli-bundle/chunks/chunk-JYLFF7GJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-BI4R7HI2.js → chunk-JZJJEJBR.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-XRYSCRZR.js → chunk-KKHIQOTN.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-572FKBRL.js → chunk-LLQLLAKU.js} +61 -96
- package/dist/cli-bundle/chunks/chunk-LLQLLAKU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6CDCWKSX.js → chunk-M34MVAOP.js} +58 -137
- package/dist/cli-bundle/chunks/chunk-M34MVAOP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WJA3PXW7.js → chunk-M6PR5BC6.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-HQAF23Q2.js → chunk-MTB4PRA3.js} +10 -10
- package/dist/cli-bundle/chunks/chunk-MTB4PRA3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5E7N4T2Z.js → chunk-MZ4NH46V.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AJHYQCBJ.js → chunk-MZG6I2Q2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P5L7Z2O6.js → chunk-N2LOJUBB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WRYERRZX.js → chunk-NGDK3KEZ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-HB4FAT3O.js → chunk-NHDR3UCW.js} +12 -8
- package/dist/cli-bundle/chunks/{chunk-HB4FAT3O.js.map → chunk-NHDR3UCW.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YSGTMDWC.js → chunk-NHKXOMZ5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FZJM2TXF.js → chunk-OTSP6UEX.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-LOWVNZBZ.js → chunk-PUVPC5DL.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-Z7RPDF2Y.js → chunk-PV5JS7MP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KEZOIPCR.js → chunk-Q2266G4S.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-67LARBDL.js → chunk-Q3XVLRCJ.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-RJH5VQHW.js → chunk-QFXFKYNQ.js} +13 -9
- package/dist/cli-bundle/chunks/chunk-QFXFKYNQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PULUSQAV.js → chunk-R7EMP4JG.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-JPATY4SE.js → chunk-SBNT6SLO.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-L4SLHV6G.js → chunk-SL2ANJSV.js} +151 -171
- package/dist/cli-bundle/chunks/chunk-SL2ANJSV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FH2H3CBD.js → chunk-T5RTYLZJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-U5TR4N7J.js → chunk-TGYDJEJH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ER4ME5U2.js → chunk-TO4KCIOT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FUFFPIYA.js → chunk-TUV7SIWZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TQ6AX5SQ.js → chunk-UGDONITK.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-4WB6S4YX.js → chunk-UYLA5ROU.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-A3OQ7TFW.js → chunk-V655JQ5J.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-SU3TB4NS.js → chunk-W5X3AHJN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-32IUNTG4.js → chunk-WBWRQS32.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-UMNQZS4H.js → chunk-WOOB7PV7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-EQURFOMH.js → chunk-WSDIALO4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MEZZZBYX.js → chunk-WTXDLBSZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7LYO6S5A.js → chunk-XBIYI23P.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-ECU6MMTQ.js → chunk-XFO2NJY6.js} +29 -100
- package/dist/cli-bundle/chunks/chunk-XFO2NJY6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OGLGI22K.js → chunk-XQCWTSLO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7CLLC75T.js → chunk-Y2VSCQ77.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-GVJE5T7Q.js → chunk-YZR7UMZ6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EJ2OCBHF.js → chunk-YZWXMDNH.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-GUYNUXQT.js → chunk-ZIEGTQCY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BE2SR6QL.js → chunk-ZZWMJVW2.js} +4 -4
- package/dist/cli-bundle/chunks/{claim-5GU7OE67.js → claim-D6L33A5Y.js} +8 -8
- package/dist/cli-bundle/chunks/{claim-2BGBGSVI.js → claim-YAFUTPVK.js} +8 -8
- package/dist/cli-bundle/chunks/close-KLDLHAOP.js +14 -0
- package/dist/cli-bundle/chunks/{close-AFVKPR57.js → close-TGYXG7TV.js} +7 -7
- package/dist/cli-bundle/chunks/{close-many-7KLOSYLP.js → close-many-4QSWKCRU.js} +14 -14
- package/dist/cli-bundle/chunks/{close-many-JKUJMHLG.js → close-many-SNA6LNZH.js} +14 -14
- package/dist/cli-bundle/chunks/{comments-DNWHEBOS.js → comments-QC6ARR5X.js} +8 -8
- package/dist/cli-bundle/chunks/{comments-RW23R3VE.js → comments-ZHVYGUVC.js} +8 -8
- package/dist/cli-bundle/chunks/{config-AUM5WBYA.js → config-O6W2EU2G.js} +7 -7
- package/dist/cli-bundle/chunks/{config-OZWSA2NP.js → config-XQRFJXJP.js} +7 -7
- package/dist/cli-bundle/chunks/{context-PKCEHQY3.js → context-IHE3IXN5.js} +12 -12
- package/dist/cli-bundle/chunks/{context-OYXRGY7S.js → context-WSYWBEUL.js} +12 -12
- package/dist/cli-bundle/chunks/{contracts-X74F2GSM.js → contracts-CVBINC7C.js} +3 -3
- package/dist/cli-bundle/chunks/{contracts-L6ODXNUM.js → contracts-NLCDIZAT.js} +3 -3
- package/dist/cli-bundle/chunks/{copy-I4NCLBR4.js → copy-7MUQC44A.js} +5 -5
- package/dist/cli-bundle/chunks/{copy-6XOR3HKN.js → copy-ANWXDJVC.js} +5 -5
- package/dist/cli-bundle/chunks/create-AJ6HUR5W.js +28 -0
- package/dist/cli-bundle/chunks/{create-PM45M6PE.js → create-JIA2IFCO.js} +12 -12
- package/dist/cli-bundle/chunks/{delete-7YXHYG67.js → delete-5OLYWQIC.js} +5 -5
- package/dist/cli-bundle/chunks/{delete-LPISP43T.js → delete-INHKCIRN.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-N2T26FME.js → deps-CCSWGZW7.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-WATKQDE3.js → deps-IYEID3QX.js} +5 -5
- package/dist/cli-bundle/chunks/{docs-Z3X6JZLT.js → docs-3XZK22WF.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-6LQ3GLM7.js → docs-PKO7OEIM.js} +7 -7
- package/dist/cli-bundle/chunks/{eval-6DCLG52D.js → eval-5XYP6NMY.js} +10 -10
- package/dist/cli-bundle/chunks/{eval-Y3ZCUTHK.js → eval-O4WGQYDI.js} +10 -10
- package/dist/cli-bundle/chunks/{extension-QWE4YYK5.js → extension-PVGRRZZG.js} +11 -11
- package/dist/cli-bundle/chunks/{extension-BNINIMT7.js → extension-T7JNTAAA.js} +11 -11
- package/dist/cli-bundle/chunks/{files-6SGKHS6O.js → files-7IU56S6R.js} +10 -10
- package/dist/cli-bundle/chunks/files-7IU56S6R.js.map +1 -0
- package/dist/cli-bundle/chunks/{files-FUYPSOFJ.js → files-W7HH5EOD.js} +9 -9
- package/dist/cli-bundle/chunks/{files-FUYPSOFJ.js.map → files-W7HH5EOD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-2Q3K76G2.js → focus-6FA5KYRY.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-ATLBWXXD.js → focus-CQ63JFDG.js} +6 -6
- package/dist/cli-bundle/chunks/{gc-RUYEMNRF.js → gc-3BG67KTO.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-TDWSDR66.js → gc-PEZYGNVB.js} +3 -3
- package/dist/cli-bundle/chunks/{get-LY6M2JIM.js → get-J6CSJ4SX.js} +10 -10
- package/dist/cli-bundle/chunks/{get-2WGLX74N.js → get-KJTKGNEQ.js} +10 -10
- package/dist/cli-bundle/chunks/{health-4RKHYS3T.js → health-32UQICEL.js} +15 -15
- package/dist/cli-bundle/chunks/{health-TMFVNYRA.js → health-ZUZG5ULV.js} +15 -15
- package/dist/cli-bundle/chunks/history-IOH6FKG7.js +18 -0
- package/dist/cli-bundle/chunks/{history-SGRRS72R.js → history-W6QVR6FA.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-V5DNAQHH.js → history-compact-F355EGL4.js} +20 -27
- package/dist/cli-bundle/chunks/history-compact-F355EGL4.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-compact-LOED43R3.js → history-compact-JQ6ZGYSJ.js} +19 -26
- package/dist/cli-bundle/chunks/history-compact-JQ6ZGYSJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-redact-IRL7WJ3E.js → history-redact-TUWOUYX5.js} +9 -9
- package/dist/cli-bundle/chunks/history-redact-VVDOARNO.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-4WVBVHFR.js → history-repair-MPCAIKYE.js} +20 -28
- package/dist/cli-bundle/chunks/history-repair-MPCAIKYE.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-PGYQJMGD.js → history-repair-ZKS3LKPV.js} +19 -27
- package/dist/cli-bundle/chunks/history-repair-ZKS3LKPV.js.map +7 -0
- package/dist/cli-bundle/chunks/init-CZLEEE6Q.js +22 -0
- package/dist/cli-bundle/chunks/{init-4GESW7RM.js → init-MAA6UMNQ.js} +12 -12
- package/dist/cli-bundle/chunks/{learnings-4FJY7WIW.js → learnings-EYC3OKS2.js} +8 -8
- package/dist/cli-bundle/chunks/{learnings-4BHWFFUV.js → learnings-HKJJUVTA.js} +8 -8
- package/dist/cli-bundle/chunks/{list-D7BF5CL2.js → list-HFD5737R.js} +8 -8
- package/dist/cli-bundle/chunks/{list-472TIOVK.js → list-KN3TL5Y5.js} +8 -8
- package/dist/cli-bundle/chunks/{next-SFQZVX2B.js → next-DQUMFAHG.js} +13 -13
- package/dist/cli-bundle/chunks/{next-D5STGWI2.js → next-JUEYC5HE.js} +13 -13
- package/dist/cli-bundle/chunks/{notes-W4UEICGF.js → notes-XATYT43P.js} +8 -8
- package/dist/cli-bundle/chunks/{notes-6KNOSLIT.js → notes-ZG6RLZXB.js} +8 -8
- package/dist/cli-bundle/chunks/{plan-JO6V7BXO.js → plan-5NWQL2DH.js} +12 -12
- package/dist/cli-bundle/chunks/{plan-MJQW5XK3.js → plan-DVVLX7LK.js} +12 -12
- package/dist/cli-bundle/chunks/{profile-WIQY2KCV.js → profile-54DZ4CLB.js} +8 -8
- package/dist/cli-bundle/chunks/{profile-3TOTMUR4.js → profile-PLIQVEOY.js} +8 -8
- package/dist/cli-bundle/chunks/{register-list-query-GAPQ6DM3.js → register-list-query-PNRAHNIQ.js} +21 -21
- package/dist/cli-bundle/chunks/{register-list-query-ELBHCCFI.js.map → register-list-query-PNRAHNIQ.js.map} +1 -7
- package/dist/cli-bundle/chunks/{register-list-query-ELBHCCFI.js → register-list-query-WRS6ACUW.js} +20 -20
- package/dist/cli-bundle/chunks/register-list-query-WRS6ACUW.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-ROFE2YPC.js → register-mutation-ET6E4VLE.js} +32 -32
- package/dist/cli-bundle/chunks/{register-mutation-SJWMVIJ2.js → register-mutation-K2MNRWGI.js} +32 -32
- package/dist/cli-bundle/chunks/{register-operations-MEKU3AKC.js → register-operations-6DQRUTIX.js} +30 -30
- package/dist/cli-bundle/chunks/{register-operations-IADFVH53.js → register-operations-73UDWMVB.js} +30 -30
- package/dist/cli-bundle/chunks/{register-setup-3QJY43CY.js → register-setup-FXZJ2CEJ.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-AJWUSSQX.js → register-setup-LYYCMQFV.js} +15 -15
- package/dist/cli-bundle/chunks/restore-L27TMMCF.js +17 -0
- package/dist/cli-bundle/chunks/{restore-44IHMMZZ.js → restore-R6YJHQK3.js} +9 -9
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js → scheduling-shortcuts-LE4S7OI7.js} +12 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-TSBK4AY5.js → scheduling-shortcuts-OGODPUBL.js} +12 -12
- package/dist/cli-bundle/chunks/{schema-VBCELP5G.js → schema-ICCD3HOP.js} +7 -7
- package/dist/cli-bundle/chunks/{schema-IB2NZZWD.js → schema-RHH23PQX.js} +7 -7
- package/dist/cli-bundle/chunks/{search-R227JOL6.js → search-HDDKOPFE.js} +10 -10
- package/dist/cli-bundle/chunks/{search-7UBETML4.js → search-Z2VGP2Q5.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-MCK7PLYS.js → stats-DHMRXHOB.js} +6 -6
- package/dist/cli-bundle/chunks/{stats-FAG7COEH.js → stats-ETFP37MB.js} +6 -6
- package/dist/cli-bundle/chunks/{telemetry-GVVUQSJQ.js → telemetry-NUZNKDCP.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-DRPDZMAO.js → telemetry-ZRBM22QD.js} +4 -4
- package/dist/cli-bundle/chunks/{test-SY76DZTO.js → test-H36PM746.js} +15 -15
- package/dist/cli-bundle/chunks/{test-QY44WAMR.js → test-XNKTIP4Y.js} +15 -15
- package/dist/cli-bundle/chunks/{test-all-USPJHXFR.js → test-all-APCBSXQI.js} +15 -15
- package/dist/cli-bundle/chunks/{test-all-QD6QAEG7.js → test-all-KIK3OYBY.js} +15 -15
- package/dist/cli-bundle/chunks/{test-runs-QIR5MJPL.js → test-runs-5SLLV3XU.js} +4 -4
- package/dist/cli-bundle/chunks/{test-runs-MG5VIGSK.js → test-runs-L3WKLO67.js} +4 -4
- package/dist/cli-bundle/chunks/update-RQKI3AMW.js +24 -0
- package/dist/cli-bundle/chunks/{update-IKJZWLQC.js → update-ZM7NJWHY.js} +15 -15
- package/dist/cli-bundle/chunks/{update-many-BEMTDA2X.js → update-many-GFCQG6ZQ.js} +22 -22
- package/dist/cli-bundle/chunks/{update-many-RATAARHU.js → update-many-XGTJ7QIU.js} +22 -22
- package/dist/cli-bundle/chunks/{upgrade-VU46BLJZ.js → upgrade-KJ3JGELR.js} +11 -11
- package/dist/cli-bundle/chunks/{upgrade-NWMR3VQL.js → upgrade-RBRQ7PQU.js} +11 -11
- package/dist/cli-bundle/chunks/{validate-NRY6MFXN.js → validate-EW6TGC7R.js} +21 -21
- package/dist/cli-bundle/chunks/validate-EW6TGC7R.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-GAJ6FUSI.js → validate-T6PR5WAL.js} +22 -22
- package/dist/cli-bundle/chunks/validate-T6PR5WAL.js.map +1 -0
- package/dist/cli-bundle/main.js +15 -15
- package/dist/core/extensions/extension-types.d.ts +1 -2
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/history/history-rewrite.d.ts +10 -0
- package/dist/core/history/history-rewrite.js +27 -3
- package/dist/core/history/history-rewrite.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/sdk/cli-contracts/flag-contracts.js +4 -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/package-import-adapters.d.ts +90 -2
- package/dist/sdk/package-import-adapters.js +274 -2
- 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/package.json +4 -3
- package/packages/pm-beads/extensions/beads/runtime-loader.ts +27 -40
- package/packages/pm-beads/extensions/beads/runtime.ts +106 -223
- package/packages/pm-calendar/extensions/calendar/runtime.ts +21 -18
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +9 -11
- package/packages/pm-todos/extensions/todos/runtime-loader.ts +48 -76
- 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/install.ps1 +7 -7
- package/dist/cli-bundle/chunks/activity-BIML7K2D.js +0 -16
- package/dist/cli-bundle/chunks/chunk-4EXFFP7T.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-572FKBRL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6CDCWKSX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ECU6MMTQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-HQAF23Q2.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-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-U3S2B7TA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WYOIIFSE.js.map +0 -7
- 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/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-XIDPABA4.js +0 -22
- 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/update-A7EICML6.js +0 -24
- 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-IDS5GSYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-5YWLSPGE.js.map → activity-OENQCYZD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-2V2M3JZU.js.map → aggregate-EC4LWS3U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-EK7DXML7.js.map → aggregate-RCB3QJJE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-JFG4WQMG.js.map → append-ADBOI3A6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-EZESUVJT.js.map → append-XLEKVVWB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NOIEVOK5.js.map → chunk-2LRMWMZ6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JBZ2NTKX.js.map → chunk-3C5T3ZEO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4PFVUUYV.js.map → chunk-3MLQZI3H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5JIWFWOZ.js.map → chunk-4EVY7CQN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AIKU3IIL.js.map → chunk-4IW7STMB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T6AXEBOP.js.map → chunk-4OXNQHKQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QCDTQCMW.js.map → chunk-4SHME4VR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QNNQAAZ5.js.map → chunk-6QY2NA2M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T3P7PMZP.js.map → chunk-6YB7HG2J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YVKZ3ANP.js.map → chunk-724VLYDJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LCWQP6NM.js.map → chunk-7G5SUU6F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MDHWWBNZ.js.map → chunk-7ITQSEBL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZFTKYWIF.js.map → chunk-A222YWOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6NYJGMTY.js.map → chunk-A2W3XKAD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YSDFIY7N.js.map → chunk-AOP2EMK3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6KRFL33E.js.map → chunk-CN4OAA2G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3W2HJKJX.js.map → chunk-CQFZRLXQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K5DT2YKM.js.map → chunk-CQISNF3Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5IZUBZBR.js.map → chunk-D2LDM35X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YPWUSH72.js.map → chunk-DJ5S2LDY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z5F6XZXE.js.map → chunk-EB4BBEZD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ERG65A2L.js.map → chunk-EH23N5FX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SU2E4AWU.js.map → chunk-FDNJMYZB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CXR3CMBQ.js.map → chunk-FMWQRMHS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T4XBKJ3F.js.map → chunk-HL742IBM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YF746GTH.js.map → chunk-J4KNRDI3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BI4R7HI2.js.map → chunk-JZJJEJBR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XRYSCRZR.js.map → chunk-KKHIQOTN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WJA3PXW7.js.map → chunk-M6PR5BC6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5E7N4T2Z.js.map → chunk-MZ4NH46V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AJHYQCBJ.js.map → chunk-MZG6I2Q2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P5L7Z2O6.js.map → chunk-N2LOJUBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WRYERRZX.js.map → chunk-NGDK3KEZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YSGTMDWC.js.map → chunk-NHKXOMZ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FZJM2TXF.js.map → chunk-OTSP6UEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LOWVNZBZ.js.map → chunk-PUVPC5DL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z7RPDF2Y.js.map → chunk-PV5JS7MP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KEZOIPCR.js.map → chunk-Q2266G4S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-67LARBDL.js.map → chunk-Q3XVLRCJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PULUSQAV.js.map → chunk-R7EMP4JG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JPATY4SE.js.map → chunk-SBNT6SLO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FH2H3CBD.js.map → chunk-T5RTYLZJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-U5TR4N7J.js.map → chunk-TGYDJEJH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ER4ME5U2.js.map → chunk-TO4KCIOT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FUFFPIYA.js.map → chunk-TUV7SIWZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TQ6AX5SQ.js.map → chunk-UGDONITK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4WB6S4YX.js.map → chunk-UYLA5ROU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A3OQ7TFW.js.map → chunk-V655JQ5J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SU3TB4NS.js.map → chunk-W5X3AHJN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-32IUNTG4.js.map → chunk-WBWRQS32.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UMNQZS4H.js.map → chunk-WOOB7PV7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EQURFOMH.js.map → chunk-WSDIALO4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MEZZZBYX.js.map → chunk-WTXDLBSZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7LYO6S5A.js.map → chunk-XBIYI23P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OGLGI22K.js.map → chunk-XQCWTSLO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7CLLC75T.js.map → chunk-Y2VSCQ77.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GVJE5T7Q.js.map → chunk-YZR7UMZ6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EJ2OCBHF.js.map → chunk-YZWXMDNH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GUYNUXQT.js.map → chunk-ZIEGTQCY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BE2SR6QL.js.map → chunk-ZZWMJVW2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-5GU7OE67.js.map → claim-D6L33A5Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-2BGBGSVI.js.map → claim-YAFUTPVK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-6YODBUIV.js.map → close-KLDLHAOP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-AFVKPR57.js.map → close-TGYXG7TV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-7KLOSYLP.js.map → close-many-4QSWKCRU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-JKUJMHLG.js.map → close-many-SNA6LNZH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-DNWHEBOS.js.map → comments-QC6ARR5X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-RW23R3VE.js.map → comments-ZHVYGUVC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-AUM5WBYA.js.map → config-O6W2EU2G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-OZWSA2NP.js.map → config-XQRFJXJP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-PKCEHQY3.js.map → context-IHE3IXN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-OYXRGY7S.js.map → context-WSYWBEUL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-X74F2GSM.js.map → contracts-CVBINC7C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-L6ODXNUM.js.map → contracts-NLCDIZAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-I4NCLBR4.js.map → copy-7MUQC44A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-6XOR3HKN.js.map → copy-ANWXDJVC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-Z7YCH3BE.js.map → create-AJ6HUR5W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-PM45M6PE.js.map → create-JIA2IFCO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-7YXHYG67.js.map → delete-5OLYWQIC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-LPISP43T.js.map → delete-INHKCIRN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-N2T26FME.js.map → deps-CCSWGZW7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-WATKQDE3.js.map → deps-IYEID3QX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-Z3X6JZLT.js.map → docs-3XZK22WF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-6LQ3GLM7.js.map → docs-PKO7OEIM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-6DCLG52D.js.map → eval-5XYP6NMY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-Y3ZCUTHK.js.map → eval-O4WGQYDI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-QWE4YYK5.js.map → extension-PVGRRZZG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-BNINIMT7.js.map → extension-T7JNTAAA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-2Q3K76G2.js.map → focus-6FA5KYRY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-ATLBWXXD.js.map → focus-CQ63JFDG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-RUYEMNRF.js.map → gc-3BG67KTO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-TDWSDR66.js.map → gc-PEZYGNVB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-LY6M2JIM.js.map → get-J6CSJ4SX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-2WGLX74N.js.map → get-KJTKGNEQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-4RKHYS3T.js.map → health-32UQICEL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-TMFVNYRA.js.map → health-ZUZG5ULV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-CGNQJXFE.js.map → history-IOH6FKG7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-SGRRS72R.js.map → history-W6QVR6FA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-IRL7WJ3E.js.map → history-redact-TUWOUYX5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-N3JK7VBW.js.map → history-redact-VVDOARNO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-XIDPABA4.js.map → init-CZLEEE6Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-4GESW7RM.js.map → init-MAA6UMNQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-4FJY7WIW.js.map → learnings-EYC3OKS2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-4BHWFFUV.js.map → learnings-HKJJUVTA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-D7BF5CL2.js.map → list-HFD5737R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-472TIOVK.js.map → list-KN3TL5Y5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{next-SFQZVX2B.js.map → next-DQUMFAHG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{next-D5STGWI2.js.map → next-JUEYC5HE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-W4UEICGF.js.map → notes-XATYT43P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-6KNOSLIT.js.map → notes-ZG6RLZXB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-JO6V7BXO.js.map → plan-5NWQL2DH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-MJQW5XK3.js.map → plan-DVVLX7LK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-WIQY2KCV.js.map → profile-54DZ4CLB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-3TOTMUR4.js.map → profile-PLIQVEOY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-ROFE2YPC.js.map → register-mutation-ET6E4VLE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-SJWMVIJ2.js.map → register-mutation-K2MNRWGI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-operations-MEKU3AKC.js.map → register-operations-6DQRUTIX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-operations-IADFVH53.js.map → register-operations-73UDWMVB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-3QJY43CY.js.map → register-setup-FXZJ2CEJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-AJWUSSQX.js.map → register-setup-LYYCMQFV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-EXHU34EU.js.map → restore-L27TMMCF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-44IHMMZZ.js.map → restore-R6YJHQK3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js.map → scheduling-shortcuts-LE4S7OI7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-TSBK4AY5.js.map → scheduling-shortcuts-OGODPUBL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-VBCELP5G.js.map → schema-ICCD3HOP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-IB2NZZWD.js.map → schema-RHH23PQX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-R227JOL6.js.map → search-HDDKOPFE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-7UBETML4.js.map → search-Z2VGP2Q5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-MCK7PLYS.js.map → stats-DHMRXHOB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-FAG7COEH.js.map → stats-ETFP37MB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-GVVUQSJQ.js.map → telemetry-NUZNKDCP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-DRPDZMAO.js.map → telemetry-ZRBM22QD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-SY76DZTO.js.map → test-H36PM746.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-QY44WAMR.js.map → test-XNKTIP4Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-USPJHXFR.js.map → test-all-APCBSXQI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-QD6QAEG7.js.map → test-all-KIK3OYBY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-QIR5MJPL.js.map → test-runs-5SLLV3XU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-MG5VIGSK.js.map → test-runs-L3WKLO67.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-A7EICML6.js.map → update-RQKI3AMW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-IKJZWLQC.js.map → update-ZM7NJWHY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-BEMTDA2X.js.map → update-many-GFCQG6ZQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-RATAARHU.js.map → update-many-XGTJ7QIU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-VU46BLJZ.js.map → upgrade-KJ3JGELR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-NWMR3VQL.js.map → upgrade-RBRQ7PQU.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../cli/commands/init.ts", "../../../../../../../../cli/commands/init-agent-guidance.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module cli/commands/init\n *\n * Implements the pm init 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 { getActiveExtensionRegistrations, runActiveOnWriteHooks } from \"../../core/extensions/index.js\";\nimport { pathExists, readFileIfExists, writeFileAtomic } from \"../../core/fs/fs-utils.js\";\nimport { normalizePrefix } from \"../../core/item/id.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport {\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,\n ensureRuntimeSchemaFileScaffold,\n filePathForSchemaSection,\n normalizeRuntimeSchemaSettings,\n} from \"../../core/schema/runtime-schema.js\";\nimport {\n parseItemTypesFile,\n serializeItemTypesFile,\n upsertItemType,\n} from \"../../core/schema/item-types-file.js\";\nimport {\n normalizeTypePresetName,\n resolveTypePresetDefinitions,\n TYPE_PRESET_NAMES,\n type TypePresetName,\n} from \"../../core/schema/type-presets.js\";\nimport { EXIT_CODE, GOVERNANCE_PRESET_DEFAULTS, PM_REQUIRED_SUBDIRS, SETTINGS_DEFAULTS } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings, writeSettings } from \"../../core/store/settings.js\";\nimport type { GovernancePreset, PmSettings } from \"../../types/index.js\";\nimport { runExtension, type ExtensionCommandResult } from \"./extension.js\";\nimport {\n INIT_AGENT_GUIDANCE_MODE_VALUES,\n runInitAgentGuidance,\n type InitAgentGuidanceMode,\n type InitAgentGuidanceSummary,\n} from \"./init-agent-guidance.js\";\n\n/**\n * Documents the init installed packages summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface InitInstalledPackagesSummary {\n installed_all: boolean;\n installed_count: number;\n packages: Array<{\n alias: string;\n ok: boolean;\n }>;\n}\n\n/**\n * Restricts init type preset name values accepted by command, SDK, and storage contracts.\n */\nexport type InitTypePresetName = TypePresetName;\n\n/**\n * Documents the init registered type preset summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface InitRegisteredTypePresetSummary {\n name: InitTypePresetName;\n registered: string[];\n updated: string[];\n file: string;\n}\n\n/**\n * Documents the init agent-guidance summary plus generated next-step hints returned by init.\n */\nexport type InitAgentGuidanceResult = InitAgentGuidanceSummary & { next_steps: string[] };\n\n/**\n * Documents the init result payload exchanged by command, SDK, and package integrations.\n */\nexport interface InitResult {\n ok: boolean;\n path: string;\n settings: PmSettings;\n created_dirs: string[];\n warnings: string[];\n governance_preset: GovernancePreset;\n wizard_used: boolean;\n registered_type_preset?: InitRegisteredTypePresetSummary;\n installed_packages?: InitInstalledPackagesSummary;\n next_steps: string[];\n agent_guidance: InitAgentGuidanceResult;\n}\n\n/**\n * Documents the init command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface InitCommandOptions {\n preset?: string;\n defaults?: boolean;\n author?: string;\n withPackages?: boolean;\n agentGuidance?: string;\n typePreset?: string;\n force?: boolean;\n}\n\n/**\n * Concise projection of an InitResult for the default (toon) renderer. It keeps\n * every piece of information that only init can surface — the resolved path, id\n * prefix, governance preset, telemetry capture level, created-directory count,\n * the full warnings list (including `already_exists:` markers), agent-guidance\n * summary, and next steps — but replaces the verbose full settings tree (~190\n * lines) with a compact `settings` summary. Use --verbose for the full tree.\n */\nexport interface InitConciseResult {\n ok: boolean;\n path: string;\n id_prefix: string;\n governance_preset: GovernancePreset;\n telemetry: {\n enabled: boolean;\n capture_level: string;\n };\n output_format: string;\n created_dirs_count: number;\n created_dirs: string[];\n warnings: string[];\n wizard_used: boolean;\n registered_type_preset?: InitRegisteredTypePresetSummary;\n installed_packages?: InitInstalledPackagesSummary;\n next_steps: string[];\n agent_guidance: InitAgentGuidanceResult;\n hint: string;\n}\n\n/**\n * Implements summarize init result for the public runtime surface of this module.\n */\nexport function summarizeInitResult(result: InitResult): InitConciseResult {\n return {\n ok: result.ok,\n path: result.path,\n id_prefix: result.settings.id_prefix,\n governance_preset: result.governance_preset,\n telemetry: {\n enabled: result.settings.telemetry.enabled,\n capture_level: result.settings.telemetry.capture_level,\n },\n output_format: result.settings.output.default_format,\n created_dirs_count: result.created_dirs.length,\n created_dirs: result.created_dirs,\n warnings: result.warnings,\n wizard_used: result.wizard_used,\n ...(result.registered_type_preset ? { registered_type_preset: result.registered_type_preset } : {}),\n ...(result.installed_packages ? { installed_packages: result.installed_packages } : {}),\n next_steps: result.next_steps,\n agent_guidance: result.agent_guidance,\n hint: \"Re-run with --verbose for the full settings tree.\",\n };\n}\n\nexport const _testOnly = {\n normalizeInitGovernancePreset,\n normalizeInitTypePreset,\n normalizeOptionalInitAuthor,\n normalizeInitAgentGuidanceMode,\n isPathLikeInitTarget,\n resolveInitInvocation,\n parseYesNoChoice,\n applyGovernancePreset,\n runInitWizard,\n setInitReadlineFactoryForTests,\n summarizeInstalledPackages,\n registerInitTypePreset,\n assertExplicitTrackerPathIsNotWorkspaceRoot,\n isLikelyWorkspaceRoot,\n};\n\ntype InitReadlineInterface = ReturnType<typeof readline.createInterface>;\nlet createInitReadlineInterface = (): InitReadlineInterface => readline.createInterface({ input, output });\n\ninterface InitNormalizedOptions {\n presetFromOption: BuiltinGovernancePreset | undefined;\n useDefaults: boolean;\n authorFromOption: string | undefined;\n installBundledPackages: boolean;\n agentGuidanceMode: InitAgentGuidanceMode;\n typePreset: InitTypePresetName | undefined;\n}\n\ninterface InitSettingsResolution {\n settings: PmSettings;\n normalizedPrefix: string;\n chosenPreset: BuiltinGovernancePreset | undefined;\n wizardUsed: boolean;\n}\n\nfunction setInitReadlineFactoryForTests(factory: (() => InitReadlineInterface) | undefined): void {\n createInitReadlineInterface = factory ?? (() => readline.createInterface({ input, output }));\n}\n\nfunction cloneDefaults(): PmSettings {\n return structuredClone(SETTINGS_DEFAULTS);\n}\n\ntype BuiltinGovernancePreset = Exclude<GovernancePreset, \"custom\">;\nconst BUILTIN_GOVERNANCE_PRESETS: BuiltinGovernancePreset[] = [\"minimal\", \"default\", \"strict\"];\nfunction normalizeInitGovernancePreset(rawValue: string | undefined): BuiltinGovernancePreset | undefined {\n if (rawValue === undefined) {\n return undefined;\n }\n const normalized = rawValue.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized.length === 0) {\n throw new PmCliError(\"--preset must not be empty\", EXIT_CODE.USAGE);\n }\n if (normalized === \"minimal\" || normalized === \"default\" || normalized === \"strict\") {\n return normalized;\n }\n if (normalized === \"lite\" || normalized === \"minimum\") {\n return \"minimal\";\n }\n throw new PmCliError(\n `Invalid --preset value \"${rawValue}\". Allowed: ${BUILTIN_GOVERNANCE_PRESETS.join(\", \")}`,\n EXIT_CODE.USAGE,\n );\n}\n\nfunction normalizeInitTypePreset(rawValue: string | undefined): InitTypePresetName | undefined {\n if (rawValue === undefined) {\n return undefined;\n }\n if (rawValue.trim().length === 0) {\n throw new PmCliError(\"--type-preset must not be empty\", EXIT_CODE.USAGE);\n }\n try {\n // Non-undefined input never returns undefined; the shared normalizer throws\n // a plain Error for empty/unknown values, which we re-map to init's --type-preset\n // PmCliError wording for a consistent CLI surface.\n return normalizeTypePresetName(rawValue) as InitTypePresetName;\n } catch {\n throw new PmCliError(\n `Invalid --type-preset value \"${rawValue}\". Allowed: ${TYPE_PRESET_NAMES.join(\", \")}`,\n EXIT_CODE.USAGE,\n );\n }\n}\n\nfunction normalizeOptionalInitAuthor(rawValue: string | undefined): string | undefined {\n if (rawValue === undefined) {\n return undefined;\n }\n const normalized = rawValue.trim();\n if (normalized.length === 0) {\n throw new PmCliError(\"--author must not be empty\", EXIT_CODE.USAGE);\n }\n return normalized;\n}\n\nfunction isPathLikeInitTarget(rawValue: string | undefined): boolean {\n if (rawValue === undefined) {\n return false;\n }\n const trimmed = rawValue.trim();\n if (trimmed.length === 0) {\n return false;\n }\n return path.isAbsolute(trimmed) || trimmed.startsWith(\".\") || trimmed.includes(\"/\") || trimmed.includes(\"\\\\\");\n}\n\nfunction resolveInitInvocation(\n cwd: string,\n global: GlobalOptions,\n prefixArg: string | undefined,\n): { pmRoot: string; prefixArg: string | undefined; positional_target?: string } {\n if (global.path === undefined && isPathLikeInitTarget(prefixArg)) {\n const positionalTarget = path.resolve(cwd, prefixArg!.trim());\n return {\n pmRoot: positionalTarget,\n prefixArg: undefined,\n positional_target: positionalTarget,\n };\n }\n return {\n pmRoot: resolvePmRoot(cwd, global.path),\n prefixArg,\n };\n}\n\nfunction normalizeInitAgentGuidanceMode(rawValue: string | undefined): InitAgentGuidanceMode {\n if (rawValue === undefined) {\n return \"ask\";\n }\n const normalized = rawValue.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized.length === 0) {\n throw new PmCliError(\"--agent-guidance must not be empty\", EXIT_CODE.USAGE);\n }\n if (normalized === \"ask\" || normalized === \"add\" || normalized === \"skip\" || normalized === \"status\") {\n return normalized;\n }\n throw new PmCliError(\n `Invalid --agent-guidance value \"${rawValue}\". Allowed: ${INIT_AGENT_GUIDANCE_MODE_VALUES.join(\", \")}`,\n EXIT_CODE.USAGE,\n );\n}\n\nfunction parseYesNoChoice(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\nfunction applyGovernancePreset(settings: PmSettings, preset: BuiltinGovernancePreset): void {\n const knobs = GOVERNANCE_PRESET_DEFAULTS[preset];\n settings.governance = {\n preset,\n ...knobs,\n };\n settings.validation.parent_reference = knobs.parent_reference;\n settings.validation.metadata_profile = knobs.metadata_profile;\n}\n\nfunction isInstalledPackageEntry(value: unknown): value is { alias?: unknown; ok?: unknown } {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction summarizeInstalledPackages(result: ExtensionCommandResult): InitInstalledPackagesSummary {\n const details = result.details as {\n installed_all?: unknown;\n installed_count?: unknown;\n packages?: Array<{\n alias?: unknown;\n ok?: unknown;\n }>;\n };\n return {\n installed_all: details.installed_all === true,\n installed_count: typeof details.installed_count === \"number\" ? details.installed_count : 0,\n packages: Array.isArray(details.packages)\n ? details.packages.filter(isInstalledPackageEntry).map((entry) => ({\n alias: typeof entry.alias === \"string\" ? entry.alias : \"\",\n ok: entry.ok === true,\n }))\n : [],\n };\n}\n\nasync function registerInitTypePreset(\n pmRoot: string,\n settings: PmSettings,\n preset: InitTypePresetName,\n): Promise<InitRegisteredTypePresetSummary> {\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const typesPath = filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);\n const parsed = parseItemTypesFile(await readFileIfExists(typesPath));\n let nextFile = parsed;\n const registered: string[] = [];\n const updated: string[] = [];\n for (const normalized of resolveTypePresetDefinitions(preset)) {\n const upsert = upsertItemType(nextFile, normalized);\n nextFile = upsert.file;\n (upsert.replaced ? updated : registered).push(upsert.definition.name);\n }\n await writeFileAtomic(typesPath, serializeItemTypesFile(nextFile));\n return {\n name: preset,\n registered,\n updated,\n file: typesPath,\n };\n}\n\nasync function isLikelyWorkspaceRoot(candidate: string): Promise<boolean> {\n const indicators = [\n \".git\",\n \"package.json\",\n \"pnpm-workspace.yaml\",\n \"AGENTS.md\",\n path.join(\".agents\", \"pm\"),\n ];\n for (const indicator of indicators) {\n if (await pathExists(path.join(candidate, indicator))) {\n return true;\n }\n }\n return false;\n}\n\nasync function assertExplicitTrackerPathIsNotWorkspaceRoot(pmRoot: string, global: GlobalOptions, force: boolean): Promise<void> {\n if (global.path === undefined || force) {\n return;\n }\n if (await pathExists(path.join(pmRoot, \"settings.json\"))) {\n return;\n }\n if (!(await isLikelyWorkspaceRoot(pmRoot))) {\n return;\n }\n const nestedTracker = path.join(pmRoot, \".agents\", \"pm\");\n throw new PmCliError(\n `Refusing to initialize tracker files directly in workspace root \"${pmRoot}\".`,\n EXIT_CODE.USAGE,\n {\n code: \"workspace_root_pm_path\",\n type: \"urn:pm-cli:error:workspace_root_pm_path\",\n why: \"--pm-path/--path points at the tracker storage directory itself, not the repository workspace. Point it at .agents/pm or pass --force if you intentionally want root-level tracker files.\",\n examples: [\n `pm --pm-path ${nestedTracker} init --yes`,\n \"pm init --yes\",\n `pm --pm-path ${pmRoot} init --yes --force`,\n ],\n nextSteps: [\n \"Use --pm-path <repo>/.agents/pm for repository-local tracker storage.\",\n \"Use PM_PATH only for sandboxed tests or explicit tracker roots.\",\n \"Pass --force only when root-level tracker files are intentional.\",\n ],\n recovery: {\n next_best_command: `pm --pm-path ${nestedTracker} init --yes`,\n },\n },\n );\n}\n\nasync function ensureInitDirectories(pmRoot: string, subdirs: readonly string[]): Promise<{\n createdDirs: string[];\n warnings: string[];\n}> {\n const createdDirs: string[] = [];\n const warnings: string[] = [];\n for (const subdir of subdirs) {\n const target = subdir ? path.join(pmRoot, subdir) : pmRoot;\n const existed = await pathExists(target);\n await fs.mkdir(target, { recursive: true });\n if (existed) {\n warnings.push(`already_exists:${target}`);\n } else {\n createdDirs.push(target);\n }\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: target,\n scope: \"project\",\n op: \"init:ensure_dir\",\n })),\n );\n }\n return { createdDirs, warnings };\n}\n\nasync function runInitWizard(initialPrefix: string, telemetryDefault: boolean): Promise<{\n prefix: string;\n preset: BuiltinGovernancePreset;\n telemetry_enabled: boolean;\n}> {\n const rl = createInitReadlineInterface();\n try {\n output.write(\"pm init setup wizard (agent-optimized)\\n\");\n output.write(\"This walkthrough is non-destructive and each choice can be changed later with pm config.\\n\\n\");\n\n output.write(\"1/3 Item ID prefix\\n\");\n output.write(\"Prefix is prepended to generated IDs (for example pm-a1b2).\\n\");\n const prefixAnswer = await rl.question(`Item ID prefix [${initialPrefix}]: `);\n const resolvedPrefix = prefixAnswer.trim().length > 0 ? normalizePrefix(prefixAnswer) : initialPrefix;\n\n output.write(\"\\n2/3 Governance preset\\n\");\n output.write(\"minimal: no ownership blocking, progressive create defaults, close validation off.\\n\");\n output.write(\"default: ownership conflict warnings, progressive create defaults, close validation warn.\\n\");\n output.write(\"strict: ownership blocking, strict create defaults, close validation strict.\\n\");\n const presetAnswer = await rl.question(\"Governance preset [minimal/default/strict] (default: minimal): \");\n const presetChoice = presetAnswer.trim().length > 0 ? presetAnswer.trim() : \"minimal\";\n // The wizard is forgiving: a typo'd/unknown preset defaults to minimal with a\n // notice instead of throwing and aborting an in-progress interactive setup.\n // normalizeInitGovernancePreset returns a concrete preset for valid input and\n // throws (never returns undefined) for invalid non-empty input, so the result is\n // always a BuiltinGovernancePreset on the success path.\n let resolvedPreset: BuiltinGovernancePreset = \"minimal\";\n try {\n resolvedPreset = normalizeInitGovernancePreset(presetChoice) as BuiltinGovernancePreset;\n } catch {\n output.write(`Unrecognized governance preset \"${presetChoice}\"; using minimal.\\n`);\n }\n\n output.write(\"\\n3/3 Project telemetry\\n\");\n output.write(\"Telemetry helps improve reliability and can be disabled anytime via pm config.\\n\");\n const telemetryLabel = telemetryDefault ? \"Y/n\" : \"y/N\";\n const telemetryAnswer = await rl.question(`Enable telemetry for this project? [${telemetryLabel}] `);\n const telemetryEnabled = parseYesNoChoice(telemetryAnswer, telemetryDefault);\n\n output.write(\"\\n\");\n return {\n prefix: resolvedPrefix,\n preset: resolvedPreset,\n telemetry_enabled: telemetryEnabled,\n };\n } finally {\n rl.close();\n }\n}\n\nfunction normalizeInitCommandOptions(options: InitCommandOptions): InitNormalizedOptions {\n return {\n presetFromOption: normalizeInitGovernancePreset(options.preset),\n useDefaults: options.defaults === true,\n authorFromOption: normalizeOptionalInitAuthor(options.author),\n installBundledPackages: options.withPackages === true,\n agentGuidanceMode: normalizeInitAgentGuidanceMode(options.agentGuidance),\n typePreset: normalizeInitTypePreset(options.typePreset),\n };\n}\n\nfunction collectExistingSettingsPendingChanges(params: {\n settings: PmSettings;\n normalizedPrefix: string;\n prefixArg: string | undefined;\n presetFromOption: BuiltinGovernancePreset | undefined;\n authorFromOption: string | undefined;\n}): string[] {\n const pendingChanges: string[] = [];\n if (params.prefixArg !== undefined && params.settings.id_prefix !== params.normalizedPrefix) {\n pendingChanges.push(\"id_prefix\");\n }\n if (params.presetFromOption !== undefined && params.settings.governance.preset !== params.presetFromOption) {\n pendingChanges.push(\"governance_preset\");\n }\n if (params.authorFromOption !== undefined && params.settings.author_default !== params.authorFromOption) {\n pendingChanges.push(\"author_default\");\n }\n return pendingChanges;\n}\n\nfunction assertExistingSettingsUpdateAllowed(settingsPath: string, pendingChanges: string[], force: boolean): void {\n if (pendingChanges.length === 0 || force) {\n return;\n }\n throw new PmCliError(\n `Refusing to update existing tracker settings at ${settingsPath} without --force.`,\n EXIT_CODE.USAGE,\n {\n code: \"init_existing_settings_requires_force\",\n type: \"urn:pm-cli:error:init_existing_settings_requires_force\",\n required: `--force for ${pendingChanges.join(\", \")}`,\n why: \"pm init is safe to rerun, but changing id prefix, governance preset, or default author on an existing tracker can corrupt long-lived project context when an agent meant to initialize a sandbox path.\",\n examples: [\n \"pm init --yes\",\n \"pm init ./sandbox-pm --yes\",\n \"pm init acme --yes --force\",\n ],\n nextSteps: [\n \"If you meant to initialize a sandbox tracker, pass a path-like positional such as ./sandbox-pm or /tmp/pm-test.\",\n \"If you intentionally want to rewrite this existing tracker's init-managed settings, rerun with --force.\",\n ],\n },\n );\n}\n\nfunction applyExistingSettingsUpdates(params: {\n settings: PmSettings;\n normalizedPrefix: string;\n prefixArg: string | undefined;\n presetFromOption: BuiltinGovernancePreset | undefined;\n authorFromOption: string | undefined;\n warnings: string[];\n}): boolean {\n let changed = false;\n if (params.prefixArg !== undefined && params.settings.id_prefix !== params.normalizedPrefix) {\n params.settings.id_prefix = params.normalizedPrefix;\n params.warnings.push(`updated:id_prefix:${params.normalizedPrefix}`);\n changed = true;\n }\n if (params.presetFromOption !== undefined && params.settings.governance.preset !== params.presetFromOption) {\n applyGovernancePreset(params.settings, params.presetFromOption);\n params.warnings.push(`updated:governance_preset:${params.presetFromOption}`);\n changed = true;\n }\n if (params.authorFromOption !== undefined && params.settings.author_default !== params.authorFromOption) {\n params.settings.author_default = params.authorFromOption;\n params.warnings.push(`updated:author_default:${params.authorFromOption}`);\n changed = true;\n }\n return changed;\n}\n\nasync function loadExistingInitSettings(params: {\n pmRoot: string;\n settingsPath: string;\n normalizedPrefix: string;\n prefixArg: string | undefined;\n options: InitCommandOptions;\n normalizedOptions: InitNormalizedOptions;\n warnings: string[];\n}): Promise<InitSettingsResolution> {\n const settings = await readSettings(params.pmRoot);\n params.warnings.push(`already_exists:${params.settingsPath}`);\n const pendingChanges = collectExistingSettingsPendingChanges({\n settings,\n normalizedPrefix: params.normalizedPrefix,\n prefixArg: params.prefixArg,\n presetFromOption: params.normalizedOptions.presetFromOption,\n authorFromOption: params.normalizedOptions.authorFromOption,\n });\n assertExistingSettingsUpdateAllowed(params.settingsPath, pendingChanges, params.options.force === true);\n if (\n applyExistingSettingsUpdates({\n settings,\n normalizedPrefix: params.normalizedPrefix,\n prefixArg: params.prefixArg,\n presetFromOption: params.normalizedOptions.presetFromOption,\n authorFromOption: params.normalizedOptions.authorFromOption,\n warnings: params.warnings,\n })\n ) {\n await writeSettings(params.pmRoot, settings);\n }\n return {\n settings,\n normalizedPrefix: params.normalizedPrefix,\n chosenPreset: params.normalizedOptions.presetFromOption,\n wizardUsed: false,\n };\n}\n\nasync function createNewInitSettings(params: {\n pmRoot: string;\n normalizedPrefix: string;\n normalizedOptions: InitNormalizedOptions;\n}): Promise<InitSettingsResolution> {\n let normalizedPrefix = params.normalizedPrefix;\n let chosenPreset = params.normalizedOptions.presetFromOption;\n let chosenTelemetryEnabled: boolean | undefined;\n let wizardUsed = false;\n if (\n params.normalizedOptions.presetFromOption === undefined &&\n !params.normalizedOptions.useDefaults &&\n process.stdin.isTTY === true &&\n process.stdout.isTTY === true\n ) {\n const wizardChoices = await runInitWizard(normalizedPrefix, SETTINGS_DEFAULTS.telemetry.enabled);\n normalizedPrefix = wizardChoices.prefix;\n chosenPreset = wizardChoices.preset;\n chosenTelemetryEnabled = wizardChoices.telemetry_enabled;\n wizardUsed = true;\n }\n const effectivePreset = chosenPreset ?? \"minimal\";\n const settings = cloneDefaults();\n settings.id_prefix = normalizedPrefix;\n applyGovernancePreset(settings, effectivePreset);\n if (params.normalizedOptions.authorFromOption !== undefined) {\n settings.author_default = params.normalizedOptions.authorFromOption;\n }\n if (chosenTelemetryEnabled !== undefined) {\n settings.telemetry.enabled = chosenTelemetryEnabled;\n settings.telemetry.first_run_prompt_completed = true;\n }\n await writeSettings(params.pmRoot, settings);\n return {\n settings,\n normalizedPrefix,\n chosenPreset,\n wizardUsed,\n };\n}\n\nasync function resolveInitSettings(params: {\n pmRoot: string;\n settingsPath: string;\n settingsExists: boolean;\n normalizedPrefix: string;\n prefixArg: string | undefined;\n options: InitCommandOptions;\n normalizedOptions: InitNormalizedOptions;\n warnings: string[];\n}): Promise<InitSettingsResolution> {\n if (params.settingsExists) {\n return await loadExistingInitSettings(params);\n }\n return await createNewInitSettings({\n pmRoot: params.pmRoot,\n normalizedPrefix: params.normalizedPrefix,\n normalizedOptions: params.normalizedOptions,\n });\n}\n\nasync function applyInitAgentGuidance(params: {\n pmRoot: string;\n cwd: string;\n agentGuidanceMode: InitAgentGuidanceMode;\n settings: PmSettings;\n warnings: string[];\n}): Promise<InitAgentGuidanceResult> {\n const agentGuidanceResult = await runInitAgentGuidance({\n pm_root: params.pmRoot,\n cwd: params.cwd,\n mode: params.agentGuidanceMode,\n interactive: process.stdin.isTTY === true && process.stdout.isTTY === true,\n settings: params.settings,\n });\n params.warnings.push(...agentGuidanceResult.warnings);\n if (agentGuidanceResult.settings_changed) {\n await writeSettings(params.pmRoot, params.settings);\n }\n return {\n ...agentGuidanceResult.summary,\n next_steps: agentGuidanceResult.next_steps,\n };\n}\n\nasync function ensureInitRuntimeSchemaFiles(\n pmRoot: string,\n settings: PmSettings,\n): Promise<{\n createdDirs: string[];\n warnings: string[];\n}> {\n const createdDirs: string[] = [];\n const warnings: string[] = [];\n const runtimeSchemaScaffold = await ensureRuntimeSchemaFileScaffold(pmRoot, settings.schema);\n for (const createdPath of runtimeSchemaScaffold.created_paths) {\n createdDirs.push(createdPath);\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: createdPath,\n scope: \"project\",\n op: \"init:runtime_schema_file\",\n })),\n );\n }\n return { createdDirs, warnings };\n}\n\nasync function maybeRegisterInitTypePreset(params: {\n pmRoot: string;\n settings: PmSettings;\n typePreset: InitTypePresetName | undefined;\n warnings: string[];\n}): Promise<InitRegisteredTypePresetSummary | undefined> {\n if (params.typePreset === undefined) {\n return undefined;\n }\n const registeredTypePreset = await registerInitTypePreset(params.pmRoot, params.settings, params.typePreset);\n params.warnings.push(`registered_type_preset:${params.typePreset}`);\n params.warnings.push(\n ...(await runActiveOnWriteHooks({\n path: registeredTypePreset.file,\n scope: \"project\",\n op: \"init:type_preset\",\n })),\n );\n return registeredTypePreset;\n}\n\nasync function ensureInitTypeDirectories(params: {\n pmRoot: string;\n settings: PmSettings;\n createdDirs: string[];\n warnings: string[];\n}): Promise<void> {\n const typeRegistry = resolveItemTypeRegistry(params.settings, getActiveExtensionRegistrations());\n const customTypeFolders = typeRegistry.folders.filter((folder) => !(PM_REQUIRED_SUBDIRS as readonly string[]).includes(folder));\n const scaffold = await ensureInitDirectories(params.pmRoot, customTypeFolders);\n params.createdDirs.push(...scaffold.createdDirs);\n params.warnings.push(...scaffold.warnings);\n}\n\nasync function maybeInstallInitBundledPackages(\n installBundledPackages: boolean,\n global: GlobalOptions,\n warnings: string[],\n): Promise<InitInstalledPackagesSummary | undefined> {\n if (!installBundledPackages) {\n return undefined;\n }\n const packageInstallResult = await runExtension(\"all\", { install: true, project: true }, global);\n warnings.push(...packageInstallResult.warnings);\n const installedPackages = summarizeInstalledPackages(packageInstallResult);\n if (!installedPackages.installed_all || installedPackages.packages.some((entry) => !entry.ok)) {\n throw new PmCliError(\"pm init --with-packages did not install all bundled packages successfully.\", EXIT_CODE.GENERIC_FAILURE);\n }\n return installedPackages;\n}\n\nfunction buildInitNextSteps(params: {\n installBundledPackages: boolean;\n registeredTypePreset: InitRegisteredTypePresetSummary | undefined;\n agentGuidanceNextSteps: string[];\n}): string[] {\n const nextSteps: string[] = [\n 'Create your first item: pm create --type Task --title \"<title>\"',\n 'List active items: pm list',\n 'Get agent-friendly project context: pm context',\n ];\n if (!params.installBundledPackages) {\n nextSteps.push(\n \"Add optional packages for richer workflows: pm install calendar --project, pm install templates --project, pm install guide-shell --project\",\n );\n nextSteps.push(\"Or install everything bundled: pm init --with-packages (idempotent on re-run)\");\n } else {\n nextSteps.push(\"Explore newly-available commands: pm cal, pm templates, pm guide\");\n }\n if (params.registeredTypePreset) {\n nextSteps.push(`Inspect registered preset types: pm schema list, pm schema show ${params.registeredTypePreset.registered[0] ?? params.registeredTypePreset.updated[0]}`);\n }\n nextSteps.push(\"Set PM_AUTHOR=<your-agent-id> so mutations attribute to the right caller.\");\n for (const guidanceNextStep of params.agentGuidanceNextSteps) {\n if (!nextSteps.includes(guidanceNextStep)) {\n nextSteps.push(guidanceNextStep);\n }\n }\n return nextSteps;\n}\n\n/**\n * Implements run init for the public runtime surface of this module.\n */\nexport async function runInit(\n prefixArg: string | undefined,\n global: GlobalOptions,\n options: InitCommandOptions = {},\n): Promise<InitResult> {\n const cwd = process.cwd();\n const invocation = resolveInitInvocation(cwd, global, prefixArg);\n const pmRoot = invocation.pmRoot;\n prefixArg = invocation.prefixArg;\n await assertExplicitTrackerPathIsNotWorkspaceRoot(pmRoot, global, options.force === true);\n const createdDirs: string[] = [];\n const warnings: string[] = [];\n const baseDirs = await ensureInitDirectories(pmRoot, PM_REQUIRED_SUBDIRS);\n createdDirs.push(...baseDirs.createdDirs);\n warnings.push(...baseDirs.warnings);\n\n const settingsPath = path.join(pmRoot, \"settings.json\");\n const settingsExists = await pathExists(settingsPath);\n const normalizedOptions = normalizeInitCommandOptions(options);\n const settingsResolution = await resolveInitSettings({\n pmRoot,\n settingsPath,\n settingsExists,\n normalizedPrefix: normalizePrefix(prefixArg),\n prefixArg,\n options,\n normalizedOptions,\n warnings,\n });\n let { settings } = settingsResolution;\n\n const agentGuidance = await applyInitAgentGuidance({\n pmRoot,\n cwd,\n agentGuidanceMode: normalizedOptions.agentGuidanceMode,\n settings,\n warnings,\n });\n\n const schemaFiles = await ensureInitRuntimeSchemaFiles(pmRoot, settings);\n createdDirs.push(...schemaFiles.createdDirs);\n warnings.push(...schemaFiles.warnings);\n\n const registeredTypePreset = await maybeRegisterInitTypePreset({\n pmRoot,\n settings,\n typePreset: normalizedOptions.typePreset,\n warnings,\n });\n if (registeredTypePreset) {\n settings = await readSettings(pmRoot);\n }\n\n await ensureInitTypeDirectories({ pmRoot, settings, createdDirs, warnings });\n const installedPackages = await maybeInstallInitBundledPackages(normalizedOptions.installBundledPackages, global, warnings);\n\n const nextSteps = buildInitNextSteps({\n installBundledPackages: normalizedOptions.installBundledPackages,\n registeredTypePreset,\n agentGuidanceNextSteps: agentGuidance.next_steps,\n });\n\n return {\n ok: true,\n path: pmRoot,\n settings,\n created_dirs: createdDirs,\n warnings,\n governance_preset: settings.governance.preset,\n wizard_used: settingsResolution.wizardUsed,\n ...(registeredTypePreset ? { registered_type_preset: registeredTypePreset } : {}),\n ...(installedPackages ? { installed_packages: installedPackages } : {}),\n next_steps: nextSteps,\n agent_guidance: agentGuidance,\n };\n}\n", "/**\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAOA,SAAQ;AACf,OAAOC,WAAU;AACjB,OAAOC,eAAc;AACrB,SAAS,SAASC,QAAO,UAAUC,eAAc;;;ACHjD,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,OAAO,cAAc;AACrB,SAAS,SAAS,OAAO,UAAU,cAAc;;;;;;;;AAU1C,IAAM,kCAA2D,CAAC,OAAO,OAAO,QAAQ,QAAQ;AAEvG,IAAM,kCAAkC,CAAC,aAAa,WAAW;AACjE,IAAM,iCAAiC;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF,IAAM,0CAA0C;AAChD,IAAM,kCAAkC;AACxC,IAAM,qCAAqC;AAC3C,IAAM,8BAA8B,qCAAqC,+BAA+B;AACxG,IAAM,4BAA4B;AAClC,IAAM,gCAAgC;AAqBtC,IAAI,uCAAuC,MAAsC,SAAS,gBAAgB,EAAE,OAAO,OAAM,CAAE;AAyD3H,SAAS,uBAAuB,aAAqB,YAAkB;AACrE,QAAM,WAAW,KAAK,SAAS,aAAa,UAAU;AACtD,MAAI,SAAS,WAAW,GAAG;AACzB,WAAO,KAAK,SAAS,UAAU;EACjC;AACA,SA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,GAAI,oBAAoB,EAAE,oBAAoB,kBAAiB,IAAK,CAAA;IACpE,YAAY;IACZ,gBAAgB;;AAEpB;",
|
|
6
|
+
"names": ["fs", "path", "readline", "input", "output", "nextContent", "readline", "input", "output", "path", "global", "fs"]
|
|
7
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readHistoryEntries
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EB4BBEZD.js";
|
|
4
4
|
import {
|
|
5
5
|
parseLimit
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3MLQZI3H.js";
|
|
7
7
|
import {
|
|
8
8
|
enforceHistoryStreamPolicyForItems,
|
|
9
9
|
listAllFrontMatterLight
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CN4OAA2G.js";
|
|
11
11
|
import {
|
|
12
12
|
compareTimestampStrings,
|
|
13
13
|
nowIso,
|
|
14
14
|
resolveIsoOrRelative
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MZG6I2Q2.js";
|
|
16
16
|
import {
|
|
17
17
|
EXIT_CODE,
|
|
18
18
|
PmCliError,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
resolveItemTypeRegistry,
|
|
24
24
|
resolvePmRoot,
|
|
25
25
|
runActiveOnReadHooks
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-BDDYM4LH.js";
|
|
27
27
|
|
|
28
28
|
// dist/cli/commands/activity.js
|
|
29
29
|
import fs from "node:fs/promises";
|
|
@@ -213,4 +213,4 @@ export {
|
|
|
213
213
|
_testOnly,
|
|
214
214
|
runActivity
|
|
215
215
|
};
|
|
216
|
-
//# sourceMappingURL=chunk-
|
|
216
|
+
//# sourceMappingURL=chunk-JZJJEJBR.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
locateItem,
|
|
3
3
|
readLocatedItem
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CN4OAA2G.js";
|
|
5
5
|
import {
|
|
6
6
|
nowIso
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MZG6I2Q2.js";
|
|
8
8
|
import {
|
|
9
9
|
coercePositiveInteger,
|
|
10
10
|
getActiveExtensionRegistrations,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
toNonEmptyString,
|
|
21
21
|
trimTrailingSlashes,
|
|
22
22
|
writeFileAtomic
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BDDYM4LH.js";
|
|
24
24
|
|
|
25
25
|
// dist/core/search/http-client.js
|
|
26
26
|
!(function() {
|
|
@@ -2036,4 +2036,4 @@ export {
|
|
|
2036
2036
|
refreshSemanticEmbeddingsForMutatedItems,
|
|
2037
2037
|
refreshSearchArtifactsForMutation
|
|
2038
2038
|
};
|
|
2039
|
-
//# sourceMappingURL=chunk-
|
|
2039
|
+
//# sourceMappingURL=chunk-KKHIQOTN.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4864c4b3-8a15-5324-8332-42e51eb9a217")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
KNOWN_EXTENSION_CAPABILITIES,
|
|
5
5
|
KNOWN_EXTENSION_POLICY_MODES,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
PLAN_MODE_VALUES,
|
|
12
12
|
PLAN_STEP_LINK_KIND_VALUES,
|
|
13
13
|
PLAN_STEP_STATUS_VALUES
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SL2ANJSV.js";
|
|
15
15
|
|
|
16
16
|
// dist/sdk/cli-contracts/commander-types.js
|
|
17
17
|
var LIST_COMMANDER_STRING_OPTION_CONTRACTS = [
|
|
@@ -910,8 +910,10 @@ var GOVERNANCE_AND_CONTENT_FILTER_FLAG_CONTRACTS = [
|
|
|
910
910
|
{ flag: "--no-learnings" },
|
|
911
911
|
{ flag: "--has-files" },
|
|
912
912
|
{ flag: "--no-files" },
|
|
913
|
+
{ flag: "--filter-files-missing" },
|
|
913
914
|
{ flag: "--has-docs" },
|
|
914
915
|
{ flag: "--no-docs" },
|
|
916
|
+
{ flag: "--filter-docs-missing" },
|
|
915
917
|
{ flag: "--has-tests" },
|
|
916
918
|
{ flag: "--no-tests" },
|
|
917
919
|
{ flag: "--has-comments" },
|
|
@@ -2275,8 +2277,10 @@ var TOOL_CONTENT_PRESENCE_OPTION_CONTRACTS = [
|
|
|
2275
2277
|
{ param: "noLearnings", flag: "--no-learnings" },
|
|
2276
2278
|
{ param: "hasFiles", flag: "--has-files" },
|
|
2277
2279
|
{ param: "noFiles", flag: "--no-files" },
|
|
2280
|
+
{ param: "filterFilesMissing", flag: "--filter-files-missing" },
|
|
2278
2281
|
{ param: "hasDocs", flag: "--has-docs" },
|
|
2279
2282
|
{ param: "noDocs", flag: "--no-docs" },
|
|
2283
|
+
{ param: "filterDocsMissing", flag: "--filter-docs-missing" },
|
|
2280
2284
|
{ param: "hasTests", flag: "--has-tests" },
|
|
2281
2285
|
{ param: "noTests", flag: "--no-tests" },
|
|
2282
2286
|
{ param: "hasComments", flag: "--has-comments" },
|
|
@@ -3880,104 +3884,65 @@ var NEXT_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
|
|
|
3880
3884
|
"format"
|
|
3881
3885
|
]);
|
|
3882
3886
|
var AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS = ["author", "message", "force"];
|
|
3887
|
+
var MANAGED_EXTENSION_PACKAGE_OPTION_KEYS = [
|
|
3888
|
+
"target",
|
|
3889
|
+
"scope",
|
|
3890
|
+
"github",
|
|
3891
|
+
"ref",
|
|
3892
|
+
"init",
|
|
3893
|
+
"install",
|
|
3894
|
+
"uninstall",
|
|
3895
|
+
"explore",
|
|
3896
|
+
"manage",
|
|
3897
|
+
"describe",
|
|
3898
|
+
"markdown",
|
|
3899
|
+
"output",
|
|
3900
|
+
"reload",
|
|
3901
|
+
"doctor",
|
|
3902
|
+
"catalog",
|
|
3903
|
+
"adopt",
|
|
3904
|
+
"adoptAll",
|
|
3905
|
+
"activate",
|
|
3906
|
+
"deactivate",
|
|
3907
|
+
"runtimeProbe",
|
|
3908
|
+
"fixManagedState",
|
|
3909
|
+
"detail",
|
|
3910
|
+
"trace",
|
|
3911
|
+
"watch",
|
|
3912
|
+
"strictExit",
|
|
3913
|
+
"failOnWarn"
|
|
3914
|
+
];
|
|
3915
|
+
function managedLifecycleSchemaContracts(prefix) {
|
|
3916
|
+
return {
|
|
3917
|
+
[`${prefix}-init`]: { required: ["target"], optional: ["scope"] },
|
|
3918
|
+
[`${prefix}-install`]: {
|
|
3919
|
+
optional: ["target", "github", "scope", "ref"],
|
|
3920
|
+
anyOfRequired: [["target"], ["github"]]
|
|
3921
|
+
},
|
|
3922
|
+
[`${prefix}-uninstall`]: { required: ["target"], optional: ["scope"] },
|
|
3923
|
+
[`${prefix}-explore`]: { optional: ["scope"] },
|
|
3924
|
+
[`${prefix}-manage`]: { optional: ["scope", "runtimeProbe", "fixManagedState"] },
|
|
3925
|
+
[`${prefix}-describe`]: { optional: ["target", "scope", "markdown", "output"] },
|
|
3926
|
+
[`${prefix}-reload`]: { optional: ["scope", "watch"] },
|
|
3927
|
+
[`${prefix}-doctor`]: { optional: ["scope", "detail", "trace", "fixManagedState", "strictExit", "failOnWarn"] },
|
|
3928
|
+
[`${prefix}-catalog`]: { optional: ["scope", "fields"] },
|
|
3929
|
+
[`${prefix}-adopt`]: { required: ["target"], optional: ["scope", "github", "ref"] },
|
|
3930
|
+
[`${prefix}-adopt-all`]: { optional: ["scope"] },
|
|
3931
|
+
[`${prefix}-activate`]: { required: ["target"], optional: ["scope"] },
|
|
3932
|
+
[`${prefix}-deactivate`]: { required: ["target"], optional: ["scope"] },
|
|
3933
|
+
[prefix]: {
|
|
3934
|
+
optional: MANAGED_EXTENSION_PACKAGE_OPTION_KEYS
|
|
3935
|
+
}
|
|
3936
|
+
};
|
|
3937
|
+
}
|
|
3883
3938
|
var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
3884
3939
|
init: { optional: ["prefix", "preset", "typePreset", "defaults", "author", "agentGuidance", "withPackages", "force", "verbose"] },
|
|
3885
3940
|
config: {
|
|
3886
3941
|
required: ["scope", "configAction"],
|
|
3887
3942
|
optional: ["key", "value", "criterion", "clearCriteria", "format", "policy"]
|
|
3888
3943
|
},
|
|
3889
|
-
"extension
|
|
3890
|
-
"
|
|
3891
|
-
optional: ["target", "github", "scope", "ref"],
|
|
3892
|
-
anyOfRequired: [["target"], ["github"]]
|
|
3893
|
-
},
|
|
3894
|
-
"extension-uninstall": { required: ["target"], optional: ["scope"] },
|
|
3895
|
-
"extension-explore": { optional: ["scope"] },
|
|
3896
|
-
"extension-manage": { optional: ["scope", "runtimeProbe", "fixManagedState"] },
|
|
3897
|
-
"extension-describe": { optional: ["target", "scope", "markdown", "output"] },
|
|
3898
|
-
"extension-reload": { optional: ["scope", "watch"] },
|
|
3899
|
-
"extension-doctor": { optional: ["scope", "detail", "trace", "fixManagedState", "strictExit", "failOnWarn"] },
|
|
3900
|
-
"extension-catalog": { optional: ["scope", "fields"] },
|
|
3901
|
-
"extension-adopt": { required: ["target"], optional: ["scope", "github", "ref"] },
|
|
3902
|
-
"extension-adopt-all": { optional: ["scope"] },
|
|
3903
|
-
"extension-activate": { required: ["target"], optional: ["scope"] },
|
|
3904
|
-
"extension-deactivate": { required: ["target"], optional: ["scope"] },
|
|
3905
|
-
extension: {
|
|
3906
|
-
optional: [
|
|
3907
|
-
"target",
|
|
3908
|
-
"scope",
|
|
3909
|
-
"github",
|
|
3910
|
-
"ref",
|
|
3911
|
-
"init",
|
|
3912
|
-
"install",
|
|
3913
|
-
"uninstall",
|
|
3914
|
-
"explore",
|
|
3915
|
-
"manage",
|
|
3916
|
-
"describe",
|
|
3917
|
-
"markdown",
|
|
3918
|
-
"output",
|
|
3919
|
-
"reload",
|
|
3920
|
-
"doctor",
|
|
3921
|
-
"catalog",
|
|
3922
|
-
"adopt",
|
|
3923
|
-
"adoptAll",
|
|
3924
|
-
"activate",
|
|
3925
|
-
"deactivate",
|
|
3926
|
-
"runtimeProbe",
|
|
3927
|
-
"fixManagedState",
|
|
3928
|
-
"detail",
|
|
3929
|
-
"trace",
|
|
3930
|
-
"watch",
|
|
3931
|
-
"strictExit",
|
|
3932
|
-
"failOnWarn"
|
|
3933
|
-
]
|
|
3934
|
-
},
|
|
3935
|
-
"package-init": { required: ["target"], optional: ["scope"] },
|
|
3936
|
-
"package-install": {
|
|
3937
|
-
optional: ["target", "github", "scope", "ref"],
|
|
3938
|
-
anyOfRequired: [["target"], ["github"]]
|
|
3939
|
-
},
|
|
3940
|
-
"package-uninstall": { required: ["target"], optional: ["scope"] },
|
|
3941
|
-
"package-explore": { optional: ["scope"] },
|
|
3942
|
-
"package-manage": { optional: ["scope", "runtimeProbe", "fixManagedState"] },
|
|
3943
|
-
"package-describe": { optional: ["target", "scope", "markdown", "output"] },
|
|
3944
|
-
"package-reload": { optional: ["scope", "watch"] },
|
|
3945
|
-
"package-doctor": { optional: ["scope", "detail", "trace", "fixManagedState", "strictExit", "failOnWarn"] },
|
|
3946
|
-
"package-catalog": { optional: ["scope", "fields"] },
|
|
3947
|
-
"package-adopt": { required: ["target"], optional: ["scope", "github", "ref"] },
|
|
3948
|
-
"package-adopt-all": { optional: ["scope"] },
|
|
3949
|
-
"package-activate": { required: ["target"], optional: ["scope"] },
|
|
3950
|
-
"package-deactivate": { required: ["target"], optional: ["scope"] },
|
|
3951
|
-
package: {
|
|
3952
|
-
optional: [
|
|
3953
|
-
"target",
|
|
3954
|
-
"scope",
|
|
3955
|
-
"github",
|
|
3956
|
-
"ref",
|
|
3957
|
-
"init",
|
|
3958
|
-
"install",
|
|
3959
|
-
"uninstall",
|
|
3960
|
-
"explore",
|
|
3961
|
-
"manage",
|
|
3962
|
-
"describe",
|
|
3963
|
-
"markdown",
|
|
3964
|
-
"output",
|
|
3965
|
-
"reload",
|
|
3966
|
-
"doctor",
|
|
3967
|
-
"catalog",
|
|
3968
|
-
"adopt",
|
|
3969
|
-
"adoptAll",
|
|
3970
|
-
"activate",
|
|
3971
|
-
"deactivate",
|
|
3972
|
-
"runtimeProbe",
|
|
3973
|
-
"fixManagedState",
|
|
3974
|
-
"detail",
|
|
3975
|
-
"trace",
|
|
3976
|
-
"watch",
|
|
3977
|
-
"strictExit",
|
|
3978
|
-
"failOnWarn"
|
|
3979
|
-
]
|
|
3980
|
-
},
|
|
3944
|
+
...managedLifecycleSchemaContracts("extension"),
|
|
3945
|
+
...managedLifecycleSchemaContracts("package"),
|
|
3981
3946
|
install: {
|
|
3982
3947
|
optional: ["target", "github", "scope", "ref"],
|
|
3983
3948
|
anyOfRequired: [["target"], ["github"]]
|
|
@@ -4658,6 +4623,6 @@ export {
|
|
|
4658
4623
|
resolveSubcommandFlagContractsForCommand,
|
|
4659
4624
|
PM_TOOL_PARAMETERS_SCHEMA
|
|
4660
4625
|
};
|
|
4661
|
-
//# sourceMappingURL=chunk-
|
|
4626
|
+
//# sourceMappingURL=chunk-LLQLLAKU.js.map
|
|
4662
4627
|
|
|
4663
|
-
//# debugId=
|
|
4628
|
+
//# debugId=4864c4b3-8a15-5324-8332-42e51eb9a217
|