autohand-cli 0.9.0 → 0.9.2
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/README.md +118 -76
- package/dist/AgentRegistry-BBQRODQC.cjs +18 -0
- package/dist/AgentRegistry-JBXZUPML.js +18 -0
- package/dist/{CommunitySkillsCache-ZEQWP6YM.js → CommunitySkillsCache-CI7UN2DX.js} +2 -2
- package/dist/CommunitySkillsCache-XTQ6RMTA.cjs +8 -0
- package/dist/{HookManager-CWLTFKWO.js → HookManager-BELBPQQI.js} +1 -1
- package/dist/{HookManager-TMAJQU4S.cjs → HookManager-ZL2CLAJW.cjs} +2 -2
- package/dist/{ImportWizard-MQXEED2U.cjs → ImportWizard-U6CIJREW.cjs} +13 -13
- package/dist/{ImportWizard-QBKQEXDW.js → ImportWizard-VJFSWSUQ.js} +4 -4
- package/dist/LearnAdvisor-LAURA3IB.cjs +9 -0
- package/dist/LearnAdvisor-RFOBXFG7.js +9 -0
- package/dist/MemoryManager-3A2VRPF2.js +9 -0
- package/dist/MemoryManager-UOEQZIDC.cjs +9 -0
- package/dist/{NVIDIAProvider-2HR737UE.js → NVIDIAProvider-AFNJNWJM.js} +1 -1
- package/dist/NVIDIAProvider-L5GTYRCQ.cjs +14 -0
- package/dist/{PermissionManager-KMYILJ4Z.js → PermissionManager-N2LDSOYF.js} +3 -3
- package/dist/PermissionManager-ZNURIEYR.cjs +11 -0
- package/dist/ProviderFactory-3BFS65V7.cjs +13 -0
- package/dist/{ProviderFactory-HFPRVQ25.js → ProviderFactory-XUT6BSGB.js} +4 -2
- package/dist/SessionManager-LGPQIA57.cjs +10 -0
- package/dist/{SessionManager-PNBTJJTQ.js → SessionManager-OR4KDDDS.js} +2 -2
- package/dist/{SkillsRegistry-4RRD5GMX.js → SkillsRegistry-IL3GWROU.js} +2 -2
- package/dist/SkillsRegistry-PM34DQNA.cjs +9 -0
- package/dist/SubAgent-2WG4QQB5.cjs +13 -0
- package/dist/SubAgent-ICGN23TQ.js +13 -0
- package/dist/{SyncApiClient-LRPFNCKJ.js → SyncApiClient-G3FM65IV.js} +1 -1
- package/dist/SyncApiClient-ODBDECOG.cjs +11 -0
- package/dist/{about-BW3PDZUU.js → about-OYVGQMJJ.js} +5 -4
- package/dist/about-U2BH7HDR.cjs +15 -0
- package/dist/{acp-VHEL7BOW.js → acp-JWHGXZL5.js} +207 -102
- package/dist/{acp-EOETGAHC.cjs → acp-S37JOBCS.cjs} +226 -121
- package/dist/actionExecutor-2QEPMELQ.cjs +28 -0
- package/dist/actionExecutor-6NCCORRB.js +28 -0
- package/dist/add-dir-KFUHSIR2.cjs +11 -0
- package/dist/{add-dir-VFX7QT4E.js → add-dir-MM2BM2Z2.js} +2 -2
- package/dist/agent-DUIYLIVN.js +132 -0
- package/dist/agent-YYEHGDAK.cjs +132 -0
- package/dist/agents-GBGG4CW7.cjs +19 -0
- package/dist/agents-ZH34C72F.js +19 -0
- package/dist/agents-new-ERXLS7SB.cjs +17 -0
- package/dist/agents-new-EVTGPTA4.js +17 -0
- package/dist/{autoSkill-EFMK6WU6.js → autoSkill-HEWKJ5JV.js} +2 -2
- package/dist/autoSkill-YL6PN6AV.cjs +20 -0
- package/dist/automode-4BJ7FNPL.cjs +10 -0
- package/dist/{automode-BMYSRM34.js → automode-S4U7A7Q2.js} +2 -2
- package/dist/chrome-45ZXHL5N.cjs +22 -0
- package/dist/{chrome-NHJ44WUN.js → chrome-BBSRVG6S.js} +2 -2
- package/dist/chrome-IFVZRHAT.cjs +50 -0
- package/dist/chrome-MYE6DNA2.js +22 -0
- package/dist/chunk-24CEJYEG.cjs +579 -0
- package/dist/{chunk-47PHDKNW.cjs → chunk-255GIVM2.cjs} +6 -6
- package/dist/{chunk-DIZTWFVR.cjs → chunk-2BDSR2OW.cjs} +238 -61
- package/dist/{chunk-BL2UC7HC.js → chunk-2BPIR7LA.js} +121 -4
- package/dist/{chunk-BQ22N3TX.cjs → chunk-2NY7OHBF.cjs} +47 -27
- package/dist/chunk-2WUNHTXL.js +303 -0
- package/dist/{chunk-HQWQZML5.cjs → chunk-34B6ZO6W.cjs} +124 -7
- package/dist/{chunk-5JTTM5SC.js → chunk-3BJN7GAH.js} +1 -1
- package/dist/{chunk-4256YRCO.cjs → chunk-3CAXECWJ.cjs} +30 -17
- package/dist/{chunk-KNTUI4TZ.cjs → chunk-3CBYUBZC.cjs} +5 -5
- package/dist/chunk-3DF3GZQ7.js +277 -0
- package/dist/{chunk-E26KKI46.cjs → chunk-3JURXAL6.cjs} +61 -8
- package/dist/{chunk-MOJ7ADW4.cjs → chunk-3KWAP2Y3.cjs} +88 -9
- package/dist/{chunk-OHWMWKJQ.js → chunk-3MCK6UBL.js} +1 -1
- package/dist/{chunk-5VHP6HDQ.js → chunk-3TH7IK4M.js} +62 -9
- package/dist/{chunk-ACDQGA4Z.js → chunk-3V77OB3W.js} +7 -72
- package/dist/{chunk-HS4USDND.cjs → chunk-3Y5UEK7K.cjs} +4 -4
- package/dist/{chunk-XV2HXRHX.js → chunk-4GPPSBEZ.js} +3 -3
- package/dist/chunk-5CMBAJ6K.js +377 -0
- package/dist/{chunk-MO4KP6XS.cjs → chunk-5YRXFBYZ.cjs} +35 -6
- package/dist/chunk-5ZNYX4VH.cjs +71 -0
- package/dist/chunk-6AC2TT26.js +156 -0
- package/dist/{chunk-UGFVM77J.cjs → chunk-6EIQ6A6U.cjs} +2 -2
- package/dist/{chunk-SWCQM52V.js → chunk-6HSEDXVF.js} +4 -4
- package/dist/{chunk-QQ7PANOP.js → chunk-6NUXK62F.js} +1 -1
- package/dist/{chunk-5CMYEM3R.cjs → chunk-6TGCAPYH.cjs} +62 -9
- package/dist/{chunk-NMQ47RCG.js → chunk-6W3SZCSP.js} +1 -1
- package/dist/{chunk-VRMZO6TB.js → chunk-73LV3DDZ.js} +7 -6
- package/dist/{chunk-3GUEUCZK.js → chunk-7BGGLIQF.js} +85 -1
- package/dist/{chunk-RBHANOYY.js → chunk-7DJJGKM6.js} +47 -3
- package/dist/{chunk-LQBONA55.cjs → chunk-7EEK7CRR.cjs} +85 -1
- package/dist/chunk-7TO3PDMV.cjs +324 -0
- package/dist/chunk-7UU22RSH.cjs +277 -0
- package/dist/{chunk-E6GFD7VR.cjs → chunk-A3GAM6FM.cjs} +11 -11
- package/dist/{chunk-DEQVRSV5.cjs → chunk-A7DJU75T.cjs} +8 -8
- package/dist/{chunk-DPSIGY6L.cjs → chunk-AAAO4ERQ.cjs} +9 -9
- package/dist/{chunk-FQAVGSPW.js → chunk-AAJLMP57.js} +2 -2
- package/dist/chunk-ABR756QN.js +529 -0
- package/dist/{chunk-JYKPWK5O.js → chunk-APFGDIPD.js} +3 -1
- package/dist/{chunk-Y3M2DABP.js → chunk-APQYRMYL.js} +4 -4
- package/dist/{chunk-Q2IL4DDI.cjs → chunk-AZKOIF2G.cjs} +62 -19
- package/dist/{chunk-MXVIDIC6.cjs → chunk-AZLHUPNC.cjs} +2 -2
- package/dist/chunk-B55VCYSQ.cjs +30 -0
- package/dist/{chunk-WZV6UVPY.js → chunk-BLQUMSM3.js} +1 -1
- package/dist/{chunk-PHJO5YAL.cjs → chunk-BXKPX6K4.cjs} +9 -9
- package/dist/{chunk-3KLSNNRW.cjs → chunk-C66FN2LP.cjs} +4 -4
- package/dist/{chunk-OV3PVUYN.js → chunk-CH7KUFAS.js} +9 -9
- package/dist/{chunk-CWINVFRI.cjs → chunk-CILSXOPI.cjs} +17 -17
- package/dist/{chunk-3UT7R3XV.js → chunk-CM24K6ZT.js} +145 -12
- package/dist/chunk-CMEZ42F2.cjs +303 -0
- package/dist/{chunk-46C73ZKK.cjs → chunk-CNQKIWIS.cjs} +152 -19
- package/dist/{chunk-5JFTY3VU.js → chunk-CSTUTDTH.js} +2 -1
- package/dist/{chunk-REMGR23V.cjs → chunk-CSUGNNJY.cjs} +10 -4
- package/dist/{chunk-TBOLJDUG.js → chunk-D6HB3H3L.js} +31 -11
- package/dist/{chunk-OM24WXEE.js → chunk-D7AYKVKW.js} +2 -2
- package/dist/{chunk-6GUODJKM.cjs → chunk-DLCXWOWT.cjs} +23 -23
- package/dist/{chunk-CH2J4PVE.cjs → chunk-DMM2BKSV.cjs} +121 -28
- package/dist/{chunk-M4KNC5BQ.js → chunk-DW3DPV77.js} +1 -1
- package/dist/chunk-ECQD2QC3.cjs +33 -0
- package/dist/{chunk-UEIXJG45.js → chunk-EEYOS3UC.js} +116 -80
- package/dist/{chunk-7HPWMALN.js → chunk-EF2EN5CR.js} +2 -2
- package/dist/{chunk-7LWQCE4Y.cjs → chunk-EFXFURDY.cjs} +192 -58
- package/dist/chunk-EK34UZPB.cjs +40 -0
- package/dist/{chunk-7JLT2VNW.cjs → chunk-FJR6EZLO.cjs} +9666 -7201
- package/dist/{chunk-GZ6DV2UG.js → chunk-FPO7YNPQ.js} +1 -1
- package/dist/{chunk-O64I2GYI.js → chunk-FS4I6BNR.js} +1 -1
- package/dist/{chunk-MX75JYIY.js → chunk-FSJ2MNOC.js} +3 -3
- package/dist/{chunk-7RFJB75Y.js → chunk-GEHZMC4G.js} +11 -8
- package/dist/{chunk-UWFG2R2I.cjs → chunk-GO6C2RAR.cjs} +36 -9
- package/dist/{chunk-WGLBC5AY.cjs → chunk-GSMR6V36.cjs} +4 -4
- package/dist/{chunk-Z3XSSF7B.js → chunk-GSZWATME.js} +1 -1
- package/dist/{chunk-7MU7LWF3.cjs → chunk-GYLGCR6F.cjs} +5 -5
- package/dist/{chunk-O6TQP7U7.cjs → chunk-H3OOWNYQ.cjs} +3 -3
- package/dist/{chunk-2QL6MNXG.js → chunk-H65446XW.js} +115 -20
- package/dist/chunk-H7HXRRHK.js +324 -0
- package/dist/{chunk-ZZ63NW7A.cjs → chunk-HN2JTDN5.cjs} +17 -17
- package/dist/{chunk-AOKCI722.cjs → chunk-HNXUZ5OY.cjs} +2 -2
- package/dist/{chunk-AUYSIEVV.cjs → chunk-HOYT3E65.cjs} +3 -3
- package/dist/{chunk-DMRXF5DU.js → chunk-HTPY5ESD.js} +3 -3
- package/dist/chunk-HTU4W3GB.js +183 -0
- package/dist/{chunk-3DDL2E55.cjs → chunk-HVLWH2AF.cjs} +10 -10
- package/dist/{chunk-HSCUPEA4.cjs → chunk-HZTEU4W5.cjs} +74 -105
- package/dist/{chunk-XGMI6IYB.cjs → chunk-I5T7LPFP.cjs} +7 -7
- package/dist/{chunk-XIVFAD2L.js → chunk-IB5CJXE7.js} +173 -12
- package/dist/chunk-INNXFLDR.cjs +388 -0
- package/dist/{chunk-75EDROHL.cjs → chunk-JFLEP3T7.cjs} +10 -10
- package/dist/chunk-JJGDOBFL.js +40 -0
- package/dist/{chunk-VBOFPU5M.cjs → chunk-JM3ZTQUK.cjs} +13 -9
- package/dist/{chunk-HJIXWGQZ.js → chunk-JSU46T6K.js} +1 -1
- package/dist/{chunk-AT7OWLY5.js → chunk-K6WN6BT4.js} +1 -1
- package/dist/{chunk-LN7D3EJZ.js → chunk-KA2U6MY2.js} +4 -3
- package/dist/{chunk-3S563FNF.cjs → chunk-KIQH3SMT.cjs} +34 -31
- package/dist/{chunk-BWF4VDYE.js → chunk-KPRXHIE2.js} +54 -85
- package/dist/{chunk-Z4LIPMPM.js → chunk-L6OH44HL.js} +13 -9
- package/dist/{chunk-A7HHCIDQ.js → chunk-LIO3RX2Z.js} +2 -2
- package/dist/{chunk-DLP436GI.js → chunk-LOSXLH7P.js} +110 -17
- package/dist/{chunk-IEXKKKOF.cjs → chunk-LSOR72PB.cjs} +23 -23
- package/dist/{chunk-IAGCRVJ3.js → chunk-MA3AVDCC.js} +55 -12
- package/dist/{chunk-B5CGDNMR.js → chunk-ME3S2WIR.js} +3 -3
- package/dist/{chunk-HKYZSUQ5.js → chunk-NC2I2M4P.js} +4 -4
- package/dist/{chunk-GBMDFWJX.cjs → chunk-NC4A4LVC.cjs} +13 -13
- package/dist/{chunk-E46DJH5S.js → chunk-NGEK5FCJ.js} +176 -3
- package/dist/{chunk-TQ33WBY5.cjs → chunk-NHWHEW7M.cjs} +2 -1
- package/dist/{chunk-62RTC3XX.js → chunk-NKW6CHXQ.js} +1 -1
- package/dist/{chunk-3PXKRVCW.js → chunk-NOWCRKP2.js} +10 -4
- package/dist/{chunk-HXJEGMGB.js → chunk-NUB2LMB6.js} +2 -2
- package/dist/chunk-NVATU4V6.cjs +44 -0
- package/dist/chunk-O246MKIW.cjs +267 -0
- package/dist/{chunk-QCHIDZBA.js → chunk-OGFWL2PS.js} +1 -1
- package/dist/{chunk-JJ4KA7HK.cjs → chunk-ONNGAR6W.cjs} +415 -551
- package/dist/{chunk-TKKN34TV.js → chunk-OOFR6A62.js} +33 -4
- package/dist/{chunk-6NVAK6CK.js → chunk-OZ7FHO7J.js} +2 -2
- package/dist/{chunk-2CGE7ZV3.cjs → chunk-P5EWGUI2.cjs} +201 -28
- package/dist/{chunk-GGLKUENP.js → chunk-P6BQJPAI.js} +191 -14
- package/dist/{chunk-TWQDAUZU.js → chunk-PG2JIU5M.js} +60 -7
- package/dist/chunk-PI27G2ED.cjs +377 -0
- package/dist/{chunk-YV63VW4K.js → chunk-PI7LRPL6.js} +1 -1
- package/dist/{chunk-TXPSTCG7.cjs → chunk-PMPEC5HN.cjs} +18 -15
- package/dist/{chunk-ROLA6EFO.cjs → chunk-PYUP7AKY.cjs} +14 -14
- package/dist/{chunk-BFQDQRDE.js → chunk-QC5Z3ZT5.js} +2 -2
- package/dist/chunk-QDO4L2A7.cjs +156 -0
- package/dist/{chunk-LFDPTJYF.cjs → chunk-QDXRI5AM.cjs} +1 -1
- package/dist/{chunk-3LJJG5YY.cjs → chunk-QLZOMZO5.cjs} +4 -3
- package/dist/chunk-QVXMSQOG.js +430 -0
- package/dist/{chunk-ZHJ7JGME.cjs → chunk-R4UKBKDY.cjs} +11 -11
- package/dist/{chunk-IGMPWJ2I.cjs → chunk-R75AWII3.cjs} +118 -23
- package/dist/{chunk-VGEV44V2.cjs → chunk-RD5PLUIX.cjs} +191 -30
- package/dist/{chunk-I24CWKKK.js → chunk-RGB34CV5.js} +3 -3
- package/dist/{chunk-CHI52KFR.cjs → chunk-RJCZLFHE.cjs} +246 -39
- package/dist/{chunk-D2OSPLYC.cjs → chunk-RKWNM2BJ.cjs} +2 -2
- package/dist/{chunk-FGT6KK6T.js → chunk-RMVONICR.js} +3 -3
- package/dist/{chunk-Q6AC3PHY.cjs → chunk-RPSYRJL7.cjs} +10 -4
- package/dist/chunk-RS2E32YB.js +71 -0
- package/dist/chunk-RWKU2X7O.js +388 -0
- package/dist/chunk-RZLEGVMH.cjs +565 -0
- package/dist/{chunk-5F6ZKSHO.js → chunk-S2L3Y677.js} +1 -1
- package/dist/{chunk-ARBEHFCG.js → chunk-S7KVUIOS.js} +1 -1
- package/dist/{chunk-AC7DZ6SK.cjs → chunk-SACJJ6NO.cjs} +5 -3
- package/dist/{chunk-IKUMVBCW.cjs → chunk-SD3NTC7D.cjs} +48 -4
- package/dist/{chunk-CBFH2J3O.js → chunk-SJQU2ZFR.js} +246 -39
- package/dist/{chunk-GWO66KBI.js → chunk-SKAQKQFF.js} +12 -2
- package/dist/chunk-T4DXP5OP.js +30 -0
- package/dist/{chunk-CFFE4VA3.js → chunk-T6FTB6K2.js} +1 -1
- package/dist/{chunk-U4C3HW6P.js → chunk-T6N6GRFT.js} +13 -10
- package/dist/{chunk-D6GZBSOX.js → chunk-TJFKA6A7.js} +82 -3
- package/dist/{chunk-2HOLOHVK.js → chunk-TJZUPS4Z.js} +163 -299
- package/dist/{chunk-RBZ7AFX7.cjs → chunk-TLKHZ425.cjs} +2 -2
- package/dist/{chunk-J2K57QM7.cjs → chunk-TQ24NLXO.cjs} +6 -6
- package/dist/{chunk-LUMV3DB2.js → chunk-TWBAU46X.js} +1 -1
- package/dist/{chunk-OPNI6O7F.cjs → chunk-TZB5XADL.cjs} +4 -4
- package/dist/{chunk-6HH236FV.cjs → chunk-UAYXZXWU.cjs} +4 -4
- package/dist/{chunk-MPULXVC4.cjs → chunk-UKBFNBDO.cjs} +11 -11
- package/dist/chunk-UMJYX5KD.js +565 -0
- package/dist/chunk-USKYTHDL.cjs +235 -0
- package/dist/chunk-V4HGZSKQ.cjs +183 -0
- package/dist/{chunk-MQESBFBZ.cjs → chunk-VAJUSZMC.cjs} +21 -20
- package/dist/{chunk-PQLKJCIE.js → chunk-VGQG4NBJ.js} +2 -2
- package/dist/chunk-VLUIVJ3J.js +235 -0
- package/dist/chunk-VOBINVMV.cjs +430 -0
- package/dist/{chunk-L4F7SUYL.js → chunk-VSHKKCSH.js} +16 -5
- package/dist/{chunk-LDJQ5QHG.cjs → chunk-VSZU3MGA.cjs} +28 -17
- package/dist/{chunk-YFXTE422.cjs → chunk-VWHAUB77.cjs} +8 -3
- package/dist/{chunk-EZJHLOWP.js → chunk-VXGYFX45.js} +20 -7
- package/dist/{chunk-JIMSII7R.js → chunk-WH6YUQDB.js} +193 -59
- package/dist/{chunk-VKBIE6I6.js → chunk-WQ6TD55V.js} +2 -2
- package/dist/{chunk-ZR46OJNZ.js → chunk-WQWECXTY.js} +3 -3
- package/dist/{chunk-SOLBYSLY.cjs → chunk-WVDJUJH6.cjs} +2 -2
- package/dist/{chunk-QKP772OZ.js → chunk-X24VIVDZ.js} +963 -103
- package/dist/{chunk-37M5UM6I.js → chunk-X4NRTLXD.js} +7 -1
- package/dist/chunk-X53SHYCG.js +27 -0
- package/dist/{chunk-PUD76XQT.cjs → chunk-XB2Z4ZAK.cjs} +5 -5
- package/dist/chunk-Y47OJGLB.cjs +27 -0
- package/dist/{chunk-WRTXCQ3V.cjs → chunk-Y4MN27V3.cjs} +1080 -220
- package/dist/{chunk-ZK6HOR62.js → chunk-YEHFYZFU.js} +7 -2
- package/dist/{chunk-FFBDRUO5.cjs → chunk-YICIUY23.cjs} +1 -1
- package/dist/{chunk-PDHT7LQS.cjs → chunk-YMXYC777.cjs} +3 -3
- package/dist/{chunk-TJNBASFD.cjs → chunk-Z3GRWK6O.cjs} +8 -8
- package/dist/{chunk-JP3YHTQ2.cjs → chunk-Z5GG2KSL.cjs} +4 -4
- package/dist/{chunk-ZPD2AO3U.js → chunk-ZER7DYQK.js} +2 -2
- package/dist/{chunk-UXLW45ZE.cjs → chunk-ZFDXZEZJ.cjs} +25 -90
- package/dist/chunk-ZFV4HJA6.js +579 -0
- package/dist/chunk-ZHMYTI5D.cjs +529 -0
- package/dist/{chunk-CCVMREXI.js → chunk-ZLR2TFBC.js} +35 -8
- package/dist/{chunk-J5ADZN6V.cjs → chunk-ZTWNU5QZ.cjs} +20 -20
- package/dist/chunk-ZUYYHKQA.js +44 -0
- package/dist/{chunk-AUFNACED.js → chunk-ZVLVLDYN.js} +9086 -6621
- package/dist/clear-AJGXD2BB.cjs +12 -0
- package/dist/{clear-OFLFQ3MR.js → clear-HAHDSWKW.js} +3 -3
- package/dist/communityInstaller-IRR6M3N6.cjs +22 -0
- package/dist/{communityInstaller-COB2KTOW.js → communityInstaller-OLKEUGMX.js} +6 -6
- package/dist/completion-G7Z436TF.cjs +17 -0
- package/dist/{completion-PT4VM2H2.js → completion-ZS3AXJ6A.js} +5 -5
- package/dist/{config-R4O7GBTY.js → config-OWYAQPCX.js} +5 -3
- package/dist/config-W2BHT2QE.cjs +22 -0
- package/dist/{constants-HVCHVQAF.js → constants-AS6K67AA.js} +5 -3
- package/dist/constants-B4W5BT7F.cjs +23 -0
- package/dist/{export-3PK3VFCE.js → export-5HIU3KMD.js} +5 -5
- package/dist/export-GFD32UY2.cjs +15 -0
- package/dist/{extractSessionMemories-A2JX5WJ2.js → extractSessionMemories-K6ZVAW2F.js} +1 -1
- package/dist/{extractSessionMemories-XL3MS37F.cjs → extractSessionMemories-LLOIJR5U.cjs} +2 -2
- package/dist/feature-KP74CZ3F.cjs +14 -0
- package/dist/feature-OPNVMB2E.js +14 -0
- package/dist/features-LT55MURX.cjs +24 -0
- package/dist/features-ZDIU26WX.js +24 -0
- package/dist/feedback-7WTJFQ6S.js +18 -0
- package/dist/feedback-CEOJ3453.cjs +18 -0
- package/dist/go-2CY5SZNR.js +16 -0
- package/dist/go-O2CSQON4.cjs +16 -0
- package/dist/goal-DL2N2AWT.cjs +16 -0
- package/dist/goal-IJS7VZSG.js +16 -0
- package/dist/help-RNOGDEBA.cjs +12 -0
- package/dist/{help-X3OAZ3CY.js → help-TCWD2IRH.js} +2 -2
- package/dist/{history-YKFPHBJN.js → history-ATOR5OQV.js} +2 -2
- package/dist/history-UUSGX2AL.cjs +14 -0
- package/dist/{hooks-7TA4PIIB.js → hooks-R3Z5QKUP.js} +6 -6
- package/dist/hooks-RWM5UY67.cjs +18 -0
- package/dist/{i18n-2KBUU7XL.js → i18n-4QI4TD4I.js} +1 -1
- package/dist/i18n-MFAEU5RV.cjs +33 -0
- package/dist/ide-6PBTCCUQ.js +15 -0
- package/dist/ide-UE3G7NMQ.cjs +15 -0
- package/dist/{import-I7T4ZHYL.cjs → import-2IG76KAN.cjs} +6 -4
- package/dist/{import-JWPYKXCZ.js → import-E47QL4DW.js} +2 -2
- package/dist/import-NQDNBFUL.cjs +10 -0
- package/dist/{import-4CHYLS4K.js → import-VQIHGJWS.js} +6 -4
- package/dist/index.cjs +512 -305
- package/dist/index.d.cts +40 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +402 -195
- package/dist/init-DX3RDGDT.cjs +10 -0
- package/dist/{init-262MWZV4.js → init-Q54OAAFZ.js} +2 -2
- package/dist/{inputPrompt-YGBHDUEP.js → inputPrompt-V2VBDRM7.js} +3 -3
- package/dist/inputPrompt-WVGVWAHS.cjs +90 -0
- package/dist/language-I6KXAOXD.js +23 -0
- package/dist/language-XMIVOH5E.cjs +23 -0
- package/dist/learn-JPVVGTKU.js +23 -0
- package/dist/learn-NLSHI2MZ.cjs +23 -0
- package/dist/login-NABQYLYC.cjs +28 -0
- package/dist/login-XPOVFSWN.js +28 -0
- package/dist/logout-HNHCGB4Q.js +25 -0
- package/dist/logout-SKGDXJSW.cjs +25 -0
- package/dist/{mcp-5O6PUL4G.js → mcp-EN73YFGZ.js} +8 -6
- package/dist/mcp-TADZCPJQ.cjs +22 -0
- package/dist/{mcp-install-P6DHES7V.cjs → mcp-install-2GKWWBAS.cjs} +15 -13
- package/dist/{mcp-install-6XWXLFVY.js → mcp-install-3TBTVSHW.js} +10 -8
- package/dist/memory-GRXFTDIN.cjs +10 -0
- package/dist/{memory-Q54CESNM.js → memory-K2P3CDCH.js} +2 -2
- package/dist/{model-6AJ77PJG.js → model-DEG22OWA.js} +2 -2
- package/dist/model-OSD74T7Z.cjs +10 -0
- package/dist/new-4NWBOATU.cjs +12 -0
- package/dist/{new-ZXHEWC2S.js → new-KJAP2MB6.js} +3 -3
- package/dist/onboarding-2U5WE2OA.js +39 -0
- package/dist/onboarding-5DZFCO5Q.cjs +39 -0
- package/dist/permissions-KY5I6YQ3.cjs +10 -0
- package/dist/{permissions-YHJMVA6L.js → permissions-TKYON7PP.js} +2 -2
- package/dist/{plan-YYUAXPTL.js → plan-DYHHLZSS.js} +1 -1
- package/dist/plan-PYKP652W.cjs +13 -0
- package/dist/quit-GSKJL42O.js +14 -0
- package/dist/quit-TQSRTBUT.cjs +14 -0
- package/dist/{registry-34GL6BNJ.js → registry-EZ4V4TUQ.js} +1339 -1
- package/dist/{registry-V24W7YK6.cjs → registry-LCWYI4IB.cjs} +1378 -40
- package/dist/resume-4VWJXARX.cjs +17 -0
- package/dist/resume-TLHWWWFN.js +17 -0
- package/dist/{review-QHP2KP4Q.js → review-CSK4IYTO.js} +1 -1
- package/dist/review-XLJEUH5K.cjs +9 -0
- package/dist/{rpc-S3DGW6KV.js → rpc-3DLQBDWU.js} +301 -130
- package/dist/{rpc-NPS3PU4O.cjs → rpc-O36WUU3L.cjs} +399 -228
- package/dist/search-DSX2CY4A.cjs +22 -0
- package/dist/search-I3QUDUQL.js +22 -0
- package/dist/sessionBranching-DVNOUWJT.cjs +19 -0
- package/dist/sessionBranching-FKV4CR36.js +19 -0
- package/dist/sessions-3JUOT3ED.cjs +10 -0
- package/dist/{sessions-IYAXMK23.js → sessions-VWMDIPOS.js} +2 -2
- package/dist/settings-FT2LZZUV.js +45 -0
- package/dist/settings-RL4KNWHB.cjs +45 -0
- package/dist/setup-HQEJVOYT.js +32 -0
- package/dist/setup-MN54LKOL.cjs +32 -0
- package/dist/share-BUAFZNBX.cjs +17 -0
- package/dist/share-CGB6MAVJ.js +17 -0
- package/dist/skills/builtin/code-reviewer/SKILL.md +64 -0
- package/dist/skills/builtin/goal-writer/SKILL.md +124 -0
- package/dist/{skills-VWOMV3CR.js → skills-7DKR3HRZ.js} +8 -8
- package/dist/{skills-MVIZNHT4.js → skills-BBBENOEY.js} +9 -9
- package/dist/skills-OQM7IHAF.cjs +29 -0
- package/dist/{skills-GGMZOVIE.cjs → skills-RA2PKL63.cjs} +10 -10
- package/dist/{skills-install-VTAMCNNY.cjs → skills-install-D7K476SL.cjs} +16 -16
- package/dist/{skills-install-QBA5RCV6.js → skills-install-T4SOKJSL.js} +9 -9
- package/dist/skills-new-S33NGEU3.js +18 -0
- package/dist/skills-new-UVYH53MD.cjs +18 -0
- package/dist/slashCommands-MWOUDSQP.js +111 -0
- package/dist/slashCommands-XASURUTV.cjs +111 -0
- package/dist/squad-PIIYDFVH.cjs +15 -0
- package/dist/squad-VHYOVEJP.js +15 -0
- package/dist/status-GHFTXQBL.js +25 -0
- package/dist/status-WXMIJIU3.cjs +25 -0
- package/dist/statusline-2K7AC6ZQ.js +21 -0
- package/dist/statusline-GROI4HOC.cjs +21 -0
- package/dist/sync-254WF6JI.cjs +42 -0
- package/dist/sync-2DIZN4EH.cjs +24 -0
- package/dist/{sync-7BILIQHP.js → sync-J6I2ZUKQ.js} +6 -4
- package/dist/{sync-7OKF6636.js → sync-Z3LVSEEV.js} +8 -5
- package/dist/{teammate-J6PHGL23.cjs → teammate-EXR76PEQ.cjs} +9 -8
- package/dist/{teammate-GZQSCIMS.js → teammate-K4DAOFEQ.js} +8 -7
- package/dist/templates-ARG2VRWW.cjs +11 -0
- package/dist/templates-UGVZV3KJ.js +11 -0
- package/dist/theme-MVQDSU47.js +23 -0
- package/dist/theme-QAKEYWJG.cjs +23 -0
- package/dist/ui/questionModal.cjs +6 -6
- package/dist/ui/questionModal.js +5 -5
- package/dist/{undo-SZEHLX7X.js → undo-5AU47JHF.js} +2 -2
- package/dist/undo-ME6WKUXZ.cjs +10 -0
- package/dist/usage-QTKO2YMD.js +25 -0
- package/dist/usage-TYNJKVER.cjs +25 -0
- package/package.json +10 -4
- package/dist/AgentRegistry-EGBDIUAK.cjs +0 -10
- package/dist/AgentRegistry-XPWSVO3Q.js +0 -10
- package/dist/CommunitySkillsCache-2OIUV227.cjs +0 -8
- package/dist/LearnAdvisor-46FG2XIP.js +0 -9
- package/dist/LearnAdvisor-XBRDNAGH.cjs +0 -9
- package/dist/MemoryManager-34L4YOKA.cjs +0 -8
- package/dist/MemoryManager-WJMLPWGU.js +0 -8
- package/dist/NVIDIAProvider-MVTL62PR.cjs +0 -14
- package/dist/PermissionManager-5OOJ7FAT.cjs +0 -11
- package/dist/ProviderFactory-C3YPXTDD.cjs +0 -11
- package/dist/SessionManager-WAPTFMDO.cjs +0 -10
- package/dist/SkillsRegistry-7AJP74GJ.cjs +0 -9
- package/dist/SubAgent-FDIH3DXB.js +0 -11
- package/dist/SubAgent-HVL2ICVZ.cjs +0 -11
- package/dist/SyncApiClient-VMBOLQ6H.cjs +0 -11
- package/dist/about-FCAX37YC.cjs +0 -14
- package/dist/actionExecutor-33I47NZS.js +0 -24
- package/dist/actionExecutor-4YBMR3YH.cjs +0 -24
- package/dist/add-dir-7SS6KSH5.cjs +0 -11
- package/dist/agent-DMRUFU4M.cjs +0 -116
- package/dist/agent-WCJEYQJT.js +0 -116
- package/dist/agents-CHROO3VU.cjs +0 -17
- package/dist/agents-UVDUL65K.js +0 -17
- package/dist/agents-new-AUBWSOXP.js +0 -17
- package/dist/agents-new-Y562WC47.cjs +0 -17
- package/dist/autoSkill-YOLLFTP2.cjs +0 -20
- package/dist/automode-DBLKTTKD.cjs +0 -10
- package/dist/chrome-ATC4OO5I.cjs +0 -20
- package/dist/chrome-O62WXV7F.js +0 -20
- package/dist/chrome-XHJLCO4M.cjs +0 -50
- package/dist/chunk-6XVVIY54.cjs +0 -256
- package/dist/chunk-AU6JAGZJ.cjs +0 -231
- package/dist/chunk-N6O3XUZ2.cjs +0 -23
- package/dist/chunk-VDWJMWDF.js +0 -256
- package/dist/clear-33TWQ2ES.cjs +0 -12
- package/dist/communityInstaller-TWMGPSYM.cjs +0 -22
- package/dist/completion-IIZMHXYP.cjs +0 -17
- package/dist/config-KL6WU7R2.cjs +0 -20
- package/dist/constants-RLMJ5D5P.cjs +0 -21
- package/dist/export-WLGNWEMJ.cjs +0 -15
- package/dist/feedback-G635NCLJ.js +0 -18
- package/dist/feedback-LLMK3TZH.cjs +0 -18
- package/dist/help-BAXLP2M2.cjs +0 -12
- package/dist/history-6HOJSEMT.cjs +0 -14
- package/dist/hooks-XVFU67T2.cjs +0 -18
- package/dist/i18n-MUJMKTFM.cjs +0 -33
- package/dist/ide-CCQ33PGC.cjs +0 -15
- package/dist/ide-VLVFBZ5F.js +0 -15
- package/dist/import-J46F54JY.cjs +0 -10
- package/dist/init-EE5Y7RBL.cjs +0 -10
- package/dist/inputPrompt-IIFKCX5Q.cjs +0 -90
- package/dist/language-CVLPB7OV.js +0 -21
- package/dist/language-ZTWFHUSV.cjs +0 -21
- package/dist/learn-PON7I5QS.js +0 -23
- package/dist/learn-XLRSVNA3.cjs +0 -23
- package/dist/login-223QTGBG.cjs +0 -26
- package/dist/login-6IKTBUBY.js +0 -26
- package/dist/logout-RN2AG6SI.js +0 -23
- package/dist/logout-U3M4FFX7.cjs +0 -23
- package/dist/mcp-NUQ76QQB.cjs +0 -20
- package/dist/memory-CYMDQ2YC.cjs +0 -10
- package/dist/model-IDRCKDML.cjs +0 -10
- package/dist/new-7LEWOUF2.cjs +0 -12
- package/dist/onboarding-FXX7YHSJ.cjs +0 -35
- package/dist/onboarding-JYNMK6NI.js +0 -35
- package/dist/permissions-YBNSANIA.cjs +0 -10
- package/dist/plan-XEJMOT55.cjs +0 -13
- package/dist/quit-B43SJ6E4.cjs +0 -10
- package/dist/quit-GWTNHQSP.js +0 -10
- package/dist/resume-DYVOQN5L.cjs +0 -16
- package/dist/resume-M25UQKOX.js +0 -16
- package/dist/review-UWHWQHCB.cjs +0 -9
- package/dist/search-CPX4PWHP.js +0 -20
- package/dist/search-VUF3M4N3.cjs +0 -20
- package/dist/sessions-JODKER5D.cjs +0 -10
- package/dist/settings-55BNW6BF.js +0 -33
- package/dist/settings-BKTS7OMC.cjs +0 -33
- package/dist/setup-IRC5HQG2.js +0 -29
- package/dist/setup-MMQ7TWOP.cjs +0 -29
- package/dist/share-6JRQECAH.cjs +0 -17
- package/dist/share-YM5MJKMO.js +0 -17
- package/dist/skills-LWSOKOSH.cjs +0 -29
- package/dist/skills-new-GPL46YV2.js +0 -18
- package/dist/skills-new-L5BEZN5V.cjs +0 -18
- package/dist/slashCommands-FBPCIWM5.cjs +0 -95
- package/dist/slashCommands-FCWY5DXW.js +0 -95
- package/dist/status-3B5SDZPL.js +0 -17
- package/dist/status-TTGRF6NC.cjs +0 -17
- package/dist/sync-77CXVVTK.cjs +0 -21
- package/dist/sync-EH4K5U3N.cjs +0 -40
- package/dist/theme-64BYGJ57.cjs +0 -21
- package/dist/theme-YJE6HEON.js +0 -21
- package/dist/undo-PRTEGL2J.cjs +0 -10
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
|
|
2
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk5YRXFBYZcjs = require('./chunk-5YRXFBYZ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -14,58 +14,74 @@ var _chunkMO4KP6XScjs = require('./chunk-MO4KP6XS.cjs');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var _chunk7LWQCE4Ycjs = require('./chunk-7LWQCE4Y.cjs');
|
|
18
17
|
|
|
18
|
+
var _chunkEFXFURDYcjs = require('./chunk-EFXFURDY.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
var _chunkQLZOMZO5cjs = require('./chunk-QLZOMZO5.cjs');
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
var _chunkXDLH4EDLcjs = require('./chunk-XDLH4EDL.cjs');
|
|
26
27
|
|
|
27
28
|
|
|
29
|
+
var _chunkCMEZ42F2cjs = require('./chunk-CMEZ42F2.cjs');
|
|
30
|
+
require('./chunk-3OF56EMA.cjs');
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
28
35
|
|
|
29
36
|
|
|
30
37
|
|
|
31
38
|
|
|
32
39
|
|
|
40
|
+
var _chunkUKBFNBDOcjs = require('./chunk-UKBFNBDO.cjs');
|
|
33
41
|
|
|
34
42
|
|
|
35
|
-
var _chunkMPULXVC4cjs = require('./chunk-MPULXVC4.cjs');
|
|
36
43
|
|
|
44
|
+
var _chunk3KWAP2Y3cjs = require('./chunk-3KWAP2Y3.cjs');
|
|
37
45
|
|
|
38
46
|
|
|
39
|
-
|
|
47
|
+
|
|
48
|
+
var _chunkAZKOIF2Gcjs = require('./chunk-AZKOIF2G.cjs');
|
|
40
49
|
|
|
41
50
|
|
|
42
51
|
|
|
43
52
|
var _chunkFMB3TSWPcjs = require('./chunk-FMB3TSWP.cjs');
|
|
44
53
|
|
|
45
54
|
|
|
46
|
-
|
|
55
|
+
|
|
56
|
+
var _chunkSD3NTC7Dcjs = require('./chunk-SD3NTC7D.cjs');
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
var _chunkCSUGNNJYcjs = require('./chunk-CSUGNNJY.cjs');
|
|
60
|
+
require('./chunk-DMM2BKSV.cjs');
|
|
61
|
+
require('./chunk-3CBYUBZC.cjs');
|
|
62
|
+
require('./chunk-NHWHEW7M.cjs');
|
|
63
|
+
|
|
47
64
|
|
|
48
65
|
|
|
49
|
-
var _chunkREMGR23Vcjs = require('./chunk-REMGR23V.cjs');
|
|
50
|
-
require('./chunk-3OF56EMA.cjs');
|
|
51
|
-
require('./chunk-CH2J4PVE.cjs');
|
|
52
|
-
require('./chunk-KNTUI4TZ.cjs');
|
|
53
|
-
require('./chunk-TQ33WBY5.cjs');
|
|
54
66
|
|
|
55
67
|
|
|
68
|
+
var _chunkCNQKIWIScjs = require('./chunk-CNQKIWIS.cjs');
|
|
69
|
+
require('./chunk-AZLHUPNC.cjs');
|
|
56
70
|
|
|
57
71
|
|
|
58
72
|
|
|
59
|
-
var
|
|
60
|
-
require('./chunk-MXVIDIC6.cjs');
|
|
73
|
+
var _chunkEK34UZPBcjs = require('./chunk-EK34UZPB.cjs');
|
|
61
74
|
require('./chunk-3EDDDZS2.cjs');
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
var _chunk7TO3PDMVcjs = require('./chunk-7TO3PDMV.cjs');
|
|
62
78
|
require('./chunk-YWTIXHU6.cjs');
|
|
63
79
|
require('./chunk-2VHB43IX.cjs');
|
|
64
80
|
|
|
65
81
|
|
|
66
82
|
|
|
67
83
|
|
|
68
|
-
var
|
|
84
|
+
var _chunk3JURXAL6cjs = require('./chunk-3JURXAL6.cjs');
|
|
69
85
|
require('./chunk-XF2WIKHR.cjs');
|
|
70
86
|
|
|
71
87
|
|
|
@@ -74,7 +90,7 @@ var _chunkWGNMOVMTcjs = require('./chunk-WGNMOVMT.cjs');
|
|
|
74
90
|
|
|
75
91
|
|
|
76
92
|
|
|
77
|
-
var
|
|
93
|
+
var _chunkRJCZLFHEcjs = require('./chunk-RJCZLFHE.cjs');
|
|
78
94
|
require('./chunk-3HT76LNN.cjs');
|
|
79
95
|
|
|
80
96
|
// src/index.ts
|
|
@@ -86,13 +102,49 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
|
86
102
|
var _url = require('url');
|
|
87
103
|
var _child_process = require('child_process');
|
|
88
104
|
|
|
105
|
+
// src/auth/startupAuth.ts
|
|
106
|
+
async function validateAuthOnStartup(config) {
|
|
107
|
+
if (!_optionalChain([config, 'access', _ => _.auth, 'optionalAccess', _2 => _2.token])) {
|
|
108
|
+
return void 0;
|
|
109
|
+
}
|
|
110
|
+
if (config.auth.expiresAt) {
|
|
111
|
+
const expiresAt = new Date(config.auth.expiresAt);
|
|
112
|
+
if (expiresAt < /* @__PURE__ */ new Date()) {
|
|
113
|
+
config.auth = void 0;
|
|
114
|
+
try {
|
|
115
|
+
await _chunkCNQKIWIScjs.saveConfig.call(void 0, config);
|
|
116
|
+
} catch (e) {
|
|
117
|
+
}
|
|
118
|
+
return void 0;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
try {
|
|
122
|
+
const authClient = _chunkAZKOIF2Gcjs.getAuthClient.call(void 0, );
|
|
123
|
+
const result = await authClient.validateSession(config.auth.token);
|
|
124
|
+
if (result.authenticated) {
|
|
125
|
+
if (result.user && config.auth) {
|
|
126
|
+
config.auth.user = result.user;
|
|
127
|
+
}
|
|
128
|
+
return _optionalChain([config, 'access', _3 => _3.auth, 'optionalAccess', _4 => _4.user]);
|
|
129
|
+
}
|
|
130
|
+
config.auth = void 0;
|
|
131
|
+
try {
|
|
132
|
+
await _chunkCNQKIWIScjs.saveConfig.call(void 0, config);
|
|
133
|
+
} catch (e2) {
|
|
134
|
+
}
|
|
135
|
+
return void 0;
|
|
136
|
+
} catch (e3) {
|
|
137
|
+
return _optionalChain([config, 'access', _5 => _5.auth, 'optionalAccess', _6 => _6.user]);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
89
141
|
// src/telemetry/PingService.ts
|
|
90
142
|
|
|
91
143
|
|
|
92
144
|
var _crypto = require('crypto'); var _crypto2 = _interopRequireDefault(_crypto);
|
|
93
145
|
var _os = require('os'); var _os2 = _interopRequireDefault(_os);
|
|
94
146
|
var PING_INTERVAL_MS = 45 * 60 * 1e3;
|
|
95
|
-
var PING_CACHE_FILE = _path2.default.join(
|
|
147
|
+
var PING_CACHE_FILE = _path2.default.join(_chunk3JURXAL6cjs.AUTOHAND_HOME, "last-ping.json");
|
|
96
148
|
var API_BASE_URL = process.env.AUTOHAND_API_URL || "https://api.autohand.ai";
|
|
97
149
|
var REQUEST_TIMEOUT_MS = 5e3;
|
|
98
150
|
var PingService = (_class = class {
|
|
@@ -113,14 +165,14 @@ var PingService = (_class = class {
|
|
|
113
165
|
*/
|
|
114
166
|
getOrCreateDeviceId() {
|
|
115
167
|
try {
|
|
116
|
-
_fsextra2.default.ensureDirSync(_path2.default.dirname(
|
|
117
|
-
if (_fsextra2.default.existsSync(
|
|
118
|
-
return _fsextra2.default.readFileSync(
|
|
168
|
+
_fsextra2.default.ensureDirSync(_path2.default.dirname(_chunk3JURXAL6cjs.AUTOHAND_FILES.deviceId));
|
|
169
|
+
if (_fsextra2.default.existsSync(_chunk3JURXAL6cjs.AUTOHAND_FILES.deviceId)) {
|
|
170
|
+
return _fsextra2.default.readFileSync(_chunk3JURXAL6cjs.AUTOHAND_FILES.deviceId, "utf8").trim();
|
|
119
171
|
}
|
|
120
172
|
const id = _crypto2.default.randomUUID();
|
|
121
|
-
_fsextra2.default.writeFileSync(
|
|
173
|
+
_fsextra2.default.writeFileSync(_chunk3JURXAL6cjs.AUTOHAND_FILES.deviceId, id);
|
|
122
174
|
return id;
|
|
123
|
-
} catch (
|
|
175
|
+
} catch (e4) {
|
|
124
176
|
return _crypto2.default.randomUUID();
|
|
125
177
|
}
|
|
126
178
|
}
|
|
@@ -138,7 +190,7 @@ var PingService = (_class = class {
|
|
|
138
190
|
return false;
|
|
139
191
|
}
|
|
140
192
|
}
|
|
141
|
-
} catch (
|
|
193
|
+
} catch (e5) {
|
|
142
194
|
}
|
|
143
195
|
return true;
|
|
144
196
|
}
|
|
@@ -153,7 +205,7 @@ var PingService = (_class = class {
|
|
|
153
205
|
pingDate: (/* @__PURE__ */ new Date()).toISOString().split("T")[0]
|
|
154
206
|
};
|
|
155
207
|
await _fsextra2.default.writeJson(PING_CACHE_FILE, cache, { spaces: 2 });
|
|
156
|
-
} catch (
|
|
208
|
+
} catch (e6) {
|
|
157
209
|
}
|
|
158
210
|
}
|
|
159
211
|
/**
|
|
@@ -199,7 +251,7 @@ var PingService = (_class = class {
|
|
|
199
251
|
latestVersion: data.latestVersion
|
|
200
252
|
};
|
|
201
253
|
}
|
|
202
|
-
} catch (
|
|
254
|
+
} catch (e7) {
|
|
203
255
|
} finally {
|
|
204
256
|
this.isPinging = false;
|
|
205
257
|
}
|
|
@@ -246,10 +298,10 @@ function initPingService(options) {
|
|
|
246
298
|
return pingServiceInstance;
|
|
247
299
|
}
|
|
248
300
|
function startPingService() {
|
|
249
|
-
_optionalChain([pingServiceInstance, 'optionalAccess',
|
|
301
|
+
_optionalChain([pingServiceInstance, 'optionalAccess', _7 => _7.start, 'call', _8 => _8()]);
|
|
250
302
|
}
|
|
251
303
|
function stopPingService() {
|
|
252
|
-
_optionalChain([pingServiceInstance, 'optionalAccess',
|
|
304
|
+
_optionalChain([pingServiceInstance, 'optionalAccess', _9 => _9.stop, 'call', _10 => _10()]);
|
|
253
305
|
}
|
|
254
306
|
|
|
255
307
|
// src/utils/stdinDetector.ts
|
|
@@ -264,7 +316,7 @@ function detectStdinType(fstat = _fs.fstatSync) {
|
|
|
264
316
|
return "pipe";
|
|
265
317
|
}
|
|
266
318
|
return "none";
|
|
267
|
-
} catch (
|
|
319
|
+
} catch (e8) {
|
|
268
320
|
return "none";
|
|
269
321
|
}
|
|
270
322
|
}
|
|
@@ -341,7 +393,7 @@ function resolveAutoModeLaunchMode(options) {
|
|
|
341
393
|
if (!options.hasAutoModeFlag) {
|
|
342
394
|
return "disabled";
|
|
343
395
|
}
|
|
344
|
-
if (_optionalChain([options, 'access',
|
|
396
|
+
if (_optionalChain([options, 'access', _11 => _11.autoModeTask, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()])) {
|
|
345
397
|
return "standalone";
|
|
346
398
|
}
|
|
347
399
|
return options.stdinIsTTY ? "interactive" : "unavailable";
|
|
@@ -385,39 +437,39 @@ function buildTmuxLaunchCommand(argv) {
|
|
|
385
437
|
// src/browser/cliCommand.ts
|
|
386
438
|
|
|
387
439
|
function registerChromeCommand(program2) {
|
|
388
|
-
program2.command("chrome").description("install and configure the Autohand Chrome extension bridge").command("install").description("install the native messaging bridge for Chrome-compatible browsers").option("--browser <browser>", "target browser: chrome, chromium, brave, edge, or all", "all").option("--extension-id <id>", "installed Chrome extension id to use for direct handoff").option("--install-url <url>", "fallback install/continue URL",
|
|
389
|
-
const config = await
|
|
390
|
-
const launchSpec =
|
|
391
|
-
const browsers =
|
|
392
|
-
const extensionId = _nullishCoalesce(options.extensionId, () => ( _optionalChain([config, 'access',
|
|
393
|
-
const preferredBrowser = options.browser === "all" ? _nullishCoalesce(_optionalChain([config, 'access',
|
|
394
|
-
const installUrl = _nullishCoalesce(_nullishCoalesce(options.installUrl, () => ( _optionalChain([config, 'access',
|
|
395
|
-
const detectedProfile = extensionId ? await
|
|
396
|
-
const result = await
|
|
440
|
+
program2.command("chrome").description("install and configure the Autohand Chrome extension bridge").command("install").description("install the native messaging bridge for Chrome-compatible browsers").option("--browser <browser>", "target browser: chrome, chromium, brave, edge, or all", "all").option("--extension-id <id>", "installed Chrome extension id to use for direct handoff").option("--install-url <url>", "fallback install/continue URL", _chunkUKBFNBDOcjs.DEFAULT_CHROME_INSTALL_URL).option("--cli-path <path>", "CLI binary path to register in the native host").option("--open", "open the install/continue page after installation", false).action(async (options) => {
|
|
441
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, void 0, process.cwd());
|
|
442
|
+
const launchSpec = _chunkUKBFNBDOcjs.resolveCliLaunchSpec.call(void 0, options.cliPath);
|
|
443
|
+
const browsers = _chunkUKBFNBDOcjs.normalizeBrowsers.call(void 0, options.browser);
|
|
444
|
+
const extensionId = _nullishCoalesce(options.extensionId, () => ( _optionalChain([config, 'access', _14 => _14.chrome, 'optionalAccess', _15 => _15.extensionId])));
|
|
445
|
+
const preferredBrowser = options.browser === "all" ? _nullishCoalesce(_optionalChain([config, 'access', _16 => _16.chrome, 'optionalAccess', _17 => _17.browser]), () => ( "auto")) : options.browser;
|
|
446
|
+
const installUrl = _nullishCoalesce(_nullishCoalesce(options.installUrl, () => ( _optionalChain([config, 'access', _18 => _18.chrome, 'optionalAccess', _19 => _19.installUrl]))), () => ( _chunkUKBFNBDOcjs.DEFAULT_CHROME_INSTALL_URL));
|
|
447
|
+
const detectedProfile = extensionId ? await _chunkUKBFNBDOcjs.detectExtensionProfile.call(void 0, extensionId, browsers) : null;
|
|
448
|
+
const result = await _chunkUKBFNBDOcjs.installNativeHost.call(void 0, {
|
|
397
449
|
cliCommand: launchSpec.command,
|
|
398
450
|
cliArgPrefix: launchSpec.args,
|
|
399
451
|
extensionIds: extensionId ? [extensionId] : [],
|
|
400
452
|
browsers
|
|
401
453
|
});
|
|
402
|
-
|
|
454
|
+
_chunkUKBFNBDOcjs.applyChromeSettings.call(void 0, config, {
|
|
403
455
|
extensionId,
|
|
404
|
-
browser: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess',
|
|
405
|
-
userDataDir: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess',
|
|
406
|
-
profileDirectory: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess',
|
|
456
|
+
browser: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess', _20 => _20.browser]), () => ( preferredBrowser)),
|
|
457
|
+
userDataDir: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess', _21 => _21.userDataDir]), () => ( _optionalChain([config, 'access', _22 => _22.chrome, 'optionalAccess', _23 => _23.userDataDir]))),
|
|
458
|
+
profileDirectory: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess', _24 => _24.profileDirectory]), () => ( _optionalChain([config, 'access', _25 => _25.chrome, 'optionalAccess', _26 => _26.profileDirectory]))),
|
|
407
459
|
installUrl
|
|
408
460
|
});
|
|
409
|
-
await
|
|
461
|
+
await _chunkCNQKIWIScjs.saveConfig.call(void 0, config);
|
|
410
462
|
console.log(_chalk2.default.green("\nInstalled Autohand Chrome bridge."));
|
|
411
463
|
for (const target of result.targets) {
|
|
412
464
|
console.log(_chalk2.default.gray(` ${target.browser}: ${target.manifestPath}`));
|
|
413
465
|
}
|
|
414
466
|
if (options.open) {
|
|
415
|
-
await
|
|
416
|
-
|
|
417
|
-
_nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess',
|
|
467
|
+
await _chunkUKBFNBDOcjs.openChromeContinuation.call(void 0,
|
|
468
|
+
_chunkUKBFNBDOcjs.buildChromeOpenUrl.call(void 0, { extensionId, installUrl }),
|
|
469
|
+
_nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess', _27 => _27.browser]), () => ( preferredBrowser)),
|
|
418
470
|
{
|
|
419
|
-
userDataDir: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess',
|
|
420
|
-
profileDirectory: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess',
|
|
471
|
+
userDataDir: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess', _28 => _28.userDataDir]), () => ( _optionalChain([config, 'access', _29 => _29.chrome, 'optionalAccess', _30 => _30.userDataDir]))),
|
|
472
|
+
profileDirectory: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess', _31 => _31.profileDirectory]), () => ( _optionalChain([config, 'access', _32 => _32.chrome, 'optionalAccess', _33 => _33.profileDirectory])))
|
|
421
473
|
}
|
|
422
474
|
);
|
|
423
475
|
}
|
|
@@ -438,27 +490,47 @@ if (process.stdout.isTTY) {
|
|
|
438
490
|
process.stdout.write("\x1B]0;Autohand Code\x07");
|
|
439
491
|
}
|
|
440
492
|
process.env.AUTOHAND_CODE = "1";
|
|
493
|
+
function applyCliModelOverride(config, model) {
|
|
494
|
+
const providerName = _nullishCoalesce(config.provider, () => ( "openrouter"));
|
|
495
|
+
if (_chunkEK34UZPBcjs.isCustomProviderName.call(void 0, providerName)) {
|
|
496
|
+
const customProvider = _chunkEK34UZPBcjs.getCustomProviderConfig.call(void 0, config, providerName);
|
|
497
|
+
if (customProvider) {
|
|
498
|
+
config.customProviders = {
|
|
499
|
+
...config.customProviders,
|
|
500
|
+
[customProvider.id]: {
|
|
501
|
+
...customProvider,
|
|
502
|
+
model
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
const providerConfig = config[providerName];
|
|
509
|
+
if (providerConfig) {
|
|
510
|
+
providerConfig.model = model;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
441
513
|
function getCommitFromAlphaVersion(version) {
|
|
442
514
|
const match = version.match(/-alpha\.([0-9a-f]{7,40})$/i);
|
|
443
|
-
return _nullishCoalesce(_optionalChain([match, 'optionalAccess',
|
|
515
|
+
return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _34 => _34[1]]), () => ( null));
|
|
444
516
|
}
|
|
445
517
|
function getGitCommit() {
|
|
446
518
|
if (true) {
|
|
447
|
-
return "
|
|
519
|
+
return "1d7b7b1";
|
|
448
520
|
}
|
|
449
|
-
const alphaCommit = getCommitFromAlphaVersion(
|
|
521
|
+
const alphaCommit = getCommitFromAlphaVersion(_chunkCSUGNNJYcjs.package_default.version);
|
|
450
522
|
if (alphaCommit) {
|
|
451
523
|
return alphaCommit;
|
|
452
524
|
}
|
|
453
525
|
try {
|
|
454
526
|
return _child_process.execSync.call(void 0, "git rev-parse --short HEAD", { encoding: "utf8", stdio: ["pipe", "pipe", "ignore"] }).trim();
|
|
455
|
-
} catch (
|
|
527
|
+
} catch (e9) {
|
|
456
528
|
return "unknown";
|
|
457
529
|
}
|
|
458
530
|
}
|
|
459
531
|
function getVersionString() {
|
|
460
532
|
const commit = getGitCommit();
|
|
461
|
-
return `${
|
|
533
|
+
return `${_chunkCSUGNNJYcjs.package_default.version} (${commit})`;
|
|
462
534
|
}
|
|
463
535
|
function normalizeMcpScope(scopeInput) {
|
|
464
536
|
const scope = (_nullishCoalesce(scopeInput, () => ( "user"))).toLowerCase();
|
|
@@ -468,7 +540,7 @@ function normalizeMcpScope(scopeInput) {
|
|
|
468
540
|
return null;
|
|
469
541
|
}
|
|
470
542
|
async function resolveProjectConfigPath(workspaceRoot) {
|
|
471
|
-
const projectConfigDir = _path2.default.join(workspaceRoot,
|
|
543
|
+
const projectConfigDir = _path2.default.join(workspaceRoot, _chunk3JURXAL6cjs.PROJECT_DIR_NAME);
|
|
472
544
|
const tomlPath = _path2.default.join(projectConfigDir, "config.toml");
|
|
473
545
|
const yamlPath = _path2.default.join(projectConfigDir, "config.yaml");
|
|
474
546
|
const ymlPath = _path2.default.join(projectConfigDir, "config.yml");
|
|
@@ -484,44 +556,15 @@ async function loadConfigForMcpScope(scopeInput) {
|
|
|
484
556
|
throw new Error(`Invalid scope "${scopeInput}". Use: user or project.`);
|
|
485
557
|
}
|
|
486
558
|
if (scope === "user") {
|
|
487
|
-
return { config: await
|
|
559
|
+
return { config: await _chunkCNQKIWIScjs.loadConfig.call(void 0, ), scope };
|
|
488
560
|
}
|
|
489
561
|
const projectConfigPath = await resolveProjectConfigPath(process.cwd());
|
|
490
|
-
return { config: await
|
|
491
|
-
}
|
|
492
|
-
async function validateAuthOnStartup(config) {
|
|
493
|
-
if (!_optionalChain([config, 'access', _29 => _29.auth, 'optionalAccess', _30 => _30.token])) {
|
|
494
|
-
return void 0;
|
|
495
|
-
}
|
|
496
|
-
if (config.auth.expiresAt) {
|
|
497
|
-
const expiresAt = new Date(config.auth.expiresAt);
|
|
498
|
-
if (expiresAt < /* @__PURE__ */ new Date()) {
|
|
499
|
-
config.auth = void 0;
|
|
500
|
-
try {
|
|
501
|
-
await _chunk46C73ZKKcjs.saveConfig.call(void 0, config);
|
|
502
|
-
} catch (e7) {
|
|
503
|
-
}
|
|
504
|
-
return void 0;
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
try {
|
|
508
|
-
const authClient = _chunkQ2IL4DDIcjs.getAuthClient.call(void 0, );
|
|
509
|
-
const result = await authClient.validateSession(config.auth.token);
|
|
510
|
-
if (result.authenticated) {
|
|
511
|
-
if (result.user && config.auth) {
|
|
512
|
-
config.auth.user = result.user;
|
|
513
|
-
}
|
|
514
|
-
return _optionalChain([config, 'access', _31 => _31.auth, 'optionalAccess', _32 => _32.user]);
|
|
515
|
-
}
|
|
516
|
-
return _optionalChain([config, 'access', _33 => _33.auth, 'optionalAccess', _34 => _34.user]);
|
|
517
|
-
} catch (e8) {
|
|
518
|
-
return _optionalChain([config, 'access', _35 => _35.auth, 'optionalAccess', _36 => _36.user]);
|
|
519
|
-
}
|
|
562
|
+
return { config: await _chunkCNQKIWIScjs.loadConfig.call(void 0, projectConfigPath, process.cwd()), scope };
|
|
520
563
|
}
|
|
521
|
-
|
|
564
|
+
_chunk5YRXFBYZcjs.installProcessErrorHandlers.call(void 0, );
|
|
522
565
|
var program = new (0, _commander.Command)();
|
|
523
566
|
registerChromeCommand(program);
|
|
524
|
-
program.name("autohand").description("Autonomous coding agent").version(getVersionString(), "-v, --version", "output the current version").argument("[prompt]", "Run a single instruction in command mode (same as -p)").option("-p, --prompt [text]", "Run a single instruction in command mode").option("--path <path>", "Workspace path to operate in").option("-y, --yes", "Auto-confirm risky actions", false).option("--dry-run", "Preview actions without applying mutations", false).option("-d, --debug", "Enable debug output (verbose logging)", false).option("--model <model>", "Override the configured LLM model").option("--config <path>", "Path to config file (default ~/.autohand/config.json)").option("--temperature <value>", "Sampling temperature", parseFloat).option("--thinking [level]", "Set thinking/reasoning depth (none, normal, extended)").option("-c, --auto-commit", "Auto-commit with LLM-generated message (runs lint & test first)", false).option("--unrestricted", "Run without any approval prompts (use with caution)", false).option("--restricted", "Deny all dangerous operations automatically", false).option("--auto-skill", "Auto-generate skills based on project analysis", false).option("--learn", "Run /learn skill advisor non-interactively (analyze and install recommended skills)", false).option("--learn-update", "Re-analyze project and regenerate outdated LLM-generated skills", false).option("--skill-install [skill-name]", "Install a community skill (opens browser if no name)").option("--project", "Install skill to project level (with --skill-install)", false).option("--permissions", "Display current permission settings and exit", false).option("--settings", "Configure Autohand settings (same as /settings in interactive mode)", false).option("--login", "Sign in to your Autohand account", false).option("--logout", "Sign out of your Autohand account", false).option("--sync-settings [bool]", "Enable/disable settings sync (default: true for logged users)").option("--patch", "Generate git patch without applying changes (requires --prompt)", false).option("--output <file>", "Output file for patch (default: stdout, used with --patch)").option("--mode <mode>", "Run mode: interactive (default), rpc, or acp", "interactive").option("--acp", "Shorthand for --mode acp (Agent Client Protocol over stdio)", false).option("--teammate-mode <mode>", "Team display mode: auto, in-process, or tmux").option("--worktree [name]", "Run session in isolated git worktree (optional name)").option("--tmux", "Launch in a dedicated tmux session (implies --worktree)").option("--auto-mode [prompt]", "Enable interactive auto-mode, or start a standalone loop with an inline task").option("--max-iterations <n>", "Max auto-mode iterations (default: 50)", parseInt).option("--completion-promise <text>", 'Completion marker text (default: "DONE")').option("--no-worktree", "Disable git worktree isolation in auto-mode").option("--checkpoint-interval <n>", "Git commit every N iterations (default: 5)", parseInt).option("--max-runtime <m>", "Max runtime in minutes (default: 120)", parseInt).option("--max-cost <d>", "Max API cost in dollars (default: 10)", parseFloat).option("--interactive-on-complete", "After auto-mode ends, hand off directly to interactive mode (TTY only)", false).option("--setup", "Run the setup wizard to configure or reconfigure Autohand", false).option("--about", "Show information about Autohand", false).option("--feedback", "Submit feedback", false).option("--add-dir <path...>", "Add additional directories to workspace scope (can be used multiple times)").option("--display-language <locale>", "Set display language (e.g., en, zh-cn, fr, de, ja)").option("--cc, --context-compact", "Enable context compaction (default: on)").option("--no-cc, --no-context-compact", "Disable context compaction").option("--search-engine <provider>", "Set web search provider (google, brave, duckduckgo, parallel)").option("--sys-prompt <value>", "Replace entire system prompt (inline string or file path)").option("--append-sys-prompt <value>", "Append to system prompt (inline string or file path)").option("--yolo [pattern]", "Auto-approve tool calls matching pattern (e.g., allow:read,write or deny:delete)").option("--timeout <seconds>", "Timeout in seconds for auto-approve mode", parseInt).option("--chrome", "Enable Chrome browser integration (same as /chrome)").option("--no-chrome", "Disable Chrome browser integration").action(async (positionalPrompt, opts) => {
|
|
567
|
+
program.name("autohand").description("Autonomous coding agent").version(getVersionString(), "-v, --version", "output the current version").argument("[prompt]", "Run a single instruction in command mode (same as -p)").option("-p, --prompt [text]", "Run a single instruction in command mode").option("--bare", "Minimal mode: skip hooks, LSP, plugin sync, attribution, auto-memory, background prefetches, keychain reads, and AGENTS.md auto-discovery", false).option("--path <path>", "Workspace path to operate in").option("-y, --yes", "Auto-confirm risky actions", false).option("--dry-run", "Preview actions without applying mutations", false).option("-d, --debug", "Enable debug output (verbose logging)", false).option("--model <model>", "Override the configured LLM model").option("--config <path>", "Path to config file (default ~/.autohand/config.json)").option("--temperature <value>", "Sampling temperature", parseFloat).option("--thinking [level]", "Set thinking/reasoning depth (none, normal, extended)").option("-c, --auto-commit", "Auto-commit with LLM-generated message (runs lint & test first)", false).option("--unrestricted", "Run without any approval prompts (use with caution)", false).option("--restricted", "Deny all dangerous operations automatically", false).option("--no-idle-logout", "Disable authenticated idle logout for long-running agent sessions").option("--goal [input]", "Run /goal non-interactively (status when omitted, otherwise same arguments as /goal)").option("--auto-skill", "Auto-generate skills based on project analysis", false).option("--learn", "Run /learn skill advisor non-interactively (analyze and install recommended skills)", false).option("--learn-update", "Re-analyze project and regenerate outdated LLM-generated skills", false).option("--skill-install [skill-name]", "Install a community skill (opens browser if no name)").option("--project", "Install skill to project level (with --skill-install)", false).option("--permissions", "Display current permission settings and exit", false).option("--settings", "Configure Autohand settings (same as /settings in interactive mode)", false).option("--login", "Sign in to your Autohand account", false).option("--logout", "Sign out of your Autohand account", false).option("--sync-settings [bool]", "Enable/disable settings sync (default: true for logged users)").option("--patch", "Generate git patch without applying changes (requires --prompt)", false).option("--output <file>", "Output file for patch (default: stdout, used with --patch)").option("--mode <mode>", "Run mode: interactive (default), rpc, or acp", "interactive").option("--acp", "Shorthand for --mode acp (Agent Client Protocol over stdio)", false).option("--teammate-mode <mode>", "Team display mode: auto, in-process, or tmux").option("--worktree [name]", "Run session in isolated git worktree (optional name)").option("--tmux", "Launch in a dedicated tmux session (implies --worktree)").option("--auto-mode [prompt]", "Enable interactive auto-mode, or start a standalone loop with an inline task").option("--max-iterations <n>", "Max auto-mode iterations (default: 50)", parseInt).option("--completion-promise <text>", 'Completion marker text (default: "DONE")').option("--no-worktree", "Disable git worktree isolation in auto-mode").option("--checkpoint-interval <n>", "Git commit every N iterations (default: 5)", parseInt).option("--max-runtime <m>", "Max runtime in minutes (default: 120)", parseInt).option("--max-cost <d>", "Max API cost in dollars (default: 10)", parseFloat).option("--interactive-on-complete", "After auto-mode ends, hand off directly to interactive mode (TTY only)", false).option("--setup", "Run the setup wizard to configure or reconfigure Autohand", false).option("--about", "Show information about Autohand", false).option("--feedback", "Submit feedback", false).option("--add-dir <path...>", "Add additional directories to workspace scope (can be used multiple times)").option("--display-language <locale>", "Set display language (e.g., en, id, zh-cn, fr, de, ja)").option("--cc, --context-compact", "Enable context compaction (default: on)").option("--no-cc, --no-context-compact", "Disable context compaction").option("--search-engine <provider>", "Set web search provider (google, brave, duckduckgo, parallel)").option("--sys-prompt <value>", "Replace entire system prompt (inline string or file path)").option("--system-prompt <value>", "Replace entire system prompt (inline string or file path)").option("--system-prompt-file <path>", "Replace entire system prompt with file contents").option("--append-sys-prompt <value>", "Append to system prompt (inline string or file path)").option("--append-system-prompt <value>", "Append to system prompt (inline string or file path)").option("--append-system-prompt-file <path>", "Append file contents to system prompt").option("--mcp-config <path>", "Explicit MCP config file").option("--agents <json|path>", 'Custom agents as inline JSON ({"reviewer":{"description":"...","prompt":"..."}}) or an external agents directory').option("--plugin-dir <path>", "Explicit plugin/meta-tool directory").option("--yolo [pattern]", "Auto-approve tool calls matching pattern (e.g., allow:read,write or deny:delete)").option("--timeout <seconds>", "Timeout in seconds for auto-approve mode", parseInt).option("--chrome", "Enable Chrome browser integration (same as /chrome)").option("--no-chrome", "Disable Chrome browser integration").option("--fork <pathOrId>", "Create and resume a new session branch from an existing session reference").action(async (positionalPrompt, opts) => {
|
|
525
568
|
if (process.stdout.isTTY && process.env.AUTOHAND_NO_BANNER !== "1") {
|
|
526
569
|
process.stdout.write("\x1B[3J\x1B[2J\x1B[H");
|
|
527
570
|
}
|
|
@@ -531,6 +574,35 @@ program.name("autohand").description("Autonomous coding agent").version(getVersi
|
|
|
531
574
|
if (opts.autoMode === true) {
|
|
532
575
|
opts.autoMode = void 0;
|
|
533
576
|
}
|
|
577
|
+
if (opts.goal === true) {
|
|
578
|
+
opts.goal = "";
|
|
579
|
+
}
|
|
580
|
+
if (opts.systemPrompt) {
|
|
581
|
+
opts.sysPrompt = String(opts.systemPrompt);
|
|
582
|
+
}
|
|
583
|
+
if (opts.systemPromptFile) {
|
|
584
|
+
opts.sysPrompt = opts.systemPromptFile;
|
|
585
|
+
}
|
|
586
|
+
if (opts.appendSystemPrompt) {
|
|
587
|
+
opts.appendSysPrompt = String(opts.appendSystemPrompt);
|
|
588
|
+
}
|
|
589
|
+
if (opts.appendSystemPromptFile) {
|
|
590
|
+
opts.appendSysPrompt = opts.appendSystemPromptFile;
|
|
591
|
+
}
|
|
592
|
+
if (opts.bare) {
|
|
593
|
+
process.env.AUTOHAND_CODE_SIMPLE = "1";
|
|
594
|
+
opts.syncSettings = false;
|
|
595
|
+
opts.contextCompact = false;
|
|
596
|
+
opts.noChrome = true;
|
|
597
|
+
}
|
|
598
|
+
if (typeof opts.agents === "string" && _chunk3KWAP2Y3cjs.looksLikeInlineAgents.call(void 0, opts.agents)) {
|
|
599
|
+
try {
|
|
600
|
+
opts.inlineAgents = _chunk3KWAP2Y3cjs.parseInlineAgents.call(void 0, opts.agents);
|
|
601
|
+
} catch (error) {
|
|
602
|
+
console.error(_chalk2.default.red(`Invalid --agents JSON: ${error.message}`));
|
|
603
|
+
process.exit(1);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
534
606
|
if (positionalPrompt && !opts.prompt) {
|
|
535
607
|
opts.prompt = positionalPrompt;
|
|
536
608
|
}
|
|
@@ -566,44 +638,45 @@ program.name("autohand").description("Autonomous coding agent").version(getVersi
|
|
|
566
638
|
return;
|
|
567
639
|
}
|
|
568
640
|
if (opts.settings) {
|
|
569
|
-
const config = await
|
|
570
|
-
const { settings } = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-
|
|
641
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config, process.cwd());
|
|
642
|
+
const { settings } = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-RL4KNWHB.cjs")));
|
|
571
643
|
await settings({ config });
|
|
572
644
|
process.exit(0);
|
|
573
645
|
}
|
|
574
646
|
if (opts.login) {
|
|
575
|
-
const { login } = await Promise.resolve().then(() => _interopRequireWildcard(require("./login-
|
|
576
|
-
const config = await
|
|
647
|
+
const { login } = await Promise.resolve().then(() => _interopRequireWildcard(require("./login-NABQYLYC.cjs")));
|
|
648
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config);
|
|
577
649
|
await login({ config });
|
|
578
650
|
process.exit(0);
|
|
579
651
|
}
|
|
580
652
|
if (opts.logout) {
|
|
581
|
-
const { logout } = await Promise.resolve().then(() => _interopRequireWildcard(require("./logout-
|
|
582
|
-
const config = await
|
|
653
|
+
const { logout } = await Promise.resolve().then(() => _interopRequireWildcard(require("./logout-SKGDXJSW.cjs")));
|
|
654
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config);
|
|
583
655
|
await logout({ config });
|
|
584
656
|
process.exit(0);
|
|
585
657
|
}
|
|
586
658
|
if (opts.about) {
|
|
587
|
-
const { initI18n: initI18n2, detectLocale: detectLocale2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./i18n-
|
|
588
|
-
const { about } = await Promise.resolve().then(() => _interopRequireWildcard(require("./about-
|
|
659
|
+
const { initI18n: initI18n2, detectLocale: detectLocale2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./i18n-MFAEU5RV.cjs")));
|
|
660
|
+
const { about } = await Promise.resolve().then(() => _interopRequireWildcard(require("./about-U2BH7HDR.cjs")));
|
|
589
661
|
const { locale } = detectLocale2();
|
|
590
662
|
await initI18n2(locale);
|
|
591
|
-
await
|
|
663
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config);
|
|
664
|
+
await about({ config });
|
|
592
665
|
process.exit(0);
|
|
593
666
|
}
|
|
594
667
|
if (opts.feedback) {
|
|
595
|
-
const { initI18n: initI18n2, detectLocale: detectLocale2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./i18n-
|
|
596
|
-
const { feedback } = await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-
|
|
668
|
+
const { initI18n: initI18n2, detectLocale: detectLocale2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./i18n-MFAEU5RV.cjs")));
|
|
669
|
+
const { feedback } = await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-CEOJ3453.cjs")));
|
|
597
670
|
const { locale } = detectLocale2();
|
|
598
671
|
await initI18n2(locale);
|
|
599
|
-
const config = await
|
|
672
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config);
|
|
600
673
|
await feedback({ config });
|
|
601
674
|
process.exit(0);
|
|
602
675
|
}
|
|
603
676
|
if (opts.setup) {
|
|
604
|
-
const config = await
|
|
605
|
-
const workspaceRoot =
|
|
606
|
-
const workspacePathValidation = await
|
|
677
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config, process.cwd());
|
|
678
|
+
const workspaceRoot = _chunkCNQKIWIScjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
|
|
679
|
+
const workspacePathValidation = await _chunkQLZOMZO5cjs.validateWorkspacePath.call(void 0, workspaceRoot);
|
|
607
680
|
if (!workspacePathValidation.valid) {
|
|
608
681
|
console.error(_chalk2.default.red(`Error: ${workspacePathValidation.error}`));
|
|
609
682
|
process.exit(1);
|
|
@@ -613,7 +686,7 @@ program.name("autohand").description("Autonomous coding agent").version(getVersi
|
|
|
613
686
|
_chunkWGNMOVMTcjs.printDangerousWorkspaceWarning.call(void 0, workspaceRoot, safetyCheck);
|
|
614
687
|
process.exit(1);
|
|
615
688
|
}
|
|
616
|
-
const { SetupWizard } = await Promise.resolve().then(() => _interopRequireWildcard(require("./onboarding-
|
|
689
|
+
const { SetupWizard } = await Promise.resolve().then(() => _interopRequireWildcard(require("./onboarding-5DZFCO5Q.cjs")));
|
|
617
690
|
const wizard = new SetupWizard(workspaceRoot, config);
|
|
618
691
|
const result = await wizard.run({ skipWelcome: false });
|
|
619
692
|
if (result.cancelled) {
|
|
@@ -622,15 +695,25 @@ program.name("autohand").description("Autonomous coding agent").version(getVersi
|
|
|
622
695
|
}
|
|
623
696
|
if (result.success) {
|
|
624
697
|
const newConfig = { ...config, ...result.config };
|
|
625
|
-
await
|
|
698
|
+
await _chunkCNQKIWIScjs.saveConfig.call(void 0, newConfig);
|
|
626
699
|
console.log(_chalk2.default.green("\nSetup complete! Run `autohand` to start."));
|
|
627
700
|
}
|
|
628
701
|
process.exit(0);
|
|
629
702
|
}
|
|
703
|
+
if (opts.mode === "rpc") {
|
|
704
|
+
const { runRpcMode } = await Promise.resolve().then(() => _interopRequireWildcard(require("./rpc-O36WUU3L.cjs")));
|
|
705
|
+
await runRpcMode(opts);
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
if (opts.mode === "acp") {
|
|
709
|
+
const { runAcpMode } = await Promise.resolve().then(() => _interopRequireWildcard(require("./acp-S37JOBCS.cjs")));
|
|
710
|
+
await runAcpMode(opts);
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
630
713
|
{
|
|
631
|
-
const preAuthConfig = await
|
|
632
|
-
const workspaceRoot =
|
|
633
|
-
const workspacePathValidation = await
|
|
714
|
+
const preAuthConfig = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config, process.cwd());
|
|
715
|
+
const workspaceRoot = _chunkCNQKIWIScjs.resolveWorkspaceRoot.call(void 0, preAuthConfig, opts.path);
|
|
716
|
+
const workspacePathValidation = await _chunkQLZOMZO5cjs.validateWorkspacePath.call(void 0, workspaceRoot);
|
|
634
717
|
if (!workspacePathValidation.valid) {
|
|
635
718
|
console.error(_chalk2.default.red(`Error: ${workspacePathValidation.error}`));
|
|
636
719
|
process.exit(1);
|
|
@@ -642,8 +725,8 @@ program.name("autohand").description("Autonomous coding agent").version(getVersi
|
|
|
642
725
|
}
|
|
643
726
|
}
|
|
644
727
|
{
|
|
645
|
-
let authConfig = await
|
|
646
|
-
authConfig = await
|
|
728
|
+
let authConfig = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config, process.cwd());
|
|
729
|
+
authConfig = await _chunkAZKOIF2Gcjs.ensureAuthenticated.call(void 0, authConfig, { bare: opts.bare === true });
|
|
647
730
|
opts._authConfig = authConfig;
|
|
648
731
|
}
|
|
649
732
|
if (opts.patch) {
|
|
@@ -653,11 +736,17 @@ program.name("autohand").description("Autonomous coding agent").version(getVersi
|
|
|
653
736
|
if (opts.cc !== void 0) {
|
|
654
737
|
opts.contextCompact = opts.cc;
|
|
655
738
|
}
|
|
739
|
+
if (opts.goal !== void 0) {
|
|
740
|
+
await runGoalFlag(opts);
|
|
741
|
+
if (!opts.prompt) {
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
656
745
|
if (opts.noChrome) {
|
|
657
|
-
const config = await
|
|
746
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config, process.cwd());
|
|
658
747
|
if (config.chrome) {
|
|
659
748
|
config.chrome.enabledByDefault = false;
|
|
660
|
-
await
|
|
749
|
+
await _chunkCNQKIWIScjs.saveConfig.call(void 0, config);
|
|
661
750
|
console.log(_chalk2.default.green("\u2713 Chrome browser integration disabled."));
|
|
662
751
|
}
|
|
663
752
|
}
|
|
@@ -670,18 +759,8 @@ program.name("autohand").description("Autonomous coding agent").version(getVersi
|
|
|
670
759
|
process.exit(1);
|
|
671
760
|
}
|
|
672
761
|
}
|
|
673
|
-
if (opts.mode === "rpc") {
|
|
674
|
-
const { runRpcMode } = await Promise.resolve().then(() => _interopRequireWildcard(require("./rpc-NPS3PU4O.cjs")));
|
|
675
|
-
await runRpcMode(opts);
|
|
676
|
-
return;
|
|
677
|
-
}
|
|
678
|
-
if (opts.mode === "acp") {
|
|
679
|
-
const { runAcpMode } = await Promise.resolve().then(() => _interopRequireWildcard(require("./acp-EOETGAHC.cjs")));
|
|
680
|
-
await runAcpMode(opts);
|
|
681
|
-
return;
|
|
682
|
-
}
|
|
683
762
|
if (opts.mode === "teammate") {
|
|
684
|
-
const { parseTeammateOptions, runTeammateMode } = await Promise.resolve().then(() => _interopRequireWildcard(require("./teammate-
|
|
763
|
+
const { parseTeammateOptions, runTeammateMode } = await Promise.resolve().then(() => _interopRequireWildcard(require("./teammate-EXR76PEQ.cjs")));
|
|
685
764
|
const teammateOpts = parseTeammateOptions(process.argv);
|
|
686
765
|
if (!teammateOpts) {
|
|
687
766
|
console.error("Error: --mode teammate requires --team, --name, --agent, and --lead-session");
|
|
@@ -712,29 +791,74 @@ program.name("autohand").description("Autonomous coding agent").version(getVersi
|
|
|
712
791
|
await runCLI(opts);
|
|
713
792
|
});
|
|
714
793
|
program.command("resume <sessionId>").description("Resume a previous session").option("--path <path>", "Workspace path to operate in").option("--model <model>", "Override the configured LLM model").action(async (sessionId, opts) => {
|
|
715
|
-
let authConfig = await
|
|
716
|
-
authConfig = await
|
|
794
|
+
let authConfig = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config, process.cwd());
|
|
795
|
+
authConfig = await _chunkAZKOIF2Gcjs.ensureAuthenticated.call(void 0, authConfig);
|
|
717
796
|
opts._authConfig = authConfig;
|
|
718
797
|
await runCLI({ ...opts, resumeSessionId: sessionId });
|
|
719
798
|
});
|
|
720
799
|
program.command("login").description("Sign in to your Autohand account").action(async () => {
|
|
721
|
-
const { login } = await Promise.resolve().then(() => _interopRequireWildcard(require("./login-
|
|
722
|
-
const config = await
|
|
800
|
+
const { login } = await Promise.resolve().then(() => _interopRequireWildcard(require("./login-NABQYLYC.cjs")));
|
|
801
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, );
|
|
723
802
|
await login({ config });
|
|
724
803
|
process.exit(0);
|
|
725
804
|
});
|
|
726
805
|
program.command("logout").description("Sign out of your Autohand account").action(async () => {
|
|
727
|
-
const { logout } = await Promise.resolve().then(() => _interopRequireWildcard(require("./logout-
|
|
728
|
-
const config = await
|
|
806
|
+
const { logout } = await Promise.resolve().then(() => _interopRequireWildcard(require("./logout-SKGDXJSW.cjs")));
|
|
807
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, );
|
|
729
808
|
await logout({ config });
|
|
730
809
|
process.exit(0);
|
|
731
810
|
});
|
|
732
|
-
program.command("
|
|
733
|
-
const
|
|
734
|
-
const
|
|
811
|
+
program.command("squad [args...]").description("Start and manage the standalone Autohand Squad runtime").allowUnknownOption(true).allowExcessArguments(true).action(async (args = []) => {
|
|
812
|
+
const rootOptions = program.opts();
|
|
813
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, rootOptions.config, process.cwd());
|
|
814
|
+
const workspaceRoot = _chunkCNQKIWIScjs.resolveWorkspaceRoot.call(void 0, config, rootOptions.path);
|
|
815
|
+
const { runSquadCommand } = await Promise.resolve().then(() => _interopRequireWildcard(require("./squad-PIIYDFVH.cjs")));
|
|
816
|
+
const result = await runSquadCommand({ workspaceRoot, config }, args);
|
|
817
|
+
if (result.output) {
|
|
818
|
+
if (result.code === 0) {
|
|
819
|
+
console.log(result.output);
|
|
820
|
+
} else {
|
|
821
|
+
console.error(result.output);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
process.exit(result.code);
|
|
825
|
+
});
|
|
826
|
+
program.command("queue [args...]").description("Show the local Autohand Squad queue").allowUnknownOption(true).allowExcessArguments(true).action(async (args = []) => {
|
|
827
|
+
const rootOptions = program.opts();
|
|
828
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, rootOptions.config, process.cwd());
|
|
829
|
+
const workspaceRoot = _chunkCNQKIWIScjs.resolveWorkspaceRoot.call(void 0, config, rootOptions.path);
|
|
830
|
+
const { runSquadCommand } = await Promise.resolve().then(() => _interopRequireWildcard(require("./squad-PIIYDFVH.cjs")));
|
|
831
|
+
const result = await runSquadCommand({ workspaceRoot, config }, ["queue", ...args]);
|
|
832
|
+
if (result.output) {
|
|
833
|
+
if (result.code === 0) {
|
|
834
|
+
console.log(result.output);
|
|
835
|
+
} else {
|
|
836
|
+
console.error(result.output);
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
process.exit(result.code);
|
|
840
|
+
});
|
|
841
|
+
var configCmd = program.command("config").description("Configure Autohand settings").action(async () => {
|
|
842
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, program.opts().config);
|
|
843
|
+
const { settings } = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-RL4KNWHB.cjs")));
|
|
735
844
|
await settings({ config });
|
|
736
845
|
process.exit(0);
|
|
737
846
|
});
|
|
847
|
+
configCmd.command("set <parts...>").description("Set a config value, e.g. autohand config set verbs activity false").action(async (parts) => {
|
|
848
|
+
try {
|
|
849
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, program.opts().config);
|
|
850
|
+
const { parseConfigSetArgs, setConfigSetting, formatConfigSetResult } = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-RL4KNWHB.cjs")));
|
|
851
|
+
const { key, value } = parseConfigSetArgs(parts);
|
|
852
|
+
const result = setConfigSetting(config, key, value);
|
|
853
|
+
await _chunkCNQKIWIScjs.saveConfig.call(void 0, config);
|
|
854
|
+
console.log(_chalk2.default.green(formatConfigSetResult(result)));
|
|
855
|
+
process.exit(0);
|
|
856
|
+
} catch (error) {
|
|
857
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
858
|
+
console.error(_chalk2.default.red(message));
|
|
859
|
+
process.exit(1);
|
|
860
|
+
}
|
|
861
|
+
});
|
|
738
862
|
var mcpCmd = program.command("mcp").description("Manage MCP (Model Context Protocol) servers");
|
|
739
863
|
mcpCmd.command("add <name> <target> [args...]").description("Add an MCP server to config and auto-connect on next session").option("-t, --transport <transport>", "Transport type: stdio | http | sse", "stdio").option("-s, --scope <scope>", "Config scope: user | project", "user").action(async (name, target, serverArgs, options) => {
|
|
740
864
|
let config;
|
|
@@ -795,7 +919,7 @@ mcpCmd.command("add <name> <target> [args...]").description("Add an MCP server t
|
|
|
795
919
|
const wasAutoConnectDisabled = existing.autoConnect === false;
|
|
796
920
|
if (wasAutoConnectDisabled || wasMcpDisabled) {
|
|
797
921
|
existing.autoConnect = true;
|
|
798
|
-
await
|
|
922
|
+
await _chunkCNQKIWIScjs.saveConfig.call(void 0, config);
|
|
799
923
|
const reenabledParts = [];
|
|
800
924
|
if (wasMcpDisabled) reenabledParts.push("MCP support");
|
|
801
925
|
if (wasAutoConnectDisabled) reenabledParts.push("auto-connect");
|
|
@@ -818,13 +942,13 @@ mcpCmd.command("add <name> <target> [args...]").description("Add an MCP server t
|
|
|
818
942
|
existing.args = void 0;
|
|
819
943
|
}
|
|
820
944
|
existing.autoConnect = true;
|
|
821
|
-
await
|
|
945
|
+
await _chunkCNQKIWIScjs.saveConfig.call(void 0, config);
|
|
822
946
|
console.log(_chalk2.default.green(`Updated "${name}" in ${scope} config (${newServer.transport}: ${displayTarget})`));
|
|
823
947
|
console.log(_chalk2.default.gray("Server will use the new settings on next start."));
|
|
824
948
|
process.exit(0);
|
|
825
949
|
}
|
|
826
950
|
config.mcp.servers.push(newServer);
|
|
827
|
-
await
|
|
951
|
+
await _chunkCNQKIWIScjs.saveConfig.call(void 0, config);
|
|
828
952
|
console.log(_chalk2.default.green(`Added "${name}" to ${scope} config (${newServer.transport}: ${displayTarget})`));
|
|
829
953
|
console.log(_chalk2.default.gray("Server will auto-connect when you start autohand."));
|
|
830
954
|
process.exit(0);
|
|
@@ -841,13 +965,13 @@ mcpCmd.command("remove <name>").description("Remove an MCP server from config").
|
|
|
841
965
|
process.exit(1);
|
|
842
966
|
return;
|
|
843
967
|
}
|
|
844
|
-
const serverIndex = _optionalChain([config, 'access',
|
|
968
|
+
const serverIndex = _optionalChain([config, 'access', _35 => _35.mcp, 'optionalAccess', _36 => _36.servers, 'optionalAccess', _37 => _37.findIndex, 'call', _38 => _38((s) => s.name === name)]);
|
|
845
969
|
if (serverIndex === void 0 || serverIndex < 0) {
|
|
846
970
|
console.log(_chalk2.default.yellow(`Server "${name}" not found in ${scope} config.`));
|
|
847
971
|
process.exit(1);
|
|
848
972
|
}
|
|
849
973
|
config.mcp.servers.splice(serverIndex, 1);
|
|
850
|
-
await
|
|
974
|
+
await _chunkCNQKIWIScjs.saveConfig.call(void 0, config);
|
|
851
975
|
console.log(_chalk2.default.green(`Removed "${name}" from ${scope} config.`));
|
|
852
976
|
process.exit(0);
|
|
853
977
|
});
|
|
@@ -863,7 +987,7 @@ mcpCmd.command("list").description("List configured MCP servers").option("-s, --
|
|
|
863
987
|
process.exit(1);
|
|
864
988
|
return;
|
|
865
989
|
}
|
|
866
|
-
const servers = _nullishCoalesce(_optionalChain([config, 'access',
|
|
990
|
+
const servers = _nullishCoalesce(_optionalChain([config, 'access', _39 => _39.mcp, 'optionalAccess', _40 => _40.servers]), () => ( []));
|
|
867
991
|
if (servers.length === 0) {
|
|
868
992
|
console.log(_chalk2.default.gray(`No MCP servers configured in ${scope} config.`));
|
|
869
993
|
console.log(_chalk2.default.gray("Add one with: autohand mcp add <name> <command> [args...]"));
|
|
@@ -874,7 +998,7 @@ mcpCmd.command("list").description("List configured MCP servers").option("-s, --
|
|
|
874
998
|
Configured MCP Servers (${servers.length}, ${scope} config):
|
|
875
999
|
`));
|
|
876
1000
|
for (const server of servers) {
|
|
877
|
-
const target = server.transport === "stdio" ? `${server.command}${_optionalChain([server, 'access',
|
|
1001
|
+
const target = server.transport === "stdio" ? `${server.command}${_optionalChain([server, 'access', _41 => _41.args, 'optionalAccess', _42 => _42.length]) ? " " + server.args.join(" ") : ""}`.trim() : _nullishCoalesce(server.url, () => ( "<missing-url>"));
|
|
878
1002
|
const auto = server.autoConnect !== false ? _chalk2.default.green("auto-connect") : _chalk2.default.gray("manual");
|
|
879
1003
|
console.log(` ${_chalk2.default.white(server.name)} ${_chalk2.default.gray("\u2192")} ${server.transport}:${target} ${_chalk2.default.gray(`[${auto}]`)}`);
|
|
880
1004
|
}
|
|
@@ -893,70 +1017,111 @@ mcpCmd.command("install [server-name]").description("Browse and install communit
|
|
|
893
1017
|
}
|
|
894
1018
|
const { McpClientManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./McpClientManager-BNSKLHIN.cjs")));
|
|
895
1019
|
const manager = new McpClientManager();
|
|
896
|
-
const { mcpInstall } = await Promise.resolve().then(() => _interopRequireWildcard(require("./mcp-install-
|
|
1020
|
+
const { mcpInstall } = await Promise.resolve().then(() => _interopRequireWildcard(require("./mcp-install-2GKWWBAS.cjs")));
|
|
897
1021
|
const result = await mcpInstall({ mcpManager: manager, config }, serverName);
|
|
898
1022
|
if (result) console.log(result);
|
|
899
1023
|
await manager.disconnectAll().catch(() => {
|
|
900
1024
|
});
|
|
901
1025
|
process.exit(0);
|
|
902
1026
|
});
|
|
1027
|
+
var experimentsCmd = program.command("experiments").description("List and toggle Autohand experiments").action(async () => {
|
|
1028
|
+
const { features } = await Promise.resolve().then(() => _interopRequireWildcard(require("./features-LT55MURX.cjs")));
|
|
1029
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, program.opts().config);
|
|
1030
|
+
const result = await features({ config }, ["list"]);
|
|
1031
|
+
if (result) console.log(result);
|
|
1032
|
+
process.exit(0);
|
|
1033
|
+
});
|
|
1034
|
+
experimentsCmd.command("list").alias("ls").description("List experiments and current state").action(async () => {
|
|
1035
|
+
const { features } = await Promise.resolve().then(() => _interopRequireWildcard(require("./features-LT55MURX.cjs")));
|
|
1036
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, program.opts().config);
|
|
1037
|
+
const result = await features({ config }, ["list"]);
|
|
1038
|
+
if (result) console.log(result);
|
|
1039
|
+
process.exit(0);
|
|
1040
|
+
});
|
|
1041
|
+
experimentsCmd.command("status <feature>").alias("show").description("Show one experiment").action(async (featureId) => {
|
|
1042
|
+
const { features } = await Promise.resolve().then(() => _interopRequireWildcard(require("./features-LT55MURX.cjs")));
|
|
1043
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, program.opts().config);
|
|
1044
|
+
const result = await features({ config }, ["status", featureId]);
|
|
1045
|
+
if (_optionalChain([result, 'optionalAccess', _43 => _43.startsWith, 'call', _44 => _44("Unknown feature")])) {
|
|
1046
|
+
console.log(_chalk2.default.red(result));
|
|
1047
|
+
process.exit(1);
|
|
1048
|
+
}
|
|
1049
|
+
if (result) console.log(result);
|
|
1050
|
+
process.exit(0);
|
|
1051
|
+
});
|
|
1052
|
+
experimentsCmd.command("refresh").description("Download remote feature flags from the Autohand API").action(async () => {
|
|
1053
|
+
const { features } = await Promise.resolve().then(() => _interopRequireWildcard(require("./features-LT55MURX.cjs")));
|
|
1054
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, program.opts().config);
|
|
1055
|
+
const result = await features({ config }, ["refresh"]);
|
|
1056
|
+
if (result) console.log(result);
|
|
1057
|
+
process.exit(0);
|
|
1058
|
+
});
|
|
1059
|
+
experimentsCmd.command("enable <feature>").description("Enable an experiment").action(async (featureId) => {
|
|
1060
|
+
const { setFeatureEnabled } = await Promise.resolve().then(() => _interopRequireWildcard(require("./features-LT55MURX.cjs")));
|
|
1061
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, program.opts().config);
|
|
1062
|
+
const result = await setFeatureEnabled(config, featureId, true);
|
|
1063
|
+
if (result.startsWith("Unknown feature")) {
|
|
1064
|
+
console.log(_chalk2.default.red(result));
|
|
1065
|
+
process.exit(1);
|
|
1066
|
+
}
|
|
1067
|
+
console.log(result);
|
|
1068
|
+
process.exit(0);
|
|
1069
|
+
});
|
|
1070
|
+
experimentsCmd.command("disable <feature>").description("Disable an experiment").action(async (featureId) => {
|
|
1071
|
+
const { setFeatureEnabled } = await Promise.resolve().then(() => _interopRequireWildcard(require("./features-LT55MURX.cjs")));
|
|
1072
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, program.opts().config);
|
|
1073
|
+
const result = await setFeatureEnabled(config, featureId, false);
|
|
1074
|
+
if (result.startsWith("Unknown feature")) {
|
|
1075
|
+
console.log(_chalk2.default.red(result));
|
|
1076
|
+
process.exit(1);
|
|
1077
|
+
}
|
|
1078
|
+
console.log(result);
|
|
1079
|
+
process.exit(0);
|
|
1080
|
+
});
|
|
903
1081
|
program.command("sessions").description("List saved sessions").option("--project <name>", "Filter sessions by project name").action(async (opts) => {
|
|
904
|
-
const { SessionManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./SessionManager-
|
|
1082
|
+
const { SessionManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./SessionManager-LGPQIA57.cjs")));
|
|
905
1083
|
const sessionManager = new SessionManager();
|
|
906
1084
|
await sessionManager.initialize();
|
|
907
|
-
const { sessions } = await Promise.resolve().then(() => _interopRequireWildcard(require("./sessions-
|
|
1085
|
+
const { sessions } = await Promise.resolve().then(() => _interopRequireWildcard(require("./sessions-3JUOT3ED.cjs")));
|
|
908
1086
|
const args = opts.project ? ["--project", opts.project] : [];
|
|
909
1087
|
await sessions({ sessionManager, args });
|
|
910
1088
|
process.exit(0);
|
|
911
1089
|
});
|
|
912
1090
|
program.command("init").description("Create an AGENTS.md file in the workspace").option("--path <path>", "Workspace path").action(async (opts) => {
|
|
913
|
-
const config = await
|
|
914
|
-
const workspaceRoot =
|
|
1091
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, void 0, process.cwd());
|
|
1092
|
+
const workspaceRoot = _chunkCNQKIWIScjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
|
|
915
1093
|
const agentsPath = _path2.default.join(workspaceRoot, "AGENTS.md");
|
|
916
1094
|
const exists = await _fsextra2.default.pathExists(agentsPath);
|
|
917
1095
|
if (exists) {
|
|
918
1096
|
console.log(_chalk2.default.yellow("AGENTS.md already exists in this workspace."));
|
|
919
1097
|
process.exit(0);
|
|
920
1098
|
}
|
|
921
|
-
const
|
|
922
|
-
|
|
923
|
-
"",
|
|
924
|
-
"## Project Context",
|
|
925
|
-
"Describe your project here so the agent understands the codebase.",
|
|
926
|
-
"",
|
|
927
|
-
"## Coding Standards",
|
|
928
|
-
"- List your coding conventions",
|
|
929
|
-
"- Preferred patterns and practices",
|
|
930
|
-
"",
|
|
931
|
-
"## Important Files",
|
|
932
|
-
"- `src/index.ts` - Entry point",
|
|
933
|
-
""
|
|
934
|
-
].join("\n");
|
|
935
|
-
await _fsextra2.default.writeFile(agentsPath, template);
|
|
1099
|
+
const generator = new (0, _chunkCMEZ42F2cjs.AgentsGenerator)();
|
|
1100
|
+
await _fsextra2.default.writeFile(agentsPath, generator.generateContent({}));
|
|
936
1101
|
console.log(_chalk2.default.green(`Created ${agentsPath}`));
|
|
937
1102
|
process.exit(0);
|
|
938
1103
|
});
|
|
939
1104
|
program.command("completion <shell>").description("Generate shell completion scripts (bash, zsh, fish)").action(async (shell) => {
|
|
940
|
-
const { runCompletionCommand } = await Promise.resolve().then(() => _interopRequireWildcard(require("./completion-
|
|
1105
|
+
const { runCompletionCommand } = await Promise.resolve().then(() => _interopRequireWildcard(require("./completion-G7Z436TF.cjs")));
|
|
941
1106
|
await runCompletionCommand(shell);
|
|
942
1107
|
process.exit(0);
|
|
943
1108
|
});
|
|
944
1109
|
program.command("update").description("Check for updates and install if available").option("--check", "Only check for updates without installing").action(async (opts) => {
|
|
945
1110
|
const { runUpdate } = await Promise.resolve().then(() => _interopRequireWildcard(require("./update-NV6QRYY7.cjs")));
|
|
946
1111
|
await runUpdate({
|
|
947
|
-
currentVersion:
|
|
1112
|
+
currentVersion: _chunkCSUGNNJYcjs.package_default.version,
|
|
948
1113
|
check: _nullishCoalesce(opts.check, () => ( false))
|
|
949
1114
|
});
|
|
950
1115
|
});
|
|
951
1116
|
program.command("upgrade").description("Check for updates and install if available").option("--check", "Only check for updates without installing").action(async (opts) => {
|
|
952
1117
|
const { runUpdate } = await Promise.resolve().then(() => _interopRequireWildcard(require("./update-NV6QRYY7.cjs")));
|
|
953
1118
|
await runUpdate({
|
|
954
|
-
currentVersion:
|
|
1119
|
+
currentVersion: _chunkCSUGNNJYcjs.package_default.version,
|
|
955
1120
|
check: _nullishCoalesce(opts.check, () => ( false))
|
|
956
1121
|
});
|
|
957
1122
|
});
|
|
958
|
-
program.command("import [source]").description("Import data from other coding agents (claude, codex, gemini, cursor, cline, continue, augment)").option("--all", "Import all available categories without prompting").option("--categories <list>", "Comma-separated list of categories to import (sessions,settings,skills,memory,mcp,hooks)", (val) => val.split(",")).option("--dry-run", "Preview what would be imported without making changes").option("--retry-failed", "Retry previously failed import items").action(async (source, opts) => {
|
|
959
|
-
const { runImport } = await Promise.resolve().then(() => _interopRequireWildcard(require("./import-
|
|
1123
|
+
program.command("import [source]").description("Import data from other coding agents (claude, codex, gemini, cursor, cline, continue, augment, opencode, kimi)").option("--all", "Import all available categories without prompting").option("--categories <list>", "Comma-separated list of categories to import (sessions,settings,skills,memory,mcp,hooks)", (val) => val.split(",")).option("--dry-run", "Preview what would be imported without making changes").option("--retry-failed", "Retry previously failed import items").action(async (source, opts) => {
|
|
1124
|
+
const { runImport } = await Promise.resolve().then(() => _interopRequireWildcard(require("./import-2IG76KAN.cjs")));
|
|
960
1125
|
await runImport({
|
|
961
1126
|
source,
|
|
962
1127
|
categories: opts.categories,
|
|
@@ -968,15 +1133,18 @@ program.command("import [source]").description("Import data from other coding ag
|
|
|
968
1133
|
});
|
|
969
1134
|
async function runCLI(options) {
|
|
970
1135
|
try {
|
|
971
|
-
let config = await
|
|
972
|
-
|
|
1136
|
+
let config = await _asyncNullishCoalesce(options._authConfig, async () => ( await _chunkCNQKIWIScjs.loadConfig.call(void 0, options.config, process.cwd())));
|
|
1137
|
+
if (options.bare) {
|
|
1138
|
+
config = await _chunkEFXFURDYcjs.prepareBareModeConfig.call(void 0, config, options);
|
|
1139
|
+
}
|
|
1140
|
+
const originalWorkspaceRoot = _chunkCNQKIWIScjs.resolveWorkspaceRoot.call(void 0, config, options.path);
|
|
973
1141
|
let workspaceRoot = originalWorkspaceRoot;
|
|
974
1142
|
let sessionWorktree = null;
|
|
975
|
-
const { locale: detectedLocale } =
|
|
1143
|
+
const { locale: detectedLocale } = _chunkRJCZLFHEcjs.detectLocale.call(void 0, {
|
|
976
1144
|
cliOverride: options.displayLanguage,
|
|
977
1145
|
configLocale: _optionalChain([config, 'access', _45 => _45.ui, 'optionalAccess', _46 => _46.locale])
|
|
978
1146
|
});
|
|
979
|
-
await
|
|
1147
|
+
await _chunkRJCZLFHEcjs.initI18n.call(void 0, detectedLocale);
|
|
980
1148
|
const {
|
|
981
1149
|
buildPermissionSettingsFromYolo,
|
|
982
1150
|
normalizeYoloInput,
|
|
@@ -997,9 +1165,9 @@ async function runCLI(options) {
|
|
|
997
1165
|
}
|
|
998
1166
|
}
|
|
999
1167
|
const providerName = _nullishCoalesce(config.provider, () => ( "openrouter"));
|
|
1000
|
-
const providerConfig =
|
|
1168
|
+
const providerConfig = _chunkCNQKIWIScjs.getProviderConfig.call(void 0, config, providerName);
|
|
1001
1169
|
if (!providerConfig) {
|
|
1002
|
-
const { SetupWizard } = await Promise.resolve().then(() => _interopRequireWildcard(require("./onboarding-
|
|
1170
|
+
const { SetupWizard } = await Promise.resolve().then(() => _interopRequireWildcard(require("./onboarding-5DZFCO5Q.cjs")));
|
|
1003
1171
|
const wizard = new SetupWizard(originalWorkspaceRoot, config);
|
|
1004
1172
|
const result = await wizard.run({ skipWelcome: !config.isNewConfig });
|
|
1005
1173
|
if (result.cancelled) {
|
|
@@ -1008,11 +1176,11 @@ async function runCLI(options) {
|
|
|
1008
1176
|
}
|
|
1009
1177
|
if (result.success) {
|
|
1010
1178
|
config = { ...config, ...result.config };
|
|
1011
|
-
await
|
|
1179
|
+
await _chunkCNQKIWIScjs.saveConfig.call(void 0, config);
|
|
1012
1180
|
console.log();
|
|
1013
1181
|
}
|
|
1014
1182
|
}
|
|
1015
|
-
const workspacePathValidation = await
|
|
1183
|
+
const workspacePathValidation = await _chunkQLZOMZO5cjs.validateWorkspacePath.call(void 0, originalWorkspaceRoot);
|
|
1016
1184
|
if (!workspacePathValidation.valid) {
|
|
1017
1185
|
console.error(_chalk2.default.red(`Error: ${workspacePathValidation.error}`));
|
|
1018
1186
|
process.exit(1);
|
|
@@ -1022,8 +1190,8 @@ async function runCLI(options) {
|
|
|
1022
1190
|
_chunkWGNMOVMTcjs.printDangerousWorkspaceWarning.call(void 0, originalWorkspaceRoot, safetyCheck);
|
|
1023
1191
|
process.exit(1);
|
|
1024
1192
|
}
|
|
1025
|
-
if (
|
|
1026
|
-
sessionWorktree =
|
|
1193
|
+
if (_chunkEFXFURDYcjs.isSessionWorktreeEnabled.call(void 0, options.worktree)) {
|
|
1194
|
+
sessionWorktree = _chunkEFXFURDYcjs.prepareSessionWorktree.call(void 0, {
|
|
1027
1195
|
cwd: originalWorkspaceRoot,
|
|
1028
1196
|
worktree: options.worktree,
|
|
1029
1197
|
mode: "cli"
|
|
@@ -1071,81 +1239,87 @@ async function runCLI(options) {
|
|
|
1071
1239
|
}
|
|
1072
1240
|
const { shouldUseInkRenderer } = await Promise.resolve().then(() => _interopRequireWildcard(require("./inkMode-VUE6ZDLD.cjs")));
|
|
1073
1241
|
const inkEnabled = shouldUseInkRenderer();
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1242
|
+
if (!options.bare) {
|
|
1243
|
+
initPingService({
|
|
1244
|
+
cliVersion: _chunkCSUGNNJYcjs.package_default.version,
|
|
1245
|
+
clientType: "cli"
|
|
1246
|
+
});
|
|
1247
|
+
startPingService();
|
|
1248
|
+
const stopPing = () => stopPingService();
|
|
1249
|
+
process.on("exit", stopPing);
|
|
1250
|
+
process.on("SIGINT", stopPing);
|
|
1251
|
+
process.on("SIGTERM", stopPing);
|
|
1252
|
+
}
|
|
1083
1253
|
printWelcome(runtime, void 0, null);
|
|
1084
1254
|
if (inkEnabled && process.stdout.isTTY) {
|
|
1085
1255
|
process.stdout.write("\x1B[s");
|
|
1086
1256
|
process.stdout.write("\x1B[u");
|
|
1087
1257
|
}
|
|
1088
1258
|
const agentHolder = { current: null };
|
|
1089
|
-
|
|
1090
|
-
const checkResults = await _chunk3LJJG5YYcjs.runStartupChecks.call(void 0, workspaceRoot);
|
|
1091
|
-
_chunk3LJJG5YYcjs.printStartupCheckResults.call(void 0, checkResults);
|
|
1092
|
-
if (!checkResults.allRequiredMet) {
|
|
1093
|
-
console.log(_chalk2.default.yellow("Continuing anyway, but some features may not work correctly.\n"));
|
|
1094
|
-
}
|
|
1095
|
-
} catch (e9) {
|
|
1096
|
-
}
|
|
1097
|
-
(async () => {
|
|
1259
|
+
if (!options.bare) {
|
|
1098
1260
|
try {
|
|
1099
|
-
const
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
validateAuthOnStartup(config),
|
|
1104
|
-
versionCheckPromise
|
|
1105
|
-
]);
|
|
1106
|
-
if (versionResult && agentHolder.current) {
|
|
1107
|
-
agentHolder.current.setVersionCheckResult(versionResult);
|
|
1261
|
+
const checkResults = await _chunkQLZOMZO5cjs.runStartupChecks.call(void 0, workspaceRoot);
|
|
1262
|
+
_chunkQLZOMZO5cjs.printStartupCheckResults.call(void 0, checkResults);
|
|
1263
|
+
if (!checkResults.allRequiredMet) {
|
|
1264
|
+
console.log(_chalk2.default.yellow("Continuing anyway, but some features may not work correctly.\n"));
|
|
1108
1265
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1266
|
+
} catch (e10) {
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
if (!options.bare) {
|
|
1270
|
+
(async () => {
|
|
1271
|
+
try {
|
|
1272
|
+
const versionCheckPromise = _optionalChain([config, 'access', _47 => _47.ui, 'optionalAccess', _48 => _48.checkForUpdates]) !== false ? _chunkFMB3TSWPcjs.checkForUpdates.call(void 0, _chunkCSUGNNJYcjs.package_default.version, {
|
|
1273
|
+
checkIntervalHours: _nullishCoalesce(_optionalChain([config, 'access', _49 => _49.ui, 'optionalAccess', _50 => _50.updateCheckInterval]), () => ( 24))
|
|
1274
|
+
}) : Promise.resolve(null);
|
|
1275
|
+
const [authUser, versionResult] = await Promise.all([
|
|
1276
|
+
validateAuthOnStartup(config),
|
|
1277
|
+
versionCheckPromise
|
|
1278
|
+
]);
|
|
1279
|
+
if (versionResult && agentHolder.current) {
|
|
1280
|
+
agentHolder.current.setVersionCheckResult(versionResult);
|
|
1281
|
+
}
|
|
1282
|
+
if (authUser && _optionalChain([config, 'access', _51 => _51.auth, 'optionalAccess', _52 => _52.token])) {
|
|
1283
|
+
const syncEnabled = options.syncSettings !== false && _optionalChain([config, 'access', _53 => _53.sync, 'optionalAccess', _54 => _54.enabled]) !== false;
|
|
1284
|
+
if (syncEnabled) {
|
|
1285
|
+
try {
|
|
1286
|
+
const { createSyncService, DEFAULT_SYNC_CONFIG } = await Promise.resolve().then(() => _interopRequireWildcard(require("./sync-254WF6JI.cjs")));
|
|
1287
|
+
const { setSyncService } = await Promise.resolve().then(() => _interopRequireWildcard(require("./sync-2DIZN4EH.cjs")));
|
|
1288
|
+
const syncService = createSyncService({
|
|
1289
|
+
authToken: config.auth.token,
|
|
1290
|
+
userId: authUser.id,
|
|
1291
|
+
config: {
|
|
1292
|
+
...DEFAULT_SYNC_CONFIG,
|
|
1293
|
+
...config.sync,
|
|
1294
|
+
enabled: true
|
|
1295
|
+
},
|
|
1296
|
+
onAuthFailure: async () => {
|
|
1297
|
+
const message = "Session sync failed. Run /logout and /login if you continue to see this message.";
|
|
1298
|
+
if (agentHolder.current) {
|
|
1299
|
+
agentHolder.current.notifyUser(message);
|
|
1300
|
+
} else {
|
|
1301
|
+
const { promptNotify } = await Promise.resolve().then(() => _interopRequireWildcard(require("./inputPrompt-WVGVWAHS.cjs")));
|
|
1302
|
+
promptNotify(_chalk2.default.yellow(message));
|
|
1303
|
+
}
|
|
1130
1304
|
}
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1305
|
+
});
|
|
1306
|
+
syncService.start();
|
|
1307
|
+
setSyncService(syncService);
|
|
1308
|
+
const stopSync = () => {
|
|
1309
|
+
_optionalChain([syncService, 'optionalAccess', _55 => _55.stop, 'call', _56 => _56()]);
|
|
1310
|
+
setSyncService(null);
|
|
1311
|
+
};
|
|
1312
|
+
process.on("exit", stopSync);
|
|
1313
|
+
process.on("SIGINT", stopSync);
|
|
1314
|
+
process.on("SIGTERM", stopSync);
|
|
1315
|
+
} catch (e11) {
|
|
1316
|
+
}
|
|
1143
1317
|
}
|
|
1144
1318
|
}
|
|
1319
|
+
} catch (e12) {
|
|
1145
1320
|
}
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
})();
|
|
1321
|
+
})();
|
|
1322
|
+
}
|
|
1149
1323
|
if (options.model) {
|
|
1150
1324
|
const providerName2 = _nullishCoalesce(config.provider, () => ( "openrouter"));
|
|
1151
1325
|
if (config[providerName2]) {
|
|
@@ -1156,13 +1330,13 @@ async function runCLI(options) {
|
|
|
1156
1330
|
config.agent = _nullishCoalesce(config.agent, () => ( {}));
|
|
1157
1331
|
config.agent.debug = true;
|
|
1158
1332
|
}
|
|
1159
|
-
const { ProviderFactory } = await Promise.resolve().then(() => _interopRequireWildcard(require("./ProviderFactory-
|
|
1333
|
+
const { ProviderFactory } = await Promise.resolve().then(() => _interopRequireWildcard(require("./ProviderFactory-3BFS65V7.cjs")));
|
|
1160
1334
|
const { FileActionManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./filesystem-PGUPCMVK.cjs")));
|
|
1161
1335
|
const llmProvider = ProviderFactory.create(config);
|
|
1162
1336
|
const files = new FileActionManager(workspaceRoot, runtime.additionalDirs);
|
|
1163
1337
|
if (options.autoSkill) {
|
|
1164
1338
|
console.log(_chalk2.default.cyan("\nAuto-generating skills for this project...\n"));
|
|
1165
|
-
const { runAutoSkillGeneration } = await Promise.resolve().then(() => _interopRequireWildcard(require("./autoSkill-
|
|
1339
|
+
const { runAutoSkillGeneration } = await Promise.resolve().then(() => _interopRequireWildcard(require("./autoSkill-YL6PN6AV.cjs")));
|
|
1166
1340
|
const result = await runAutoSkillGeneration(workspaceRoot, llmProvider);
|
|
1167
1341
|
if (!result.success) {
|
|
1168
1342
|
console.log(_chalk2.default.yellow(result.error || "Failed to generate skills"));
|
|
@@ -1204,7 +1378,7 @@ async function runCLI(options) {
|
|
|
1204
1378
|
configurable: true
|
|
1205
1379
|
});
|
|
1206
1380
|
pipeInitialInstruction = pipedInput;
|
|
1207
|
-
} catch (
|
|
1381
|
+
} catch (e13) {
|
|
1208
1382
|
options.prompt = pipedInput;
|
|
1209
1383
|
}
|
|
1210
1384
|
} else {
|
|
@@ -1212,11 +1386,11 @@ async function runCLI(options) {
|
|
|
1212
1386
|
}
|
|
1213
1387
|
}
|
|
1214
1388
|
}
|
|
1215
|
-
const { AutohandAgent } = await Promise.resolve().then(() => _interopRequireWildcard(require("./agent-
|
|
1389
|
+
const { AutohandAgent } = await Promise.resolve().then(() => _interopRequireWildcard(require("./agent-YYEHGDAK.cjs")));
|
|
1216
1390
|
const agent = new AutohandAgent(llmProvider, files, runtime);
|
|
1217
1391
|
agentHolder.current = agent;
|
|
1218
1392
|
if (options.chrome) {
|
|
1219
|
-
const { ensureNativeHostInstalled, createBrowserHandoff, buildChromeOpenUrl: buildChromeOpenUrl2, openChromeContinuation: openChromeContinuation2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./chrome-
|
|
1393
|
+
const { ensureNativeHostInstalled, createBrowserHandoff, buildChromeOpenUrl: buildChromeOpenUrl2, openChromeContinuation: openChromeContinuation2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./chrome-IFVZRHAT.cjs")));
|
|
1220
1394
|
const extensionId = _optionalChain([config, 'access', _57 => _57.chrome, 'optionalAccess', _58 => _58.extensionId]);
|
|
1221
1395
|
await ensureNativeHostInstalled({ extensionId }).catch(() => {
|
|
1222
1396
|
});
|
|
@@ -1244,7 +1418,20 @@ async function runCLI(options) {
|
|
|
1244
1418
|
console.log(_chalk2.default.gray(` Session: ${sessionId}
|
|
1245
1419
|
`));
|
|
1246
1420
|
}
|
|
1247
|
-
if (options.
|
|
1421
|
+
if (options.fork) {
|
|
1422
|
+
const forkEnabled = _optionalChain([_chunk7TO3PDMVcjs.getFeatureState.call(void 0, config, "experimental_fork"), 'optionalAccess', _71 => _71.enabled]) === true;
|
|
1423
|
+
if (!forkEnabled) {
|
|
1424
|
+
console.error(_chalk2.default.red("The --fork flag is behind experimental_fork. Run /features enable experimental_fork, then try again."));
|
|
1425
|
+
process.exit(1);
|
|
1426
|
+
}
|
|
1427
|
+
const sessionManager = agent.getSessionManager();
|
|
1428
|
+
await sessionManager.initialize();
|
|
1429
|
+
const forked = await sessionManager.branchSession(options.fork, { type: "fork" });
|
|
1430
|
+
console.log(_chalk2.default.green(`
|
|
1431
|
+
Forked session ${forked.metadata.sessionId}.`));
|
|
1432
|
+
await agent.resumeSession(forked.metadata.sessionId);
|
|
1433
|
+
process.exit(0);
|
|
1434
|
+
} else if (options.prompt) {
|
|
1248
1435
|
await agent.runCommandMode(options.prompt);
|
|
1249
1436
|
process.exit(0);
|
|
1250
1437
|
} else if (options.resumeSessionId) {
|
|
@@ -1269,7 +1456,7 @@ function printBanner() {
|
|
|
1269
1456
|
}
|
|
1270
1457
|
if (process.stdout.isTTY) {
|
|
1271
1458
|
process.stdout.write("\x1B[3J\x1B[2J\x1B[H");
|
|
1272
|
-
console.log(
|
|
1459
|
+
console.log(_chunkEFXFURDYcjs.formatStartupBanner.call(void 0, _chunkSD3NTC7Dcjs.renderAutohandLogo.call(void 0, { columns: _chunkSD3NTC7Dcjs.getTerminalColumns.call(void 0, process.stdout) })));
|
|
1273
1460
|
} else {
|
|
1274
1461
|
console.log("autohand");
|
|
1275
1462
|
}
|
|
@@ -1298,50 +1485,50 @@ function printWelcome(runtime, authUser, versionCheck) {
|
|
|
1298
1485
|
}
|
|
1299
1486
|
const model = (() => {
|
|
1300
1487
|
try {
|
|
1301
|
-
const settings =
|
|
1302
|
-
return _nullishCoalesce(_nullishCoalesce(runtime.options.model, () => ( _optionalChain([settings, 'optionalAccess',
|
|
1303
|
-
} catch (
|
|
1488
|
+
const settings = _chunkCNQKIWIScjs.getProviderConfig.call(void 0, runtime.config);
|
|
1489
|
+
return _nullishCoalesce(_nullishCoalesce(runtime.options.model, () => ( _optionalChain([settings, 'optionalAccess', _72 => _72.model]))), () => ( "unknown"));
|
|
1490
|
+
} catch (e14) {
|
|
1304
1491
|
return _nullishCoalesce(runtime.options.model, () => ( "unknown"));
|
|
1305
1492
|
}
|
|
1306
1493
|
})();
|
|
1307
1494
|
const dir = runtime.workspaceRoot;
|
|
1308
|
-
let versionLine =
|
|
1495
|
+
let versionLine = _chunkEFXFURDYcjs.formatWelcomeVersionPrefix.call(void 0, getVersionString());
|
|
1309
1496
|
if (versionCheck) {
|
|
1310
1497
|
if (versionCheck.isUpToDate) {
|
|
1311
|
-
versionLine +=
|
|
1498
|
+
versionLine += _chunkEFXFURDYcjs.formatUpdateReady.call(void 0, );
|
|
1312
1499
|
} else if (versionCheck.updateAvailable && versionCheck.latestVersion) {
|
|
1313
|
-
versionLine +=
|
|
1500
|
+
versionLine += _chunkEFXFURDYcjs.formatUpdateAvailable.call(void 0, versionCheck.latestVersion);
|
|
1314
1501
|
}
|
|
1315
1502
|
}
|
|
1316
1503
|
console.log(versionLine);
|
|
1317
|
-
if (_optionalChain([versionCheck, 'optionalAccess',
|
|
1318
|
-
console.log(
|
|
1504
|
+
if (_optionalChain([versionCheck, 'optionalAccess', _73 => _73.updateAvailable])) {
|
|
1505
|
+
console.log(_chunkEFXFURDYcjs.formatInstallHint.call(void 0, _chunkFMB3TSWPcjs.getInstallHint.call(void 0, versionCheck.channel)));
|
|
1319
1506
|
}
|
|
1320
|
-
const isLoggedIn = !!(authUser || _optionalChain([runtime, 'access',
|
|
1507
|
+
const isLoggedIn = !!(authUser || _optionalChain([runtime, 'access', _74 => _74.config, 'access', _75 => _75.auth, 'optionalAccess', _76 => _76.token]));
|
|
1321
1508
|
if (authUser) {
|
|
1322
|
-
console.log(
|
|
1509
|
+
console.log(_chunkEFXFURDYcjs.formatWelcomeGreeting.call(void 0, authUser.name || authUser.email));
|
|
1323
1510
|
}
|
|
1324
1511
|
const ccEnabled = runtime.options.contextCompact !== false;
|
|
1325
|
-
console.log(
|
|
1512
|
+
console.log(_chunkEFXFURDYcjs.formatWelcomeStatusLine.call(void 0, model, ccEnabled, dir));
|
|
1326
1513
|
console.log();
|
|
1327
1514
|
const suggestions = buildWelcomeSuggestions(isLoggedIn, dir);
|
|
1328
|
-
console.log(
|
|
1515
|
+
console.log(_chunkEFXFURDYcjs.formatWelcomeTitle.call(void 0, ));
|
|
1329
1516
|
for (const s of suggestions) {
|
|
1330
|
-
console.log(
|
|
1517
|
+
console.log(_chunkEFXFURDYcjs.formatWelcomeSuggestion.call(void 0, s.command, s.description));
|
|
1331
1518
|
}
|
|
1332
1519
|
console.log();
|
|
1333
1520
|
}
|
|
1334
1521
|
async function runSkillInstall(opts) {
|
|
1335
|
-
const config = await
|
|
1336
|
-
const workspaceRoot =
|
|
1522
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config);
|
|
1523
|
+
const workspaceRoot = _chunkCNQKIWIScjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
|
|
1337
1524
|
const safetyCheck = _chunkWGNMOVMTcjs.checkWorkspaceSafety.call(void 0, workspaceRoot);
|
|
1338
1525
|
if (!safetyCheck.safe) {
|
|
1339
1526
|
_chunkWGNMOVMTcjs.printDangerousWorkspaceWarning.call(void 0, workspaceRoot, safetyCheck);
|
|
1340
1527
|
process.exit(1);
|
|
1341
1528
|
}
|
|
1342
|
-
const { SkillsRegistry } = await Promise.resolve().then(() => _interopRequireWildcard(require("./SkillsRegistry-
|
|
1343
|
-
const { AUTOHAND_PATHS } = await Promise.resolve().then(() => _interopRequireWildcard(require("./constants-
|
|
1344
|
-
const { skillsInstall } = await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-install-
|
|
1529
|
+
const { SkillsRegistry } = await Promise.resolve().then(() => _interopRequireWildcard(require("./SkillsRegistry-PM34DQNA.cjs")));
|
|
1530
|
+
const { AUTOHAND_PATHS } = await Promise.resolve().then(() => _interopRequireWildcard(require("./constants-B4W5BT7F.cjs")));
|
|
1531
|
+
const { skillsInstall } = await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-install-D7K476SL.cjs")));
|
|
1345
1532
|
const skillsRegistry = new SkillsRegistry(AUTOHAND_PATHS.skills);
|
|
1346
1533
|
await skillsRegistry.initialize();
|
|
1347
1534
|
await skillsRegistry.setWorkspace(workspaceRoot);
|
|
@@ -1352,21 +1539,21 @@ async function runSkillInstall(opts) {
|
|
|
1352
1539
|
}, skillName);
|
|
1353
1540
|
}
|
|
1354
1541
|
async function runLearnNonInteractive(opts, subcommand) {
|
|
1355
|
-
const config = await
|
|
1356
|
-
const workspaceRoot =
|
|
1542
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config);
|
|
1543
|
+
const workspaceRoot = _chunkCNQKIWIScjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
|
|
1357
1544
|
const safetyCheck = _chunkWGNMOVMTcjs.checkWorkspaceSafety.call(void 0, workspaceRoot);
|
|
1358
1545
|
if (!safetyCheck.safe) {
|
|
1359
1546
|
_chunkWGNMOVMTcjs.printDangerousWorkspaceWarning.call(void 0, workspaceRoot, safetyCheck);
|
|
1360
1547
|
process.exit(1);
|
|
1361
1548
|
}
|
|
1362
|
-
const { learn } = await Promise.resolve().then(() => _interopRequireWildcard(require("./learn-
|
|
1363
|
-
const { SkillsRegistry } = await Promise.resolve().then(() => _interopRequireWildcard(require("./SkillsRegistry-
|
|
1364
|
-
const { AUTOHAND_PATHS } = await Promise.resolve().then(() => _interopRequireWildcard(require("./constants-
|
|
1365
|
-
const { HookManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./HookManager-
|
|
1549
|
+
const { learn } = await Promise.resolve().then(() => _interopRequireWildcard(require("./learn-NLSHI2MZ.cjs")));
|
|
1550
|
+
const { SkillsRegistry } = await Promise.resolve().then(() => _interopRequireWildcard(require("./SkillsRegistry-PM34DQNA.cjs")));
|
|
1551
|
+
const { AUTOHAND_PATHS } = await Promise.resolve().then(() => _interopRequireWildcard(require("./constants-B4W5BT7F.cjs")));
|
|
1552
|
+
const { HookManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./HookManager-ZL2CLAJW.cjs")));
|
|
1366
1553
|
const skillsRegistry = new SkillsRegistry(AUTOHAND_PATHS.skills);
|
|
1367
1554
|
await skillsRegistry.initialize();
|
|
1368
1555
|
await skillsRegistry.setWorkspace(workspaceRoot);
|
|
1369
|
-
const { ProviderFactory } = await Promise.resolve().then(() => _interopRequireWildcard(require("./ProviderFactory-
|
|
1556
|
+
const { ProviderFactory } = await Promise.resolve().then(() => _interopRequireWildcard(require("./ProviderFactory-3BFS65V7.cjs")));
|
|
1370
1557
|
const llmProvider = ProviderFactory.create(config);
|
|
1371
1558
|
const hookManager = new HookManager({ workspaceRoot });
|
|
1372
1559
|
const args = subcommand === "update" ? ["update"] : [];
|
|
@@ -1381,6 +1568,28 @@ async function runLearnNonInteractive(opts, subcommand) {
|
|
|
1381
1568
|
console.log(result);
|
|
1382
1569
|
}
|
|
1383
1570
|
}
|
|
1571
|
+
async function runGoalFlag(opts) {
|
|
1572
|
+
const config = await _asyncNullishCoalesce(opts._authConfig, async () => ( await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config, process.cwd())));
|
|
1573
|
+
const { GOAL_FEATURE_DISABLED_MESSAGE, isGoalFeatureEnabled } = await Promise.resolve().then(() => _interopRequireWildcard(require("./feature-KP74CZ3F.cjs")));
|
|
1574
|
+
if (!isGoalFeatureEnabled(config)) {
|
|
1575
|
+
console.error(_chalk2.default.yellow(GOAL_FEATURE_DISABLED_MESSAGE));
|
|
1576
|
+
process.exit(1);
|
|
1577
|
+
}
|
|
1578
|
+
const workspaceRoot = _chunkCNQKIWIScjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
|
|
1579
|
+
const workspacePathValidation = await _chunkQLZOMZO5cjs.validateWorkspacePath.call(void 0, workspaceRoot);
|
|
1580
|
+
if (!workspacePathValidation.valid) {
|
|
1581
|
+
console.error(_chalk2.default.red(`Error: ${workspacePathValidation.error}`));
|
|
1582
|
+
process.exit(1);
|
|
1583
|
+
}
|
|
1584
|
+
const safetyCheck = _chunkWGNMOVMTcjs.checkWorkspaceSafety.call(void 0, workspaceRoot);
|
|
1585
|
+
if (!safetyCheck.safe) {
|
|
1586
|
+
_chunkWGNMOVMTcjs.printDangerousWorkspaceWarning.call(void 0, workspaceRoot, safetyCheck);
|
|
1587
|
+
process.exit(1);
|
|
1588
|
+
}
|
|
1589
|
+
const { runGoalCli } = await Promise.resolve().then(() => _interopRequireWildcard(require("./goal-DL2N2AWT.cjs")));
|
|
1590
|
+
const result = await runGoalCli(workspaceRoot, _nullishCoalesce(opts.goal, () => ( "")), config);
|
|
1591
|
+
console.log(result);
|
|
1592
|
+
}
|
|
1384
1593
|
function renderPermissionScope(title, pathLabel, allowList, denyList) {
|
|
1385
1594
|
console.log(_chalk2.default.bold(title));
|
|
1386
1595
|
console.log(_chalk2.default.gray(pathLabel));
|
|
@@ -1403,14 +1612,14 @@ function renderPermissionScope(title, pathLabel, allowList, denyList) {
|
|
|
1403
1612
|
console.log();
|
|
1404
1613
|
}
|
|
1405
1614
|
async function displayPermissions(opts) {
|
|
1406
|
-
const config = await
|
|
1407
|
-
const workspaceRoot =
|
|
1615
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config);
|
|
1616
|
+
const workspaceRoot = _chunkCNQKIWIScjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
|
|
1408
1617
|
const safetyCheck = _chunkWGNMOVMTcjs.checkWorkspaceSafety.call(void 0, workspaceRoot);
|
|
1409
1618
|
if (!safetyCheck.safe) {
|
|
1410
1619
|
_chunkWGNMOVMTcjs.printDangerousWorkspaceWarning.call(void 0, workspaceRoot, safetyCheck);
|
|
1411
1620
|
process.exit(1);
|
|
1412
1621
|
}
|
|
1413
|
-
const { PermissionManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./PermissionManager-
|
|
1622
|
+
const { PermissionManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./PermissionManager-ZNURIEYR.cjs")));
|
|
1414
1623
|
const manager = new PermissionManager({
|
|
1415
1624
|
settings: config.permissions,
|
|
1416
1625
|
workspaceRoot
|
|
@@ -1449,10 +1658,10 @@ async function runPatchMode(opts) {
|
|
|
1449
1658
|
}
|
|
1450
1659
|
const fs3 = await Promise.resolve().then(() => _interopRequireWildcard(require("fs-extra")));
|
|
1451
1660
|
const { generateUnifiedPatch, formatChangeSummary } = await Promise.resolve().then(() => _interopRequireWildcard(require("./patch-DJ2GPFST.cjs")));
|
|
1452
|
-
const config = await
|
|
1453
|
-
const originalWorkspaceRoot =
|
|
1661
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config);
|
|
1662
|
+
const originalWorkspaceRoot = _chunkCNQKIWIScjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
|
|
1454
1663
|
let workspaceRoot = originalWorkspaceRoot;
|
|
1455
|
-
const workspacePathValidation = await
|
|
1664
|
+
const workspacePathValidation = await _chunkQLZOMZO5cjs.validateWorkspacePath.call(void 0, originalWorkspaceRoot);
|
|
1456
1665
|
if (!workspacePathValidation.valid) {
|
|
1457
1666
|
console.error(_chalk2.default.red(`Error: ${workspacePathValidation.error}`));
|
|
1458
1667
|
process.exit(1);
|
|
@@ -1462,8 +1671,8 @@ async function runPatchMode(opts) {
|
|
|
1462
1671
|
_chunkWGNMOVMTcjs.printDangerousWorkspaceWarning.call(void 0, originalWorkspaceRoot, safetyCheck);
|
|
1463
1672
|
process.exit(1);
|
|
1464
1673
|
}
|
|
1465
|
-
if (
|
|
1466
|
-
const sessionWorktree =
|
|
1674
|
+
if (_chunkEFXFURDYcjs.isSessionWorktreeEnabled.call(void 0, opts.worktree)) {
|
|
1675
|
+
const sessionWorktree = _chunkEFXFURDYcjs.prepareSessionWorktree.call(void 0, {
|
|
1467
1676
|
cwd: originalWorkspaceRoot,
|
|
1468
1677
|
worktree: opts.worktree,
|
|
1469
1678
|
mode: "patch"
|
|
@@ -1501,12 +1710,9 @@ async function runPatchMode(opts) {
|
|
|
1501
1710
|
}
|
|
1502
1711
|
}
|
|
1503
1712
|
if (opts.model) {
|
|
1504
|
-
|
|
1505
|
-
if (config[providerName]) {
|
|
1506
|
-
config[providerName].model = opts.model;
|
|
1507
|
-
}
|
|
1713
|
+
applyCliModelOverride(config, opts.model);
|
|
1508
1714
|
}
|
|
1509
|
-
const { ProviderFactory } = await Promise.resolve().then(() => _interopRequireWildcard(require("./ProviderFactory-
|
|
1715
|
+
const { ProviderFactory } = await Promise.resolve().then(() => _interopRequireWildcard(require("./ProviderFactory-3BFS65V7.cjs")));
|
|
1510
1716
|
const { FileActionManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./filesystem-PGUPCMVK.cjs")));
|
|
1511
1717
|
const llmProvider = ProviderFactory.create(config);
|
|
1512
1718
|
const files = new FileActionManager(workspaceRoot, additionalDirs);
|
|
@@ -1534,7 +1740,7 @@ async function runPatchMode(opts) {
|
|
|
1534
1740
|
parallelApiKey: _nullishCoalesce(searchConfig.parallelApiKey, () => ( process.env.PARALLEL_API_KEY))
|
|
1535
1741
|
});
|
|
1536
1742
|
try {
|
|
1537
|
-
const { AutohandAgent } = await Promise.resolve().then(() => _interopRequireWildcard(require("./agent-
|
|
1743
|
+
const { AutohandAgent } = await Promise.resolve().then(() => _interopRequireWildcard(require("./agent-YYEHGDAK.cjs")));
|
|
1538
1744
|
const agent = new AutohandAgent(llmProvider, files, runtime);
|
|
1539
1745
|
await agent.runCommandMode(opts.prompt);
|
|
1540
1746
|
const changes = files.getPendingChanges();
|
|
@@ -1567,9 +1773,9 @@ async function runAutoMode(opts) {
|
|
|
1567
1773
|
console.error(_chalk2.default.red("Error: --auto-mode requires a task prompt"));
|
|
1568
1774
|
process.exit(1);
|
|
1569
1775
|
}
|
|
1570
|
-
const config = await
|
|
1571
|
-
const originalWorkspaceRoot =
|
|
1572
|
-
const workspacePathValidation = await
|
|
1776
|
+
const config = await _chunkCNQKIWIScjs.loadConfig.call(void 0, opts.config);
|
|
1777
|
+
const originalWorkspaceRoot = _chunkCNQKIWIScjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
|
|
1778
|
+
const workspacePathValidation = await _chunkQLZOMZO5cjs.validateWorkspacePath.call(void 0, originalWorkspaceRoot);
|
|
1573
1779
|
if (!workspacePathValidation.valid) {
|
|
1574
1780
|
console.error(_chalk2.default.red(`Error: ${workspacePathValidation.error}`));
|
|
1575
1781
|
process.exit(1);
|
|
@@ -1602,19 +1808,16 @@ async function runAutoMode(opts) {
|
|
|
1602
1808
|
}
|
|
1603
1809
|
}
|
|
1604
1810
|
if (opts.model) {
|
|
1605
|
-
|
|
1606
|
-
if (config[providerName2]) {
|
|
1607
|
-
config[providerName2].model = opts.model;
|
|
1608
|
-
}
|
|
1811
|
+
applyCliModelOverride(config, opts.model);
|
|
1609
1812
|
}
|
|
1610
1813
|
if (opts.debug) {
|
|
1611
1814
|
config.agent = _nullishCoalesce(config.agent, () => ( {}));
|
|
1612
1815
|
config.agent.debug = true;
|
|
1613
1816
|
}
|
|
1614
1817
|
const { AutomodeManager, getAutomodeOptions } = await Promise.resolve().then(() => _interopRequireWildcard(require("./AutomodeManager-MPSXT2RH.cjs")));
|
|
1615
|
-
const { HookManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./HookManager-
|
|
1616
|
-
const { SessionManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./SessionManager-
|
|
1617
|
-
const { MemoryManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./MemoryManager-
|
|
1818
|
+
const { HookManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./HookManager-ZL2CLAJW.cjs")));
|
|
1819
|
+
const { SessionManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./SessionManager-LGPQIA57.cjs")));
|
|
1820
|
+
const { MemoryManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./MemoryManager-UOEQZIDC.cjs")));
|
|
1618
1821
|
const readline = await Promise.resolve().then(() => _interopRequireWildcard(require("readline")));
|
|
1619
1822
|
const automodeOptions = getAutomodeOptions(opts, config);
|
|
1620
1823
|
if (!automodeOptions) {
|
|
@@ -1628,7 +1831,7 @@ async function runAutoMode(opts) {
|
|
|
1628
1831
|
console.log(_chalk2.default.gray("Completion Marker:"), _chalk2.default.cyan(_nullishCoalesce(automodeOptions.completionPromise, () => ( "DONE"))));
|
|
1629
1832
|
console.log(_chalk2.default.gray("Worktree Isolation:"), _chalk2.default.cyan(automodeOptions.useWorktree !== false ? "enabled" : "disabled"));
|
|
1630
1833
|
const providerName = _nullishCoalesce(config.provider, () => ( "openrouter"));
|
|
1631
|
-
const modelName = _nullishCoalesce(_nullishCoalesce(opts.model, () => ( _optionalChain([config, 'access',
|
|
1834
|
+
const modelName = _nullishCoalesce(_nullishCoalesce(opts.model, () => ( _optionalChain([config, 'access', _77 => _77[providerName], 'optionalAccess', _78 => _78.model]))), () => ( "unknown"));
|
|
1632
1835
|
const sessionManager = new SessionManager();
|
|
1633
1836
|
await sessionManager.initialize();
|
|
1634
1837
|
const session = await sessionManager.createSession(originalWorkspaceRoot, modelName);
|
|
@@ -1655,7 +1858,7 @@ async function runAutoMode(opts) {
|
|
|
1655
1858
|
}
|
|
1656
1859
|
}
|
|
1657
1860
|
console.log();
|
|
1658
|
-
const { ProviderFactory } = await Promise.resolve().then(() => _interopRequireWildcard(require("./ProviderFactory-
|
|
1861
|
+
const { ProviderFactory } = await Promise.resolve().then(() => _interopRequireWildcard(require("./ProviderFactory-3BFS65V7.cjs")));
|
|
1659
1862
|
const llmProvider = ProviderFactory.create(config);
|
|
1660
1863
|
const { FileActionManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./filesystem-PGUPCMVK.cjs")));
|
|
1661
1864
|
const files = new FileActionManager(effectiveWorkspace, additionalDirs);
|
|
@@ -1696,7 +1899,7 @@ async function runAutoMode(opts) {
|
|
|
1696
1899
|
braveApiKey: _nullishCoalesce(searchConfig.braveApiKey, () => ( process.env.BRAVE_SEARCH_API_KEY)),
|
|
1697
1900
|
parallelApiKey: _nullishCoalesce(searchConfig.parallelApiKey, () => ( process.env.PARALLEL_API_KEY))
|
|
1698
1901
|
});
|
|
1699
|
-
const { AutohandAgent } = await Promise.resolve().then(() => _interopRequireWildcard(require("./agent-
|
|
1902
|
+
const { AutohandAgent } = await Promise.resolve().then(() => _interopRequireWildcard(require("./agent-YYEHGDAK.cjs")));
|
|
1700
1903
|
const agent = new AutohandAgent(llmProvider, files, runtime);
|
|
1701
1904
|
const runIteration = async (iteration, prompt, _abortSignal) => {
|
|
1702
1905
|
const iterationPrompt = buildIterationPrompt(prompt, iteration);
|
|
@@ -1735,14 +1938,14 @@ async function runAutoMode(opts) {
|
|
|
1735
1938
|
console.log(_chalk2.default.gray(`
|
|
1736
1939
|
\u{1F4CA} Auto-mode ${statusText2} after ${finalState.currentIteration} iterations`));
|
|
1737
1940
|
}
|
|
1738
|
-
const statusText = _optionalChain([finalState, 'optionalAccess',
|
|
1739
|
-
const exitCode = _optionalChain([finalState, 'optionalAccess',
|
|
1941
|
+
const statusText = _optionalChain([finalState, 'optionalAccess', _79 => _79.status]) === "completed" ? "completed" : `ended (${_optionalChain([finalState, 'optionalAccess', _80 => _80.status])})`;
|
|
1942
|
+
const exitCode = _optionalChain([finalState, 'optionalAccess', _81 => _81.status]) === "completed" ? 0 : 1;
|
|
1740
1943
|
const shouldHandoffToInteractive = opts.interactiveOnComplete === true && process.stdin.isTTY;
|
|
1741
1944
|
if (opts.interactiveOnComplete && !process.stdin.isTTY) {
|
|
1742
1945
|
console.log(_chalk2.default.yellow("\n\u26A0 --interactive-on-complete requested, but no TTY is available. Exiting after auto-mode.\n"));
|
|
1743
1946
|
}
|
|
1744
1947
|
if (!shouldHandoffToInteractive) {
|
|
1745
|
-
await sessionManager.closeSession(`Auto-mode ${statusText} after ${_nullishCoalesce(_optionalChain([finalState, 'optionalAccess',
|
|
1948
|
+
await sessionManager.closeSession(`Auto-mode ${statusText} after ${_nullishCoalesce(_optionalChain([finalState, 'optionalAccess', _82 => _82.currentIteration]), () => ( 0))} iterations: ${_optionalChain([opts, 'access', _83 => _83.autoMode, 'optionalAccess', _84 => _84.slice, 'call', _85 => _85(0, 50)])}...`);
|
|
1746
1949
|
console.log(_chalk2.default.gray(`
|
|
1747
1950
|
\u{1F4C1} Session saved: ${session.metadata.sessionId}`));
|
|
1748
1951
|
process.exit(exitCode);
|
|
@@ -1785,7 +1988,11 @@ function isCliEntrypoint() {
|
|
|
1785
1988
|
return import.meta.url === _url.pathToFileURL.call(void 0, entryPath).href;
|
|
1786
1989
|
}
|
|
1787
1990
|
if (isCliEntrypoint()) {
|
|
1788
|
-
void program.parseAsync()
|
|
1991
|
+
void program.parseAsync().catch((error) => {
|
|
1992
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1993
|
+
console.error(_chalk2.default.red(message));
|
|
1994
|
+
process.exit(1);
|
|
1995
|
+
});
|
|
1789
1996
|
}
|
|
1790
1997
|
function launchInTmuxIfRequested(opts) {
|
|
1791
1998
|
if (!opts.tmux) {
|
|
@@ -1809,7 +2016,7 @@ function launchInTmuxIfRequested(opts) {
|
|
|
1809
2016
|
encoding: "utf8"
|
|
1810
2017
|
});
|
|
1811
2018
|
if (create.status !== 0) {
|
|
1812
|
-
const details = _optionalChain([create, 'access',
|
|
2019
|
+
const details = _optionalChain([create, 'access', _86 => _86.stderr, 'optionalAccess', _87 => _87.trim, 'call', _88 => _88()]) || _optionalChain([create, 'access', _89 => _89.stdout, 'optionalAccess', _90 => _90.trim, 'call', _91 => _91()]) || "unknown error";
|
|
1813
2020
|
console.error(_chalk2.default.red(`Failed to start tmux session: ${details}`));
|
|
1814
2021
|
process.exit(1);
|
|
1815
2022
|
}
|
|
@@ -1832,6 +2039,11 @@ function launchInTmuxIfRequested(opts) {
|
|
|
1832
2039
|
|
|
1833
2040
|
|
|
1834
2041
|
exports.displayPermissions = displayPermissions;
|
|
2042
|
+
/**
|
|
2043
|
+
* @license
|
|
2044
|
+
* Copyright 2026 Autohand AI LLC
|
|
2045
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2046
|
+
*/
|
|
1835
2047
|
/**
|
|
1836
2048
|
* PingService - Periodic device ping for usage tracking
|
|
1837
2049
|
* Runs independently of telemetry opt-in (anonymous usage counting)
|
|
@@ -1850,8 +2062,3 @@ exports.displayPermissions = displayPermissions;
|
|
|
1850
2062
|
* Copyright 2025 Autohand AI LLC
|
|
1851
2063
|
* SPDX-License-Identifier: Apache-2.0
|
|
1852
2064
|
*/
|
|
1853
|
-
/**
|
|
1854
|
-
* @license
|
|
1855
|
-
* Copyright 2026 Autohand AI LLC
|
|
1856
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
1857
|
-
*/
|