zevairouter 1.1.14 → 1.1.16

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 (671) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +10 -10
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/prerender-manifest.json +3 -3
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  62. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  63. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  64. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  65. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  66. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  67. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  68. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  69. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  70. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  71. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  72. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  73. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  74. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  75. package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  76. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  77. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  78. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  79. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  80. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  81. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  82. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  83. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  84. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  85. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  86. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  87. package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  88. package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  90. package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  91. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  92. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  93. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  94. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  95. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  96. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  97. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  98. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  99. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  100. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  101. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  102. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  103. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  104. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  105. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  106. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  107. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  109. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  111. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  113. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  115. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  117. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  119. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  125. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  127. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  133. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  135. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js.nft.json +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  299. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js.nft.json +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js.nft.json +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  317. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  319. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  338. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  339. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  340. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  341. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  342. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  343. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  344. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  345. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  346. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  347. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  348. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  349. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  350. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  351. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  352. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  353. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  354. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  355. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  356. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  357. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  358. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  359. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  360. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  361. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  362. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  363. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  364. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  365. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  366. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  367. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  368. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  369. package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
  370. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  371. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  372. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  373. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  374. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  375. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  376. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  377. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
  378. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  379. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  380. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  381. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  382. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
  383. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  384. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
  385. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  386. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  387. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  388. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  389. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  390. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  391. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  392. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  393. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  394. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  395. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  396. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  397. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  398. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  399. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  400. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  401. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  402. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  403. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  404. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  405. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  406. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  407. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  408. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  409. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  410. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  411. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  412. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  413. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  414. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  415. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  416. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  417. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
  418. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  419. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  420. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  421. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  422. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
  423. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  424. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
  425. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  426. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  427. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  428. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  429. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  430. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  431. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  432. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  433. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  434. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  435. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  436. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  437. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  438. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  439. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  440. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  441. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  442. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  443. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  444. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  445. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  446. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  447. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  448. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  449. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  450. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  451. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  452. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  453. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  454. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  455. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  456. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  457. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  458. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +5 -5
  459. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  460. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
  461. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  462. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  463. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +5 -5
  464. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
  465. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +3 -3
  466. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  467. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  468. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  469. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  470. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  471. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  472. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  473. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  474. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  475. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  476. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  477. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  478. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  479. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  480. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  481. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  482. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  483. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  484. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  485. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  486. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  487. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  488. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  489. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  490. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  491. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  492. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  493. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  494. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  495. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  496. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  497. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  498. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  499. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  500. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  501. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  502. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  503. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  504. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  505. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  506. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  507. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  508. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  509. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  510. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  511. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  512. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  513. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  514. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  515. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  516. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  517. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  518. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  519. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  520. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  521. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  522. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  523. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  524. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  525. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  526. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  527. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  528. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  529. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  530. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  531. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
  532. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
  533. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  534. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  535. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  536. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  537. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  538. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  539. package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  540. package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  541. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  542. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  543. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  544. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  545. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  546. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  547. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  548. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  549. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  550. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  551. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  552. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  553. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  554. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  555. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  556. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  557. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  558. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  559. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  560. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  561. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  562. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  563. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  564. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  565. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  566. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  567. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  568. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  569. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  570. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  571. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  572. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  573. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  574. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  575. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  576. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  577. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  578. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  579. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  580. package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  581. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  582. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  583. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  584. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  585. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  586. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  587. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  588. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  589. package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
  590. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  591. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  592. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  593. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  594. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  595. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  596. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  597. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  598. package/cli/app/.next-cli-build/server/app/landing.rsc +4 -4
  599. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  600. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  601. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  602. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  603. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  604. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  605. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  606. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  607. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  608. package/cli/app/.next-cli-build/server/app/login.rsc +4 -4
  609. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  610. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  611. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  612. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  613. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  614. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  615. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  616. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  617. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  618. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -1
  619. package/cli/app/.next-cli-build/server/app-paths-manifest.json +10 -10
  620. package/cli/app/.next-cli-build/server/chunks/1051.js +1 -0
  621. package/cli/app/.next-cli-build/server/chunks/1131.js +1 -1
  622. package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
  623. package/cli/app/.next-cli-build/server/chunks/1585.js +1 -1
  624. package/cli/app/.next-cli-build/server/chunks/1890.js +1 -0
  625. package/cli/app/.next-cli-build/server/chunks/3101.js +1 -0
  626. package/cli/app/.next-cli-build/server/chunks/3949.js +1 -1
  627. package/cli/app/.next-cli-build/server/chunks/3999.js +2 -2
  628. package/cli/app/.next-cli-build/server/chunks/4456.js +1 -0
  629. package/cli/app/.next-cli-build/server/chunks/4827.js +1 -1
  630. package/cli/app/.next-cli-build/server/chunks/4897.js +1 -1
  631. package/cli/app/.next-cli-build/server/chunks/492.js +1 -1
  632. package/cli/app/.next-cli-build/server/chunks/5436.js +1 -1
  633. package/cli/app/.next-cli-build/server/chunks/5545.js +1 -0
  634. package/cli/app/.next-cli-build/server/chunks/6651.js +8 -2
  635. package/cli/app/.next-cli-build/server/chunks/6802.js +1 -1
  636. package/cli/app/.next-cli-build/server/chunks/6846.js +1 -0
  637. package/cli/app/.next-cli-build/server/chunks/709.js +1 -1
  638. package/cli/app/.next-cli-build/server/chunks/7319.js +13 -7
  639. package/cli/app/.next-cli-build/server/chunks/7634.js +1 -1
  640. package/cli/app/.next-cli-build/server/chunks/8255.js +1 -1
  641. package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
  642. package/cli/app/.next-cli-build/server/chunks/8574.js +1 -0
  643. package/cli/app/.next-cli-build/server/chunks/8675.js +1 -0
  644. package/cli/app/.next-cli-build/server/chunks/8895.js +3 -3
  645. package/cli/app/.next-cli-build/server/chunks/891.js +1 -1
  646. package/cli/app/.next-cli-build/server/chunks/8910.js +2 -2
  647. package/cli/app/.next-cli-build/server/chunks/9489.js +1 -1
  648. package/cli/app/.next-cli-build/server/chunks/9609.js +1 -1
  649. package/cli/app/.next-cli-build/server/chunks/9835.js +1 -1
  650. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  651. package/cli/app/.next-cli-build/server/middleware.js +1 -1
  652. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  653. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  654. package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  655. package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  656. package/cli/app/.next-cli-build/static/chunks/{3339-821ef5f316467690.js → 3339-64988ecee3f7f9c0.js} +6 -6
  657. package/cli/app/.next-cli-build/static/chunks/{620-93b74e9264d85bbf.js → 620-784f37768886fbf3.js} +1 -1
  658. package/cli/app/CHANGELOG.md +22 -0
  659. package/cli/app/package.json +1 -1
  660. package/cli/package.json +1 -1
  661. package/package.json +1 -1
  662. package/cli/app/.next-cli-build/server/chunks/2456.js +0 -1
  663. package/cli/app/.next-cli-build/server/chunks/2557.js +0 -1
  664. package/cli/app/.next-cli-build/server/chunks/4315.js +0 -1
  665. package/cli/app/.next-cli-build/server/chunks/7432.js +0 -1
  666. package/cli/app/.next-cli-build/server/chunks/7611.js +0 -1
  667. package/cli/app/.next-cli-build/server/chunks/8136.js +0 -1
  668. package/cli/app/.next-cli-build/server/chunks/8491.js +0 -1
  669. package/cli/app/.next-cli-build/server/chunks/8653.js +0 -1
  670. /package/cli/app/.next-cli-build/static/{Whwk0WxYLI-ZpEDQLB8V2 → jXL9_EAekq0j4H3BwWaYy}/_buildManifest.js +0 -0
  671. /package/cli/app/.next-cli-build/static/{Whwk0WxYLI-ZpEDQLB8V2 → jXL9_EAekq0j4H3BwWaYy}/_ssgManifest.js +0 -0
@@ -1,5 +1,27 @@
1
1
  # Unreleased
2
2
 
3
+ # v1.1.16 (2026-09-03)
4
+
5
+ ## Fixes
6
+ - **Accounts with provider-rejected refresh tokens are quarantined immediately instead of retried every request.** The structured `reauth_required` classification is no longer dropped for non-Kiro providers, so a dead Codex/Antigravity/xAI credential stops being re-selected, stops sending expired tokens upstream, and the dashboard asks for a re-login. Provider wording like "token is expired" and a post-refresh 401 now count as terminal auth failures.
7
+ - **Dead OAuth credentials no longer flood quota sweeps.** Transient refresh failures back off exponentially per connection (5m–6h), doomed usage fetches are skipped when no usable access token exists, refresh-rejection quarantine covers all OAuth providers (previously Codex only), and user-initiated refreshes still bypass the backoff. This ends the thousands of daily `Kiro social refresh failed { status: 403 }` log lines on installs with revoked accounts.
8
+ - **Claude Code Kiro sessions reuse the upstream prompt cache again.** The Claude→Kiro translator derived a random conversation id per request, so Kiro treated every turn as a new conversation; the id is now stable per connection and opening message, matching the OpenAI route.
9
+ - **Cancelling a stream mid-flight no longer leaks routing state.** Client disconnects finish the attempt lease, release adaptive circuit probes, and a throwing SSE flush still reports the lifecycle, so the dashboard no longer accumulates permanently-pending rows.
10
+ - **Cloudflare tunnel restarts back off instead of storming.** Failed restart attempts now start the cooldown clock, consecutive failures back off exponentially (5s–5m), and the restart gate is taken synchronously so the watchdog, network monitor, and unexpected-exit handlers cannot spawn overlapping cloudflared processes that get the machine rate-limited by TryCloudflare.
11
+ - **MITM DNS bypass survives networks that block Google DNS.** When 8.8.8.8 is unreachable the system resolver is consulted as a fallback, loopback/private answers (the MITM redirect itself) are rejected, and misses are negatively cached for 30 seconds.
12
+ - **Usage statistics no longer load the whole history table into memory.** The raw-history overlay is bounded to a 48-hour window and the dashboard stats stream coalesces full aggregations to one per 3 seconds with a trailing refresh, removing the primary suspect for out-of-memory server restarts on busy installs.
13
+ - **API key limits apply to every /v1 endpoint.** Images, embeddings, text-to-speech, transcription, and video generation now enforce the same model allowlist, daily/monthly budget, and per-minute rate limit as chat.
14
+ - **Malformed request bodies return 400 instead of crashing to 500** for non-object JSON, non-string models, non-array messages, and null message entries.
15
+ - **Background token refresh no longer discards freshly rotated tokens.** The persistence staleness check compares only credential fields, so an unrelated concurrent row write (usage counters, lastError) cannot throw away a refresh token the provider already consumed.
16
+ - **Restoring a backup made before history exclusion no longer fails.** Legacy usage-history rows in old backup payloads are skipped instead of aborting the entire restore on a unique-key conflict.
17
+ - **Re-authenticating an account keeps its operator settings.** OAuth re-login merges providerSpecificData instead of replacing it, preserving proxy pool assignment and per-connection proxy configuration.
18
+ - **The dashboard password hash can no longer be set directly via settings PATCH;** only the verified change-password flow writes it.
19
+
20
+ # v1.1.15 (2026-08-28)
21
+
22
+ ## Fixes
23
+ - **Claude Code requests use Kiro's schema-compatible conversation payload.** Kiro sessions keep canonical tool history, effort metadata, and profile routing while embedding system instructions in the current user turn and using a fresh conversation UUID. Rejected top-level agent/session fields are no longer sent, preventing `400 Improperly formed request` responses from both fresh and resumed Claude Code sessions.
24
+
3
25
  # v1.1.14 (2026-08-28)
4
26
 
5
27
  ## Fixes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard",
5
5
  "bin": {
6
6
  "zevai": "cli/cli.js"
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter-cli",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "private": true,
5
5
  "description": "ZevaiRouter CLI - Start and manage ZevaiRouter server",
6
6
  "bin": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard",
5
5
  "bin": {
6
6
  "zevai": "cli/cli.js"
@@ -1 +0,0 @@
1
- exports.id=2456,exports.ids=[1998,2456,3662,4720],exports.modules={2636:(a,b,c)=>{"use strict";c.d(b,{e:()=>function a(b){if(!b||"object"!=typeof b)return b;if(Array.isArray(b)){for(let c of b)a(c);return b}if(b.properties&&"object"==typeof b.properties&&!Array.isArray(b.properties)){let a=new Map,c=new Set(Object.keys(b.properties).filter(a=>d.test(a)));for(let e of Object.keys(b.properties))d.test(e)||a.set(e,function(a,b){let c=a.replace(/[^a-zA-Z0-9_.-]/g,"_").slice(0,64);0===c.length&&(c="_");let d=c,e=1;for(;b.has(d);){let a=`_${e++}`;d=c.slice(0,64-a.length)+a}return b.add(d),d}(e,c));for(let[c,d]of a)b.properties[d]=b.properties[c],delete b.properties[c];a.size>0&&Array.isArray(b.required)&&(b.required=b.required.map(b=>a.get(b)||b))}for(let c of Object.values(b))c&&"object"==typeof c&&a(c);return b}});let d=/^[a-zA-Z0-9_.-]{1,64}$/},3662:(a,b,c)=>{"use strict";c.d(b,{EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i,wf:()=>g});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"permission_denied"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"Access forbidden by upstream provider.",404:"Model not found",406:"Model not supported",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:3e5,maxLevel:15},g=3e4,h=6048e5,i=[{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"improperly formed request",cooldownMs:12e4},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:408,cooldownMs:5e3},{status:409,cooldownMs:5e3},{status:429,backoff:!0}]},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>i,X3:()=>k,eh:()=>f.eh,fg:()=>e.fg,h0:()=>h,oc:()=>j,vQ:()=>g});var d=c(39006),e=c(75681),f=c(81329);let g={name:"ZevaiRouter",description:"AI Infrastructure Management",version:d.version},h={npmPackageName:"zevairouter",installCmd:"npm i -g zevairouter",installCmdLatest:"npm i -g zevairouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:1997},i={maxLines:200,pollIntervalMs:1e3},j={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}},k={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat","notion-ai":"https://app.notion.com/api/v3/runInferenceTranscript"}},39326:(a,b,c)=>{"use strict";c.d(b,{B:()=>h,p:()=>g});var d=c(71998);function e(a){return null==a?"":String(a).trim()}let f=new Map;function g(a,b,c){if(!a||0===a.length)return null;if(1===a.length)return a[0];if("round-robin"===b){let b=f.get(c)||{index:-1};return b.index=(b.index+1)%a.length,f.set(c,b),a[b.index]}return"random"===b?a[Math.floor(Math.random()*a.length)]:a[0]}async function h(a={}){try{let b=e(a?.proxyPoolId),c="__none__"===b?"":b,f=function(a={}){let b=a?.connectionProxyEnabled===!0,c=e(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:e(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=e(a?.proxyUrl),f=e(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type||"cloudflare"===a.type||"deno"===a.type)return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:f,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:f,strictProxy:!0===a.strictProxy}}}if(f.connectionProxyEnabled&&f.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...f};return{source:"none",proxyPoolId:c||null,proxyPool:null,...f}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},47293:(a,b,c)=>{"use strict";c.d(b,{A:()=>f});let d=new Uint8Array(16);var e=c(50122);let f=function(a,b,c){return b||a||!crypto.randomUUID?function(a,b,c){let f=(a=a||{}).random??a.rng?.()??crypto.getRandomValues(d);if(f.length<16)throw Error("Random bytes length must be >= 16");if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,b){if((c=c||0)<0||c+16>b.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[c+a]=f[a];return b}return(0,e.k)(f)}(a,b,c):crypto.randomUUID()}},47593:(a,b,c)=>{"use strict";c.d(b,{KZ:()=>j,S6:()=>g,Yr:()=>n,f6:()=>k,fc:()=>f,kU:()=>h,pT:()=>i,w_:()=>l});var d=c(2636);let e=["minLength","maxLength","exclusiveMinimum","exclusiveMaximum","pattern","minItems","maxItems","format","default","examples","$schema","$defs","definitions","const","$ref","$comment","additionalProperties","propertyNames","patternProperties","enumDescriptions","anyOf","oneOf","allOf","not","dependencies","dependentSchemas","dependentRequired","title","if","then","else","contentMediaType","contentEncoding","cornerRadius","fillColor","fontFamily","fontSize","fontWeight","gap","padding","strokeColor","strokeThickness","textColor"],f=[{category:"HARM_CATEGORY_HATE_SPEECH",threshold:"OFF"},{category:"HARM_CATEGORY_DANGEROUS_CONTENT",threshold:"OFF"},{category:"HARM_CATEGORY_SEXUALLY_EXPLICIT",threshold:"OFF"},{category:"HARM_CATEGORY_HARASSMENT",threshold:"OFF"},{category:"HARM_CATEGORY_CIVIC_INTEGRITY",threshold:"OFF"}];function g(a){let b=[];if("string"==typeof a)b.push({text:a});else if(Array.isArray(a)){for(let c of a)if("text"===c.type)b.push({text:c.text});else if("image_url"===c.type&&c.image_url?.url?.startsWith("data:")){let a=c.image_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}else if("image_url"===c.type&&c.image_url?.url&&(c.image_url.url.startsWith("http://")||c.image_url.url.startsWith("https://")))b.push({fileData:{fileUri:c.image_url.url,mimeType:"image/*"}});else if("input_audio"===c.type&&c.input_audio?.data){let a=c.input_audio.format||"wav",d="mp3"===a?"audio/mpeg":`audio/${a}`;b.push({inlineData:{mime_type:d,data:c.input_audio.data}})}else if("audio_url"===c.type&&c.audio_url?.url?.startsWith("data:")){let a=c.audio_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}}return b}function h(a){return"string"==typeof a?a:Array.isArray(a)?a.filter(a=>"text"===a.type).map(a=>a.text).join(""):""}function i(a){if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return null}}function j(){return`agent-${crypto.randomUUID()}`}function k(){return crypto.randomUUID()+Date.now().toString()}function l(){let a=["useful","bright","swift","calm","bold"],b=["fuze","wave","spark","flow","core"],c=a[Math.floor(Math.random()*a.length)],d=b[Math.floor(Math.random()*b.length)];return`${c}-${d}-${crypto.randomUUID().slice(0,5)}`}function m(a){let b=0,c=-1;for(let d=0;d<a.length;d++){let e=a[d],f=0,g=e.type;"object"===g||e.properties?f=3:"array"===g||e.items?f=2:g&&"null"!==g&&(f=1),f>c&&(c=f,b=d)}return b}function n(a){return a&&"object"==typeof a&&(!function a(b){if(b&&"object"==typeof b)for(let c of(void 0===b.const||b.enum||(b.enum=[b.const],delete b.const),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b)for(let c of(b.enum&&Array.isArray(b.enum)&&(b.enum=b.enum.map(a=>String(a)),b.type||(b.type="string")),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b){if(b.allOf&&Array.isArray(b.allOf)){let a={};for(let c of b.allOf)if(c.properties&&(a.properties||(a.properties={}),Object.assign(a.properties,c.properties)),c.required&&Array.isArray(c.required))for(let b of(a.required||(a.required=[]),c.required))a.required.includes(b)||a.required.push(b);delete b.allOf,a.properties&&(b.properties={...b.properties,...a.properties}),a.required&&(b.required=[...b.required||[],...a.required])}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.anyOf&&Array.isArray(b.anyOf)&&b.anyOf.length>0){let a=b.anyOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=m(a),d=a[c];delete b.anyOf,Object.assign(b,d)}}if(b.oneOf&&Array.isArray(b.oneOf)&&b.oneOf.length>0){let a=b.oneOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=m(a),d=a[c];delete b.oneOf,Object.assign(b,d)}}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.type&&Array.isArray(b.type)){let a=b.type.filter(a=>"null"!==a);b.type=a.length>0?a[0]:"string"}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b)for(let c of(b.properties&&!b.type&&(b.type="object"),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b,c){if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.keys(b)){if(c.includes(d)||d.startsWith("x-")){delete b[d];continue}let e=b[d];e&&"object"==typeof e&&a(e,c)}}}(a,e),!function a(b){if(b&&"object"==typeof b){if(b.required&&Array.isArray(b.required)&&b.properties){let a=b.required.filter(a=>Object.prototype.hasOwnProperty.call(b.properties,a));0===a.length?delete b.required:b.required=a}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),(0,d.e)(a),!function a(b){if(b&&"object"==typeof b)for(let c of("object"!==b.type||b.properties&&0!==Object.keys(b.properties).length||(b.properties={reason:{type:"string",description:"Brief explanation of why you are calling this tool"}},b.required=["reason"]),Object.values(b)))c&&"object"==typeof c&&a(c)}(a)),a}},50122:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},52060:(a,b,c)=>{"use strict";c.d(b,{A:()=>d,C:()=>e});let d="2.135.0",e=`CLI/${d} CodeBuddy/${d}`},66811:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{F:()=>y});var e=c(89718),f=c(39326),g=c(74926),h=c(75681),i=c(30869),j=c(83477),k=c(35024),l=c(55330),m=c(12557),n=c(53225),o=c(93943),p=c(92990),q=c(63912),r=c(15626),s=a([l]);l=(s.then?(await s)():s)[0];let z={claude:{checkExpiry:!0,refreshable:!0},codex:{url:"https://chatgpt.com/backend-api/codex/responses",method:"POST",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{"Content-Type":"application/json",originator:"codex_cli_rs","User-Agent":"codex_cli_rs/0.136.0"},body:JSON.stringify({model:"gpt-5.3-codex",input:[],stream:!1,store:!1}),acceptStatuses:[400],refreshable:!0},"gemini-cli":{url:"https://www.googleapis.com/oauth2/v1/userinfo?alt=json",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!0},antigravity:{url:"https://www.googleapis.com/oauth2/v1/userinfo?alt=json",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!0},github:{url:"https://api.github.com/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{"User-Agent":"ZevaiRouter",Accept:"application/vnd.github+json"}},iflow:{buildUrl:a=>`https://iflow.cn/api/oauth/getUserInfo?accessToken=${encodeURIComponent(a)}`,method:"GET",noAuth:!0},qwen:{checkExpiry:!0,refreshable:!0},kiro:{checkExpiry:!0,refreshable:!0},qoder:{url:"https://openapi.qoder.sh/api/v1/userinfo",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!1},kimi:{checkExpiry:!0,refreshable:!0},"kimi-coding":{checkExpiry:!0,refreshable:!0},cursor:{tokenExists:!0},kilocode:{url:`${p.MZ.apiBaseUrl}/api/profile`,method:"GET",authHeader:"Authorization",authPrefix:"Bearer "},cline:{refreshable:!0},clinepass:{refreshable:!0},kimchi:{url:p.Td.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{Accept:"application/json","User-Agent":"kimchi/0.1.40"},refreshable:!1},"grok-cli":{url:k.xq["grok-cli"]?.userUrl||"https://cli-chat-proxy.grok.com/v1/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{Accept:"application/json",...k.xq["grok-cli"]?.headers||{"User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-identifier":"grok-pager","x-grok-client-version":"0.2.93"}},refreshable:!0},gitlab:{url:"https://gitlab.com/api/v4/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer "},codebuddy:{tokenExists:!0},"codebuddy-cn":{tokenExists:!0}};async function t(a){return await fetch("https://api.cline.bot/api/v1/users/me",{method:"GET",headers:(0,r.buildClineHeaders)(a,{Accept:"application/json"})})}async function u(a){let b=a.provider,c=a.refreshToken;if(!c)return null;try{if("gemini-cli"===b||"antigravity"===b){let a="gemini-cli"===b?p.LT:p.YT,d=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:a.clientId,client_secret:a.clientSecret,grant_type:"refresh_token",refresh_token:c})});if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,expiresIn:e.expires_in,refreshToken:e.refresh_token||c}}if("codex"===b||"grok-cli"===b||"xai"===b)return await (0,o.Vq)(b,a,console);if("claude"===b){let a=await fetch(p.OV.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:c,client_id:p.OV.clientId})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("kiro"===b){let b=a.providerSpecificData||{},d=b.clientId||a.clientId,e=b.clientSecret||a.clientSecret,f=b.region||a.region;if(d&&e){let a=`https://oidc.${f||"us-east-1"}.amazonaws.com/token`,b=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:d,clientSecret:e,refreshToken:c,grantType:"refresh_token"})});if(!b.ok)return null;let g=await b.json();return{accessToken:g.accessToken,expiresIn:g.expiresIn||3600,refreshToken:g.refreshToken||c}}let g=await fetch(p.Tx.socialRefreshUrl,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"kiro-cli/2.12.2"},body:JSON.stringify({refreshToken:c})});if(!g.ok)return null;let h=await g.json();return{accessToken:h.accessToken,expiresIn:h.expiresIn||3600,refreshToken:h.refreshToken||c}}if("qwen"===b){let a=await fetch(p.Hp.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:c,client_id:p.Hp.clientId})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("cline"===b||"clinepass"===b){let a=await fetch(p.lB.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:c,grantType:"refresh_token",clientType:"extension"})});if(!a.ok)return null;let b=await a.json(),d=b?.data||b,e=d?.expiresAt?Math.max(1,Math.floor((new Date(d.expiresAt).getTime()-Date.now())/1e3)):3600;return{accessToken:d?.accessToken,expiresIn:e,refreshToken:d?.refreshToken||c}}if("codebuddy"===b||"codebuddy-cn"===b){let a="codebuddy-cn"===b?p.ne:p.Nl,d=await fetch(a.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":a.domain,"X-Refresh-Token":c,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!d.ok)return null;let e=await d.json(),f=e?.data||e,g=f?.accessToken||f?.access_token;if(!g)return null;return{accessToken:g,expiresIn:f?.expiresIn||f?.expires_in||86400,refreshToken:f?.refreshToken||f?.refresh_token||c}}return null}catch(a){return console.log(`Error refreshing ${b} token:`,a.message),null}}async function v(a,b=null){if("autoclaw"===a.provider){if(!a.accessToken)return{valid:!1,error:"No access token",refreshed:!1};try{let{AUTOCLAW_WALLET_ENDPOINT:d,buildAutoClawWalletHeaders:e}=await Promise.resolve().then(c.bind(c,42693)),f=await w(d,{method:"GET",headers:e(a.accessToken)},b);if(!f.ok){if(401===f.status||403===f.status)return{valid:!1,error:"Token invalid or revoked",refreshed:!1};return{valid:!1,error:`AutoClaw API returned ${f.status}`,refreshed:!1}}let g=await f.json().catch(()=>null);if(g&&0===g.code)return{valid:!0,error:null,refreshed:!1,newTokens:null};return{valid:!1,error:"Token invalid or revoked",refreshed:!1}}catch(a){return{valid:!1,error:a.message,refreshed:!1}}}let d=z[a.provider];if(!d)return{valid:!1,error:"Provider test not supported",refreshed:!1};if(!a.accessToken)return{valid:!1,error:"No access token",refreshed:!1};if(d.tokenExists)return{valid:!0,error:null,refreshed:!1,newTokens:null};let e=a.accessToken,f=!1,g=null,h=(0,o.fp)(a.provider,a);if(d.refreshable&&h&&a.refreshToken){let b=await u(a);if(!b)return{valid:!1,error:"Token expired and refresh failed",refreshed:!1};e=b.accessToken,f=!0,g=b}if(d.checkExpiry)return f?{valid:!0,error:null,refreshed:f,newTokens:g}:h?{valid:!1,error:"Token expired",refreshed:!1}:{valid:!0,error:null,refreshed:!1,newTokens:null};if("cline"===a.provider||"clinepass"===a.provider){let b=async a=>{let b=await t(a);return b.ok?{valid:!0,error:null,refreshed:f,newTokens:g}:401===b.status?{valid:!1,error:"Token invalid or revoked",refreshed:f}:403===b.status?{valid:!1,error:"Access denied",refreshed:f}:{valid:!1,error:`API returned ${b.status}`,refreshed:f}},c=await b(e);if(c.valid||"Token invalid or revoked"!==c.error||!a.refreshToken)return c;let d=await u(a);return d?.accessToken?(f=!0,g=d,e=d.accessToken,await b(e)):{valid:!1,error:"Token invalid or revoked",refreshed:!1}}try{let c=d.buildUrl?d.buildUrl(e):d.url,h=d.noAuth?{...d.extraHeaders}:{[d.authHeader]:`${d.authPrefix}${e}`,...d.extraHeaders},i={method:d.method,headers:h};d.body&&(i.body=d.body);let j=await w(c,i,b);if(j.ok||d.acceptStatuses&&d.acceptStatuses.includes(j.status))return{valid:!0,error:null,refreshed:f,newTokens:g};if(401===j.status&&d.refreshable&&!f&&a.refreshToken){let e=await u(a);if(e){let a=d.buildUrl?d.buildUrl(e.accessToken):c,f=d.noAuth?{...d.extraHeaders}:{[d.authHeader]:`${d.authPrefix}${e.accessToken}`,...d.extraHeaders},g={method:d.method,headers:f};d.body&&(g.body=d.body);let h=await w(a,g,b);if(h.ok||d.acceptStatuses&&d.acceptStatuses.includes(h.status))return{valid:!0,error:null,refreshed:!0,newTokens:e}}return{valid:!1,error:"Token invalid or revoked",refreshed:!1}}if(401===j.status)return{valid:!1,error:"Token invalid or revoked",refreshed:f};if(403===j.status)return{valid:!1,error:"Access denied",refreshed:f};return{valid:!1,error:`API returned ${j.status}`,refreshed:f}}catch(a){return{valid:!1,error:a.message,refreshed:f}}}async function w(a,b={},d=null){if(d?.vercelRelayUrl){let{proxyAwareFetch:e}=await Promise.resolve().then(c.bind(c,39609));return e(a,b,{vercelRelayUrl:d.vercelRelayUrl})}if(!d?.connectionProxyEnabled||!d?.connectionProxyUrl)return fetch(a,b);let{proxyAwareFetch:e}=await Promise.resolve().then(c.bind(c,39609));return e(a,b,{connectionProxyEnabled:!0,connectionProxyUrl:d.connectionProxyUrl,connectionNoProxy:d.connectionNoProxy||""})}async function x(a,b=null){if((0,h.mq)(a.provider)){let c=a.providerSpecificData?.baseUrl;if(!c)return{valid:!1,error:"Missing base URL"};try{let d=await w(`${c.replace(/\/$/,"")}/models`,{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key or base URL"}}catch(a){return{valid:!1,error:a.message}}}if((0,h.gb)(a.provider)){let c=a.providerSpecificData?.baseUrl;if(!c)return{valid:!1,error:"Missing base URL"};try{(c=c.replace(/\/$/,"")).endsWith("/messages")&&(c=c.slice(0,-9));let d=await w(`${c}/models`,{headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01",Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key or base URL"}}catch(a){return{valid:!1,error:a.message}}}try{switch(a.provider){case"qoder":try{let c=await (0,n.EV)(a,{forceRefresh:!0,proxyOptions:b}),d=Array.isArray(c?.models);return{valid:d,error:d?null:"Qoder PAT validation failed"}}catch{return{valid:!1,error:"Qoder PAT validation failed"}}case"cloudflare-ai":{let c=(a.providerSpecificData||{}).accountId;if(!c)return{valid:!1,error:"Missing Account ID"};let d=`https://api.cloudflare.com/client/v4/accounts/${c}/ai/v1/chat/completions`,e=await w(d,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:(0,j.fZ)("cloudflare-ai"),messages:[{role:"user",content:"test"}],max_tokens:1})},b),f=401!==e.status&&403!==e.status&&404!==e.status;return{valid:f,error:f?null:"Invalid API token or Account ID"}}case"azure":{let c=a.providerSpecificData||{},d=(c.azureEndpoint||"").replace(/\/$/,""),e=c.deployment||"gpt-4",f=c.apiVersion||"2024-10-01-preview",g=`${d}/openai/deployments/${e}/chat/completions?api-version=${f}`,h={"api-key":a.apiKey,"Content-Type":"application/json"};c.organization&&(h["OpenAI-Organization"]=c.organization);let i=await w(g,{method:"POST",headers:h,body:JSON.stringify({messages:[{role:"user",content:"test"}],max_completion_tokens:1})},b),j=401!==i.status&&403!==i.status;return{valid:j,error:j?null:"Invalid API key or Azure configuration"}}case"openai":{let c=await w("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"vercel-ai-gateway":{let c=await w("https://ai-gateway.vercel.sh/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"anthropic":{let c=await w("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"claude-3-haiku-20240307",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"gemini":{let c=await w(`https://generativelanguage.googleapis.com/v1/models?key=${a.apiKey}`,{},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"openrouter":{let c=await w("https://openrouter.ai/api/v1/auth/key",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"glm":{let c=await w("https://api.z.ai/api/anthropic/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"glm-4.7",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"glm-cn":{let c=await w("https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:"glm-4.7",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"minimax":case"minimax-cn":{let c=await w({minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages"}[a.provider],{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"minimax-m2",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"kimi":{let c=await w("https://api.kimi.com/coding/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"kimi-latest",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"alicode":case"alicode-intl":case"alims-intl":{let c="alims-intl"===a.provider?"https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions":"alicode-intl"===a.provider?"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions":"https://coding.dashscope.aliyuncs.com/v1/chat/completions",d=await w(c,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:(0,j.fZ)(a.provider),max_tokens:1,messages:[{role:"user",content:"test"}]})},b),e=401!==d.status&&403!==d.status;return{valid:e,error:e?null:"Invalid API key"}}case"volcengine-ark":case"byteplus":{let c=await w(i.X3[a.provider],{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:(0,j.fZ)(a.provider),max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"deepseek":{let c=await w("https://api.deepseek.com/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"groq":{let c=await w("https://api.groq.com/openai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"mistral":{let c=await w("https://api.mistral.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"xai":{let c=await w("https://api.x.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nvidia":{let c=await w("https://integrate.api.nvidia.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"perplexity":{let c=await w("https://api.perplexity.ai/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"together":{let c=await w("https://api.together.xyz/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"fireworks":{let c=await w("https://api.fireworks.ai/inference/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"cerebras":{let c=await w("https://api.cerebras.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"cohere":{let c=await w("https://api.cohere.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nebius":{let c=await w("https://api.studio.nebius.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"siliconflow":{let c=await w("https://api.siliconflow.cn/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"hyperbolic":{let c=await w("https://api.hyperbolic.xyz/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"ollama":{let b=await fetch("https://ollama.com/api/tags",{headers:{Authorization:`Bearer ${a.apiKey}`}});return{valid:b.ok,error:b.ok?null:"Invalid API key"}}case"ollama-local":{let b=(0,k.Ak)(a),c=await fetch(`${b}/api/tags`);return{valid:c.ok,error:c.ok?null:`Ollama not reachable at ${b}`}}case"deepgram":{let c=await w("https://api.deepgram.com/v1/projects",{headers:{Authorization:`Token ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"assemblyai":{let c=await w("https://api.assemblyai.com/v1/account",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nanobanana":{let c=await w("https://api.nanobananaapi.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"fal-ai":{let c=await w("https://api.fal.ai/v1/models?limit=1",{headers:{Authorization:`Key ${a.apiKey}`}},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"chutes":{let c=await w("https://llm.chutes.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"grok-web":{let c=a.apiKey.startsWith("sso=")?a.apiKey.slice(4):a.apiKey,d=a=>Array.from(crypto.getRandomValues(new Uint8Array(a)),a=>a.toString(16).padStart(2,"0")).join(""),e=Buffer.from("e:TypeError: Cannot read properties of null (reading 'children')").toString("base64"),f=await w("https://grok.com/rest/app-chat/conversations/new",{method:"POST",headers:{Accept:"*/*","Content-Type":"application/json",Cookie:`sso=${c}`,Origin:"https://grok.com",Referer:"https://grok.com/","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","x-statsig-id":e,"x-xai-request-id":crypto.randomUUID(),traceparent:`00-${d(16)}-${d(8)}-00`},body:JSON.stringify({temporary:!0,modelName:"grok-4",message:"ping",fileAttachments:[],imageAttachments:[],disableSearch:!1,enableImageGeneration:!1,sendFinalMetadata:!0})},b),g=401!==f.status&&403!==f.status;return{valid:g,error:g?null:"Invalid SSO cookie"}}case"perplexity-web":{let c=a.apiKey;c.startsWith("__Secure-next-auth.session-token=")&&(c=c.slice(33));let d=await w("https://www.perplexity.ai/api/auth/session",{method:"GET",headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36",Cookie:`__Secure-next-auth.session-token=${c}`}},b);if(!d.ok)return{valid:!1,error:"Invalid session cookie"};let e=await d.json().catch(()=>null),f=!!(e&&e.user);return{valid:f,error:f?null:"Session expired — re-paste cookie"}}case"notion-ai":return(0,q.s$)({apiKey:a.apiKey,providerSpecificData:a.providerSpecificData||{},fetchImpl:(a,c)=>w(a,c,b),signal:AbortSignal.timeout(12e3)});case"opencode-go":{let c=await w("https://opencode.ai/zen/go/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a.apiKey}`},body:JSON.stringify({model:(0,j.fZ)("opencode-go"),messages:[{role:"user",content:"ping"}],max_tokens:1,stream:!1})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"xiaomi-mimo":case"xiaomi-tokenplan":{let c=await w(`${{"xiaomi-mimo":"https://api.xiaomimimo.com/v1","xiaomi-tokenplan":"https://token-plan-sgp.xiaomimimo.com/v1"}[a.provider]}/models`,{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"codebuddy":case"codebuddy-cn":{let c="codebuddy-cn"===a.provider?"cb-cn":"cb",d=(0,j.fZ)(c),e=(0,l.SB)(a.provider),f={apiKey:a.apiKey,accessToken:a.accessToken,providerSpecificData:a.providerSpecificData||{}},g=e.buildHeaders(f,!0),h=e.transformRequest(d,{model:d,max_tokens:1,stream:!0,messages:[{role:"user",content:"hi"}]},!0,f),i=await w(e.buildUrl(d,!0,0,f),{method:"POST",headers:g,body:e.prepareRequestBody(h,g)},b);if(i.ok){try{await i.body?.cancel?.()}catch{}return{valid:!0,error:null}}let k=await i.json().catch(()=>null);if(k?.code===11102)return{valid:!1,inconclusive:!0,error:"Test model is not available for this account"};let m=429===i.status||400===i.status;return{valid:m,error:m?null:`Invalid API key (${i.status})`}}case"kiro":{let{KiroService:b}=await c.e(4790).then(c.bind(c,62409)),d=a.providerSpecificData?.region||"us-east-1";try{return await new b().validateApiKey(a.apiKey,d),{valid:!0,error:null}}catch(a){return{valid:!1,error:a?.message||"API key validation failed"}}}default:{let c=k.xq[a.provider];if(!c?.baseUrl||"openai"!==c.format)return{valid:!1,error:"Provider test not supported"};let d={Accept:"application/json",...c.headers||{}};"x-api-key"===c.authHeader?d["X-API-Key"]=a.apiKey:d.Authorization=`Bearer ${a.apiKey}`;let e=c.validateUrl||c.baseUrl.replace(/\/chat\/completions$/,"/models"),f=await w(e,{headers:d},b),g=f.ok||429===f.status;return{valid:g,error:g?null:`Invalid API key (${f.status})`}}}}catch(a){return{valid:!1,error:a.message}}}async function y(a){let b,c=await (0,e.Mc)(a);if(!c)return{valid:!1,error:"Connection not found",latencyMs:0,testedAt:new Date().toISOString()};let d=await (0,f.B)(c.providerSpecificData||{});if(d.connectionProxyEnabled&&d.connectionProxyUrl&&!d.vercelRelayUrl){let b=await (0,g.C)({proxyUrl:d.connectionProxyUrl});if(!b.ok){let c=b.error||`Proxy test failed with status ${b.status}`;return await (0,e.updateProviderConnection)(a,{testStatus:"error",lastError:c,lastErrorAt:new Date().toISOString()}),{valid:!1,error:c,latencyMs:0,testedAt:new Date().toISOString()}}}let h=Date.now();b="apikey"===c.authType||"cookie"===c.authType?await x(c,d):await v(c,d);let i=Date.now()-h,j=b.valid&&!!(0,m.kJ)(c),k=b.inconclusive?{}:{testStatus:b.valid?"active":"error",lastError:b.valid?j?c.lastError:null:b.error,lastErrorAt:b.valid?j?c.lastErrorAt:null:new Date().toISOString()};return b.refreshed&&b.newTokens&&(b.newTokens.accessToken&&(k.accessToken=b.newTokens.accessToken),b.newTokens.refreshToken&&(k.refreshToken=b.newTokens.refreshToken),b.newTokens.idToken&&(k.idToken=b.newTokens.idToken),b.newTokens.lastRefreshAt&&(k.lastRefreshAt=b.newTokens.lastRefreshAt),b.newTokens.expiresIn&&(k.expiresIn=b.newTokens.expiresIn),b.newTokens.expiresIn?k.expiresAt=new Date(Date.now()+1e3*b.newTokens.expiresIn).toISOString():b.newTokens.expiresAt&&(k.expiresAt=b.newTokens.expiresAt),b.newTokens.providerSpecificData&&(k.providerSpecificData={...c.providerSpecificData||{},...b.newTokens.providerSpecificData})),await (0,e.updateProviderConnection)(a,k),{valid:b.valid,error:b.error,refreshed:!!b.refreshed,latencyMs:i,testedAt:new Date().toISOString()}}d()}catch(a){d(a)}})},71998:(a,b,c)=>{"use strict";c.d(b,{Fh:()=>d.Fh,Iu:()=>d.Iu,Kg:()=>d.Kg,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.getModelAliases,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.deleteModelAlias,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},73159:(a,b,c)=>{"use strict";c.d(b,{Ue:()=>j,oT:()=>k,qF:()=>h});let d="https://auth.x.ai",e="/oauth2/authorize",f="/oauth2/token",g="/.well-known/openid-configuration",h="openid profile email offline_access grok-cli:access api:access",i="/callback",j=96,k={clientId:"b1a00492-073a-47ea-816f-4c329264a828",issuer:d,authEndpointPath:e,tokenEndpointPath:f,discoveryPath:g,authorizeUrl:`${d}${e}`,tokenUrl:`${d}${f}`,discoveryUrl:`${d}${g}`,scope:h,apiBaseUrl:"https://api.x.ai/v1",redirectUri:`http://127.0.0.1:56121${i}`,loopbackPort:56121,callbackPath:i,pkceVerifierBytes:96,refreshLeadSeconds:300,userAgent:"grok-cli/zevairouter",codeChallengeMethod:"S256"}},74926:(a,b,c)=>{"use strict";c.d(b,{C:()=>f});var d=c(47774);function e(a){return null==a?"":String(a).trim()}async function f({proxyUrl:a,testUrl:b,timeoutMs:c}={}){let g,h=e(a);if(!h)return{ok:!1,status:400,error:"proxyUrl is required"};let i=e(b)||"https://google.com/",j=Number(c),k=Number.isFinite(j)&&j>0?Math.min(j,3e4):8e3;try{try{g=new d.ProxyAgent({uri:h})}catch(a){return{ok:!1,status:400,error:`Invalid proxy URL: ${a?.message||String(a)}`}}let a=new AbortController,b=Date.now(),c=setTimeout(()=>a.abort(),k);try{let c=await (0,d.hd)(i,{method:"HEAD",dispatcher:g,signal:a.signal,headers:{"User-Agent":"ZevaiRouter"}});return{ok:c.ok,status:c.status,statusText:c.statusText,url:i,elapsedMs:Date.now()-b}}catch(b){let a=b?.name==="AbortError"?"Proxy test timed out":function(a){if(!a)return"Unknown error";let b=a?.message||String(a),c=a?.cause?.code||a?.code,d=a?.cause?.message;return d&&d!==b?c?`${b}: ${d} (${c})`:`${b}: ${d}`:c&&!b.includes(c)?`${b} (${c})`:b}(b);return{ok:!1,status:500,error:a}}finally{clearTimeout(c)}}finally{try{await g?.close?.()}catch{}}}},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{Xg:()=>d.Xg,eh:()=>e,vq:()=>d.vq});var d=c(83477);Object.entries(c(75681).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.vq).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name})))},89718:(a,b,c)=>{"use strict";c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,Iu:()=>d.Iu,K1:()=>d.K1,KJ:()=>d.KJ,KK:()=>d.KK,Kg:()=>d.Kg,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,ME:()=>d.ME,Mc:()=>d.Mc,NR:()=>d.NR,Op:()=>d.Op,PX:()=>d.PX,Pb:()=>d.Pb,Pc:()=>d.Pc,QI:()=>d.QI,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,dK:()=>d.dK,deleteModelAlias:()=>d.fv,ek:()=>d.ek,fK:()=>d.fK,getModelAliases:()=>d.OM,getProviderConnections:()=>d.P,getQuotaSnapshot:()=>d.LF,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,p3:()=>d.p3,qd:()=>d.qd,r4:()=>d.r4,tV:()=>d.tV,uH:()=>d.uH,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yW:()=>d.yW,yg:()=>d.yg,zP:()=>d.zP,zY:()=>d.zY});var d=c(93999)},92990:(a,b,c)=>{"use strict";c.d(b,{DI:()=>i,Hp:()=>k,LT:()=>j,MZ:()=>v,Nl:()=>B,Nu:()=>p,OV:()=>h,RY:()=>F,S6:()=>s,SK:()=>D,Td:()=>y,Tx:()=>q,WN:()=>t,Ww:()=>G,YT:()=>n,ZL:()=>m,cD:()=>o,eD:()=>E,f7:()=>A,hF:()=>l,lB:()=>w,ne:()=>C,qp:()=>z,t:()=>u,w1:()=>x});var d=c(21820),e=c(73159),f=c(52060);function g(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let h={clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",authorizeUrl:"https://claude.ai/oauth/authorize",tokenUrl:"https://api.anthropic.com/v1/oauth/token",scopes:["org:create_api_key","user:profile","user:inference"],codeChallengeMethod:"S256"},i={clientId:"app_EMoamEEZ73f0CkXaXp7hrann",authorizeUrl:"https://auth.openai.com/oauth/authorize",tokenUrl:"https://auth.openai.com/oauth/token",deviceCodeUrl:"https://auth.openai.com/api/accounts/deviceauth/usercode",deviceTokenUrl:"https://auth.openai.com/api/accounts/deviceauth/token",deviceVerificationUrl:"https://auth.openai.com/codex/device",deviceRedirectUri:"https://auth.openai.com/deviceauth/callback",scope:"openid profile email offline_access",codeChallengeMethod:"S256",extraParams:{id_token_add_organizations:"true",codex_cli_simplified_flow:"true",originator:"codex_cli_rs"}},j={clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile"]},k={clientId:"f0304373b74a44d2b584a3fb70ca9e56",deviceCodeUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",scope:"openid profile email model.completion",codeChallengeMethod:"S256"},l={openApiBaseUrl:"https://openapi.qoder.sh",centerBaseUrl:"https://center.qoder.sh",chatBaseUrl:"https://api3.qoder.sh",deviceTokenUrl:"https://openapi.qoder.sh/api/v1/deviceToken/poll",refreshUrl:"https://center.qoder.sh/algo/api/v3/user/refresh_token",userInfoUrl:"https://openapi.qoder.sh/api/v1/userinfo",quotaUsageUrl:"https://openapi.qoder.sh/api/v2/quota/usage",loginUrl:"https://qoder.com/device/selectAccounts"},m={clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",authorizeUrl:"https://iflow.cn/oauth",tokenUrl:"https://iflow.cn/oauth/token",userInfoUrl:"https://iflow.cn/api/oauth/getUserInfo",extraParams:{loginMethod:"phone",type:"phone"}},n={clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/cclog","https://www.googleapis.com/auth/experimentsandconfigs"],apiEndpoint:"https://cloudcode-pa.googleapis.com",apiVersion:"v1internal",loadCodeAssistEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUserEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser",loadCodeAssistUserAgent:"google-api-nodejs-client/9.15.1",loadCodeAssistApiClient:"google-cloud-sdk vscode_cloudshelleditor/0.1",loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:g(),pluginType:2})};function o(){return{ideType:9,platform:g(),pluginType:2}}let p={clientId:"Iv1.b507a08c87ecfe98",deviceCodeUrl:"https://github.com/login/device/code",tokenUrl:"https://github.com/login/oauth/access_token",userInfoUrl:"https://api.github.com/user",scopes:"read:user",apiVersion:"2022-11-28",copilotTokenUrl:"https://api.github.com/copilot_internal/v2/token",userAgent:"GitHubCopilotChat/0.26.7",editorVersion:"vscode/1.85.0",editorPluginVersion:"copilot-chat/0.26.7"},q={ssoOidcEndpoint:"https://oidc.us-east-1.amazonaws.com",registerClientUrl:"https://oidc.us-east-1.amazonaws.com/client/register",deviceAuthUrl:"https://oidc.us-east-1.amazonaws.com/device_authorization",tokenUrl:"https://oidc.us-east-1.amazonaws.com/token",startUrl:"https://view.awsapps.com/start",clientName:"kiro-oauth-client",clientType:"public",scopes:["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations"],grantTypes:["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],issuerUrl:"https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6",socialAuthEndpoint:"https://prod.us-east-1.auth.desktop.kiro.dev",socialLoginUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/login",socialTokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token",socialRefreshUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",authMethods:["builder-id","idc","google","github","import"]},r=/^[a-z]{2}-[a-z]+-\d{1,2}$/;function s(a){if("string"!=typeof a||!r.test(a))throw Error("Invalid region");return a}let t={apiEndpoint:"https://api2.cursor.sh",chatEndpoint:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",modelsEndpoint:"/aiserver.v1.AiService/GetDefaultModelNudgeData",api3Endpoint:"https://api3.cursor.sh",agentEndpoint:"https://agent.api5.cursor.sh",agentNonPrivacyEndpoint:"https://agentn.api5.cursor.sh",clientVersion:"3.1.0",clientType:"ide",tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"},dbKeys:{accessToken:"cursorAuth/accessToken",machineId:"storage.serviceMachineId"}},u={clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||"17e5f671-d194-4dfb-9706-5516cb48c098",deviceCodeUrl:"https://auth.kimi.com/api/oauth/device_authorization",tokenUrl:"https://auth.kimi.com/api/oauth/token"},v={apiBaseUrl:"https://api.kilo.ai",initiateUrl:"https://api.kilo.ai/api/device-auth/codes",pollUrlBase:"https://api.kilo.ai/api/device-auth/codes"},w={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},x={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenUrl:"https://api.cline.bot/api/v1/auth/token",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},y={webAppUrl:"https://app.kimchi.dev",validationUrl:"https://api.cast.ai/v1/llm/openai/supported-providers",userInfoUrl:"https://app.kimchi.dev/api/v1/me",modelsUrl:"https://llm.kimchi.dev/v1/models/metadata?include_in_cli=true"},z={clientId:"b1a00492-073a-47ea-816f-4c329264a828",deviceCodeUrl:"https://auth.x.ai/oauth2/device/code",tokenUrl:"https://auth.x.ai/oauth2/token",refreshUrl:"https://auth.x.ai/oauth2/token",scope:e.qF,referrer:"grok-build",refreshLeadMs:3e5},A={defaultBaseUrl:"https://gitlab.com",authorizeUrlPath:"/oauth/authorize",tokenUrlPath:"/oauth/token",userInfoUrlPath:"/api/v4/user",scope:"api read_user",codeChallengeMethod:"S256"},B={baseUrl:"https://www.codebuddy.ai",stateUrl:"https://www.codebuddy.ai/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.ai/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.ai/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.ai/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.ai/v2/plugin/auth/token/refresh",userAgent:f.C,domain:"www.codebuddy.ai",platform:"CLI",pollInterval:5e3},C={baseUrl:"https://www.codebuddy.cn",stateUrl:"https://www.codebuddy.cn/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.cn/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.cn/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.cn/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.cn/v2/plugin/auth/token/refresh",userAgent:f.C,domain:"www.codebuddy.cn",platform:"CLI",pollInterval:5e3},D={clientId:"ono9krqynydwx5",clientSecret:"-",loginGuidanceUrls:["https://api.marscode.com/cloudide/api/v3/trae/GetLoginGuidance","https://api.trae.ai/cloudide/api/v3/trae/GetLoginGuidance","https://www.trae.ai/cloudide/api/v3/trae/GetLoginGuidance"],apiOrigins:["https://api.marscode.com","https://api.trae.ai","https://www.trae.ai","https://www.marscode.com"],exchangeTokenPath:"/cloudide/api/v3/trae/oauth/ExchangeToken",getUserInfoPath:"/cloudide/api/v3/trae/GetUserInfo",authorizationPath:"/authorization",callbackPath:"/callback",minAppVersion:"3.5.54",defaultAppVersion:"3.5.54",defaultAppType:"stable",defaultPluginVersion:"local",defaultDeviceId:"0",userAgent:"Trae/1.0.0 antigravity-cockpit-tools",webUrl:"https://www.trae.ai",authScheme:"Cloud-IDE-JWT",tokenLifetimeDays:14,oauthTimeoutMs:6e5},E={clientId:"3GUryQ7ldAeKEuD2obYnppsnmj58eP5u",authBaseUrl:"https://www.windsurf.com",signInPath:"/windsurf/signin",registerApiBaseUrl:"https://register.windsurf.com",registerPath:"/exa.seat_management_pb.SeatManagementService/RegisterUser",oneTimeAuthPath:"/exa.seat_management_pb.SeatManagementService/GetOneTimeAuthToken",currentUserPath:"/exa.seat_management_pb.SeatManagementService/GetCurrentUser",planStatusPath:"/exa.seat_management_pb.SeatManagementService/GetPlanStatus",userStatusPath:"/exa.seat_management_pb.SeatManagementService/GetUserStatus",defaultApiServerUrl:"https://server.codeium.com",firebaseApiKey:"AIzaSyDsOl-1XpT5err0Tcn0TFFod1H8gVGIycY",callbackPath:"/windsurf-auth-callback",userAgent:"antigravity-cockpit-tools",oauthTimeoutMs:6e5},F={webBaseUrl:"https://zed.dev",cloudBaseUrl:"https://cloud.zed.dev",llmBaseUrl:"https://cloud.zed.dev",defaultNativeAppPort:58443,oauthTimeoutMs:6e5},G=3e5},96487:()=>{}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=2557,exports.ids=[2557],exports.modules={12557:(a,b,c)=>{c.d(b,{Bl:()=>y,JN:()=>l,LV:()=>v,N2:()=>n,P0:()=>h,Qo:()=>p,S5:()=>C,UM:()=>w,UO:()=>j,V0:()=>x,WP:()=>A,d5:()=>i,hk:()=>o,kJ:()=>B,lI:()=>k,td:()=>E,xB:()=>z,yH:()=>m});var d=c(3662),e=c(83477),f=c(36672);let g=["content_length_exceeds_threshold","input is too long","maximum context length","context length exceeds","prompt is too long","request too large","improperly formed request"];function h(a,b){if(413===a)return!0;let c=b?("string"==typeof b?b:JSON.stringify(b)).toLowerCase():"";return 400===a&&g.some(a=>c.includes(a))}function i(a,b){if(403!==a||!b)return!1;let c="string"==typeof b?b:JSON.stringify(b);return/<!doctype\s+html|<html(?:\s|>)/i.test(c||"")}function j(a){if(!a)return null;let b="string"==typeof a?a:JSON.stringify(a);try{let a=JSON.parse(b),c=a?.code??a?.error?.code;if(Number.isInteger(Number(c)))return Number(c)}catch{}let c=b.match(/(?:"code"\s*:\s*|\bcode\s+)(\d{4,6})\b/i);return c?Number(c[1]):null}function k(a){let b=Object.values(a?.quotas||{}).map(a=>Date.parse(a?.resetAt)).filter(a=>Number.isFinite(a)&&a>Date.now());return b.length?Math.min(...b):null}let l=9e5;function m(a,b=Date.now(),c=l){var d;let e,f,g=Date.parse(a?.fetchedAt);return!Number.isFinite(g)||b-g>c?null:(d=a?.usage,!(f=(e=Object.values(d?.quotas||{})).filter(a=>Number.isFinite(a?.remaining)||Number.isFinite(a?.remainingPercentage))).length||f.length!==e.length||f.some(a=>(Number.isFinite(a.remaining)?a.remaining:a.remainingPercentage)>0)?null:k(d))}function n(a,b,c,d=null,e={}){let f=u(d,b);if(!y(a,b,d)||!function(a,b=null){if(!a)return!1;if("review"===b){if(!0===a.reviewLimitReached)return!1}else if(!0===a.limitReached)return!1;let c=Object.entries(a.quotas||{}).filter(([a])=>"review"===b?a.startsWith("review_"):"normal"!==b||!a.startsWith("review_")).map(([,a])=>a),d=c.map(a=>Number.isFinite(a?.remaining)?a.remaining:Number.isFinite(a?.remainingPercentage)?a.remainingPercentage:null).filter(a=>null!==a);return d.length>0&&d.length===c.length&&d.every(a=>a>0)}(c?.usage,f)||!e.ignoreProbe&&z(a,b,d))return!1;let g=Date.parse(c?.fetchedAt),h=a?.modelLockReason,i=h?.model&&v(d,h.model)===v(d,b)?Date.parse(h?.lockedAt):NaN,j=Date.parse(a?.lastErrorAt),k=Date.parse(a?.updatedAt),l=Number.isFinite(i)?i:Number.isFinite(j)?j:k;return Number.isFinite(g)&&Number.isFinite(l)&&g>l}function o(a,b,c=0){let e=b?("string"==typeof b?b:JSON.stringify(b)).toLowerCase():"";for(let b of d.t2)if(b.text&&e&&e.includes(b.text)||b.status&&b.status===a){if(b.backoff){let a=Math.min(c+1,d.EQ.maxLevel);return{shouldFallback:!0,cooldownMs:function(a=0){let b=Math.max(0,a-1);return Math.min(d.EQ.base*Math.pow(2,b),d.EQ.max)}(a),newBackoffLevel:a}}return{shouldFallback:!0,cooldownMs:b.cooldownMs}}return a>=400&&a<500?{shouldFallback:!1,cooldownMs:0}:{shouldFallback:!0,cooldownMs:d.wf}}function p(a){if(!a)return"";let b=new Date(a).getTime()-Date.now();if(b<=0)return"reset after 0s";let c=Math.ceil(b/1e3),d=Math.floor(c/3600),e=Math.floor(c%3600/60),f=c%60,g=[];return d>0&&g.push(`${d}h`),e>0&&g.push(`${e}m`),(f>0||0===g.length)&&g.push(`${f}s`),`reset after ${g.join(" ")}`}let q="modelLock_",r="modelRecoveryProbe_",s=`${q}__all`,t=/-(?:minimal|xhigh|none|low|medium|high|max|ultra)$/;function u(a,b){if("codex"!==a&&"cx"!==a||!b)return null;if(String(b).startsWith("review:"))return"review";let{cleanModel:c}=(0,f.HP)(String(b));return(0,e.Ad)("cx",c)}function v(a,b){if(!b)return null;if("codex"!==a&&"cx"!==a||String(b).startsWith("review:"))return String(b);let{cleanModel:c}=(0,f.HP)(String(b)),d=(0,e.Ad)("cx",c),g=String((0,e.kt)("cx",c)||c).replace(t,"");return"review"===d?`review:${g}`:g}function w(a,b=null){let c=v(b,a);return c?`${r}${c}`:`${r}__all`}function x(a,b,c=null){if(!a)return null;let d=[...(function(a,b,c=null){let d=v(c,b);return Object.entries(a||{}).filter(([a])=>!!a.startsWith(q)&&a!==s&&v(c,a.slice(q.length))===d)})(a,b,c).map(([,a])=>a),a[s]].map(a=>Date.parse(a)).filter(a=>Number.isFinite(a)&&a>Date.now());return d.length?new Date(Math.max(...d)).toISOString():null}function y(a,b,c=null){return!!x(a,b,c)}function z(a,b,c=null){let d=a?.[w(b,c)];return Number.isFinite(Date.parse(d))&&Date.parse(d)>Date.now()}function A(a,b=null,c=3e5){return{[w(a,b)]:new Date(Date.now()+c).toISOString()}}function B(a){if(!a)return null;let b=null,c=Date.now();for(let[d,e]of Object.entries(a)){if(!d.startsWith(q)||!e)continue;let a=new Date(e).getTime();a<=c||(!b||a<b)&&(b=a)}return b?new Date(b).toISOString():null}function C(a,b,c=null){return{[function(a,b=null){let c=v(b,a);return c?`${q}${c}`:s}(a,c)]:new Date(Date.now()+b).toISOString()}}function D(a){return Number.isFinite(a?.remainingPercentage)?a.remainingPercentage:Number.isFinite(a?.remaining)&&Number.isFinite(a?.total)&&a.total>0?a.remaining/a.total*100:null}function E(a,b,c){let d=a?.quotas;if(!d||"object"!=typeof d)return -1;let e=d[c];if(e)return D(e)??-1;let f=u(b,c),g=Object.entries(d).filter(([a])=>"review"===f?a.startsWith("review_"):"normal"!==f||!a.startsWith("review_")).map(([,a])=>D(a)).filter(a=>null!==a);return g.length?Math.min(...g):-1}},36672:(a,b,c)=>{c.d(b,{C2:()=>h,HP:()=>f,kD:()=>e,sS:()=>g});let d=new Set(["none","off","auto","minimal","low","medium","high","xhigh","max","ultra","on","thinking"]);function e(a){if("string"!=typeof a)return a;let b=a.match(/^(.*)\([^()]+\)\s*$/);return b?b[1].trim():a}function f(a){if("string"!=typeof a)return{cleanModel:a,level:null};let b=a.match(/^(.*)\(([^()]+)\)\s*$/);if(!b)return{cleanModel:a,level:null};let c=b[1].trim(),e=b[2].trim().toLowerCase();return d.has(e)||/^\d+$/.test(e)?"off"===e?{cleanModel:c,level:"none"}:"on"===e||"thinking"===e?{cleanModel:c,level:"high"}:{cleanModel:c,level:e}:{cleanModel:a,level:null}}function g(a){if(!a||"object"!=typeof a)return null;let b=a.output_config?.effort;if("string"==typeof b&&b){let a=b.toLowerCase();return"none"===a||"off"===a?{mode:"none"}:"auto"===a?{mode:"auto"}:{mode:"level",level:a}}let c=a.thinking;if(c&&"object"==typeof c){if("disabled"===c.type)return{mode:"none"};if("adaptive"===c.type||"enabled"===c.type){let a=Number(c.budget_tokens);return Number.isFinite(a)&&a>0?{mode:"budget",budget:a}:{mode:"auto"}}}let d=a.reasoning_effort??("object"==typeof a.reasoning?a.reasoning.effort:null);if("string"==typeof d&&d){let a=d.toLowerCase();return"none"===a||"off"===a?{mode:"none"}:"auto"===a?{mode:"auto"}:{mode:"level",level:a}}let e=a.thinkingConfig||a.generationConfig?.thinkingConfig||a.request?.generationConfig?.thinkingConfig;if(e&&"object"==typeof e){if("string"==typeof e.thinkingLevel)return{mode:"level",level:e.thinkingLevel.toLowerCase()};let a=Number(e.thinkingBudget);if(Number.isFinite(a))return 0===a?{mode:"none"}:a<0?{mode:"auto"}:{mode:"budget",budget:a}}if(!1===a.enable_thinking)return{mode:"none"};if(!0===a.enable_thinking){let b=Number(a.thinking_budget);return Number.isFinite(b)&&b>0?{mode:"budget",budget:b}:{mode:"auto"}}return null}function h(a,b,c){let{cleanModel:d,level:e}=f(a),g=b&&"object"==typeof b?{...b}:b||{},h=e||(c?.mode&&"auto"!==c.mode?c.mode:null);return h?("on"===h?g.thinking||(g={...g,thinking:{type:"enabled",budget_tokens:1e4}}):"off"===h||"none"===h?(g={...g,thinking:{type:"disabled"}},delete g.reasoning_effort,g.reasoning&&"object"==typeof g.reasoning&&(g.reasoning={...g.reasoning,effort:"none"})):g.reasoning_effort||(g={...g,reasoning_effort:h}),{body:g,cleanModel:d,applied:h}):{body:g,cleanModel:d,applied:null}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=4315,exports.ids=[4315],exports.modules={2636:(a,b,c)=>{c.d(b,{e:()=>function a(b){if(!b||"object"!=typeof b)return b;if(Array.isArray(b)){for(let c of b)a(c);return b}if(b.properties&&"object"==typeof b.properties&&!Array.isArray(b.properties)){let a=new Map,c=new Set(Object.keys(b.properties).filter(a=>d.test(a)));for(let e of Object.keys(b.properties))d.test(e)||a.set(e,function(a,b){let c=a.replace(/[^a-zA-Z0-9_.-]/g,"_").slice(0,64);0===c.length&&(c="_");let d=c,e=1;for(;b.has(d);){let a=`_${e++}`;d=c.slice(0,64-a.length)+a}return b.add(d),d}(e,c));for(let[c,d]of a)b.properties[d]=b.properties[c],delete b.properties[c];a.size>0&&Array.isArray(b.required)&&(b.required=b.required.map(b=>a.get(b)||b))}for(let c of Object.values(b))c&&"object"==typeof c&&a(c);return b}});let d=/^[a-zA-Z0-9_.-]{1,64}$/},38160:(a,b,c)=>{c.d(b,{Ou:()=>k,eG:()=>i,gQ:()=>j});var d=c(75924);let e=new Map,f=new Map,g=null;function h(a){return"string"==typeof a?a.trim()||null:a&&"object"==typeof a&&"string"==typeof a.id&&a.id.trim()||null}async function i(a,b,c={}){if(!a||!b)return null;let d=h(c.preferredProjectId),g=e.get(a);if(g&&Date.now()-g.fetchedAt<36e5&&(!d||d===g.projectId))return g.projectId;let j=d?`${a}::${d}`:a;if(f.has(j))return f.get(j).promise;let k=new AbortController,m=(async()=>{try{let c=await l(b,k.signal,{preferredProjectId:d});if(c)return e.set(a,{projectId:c,fetchedAt:Date.now()}),c;return console.warn("[ProjectId] could not fetch projectId for connection",a.slice(0,8)),null}catch(a){return console.warn(`[ProjectId] Error fetching project ID: ${a.message}`),null}finally{f.delete(j)}})();return f.set(j,{promise:m,controller:k,startedAt:Date.now()}),m}async function j(a,b={}){if(!a)return{projectId:null,tierId:null,requiresUserProject:!1,error:"missing access token"};try{return await m(a,void 0,b)}catch(a){return{projectId:null,tierId:null,requiresUserProject:!1,error:a?.message||String(a)}}}function k(a){e.delete(a)}async function l(a,b,c={}){return(await m(a,b,c)).projectId}async function m(a,b,c={}){let e=h(c.preferredProjectId),f=await fetch(d.nZ.loadCodeAssist,{method:"POST",headers:{...d.Ic,Authorization:`Bearer ${a}`},body:JSON.stringify({metadata:d.zv}),signal:b});if(!f.ok){let a=await f.text().catch(()=>"");throw Error(`loadCodeAssist failed: HTTP ${f.status} ${a.slice(0,200)}`)}let g=await f.json(),i=function(a){if(!a)return null;if("string"==typeof a.cloudaicompanionProject){let b=a.cloudaicompanionProject.trim();if(b)return b}if(a.cloudaicompanionProject&&"object"==typeof a.cloudaicompanionProject){let b=a.cloudaicompanionProject.id;if("string"==typeof b&&b.trim())return b.trim()}return null}(g);if(i)return{projectId:i,tierId:o(g).tierId||null,requiresUserProject:!1,loadRaw:g};let j=o(g),k=j.tierId||"free-tier";if(j.userDefined)return e?{projectId:await n(a,k,b,e)||e,tierId:k,requiresUserProject:!0,loadRaw:g,error:void 0}:(console.warn("[ProjectId] GSuite/DASHER has no free-tier project from loadCodeAssist; caller should reuse a stored/peer managed project id."),{projectId:null,tierId:k,requiresUserProject:!0,loadRaw:g,error:"no managed project on account; use stored or peer projectId"});let l=await n(a,k,b,null);return{projectId:l,tierId:k,requiresUserProject:!1,loadRaw:g,error:l?void 0:"onboardUser did not return a project id"}}async function n(a,b,c,e=null){console.log(`[ProjectId] Onboarding user with tier: ${b}`+(e?` project=${e}`:""));let f={tierId:b,metadata:d.zv};e&&(f.cloudaicompanionProject=e);for(let b=1;b<=5&&!c?.aborted;b++){let g=new AbortController,h=setTimeout(()=>g.abort(),3e4),i=()=>g.abort();c?.addEventListener("abort",i);try{let c=await fetch(d.nZ.onboardUser,{method:"POST",headers:{...d.Ic,Authorization:`Bearer ${a}`},body:JSON.stringify(f),signal:g.signal});if(clearTimeout(h),!c.ok){let a=await c.text().catch(()=>"");throw Error(`onboardUser HTTP ${c.status}: ${a.slice(0,200)}`)}let i=await c.json();if(!0===i.done){let a=function(a){if(!a?.response)return null;let b=a.response.cloudaicompanionProject;if("string"==typeof b){let a=b.trim();if(a)return a}if(b&&"object"==typeof b){let a=b.id;if("string"==typeof a&&a.trim())return a.trim()}return null}(i);if(a)return console.log(`[ProjectId] Successfully onboarded, project ID: ${a}`),a;if(e)return console.log(`[ProjectId] onboard done without id; using preferred project ${e}`),e;throw Error("onboardUser done but no project_id in response")}console.log(`[ProjectId] Onboard attempt ${b}/5: not done yet, waiting...`),await new Promise(a=>setTimeout(a,2e3))}catch(a){if(clearTimeout(h),"AbortError"===a.name){if(console.warn(`[ProjectId] onboardUser attempt ${b} aborted (timeout or connection removed)`),c?.aborted)return null;continue}if(5===b)return console.warn(`[ProjectId] onboardUser failed after 5 attempts: ${a.message}`),null;console.warn(`[ProjectId] onboardUser attempt ${b} failed: ${a.message}, retrying...`),await new Promise(a=>setTimeout(a,2e3))}finally{clearTimeout(h),c?.removeEventListener("abort",i)}}return null}function o(a){let b=null,c=!1;if(a?.currentTier?.id&&"string"==typeof a.currentTier.id&&(b=a.currentTier.id.trim(),c=!!a.currentTier.userDefinedCloudaicompanionProject),Array.isArray(a?.allowedTiers)){for(let d of a.allowedTiers)if(d&&"object"==typeof d&&!0===d.isDefault&&d.id){b=String(d.id).trim(),c=!!d.userDefinedCloudaicompanionProject;break}if(!b){let d=a.allowedTiers.find(a=>a?.id==="free-tier");d?(b="free-tier",c=!!d.userDefinedCloudaicompanionProject):a.allowedTiers[0]?.id&&(b=String(a.allowedTiers[0].id).trim(),c=!!a.allowedTiers[0].userDefinedCloudaicompanionProject)}}return"free-tier"===b&&(c=!1),{tierId:b,userDefined:c}}g=setInterval(()=>{try{let a=Date.now();for(let[b,c]of e)(!c||a-c.fetchedAt>=36e5)&&e.delete(b);for(let[b,c]of f){if(!c||"number"!=typeof c.startedAt){f.delete(b);continue}if(a-c.startedAt>12e4){try{c.controller.abort()}catch(a){}f.delete(b)}}}catch(a){console.warn("[ProjectId] cleanup sweep error:",a?.message??a)}},6e5),g?.unref?.()},43659:(a,b,c)=>{c.d(b,{A1:()=>g,lR:()=>i,wO:()=>h,yj:()=>e,zL:()=>f});var d=c(3662);function e(a,b){let c;return new Response(JSON.stringify((c=d.LY[a]||(a>=500?{type:"server_error",code:"internal_server_error"}:{type:"invalid_request_error",code:""}),{error:{message:b||d.O[a]||"An error occurred",type:c.type,code:c.code}})),{status:a,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}async function f(a,b=null){let c="";try{c=await a.text()}catch{c=""}if(b&&"function"==typeof b.parseError)try{let e=b.parseError(a,c);if(e&&"object"==typeof e){let b=e.message||d.O[a.status]||`Upstream error: ${a.status}`,{status:c,message:f,...g}=e;return{statusCode:c||a.status,message:b,...g}}}catch{}let e="";try{let a=JSON.parse(c);e=a.error?.message||a.message||a.error||c}catch{e=c}let g=("string"==typeof e?e:JSON.stringify(e))||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:a.status,message:g}}function g(a,b,c,d=null){return{success:!1,status:a,error:b,resetsAtMs:c,...d&&"object"==typeof d?{failureMetadata:d}:{},response:e(a,b)}}function h(a,b,c,d){let e=Math.max(Math.ceil((new Date(c).getTime()-Date.now())/1e3),1);return new Response(JSON.stringify({error:{message:`${b} (${d})`}}),{status:a,headers:{"Content-Type":"application/json","Retry-After":String(e)}})}function i(a,b,c,d){let e=d||a.code||"FETCH_FAILED",f=a.message||"Unknown error",g=a.cause?.code,h=a.cause?.message,i=g||h?` (cause: ${[g,h].filter(Boolean).join(": ")})`:"";return`[${e}]: ${f}${i}`}},47593:(a,b,c)=>{c.d(b,{KZ:()=>j,S6:()=>g,Yr:()=>n,f6:()=>k,fc:()=>f,kU:()=>h,pT:()=>i,w_:()=>l});var d=c(2636);let e=["minLength","maxLength","exclusiveMinimum","exclusiveMaximum","pattern","minItems","maxItems","format","default","examples","$schema","$defs","definitions","const","$ref","$comment","additionalProperties","propertyNames","patternProperties","enumDescriptions","anyOf","oneOf","allOf","not","dependencies","dependentSchemas","dependentRequired","title","if","then","else","contentMediaType","contentEncoding","cornerRadius","fillColor","fontFamily","fontSize","fontWeight","gap","padding","strokeColor","strokeThickness","textColor"],f=[{category:"HARM_CATEGORY_HATE_SPEECH",threshold:"OFF"},{category:"HARM_CATEGORY_DANGEROUS_CONTENT",threshold:"OFF"},{category:"HARM_CATEGORY_SEXUALLY_EXPLICIT",threshold:"OFF"},{category:"HARM_CATEGORY_HARASSMENT",threshold:"OFF"},{category:"HARM_CATEGORY_CIVIC_INTEGRITY",threshold:"OFF"}];function g(a){let b=[];if("string"==typeof a)b.push({text:a});else if(Array.isArray(a)){for(let c of a)if("text"===c.type)b.push({text:c.text});else if("image_url"===c.type&&c.image_url?.url?.startsWith("data:")){let a=c.image_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}else if("image_url"===c.type&&c.image_url?.url&&(c.image_url.url.startsWith("http://")||c.image_url.url.startsWith("https://")))b.push({fileData:{fileUri:c.image_url.url,mimeType:"image/*"}});else if("input_audio"===c.type&&c.input_audio?.data){let a=c.input_audio.format||"wav",d="mp3"===a?"audio/mpeg":`audio/${a}`;b.push({inlineData:{mime_type:d,data:c.input_audio.data}})}else if("audio_url"===c.type&&c.audio_url?.url?.startsWith("data:")){let a=c.audio_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}}return b}function h(a){return"string"==typeof a?a:Array.isArray(a)?a.filter(a=>"text"===a.type).map(a=>a.text).join(""):""}function i(a){if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return null}}function j(){return`agent-${crypto.randomUUID()}`}function k(){return crypto.randomUUID()+Date.now().toString()}function l(){let a=["useful","bright","swift","calm","bold"],b=["fuze","wave","spark","flow","core"],c=a[Math.floor(Math.random()*a.length)],d=b[Math.floor(Math.random()*b.length)];return`${c}-${d}-${crypto.randomUUID().slice(0,5)}`}function m(a){let b=0,c=-1;for(let d=0;d<a.length;d++){let e=a[d],f=0,g=e.type;"object"===g||e.properties?f=3:"array"===g||e.items?f=2:g&&"null"!==g&&(f=1),f>c&&(c=f,b=d)}return b}function n(a){return a&&"object"==typeof a&&(!function a(b){if(b&&"object"==typeof b)for(let c of(void 0===b.const||b.enum||(b.enum=[b.const],delete b.const),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b)for(let c of(b.enum&&Array.isArray(b.enum)&&(b.enum=b.enum.map(a=>String(a)),b.type||(b.type="string")),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b){if(b.allOf&&Array.isArray(b.allOf)){let a={};for(let c of b.allOf)if(c.properties&&(a.properties||(a.properties={}),Object.assign(a.properties,c.properties)),c.required&&Array.isArray(c.required))for(let b of(a.required||(a.required=[]),c.required))a.required.includes(b)||a.required.push(b);delete b.allOf,a.properties&&(b.properties={...b.properties,...a.properties}),a.required&&(b.required=[...b.required||[],...a.required])}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.anyOf&&Array.isArray(b.anyOf)&&b.anyOf.length>0){let a=b.anyOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=m(a),d=a[c];delete b.anyOf,Object.assign(b,d)}}if(b.oneOf&&Array.isArray(b.oneOf)&&b.oneOf.length>0){let a=b.oneOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=m(a),d=a[c];delete b.oneOf,Object.assign(b,d)}}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.type&&Array.isArray(b.type)){let a=b.type.filter(a=>"null"!==a);b.type=a.length>0?a[0]:"string"}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b)for(let c of(b.properties&&!b.type&&(b.type="object"),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b,c){if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.keys(b)){if(c.includes(d)||d.startsWith("x-")){delete b[d];continue}let e=b[d];e&&"object"==typeof e&&a(e,c)}}}(a,e),!function a(b){if(b&&"object"==typeof b){if(b.required&&Array.isArray(b.required)&&b.properties){let a=b.required.filter(a=>Object.prototype.hasOwnProperty.call(b.properties,a));0===a.length?delete b.required:b.required=a}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),(0,d.e)(a),!function a(b){if(b&&"object"==typeof b)for(let c of("object"!==b.type||b.properties&&0!==Object.keys(b.properties).length||(b.properties={reason:{type:"string",description:"Brief explanation of why you are calling this tool"}},b.required=["reason"]),Object.values(b)))c&&"object"==typeof c&&a(c)}(a)),a}},74177:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{PY:()=>J,exchangeTokens:()=>G,extractCodexAccountInfo:()=>s,kP:()=>F,pollForToken:()=>I,requestDeviceCode:()=>H,sO:()=>E});var e=c(48895),f=c(55511),g=c.n(f),h=c(38160),i=c(13808),j=c(92990),k=c(73159),l=c(49804),m=a([e]);e=(m.then?(await m)():m)[0];let K=null;function n(a,b){let c,d=String(a||"").trim();if(!d)throw Error(`xai discovery ${b} is empty`);try{c=new URL(d)}catch(a){throw Error(`xai discovery ${b} is invalid: ${a.message}`)}if("https:"!==c.protocol)throw Error(`xai discovery ${b} must use https: ${d}`);let e=c.hostname.toLowerCase().trim();if("x.ai"!==e&&!e.endsWith(".x.ai"))throw Error(`xai discovery ${b} host ${e} is not on x.ai`);return d}async function o(){if(K)return K;try{let a=await fetch(k.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return K={authorizeUrl:n(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:n(b.token_endpoint,"token_endpoint")}}}catch{}return K={authorizeUrl:k.oT.authorizeUrl,tokenUrl:k.oT.tokenUrl}}function p(a){if(!a||"string"!=typeof a)return;let b=a.split(".");if(3===b.length)try{let a=b[1].replace(/-/g,"+").replace(/_/g,"/"),c=(L-a.length%L)%L,d=Buffer.from(a+"=".repeat(c),"base64").toString("utf8"),e=JSON.parse(d);return e.email||e.preferred_username||e.sub||void 0}catch{return}}let L=4;function q(a){try{if(!a||"string"!=typeof a)return null;let b=a.split(".");if(3!==b.length)return null;let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=(L-c.length%L)%L,e=c+"=".repeat(d);return JSON.parse(Buffer.from(e,"base64").toString("utf8"))}catch{return null}}function r(a){let b=q(a);if(b)return b.email||b.preferred_username||b.sub||void 0}function s(a){let b=q(a);if(!b)return{};let c=b["https://api.openai.com/auth"]||{};return{email:b.email,chatgptAccountId:c.chatgpt_account_id||b.account_id,chatgptPlanType:c.chatgpt_plan_type||b.plan_type}}async function t(a){let b=await a.text();try{return b?JSON.parse(b):{}}catch{return{error:"invalid_response",error_description:b.slice(0,500)}}}async function u(a){let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:a.clientId})}),c=await t(b);if(!b.ok)throw Error(`Codex device code request failed: ${c.error_description||c.error||b.status}`);if(!c.device_auth_id||!c.user_code)throw Error("Codex device code response is missing the device id or user code");let d=c.expires_at?Math.max(1,Math.floor((new Date(c.expires_at).getTime()-Date.now())/1e3)):900;return{...c,device_code:c.device_auth_id,verification_uri:a.deviceVerificationUrl,interval:Number.parseInt(c.interval,10)||5,expires_in:d}}async function v(a,b,c,d){let e=d?._codexUserCode||d?.userCode||d?.user_code;if(!e)return{ok:!1,data:{error:"missing_user_code",error_description:"Codex device authorization is missing the user code"}};let f=await fetch(a.deviceTokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({device_auth_id:b,user_code:e})}),g=await t(f),h=403===f.status||404===f.status||"authorization_pending"===g.error;return{ok:f.ok||h,pending:h,data:g}}function w(a,b){for(let c of b){let b=a;for(let a of c){if(null==b||"object"!=typeof b){b=void 0;break}b=b[a]}if("string"==typeof b&&b.trim())return b.trim();if("number"==typeof b)return String(b)}return null}async function x(a){let b=JSON.stringify({loginTraceID:a,login_trace_id:a}),c="no successful response";for(let a of j.SK.loginGuidanceUrls)try{let d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":j.SK.userAgent},body:b});if(!d.ok){c=`${a} HTTP ${d.status}`;continue}let e=await d.json(),f=w(e,[["Result","LoginHost"],["Result","loginHost"],["Result","LoginURL"],["result","loginHost"],["data","Result","LoginHost"],["data","loginHost"],["LoginHost"],["loginHost"]]);if(f)return f;c=`${a} missing LoginHost`}catch(b){c=`${a} ${b.message}`}throw Error(`Trae GetLoginGuidance failed: ${c}`)}function y(){return[...j.SK.apiOrigins]}async function z(a,b){let c=JSON.stringify({ClientID:j.SK.clientId,RefreshToken:a,ClientSecret:j.SK.clientSecret,UserID:""}),d="no successful response";for(let e of y()){let f=`${e.replace(/\/$/,"")}${j.SK.exchangeTokenPath}`;try{let e,g={Accept:"application/json","Content-Type":"application/json","User-Agent":j.SK.userAgent};b&&(g["x-cloudide-token"]=b);let h=await fetch(f,{method:"POST",headers:g,body:c}),i=await h.text();if(!h.ok){d=`${f} HTTP ${h.status}`;continue}try{e=JSON.parse(i)}catch{d=`${f} invalid JSON`;continue}let k=w(e,[["Result","AccessToken"],["Result","accessToken"],["result","access_token"],["accessToken"]]);if(!k){let a=w(e,[["message"],["msg"],["error"],["Result","Message"]])||"missing AccessToken";d=`${f} ${a}`;continue}return{accessToken:k,refreshToken:w(e,[["Result","RefreshToken"],["result","refresh_token"],["refreshToken"]])||a,expiresIn:null,expiresAt:w(e,[["Result","ExpiresAt"],["Result","expiresAt"],["result","expires_at"],["expiresAt"]])}}catch(a){d=`${f} ${a.message}`}}throw Error(`Trae ExchangeToken failed: ${d}`)}async function A(a){for(let b of y()){let c=`${b.replace(/\/$/,"")}${j.SK.getUserInfoPath}`;try{let b=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":j.SK.userAgent,"x-cloudide-token":a},body:JSON.stringify({})});if(!b.ok)continue;let d=await b.json();return{email:w(d,[["Result","NonPlainTextEmail"],["Result","Email"],["Result","email"],["email"],["data","email"]]),name:w(d,[["Result","ScreenName"],["Result","Nickname"],["Result","Name"],["result","nickname"],["nickname"],["name"]]),aiRegion:w(d,[["Result","AIRegion"],["Result","aiRegion"],["aiRegion"]]),region:w(d,[["Result","Region"],["Result","region"],["region"]]),tenant:w(d,[["Result","TenantID"],["Result","tenantId"],["tenantId"]]),userId:w(d,[["Result","UserID"],["Result","userId"],["userId"]])}}catch{}}return{email:null,name:null}}let M={config:j.SK,flowType:"authorization_code",callbackPath:j.SK.callbackPath,prepareConfig:async a=>{let b=g().randomUUID(),c=await x(b);return{...a,loginTraceID:b,loginHost:c}},buildAuthUrl:(a,b,c)=>{var d;let e,f,h={plugin_version:j.SK.defaultPluginVersion,machine_id:g().randomUUID(),device_id:j.SK.defaultDeviceId,x_device_brand:"unknown",x_device_type:"unknown",x_os_version:"unknown",x_env:"",x_app_version:j.SK.defaultAppVersion,x_app_type:j.SK.defaultAppType},i=a.loginTraceID||c;return d=a.loginHost,(e=new URL(d.startsWith("http")?d:`https://${d.replace(/^\/+/,"")}`)).pathname=j.SK.authorizationPath,(f=new URLSearchParams).set("login_version","1"),f.set("auth_from","trae"),f.set("login_channel","native_ide"),f.set("plugin_version",h.plugin_version),f.set("auth_type","local"),f.set("client_id",j.SK.clientId),f.set("redirect","0"),f.set("login_trace_id",i),f.set("auth_callback_url",b),f.set("machine_id",h.machine_id),f.set("device_id",h.device_id),f.set("x_device_id",h.device_id),f.set("x_machine_id",h.machine_id),f.set("x_device_brand",h.x_device_brand),f.set("x_device_type",h.x_device_type),f.set("x_os_version",h.x_os_version),f.set("x_env",h.x_env),f.set("x_app_version",h.x_app_version),f.set("x_app_type",h.x_app_type),e.search=f.toString(),e.toString()},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!(/[?=&]/.test(c)&&(c.includes("refreshToken")||c.includes("refresh_token"))))return{accessToken:c.replace(/^(Cloud-IDE-JWT|Bearer)\s+/i,""),refreshToken:null,expiresIn:24*j.SK.tokenLifetimeDays*3600,_authMethod:"imported"};let{refreshToken:d,cloudideToken:e}=function(a){let b=String(a||"").trim(),c=b;b.includes("?")&&(c=b.slice(b.indexOf("?")+1)),b.startsWith("#")&&(c=b.slice(1));let d=Object.fromEntries(new URLSearchParams(c)),e=a=>{for(let b of a){let a=d[b];if(a&&String(a).trim())return String(a).trim()}return null},f=e(["error","error_code","errorCode"]);if(f){let a=e(["error_description","error_desc","message"]);throw Error(a?`Trae auth failed: ${f} (${a})`:`Trae auth failed: ${f}`)}let g=e(["refreshToken","refresh_token","RefreshToken"]);if(!g)throw Error("Trae callback missing refreshToken");let h=e(["loginHost","login_host","LoginHost","host","consoleHost"]);if(!h)throw Error("Trae callback missing loginHost");let i=e(["x-cloudide-token","xCloudideToken","accessToken","access_token","token"]);return{refreshToken:g,loginHost:h,cloudideToken:i}}(c);return{...await z(d,e),_authMethod:"oauth"}},postExchange:async a=>({userInfo:await A(a.accessToken)}),mapTokens:(a,b)=>{let c,d=a.expiresIn||(a.expiresAt?Math.max(60,Number(a.expiresAt)-Math.floor(Date.now()/1e3)):24*j.SK.tokenLifetimeDays*3600),e=b?.userInfo||{},f=e.aiRegion||"US-East";return{accessToken:a.accessToken,refreshToken:a.refreshToken,expiresIn:d,email:e.email||void 0,displayName:e.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",aiRegion:f,region:e.region||f,tenant:e.tenant||"marscode",userId:e.userId||"",scope:(c=(f||"").toLowerCase(),"sg"===c||c.includes("singapore")?"marscode-sg":"cn"===c||c.includes("cn")||c.includes("china")?"marscode-cn":"marscode-us"),webId:"",bizUserId:"",userUniqueId:"",appLanguage:"en",appVersion:j.SK.defaultAppVersion,userRegion:"SG"===f?"SG":"US",userIdentity:"Free"}}}};async function B(a,b,c){let d=`${a.replace(/\/$/,"")}${b}`,e=await fetch(d,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":j.eD.userAgent},body:JSON.stringify(c)}),f=await e.text();if(!e.ok)throw Error(`Windsurf ${b} HTTP ${e.status}: ${f.slice(0,200)}`);try{return JSON.parse(f)}catch{throw Error(`Windsurf ${b} invalid JSON`)}}async function C(a){let b=await B(j.eD.registerApiBaseUrl,j.eD.registerPath,{firebase_id_token:a}),c=w(b,[["apiKey"],["api_key"]]);if(!c)throw Error("Windsurf RegisterUser missing apiKey");let d=w(b,[["apiServerUrl"],["api_server_url"]])||j.eD.defaultApiServerUrl,e=w(b,[["name"]]);return{apiKey:c,apiServerUrl:d,name:e}}async function D(a,b){try{let c=await B(a,j.eD.oneTimeAuthPath,{firebaseIdToken:b}),d=w(c,[["authToken"],["auth_token"]]);if(!d)return{email:null,name:null};let e=await B(a,j.eD.currentUserPath,{authToken:d,includeSubscription:!0}),f=e.user||e;return{email:w(f,[["email"]]),name:w(f,[["name"]])}}catch{return{email:null,name:null}}}let N={config:j.eD,flowType:"authorization_code",callbackPath:j.eD.callbackPath,buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({response_type:"token",client_id:a.clientId,redirect_uri:b,state:c,prompt:"login",redirect_parameters_type:"query",workflow:"onboarding"});return`${a.authBaseUrl}${a.signInPath}?${d.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=String(b||"").trim();if(!(f.includes("?")||f.includes("access_token="))){let b=f.replace(/^Bearer\s+/i,"");if(b.startsWith("sk-ws-"))return{accessToken:b,refreshToken:null,expiresIn:null,apiServerUrl:a.defaultApiServerUrl,firebaseIdToken:null,_authMethod:"imported"};let c=await C(b);return{accessToken:c.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:c.apiServerUrl,firebaseIdToken:b,_authMethod:"imported"}}let{firebaseIdToken:g}=function(a,b){let c=String(a||"").trim(),d=c;c.includes("?")&&(d=c.slice(c.indexOf("?")+1)),c.startsWith("#")&&(d=c.slice(1));let e=Object.fromEntries(new URLSearchParams(d)),f=a=>{for(let b of a){let a=e[b];if(a&&String(a).trim())return String(a).trim()}return null},g=f(["error"]);if(g){let a=f(["error_description"]);throw Error(a?`Windsurf auth failed: ${g} (${a})`:`Windsurf auth failed: ${g}`)}let h=f(["access_token","token"]);if(!h)throw Error("Windsurf callback missing access_token");let i=f(["state"]);if(b&&i&&i!==b)throw Error("Windsurf callback state mismatch");return{firebaseIdToken:h}}(f,e),h=await C(g);return{accessToken:h.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:h.apiServerUrl,firebaseIdToken:g,_authMethod:"oauth"}},postExchange:async a=>a.firebaseIdToken?{userInfo:await D(a.apiServerUrl,a.firebaseIdToken)}:{userInfo:{email:null,name:null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.userInfo?.email||void 0,displayName:b?.userInfo?.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",apiServerUrl:a.apiServerUrl,firebaseIdToken:a.firebaseIdToken}})},O={config:j.RY,flowType:"authorization_code",callbackPath:"/",prepareConfig:async(a,b)=>{let c=Number(b?.nativeAppPort)||j.RY.defaultNativeAppPort,d=(0,l.le)(a,{nativeAppPort:c});return{...a,...d}},buildAuthUrl:a=>a.authUrl,exchangeToken:async(a,b,c,d)=>{let{userId:e,encryptedAccessToken:f}=(0,l.Q_)(b);return{accessToken:(0,l.Wc)(f,d),userId:e,systemId:a.systemId}},postExchange:async a=>{let b={accessToken:a.accessToken,providerSpecificData:{userId:a.userId,systemId:a.systemId}},c=null;try{c=await (0,l.qJ)(b,{config:j.RY})}catch{}let d=(0,l.k9)(b,c);return{userInfo:c,organizationId:d,email:c?.email||null,name:c?.name||c?.display_name||null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.email||void 0,displayName:b?.name||void 0,providerSpecificData:{authMethod:"oauth",userId:a.userId,systemId:a.systemId,organizationId:b?.organizationId||""}})},P={trae:M,windsurf:N,zed:O,claude:{config:j.OV,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d)=>{let e=new URLSearchParams({code:"true",client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c});return`${a.authorizeUrl}?${e.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=b,g="";if(f.includes("#")){let a=f.split("#");f=a[0],g=a[1]||""}let h=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({code:f,state:g||e,grant_type:"authorization_code",client_id:a.clientId,redirect_uri:c,code_verifier:d})});if(!h.ok){let a=await h.text();throw Error(`Token exchange failed: ${a}`)}return await h.json()},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope})},codex:{config:j.DI,flowType:"authorization_code_pkce",fixedPort:1455,callbackPath:"/auth/callback",requestDeviceCode:u,pollToken:v,buildAuthUrl:(a,b,c,d)=>{let e={response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,...a.extraParams,state:c},f=Object.entries(e).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${f}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b=s(a.id_token),c={accessToken:a.access_token,refreshToken:a.refresh_token,idToken:a.id_token,expiresIn:a.expires_in,lastRefreshAt:new Date().toISOString()},d=b.email||r(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}},xai:{config:k.oT,flowType:"authorization_code_pkce",fixedPort:k.oT.loopbackPort,callbackPath:k.oT.callbackPath,pkceVerifierBytes:k.Ue,prepareConfig:async a=>{let b=await o();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let e=g().randomBytes(16).toString("hex"),f={response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c,nonce:e,plan:"generic",referrer:"cli-proxy-api"},h=Object.entries(f).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${h}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`xAI token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b={accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope},c=p(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}},"gemini-cli":{config:j.LT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b=await fetch(`${j.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},d="";try{let b=await fetch("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:(0,j.cD)(),mode:1})});if(b.ok){let a=await b.json();d=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})},antigravity:{config:j.YT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b=await fetch(`${j.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"}}),c=b.ok?await b.json():{},d=process.env.ANTIGRAVITY_GCP_PROJECT||process.env.ZEVAI_ANTIGRAVITY_GCP_PROJECT||"",e="";try{let b=await Promise.race([(0,h.gQ)(a.access_token,{preferredProjectId:d||null}),new Promise(a=>setTimeout(()=>a({projectId:null,error:"project resolve timed out"}),2e4))]);(e=b.projectId||d||"")||!b.error||console.warn("[Antigravity OAuth] project resolve:",b.error)}catch(a){console.warn("[Antigravity OAuth] project resolve failed:",a?.message||a)}return{userInfo:c,projectId:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})},iflow:{config:j.ZL,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({loginMethod:a.extraParams.loginMethod,type:a.extraParams.type,redirect:b,state:c,client_id:a.clientId});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=Buffer.from(`${a.clientId}:${a.clientSecret}`).toString("base64"),e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${d}`},body:new URLSearchParams({grant_type:"authorization_code",code:b,redirect_uri:c,client_id:a.clientId,client_secret:a.clientSecret})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},postExchange:async a=>{let b=await fetch(`${j.ZL.userInfoUrl}?accessToken=${encodeURIComponent(a.access_token)}`,{headers:{Accept:"application/json"}});if(!b.ok){let a=await b.text();throw Error(`Failed to fetch user info: ${a}`)}let c=await b.json();if(!c.success)throw Error(`User info request failed: ${c.message||"Unknown error"}`);let d=c.data||{};if(!d.apiKey||""===d.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(d.email?.trim()||d.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,apiKey:b?.userInfo?.apiKey,email:b?.userInfo?.email||b?.userInfo?.phone,displayName:b?.userInfo?.nickname||b?.userInfo?.name})},qoder:{config:j.hF,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(1531).then(c.bind(c,91531)),d=new b().initiateDeviceFlow();return{device_code:d.nonce,user_code:d.nonce.slice(0,8).toUpperCase(),verification_uri:a.loginUrl,verification_uri_complete:d.verificationUriComplete,expires_in:300,interval:2,codeVerifier:d.codeVerifier,_qoderNonce:d.nonce,_qoderMachineId:d.machineId}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(1531).then(c.bind(c,91531)),h=new g,i=b||e?._qoderNonce,j=d||e?._qoderVerifier;if(!i||!j)return{ok:!1,data:{error:"invalid_request",error_description:"Missing nonce/verifier"}};try{f=await h.pollDeviceToken({nonce:i,codeVerifier:j})}catch(a){return{ok:!1,data:{error:"poll_failed",error_description:a.message}}}if("pending"===f.status)return{ok:!1,data:{error:"authorization_pending"}};let k=await h.fetchUserInfo(f.accessToken),l=Math.floor((f.expireTime-Date.now())/1e3),m=Math.max(86400,l);return{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:m,_qoderUserId:f.userId,_qoderMachineId:e?._qoderMachineId||"",_qoderName:k.name,_qoderEmail:k.email,_qoderOrganizationId:k.organizationId}}},mapTokens:a=>{let b=(a._qoderEmail||"").trim(),c=(a._qoderName||"").trim()||null,d=a._qoderUserId||"",e=b||(d?`qoder-user-${d}`:null);return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,email:e,displayName:c,providerSpecificData:{authMethod:"device",userId:d,machineId:a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}},qwen:{config:j.Hp,flowType:"device_code",requestDeviceCode:async(a,b)=>{let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scope,code_challenge:b,code_challenge_method:a.codeChallengeMethod})});if(!c.ok){let a=await c.text();throw Error(`Device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b,code_verifier:c})});return{ok:d.ok,data:await d.json()}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{resourceUrl:a.resource_url}})},github:{config:j.Nu,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scopes})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,device_code:b,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});try{c=await d.json()}catch(b){let a=await d.text();c={error:"invalid_response",error_description:a}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(j.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":j.Nu.apiVersion,"User-Agent":j.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(j.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":j.Nu.apiVersion,"User-Agent":j.Nu.userAgent}}),e=d.ok?await d.json():{};return{copilotToken:c,userInfo:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{copilotToken:b?.copilotToken?.token,copilotTokenExpiresAt:b?.copilotToken?.expires_at,githubUserId:b?.userInfo?.id,githubLogin:b?.userInfo?.login,githubName:b?.userInfo?.name,githubEmail:b?.userInfo?.email}})},kiro:{config:j.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1",e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,f="idc"===c.authMethod?"idc":"builder-id",g=`https://oidc.${d}.amazonaws.com/client/register`,h=`https://oidc.${d}.amazonaws.com/device_authorization`,i=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientName:a.clientName,clientType:a.clientType,scopes:a.scopes,grantTypes:a.grantTypes,issuerUrl:a.issuerUrl})});if(!i.ok){let a=await i.text();throw Error(`Client registration failed: ${a}`)}let j=await i.json(),k=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:j.clientId,clientSecret:j.clientSecret,startUrl:e})});if(!k.ok){let a=await k.text();throw Error(`Device authorization failed: ${a}`)}let l=await k.json();return{device_code:l.deviceCode,user_code:l.userCode,verification_uri:l.verificationUri,verification_uri_complete:l.verificationUriComplete,expires_in:l.expiresIn,interval:l.interval||5,_clientId:j.clientId,_clientSecret:j.clientSecret,_region:d,_authMethod:f,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,f=d?._region||"us-east-1",g=`https://oidc.${f}.amazonaws.com/token`,h=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:d?._clientId,clientSecret:d?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{e=await h.json()}catch(b){let a=await h.text();e={error:"invalid_response",error_description:a}}return e.accessToken?{ok:!0,data:{access_token:e.accessToken,refresh_token:e.refreshToken,expires_in:e.expiresIn,profile_arn:e?.profileArn||null,_clientId:d?._clientId,_clientSecret:d?._clientSecret,_region:d?._region,_authMethod:d?._authMethod,_startUrl:d?._startUrl}}:{ok:!1,data:{error:e.error||"authorization_pending",error_description:e.error_description||e.message}}},mapTokens:a=>{let b=r(a.access_token);return{accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,email:b,providerSpecificData:{profileArn:a?.profile_arn||null,clientId:a._clientId,clientSecret:a._clientSecret,region:a._region||"us-east-1",authMethod:a._authMethod||"builder-id",startUrl:a._startUrl||j.Tx.startUrl}}}},cursor:{config:j.WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})},"kimi-coding":{config:j.t,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}let c=await b.json();return{device_code:c.device_code,user_code:c.user_code,verification_uri:c.verification_uri||"https://www.kimi.com/code/authorize_device",verification_uri_complete:c.verification_uri_complete||`https://www.kimi.com/code/authorize_device?user_code=${c.user_code}`,expires_in:c.expires_in,interval:c.interval||5}},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{c=await d.json()}catch(b){let a=await d.text();c={error:"invalid_response",error_description:a}}return{ok:d.ok,data:c}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in})},kilocode:{config:j.MZ,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.initiateUrl,{method:"POST",headers:{"Content-Type":"application/json"}});if(!b.ok){if(429===b.status)throw Error("Too many pending authorization requests. Please try again later.");let a=await b.text();throw Error(`Device auth initiation failed: ${a}`)}let c=await b.json();return{device_code:c.code,user_code:c.code,verification_uri:c.verificationUrl,verification_uri_complete:c.verificationUrl,expires_in:c.expiresIn||300,interval:3}},pollToken:async(a,b)=>{let c=await fetch(`${a.pollUrlBase}/${b}`);if(202===c.status)return{ok:!1,data:{error:"authorization_pending"}};if(403===c.status)return{ok:!1,data:{error:"access_denied",error_description:"Authorization denied by user"}};if(410===c.status)return{ok:!1,data:{error:"expired_token",error_description:"Authorization code expired"}};if(!c.ok)return{ok:!1,data:{error:"poll_failed",error_description:`Poll failed: ${c.status}`}};let d=await c.json();if("approved"===d.status&&d.token){let b=null;try{let c=await fetch(`${a.apiBaseUrl}/api/profile`,{headers:{Authorization:`Bearer ${d.token}`}});if(c.ok){let a=await c.json();b=a.organizations?.[0]?.id||null}}catch{}return{ok:!0,data:{access_token:d.token,_userEmail:d.userEmail,_orgId:b}}}return{ok:!1,data:{error:"authorization_pending"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:null,expiresIn:null,email:a._userEmail,...a._orgId?{providerSpecificData:{orgId:a._orgId}}:{}})},cline:{config:j.lB,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Cline token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})},clinepass:{config:j.w1,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(g){let d=a.tokenUrl||a.tokenExchangeUrl,e=await fetch(d,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!e.ok){let a=await e.text();throw Error(`ClinePass token exchange failed: ${a}`)}let f=await e.json();return{access_token:f.data?.accessToken||f.accessToken,refresh_token:f.data?.refreshToken||f.refreshToken,email:f.data?.userInfo?.email||"",expires_at:f.data?.expiresAt||f.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})},"grok-cli":{config:j.qp,flowType:"device_code",requestDeviceCode:async a=>{let b=new URLSearchParams({client_id:a.clientId,scope:a.scope});a.referrer&&b.set("referrer",a.referrer);let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)"},body:b});if(!c.ok){let a=await c.text();throw Error(`Grok CLI device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{let a=await d.text();c={error:"invalid_response",error_description:a}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch("https://cli-chat-proxy.grok.com/v1/user",{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-version":"0.2.93"}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=p(a.id_token)||r(a.access_token)||b?.user?.email||null,d=b?.user?.userId||b?.user?.principalId||null,e=[b?.user?.firstName,b?.user?.lastName].filter(Boolean).join(" ").trim()||null;return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,scope:a.scope,email:c||void 0,displayName:e||void 0,providerSpecificData:{authMethod:"device_code",idToken:a.id_token||null,email:c||null,userId:d,hasGrokCodeAccess:b?.user?.hasGrokCodeAccess??null,subscriptionTier:b?.user?.subscriptionTier??null}}}},kimchi:{config:j.Td,flowType:"browser_token",buildAuthUrl:(a,b,c)=>{let d=(a.webAppUrl||"https://app.kimchi.dev").replace(/\/+$/,""),e=new URLSearchParams({callback:b,state:c});return`${d}/cli-auth?${e.toString()}`},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!c)throw Error("Missing Kimchi token");let d=a.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",e=await fetch(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});if(!e.ok)throw Error(`Kimchi token validation failed: ${e.status}`);let f={};if(a.userInfoUrl)try{let b=await fetch(a.userInfoUrl,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});b.ok&&(f=await b.json())}catch{f={}}return{access_token:c,token_type:"Bearer",_kimchiUser:f}},mapTokens:a=>{let b=a._kimchiUser||{},c=b.id?String(b.id):"",d=b.username||"",e=b.email||(c?`kimchi-user-${c}`:null);return{accessToken:a.access_token,refreshToken:null,email:e,displayName:b.name||d||null,providerSpecificData:{authMethod:"browser_token",userId:c,username:d}}}},gitlab:{config:j.f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=e.clientId||"",h=new URLSearchParams({client_id:g,redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${h.toString()}`},exchangeToken:async(a,b,c,d,e,f={})=>{let g=f.baseUrl||a.defaultBaseUrl,h=f.clientId||"",i=f.clientSecret||"",j=new URLSearchParams({client_id:h,grant_type:"authorization_code",code:b,redirect_uri:c,code_verifier:d});i&&j.set("client_secret",i);let k=await fetch(`${g}${a.tokenUrlPath}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:j.toString()});if(!k.ok)throw Error(`GitLab token exchange failed: ${await k.text()}`);let l=await k.json(),m=await fetch(`${g}${a.userInfoUrlPath}`,{headers:{Authorization:`Bearer ${l.access_token}`}}),n=m.ok?await m.json():{};return{...l,_user:n,_baseUrl:g,_clientId:h}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,providerSpecificData:{username:a._user?.username||"",email:a._user?.email||a._user?.public_email||"",name:a._user?.name||"",baseUrl:a._baseUrl,clientId:a._clientId,authKind:"oauth"}})},codebuddy:{config:j.Nl,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":a.domain,"X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=new URL(a.tokenUrl);c.searchParams.set("state",b);let d=await fetch(c.toString(),{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":a.domain,"X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!d.ok){let a=await d.text().catch(()=>"");return{ok:!1,data:{error:"request_failed",error_description:a||`${d.status} ${d.statusText}`}}}let e=await d.json();return 0===e.code&&e.data?.accessToken?{ok:!0,data:{access_token:e.data.accessToken,refresh_token:e.data.refreshToken||"",token_type:e.data.tokenType||"Bearer",expires_in:e.data.expiresIn,expires_at:e.data.expiresAt,refresh_expires_in:e.data.refreshExpiresIn,refresh_expires_at:e.data.refreshExpiresAt,domain:e.data.domain||a.domain,raw:e.data}}:11217===e.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:e.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||(a.expires_at?Math.max(1,Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3)):86400),providerSpecificData:{domain:a.domain||j.Nl.domain,refreshExpiresIn:a.refresh_expires_in,refreshExpiresAt:a.refresh_expires_at,tokenType:a.token_type||"Bearer",rawAuth:a.raw}})},"codebuddy-cn":{config:j.ne,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":a.domain,"X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy CN state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy CN state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=new URL(a.tokenUrl);c.searchParams.set("state",b);let d=await fetch(c.toString(),{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":a.domain,"X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!d.ok){let a=await d.text().catch(()=>"");return{ok:!1,data:{error:"request_failed",error_description:a||`${d.status} ${d.statusText}`}}}let e=await d.json();return 0===e.code&&e.data?.accessToken?{ok:!0,data:{access_token:e.data.accessToken,refresh_token:e.data.refreshToken||"",token_type:e.data.tokenType||"Bearer",expires_in:e.data.expiresIn,expires_at:e.data.expiresAt,refresh_expires_in:e.data.refreshExpiresIn,refresh_expires_at:e.data.refreshExpiresAt,domain:e.data.domain||a.domain,raw:e.data}}:11217===e.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:e.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||(a.expires_at?Math.max(1,Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3)):86400),providerSpecificData:{domain:a.domain||j.ne.domain,refreshExpiresIn:a.refresh_expires_in,refreshExpiresAt:a.refresh_expires_at,tokenType:a.token_type||"Bearer",rawAuth:a.raw}})}};function E(a){let b=P[a];if(!b)throw Error(`Unknown provider: ${a}`);return b}async function F(a,b,c){let d=E(a),e=d.prepareConfig?await d.prepareConfig(d.config,c||{}):d.config,{codeVerifier:f,codeChallenge:g,state:h}=(0,i.lz)(d.pkceVerifierBytes),j=e.loginTraceID||h,k=e.privateKeyVerifier||f;return{authUrl:"device_code"===d.flowType?null:"authorization_code_pkce"===d.flowType?d.buildAuthUrl(e,b,j,g,c||{}):d.buildAuthUrl(e,b,j,void 0,c||{}),state:j,codeVerifier:k,codeChallenge:g,redirectUri:b,flowType:d.flowType,fixedPort:d.fixedPort,callbackPath:d.callbackPath||"/callback"}}async function G(a,b,c,d,e,f){let g=E(a),h=g.prepareConfig?await g.prepareConfig(g.config,f||{}):g.config,i=await g.exchangeToken(h,b,c,d,e,f||{}),j=null;return g.postExchange&&(j=await g.postExchange(i)),g.mapTokens(i,j)}async function H(a,b,c){let d=E(a);if("codex"!==a&&"device_code"!==d.flowType)throw Error(`Provider ${a} does not support device code flow`);return await d.requestDeviceCode(d.config,b,c||{})}async function I(a,b,c,d){let e=E(a);if("codex"!==a&&"device_code"!==e.flowType)throw Error(`Provider ${a} does not support device code flow`);let f=await e.pollToken(e.config,b,c,d);if("codex"===a){if(f.pending)return{success:!1,error:"authorization_pending",errorDescription:"Waiting for Codex authorization",pending:!0};if(!f.ok)return{success:!1,error:f.data.error||"device_authorization_failed",errorDescription:f.data.error_description||f.data.message};let a=f.data.authorization_code,b=f.data.code_verifier;if(!a||!b)return{success:!1,error:"invalid_device_response",errorDescription:"Codex device authorization did not return an authorization code"};try{let c=await G("codex",a,e.config.deviceRedirectUri,b);return{success:!0,tokens:c}}catch(a){return{success:!1,error:"token_exchange_failed",errorDescription:a.message}}}if(f.ok)if(f.data.access_token){let a=null;return e.postExchange&&(a=await e.postExchange(f.data)),{success:!0,tokens:e.mapTokens(f.data,a)}}else if("authorization_pending"===f.data.error||"slow_down"===f.data.error)return{success:!1,error:f.data.error,errorDescription:f.data.error_description||f.data.message,pending:"authorization_pending"===f.data.error};else return{success:!1,error:f.data.error||"no_access_token",errorDescription:f.data.error_description||f.data.message||"No access token received"};return{success:!1,error:f.data.error,errorDescription:f.data.error_description}}P.kimi=P["kimi-coding"];let Q=!1;async function J(){if(!Q){Q=!0;try{let{getProviderConnections:a,updateProviderConnection:b}=await Promise.resolve().then(c.bind(c,89718));for(let c of(await a()).filter(a=>{if("codex"!==a.provider||"oauth"!==a.authType||!a.idToken)return!1;let b=!!a.email,c=!!a.providerSpecificData?.chatgptAccountId;return!b||!c})){let a=s(c.idToken);if(!a.email&&!a.chatgptAccountId)continue;let d={};!c.email&&a.email&&(d.email=a.email),(a.chatgptAccountId||a.chatgptPlanType)&&(d.providerSpecificData={...c.providerSpecificData||{},chatgptAccountId:a.chatgptAccountId,chatgptPlanType:a.chatgptPlanType}),Object.keys(d).length&&await b(c.id,d)}}catch(a){Q=!1,console.log("backfillCodexEmails failed:",a?.message||a)}}}d()}catch(a){d(a)}})}};
@@ -1 +0,0 @@
1
- exports.id=7432,exports.ids=[3662,4720,7432],exports.modules={2636:(a,b,c)=>{"use strict";c.d(b,{e:()=>function a(b){if(!b||"object"!=typeof b)return b;if(Array.isArray(b)){for(let c of b)a(c);return b}if(b.properties&&"object"==typeof b.properties&&!Array.isArray(b.properties)){let a=new Map,c=new Set(Object.keys(b.properties).filter(a=>d.test(a)));for(let e of Object.keys(b.properties))d.test(e)||a.set(e,function(a,b){let c=a.replace(/[^a-zA-Z0-9_.-]/g,"_").slice(0,64);0===c.length&&(c="_");let d=c,e=1;for(;b.has(d);){let a=`_${e++}`;d=c.slice(0,64-a.length)+a}return b.add(d),d}(e,c));for(let[c,d]of a)b.properties[d]=b.properties[c],delete b.properties[c];a.size>0&&Array.isArray(b.required)&&(b.required=b.required.map(b=>a.get(b)||b))}for(let c of Object.values(b))c&&"object"==typeof c&&a(c);return b}});let d=/^[a-zA-Z0-9_.-]{1,64}$/},3662:(a,b,c)=>{"use strict";c.d(b,{EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i,wf:()=>g});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"permission_denied"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"Access forbidden by upstream provider.",404:"Model not found",406:"Model not supported",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:3e5,maxLevel:15},g=3e4,h=6048e5,i=[{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"improperly formed request",cooldownMs:12e4},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:408,cooldownMs:5e3},{status:409,cooldownMs:5e3},{status:429,backoff:!0}]},35236:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Ch:()=>n,IM:()=>m,J4:()=>o});var e=c(89718),f=c(64991),g=c(61188),h=a([g]);g=(h.then?(await h)():h)[0];let p=globalThis._quotaProgressState??={accounts:{},generation:0,runningPromise:null,run:null,subscribers:new Set};function i(a,b=new WeakMap){if(null===a||"object"!=typeof a)return a;if(b.has(a))return b.get(a);let c=Array.isArray(a)?[]:{};for(let[d,e]of(b.set(a,c),Object.entries(a)))c[d]=i(e,b);return Object.freeze(c)}function j(){return i({type:"snapshot",generation:p.generation,accounts:p.accounts,provenance:{source:"quota-cache"}})}function k(a){let b=i(a);for(let a of[...p.subscribers])try{a(b)}catch{}return b}async function l(a,b){let c=b.getRefreshProfile(a[0]?.provider)||{},d=b.concurrency??c.maxConcurrent,e=Math.min(Math.max(1,Number(d)||1),a.length),f=Math.max(0,Number(c.minDelayMs)||0),g=0,h=0,j=Promise.resolve();async function l(){let a,b=j;j=new Promise(b=>{a=b}),await b;let c=Math.max(0,h-Date.now());await (c>0?new Promise(a=>setTimeout(a,c)):Promise.resolve()),h=Date.now()+f,a()}let m=Array.from({length:e},async()=>{for(;!b.controller.signal.aborted&&g<a.length;){let c=a[g++];if(await l(),b.controller.signal.aborted)break;b.counts.attempted+=1;try{let a=await b.resolveUsage(c.id,{writeCache:!0,force:b.force}),d=i({connectionId:c.id,provider:c.provider,usage:a||{},provenance:{cached:a?.stale===!0,stale:a?.stale===!0,fetchedAt:a?.fetchedAt||new Date().toISOString()}});p.accounts={...p.accounts,[c.id]:d},d.provenance.stale?b.counts.stale+=1:b.counts.refreshed+=1,k({type:"update",generation:b.generation,...d})}catch(a){b.counts.failed+=1,k({type:"error",generation:b.generation,connectionId:c.id,provider:c.provider,error:function(a){let b=String(a?.code||"QUOTA_REFRESH_FAILED").replace(/[^a-zA-Z0-9_.:-]/g,"_").slice(0,80)||"QUOTA_REFRESH_FAILED";return Object.freeze({code:b,message:"Quota refresh failed"})}(a),previous:p.accounts[c.id]||null})}}});await Promise.all(m)}function m(a){if("function"!=typeof a)throw TypeError("Quota progress listener must be a function");p.subscribers.add(a);let b=!0;return()=>{b&&(b=!1,p.subscribers.delete(a),0===p.subscribers.size&&p.run&&!p.run.retainWithoutSubscribers&&p.run.controller.abort())}}function n(){return j()}function o(a={}){if(p.runningPromise)return!1!==a.retainWithoutSubscribers&&p.run&&(p.run.retainWithoutSubscribers=!0),p.runningPromise;let b=new AbortController;p.run={controller:b,retainWithoutSubscribers:!1!==a.retainWithoutSubscribers};let c=(async()=>{p.generation+=1;let c=p.generation,d=a.getConnections||e.getProviderConnections,h=a.getSnapshots||e.tV,m=a.resolveUsage||g.dg,n=a.getRefreshProfile||f.JJ,o=(a.connections||await d()).filter(g.NS),q=o.filter(a=>a.isActive??!0),r=new Set(o.map(({id:a})=>a)),s=await h(),t=Object.fromEntries(s.filter(({connectionId:a})=>r.has(a)).map(a=>[a.connectionId,i({connectionId:a.connectionId,provider:a.provider,usage:a.usage||{},provenance:{cached:!0,stale:a.usage?.stale===!0,fetchedAt:a.fetchedAt||null}})]));p.accounts=!1===a.replaceAccounts?{...p.accounts,...t}:t,k(j());let u={attempted:0,refreshed:0,stale:0,failed:0},v=new Map;for(let a of q){let b=v.get(a.provider)||[];b.push(a),v.set(a.provider,b)}return await Promise.all([...v.values()].map(d=>l(d,{concurrency:a.concurrency,controller:b,counts:u,force:!0===a.force,generation:c,getRefreshProfile:n,resolveUsage:m}))),k({type:"complete",generation:c,...u,...b.signal.aborted?{cancelled:!0}:{}})})().finally(()=>{p.runningPromise===c&&(p.runningPromise=null,p.run=null)});return p.runningPromise=c,c}d()}catch(a){d(a)}})},43659:(a,b,c)=>{"use strict";c.d(b,{A1:()=>g,lR:()=>i,wO:()=>h,yj:()=>e,zL:()=>f});var d=c(3662);function e(a,b){let c;return new Response(JSON.stringify((c=d.LY[a]||(a>=500?{type:"server_error",code:"internal_server_error"}:{type:"invalid_request_error",code:""}),{error:{message:b||d.O[a]||"An error occurred",type:c.type,code:c.code}})),{status:a,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}async function f(a,b=null){let c="";try{c=await a.text()}catch{c=""}if(b&&"function"==typeof b.parseError)try{let e=b.parseError(a,c);if(e&&"object"==typeof e){let b=e.message||d.O[a.status]||`Upstream error: ${a.status}`,{status:c,message:f,...g}=e;return{statusCode:c||a.status,message:b,...g}}}catch{}let e="";try{let a=JSON.parse(c);e=a.error?.message||a.message||a.error||c}catch{e=c}let g=("string"==typeof e?e:JSON.stringify(e))||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:a.status,message:g}}function g(a,b,c,d=null){return{success:!1,status:a,error:b,resetsAtMs:c,...d&&"object"==typeof d?{failureMetadata:d}:{},response:e(a,b)}}function h(a,b,c,d){let e=Math.max(Math.ceil((new Date(c).getTime()-Date.now())/1e3),1);return new Response(JSON.stringify({error:{message:`${b} (${d})`}}),{status:a,headers:{"Content-Type":"application/json","Retry-After":String(e)}})}function i(a,b,c,d){let e=d||a.code||"FETCH_FAILED",f=a.message||"Unknown error",g=a.cause?.code,h=a.cause?.message,i=g||h?` (cause: ${[g,h].filter(Boolean).join(": ")})`:"";return`[${e}]: ${f}${i}`}},47293:(a,b,c)=>{"use strict";c.d(b,{A:()=>f});let d=new Uint8Array(16);var e=c(50122);let f=function(a,b,c){return b||a||!crypto.randomUUID?function(a,b,c){let f=(a=a||{}).random??a.rng?.()??crypto.getRandomValues(d);if(f.length<16)throw Error("Random bytes length must be >= 16");if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,b){if((c=c||0)<0||c+16>b.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[c+a]=f[a];return b}return(0,e.k)(f)}(a,b,c):crypto.randomUUID()}},47593:(a,b,c)=>{"use strict";c.d(b,{KZ:()=>j,S6:()=>g,Yr:()=>n,f6:()=>k,fc:()=>f,kU:()=>h,pT:()=>i,w_:()=>l});var d=c(2636);let e=["minLength","maxLength","exclusiveMinimum","exclusiveMaximum","pattern","minItems","maxItems","format","default","examples","$schema","$defs","definitions","const","$ref","$comment","additionalProperties","propertyNames","patternProperties","enumDescriptions","anyOf","oneOf","allOf","not","dependencies","dependentSchemas","dependentRequired","title","if","then","else","contentMediaType","contentEncoding","cornerRadius","fillColor","fontFamily","fontSize","fontWeight","gap","padding","strokeColor","strokeThickness","textColor"],f=[{category:"HARM_CATEGORY_HATE_SPEECH",threshold:"OFF"},{category:"HARM_CATEGORY_DANGEROUS_CONTENT",threshold:"OFF"},{category:"HARM_CATEGORY_SEXUALLY_EXPLICIT",threshold:"OFF"},{category:"HARM_CATEGORY_HARASSMENT",threshold:"OFF"},{category:"HARM_CATEGORY_CIVIC_INTEGRITY",threshold:"OFF"}];function g(a){let b=[];if("string"==typeof a)b.push({text:a});else if(Array.isArray(a)){for(let c of a)if("text"===c.type)b.push({text:c.text});else if("image_url"===c.type&&c.image_url?.url?.startsWith("data:")){let a=c.image_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}else if("image_url"===c.type&&c.image_url?.url&&(c.image_url.url.startsWith("http://")||c.image_url.url.startsWith("https://")))b.push({fileData:{fileUri:c.image_url.url,mimeType:"image/*"}});else if("input_audio"===c.type&&c.input_audio?.data){let a=c.input_audio.format||"wav",d="mp3"===a?"audio/mpeg":`audio/${a}`;b.push({inlineData:{mime_type:d,data:c.input_audio.data}})}else if("audio_url"===c.type&&c.audio_url?.url?.startsWith("data:")){let a=c.audio_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}}return b}function h(a){return"string"==typeof a?a:Array.isArray(a)?a.filter(a=>"text"===a.type).map(a=>a.text).join(""):""}function i(a){if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return null}}function j(){return`agent-${crypto.randomUUID()}`}function k(){return crypto.randomUUID()+Date.now().toString()}function l(){let a=["useful","bright","swift","calm","bold"],b=["fuze","wave","spark","flow","core"],c=a[Math.floor(Math.random()*a.length)],d=b[Math.floor(Math.random()*b.length)];return`${c}-${d}-${crypto.randomUUID().slice(0,5)}`}function m(a){let b=0,c=-1;for(let d=0;d<a.length;d++){let e=a[d],f=0,g=e.type;"object"===g||e.properties?f=3:"array"===g||e.items?f=2:g&&"null"!==g&&(f=1),f>c&&(c=f,b=d)}return b}function n(a){return a&&"object"==typeof a&&(!function a(b){if(b&&"object"==typeof b)for(let c of(void 0===b.const||b.enum||(b.enum=[b.const],delete b.const),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b)for(let c of(b.enum&&Array.isArray(b.enum)&&(b.enum=b.enum.map(a=>String(a)),b.type||(b.type="string")),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b){if(b.allOf&&Array.isArray(b.allOf)){let a={};for(let c of b.allOf)if(c.properties&&(a.properties||(a.properties={}),Object.assign(a.properties,c.properties)),c.required&&Array.isArray(c.required))for(let b of(a.required||(a.required=[]),c.required))a.required.includes(b)||a.required.push(b);delete b.allOf,a.properties&&(b.properties={...b.properties,...a.properties}),a.required&&(b.required=[...b.required||[],...a.required])}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.anyOf&&Array.isArray(b.anyOf)&&b.anyOf.length>0){let a=b.anyOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=m(a),d=a[c];delete b.anyOf,Object.assign(b,d)}}if(b.oneOf&&Array.isArray(b.oneOf)&&b.oneOf.length>0){let a=b.oneOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=m(a),d=a[c];delete b.oneOf,Object.assign(b,d)}}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.type&&Array.isArray(b.type)){let a=b.type.filter(a=>"null"!==a);b.type=a.length>0?a[0]:"string"}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b)for(let c of(b.properties&&!b.type&&(b.type="object"),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b,c){if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.keys(b)){if(c.includes(d)||d.startsWith("x-")){delete b[d];continue}let e=b[d];e&&"object"==typeof e&&a(e,c)}}}(a,e),!function a(b){if(b&&"object"==typeof b){if(b.required&&Array.isArray(b.required)&&b.properties){let a=b.required.filter(a=>Object.prototype.hasOwnProperty.call(b.properties,a));0===a.length?delete b.required:b.required=a}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),(0,d.e)(a),!function a(b){if(b&&"object"==typeof b)for(let c of("object"!==b.type||b.properties&&0!==Object.keys(b.properties).length||(b.properties={reason:{type:"string",description:"Brief explanation of why you are calling this tool"}},b.required=["reason"]),Object.values(b)))c&&"object"==typeof c&&a(c)}(a)),a}},50122:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},64991:(a,b,c)=>{"use strict";c.d(b,{JJ:()=>f,Wk:()=>d});let d=Object.freeze({maxConcurrent:4,minDelayMs:0}),e=Object.freeze({kiro:Object.freeze({maxConcurrent:1,minDelayMs:3e3})});function f(a){return e[String(a||"").trim().toLowerCase()]||d}},78335:()=>{},89718:(a,b,c)=>{"use strict";c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,Iu:()=>d.Iu,K1:()=>d.K1,KJ:()=>d.KJ,KK:()=>d.KK,Kg:()=>d.Kg,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,ME:()=>d.ME,Mc:()=>d.Mc,NR:()=>d.NR,Op:()=>d.Op,PX:()=>d.PX,Pb:()=>d.Pb,Pc:()=>d.Pc,QI:()=>d.QI,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,dK:()=>d.dK,deleteModelAlias:()=>d.fv,ek:()=>d.ek,fK:()=>d.fK,getModelAliases:()=>d.OM,getProviderConnections:()=>d.P,getQuotaSnapshot:()=>d.LF,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,p3:()=>d.p3,qd:()=>d.qd,r4:()=>d.r4,tV:()=>d.tV,uH:()=>d.uH,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yW:()=>d.yW,yg:()=>d.yg,zP:()=>d.zP,zY:()=>d.zY});var d=c(93999)},96487:()=>{}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=7611,exports.ids=[7611],exports.modules={3359:(a,b,c)=>{c.d(b,{K0:()=>j,Oh:()=>n,c9:()=>q,lL:()=>r,s9:()=>i});var d=c(89718),e=c(83477);let f="gpt-5.6";function g(a){return String(a||"").trim().replace(/^\/+|\/+$/g,"")}function h(a){let b;return`cx/${(b=g(a)).startsWith("cx/")?b.slice(3):b.startsWith("codex/")?b.slice(6):b||f}`}function i(a){let b=g(a);if(!b)return null;if("auto-codex"===b)return{mode:"router",modelString:`cx/${f}`,strictAccount:!1,label:"Auto Codex"};if(b.startsWith("router/")){let a;return{mode:"router",modelString:(a=g(b.slice(7))||f).includes("/")?a:`cx/${a}`,strictAccount:!1,label:"Router Pool"}}if(b.startsWith("original/"))return{mode:"original",modelString:h(b.slice(9)),strictAccount:!0,label:"Original Codex"};if("original"===b)return{mode:"original",modelString:`cx/${f}`,strictAccount:!0,label:"Original Codex"};let c=b.startsWith("account/")?"account/":b.startsWith("codex-account/")?"codex-account/":null;if(c){let a=b.slice(c.length),d=a.indexOf("/"),e=-1===d?a:a.slice(0,d),g=-1===d?f:a.slice(d+1);return e?{mode:"account",accountRef:e,modelString:h(g),strictAccount:!0,label:"Pinned Codex Account"}:null}return null}function j(a){return a?.displayName||a?.name||a?.email||a?.id||"Codex account"}function k(a){let b=String(j(a)).toLowerCase().replace(/@/g,"-").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"account";return`${b}-${String(a?.id||"").slice(0,8)}`}function l(a){return String(a||"").trim().toLowerCase()}function m(a){let b=a?.providerSpecificData||{};return"GPTJson"===b.importedFrom||String(b.tokenSource||"").startsWith("ChatGPT_team")}async function n(a=5e3){let b=await (0,d.getProviderConnections)({provider:"codex",isActive:!0}),c=b.slice(0,a).map(a=>({id:a.id,slug:k(a),label:j(a),email:a.email||null,imported:m(a),priority:a.priority||null})),e=o(b);return{accounts:c,original:e?{id:e.id,slug:k(e),label:j(e),email:e.email||null,imported:m(e),priority:e.priority||null}:null}}function o(a){return Array.isArray(a)&&0!==a.length?a.find(a=>!m(a))||a[0]:null}async function p(a){let b=l(a);if(!b)return null;let c=await (0,d.getProviderConnections)({provider:"codex",isActive:!0}),e=c.find(a=>l(a.id)===b||k(a)===b||l(a.email)===b||l(a.name)===b||l(a.displayName)===b);if(e)return e;let f=c.filter(a=>l(a.id).startsWith(b)||k(a).startsWith(b));return 1===f.length?f[0]:null}async function q(a){if(!a||"original"!==a.mode&&"account"!==a.mode)return null;if("account"===a.mode)return p(a.accountRef);let b=await (0,d.mt)(),c=b.codexGatewayOriginalConnectionId||b.codexOriginalConnectionId||"";if(c){let a=await p(c);if(a)return a}return o(await (0,d.getProviderConnections)({provider:"codex",isActive:!0}))}function r(a=[]){if(!a.some(a=>"codex"===a.provider&&!1!==a.isActive))return[];let b=[{id:"auto-codex",object:"model",owned_by:"zevai-codex-gateway"},...(e.vq.cx||[]).filter(a=>!a.type||"llm"===a.type).map(a=>a.id).flatMap(a=>[{id:`router/${a}`,object:"model",owned_by:"zevai-codex-gateway"},{id:`original/${a}`,object:"model",owned_by:"zevai-codex-gateway"}])];for(let c of a.filter(a=>"codex"===a.provider&&!1!==a.isActive))b.push({id:`account/${k(c)}`,object:"model",owned_by:"zevai-codex-account"});return b}},37611:(a,b,c)=>{c.d(b,{g:()=>ar,s:()=>as});var d,e=c(80238),f=c(89718),g=c(38775),h=c(43659),i=c(41004),j=c(8590),k=c(35024),l=c(83477),m=c(75681),n=c(48806),o=c(87098),p=c(17559),q=c(25433),r=c(34204),s=c(15082),t=c(90874),u=c(79875),v=c(91861),w=c(64991);let x=/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/,y=new Set(["free","freeTier","oauth","apikey"]),z=new Set(["none","oauth","apikey"]),A=new Set(["llm","embedding","image","imageToText","music","stt","tts","video","webFetch","webSearch"]),B=new Set(["antigravity","claude","codex","commandcode","cursor","gemini","gemini-cli","kiro","ollama","openai","openai-response","openai-responses","vertex"]),C=new Set(["public","trusted-local","loopback-service"]),D=new Set(["terminal","kiro-eventstream","none"]),E=["embeddingConfig","imageConfig","imageToTextConfig","musicConfig","sttConfig","ttsConfig","videoConfig"],F=["connectMs","firstEventMs","progressIdleMs","absoluteMs"],G=Object.freeze({quotaSource:Object.freeze({strategy:"none",provenance:"none"}),deadlineProfile:Object.freeze({connectMs:15e3,firstEventMs:6e4,progressIdleMs:6e4,absoluteMs:3e5}),integrityProfile:Object.freeze({mode:"terminal",requireTerminal:!0})});class H extends Error{constructor(a,b){super(`Invalid provider descriptor ${a}: ${b}`),this.name="ProviderDescriptorError",this.path=a}}function I(a,b){throw new H(a,b)}function J(a){return null!==a&&"object"==typeof a&&!Array.isArray(a)}function K(a,b){"string"==typeof a&&x.test(a)||I(b,"must be a stable lowercase ID")}function L(a,b,c){Array.isArray(a)&&0!==a.length||I(b,"must be a non-empty array");let d=new Set;for(let e of a)"string"==typeof e&&c.has(e)||I(b,"contains an unsupported value"),d.has(e)&&I(b,"contains a duplicate value"),d.add(e)}function M(a){let b=[];for(let[c,d]of Object.entries(a||{}))/(?:base|validate|responses|messages|token|auth|refresh)urls?$/i.test(c)&&("string"==typeof d?b.push(d):Array.isArray(d)&&b.push(...d));return b}function N(a,b,c="public"){for(let d of M(a)){let a;try{a=new URL(d)}catch{I(b,"contains a malformed endpoint")}(a.username||a.password)&&I(b,"endpoint credentials are not allowed"),"public"===c&&"https:"!==a.protocol&&I(b,"public endpoints must use HTTPS"),"public"===c||["http:","https:"].includes(a.protocol)||I(b,"trusted local endpoints must use HTTP or HTTPS")}}function O(a,b){Array.isArray(a)&&0!==a.length||I(b,"must contain a static fallback");let c=new Set;for(let d of a)J(d)&&"string"==typeof d.id&&0!==d.id.length||I(b,"contains a model without an ID"),c.has(d.id)&&I(b,`contains duplicate model ${d.id}`),c.add(d.id)}function P(a,b){for(let c of(J(a)||I(b,"must be an object"),F))(!Number.isInteger(a[c])||a[c]<1e3||a[c]>9e5)&&I(`${b}.${c}`,"must be between 1000 and 900000 milliseconds");a.absoluteMs<a.connectMs&&I(`${b}.absoluteMs`,"must cover connect time")}let Q={id:"antigravity",alias:"ag",category:"oauth",authModes:["oauth"],display:{...m.AI_PROVIDERS.antigravity},serviceKinds:m.AI_PROVIDERS.antigravity.serviceKinds,capabilities:{streaming:!0,tools:!0,thinking:!0},transport:k.xq.antigravity,models:l.vq.ag,quotaSource:{strategy:"provider-api",provenance:"live-or-last-success"},refreshProfile:w.Wk,deadlineProfile:{...G.deadlineProfile,variants:{thinking:{connectMs:G.deadlineProfile.connectMs,firstEventMs:i.iL,progressIdleMs:i.SI,absoluteMs:i.P4}}},integrityProfile:G.integrityProfile,dashboard:{connection:"oauth",validation:"quota-or-model"}},R={id:"kiro",alias:"kr",category:"oauth",authModes:m.AI_PROVIDERS.kiro.authModes,display:{...m.AI_PROVIDERS.kiro},serviceKinds:["llm"],capabilities:{streaming:!0,tools:!0,thinking:!0},transport:k.xq.kiro,models:l.vq.kr,quotaSource:{strategy:"provider-api",provenance:"live-or-last-success"},refreshProfile:(0,w.JJ)("kiro"),deadlineProfile:G.deadlineProfile,integrityProfile:{mode:"kiro-eventstream",requireTerminal:!0,verifiedWindowMs:9e5,cleanProbesToRecover:5,memoryLimitBytes:2097152,maxBytes:0x4000000},dashboard:{connection:"oauth-or-apikey",validation:"profile-or-model"}},S={id:"codex",alias:"cx",category:"oauth",authModes:["oauth"],display:{...m.AI_PROVIDERS.codex},serviceKinds:m.AI_PROVIDERS.codex.serviceKinds,capabilities:{streaming:!0,tools:!0,thinking:!0},transport:k.xq.codex,models:l.vq.cx,quotaSource:{strategy:"provider-api",provenance:"live-or-last-success"},refreshProfile:w.Wk,deadlineProfile:G.deadlineProfile,integrityProfile:G.integrityProfile,dashboard:{connection:"oauth",validation:"catalog-or-quota"}},T={id:"cursor",alias:"cu",category:"oauth",authModes:["oauth"],display:{...m.AI_PROVIDERS.cursor},serviceKinds:["llm"],capabilities:{streaming:!0,tools:!0,liveCatalog:!0},transport:k.xq.cursor,models:l.vq.cu,quotaSource:{strategy:"provider-api",provenance:"live-or-last-success"},refreshProfile:w.Wk,deadlineProfile:G.deadlineProfile,integrityProfile:G.integrityProfile,dashboard:{connection:"oauth",validation:"account-or-model"}},U={id:"github",alias:"gh",category:"oauth",authModes:["oauth"],display:{...m.AI_PROVIDERS.github},serviceKinds:m.AI_PROVIDERS.github.serviceKinds,capabilities:{streaming:!0,tools:!0,responseEscalation:!0},transport:k.xq.github,models:l.vq.gh,quotaSource:{strategy:"provider-api",provenance:"live-or-last-success"},refreshProfile:w.Wk,deadlineProfile:G.deadlineProfile,integrityProfile:G.integrityProfile,dashboard:{connection:"oauth",validation:"quota-or-model"},embeddingConfig:m.AI_PROVIDERS.github.embeddingConfig},V=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","modelsFetcher","mediaPriority","hiddenKinds"],W=[n.A,o.A,p.A,q.A,r.A,s.A,t.A,u.A,v.A,Q,R,S,T,U];function X(a={}){return Object.fromEntries(V.filter(b=>void 0!==a[b]).map(b=>[b,a[b]]))}let Y=new Set([...Object.keys(m.AI_PROVIDERS),...Object.keys(k.xq)]),Z=new Map(W.map(a=>[a.id,a])),$=new Set(["antigravity","kiro","codex","cursor","github"]),_={};for(let a of Y){let b=function(a){let b=m.AI_PROVIDERS[a]||{},c=b.alias||a;return{id:a,alias:c,category:b.noAuth?"free":b.hasOAuth?"oauth":"apikey",authModes:b.authModes,hasOAuth:b.hasOAuth,noAuth:b.noAuth,passthroughModels:b.passthroughModels,display:function(a={}){let b=new Set(V);return Object.fromEntries(Object.entries(a).filter(([a])=>!b.has(a)))}(b),transport:k.xq[a],models:l.vq[c]||l.vq[a]||[],...X(b)}}(a),c=Z.has(a)?(d=Z.get(a),{...b,...d,display:{...b.display,...d.display},transport:{...b.transport,...d.transport},models:function(a=[],b=[]){let c=new Map;for(let d of[...a,...b])d?.id&&c.set(d.id,{...c.get(d.id),...d});return[...c.values()]}(b.models,d.models)}):b;_[a]=$.has(a)?function(a,{optional:b=!1}={}){try{return function(a){if(J(a)||I("root","must be an object"),K(a.id,"id"),K(a.alias,"alias"),void 0!==a.aliases)for(let b of(Array.isArray(a.aliases)||I("aliases","must be an array"),a.aliases))K(b,"aliases");y.has(a.category)||I("category","is unsupported"),L(a.authModes,"authModes",z),L(a.serviceKinds,"serviceKinds",A),J(a.display)&&"string"==typeof a.display.name&&a.display.name.trim()||I("display.name","is required"),J(a.capabilities)||I("capabilities","must be an object"),J(a.transport)||I("transport","must be an object"),B.has(a.transport.format)||I("transport.format","is unsupported");let b=a.transport.trustClass||"public";C.has(b)||I("transport.trustClass","is unsupported"),0===M(a.transport).length&&I("transport","requires an endpoint"),N(a.transport,"transport",b),O(a.models,"models"),J(a.quotaSource)&&"string"==typeof a.quotaSource.strategy&&"string"==typeof a.quotaSource.provenance||I("quotaSource","must declare strategy and provenance"),J(c=a.refreshProfile)||I("refreshProfile","must be an object"),(!Number.isInteger(c.maxConcurrent)||c.maxConcurrent<1)&&I("refreshProfile.maxConcurrent","must be a positive integer"),(!Number.isInteger(c.minDelayMs)||c.minDelayMs<0)&&I("refreshProfile.minDelayMs","must be a non-negative integer");var c,d=a.deadlineProfile;if(P(d,"deadlineProfile"),void 0!==d.variants)for(let[a,b]of(J(d.variants)||I("deadlineProfile.variants","must be an object"),Object.entries(d.variants)))P(b,`deadlineProfile.variants.${a}`);var e=a.integrityProfile;for(let a of(J(e)&&D.has(e.mode)||I("integrityProfile.mode","is unsupported"),"boolean"!=typeof e.requireTerminal&&I("integrityProfile.requireTerminal","must be boolean"),["memoryLimitBytes","maxBytes","verifiedWindowMs","cleanProbesToRecover"]))void 0!==e[a]&&(!Number.isInteger(e[a])||e[a]<=0)&&I(`integrityProfile.${a}`,"must be a positive integer");J(a.dashboard)&&"string"==typeof a.dashboard.connection&&"string"==typeof a.dashboard.validation||I("dashboard","must declare connection and validation modes");for(let b of E){let c=a[b];void 0!==c&&(J(c)||I(b,"must be an object"),N(c,b,c.trustClass||"public"),void 0!==c.models&&O(c.models,`${b}.models`))}return function a(b,c=new WeakMap){if(null===b||"object"!=typeof b)return b;if(c.has(b))return c.get(b);let d=Array.isArray(b)?[]:{};for(let[e,f]of(c.set(b,d),Object.entries(b)))d[e]=a(f,c);return Object.freeze(d)}(a)}(a)}catch(d){let c;if(!b)throw d;return Object.freeze({id:"string"==typeof a?.id&&x.test(a.id)?a.id:"optional-provider",disabled:!0,diagnostic:(c=d instanceof H?d.path:"unknown",`Provider descriptor disabled: invalid ${c}`.slice(0,160))})}}(c):c}let aa={},ab={},ac={};for(let a of Object.values(_)){a.transport&&(aa[a.id]=a.transport),ab[a.alias||a.id]=a.models||[];let b=X(a);Object.keys(b).length>0&&(ac[a.id]=b)}let ad=Number(process.env.VIDEO_FETCH_TIMEOUT_MS),ae=Number.isFinite(ad)?Math.max(5e3,Math.min(ad,6e5)):12e4,af=new Set(["generations","edits","extensions"]);function ag(a){return ac[a]?.videoConfig||null}function ah(a,b=null){if(!a)return a;let c=String(a).replace(/Bearer\s+[A-Za-z0-9._~+/=-]{8,}/gi,"Bearer [redacted]");for(let a of["accessToken","refreshToken","apiKey"]){let d=b?.[a];"string"==typeof d&&d.length>=8&&(c=c.split(d).join("[redacted]"))}return c}async function ai({provider:a,action:b=null,requestId:c=null,rawBody:d=null,contentType:e=null,idempotencyKey:f=null,credentials:g,signal:k,timeoutMs:l=ae,log:m,onCredentialsRefreshed:n}){let o,p,q,r=ag(a);if(!r)return(0,h.A1)(i.gx.BAD_REQUEST,`Provider '${a}' does not support video generation`);if(!c&&!af.has(b))return(0,h.A1)(i.gx.BAD_REQUEST,`Unknown video action: ${b}`);let s=c?"GET":"POST",t=(p=r.baseUrl.replace(/\/$/,""),c?`${p}/${encodeURIComponent(c)}`:`${p}/${b}`),u=(q="function"==typeof AbortSignal?.timeout?AbortSignal.timeout(l):null,k&&q&&"function"==typeof AbortSignal.any?AbortSignal.any([k,q]):k||q||void 0),v=a=>fetch(t,{method:s,headers:function({token:a,contentType:b,idempotencyKey:c}){let d={Accept:"application/json"};if(a&&(d.Authorization=`Bearer ${a}`),b&&(d["Content-Type"]=b),c){let a=String(c).replace(/[\r\n\t]/g,"").slice(0,256);a&&(d["Idempotency-Key"]=a)}return d}({token:a,contentType:"POST"===s?e:null,idempotencyKey:"POST"===s?f:null}),body:"POST"===s?d:void 0,signal:u});try{o=await v(g?.accessToken||g?.apiKey)}catch(b){if(b?.name==="AbortError"||b?.name==="TimeoutError")return(0,h.A1)(i.gx.REQUEST_TIMEOUT,`[${a}] video ${s} aborted: ${b.message}`);return(0,h.A1)(i.gx.BAD_GATEWAY,ah(`[${a}] video upstream fetch failed: ${b.message}`,g))}if((o.status===i.gx.UNAUTHORIZED||o.status===i.gx.FORBIDDEN)&&g?.refreshToken){let b=null;try{b=await (0,j.$B)(a,g,m)}catch(b){m?.warn?.("TOKEN",`${a} | video refresh error: ${ah(b.message,g)}`)}if(b?.accessToken){m?.info?.("TOKEN",`${a.toUpperCase()} | refreshed for video ${s}`),Object.assign(g,b),n&&await n(b);try{await o.body?.cancel?.()}catch{}try{o=await v(g.accessToken||g.apiKey)}catch(b){return(0,h.A1)(i.gx.BAD_GATEWAY,ah(`[${a}] video retry after refresh failed: ${b.message}`,g))}}else m?.warn?.("TOKEN",`${a.toUpperCase()} | video refresh failed — account needs re-auth`)}let w=await o.text().catch(()=>"");if(!o.ok){let b=ah(w||`HTTP ${o.status}`,g);return(0,h.A1)(o.status,`[${a}] ${b.slice(0,2e3)}`)}return{success:!0,response:new Response(w,{status:o.status,headers:{"Content-Type":o.headers.get("content-type")||"application/json","Access-Control-Allow-Origin":"*"}})}}var aj=c(58136),ak=c(7803);function al(a){return a.headers.get("x-zevai-connection-id")||a.headers.get("x-connection-id")||null}let am=new Set([i.gx.UNAUTHORIZED,i.gx.FORBIDDEN,i.gx.RATE_LIMITED]);async function an(a){let b=(0,e.Tr)(a);if((await (0,f.mt)()).requireApiKey){if(!b)return(0,h.yj)(i.gx.UNAUTHORIZED,"Missing API key");if(!await (0,e.kI)(b))return(0,h.yj)(i.gx.UNAUTHORIZED,"Invalid API key")}return null}async function ao(a){let b,c=a.headers.get("content-type")||"",d=Number.isFinite(b=Number(process.env.MAX_VIDEO_REQUEST_BYTES))?Math.max(1024,Math.min(b,0x4000000)):0x2000000,e=Number(a.headers.get("content-length"));if(Number.isFinite(e)&&e>d)return{error:(0,h.yj)(i.gx.PAYLOAD_TOO_LARGE,"Video request body is too large")};if(c.includes("application/json")){let b,e=await a.text();if(Buffer.byteLength(e)>d)return{error:(0,h.yj)(i.gx.PAYLOAD_TOO_LARGE,"Video request body is too large")};try{b=JSON.parse(e)}catch{return{error:(0,h.yj)(i.gx.BAD_REQUEST,"Invalid JSON body")}}return{raw:e,parsed:b,contentType:c}}let f=Buffer.from(await a.arrayBuffer());return f.byteLength>d?{error:(0,h.yj)(i.gx.PAYLOAD_TOO_LARGE,"Video request body is too large")}:{raw:f,parsed:null,contentType:c}}async function ap(a){if(!a?.model)return{provider:"xai",model:null};let b=String(a.model),c=await (0,g.mA)(b);return c.provider?ag(c.provider)?{provider:c.provider,model:c.model}:b.includes("/")?{error:(0,h.yj)(i.gx.BAD_REQUEST,`Provider '${c.provider}' does not support video generation`)}:{provider:"xai",model:b}:{error:(0,h.yj)(i.gx.BAD_REQUEST,"Combos are not supported for video generation")}}function aq(a,b){if(!b)return a;let c=new Headers(a.headers);return c.set("x-zevai-connection-id",String(b)),c.set("x-connection-id",String(b)),c.set("Access-Control-Expose-Headers","x-zevai-connection-id, x-connection-id"),new Response(a.body,{status:a.status,headers:c})}async function ar(a,b){let c=await an(a);if(c)return c;let d=await ao(a);if(d.error)return d.error;let f=await ap(d.parsed);if(f.error)return f.error;let{provider:g,model:j}=f,k=d.raw;d.parsed&&j&&d.parsed.model!==j&&(k=JSON.stringify({...d.parsed,model:j}));let l=al(a),m=(0,e.Tr)(a),n=a.headers.get("idempotency-key")||null,o=new Set,p=null,q=null;for(;;){let c=await (0,e.c1)(g,o,j,{preferredConnectionId:l,...m?{apiKey:m}:{}});if(!c||c.allRateLimited){if(c?.allRateLimited){let a=p||c.lastError||"Unavailable",b=q||Number(c.lastErrorCode)||i.gx.SERVICE_UNAVAILABLE;return(0,h.wO)(b,`[${g}/${j||"video"}] ${a}`,c.retryAfter,c.retryAfterHuman)}if(0===o.size)return(0,h.yj)(i.gx.BAD_REQUEST,`No credentials for provider: ${g}`);return(0,h.yj)(q||i.gx.SERVICE_UNAVAILABLE,p||"All accounts unavailable")}let f=await (0,aj.eU)(g,c),r=await ai({provider:g,action:b,rawBody:k,contentType:d.contentType||null,idempotencyKey:n,credentials:f,signal:a.signal,log:ak,onCredentialsRefreshed:async a=>{await (0,aj.vN)(c.connectionId,{accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData,testStatus:"active"})}});if(r.success)return await (0,e.Pt)(c.connectionId,c,j),ak.info("VIDEO",`${g.toUpperCase()} | ${b} accepted (connection ${c.connectionId})`),aq(r.response,c.connectionId);let{shouldFallback:s}=await (0,e.vk)(c.connectionId,r.status,ah(r.error,f),g,j);if(s&&am.has(r.status)){o.add(c.connectionId),p=r.error,q=r.status;continue}return r.response}}async function as(a,b){let c=await an(a);if(c)return c;if(!b)return(0,h.yj)(i.gx.BAD_REQUEST,"Missing video request id");if(String(b).length>256)return(0,h.yj)(i.gx.BAD_REQUEST,"Video request id is too long");let d=al(a),f=(0,e.Tr)(a),g=await (0,e.c1)("xai",null,null,{preferredConnectionId:d,strictPreferred:!!d,...f?{apiKey:f}:{}});if(!g||g.allRateLimited)return(0,h.yj)(i.gx.BAD_REQUEST,"No credentials for provider: xai");let j=await (0,aj.eU)("xai",g),k=await ai({provider:"xai",requestId:b,credentials:j,signal:a.signal,log:ak,onCredentialsRefreshed:async a=>{await (0,aj.vN)(g.connectionId,{accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData,testStatus:"active"})}});return k.success?(await (0,e.Pt)(g.connectionId,g,null),aq(k.response,g.connectionId)):(await (0,e.vk)(g.connectionId,k.status,ah(k.error,j),"xai",null),k.response)}},38775:(a,b,c)=>{c.d(b,{d_:()=>i,mA:()=>h});var d=c(89718),e=c(40669),f=c(3359);let g={xmtp:"xiaomi-tokenplan","xiaomi-tokenplan":"xiaomi-tokenplan"};async function h(a){let b,c=(0,f.s9)(a);if(c)return{...await h(c.modelString),gateway:{mode:c.mode,accountRef:c.accountRef||null,strictAccount:!!c.strictAccount,requestedModel:a,modelString:c.modelString}};let i=(b=(0,e.Xh)(a),b?.providerAlias&&g[b.providerAlias]?{...b,provider:g[b.providerAlias]}:b);if(!i.isAlias){let a=(await (0,d.Fh)({type:"openai-compatible"})).find(a=>a.prefix===i.providerAlias);if(a)return{provider:a.id,model:i.model};let b=(await (0,d.Fh)({type:"anthropic-compatible"})).find(a=>a.prefix===i.providerAlias);if(b)return{provider:b.id,model:i.model};let c=(await (0,d.Fh)({type:"custom-embedding"})).find(a=>a.prefix===i.providerAlias);return c?{provider:c.id,model:i.model}:{provider:i.provider,model:i.model}}return await (0,d.Dj)(i.model)?{provider:null,model:i.model}:(0,e.js)(a,d.getModelAliases)}async function i(a){if(a.includes("/"))return null;let b=await (0,d.Dj)(a);return b&&b.models&&b.models.length>0?b.models:null}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=8136,exports.ids=[8136],exports.modules={38160:(a,b,c)=>{c.d(b,{Ou:()=>k,eG:()=>i,gQ:()=>j});var d=c(75924);let e=new Map,f=new Map,g=null;function h(a){return"string"==typeof a?a.trim()||null:a&&"object"==typeof a&&"string"==typeof a.id&&a.id.trim()||null}async function i(a,b,c={}){if(!a||!b)return null;let d=h(c.preferredProjectId),g=e.get(a);if(g&&Date.now()-g.fetchedAt<36e5&&(!d||d===g.projectId))return g.projectId;let j=d?`${a}::${d}`:a;if(f.has(j))return f.get(j).promise;let k=new AbortController,m=(async()=>{try{let c=await l(b,k.signal,{preferredProjectId:d});if(c)return e.set(a,{projectId:c,fetchedAt:Date.now()}),c;return console.warn("[ProjectId] could not fetch projectId for connection",a.slice(0,8)),null}catch(a){return console.warn(`[ProjectId] Error fetching project ID: ${a.message}`),null}finally{f.delete(j)}})();return f.set(j,{promise:m,controller:k,startedAt:Date.now()}),m}async function j(a,b={}){if(!a)return{projectId:null,tierId:null,requiresUserProject:!1,error:"missing access token"};try{return await m(a,void 0,b)}catch(a){return{projectId:null,tierId:null,requiresUserProject:!1,error:a?.message||String(a)}}}function k(a){e.delete(a)}async function l(a,b,c={}){return(await m(a,b,c)).projectId}async function m(a,b,c={}){let e=h(c.preferredProjectId),f=await fetch(d.nZ.loadCodeAssist,{method:"POST",headers:{...d.Ic,Authorization:`Bearer ${a}`},body:JSON.stringify({metadata:d.zv}),signal:b});if(!f.ok){let a=await f.text().catch(()=>"");throw Error(`loadCodeAssist failed: HTTP ${f.status} ${a.slice(0,200)}`)}let g=await f.json(),i=function(a){if(!a)return null;if("string"==typeof a.cloudaicompanionProject){let b=a.cloudaicompanionProject.trim();if(b)return b}if(a.cloudaicompanionProject&&"object"==typeof a.cloudaicompanionProject){let b=a.cloudaicompanionProject.id;if("string"==typeof b&&b.trim())return b.trim()}return null}(g);if(i)return{projectId:i,tierId:o(g).tierId||null,requiresUserProject:!1,loadRaw:g};let j=o(g),k=j.tierId||"free-tier";if(j.userDefined)return e?{projectId:await n(a,k,b,e)||e,tierId:k,requiresUserProject:!0,loadRaw:g,error:void 0}:(console.warn("[ProjectId] GSuite/DASHER has no free-tier project from loadCodeAssist; caller should reuse a stored/peer managed project id."),{projectId:null,tierId:k,requiresUserProject:!0,loadRaw:g,error:"no managed project on account; use stored or peer projectId"});let l=await n(a,k,b,null);return{projectId:l,tierId:k,requiresUserProject:!1,loadRaw:g,error:l?void 0:"onboardUser did not return a project id"}}async function n(a,b,c,e=null){console.log(`[ProjectId] Onboarding user with tier: ${b}`+(e?` project=${e}`:""));let f={tierId:b,metadata:d.zv};e&&(f.cloudaicompanionProject=e);for(let b=1;b<=5&&!c?.aborted;b++){let g=new AbortController,h=setTimeout(()=>g.abort(),3e4),i=()=>g.abort();c?.addEventListener("abort",i);try{let c=await fetch(d.nZ.onboardUser,{method:"POST",headers:{...d.Ic,Authorization:`Bearer ${a}`},body:JSON.stringify(f),signal:g.signal});if(clearTimeout(h),!c.ok){let a=await c.text().catch(()=>"");throw Error(`onboardUser HTTP ${c.status}: ${a.slice(0,200)}`)}let i=await c.json();if(!0===i.done){let a=function(a){if(!a?.response)return null;let b=a.response.cloudaicompanionProject;if("string"==typeof b){let a=b.trim();if(a)return a}if(b&&"object"==typeof b){let a=b.id;if("string"==typeof a&&a.trim())return a.trim()}return null}(i);if(a)return console.log(`[ProjectId] Successfully onboarded, project ID: ${a}`),a;if(e)return console.log(`[ProjectId] onboard done without id; using preferred project ${e}`),e;throw Error("onboardUser done but no project_id in response")}console.log(`[ProjectId] Onboard attempt ${b}/5: not done yet, waiting...`),await new Promise(a=>setTimeout(a,2e3))}catch(a){if(clearTimeout(h),"AbortError"===a.name){if(console.warn(`[ProjectId] onboardUser attempt ${b} aborted (timeout or connection removed)`),c?.aborted)return null;continue}if(5===b)return console.warn(`[ProjectId] onboardUser failed after 5 attempts: ${a.message}`),null;console.warn(`[ProjectId] onboardUser attempt ${b} failed: ${a.message}, retrying...`),await new Promise(a=>setTimeout(a,2e3))}finally{clearTimeout(h),c?.removeEventListener("abort",i)}}return null}function o(a){let b=null,c=!1;if(a?.currentTier?.id&&"string"==typeof a.currentTier.id&&(b=a.currentTier.id.trim(),c=!!a.currentTier.userDefinedCloudaicompanionProject),Array.isArray(a?.allowedTiers)){for(let d of a.allowedTiers)if(d&&"object"==typeof d&&!0===d.isDefault&&d.id){b=String(d.id).trim(),c=!!d.userDefinedCloudaicompanionProject;break}if(!b){let d=a.allowedTiers.find(a=>a?.id==="free-tier");d?(b="free-tier",c=!!d.userDefinedCloudaicompanionProject):a.allowedTiers[0]?.id&&(b=String(a.allowedTiers[0].id).trim(),c=!!a.allowedTiers[0].userDefinedCloudaicompanionProject)}}return"free-tier"===b&&(c=!1),{tierId:b,userDefined:c}}g=setInterval(()=>{try{let a=Date.now();for(let[b,c]of e)(!c||a-c.fetchedAt>=36e5)&&e.delete(b);for(let[b,c]of f){if(!c||"number"!=typeof c.startedAt){f.delete(b);continue}if(a-c.startedAt>12e4){try{c.controller.abort()}catch(a){}f.delete(b)}}}catch(a){console.warn("[ProjectId] cleanup sweep error:",a?.message??a)}},6e5),g?.unref?.()},58136:(a,b,c)=>{c.d(b,{eU:()=>t,I9:()=>n,Sc:()=>o,vN:()=>s});var d=c(7803),e=c(89718),f=c(38160),g=c(8590),h=c(93943),i=c(64991);function j(a){let b=Error("Refresh request aborted");return b.name="AbortError",void 0!==a&&(b.cause=a),b}class k{constructor(a={}){this.getProfile=a.getProfile||i.JJ,this.now=a.now||Date.now,this.setTimer=a.setTimer||setTimeout,this.clearTimer=a.clearTimer||clearTimeout,this.lanes=new Map}run(a,b,c={}){if("function"!=typeof b)return Promise.reject(TypeError("Refresh operation must be a function"));let d=c.signal;if(d?.aborted)return Promise.reject(j(d.reason));let e=this.#a(a);return new Promise((a,c)=>{let f={operation:b,resolve:a,reject:c,signal:d,state:"queued",callerSettled:!1,onAbort:null};(f.onAbort=()=>{if(!f.callerSettled&&(f.callerSettled=!0,f.reject(j(d.reason)),"queued"===f.state)){let a=e.queue.indexOf(f);a>=0&&e.queue.splice(a,1),f.state="aborted",this.#b(f),this.#c(e)}},d?.addEventListener?.("abort",f.onAbort,{once:!0}),d?.aborted)?f.onAbort():(e.queue.push(f),this.#c(e))})}#a(a){let b=String(a||"default").trim().toLowerCase()||"default",c=this.lanes.get(b);if(c)return c;let d=this.getProfile(b)||{};return c={key:b,profile:{maxConcurrent:Math.max(1,Number(d.maxConcurrent)||1),minDelayMs:Math.max(0,Number(d.minDelayMs)||0)},queue:[],active:0,lastStartedAt:null,timer:null},this.lanes.set(b,c),c}#c(a){if(!a.timer&&!(a.active>=a.profile.maxConcurrent))for(;a.queue.length>0&&a.active<a.profile.maxConcurrent;){let b=null===a.lastStartedAt?0:Math.max(0,a.lastStartedAt+a.profile.minDelayMs-this.now());if(b>0){a.timer=this.setTimer(()=>{a.timer=null,this.#c(a)},b),a.timer?.unref?.();return}let c=a.queue.shift();c&&"queued"===c.state&&this.#d(a,c)}}#d(a,b){b.state="running",a.active+=1,a.lastStartedAt=this.now(),Promise.resolve().then(b.operation).then(a=>this.#e(b,b.resolve,a),a=>this.#e(b,b.reject,a)).finally(()=>{b.state="done",a.active=Math.max(0,a.active-1),this.#b(b),this.#c(a)})}#e(a,b,c){a.callerSettled||(a.callerSettled=!0,this.#b(a),b(c))}#b(a){a.signal?.removeEventListener?.("abort",a.onAbort)}}let l=function(a={}){return new k(a)}(),m=g.oD,n=(a,b,c)=>(0,g.I9)(a,b,c,d),o=(a,b,c={})=>(c.scheduler||l).run(a,()=>(0,h.Vq)(a,b,d),{signal:c.signal});function p(a,b=Date.now()){return new Date(b+1e3*a).toISOString()}function q(a){if(!a)return null;let b=new Date(a);return Number.isFinite(b.getTime())?b.toISOString():null}function r({permanent:a,code:b,status:c}){let d=Error(a?"Kiro refresh credential is missing or rejected":"Kiro credential refresh failed temporarily");return d.name=a?"KiroRefreshCredentialError":"KiroRefreshTransientError",d.permanent=a,d.code=b,d.status=c,d}async function s(a,b){try{let c=function(a,b=Date.now()){let c={};if(a.accessToken&&(c.accessToken=a.accessToken),a.refreshToken&&(c.refreshToken=a.refreshToken),a.idToken&&(c.idToken=a.idToken),a.lastRefreshAt&&(c.lastRefreshAt=a.lastRefreshAt),a.expiresAt&&(c.expiresAt=a.expiresAt),a.expiresIn)c.expiresAt=p(a.expiresIn,b),c.expiresIn=a.expiresIn;else if(a.expiresAt){let d=q(a.expiresAt);d&&(c.expiresAt=d,c.expiresIn=Math.max(1,Math.floor((new Date(d).getTime()-b)/1e3)))}return a.providerSpecificData&&(c.providerSpecificData={...a.existingProviderSpecificData||{},...a.providerSpecificData}),(a.copilotToken||a.copilotTokenExpiresAt)&&(c.providerSpecificData={...c.providerSpecificData||a.existingProviderSpecificData||{},...a.copilotToken?{copilotToken:a.copilotToken}:{},...a.copilotTokenExpiresAt?{copilotTokenExpiresAt:a.copilotTokenExpiresAt}:{}}),a.projectId&&(c.projectId=a.projectId),c}(b),f=await (0,e.updateProviderConnection)(a,c);return d.info("TOKEN_REFRESH","Credentials updated in localDb",{connectionId:a,success:!!f}),!!f}catch(b){return d.error("TOKEN_REFRESH","Error updating credentials in localDb",{connectionId:a,error:b.message}),!1}}async function t(a,b,c={}){let e={...b},i=c.scheduler||l;if((0,h.fp)(a,e)){let b=e.expiresAt?new Date(e.expiresAt).getTime():null,h=b?b-Date.now():null,j=(0,g.Og)(a);if(d.info("TOKEN_REFRESH","Refreshing provider credentials proactively",{provider:a,expiresIn:null===h?null:Math.round(h/1e3),refreshLeadMs:j,lastRefreshAt:e.lastRefreshAt||null}),"kiro"===a&&!e.refreshToken)throw r({permanent:!0,code:"MISSING_REFRESH_TOKEN",status:401});let k=await o(a,e,{scheduler:i,signal:c.signal});if(k?.accessToken||k?.apiKey||k?.copilotToken){let b={...k,existingProviderSpecificData:e.providerSpecificData},c=await s(e.connectionId,b);if("kiro"===a&&!c)throw r({permanent:!1,code:"PERSIST_REFRESH_FAILED",status:502});!function(a,b,c){("antigravity"===a||"gemini-cli"===a)&&b&&c&&((0,f.Ou)(b),(0,f.eG)(b,c).then(a=>{a&&s(b,{projectId:a}).catch(a=>{d.debug("TOKEN_REFRESH","Failed to persist refreshed projectId",{connectionId:b,error:a?.message??a})})}).catch(a=>{d.debug("TOKEN_REFRESH","Failed to fetch projectId after token refresh",{connectionId:b,error:a?.message??a})}))}(a,(e={...e,...k,expiresAt:k.expiresIn?p(k.expiresIn):q(k.expiresAt)||k.expiresAt||e.expiresAt,providerSpecificData:k.providerSpecificData?{...e.providerSpecificData,...k.providerSpecificData}:e.providerSpecificData}).connectionId,e.accessToken)}else if("kiro"===a)throw r({permanent:!1,code:"TRANSIENT_REFRESH_FAILURE",status:502})}if("github"===a&&e.providerSpecificData?.copilotTokenExpiresAt){let b=1e3*e.providerSpecificData.copilotTokenExpiresAt-Date.now();if(b<m){d.info("TOKEN_REFRESH","Copilot token expiring soon, refreshing proactively",{provider:a,expiresIn:Math.round(b/1e3)});let f=await i.run(a,()=>{let a;return a=e.accessToken,(0,g.jR)(a,d)},{signal:c.signal});if(f){let a={...e.providerSpecificData,copilotToken:f.token,copilotTokenExpiresAt:f.expiresAt};await s(e.connectionId,{providerSpecificData:a}),e.providerSpecificData=a,e.copilotToken=f.token}}}return e}},64991:(a,b,c)=>{c.d(b,{JJ:()=>f,Wk:()=>d});let d=Object.freeze({maxConcurrent:4,minDelayMs:0}),e=Object.freeze({kiro:Object.freeze({maxConcurrent:1,minDelayMs:3e3})});function f(a){return e[String(a||"").trim().toLowerCase()]||d}}};