zevairouter 1.0.84 → 1.0.86

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 (320) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +23 -23
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  31. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  32. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  33. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  34. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  35. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  36. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  37. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  38. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  39. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  40. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  41. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  42. package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  43. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  44. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  45. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  46. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  47. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  48. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  49. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  50. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  51. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  53. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  54. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  55. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  56. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  57. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  58. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  59. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  61. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  62. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  63. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  64. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  65. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  66. package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
  67. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  68. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  69. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  70. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  71. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  72. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  73. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  74. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
  75. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  76. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  77. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  78. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  79. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
  80. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  81. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
  82. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  83. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  84. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  85. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  86. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  87. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  88. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  89. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  90. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  91. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  92. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  93. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  94. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  95. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  96. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  97. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  98. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  99. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  100. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  101. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  102. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  103. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  104. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  105. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  106. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  107. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  108. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  109. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  110. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  111. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  112. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  113. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  114. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
  115. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  116. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  117. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  118. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  119. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
  120. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  121. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
  122. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  123. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  124. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  125. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  126. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  127. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  128. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  129. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  130. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  131. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  132. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  133. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  134. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  135. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  136. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  137. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  138. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  139. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  140. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  141. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  142. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  143. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  144. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  145. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  146. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  147. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  148. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  149. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  150. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  151. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  152. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  153. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  154. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  155. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +5 -5
  156. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  157. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
  158. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  159. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  160. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +5 -5
  161. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
  162. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +3 -3
  163. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  164. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  165. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  166. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  167. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  168. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  169. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  170. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  171. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  172. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  173. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  174. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  175. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  176. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  177. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  178. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  179. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  180. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  181. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  182. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  183. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  184. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  185. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  186. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  187. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  188. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  189. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  190. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  191. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  192. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  193. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  194. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  195. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  196. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  197. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  198. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  199. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  200. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  201. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  202. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  203. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  204. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  205. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  206. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  207. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  208. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  209. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  210. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  211. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  212. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  213. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  214. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  215. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  216. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  217. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  218. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  219. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  220. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  221. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  222. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  223. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  224. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  225. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  226. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  227. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  228. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  229. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  230. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  231. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  232. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  233. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  234. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  235. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  236. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  237. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  238. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  239. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  240. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  241. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  242. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  243. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  244. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  245. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  246. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  247. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  248. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  249. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  250. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  251. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  252. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  253. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  254. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  255. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  256. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  257. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  258. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  259. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  260. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  261. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  262. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  263. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  264. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  265. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  266. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  267. package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  268. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  269. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  270. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  271. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  272. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  273. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  274. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  275. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  276. package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
  277. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  278. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  279. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  280. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  281. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  282. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  283. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  284. package/cli/app/.next-cli-build/server/app/landing.rsc +3 -3
  285. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  286. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  287. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  288. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  289. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  290. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  291. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  292. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  293. package/cli/app/.next-cli-build/server/app/login.rsc +4 -4
  294. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  295. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  296. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  297. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  298. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  299. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  300. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  301. package/cli/app/.next-cli-build/server/app-paths-manifest.json +23 -23
  302. package/cli/app/.next-cli-build/server/chunks/3155.js +1 -1
  303. package/cli/app/.next-cli-build/server/chunks/3407.js +1 -1
  304. package/cli/app/.next-cli-build/server/chunks/3487.js +1 -1
  305. package/cli/app/.next-cli-build/server/chunks/4746.js +1 -1
  306. package/cli/app/.next-cli-build/server/chunks/6896.js +1 -1
  307. package/cli/app/.next-cli-build/server/chunks/8157.js +1 -1
  308. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  309. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  310. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  311. package/cli/app/.next-cli-build/static/chunks/{3702-2ae85ab0e262237e.js → 3702-62373ec9c975e541.js} +1 -1
  312. package/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/src/lib/terminal/ptyBridge.py +163 -0
  313. package/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/src/lib/terminal/ptyBridge.py +163 -0
  314. package/cli/app/package.json +1 -1
  315. package/cli/package.json +1 -1
  316. package/package.json +1 -1
  317. package/src/lib/oauth/services/grokXaiEmailAutomation.js +12 -12
  318. package/src/lib/oauth/services/kiroGoogleAutomation.js +205 -91
  319. /package/cli/app/.next-cli-build/static/{vfxzLlib7n2DZ-lkAYEUg → A_0wfNpUnT3ab1owZjECm}/_buildManifest.js +0 -0
  320. /package/cli/app/.next-cli-build/static/{vfxzLlib7n2DZ-lkAYEUg → A_0wfNpUnT3ab1owZjECm}/_ssgManifest.js +0 -0
@@ -412,7 +412,7 @@ async function getFirstVisibleLocator(page, selector) {
412
412
  return null;
413
413
  }
414
414
 
415
- async function waitForFirstVisibleLocator(page, selector, { timeout = 15_000, pollInterval = 500 } = {}) {
415
+ async function waitForFirstVisibleLocator(page, selector, { timeout = 15_000, pollInterval = 150 } = {}) {
416
416
  const deadline = Date.now() + timeout;
417
417
  while (Date.now() < deadline) {
418
418
  const found = await getFirstVisibleLocator(page, selector);
@@ -424,6 +424,62 @@ async function waitForFirstVisibleLocator(page, selector, { timeout = 15_000, po
424
424
  return null;
425
425
  }
426
426
 
427
+ /** Tiny yield only — never use multi-second sleeps for “maybe page will load”. */
428
+ function yieldMs(ms = 50) {
429
+ return new Promise((r) => setTimeout(r, ms));
430
+ }
431
+
432
+ /**
433
+ * Wait until a condition is true, polling fast. Replaces fixed sleep after clicks.
434
+ * @returns {Promise<boolean>} true if condition met before timeout
435
+ */
436
+ async function waitUntil(checkFn, { timeout = 8_000, interval = 100 } = {}) {
437
+ const deadline = Date.now() + timeout;
438
+ while (Date.now() < deadline) {
439
+ try {
440
+ if (await checkFn()) return true;
441
+ } catch {
442
+ /* retry */
443
+ }
444
+ await yieldMs(interval);
445
+ }
446
+ return false;
447
+ }
448
+
449
+ function isGoogleHostname(url) {
450
+ try {
451
+ const host = new URL(url).hostname;
452
+ return host === "accounts.google.com"
453
+ || host.endsWith(".accounts.google.com")
454
+ || /^accounts\.google\./i.test(host);
455
+ } catch {
456
+ return false;
457
+ }
458
+ }
459
+
460
+ /** After navigation/click: wait for URL change or next UI, not a fixed sleep. */
461
+ async function waitForPageAdvance(page, {
462
+ fromUrl = "",
463
+ urlMatch = null,
464
+ selector = null,
465
+ timeout = 8_000,
466
+ } = {}) {
467
+ const startUrl = fromUrl || page.url?.() || "";
468
+ return waitUntil(async () => {
469
+ const url = page.url?.() || "";
470
+ if (urlMatch) {
471
+ if (typeof urlMatch === "function" && urlMatch(url)) return true;
472
+ if (urlMatch instanceof RegExp && urlMatch.test(url)) return true;
473
+ }
474
+ if (url && url !== startUrl && !url.startsWith("about:")) return true;
475
+ if (selector) {
476
+ const found = await getFirstVisibleLocator(page, selector);
477
+ if (found) return true;
478
+ }
479
+ return false;
480
+ }, { timeout, interval: 80 });
481
+ }
482
+
427
483
  async function fillInputResilient(locator, value, { timeout = 15_000 } = {}) {
428
484
  if (!locator || value == null) return false;
429
485
 
@@ -496,12 +552,18 @@ function includesAny(text, markers) {
496
552
  function isGoogleAuthPage(page) {
497
553
  try {
498
554
  const url = new URL(page.url());
499
- return url.hostname === "accounts.google.com" || url.hostname.endsWith(".accounts.google.com");
555
+ return url.hostname === "accounts.google.com"
556
+ || url.hostname.endsWith(".accounts.google.com")
557
+ || /^accounts\.google\./i.test(url.hostname);
500
558
  } catch {
501
559
  return false;
502
560
  }
503
561
  }
504
562
 
563
+ function isGrokish(serviceLabel) {
564
+ return /grok/i.test(String(serviceLabel || ""));
565
+ }
566
+
505
567
  // Google bounces flagged (headless) browsers:
506
568
  // - myaccount.google.com/not-supported
507
569
  // - accounts.google.com/v3/signin/rejected ("This browser or app may not be secure")
@@ -601,14 +663,15 @@ async function waitThroughGoogleInterstitials(page, reportStep, { maxWaitMs = 20
601
663
  ]);
602
664
  if (clicked) {
603
665
  reportStep?.("selecting_google_account", "Selected account from Google AccountChooser");
604
- await page.waitForTimeout(1200);
666
+ await waitForPageAdvance(page, { timeout: 5_000 });
605
667
  continue;
606
668
  }
607
669
  }
608
670
 
609
671
  const waiters = [
610
- page.waitForNavigation({ waitUntil: "domcontentloaded", timeout: 4_000 }).catch(() => null),
611
- page.waitForTimeout(1_200),
672
+ page.waitForNavigation({ waitUntil: "domcontentloaded", timeout: 3_000 }).catch(() => null),
673
+ // Cap idle wait low — exit as soon as URL/body changes or success settles.
674
+ yieldMs(400),
612
675
  ];
613
676
  if (successPromise && !isSuccessSettled(successPromise)) {
614
677
  waiters.push(successPromise.then(() => null).catch(() => null));
@@ -1328,28 +1391,39 @@ async function handleXaiDeviceCodeConfirm(page, reportStep, { alreadyAuthed = fa
1328
1391
  || (/sign in to grok/i.test(text) && /continue/i.test(text) && !/login with/i.test(text));
1329
1392
  if (!isCodeConfirm) return false;
1330
1393
 
1394
+ const fromUrl = page.url?.() || "";
1395
+ let clicked = false;
1331
1396
  try {
1332
1397
  const btn = page.getByRole("button", { name: /^Continue$/i }).first();
1333
- if (await btn.isVisible({ timeout: 600 }).catch(() => false)) {
1398
+ if (await btn.isVisible({ timeout: 300 }).catch(() => false)) {
1334
1399
  await btn.click({ timeout: 5_000 });
1335
- reportStep?.("confirming_device_code", "Confirmed device user code on xAI");
1336
- await page.waitForTimeout(1_200);
1337
- return true;
1400
+ clicked = true;
1338
1401
  }
1339
1402
  } catch {
1340
1403
  /* fall through */
1341
1404
  }
1342
-
1343
- const clicked = await clickFirstActionable(page, [
1344
- 'button[type="submit"]:has-text("Continue")',
1345
- 'button:has-text("Continue")',
1346
- ]);
1347
- if (clicked) {
1348
- reportStep?.("confirming_device_code", "Confirmed device user code on xAI");
1349
- await page.waitForTimeout(1_200);
1350
- return true;
1405
+ if (!clicked) {
1406
+ clicked = await clickFirstActionable(page, [
1407
+ 'button[type="submit"]:has-text("Continue")',
1408
+ 'button:has-text("Continue")',
1409
+ ]);
1351
1410
  }
1352
- return false;
1411
+ if (!clicked) return false;
1412
+
1413
+ reportStep?.("confirming_device_code", "Confirmed device user code on xAI");
1414
+ // Event-driven: next screen is Login with Google or URL change — no fixed 1.2s sleep.
1415
+ // GOOGLE_LOGIN_BUTTON_SELECTORS is a string[] — never .split() it.
1416
+ await waitForPageAdvance(page, {
1417
+ fromUrl,
1418
+ urlMatch: (u) => /sign-in|login|oauth/i.test(u) && u !== fromUrl,
1419
+ selector: [
1420
+ ...GOOGLE_LOGIN_BUTTON_SELECTORS.slice(0, 8),
1421
+ 'button:has-text("Login with Google")',
1422
+ 'button:has-text("Login with email")',
1423
+ ].join(", "),
1424
+ timeout: 10_000,
1425
+ });
1426
+ return true;
1353
1427
  }
1354
1428
 
1355
1429
  async function clickGoogleLoginRole(page) {
@@ -1404,8 +1478,19 @@ async function ensureProviderTermsChecked(page, reportStep) {
1404
1478
  || await locator.click({ force: true, timeout: 3_000 }).then(() => true).catch(() => false);
1405
1479
  if (did) {
1406
1480
  reportStep?.("accepting_provider_terms", "Accepted provider terms for Google login");
1407
- // xAI enables Google SSO only after the checkbox settles.
1408
- await page.waitForTimeout(500);
1481
+ // Wait until Google button enables not a blind sleep.
1482
+ await waitUntil(
1483
+ async () => {
1484
+ try {
1485
+ const btn = page.getByRole("button", { name: /google/i }).first();
1486
+ return (await btn.isVisible().catch(() => false))
1487
+ && (await btn.isEnabled().catch(() => true));
1488
+ } catch {
1489
+ return true;
1490
+ }
1491
+ },
1492
+ { timeout: 2_000, interval: 80 },
1493
+ );
1409
1494
  return true;
1410
1495
  }
1411
1496
  } catch {
@@ -1422,7 +1507,6 @@ async function handleProviderLoginGate(page, reportStep, { allowGoogleClick = tr
1422
1507
  const confirmedExistingDialog = await clickFirstActionable(page, PRIVACY_CONFIRM_BUTTON_SELECTORS);
1423
1508
  if (confirmedExistingDialog) {
1424
1509
  reportStep("accepting_provider_privacy_dialog", "Confirmed provider privacy agreement dialog");
1425
- await page.waitForTimeout(500);
1426
1510
  return true;
1427
1511
  }
1428
1512
 
@@ -1441,39 +1525,29 @@ async function handleProviderLoginGate(page, reportStep, { allowGoogleClick = tr
1441
1525
  const clickedGoogle = clickedGoogleRole || await clickFirstActionable(page, GOOGLE_LOGIN_BUTTON_SELECTORS);
1442
1526
  if (clickedGoogle) {
1443
1527
  reportStep("selecting_google_login", "Selecting Google login");
1444
- await page.waitForTimeout(500);
1445
1528
 
1446
1529
  const confirmedDialog = await clickFirstActionable(page, PRIVACY_CONFIRM_BUTTON_SELECTORS);
1447
1530
  if (confirmedDialog) {
1448
1531
  reportStep("accepting_provider_privacy_dialog", "Confirmed provider privacy agreement dialog");
1449
- await page.waitForTimeout(500);
1450
1532
  }
1451
1533
 
1452
- // Wait for OAuth redirect to Google (or popup) — short timeout; loop retries.
1453
- try {
1454
- await page.waitForURL(
1455
- (url) => {
1456
- try {
1457
- const host = new URL(url).hostname;
1458
- return host === "accounts.google.com"
1459
- || host.endsWith(".accounts.google.com")
1460
- || /^accounts\.google\./i.test(host);
1461
- } catch {
1462
- return false;
1463
- }
1464
- },
1465
- { timeout: 8_000 },
1466
- );
1534
+ // Wait for OAuth redirect to Google (or email field) — event-driven.
1535
+ const reached = await waitForPageAdvance(page, {
1536
+ urlMatch: (u) => isGoogleHostname(u),
1537
+ selector: EMAIL_INPUT_SELECTOR,
1538
+ timeout: 12_000,
1539
+ });
1540
+ if (reached || isGoogleAuthPage(page)) {
1467
1541
  reportStep("google_login_page", "Reached Google sign-in after provider SSO");
1468
- } catch {
1469
- // Popup-based Google SSO: try the newest page
1542
+ } else {
1543
+ // Popup-based Google SSO
1470
1544
  try {
1471
1545
  const ctx = page.context?.();
1472
1546
  const pages = ctx?.pages?.() || [];
1473
1547
  for (let i = pages.length - 1; i >= 0; i -= 1) {
1474
1548
  const p = pages[i];
1475
1549
  const u = p.url?.() || "";
1476
- if (/accounts\.google\.com/i.test(u)) {
1550
+ if (isGoogleHostname(u)) {
1477
1551
  reportStep("google_login_popup", "Google sign-in opened in a popup");
1478
1552
  break;
1479
1553
  }
@@ -1504,12 +1578,11 @@ async function clickXaiDeviceAuthorize(page, reportStep) {
1504
1578
  for (const re of roles) {
1505
1579
  try {
1506
1580
  const btn = page.getByRole("button", { name: re }).first();
1507
- if (await btn.isVisible({ timeout: 250 }).catch(() => false)) {
1581
+ if (await btn.isVisible({ timeout: 200 }).catch(() => false)) {
1508
1582
  const label = (await btn.innerText().catch(() => "")) || "";
1509
1583
  if (/google/i.test(label)) continue;
1510
1584
  await btn.click({ timeout: 3_000 });
1511
1585
  reportStep?.("approving_consent", "Approving xAI device authorization");
1512
- await page.waitForTimeout(600);
1513
1586
  return true;
1514
1587
  }
1515
1588
  } catch {
@@ -1818,30 +1891,38 @@ export async function runGoogleAccountAutomation({
1818
1891
  let deviceApproveAt = 0;
1819
1892
  let deviceInvalidReopenAt = 0;
1820
1893
  let deviceInvalidReopenCount = 0;
1821
- const PASSWORD_RESUBMIT_COOLDOWN_MS = 18_000;
1822
- const EMAIL_RESUBMIT_COOLDOWN_MS = 8_000;
1823
- // Short cooldown: long values blocked re-click after a no-op first SSO attempt.
1824
- const GOOGLE_SSO_COOLDOWN_MS = 8_000;
1825
- // Don't hammer Allow — xAI returns rate_limited after rapid device posts.
1826
- const DEVICE_APPROVE_COOLDOWN_MS = 8_000;
1827
- const DEVICE_INVALID_REOPEN_COOLDOWN_MS = 8_000;
1894
+ // Cooldowns prevent double-submit only — not artificial pacing.
1895
+ const PASSWORD_RESUBMIT_COOLDOWN_MS = isGrokish(serviceLabel) ? 6_000 : 18_000;
1896
+ const EMAIL_RESUBMIT_COOLDOWN_MS = isGrokish(serviceLabel) ? 3_000 : 8_000;
1897
+ const GOOGLE_SSO_COOLDOWN_MS = isGrokish(serviceLabel) ? 3_000 : 8_000;
1898
+ // Don't hammer Allow — xAI rate_limits rapid device posts.
1899
+ const DEVICE_APPROVE_COOLDOWN_MS = 3_000;
1900
+ const DEVICE_INVALID_REOPEN_COOLDOWN_MS = 4_000;
1828
1901
  const DEVICE_INVALID_REOPEN_MAX = 3;
1829
- const isGrokFlow = /grok/i.test(String(serviceLabel || ""));
1902
+ const isGrokFlow = isGrokish(serviceLabel);
1830
1903
  // Grok does not need the long Kiro SetSID / kiro:// interstitial window.
1831
- const postPasswordInterstitialMs = isGrokFlow ? 10_000 : 25_000;
1832
- const loopTickMs = isGrokFlow ? 400 : 800;
1904
+ const postPasswordInterstitialMs = isGrokFlow ? 4_000 : 25_000;
1905
+ // Loop poll: race successPromise keep tiny so fast networks aren't stalled.
1906
+ const loopTickMs = isGrokFlow ? 120 : 500;
1833
1907
 
1834
1908
  reportStep(openingStep, openingMessage);
1835
1909
  await page.goto(authUrl, { waitUntil: "domcontentloaded", timeout: 60_000 });
1836
- await page.waitForTimeout(isGrokFlow ? 700 : 2_000);
1837
- await waitThroughGoogleInterstitials(page, reportStep, interstitialOpts(isGrokFlow ? 4_000 : 12_000));
1910
+ // Wait for interactive UI (Continue / Google / email), not a fixed sleep.
1911
+ await waitUntil(
1912
+ async () =>
1913
+ isGoogleAuthPage(page)
1914
+ || (await getFirstVisibleLocator(page, 'button:has-text("Continue"), button:has-text("Login with Google"), button:has-text("Google")'))
1915
+ || (await getFirstVisibleLocator(page, EMAIL_INPUT_SELECTOR)),
1916
+ { timeout: isGrokFlow ? 6_000 : 12_000, interval: 80 },
1917
+ );
1918
+ if (!isGrokFlow) {
1919
+ await waitThroughGoogleInterstitials(page, reportStep, interstitialOpts(8_000));
1920
+ }
1838
1921
 
1839
1922
  // Provider shells (xAI device, CodeBuddy, …) must pick Google SSO first.
1840
- // Never type credentials into provider user_code / email fields — that
1841
- // produced email_fill_failed + invalid_code on accounts.x.ai/oauth2/device.
1842
- // xAI: confirm device user_code first, then Google SSO.
1843
- // Retry briefly while SPA mounts Login with Google.
1844
- for (let attempt = 0; attempt < (isGrokFlow ? 8 : 2); attempt += 1) {
1923
+ // Never type credentials into provider user_code / email fields.
1924
+ // xAI: confirm device user_code first, then Google SSO — event-driven retries.
1925
+ for (let attempt = 0; attempt < (isGrokFlow ? 6 : 2); attempt += 1) {
1845
1926
  if (isGoogleAuthPage(page)) break;
1846
1927
  if (await handleXaiDeviceCodeConfirm(page, reportStep)) {
1847
1928
  continue;
@@ -1849,15 +1930,27 @@ export async function runGoogleAccountAutomation({
1849
1930
  if (await handleProviderLoginGate(page, reportStep)) {
1850
1931
  googleLoginSelectedAt = Date.now();
1851
1932
  if (isGoogleAuthPage(page)) break;
1933
+ // Gate already waited for Google URL; only brief yield if still on provider.
1934
+ await yieldMs(50);
1935
+ continue;
1852
1936
  }
1853
- await page.waitForTimeout(600);
1937
+ // SPA not ready — poll for buttons, don't sleep 600ms blindly.
1938
+ const ready = await waitUntil(
1939
+ async () =>
1940
+ (await providerHasGoogleLogin(page))
1941
+ || /enter the code|login with google|continue/i.test(await readPageText(page).catch(() => "")),
1942
+ { timeout: 800, interval: 80 },
1943
+ );
1944
+ if (!ready) await yieldMs(100);
1945
+ }
1946
+ if (!isGrokFlow) {
1947
+ await waitThroughGoogleInterstitials(page, reportStep, interstitialOpts(6_000));
1854
1948
  }
1855
- await waitThroughGoogleInterstitials(page, reportStep, interstitialOpts(isGrokFlow ? 4_000 : 8_000));
1856
1949
 
1857
1950
  // Only fill Google email once we are actually on accounts.google.com.
1858
1951
  if (isGoogleAuthPage(page)) {
1859
1952
  seenGoogleAuth = true;
1860
- const emailInput = await waitForFirstVisibleLocator(page, EMAIL_INPUT_SELECTOR, { timeout: 12_000 });
1953
+ const emailInput = await waitForFirstVisibleLocator(page, EMAIL_INPUT_SELECTOR, { timeout: 10_000 });
1861
1954
  if (emailInput) {
1862
1955
  reportStep("entering_email", "Entering Google email");
1863
1956
  const filled = await fillInputResilient(emailInput, email);
@@ -1867,11 +1960,14 @@ export async function runGoogleAccountAutomation({
1867
1960
  reportStep("submitting_email", "Submitting email");
1868
1961
  await clickFirstVisible(page, NEXT_BUTTON_SELECTORS);
1869
1962
  emailSubmittedAt = Date.now();
1870
- // Wait for the page to transition away from the email step so the
1871
- // polling loop doesn't immediately re-detect the disappearing email
1872
- // field and type the email value into the password input.
1873
- await page.waitForTimeout(isGrokFlow ? 700 : 1_500);
1874
- await waitThroughGoogleInterstitials(page, reportStep, interstitialOpts(isGrokFlow ? 5_000 : 12_000));
1963
+ // Wait for password field (or leave email step) not fixed sleep.
1964
+ await waitForPageAdvance(page, {
1965
+ selector: PASSWORD_INPUT_SELECTOR,
1966
+ timeout: isGrokFlow ? 8_000 : 12_000,
1967
+ });
1968
+ if (!isGrokFlow) {
1969
+ await waitThroughGoogleInterstitials(page, reportStep, interstitialOpts(8_000));
1970
+ }
1875
1971
  }
1876
1972
  }
1877
1973
  } else if (isProviderPage(page)) {
@@ -1907,7 +2003,7 @@ export async function runGoogleAccountAutomation({
1907
2003
  const waited = await waitThroughGoogleInterstitials(
1908
2004
  page,
1909
2005
  reportStep,
1910
- interstitialOpts(isGrokFlow ? 4_000 : 8_000),
2006
+ interstitialOpts(isGrokFlow ? 2_500 : 8_000),
1911
2007
  );
1912
2008
  if (waited) {
1913
2009
  continue;
@@ -1915,11 +2011,11 @@ export async function runGoogleAccountAutomation({
1915
2011
 
1916
2012
  const handledGoogleConsent = await handleGoogleConsent(page, reportStep);
1917
2013
  if (handledGoogleConsent) {
1918
- await waitThroughGoogleInterstitials(
1919
- page,
1920
- reportStep,
1921
- interstitialOpts(isGrokFlow ? 5_000 : 12_000),
1922
- );
2014
+ if (!isGrokFlow) {
2015
+ await waitThroughGoogleInterstitials(page, reportStep, interstitialOpts(12_000));
2016
+ } else {
2017
+ await waitForPageAdvance(page, { timeout: 4_000 });
2018
+ }
1923
2019
  continue;
1924
2020
  }
1925
2021
 
@@ -2009,7 +2105,12 @@ export async function runGoogleAccountAutomation({
2009
2105
  `Device page error — reopening auth URL (${deviceInvalidReopenCount}/${DEVICE_INVALID_REOPEN_MAX})`,
2010
2106
  );
2011
2107
  await page.goto(authUrl, { waitUntil: "domcontentloaded", timeout: 60_000 }).catch(() => null);
2012
- await page.waitForTimeout(1_800);
2108
+ await waitUntil(
2109
+ async () =>
2110
+ (await getFirstVisibleLocator(page, 'button:has-text("Continue"), button:has-text("Allow"), button:has-text("Authorize")'))
2111
+ || (await providerHasGoogleLogin(page)),
2112
+ { timeout: 4_000, interval: 80 },
2113
+ );
2013
2114
  continue;
2014
2115
  }
2015
2116
 
@@ -2063,8 +2164,11 @@ export async function runGoogleAccountAutomation({
2063
2164
  "waiting_after_password",
2064
2165
  `Password already submitted ${Math.round(sincePw / 1000)}s ago — waiting for Google redirect`,
2065
2166
  );
2066
- await waitThroughGoogleInterstitials(page, reportStep, interstitialOpts(8_000));
2067
- await page.waitForTimeout(500);
2167
+ await waitThroughGoogleInterstitials(
2168
+ page,
2169
+ reportStep,
2170
+ interstitialOpts(isGrokFlow ? 2_000 : 6_000),
2171
+ );
2068
2172
  continue;
2069
2173
  }
2070
2174
 
@@ -2072,17 +2176,15 @@ export async function runGoogleAccountAutomation({
2072
2176
  const filled = await fillInputResilient(passwordInput, password);
2073
2177
  if (filled) {
2074
2178
  reportStep("submitting_password", "Submitting password");
2179
+ const prePwUrl = page.url?.() || "";
2075
2180
  await clickFirstVisible(page, NEXT_BUTTON_SELECTORS);
2076
2181
  passwordSubmittedAt = Date.now();
2077
- // Give Google time to leave the password challenge before the next
2078
- // loop iteration can re-detect the still-mounted password field.
2182
+ // Leave password challenge via navigation / URL change / success — no 2.5s sleep.
2079
2183
  await Promise.race([
2080
- page.waitForNavigation({ waitUntil: "domcontentloaded", timeout: 8_000 }).catch(() => null),
2081
- page.waitForTimeout(2_500),
2184
+ page.waitForNavigation({ waitUntil: "domcontentloaded", timeout: isGrokFlow ? 6_000 : 10_000 }).catch(() => null),
2185
+ waitForPageAdvance(page, { fromUrl: prePwUrl, timeout: isGrokFlow ? 6_000 : 10_000 }),
2186
+ successPromise.then(() => null).catch(() => null),
2082
2187
  ]);
2083
- // Password submit often lands on empty SetSID while network completes
2084
- // consent→idpresponse→kiro://. Callback monitor (CDP) settles successPromise.
2085
- // Grok device poll settles faster — shorter interstitial wait.
2086
2188
  await waitThroughGoogleInterstitials(
2087
2189
  page,
2088
2190
  reportStep,
@@ -2090,7 +2192,7 @@ export async function runGoogleAccountAutomation({
2090
2192
  );
2091
2193
  } else {
2092
2194
  reportStep("password_fill_failed", "Could not fill the Google password field; retrying loop");
2093
- await page.waitForTimeout(500);
2195
+ await yieldMs(100);
2094
2196
  }
2095
2197
  continue;
2096
2198
  }
@@ -2103,7 +2205,10 @@ export async function runGoogleAccountAutomation({
2103
2205
  "waiting_after_email",
2104
2206
  `Email already submitted ${Math.round(sinceEmail / 1000)}s ago — waiting for password/next screen`,
2105
2207
  );
2106
- await page.waitForTimeout(500);
2208
+ await waitForPageAdvance(page, {
2209
+ selector: PASSWORD_INPUT_SELECTOR,
2210
+ timeout: Math.max(200, EMAIL_RESUBMIT_COOLDOWN_MS - sinceEmail),
2211
+ });
2107
2212
  continue;
2108
2213
  }
2109
2214
 
@@ -2113,11 +2218,14 @@ export async function runGoogleAccountAutomation({
2113
2218
  reportStep("submitting_email", "Submitting email");
2114
2219
  await clickFirstVisible(page, NEXT_BUTTON_SELECTORS);
2115
2220
  emailSubmittedAt = Date.now();
2116
- await page.waitForTimeout(isGrokFlow ? 600 : 1_500);
2221
+ await waitForPageAdvance(page, {
2222
+ selector: PASSWORD_INPUT_SELECTOR,
2223
+ timeout: isGrokFlow ? 6_000 : 10_000,
2224
+ });
2117
2225
  } else {
2118
2226
  reportStep("email_fill_failed", "Could not fill the Google email field; retrying loop");
2227
+ await yieldMs(80);
2119
2228
  }
2120
- await page.waitForTimeout(400);
2121
2229
  continue;
2122
2230
  }
2123
2231
  }
@@ -2132,7 +2240,7 @@ export async function runGoogleAccountAutomation({
2132
2240
  if (clickedApprove) {
2133
2241
  reportStep("approving_consent", `Approving Google or ${serviceLabel} consent`);
2134
2242
  deviceApproveAt = Date.now();
2135
- await page.waitForTimeout(isGrokFlow ? 500 : 700);
2243
+ await waitForPageAdvance(page, { timeout: isGrokFlow ? 2_000 : 4_000 });
2136
2244
  continue;
2137
2245
  }
2138
2246
  }
@@ -2148,7 +2256,8 @@ export async function runGoogleAccountAutomation({
2148
2256
  } else {
2149
2257
  reportStep("waiting_for_next_screen", `Waiting for the next Google or ${serviceLabel} screen`);
2150
2258
  }
2151
- await page.waitForTimeout(loopTickMs);
2259
+ // Only yield — next loop races successPromise + handlers. Fast net = fast exit.
2260
+ await yieldMs(loopTickMs);
2152
2261
  }
2153
2262
 
2154
2263
  // Final blocked check before generic needs_manual
@@ -2213,4 +2322,9 @@ export const __test__ = {
2213
2322
  fillInputResilient,
2214
2323
  parseSelectorList,
2215
2324
  getFirstVisibleLocator,
2325
+ waitForPageAdvance,
2326
+ waitUntil,
2327
+ handleXaiDeviceCodeConfirm,
2328
+ GOOGLE_LOGIN_BUTTON_SELECTORS,
2329
+ isGrokish,
2216
2330
  };