clikcode 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/README.md +25 -14
  2. package/dist/chunk-23TDEBGZ.js +71 -0
  3. package/dist/chunk-25T3GVS7.js +425 -0
  4. package/dist/chunk-2BBELGHY.js +11 -0
  5. package/dist/chunk-2EOL5PZL.js +208 -0
  6. package/dist/chunk-2GAB36IE.js +26 -0
  7. package/dist/chunk-2OLS7V66.js +2440 -0
  8. package/dist/chunk-2QFO2URB.js +179 -0
  9. package/dist/chunk-2QWPQRSU.js +254 -0
  10. package/dist/chunk-2YPAPAR3.js +184 -0
  11. package/dist/chunk-2ZAG5372.js +33 -0
  12. package/dist/chunk-32IKAIZC.js +12507 -0
  13. package/dist/chunk-34AZEGYW.js +95 -0
  14. package/dist/chunk-34JQYQCA.js +175 -0
  15. package/dist/chunk-34ZISPAO.js +67 -0
  16. package/dist/chunk-3AAAARE6.js +46 -0
  17. package/dist/chunk-3AJ6Q3OY.js +510 -0
  18. package/dist/chunk-3B2CHX7M.js +884 -0
  19. package/dist/chunk-3BUFORRX.js +59 -0
  20. package/dist/chunk-3QLHYYFK.js +30 -0
  21. package/dist/chunk-3RXBMYKZ.js +140 -0
  22. package/dist/chunk-3TFNIJWS.js +52 -0
  23. package/dist/chunk-3W3IPDFP.js +119 -0
  24. package/dist/chunk-3WMS7SEE.js +417 -0
  25. package/dist/chunk-435ZNSZ3.js +23 -0
  26. package/dist/chunk-4AQ5NINV.js +39 -0
  27. package/dist/chunk-4GVEJ5FK.js +168 -0
  28. package/dist/chunk-4GXAO3UY.js +262 -0
  29. package/dist/chunk-4L2ZZM4Q.js +332 -0
  30. package/dist/chunk-4LPDG57B.js +17 -0
  31. package/dist/chunk-4NN3XQQT.js +223 -0
  32. package/dist/chunk-4QZEZME7.js +54 -0
  33. package/dist/chunk-4R6CSC3S.js +38 -0
  34. package/dist/chunk-4RHXTL3W.js +514 -0
  35. package/dist/chunk-4SJMPTVQ.js +18 -0
  36. package/dist/chunk-4VY7G6TX.js +114 -0
  37. package/dist/chunk-5642PBF7.js +124 -0
  38. package/dist/chunk-5B6TVO4A.js +33 -0
  39. package/dist/chunk-5BJLDUPL.js +62 -0
  40. package/dist/chunk-5HMFFJWU.js +19 -0
  41. package/dist/chunk-5IKLK33T.js +69 -0
  42. package/dist/chunk-5NQ5FFMX.js +44 -0
  43. package/dist/chunk-5QNNW5L6.js +176 -0
  44. package/dist/chunk-5SM5UAWN.js +239 -0
  45. package/dist/chunk-5WYJTA6O.js +74 -0
  46. package/dist/chunk-5ZSR2Y5T.js +227 -0
  47. package/dist/chunk-5ZWUM5GH.js +39 -0
  48. package/dist/chunk-64E7D4HY.js +364 -0
  49. package/dist/chunk-6CK466BC.js +99 -0
  50. package/dist/chunk-6ES45HHO.js +138 -0
  51. package/dist/chunk-6HYEZFGL.js +277 -0
  52. package/dist/chunk-6Y7HLXGW.js +29 -0
  53. package/dist/chunk-6YKK4FYR.js +258 -0
  54. package/dist/chunk-74WNMLMS.js +117 -0
  55. package/dist/chunk-7AULZ7OD.js +55 -0
  56. package/dist/chunk-7DOKGSUN.js +101 -0
  57. package/dist/chunk-7IH5LTIZ.js +195 -0
  58. package/dist/chunk-7ISTS5NS.js +21 -0
  59. package/dist/chunk-7NMUTGOW.js +527 -0
  60. package/dist/chunk-7PNHUZEL.js +153 -0
  61. package/dist/chunk-7TSQLONI.js +88 -0
  62. package/dist/chunk-AE7TOLD5.js +30 -0
  63. package/dist/chunk-AEMHSXKA.js +130 -0
  64. package/dist/chunk-AKRYTS2D.js +211 -0
  65. package/dist/chunk-AMNSE36L.js +59 -0
  66. package/dist/chunk-AZVD74ZV.js +23 -0
  67. package/dist/chunk-B35DVOTK.js +1981 -0
  68. package/dist/chunk-B4HNJRAH.js +626 -0
  69. package/dist/chunk-B5WYPPHS.js +13 -0
  70. package/dist/chunk-BBOVDXQM.js +59 -0
  71. package/dist/chunk-BD3ECZLK.js +62 -0
  72. package/dist/chunk-BDGSOT74.js +4578 -0
  73. package/dist/chunk-BF5VEOPK.js +31 -0
  74. package/dist/chunk-BFFRW4XH.js +47 -0
  75. package/dist/chunk-BFPC6PEW.js +208 -0
  76. package/dist/chunk-BGEMY2JJ.js +376 -0
  77. package/dist/chunk-BISGNHKD.js +35 -0
  78. package/dist/chunk-BMRAEBRY.js +21 -0
  79. package/dist/chunk-BNTXAZXW.js +127 -0
  80. package/dist/chunk-BOQBXGSN.js +75 -0
  81. package/dist/chunk-BTJDSTQP.js +213 -0
  82. package/dist/chunk-BUOPJQP5.js +218 -0
  83. package/dist/chunk-BXFJS65Q.js +52 -0
  84. package/dist/chunk-BXPQFSX5.js +59 -0
  85. package/dist/chunk-C57LIWNY.js +1269 -0
  86. package/dist/chunk-C6YVCCWR.js +74 -0
  87. package/dist/chunk-CAADDF6M.js +167 -0
  88. package/dist/chunk-CBANJFBO.js +69 -0
  89. package/dist/chunk-CERF3RIB.js +597 -0
  90. package/dist/chunk-COAS5ETR.js +46 -0
  91. package/dist/chunk-CQ7J6UQ7.js +78 -0
  92. package/dist/chunk-CRUVYGO2.js +26 -0
  93. package/dist/chunk-CVFVFRGN.js +58 -0
  94. package/dist/chunk-D2UK66HM.js +37 -0
  95. package/dist/chunk-D2W7SA4R.js +18 -0
  96. package/dist/chunk-DA44ZENT.js +501 -0
  97. package/dist/chunk-DAJ76TOC.js +99 -0
  98. package/dist/chunk-DCZ6CIUM.js +147 -0
  99. package/dist/chunk-DF35KMXM.js +1314 -0
  100. package/dist/chunk-DGASQT26.js +151 -0
  101. package/dist/chunk-DJT57C5P.js +55 -0
  102. package/dist/chunk-DKDPZTD3.js +44 -0
  103. package/dist/chunk-DQYVQ2N7.js +77 -0
  104. package/dist/chunk-DRTP2RTY.js +266 -0
  105. package/dist/chunk-DW2BMUKY.js +61 -0
  106. package/dist/chunk-DW5T5ZVU.js +307 -0
  107. package/dist/chunk-DXKNDNFC.js +164 -0
  108. package/dist/chunk-DZEQ7UYR.js +291 -0
  109. package/dist/chunk-E4F4OUAC.js +463 -0
  110. package/dist/chunk-EE4B6A7W.js +69 -0
  111. package/dist/chunk-EISKIYWG.js +23 -0
  112. package/dist/chunk-EKAQK7UQ.js +235 -0
  113. package/dist/chunk-EOBTJV32.js +123 -0
  114. package/dist/chunk-ESF3DIZY.js +325 -0
  115. package/dist/chunk-EVOHOZ4U.js +45 -0
  116. package/dist/chunk-EXN4KHLB.js +110 -0
  117. package/dist/chunk-F252T6Y3.js +78 -0
  118. package/dist/chunk-F3DP4ZA2.js +40 -0
  119. package/dist/chunk-F6F47QAY.js +58 -0
  120. package/dist/chunk-FA3Y23ZW.js +57 -0
  121. package/dist/chunk-FBKXE4EJ.js +640 -0
  122. package/dist/chunk-FCGEB3H6.js +23 -0
  123. package/dist/chunk-FF7ZVYJF.js +3732 -0
  124. package/dist/chunk-FFGKN6L3.js +39 -0
  125. package/dist/chunk-FFGU4GCC.js +94 -0
  126. package/dist/chunk-FSFDAOVP.js +74 -0
  127. package/dist/chunk-FT5TX7OX.js +1573 -0
  128. package/dist/chunk-G3QP67Z7.js +232 -0
  129. package/dist/chunk-G5ORJKV2.js +179 -0
  130. package/dist/chunk-GFNC62PE.js +111 -0
  131. package/dist/chunk-GGK43Q3N.js +67 -0
  132. package/dist/chunk-GGYKY4GF.js +11537 -0
  133. package/dist/chunk-GGYNHGNJ.js +55 -0
  134. package/dist/chunk-GLY7RM3C.js +354 -0
  135. package/dist/chunk-GQBZU6EO.js +20 -0
  136. package/dist/chunk-GSXENUZL.js +9 -0
  137. package/dist/chunk-GTOAT5D3.js +40 -0
  138. package/dist/chunk-GWCMDPQU.js +1007 -0
  139. package/dist/chunk-GXYSMYHJ.js +152 -0
  140. package/dist/chunk-GYMAI5NY.js +14 -0
  141. package/dist/chunk-H2VZMKPE.js +30 -0
  142. package/dist/chunk-H4THUNBM.js +2091 -0
  143. package/dist/chunk-HGRVSNUZ.js +361 -0
  144. package/dist/chunk-HI4VY473.js +27 -0
  145. package/dist/chunk-HOJRSD3Q.js +447 -0
  146. package/dist/chunk-HRX25W35.js +82 -0
  147. package/dist/chunk-HSE4AQYV.js +55 -0
  148. package/dist/chunk-HU5SSUFX.js +383 -0
  149. package/dist/chunk-I3GDBJLH.js +196 -0
  150. package/dist/chunk-I75EDU75.js +684 -0
  151. package/dist/chunk-IBA7DMIO.js +20 -0
  152. package/dist/chunk-IC6N4NZA.js +231 -0
  153. package/dist/chunk-IF43HIGV.js +284 -0
  154. package/dist/chunk-IGZ6C2MC.js +439 -0
  155. package/dist/chunk-IMLTL2MY.js +192 -0
  156. package/dist/chunk-IMZL6SGR.js +33 -0
  157. package/dist/chunk-IS4USJPY.js +516 -0
  158. package/dist/chunk-ISFSPN2F.js +82 -0
  159. package/dist/chunk-IXE7GTFI.js +55 -0
  160. package/dist/chunk-IZ77QJQG.js +36 -0
  161. package/dist/chunk-J2PACWRQ.js +34 -0
  162. package/dist/chunk-J6EGFVQX.js +180 -0
  163. package/dist/chunk-JEKOD43D.js +22 -0
  164. package/dist/chunk-JGIWATSG.js +30 -0
  165. package/dist/chunk-JYBONKD4.js +43 -0
  166. package/dist/chunk-K2NLG2HK.js +454 -0
  167. package/dist/chunk-KCQ4TBLS.js +164 -0
  168. package/dist/chunk-KD5KIVMS.js +176 -0
  169. package/dist/chunk-KHW6TX6I.js +63 -0
  170. package/dist/chunk-KI5GZFCE.js +520 -0
  171. package/dist/chunk-KN34B7NO.js +105 -0
  172. package/dist/chunk-KYUHIFP3.js +136 -0
  173. package/dist/chunk-KZL5VS4B.js +300 -0
  174. package/dist/chunk-L3VW3QIH.js +48 -0
  175. package/dist/chunk-LA6MG4ET.js +2110 -0
  176. package/dist/chunk-LAVFOA3S.js +66 -0
  177. package/dist/chunk-LB4OA77N.js +13 -0
  178. package/dist/chunk-LBFRF2K4.js +196 -0
  179. package/dist/chunk-LM6EIA4B.js +93 -0
  180. package/dist/chunk-LPCNRGJ7.js +692 -0
  181. package/dist/chunk-LSLNL5T3.js +168 -0
  182. package/dist/chunk-LVRRWP4W.js +568 -0
  183. package/dist/chunk-LWCFBRHL.js +33 -0
  184. package/dist/chunk-LXFTMGZZ.js +166 -0
  185. package/dist/chunk-M33LVA4M.js +151 -0
  186. package/dist/chunk-M3FO5UMK.js +4944 -0
  187. package/dist/chunk-M5QNDBAY.js +66 -0
  188. package/dist/chunk-M6ND6KBE.js +1291 -0
  189. package/dist/chunk-M7H3WQTE.js +76 -0
  190. package/dist/chunk-MCBRVPA7.js +191 -0
  191. package/dist/chunk-MCSDWZET.js +91 -0
  192. package/dist/chunk-MDT5XDXL.js +289 -0
  193. package/dist/chunk-MJG3IQY4.js +91 -0
  194. package/dist/chunk-MOU3N2UL.js +44 -0
  195. package/dist/chunk-MP4KZOQC.js +3451 -0
  196. package/dist/chunk-MPAJ446F.js +66 -0
  197. package/dist/chunk-MVJZZ6AL.js +16 -0
  198. package/dist/chunk-MXS6S2PY.js +253 -0
  199. package/dist/chunk-N3SFDYM7.js +291 -0
  200. package/dist/chunk-NAOX3JUB.js +13 -0
  201. package/dist/chunk-NEKKIBCX.js +283 -0
  202. package/dist/chunk-NKDATMEM.js +133 -0
  203. package/dist/chunk-NR4FMC4K.js +395 -0
  204. package/dist/chunk-NSOHOJBR.js +221 -0
  205. package/dist/chunk-NTDB6QKF.js +29 -0
  206. package/dist/chunk-NWEYRBWK.js +25 -0
  207. package/dist/chunk-O2YSNYWD.js +23 -0
  208. package/dist/chunk-O3EW7LAY.js +54 -0
  209. package/dist/chunk-O7BNJIXU.js +366 -0
  210. package/dist/chunk-OARL2NXZ.js +116 -0
  211. package/dist/chunk-OHKZUEJW.js +351 -0
  212. package/dist/chunk-OKU45BXA.js +647 -0
  213. package/dist/chunk-OL4JBD3J.js +59 -0
  214. package/dist/chunk-OLUO5DDR.js +192 -0
  215. package/dist/chunk-OQ245JLA.js +196 -0
  216. package/dist/chunk-P72UZAQI.js +289 -0
  217. package/dist/chunk-PAL2ENB6.js +20 -0
  218. package/dist/chunk-PAXYQZH7.js +53 -0
  219. package/dist/chunk-PDPEM5VW.js +51 -0
  220. package/dist/chunk-PEWCDI2C.js +668 -0
  221. package/dist/chunk-PGZ54EDX.js +27 -0
  222. package/dist/chunk-PRWVLDZF.js +73 -0
  223. package/dist/chunk-PSQQ75VJ.js +52 -0
  224. package/dist/chunk-PUOVIFHW.js +118 -0
  225. package/dist/chunk-PWBF2X3V.js +107 -0
  226. package/dist/chunk-PWXII6HF.js +43 -0
  227. package/dist/chunk-Q35VLJRT.js +80 -0
  228. package/dist/chunk-QJP7EYGL.js +128 -0
  229. package/dist/chunk-QPQKX2MK.js +8836 -0
  230. package/dist/chunk-QQRLPY25.js +1053 -0
  231. package/dist/chunk-QUS4ER2W.js +407 -0
  232. package/dist/chunk-QYHI3YET.js +29 -0
  233. package/dist/chunk-QYRU2UQI.js +32 -0
  234. package/dist/chunk-R6XVVQGC.js +13 -0
  235. package/dist/chunk-R7QN6ONS.js +483 -0
  236. package/dist/chunk-RD23MPGC.js +221 -0
  237. package/dist/chunk-RDDWQBEM.js +185 -0
  238. package/dist/chunk-RDLLDYFO.js +104 -0
  239. package/dist/chunk-RE4TGORR.js +84 -0
  240. package/dist/chunk-RJLHVYQY.js +217 -0
  241. package/dist/chunk-RJLPTWHW.js +905 -0
  242. package/dist/chunk-RKUVLRZI.js +295 -0
  243. package/dist/chunk-ROGXPGYR.js +37 -0
  244. package/dist/chunk-RSZGEL5U.js +163 -0
  245. package/dist/chunk-RVUOIJXN.js +909 -0
  246. package/dist/chunk-RW7F4JRP.js +11 -0
  247. package/dist/chunk-S4UO3AO3.js +53 -0
  248. package/dist/chunk-S5JAAF6S.js +585 -0
  249. package/dist/chunk-SNU37TQI.js +56 -0
  250. package/dist/chunk-SQVUDO2O.js +31 -0
  251. package/dist/chunk-SYVHIYQT.js +66 -0
  252. package/dist/chunk-SZBQMTG2.js +85 -0
  253. package/dist/chunk-T5VCXA3J.js +25 -0
  254. package/dist/chunk-TK6NSP56.js +30 -0
  255. package/dist/chunk-TKWVMA6L.js +22 -0
  256. package/dist/chunk-TQDKJHWX.js +59 -0
  257. package/dist/chunk-TQDM7S5N.js +127 -0
  258. package/dist/chunk-TULAXS77.js +23 -0
  259. package/dist/chunk-TVT45XNH.js +4625 -0
  260. package/dist/chunk-TWCVV2JO.js +467 -0
  261. package/dist/chunk-U4DKAD6S.js +47 -0
  262. package/dist/chunk-UA5K2BTI.js +564 -0
  263. package/dist/chunk-UAMKCMOK.js +40 -0
  264. package/dist/chunk-UBMVADBF.js +51 -0
  265. package/dist/chunk-UFQ5A5PW.js +645 -0
  266. package/dist/chunk-UOD2SOLL.js +1301 -0
  267. package/dist/chunk-UTSB4LOW.js +156 -0
  268. package/dist/chunk-UVXNIUTN.js +412 -0
  269. package/dist/chunk-UXVPXYPE.js +90 -0
  270. package/dist/chunk-UYEEMIWR.js +374 -0
  271. package/dist/chunk-VBGM5ZBW.js +54 -0
  272. package/dist/chunk-VEWPCZPG.js +762 -0
  273. package/dist/chunk-VIRDLZ5E.js +108 -0
  274. package/dist/chunk-VMPO7WKN.js +52 -0
  275. package/dist/chunk-W2NVSDO5.js +5122 -0
  276. package/dist/chunk-W3YYPBEA.js +176 -0
  277. package/dist/chunk-W5AYOICN.js +280 -0
  278. package/dist/chunk-W5GZOIUF.js +27 -0
  279. package/dist/chunk-WHKNLZ3C.js +76 -0
  280. package/dist/chunk-WKBEPPQ5.js +1409 -0
  281. package/dist/chunk-WM3Z6QKQ.js +151 -0
  282. package/dist/chunk-WMI2TPMA.js +31 -0
  283. package/dist/chunk-WNX5VD7S.js +150 -0
  284. package/dist/chunk-WOVTYST3.js +60 -0
  285. package/dist/chunk-WPB5WEZJ.js +546 -0
  286. package/dist/chunk-WUO5EOAT.js +44 -0
  287. package/dist/chunk-WWLJMP6D.js +133 -0
  288. package/dist/chunk-WZMLH3XP.js +58 -0
  289. package/dist/chunk-WZYVLUVQ.js +79 -0
  290. package/dist/chunk-X2OCPVU5.js +135 -0
  291. package/dist/chunk-X3CL6DTR.js +95 -0
  292. package/dist/chunk-X6WF7JEV.js +354 -0
  293. package/dist/chunk-XAHGBPWT.js +44 -0
  294. package/dist/chunk-XCKQ5BM2.js +228 -0
  295. package/dist/chunk-XIBYREEY.js +106 -0
  296. package/dist/chunk-XKW5NDMR.js +378 -0
  297. package/dist/chunk-XRDALAO3.js +100 -0
  298. package/dist/chunk-XUP22EAS.js +41 -0
  299. package/dist/chunk-XWAC3MKW.js +243 -0
  300. package/dist/chunk-Y3R7JMXB.js +59 -0
  301. package/dist/chunk-Y54LTP4W.js +82 -0
  302. package/dist/chunk-Y7UECI4M.js +99 -0
  303. package/dist/chunk-YACGDFHC.js +47 -0
  304. package/dist/chunk-YHNIQPKY.js +71 -0
  305. package/dist/chunk-YMBR6HYP.js +111 -0
  306. package/dist/chunk-YMCH3L2S.js +26 -0
  307. package/dist/chunk-Z4ZU6T7V.js +99 -0
  308. package/dist/chunk-ZDPF67ZZ.js +173 -0
  309. package/dist/chunk-ZFC2Q67K.js +101 -0
  310. package/dist/chunk-ZGHNNSCT.js +114 -0
  311. package/dist/chunk-ZGX3ERAT.js +173 -0
  312. package/dist/chunk-ZI3YHEBY.js +37 -0
  313. package/dist/chunk-ZN7G6JLS.js +639 -0
  314. package/dist/chunk-ZNPFQMXT.js +47 -0
  315. package/dist/chunk-ZOU3LV4U.js +63 -0
  316. package/dist/chunk-ZT7B4H2V.js +117 -0
  317. package/dist/chunk-ZZCBDNZI.js +58 -0
  318. package/dist/cli.js +494 -112923
  319. package/dist/computer-tools.js +36642 -21259
  320. package/dist/harness-catalog.cjs +88 -43
  321. package/dist/index.js +1 -1
  322. package/dist/local-model-supervisor.cjs +555 -0
  323. package/package.json +3 -4
@@ -0,0 +1,179 @@
1
+ import { createRequire as __clikcodeCreateRequire } from 'node:module';
2
+ const require = __clikcodeCreateRequire(import.meta.url);
3
+ import {
4
+ gatewayPickerRows,
5
+ interactiveHostedPicker,
6
+ interactiveModelPicker,
7
+ modelRow
8
+ } from "./chunk-S5JAAF6S.js";
9
+ import "./chunk-COAS5ETR.js";
10
+ import "./chunk-H4THUNBM.js";
11
+ import "./chunk-5642PBF7.js";
12
+ import "./chunk-OKU45BXA.js";
13
+ import "./chunk-EKAQK7UQ.js";
14
+ import "./chunk-32IKAIZC.js";
15
+ import "./chunk-Y3R7JMXB.js";
16
+ import "./chunk-E4F4OUAC.js";
17
+ import "./chunk-OHKZUEJW.js";
18
+ import "./chunk-M6ND6KBE.js";
19
+ import "./chunk-LM6EIA4B.js";
20
+ import "./chunk-WZMLH3XP.js";
21
+ import "./chunk-UVXNIUTN.js";
22
+ import "./chunk-RDLLDYFO.js";
23
+ import "./chunk-74WNMLMS.js";
24
+ import "./chunk-GLY7RM3C.js";
25
+ import "./chunk-M7H3WQTE.js";
26
+ import "./chunk-QPQKX2MK.js";
27
+ import "./chunk-X2OCPVU5.js";
28
+ import "./chunk-ROGXPGYR.js";
29
+ import "./chunk-T5VCXA3J.js";
30
+ import "./chunk-BTJDSTQP.js";
31
+ import "./chunk-W2NVSDO5.js";
32
+ import "./chunk-EXN4KHLB.js";
33
+ import "./chunk-BNTXAZXW.js";
34
+ import "./chunk-LAVFOA3S.js";
35
+ import "./chunk-2GAB36IE.js";
36
+ import "./chunk-WOVTYST3.js";
37
+ import "./chunk-3RXBMYKZ.js";
38
+ import "./chunk-34JQYQCA.js";
39
+ import "./chunk-JYBONKD4.js";
40
+ import "./chunk-MCSDWZET.js";
41
+ import "./chunk-BOQBXGSN.js";
42
+ import "./chunk-DAJ76TOC.js";
43
+ import "./chunk-KCQ4TBLS.js";
44
+ import "./chunk-FBKXE4EJ.js";
45
+ import "./chunk-DW2BMUKY.js";
46
+ import "./chunk-B4HNJRAH.js";
47
+ import "./chunk-OQ245JLA.js";
48
+ import "./chunk-25T3GVS7.js";
49
+ import "./chunk-4GXAO3UY.js";
50
+ import "./chunk-SNU37TQI.js";
51
+ import "./chunk-XAHGBPWT.js";
52
+ import "./chunk-ZOU3LV4U.js";
53
+ import "./chunk-LBFRF2K4.js";
54
+ import "./chunk-J6EGFVQX.js";
55
+ import "./chunk-FT5TX7OX.js";
56
+ import "./chunk-7NMUTGOW.js";
57
+ import "./chunk-FFGU4GCC.js";
58
+ import "./chunk-DXKNDNFC.js";
59
+ import "./chunk-RJLPTWHW.js";
60
+ import "./chunk-2EOL5PZL.js";
61
+ import "./chunk-MDT5XDXL.js";
62
+ import "./chunk-UYEEMIWR.js";
63
+ import "./chunk-TVT45XNH.js";
64
+ import "./chunk-K2NLG2HK.js";
65
+ import "./chunk-EOBTJV32.js";
66
+ import "./chunk-7AULZ7OD.js";
67
+ import "./chunk-UA5K2BTI.js";
68
+ import "./chunk-IF43HIGV.js";
69
+ import "./chunk-7TSQLONI.js";
70
+ import "./chunk-2YPAPAR3.js";
71
+ import "./chunk-DGASQT26.js";
72
+ import "./chunk-PUOVIFHW.js";
73
+ import "./chunk-WNX5VD7S.js";
74
+ import "./chunk-34AZEGYW.js";
75
+ import "./chunk-UTSB4LOW.js";
76
+ import "./chunk-WM3Z6QKQ.js";
77
+ import "./chunk-LA6MG4ET.js";
78
+ import "./chunk-N3SFDYM7.js";
79
+ import "./chunk-X3CL6DTR.js";
80
+ import "./chunk-4RHXTL3W.js";
81
+ import "./chunk-W5AYOICN.js";
82
+ import "./chunk-2OLS7V66.js";
83
+ import "./chunk-2QWPQRSU.js";
84
+ import "./chunk-IS4USJPY.js";
85
+ import "./chunk-2BBELGHY.js";
86
+ import "./chunk-QYHI3YET.js";
87
+ import "./chunk-4LPDG57B.js";
88
+ import "./chunk-TQDM7S5N.js";
89
+ import "./chunk-TQDKJHWX.js";
90
+ import "./chunk-GQBZU6EO.js";
91
+ import "./chunk-SQVUDO2O.js";
92
+ import "./chunk-RE4TGORR.js";
93
+ import "./chunk-DCZ6CIUM.js";
94
+ import "./chunk-M3FO5UMK.js";
95
+ import "./chunk-CERF3RIB.js";
96
+ import "./chunk-QQRLPY25.js";
97
+ import "./chunk-DA44ZENT.js";
98
+ import "./chunk-F252T6Y3.js";
99
+ import "./chunk-XWAC3MKW.js";
100
+ import "./chunk-CVFVFRGN.js";
101
+ import "./chunk-QJP7EYGL.js";
102
+ import "./chunk-ESF3DIZY.js";
103
+ import "./chunk-R7QN6ONS.js";
104
+ import "./chunk-ZN7G6JLS.js";
105
+ import "./chunk-ZGX3ERAT.js";
106
+ import "./chunk-PEWCDI2C.js";
107
+ import "./chunk-TULAXS77.js";
108
+ import "./chunk-KI5GZFCE.js";
109
+ import "./chunk-UBMVADBF.js";
110
+ import "./chunk-ZZCBDNZI.js";
111
+ import "./chunk-MXS6S2PY.js";
112
+ import "./chunk-BISGNHKD.js";
113
+ import "./chunk-RKUVLRZI.js";
114
+ import "./chunk-BGEMY2JJ.js";
115
+ import "./chunk-XCKQ5BM2.js";
116
+ import "./chunk-NWEYRBWK.js";
117
+ import "./chunk-TWCVV2JO.js";
118
+ import "./chunk-PDPEM5VW.js";
119
+ import "./chunk-WWLJMP6D.js";
120
+ import "./chunk-CRUVYGO2.js";
121
+ import "./chunk-FF7ZVYJF.js";
122
+ import "./chunk-IMLTL2MY.js";
123
+ import "./chunk-BUOPJQP5.js";
124
+ import "./chunk-3B2CHX7M.js";
125
+ import "./chunk-RVUOIJXN.js";
126
+ import "./chunk-QUS4ER2W.js";
127
+ import "./chunk-DQYVQ2N7.js";
128
+ import "./chunk-KYUHIFP3.js";
129
+ import "./chunk-RSZGEL5U.js";
130
+ import "./chunk-NKDATMEM.js";
131
+ import "./chunk-DF35KMXM.js";
132
+ import "./chunk-ZT7B4H2V.js";
133
+ import "./chunk-OL4JBD3J.js";
134
+ import "./chunk-IGZ6C2MC.js";
135
+ import "./chunk-4NN3XQQT.js";
136
+ import "./chunk-4AQ5NINV.js";
137
+ import "./chunk-WPB5WEZJ.js";
138
+ import "./chunk-GYMAI5NY.js";
139
+ import "./chunk-CQ7J6UQ7.js";
140
+ import "./chunk-XKW5NDMR.js";
141
+ import "./chunk-W3YYPBEA.js";
142
+ import "./chunk-XIBYREEY.js";
143
+ import "./chunk-EE4B6A7W.js";
144
+ import "./chunk-WZYVLUVQ.js";
145
+ import "./chunk-O3EW7LAY.js";
146
+ import "./chunk-KHW6TX6I.js";
147
+ import "./chunk-MP4KZOQC.js";
148
+ import "./chunk-PWBF2X3V.js";
149
+ import "./chunk-HU5SSUFX.js";
150
+ import "./chunk-AKRYTS2D.js";
151
+ import "./chunk-4GVEJ5FK.js";
152
+ import "./chunk-O7BNJIXU.js";
153
+ import "./chunk-MCBRVPA7.js";
154
+ import "./chunk-RJLHVYQY.js";
155
+ import "./chunk-YMCH3L2S.js";
156
+ import "./chunk-I75EDU75.js";
157
+ import "./chunk-64E7D4HY.js";
158
+ import "./chunk-JGIWATSG.js";
159
+ import "./chunk-5B6TVO4A.js";
160
+ import "./chunk-NAOX3JUB.js";
161
+ import "./chunk-4QZEZME7.js";
162
+ import "./chunk-LVRRWP4W.js";
163
+ import "./chunk-GGYKY4GF.js";
164
+ import "./chunk-5SM5UAWN.js";
165
+ import "./chunk-PAXYQZH7.js";
166
+ import "./chunk-CAADDF6M.js";
167
+ import "./chunk-G3QP67Z7.js";
168
+ import "./chunk-4L2ZZM4Q.js";
169
+ import "./chunk-F6F47QAY.js";
170
+ import "./chunk-RDDWQBEM.js";
171
+ import "./chunk-MPAJ446F.js";
172
+ import "./chunk-CBANJFBO.js";
173
+ import "./chunk-PWXII6HF.js";
174
+ export {
175
+ gatewayPickerRows,
176
+ interactiveHostedPicker,
177
+ interactiveModelPicker,
178
+ modelRow
179
+ };
@@ -0,0 +1,254 @@
1
+ import { createRequire as __clikcodeCreateRequire } from 'node:module';
2
+ const require = __clikcodeCreateRequire(import.meta.url);
3
+ import {
4
+ downloadVerified,
5
+ formatBytes
6
+ } from "./chunk-IS4USJPY.js";
7
+ import {
8
+ runtimesDir
9
+ } from "./chunk-PEWCDI2C.js";
10
+
11
+ // src/local-models/runtime.ts
12
+ import { execFile } from "node:child_process";
13
+ import { existsSync } from "node:fs";
14
+ import { chmod, mkdir, readdir, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
15
+ import { release } from "node:os";
16
+ import { join } from "node:path";
17
+ var LLAMA_CPP_TAG = "b11194";
18
+ var MACOS_13_3 = [22, 4];
19
+ function asset(name, sizeBytes, sha256) {
20
+ return { name, sizeBytes, sha256 };
21
+ }
22
+ var RUNTIME_BUILDS = [
23
+ {
24
+ key: "linux-x64-cpu",
25
+ platform: "linux",
26
+ arch: "x64",
27
+ backend: "cpu",
28
+ asset: asset("llama-b11194-bin-ubuntu-x64.tar.gz", 17014362, "527c09064f3c89e4b6e1008a641e31903a04ccdd1c69abd0752acbbd4e1905f6")
29
+ },
30
+ {
31
+ key: "linux-x64-vulkan",
32
+ platform: "linux",
33
+ arch: "x64",
34
+ backend: "vulkan",
35
+ asset: asset("llama-b11194-bin-ubuntu-vulkan-x64.tar.gz", 30955864, "e4f8163eaf2e4d45639238a6fbc09f559e4ff5c0e7d612088a282ed128359c5e")
36
+ },
37
+ {
38
+ key: "linux-x64-cuda13",
39
+ platform: "linux",
40
+ arch: "x64",
41
+ backend: "cuda",
42
+ minDriverMajor: 580,
43
+ asset: asset("llama-b11194-bin-ubuntu-cuda-13.4-x64.tar.gz", 151252143, "d4c637a0c8fd7bdca68d140c9a36cc6038067a7aa29f7b1994f52f2dafede8fd"),
44
+ companion: asset("cudart-llama-b11194-bin-ubuntu-cuda-13.4-x64.tar.gz", 440236666, "df147535ca08a49cb9be1ced3241e0a043dbedc8a0138b847f0c2e09012ac54c")
45
+ },
46
+ {
47
+ key: "linux-x64-cuda12",
48
+ platform: "linux",
49
+ arch: "x64",
50
+ backend: "cuda",
51
+ minDriverMajor: 525,
52
+ asset: asset("llama-b11194-bin-ubuntu-cuda-12.8-x64.tar.gz", 170498826, "d415b688f353fcb5a387f272a5b6d783b8f09267b3b73e5e8920de6df9bffac9"),
53
+ companion: asset("cudart-llama-b11194-bin-ubuntu-cuda-12.8-x64.tar.gz", 594377795, "3ef39066810c3375bd2e30f418a8b7be7042a4e553e69ca0f9d8132c4fba4ca4")
54
+ },
55
+ {
56
+ key: "linux-x64-rocm",
57
+ platform: "linux",
58
+ arch: "x64",
59
+ backend: "rocm",
60
+ asset: asset("llama-b11194-bin-ubuntu-rocm-10.0-x64.tar.gz", 240223282, "b364ae02badfba6feb47931978b06aaf9c939a49f4f31d80290517fd4bacd604")
61
+ },
62
+ {
63
+ key: "linux-arm64-cpu",
64
+ platform: "linux",
65
+ arch: "arm64",
66
+ backend: "cpu",
67
+ asset: asset("llama-b11194-bin-ubuntu-arm64.tar.gz", 13608309, "92a8e5bb9f2f16804715fa6876f64691827a54d41d39dca67e2a83aa70f133ce")
68
+ },
69
+ {
70
+ key: "linux-arm64-vulkan",
71
+ platform: "linux",
72
+ arch: "arm64",
73
+ backend: "vulkan",
74
+ asset: asset("llama-b11194-bin-ubuntu-vulkan-arm64.tar.gz", 24776725, "1aa413dda941b31f58ff40205dcd9bad200eb569ef82623b8bc3adf8115162ef")
75
+ },
76
+ {
77
+ key: "linux-arm64-cuda13",
78
+ platform: "linux",
79
+ arch: "arm64",
80
+ backend: "cuda",
81
+ minDriverMajor: 580,
82
+ asset: asset("llama-b11194-bin-ubuntu-cuda-13.4-arm64.tar.gz", 147066552, "3eecee705f32e964afb5a25b13d42af81385f9209c404479eb15deb3e567e957"),
83
+ companion: asset("cudart-llama-b11194-bin-ubuntu-cuda-13.4-arm64.tar.gz", 552521399, "8096d68b54c2d5043337e6a99bd446df495f0d409202a92ca70ddee8fa29d2ce")
84
+ },
85
+ {
86
+ key: "darwin-arm64-metal",
87
+ platform: "darwin",
88
+ arch: "arm64",
89
+ backend: "metal",
90
+ minDarwin: MACOS_13_3,
91
+ asset: asset("llama-b11194-bin-macos-arm64.tar.gz", 11767333, "cc5d31e048c1c440149a0aaf25a6e387823511c0f23561ec534a4ec07c14e9e1")
92
+ },
93
+ {
94
+ key: "darwin-x64-cpu",
95
+ platform: "darwin",
96
+ arch: "x64",
97
+ backend: "cpu",
98
+ minDarwin: MACOS_13_3,
99
+ asset: asset("llama-b11194-bin-macos-x64.tar.gz", 11250068, "fe9b6c1a2856647303b31401b89e9aab320416706c358c3ce4beb71d21b1f37a")
100
+ },
101
+ {
102
+ key: "win32-x64-cpu",
103
+ platform: "win32",
104
+ arch: "x64",
105
+ backend: "cpu",
106
+ asset: asset("llama-b11194-bin-win-cpu-x64.zip", 18579455, "a508189eb974891c6d665b00d7e1eb5f38adc98345ef1f4815d158dabe188edb")
107
+ },
108
+ {
109
+ key: "win32-x64-vulkan",
110
+ platform: "win32",
111
+ arch: "x64",
112
+ backend: "vulkan",
113
+ asset: asset("llama-b11194-bin-win-vulkan-x64.zip", 32469369, "2ba6c1f42f571c5e7d309aeae1052b846794003eca4c332b0ce5498b5bcd7305")
114
+ },
115
+ {
116
+ key: "win32-x64-cuda13",
117
+ platform: "win32",
118
+ arch: "x64",
119
+ backend: "cuda",
120
+ minDriverMajor: 580,
121
+ asset: asset("llama-b11194-bin-win-cuda-13.4-x64.zip", 151727e3, "54bcbaeece80d2d3096ab47babe88cbb1923e682e16a31557cd1f1b6579a1ca0"),
122
+ companion: asset("cudart-llama-bin-win-cuda-13.4-x64.zip", 423535356, "738f8c251ac22b70c3ae6f83a10cf222725df0395246a2cf58f32bdb85fbe668")
123
+ },
124
+ {
125
+ key: "win32-x64-cuda12",
126
+ platform: "win32",
127
+ arch: "x64",
128
+ backend: "cuda",
129
+ minDriverMajor: 525,
130
+ asset: asset("llama-b11194-bin-win-cuda-12.4-x64.zip", 262445663, "419f7436783fe58640a0e2b6bfde5371ab755f23e3ed717c93aa4777f1deed7f"),
131
+ companion: asset("cudart-llama-bin-win-cuda-12.4-x64.zip", 391443627, "8c79a9b226de4b3cacfd1f83d24f962d0773be79f1e7b75c6af4ded7e32ae1d6")
132
+ },
133
+ {
134
+ key: "win32-x64-rocm",
135
+ platform: "win32",
136
+ arch: "x64",
137
+ backend: "rocm",
138
+ asset: asset("llama-b11194-bin-win-rocm-10.0-x64.zip", 256736852, "eed04cf34070ac1bf0c25dedda2dcd92fd1685086311cd039e43befd86897647")
139
+ },
140
+ {
141
+ key: "win32-arm64-cpu",
142
+ platform: "win32",
143
+ arch: "arm64",
144
+ backend: "cpu",
145
+ asset: asset("llama-b11194-bin-win-cpu-arm64.zip", 12051155, "ce9602bae7616831ec3863df7d509fb160183c4a784f98345086723b353d9beb")
146
+ }
147
+ ];
148
+ function osAtLeast(osRelease, minimum) {
149
+ if (!minimum) return true;
150
+ const [major = 0, minor = 0] = osRelease.split(".").map(Number);
151
+ return major > minimum[0] || major === minimum[0] && minor >= minimum[1];
152
+ }
153
+ function noRuntimeReason(hardware, osRelease = release()) {
154
+ const builds = RUNTIME_BUILDS.filter((build) => build.platform === hardware.platform && build.arch === hardware.arch);
155
+ const minimum = builds.find((build) => build.minDarwin)?.minDarwin;
156
+ if (hardware.platform === "darwin" && minimum && !osAtLeast(osRelease, minimum)) {
157
+ return `Models on this computer need macOS 13.3 or later; this Mac runs ${macosName(osRelease)}. Hosted AI on ClikDeploy still works.`;
158
+ }
159
+ return `llama.cpp publishes no build for ${hardware.platform} ${hardware.arch}.`;
160
+ }
161
+ function macosName(osRelease) {
162
+ const major = Number(osRelease.split(".")[0]);
163
+ if (major === 19) return "macOS 10.15";
164
+ if (major === 25) return "macOS 26";
165
+ return major >= 20 ? `macOS ${major - 9}` : "an older macOS";
166
+ }
167
+ function driverMajor(version) {
168
+ return Number(/^(\d+)/.exec(version ?? "")?.[1] ?? 0);
169
+ }
170
+ function selectRuntimeBuild(hardware, gpu, osRelease = release()) {
171
+ const builds = RUNTIME_BUILDS.filter((build) => build.platform === hardware.platform && build.arch === hardware.arch && osAtLeast(osRelease, build.minDarwin));
172
+ if (gpu) {
173
+ const driver = Math.min(...gpu.devices.map((device) => driverMajor(device.driverVersion)));
174
+ const match = builds.find((build) => build.backend === gpu.backend && (build.minDriverMajor === void 0 || driver >= build.minDriverMajor));
175
+ if (match) return match;
176
+ }
177
+ return builds.find((build) => build.backend === "cpu" || build.backend === "metal");
178
+ }
179
+ function runtimeDir(build) {
180
+ return join(runtimesDir(), LLAMA_CPP_TAG, build.key);
181
+ }
182
+ var SERVER_BINARY = process.platform === "win32" ? "llama-server.exe" : "llama-server";
183
+ async function findFile(directory, name, depth = 3) {
184
+ const entries = await readdir(directory, { withFileTypes: true }).catch(() => []);
185
+ const direct = entries.find((entry) => entry.isFile() && entry.name === name);
186
+ if (direct) return join(directory, direct.name);
187
+ if (depth <= 0) return void 0;
188
+ for (const entry of entries) {
189
+ if (!entry.isDirectory()) continue;
190
+ const found = await findFile(join(directory, entry.name), name, depth - 1);
191
+ if (found) return found;
192
+ }
193
+ return void 0;
194
+ }
195
+ function tarCommand() {
196
+ return process.platform === "win32" ? join(process.env.SystemRoot ?? "C:\\Windows", "System32", "tar.exe") : "tar";
197
+ }
198
+ function extract(archive, into) {
199
+ return new Promise((resolve, reject) => {
200
+ execFile(tarCommand(), ["-xf", archive, "-C", into], { windowsHide: true, timeout: 10 * 6e4 }, (error, _stdout, stderr) => {
201
+ if (error) reject(new Error(`Could not unpack ${archive}: ${stderr || error.message}`));
202
+ else resolve();
203
+ });
204
+ });
205
+ }
206
+ async function ensureRuntime(build, onProgress) {
207
+ const directory = runtimeDir(build);
208
+ const marker = join(directory, "installed.json");
209
+ const recorded = await readFile(marker, "utf8").then((text) => JSON.parse(text), () => void 0);
210
+ if (recorded?.serverPath && existsSync(recorded.serverPath)) {
211
+ return { build, serverPath: recorded.serverPath, directory: join(recorded.serverPath, "..") };
212
+ }
213
+ await rm(directory, { recursive: true, force: true });
214
+ await mkdir(directory, { recursive: true });
215
+ const downloads = join(runtimesDir(), LLAMA_CPP_TAG, "downloads");
216
+ const unpacked = join(directory, "files");
217
+ await mkdir(unpacked, { recursive: true });
218
+ for (const item of [build.asset, ...build.companion ? [build.companion] : []]) {
219
+ const archive = join(downloads, item.name);
220
+ const label = `downloading llama.cpp ${LLAMA_CPP_TAG} (${build.backend}, ${formatBytes(item.sizeBytes)})`;
221
+ onProgress?.({ message: label, bytes: 0, totalBytes: item.sizeBytes });
222
+ await downloadVerified({
223
+ url: `https://github.com/ggml-org/llama.cpp/releases/download/${LLAMA_CPP_TAG}/${item.name}`,
224
+ destination: archive,
225
+ sizeBytes: item.sizeBytes,
226
+ sha256: item.sha256,
227
+ onProgress: (progress) => onProgress?.({ message: label, ...progress })
228
+ });
229
+ await extract(archive, unpacked);
230
+ }
231
+ const serverPath = await findFile(unpacked, SERVER_BINARY);
232
+ if (!serverPath) throw new Error(`llama.cpp ${LLAMA_CPP_TAG} (${build.asset.name}) has no ${SERVER_BINARY}.`);
233
+ if (build.companion) await colocateLibraries(unpacked, join(serverPath, ".."));
234
+ if (process.platform !== "win32" && ((await stat(serverPath)).mode & 73) === 0) await chmod(serverPath, 493);
235
+ await writeFile(marker, JSON.stringify({ tag: LLAMA_CPP_TAG, build: build.key, serverPath, at: (/* @__PURE__ */ new Date()).toISOString() }));
236
+ await rm(downloads, { recursive: true, force: true });
237
+ return { build, serverPath, directory: join(serverPath, "..") };
238
+ }
239
+ async function colocateLibraries(root, serverDirectory) {
240
+ if (root === serverDirectory) return;
241
+ for (const entry of await readdir(root, { withFileTypes: true })) {
242
+ if (entry.isFile() && /\.(dll|so(\.\d+)*)$/i.test(entry.name) && !existsSync(join(serverDirectory, entry.name))) {
243
+ await rename(join(root, entry.name), join(serverDirectory, entry.name));
244
+ }
245
+ }
246
+ }
247
+
248
+ export {
249
+ LLAMA_CPP_TAG,
250
+ RUNTIME_BUILDS,
251
+ noRuntimeReason,
252
+ selectRuntimeBuild,
253
+ ensureRuntime
254
+ };
@@ -0,0 +1,184 @@
1
+ import { createRequire as __clikcodeCreateRequire } from 'node:module';
2
+ const require = __clikcodeCreateRequire(import.meta.url);
3
+ import {
4
+ MONTHS,
5
+ zonedResetTime
6
+ } from "./chunk-XWAC3MKW.js";
7
+
8
+ // src/turn/failover.ts
9
+ function declaredReplyStatus(patterns, text) {
10
+ const reply = text.trim();
11
+ for (const entry of patterns ?? []) {
12
+ const match = new RegExp(entry.pattern).exec(reply);
13
+ if (!match) continue;
14
+ const captured = match[1] ? Number(match[1]) : void 0;
15
+ return captured !== void 0 && Number.isFinite(captured) ? captured : entry.status;
16
+ }
17
+ return void 0;
18
+ }
19
+ var INTERACTIVE_LOGIN_TEXT = /(?:starting login flow|waiting for (?:confirmation|authori[sz]ation|login|sign-?in)[^\n]{0,40}\bbrowser|open (?:this|the following) (?:url|link) in your browser to (?:log|sign) ?in|(?:log|sign) ?in to \w[\w .-]{0,30}\?\s*\(?y(?:es)?\)?\W{0,3}(?:\/|or)?\W{0,3}\(?n(?:o)?\)?|\(y\)es\/\(n\)o[^\n]{0,80}(?:log|sign) ?in|(?:log|sign) ?in[^\n]{0,80}\(y\)es\/\(n\)o|waiting up to \d+ minutes? for [^\n]{0,40}(?:log|sign|auth|browser))/i;
20
+ function interactiveLoginPrompt(text) {
21
+ const match = INTERACTIVE_LOGIN_TEXT.exec(text);
22
+ if (!match) return void 0;
23
+ const line = text.split("\n").find((candidate) => INTERACTIVE_LOGIN_TEXT.test(candidate));
24
+ return (line ?? match[0]).replace(/\s+/g, " ").trim().slice(0, 300);
25
+ }
26
+ var AUTH_TEXT = /(?:not authenticated|authentication (?:is )?(?:required|failed|error)|login required|not logged in|unauthorized|invalid (?:api[ _-]?key|credentials|token)|(?:token|session|credentials?) (?:has |have )?expired|oauth token (?:has )?(?:expired|been revoked)|no auth type is selected|headless mode requires existing settings|no (?:api[ _-]?key|access token) found|no (?:route-compatible )?authentication source is configured|authentication[_ ]?error|incorrect api[ _-]?key|(?:invalid or )?missing api[ _-]?key|api key required|no api key (?:for|found)|no credentials (?:are )?(?:configured|found)|not signed in|no longer authenticated|please authenticate|needs authentication|re-?authenticat(?:e|ion)|authori[sz]ation (?:with .{0,40})?failed|invalid or expired|run [`'"]?[\w-]+ login\b|run \/(?:login|auth)\b|no [\w ]{0,30}auth token found|\bPAID_MODEL_AUTH_REQUIRED\b)/i;
27
+ var AUTH_LOOSE_TEXT = /(?:has expired\b|\bsign (?:in|up) (?:to|or) |please (?:log|sign) ?in)/i;
28
+ var QUOTA_TEXT = /(?:out of (?:\w+ )?(?:usage )?credits|\b(?:FREE|PRO)_USER_USAGE_LIMIT\b|\bUSAGE_PRICING_REQUIRED|\bPROMOTION_MODEL_LIMIT_REACHED\b|UsageLimitError\b|quota (?:has been |is )?(?:exceeded|exhausted|reached|used up)|quota\b[^.\n]{0,40}\bused up|quota to reset|(?:weekly|monthly|daily|\d+-?hour) (?:\w+ )?limit (?:has been )?reached|\bacu limit|usage (?:limit )?exceeded|usage (?:is )?(?:paused|frozen)|paused usage|insufficient[_ ](?:\w+ )?(?:balance|funds|credits?)|not enough credits|no credits|credits? (?:is |are )?(?:exhausted|depleted)|billing (?:issue|error)|exceeded (?:your |the )?(?:\w+ ){0,3}quota|resource[_ ]exhausted|insufficient[_ ]quota|(?:usage|session|plan|weekly|monthly|daily|spend|request) limit (?:has been |was |is )?(?:reached|exceeded|hit)\b|\b(?:reached|hit|exceeded) (?:your|the|its) (?:[\w-]+ ){0,2}(?:usage|session|plan|weekly|monthly|daily|spend|request) limit\b(?! of \d)|usage is at (?:its|your|the) (?:\w+ )?limit\b|you(?:'ve| have) hit your limit|(?:free )?trial (?:has )?(?:expired|ended)|credits? exhausted|(?:ran|run) out of (?:usage|quota)|out of credits|(?:add|buy|purchase) (?:more )?credits|insufficient credits|billing (?:hard )?limit|payment required|(?:balance|funds|credit) (?:is )?(?:exhausted|depleted)|insufficient (?:balance|funds|credit)|upgrade your (?:plan|account) to continue|add a payment method to continue)/i;
29
+ var CONTEXT_TEXT = /(?:context (?:window|length)|maximum context|prompt is too long)/i;
30
+ var THROTTLE_TEXT = /(?:rate[ _-]?limit|\bRATE_LIMITED\b|too many requests|temporar(?:y|ily) throttled)/i;
31
+ var INELIGIBLE_TEXT = /(?:not eligible|can't use your (?:\w+ ){0,2}subscription|payment is past due|ineligible|eligibility check failed|verify your account|account (?:is )?not verified|(?:no|not have a) valid license|requires? a (?:paid|pro|business|enterprise) (?:plan|subscription)|subscription does not have access|client is no longer supported for .*individual|no active .{0,40}subscription|not granted you access|no profiles available|not authorized to use this copilot feature|model is not supported when using [\w ]+ with a (?:chatgpt|\w+) account)/i;
32
+ var REQUEST_INVALID_TEXT = /(?:invalid model selection|conflicts with --|is not supported for model|unknown (?:flag|option|argument)|unrecogni[sz]ed (?:flag|option|argument)|invalid (?:flag|option|argument) value)/i;
33
+ var ACP_AUTH_REQUIRED_CODE = -32e3;
34
+ function kindFromErrorKind(errorKind) {
35
+ if (errorKind === "model_not_on_plan") return "account-ineligible";
36
+ if (/^(?:access_denied|verification_required|cloud_credential_error|permission_error|forbidden)$/i.test(errorKind)) return "account-ineligible";
37
+ if (/^(?:budget_exhausted|account_on_hold|quota_exhausted|billing_error)$/i.test(errorKind)) return "quota-exhausted";
38
+ if (/^(?:bad_request|invalid_request|model_not_found|badRequest)$/i.test(errorKind)) return "request-invalid";
39
+ if (/auth|unauthori[sz]ed|invalid_?api_?key|invalid_?(?:token|credentials|grant)|token_?expired|login/i.test(errorKind)) return "authentication-required";
40
+ if (/quota|billing|credit|payment|usage_?limit|limit_?(?:reached|exceeded)$/i.test(errorKind) && !/rate/i.test(errorKind)) return "quota-exhausted";
41
+ if (/rate_?limit|too_?many_?requests|throttl/i.test(errorKind)) return "temporarily-throttled";
42
+ return void 0;
43
+ }
44
+ function accountFailureReason(kind) {
45
+ switch (kind) {
46
+ case "quota-exhausted":
47
+ return "usage exhausted";
48
+ case "temporarily-throttled":
49
+ return "rate limited";
50
+ case "authentication-required":
51
+ return "sign-in needed";
52
+ case "account-ineligible":
53
+ return "account not eligible";
54
+ case "native-thread-invalid":
55
+ return "thread expired";
56
+ default:
57
+ return "account failed";
58
+ }
59
+ }
60
+ function accountVerification(error) {
61
+ const text = carriedErrorText(error);
62
+ if (!INELIGIBLE_TEXT.test(text)) return void 0;
63
+ const urls = [...text.matchAll(/https:\/\/[^\s"')]+/g)].map((match) => match[0]);
64
+ const url = urls.find((candidate) => /^https:\/\/accounts\.google\.com\//.test(candidate)) ?? urls[0];
65
+ return url ? { url } : {};
66
+ }
67
+ function carriedErrorText(error) {
68
+ const carried = error ?? {};
69
+ return [carried.stderrTail, carried.message].filter((part) => typeof part === "string").join("\n");
70
+ }
71
+ var DURATION_UNIT_MS = { d: 864e5, h: 36e5, m: 6e4, s: 1e3 };
72
+ function quotaRetryHint(error, now = Date.now()) {
73
+ const text = carriedErrorText(error);
74
+ const phrase = /(?:resets?|try again|retry(?: again)?)\s+(?:in|after)\s+((?:\d+(?:\.\d+)?\s*(?:days?|d|hours?|hrs?|h|minutes?|mins?|m|seconds?|secs?|s)(?![a-z])[\s,]*(?:and\s+)?)+)/i.exec(text)?.[1];
75
+ if (phrase) {
76
+ let total = 0;
77
+ for (const part of phrase.matchAll(/(\d+(?:\.\d+)?)\s*([dhms])/gi)) total += Number(part[1]) * DURATION_UNIT_MS[part[2].toLowerCase()];
78
+ if (total > 0) return new Date(now + total).toISOString();
79
+ }
80
+ const stamp = /(?:resets?|try again|retry(?: again)?)\s+(?:at|after)\s+(\d{4}-\d{2}-\d{2}T[\d:.]+(?:Z|[+-]\d{2}:?\d{2}))/i.exec(text)?.[1];
81
+ const at = stamp ? Date.parse(stamp) : Number.NaN;
82
+ if (Number.isFinite(at) && at > now) return new Date(at).toISOString();
83
+ const zoned = /resets?\s+(?:at\s+)?([^(\n·]+?)\s*\(([A-Za-z]+(?:\/[A-Za-z_+-]+)+|UTC)\)/i.exec(text);
84
+ const zonedAt = zoned ? zonedResetTime(zoned[1], zoned[2], now) : void 0;
85
+ if (zonedAt && Date.parse(zonedAt) > now) return zonedAt;
86
+ const rolling = quotaRollingWindowMs(error);
87
+ if (rolling) return new Date(now + rolling).toISOString();
88
+ return clockTimeHint(text, now);
89
+ }
90
+ function quotaRollingWindowMs(error) {
91
+ const text = carriedErrorText(error);
92
+ const hours = Number(/rolling (\d+)[- ]hour window/i.exec(text)?.[1]);
93
+ return hours > 0 ? hours * 36e5 : void 0;
94
+ }
95
+ function clockTimeHint(text, now) {
96
+ const match = /(?:resets?|try again|retry(?: again)?)\s+(?:at|after)\s+(?:([a-z]{3})[a-z]*\.?\s+(\d{1,2})(?:st|nd|rd|th)?,?\s+(?:(\d{4}),?\s+)?)?(\d{1,2}):(\d{2})\s*(am|pm)?(?![\w:])/i.exec(text);
97
+ if (!match) return void 0;
98
+ const [, month, day, year, hourText, minuteText, meridiem] = match;
99
+ let hour = Number(hourText);
100
+ const minute = Number(minuteText);
101
+ if (minute > 59 || hour > 23 || meridiem && (hour < 1 || hour > 12)) return void 0;
102
+ if (meridiem) hour = hour % 12 + (meridiem.toLowerCase() === "pm" ? 12 : 0);
103
+ const at = new Date(now);
104
+ at.setSeconds(0, 0);
105
+ at.setHours(hour, minute);
106
+ if (month) {
107
+ const index = MONTHS.indexOf(month.toLowerCase());
108
+ if (index < 0) return void 0;
109
+ at.setMonth(index, Number(day));
110
+ if (year) at.setFullYear(Number(year));
111
+ else if (at.getTime() <= now) at.setFullYear(at.getFullYear() + 1);
112
+ } else if (at.getTime() <= now) at.setDate(at.getDate() + 1);
113
+ return at.getTime() > now ? at.toISOString() : void 0;
114
+ }
115
+ function verificationNotice(verification) {
116
+ if (!verification.url) return "Account needs verification with its provider";
117
+ return /^https:\/\/accounts\.google\.com\//.test(verification.url) ? `Google needs verification: ${verification.url}` : `Verification needed: ${verification.url}`;
118
+ }
119
+ function accountMoveReasonText(reason) {
120
+ return reason === "low-room" ? "usage nearly exhausted" : accountFailureReason(reason);
121
+ }
122
+ function accountSwitchLine(change) {
123
+ return `Switched to ${change.to} (${change.from}: ${accountMoveReasonText(change.reason)})`;
124
+ }
125
+ function accountSwitchNotice(reason, to) {
126
+ return `${accountMoveReasonText(reason)}, switching to ${to}`;
127
+ }
128
+ function agentTurnFailureKind(result) {
129
+ const status = result.statusCode;
130
+ if (result.errorKind === "auth" || status === 401) return "authentication-required";
131
+ if (status === 403) return "other";
132
+ if (status === 402 || result.errorKind === "quota") return INELIGIBLE_TEXT.test(result.text) ? "account-ineligible" : "quota-exhausted";
133
+ if (status === 429) return "temporarily-throttled";
134
+ return status === void 0 ? "other" : classifyAccountFailure(new Error(result.text), { statusCode: status });
135
+ }
136
+ function classifyAccountFailure(error, signals = {}) {
137
+ const carried = error ?? {};
138
+ if (carried.nativeThreadInvalid === true) return "native-thread-invalid";
139
+ const rawStatus = signals.statusCode ?? carried.statusCode ?? carried.response?.status;
140
+ const status = typeof rawStatus === "number" ? rawStatus : void 0;
141
+ const embeddedStatus = (text2) => {
142
+ const found = /(?:\bstatus[ :]+|"http_status"\s*:\s*|\bHTTP[ /](?:\d\.\d )?)(\d{3})\b/i.exec(text2)?.[1];
143
+ const code = found ? Number(found) : void 0;
144
+ return code !== void 0 && code >= 400 && code < 600 ? code : void 0;
145
+ };
146
+ const errorKind = signals.errorKind ?? (typeof carried.errorKind === "string" ? carried.errorKind : void 0);
147
+ const rpcCode = error?.rpcCode;
148
+ const rateLimitStatus = signals.rateLimitStatus ?? (typeof carried.rateLimitStatus === "string" ? carried.rateLimitStatus : void 0);
149
+ const message = error instanceof Error ? error.message : String(error ?? "");
150
+ const hasStreams = typeof carried.stderrTail === "string" || typeof carried.stdoutTail === "string";
151
+ const text = signals.stderrText !== void 0 || hasStreams ? [signals.stderrText, typeof carried.stderrTail === "string" ? carried.stderrTail : void 0].filter(Boolean).join("\n") : signals.isResultError === false ? "" : message;
152
+ if (/subscription:[\w-]*usage-exhausted/i.test(text)) return "quota-exhausted";
153
+ const fromKind = errorKind ? kindFromErrorKind(errorKind) : void 0;
154
+ if (fromKind === "temporarily-throttled" && QUOTA_TEXT.test(text) && !CONTEXT_TEXT.test(text)) return "quota-exhausted";
155
+ if (fromKind) return fromKind;
156
+ if (rpcCode === ACP_AUTH_REQUIRED_CODE && status === void 0) return "authentication-required";
157
+ const effectiveStatus = status ?? (text ? declaredReplyStatus(signals.replyErrorPatterns, text) ?? embeddedStatus(text) : void 0);
158
+ if (effectiveStatus === 401) return "authentication-required";
159
+ if (effectiveStatus === 402 && INELIGIBLE_TEXT.test(text)) return "account-ineligible";
160
+ if (effectiveStatus === 402) return "quota-exhausted";
161
+ if (INELIGIBLE_TEXT.test(text)) return "account-ineligible";
162
+ if (AUTH_TEXT.test(text) || INTERACTIVE_LOGIN_TEXT.test(text)) return "authentication-required";
163
+ if (rateLimitStatus === "rejected" || QUOTA_TEXT.test(text) && !CONTEXT_TEXT.test(text)) return "quota-exhausted";
164
+ if (AUTH_LOOSE_TEXT.test(text)) return "authentication-required";
165
+ if (effectiveStatus === 429 || THROTTLE_TEXT.test(text)) return "temporarily-throttled";
166
+ if (/no rollout found|thread is archived and cannot be continued/i.test(text)) return "native-thread-invalid";
167
+ if (REQUEST_INVALID_TEXT.test(text)) return "request-invalid";
168
+ return "other";
169
+ }
170
+
171
+ export {
172
+ interactiveLoginPrompt,
173
+ ACP_AUTH_REQUIRED_CODE,
174
+ accountFailureReason,
175
+ accountVerification,
176
+ quotaRetryHint,
177
+ quotaRollingWindowMs,
178
+ verificationNotice,
179
+ accountMoveReasonText,
180
+ accountSwitchLine,
181
+ accountSwitchNotice,
182
+ agentTurnFailureKind,
183
+ classifyAccountFailure
184
+ };
@@ -0,0 +1,33 @@
1
+ import { createRequire as __clikcodeCreateRequire } from 'node:module';
2
+ const require = __clikcodeCreateRequire(import.meta.url);
3
+ import {
4
+ ACP_AUTH_REQUIRED_CODE,
5
+ accountFailureReason,
6
+ accountMoveReasonText,
7
+ accountSwitchLine,
8
+ accountSwitchNotice,
9
+ accountVerification,
10
+ agentTurnFailureKind,
11
+ classifyAccountFailure,
12
+ interactiveLoginPrompt,
13
+ quotaRetryHint,
14
+ quotaRollingWindowMs,
15
+ verificationNotice
16
+ } from "./chunk-2YPAPAR3.js";
17
+ import "./chunk-XWAC3MKW.js";
18
+ import "./chunk-EE4B6A7W.js";
19
+ import "./chunk-PWXII6HF.js";
20
+ export {
21
+ ACP_AUTH_REQUIRED_CODE,
22
+ accountFailureReason,
23
+ accountMoveReasonText,
24
+ accountSwitchLine,
25
+ accountSwitchNotice,
26
+ accountVerification,
27
+ agentTurnFailureKind,
28
+ classifyAccountFailure,
29
+ interactiveLoginPrompt,
30
+ quotaRetryHint,
31
+ quotaRollingWindowMs,
32
+ verificationNotice
33
+ };