autohand-cli 0.9.1 → 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 (432) hide show
  1. package/README.md +103 -79
  2. package/dist/AgentRegistry-BBQRODQC.cjs +18 -0
  3. package/dist/AgentRegistry-JBXZUPML.js +18 -0
  4. package/dist/{CommunitySkillsCache-ZACDPD4J.js → CommunitySkillsCache-CI7UN2DX.js} +2 -2
  5. package/dist/CommunitySkillsCache-XTQ6RMTA.cjs +8 -0
  6. package/dist/{HookManager-2S6AHOC3.js → HookManager-BELBPQQI.js} +1 -1
  7. package/dist/{HookManager-TVEQI5ZU.cjs → HookManager-ZL2CLAJW.cjs} +2 -2
  8. package/dist/{ImportWizard-AF2XL6DS.cjs → ImportWizard-U6CIJREW.cjs} +12 -12
  9. package/dist/{ImportWizard-AEBMAKXE.js → ImportWizard-VJFSWSUQ.js} +3 -3
  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-SJPY3ONR.js → NVIDIAProvider-AFNJNWJM.js} +1 -1
  15. package/dist/NVIDIAProvider-L5GTYRCQ.cjs +14 -0
  16. package/dist/{PermissionManager-MT7KBNNR.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-RB4RVAF6.js → ProviderFactory-XUT6BSGB.js} +4 -3
  20. package/dist/SessionManager-LGPQIA57.cjs +10 -0
  21. package/dist/{SessionManager-554PHVPC.js → SessionManager-OR4KDDDS.js} +2 -2
  22. package/dist/{SkillsRegistry-NHHMIUYJ.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/{about-3USFSGOH.js → about-OYVGQMJJ.js} +3 -3
  27. package/dist/{about-QR52U5DD.cjs → about-U2BH7HDR.cjs} +4 -4
  28. package/dist/{acp-5Y2W6OZP.js → acp-JWHGXZL5.js} +169 -103
  29. package/dist/{acp-GSYE75OB.cjs → acp-S37JOBCS.cjs} +184 -118
  30. package/dist/{actionExecutor-KHUU3Z3Q.cjs → actionExecutor-2QEPMELQ.cjs} +13 -13
  31. package/dist/{actionExecutor-PLQJZLZV.js → actionExecutor-6NCCORRB.js} +12 -12
  32. package/dist/add-dir-KFUHSIR2.cjs +11 -0
  33. package/dist/{add-dir-HCERJDBR.js → add-dir-MM2BM2Z2.js} +2 -2
  34. package/dist/agent-DUIYLIVN.js +132 -0
  35. package/dist/agent-YYEHGDAK.cjs +132 -0
  36. package/dist/agents-GBGG4CW7.cjs +19 -0
  37. package/dist/agents-ZH34C72F.js +19 -0
  38. package/dist/agents-new-ERXLS7SB.cjs +17 -0
  39. package/dist/{agents-new-7GAQ25EK.js → agents-new-EVTGPTA4.js} +6 -6
  40. package/dist/{autoSkill-66PKCYTW.js → autoSkill-HEWKJ5JV.js} +2 -2
  41. package/dist/autoSkill-YL6PN6AV.cjs +20 -0
  42. package/dist/automode-4BJ7FNPL.cjs +10 -0
  43. package/dist/{automode-BUF3VGXU.js → automode-S4U7A7Q2.js} +2 -2
  44. package/dist/chrome-45ZXHL5N.cjs +22 -0
  45. package/dist/{chrome-Y3T7EIHG.js → chrome-BBSRVG6S.js} +2 -2
  46. package/dist/chrome-IFVZRHAT.cjs +50 -0
  47. package/dist/chrome-MYE6DNA2.js +22 -0
  48. package/dist/{chunk-45CHNQM6.cjs → chunk-24CEJYEG.cjs} +93 -31
  49. package/dist/{chunk-6JWCGQJU.cjs → chunk-255GIVM2.cjs} +6 -6
  50. package/dist/{chunk-D546G7DA.cjs → chunk-2BDSR2OW.cjs} +98 -75
  51. package/dist/{chunk-PGFLPURU.js → chunk-2BPIR7LA.js} +121 -4
  52. package/dist/{chunk-AOKXYGBQ.cjs → chunk-2NY7OHBF.cjs} +41 -26
  53. package/dist/chunk-2WUNHTXL.js +303 -0
  54. package/dist/{chunk-PQBYFEBL.cjs → chunk-34B6ZO6W.cjs} +124 -7
  55. package/dist/{chunk-5JTTM5SC.js → chunk-3BJN7GAH.js} +1 -1
  56. package/dist/{chunk-3UC6DMFI.cjs → chunk-3CAXECWJ.cjs} +15 -15
  57. package/dist/{chunk-YWH55BWK.cjs → chunk-3CBYUBZC.cjs} +6 -9
  58. package/dist/chunk-3DF3GZQ7.js +277 -0
  59. package/dist/{chunk-KASXKDF2.cjs → chunk-3JURXAL6.cjs} +58 -7
  60. package/dist/{chunk-JV5HVCHU.cjs → chunk-3KWAP2Y3.cjs} +88 -9
  61. package/dist/{chunk-WPE2XHVX.js → chunk-3MCK6UBL.js} +1 -1
  62. package/dist/{chunk-U2QUMKCB.js → chunk-3TH7IK4M.js} +62 -9
  63. package/dist/{chunk-YXM6SA7P.js → chunk-3V77OB3W.js} +3 -3
  64. package/dist/{chunk-MZN6JBRZ.cjs → chunk-3Y5UEK7K.cjs} +4 -4
  65. package/dist/{chunk-BP37FVBM.js → chunk-4GPPSBEZ.js} +3 -3
  66. package/dist/{chunk-4XVLNOFA.js → chunk-5CMBAJ6K.js} +20 -3
  67. package/dist/{chunk-PNIAIOMZ.cjs → chunk-5YRXFBYZ.cjs} +35 -6
  68. package/dist/chunk-6AC2TT26.js +156 -0
  69. package/dist/{chunk-PSAH4ZQB.cjs → chunk-6EIQ6A6U.cjs} +2 -2
  70. package/dist/{chunk-YQDI753V.js → chunk-6HSEDXVF.js} +4 -4
  71. package/dist/{chunk-O5GI6SR3.js → chunk-6NUXK62F.js} +1 -1
  72. package/dist/{chunk-HVCIB4SW.cjs → chunk-6TGCAPYH.cjs} +62 -9
  73. package/dist/{chunk-HZWU6IO3.js → chunk-6W3SZCSP.js} +2 -5
  74. package/dist/{chunk-Q3BS6FPM.js → chunk-73LV3DDZ.js} +4 -4
  75. package/dist/{chunk-ZNGRLCFQ.js → chunk-7BGGLIQF.js} +83 -1
  76. package/dist/{chunk-ZNYZB7XY.cjs → chunk-7EEK7CRR.cjs} +83 -1
  77. package/dist/{chunk-HK5A54AV.cjs → chunk-7TO3PDMV.cjs} +48 -4
  78. package/dist/chunk-7UU22RSH.cjs +277 -0
  79. package/dist/{chunk-XNIMSVS6.cjs → chunk-A3GAM6FM.cjs} +11 -11
  80. package/dist/{chunk-W5QLA6WP.cjs → chunk-A7DJU75T.cjs} +8 -8
  81. package/dist/{chunk-7XTUL7ZD.cjs → chunk-AAAO4ERQ.cjs} +9 -9
  82. package/dist/{chunk-M5DK524Z.js → chunk-AAJLMP57.js} +2 -2
  83. package/dist/chunk-ABR756QN.js +529 -0
  84. package/dist/{chunk-OIGYWOL6.js → chunk-APFGDIPD.js} +3 -1
  85. package/dist/{chunk-PTTZI4QZ.js → chunk-APQYRMYL.js} +4 -4
  86. package/dist/{chunk-CO2AADYU.cjs → chunk-AZKOIF2G.cjs} +55 -17
  87. package/dist/{chunk-P6SLT2F4.cjs → chunk-AZLHUPNC.cjs} +2 -2
  88. package/dist/chunk-B55VCYSQ.cjs +30 -0
  89. package/dist/{chunk-JMJRFSNJ.js → chunk-BLQUMSM3.js} +1 -1
  90. package/dist/{chunk-MGNXABSU.cjs → chunk-BXKPX6K4.cjs} +9 -9
  91. package/dist/{chunk-MQQH4XQH.cjs → chunk-C66FN2LP.cjs} +4 -4
  92. package/dist/{chunk-CECH6QQP.js → chunk-CH7KUFAS.js} +10 -10
  93. package/dist/{chunk-PIXQ2AVM.cjs → chunk-CILSXOPI.cjs} +17 -17
  94. package/dist/{chunk-IEPLQ47J.js → chunk-CM24K6ZT.js} +89 -12
  95. package/dist/chunk-CMEZ42F2.cjs +303 -0
  96. package/dist/{chunk-X5P6QQOB.cjs → chunk-CNQKIWIS.cjs} +100 -23
  97. package/dist/{chunk-AQ5PVHOC.cjs → chunk-CSUGNNJY.cjs} +4 -3
  98. package/dist/{chunk-QRQF3556.js → chunk-D6HB3H3L.js} +25 -10
  99. package/dist/{chunk-XZVDYC5U.js → chunk-D7AYKVKW.js} +2 -2
  100. package/dist/{chunk-3UHRCHKB.cjs → chunk-DLCXWOWT.cjs} +23 -23
  101. package/dist/{chunk-CK4HAHVY.cjs → chunk-DMM2BKSV.cjs} +118 -25
  102. package/dist/{chunk-SPQ7QIQ6.js → chunk-DW3DPV77.js} +1 -1
  103. package/dist/chunk-ECQD2QC3.cjs +33 -0
  104. package/dist/{chunk-SNDDZG5H.js → chunk-EEYOS3UC.js} +90 -70
  105. package/dist/{chunk-DGBPWODD.js → chunk-EF2EN5CR.js} +2 -2
  106. package/dist/{chunk-M7B7RRBK.cjs → chunk-EFXFURDY.cjs} +138 -51
  107. package/dist/chunk-EK34UZPB.cjs +40 -0
  108. package/dist/{chunk-CRTCZ4WL.cjs → chunk-FJR6EZLO.cjs} +3834 -2337
  109. package/dist/{chunk-TYBPTKFT.js → chunk-FPO7YNPQ.js} +1 -1
  110. package/dist/{chunk-X3TI5TJJ.js → chunk-FS4I6BNR.js} +1 -1
  111. package/dist/{chunk-WNJXIACY.js → chunk-FSJ2MNOC.js} +3 -3
  112. package/dist/{chunk-44ZWOBTI.js → chunk-GEHZMC4G.js} +12 -9
  113. package/dist/{chunk-Y5BDE24P.cjs → chunk-GO6C2RAR.cjs} +3 -0
  114. package/dist/{chunk-XW3XCK4E.cjs → chunk-GSMR6V36.cjs} +4 -4
  115. package/dist/{chunk-H426KOGY.js → chunk-GSZWATME.js} +1 -1
  116. package/dist/{chunk-S5JNQIGL.cjs → chunk-GYLGCR6F.cjs} +5 -5
  117. package/dist/{chunk-ONVYXTUT.cjs → chunk-H3OOWNYQ.cjs} +3 -3
  118. package/dist/{chunk-V5ELP2XE.js → chunk-H65446XW.js} +110 -15
  119. package/dist/{chunk-LANGD5CO.js → chunk-H7HXRRHK.js} +45 -1
  120. package/dist/{chunk-RBXBH6EB.cjs → chunk-HN2JTDN5.cjs} +17 -17
  121. package/dist/{chunk-SOVR7S3T.cjs → chunk-HNXUZ5OY.cjs} +2 -2
  122. package/dist/{chunk-AZ47LKD5.cjs → chunk-HOYT3E65.cjs} +3 -3
  123. package/dist/{chunk-P4FUTSVK.js → chunk-HTPY5ESD.js} +3 -3
  124. package/dist/{chunk-5SFV2NCY.cjs → chunk-HVLWH2AF.cjs} +10 -10
  125. package/dist/{chunk-VQHSYAPZ.cjs → chunk-HZTEU4W5.cjs} +62 -93
  126. package/dist/{chunk-4XFHP2SN.cjs → chunk-I5T7LPFP.cjs} +7 -7
  127. package/dist/{chunk-ZPLCAXJW.js → chunk-IB5CJXE7.js} +7 -7
  128. package/dist/{chunk-KM7R5YPS.cjs → chunk-INNXFLDR.cjs} +9 -6
  129. package/dist/{chunk-2ESQR35E.cjs → chunk-JFLEP3T7.cjs} +10 -10
  130. package/dist/chunk-JJGDOBFL.js +40 -0
  131. package/dist/{chunk-5A7ZL64N.js → chunk-JSU46T6K.js} +1 -1
  132. package/dist/{chunk-NB6M6ESM.js → chunk-K6WN6BT4.js} +1 -1
  133. package/dist/{chunk-QQ64HEHP.cjs → chunk-KIQH3SMT.cjs} +34 -31
  134. package/dist/{chunk-MANJ67D3.js → chunk-KPRXHIE2.js} +52 -83
  135. package/dist/{chunk-6HF6XSCC.js → chunk-LIO3RX2Z.js} +2 -2
  136. package/dist/{chunk-NZ3ZWLUW.js → chunk-LOSXLH7P.js} +109 -16
  137. package/dist/{chunk-NZ7GCK7Y.cjs → chunk-LSOR72PB.cjs} +23 -23
  138. package/dist/{chunk-6AYJCDTA.js → chunk-MA3AVDCC.js} +47 -9
  139. package/dist/{chunk-PZZMIYII.js → chunk-ME3S2WIR.js} +3 -3
  140. package/dist/{chunk-2IW5YFJ4.js → chunk-NC2I2M4P.js} +4 -4
  141. package/dist/{chunk-AE2ILW25.cjs → chunk-NC4A4LVC.cjs} +13 -13
  142. package/dist/{chunk-EEHWALXA.js → chunk-NGEK5FCJ.js} +85 -3
  143. package/dist/{chunk-MMKZSJUN.js → chunk-NKW6CHXQ.js} +1 -1
  144. package/dist/{chunk-JB3JCYBJ.js → chunk-NOWCRKP2.js} +4 -3
  145. package/dist/{chunk-3ZOOH44N.js → chunk-NUB2LMB6.js} +2 -2
  146. package/dist/chunk-O246MKIW.cjs +267 -0
  147. package/dist/{chunk-SRMGWMQO.js → chunk-OGFWL2PS.js} +1 -1
  148. package/dist/{chunk-YISPVAXO.cjs → chunk-ONNGAR6W.cjs} +340 -597
  149. package/dist/{chunk-7WAUCLLQ.js → chunk-OOFR6A62.js} +33 -4
  150. package/dist/{chunk-4E7SHPNQ.js → chunk-OZ7FHO7J.js} +2 -2
  151. package/dist/{chunk-NV6LCD2I.cjs → chunk-P5EWGUI2.cjs} +109 -27
  152. package/dist/{chunk-YC5OBZQU.js → chunk-P6BQJPAI.js} +41 -18
  153. package/dist/{chunk-SHRLFX6F.js → chunk-PG2JIU5M.js} +57 -6
  154. package/dist/{chunk-6OECOAK5.cjs → chunk-PI27G2ED.cjs} +25 -8
  155. package/dist/{chunk-TR6NECEZ.js → chunk-PI7LRPL6.js} +1 -1
  156. package/dist/{chunk-GAOPJ5S3.cjs → chunk-PMPEC5HN.cjs} +18 -15
  157. package/dist/{chunk-5GCQ5UMV.cjs → chunk-PYUP7AKY.cjs} +14 -14
  158. package/dist/{chunk-S5QKRA2V.js → chunk-QC5Z3ZT5.js} +2 -2
  159. package/dist/chunk-QDO4L2A7.cjs +156 -0
  160. package/dist/{chunk-LFDPTJYF.cjs → chunk-QDXRI5AM.cjs} +1 -1
  161. package/dist/{chunk-26G7YGOW.js → chunk-QVXMSQOG.js} +84 -21
  162. package/dist/{chunk-SVVP4UUZ.cjs → chunk-R4UKBKDY.cjs} +11 -11
  163. package/dist/{chunk-HG3ZASBH.cjs → chunk-R75AWII3.cjs} +112 -17
  164. package/dist/{chunk-TE4SYTWR.cjs → chunk-RD5PLUIX.cjs} +8 -8
  165. package/dist/{chunk-FFHSCM5M.js → chunk-RGB34CV5.js} +3 -3
  166. package/dist/{chunk-SY2P3Z5W.cjs → chunk-RJCZLFHE.cjs} +96 -32
  167. package/dist/{chunk-22SCR3EV.cjs → chunk-RKWNM2BJ.cjs} +2 -2
  168. package/dist/{chunk-FBQJZKFX.js → chunk-RMVONICR.js} +3 -3
  169. package/dist/{chunk-PY73W5MQ.cjs → chunk-RPSYRJL7.cjs} +10 -4
  170. package/dist/{chunk-HXHE2KAO.js → chunk-RWKU2X7O.js} +7 -4
  171. package/dist/{chunk-NQZH5CR2.cjs → chunk-RZLEGVMH.cjs} +102 -5
  172. package/dist/{chunk-KMP6Y3LJ.js → chunk-S2L3Y677.js} +1 -1
  173. package/dist/{chunk-GSDV75A5.js → chunk-S7KVUIOS.js} +1 -1
  174. package/dist/{chunk-7PT646AL.cjs → chunk-SACJJ6NO.cjs} +5 -3
  175. package/dist/{chunk-LEZEWKPA.js → chunk-SJQU2ZFR.js} +96 -32
  176. package/dist/{chunk-65LRPW5W.js → chunk-SKAQKQFF.js} +12 -2
  177. package/dist/chunk-T4DXP5OP.js +30 -0
  178. package/dist/{chunk-EYHKL4QC.js → chunk-T6FTB6K2.js} +1 -1
  179. package/dist/{chunk-DNSD7DVJ.js → chunk-T6N6GRFT.js} +13 -10
  180. package/dist/{chunk-575PXZX7.js → chunk-TJFKA6A7.js} +82 -3
  181. package/dist/{chunk-HSWWM6AM.js → chunk-TJZUPS4Z.js} +34 -291
  182. package/dist/{chunk-DHUQZ53B.cjs → chunk-TLKHZ425.cjs} +2 -2
  183. package/dist/{chunk-VLGGMQUN.cjs → chunk-TQ24NLXO.cjs} +6 -6
  184. package/dist/{chunk-LUMV3DB2.js → chunk-TWBAU46X.js} +1 -1
  185. package/dist/{chunk-EA2MS25U.cjs → chunk-TZB5XADL.cjs} +4 -4
  186. package/dist/{chunk-U6PLSPMD.cjs → chunk-UAYXZXWU.cjs} +4 -4
  187. package/dist/{chunk-OV3T5MUH.cjs → chunk-UKBFNBDO.cjs} +11 -11
  188. package/dist/{chunk-SZD45IDG.js → chunk-UMJYX5KD.js} +101 -4
  189. package/dist/{chunk-B76FJKEJ.cjs → chunk-USKYTHDL.cjs} +69 -18
  190. package/dist/{chunk-NZQFKXM3.cjs → chunk-VAJUSZMC.cjs} +15 -15
  191. package/dist/{chunk-SDLY4X3G.js → chunk-VGQG4NBJ.js} +2 -2
  192. package/dist/{chunk-KWXGDSYT.js → chunk-VLUIVJ3J.js} +58 -7
  193. package/dist/{chunk-KJ26T7GM.cjs → chunk-VOBINVMV.cjs} +105 -42
  194. package/dist/{chunk-C5QIQQ37.js → chunk-VSHKKCSH.js} +16 -5
  195. package/dist/{chunk-L46OUKW5.cjs → chunk-VSZU3MGA.cjs} +28 -17
  196. package/dist/{chunk-YFXTE422.cjs → chunk-VWHAUB77.cjs} +8 -3
  197. package/dist/{chunk-UWZ4G3SQ.js → chunk-VXGYFX45.js} +4 -4
  198. package/dist/{chunk-C46B72VK.js → chunk-WH6YUQDB.js} +141 -54
  199. package/dist/{chunk-SFFEKZGC.js → chunk-WQ6TD55V.js} +2 -2
  200. package/dist/{chunk-7PJKTSRN.js → chunk-WQWECXTY.js} +3 -3
  201. package/dist/{chunk-DSSCERHI.cjs → chunk-WVDJUJH6.cjs} +2 -2
  202. package/dist/{chunk-JPFRI4L4.js → chunk-X24VIVDZ.js} +210 -26
  203. package/dist/{chunk-7IRQ7JEH.js → chunk-X4NRTLXD.js} +7 -1
  204. package/dist/{chunk-7MY4JHER.js → chunk-X53SHYCG.js} +2 -2
  205. package/dist/{chunk-RFUKZIJF.cjs → chunk-XB2Z4ZAK.cjs} +5 -5
  206. package/dist/{chunk-WJYFLQ7G.cjs → chunk-Y47OJGLB.cjs} +3 -3
  207. package/dist/{chunk-HC2Q6A3E.cjs → chunk-Y4MN27V3.cjs} +361 -177
  208. package/dist/{chunk-ZK6HOR62.js → chunk-YEHFYZFU.js} +7 -2
  209. package/dist/{chunk-FFBDRUO5.cjs → chunk-YICIUY23.cjs} +1 -1
  210. package/dist/{chunk-63ANVAOJ.cjs → chunk-YMXYC777.cjs} +3 -3
  211. package/dist/{chunk-X7XMITIL.cjs → chunk-Z3GRWK6O.cjs} +8 -8
  212. package/dist/{chunk-3ICORF7M.cjs → chunk-Z5GG2KSL.cjs} +4 -4
  213. package/dist/{chunk-I2ZK3AOD.js → chunk-ZER7DYQK.js} +2 -2
  214. package/dist/{chunk-V3SZLWEQ.cjs → chunk-ZFDXZEZJ.cjs} +11 -11
  215. package/dist/{chunk-QBYGMMDD.js → chunk-ZFV4HJA6.js} +66 -4
  216. package/dist/chunk-ZHMYTI5D.cjs +529 -0
  217. package/dist/{chunk-4567QNRB.js → chunk-ZLR2TFBC.js} +3 -0
  218. package/dist/{chunk-OCATAKXV.cjs → chunk-ZTWNU5QZ.cjs} +20 -20
  219. package/dist/{chunk-CCIDL4SA.js → chunk-ZVLVLDYN.js} +2915 -1418
  220. package/dist/clear-AJGXD2BB.cjs +12 -0
  221. package/dist/{clear-Y5TO3RZA.js → clear-HAHDSWKW.js} +3 -3
  222. package/dist/communityInstaller-IRR6M3N6.cjs +22 -0
  223. package/dist/{communityInstaller-RVL4STPS.js → communityInstaller-OLKEUGMX.js} +5 -5
  224. package/dist/completion-G7Z436TF.cjs +17 -0
  225. package/dist/{completion-SE3XYG74.js → completion-ZS3AXJ6A.js} +4 -4
  226. package/dist/{config-7KPHKFTP.js → config-OWYAQPCX.js} +5 -4
  227. package/dist/config-W2BHT2QE.cjs +22 -0
  228. package/dist/{constants-EJFAWJQI.js → constants-AS6K67AA.js} +5 -3
  229. package/dist/constants-B4W5BT7F.cjs +23 -0
  230. package/dist/{export-BJVIDZC4.js → export-5HIU3KMD.js} +4 -4
  231. package/dist/export-GFD32UY2.cjs +15 -0
  232. package/dist/{extractSessionMemories-A2JX5WJ2.js → extractSessionMemories-K6ZVAW2F.js} +1 -1
  233. package/dist/{extractSessionMemories-XL3MS37F.cjs → extractSessionMemories-LLOIJR5U.cjs} +2 -2
  234. package/dist/feature-KP74CZ3F.cjs +14 -0
  235. package/dist/{feature-V4JF5TNJ.js → feature-OPNVMB2E.js} +2 -2
  236. package/dist/features-LT55MURX.cjs +24 -0
  237. package/dist/features-ZDIU26WX.js +24 -0
  238. package/dist/feedback-7WTJFQ6S.js +18 -0
  239. package/dist/feedback-CEOJ3453.cjs +18 -0
  240. package/dist/go-2CY5SZNR.js +16 -0
  241. package/dist/go-O2CSQON4.cjs +16 -0
  242. package/dist/goal-DL2N2AWT.cjs +16 -0
  243. package/dist/goal-IJS7VZSG.js +16 -0
  244. package/dist/help-RNOGDEBA.cjs +12 -0
  245. package/dist/{help-MLIROWKM.js → help-TCWD2IRH.js} +2 -2
  246. package/dist/{history-GQJ6RZD6.js → history-ATOR5OQV.js} +2 -2
  247. package/dist/history-UUSGX2AL.cjs +14 -0
  248. package/dist/{hooks-PPFHCF7T.js → hooks-R3Z5QKUP.js} +5 -5
  249. package/dist/hooks-RWM5UY67.cjs +18 -0
  250. package/dist/{i18n-Q7UZJRPL.js → i18n-4QI4TD4I.js} +1 -1
  251. package/dist/i18n-MFAEU5RV.cjs +33 -0
  252. package/dist/{ide-BUSVE54P.js → ide-6PBTCCUQ.js} +4 -4
  253. package/dist/ide-UE3G7NMQ.cjs +15 -0
  254. package/dist/{import-C7S6UJMW.cjs → import-2IG76KAN.cjs} +6 -4
  255. package/dist/{import-U47DXCA7.js → import-E47QL4DW.js} +2 -2
  256. package/dist/import-NQDNBFUL.cjs +10 -0
  257. package/dist/{import-3VBKI6BN.js → import-VQIHGJWS.js} +6 -4
  258. package/dist/index.cjs +444 -334
  259. package/dist/index.d.cts +38 -0
  260. package/dist/index.d.ts +38 -0
  261. package/dist/index.js +324 -214
  262. package/dist/init-DX3RDGDT.cjs +10 -0
  263. package/dist/{init-Q2O4R42R.js → init-Q54OAAFZ.js} +2 -2
  264. package/dist/{inputPrompt-3CFZDUBH.js → inputPrompt-V2VBDRM7.js} +2 -2
  265. package/dist/inputPrompt-WVGVWAHS.cjs +90 -0
  266. package/dist/language-I6KXAOXD.js +23 -0
  267. package/dist/language-XMIVOH5E.cjs +23 -0
  268. package/dist/learn-JPVVGTKU.js +23 -0
  269. package/dist/learn-NLSHI2MZ.cjs +23 -0
  270. package/dist/login-NABQYLYC.cjs +28 -0
  271. package/dist/login-XPOVFSWN.js +28 -0
  272. package/dist/logout-HNHCGB4Q.js +25 -0
  273. package/dist/logout-SKGDXJSW.cjs +25 -0
  274. package/dist/{mcp-AH3MMUBU.js → mcp-EN73YFGZ.js} +8 -7
  275. package/dist/mcp-TADZCPJQ.cjs +22 -0
  276. package/dist/{mcp-install-IA4ZS2SV.cjs → mcp-install-2GKWWBAS.cjs} +14 -13
  277. package/dist/{mcp-install-222PCKSW.js → mcp-install-3TBTVSHW.js} +9 -8
  278. package/dist/memory-GRXFTDIN.cjs +10 -0
  279. package/dist/{memory-VB46T5H3.js → memory-K2P3CDCH.js} +2 -2
  280. package/dist/{model-SJJG64AM.js → model-DEG22OWA.js} +2 -2
  281. package/dist/model-OSD74T7Z.cjs +10 -0
  282. package/dist/new-4NWBOATU.cjs +12 -0
  283. package/dist/{new-ERZ5C6CN.js → new-KJAP2MB6.js} +3 -3
  284. package/dist/{onboarding-ZQXMPSMJ.js → onboarding-2U5WE2OA.js} +17 -14
  285. package/dist/onboarding-5DZFCO5Q.cjs +39 -0
  286. package/dist/permissions-KY5I6YQ3.cjs +10 -0
  287. package/dist/{permissions-7ACNFK7A.js → permissions-TKYON7PP.js} +2 -2
  288. package/dist/{plan-YYUAXPTL.js → plan-DYHHLZSS.js} +1 -1
  289. package/dist/plan-PYKP652W.cjs +13 -0
  290. package/dist/quit-GSKJL42O.js +14 -0
  291. package/dist/quit-TQSRTBUT.cjs +14 -0
  292. package/dist/{registry-4DXUDKJN.js → registry-EZ4V4TUQ.js} +1339 -1
  293. package/dist/{registry-UEO3ETZ7.cjs → registry-LCWYI4IB.cjs} +1378 -40
  294. package/dist/resume-4VWJXARX.cjs +17 -0
  295. package/dist/{resume-XSXZMDMD.js → resume-TLHWWWFN.js} +5 -5
  296. package/dist/{review-QHP2KP4Q.js → review-CSK4IYTO.js} +1 -1
  297. package/dist/review-XLJEUH5K.cjs +9 -0
  298. package/dist/{rpc-XH7QLN4H.js → rpc-3DLQBDWU.js} +151 -124
  299. package/dist/{rpc-YF54T7JU.cjs → rpc-O36WUU3L.cjs} +169 -142
  300. package/dist/search-DSX2CY4A.cjs +22 -0
  301. package/dist/search-I3QUDUQL.js +22 -0
  302. package/dist/sessionBranching-DVNOUWJT.cjs +19 -0
  303. package/dist/sessionBranching-FKV4CR36.js +19 -0
  304. package/dist/sessions-3JUOT3ED.cjs +10 -0
  305. package/dist/{sessions-NJYHJOEL.js → sessions-VWMDIPOS.js} +2 -2
  306. package/dist/{settings-ZXUQH3DO.js → settings-FT2LZZUV.js} +11 -8
  307. package/dist/settings-RL4KNWHB.cjs +45 -0
  308. package/dist/setup-HQEJVOYT.js +32 -0
  309. package/dist/setup-MN54LKOL.cjs +32 -0
  310. package/dist/share-BUAFZNBX.cjs +17 -0
  311. package/dist/{share-WFAGZ5PY.js → share-CGB6MAVJ.js} +6 -6
  312. package/dist/skills/builtin/code-reviewer/SKILL.md +64 -0
  313. package/dist/skills/builtin/goal-writer/SKILL.md +124 -0
  314. package/dist/{skills-NBTNDVAY.js → skills-7DKR3HRZ.js} +7 -7
  315. package/dist/{skills-OB6RDW7D.js → skills-BBBENOEY.js} +9 -9
  316. package/dist/skills-OQM7IHAF.cjs +29 -0
  317. package/dist/{skills-ZROBG3RZ.cjs → skills-RA2PKL63.cjs} +9 -9
  318. package/dist/{skills-install-ILX6QVEF.cjs → skills-install-D7K476SL.cjs} +15 -15
  319. package/dist/{skills-install-BHTIEMKH.js → skills-install-T4SOKJSL.js} +8 -8
  320. package/dist/{skills-new-YMRP2HNO.js → skills-new-S33NGEU3.js} +6 -6
  321. package/dist/skills-new-UVYH53MD.cjs +18 -0
  322. package/dist/slashCommands-MWOUDSQP.js +111 -0
  323. package/dist/slashCommands-XASURUTV.cjs +111 -0
  324. package/dist/squad-PIIYDFVH.cjs +15 -0
  325. package/dist/squad-VHYOVEJP.js +15 -0
  326. package/dist/status-GHFTXQBL.js +25 -0
  327. package/dist/status-WXMIJIU3.cjs +25 -0
  328. package/dist/statusline-2K7AC6ZQ.js +21 -0
  329. package/dist/statusline-GROI4HOC.cjs +21 -0
  330. package/dist/sync-254WF6JI.cjs +42 -0
  331. package/dist/sync-2DIZN4EH.cjs +24 -0
  332. package/dist/{sync-OCJN4ZSO.js → sync-J6I2ZUKQ.js} +5 -3
  333. package/dist/{sync-7C25MOT2.js → sync-Z3LVSEEV.js} +8 -6
  334. package/dist/{teammate-D77B6QRT.cjs → teammate-EXR76PEQ.cjs} +5 -5
  335. package/dist/{teammate-EZCMHOIL.js → teammate-K4DAOFEQ.js} +5 -5
  336. package/dist/theme-MVQDSU47.js +23 -0
  337. package/dist/theme-QAKEYWJG.cjs +23 -0
  338. package/dist/ui/questionModal.cjs +5 -5
  339. package/dist/ui/questionModal.js +4 -4
  340. package/dist/{undo-GNUTFXCW.js → undo-5AU47JHF.js} +2 -2
  341. package/dist/undo-ME6WKUXZ.cjs +10 -0
  342. package/dist/{usage-QSTNSDAO.js → usage-QTKO2YMD.js} +6 -5
  343. package/dist/usage-TYNJKVER.cjs +25 -0
  344. package/package.json +4 -3
  345. package/dist/AgentRegistry-GOV7FN2O.js +0 -10
  346. package/dist/AgentRegistry-J2C6JBZ3.cjs +0 -10
  347. package/dist/CommunitySkillsCache-22BB3J6H.cjs +0 -8
  348. package/dist/LearnAdvisor-KKEQ5QCV.js +0 -9
  349. package/dist/LearnAdvisor-Q7RAYLPF.cjs +0 -9
  350. package/dist/MemoryManager-PMNAEZMB.cjs +0 -8
  351. package/dist/MemoryManager-QZRLTUB5.js +0 -8
  352. package/dist/NVIDIAProvider-C3FWQOBZ.cjs +0 -14
  353. package/dist/PermissionManager-URCNP5EC.cjs +0 -11
  354. package/dist/ProviderFactory-56N3ECE4.cjs +0 -12
  355. package/dist/SessionManager-2IZGWASQ.cjs +0 -10
  356. package/dist/SkillsRegistry-GMRVONOQ.cjs +0 -9
  357. package/dist/SubAgent-4GOR2FIJ.js +0 -13
  358. package/dist/SubAgent-ZJMDH4FI.cjs +0 -13
  359. package/dist/add-dir-BTAD5OZS.cjs +0 -11
  360. package/dist/agent-B3EVT7NN.cjs +0 -126
  361. package/dist/agent-SATQ3WZ3.js +0 -126
  362. package/dist/agents-44CRJGM7.cjs +0 -18
  363. package/dist/agents-NN4ZAJ7R.js +0 -18
  364. package/dist/agents-new-6D6G4QS6.cjs +0 -17
  365. package/dist/autoSkill-VQLGBELN.cjs +0 -20
  366. package/dist/automode-45DWV4TN.cjs +0 -10
  367. package/dist/chrome-Q2U73HZB.cjs +0 -50
  368. package/dist/chrome-Q54OALOK.cjs +0 -21
  369. package/dist/chrome-ZNJ46OYW.js +0 -21
  370. package/dist/chunk-JCUHCH37.cjs +0 -247
  371. package/dist/chunk-VKOXFT4L.cjs +0 -23
  372. package/dist/clear-QJXU25IF.cjs +0 -12
  373. package/dist/communityInstaller-LXMVKVAV.cjs +0 -22
  374. package/dist/completion-JX4T2ONW.cjs +0 -17
  375. package/dist/config-3224PRW4.cjs +0 -21
  376. package/dist/constants-MCCGUU5F.cjs +0 -21
  377. package/dist/export-KU4557HK.cjs +0 -15
  378. package/dist/feature-K3LG5IJP.cjs +0 -14
  379. package/dist/features-5OJTLKS7.js +0 -23
  380. package/dist/features-VCBJQXCX.cjs +0 -23
  381. package/dist/feedback-D4437VE4.js +0 -18
  382. package/dist/feedback-VZPEHGFY.cjs +0 -18
  383. package/dist/go-X4E6BCD6.js +0 -12
  384. package/dist/go-XREVFS5I.cjs +0 -12
  385. package/dist/goal-4M3J6JS2.cjs +0 -16
  386. package/dist/goal-EI66BV7W.js +0 -16
  387. package/dist/help-GGFS7WHY.cjs +0 -12
  388. package/dist/history-J4LUIOSI.cjs +0 -14
  389. package/dist/hooks-FSRIUS6A.cjs +0 -18
  390. package/dist/i18n-CI6VFXL5.cjs +0 -33
  391. package/dist/ide-YR27BPGM.cjs +0 -15
  392. package/dist/import-DBK4OCDF.cjs +0 -10
  393. package/dist/init-OXTYS72D.cjs +0 -10
  394. package/dist/inputPrompt-JMACL4EB.cjs +0 -90
  395. package/dist/language-EK3M6UBV.cjs +0 -22
  396. package/dist/language-Q3RUGGOW.js +0 -22
  397. package/dist/learn-3DSX7DYG.cjs +0 -23
  398. package/dist/learn-OPOH5L43.js +0 -23
  399. package/dist/login-GST7MWXJ.cjs +0 -27
  400. package/dist/login-Q7DZKAX4.js +0 -27
  401. package/dist/logout-2G7OUK7I.cjs +0 -24
  402. package/dist/logout-FNBBL2UI.js +0 -24
  403. package/dist/mcp-DW7R63IB.cjs +0 -21
  404. package/dist/memory-6NX3DAIY.cjs +0 -10
  405. package/dist/model-64NAELFS.cjs +0 -10
  406. package/dist/new-DU5SOOOY.cjs +0 -12
  407. package/dist/onboarding-2U2BV2KE.cjs +0 -36
  408. package/dist/permissions-GSNNV7RJ.cjs +0 -10
  409. package/dist/plan-XEJMOT55.cjs +0 -13
  410. package/dist/quit-WY6T267G.js +0 -10
  411. package/dist/quit-XIRE2KRE.cjs +0 -10
  412. package/dist/resume-RQZ3WXBP.cjs +0 -17
  413. package/dist/review-UWHWQHCB.cjs +0 -9
  414. package/dist/search-VXXFGZWU.cjs +0 -21
  415. package/dist/search-YAWGX7P7.js +0 -21
  416. package/dist/sessions-OSG3UJEZ.cjs +0 -10
  417. package/dist/settings-SO2UIGWV.cjs +0 -42
  418. package/dist/setup-KG7EGKF5.js +0 -30
  419. package/dist/setup-RSOPCQ57.cjs +0 -30
  420. package/dist/share-ZU3SGACF.cjs +0 -17
  421. package/dist/skills-KBVAQAD2.cjs +0 -29
  422. package/dist/skills-new-B45VQ2PP.cjs +0 -18
  423. package/dist/slashCommands-53VYIBJU.js +0 -105
  424. package/dist/slashCommands-BG2RGGZ6.cjs +0 -105
  425. package/dist/status-CQ2IUOVK.cjs +0 -24
  426. package/dist/status-E7IGNVPC.js +0 -24
  427. package/dist/sync-XRP46IVG.cjs +0 -40
  428. package/dist/sync-ZMFVE7T4.cjs +0 -22
  429. package/dist/theme-KKRDE6P7.cjs +0 -22
  430. package/dist/theme-XF7XIWBQ.js +0 -22
  431. package/dist/undo-U4KN7QQM.cjs +0 -10
  432. package/dist/usage-YDEMQBNQ.cjs +0 -24
@@ -1,14 +1,19 @@
1
1
  "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 _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; var _class2; var _class3;
2
2
 
3
3
 
4
- var _chunkY5BDE24Pcjs = require('./chunk-Y5BDE24P.cjs');
4
+ var _chunkGO6C2RARcjs = require('./chunk-GO6C2RAR.cjs');
5
5
 
6
6
 
7
7
 
8
8
  var _chunk3OF56EMAcjs = require('./chunk-3OF56EMA.cjs');
9
9
 
10
10
 
11
- var _chunkHK5A54AVcjs = require('./chunk-HK5A54AV.cjs');
11
+
12
+
13
+ var _chunkEK34UZPBcjs = require('./chunk-EK34UZPB.cjs');
14
+
15
+
16
+ var _chunk7TO3PDMVcjs = require('./chunk-7TO3PDMV.cjs');
12
17
 
13
18
  // src/providers/OllamaProvider.ts
14
19
  var DEFAULT_TIMEOUT = 12e4;
@@ -37,6 +42,9 @@ var OllamaProvider = (_class = class {
37
42
  getName() {
38
43
  return "ollama";
39
44
  }
45
+ getCapabilities() {
46
+ return { nativeToolCalling: true };
47
+ }
40
48
  setModel(model) {
41
49
  this.model = model;
42
50
  }
@@ -166,9 +174,10 @@ var OllamaProvider = (_class = class {
166
174
  return this.handleStreamingResponse(response);
167
175
  }
168
176
  const data = await response.json();
177
+ const message = _nullishCoalesce(data.message, () => ( { role: "assistant", content: "" }));
169
178
  let toolCalls;
170
- if (data.message.tool_calls && Array.isArray(data.message.tool_calls)) {
171
- toolCalls = data.message.tool_calls.map((tc, index) => {
179
+ if (message.tool_calls && Array.isArray(message.tool_calls)) {
180
+ toolCalls = message.tool_calls.map((tc, index) => {
172
181
  let argumentsStr;
173
182
  try {
174
183
  argumentsStr = JSON.stringify(tc.function.arguments);
@@ -186,14 +195,14 @@ var OllamaProvider = (_class = class {
186
195
  };
187
196
  });
188
197
  }
189
- const usage = _chunkY5BDE24Pcjs.normalizeLLMUsage.call(void 0, {
198
+ const usage = _chunkGO6C2RARcjs.normalizeLLMUsage.call(void 0, {
190
199
  prompt_tokens: data.prompt_eval_count,
191
200
  completion_tokens: data.eval_count
192
201
  });
193
202
  return {
194
203
  id: `ollama-${Date.now()}`,
195
204
  created: Math.floor(new Date(data.created_at).getTime() / 1e3),
196
- content: data.message.content,
205
+ content: message.content,
197
206
  toolCalls,
198
207
  finishReason: _optionalChain([toolCalls, 'optionalAccess', _6 => _6.length]) ? "tool_calls" : "stop",
199
208
  usage,
@@ -402,7 +411,7 @@ ${content}`
402
411
  for (const line of lines) {
403
412
  try {
404
413
  const data = JSON.parse(line);
405
- fullContent += data.message.content;
414
+ fullContent += _nullishCoalesce(_optionalChain([data, 'access', _14 => _14.message, 'optionalAccess', _15 => _15.content]), () => ( ""));
406
415
  lastData = data;
407
416
  if (data.done) {
408
417
  streamEndedWithDone = true;
@@ -502,7 +511,7 @@ function decodeJwtPayload(token) {
502
511
  }
503
512
  function decodeJwtExpiry(token) {
504
513
  const payload = decodeJwtPayload(token);
505
- if (!_optionalChain([payload, 'optionalAccess', _14 => _14.exp])) return void 0;
514
+ if (!_optionalChain([payload, 'optionalAccess', _16 => _16.exp])) return void 0;
506
515
  return new Date(payload.exp * 1e3).toISOString();
507
516
  }
508
517
  function buildTokenBody(params) {
@@ -612,7 +621,7 @@ async function listenForOAuthCallback(expectedState) {
612
621
  res.statusCode = 400;
613
622
  res.setHeader("Content-Type", "text/html; charset=utf-8");
614
623
  res.end(callbackErrorHtml(errorDescription || error));
615
- _optionalChain([settle, 'optionalCall', _15 => _15({
624
+ _optionalChain([settle, 'optionalCall', _17 => _17({
616
625
  error,
617
626
  errorDescription: errorDescription || void 0
618
627
  })]);
@@ -623,7 +632,7 @@ async function listenForOAuthCallback(expectedState) {
623
632
  res.statusCode = 400;
624
633
  res.setHeader("Content-Type", "text/html; charset=utf-8");
625
634
  res.end(callbackErrorHtml("State mismatch."));
626
- _optionalChain([settle, 'optionalCall', _16 => _16({
635
+ _optionalChain([settle, 'optionalCall', _18 => _18({
627
636
  error: "state_mismatch",
628
637
  errorDescription: "State mismatch."
629
638
  })]);
@@ -634,7 +643,7 @@ async function listenForOAuthCallback(expectedState) {
634
643
  res.statusCode = 400;
635
644
  res.setHeader("Content-Type", "text/html; charset=utf-8");
636
645
  res.end(callbackErrorHtml("Missing authorization code."));
637
- _optionalChain([settle, 'optionalCall', _17 => _17({
646
+ _optionalChain([settle, 'optionalCall', _19 => _19({
638
647
  error: "missing_code",
639
648
  errorDescription: "Missing authorization code."
640
649
  })]);
@@ -643,19 +652,19 @@ async function listenForOAuthCallback(expectedState) {
643
652
  res.statusCode = 200;
644
653
  res.setHeader("Content-Type", "text/html; charset=utf-8");
645
654
  res.end(callbackSuccessHtml());
646
- _optionalChain([settle, 'optionalCall', _18 => _18({ code })]);
655
+ _optionalChain([settle, 'optionalCall', _20 => _20({ code })]);
647
656
  } catch (e9) {
648
657
  res.statusCode = 500;
649
658
  res.setHeader("Content-Type", "text/html; charset=utf-8");
650
659
  res.end(callbackErrorHtml("Internal error while handling the callback."));
651
- _optionalChain([settle, 'optionalCall', _19 => _19({
660
+ _optionalChain([settle, 'optionalCall', _21 => _21({
652
661
  error: "callback_error",
653
662
  errorDescription: "Internal error while handling the callback."
654
663
  })]);
655
664
  }
656
665
  });
657
666
  const timeoutId = setTimeout(() => {
658
- _optionalChain([settle, 'optionalCall', _20 => _20({
667
+ _optionalChain([settle, 'optionalCall', _22 => _22({
659
668
  error: "timeout",
660
669
  errorDescription: "OpenAI sign-in timed out. Finish the browser sign-in and try again."
661
670
  })]);
@@ -703,7 +712,7 @@ async function listenForOAuthCallback(expectedState) {
703
712
  }
704
713
  function extractChatGPTAccountId(token) {
705
714
  const payload = decodeJwtPayload(token);
706
- return _optionalChain([payload, 'optionalAccess', _21 => _21["https://api.openai.com/auth"], 'optionalAccess', _22 => _22.chatgpt_account_id]);
715
+ return _optionalChain([payload, 'optionalAccess', _23 => _23["https://api.openai.com/auth"], 'optionalAccess', _24 => _24.chatgpt_account_id]);
707
716
  }
708
717
  function isChatGPTAuthExpired(auth, leewayMs = 6e4) {
709
718
  if (!auth.expiresAt) return false;
@@ -727,7 +736,7 @@ async function authenticateOpenAIChatGPT(options = {}) {
727
736
  authorizeUrl.searchParams.set("codex_cli_simplified_flow", "true");
728
737
  authorizeUrl.searchParams.set("originator", OPENAI_BROWSER_OAUTH_ORIGINATOR);
729
738
  const browserOpened = await openBrowser(authorizeUrl.toString());
730
- await _optionalChain([options, 'access', _23 => _23.onPrompt, 'optionalCall', _24 => _24({
739
+ await _optionalChain([options, 'access', _25 => _25.onPrompt, 'optionalCall', _26 => _26({
731
740
  authorizationUrl: authorizeUrl.toString(),
732
741
  redirectUri: callback.redirectUri,
733
742
  browserOpened
@@ -871,7 +880,7 @@ var OpenAIProvider = class {
871
880
  }
872
881
  async isAvailable() {
873
882
  if (this.authMode === "chatgpt") {
874
- return !!_optionalChain([this, 'access', _25 => _25.chatgptAuth, 'optionalAccess', _26 => _26.accessToken]) && !!_optionalChain([this, 'access', _27 => _27.chatgptAuth, 'optionalAccess', _28 => _28.accountId]);
883
+ return !!_optionalChain([this, 'access', _27 => _27.chatgptAuth, 'optionalAccess', _28 => _28.accessToken]) && !!_optionalChain([this, 'access', _29 => _29.chatgptAuth, 'optionalAccess', _30 => _30.accountId]);
875
884
  }
876
885
  try {
877
886
  const headers = await this.buildAuthHeaders();
@@ -894,7 +903,7 @@ var OpenAIProvider = class {
894
903
  role: msg.role === "system" ? "system" : msg.role === "user" ? "user" : msg.role === "tool" ? "tool" : "assistant",
895
904
  content: this.toChatCompletionContent(msg.content)
896
905
  };
897
- if (msg.role === "assistant" && _optionalChain([msg, 'access', _29 => _29.tool_calls, 'optionalAccess', _30 => _30.length])) {
906
+ if (msg.role === "assistant" && _optionalChain([msg, 'access', _31 => _31.tool_calls, 'optionalAccess', _32 => _32.length])) {
898
907
  mapped.tool_calls = msg.tool_calls;
899
908
  }
900
909
  if (msg.role === "tool" && msg.tool_call_id) {
@@ -940,7 +949,7 @@ var OpenAIProvider = class {
940
949
  });
941
950
  } catch (error) {
942
951
  const err = error;
943
- if (err.name === "AbortError" && _optionalChain([request, 'access', _31 => _31.signal, 'optionalAccess', _32 => _32.aborted])) {
952
+ if (err.name === "AbortError" && _optionalChain([request, 'access', _33 => _33.signal, 'optionalAccess', _34 => _34.aborted])) {
944
953
  throw new (0, _chunk3OF56EMAcjs.ApiError)("Request cancelled.", "cancelled", 0, false);
945
954
  }
946
955
  if (err.name === "AbortError") {
@@ -975,7 +984,7 @@ var OpenAIProvider = class {
975
984
  }
976
985
  }));
977
986
  }
978
- const usage = _chunkY5BDE24Pcjs.normalizeLLMUsage.call(void 0, data.usage);
987
+ const usage = _chunkGO6C2RARcjs.normalizeLLMUsage.call(void 0, data.usage);
979
988
  return {
980
989
  id: data.id,
981
990
  created: data.created,
@@ -1035,7 +1044,7 @@ var OpenAIProvider = class {
1035
1044
  });
1036
1045
  } catch (error) {
1037
1046
  const err = error;
1038
- if (err.name === "AbortError" && _optionalChain([request, 'access', _33 => _33.signal, 'optionalAccess', _34 => _34.aborted])) {
1047
+ if (err.name === "AbortError" && _optionalChain([request, 'access', _35 => _35.signal, 'optionalAccess', _36 => _36.aborted])) {
1039
1048
  throw new (0, _chunk3OF56EMAcjs.ApiError)("Request cancelled.", "cancelled", 0, false);
1040
1049
  }
1041
1050
  if (err.name === "AbortError") {
@@ -1059,13 +1068,13 @@ var OpenAIProvider = class {
1059
1068
  const data = await this.parseCodexStream(response);
1060
1069
  const toolCalls = this.extractResponsesToolCalls(data.output);
1061
1070
  const content = this.extractResponsesContent(data);
1062
- const usage = _chunkY5BDE24Pcjs.normalizeLLMUsage.call(void 0, data.usage);
1071
+ const usage = _chunkGO6C2RARcjs.normalizeLLMUsage.call(void 0, data.usage);
1063
1072
  return {
1064
1073
  id: data.id,
1065
1074
  created: _nullishCoalesce(data.created_at, () => ( Math.floor(Date.now() / 1e3))),
1066
1075
  content,
1067
1076
  toolCalls,
1068
- finishReason: toolCalls.length > 0 ? "tool_calls" : _optionalChain([data, 'access', _35 => _35.incomplete_details, 'optionalAccess', _36 => _36.reason]) === "max_output_tokens" ? "length" : "stop",
1077
+ finishReason: toolCalls.length > 0 ? "tool_calls" : _optionalChain([data, 'access', _37 => _37.incomplete_details, 'optionalAccess', _38 => _38.reason]) === "max_output_tokens" ? "length" : "stop",
1069
1078
  usage,
1070
1079
  raw: data
1071
1080
  };
@@ -1074,8 +1083,8 @@ var OpenAIProvider = class {
1074
1083
  let errorDetail = "";
1075
1084
  try {
1076
1085
  const body = await response.json();
1077
- const errObj = _optionalChain([body, 'optionalAccess', _37 => _37.error]);
1078
- errorDetail = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([errObj, 'optionalAccess', _38 => _38.message]), () => ( _optionalChain([body, 'optionalAccess', _39 => _39.detail]))), () => ( _optionalChain([body, 'optionalAccess', _40 => _40.error]))), () => ( ""));
1086
+ const errObj = _optionalChain([body, 'optionalAccess', _39 => _39.error]);
1087
+ errorDetail = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([errObj, 'optionalAccess', _40 => _40.message]), () => ( _optionalChain([body, 'optionalAccess', _41 => _41.detail]))), () => ( _optionalChain([body, 'optionalAccess', _42 => _42.error]))), () => ( ""));
1079
1088
  if (typeof errorDetail === "object") {
1080
1089
  errorDetail = JSON.stringify(errorDetail);
1081
1090
  }
@@ -1185,7 +1194,7 @@ ${error.rawDetail}` : friendlyMessage,
1185
1194
  return;
1186
1195
  }
1187
1196
  const existing = outputItems.get(event.output_index);
1188
- if (_optionalChain([existing, 'optionalAccess', _41 => _41.type]) === "function_call" && event.item.type === "function_call") {
1197
+ if (_optionalChain([existing, 'optionalAccess', _43 => _43.type]) === "function_call" && event.item.type === "function_call") {
1189
1198
  outputItems.set(event.output_index, {
1190
1199
  ...existing,
1191
1200
  ...event.item,
@@ -1204,7 +1213,7 @@ ${error.rawDetail}` : friendlyMessage,
1204
1213
  return;
1205
1214
  }
1206
1215
  const existing = outputItems.get(event.output_index);
1207
- if (_optionalChain([existing, 'optionalAccess', _42 => _42.type]) === "function_call") {
1216
+ if (_optionalChain([existing, 'optionalAccess', _44 => _44.type]) === "function_call") {
1208
1217
  outputItems.set(event.output_index, {
1209
1218
  ...existing,
1210
1219
  name: event.name,
@@ -1228,7 +1237,7 @@ ${error.rawDetail}` : friendlyMessage,
1228
1237
  }
1229
1238
  async buildAuthHeaders() {
1230
1239
  if (this.authMode === "chatgpt") {
1231
- if (!_optionalChain([this, 'access', _43 => _43.chatgptAuth, 'optionalAccess', _44 => _44.accessToken]) || !this.chatgptAuth.accountId) {
1240
+ if (!_optionalChain([this, 'access', _45 => _45.chatgptAuth, 'optionalAccess', _46 => _46.accessToken]) || !this.chatgptAuth.accountId) {
1232
1241
  throw new (0, _chunk3OF56EMAcjs.ApiError)("ChatGPT authentication is missing. Please sign in again.", "auth_failed", 401, false);
1233
1242
  }
1234
1243
  if (isChatGPTAuthExpired(this.chatgptAuth)) {
@@ -1296,7 +1305,7 @@ ${error.rawDetail}` : friendlyMessage,
1296
1305
  const assistantToolCallIds = /* @__PURE__ */ new Set();
1297
1306
  const toolOutputIds = /* @__PURE__ */ new Set();
1298
1307
  for (const msg of messages) {
1299
- if (msg.role === "assistant" && _optionalChain([msg, 'access', _45 => _45.tool_calls, 'optionalAccess', _46 => _46.length])) {
1308
+ if (msg.role === "assistant" && _optionalChain([msg, 'access', _47 => _47.tool_calls, 'optionalAccess', _48 => _48.length])) {
1300
1309
  for (const toolCall of msg.tool_calls) {
1301
1310
  assistantToolCallIds.add(toolCall.id);
1302
1311
  }
@@ -1334,7 +1343,7 @@ ${error.rawDetail}` : friendlyMessage,
1334
1343
  content
1335
1344
  });
1336
1345
  }
1337
- if (msg.role === "assistant" && _optionalChain([msg, 'access', _47 => _47.tool_calls, 'optionalAccess', _48 => _48.length])) {
1346
+ if (msg.role === "assistant" && _optionalChain([msg, 'access', _49 => _49.tool_calls, 'optionalAccess', _50 => _50.length])) {
1338
1347
  for (const toolCall of msg.tool_calls) {
1339
1348
  if (!matchedToolCallIds.has(toolCall.id)) {
1340
1349
  continue;
@@ -1360,7 +1369,7 @@ ${error.rawDetail}` : friendlyMessage,
1360
1369
  if (!Array.isArray(output)) {
1361
1370
  return [];
1362
1371
  }
1363
- return output.filter((entry) => _optionalChain([entry, 'optionalAccess', _49 => _49.type]) === "function_call").map((toolCall, index) => ({
1372
+ return output.filter((entry) => _optionalChain([entry, 'optionalAccess', _51 => _51.type]) === "function_call").map((toolCall, index) => ({
1364
1373
  id: _nullishCoalesce(toolCall.call_id, () => ( `call_${index + 1}`)),
1365
1374
  type: "function",
1366
1375
  function: {
@@ -1386,11 +1395,11 @@ ${error.rawDetail}` : friendlyMessage,
1386
1395
  }
1387
1396
  const parts = [];
1388
1397
  for (const item of data.output) {
1389
- if (_optionalChain([item, 'optionalAccess', _50 => _50.type]) !== "message" || !Array.isArray(item.content)) {
1398
+ if (_optionalChain([item, 'optionalAccess', _52 => _52.type]) !== "message" || !Array.isArray(item.content)) {
1390
1399
  continue;
1391
1400
  }
1392
1401
  for (const contentItem of item.content) {
1393
- if (_optionalChain([contentItem, 'optionalAccess', _51 => _51.type]) === "output_text" && typeof contentItem.text === "string") {
1402
+ if (_optionalChain([contentItem, 'optionalAccess', _53 => _53.type]) === "output_text" && typeof contentItem.text === "string") {
1394
1403
  parts.push(contentItem.text);
1395
1404
  }
1396
1405
  }
@@ -1412,6 +1421,9 @@ var LlamaCppProvider = (_class2 = class _LlamaCppProvider {
1412
1421
  getName() {
1413
1422
  return "llamacpp";
1414
1423
  }
1424
+ getCapabilities() {
1425
+ return { nativeToolCalling: true };
1426
+ }
1415
1427
  setModel(model) {
1416
1428
  this.model = model;
1417
1429
  }
@@ -1422,7 +1434,7 @@ var LlamaCppProvider = (_class2 = class _LlamaCppProvider {
1422
1434
  return this.model ? [this.model] : [];
1423
1435
  }
1424
1436
  const data = await response.json();
1425
- return _nullishCoalesce(_optionalChain([data, 'access', _52 => _52.data, 'optionalAccess', _53 => _53.map, 'call', _54 => _54((m) => m.id)]), () => ( [this.model]));
1437
+ return _nullishCoalesce(_optionalChain([data, 'access', _54 => _54.data, 'optionalAccess', _55 => _55.map, 'call', _56 => _56((m) => m.id)]), () => ( [this.model]));
1426
1438
  } catch (e13) {
1427
1439
  return this.model ? [this.model] : [];
1428
1440
  }
@@ -1476,7 +1488,7 @@ var LlamaCppProvider = (_class2 = class _LlamaCppProvider {
1476
1488
  const data = await response.json();
1477
1489
  const choice = data.choices[0];
1478
1490
  let toolCalls;
1479
- if (_optionalChain([choice, 'optionalAccess', _55 => _55.message, 'access', _56 => _56.tool_calls, 'optionalAccess', _57 => _57.length])) {
1491
+ if (_optionalChain([choice, 'optionalAccess', _57 => _57.message, 'access', _58 => _58.tool_calls, 'optionalAccess', _59 => _59.length])) {
1480
1492
  toolCalls = choice.message.tool_calls.map((tc) => ({
1481
1493
  id: tc.id,
1482
1494
  type: "function",
@@ -1494,11 +1506,11 @@ var LlamaCppProvider = (_class2 = class _LlamaCppProvider {
1494
1506
  totalTokens: data.usage.total_tokens
1495
1507
  };
1496
1508
  }
1497
- const finishReason = _optionalChain([toolCalls, 'optionalAccess', _58 => _58.length]) ? "tool_calls" : _optionalChain([choice, 'optionalAccess', _59 => _59.finish_reason]) === "stop" || _optionalChain([choice, 'optionalAccess', _60 => _60.finish_reason]) === "length" || _optionalChain([choice, 'optionalAccess', _61 => _61.finish_reason]) === "content_filter" ? choice.finish_reason : "stop";
1509
+ const finishReason = _optionalChain([toolCalls, 'optionalAccess', _60 => _60.length]) ? "tool_calls" : _optionalChain([choice, 'optionalAccess', _61 => _61.finish_reason]) === "stop" || _optionalChain([choice, 'optionalAccess', _62 => _62.finish_reason]) === "length" || _optionalChain([choice, 'optionalAccess', _63 => _63.finish_reason]) === "content_filter" ? choice.finish_reason : "stop";
1498
1510
  return {
1499
1511
  id: data.id || `llamacpp-${Date.now()}`,
1500
1512
  created: data.created || Math.floor(Date.now() / 1e3),
1501
- content: _nullishCoalesce(_optionalChain([choice, 'optionalAccess', _62 => _62.message, 'access', _63 => _63.content]), () => ( "")),
1513
+ content: _nullishCoalesce(_optionalChain([choice, 'optionalAccess', _64 => _64.message, 'access', _65 => _65.content]), () => ( "")),
1502
1514
  toolCalls,
1503
1515
  finishReason,
1504
1516
  usage,
@@ -1583,13 +1595,13 @@ function getInputModalities(capability) {
1583
1595
  if (Array.isArray(capability.input_modalities)) {
1584
1596
  return capability.input_modalities;
1585
1597
  }
1586
- if (Array.isArray(_optionalChain([capability, 'access', _64 => _64.architecture, 'optionalAccess', _65 => _65.input_modalities]))) {
1598
+ if (Array.isArray(_optionalChain([capability, 'access', _66 => _66.architecture, 'optionalAccess', _67 => _67.input_modalities]))) {
1587
1599
  return capability.architecture.input_modalities;
1588
1600
  }
1589
1601
  return [];
1590
1602
  }
1591
1603
  function getOpenRouterCapabilityContextWindow(capability) {
1592
- const contextWindow = _nullishCoalesce(_optionalChain([capability, 'optionalAccess', _66 => _66.top_provider, 'optionalAccess', _67 => _67.context_length]), () => ( _optionalChain([capability, 'optionalAccess', _68 => _68.context_length])));
1604
+ const contextWindow = _nullishCoalesce(_optionalChain([capability, 'optionalAccess', _68 => _68.top_provider, 'optionalAccess', _69 => _69.context_length]), () => ( _optionalChain([capability, 'optionalAccess', _70 => _70.context_length])));
1593
1605
  return typeof contextWindow === "number" && Number.isFinite(contextWindow) && contextWindow > 0 ? Math.floor(contextWindow) : void 0;
1594
1606
  }
1595
1607
  async function getOpenRouterModelContextWindow(model) {
@@ -1625,7 +1637,7 @@ async function fetchOpenRouterModelCapabilities(forceRefresh = false) {
1625
1637
  throw new Error(`Failed to fetch model capabilities: ${response.status} ${response.statusText}`);
1626
1638
  }
1627
1639
  const data = await response.json();
1628
- const models = Array.isArray(_optionalChain([data, 'optionalAccess', _69 => _69.data])) ? data.data : [];
1640
+ const models = Array.isArray(_optionalChain([data, 'optionalAccess', _71 => _71.data])) ? data.data : [];
1629
1641
  cache = {
1630
1642
  models,
1631
1643
  fetchedAt: Date.now()
@@ -1721,7 +1733,7 @@ function sanitizeMessages(messages, allowImageInputs) {
1721
1733
  if (msg.role === "tool" && msg.tool_call_id) {
1722
1734
  sanitized.tool_call_id = msg.tool_call_id;
1723
1735
  }
1724
- if (msg.role === "assistant" && _optionalChain([msg, 'access', _70 => _70.tool_calls, 'optionalAccess', _71 => _71.length])) {
1736
+ if (msg.role === "assistant" && _optionalChain([msg, 'access', _72 => _72.tool_calls, 'optionalAccess', _73 => _73.length])) {
1725
1737
  sanitized.tool_calls = msg.tool_calls;
1726
1738
  }
1727
1739
  if (msg.name) {
@@ -1769,13 +1781,13 @@ var OpenRouterClient = class {
1769
1781
  this.apiKey = _nullishCoalesce(settings.apiKey, () => ( ""));
1770
1782
  this.baseUrl = _nullishCoalesce(settings.baseUrl, () => ( DEFAULT_BASE_URL));
1771
1783
  this.defaultModel = settings.model;
1772
- const configuredRetries = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _72 => _72.maxRetries]), () => ( DEFAULT_MAX_RETRIES2));
1784
+ const configuredRetries = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _74 => _74.maxRetries]), () => ( DEFAULT_MAX_RETRIES2));
1773
1785
  this.maxRetries = Math.min(
1774
1786
  Math.max(0, configuredRetries),
1775
1787
  MAX_ALLOWED_RETRIES2
1776
1788
  );
1777
- this.retryDelay = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _73 => _73.retryDelay]), () => ( DEFAULT_RETRY_DELAY2));
1778
- this.timeout = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _74 => _74.timeout]), () => ( DEFAULT_TIMEOUT2));
1789
+ this.retryDelay = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _75 => _75.retryDelay]), () => ( DEFAULT_RETRY_DELAY2));
1790
+ this.timeout = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _76 => _76.timeout]), () => ( DEFAULT_TIMEOUT2));
1779
1791
  }
1780
1792
  setDefaultModel(model) {
1781
1793
  this.defaultModel = model;
@@ -1893,7 +1905,7 @@ var OpenRouterClient = class {
1893
1905
  }
1894
1906
  } catch (error) {
1895
1907
  const err = error;
1896
- if (err.name === "AbortError" && _optionalChain([signal, 'optionalAccess', _75 => _75.aborted])) {
1908
+ if (err.name === "AbortError" && _optionalChain([signal, 'optionalAccess', _77 => _77.aborted])) {
1897
1909
  throw new (0, _chunk3OF56EMAcjs.ApiError)("Request cancelled.", "cancelled", 0, false);
1898
1910
  }
1899
1911
  if (err.name === "AbortError") {
@@ -1915,24 +1927,24 @@ var OpenRouterClient = class {
1915
1927
  throw await this.buildApiError(response);
1916
1928
  }
1917
1929
  const json = await response.json();
1918
- const message = _optionalChain([json, 'optionalAccess', _76 => _76.choices, 'optionalAccess', _77 => _77[0], 'optionalAccess', _78 => _78.message]);
1919
- const text = _nullishCoalesce(_optionalChain([message, 'optionalAccess', _79 => _79.content]), () => ( ""));
1920
- const finishReason = _optionalChain([json, 'optionalAccess', _80 => _80.choices, 'optionalAccess', _81 => _81[0], 'optionalAccess', _82 => _82.finish_reason]);
1930
+ const message = _optionalChain([json, 'optionalAccess', _78 => _78.choices, 'optionalAccess', _79 => _79[0], 'optionalAccess', _80 => _80.message]);
1931
+ const text = _nullishCoalesce(_optionalChain([message, 'optionalAccess', _81 => _81.content]), () => ( ""));
1932
+ const finishReason = _optionalChain([json, 'optionalAccess', _82 => _82.choices, 'optionalAccess', _83 => _83[0], 'optionalAccess', _84 => _84.finish_reason]);
1921
1933
  let toolCalls;
1922
- if (_optionalChain([message, 'optionalAccess', _83 => _83.tool_calls]) && Array.isArray(message.tool_calls)) {
1934
+ if (_optionalChain([message, 'optionalAccess', _85 => _85.tool_calls]) && Array.isArray(message.tool_calls)) {
1923
1935
  toolCalls = message.tool_calls.map((tc) => {
1924
- const rawArgs = _optionalChain([tc, 'access', _84 => _84.function, 'optionalAccess', _85 => _85.arguments]);
1936
+ const rawArgs = _optionalChain([tc, 'access', _86 => _86.function, 'optionalAccess', _87 => _87.arguments]);
1925
1937
  return {
1926
1938
  id: tc.id,
1927
1939
  type: "function",
1928
1940
  function: {
1929
- name: _nullishCoalesce(_optionalChain([tc, 'access', _86 => _86.function, 'optionalAccess', _87 => _87.name]), () => ( "")),
1941
+ name: _nullishCoalesce(_optionalChain([tc, 'access', _88 => _88.function, 'optionalAccess', _89 => _89.name]), () => ( "")),
1930
1942
  arguments: _nullishCoalesce(rawArgs, () => ( "{}"))
1931
1943
  }
1932
1944
  };
1933
1945
  });
1934
1946
  }
1935
- const usage = _chunkY5BDE24Pcjs.normalizeLLMUsage.call(void 0, _optionalChain([json, 'optionalAccess', _88 => _88.usage]));
1947
+ const usage = _chunkGO6C2RARcjs.normalizeLLMUsage.call(void 0, _optionalChain([json, 'optionalAccess', _90 => _90.usage]));
1936
1948
  return {
1937
1949
  id: _nullishCoalesce(json.id, () => ( "autohand-local")),
1938
1950
  created: _nullishCoalesce(json.created, () => ( Date.now())),
@@ -1948,7 +1960,7 @@ var OpenRouterClient = class {
1948
1960
  let errorDetail = "";
1949
1961
  try {
1950
1962
  const body = await response.json();
1951
- errorDetail = _optionalChain([body, 'optionalAccess', _89 => _89.error, 'optionalAccess', _90 => _90.message]) || _optionalChain([body, 'optionalAccess', _91 => _91.error]) || _optionalChain([body, 'optionalAccess', _92 => _92.message]) || "";
1963
+ errorDetail = _optionalChain([body, 'optionalAccess', _91 => _91.error, 'optionalAccess', _92 => _92.message]) || _optionalChain([body, 'optionalAccess', _93 => _93.error]) || _optionalChain([body, 'optionalAccess', _94 => _94.message]) || "";
1952
1964
  if (typeof errorDetail === "object") {
1953
1965
  errorDetail = JSON.stringify(errorDetail);
1954
1966
  }
@@ -1993,6 +2005,9 @@ var OpenRouterProvider = class {
1993
2005
  getName() {
1994
2006
  return "openrouter";
1995
2007
  }
2008
+ getCapabilities() {
2009
+ return { nativeToolCalling: true };
2010
+ }
1996
2011
  setModel(model) {
1997
2012
  this.model = model;
1998
2013
  this.client.setDefaultModel(model);
@@ -2047,14 +2062,17 @@ var MLXProvider = class {
2047
2062
  const port = config.port || 8080;
2048
2063
  this.baseUrl = config.baseUrl || `http://localhost:${port}`;
2049
2064
  this.model = config.model || "mlx-model";
2050
- const configuredRetries = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _93 => _93.maxRetries]), () => ( DEFAULT_MAX_RETRIES3));
2065
+ const configuredRetries = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _95 => _95.maxRetries]), () => ( DEFAULT_MAX_RETRIES3));
2051
2066
  this.maxRetries = Math.min(Math.max(0, configuredRetries), MAX_ALLOWED_RETRIES3);
2052
- this.retryDelay = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _94 => _94.retryDelay]), () => ( DEFAULT_RETRY_DELAY3));
2053
- this.timeout = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _95 => _95.timeout]), () => ( DEFAULT_TIMEOUT3));
2067
+ this.retryDelay = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _96 => _96.retryDelay]), () => ( DEFAULT_RETRY_DELAY3));
2068
+ this.timeout = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _97 => _97.timeout]), () => ( DEFAULT_TIMEOUT3));
2054
2069
  }
2055
2070
  getName() {
2056
2071
  return "mlx";
2057
2072
  }
2073
+ getCapabilities() {
2074
+ return { nativeToolCalling: true };
2075
+ }
2058
2076
  setModel(model) {
2059
2077
  this.model = model;
2060
2078
  }
@@ -2073,7 +2091,7 @@ var MLXProvider = class {
2073
2091
  return this.model ? [this.model] : [];
2074
2092
  }
2075
2093
  const data = await response.json();
2076
- return _nullishCoalesce(_optionalChain([data, 'access', _96 => _96.data, 'optionalAccess', _97 => _97.map, 'call', _98 => _98((m) => m.id)]), () => ( (this.model ? [this.model] : [])));
2094
+ return _nullishCoalesce(_optionalChain([data, 'access', _98 => _98.data, 'optionalAccess', _99 => _99.map, 'call', _100 => _100((m) => m.id)]), () => ( (this.model ? [this.model] : [])));
2077
2095
  } finally {
2078
2096
  clearTimeout(timerId);
2079
2097
  }
@@ -2172,7 +2190,7 @@ var MLXProvider = class {
2172
2190
  }
2173
2191
  } catch (error) {
2174
2192
  const err = error;
2175
- if (err.name === "AbortError" && _optionalChain([userSignal, 'optionalAccess', _99 => _99.aborted])) {
2193
+ if (err.name === "AbortError" && _optionalChain([userSignal, 'optionalAccess', _101 => _101.aborted])) {
2176
2194
  throw new (0, _chunk3OF56EMAcjs.ApiError)("Request cancelled.", "cancelled", 0, false);
2177
2195
  }
2178
2196
  if (err.name === "AbortError") {
@@ -2211,7 +2229,7 @@ var MLXProvider = class {
2211
2229
  }
2212
2230
  const choice = data.choices[0];
2213
2231
  let toolCalls;
2214
- if (_optionalChain([choice, 'optionalAccess', _100 => _100.message, 'access', _101 => _101.tool_calls, 'optionalAccess', _102 => _102.length])) {
2232
+ if (_optionalChain([choice, 'optionalAccess', _102 => _102.message, 'access', _103 => _103.tool_calls, 'optionalAccess', _104 => _104.length])) {
2215
2233
  toolCalls = choice.message.tool_calls.map((tc) => ({
2216
2234
  id: tc.id,
2217
2235
  type: "function",
@@ -2229,11 +2247,11 @@ var MLXProvider = class {
2229
2247
  totalTokens: data.usage.total_tokens
2230
2248
  };
2231
2249
  }
2232
- const finishReason = _optionalChain([toolCalls, 'optionalAccess', _103 => _103.length]) ? "tool_calls" : _optionalChain([choice, 'optionalAccess', _104 => _104.finish_reason]) === "stop" || _optionalChain([choice, 'optionalAccess', _105 => _105.finish_reason]) === "length" || _optionalChain([choice, 'optionalAccess', _106 => _106.finish_reason]) === "content_filter" ? choice.finish_reason : "stop";
2250
+ const finishReason = _optionalChain([toolCalls, 'optionalAccess', _105 => _105.length]) ? "tool_calls" : _optionalChain([choice, 'optionalAccess', _106 => _106.finish_reason]) === "stop" || _optionalChain([choice, 'optionalAccess', _107 => _107.finish_reason]) === "length" || _optionalChain([choice, 'optionalAccess', _108 => _108.finish_reason]) === "content_filter" ? choice.finish_reason : "stop";
2233
2251
  return {
2234
2252
  id: data.id || `mlx-${Date.now()}`,
2235
2253
  created: data.created || Math.floor(Date.now() / 1e3),
2236
- content: _nullishCoalesce(_optionalChain([choice, 'optionalAccess', _107 => _107.message, 'access', _108 => _108.content]), () => ( "")),
2254
+ content: _nullishCoalesce(_optionalChain([choice, 'optionalAccess', _109 => _109.message, 'access', _110 => _110.content]), () => ( "")),
2237
2255
  toolCalls,
2238
2256
  finishReason,
2239
2257
  usage,
@@ -2244,12 +2262,12 @@ var MLXProvider = class {
2244
2262
  let errorDetail = "";
2245
2263
  try {
2246
2264
  const body = await response.json();
2247
- const maybeError = _optionalChain([body, 'optionalAccess', _109 => _109.error]);
2265
+ const maybeError = _optionalChain([body, 'optionalAccess', _111 => _111.error]);
2248
2266
  if (maybeError && typeof maybeError === "object") {
2249
- errorDetail = _nullishCoalesce(_optionalChain([maybeError, 'optionalAccess', _110 => _110.message]), () => ( ""));
2267
+ errorDetail = _nullishCoalesce(_optionalChain([maybeError, 'optionalAccess', _112 => _112.message]), () => ( ""));
2250
2268
  } else if (typeof maybeError === "string") {
2251
2269
  errorDetail = maybeError;
2252
- } else if (typeof _optionalChain([body, 'optionalAccess', _111 => _111.message]) === "string") {
2270
+ } else if (typeof _optionalChain([body, 'optionalAccess', _113 => _113.message]) === "string") {
2253
2271
  errorDetail = body.message;
2254
2272
  }
2255
2273
  if (typeof errorDetail === "object") {
@@ -2287,7 +2305,24 @@ var MLXProvider = class {
2287
2305
 
2288
2306
  // src/providers/LLMGatewayClient.ts
2289
2307
  function sanitizeMessages2(messages) {
2290
- return messages.map((msg) => {
2308
+ const toolOutputIds = new Set(
2309
+ messages.filter((msg) => msg.role === "tool" && msg.tool_call_id).map((msg) => msg.tool_call_id)
2310
+ );
2311
+ const matchedToolCallIds = /* @__PURE__ */ new Set();
2312
+ for (const msg of messages) {
2313
+ if (msg.role !== "assistant" || !_optionalChain([msg, 'access', _114 => _114.tool_calls, 'optionalAccess', _115 => _115.length])) {
2314
+ continue;
2315
+ }
2316
+ for (const toolCall of msg.tool_calls) {
2317
+ if (toolOutputIds.has(toolCall.id)) {
2318
+ matchedToolCallIds.add(toolCall.id);
2319
+ }
2320
+ }
2321
+ }
2322
+ return messages.flatMap((msg) => {
2323
+ if (msg.role === "tool" && (!msg.tool_call_id || !matchedToolCallIds.has(msg.tool_call_id))) {
2324
+ return [];
2325
+ }
2291
2326
  const sanitized = {
2292
2327
  role: msg.role,
2293
2328
  content: msg.content
@@ -2295,13 +2330,18 @@ function sanitizeMessages2(messages) {
2295
2330
  if (msg.role === "tool" && msg.tool_call_id) {
2296
2331
  sanitized.tool_call_id = msg.tool_call_id;
2297
2332
  }
2298
- if (msg.role === "assistant" && _optionalChain([msg, 'access', _112 => _112.tool_calls, 'optionalAccess', _113 => _113.length])) {
2299
- sanitized.tool_calls = msg.tool_calls;
2333
+ if (msg.role === "assistant" && _optionalChain([msg, 'access', _116 => _116.tool_calls, 'optionalAccess', _117 => _117.length])) {
2334
+ const matchedToolCalls = msg.tool_calls.filter((toolCall) => matchedToolCallIds.has(toolCall.id));
2335
+ if (matchedToolCalls.length > 0) {
2336
+ sanitized.tool_calls = matchedToolCalls;
2337
+ } else if (!msg.content) {
2338
+ return [];
2339
+ }
2300
2340
  }
2301
2341
  if (msg.name) {
2302
2342
  sanitized.name = msg.name;
2303
2343
  }
2304
- return sanitized;
2344
+ return [sanitized];
2305
2345
  });
2306
2346
  }
2307
2347
  var DEFAULT_BASE_URL2 = "https://api.llmgateway.io/v1";
@@ -2316,18 +2356,26 @@ var DEFAULT_ERROR_LABELS = {
2316
2356
  };
2317
2357
  function buildFriendlyErrors(labels) {
2318
2358
  return {
2319
- 400: "The request was malformed. This often happens when the context is too long. Try /undo to remove recent turns or /new to start fresh.",
2320
- 401: `Authentication failed. Please verify your ${labels.credentialName} in ~/.autohand/config.json.`,
2321
- 402: `Payment required. Please check your ${labels.accountName} balance or billing settings.`,
2322
- 403: `Access denied. Your ${labels.credentialName} may not have permission for this model.`,
2323
- 404: "The requested model was not found. Use /model to select a different one.",
2324
- 429: "Rate limit exceeded. Please wait a moment and try again, or choose a different model.",
2325
- 500: `The ${labels.serviceName} service encountered an internal error. Please try again later.`,
2326
- 502: `The ${labels.serviceName} service is temporarily unavailable. Please try again in a few moments.`,
2327
- 503: `The ${labels.serviceName} service is currently overloaded. Please try again later.`,
2328
- 504: `The request timed out. The ${labels.serviceName} service may be experiencing high load.`
2359
+ invalid_request: "The request was malformed and could not be processed.",
2360
+ context_overflow: "The conversation is too long for this model. Try /undo to remove recent turns or /new to start fresh.",
2361
+ model_not_found: "The requested model was not found. Use /model to select a different one.",
2362
+ auth_failed: `Authentication failed. Please verify your ${labels.credentialName} in ~/.autohand/config.json.`,
2363
+ payment_required: `Payment required. Please check your ${labels.accountName} balance or billing settings.`,
2364
+ access_denied: `Access denied. Your ${labels.credentialName} may not have permission for this model.`,
2365
+ rate_limited: "Rate limit exceeded. Please wait a moment and try again, or choose a different model.",
2366
+ server_error: `The ${labels.serviceName} service is temporarily unavailable. Please try again later.`,
2367
+ timeout: `The request timed out. The ${labels.serviceName} service may be experiencing high load.`
2329
2368
  };
2330
2369
  }
2370
+ function coerceErrorDetail(value) {
2371
+ if (typeof value === "string") {
2372
+ return value;
2373
+ }
2374
+ if (value && typeof value === "object") {
2375
+ return JSON.stringify(value);
2376
+ }
2377
+ return "";
2378
+ }
2331
2379
  var LLMGatewayClient = class {
2332
2380
 
2333
2381
 
@@ -2336,18 +2384,20 @@ var LLMGatewayClient = class {
2336
2384
 
2337
2385
 
2338
2386
 
2387
+
2339
2388
  constructor(settings, networkSettings, errorLabels = DEFAULT_ERROR_LABELS) {
2340
2389
  this.apiKey = _nullishCoalesce(settings.apiKey, () => ( ""));
2341
2390
  this.baseUrl = _nullishCoalesce(settings.baseUrl, () => ( DEFAULT_BASE_URL2));
2342
2391
  this.defaultModel = settings.model;
2392
+ this.reasoningEffort = settings.reasoningEffort;
2343
2393
  this.errorLabels = errorLabels;
2344
- const configuredRetries = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _114 => _114.maxRetries]), () => ( DEFAULT_MAX_RETRIES4));
2394
+ const configuredRetries = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _118 => _118.maxRetries]), () => ( DEFAULT_MAX_RETRIES4));
2345
2395
  this.maxRetries = Math.min(
2346
2396
  Math.max(0, configuredRetries),
2347
2397
  MAX_ALLOWED_RETRIES4
2348
2398
  );
2349
- this.retryDelay = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _115 => _115.retryDelay]), () => ( DEFAULT_RETRY_DELAY4));
2350
- this.timeout = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _116 => _116.timeout]), () => ( DEFAULT_TIMEOUT4));
2399
+ this.retryDelay = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _119 => _119.retryDelay]), () => ( DEFAULT_RETRY_DELAY4));
2400
+ this.timeout = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _120 => _120.timeout]), () => ( DEFAULT_TIMEOUT4));
2351
2401
  }
2352
2402
  setDefaultModel(model) {
2353
2403
  this.defaultModel = model;
@@ -2420,6 +2470,9 @@ var LLMGatewayClient = class {
2420
2470
  max_tokens: _nullishCoalesce(request.maxTokens, () => ( 16e3)),
2421
2471
  stream: _nullishCoalesce(request.stream, () => ( false))
2422
2472
  };
2473
+ if (this.reasoningEffort) {
2474
+ payload.reasoning_effort = this.reasoningEffort;
2475
+ }
2423
2476
  return payload;
2424
2477
  }
2425
2478
  buildChatTemplateKwargs(kwargs) {
@@ -2451,7 +2504,7 @@ var LLMGatewayClient = class {
2451
2504
  }
2452
2505
  } catch (error) {
2453
2506
  const err = error;
2454
- if (err.name === "AbortError" && _optionalChain([signal, 'optionalAccess', _117 => _117.aborted])) {
2507
+ if (err.name === "AbortError" && _optionalChain([signal, 'optionalAccess', _121 => _121.aborted])) {
2455
2508
  throw new Error("Request cancelled.");
2456
2509
  }
2457
2510
  if (err.name === "AbortError") {
@@ -2470,24 +2523,24 @@ var LLMGatewayClient = class {
2470
2523
  return this.handleStreamingResponse(response);
2471
2524
  }
2472
2525
  const json = await response.json();
2473
- const message = _optionalChain([json, 'optionalAccess', _118 => _118.choices, 'optionalAccess', _119 => _119[0], 'optionalAccess', _120 => _120.message]);
2474
- const text = _nullishCoalesce(_optionalChain([message, 'optionalAccess', _121 => _121.content]), () => ( ""));
2475
- const finishReason = _optionalChain([json, 'optionalAccess', _122 => _122.choices, 'optionalAccess', _123 => _123[0], 'optionalAccess', _124 => _124.finish_reason]);
2526
+ const message = _optionalChain([json, 'optionalAccess', _122 => _122.choices, 'optionalAccess', _123 => _123[0], 'optionalAccess', _124 => _124.message]);
2527
+ const text = _nullishCoalesce(_optionalChain([message, 'optionalAccess', _125 => _125.content]), () => ( ""));
2528
+ const finishReason = _optionalChain([json, 'optionalAccess', _126 => _126.choices, 'optionalAccess', _127 => _127[0], 'optionalAccess', _128 => _128.finish_reason]);
2476
2529
  let toolCalls;
2477
- if (_optionalChain([message, 'optionalAccess', _125 => _125.tool_calls]) && Array.isArray(message.tool_calls)) {
2530
+ if (_optionalChain([message, 'optionalAccess', _129 => _129.tool_calls]) && Array.isArray(message.tool_calls)) {
2478
2531
  toolCalls = message.tool_calls.map((tc) => {
2479
- const rawArgs = _optionalChain([tc, 'access', _126 => _126.function, 'optionalAccess', _127 => _127.arguments]);
2532
+ const rawArgs = _optionalChain([tc, 'access', _130 => _130.function, 'optionalAccess', _131 => _131.arguments]);
2480
2533
  return {
2481
2534
  id: tc.id,
2482
2535
  type: "function",
2483
2536
  function: {
2484
- name: _nullishCoalesce(_optionalChain([tc, 'access', _128 => _128.function, 'optionalAccess', _129 => _129.name]), () => ( "")),
2537
+ name: _nullishCoalesce(_optionalChain([tc, 'access', _132 => _132.function, 'optionalAccess', _133 => _133.name]), () => ( "")),
2485
2538
  arguments: _nullishCoalesce(rawArgs, () => ( "{}"))
2486
2539
  }
2487
2540
  };
2488
2541
  });
2489
2542
  }
2490
- const usage = _chunkY5BDE24Pcjs.normalizeLLMUsage.call(void 0, _optionalChain([json, 'optionalAccess', _130 => _130.usage]));
2543
+ const usage = _chunkGO6C2RARcjs.normalizeLLMUsage.call(void 0, _optionalChain([json, 'optionalAccess', _134 => _134.usage]));
2491
2544
  return {
2492
2545
  id: _nullishCoalesce(json.id, () => ( "llmgateway-response")),
2493
2546
  created: _nullishCoalesce(json.created, () => ( Date.now())),
@@ -2499,7 +2552,7 @@ var LLMGatewayClient = class {
2499
2552
  };
2500
2553
  }
2501
2554
  async handleStreamingResponse(response) {
2502
- const reader = _optionalChain([response, 'access', _131 => _131.body, 'optionalAccess', _132 => _132.getReader, 'call', _133 => _133()]);
2555
+ const reader = _optionalChain([response, 'access', _135 => _135.body, 'optionalAccess', _136 => _136.getReader, 'call', _137 => _137()]);
2503
2556
  if (!reader) {
2504
2557
  throw new Error("No response body for streaming");
2505
2558
  }
@@ -2521,7 +2574,7 @@ var LLMGatewayClient = class {
2521
2574
  try {
2522
2575
  const data = JSON.parse(dataStr);
2523
2576
  lastChunk = data;
2524
- const delta = _optionalChain([data, 'access', _134 => _134.choices, 'optionalAccess', _135 => _135[0], 'optionalAccess', _136 => _136.delta]);
2577
+ const delta = _optionalChain([data, 'access', _138 => _138.choices, 'optionalAccess', _139 => _139[0], 'optionalAccess', _140 => _140.delta]);
2525
2578
  if (!delta) continue;
2526
2579
  const reasoning = delta.reasoning || delta.reasoning_content;
2527
2580
  if (reasoning) {
@@ -2530,7 +2583,7 @@ var LLMGatewayClient = class {
2530
2583
  if (delta.content) {
2531
2584
  fullContent += delta.content;
2532
2585
  }
2533
- if (_optionalChain([data, 'access', _137 => _137.choices, 'optionalAccess', _138 => _138[0], 'optionalAccess', _139 => _139.finish_reason])) {
2586
+ if (_optionalChain([data, 'access', _141 => _141.choices, 'optionalAccess', _142 => _142[0], 'optionalAccess', _143 => _143.finish_reason])) {
2534
2587
  finishReason = data.choices[0].finish_reason;
2535
2588
  }
2536
2589
  } catch (e26) {
@@ -2545,8 +2598,8 @@ var LLMGatewayClient = class {
2545
2598
 
2546
2599
  ${fullContent}` : fullContent;
2547
2600
  return {
2548
- id: _nullishCoalesce(_optionalChain([lastChunk, 'optionalAccess', _140 => _140.id]), () => ( `llmgateway-stream-${Date.now()}`)),
2549
- created: _nullishCoalesce(_optionalChain([lastChunk, 'optionalAccess', _141 => _141.created]), () => ( Math.floor(Date.now() / 1e3))),
2601
+ id: _nullishCoalesce(_optionalChain([lastChunk, 'optionalAccess', _144 => _144.id]), () => ( `llmgateway-stream-${Date.now()}`)),
2602
+ created: _nullishCoalesce(_optionalChain([lastChunk, 'optionalAccess', _145 => _145.created]), () => ( Math.floor(Date.now() / 1e3))),
2550
2603
  content: finalContent,
2551
2604
  finishReason,
2552
2605
  raw: { content: fullContent, reasoning: fullReasoning, chunks: lastChunk }
@@ -2557,17 +2610,15 @@ ${fullContent}` : fullContent;
2557
2610
  let errorDetail = "";
2558
2611
  try {
2559
2612
  const body = await response.json();
2560
- errorDetail = _optionalChain([body, 'optionalAccess', _142 => _142.error, 'optionalAccess', _143 => _143.message]) || _optionalChain([body, 'optionalAccess', _144 => _144.error]) || _optionalChain([body, 'optionalAccess', _145 => _145.message]) || "";
2561
- if (typeof errorDetail === "object") {
2562
- errorDetail = JSON.stringify(errorDetail);
2563
- }
2613
+ errorDetail = coerceErrorDetail(_optionalChain([body, 'optionalAccess', _146 => _146.error, 'optionalAccess', _147 => _147.message]) || _optionalChain([body, 'optionalAccess', _148 => _148.error]) || _optionalChain([body, 'optionalAccess', _149 => _149.message]));
2564
2614
  } catch (e27) {
2565
2615
  try {
2566
2616
  errorDetail = await response.text();
2567
2617
  } catch (e28) {
2568
2618
  }
2569
2619
  }
2570
- const friendlyMessage = buildFriendlyErrors(this.errorLabels)[status];
2620
+ const classified = _chunk3OF56EMAcjs.classifyApiError.call(void 0, status, errorDetail, response.headers);
2621
+ const friendlyMessage = buildFriendlyErrors(this.errorLabels)[classified.code];
2571
2622
  if (friendlyMessage) {
2572
2623
  return errorDetail ? `${friendlyMessage}
2573
2624
  ${errorDetail}` : friendlyMessage;
@@ -2625,6 +2676,9 @@ var LLMGatewayProvider = class {
2625
2676
  getName() {
2626
2677
  return "llmgateway";
2627
2678
  }
2679
+ getCapabilities() {
2680
+ return { nativeToolCalling: true };
2681
+ }
2628
2682
  setModel(model) {
2629
2683
  this.model = model;
2630
2684
  this.client.setDefaultModel(model);
@@ -2755,7 +2809,7 @@ function sanitizeMessages3(messages) {
2755
2809
  if (msg.role === "tool" && msg.tool_call_id) {
2756
2810
  sanitized.tool_call_id = msg.tool_call_id;
2757
2811
  }
2758
- if (msg.role === "assistant" && _optionalChain([msg, 'access', _146 => _146.tool_calls, 'optionalAccess', _147 => _147.length])) {
2812
+ if (msg.role === "assistant" && _optionalChain([msg, 'access', _150 => _150.tool_calls, 'optionalAccess', _151 => _151.length])) {
2759
2813
  sanitized.tool_calls = msg.tool_calls;
2760
2814
  }
2761
2815
  if (msg.name) {
@@ -2792,13 +2846,13 @@ var AzureClient = class {
2792
2846
  this.options = options;
2793
2847
  this.tokenManager = new AzureTokenManager();
2794
2848
  this.defaultModel = options.model;
2795
- const configuredRetries = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _148 => _148.maxRetries]), () => ( DEFAULT_MAX_RETRIES5));
2849
+ const configuredRetries = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _152 => _152.maxRetries]), () => ( DEFAULT_MAX_RETRIES5));
2796
2850
  this.maxRetries = Math.min(
2797
2851
  Math.max(0, configuredRetries),
2798
2852
  MAX_ALLOWED_RETRIES5
2799
2853
  );
2800
- this.retryDelay = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _149 => _149.retryDelay]), () => ( DEFAULT_RETRY_DELAY5));
2801
- this.timeout = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _150 => _150.timeout]), () => ( DEFAULT_TIMEOUT5));
2854
+ this.retryDelay = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _153 => _153.retryDelay]), () => ( DEFAULT_RETRY_DELAY5));
2855
+ this.timeout = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _154 => _154.timeout]), () => ( DEFAULT_TIMEOUT5));
2802
2856
  }
2803
2857
  setDefaultModel(model) {
2804
2858
  this.defaultModel = model;
@@ -2926,7 +2980,7 @@ var AzureClient = class {
2926
2980
  }
2927
2981
  } catch (error) {
2928
2982
  const err = error;
2929
- if (err.name === "AbortError" && _optionalChain([signal, 'optionalAccess', _151 => _151.aborted])) {
2983
+ if (err.name === "AbortError" && _optionalChain([signal, 'optionalAccess', _155 => _155.aborted])) {
2930
2984
  throw new Error("Request cancelled.");
2931
2985
  }
2932
2986
  if (err.name === "AbortError") {
@@ -2942,24 +2996,24 @@ var AzureClient = class {
2942
2996
  throw new Error(await this.buildFriendlyError(response));
2943
2997
  }
2944
2998
  const json = await response.json();
2945
- const message = _optionalChain([json, 'optionalAccess', _152 => _152.choices, 'optionalAccess', _153 => _153[0], 'optionalAccess', _154 => _154.message]);
2946
- const text = _nullishCoalesce(_optionalChain([message, 'optionalAccess', _155 => _155.content]), () => ( ""));
2947
- const finishReason = _optionalChain([json, 'optionalAccess', _156 => _156.choices, 'optionalAccess', _157 => _157[0], 'optionalAccess', _158 => _158.finish_reason]);
2999
+ const message = _optionalChain([json, 'optionalAccess', _156 => _156.choices, 'optionalAccess', _157 => _157[0], 'optionalAccess', _158 => _158.message]);
3000
+ const text = _nullishCoalesce(_optionalChain([message, 'optionalAccess', _159 => _159.content]), () => ( ""));
3001
+ const finishReason = _optionalChain([json, 'optionalAccess', _160 => _160.choices, 'optionalAccess', _161 => _161[0], 'optionalAccess', _162 => _162.finish_reason]);
2948
3002
  let toolCalls;
2949
- if (_optionalChain([message, 'optionalAccess', _159 => _159.tool_calls]) && Array.isArray(message.tool_calls)) {
3003
+ if (_optionalChain([message, 'optionalAccess', _163 => _163.tool_calls]) && Array.isArray(message.tool_calls)) {
2950
3004
  toolCalls = message.tool_calls.map((tc) => {
2951
- const rawArgs = _optionalChain([tc, 'access', _160 => _160.function, 'optionalAccess', _161 => _161.arguments]);
3005
+ const rawArgs = _optionalChain([tc, 'access', _164 => _164.function, 'optionalAccess', _165 => _165.arguments]);
2952
3006
  return {
2953
3007
  id: tc.id,
2954
3008
  type: "function",
2955
3009
  function: {
2956
- name: _nullishCoalesce(_optionalChain([tc, 'access', _162 => _162.function, 'optionalAccess', _163 => _163.name]), () => ( "")),
3010
+ name: _nullishCoalesce(_optionalChain([tc, 'access', _166 => _166.function, 'optionalAccess', _167 => _167.name]), () => ( "")),
2957
3011
  arguments: _nullishCoalesce(rawArgs, () => ( "{}"))
2958
3012
  }
2959
3013
  };
2960
3014
  });
2961
3015
  }
2962
- const usage = _chunkY5BDE24Pcjs.normalizeLLMUsage.call(void 0, _optionalChain([json, 'optionalAccess', _164 => _164.usage]));
3016
+ const usage = _chunkGO6C2RARcjs.normalizeLLMUsage.call(void 0, _optionalChain([json, 'optionalAccess', _168 => _168.usage]));
2963
3017
  return {
2964
3018
  id: _nullishCoalesce(json.id, () => ( "autohand-azure")),
2965
3019
  created: _nullishCoalesce(json.created, () => ( Date.now())),
@@ -2975,7 +3029,7 @@ var AzureClient = class {
2975
3029
  let errorDetail = "";
2976
3030
  try {
2977
3031
  const body = await response.json();
2978
- errorDetail = _optionalChain([body, 'optionalAccess', _165 => _165.error, 'optionalAccess', _166 => _166.message]) || _optionalChain([body, 'optionalAccess', _167 => _167.error]) || _optionalChain([body, 'optionalAccess', _168 => _168.message]) || "";
3032
+ errorDetail = _optionalChain([body, 'optionalAccess', _169 => _169.error, 'optionalAccess', _170 => _170.message]) || _optionalChain([body, 'optionalAccess', _171 => _171.error]) || _optionalChain([body, 'optionalAccess', _172 => _172.message]) || "";
2979
3033
  if (typeof errorDetail === "object") {
2980
3034
  errorDetail = JSON.stringify(errorDetail);
2981
3035
  }
@@ -3057,6 +3111,9 @@ var AzureProvider = class {
3057
3111
  getName() {
3058
3112
  return "azure";
3059
3113
  }
3114
+ getCapabilities() {
3115
+ return { nativeToolCalling: true };
3116
+ }
3060
3117
  setModel(model) {
3061
3118
  this.model = model;
3062
3119
  this.client.setDefaultModel(model);
@@ -3075,6 +3132,8 @@ var AzureProvider = class {
3075
3132
  // src/providers/ZaiProvider.ts
3076
3133
  var ZAI_DEFAULT_BASE_URL = "https://api.z.ai/api/paas/v4";
3077
3134
  var ZAI_MODELS = [
3135
+ "glm-5.2",
3136
+ "glm-5.1",
3078
3137
  "glm-4.5",
3079
3138
  "glm-4.5v",
3080
3139
  "glm-4.5-air",
@@ -3101,6 +3160,9 @@ var ZaiProvider = class {
3101
3160
  getName() {
3102
3161
  return "zai";
3103
3162
  }
3163
+ getCapabilities() {
3164
+ return { nativeToolCalling: true };
3165
+ }
3104
3166
  setModel(model) {
3105
3167
  this.model = model;
3106
3168
  this.client.setDefaultModel(model);
@@ -3116,6 +3178,48 @@ var ZaiProvider = class {
3116
3178
  }
3117
3179
  };
3118
3180
 
3181
+ // src/providers/SakanaProvider.ts
3182
+ var SAKANA_DEFAULT_BASE_URL = "https://api.sakana.ai/v1";
3183
+ var SAKANA_MODELS = [
3184
+ "fugu",
3185
+ "fugu-ultra"
3186
+ ];
3187
+ var SakanaProvider = class {
3188
+
3189
+
3190
+ constructor(config, networkSettings) {
3191
+ const effectiveConfig = {
3192
+ ...config,
3193
+ baseUrl: _nullishCoalesce(config.baseUrl, () => ( SAKANA_DEFAULT_BASE_URL))
3194
+ };
3195
+ this.client = new LLMGatewayClient(effectiveConfig, networkSettings, {
3196
+ serviceName: "Sakana.AI",
3197
+ credentialName: "Sakana API key",
3198
+ accountName: "Sakana account"
3199
+ });
3200
+ this.model = config.model;
3201
+ }
3202
+ getName() {
3203
+ return "sakana";
3204
+ }
3205
+ getCapabilities() {
3206
+ return { nativeToolCalling: true };
3207
+ }
3208
+ setModel(model) {
3209
+ this.model = model;
3210
+ this.client.setDefaultModel(model);
3211
+ }
3212
+ async listModels() {
3213
+ return [...SAKANA_MODELS];
3214
+ }
3215
+ async isAvailable() {
3216
+ return true;
3217
+ }
3218
+ async complete(request) {
3219
+ return this.client.complete(request);
3220
+ }
3221
+ };
3222
+
3119
3223
  // src/utils/gcloudAuth.ts
3120
3224
  var _child_process = require('child_process');
3121
3225
  var _util = require('util');
@@ -3197,7 +3301,7 @@ function sanitizeMessages4(messages) {
3197
3301
  if (msg.role === "tool" && msg.tool_call_id) {
3198
3302
  sanitized.tool_call_id = msg.tool_call_id;
3199
3303
  }
3200
- if (msg.role === "assistant" && _optionalChain([msg, 'access', _169 => _169.tool_calls, 'optionalAccess', _170 => _170.length])) {
3304
+ if (msg.role === "assistant" && _optionalChain([msg, 'access', _173 => _173.tool_calls, 'optionalAccess', _174 => _174.length])) {
3201
3305
  sanitized.tool_calls = msg.tool_calls;
3202
3306
  }
3203
3307
  if (msg.name) {
@@ -3301,17 +3405,20 @@ var VertexAIProvider = class {
3301
3405
  this.defaultModel = settings.model;
3302
3406
  this.useGcloudRefresh = this.authToken.startsWith("ya29.") && this.authToken.length > 100;
3303
3407
  this.baseUrl = `https://${this.endpoint}/v1/projects/${this.projectId}/locations/${this.region}/endpoints/openapi`;
3304
- const configuredRetries = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _171 => _171.maxRetries]), () => ( DEFAULT_MAX_RETRIES6));
3408
+ const configuredRetries = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _175 => _175.maxRetries]), () => ( DEFAULT_MAX_RETRIES6));
3305
3409
  this.maxRetries = Math.min(
3306
3410
  Math.max(0, configuredRetries),
3307
3411
  MAX_ALLOWED_RETRIES6
3308
3412
  );
3309
- this.retryDelay = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _172 => _172.retryDelay]), () => ( DEFAULT_RETRY_DELAY6));
3310
- this.timeout = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _173 => _173.timeout]), () => ( DEFAULT_TIMEOUT6));
3413
+ this.retryDelay = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _176 => _176.retryDelay]), () => ( DEFAULT_RETRY_DELAY6));
3414
+ this.timeout = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _177 => _177.timeout]), () => ( DEFAULT_TIMEOUT6));
3311
3415
  }
3312
3416
  getName() {
3313
3417
  return "vertexai";
3314
3418
  }
3419
+ getCapabilities() {
3420
+ return { nativeToolCalling: true };
3421
+ }
3315
3422
  setModel(model) {
3316
3423
  this.defaultModel = model;
3317
3424
  }
@@ -3474,7 +3581,7 @@ var VertexAIProvider = class {
3474
3581
  }
3475
3582
  } catch (error) {
3476
3583
  const err = error;
3477
- if (err.name === "AbortError" && _optionalChain([signal, 'optionalAccess', _174 => _174.aborted])) {
3584
+ if (err.name === "AbortError" && _optionalChain([signal, 'optionalAccess', _178 => _178.aborted])) {
3478
3585
  throw new (0, _chunk3OF56EMAcjs.ApiError)("Request cancelled.", "cancelled", 0, false);
3479
3586
  }
3480
3587
  if (err.name === "AbortError") {
@@ -3495,24 +3602,24 @@ var VertexAIProvider = class {
3495
3602
  if (isAnthropic) {
3496
3603
  return this.parseAnthropicResponse(json);
3497
3604
  }
3498
- const message = _optionalChain([json, 'optionalAccess', _175 => _175.choices, 'optionalAccess', _176 => _176[0], 'optionalAccess', _177 => _177.message]);
3499
- const text = _nullishCoalesce(_optionalChain([message, 'optionalAccess', _178 => _178.content]), () => ( ""));
3500
- const finishReason = _optionalChain([json, 'optionalAccess', _179 => _179.choices, 'optionalAccess', _180 => _180[0], 'optionalAccess', _181 => _181.finish_reason]);
3605
+ const message = _optionalChain([json, 'optionalAccess', _179 => _179.choices, 'optionalAccess', _180 => _180[0], 'optionalAccess', _181 => _181.message]);
3606
+ const text = _nullishCoalesce(_optionalChain([message, 'optionalAccess', _182 => _182.content]), () => ( ""));
3607
+ const finishReason = _optionalChain([json, 'optionalAccess', _183 => _183.choices, 'optionalAccess', _184 => _184[0], 'optionalAccess', _185 => _185.finish_reason]);
3501
3608
  let toolCalls;
3502
- if (_optionalChain([message, 'optionalAccess', _182 => _182.tool_calls]) && Array.isArray(message.tool_calls)) {
3609
+ if (_optionalChain([message, 'optionalAccess', _186 => _186.tool_calls]) && Array.isArray(message.tool_calls)) {
3503
3610
  toolCalls = message.tool_calls.map((tc) => {
3504
- const rawArgs = _optionalChain([tc, 'access', _183 => _183.function, 'optionalAccess', _184 => _184.arguments]);
3611
+ const rawArgs = _optionalChain([tc, 'access', _187 => _187.function, 'optionalAccess', _188 => _188.arguments]);
3505
3612
  return {
3506
3613
  id: tc.id,
3507
3614
  type: "function",
3508
3615
  function: {
3509
- name: _nullishCoalesce(_optionalChain([tc, 'access', _185 => _185.function, 'optionalAccess', _186 => _186.name]), () => ( "")),
3616
+ name: _nullishCoalesce(_optionalChain([tc, 'access', _189 => _189.function, 'optionalAccess', _190 => _190.name]), () => ( "")),
3510
3617
  arguments: _nullishCoalesce(rawArgs, () => ( "{}"))
3511
3618
  }
3512
3619
  };
3513
3620
  });
3514
3621
  }
3515
- const usage = _chunkY5BDE24Pcjs.normalizeLLMUsage.call(void 0, _optionalChain([json, 'optionalAccess', _187 => _187.usage]));
3622
+ const usage = _chunkGO6C2RARcjs.normalizeLLMUsage.call(void 0, _optionalChain([json, 'optionalAccess', _191 => _191.usage]));
3516
3623
  return {
3517
3624
  id: _nullishCoalesce(json.id, () => ( "vertexai-response")),
3518
3625
  created: _nullishCoalesce(json.created, () => ( Date.now())),
@@ -3527,9 +3634,9 @@ var VertexAIProvider = class {
3527
3634
  * Parse Anthropic API response format
3528
3635
  */
3529
3636
  parseAnthropicResponse(json) {
3530
- const contentBlocks = _nullishCoalesce(_optionalChain([json, 'optionalAccess', _188 => _188.content]), () => ( []));
3637
+ const contentBlocks = _nullishCoalesce(_optionalChain([json, 'optionalAccess', _192 => _192.content]), () => ( []));
3531
3638
  const textBlock = contentBlocks.find((b) => b.type === "text");
3532
- const text = _nullishCoalesce(_optionalChain([textBlock, 'optionalAccess', _189 => _189.text]), () => ( ""));
3639
+ const text = _nullishCoalesce(_optionalChain([textBlock, 'optionalAccess', _193 => _193.text]), () => ( ""));
3533
3640
  let toolCalls;
3534
3641
  const toolUseBlocks = contentBlocks.filter((b) => b.type === "tool_use");
3535
3642
  if (toolUseBlocks.length > 0) {
@@ -3542,8 +3649,8 @@ var VertexAIProvider = class {
3542
3649
  }
3543
3650
  }));
3544
3651
  }
3545
- const usage = _chunkY5BDE24Pcjs.normalizeLLMUsage.call(void 0, _optionalChain([json, 'optionalAccess', _190 => _190.usage]));
3546
- const stopReason = _optionalChain([json, 'optionalAccess', _191 => _191.stop_reason]);
3652
+ const usage = _chunkGO6C2RARcjs.normalizeLLMUsage.call(void 0, _optionalChain([json, 'optionalAccess', _194 => _194.usage]));
3653
+ const stopReason = _optionalChain([json, 'optionalAccess', _195 => _195.stop_reason]);
3547
3654
  let finishReason;
3548
3655
  if (stopReason === "end_turn" || stopReason === "stop_sequence") {
3549
3656
  finishReason = "stop";
@@ -3567,7 +3674,7 @@ var VertexAIProvider = class {
3567
3674
  let errorDetail = "";
3568
3675
  try {
3569
3676
  const body = await response.json();
3570
- errorDetail = _optionalChain([body, 'optionalAccess', _192 => _192.error, 'optionalAccess', _193 => _193.message]) || _optionalChain([body, 'optionalAccess', _194 => _194.error]) || _optionalChain([body, 'optionalAccess', _195 => _195.message]) || "";
3677
+ errorDetail = _optionalChain([body, 'optionalAccess', _196 => _196.error, 'optionalAccess', _197 => _197.message]) || _optionalChain([body, 'optionalAccess', _198 => _198.error]) || _optionalChain([body, 'optionalAccess', _199 => _199.message]) || "";
3571
3678
  if (typeof errorDetail === "object") {
3572
3679
  errorDetail = JSON.stringify(errorDetail);
3573
3680
  }
@@ -3670,6 +3777,9 @@ var XAIProvider = class {
3670
3777
  getName() {
3671
3778
  return "xai";
3672
3779
  }
3780
+ getCapabilities() {
3781
+ return { nativeToolCalling: true };
3782
+ }
3673
3783
  setModel(model) {
3674
3784
  this.model = model;
3675
3785
  }
@@ -3683,7 +3793,7 @@ var XAIProvider = class {
3683
3793
  const response = await fetch(`${this.baseUrl}/language-models`, { headers });
3684
3794
  if (response.ok) {
3685
3795
  const data = await response.json();
3686
- if (_optionalChain([data, 'optionalAccess', _196 => _196.models]) && Array.isArray(data.models)) {
3796
+ if (_optionalChain([data, 'optionalAccess', _200 => _200.models]) && Array.isArray(data.models)) {
3687
3797
  const ids = /* @__PURE__ */ new Set();
3688
3798
  for (const m of data.models) {
3689
3799
  if (m.id) ids.add(m.id);
@@ -3742,7 +3852,7 @@ var XAIProvider = class {
3742
3852
  });
3743
3853
  } catch (error) {
3744
3854
  const err = error;
3745
- if (err.name === "AbortError" && _optionalChain([request, 'access', _197 => _197.signal, 'optionalAccess', _198 => _198.aborted])) {
3855
+ if (err.name === "AbortError" && _optionalChain([request, 'access', _201 => _201.signal, 'optionalAccess', _202 => _202.aborted])) {
3746
3856
  throw new (0, _chunk3OF56EMAcjs.ApiError)("Request cancelled.", "cancelled", 0, false);
3747
3857
  }
3748
3858
  if (err.name === "AbortError") {
@@ -3772,7 +3882,7 @@ var XAIProvider = class {
3772
3882
  created: _nullishCoalesce(data.created_at, () => ( Math.floor(Date.now() / 1e3))),
3773
3883
  content,
3774
3884
  toolCalls,
3775
- finishReason: toolCalls.length > 0 ? "tool_calls" : _optionalChain([data, 'access', _199 => _199.incomplete_details, 'optionalAccess', _200 => _200.reason]) === "max_output_tokens" ? "length" : "stop",
3885
+ finishReason: toolCalls.length > 0 ? "tool_calls" : _optionalChain([data, 'access', _203 => _203.incomplete_details, 'optionalAccess', _204 => _204.reason]) === "max_output_tokens" ? "length" : "stop",
3776
3886
  usage,
3777
3887
  raw: data
3778
3888
  };
@@ -3791,7 +3901,7 @@ var XAIProvider = class {
3791
3901
  // server-side tool we emit the server-side variant; everything else becomes a
3792
3902
  // standard `function` tool.
3793
3903
  mapToXAITools(tools) {
3794
- if (!_optionalChain([tools, 'optionalAccess', _201 => _201.length])) return [];
3904
+ if (!_optionalChain([tools, 'optionalAccess', _205 => _205.length])) return [];
3795
3905
  return tools.map((tool) => {
3796
3906
  const name = tool.name.toLowerCase();
3797
3907
  if (name === "web_search" || name === "x_search" || name === "code_execution" || name === "code_interpreter") {
@@ -3822,7 +3932,7 @@ var XAIProvider = class {
3822
3932
  });
3823
3933
  continue;
3824
3934
  }
3825
- if (msg.role === "assistant" && _optionalChain([msg, 'access', _202 => _202.tool_calls, 'optionalAccess', _203 => _203.length])) {
3935
+ if (msg.role === "assistant" && _optionalChain([msg, 'access', _206 => _206.tool_calls, 'optionalAccess', _207 => _207.length])) {
3826
3936
  items.push({
3827
3937
  type: "message",
3828
3938
  role: "assistant",
@@ -3851,7 +3961,7 @@ var XAIProvider = class {
3851
3961
  }
3852
3962
  extractXAIToolCalls(output) {
3853
3963
  if (!Array.isArray(output)) return [];
3854
- return output.filter((entry) => _optionalChain([entry, 'optionalAccess', _204 => _204.type]) === "function_call").map((toolCall, index) => ({
3964
+ return output.filter((entry) => _optionalChain([entry, 'optionalAccess', _208 => _208.type]) === "function_call").map((toolCall, index) => ({
3855
3965
  id: _nullishCoalesce(toolCall.call_id, () => ( `call_${index + 1}`)),
3856
3966
  type: "function",
3857
3967
  function: {
@@ -3867,9 +3977,9 @@ var XAIProvider = class {
3867
3977
  if (!Array.isArray(data.output)) return "";
3868
3978
  const parts = [];
3869
3979
  for (const item of data.output) {
3870
- if (_optionalChain([item, 'optionalAccess', _205 => _205.type]) !== "message" || !Array.isArray(item.content)) continue;
3980
+ if (_optionalChain([item, 'optionalAccess', _209 => _209.type]) !== "message" || !Array.isArray(item.content)) continue;
3871
3981
  for (const ci of item.content) {
3872
- if (_optionalChain([ci, 'optionalAccess', _206 => _206.type]) === "output_text" && typeof ci.text === "string") {
3982
+ if (_optionalChain([ci, 'optionalAccess', _210 => _210.type]) === "output_text" && typeof ci.text === "string") {
3873
3983
  parts.push(ci.text);
3874
3984
  }
3875
3985
  }
@@ -3877,7 +3987,7 @@ var XAIProvider = class {
3877
3987
  return parts.join("\n").trim();
3878
3988
  }
3879
3989
  mapXAIUsage(usage) {
3880
- return _chunkY5BDE24Pcjs.normalizeLLMUsage.call(void 0, usage);
3990
+ return _chunkGO6C2RARcjs.normalizeLLMUsage.call(void 0, usage);
3881
3991
  }
3882
3992
  async parseXAIStream(response) {
3883
3993
  const text = await response.text();
@@ -3907,8 +4017,8 @@ var XAIProvider = class {
3907
4017
  let errorDetail = "";
3908
4018
  try {
3909
4019
  const body = await response.json();
3910
- const errObj = _optionalChain([body, 'optionalAccess', _207 => _207.error]);
3911
- errorDetail = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([errObj, 'optionalAccess', _208 => _208.message]), () => ( _optionalChain([body, 'optionalAccess', _209 => _209.detail]))), () => ( _optionalChain([body, 'optionalAccess', _210 => _210.error]))), () => ( ""));
4020
+ const errObj = _optionalChain([body, 'optionalAccess', _211 => _211.error]);
4021
+ errorDetail = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([errObj, 'optionalAccess', _212 => _212.message]), () => ( _optionalChain([body, 'optionalAccess', _213 => _213.detail]))), () => ( _optionalChain([body, 'optionalAccess', _214 => _214.error]))), () => ( ""));
3912
4022
  if (typeof errorDetail === "object") {
3913
4023
  errorDetail = JSON.stringify(errorDetail);
3914
4024
  }
@@ -3932,7 +4042,7 @@ function sanitizeMessages5(messages) {
3932
4042
  if (msg.role === "tool" && msg.tool_call_id) {
3933
4043
  sanitized.tool_call_id = msg.tool_call_id;
3934
4044
  }
3935
- if (msg.role === "assistant" && _optionalChain([msg, 'access', _211 => _211.tool_calls, 'optionalAccess', _212 => _212.length])) {
4045
+ if (msg.role === "assistant" && _optionalChain([msg, 'access', _215 => _215.tool_calls, 'optionalAccess', _216 => _216.length])) {
3936
4046
  sanitized.tool_calls = msg.tool_calls;
3937
4047
  }
3938
4048
  if (msg.name) {
@@ -3970,11 +4080,11 @@ var CerebrasClient = class {
3970
4080
  this.baseUrl = _nullishCoalesce(settings.baseUrl, () => ( DEFAULT_BASE_URL3));
3971
4081
  this.defaultModel = settings.model;
3972
4082
  this.maxRetries = Math.min(
3973
- _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _213 => _213.maxRetries]), () => ( DEFAULT_MAX_RETRIES7)),
4083
+ _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _217 => _217.maxRetries]), () => ( DEFAULT_MAX_RETRIES7)),
3974
4084
  MAX_ALLOWED_RETRIES7
3975
4085
  );
3976
4086
  this.retryDelay = DEFAULT_RETRY_DELAY7;
3977
- this.timeout = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _214 => _214.timeout]), () => ( DEFAULT_TIMEOUT7));
4087
+ this.timeout = _nullishCoalesce(_optionalChain([networkSettings, 'optionalAccess', _218 => _218.timeout]), () => ( DEFAULT_TIMEOUT7));
3978
4088
  }
3979
4089
  setDefaultModel(model) {
3980
4090
  this.defaultModel = model;
@@ -4064,9 +4174,9 @@ var CerebrasClient = class {
4064
4174
  return this.handleStreamingResponse(response);
4065
4175
  }
4066
4176
  const data = await response.json();
4067
- const choice = _optionalChain([data, 'access', _215 => _215.choices, 'optionalAccess', _216 => _216[0]]);
4177
+ const choice = _optionalChain([data, 'access', _219 => _219.choices, 'optionalAccess', _220 => _220[0]]);
4068
4178
  let toolCalls;
4069
- if (_optionalChain([choice, 'optionalAccess', _217 => _217.message, 'optionalAccess', _218 => _218.tool_calls, 'optionalAccess', _219 => _219.length])) {
4179
+ if (_optionalChain([choice, 'optionalAccess', _221 => _221.message, 'optionalAccess', _222 => _222.tool_calls, 'optionalAccess', _223 => _223.length])) {
4070
4180
  toolCalls = choice.message.tool_calls.map((tc) => ({
4071
4181
  id: tc.id,
4072
4182
  type: tc.type,
@@ -4084,11 +4194,11 @@ var CerebrasClient = class {
4084
4194
  totalTokens: data.usage.total_tokens
4085
4195
  };
4086
4196
  }
4087
- const finishReason = _optionalChain([toolCalls, 'optionalAccess', _220 => _220.length]) ? "tool_calls" : _optionalChain([choice, 'optionalAccess', _221 => _221.finish_reason]) === "stop" || _optionalChain([choice, 'optionalAccess', _222 => _222.finish_reason]) === "length" || _optionalChain([choice, 'optionalAccess', _223 => _223.finish_reason]) === "content_filter" ? choice.finish_reason : "stop";
4197
+ const finishReason = _optionalChain([toolCalls, 'optionalAccess', _224 => _224.length]) ? "tool_calls" : _optionalChain([choice, 'optionalAccess', _225 => _225.finish_reason]) === "stop" || _optionalChain([choice, 'optionalAccess', _226 => _226.finish_reason]) === "length" || _optionalChain([choice, 'optionalAccess', _227 => _227.finish_reason]) === "content_filter" ? choice.finish_reason : "stop";
4088
4198
  return {
4089
4199
  id: data.id || `cerebras-${Date.now()}`,
4090
4200
  created: data.created || Math.floor(Date.now() / 1e3),
4091
- content: _nullishCoalesce(_optionalChain([choice, 'optionalAccess', _224 => _224.message, 'optionalAccess', _225 => _225.content]), () => ( "")),
4201
+ content: _nullishCoalesce(_optionalChain([choice, 'optionalAccess', _228 => _228.message, 'optionalAccess', _229 => _229.content]), () => ( "")),
4092
4202
  toolCalls,
4093
4203
  usage,
4094
4204
  finishReason,
@@ -4096,7 +4206,7 @@ var CerebrasClient = class {
4096
4206
  };
4097
4207
  }
4098
4208
  async handleStreamingResponse(response) {
4099
- const reader = _optionalChain([response, 'access', _226 => _226.body, 'optionalAccess', _227 => _227.getReader, 'call', _228 => _228()]);
4209
+ const reader = _optionalChain([response, 'access', _230 => _230.body, 'optionalAccess', _231 => _231.getReader, 'call', _232 => _232()]);
4100
4210
  if (!reader) {
4101
4211
  throw new Error("No response body available for streaming");
4102
4212
  }
@@ -4114,11 +4224,11 @@ var CerebrasClient = class {
4114
4224
  if (data === "[DONE]") continue;
4115
4225
  try {
4116
4226
  const parsed = JSON.parse(data);
4117
- const delta = _optionalChain([parsed, 'access', _229 => _229.choices, 'optionalAccess', _230 => _230[0], 'optionalAccess', _231 => _231.delta]);
4118
- if (_optionalChain([delta, 'optionalAccess', _232 => _232.content])) {
4227
+ const delta = _optionalChain([parsed, 'access', _233 => _233.choices, 'optionalAccess', _234 => _234[0], 'optionalAccess', _235 => _235.delta]);
4228
+ if (_optionalChain([delta, 'optionalAccess', _236 => _236.content])) {
4119
4229
  content += delta.content;
4120
4230
  }
4121
- if (_optionalChain([parsed, 'access', _233 => _233.choices, 'optionalAccess', _234 => _234[0], 'optionalAccess', _235 => _235.finish_reason])) {
4231
+ if (_optionalChain([parsed, 'access', _237 => _237.choices, 'optionalAccess', _238 => _238[0], 'optionalAccess', _239 => _239.finish_reason])) {
4122
4232
  finishReason = parsed.choices[0].finish_reason;
4123
4233
  }
4124
4234
  } catch (e43) {
@@ -4153,7 +4263,7 @@ var CerebrasClient = class {
4153
4263
  let errorDetail = "";
4154
4264
  try {
4155
4265
  const errorData = await response.json();
4156
- errorDetail = _optionalChain([errorData, 'access', _236 => _236.error, 'optionalAccess', _237 => _237.message]) || JSON.stringify(errorData);
4266
+ errorDetail = _optionalChain([errorData, 'access', _240 => _240.error, 'optionalAccess', _241 => _241.message]) || JSON.stringify(errorData);
4157
4267
  } catch (e44) {
4158
4268
  try {
4159
4269
  errorDetail = await response.text();
@@ -4190,6 +4300,9 @@ var CerebrasProvider = class {
4190
4300
  getName() {
4191
4301
  return "cerebras";
4192
4302
  }
4303
+ getCapabilities() {
4304
+ return { nativeToolCalling: true };
4305
+ }
4193
4306
  setModel(model) {
4194
4307
  this.model = model;
4195
4308
  this.client.setDefaultModel(model);
@@ -4231,6 +4344,9 @@ var DeepSeekProvider = class {
4231
4344
  getName() {
4232
4345
  return "deepseek";
4233
4346
  }
4347
+ getCapabilities() {
4348
+ return { nativeToolCalling: true };
4349
+ }
4234
4350
  setModel(model) {
4235
4351
  this.model = model;
4236
4352
  this.client.setDefaultModel(model);
@@ -4268,7 +4384,7 @@ var BEDROCK_MODELS = [
4268
4384
  "openai.gpt-oss-120b-1:0"
4269
4385
  ];
4270
4386
  function resolveBedrockRegion(region) {
4271
- return _optionalChain([region, 'optionalAccess', _238 => _238.trim, 'call', _239 => _239()]) || process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION || BEDROCK_DEFAULT_REGION;
4387
+ return _optionalChain([region, 'optionalAccess', _242 => _242.trim, 'call', _243 => _243()]) || process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION || BEDROCK_DEFAULT_REGION;
4272
4388
  }
4273
4389
  function getBedrockRuntimeEndpoint(region) {
4274
4390
  return `https://bedrock-runtime.${region}.amazonaws.com`;
@@ -4277,7 +4393,7 @@ function getBedrockOpenAIEndpoint(_mode, region) {
4277
4393
  return `${getBedrockRuntimeEndpoint(region)}/openai/v1`;
4278
4394
  }
4279
4395
  function resolveBedrockEndpoint(mode, region, configuredEndpoint) {
4280
- if (_optionalChain([configuredEndpoint, 'optionalAccess', _240 => _240.trim, 'call', _241 => _241()])) {
4396
+ if (_optionalChain([configuredEndpoint, 'optionalAccess', _244 => _244.trim, 'call', _245 => _245()])) {
4281
4397
  return configuredEndpoint.replace(/\/+$/, "");
4282
4398
  }
4283
4399
  if (mode === "converse") {
@@ -4328,7 +4444,7 @@ function toConverseMessage(message) {
4328
4444
  if (message.role === "assistant") {
4329
4445
  const content = [
4330
4446
  ...toTextContent(message.content),
4331
- ..._optionalChain([message, 'access', _242 => _242.tool_calls, 'optionalAccess', _243 => _243.length]) ? toToolUseBlocks(message.tool_calls) : []
4447
+ ..._optionalChain([message, 'access', _246 => _246.tool_calls, 'optionalAccess', _247 => _247.length]) ? toToolUseBlocks(message.tool_calls) : []
4332
4448
  ];
4333
4449
  return {
4334
4450
  role: "assistant",
@@ -4343,13 +4459,13 @@ function toConverseMessage(message) {
4343
4459
  function toOpenAIMessage(message) {
4344
4460
  const mapped = {
4345
4461
  role: message.role,
4346
- content: message.role === "assistant" && _optionalChain([message, 'access', _244 => _244.tool_calls, 'optionalAccess', _245 => _245.length]) ? message.content || null : message.content
4462
+ content: message.role === "assistant" && _optionalChain([message, 'access', _248 => _248.tool_calls, 'optionalAccess', _249 => _249.length]) ? message.content || null : message.content
4347
4463
  };
4348
4464
  if (message.name) mapped.name = message.name;
4349
4465
  if (message.role === "tool" && message.tool_call_id) {
4350
4466
  mapped.tool_call_id = message.tool_call_id;
4351
4467
  }
4352
- if (message.role === "assistant" && _optionalChain([message, 'access', _246 => _246.tool_calls, 'optionalAccess', _247 => _247.length])) {
4468
+ if (message.role === "assistant" && _optionalChain([message, 'access', _250 => _250.tool_calls, 'optionalAccess', _251 => _251.length])) {
4353
4469
  mapped.tool_calls = message.tool_calls;
4354
4470
  }
4355
4471
  return mapped;
@@ -4364,7 +4480,7 @@ function toResponsesInputItem(message) {
4364
4480
  }
4365
4481
  ];
4366
4482
  }
4367
- if (message.role === "assistant" && _optionalChain([message, 'access', _248 => _248.tool_calls, 'optionalAccess', _249 => _249.length])) {
4483
+ if (message.role === "assistant" && _optionalChain([message, 'access', _252 => _252.tool_calls, 'optionalAccess', _253 => _253.length])) {
4368
4484
  return message.tool_calls.map((toolCall) => ({
4369
4485
  type: "function_call",
4370
4486
  call_id: toolCall.id,
@@ -4449,7 +4565,7 @@ function classifyBedrockError(error) {
4449
4565
  if (error.name === "AbortError") {
4450
4566
  return new (0, _chunk3OF56EMAcjs.ApiError)("Request cancelled.", "cancelled", 0, false);
4451
4567
  }
4452
- const status = _nullishCoalesce(_optionalChain([error, 'access', _250 => _250["$metadata"], 'optionalAccess', _251 => _251.httpStatusCode]), () => ( 0));
4568
+ const status = _nullishCoalesce(_optionalChain([error, 'access', _254 => _254["$metadata"], 'optionalAccess', _255 => _255.httpStatusCode]), () => ( 0));
4453
4569
  const message = error.message || error.name;
4454
4570
  const lower = `${error.name} ${message}`.toLowerCase();
4455
4571
  let code;
@@ -4608,7 +4724,7 @@ var BedrockProvider = class {
4608
4724
  if (system.length > 0) {
4609
4725
  body.system = system;
4610
4726
  }
4611
- if (_optionalChain([request, 'access', _252 => _252.tools, 'optionalAccess', _253 => _253.length])) {
4727
+ if (_optionalChain([request, 'access', _256 => _256.tools, 'optionalAccess', _257 => _257.length])) {
4612
4728
  body.toolConfig = {
4613
4729
  tools: toConverseTools(request.tools),
4614
4730
  ...request.toolChoice && request.toolChoice !== "auto" ? { toolChoice: this.toConverseToolChoice(request.toolChoice) } : {}
@@ -4618,7 +4734,7 @@ var BedrockProvider = class {
4618
4734
  const data = await this.getRuntimeClient().send(
4619
4735
  new (0, _clientbedrockruntime.ConverseCommand)(body)
4620
4736
  );
4621
- const blocks = _nullishCoalesce(_optionalChain([data, 'access', _254 => _254.output, 'optionalAccess', _255 => _255.message, 'optionalAccess', _256 => _256.content]), () => ( []));
4737
+ const blocks = _nullishCoalesce(_optionalChain([data, 'access', _258 => _258.output, 'optionalAccess', _259 => _259.message, 'optionalAccess', _260 => _260.content]), () => ( []));
4622
4738
  const toolCalls = toolCallsFromConverseBlocks(blocks);
4623
4739
  return {
4624
4740
  id: `bedrock-${Date.now()}`,
@@ -4626,7 +4742,7 @@ var BedrockProvider = class {
4626
4742
  content: textFromConverseBlocks(blocks),
4627
4743
  ...toolCalls.length > 0 && { toolCalls },
4628
4744
  finishReason: normalizeStopReason(data.stopReason),
4629
- usage: _chunkY5BDE24Pcjs.normalizeLLMUsage.call(void 0, data.usage),
4745
+ usage: _chunkGO6C2RARcjs.normalizeLLMUsage.call(void 0, data.usage),
4630
4746
  raw: data
4631
4747
  };
4632
4748
  } catch (error) {
@@ -4668,13 +4784,13 @@ var BedrockProvider = class {
4668
4784
  ...request.temperature !== void 0 && { temperature: request.temperature },
4669
4785
  ...request.maxTokens !== void 0 && { max_tokens: request.maxTokens }
4670
4786
  };
4671
- if (_optionalChain([request, 'access', _257 => _257.tools, 'optionalAccess', _258 => _258.length])) {
4787
+ if (_optionalChain([request, 'access', _261 => _261.tools, 'optionalAccess', _262 => _262.length])) {
4672
4788
  body.tools = toOpenAITools(request.tools);
4673
4789
  if (request.toolChoice) body.tool_choice = request.toolChoice;
4674
4790
  }
4675
4791
  const data = await this.fetchJson("/chat/completions", body, request.signal);
4676
- const choice = _optionalChain([data, 'access', _259 => _259.choices, 'optionalAccess', _260 => _260[0]]);
4677
- if (!_optionalChain([choice, 'optionalAccess', _261 => _261.message])) {
4792
+ const choice = _optionalChain([data, 'access', _263 => _263.choices, 'optionalAccess', _264 => _264[0]]);
4793
+ if (!_optionalChain([choice, 'optionalAccess', _265 => _265.message])) {
4678
4794
  throw new (0, _chunk3OF56EMAcjs.ApiError)(
4679
4795
  "Malformed Bedrock OpenAI chat response: missing choice message.",
4680
4796
  "invalid_request",
@@ -4688,9 +4804,9 @@ var BedrockProvider = class {
4688
4804
  id: _nullishCoalesce(data.id, () => ( `bedrock-chat-${Date.now()}`)),
4689
4805
  created: _nullishCoalesce(data.created, () => ( Math.floor(Date.now() / 1e3))),
4690
4806
  content: _nullishCoalesce(choice.message.content, () => ( "")),
4691
- ..._optionalChain([choice, 'access', _262 => _262.message, 'access', _263 => _263.tool_calls, 'optionalAccess', _264 => _264.length]) && { toolCalls: choice.message.tool_calls },
4807
+ ..._optionalChain([choice, 'access', _266 => _266.message, 'access', _267 => _267.tool_calls, 'optionalAccess', _268 => _268.length]) && { toolCalls: choice.message.tool_calls },
4692
4808
  finishReason: normalizeStopReason(choice.finish_reason),
4693
- usage: _chunkY5BDE24Pcjs.normalizeLLMUsage.call(void 0, data.usage),
4809
+ usage: _chunkGO6C2RARcjs.normalizeLLMUsage.call(void 0, data.usage),
4694
4810
  raw: data
4695
4811
  };
4696
4812
  }
@@ -4702,7 +4818,7 @@ var BedrockProvider = class {
4702
4818
  ...instructions && { instructions },
4703
4819
  ...request.maxTokens !== void 0 && { max_output_tokens: request.maxTokens }
4704
4820
  };
4705
- if (_optionalChain([request, 'access', _265 => _265.tools, 'optionalAccess', _266 => _266.length])) {
4821
+ if (_optionalChain([request, 'access', _269 => _269.tools, 'optionalAccess', _270 => _270.length])) {
4706
4822
  body.tools = toResponsesTools(request.tools);
4707
4823
  if (request.toolChoice) body.tool_choice = request.toolChoice;
4708
4824
  }
@@ -4723,7 +4839,7 @@ var BedrockProvider = class {
4723
4839
  content: _nullishCoalesce(data.output_text, () => ( "")),
4724
4840
  ...functionCalls.length > 0 && { toolCalls: functionCalls },
4725
4841
  finishReason: functionCalls.length > 0 ? "tool_calls" : "stop",
4726
- usage: _chunkY5BDE24Pcjs.normalizeLLMUsage.call(void 0, data.usage),
4842
+ usage: _chunkGO6C2RARcjs.normalizeLLMUsage.call(void 0, data.usage),
4727
4843
  raw: data
4728
4844
  };
4729
4845
  }
@@ -4741,7 +4857,7 @@ var BedrockProvider = class {
4741
4857
  });
4742
4858
  } catch (error) {
4743
4859
  const err = error;
4744
- if (err.name === "AbortError" && _optionalChain([signal, 'optionalAccess', _267 => _267.aborted])) {
4860
+ if (err.name === "AbortError" && _optionalChain([signal, 'optionalAccess', _271 => _271.aborted])) {
4745
4861
  throw new (0, _chunk3OF56EMAcjs.ApiError)("Request cancelled.", "cancelled", 0, false);
4746
4862
  }
4747
4863
  if (err.name === "AbortError") {
@@ -4784,6 +4900,55 @@ ${classified.message}`,
4784
4900
  }
4785
4901
  };
4786
4902
 
4903
+ // src/providers/CustomOpenAICompatibleProvider.ts
4904
+ var CustomOpenAICompatibleProvider = class {
4905
+
4906
+
4907
+
4908
+
4909
+
4910
+
4911
+ constructor(config, networkSettings) {
4912
+ this.providerName = _chunkEK34UZPBcjs.toCustomProviderName.call(void 0, config.id);
4913
+ this.model = config.model;
4914
+ this.models = _nullishCoalesce(_optionalChain([config, 'access', _272 => _272.models, 'optionalAccess', _273 => _273.map, 'call', _274 => _274((entry) => entry.id)]), () => ( [config.model]));
4915
+ this.apiKeyRequired = config.apiKeyRequired !== false;
4916
+ this.apiKey = config.apiKey;
4917
+ this.client = new LLMGatewayClient(
4918
+ {
4919
+ apiKey: _nullishCoalesce(config.apiKey, () => ( "")),
4920
+ baseUrl: config.baseUrl,
4921
+ model: config.model
4922
+ },
4923
+ networkSettings,
4924
+ {
4925
+ serviceName: config.displayName,
4926
+ credentialName: `${config.displayName} API key`,
4927
+ accountName: `${config.displayName} account`
4928
+ }
4929
+ );
4930
+ }
4931
+ getName() {
4932
+ return this.providerName;
4933
+ }
4934
+ getCapabilities() {
4935
+ return { nativeToolCalling: true };
4936
+ }
4937
+ setModel(model) {
4938
+ this.model = model;
4939
+ this.client.setDefaultModel(model);
4940
+ }
4941
+ async listModels() {
4942
+ return this.models;
4943
+ }
4944
+ async isAvailable() {
4945
+ return !this.apiKeyRequired || Boolean(this.apiKey);
4946
+ }
4947
+ async complete(request) {
4948
+ return this.client.complete(request);
4949
+ }
4950
+ };
4951
+
4787
4952
  // src/providers/ProviderFactory.ts
4788
4953
  var ProviderNotConfiguredError = class extends Error {
4789
4954
  constructor(providerName) {
@@ -4821,7 +4986,14 @@ var ProviderFactory = class {
4821
4986
  */
4822
4987
  static create(config) {
4823
4988
  const providerName = config.provider || "openrouter";
4824
- if (providerName === "bedrock" && !_chunkHK5A54AVcjs.isAwsBedrockProviderEnabled.call(void 0, config)) {
4989
+ if (_chunkEK34UZPBcjs.isCustomProviderName.call(void 0, providerName)) {
4990
+ const customProvider = _chunkEK34UZPBcjs.getCustomProviderConfig.call(void 0, config, providerName);
4991
+ if (!customProvider || customProvider.apiFormat !== "openai-compatible") {
4992
+ return new UnconfiguredProvider(providerName);
4993
+ }
4994
+ return new CustomOpenAICompatibleProvider(customProvider, config.network);
4995
+ }
4996
+ if (providerName === "bedrock" && !_chunk7TO3PDMVcjs.isAwsBedrockProviderEnabled.call(void 0, config)) {
4825
4997
  return new UnconfiguredProvider("bedrock");
4826
4998
  }
4827
4999
  switch (providerName) {
@@ -4860,6 +5032,11 @@ var ProviderFactory = class {
4860
5032
  return new UnconfiguredProvider("zai");
4861
5033
  }
4862
5034
  return new ZaiProvider(config.zai, config.network);
5035
+ case "sakana":
5036
+ if (!config.sakana) {
5037
+ return new UnconfiguredProvider("sakana");
5038
+ }
5039
+ return new SakanaProvider(config.sakana, config.network);
4863
5040
  case "vertexai":
4864
5041
  if (!config.vertexai) {
4865
5042
  return new UnconfiguredProvider("vertexai");
@@ -4879,7 +5056,7 @@ var ProviderFactory = class {
4879
5056
  if (!config.nvidia) {
4880
5057
  return new UnconfiguredProvider("nvidia");
4881
5058
  }
4882
- return new (0, _chunkY5BDE24Pcjs.NVIDIAProvider)(config.nvidia, config.network);
5059
+ return new (0, _chunkGO6C2RARcjs.NVIDIAProvider)(config.nvidia, config.network);
4883
5060
  case "deepseek":
4884
5061
  if (!config.deepseek) {
4885
5062
  return new UnconfiguredProvider("deepseek");
@@ -4903,13 +5080,15 @@ var ProviderFactory = class {
4903
5080
  * MLX is only included on Apple Silicon (macOS + arm64).
4904
5081
  */
4905
5082
  static getProviderNames(config) {
4906
- const providers = ["zai", "xai", "vertexai", "nvidia", "openrouter", "openai", "ollama", "llmgateway", "llamacpp", "deepseek", "cerebras", "azure"];
4907
- if (_chunkHK5A54AVcjs.isAwsBedrockProviderEnabled.call(void 0, config)) {
5083
+ const providers = ["zai", "xai", "vertexai", "sakana", "nvidia", "openrouter", "openai", "ollama", "llmgateway", "llamacpp", "deepseek", "cerebras", "azure"];
5084
+ if (_chunk7TO3PDMVcjs.isAwsBedrockProviderEnabled.call(void 0, config)) {
4908
5085
  providers.splice(providers.indexOf("azure"), 0, "bedrock");
4909
5086
  }
4910
5087
  if (isMLXSupported()) {
4911
5088
  providers.push("mlx");
4912
5089
  }
5090
+ const customProviders = Object.values(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _275 => _275.customProviders]), () => ( {}))).filter((entry) => entry.disabled !== true).sort((a, b) => a.displayName.localeCompare(b.displayName)).map((entry) => _chunkEK34UZPBcjs.toCustomProviderName.call(void 0, entry.id));
5091
+ providers.push(...customProviders);
4913
5092
  return providers;
4914
5093
  }
4915
5094
  /**
@@ -4918,10 +5097,13 @@ var ProviderFactory = class {
4918
5097
  * MLX is always a valid provider name, but may not be available on non-Apple Silicon systems.
4919
5098
  */
4920
5099
  static isValidProvider(name, config) {
4921
- if (name === "bedrock" && !_chunkHK5A54AVcjs.isAwsBedrockProviderEnabled.call(void 0, config)) {
5100
+ if (_chunkEK34UZPBcjs.isCustomProviderName.call(void 0, name)) {
5101
+ return _chunkEK34UZPBcjs.getCustomProviderConfig.call(void 0, config, name) !== void 0;
5102
+ }
5103
+ if (name === "bedrock" && !_chunk7TO3PDMVcjs.isAwsBedrockProviderEnabled.call(void 0, config)) {
4922
5104
  return false;
4923
5105
  }
4924
- const allProviders = ["openrouter", "ollama", "openai", "llamacpp", "mlx", "llmgateway", "azure", "zai", "vertexai", "xai", "cerebras", "nvidia", "deepseek", "bedrock"];
5106
+ const allProviders = ["openrouter", "ollama", "openai", "llamacpp", "mlx", "llmgateway", "azure", "zai", "sakana", "vertexai", "xai", "cerebras", "nvidia", "deepseek", "bedrock"];
4925
5107
  return allProviders.includes(name);
4926
5108
  }
4927
5109
  };
@@ -4950,7 +5132,9 @@ var ProviderFactory = class {
4950
5132
 
4951
5133
 
4952
5134
 
4953
- exports.isChatGPTAuthExpired = isChatGPTAuthExpired; exports.authenticateOpenAIChatGPT = authenticateOpenAIChatGPT; exports.OPENAI_MODELS = OPENAI_MODELS; exports.getOpenRouterModelContextWindow = getOpenRouterModelContextWindow; exports.modelSupportsImages = modelSupportsImages; exports.ZAI_DEFAULT_BASE_URL = ZAI_DEFAULT_BASE_URL; exports.ZAI_MODELS = ZAI_MODELS; exports.isGcloudInstalled = isGcloudInstalled; exports.getGcloudProject = getGcloudProject; exports.getGcloudAccessToken = getGcloudAccessToken; exports.getGcloudAccount = getGcloudAccount; exports.VERTEX_AI_CODING_MODELS = VERTEX_AI_CODING_MODELS; exports.CEREBRAS_DEFAULT_BASE_URL = CEREBRAS_DEFAULT_BASE_URL; exports.CEREBRAS_MODELS = CEREBRAS_MODELS; exports.DEEPSEEK_DEFAULT_BASE_URL = DEEPSEEK_DEFAULT_BASE_URL; exports.DEEPSEEK_MODELS = DEEPSEEK_MODELS; exports.BEDROCK_DEFAULT_REGION = BEDROCK_DEFAULT_REGION; exports.BEDROCK_DEFAULT_MODEL = BEDROCK_DEFAULT_MODEL; exports.BEDROCK_MODELS = BEDROCK_MODELS; exports.resolveBedrockEndpoint = resolveBedrockEndpoint; exports.resolveBedrockAuthMode = resolveBedrockAuthMode; exports.ProviderNotConfiguredError = ProviderNotConfiguredError; exports.ProviderFactory = ProviderFactory;
5135
+
5136
+
5137
+ exports.isChatGPTAuthExpired = isChatGPTAuthExpired; exports.authenticateOpenAIChatGPT = authenticateOpenAIChatGPT; exports.OPENAI_MODELS = OPENAI_MODELS; exports.getOpenRouterModelContextWindow = getOpenRouterModelContextWindow; exports.modelSupportsImages = modelSupportsImages; exports.ZAI_DEFAULT_BASE_URL = ZAI_DEFAULT_BASE_URL; exports.ZAI_MODELS = ZAI_MODELS; exports.SAKANA_DEFAULT_BASE_URL = SAKANA_DEFAULT_BASE_URL; exports.SAKANA_MODELS = SAKANA_MODELS; exports.isGcloudInstalled = isGcloudInstalled; exports.getGcloudProject = getGcloudProject; exports.getGcloudAccessToken = getGcloudAccessToken; exports.getGcloudAccount = getGcloudAccount; exports.VERTEX_AI_CODING_MODELS = VERTEX_AI_CODING_MODELS; exports.CEREBRAS_DEFAULT_BASE_URL = CEREBRAS_DEFAULT_BASE_URL; exports.CEREBRAS_MODELS = CEREBRAS_MODELS; exports.DEEPSEEK_DEFAULT_BASE_URL = DEEPSEEK_DEFAULT_BASE_URL; exports.DEEPSEEK_MODELS = DEEPSEEK_MODELS; exports.BEDROCK_DEFAULT_REGION = BEDROCK_DEFAULT_REGION; exports.BEDROCK_DEFAULT_MODEL = BEDROCK_DEFAULT_MODEL; exports.BEDROCK_MODELS = BEDROCK_MODELS; exports.resolveBedrockEndpoint = resolveBedrockEndpoint; exports.resolveBedrockAuthMode = resolveBedrockAuthMode; exports.ProviderNotConfiguredError = ProviderNotConfiguredError; exports.ProviderFactory = ProviderFactory;
4954
5138
  /**
4955
5139
  * @license
4956
5140
  * Copyright 2025 Autohand AI LLC