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.
Files changed (455) hide show
  1. package/README.md +118 -76
  2. package/dist/AgentRegistry-BBQRODQC.cjs +18 -0
  3. package/dist/AgentRegistry-JBXZUPML.js +18 -0
  4. package/dist/{CommunitySkillsCache-ZEQWP6YM.js → CommunitySkillsCache-CI7UN2DX.js} +2 -2
  5. package/dist/CommunitySkillsCache-XTQ6RMTA.cjs +8 -0
  6. package/dist/{HookManager-CWLTFKWO.js → HookManager-BELBPQQI.js} +1 -1
  7. package/dist/{HookManager-TMAJQU4S.cjs → HookManager-ZL2CLAJW.cjs} +2 -2
  8. package/dist/{ImportWizard-MQXEED2U.cjs → ImportWizard-U6CIJREW.cjs} +13 -13
  9. package/dist/{ImportWizard-QBKQEXDW.js → ImportWizard-VJFSWSUQ.js} +4 -4
  10. package/dist/LearnAdvisor-LAURA3IB.cjs +9 -0
  11. package/dist/LearnAdvisor-RFOBXFG7.js +9 -0
  12. package/dist/MemoryManager-3A2VRPF2.js +9 -0
  13. package/dist/MemoryManager-UOEQZIDC.cjs +9 -0
  14. package/dist/{NVIDIAProvider-2HR737UE.js → NVIDIAProvider-AFNJNWJM.js} +1 -1
  15. package/dist/NVIDIAProvider-L5GTYRCQ.cjs +14 -0
  16. package/dist/{PermissionManager-KMYILJ4Z.js → PermissionManager-N2LDSOYF.js} +3 -3
  17. package/dist/PermissionManager-ZNURIEYR.cjs +11 -0
  18. package/dist/ProviderFactory-3BFS65V7.cjs +13 -0
  19. package/dist/{ProviderFactory-HFPRVQ25.js → ProviderFactory-XUT6BSGB.js} +4 -2
  20. package/dist/SessionManager-LGPQIA57.cjs +10 -0
  21. package/dist/{SessionManager-PNBTJJTQ.js → SessionManager-OR4KDDDS.js} +2 -2
  22. package/dist/{SkillsRegistry-4RRD5GMX.js → SkillsRegistry-IL3GWROU.js} +2 -2
  23. package/dist/SkillsRegistry-PM34DQNA.cjs +9 -0
  24. package/dist/SubAgent-2WG4QQB5.cjs +13 -0
  25. package/dist/SubAgent-ICGN23TQ.js +13 -0
  26. package/dist/{SyncApiClient-LRPFNCKJ.js → SyncApiClient-G3FM65IV.js} +1 -1
  27. package/dist/SyncApiClient-ODBDECOG.cjs +11 -0
  28. package/dist/{about-BW3PDZUU.js → about-OYVGQMJJ.js} +5 -4
  29. package/dist/about-U2BH7HDR.cjs +15 -0
  30. package/dist/{acp-VHEL7BOW.js → acp-JWHGXZL5.js} +207 -102
  31. package/dist/{acp-EOETGAHC.cjs → acp-S37JOBCS.cjs} +226 -121
  32. package/dist/actionExecutor-2QEPMELQ.cjs +28 -0
  33. package/dist/actionExecutor-6NCCORRB.js +28 -0
  34. package/dist/add-dir-KFUHSIR2.cjs +11 -0
  35. package/dist/{add-dir-VFX7QT4E.js → add-dir-MM2BM2Z2.js} +2 -2
  36. package/dist/agent-DUIYLIVN.js +132 -0
  37. package/dist/agent-YYEHGDAK.cjs +132 -0
  38. package/dist/agents-GBGG4CW7.cjs +19 -0
  39. package/dist/agents-ZH34C72F.js +19 -0
  40. package/dist/agents-new-ERXLS7SB.cjs +17 -0
  41. package/dist/agents-new-EVTGPTA4.js +17 -0
  42. package/dist/{autoSkill-EFMK6WU6.js → autoSkill-HEWKJ5JV.js} +2 -2
  43. package/dist/autoSkill-YL6PN6AV.cjs +20 -0
  44. package/dist/automode-4BJ7FNPL.cjs +10 -0
  45. package/dist/{automode-BMYSRM34.js → automode-S4U7A7Q2.js} +2 -2
  46. package/dist/chrome-45ZXHL5N.cjs +22 -0
  47. package/dist/{chrome-NHJ44WUN.js → chrome-BBSRVG6S.js} +2 -2
  48. package/dist/chrome-IFVZRHAT.cjs +50 -0
  49. package/dist/chrome-MYE6DNA2.js +22 -0
  50. package/dist/chunk-24CEJYEG.cjs +579 -0
  51. package/dist/{chunk-47PHDKNW.cjs → chunk-255GIVM2.cjs} +6 -6
  52. package/dist/{chunk-DIZTWFVR.cjs → chunk-2BDSR2OW.cjs} +238 -61
  53. package/dist/{chunk-BL2UC7HC.js → chunk-2BPIR7LA.js} +121 -4
  54. package/dist/{chunk-BQ22N3TX.cjs → chunk-2NY7OHBF.cjs} +47 -27
  55. package/dist/chunk-2WUNHTXL.js +303 -0
  56. package/dist/{chunk-HQWQZML5.cjs → chunk-34B6ZO6W.cjs} +124 -7
  57. package/dist/{chunk-5JTTM5SC.js → chunk-3BJN7GAH.js} +1 -1
  58. package/dist/{chunk-4256YRCO.cjs → chunk-3CAXECWJ.cjs} +30 -17
  59. package/dist/{chunk-KNTUI4TZ.cjs → chunk-3CBYUBZC.cjs} +5 -5
  60. package/dist/chunk-3DF3GZQ7.js +277 -0
  61. package/dist/{chunk-E26KKI46.cjs → chunk-3JURXAL6.cjs} +61 -8
  62. package/dist/{chunk-MOJ7ADW4.cjs → chunk-3KWAP2Y3.cjs} +88 -9
  63. package/dist/{chunk-OHWMWKJQ.js → chunk-3MCK6UBL.js} +1 -1
  64. package/dist/{chunk-5VHP6HDQ.js → chunk-3TH7IK4M.js} +62 -9
  65. package/dist/{chunk-ACDQGA4Z.js → chunk-3V77OB3W.js} +7 -72
  66. package/dist/{chunk-HS4USDND.cjs → chunk-3Y5UEK7K.cjs} +4 -4
  67. package/dist/{chunk-XV2HXRHX.js → chunk-4GPPSBEZ.js} +3 -3
  68. package/dist/chunk-5CMBAJ6K.js +377 -0
  69. package/dist/{chunk-MO4KP6XS.cjs → chunk-5YRXFBYZ.cjs} +35 -6
  70. package/dist/chunk-5ZNYX4VH.cjs +71 -0
  71. package/dist/chunk-6AC2TT26.js +156 -0
  72. package/dist/{chunk-UGFVM77J.cjs → chunk-6EIQ6A6U.cjs} +2 -2
  73. package/dist/{chunk-SWCQM52V.js → chunk-6HSEDXVF.js} +4 -4
  74. package/dist/{chunk-QQ7PANOP.js → chunk-6NUXK62F.js} +1 -1
  75. package/dist/{chunk-5CMYEM3R.cjs → chunk-6TGCAPYH.cjs} +62 -9
  76. package/dist/{chunk-NMQ47RCG.js → chunk-6W3SZCSP.js} +1 -1
  77. package/dist/{chunk-VRMZO6TB.js → chunk-73LV3DDZ.js} +7 -6
  78. package/dist/{chunk-3GUEUCZK.js → chunk-7BGGLIQF.js} +85 -1
  79. package/dist/{chunk-RBHANOYY.js → chunk-7DJJGKM6.js} +47 -3
  80. package/dist/{chunk-LQBONA55.cjs → chunk-7EEK7CRR.cjs} +85 -1
  81. package/dist/chunk-7TO3PDMV.cjs +324 -0
  82. package/dist/chunk-7UU22RSH.cjs +277 -0
  83. package/dist/{chunk-E6GFD7VR.cjs → chunk-A3GAM6FM.cjs} +11 -11
  84. package/dist/{chunk-DEQVRSV5.cjs → chunk-A7DJU75T.cjs} +8 -8
  85. package/dist/{chunk-DPSIGY6L.cjs → chunk-AAAO4ERQ.cjs} +9 -9
  86. package/dist/{chunk-FQAVGSPW.js → chunk-AAJLMP57.js} +2 -2
  87. package/dist/chunk-ABR756QN.js +529 -0
  88. package/dist/{chunk-JYKPWK5O.js → chunk-APFGDIPD.js} +3 -1
  89. package/dist/{chunk-Y3M2DABP.js → chunk-APQYRMYL.js} +4 -4
  90. package/dist/{chunk-Q2IL4DDI.cjs → chunk-AZKOIF2G.cjs} +62 -19
  91. package/dist/{chunk-MXVIDIC6.cjs → chunk-AZLHUPNC.cjs} +2 -2
  92. package/dist/chunk-B55VCYSQ.cjs +30 -0
  93. package/dist/{chunk-WZV6UVPY.js → chunk-BLQUMSM3.js} +1 -1
  94. package/dist/{chunk-PHJO5YAL.cjs → chunk-BXKPX6K4.cjs} +9 -9
  95. package/dist/{chunk-3KLSNNRW.cjs → chunk-C66FN2LP.cjs} +4 -4
  96. package/dist/{chunk-OV3PVUYN.js → chunk-CH7KUFAS.js} +9 -9
  97. package/dist/{chunk-CWINVFRI.cjs → chunk-CILSXOPI.cjs} +17 -17
  98. package/dist/{chunk-3UT7R3XV.js → chunk-CM24K6ZT.js} +145 -12
  99. package/dist/chunk-CMEZ42F2.cjs +303 -0
  100. package/dist/{chunk-46C73ZKK.cjs → chunk-CNQKIWIS.cjs} +152 -19
  101. package/dist/{chunk-5JFTY3VU.js → chunk-CSTUTDTH.js} +2 -1
  102. package/dist/{chunk-REMGR23V.cjs → chunk-CSUGNNJY.cjs} +10 -4
  103. package/dist/{chunk-TBOLJDUG.js → chunk-D6HB3H3L.js} +31 -11
  104. package/dist/{chunk-OM24WXEE.js → chunk-D7AYKVKW.js} +2 -2
  105. package/dist/{chunk-6GUODJKM.cjs → chunk-DLCXWOWT.cjs} +23 -23
  106. package/dist/{chunk-CH2J4PVE.cjs → chunk-DMM2BKSV.cjs} +121 -28
  107. package/dist/{chunk-M4KNC5BQ.js → chunk-DW3DPV77.js} +1 -1
  108. package/dist/chunk-ECQD2QC3.cjs +33 -0
  109. package/dist/{chunk-UEIXJG45.js → chunk-EEYOS3UC.js} +116 -80
  110. package/dist/{chunk-7HPWMALN.js → chunk-EF2EN5CR.js} +2 -2
  111. package/dist/{chunk-7LWQCE4Y.cjs → chunk-EFXFURDY.cjs} +192 -58
  112. package/dist/chunk-EK34UZPB.cjs +40 -0
  113. package/dist/{chunk-7JLT2VNW.cjs → chunk-FJR6EZLO.cjs} +9666 -7201
  114. package/dist/{chunk-GZ6DV2UG.js → chunk-FPO7YNPQ.js} +1 -1
  115. package/dist/{chunk-O64I2GYI.js → chunk-FS4I6BNR.js} +1 -1
  116. package/dist/{chunk-MX75JYIY.js → chunk-FSJ2MNOC.js} +3 -3
  117. package/dist/{chunk-7RFJB75Y.js → chunk-GEHZMC4G.js} +11 -8
  118. package/dist/{chunk-UWFG2R2I.cjs → chunk-GO6C2RAR.cjs} +36 -9
  119. package/dist/{chunk-WGLBC5AY.cjs → chunk-GSMR6V36.cjs} +4 -4
  120. package/dist/{chunk-Z3XSSF7B.js → chunk-GSZWATME.js} +1 -1
  121. package/dist/{chunk-7MU7LWF3.cjs → chunk-GYLGCR6F.cjs} +5 -5
  122. package/dist/{chunk-O6TQP7U7.cjs → chunk-H3OOWNYQ.cjs} +3 -3
  123. package/dist/{chunk-2QL6MNXG.js → chunk-H65446XW.js} +115 -20
  124. package/dist/chunk-H7HXRRHK.js +324 -0
  125. package/dist/{chunk-ZZ63NW7A.cjs → chunk-HN2JTDN5.cjs} +17 -17
  126. package/dist/{chunk-AOKCI722.cjs → chunk-HNXUZ5OY.cjs} +2 -2
  127. package/dist/{chunk-AUYSIEVV.cjs → chunk-HOYT3E65.cjs} +3 -3
  128. package/dist/{chunk-DMRXF5DU.js → chunk-HTPY5ESD.js} +3 -3
  129. package/dist/chunk-HTU4W3GB.js +183 -0
  130. package/dist/{chunk-3DDL2E55.cjs → chunk-HVLWH2AF.cjs} +10 -10
  131. package/dist/{chunk-HSCUPEA4.cjs → chunk-HZTEU4W5.cjs} +74 -105
  132. package/dist/{chunk-XGMI6IYB.cjs → chunk-I5T7LPFP.cjs} +7 -7
  133. package/dist/{chunk-XIVFAD2L.js → chunk-IB5CJXE7.js} +173 -12
  134. package/dist/chunk-INNXFLDR.cjs +388 -0
  135. package/dist/{chunk-75EDROHL.cjs → chunk-JFLEP3T7.cjs} +10 -10
  136. package/dist/chunk-JJGDOBFL.js +40 -0
  137. package/dist/{chunk-VBOFPU5M.cjs → chunk-JM3ZTQUK.cjs} +13 -9
  138. package/dist/{chunk-HJIXWGQZ.js → chunk-JSU46T6K.js} +1 -1
  139. package/dist/{chunk-AT7OWLY5.js → chunk-K6WN6BT4.js} +1 -1
  140. package/dist/{chunk-LN7D3EJZ.js → chunk-KA2U6MY2.js} +4 -3
  141. package/dist/{chunk-3S563FNF.cjs → chunk-KIQH3SMT.cjs} +34 -31
  142. package/dist/{chunk-BWF4VDYE.js → chunk-KPRXHIE2.js} +54 -85
  143. package/dist/{chunk-Z4LIPMPM.js → chunk-L6OH44HL.js} +13 -9
  144. package/dist/{chunk-A7HHCIDQ.js → chunk-LIO3RX2Z.js} +2 -2
  145. package/dist/{chunk-DLP436GI.js → chunk-LOSXLH7P.js} +110 -17
  146. package/dist/{chunk-IEXKKKOF.cjs → chunk-LSOR72PB.cjs} +23 -23
  147. package/dist/{chunk-IAGCRVJ3.js → chunk-MA3AVDCC.js} +55 -12
  148. package/dist/{chunk-B5CGDNMR.js → chunk-ME3S2WIR.js} +3 -3
  149. package/dist/{chunk-HKYZSUQ5.js → chunk-NC2I2M4P.js} +4 -4
  150. package/dist/{chunk-GBMDFWJX.cjs → chunk-NC4A4LVC.cjs} +13 -13
  151. package/dist/{chunk-E46DJH5S.js → chunk-NGEK5FCJ.js} +176 -3
  152. package/dist/{chunk-TQ33WBY5.cjs → chunk-NHWHEW7M.cjs} +2 -1
  153. package/dist/{chunk-62RTC3XX.js → chunk-NKW6CHXQ.js} +1 -1
  154. package/dist/{chunk-3PXKRVCW.js → chunk-NOWCRKP2.js} +10 -4
  155. package/dist/{chunk-HXJEGMGB.js → chunk-NUB2LMB6.js} +2 -2
  156. package/dist/chunk-NVATU4V6.cjs +44 -0
  157. package/dist/chunk-O246MKIW.cjs +267 -0
  158. package/dist/{chunk-QCHIDZBA.js → chunk-OGFWL2PS.js} +1 -1
  159. package/dist/{chunk-JJ4KA7HK.cjs → chunk-ONNGAR6W.cjs} +415 -551
  160. package/dist/{chunk-TKKN34TV.js → chunk-OOFR6A62.js} +33 -4
  161. package/dist/{chunk-6NVAK6CK.js → chunk-OZ7FHO7J.js} +2 -2
  162. package/dist/{chunk-2CGE7ZV3.cjs → chunk-P5EWGUI2.cjs} +201 -28
  163. package/dist/{chunk-GGLKUENP.js → chunk-P6BQJPAI.js} +191 -14
  164. package/dist/{chunk-TWQDAUZU.js → chunk-PG2JIU5M.js} +60 -7
  165. package/dist/chunk-PI27G2ED.cjs +377 -0
  166. package/dist/{chunk-YV63VW4K.js → chunk-PI7LRPL6.js} +1 -1
  167. package/dist/{chunk-TXPSTCG7.cjs → chunk-PMPEC5HN.cjs} +18 -15
  168. package/dist/{chunk-ROLA6EFO.cjs → chunk-PYUP7AKY.cjs} +14 -14
  169. package/dist/{chunk-BFQDQRDE.js → chunk-QC5Z3ZT5.js} +2 -2
  170. package/dist/chunk-QDO4L2A7.cjs +156 -0
  171. package/dist/{chunk-LFDPTJYF.cjs → chunk-QDXRI5AM.cjs} +1 -1
  172. package/dist/{chunk-3LJJG5YY.cjs → chunk-QLZOMZO5.cjs} +4 -3
  173. package/dist/chunk-QVXMSQOG.js +430 -0
  174. package/dist/{chunk-ZHJ7JGME.cjs → chunk-R4UKBKDY.cjs} +11 -11
  175. package/dist/{chunk-IGMPWJ2I.cjs → chunk-R75AWII3.cjs} +118 -23
  176. package/dist/{chunk-VGEV44V2.cjs → chunk-RD5PLUIX.cjs} +191 -30
  177. package/dist/{chunk-I24CWKKK.js → chunk-RGB34CV5.js} +3 -3
  178. package/dist/{chunk-CHI52KFR.cjs → chunk-RJCZLFHE.cjs} +246 -39
  179. package/dist/{chunk-D2OSPLYC.cjs → chunk-RKWNM2BJ.cjs} +2 -2
  180. package/dist/{chunk-FGT6KK6T.js → chunk-RMVONICR.js} +3 -3
  181. package/dist/{chunk-Q6AC3PHY.cjs → chunk-RPSYRJL7.cjs} +10 -4
  182. package/dist/chunk-RS2E32YB.js +71 -0
  183. package/dist/chunk-RWKU2X7O.js +388 -0
  184. package/dist/chunk-RZLEGVMH.cjs +565 -0
  185. package/dist/{chunk-5F6ZKSHO.js → chunk-S2L3Y677.js} +1 -1
  186. package/dist/{chunk-ARBEHFCG.js → chunk-S7KVUIOS.js} +1 -1
  187. package/dist/{chunk-AC7DZ6SK.cjs → chunk-SACJJ6NO.cjs} +5 -3
  188. package/dist/{chunk-IKUMVBCW.cjs → chunk-SD3NTC7D.cjs} +48 -4
  189. package/dist/{chunk-CBFH2J3O.js → chunk-SJQU2ZFR.js} +246 -39
  190. package/dist/{chunk-GWO66KBI.js → chunk-SKAQKQFF.js} +12 -2
  191. package/dist/chunk-T4DXP5OP.js +30 -0
  192. package/dist/{chunk-CFFE4VA3.js → chunk-T6FTB6K2.js} +1 -1
  193. package/dist/{chunk-U4C3HW6P.js → chunk-T6N6GRFT.js} +13 -10
  194. package/dist/{chunk-D6GZBSOX.js → chunk-TJFKA6A7.js} +82 -3
  195. package/dist/{chunk-2HOLOHVK.js → chunk-TJZUPS4Z.js} +163 -299
  196. package/dist/{chunk-RBZ7AFX7.cjs → chunk-TLKHZ425.cjs} +2 -2
  197. package/dist/{chunk-J2K57QM7.cjs → chunk-TQ24NLXO.cjs} +6 -6
  198. package/dist/{chunk-LUMV3DB2.js → chunk-TWBAU46X.js} +1 -1
  199. package/dist/{chunk-OPNI6O7F.cjs → chunk-TZB5XADL.cjs} +4 -4
  200. package/dist/{chunk-6HH236FV.cjs → chunk-UAYXZXWU.cjs} +4 -4
  201. package/dist/{chunk-MPULXVC4.cjs → chunk-UKBFNBDO.cjs} +11 -11
  202. package/dist/chunk-UMJYX5KD.js +565 -0
  203. package/dist/chunk-USKYTHDL.cjs +235 -0
  204. package/dist/chunk-V4HGZSKQ.cjs +183 -0
  205. package/dist/{chunk-MQESBFBZ.cjs → chunk-VAJUSZMC.cjs} +21 -20
  206. package/dist/{chunk-PQLKJCIE.js → chunk-VGQG4NBJ.js} +2 -2
  207. package/dist/chunk-VLUIVJ3J.js +235 -0
  208. package/dist/chunk-VOBINVMV.cjs +430 -0
  209. package/dist/{chunk-L4F7SUYL.js → chunk-VSHKKCSH.js} +16 -5
  210. package/dist/{chunk-LDJQ5QHG.cjs → chunk-VSZU3MGA.cjs} +28 -17
  211. package/dist/{chunk-YFXTE422.cjs → chunk-VWHAUB77.cjs} +8 -3
  212. package/dist/{chunk-EZJHLOWP.js → chunk-VXGYFX45.js} +20 -7
  213. package/dist/{chunk-JIMSII7R.js → chunk-WH6YUQDB.js} +193 -59
  214. package/dist/{chunk-VKBIE6I6.js → chunk-WQ6TD55V.js} +2 -2
  215. package/dist/{chunk-ZR46OJNZ.js → chunk-WQWECXTY.js} +3 -3
  216. package/dist/{chunk-SOLBYSLY.cjs → chunk-WVDJUJH6.cjs} +2 -2
  217. package/dist/{chunk-QKP772OZ.js → chunk-X24VIVDZ.js} +963 -103
  218. package/dist/{chunk-37M5UM6I.js → chunk-X4NRTLXD.js} +7 -1
  219. package/dist/chunk-X53SHYCG.js +27 -0
  220. package/dist/{chunk-PUD76XQT.cjs → chunk-XB2Z4ZAK.cjs} +5 -5
  221. package/dist/chunk-Y47OJGLB.cjs +27 -0
  222. package/dist/{chunk-WRTXCQ3V.cjs → chunk-Y4MN27V3.cjs} +1080 -220
  223. package/dist/{chunk-ZK6HOR62.js → chunk-YEHFYZFU.js} +7 -2
  224. package/dist/{chunk-FFBDRUO5.cjs → chunk-YICIUY23.cjs} +1 -1
  225. package/dist/{chunk-PDHT7LQS.cjs → chunk-YMXYC777.cjs} +3 -3
  226. package/dist/{chunk-TJNBASFD.cjs → chunk-Z3GRWK6O.cjs} +8 -8
  227. package/dist/{chunk-JP3YHTQ2.cjs → chunk-Z5GG2KSL.cjs} +4 -4
  228. package/dist/{chunk-ZPD2AO3U.js → chunk-ZER7DYQK.js} +2 -2
  229. package/dist/{chunk-UXLW45ZE.cjs → chunk-ZFDXZEZJ.cjs} +25 -90
  230. package/dist/chunk-ZFV4HJA6.js +579 -0
  231. package/dist/chunk-ZHMYTI5D.cjs +529 -0
  232. package/dist/{chunk-CCVMREXI.js → chunk-ZLR2TFBC.js} +35 -8
  233. package/dist/{chunk-J5ADZN6V.cjs → chunk-ZTWNU5QZ.cjs} +20 -20
  234. package/dist/chunk-ZUYYHKQA.js +44 -0
  235. package/dist/{chunk-AUFNACED.js → chunk-ZVLVLDYN.js} +9086 -6621
  236. package/dist/clear-AJGXD2BB.cjs +12 -0
  237. package/dist/{clear-OFLFQ3MR.js → clear-HAHDSWKW.js} +3 -3
  238. package/dist/communityInstaller-IRR6M3N6.cjs +22 -0
  239. package/dist/{communityInstaller-COB2KTOW.js → communityInstaller-OLKEUGMX.js} +6 -6
  240. package/dist/completion-G7Z436TF.cjs +17 -0
  241. package/dist/{completion-PT4VM2H2.js → completion-ZS3AXJ6A.js} +5 -5
  242. package/dist/{config-R4O7GBTY.js → config-OWYAQPCX.js} +5 -3
  243. package/dist/config-W2BHT2QE.cjs +22 -0
  244. package/dist/{constants-HVCHVQAF.js → constants-AS6K67AA.js} +5 -3
  245. package/dist/constants-B4W5BT7F.cjs +23 -0
  246. package/dist/{export-3PK3VFCE.js → export-5HIU3KMD.js} +5 -5
  247. package/dist/export-GFD32UY2.cjs +15 -0
  248. package/dist/{extractSessionMemories-A2JX5WJ2.js → extractSessionMemories-K6ZVAW2F.js} +1 -1
  249. package/dist/{extractSessionMemories-XL3MS37F.cjs → extractSessionMemories-LLOIJR5U.cjs} +2 -2
  250. package/dist/feature-KP74CZ3F.cjs +14 -0
  251. package/dist/feature-OPNVMB2E.js +14 -0
  252. package/dist/features-LT55MURX.cjs +24 -0
  253. package/dist/features-ZDIU26WX.js +24 -0
  254. package/dist/feedback-7WTJFQ6S.js +18 -0
  255. package/dist/feedback-CEOJ3453.cjs +18 -0
  256. package/dist/go-2CY5SZNR.js +16 -0
  257. package/dist/go-O2CSQON4.cjs +16 -0
  258. package/dist/goal-DL2N2AWT.cjs +16 -0
  259. package/dist/goal-IJS7VZSG.js +16 -0
  260. package/dist/help-RNOGDEBA.cjs +12 -0
  261. package/dist/{help-X3OAZ3CY.js → help-TCWD2IRH.js} +2 -2
  262. package/dist/{history-YKFPHBJN.js → history-ATOR5OQV.js} +2 -2
  263. package/dist/history-UUSGX2AL.cjs +14 -0
  264. package/dist/{hooks-7TA4PIIB.js → hooks-R3Z5QKUP.js} +6 -6
  265. package/dist/hooks-RWM5UY67.cjs +18 -0
  266. package/dist/{i18n-2KBUU7XL.js → i18n-4QI4TD4I.js} +1 -1
  267. package/dist/i18n-MFAEU5RV.cjs +33 -0
  268. package/dist/ide-6PBTCCUQ.js +15 -0
  269. package/dist/ide-UE3G7NMQ.cjs +15 -0
  270. package/dist/{import-I7T4ZHYL.cjs → import-2IG76KAN.cjs} +6 -4
  271. package/dist/{import-JWPYKXCZ.js → import-E47QL4DW.js} +2 -2
  272. package/dist/import-NQDNBFUL.cjs +10 -0
  273. package/dist/{import-4CHYLS4K.js → import-VQIHGJWS.js} +6 -4
  274. package/dist/index.cjs +512 -305
  275. package/dist/index.d.cts +40 -0
  276. package/dist/index.d.ts +40 -0
  277. package/dist/index.js +402 -195
  278. package/dist/init-DX3RDGDT.cjs +10 -0
  279. package/dist/{init-262MWZV4.js → init-Q54OAAFZ.js} +2 -2
  280. package/dist/{inputPrompt-YGBHDUEP.js → inputPrompt-V2VBDRM7.js} +3 -3
  281. package/dist/inputPrompt-WVGVWAHS.cjs +90 -0
  282. package/dist/language-I6KXAOXD.js +23 -0
  283. package/dist/language-XMIVOH5E.cjs +23 -0
  284. package/dist/learn-JPVVGTKU.js +23 -0
  285. package/dist/learn-NLSHI2MZ.cjs +23 -0
  286. package/dist/login-NABQYLYC.cjs +28 -0
  287. package/dist/login-XPOVFSWN.js +28 -0
  288. package/dist/logout-HNHCGB4Q.js +25 -0
  289. package/dist/logout-SKGDXJSW.cjs +25 -0
  290. package/dist/{mcp-5O6PUL4G.js → mcp-EN73YFGZ.js} +8 -6
  291. package/dist/mcp-TADZCPJQ.cjs +22 -0
  292. package/dist/{mcp-install-P6DHES7V.cjs → mcp-install-2GKWWBAS.cjs} +15 -13
  293. package/dist/{mcp-install-6XWXLFVY.js → mcp-install-3TBTVSHW.js} +10 -8
  294. package/dist/memory-GRXFTDIN.cjs +10 -0
  295. package/dist/{memory-Q54CESNM.js → memory-K2P3CDCH.js} +2 -2
  296. package/dist/{model-6AJ77PJG.js → model-DEG22OWA.js} +2 -2
  297. package/dist/model-OSD74T7Z.cjs +10 -0
  298. package/dist/new-4NWBOATU.cjs +12 -0
  299. package/dist/{new-ZXHEWC2S.js → new-KJAP2MB6.js} +3 -3
  300. package/dist/onboarding-2U5WE2OA.js +39 -0
  301. package/dist/onboarding-5DZFCO5Q.cjs +39 -0
  302. package/dist/permissions-KY5I6YQ3.cjs +10 -0
  303. package/dist/{permissions-YHJMVA6L.js → permissions-TKYON7PP.js} +2 -2
  304. package/dist/{plan-YYUAXPTL.js → plan-DYHHLZSS.js} +1 -1
  305. package/dist/plan-PYKP652W.cjs +13 -0
  306. package/dist/quit-GSKJL42O.js +14 -0
  307. package/dist/quit-TQSRTBUT.cjs +14 -0
  308. package/dist/{registry-34GL6BNJ.js → registry-EZ4V4TUQ.js} +1339 -1
  309. package/dist/{registry-V24W7YK6.cjs → registry-LCWYI4IB.cjs} +1378 -40
  310. package/dist/resume-4VWJXARX.cjs +17 -0
  311. package/dist/resume-TLHWWWFN.js +17 -0
  312. package/dist/{review-QHP2KP4Q.js → review-CSK4IYTO.js} +1 -1
  313. package/dist/review-XLJEUH5K.cjs +9 -0
  314. package/dist/{rpc-S3DGW6KV.js → rpc-3DLQBDWU.js} +301 -130
  315. package/dist/{rpc-NPS3PU4O.cjs → rpc-O36WUU3L.cjs} +399 -228
  316. package/dist/search-DSX2CY4A.cjs +22 -0
  317. package/dist/search-I3QUDUQL.js +22 -0
  318. package/dist/sessionBranching-DVNOUWJT.cjs +19 -0
  319. package/dist/sessionBranching-FKV4CR36.js +19 -0
  320. package/dist/sessions-3JUOT3ED.cjs +10 -0
  321. package/dist/{sessions-IYAXMK23.js → sessions-VWMDIPOS.js} +2 -2
  322. package/dist/settings-FT2LZZUV.js +45 -0
  323. package/dist/settings-RL4KNWHB.cjs +45 -0
  324. package/dist/setup-HQEJVOYT.js +32 -0
  325. package/dist/setup-MN54LKOL.cjs +32 -0
  326. package/dist/share-BUAFZNBX.cjs +17 -0
  327. package/dist/share-CGB6MAVJ.js +17 -0
  328. package/dist/skills/builtin/code-reviewer/SKILL.md +64 -0
  329. package/dist/skills/builtin/goal-writer/SKILL.md +124 -0
  330. package/dist/{skills-VWOMV3CR.js → skills-7DKR3HRZ.js} +8 -8
  331. package/dist/{skills-MVIZNHT4.js → skills-BBBENOEY.js} +9 -9
  332. package/dist/skills-OQM7IHAF.cjs +29 -0
  333. package/dist/{skills-GGMZOVIE.cjs → skills-RA2PKL63.cjs} +10 -10
  334. package/dist/{skills-install-VTAMCNNY.cjs → skills-install-D7K476SL.cjs} +16 -16
  335. package/dist/{skills-install-QBA5RCV6.js → skills-install-T4SOKJSL.js} +9 -9
  336. package/dist/skills-new-S33NGEU3.js +18 -0
  337. package/dist/skills-new-UVYH53MD.cjs +18 -0
  338. package/dist/slashCommands-MWOUDSQP.js +111 -0
  339. package/dist/slashCommands-XASURUTV.cjs +111 -0
  340. package/dist/squad-PIIYDFVH.cjs +15 -0
  341. package/dist/squad-VHYOVEJP.js +15 -0
  342. package/dist/status-GHFTXQBL.js +25 -0
  343. package/dist/status-WXMIJIU3.cjs +25 -0
  344. package/dist/statusline-2K7AC6ZQ.js +21 -0
  345. package/dist/statusline-GROI4HOC.cjs +21 -0
  346. package/dist/sync-254WF6JI.cjs +42 -0
  347. package/dist/sync-2DIZN4EH.cjs +24 -0
  348. package/dist/{sync-7BILIQHP.js → sync-J6I2ZUKQ.js} +6 -4
  349. package/dist/{sync-7OKF6636.js → sync-Z3LVSEEV.js} +8 -5
  350. package/dist/{teammate-J6PHGL23.cjs → teammate-EXR76PEQ.cjs} +9 -8
  351. package/dist/{teammate-GZQSCIMS.js → teammate-K4DAOFEQ.js} +8 -7
  352. package/dist/templates-ARG2VRWW.cjs +11 -0
  353. package/dist/templates-UGVZV3KJ.js +11 -0
  354. package/dist/theme-MVQDSU47.js +23 -0
  355. package/dist/theme-QAKEYWJG.cjs +23 -0
  356. package/dist/ui/questionModal.cjs +6 -6
  357. package/dist/ui/questionModal.js +5 -5
  358. package/dist/{undo-SZEHLX7X.js → undo-5AU47JHF.js} +2 -2
  359. package/dist/undo-ME6WKUXZ.cjs +10 -0
  360. package/dist/usage-QTKO2YMD.js +25 -0
  361. package/dist/usage-TYNJKVER.cjs +25 -0
  362. package/package.json +10 -4
  363. package/dist/AgentRegistry-EGBDIUAK.cjs +0 -10
  364. package/dist/AgentRegistry-XPWSVO3Q.js +0 -10
  365. package/dist/CommunitySkillsCache-2OIUV227.cjs +0 -8
  366. package/dist/LearnAdvisor-46FG2XIP.js +0 -9
  367. package/dist/LearnAdvisor-XBRDNAGH.cjs +0 -9
  368. package/dist/MemoryManager-34L4YOKA.cjs +0 -8
  369. package/dist/MemoryManager-WJMLPWGU.js +0 -8
  370. package/dist/NVIDIAProvider-MVTL62PR.cjs +0 -14
  371. package/dist/PermissionManager-5OOJ7FAT.cjs +0 -11
  372. package/dist/ProviderFactory-C3YPXTDD.cjs +0 -11
  373. package/dist/SessionManager-WAPTFMDO.cjs +0 -10
  374. package/dist/SkillsRegistry-7AJP74GJ.cjs +0 -9
  375. package/dist/SubAgent-FDIH3DXB.js +0 -11
  376. package/dist/SubAgent-HVL2ICVZ.cjs +0 -11
  377. package/dist/SyncApiClient-VMBOLQ6H.cjs +0 -11
  378. package/dist/about-FCAX37YC.cjs +0 -14
  379. package/dist/actionExecutor-33I47NZS.js +0 -24
  380. package/dist/actionExecutor-4YBMR3YH.cjs +0 -24
  381. package/dist/add-dir-7SS6KSH5.cjs +0 -11
  382. package/dist/agent-DMRUFU4M.cjs +0 -116
  383. package/dist/agent-WCJEYQJT.js +0 -116
  384. package/dist/agents-CHROO3VU.cjs +0 -17
  385. package/dist/agents-UVDUL65K.js +0 -17
  386. package/dist/agents-new-AUBWSOXP.js +0 -17
  387. package/dist/agents-new-Y562WC47.cjs +0 -17
  388. package/dist/autoSkill-YOLLFTP2.cjs +0 -20
  389. package/dist/automode-DBLKTTKD.cjs +0 -10
  390. package/dist/chrome-ATC4OO5I.cjs +0 -20
  391. package/dist/chrome-O62WXV7F.js +0 -20
  392. package/dist/chrome-XHJLCO4M.cjs +0 -50
  393. package/dist/chunk-6XVVIY54.cjs +0 -256
  394. package/dist/chunk-AU6JAGZJ.cjs +0 -231
  395. package/dist/chunk-N6O3XUZ2.cjs +0 -23
  396. package/dist/chunk-VDWJMWDF.js +0 -256
  397. package/dist/clear-33TWQ2ES.cjs +0 -12
  398. package/dist/communityInstaller-TWMGPSYM.cjs +0 -22
  399. package/dist/completion-IIZMHXYP.cjs +0 -17
  400. package/dist/config-KL6WU7R2.cjs +0 -20
  401. package/dist/constants-RLMJ5D5P.cjs +0 -21
  402. package/dist/export-WLGNWEMJ.cjs +0 -15
  403. package/dist/feedback-G635NCLJ.js +0 -18
  404. package/dist/feedback-LLMK3TZH.cjs +0 -18
  405. package/dist/help-BAXLP2M2.cjs +0 -12
  406. package/dist/history-6HOJSEMT.cjs +0 -14
  407. package/dist/hooks-XVFU67T2.cjs +0 -18
  408. package/dist/i18n-MUJMKTFM.cjs +0 -33
  409. package/dist/ide-CCQ33PGC.cjs +0 -15
  410. package/dist/ide-VLVFBZ5F.js +0 -15
  411. package/dist/import-J46F54JY.cjs +0 -10
  412. package/dist/init-EE5Y7RBL.cjs +0 -10
  413. package/dist/inputPrompt-IIFKCX5Q.cjs +0 -90
  414. package/dist/language-CVLPB7OV.js +0 -21
  415. package/dist/language-ZTWFHUSV.cjs +0 -21
  416. package/dist/learn-PON7I5QS.js +0 -23
  417. package/dist/learn-XLRSVNA3.cjs +0 -23
  418. package/dist/login-223QTGBG.cjs +0 -26
  419. package/dist/login-6IKTBUBY.js +0 -26
  420. package/dist/logout-RN2AG6SI.js +0 -23
  421. package/dist/logout-U3M4FFX7.cjs +0 -23
  422. package/dist/mcp-NUQ76QQB.cjs +0 -20
  423. package/dist/memory-CYMDQ2YC.cjs +0 -10
  424. package/dist/model-IDRCKDML.cjs +0 -10
  425. package/dist/new-7LEWOUF2.cjs +0 -12
  426. package/dist/onboarding-FXX7YHSJ.cjs +0 -35
  427. package/dist/onboarding-JYNMK6NI.js +0 -35
  428. package/dist/permissions-YBNSANIA.cjs +0 -10
  429. package/dist/plan-XEJMOT55.cjs +0 -13
  430. package/dist/quit-B43SJ6E4.cjs +0 -10
  431. package/dist/quit-GWTNHQSP.js +0 -10
  432. package/dist/resume-DYVOQN5L.cjs +0 -16
  433. package/dist/resume-M25UQKOX.js +0 -16
  434. package/dist/review-UWHWQHCB.cjs +0 -9
  435. package/dist/search-CPX4PWHP.js +0 -20
  436. package/dist/search-VUF3M4N3.cjs +0 -20
  437. package/dist/sessions-JODKER5D.cjs +0 -10
  438. package/dist/settings-55BNW6BF.js +0 -33
  439. package/dist/settings-BKTS7OMC.cjs +0 -33
  440. package/dist/setup-IRC5HQG2.js +0 -29
  441. package/dist/setup-MMQ7TWOP.cjs +0 -29
  442. package/dist/share-6JRQECAH.cjs +0 -17
  443. package/dist/share-YM5MJKMO.js +0 -17
  444. package/dist/skills-LWSOKOSH.cjs +0 -29
  445. package/dist/skills-new-GPL46YV2.js +0 -18
  446. package/dist/skills-new-L5BEZN5V.cjs +0 -18
  447. package/dist/slashCommands-FBPCIWM5.cjs +0 -95
  448. package/dist/slashCommands-FCWY5DXW.js +0 -95
  449. package/dist/status-3B5SDZPL.js +0 -17
  450. package/dist/status-TTGRF6NC.cjs +0 -17
  451. package/dist/sync-77CXVVTK.cjs +0 -21
  452. package/dist/sync-EH4K5U3N.cjs +0 -40
  453. package/dist/theme-64BYGJ57.cjs +0 -21
  454. package/dist/theme-YJE6HEON.js +0 -21
  455. 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 _chunkMO4KP6XScjs = require('./chunk-MO4KP6XS.cjs');
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
- var _chunk3LJJG5YYcjs = require('./chunk-3LJJG5YY.cjs');
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
- var _chunkQ2IL4DDIcjs = require('./chunk-Q2IL4DDI.cjs');
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
- var _chunkIKUMVBCWcjs = require('./chunk-IKUMVBCW.cjs');
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 _chunk46C73ZKKcjs = require('./chunk-46C73ZKK.cjs');
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 _chunkE26KKI46cjs = require('./chunk-E26KKI46.cjs');
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 _chunkCHI52KFRcjs = require('./chunk-CHI52KFR.cjs');
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(_chunkE26KKI46cjs.AUTOHAND_HOME, "last-ping.json");
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(_chunkE26KKI46cjs.AUTOHAND_FILES.deviceId));
117
- if (_fsextra2.default.existsSync(_chunkE26KKI46cjs.AUTOHAND_FILES.deviceId)) {
118
- return _fsextra2.default.readFileSync(_chunkE26KKI46cjs.AUTOHAND_FILES.deviceId, "utf8").trim();
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(_chunkE26KKI46cjs.AUTOHAND_FILES.deviceId, id);
173
+ _fsextra2.default.writeFileSync(_chunk3JURXAL6cjs.AUTOHAND_FILES.deviceId, id);
122
174
  return id;
123
- } catch (e) {
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 (e2) {
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 (e3) {
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 (e4) {
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', _ => _.start, 'call', _2 => _2()]);
301
+ _optionalChain([pingServiceInstance, 'optionalAccess', _7 => _7.start, 'call', _8 => _8()]);
250
302
  }
251
303
  function stopPingService() {
252
- _optionalChain([pingServiceInstance, 'optionalAccess', _3 => _3.stop, 'call', _4 => _4()]);
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 (e5) {
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', _5 => _5.autoModeTask, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()])) {
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", _chunkMPULXVC4cjs.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) => {
389
- const config = await _chunk46C73ZKKcjs.loadConfig.call(void 0, void 0, process.cwd());
390
- const launchSpec = _chunkMPULXVC4cjs.resolveCliLaunchSpec.call(void 0, options.cliPath);
391
- const browsers = _chunkMPULXVC4cjs.normalizeBrowsers.call(void 0, options.browser);
392
- const extensionId = _nullishCoalesce(options.extensionId, () => ( _optionalChain([config, 'access', _8 => _8.chrome, 'optionalAccess', _9 => _9.extensionId])));
393
- const preferredBrowser = options.browser === "all" ? _nullishCoalesce(_optionalChain([config, 'access', _10 => _10.chrome, 'optionalAccess', _11 => _11.browser]), () => ( "auto")) : options.browser;
394
- const installUrl = _nullishCoalesce(_nullishCoalesce(options.installUrl, () => ( _optionalChain([config, 'access', _12 => _12.chrome, 'optionalAccess', _13 => _13.installUrl]))), () => ( _chunkMPULXVC4cjs.DEFAULT_CHROME_INSTALL_URL));
395
- const detectedProfile = extensionId ? await _chunkMPULXVC4cjs.detectExtensionProfile.call(void 0, extensionId, browsers) : null;
396
- const result = await _chunkMPULXVC4cjs.installNativeHost.call(void 0, {
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
- _chunkMPULXVC4cjs.applyChromeSettings.call(void 0, config, {
454
+ _chunkUKBFNBDOcjs.applyChromeSettings.call(void 0, config, {
403
455
  extensionId,
404
- browser: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess', _14 => _14.browser]), () => ( preferredBrowser)),
405
- userDataDir: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess', _15 => _15.userDataDir]), () => ( _optionalChain([config, 'access', _16 => _16.chrome, 'optionalAccess', _17 => _17.userDataDir]))),
406
- profileDirectory: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess', _18 => _18.profileDirectory]), () => ( _optionalChain([config, 'access', _19 => _19.chrome, 'optionalAccess', _20 => _20.profileDirectory]))),
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 _chunk46C73ZKKcjs.saveConfig.call(void 0, config);
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 _chunkMPULXVC4cjs.openChromeContinuation.call(void 0,
416
- _chunkMPULXVC4cjs.buildChromeOpenUrl.call(void 0, { extensionId, installUrl }),
417
- _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess', _21 => _21.browser]), () => ( preferredBrowser)),
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', _22 => _22.userDataDir]), () => ( _optionalChain([config, 'access', _23 => _23.chrome, 'optionalAccess', _24 => _24.userDataDir]))),
420
- profileDirectory: _nullishCoalesce(_optionalChain([detectedProfile, 'optionalAccess', _25 => _25.profileDirectory]), () => ( _optionalChain([config, 'access', _26 => _26.chrome, 'optionalAccess', _27 => _27.profileDirectory])))
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', _28 => _28[1]]), () => ( null));
515
+ return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _34 => _34[1]]), () => ( null));
444
516
  }
445
517
  function getGitCommit() {
446
518
  if (true) {
447
- return "8cc71ec";
519
+ return "1d7b7b1";
448
520
  }
449
- const alphaCommit = getCommitFromAlphaVersion(_chunkREMGR23Vcjs.package_default.version);
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 (e6) {
527
+ } catch (e9) {
456
528
  return "unknown";
457
529
  }
458
530
  }
459
531
  function getVersionString() {
460
532
  const commit = getGitCommit();
461
- return `${_chunkREMGR23Vcjs.package_default.version} (${commit})`;
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, _chunkE26KKI46cjs.PROJECT_DIR_NAME);
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, ), scope };
559
+ return { config: await _chunkCNQKIWIScjs.loadConfig.call(void 0, ), scope };
488
560
  }
489
561
  const projectConfigPath = await resolveProjectConfigPath(process.cwd());
490
- return { config: await _chunk46C73ZKKcjs.loadConfig.call(void 0, projectConfigPath, process.cwd()), scope };
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
- _chunkMO4KP6XScjs.installProcessErrorHandlers.call(void 0, );
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config, process.cwd());
570
- const { settings } = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-BKTS7OMC.cjs")));
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-223QTGBG.cjs")));
576
- const config = await _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config);
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-U3M4FFX7.cjs")));
582
- const config = await _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config);
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-MUJMKTFM.cjs")));
588
- const { about } = await Promise.resolve().then(() => _interopRequireWildcard(require("./about-FCAX37YC.cjs")));
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 about();
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-MUJMKTFM.cjs")));
596
- const { feedback } = await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-LLMK3TZH.cjs")));
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config);
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config, process.cwd());
605
- const workspaceRoot = _chunk46C73ZKKcjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
606
- const workspacePathValidation = await _chunk3LJJG5YYcjs.validateWorkspacePath.call(void 0, workspaceRoot);
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-FXX7YHSJ.cjs")));
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 _chunk46C73ZKKcjs.saveConfig.call(void 0, newConfig);
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config, process.cwd());
632
- const workspaceRoot = _chunk46C73ZKKcjs.resolveWorkspaceRoot.call(void 0, preAuthConfig, opts.path);
633
- const workspacePathValidation = await _chunk3LJJG5YYcjs.validateWorkspacePath.call(void 0, workspaceRoot);
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config, process.cwd());
646
- authConfig = await _chunkQ2IL4DDIcjs.ensureAuthenticated.call(void 0, authConfig);
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config, process.cwd());
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 _chunk46C73ZKKcjs.saveConfig.call(void 0, config);
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-J6PHGL23.cjs")));
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config, process.cwd());
716
- authConfig = await _chunkQ2IL4DDIcjs.ensureAuthenticated.call(void 0, authConfig);
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-223QTGBG.cjs")));
722
- const config = await _chunk46C73ZKKcjs.loadConfig.call(void 0, );
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-U3M4FFX7.cjs")));
728
- const config = await _chunk46C73ZKKcjs.loadConfig.call(void 0, );
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("config").description("Configure Autohand settings (same as /settings in interactive mode)").action(async () => {
733
- const config = await _chunk46C73ZKKcjs.loadConfig.call(void 0, );
734
- const { settings } = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-BKTS7OMC.cjs")));
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 _chunk46C73ZKKcjs.saveConfig.call(void 0, config);
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 _chunk46C73ZKKcjs.saveConfig.call(void 0, config);
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 _chunk46C73ZKKcjs.saveConfig.call(void 0, config);
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', _37 => _37.mcp, 'optionalAccess', _38 => _38.servers, 'optionalAccess', _39 => _39.findIndex, 'call', _40 => _40((s) => s.name === name)]);
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 _chunk46C73ZKKcjs.saveConfig.call(void 0, config);
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', _41 => _41.mcp, 'optionalAccess', _42 => _42.servers]), () => ( []));
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', _43 => _43.args, 'optionalAccess', _44 => _44.length]) ? " " + server.args.join(" ") : ""}`.trim() : _nullishCoalesce(server.url, () => ( "<missing-url>"));
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-P6DHES7V.cjs")));
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-WAPTFMDO.cjs")));
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-JODKER5D.cjs")));
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, void 0, process.cwd());
914
- const workspaceRoot = _chunk46C73ZKKcjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
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 template = [
922
- "# AGENTS.md",
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-IIZMHXYP.cjs")));
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: _chunkREMGR23Vcjs.package_default.version,
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: _chunkREMGR23Vcjs.package_default.version,
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-I7T4ZHYL.cjs")));
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, options.config, process.cwd());
972
- const originalWorkspaceRoot = _chunk46C73ZKKcjs.resolveWorkspaceRoot.call(void 0, config, options.path);
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 } = _chunkCHI52KFRcjs.detectLocale.call(void 0, {
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 _chunkCHI52KFRcjs.initI18n.call(void 0, detectedLocale);
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 = _chunk46C73ZKKcjs.getProviderConfig.call(void 0, config, providerName);
1168
+ const providerConfig = _chunkCNQKIWIScjs.getProviderConfig.call(void 0, config, providerName);
1001
1169
  if (!providerConfig) {
1002
- const { SetupWizard } = await Promise.resolve().then(() => _interopRequireWildcard(require("./onboarding-FXX7YHSJ.cjs")));
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 _chunk46C73ZKKcjs.saveConfig.call(void 0, config);
1179
+ await _chunkCNQKIWIScjs.saveConfig.call(void 0, config);
1012
1180
  console.log();
1013
1181
  }
1014
1182
  }
1015
- const workspacePathValidation = await _chunk3LJJG5YYcjs.validateWorkspacePath.call(void 0, originalWorkspaceRoot);
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 (_chunk7LWQCE4Ycjs.isSessionWorktreeEnabled.call(void 0, options.worktree)) {
1026
- sessionWorktree = _chunk7LWQCE4Ycjs.prepareSessionWorktree.call(void 0, {
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
- initPingService({
1075
- cliVersion: _chunkREMGR23Vcjs.package_default.version,
1076
- clientType: "cli"
1077
- });
1078
- startPingService();
1079
- const stopPing = () => stopPingService();
1080
- process.on("exit", stopPing);
1081
- process.on("SIGINT", stopPing);
1082
- process.on("SIGTERM", stopPing);
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
- try {
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 versionCheckPromise = _optionalChain([config, 'access', _47 => _47.ui, 'optionalAccess', _48 => _48.checkForUpdates]) !== false ? _chunkFMB3TSWPcjs.checkForUpdates.call(void 0, _chunkREMGR23Vcjs.package_default.version, {
1100
- checkIntervalHours: _nullishCoalesce(_optionalChain([config, 'access', _49 => _49.ui, 'optionalAccess', _50 => _50.updateCheckInterval]), () => ( 24))
1101
- }) : Promise.resolve(null);
1102
- const [authUser, versionResult] = await Promise.all([
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
- if (authUser && _optionalChain([config, 'access', _51 => _51.auth, 'optionalAccess', _52 => _52.token])) {
1110
- const syncEnabled = options.syncSettings !== false && _optionalChain([config, 'access', _53 => _53.sync, 'optionalAccess', _54 => _54.enabled]) !== false;
1111
- if (syncEnabled) {
1112
- try {
1113
- const { createSyncService, DEFAULT_SYNC_CONFIG } = await Promise.resolve().then(() => _interopRequireWildcard(require("./sync-EH4K5U3N.cjs")));
1114
- const { setSyncService } = await Promise.resolve().then(() => _interopRequireWildcard(require("./sync-77CXVVTK.cjs")));
1115
- const syncService = createSyncService({
1116
- authToken: config.auth.token,
1117
- userId: authUser.id,
1118
- config: {
1119
- ...DEFAULT_SYNC_CONFIG,
1120
- ...config.sync,
1121
- enabled: true
1122
- },
1123
- onAuthFailure: async () => {
1124
- const message = "Session sync failed. Run /logout and /login if you continue to see this message.";
1125
- if (agentHolder.current) {
1126
- agentHolder.current.notifyUser(message);
1127
- } else {
1128
- const { promptNotify } = await Promise.resolve().then(() => _interopRequireWildcard(require("./inputPrompt-IIFKCX5Q.cjs")));
1129
- promptNotify(_chalk2.default.yellow(message));
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
- syncService.start();
1134
- setSyncService(syncService);
1135
- const stopSync = () => {
1136
- _optionalChain([syncService, 'optionalAccess', _55 => _55.stop, 'call', _56 => _56()]);
1137
- setSyncService(null);
1138
- };
1139
- process.on("exit", stopSync);
1140
- process.on("SIGINT", stopSync);
1141
- process.on("SIGTERM", stopSync);
1142
- } catch (e10) {
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
- } catch (e11) {
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-C3YPXTDD.cjs")));
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-YOLLFTP2.cjs")));
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 (e12) {
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-DMRUFU4M.cjs")));
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-XHJLCO4M.cjs")));
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.prompt) {
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(_chunk7LWQCE4Ycjs.formatStartupBanner.call(void 0, _chunkIKUMVBCWcjs.ASCII_FRIEND));
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 = _chunk46C73ZKKcjs.getProviderConfig.call(void 0, runtime.config);
1302
- return _nullishCoalesce(_nullishCoalesce(runtime.options.model, () => ( _optionalChain([settings, 'optionalAccess', _71 => _71.model]))), () => ( "unknown"));
1303
- } catch (e13) {
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 = _chunk7LWQCE4Ycjs.formatWelcomeVersionPrefix.call(void 0, getVersionString());
1495
+ let versionLine = _chunkEFXFURDYcjs.formatWelcomeVersionPrefix.call(void 0, getVersionString());
1309
1496
  if (versionCheck) {
1310
1497
  if (versionCheck.isUpToDate) {
1311
- versionLine += _chunk7LWQCE4Ycjs.formatUpdateReady.call(void 0, );
1498
+ versionLine += _chunkEFXFURDYcjs.formatUpdateReady.call(void 0, );
1312
1499
  } else if (versionCheck.updateAvailable && versionCheck.latestVersion) {
1313
- versionLine += _chunk7LWQCE4Ycjs.formatUpdateAvailable.call(void 0, versionCheck.latestVersion);
1500
+ versionLine += _chunkEFXFURDYcjs.formatUpdateAvailable.call(void 0, versionCheck.latestVersion);
1314
1501
  }
1315
1502
  }
1316
1503
  console.log(versionLine);
1317
- if (_optionalChain([versionCheck, 'optionalAccess', _72 => _72.updateAvailable])) {
1318
- console.log(_chunk7LWQCE4Ycjs.formatInstallHint.call(void 0, _chunkFMB3TSWPcjs.getInstallHint.call(void 0, versionCheck.channel)));
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', _73 => _73.config, 'access', _74 => _74.auth, 'optionalAccess', _75 => _75.token]));
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(_chunk7LWQCE4Ycjs.formatWelcomeGreeting.call(void 0, authUser.name || authUser.email));
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(_chunk7LWQCE4Ycjs.formatWelcomeStatusLine.call(void 0, model, ccEnabled, dir));
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(_chunk7LWQCE4Ycjs.formatWelcomeTitle.call(void 0, ));
1515
+ console.log(_chunkEFXFURDYcjs.formatWelcomeTitle.call(void 0, ));
1329
1516
  for (const s of suggestions) {
1330
- console.log(_chunk7LWQCE4Ycjs.formatWelcomeSuggestion.call(void 0, s.command, s.description));
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config);
1336
- const workspaceRoot = _chunk46C73ZKKcjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
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-7AJP74GJ.cjs")));
1343
- const { AUTOHAND_PATHS } = await Promise.resolve().then(() => _interopRequireWildcard(require("./constants-RLMJ5D5P.cjs")));
1344
- const { skillsInstall } = await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-install-VTAMCNNY.cjs")));
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config);
1356
- const workspaceRoot = _chunk46C73ZKKcjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
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-XLRSVNA3.cjs")));
1363
- const { SkillsRegistry } = await Promise.resolve().then(() => _interopRequireWildcard(require("./SkillsRegistry-7AJP74GJ.cjs")));
1364
- const { AUTOHAND_PATHS } = await Promise.resolve().then(() => _interopRequireWildcard(require("./constants-RLMJ5D5P.cjs")));
1365
- const { HookManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./HookManager-TMAJQU4S.cjs")));
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-C3YPXTDD.cjs")));
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config);
1407
- const workspaceRoot = _chunk46C73ZKKcjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
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-5OOJ7FAT.cjs")));
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config);
1453
- const originalWorkspaceRoot = _chunk46C73ZKKcjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
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 _chunk3LJJG5YYcjs.validateWorkspacePath.call(void 0, originalWorkspaceRoot);
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 (_chunk7LWQCE4Ycjs.isSessionWorktreeEnabled.call(void 0, opts.worktree)) {
1466
- const sessionWorktree = _chunk7LWQCE4Ycjs.prepareSessionWorktree.call(void 0, {
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
- const providerName = _nullishCoalesce(config.provider, () => ( "openrouter"));
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-C3YPXTDD.cjs")));
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-DMRUFU4M.cjs")));
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 _chunk46C73ZKKcjs.loadConfig.call(void 0, opts.config);
1571
- const originalWorkspaceRoot = _chunk46C73ZKKcjs.resolveWorkspaceRoot.call(void 0, config, opts.path);
1572
- const workspacePathValidation = await _chunk3LJJG5YYcjs.validateWorkspacePath.call(void 0, originalWorkspaceRoot);
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
- const providerName2 = _nullishCoalesce(config.provider, () => ( "openrouter"));
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-TMAJQU4S.cjs")));
1616
- const { SessionManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./SessionManager-WAPTFMDO.cjs")));
1617
- const { MemoryManager } = await Promise.resolve().then(() => _interopRequireWildcard(require("./MemoryManager-34L4YOKA.cjs")));
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', _76 => _76[providerName], 'optionalAccess', _77 => _77.model]))), () => ( "unknown"));
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-C3YPXTDD.cjs")));
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-DMRUFU4M.cjs")));
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', _78 => _78.status]) === "completed" ? "completed" : `ended (${_optionalChain([finalState, 'optionalAccess', _79 => _79.status])})`;
1739
- const exitCode = _optionalChain([finalState, 'optionalAccess', _80 => _80.status]) === "completed" ? 0 : 1;
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', _81 => _81.currentIteration]), () => ( 0))} iterations: ${_optionalChain([opts, 'access', _82 => _82.autoMode, 'optionalAccess', _83 => _83.slice, 'call', _84 => _84(0, 50)])}...`);
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', _85 => _85.stderr, 'optionalAccess', _86 => _86.trim, 'call', _87 => _87()]) || _optionalChain([create, 'access', _88 => _88.stdout, 'optionalAccess', _89 => _89.trim, 'call', _90 => _90()]) || "unknown error";
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
- */