@rabbi696/ezrouter 0.5.98 → 0.6.0

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 (1239) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +21 -19
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/routes-manifest.json +16 -4
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js +2 -2
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +2 -2
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +5 -5
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +18 -5
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js +2 -2
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  84. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  94. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  95. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  97. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  98. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  99. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  100. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  102. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  105. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +2 -2
  124. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/changelog/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +6 -6
  132. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  138. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +3 -3
  146. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  156. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +4 -4
  162. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  166. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  170. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/convoy/rules/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  216. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -0
  232. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -0
  233. package/app/.next-cli-build/server/app/api/models/catalog-sync/route_client-reference-manifest.js +1 -0
  234. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/callback/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  251. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -0
  257. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -0
  258. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route_client-reference-manifest.js +1 -0
  259. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  308. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  310. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  314. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  316. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  318. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  320. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  322. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  324. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  326. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  328. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  330. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/routing-health/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +2 -2
  348. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  354. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  376. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js +2 -2
  384. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  398. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +3 -3
  428. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -0
  434. package/app/.next-cli-build/server/app/api/v1/models/{[kind] → [...model]}/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route_client-reference-manifest.js +1 -0
  436. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  460. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  461. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  462. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  464. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  466. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  467. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  468. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  469. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  470. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  472. package/app/.next-cli-build/server/app/callback.html +1 -1
  473. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  474. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  475. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  477. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  478. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  482. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  483. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  486. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  487. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  489. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  490. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  492. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  493. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  496. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  497. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  499. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  500. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  502. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  503. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  506. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  507. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  509. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  510. package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/convoy.rsc +7 -7
  512. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +7 -7
  517. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +4 -4
  519. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +2 -2
  520. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  522. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  523. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  527. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  529. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  530. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  532. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  537. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  538. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  539. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  540. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  541. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  542. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  543. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  544. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  546. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  547. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  548. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  549. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  550. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  551. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  552. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  553. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  554. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  556. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  557. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  558. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  559. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  560. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  561. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  562. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  563. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  564. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  566. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  567. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  568. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  569. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  570. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  571. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  572. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  573. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  574. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  575. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  576. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  578. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  579. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  580. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  581. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  582. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  583. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  584. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  585. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  586. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  588. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  589. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  591. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  592. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
  594. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  595. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  596. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  597. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  598. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
  599. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  600. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  601. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  602. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  603. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  604. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  605. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  606. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  607. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  608. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  609. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  610. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  611. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  612. package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
  613. package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +7 -7
  614. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
  615. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
  616. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  618. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +7 -7
  619. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
  620. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +4 -4
  621. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +2 -2
  622. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  623. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  624. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  625. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  626. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  627. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  628. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  629. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  630. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  631. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  632. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  633. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  634. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  635. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  636. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  637. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  638. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  639. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  640. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  641. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  642. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  643. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  644. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  645. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  646. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  647. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  648. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  649. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  650. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  651. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  652. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  653. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  654. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  655. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  656. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  657. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  658. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  659. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  660. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  661. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  662. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  663. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  664. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  665. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  666. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  667. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  668. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  669. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  670. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  671. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  672. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  673. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  674. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  675. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  676. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  677. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  678. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  679. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  680. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  681. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  682. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  683. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  684. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  685. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  686. package/app/.next-cli-build/server/app/index.html +1 -1
  687. package/app/.next-cli-build/server/app/index.rsc +5 -5
  688. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  689. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  690. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  691. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  692. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  693. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  694. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  695. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  696. package/app/.next-cli-build/server/app/landing.html +1 -1
  697. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  698. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  699. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  700. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  701. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  702. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  703. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  704. package/app/.next-cli-build/server/app/login/page.js +2 -2
  705. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  706. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  707. package/app/.next-cli-build/server/app/login.html +1 -1
  708. package/app/.next-cli-build/server/app/login.rsc +6 -6
  709. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  710. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  711. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  712. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  713. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  714. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  715. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  716. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  717. package/app/.next-cli-build/server/app/page.js +2 -2
  718. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  719. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  720. package/app/.next-cli-build/server/app-paths-manifest.json +21 -19
  721. package/app/.next-cli-build/server/chunks/1133.js +1 -1
  722. package/app/.next-cli-build/server/chunks/1253.js +1 -1
  723. package/app/.next-cli-build/server/chunks/1329.js +1 -1
  724. package/app/.next-cli-build/server/chunks/1522.js +1 -1
  725. package/app/.next-cli-build/server/chunks/1531.js +1 -1
  726. package/app/.next-cli-build/server/chunks/1714.js +1 -1
  727. package/app/.next-cli-build/server/chunks/1847.js +1 -0
  728. package/app/.next-cli-build/server/chunks/2177.js +1 -1
  729. package/app/.next-cli-build/server/chunks/2269.js +1 -1
  730. package/app/.next-cli-build/server/chunks/2382.js +1 -0
  731. package/app/.next-cli-build/server/chunks/2547.js +3 -3
  732. package/app/.next-cli-build/server/chunks/2892.js +1 -0
  733. package/app/.next-cli-build/server/chunks/2898.js +1 -1
  734. package/app/.next-cli-build/server/chunks/290.js +1 -0
  735. package/app/.next-cli-build/server/chunks/3148.js +2 -2
  736. package/app/.next-cli-build/server/chunks/3433.js +6 -6
  737. package/app/.next-cli-build/server/chunks/3547.js +1 -1
  738. package/app/.next-cli-build/server/chunks/3647.js +1 -0
  739. package/app/.next-cli-build/server/chunks/369.js +25 -25
  740. package/app/.next-cli-build/server/chunks/3814.js +1 -1
  741. package/app/.next-cli-build/server/chunks/3886.js +1 -0
  742. package/app/.next-cli-build/server/chunks/412.js +2 -2
  743. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  744. package/app/.next-cli-build/server/chunks/4562.js +1 -1
  745. package/app/.next-cli-build/server/chunks/4646.js +1 -1
  746. package/app/.next-cli-build/server/chunks/{9233.js → 4704.js} +2 -2
  747. package/app/.next-cli-build/server/chunks/476.js +1 -1
  748. package/app/.next-cli-build/server/chunks/4928.js +1 -9
  749. package/app/.next-cli-build/server/chunks/4999.js +1 -1
  750. package/app/.next-cli-build/server/chunks/5129.js +1 -1
  751. package/app/.next-cli-build/server/chunks/5849.js +1 -0
  752. package/app/.next-cli-build/server/chunks/6112.js +1 -0
  753. package/app/.next-cli-build/server/chunks/615.js +1 -1
  754. package/app/.next-cli-build/server/chunks/6405.js +1 -1
  755. package/app/.next-cli-build/server/chunks/{5681.js → 6436.js} +1 -1
  756. package/app/.next-cli-build/server/chunks/6535.js +23 -20
  757. package/app/.next-cli-build/server/chunks/6958.js +1 -0
  758. package/app/.next-cli-build/server/chunks/6975.js +300 -0
  759. package/app/.next-cli-build/server/chunks/7054.js +1 -0
  760. package/app/.next-cli-build/server/chunks/7239.js +1 -1
  761. package/app/.next-cli-build/server/chunks/7353.js +1 -1
  762. package/app/.next-cli-build/server/chunks/7362.js +2 -2
  763. package/app/.next-cli-build/server/chunks/7413.js +2 -0
  764. package/app/.next-cli-build/server/chunks/{7456.js → 7438.js} +16 -16
  765. package/app/.next-cli-build/server/chunks/7467.js +1 -0
  766. package/app/.next-cli-build/server/chunks/7603.js +1 -0
  767. package/app/.next-cli-build/server/chunks/7716.js +1 -0
  768. package/app/.next-cli-build/server/chunks/7734.js +1 -1
  769. package/app/.next-cli-build/server/chunks/7775.js +1 -1
  770. package/app/.next-cli-build/server/chunks/7785.js +9 -0
  771. package/app/.next-cli-build/server/chunks/8129.js +1 -1
  772. package/app/.next-cli-build/server/chunks/8243.js +3 -3
  773. package/app/.next-cli-build/server/chunks/8251.js +2 -2
  774. package/app/.next-cli-build/server/chunks/8326.js +1 -1
  775. package/app/.next-cli-build/server/chunks/8421.js +1 -1
  776. package/app/.next-cli-build/server/chunks/8851.js +1 -1
  777. package/app/.next-cli-build/server/chunks/8946.js +1 -1
  778. package/app/.next-cli-build/server/chunks/8976.js +1 -1
  779. package/app/.next-cli-build/server/chunks/9043.js +1 -1
  780. package/app/.next-cli-build/server/chunks/9217.js +1 -1
  781. package/app/.next-cli-build/server/chunks/9296.js +1 -1
  782. package/app/.next-cli-build/server/chunks/9303.js +1 -0
  783. package/app/.next-cli-build/server/chunks/9485.js +1 -0
  784. package/app/.next-cli-build/server/instrumentation.js +1 -1
  785. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  786. package/app/.next-cli-build/server/middleware.js +2 -2
  787. package/app/.next-cli-build/server/pages/404.html +1 -1
  788. package/app/.next-cli-build/server/pages/500.html +1 -1
  789. package/app/.next-cli-build/static/chunks/{1321-63ac05d53922a27c.js → 1321-0bac17bbe74aaa54.js} +1 -1
  790. package/app/.next-cli-build/static/chunks/2595-2d703efb995163a7.js +95 -0
  791. package/app/.next-cli-build/static/chunks/{5497-22fe81a552f1646d.js → 5497-675887789aaf2c43.js} +3 -3
  792. package/app/.next-cli-build/static/chunks/801-a83c4648747b8c6a.js +1 -0
  793. package/app/.next-cli-build/static/chunks/8105-e46089480e63b1a9.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-c7840dae0ef76527.js → page-178f383964973bfb.js} +1 -1
  795. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-0e4d3fb00fc6a9bf.js → page-ce0b5b8882899119.js} +1 -1
  796. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-4c63bfc57149c7eb.js → page-257aaa1374d529b4.js} +1 -1
  797. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-64177496760b1187.js → page-78c78a3108fbe60e.js} +1 -1
  798. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-dc6c3c72e5d6acc3.js → page-2c65df20769d31df.js} +1 -1
  799. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/convoy/{page-5ada6cd825b67236.js → page-8c2bc69a688a000b.js} +1 -1
  800. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-a840225ab3f601c2.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-0ab40e69321978fb.js → page-90a4f789d907db25.js} +4 -4
  802. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-cb36efdbd929e8e1.js → page-c671ae36a313887b.js} +1 -1
  803. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-46eaa5603462d610.js → page-3df89694c0bbdeb8.js} +1 -1
  804. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-ed1ea0fa33a0b190.js → page-b2540d642bc46f4c.js} +1 -1
  805. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-e316dc83a5a557a6.js → page-e44166090e05cfb3.js} +1 -1
  806. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-18192f830d2ddb76.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-db01adc017c79525.js → page-e996175d559e9e5a.js} +1 -1
  808. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-f3d9a84f9e04119e.js +27 -0
  809. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-b6b4de987365ec8f.js → page-3f52ff9517c679ba.js} +1 -1
  810. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-10cfe308dcee550e.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-491fe95c5b5277a9.js → page-a43ff8ae35edb414.js} +1 -1
  812. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-ec79e9bb5a842351.js → page-1ac6f4d529f9b6a5.js} +1 -1
  813. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c55b823e44230396.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/routing-health/{page-703d4a28b1852949.js → page-a14b37a404e5e6e0.js} +1 -1
  815. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-b6026576dd4be770.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-93bca4f363f4b6f1.js → page-73fe7ee1ecd1bd52.js} +1 -1
  817. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-34f5228777b0430d.js → page-74477be9930501e3.js} +1 -1
  818. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-3ecea7f87104d318.js → page-d74d7a054b638e0d.js} +1 -1
  819. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-d77f0a1a4ce2f537.js → layout-100d6d3c6c7256f1.js} +1 -1
  820. package/app/.next-cli-build/static/chunks/app/_global-error/page-b71f397798104162.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-b71f397798104162.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-b71f397798104162.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-b71f397798104162.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-b71f397798104162.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-b71f397798104162.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-b71f397798104162.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-b71f397798104162.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-b71f397798104162.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-b71f397798104162.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-b71f397798104162.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-b71f397798104162.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/changelog/route-b71f397798104162.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/cli/providers/codex/route-b71f397798104162.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-b71f397798104162.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-b71f397798104162.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-b71f397798104162.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-b71f397798104162.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-b71f397798104162.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/models/route-b71f397798104162.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/readiness/route-b71f397798104162.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-b71f397798104162.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-b71f397798104162.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-b71f397798104162.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-b71f397798104162.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-b71f397798104162.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-b71f397798104162.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-b71f397798104162.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-b71f397798104162.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-b71f397798104162.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-b71f397798104162.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-b71f397798104162.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-b71f397798104162.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-b71f397798104162.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-b71f397798104162.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-b71f397798104162.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-b71f397798104162.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/test/route-b71f397798104162.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/combos/export/route-b71f397798104162.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/combos/import/route-b71f397798104162.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/combos/route-b71f397798104162.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/combos/test/route-b71f397798104162.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/convoy/rules/route-b71f397798104162.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-b71f397798104162.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-b71f397798104162.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-b71f397798104162.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-b71f397798104162.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-b71f397798104162.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-b71f397798104162.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/health/route-b71f397798104162.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/init/route-b71f397798104162.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/internal/codex-native/lease/[action]/route-b71f397798104162.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-b71f397798104162.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/keys/route-b71f397798104162.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/locale/route-b71f397798104162.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-b71f397798104162.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-b71f397798104162.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-b71f397798104162.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-b71f397798104162.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-b71f397798104162.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-b71f397798104162.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-b71f397798104162.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-b71f397798104162.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-b71f397798104162.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-b71f397798104162.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-b71f397798104162.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-b71f397798104162.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/models/route-b71f397798104162.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/models/test/route-b71f397798104162.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-b71f397798104162.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/oauth/callback/route-b71f397798104162.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-b71f397798104162.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-b71f397798104162.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-b71f397798104162.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-b71f397798104162.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-b71f397798104162.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-b71f397798104162.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-b71f397798104162.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-b71f397798104162.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-b71f397798104162.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-b71f397798104162.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-b71f397798104162.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-b71f397798104162.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-b71f397798104162.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/pricing/route-b71f397798104162.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-b71f397798104162.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-b71f397798104162.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-b71f397798104162.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-b71f397798104162.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/refresh-profile/route-b71f397798104162.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-b71f397798104162.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-b71f397798104162.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-b71f397798104162.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-b71f397798104162.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-b71f397798104162.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/providers/route-b71f397798104162.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-b71f397798104162.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-b71f397798104162.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-b71f397798104162.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-b71f397798104162.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-b71f397798104162.js +1 -0
  921. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-b71f397798104162.js +1 -0
  922. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-b71f397798104162.js +1 -0
  923. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-b71f397798104162.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-b71f397798104162.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-b71f397798104162.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-b71f397798104162.js +1 -0
  927. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-b71f397798104162.js +1 -0
  928. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-b71f397798104162.js +1 -0
  929. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-b71f397798104162.js +1 -0
  930. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-b71f397798104162.js +1 -0
  931. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-b71f397798104162.js +1 -0
  932. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-b71f397798104162.js +1 -0
  933. package/app/.next-cli-build/static/chunks/app/api/routing-health/route-b71f397798104162.js +1 -0
  934. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-b71f397798104162.js +1 -0
  935. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-b71f397798104162.js +1 -0
  936. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-b71f397798104162.js +1 -0
  937. package/app/.next-cli-build/static/chunks/app/api/settings/route-b71f397798104162.js +1 -0
  938. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-b71f397798104162.js +1 -0
  939. package/app/.next-cli-build/static/chunks/app/api/tags/route-b71f397798104162.js +1 -0
  940. package/app/.next-cli-build/static/chunks/app/api/token-saver/stats/route-b71f397798104162.js +1 -0
  941. package/app/.next-cli-build/static/chunks/app/api/token-saver/stream/route-b71f397798104162.js +1 -0
  942. package/app/.next-cli-build/static/chunks/app/api/tool-disclosure/stats/route-b71f397798104162.js +1 -0
  943. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-b71f397798104162.js +1 -0
  944. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-b71f397798104162.js +1 -0
  945. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-b71f397798104162.js +1 -0
  946. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-b71f397798104162.js +1 -0
  947. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-b71f397798104162.js +1 -0
  948. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-b71f397798104162.js +1 -0
  949. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-b71f397798104162.js +1 -0
  950. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-b71f397798104162.js +1 -0
  951. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-b71f397798104162.js +1 -0
  952. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-b71f397798104162.js +1 -0
  953. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-b71f397798104162.js +1 -0
  954. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-b71f397798104162.js +1 -0
  955. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-b71f397798104162.js +1 -0
  956. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-b71f397798104162.js +1 -0
  957. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-b71f397798104162.js +1 -0
  958. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-b71f397798104162.js +1 -0
  959. package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-b71f397798104162.js +1 -0
  960. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-b71f397798104162.js +1 -0
  961. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-b71f397798104162.js +1 -0
  962. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-b71f397798104162.js +1 -0
  963. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-b71f397798104162.js +1 -0
  964. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-b71f397798104162.js +1 -0
  965. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-b71f397798104162.js +1 -0
  966. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-b71f397798104162.js +1 -0
  967. package/app/.next-cli-build/static/chunks/app/api/v1/alpha/search/route-b71f397798104162.js +1 -0
  968. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-b71f397798104162.js +1 -0
  969. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-b71f397798104162.js +1 -0
  970. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-b71f397798104162.js +1 -0
  971. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-b71f397798104162.js +1 -0
  972. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-b71f397798104162.js +1 -0
  973. package/app/.next-cli-build/static/chunks/app/api/v1/codex/alpha/search/route-b71f397798104162.js +1 -0
  974. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/edits/route-b71f397798104162.js +1 -0
  975. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/generations/route-b71f397798104162.js +1 -0
  976. package/app/.next-cli-build/static/chunks/app/api/v1/codex/memories/trace_summarize/route-b71f397798104162.js +1 -0
  977. package/app/.next-cli-build/static/chunks/app/api/v1/codex/models/route-b71f397798104162.js +1 -0
  978. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/compact/route-b71f397798104162.js +1 -0
  979. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/route-b71f397798104162.js +1 -0
  980. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-b71f397798104162.js +1 -0
  981. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-b71f397798104162.js +1 -0
  982. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-b71f397798104162.js +1 -0
  983. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-b71f397798104162.js +1 -0
  984. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-b71f397798104162.js +1 -0
  985. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-b71f397798104162.js +1 -0
  986. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-b71f397798104162.js +1 -0
  987. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-b71f397798104162.js +1 -0
  988. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-b71f397798104162.js +1 -0
  989. package/app/.next-cli-build/static/chunks/app/api/v1/route-b71f397798104162.js +1 -0
  990. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-b71f397798104162.js +1 -0
  991. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-b71f397798104162.js +1 -0
  992. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-b71f397798104162.js +1 -0
  993. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-b71f397798104162.js +1 -0
  994. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-b71f397798104162.js +1 -0
  995. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-b71f397798104162.js +1 -0
  996. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-b71f397798104162.js +1 -0
  997. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-b71f397798104162.js +1 -0
  998. package/app/.next-cli-build/static/chunks/app/api/version/route-b71f397798104162.js +1 -0
  999. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-b71f397798104162.js +1 -0
  1000. package/app/.next-cli-build/static/chunks/app/api/version/update/route-b71f397798104162.js +1 -0
  1001. package/app/.next-cli-build/static/chunks/app/landing/page-7d5b31b8481d8fdd.js +1 -0
  1002. package/app/.next-cli-build/static/chunks/app/login/{page-27e9a95a150a0ac4.js → page-57af8e67ea3a745f.js} +1 -1
  1003. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-b71f397798104162.js +1 -0
  1004. package/app/.next-cli-build/static/chunks/app/page-b71f397798104162.js +1 -0
  1005. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-b71f397798104162.js +1 -0
  1006. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-b71f397798104162.js +1 -0
  1007. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-b71f397798104162.js +1 -0
  1008. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-b71f397798104162.js +1 -0
  1009. package/app/.next-cli-build/static/css/abc246bcd6eb079c.css +1 -0
  1010. package/app/.next-cli-build/static/p4AwDShOmXa3ZUcXCsntQ/_buildManifest.js +1 -0
  1011. package/app/CHANGELOG.md +334 -2
  1012. package/app/package.json +3 -3
  1013. package/app/public/CHANGELOG.md +334 -2
  1014. package/app/public/i18n/literals/id.json +1368 -159
  1015. package/app/public/i18n/literals/pt-BR.json +7 -8
  1016. package/app/public/i18n/literals/zh-CN.json +1 -0
  1017. package/app/public/providers/alims-intl.png +0 -0
  1018. package/app/public/providers/alitp-intl.png +0 -0
  1019. package/app/public/providers/fish-audio.png +0 -0
  1020. package/app/public/providers/selfhosted-embedding.png +0 -0
  1021. package/app/public/providers/selfhosted-stt.png +0 -0
  1022. package/app/public/providers/selfhosted-tts.png +0 -0
  1023. package/app/public/providers/xquik.png +0 -0
  1024. package/app/src/mitm/server.js +26 -26
  1025. package/hooks/sqliteRuntime.js +28 -5
  1026. package/package.json +1 -1
  1027. package/src/cli/menus/providers.js +5 -0
  1028. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +0 -1
  1029. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +0 -1
  1030. package/app/.next-cli-build/server/chunks/1446.js +0 -1
  1031. package/app/.next-cli-build/server/chunks/2031.js +0 -1
  1032. package/app/.next-cli-build/server/chunks/3904.js +0 -1
  1033. package/app/.next-cli-build/server/chunks/5502.js +0 -1
  1034. package/app/.next-cli-build/server/chunks/5841.js +0 -1
  1035. package/app/.next-cli-build/server/chunks/7281.js +0 -1
  1036. package/app/.next-cli-build/server/chunks/7335.js +0 -1
  1037. package/app/.next-cli-build/server/chunks/7591.js +0 -1
  1038. package/app/.next-cli-build/server/chunks/8901.js +0 -300
  1039. package/app/.next-cli-build/server/chunks/8906.js +0 -2
  1040. package/app/.next-cli-build/server/chunks/9212.js +0 -1
  1041. package/app/.next-cli-build/server/chunks/9884.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/2595-1b1c30e3a4314456.js +0 -92
  1043. package/app/.next-cli-build/static/chunks/801-9683dc19ffb81217.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/8105-39d6edfaddcbf181.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-272444fcf2114bb5.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-2247901c7422157d.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-04f568d5510f26f7.js +0 -14
  1048. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-38f69db60cdfe7cd.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-973240b44eb04877.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-4b65eb84c14bf9f0.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/_global-error/page-27e63c5064200d37.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-27e63c5064200d37.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-27e63c5064200d37.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-27e63c5064200d37.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-27e63c5064200d37.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-27e63c5064200d37.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-27e63c5064200d37.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-27e63c5064200d37.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-27e63c5064200d37.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-27e63c5064200d37.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-27e63c5064200d37.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-27e63c5064200d37.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/changelog/route-27e63c5064200d37.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/cli/providers/codex/route-27e63c5064200d37.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-27e63c5064200d37.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-27e63c5064200d37.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-27e63c5064200d37.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-27e63c5064200d37.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-27e63c5064200d37.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/models/route-27e63c5064200d37.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/readiness/route-27e63c5064200d37.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-27e63c5064200d37.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-27e63c5064200d37.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-27e63c5064200d37.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-27e63c5064200d37.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-27e63c5064200d37.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-27e63c5064200d37.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-27e63c5064200d37.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-27e63c5064200d37.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-27e63c5064200d37.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-27e63c5064200d37.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-27e63c5064200d37.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-27e63c5064200d37.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-27e63c5064200d37.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-27e63c5064200d37.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-27e63c5064200d37.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-27e63c5064200d37.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/test/route-27e63c5064200d37.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/combos/export/route-27e63c5064200d37.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/combos/import/route-27e63c5064200d37.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/combos/route-27e63c5064200d37.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/combos/test/route-27e63c5064200d37.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/convoy/rules/route-27e63c5064200d37.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-27e63c5064200d37.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-27e63c5064200d37.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-27e63c5064200d37.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-27e63c5064200d37.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-27e63c5064200d37.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-27e63c5064200d37.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/health/route-27e63c5064200d37.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/init/route-27e63c5064200d37.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/internal/codex-native/lease/[action]/route-27e63c5064200d37.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-27e63c5064200d37.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/keys/route-27e63c5064200d37.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/locale/route-27e63c5064200d37.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-27e63c5064200d37.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-27e63c5064200d37.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-27e63c5064200d37.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-27e63c5064200d37.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-27e63c5064200d37.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-27e63c5064200d37.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-27e63c5064200d37.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-27e63c5064200d37.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-27e63c5064200d37.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-27e63c5064200d37.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-27e63c5064200d37.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/models/route-27e63c5064200d37.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/models/test/route-27e63c5064200d37.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-27e63c5064200d37.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/oauth/callback/route-27e63c5064200d37.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-27e63c5064200d37.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-27e63c5064200d37.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-27e63c5064200d37.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-27e63c5064200d37.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-27e63c5064200d37.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-27e63c5064200d37.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-27e63c5064200d37.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-27e63c5064200d37.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-27e63c5064200d37.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-27e63c5064200d37.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-27e63c5064200d37.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-27e63c5064200d37.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/pricing/route-27e63c5064200d37.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-27e63c5064200d37.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-27e63c5064200d37.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-27e63c5064200d37.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-27e63c5064200d37.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/refresh-profile/route-27e63c5064200d37.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-27e63c5064200d37.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-27e63c5064200d37.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-27e63c5064200d37.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-27e63c5064200d37.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-27e63c5064200d37.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/providers/route-27e63c5064200d37.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-27e63c5064200d37.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-27e63c5064200d37.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-27e63c5064200d37.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-27e63c5064200d37.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-27e63c5064200d37.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-27e63c5064200d37.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-27e63c5064200d37.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-27e63c5064200d37.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-27e63c5064200d37.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-27e63c5064200d37.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-27e63c5064200d37.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-27e63c5064200d37.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-27e63c5064200d37.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-27e63c5064200d37.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-27e63c5064200d37.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-27e63c5064200d37.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-27e63c5064200d37.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/routing-health/route-27e63c5064200d37.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-27e63c5064200d37.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-27e63c5064200d37.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-27e63c5064200d37.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/settings/route-27e63c5064200d37.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-27e63c5064200d37.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/tags/route-27e63c5064200d37.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/token-saver/stats/route-27e63c5064200d37.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/token-saver/stream/route-27e63c5064200d37.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/tool-disclosure/stats/route-27e63c5064200d37.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-27e63c5064200d37.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-27e63c5064200d37.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-27e63c5064200d37.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-27e63c5064200d37.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-27e63c5064200d37.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-27e63c5064200d37.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-27e63c5064200d37.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-27e63c5064200d37.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-27e63c5064200d37.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-27e63c5064200d37.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-27e63c5064200d37.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-27e63c5064200d37.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-27e63c5064200d37.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-27e63c5064200d37.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-27e63c5064200d37.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-27e63c5064200d37.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-27e63c5064200d37.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-27e63c5064200d37.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-27e63c5064200d37.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-27e63c5064200d37.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-27e63c5064200d37.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-27e63c5064200d37.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-27e63c5064200d37.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-27e63c5064200d37.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/v1/alpha/search/route-27e63c5064200d37.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-27e63c5064200d37.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-27e63c5064200d37.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-27e63c5064200d37.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-27e63c5064200d37.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-27e63c5064200d37.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/v1/codex/alpha/search/route-27e63c5064200d37.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/edits/route-27e63c5064200d37.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/generations/route-27e63c5064200d37.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/v1/codex/memories/trace_summarize/route-27e63c5064200d37.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/v1/codex/models/route-27e63c5064200d37.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/compact/route-27e63c5064200d37.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/route-27e63c5064200d37.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-27e63c5064200d37.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-27e63c5064200d37.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-27e63c5064200d37.js +0 -1
  1212. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-27e63c5064200d37.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-27e63c5064200d37.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-27e63c5064200d37.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-27e63c5064200d37.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-27e63c5064200d37.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-27e63c5064200d37.js +0 -1
  1218. package/app/.next-cli-build/static/chunks/app/api/v1/route-27e63c5064200d37.js +0 -1
  1219. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-27e63c5064200d37.js +0 -1
  1220. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-27e63c5064200d37.js +0 -1
  1221. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-27e63c5064200d37.js +0 -1
  1222. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-27e63c5064200d37.js +0 -1
  1223. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-27e63c5064200d37.js +0 -1
  1224. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-27e63c5064200d37.js +0 -1
  1225. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-27e63c5064200d37.js +0 -1
  1226. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-27e63c5064200d37.js +0 -1
  1227. package/app/.next-cli-build/static/chunks/app/api/version/route-27e63c5064200d37.js +0 -1
  1228. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-27e63c5064200d37.js +0 -1
  1229. package/app/.next-cli-build/static/chunks/app/api/version/update/route-27e63c5064200d37.js +0 -1
  1230. package/app/.next-cli-build/static/chunks/app/landing/page-e7e81318e9e5c4e4.js +0 -1
  1231. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-27e63c5064200d37.js +0 -1
  1232. package/app/.next-cli-build/static/chunks/app/page-27e63c5064200d37.js +0 -1
  1233. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-27e63c5064200d37.js +0 -1
  1234. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-27e63c5064200d37.js +0 -1
  1235. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-27e63c5064200d37.js +0 -1
  1236. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-27e63c5064200d37.js +0 -1
  1237. package/app/.next-cli-build/static/css/c784a89390f4e764.css +0 -1
  1238. package/app/.next-cli-build/static/xv8sG0IpdFOQ-S9xqigzH/_buildManifest.js +0 -1
  1239. /package/app/.next-cli-build/static/{xv8sG0IpdFOQ-S9xqigzH → p4AwDShOmXa3ZUcXCsntQ}/_ssgManifest.js +0 -0
@@ -13,4 +13,4 @@ ${p}`,r=B(Buffer.from(q,"latin1")),s=c.machineId||g.randomUUID(),u=c.machineToke
13
13
 
14
14
  `))}let U=new Map,V="qodercli/1.0.0";async function W(a,b,c,e){let f=await (0,d.proxyAwareFetch)(b.jobTokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":V,"Cosy-Version":b.ideVersion,"Cosy-ClientType":b.clientType},body:JSON.stringify({personal_token:a}),signal:e},c);if(!f.ok){let a=await f.text().catch(()=>"");throw Error(`qoder PAT exchange failed: ${f.status} ${a.slice(0,200)}`)}let g=await f.json();if(!g.token)throw Error("qoder PAT exchange returned no job token");let h=Date.now()+864e5;if(g.expires_at){let a=Date.parse(g.expires_at);Number.isNaN(a)||(h=a)}else"number"==typeof g.expires_in&&g.expires_in>0&&(h=Date.now()+g.expires_in);return{jobToken:g.token,jobRefreshToken:g.refresh_token||"",expiresAt:h}}async function X(a,b,c,e){try{let f=await (0,d.proxyAwareFetch)(b.userInfoUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":V},signal:e},c);if(!f.ok)return"";let g=await f.json().catch(()=>({}));return g.id||g.userId||g.user_id||""}catch{return""}}async function Y(a,b={}){let c=A(b.profile),d=b.proxyOptions??null,e=b.signal??null,f=`${c.id}:${a}`,g=U.get(f);if(g&&g.expiresAt-Date.now()>3e5)return g;let{jobToken:h,expiresAt:i}=await W(a,c,d,e),j=await X(h,c,d,e),k={accessToken:h,userId:j,expiresAt:i};return U.set(f,k),k}async function Z({model:a,body:b,credentials:c,signal:g,log:h,proxyOptions:i=null,profile:j=null,timeoutMs:k=null,modelConfig:l=null,fetchImpl:m=null,includeBusiness:n=!1}){let o,p,q,r,s=A(j),t=s.chatUrl,u=c?.accessToken||c?.apiKey;if("string"==typeof u&&u.startsWith("pt-"))try{let a=await Y(u,{profile:s,proxyOptions:i,signal:g});c={...c,accessToken:a.accessToken,apiKey:void 0,providerSpecificData:{authMethod:"pat",...c?.providerSpecificData||{},userId:a.userId||c?.providerSpecificData?.userId||"",machineId:c?.providerSpecificData?.machineId||"",machineToken:c?.providerSpecificData?.machineToken||""}}}catch(a){return h?.error?.("QODER",`PAT exchange failed: ${a.message}`),{response:new Response(JSON.stringify({error:{message:`qoder PAT exchange failed: ${a.message}`}}),{status:401,headers:{"Content-Type":"application/json"}}),url:t,headers:{},transformedBody:b}}let v=c?.providerSpecificData||{};if(!v.userId)return{response:new Response(JSON.stringify({error:{message:"qoder credential is missing userId; reconnect the account"}}),{status:401,headers:{"Content-Type":"application/json"}}),url:t,headers:{},transformedBody:b};if(!c?.accessToken)return{response:new Response(JSON.stringify({error:{message:"qoder credential is missing accessToken; reconnect the account"}}),{status:401,headers:{"Content-Type":"application/json"}}),url:t,headers:{},transformedBody:b};try{({qoderKey:o,payload:p}=await O({model:a,body:b,credentials:c,log:h,proxyOptions:i,signal:g,profile:s,modelConfig:l,includeBusiness:n}))}catch(a){return{response:new Response(JSON.stringify({error:{message:a.message}}),{status:400,headers:{"Content-Type":"application/json"}}),url:t,headers:{},transformedBody:b}}let w=function(a){let b=(Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"utf8"):Buffer.from(a)).toString("base64"),c=b.length,d=Math.floor(c/3),e=b.slice(c-d)+b.slice(d,c-d)+b.slice(0,d),g=Buffer.alloc(c);for(let a=0;a<c;a++){let b=e.charCodeAt(a);b<128&&f[b]>=0?g[a]=f[b]:g[a]=b}return g.toString("latin1")}(Buffer.from(JSON.stringify(p),"utf8")),x=Buffer.from(w,"latin1");try{q=C(x,t,{userId:v.userId,authToken:c.accessToken,name:c.displayName||"",email:c.email||"",machineId:v.machineId||"",machineToken:v.machineToken||v.machineId||""},s)}catch(a){return{response:new Response(JSON.stringify({error:{message:`qoder cosy signing failed: ${a.message}`}}),{status:401,headers:{"Content-Type":"application/json"}}),url:t,headers:{},transformedBody:b}}let y={"Content-Type":"application/json",Accept:"text/event-stream","Cache-Control":"no-cache","X-Model-Key":o,"X-Model-Source":p.model_config&&p.model_config.source||"system","Accept-Encoding":"identity",...q},z=k||e.pH,B=new AbortController,D=setTimeout(()=>B.abort(Error("fetch connect timeout")),z),E=g?AbortSignal.any([g,B.signal]):B.signal;try{let a={method:"POST",headers:y,body:x,signal:E};r="function"==typeof m?await m(t,a):await (0,d.proxyAwareFetch)(t,a,i)}finally{clearTimeout(D)}return r.ok?{response:function(a,b){if(!a.ok||!a.body)return a;let c=new TextDecoder,d=new TextEncoder,e="",f={doneEmitted:!1,lastEvent:"",contentEmitted:!1},g=(a,c)=>{let e,g,h=a.replace(/\r$/,"").trim();if(!h)return;if(h.startsWith("event:")){f.lastEvent=h.slice(6).trim();return}if(!h.startsWith("data:")||f.doneEmitted)return;let i=h.slice(5).trimStart();if("[DONE]"===i)return void Q(c,f);if("[NOT_EXCEED_QUOTA]"===i||i.startsWith("[NOTIFICATIONS]"))return;if(i.startsWith("[EXCEED_QUOTA]"))return void R(c,f,{model:b,message:i,statusVal:429});try{e=JSON.parse(i)}catch{return}if(null==e||"object"!=typeof e)return;let j="number"==typeof e.statusCodeValue?e.statusCodeValue:200,k="string"==typeof e.body?e.body:"";if(200!==j){if("finish"===f.lastEvent)return void Q(c,f);let a=103===j||105===j||/login expired|login timeout|token.*expired|auth/i.test(k),d=10605===j||/queue|isQueued|retry_after/i.test(k);return void R(c,f,{model:b,message:k||`upstream status ${j}`,statusVal:a?401:d?429:j,type:a?"authentication_error":d?"model_queued":"qoder_upstream_error",code:a?"token_expired":d?"model_queued":j})}if(!k)return;if("[DONE]"===k||"[NOT_EXCEED_QUOTA]"===k||k.startsWith("[EXCEED_QUOTA]")||k.startsWith("[NOTIFICATIONS]"))return"[DONE]"===k?void Q(c,f):k.startsWith("[EXCEED_QUOTA]")?void R(c,f,{model:b,message:k,statusVal:429}):void 0;try{g=JSON.parse(k)}catch{let a=k.replace(/\r?\n/g,"");f.contentEmitted=!0,c.enqueue(d.encode(`data: ${a}
15
15
 
16
- `));return}let l=function(a,b,c,d){if(!a||"object"!=typeof a||!Array.isArray(a.choices))return a;for(let e of a.choices){let a=e?.finish_reason;if(null!=a){if("model_context_window_exceeded"===a)return R(b,c,{model:d,message:"Model context window exceeded",statusVal:413,type:"context_length_exceeded",code:"context_length_exceeded"}),null;S.has(a)&&(e.finish_reason=null)}}return a}(g,c,f,b);if(null!==l){if(l&&"object"==typeof l&&Array.isArray(l.choices)&&0===l.choices.length&&l.usage&&"object"==typeof l.usage){f.pendingFinish&&(f.pendingFinish.usage=l.usage,T(c,d,f,f.pendingFinish),f.pendingFinish=null);return}if(l?.choices&&l.choices.some(a=>a?.finish_reason!=null&&!S.has(a.finish_reason))&&!(l.usage&&"object"==typeof l.usage)){f.pendingFinish=l;return}f.pendingFinish&&(T(c,d,f,f.pendingFinish),f.pendingFinish=null),T(c,d,f,l)}},h=new TransformStream({transform(a,b){let d;for(e+=c.decode(a,{stream:!0});-1!==(d=e.indexOf("\n"));){let a=e.slice(0,d);e=e.slice(d+1),g(a,b)}},flush(a){((e+=c.decode()).length>0&&(g(e,a),e=""),f.pendingFinish&&(T(a,d,f,f.pendingFinish),f.pendingFinish=null),f.contentEmitted||f.doneEmitted)?Q(a,f):R(a,f,{model:b,message:"Empty response: stream ended without any content",statusVal:502,type:"empty_response",code:"empty_response"})}});return new Response(a.body.pipeThrough(h),{status:a.status,statusText:a.statusText,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache"}})}(r,`qoder/${o}`),url:t,headers:y,transformedBody:p}:{response:r,url:t,headers:y,transformedBody:p}}},91576:(a,b,c)=>{c.d(b,{E9:()=>s,RF:()=>i,YC:()=>r,oV:()=>q});var d=c(55511),e=c(60290);let f=new Map,g=new Map,h=setInterval(()=>{let a=Date.now();for(let[b,c]of f)a-c.lastUsed>e.v1.sessionTtlMs&&f.delete(b)},e.v1.sessionCleanupIntervalMs);function i(a){if(!a)return j();let b=f.get(a);if(b)return b.lastUsed=Date.now(),f.delete(a),f.set(a,b),b.sessionId;if(f.size>=1e3){let a=f.keys().next().value;f.delete(a)}let c=j();return f.set(a,{sessionId:c,lastUsed:Date.now()}),c}function j(){return d.randomUUID()+Date.now().toString()}h.unref&&h.unref();let k=new Map,l=["x-session-id","session-id","session_id","x-amp-thread-id"],m=/_session_([a-f0-9-]+)$/;function n(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>256?null:b}function o(a,b){return a&&"object"==typeof a?n(a[b]??a[b.toLowerCase()]):null}let p=/^[a-z]+\/([0-9a-f-]{36})\//i;function q(a={}){return function({headers:a,body:b,connectionId:c,workspaceId:e,scope:f=""}={}){let g=function(a,b,c=""){let d=function(a){if("string"!=typeof a||!a)return null;let b=a.match(m);if(b)return b[1];if("{"===a[0])try{return n(JSON.parse(a)?.session_id)}catch{}return null}(b?.metadata?.user_id);if(d)return"claude"===c?d:`claude:${d}`;let e=function(a){let b=a?.request?.sessionId;if(null!=b&&""!==b)return n(String(b));let c="string"==typeof a?.requestId?a.requestId.match(p):null;return c?n(c[1]):null}(b);if(e)return`antigravity:${e}`;for(let b of l){let c=o(a,b);if(c)return c}let f="kiro"===c?null:o(a,"x-client-request-id");return f||n(b?.prompt_cache_key)||n(b?.session_id)||n(b?.conversation_id)||("kiro"===c?null:n(b?.metadata?.user_id))||null}(a,b,f);if(g)return{sessionId:g,ephemeral:!1};let h="kiro"===f?null:function(a,b){var c;let e=function(a){let b=Array.isArray(a?.messages)?a.messages:Array.isArray(a?.input)?a.input:[];if(!b)return"";let c="";for(let a of b)if(a?.role==="assistant"){if("string"==typeof a.content)c+=a.content;else if(Array.isArray(a.content))for(let b of a.content)c+=b?.text||b?.output||"";if(c.length>=50)break}return c}(b);if(e.length<50)return null;let f=(c=`${a}:${e.slice(0,50)}`,d.createHash("sha256").update(c).digest("hex").slice(0,16)),g=k.get(f);if(g)return g.lastUsed=Date.now(),k.delete(f),k.set(f,g),g.sessionId;k.size>=5e3&&k.delete(k.keys().next().value);let h=j();return k.set(f,{sessionId:h,lastUsed:Date.now()}),h}(`${f}:${c||""}`,b);if(h)return{sessionId:h,ephemeral:!1};let q=n(e);return q?{sessionId:q,ephemeral:!1}:"kiro"===f?{sessionId:j(),ephemeral:!0}:{sessionId:i(c),ephemeral:!1}}(a).sessionId}function r(a,b,c,d=""){return q({headers:b?.rawHeaders,body:a,connectionId:c,scope:d})}function s(a){let b=n(a);if(!b)return null;if(/^-?\d+$/.test(b))return b;let c=0x7fffffffffffffffn&d.createHash("sha256").update(b).digest().readBigUInt64BE(0);return`-${c.toString()}`}let t=setInterval(()=>{let a=Date.now();for(let[b,c]of k)a-c.lastUsed>e.v1.sessionTtlMs&&k.delete(b);for(let[b,c]of g)a-c.lastUsed>e.v1.sessionTtlMs&&g.delete(b)},e.v1.sessionCleanupIntervalMs);t.unref&&t.unref()}};
16
+ `));return}let l=function(a,b,c,d){if(!a||"object"!=typeof a||!Array.isArray(a.choices))return a;for(let e of a.choices){let a=e?.finish_reason;if(null!=a){if("model_context_window_exceeded"===a)return R(b,c,{model:d,message:"Model context window exceeded",statusVal:413,type:"context_length_exceeded",code:"context_length_exceeded"}),null;S.has(a)&&(e.finish_reason=null)}}return a}(g,c,f,b);if(null!==l){if(l&&"object"==typeof l&&Array.isArray(l.choices)&&0===l.choices.length&&l.usage&&"object"==typeof l.usage){f.pendingFinish&&(f.pendingFinish.usage=l.usage,T(c,d,f,f.pendingFinish),f.pendingFinish=null);return}if(l?.choices&&l.choices.some(a=>a?.finish_reason!=null&&!S.has(a.finish_reason))&&!(l.usage&&"object"==typeof l.usage)){f.pendingFinish=l;return}f.pendingFinish&&(T(c,d,f,f.pendingFinish),f.pendingFinish=null),T(c,d,f,l)}},h=new TransformStream({transform(a,b){let d;for(e+=c.decode(a,{stream:!0});-1!==(d=e.indexOf("\n"));){let a=e.slice(0,d);e=e.slice(d+1),g(a,b)}},flush(a){((e+=c.decode()).length>0&&(g(e,a),e=""),f.pendingFinish&&(T(a,d,f,f.pendingFinish),f.pendingFinish=null),f.contentEmitted||f.doneEmitted)?Q(a,f):R(a,f,{model:b,message:"Empty response: stream ended without any content",statusVal:502,type:"empty_response",code:"empty_response"})}});return new Response(a.body.pipeThrough(h),{status:a.status,statusText:a.statusText,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache"}})}(r,`qoder/${o}`),url:t,headers:y,transformedBody:p}:{response:r,url:t,headers:y,transformedBody:p}}},91576:(a,b,c)=>{c.d(b,{E9:()=>s,RF:()=>i,YC:()=>r,oV:()=>q});var d=c(55511),e=c(60290);let f=new Map,g=new Map,h=setInterval(()=>{let a=Date.now();for(let[b,c]of f)a-c.lastUsed>e.v1.sessionTtlMs&&f.delete(b)},e.v1.sessionCleanupIntervalMs);function i(a){if(!a)return j();let b=f.get(a);if(b)return b.lastUsed=Date.now(),f.delete(a),f.set(a,b),b.sessionId;if(f.size>=1e3){let a=f.keys().next().value;f.delete(a)}let c=j();return f.set(a,{sessionId:c,lastUsed:Date.now()}),c}function j(){return d.randomUUID()+Date.now().toString()}h.unref&&h.unref();let k=new Map,l=["x-session-id","session-id","session_id","x-amp-thread-id"],m=/_session_([a-f0-9-]+)$/;function n(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>256?null:b}function o(a,b){return a&&"object"==typeof a?n(a[b]??a[b.toLowerCase()]):null}let p=/^[a-z]+\/([0-9a-f-]{36})\//i;function q(a={}){return function({headers:a,body:b,connectionId:c,workspaceId:e,scope:f=""}={}){let g=function(a,b,c=""){let d=function(a){if("string"!=typeof a||!a)return null;let b=a.match(m);if(b)return b[1];if("{"===a[0])try{return n(JSON.parse(a)?.session_id)}catch{}return null}(b?.metadata?.user_id)||o(a,"x-claude-code-session-id");if(d)return"claude"===c?d:`claude:${d}`;let e=function(a){let b=a?.request?.sessionId;if(null!=b&&""!==b)return n(String(b));let c="string"==typeof a?.requestId?a.requestId.match(p):null;return c?n(c[1]):null}(b);if(e)return`antigravity:${e}`;for(let b of l){let c=o(a,b);if(c)return c}let f="kiro"===c?null:o(a,"x-client-request-id");return f||n(b?.prompt_cache_key)||n(b?.session_id)||n(b?.conversation_id)||("kiro"===c?null:n(b?.metadata?.user_id))||null}(a,b,f);if(g)return{sessionId:g,ephemeral:!1};let h="kiro"===f?null:function(a,b){var c;let e=function(a){let b=Array.isArray(a?.messages)?a.messages:Array.isArray(a?.input)?a.input:[];if(!b)return"";let c="";for(let a of b)if(a?.role==="assistant"){if("string"==typeof a.content)c+=a.content;else if(Array.isArray(a.content))for(let b of a.content)c+=b?.text||b?.output||"";if(c.length>=50)break}return c}(b);if(e.length<50)return null;let f=(c=`${a}:${e.slice(0,50)}`,d.createHash("sha256").update(c).digest("hex").slice(0,16)),g=k.get(f);if(g)return g.lastUsed=Date.now(),k.delete(f),k.set(f,g),g.sessionId;k.size>=5e3&&k.delete(k.keys().next().value);let h=j();return k.set(f,{sessionId:h,lastUsed:Date.now()}),h}(`${f}:${c||""}`,b);if(h)return{sessionId:h,ephemeral:!1};let q=n(e);return q?{sessionId:q,ephemeral:!1}:"kiro"===f?{sessionId:j(),ephemeral:!0}:{sessionId:i(c),ephemeral:!1}}(a).sessionId}function r(a,b,c,d=""){return q({headers:b?.rawHeaders,body:a,connectionId:c,scope:d})}function s(a){let b=n(a);if(!b)return null;if(/^-?\d+$/.test(b))return b;let c=0x7fffffffffffffffn&d.createHash("sha256").update(b).digest().readBigUInt64BE(0);return`-${c.toString()}`}let t=setInterval(()=>{let a=Date.now();for(let[b,c]of k)a-c.lastUsed>e.v1.sessionTtlMs&&k.delete(b);for(let[b,c]of g)a-c.lastUsed>e.v1.sessionTtlMs&&g.delete(b)},e.v1.sessionCleanupIntervalMs);t.unref&&t.unref()}};
@@ -1 +1 @@
1
- "use strict";exports.id=8946,exports.ids=[8946],exports.modules={28730:(a,b,c)=>{let d;c.d(b,{Cn:()=>o,Co:()=>x,Ic:()=>u,J5:()=>r,K:()=>s,NA:()=>z,QH:()=>p,Wu:()=>y,buildKimiHeaders:()=>A,go:()=>j,j5:()=>v,nZ:()=>t,sX:()=>k,uR:()=>q,x0:()=>m,zv:()=>w});var e=c(21820),f=c(4630),g=c(92675),h=c(8086);let i=f.xq["gemini-cli"]?.cliVersion,j=f.xq["gemini-cli"]?.apiClient;function k(a="unknown"){let b;return`GeminiCLI/${i}/${a||"unknown"} (${(0,e.platform)()}; ${"ia32"===(b=(0,e.arch)())?"x86":b}; terminal)`}let l=f.xq.github?.copilot||{},m={VSCODE_VERSION:l.vscodeVersion,COPILOT_CHAT_VERSION:l.chatVersion,USER_AGENT:l.userAgent,API_VERSION:l.apiVersion};function n(){let a=(0,e.platform)(),b=(0,e.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let o={ideType:9,platform:n(),pluginType:2},p="_ide",q="_ide",r=new Set(["browser_subagent","command_status","find_by_name","generate_image","grep_search","list_dir","list_resources","multi_replace_file_content","notify_user","read_resource","read_terminal","read_url_content","replace_file_content","run_command","search_web","send_command_input","task_boundary","view_content_chunk","view_file","write_to_file"]),s={"User-Agent":g.Of},t={"gemini-cli":{loadCodeAssist:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUser:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser"},antigravity:{loadCodeAssist:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUser:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser"}},u={"Content-Type":"application/json","User-Agent":"google-api-nodejs-client/9.15.1","X-Goog-Api-Client":"google-cloud-sdk vscode_cloudshelleditor/0.1","Client-Metadata":JSON.stringify({ideType:9,platform:n(),pluginType:2})},v={"Content-Type":"application/json","User-Agent":g.Of},w={ideType:9,platform:n(),pluginType:2},x="You are Claude Code, Anthropic's official CLI for Claude.",y=Object.fromEntries(Object.entries(f.sr).filter(([,a])=>a.refreshLeadMs).map(([a,b])=>[a,b.refreshLeadMs])),z={google:{token:"https://oauth2.googleapis.com/token",auth:"https://accounts.google.com/o/oauth2/auth"},openai:{token:f.sr.codex?.tokenUrl,auth:f.sr.codex?.authorizeUrl},anthropic:{token:f.sr.claude?.tokenUrl,auth:"https://api.anthropic.com/v1/oauth/authorize"},iflow:{token:f.sr.iflow?.tokenUrl,auth:f.sr.iflow?.authorizeUrl},github:{token:f.sr.github?.tokenUrl,auth:f.sr.github?.authorizeUrl,deviceCode:f.sr.github?.deviceCodeUrl},"frontier-for-all":{token:f.sr["frontier-for-all"]?.tokenUrl,auth:f.sr["frontier-for-all"]?.deviceCodeUrl,deviceCode:f.sr["frontier-for-all"]?.deviceCodeUrl,deviceToken:f.sr["frontier-for-all"]?.deviceTokenUrl,revoke:f.sr["frontier-for-all"]?.revokeUrl}};function A(a){let b=(0,e.platform)(),c=(0,e.arch)(),f=`${b} ${c}`;"darwin"===b?f=`macOS ${c}`:"win32"===b?f=`Windows ${c}`:"linux"===b&&(f=`Linux ${c}`);let g="unknown";try{g=(0,e.hostname)()||"unknown"}catch{g="unknown"}let i="string"==typeof a&&a.trim()?a.trim():`kimi-${Date.now()}`;return{"X-Msh-Platform":"9router","X-Msh-Version":function(){if(d)return d;try{d=(0,h.createRequire)("file:///Volumes/Files/Projects/EzRouter/EzRouter/open-sse/config/appConstants.js")("../../package.json").version||"0.0.0"}catch{d=process.env.npm_package_version||"0.0.0"}return d}(),"X-Msh-Device-Name":g,"X-Msh-Device-Model":f,"X-Msh-Device-Id":i}}},89843:(a,b,c)=>{c.d(b,{proxyAwareFetch:()=>s});var d=c(27910),e=c(60290);let f=globalThis.fetch,g=new Map,h=new Map,i=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],j=["8.8.8.8","8.8.4.4"];function k(a){return null==a?"":String(a).trim()}function l(a,b){let c=k(process.env[a]);if(!/^[1-9]\d*$/.test(c))return b;let d=Number(c);return Number.isSafeInteger(d)?d:b}async function m(a){let b=h.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,19)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,19)),f=new b.Resolver;f.setServers(j);let g=d(f.resolve4.bind(f)),i=await g(a);return h.set(a,{ip:i[0],expiry:Date.now()+e.v1.dnsCacheTtlMs}),i[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function n(a){let b;try{b=new URL(a).hostname.toLowerCase()}catch{return!1}let c=b.startsWith("[")&&b.endsWith("]")?b.slice(1,-1):b;if("localhost"===c||c.endsWith(".localhost")||"::1"===c||"0:0:0:0:0:0:0:1"===c)return!0;let d=/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i.exec(c);if(d)return(parseInt(d[1],16)>>8&255)==127;let e=/^::ffff:(\d{1,3}(?:\.\d{1,3}){3})$/i.exec(c),f=e?e[1]:c;return/^127(?:\.\d{1,3}){3}$/.test(f)}function o(a,b){let c,d=k(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function p(a){let b=k(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function q(a){let b=p(a);if(!b)return null;if(!g.has(b)){g.size>=e.v1.proxyDispatchersMaxSize&&g.delete(g.keys().next().value);let{ProxyAgent:a}=await c.e(7774).then(c.t.bind(c,47774,19)),d=l("PROXY_CONNECT_TIMEOUT_MS",9e4),f=l("PROXY_HEADERS_TIMEOUT_MS",3e5);g.set(b,new a({uri:b,connectTimeout:d,headersTimeout:f,bodyTimeout:0}))}return g.get(b)}async function r(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,19)),g=await Promise.resolve().then(c.t.bind(c,91645,19)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:e.method||"POST",headers:{...e.headers,Host:a.hostname}},i=h.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:d.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};c(b)});i.on("error",f),e.body&&i.write("string"==typeof e.body?e.body:JSON.stringify(e.body)),i.end()}),g.on("error",f)})}async function s(a,b={},c=null){let d="string"==typeof a?a:a.toString(),e=k(c?.vercelRelayUrl);if(e){let a=new URL(d),c={...b.headers,"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return f(e,{...b,headers:c})}let g=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0||n(a))return null;let c=k(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=k(b?.noProxy??b?.connectionNoProxy);return d&&o(a,d)?null:p(c)}(d,c),h=g?null:p(function(a){let b;if(n(a)||o(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(d)),j=g||h;if(function(a){try{let b=new URL(a).hostname;return i.some(a=>b.includes(a))}catch{return!1}}(d)){if(j)try{let c=await q(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await m(a.hostname);if(c)return await r(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(j)try{let c=await q(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${a.message}`)}return f(a,b)}async function t(a,b={}){return s(a,b,null)}globalThis.fetch!==t&&(globalThis.fetch=t)}};
1
+ "use strict";exports.id=8946,exports.ids=[8946],exports.modules={28730:(a,b,c)=>{let d;c.d(b,{Cn:()=>o,Co:()=>x,Ic:()=>u,J5:()=>r,K:()=>s,NA:()=>A,QH:()=>p,Wu:()=>z,buildKimiHeaders:()=>B,go:()=>j,iO:()=>y,j5:()=>v,nZ:()=>t,sX:()=>k,uR:()=>q,x0:()=>m,zv:()=>w});var e=c(21820),f=c(4630),g=c(92675),h=c(8086);let i=f.xq["gemini-cli"]?.cliVersion,j=f.xq["gemini-cli"]?.apiClient;function k(a="unknown"){let b;return`GeminiCLI/${i}/${a||"unknown"} (${(0,e.platform)()}; ${"ia32"===(b=(0,e.arch)())?"x86":b}; terminal)`}let l=f.xq.github?.copilot||{},m={VSCODE_VERSION:l.vscodeVersion,COPILOT_CHAT_VERSION:l.chatVersion,USER_AGENT:l.userAgent,API_VERSION:l.apiVersion};function n(){let a=(0,e.platform)(),b=(0,e.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let o={ideType:9,platform:n(),pluginType:2},p="_ide",q="_ide",r=new Set(["browser_subagent","command_status","find_by_name","generate_image","grep_search","list_dir","list_resources","multi_replace_file_content","notify_user","read_resource","read_terminal","read_url_content","replace_file_content","run_command","search_web","send_command_input","task_boundary","view_content_chunk","view_file","write_to_file"]),s={"User-Agent":g.Of},t={"gemini-cli":{loadCodeAssist:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUser:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser"},antigravity:{loadCodeAssist:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUser:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser"}},u={"Content-Type":"application/json","User-Agent":"google-api-nodejs-client/9.15.1","X-Goog-Api-Client":"google-cloud-sdk vscode_cloudshelleditor/0.1","Client-Metadata":JSON.stringify({ideType:9,platform:n(),pluginType:2})},v={"Content-Type":"application/json","User-Agent":g.Of},w={ideType:9,platform:n(),pluginType:2},x="You are Claude Code, Anthropic's official CLI for Claude.",y=[{from:"You are a Claude agent, built on Anthropic's Claude Agent SDK.",to:""},{from:/opencode/gi,to:a=>"OpenCode"===a?"Antigravity":"OPENCODE"===a?"ANTIGRAVITY":"antigravity"}],z=Object.fromEntries(Object.entries(f.sr).filter(([,a])=>a.refreshLeadMs).map(([a,b])=>[a,b.refreshLeadMs])),A={google:{token:"https://oauth2.googleapis.com/token",auth:"https://accounts.google.com/o/oauth2/auth"},openai:{token:f.sr.codex?.tokenUrl,auth:f.sr.codex?.authorizeUrl},anthropic:{token:f.sr.claude?.tokenUrl,auth:"https://api.anthropic.com/v1/oauth/authorize"},iflow:{token:f.sr.iflow?.tokenUrl,auth:f.sr.iflow?.authorizeUrl},github:{token:f.sr.github?.tokenUrl,auth:f.sr.github?.authorizeUrl,deviceCode:f.sr.github?.deviceCodeUrl},"frontier-for-all":{token:f.sr["frontier-for-all"]?.tokenUrl,auth:f.sr["frontier-for-all"]?.deviceCodeUrl,deviceCode:f.sr["frontier-for-all"]?.deviceCodeUrl,deviceToken:f.sr["frontier-for-all"]?.deviceTokenUrl,revoke:f.sr["frontier-for-all"]?.revokeUrl}};function B(a){let b=(0,e.platform)(),c=(0,e.arch)(),f=`${b} ${c}`;"darwin"===b?f=`macOS ${c}`:"win32"===b?f=`Windows ${c}`:"linux"===b&&(f=`Linux ${c}`);let g="unknown";try{g=(0,e.hostname)()||"unknown"}catch{g="unknown"}let i="string"==typeof a&&a.trim()?a.trim():`kimi-${Date.now()}`;return{"X-Msh-Platform":"9router","X-Msh-Version":function(){if(d)return d;try{d=(0,h.createRequire)("file:///Volumes/Files/Projects/EzRouter/EzRouter/open-sse/config/appConstants.js")("../../package.json").version||"0.0.0"}catch{d=process.env.npm_package_version||"0.0.0"}return d}(),"X-Msh-Device-Name":g,"X-Msh-Device-Model":f,"X-Msh-Device-Id":i}}},89843:(a,b,c)=>{c.d(b,{proxyAwareFetch:()=>s});var d=c(27910),e=c(60290);let f=globalThis.fetch,g=new Map,h=new Map,i=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],j=["8.8.8.8","8.8.4.4"];function k(a){return null==a?"":String(a).trim()}function l(a,b){let c=k(process.env[a]);if(!/^[1-9]\d*$/.test(c))return b;let d=Number(c);return Number.isSafeInteger(d)?d:b}async function m(a){let b=h.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,19)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,19)),f=new b.Resolver;f.setServers(j);let g=d(f.resolve4.bind(f)),i=await g(a);return h.set(a,{ip:i[0],expiry:Date.now()+e.v1.dnsCacheTtlMs}),i[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function n(a){let b;try{b=new URL(a).hostname.toLowerCase()}catch{return!1}let c=b.startsWith("[")&&b.endsWith("]")?b.slice(1,-1):b;if("localhost"===c||c.endsWith(".localhost")||"::1"===c||"0:0:0:0:0:0:0:1"===c)return!0;let d=/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i.exec(c);if(d)return(parseInt(d[1],16)>>8&255)==127;let e=/^::ffff:(\d{1,3}(?:\.\d{1,3}){3})$/i.exec(c),f=e?e[1]:c;return/^127(?:\.\d{1,3}){3}$/.test(f)}function o(a,b){let c,d=k(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function p(a){let b=k(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function q(a){let b=p(a);if(!b)return null;if(!g.has(b)){g.size>=e.v1.proxyDispatchersMaxSize&&g.delete(g.keys().next().value);let{ProxyAgent:a}=await c.e(7774).then(c.t.bind(c,47774,19)),d=l("PROXY_CONNECT_TIMEOUT_MS",9e4),f=l("PROXY_HEADERS_TIMEOUT_MS",3e5);g.set(b,new a({uri:b,connectTimeout:d,headersTimeout:f,bodyTimeout:0}))}return g.get(b)}async function r(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,19)),g=await Promise.resolve().then(c.t.bind(c,91645,19)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:e.method||"POST",headers:{...e.headers,Host:a.hostname}},i=h.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:d.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};c(b)});i.on("error",f),e.body&&i.write("string"==typeof e.body?e.body:JSON.stringify(e.body)),i.end()}),g.on("error",f)})}async function s(a,b={},c=null){let d="string"==typeof a?a:a.toString(),e=k(c?.vercelRelayUrl);if(e){let a=new URL(d),c={...b.headers,"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return f(e,{...b,headers:c})}let g=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0||n(a))return null;let c=k(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=k(b?.noProxy??b?.connectionNoProxy);return d&&o(a,d)?null:p(c)}(d,c),h=g?null:p(function(a){let b;if(n(a)||o(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(d)),j=g||h;if(function(a){try{let b=new URL(a).hostname;return i.some(a=>b.includes(a))}catch{return!1}}(d)){if(j)try{let c=await q(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await m(a.hostname);if(c)return await r(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(j)try{let c=await q(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${a.message}`)}return f(a,b)}async function t(a,b={}){return s(a,b,null)}globalThis.fetch!==t&&(globalThis.fetch=t)}};
@@ -1 +1 @@
1
- "use strict";exports.id=8976,exports.ids=[8976],exports.modules={10793:(a,b,c)=>{let d;c.d(b,{Cn:()=>o,Co:()=>x,Ic:()=>u,J5:()=>r,K:()=>s,NA:()=>z,QH:()=>p,Wu:()=>y,buildKimiHeaders:()=>A,go:()=>j,j5:()=>v,nZ:()=>t,sX:()=>k,uR:()=>q,x0:()=>m,zv:()=>w});var e=c(21820),f=c(38421),g=c(74570),h=c(8086);let i=f.xq["gemini-cli"]?.cliVersion,j=f.xq["gemini-cli"]?.apiClient;function k(a="unknown"){let b;return`GeminiCLI/${i}/${a||"unknown"} (${(0,e.platform)()}; ${"ia32"===(b=(0,e.arch)())?"x86":b}; terminal)`}let l=f.xq.github?.copilot||{},m={VSCODE_VERSION:l.vscodeVersion,COPILOT_CHAT_VERSION:l.chatVersion,USER_AGENT:l.userAgent,API_VERSION:l.apiVersion};function n(){let a=(0,e.platform)(),b=(0,e.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let o={ideType:9,platform:n(),pluginType:2},p="_ide",q="_ide",r=new Set(["browser_subagent","command_status","find_by_name","generate_image","grep_search","list_dir","list_resources","multi_replace_file_content","notify_user","read_resource","read_terminal","read_url_content","replace_file_content","run_command","search_web","send_command_input","task_boundary","view_content_chunk","view_file","write_to_file"]),s={"User-Agent":g.Of},t={"gemini-cli":{loadCodeAssist:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUser:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser"},antigravity:{loadCodeAssist:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUser:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser"}},u={"Content-Type":"application/json","User-Agent":"google-api-nodejs-client/9.15.1","X-Goog-Api-Client":"google-cloud-sdk vscode_cloudshelleditor/0.1","Client-Metadata":JSON.stringify({ideType:9,platform:n(),pluginType:2})},v={"Content-Type":"application/json","User-Agent":g.Of},w={ideType:9,platform:n(),pluginType:2},x="You are Claude Code, Anthropic's official CLI for Claude.",y=Object.fromEntries(Object.entries(f.sr).filter(([,a])=>a.refreshLeadMs).map(([a,b])=>[a,b.refreshLeadMs])),z={google:{token:"https://oauth2.googleapis.com/token",auth:"https://accounts.google.com/o/oauth2/auth"},openai:{token:f.sr.codex?.tokenUrl,auth:f.sr.codex?.authorizeUrl},anthropic:{token:f.sr.claude?.tokenUrl,auth:"https://api.anthropic.com/v1/oauth/authorize"},iflow:{token:f.sr.iflow?.tokenUrl,auth:f.sr.iflow?.authorizeUrl},github:{token:f.sr.github?.tokenUrl,auth:f.sr.github?.authorizeUrl,deviceCode:f.sr.github?.deviceCodeUrl},"frontier-for-all":{token:f.sr["frontier-for-all"]?.tokenUrl,auth:f.sr["frontier-for-all"]?.deviceCodeUrl,deviceCode:f.sr["frontier-for-all"]?.deviceCodeUrl,deviceToken:f.sr["frontier-for-all"]?.deviceTokenUrl,revoke:f.sr["frontier-for-all"]?.revokeUrl}};function A(a){let b=(0,e.platform)(),c=(0,e.arch)(),f=`${b} ${c}`;"darwin"===b?f=`macOS ${c}`:"win32"===b?f=`Windows ${c}`:"linux"===b&&(f=`Linux ${c}`);let g="unknown";try{g=(0,e.hostname)()||"unknown"}catch{g="unknown"}let i="string"==typeof a&&a.trim()?a.trim():`kimi-${Date.now()}`;return{"X-Msh-Platform":"9router","X-Msh-Version":function(){if(d)return d;try{d=(0,h.createRequire)("file:///Volumes/Files/Projects/EzRouter/EzRouter/open-sse/config/appConstants.js")("../../package.json").version||"0.0.0"}catch{d=process.env.npm_package_version||"0.0.0"}return d}(),"X-Msh-Device-Name":g,"X-Msh-Device-Model":f,"X-Msh-Device-Id":i}}},13073:(a,b,c)=>{c.d(b,{DI:()=>i,Hp:()=>k,LT:()=>j,MZ:()=>v,Nl:()=>z,Nu:()=>p,OV:()=>h,S6:()=>s,Td:()=>A,Tx:()=>q,V1:()=>C,WN:()=>t,Ww:()=>D,YT:()=>n,ZL:()=>m,aV:()=>u,cD:()=>o,f7:()=>y,hF:()=>l,lB:()=>w,qp:()=>B,w1:()=>x});var d=c(21820),e=c(74570),f=c(15251);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={...f.sr.claude},i={...f.sr.codex},j={...e.dG,...f.sr["gemini-cli"]},k={...f.sr.qwen},l={...f.sr.qoder};({...f.sr["qoderwork-cn"]});let m={...f.sr.iflow},n={...e.XP,...f.sr.antigravity,loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:g(),pluginType:2})};function o(){return{ideType:9,platform:g(),pluginType:2}}({...f.sr.openai});let p={...f.sr.github},q={...f.sr.kiro},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={...f.sr.cursor,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"}},u={...f.sr.kimi,clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||process.env.KIMI_OAUTH_CLIENT_ID||f.xq.kimi?.clientId||f.sr.kimi?.clientId},v={...f.sr.kilocode},w={...f.sr.cline},x={...f.sr.clinepass},y={...f.sr.gitlab},z={...f.sr["codebuddy-cn"]},A={...f.sr.kimchi},B={...f.sr["grok-cli"]};({...f.sr["codebuddy-intl"]});let C={...f.sr["frontier-for-all"]},D=3e5},26762:(a,b,c)=>{c.d(b,{Fm:()=>s});var d=c(27910),e=c(82689);let f=globalThis.fetch,g=new Map,h=new Map,i=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],j=["8.8.8.8","8.8.4.4"];function k(a){return null==a?"":String(a).trim()}function l(a,b){let c=k(process.env[a]);if(!/^[1-9]\d*$/.test(c))return b;let d=Number(c);return Number.isSafeInteger(d)?d:b}async function m(a){let b=h.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,19)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,19)),f=new b.Resolver;f.setServers(j);let g=d(f.resolve4.bind(f)),i=await g(a);return h.set(a,{ip:i[0],expiry:Date.now()+e.v1.dnsCacheTtlMs}),i[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function n(a){let b;try{b=new URL(a).hostname.toLowerCase()}catch{return!1}let c=b.startsWith("[")&&b.endsWith("]")?b.slice(1,-1):b;if("localhost"===c||c.endsWith(".localhost")||"::1"===c||"0:0:0:0:0:0:0:1"===c)return!0;let d=/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i.exec(c);if(d)return(parseInt(d[1],16)>>8&255)==127;let e=/^::ffff:(\d{1,3}(?:\.\d{1,3}){3})$/i.exec(c),f=e?e[1]:c;return/^127(?:\.\d{1,3}){3}$/.test(f)}function o(a,b){let c,d=k(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function p(a){let b=k(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function q(a){let b=p(a);if(!b)return null;if(!g.has(b)){g.size>=e.v1.proxyDispatchersMaxSize&&g.delete(g.keys().next().value);let{ProxyAgent:a}=await c.e(3433).then(c.t.bind(c,3433,19)),d=l("PROXY_CONNECT_TIMEOUT_MS",9e4),f=l("PROXY_HEADERS_TIMEOUT_MS",3e5);g.set(b,new a({uri:b,connectTimeout:d,headersTimeout:f,bodyTimeout:0}))}return g.get(b)}async function r(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,19)),g=await Promise.resolve().then(c.t.bind(c,91645,19)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:e.method||"POST",headers:{...e.headers,Host:a.hostname}},i=h.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:d.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};c(b)});i.on("error",f),e.body&&i.write("string"==typeof e.body?e.body:JSON.stringify(e.body)),i.end()}),g.on("error",f)})}async function s(a,b={},c=null){let d="string"==typeof a?a:a.toString(),e=k(c?.vercelRelayUrl);if(e){let a=new URL(d),c={...b.headers,"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return f(e,{...b,headers:c})}let g=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0||n(a))return null;let c=k(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=k(b?.noProxy??b?.connectionNoProxy);return d&&o(a,d)?null:p(c)}(d,c),h=g?null:p(function(a){let b;if(n(a)||o(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(d)),j=g||h;if(function(a){try{let b=new URL(a).hostname;return i.some(a=>b.includes(a))}catch{return!1}}(d)){if(j)try{let c=await q(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await m(a.hostname);if(c)return await r(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(j)try{let c=await q(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${a.message}`)}return f(a,b)}async function t(a,b={}){return s(a,b,null)}globalThis.fetch!==t&&(globalThis.fetch=t)},44855:(a,b,c)=>{c.d(b,{$B:()=>o,I9:()=>f.I9,Og:()=>i,Ql:()=>f.Ql,Sc:()=>j,jR:()=>f.jR,jT:()=>h,oD:()=>g,pb:()=>l});var d=c(38421),e=c(10793),f=c(46258);let g=3e5;function h(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function i(a){return e.Wu[a]?e.Wu[a]:"kimi-coding"===a&&e.Wu.kimi?e.Wu.kimi:g}function j(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let k=new Map;async function l(a,b){let d=a.client_email,f=k.get(d);if(f&&f.expiresAt-Date.now()>3e5)return{accessToken:f.token,expiresAt:f.expiresAt};try{let{SignJWT:f,importPKCS8:g}=await c.e(2891).then(c.bind(c,82891));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let h=await g(a.private_key.replace(/\\n/g,"\n"),"RS256"),i=Math.floor(Date.now()/1e3),j=await new f({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience(e.NA.google.token).setIssuedAt(i).setExpirationTime(i+3600).sign(h),l=await fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:j})});if(!l.ok){let a=await l.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:m,expires_in:n}=await l.json(),o=Date.now()+(n??3600)*1e3;return k.set(d,{token:m,expiresAt:o}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:m,expiresAt:o}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}function m(a,b){let c=j(a.apiKey);return c?l(c,b):null}let n={"frontier-for-all":(a,b)=>(0,f.go)(a.refreshToken,b),"gemini-cli":(a,b)=>(0,f.I9)(a.refreshToken,d.xq["gemini-cli"].clientId,d.xq["gemini-cli"].clientSecret,b),antigravity:(a,b)=>(0,f.I9)(a.refreshToken,d.xq.antigravity.clientId,d.xq.antigravity.clientSecret,b),claude:(a,b)=>(0,f.ge)(a.refreshToken,b),codex:(a,b)=>(0,f.Wm)(a.refreshToken,b),iflow:(a,b)=>(0,f.AH)(a.refreshToken,b),github:(a,b)=>(0,f.EF)(a.refreshToken,b),kiro:(a,b)=>(0,f.Ql)(a.refreshToken,a.providerSpecificData,b),cursor:(a,b)=>(0,f.ZP)(a.refreshToken,b),xai:(a,b)=>(0,f.r_)(a.refreshToken,b),"grok-cli":(a,b)=>(0,f.r_)(a.refreshToken,b),gcli:(a,b)=>(0,f.r_)(a.refreshToken,b),"codebuddy-cn":(a,b)=>(0,f.SO)(a.refreshToken,b),"codebuddy-intl":(a,b)=>(0,f.XB)(a.refreshToken,b),trae:(a,b)=>(0,f.RM)(a.refreshToken,a,b),cline:(a,b)=>(0,f.Il)(a.refreshToken,b),zed:()=>(0,f.wt)(),windsurf:(a,b)=>(0,f.p9)(a,b),kimi:(a,b)=>(0,f.ng)(a.refreshToken,a,b),"kimi-coding":(a,b)=>(0,f.ng)(a.refreshToken,a,b),vertex:m,"vertex-partner":m};async function o(a,b,c){let d=b.refreshToken||b.providerSpecificData?.refreshToken;if(!d)return null;let e=d!==b.refreshToken?{...b,refreshToken:d}:b,g=n[a];return g?g(e,c):(0,f.J1)(a,d,e,c)}},46258:(a,b,c)=>{c.d(b,{J1:()=>s,ge:()=>v,Il:()=>u,XB:()=>F,SO:()=>E,Wm:()=>y,jR:()=>D,ZP:()=>L,go:()=>K,EF:()=>C,I9:()=>w,AH:()=>B,ng:()=>t,Ql:()=>A,Ms:()=>J,RM:()=>G,p9:()=>I,r_:()=>q,wt:()=>H});var d=c(55511),e=c.n(d),f=c(13073);function g(a){let b="string"==typeof a?a.split("."):[];if(3!==b.length||!b[1])return null;try{return JSON.parse(Buffer.from(b[1],"base64url").toString("utf8"))}catch{return null}}class h{constructor(){this.config=f.WN}getAuthorizationData(a="login"){let b=e().randomBytes(32).toString("base64url"),c=e().createHash("sha256").update(b).digest("base64url"),d=e().randomUUID(),f=new URLSearchParams({challenge:c,uuid:d,mode:a,supportsSelectedTeamLogin:"true"});return{authUrl:`${this.config.loginUrl}?${f.toString()}`,uuid:d,verifier:b,expiresIn:300}}async pollToken(a,b,c){if(!a||!b)throw Error("Cursor OAuth session is incomplete");let d=new URLSearchParams({uuid:a,verifier:b}),f=await fetch(`${this.config.pollUrl}?${d.toString()}`,{headers:{Accept:"application/json","User-Agent":"Cursor/3.12.29","x-cursor-client-type":this.config.clientType,"x-ghost-mode":"implicit-false","x-new-onboarding-completed":"false",traceparent:`00-${e().randomBytes(16).toString("hex")}-${e().randomBytes(8).toString("hex")}-01`},signal:c});if(404===f.status)return{success:!1,pending:!0,error:"authorization_pending"};if(!f.ok)throw Error(`Cursor OAuth polling failed with HTTP ${f.status}`);let g=await f.json();if(!g.accessToken||!g.refreshToken)throw Error("Cursor OAuth response was missing tokens");return{success:!0,tokens:g}}async refreshToken(a){let b;if(!a||"string"!=typeof a)throw Error("Cursor refresh token is required");for(let d=0;d<3;d+=1){var c;try{let c=await fetch(this.config.refreshUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:"{}",signal:AbortSignal.timeout(15e3)});if(c.ok){let b=await c.json();if(!b.accessToken)throw Error("Cursor refresh response was missing an access token");return this.mapTokens(b.accessToken,b.refreshToken||a)}if(429!==c.status&&c.status<500){let a=Error(`Cursor token refresh failed with HTTP ${c.status}`);throw a.retryable=!1,a}b=Error(`Cursor token refresh failed with HTTP ${c.status}`)}catch(a){if(!1===a.retryable)throw a;b=a}d<2&&await function(a){return new Promise(b=>setTimeout(b,a))}((c=d,Math.floor(300*2**c*(.8+.4*Math.random()))))}throw b||Error("Cursor token refresh failed")}mapTokens(a,b,c=null,d="oauth"){let e,f=(e=g(a),"number"==typeof e?.exp?1e3*e.exp-3e5:Date.now()+36e5),h=this.extractUserInfo(a);return{accessToken:a,refreshToken:b,...c?{machineId:c}:{},expiresAt:new Date(f).toISOString(),expiresIn:Math.max(1,Math.floor((f-Date.now())/1e3)),email:h?.email||null,providerSpecificData:{authMethod:d,...c?{machineId:c}:{},...h?.userId?{userId:h.userId}:{}}}}async validateImportToken(a,b){if(!a||"string"!=typeof a)throw Error("Access token is required");if(!b||"string"!=typeof b)throw Error("Machine ID is required");if(a.length<50)throw Error("Invalid token format. Token appears too short.");if(!/^[a-f0-9-]{32,}$/i.test(b.replace(/-/g,"")))throw Error("Invalid machine ID format. Expected UUID format.");return this.mapTokens(a,null,b,"imported")}extractUserInfo(a){let b=g(a);return b?{email:"string"==typeof b.email&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(b.email)?b.email:null,userId:b.sub||b.user_id||null}:null}getTokenStorageInstructions(){return{title:"How to import your existing Cursor session",steps:["Open Cursor IDE and make sure you're logged in",`Linux: ${this.config.tokenStoragePaths.linux}`,`macOS: ${this.config.tokenStoragePaths.macos}`,`Windows: ${this.config.tokenStoragePaths.windows}`,"Read cursorAuth/accessToken and storage.serviceMachineId from itemTable"]}}}var i=c(38421),j=c(10793),k=c(26762);let l=new Map;async function m(a,b,c,d){if(!b)return c();let e=`${a}:${b}`,f=l.get(e);if(f){if(f.promise)return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),f.promise;if(f.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),f.result;l.delete(e)}let g=(async()=>{try{let a=await c();return l.set(e,{result:a,expiresAt:Date.now()+1e4}),a}catch(a){throw l.delete(e),a}})();return l.set(e,{promise:g}),g}let n=new Set(["login.microsoftonline.com","login.microsoft.com","login.windows.net"]);function o(a){return"string"==typeof a?a.trim():""}let p=null;async function q(a,b){return a?m("xai",a,async()=>{try{p||(p=new(await c.e(8749).then(c.bind(c,38749))).XaiService);let b=await p.refreshAccessToken(a);return{accessToken:b.access_token,refreshToken:b.refresh_token||a,expiresIn:b.expires_in,idToken:b.id_token}}catch(c){b?.warn?.("TOKEN_REFRESH",`xai refresh failed: ${c?.message||c}`);let a=String(c?.message||"");if(a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant"};return null}},b):null}let r={claude:{bodyFormat:"json",includeClientSecret:!1,url:()=>j.NA.anthropic.token,dedupKey:"claude"},qwen:{url:()=>j.NA.qwen.token,dedupKey:"qwen",parse:a=>a.resource_url?{providerSpecificData:{resourceUrl:a.resource_url}}:{}},iflow:{url:()=>j.NA.iflow.token,dedupKey:"iflow",extraHeaders:(a,b)=>({Authorization:`Basic ${btoa(`${b.clientId}:${b.clientSecret}`)}`})},github:{url:()=>j.NA.github.token,dedupKey:"github",includeClientSecret:a=>!!a?.clientSecret},kimi:{dedupKey:"kimi",extraHeaders:a=>(0,j.buildKimiHeaders)(a?.providerSpecificData?.deviceId)}};async function s(a,b,c,d){let e=i.xq[a],f=r[a]||{},g=function(a,b,c){if(c?.url)try{return c.url()}catch{}return b?.refreshUrl||i.sr[a]?.tokenUrl||null}(a,e,f);return e&&g?b?m(f.dedupKey||a,b,async()=>{try{let h,i,j,{format:k,body:l}=(h=f?.bodyFormat==="json"?"json":"form",i=f?.includeClientSecret===void 0||("function"==typeof f.includeClientSecret?f.includeClientSecret(e):f.includeClientSecret),j={grant_type:"refresh_token",refresh_token:b,client_id:e.clientId},(i&&e.clientSecret&&(j.client_secret=e.clientSecret),"json"===h)?{format:"json",body:JSON.stringify(j)}:{format:"form",body:new URLSearchParams(j)}),m={"Content-Type":"json"===k?"application/json":"application/x-www-form-urlencoded",Accept:"application/json",...f.extraHeaders&&f.extraHeaders(c,e)||{}},n=await fetch(g,{method:"POST",headers:m,body:l});if(!n.ok){let b=await n.text();return d?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:n.status,error:b}),null}let o=await n.json();return d?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!o.access_token,hasNewRefreshToken:!!o.refresh_token,expiresIn:o.expires_in}),{accessToken:o.access_token,refreshToken:o.refresh_token||b,expiresIn:o.expires_in,...f.parse&&f.parse(o)||{}}}catch(b){return d?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},d):(d?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(d?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function t(a,b,c){return s("kimi",a,b,c)}async function u(a,b){return a?m("cline",a,async()=>{try{let c=await fetch(i.xq.cline?.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a,grantType:"refresh_token",clientType:"extension"})});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Cline token",{status:c.status,error:a}),null}let d=await c.json(),e=d?.data||d;if(!e?.accessToken)return null;let f=e.expiresAt?Math.max(1,Math.floor((new Date(e.expiresAt).getTime()-Date.now())/1e3)):e.expiresIn||e.expires_in||3600;return{accessToken:e.accessToken,refreshToken:e.refreshToken||a,expiresIn:f}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing Cline token: ${a.message}`),null}},b):null}async function v(a,b){return s("claude",a,{},b)}async function w(a,b,c,d){return a?m(`google:${b}`,a,async()=>{try{let e=await fetch(j.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})});if(!e.ok){let a=await e.text();return d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:e.status,error:a}),null}let f=await e.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!f.access_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}function x(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error?.code||c?.error||c?.error_code||"",e=c?.error_description||c?.message||a||"",f=`${d} ${e}`.toLowerCase();return{status:b,code:d,description:e,permanent:["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_grant"].some(a=>f.includes(a))}}async function y(a,b){return a?m("codex",a,async()=>{try{let c=await fetch(j.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:i.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text(),d=x(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-auth required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:c.status,error:a,code:d.code,permanent:d.permanent}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,hasIdToken:!!d.id_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||a,idToken:d.id_token,expiresIn:d.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function z(a,b,d){if(a?.profileArn)return{};let e=d?.trim?.()||null;if(!e){let{fetchKiroProfileArn:a}=await Promise.all([c.e(3433),c.e(3814),c.e(1253),c.e(8901),c.e(9217),c.e(6950)]).then(c.bind(c,9217));e=await a(b)}return e?{providerSpecificData:{profileArn:e}}:{}}async function A(a,b,c,d=null){return a?m("kiro",a,async()=>{let e=b?.authMethod,f=b?.clientId,g=b?.clientSecret,h=b?.region;if("external_idp"===e){let e;try{e=function(a,b={}){var c;let d=o(b.clientId||b.client_id),e=function(a){let b,c=o(a);if(!c)throw Error("token_endpoint is required");try{b=new URL(c)}catch{throw Error("token_endpoint must be a valid URL")}if("https:"!==b.protocol)throw Error("token_endpoint must use https");let d=b.hostname.toLowerCase();if(!n.has(d))throw Error("token_endpoint must be a Microsoft login endpoint");return b.toString()}(b.tokenEndpoint||b.token_endpoint),f=Array.isArray(c=b.scope||b.scopes)?c.map(o).filter(Boolean).join(" "):o(c);if(!a)throw Error("refresh token is required");if(!d)throw Error("clientId is required for external_idp refresh");if(!f)throw Error("scope is required for external_idp refresh");return{tokenEndpoint:e,body:new URLSearchParams({grant_type:"refresh_token",client_id:d,refresh_token:a,scope:f}),providerSpecificData:{...b,authMethod:"external_idp",clientId:d,tokenEndpoint:e,scope:f}}}(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Invalid Kiro external_idp refresh config: ${a.message}`),null}let f=await (0,k.Fm)(e.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:e.body},d);if(!f.ok){let a=await f.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro external_idp token",{status:f.status,error:a}),null}let g=await f.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro external_idp token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in,providerSpecificData:e.providerSpecificData}}if(f&&g){let i="idc"===e&&h?`https://oidc.${h}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",j=await (0,k.Fm)(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:f,clientSecret:g,refreshToken:a,grantType:"refresh_token"})},d);if(!j.ok){let a=await j.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:j.status,error:a}),null}let l=await j.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!l.accessToken,expiresIn:l.expiresIn}),{accessToken:l.accessToken,refreshToken:l.refreshToken||a,expiresIn:l.expiresIn,...await z(b,l.accessToken,l.profileArn)}}let j=await (0,k.Fm)(i.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a})},d);if(!j.ok){let a=await j.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:j.status,error:a}),null}let l=await j.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!l.accessToken,expiresIn:l.expiresIn}),{accessToken:l.accessToken,refreshToken:l.refreshToken||a,expiresIn:l.expiresIn,...await z(b,l.accessToken,l.profileArn)}},c):null}async function B(a,b){return s("iflow",a,{},b)}async function C(a,b){return s("github",a,{},b)}async function D(a,b){return a?m("copilot",a,async()=>{try{let c=await fetch(i.sr.github?.copilotTokenUrl,{headers:{Authorization:`token ${a}`,"User-Agent":j.x0.USER_AGENT,"Editor-Version":`vscode/${j.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${j.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":j.x0.API_VERSION}});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:c.status,error:a}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function E(a,b){return a?m("codebuddy-cn",a,async()=>{let c=i.sr["codebuddy-cn"]||{},d=await fetch(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!d.ok){let a=await d.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy token",{status:d.status,error:a}),null}let e=await d.json();return 0===e.code&&e.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy token",{hasNewAccessToken:!!e.data.accessToken,hasNewRefreshToken:!!e.data.refreshToken,expiresIn:e.data.expiresIn}),{accessToken:e.data.accessToken,refreshToken:e.data.refreshToken||a,expiresIn:e.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy token refresh returned no token",{code:e.code,msg:e.msg}),null)},b):null}async function F(a,b){return a?m("codebuddy-intl",a,async()=>{let c=i.sr["codebuddy-intl"]||{},d=await fetch(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!d.ok){let a=await d.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy intl token",{status:d.status,error:a}),null}let e=await d.json();return 0===e.code&&e.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy intl token",{hasNewAccessToken:!!e.data.accessToken,hasNewRefreshToken:!!e.data.refreshToken,expiresIn:e.data.expiresIn}),{accessToken:e.data.accessToken,refreshToken:e.data.refreshToken||a,expiresIn:e.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy intl token refresh returned no token",{code:e.code,msg:e.msg}),null)},b):null}async function G(a,b,c){if(!a)return null;let d=i.sr.trae||{},e=d.exchangeTokenUrl||d.tokenUrl;return e?m("trae",a,async()=>{try{let b,f=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"Trae/1.0.0 antigravity-cockpit-tools"},body:JSON.stringify({ClientID:d.clientId||"ono9krqynydwx5",RefreshToken:a,ClientSecret:d.clientSecret||"-",UserID:""})});if(!f.ok){let a=await f.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Trae token",{status:f.status,error:a}),null}let g=await f.json(),h=g?.Result||g?.result||g,i=h?.AccessToken||h?.accessToken;if(!i)return c?.error?.("TOKEN_REFRESH","Trae refresh returned no AccessToken",{payload:g}),null;let j=h?.RefreshToken||h?.refreshToken||a,k=h?.ExpiresAt||h?.expiresAt;if("number"==typeof k)b=Math.max(1,k-Math.floor(Date.now()/1e3));else if("string"==typeof k){let a=new Date(k).getTime()-Date.now();b=a>0?Math.floor(a/1e3):void 0}return c?.info?.("TOKEN_REFRESH","Successfully refreshed Trae token",{hasNewAccessToken:!!i,hasNewRefreshToken:j!==a,expiresIn:b}),{accessToken:i,refreshToken:j,expiresIn:b}}catch(a){return c?.error?.("TOKEN_REFRESH",`Error refreshing Trae token: ${a.message}`),null}},c):(c?.warn?.("TOKEN_REFRESH","No Trae exchangeTokenUrl configured"),null)}function H(){return null}async function I(a,b){return b?.info?.("TOKEN_REFRESH","windsurf: apiKey is long-lived (no refresh_token flow) — skipping"),null}async function J(a,b="intl",d){return a?m(`qoder:${b||"intl"}`,a,async()=>{try{let e=new(await Promise.all([c.e(3814),c.e(7726)]).then(c.bind(c,37726))).QoderService({profile:b}),f=await e.refreshDeviceToken(a);return d?.info?.("TOKEN_REFRESH","Successfully refreshed Qoder device token",{profile:b,hasNewAccessToken:!!f.accessToken,hasNewRefreshToken:!!f.refreshToken,expiresIn:f.expiresIn}),{accessToken:f.accessToken,refreshToken:f.refreshToken||a,expiresIn:f.expiresIn}}catch(c){let a=c?.status;if(d?.error?.("TOKEN_REFRESH",`Qoder device refresh failed (${b})`,{error:c?.message||String(c),status:a}),401===a||403===a)return{error:"invalid_grant",message:c?.message||"Qoder refresh rejected"};return null}},d):null}async function K(a,b){return a?m("frontier-for-all",a,async()=>{try{let c=await fetch(j.NA["frontier-for-all"].token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:i.xq["frontier-for-all"].clientId})});if(!c.ok){let a=await c.text().catch(()=>""),d=x(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Frontier refresh token rotated or revoked. Re-login required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Frontier token",{status:c.status,error:a}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Frontier token",{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||a,expiresIn:d.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Frontier token: ${a.message}`),null}},b):null}async function L(a,b){return a?m("cursor",a,async()=>{try{let c=await new h().refreshToken(a);return b?.info?.("TOKEN_REFRESH","Successfully refreshed Cursor token",{hasNewAccessToken:!!c.accessToken,hasNewRefreshToken:!!c.refreshToken,expiresIn:c.expiresIn}),c}catch(a){return b?.warn?.("TOKEN_REFRESH",`Cursor refresh failed: ${a?.message||a}`),null}},b):null}},98976:(a,b,c)=>{c.d(b,{Dz:()=>i,Vq:()=>l,fp:()=>j});var d=c(44855),e=c(15251);let f=e.sr.codex?.maxRefreshAgeMs,g=new Map;function h(a){if(null==a||""===a)return null;if("number"==typeof a)return a<1e12?1e3*a:a;let b=new Date(a).getTime();return Number.isFinite(b)?b:null}function i(a,b=Date.now()){let c=h(a?.expiresAt??a?.tokenExpiresAt);if(null!==c)return c;let d=a?.expiresIn;return"number"==typeof d&&d>0?b+1e3*d:null}function j(a,b,c=Date.now()){if(!b)return!1;let g=i(b);if(null!==g&&g-c<(0,d.Og)(a))return!0;let k=e.sr[a]?.maxRefreshAgeMs;return!!(k&&b.refreshToken&&function(a,b=Date.now(),c=f){let d=h(a?.lastRefreshAt??a?.lastRefresh??a?.providerSpecificData?.lastRefreshAt);return!d||b-d>=c}(b,c,k))}async function k(a,b,c){let d,e=(d=b?.connectionId||b?.id||b?.email||b?.name||b?.refreshToken?.slice?.(-16)||"default",`${a}:${d}`),f=g.get(e);if(f)return f;let h=Promise.resolve().then(c).finally(()=>{g.delete(e)});return g.set(e,h),h}async function l(a,b,c){return b?k(a,b,async()=>{let f=await (0,d.$B)(a,b,c);return function(a,b,c,f=Date.now()){var g,h;if(!c)return null;if((0,d.jT)(c))return c;let i={},j=new Date(f).toISOString();c.accessToken&&(i.accessToken=c.accessToken),c.apiKey&&(i.apiKey=c.apiKey),c.token&&(i.token=c.token);let k=c.refreshToken??b?.refreshToken;k&&(i.refreshToken=k);let l=c.idToken??b?.idToken;return l&&(i.idToken=l),c.expiresIn?(i.expiresIn=c.expiresIn,i.expiresAt=function(a,b=Date.now()){return a?new Date(b+1e3*a).toISOString():null}(c.expiresIn,f)):c.expiresAt&&(i.expiresAt=c.expiresAt),c.projectId&&(i.projectId=c.projectId),c.providerSpecificData&&(g=b?.providerSpecificData,i.providerSpecificData=(h=c.providerSpecificData)&&"object"==typeof h?{...g||{},...h}:g),c.copilotToken&&(i.copilotToken=c.copilotToken),c.copilotTokenExpiresAt&&(i.copilotTokenExpiresAt=c.copilotTokenExpiresAt),(e.sr[a]?.trackRefreshAt||i.accessToken||i.apiKey||i.token||i.refreshToken||i.copilotToken)&&(i.lastRefreshAt=c.lastRefreshAt||j),i}(a,b,f)}):null}}};
1
+ "use strict";exports.id=8976,exports.ids=[8976],exports.modules={10793:(a,b,c)=>{let d;c.d(b,{Cn:()=>o,Co:()=>x,Ic:()=>u,J5:()=>r,K:()=>s,NA:()=>A,QH:()=>p,Wu:()=>z,buildKimiHeaders:()=>B,go:()=>j,iO:()=>y,j5:()=>v,nZ:()=>t,sX:()=>k,uR:()=>q,x0:()=>m,zv:()=>w});var e=c(21820),f=c(38421),g=c(74570),h=c(8086);let i=f.xq["gemini-cli"]?.cliVersion,j=f.xq["gemini-cli"]?.apiClient;function k(a="unknown"){let b;return`GeminiCLI/${i}/${a||"unknown"} (${(0,e.platform)()}; ${"ia32"===(b=(0,e.arch)())?"x86":b}; terminal)`}let l=f.xq.github?.copilot||{},m={VSCODE_VERSION:l.vscodeVersion,COPILOT_CHAT_VERSION:l.chatVersion,USER_AGENT:l.userAgent,API_VERSION:l.apiVersion};function n(){let a=(0,e.platform)(),b=(0,e.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let o={ideType:9,platform:n(),pluginType:2},p="_ide",q="_ide",r=new Set(["browser_subagent","command_status","find_by_name","generate_image","grep_search","list_dir","list_resources","multi_replace_file_content","notify_user","read_resource","read_terminal","read_url_content","replace_file_content","run_command","search_web","send_command_input","task_boundary","view_content_chunk","view_file","write_to_file"]),s={"User-Agent":g.Of},t={"gemini-cli":{loadCodeAssist:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUser:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser"},antigravity:{loadCodeAssist:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUser:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser"}},u={"Content-Type":"application/json","User-Agent":"google-api-nodejs-client/9.15.1","X-Goog-Api-Client":"google-cloud-sdk vscode_cloudshelleditor/0.1","Client-Metadata":JSON.stringify({ideType:9,platform:n(),pluginType:2})},v={"Content-Type":"application/json","User-Agent":g.Of},w={ideType:9,platform:n(),pluginType:2},x="You are Claude Code, Anthropic's official CLI for Claude.",y=[{from:"You are a Claude agent, built on Anthropic's Claude Agent SDK.",to:""},{from:/opencode/gi,to:a=>"OpenCode"===a?"Antigravity":"OPENCODE"===a?"ANTIGRAVITY":"antigravity"}],z=Object.fromEntries(Object.entries(f.sr).filter(([,a])=>a.refreshLeadMs).map(([a,b])=>[a,b.refreshLeadMs])),A={google:{token:"https://oauth2.googleapis.com/token",auth:"https://accounts.google.com/o/oauth2/auth"},openai:{token:f.sr.codex?.tokenUrl,auth:f.sr.codex?.authorizeUrl},anthropic:{token:f.sr.claude?.tokenUrl,auth:"https://api.anthropic.com/v1/oauth/authorize"},iflow:{token:f.sr.iflow?.tokenUrl,auth:f.sr.iflow?.authorizeUrl},github:{token:f.sr.github?.tokenUrl,auth:f.sr.github?.authorizeUrl,deviceCode:f.sr.github?.deviceCodeUrl},"frontier-for-all":{token:f.sr["frontier-for-all"]?.tokenUrl,auth:f.sr["frontier-for-all"]?.deviceCodeUrl,deviceCode:f.sr["frontier-for-all"]?.deviceCodeUrl,deviceToken:f.sr["frontier-for-all"]?.deviceTokenUrl,revoke:f.sr["frontier-for-all"]?.revokeUrl}};function B(a){let b=(0,e.platform)(),c=(0,e.arch)(),f=`${b} ${c}`;"darwin"===b?f=`macOS ${c}`:"win32"===b?f=`Windows ${c}`:"linux"===b&&(f=`Linux ${c}`);let g="unknown";try{g=(0,e.hostname)()||"unknown"}catch{g="unknown"}let i="string"==typeof a&&a.trim()?a.trim():`kimi-${Date.now()}`;return{"X-Msh-Platform":"9router","X-Msh-Version":function(){if(d)return d;try{d=(0,h.createRequire)("file:///Volumes/Files/Projects/EzRouter/EzRouter/open-sse/config/appConstants.js")("../../package.json").version||"0.0.0"}catch{d=process.env.npm_package_version||"0.0.0"}return d}(),"X-Msh-Device-Name":g,"X-Msh-Device-Model":f,"X-Msh-Device-Id":i}}},13073:(a,b,c)=>{c.d(b,{DI:()=>i,Hp:()=>k,LT:()=>j,MZ:()=>v,Nl:()=>z,Nu:()=>p,OV:()=>h,S6:()=>s,Td:()=>A,Tx:()=>q,V1:()=>C,WN:()=>t,Ww:()=>D,YT:()=>n,ZL:()=>m,aV:()=>u,cD:()=>o,f7:()=>y,hF:()=>l,lB:()=>w,qp:()=>B,w1:()=>x});var d=c(21820),e=c(74570),f=c(15251);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={...f.sr.claude},i={...f.sr.codex},j={...e.dG,...f.sr["gemini-cli"]},k={...f.sr.qwen},l={...f.sr.qoder};({...f.sr["qoderwork-cn"]});let m={...f.sr.iflow},n={...e.XP,...f.sr.antigravity,loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:g(),pluginType:2})};function o(){return{ideType:9,platform:g(),pluginType:2}}({...f.sr.openai});let p={...f.sr.github},q={...f.sr.kiro},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={...f.sr.cursor,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"}},u={...f.sr.kimi,clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||process.env.KIMI_OAUTH_CLIENT_ID||f.xq.kimi?.clientId||f.sr.kimi?.clientId},v={...f.sr.kilocode},w={...f.sr.cline},x={...f.sr.clinepass},y={...f.sr.gitlab},z={...f.sr["codebuddy-cn"]},A={...f.sr.kimchi},B={...f.sr["grok-cli"]};({...f.sr["codebuddy-intl"]});let C={...f.sr["frontier-for-all"]},D=3e5},26762:(a,b,c)=>{c.d(b,{Fm:()=>s});var d=c(27910),e=c(82689);let f=globalThis.fetch,g=new Map,h=new Map,i=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],j=["8.8.8.8","8.8.4.4"];function k(a){return null==a?"":String(a).trim()}function l(a,b){let c=k(process.env[a]);if(!/^[1-9]\d*$/.test(c))return b;let d=Number(c);return Number.isSafeInteger(d)?d:b}async function m(a){let b=h.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,19)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,19)),f=new b.Resolver;f.setServers(j);let g=d(f.resolve4.bind(f)),i=await g(a);return h.set(a,{ip:i[0],expiry:Date.now()+e.v1.dnsCacheTtlMs}),i[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function n(a){let b;try{b=new URL(a).hostname.toLowerCase()}catch{return!1}let c=b.startsWith("[")&&b.endsWith("]")?b.slice(1,-1):b;if("localhost"===c||c.endsWith(".localhost")||"::1"===c||"0:0:0:0:0:0:0:1"===c)return!0;let d=/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i.exec(c);if(d)return(parseInt(d[1],16)>>8&255)==127;let e=/^::ffff:(\d{1,3}(?:\.\d{1,3}){3})$/i.exec(c),f=e?e[1]:c;return/^127(?:\.\d{1,3}){3}$/.test(f)}function o(a,b){let c,d=k(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function p(a){let b=k(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function q(a){let b=p(a);if(!b)return null;if(!g.has(b)){g.size>=e.v1.proxyDispatchersMaxSize&&g.delete(g.keys().next().value);let{ProxyAgent:a}=await c.e(3433).then(c.t.bind(c,3433,19)),d=l("PROXY_CONNECT_TIMEOUT_MS",9e4),f=l("PROXY_HEADERS_TIMEOUT_MS",3e5);g.set(b,new a({uri:b,connectTimeout:d,headersTimeout:f,bodyTimeout:0}))}return g.get(b)}async function r(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,19)),g=await Promise.resolve().then(c.t.bind(c,91645,19)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:e.method||"POST",headers:{...e.headers,Host:a.hostname}},i=h.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:d.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};c(b)});i.on("error",f),e.body&&i.write("string"==typeof e.body?e.body:JSON.stringify(e.body)),i.end()}),g.on("error",f)})}async function s(a,b={},c=null){let d="string"==typeof a?a:a.toString(),e=k(c?.vercelRelayUrl);if(e){let a=new URL(d),c={...b.headers,"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return f(e,{...b,headers:c})}let g=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0||n(a))return null;let c=k(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=k(b?.noProxy??b?.connectionNoProxy);return d&&o(a,d)?null:p(c)}(d,c),h=g?null:p(function(a){let b;if(n(a)||o(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(d)),j=g||h;if(function(a){try{let b=new URL(a).hostname;return i.some(a=>b.includes(a))}catch{return!1}}(d)){if(j)try{let c=await q(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await m(a.hostname);if(c)return await r(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(j)try{let c=await q(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${a.message}`)}return f(a,b)}async function t(a,b={}){return s(a,b,null)}globalThis.fetch!==t&&(globalThis.fetch=t)},44855:(a,b,c)=>{c.d(b,{$B:()=>o,I9:()=>f.I9,Og:()=>i,Ql:()=>f.Ql,Sc:()=>j,jR:()=>f.jR,jT:()=>h,oD:()=>g,pb:()=>l});var d=c(38421),e=c(10793),f=c(46258);let g=3e5;function h(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function i(a){return e.Wu[a]?e.Wu[a]:"kimi-coding"===a&&e.Wu.kimi?e.Wu.kimi:g}function j(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let k=new Map;async function l(a,b){let d=a.client_email,f=k.get(d);if(f&&f.expiresAt-Date.now()>3e5)return{accessToken:f.token,expiresAt:f.expiresAt};try{let{SignJWT:f,importPKCS8:g}=await c.e(2891).then(c.bind(c,82891));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let h=await g(a.private_key.replace(/\\n/g,"\n"),"RS256"),i=Math.floor(Date.now()/1e3),j=await new f({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience(e.NA.google.token).setIssuedAt(i).setExpirationTime(i+3600).sign(h),l=await fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:j})});if(!l.ok){let a=await l.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:m,expires_in:n}=await l.json(),o=Date.now()+(n??3600)*1e3;return k.set(d,{token:m,expiresAt:o}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:m,expiresAt:o}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}function m(a,b){let c=j(a.apiKey);return c?l(c,b):null}let n={"frontier-for-all":(a,b)=>(0,f.go)(a.refreshToken,b),"gemini-cli":(a,b)=>(0,f.I9)(a.refreshToken,d.xq["gemini-cli"].clientId,d.xq["gemini-cli"].clientSecret,b),antigravity:(a,b)=>(0,f.I9)(a.refreshToken,d.xq.antigravity.clientId,d.xq.antigravity.clientSecret,b),claude:(a,b)=>(0,f.ge)(a.refreshToken,b),codex:(a,b)=>(0,f.Wm)(a.refreshToken,b),iflow:(a,b)=>(0,f.AH)(a.refreshToken,b),github:(a,b)=>(0,f.EF)(a.refreshToken,b),kiro:(a,b)=>(0,f.Ql)(a.refreshToken,a.providerSpecificData,b),cursor:(a,b)=>(0,f.ZP)(a.refreshToken,b),xai:(a,b)=>(0,f.r_)(a.refreshToken,b),"grok-cli":(a,b)=>(0,f.r_)(a.refreshToken,b),gcli:(a,b)=>(0,f.r_)(a.refreshToken,b),"codebuddy-cn":(a,b)=>(0,f.SO)(a.refreshToken,b),"codebuddy-intl":(a,b)=>(0,f.XB)(a.refreshToken,b),trae:(a,b)=>(0,f.RM)(a.refreshToken,a,b),cline:(a,b)=>(0,f.Il)(a.refreshToken,b),zed:()=>(0,f.wt)(),windsurf:(a,b)=>(0,f.p9)(a,b),kimi:(a,b)=>(0,f.ng)(a.refreshToken,a,b),"kimi-coding":(a,b)=>(0,f.ng)(a.refreshToken,a,b),vertex:m,"vertex-partner":m};async function o(a,b,c){let d=b.refreshToken||b.providerSpecificData?.refreshToken;if(!d)return null;let e=d!==b.refreshToken?{...b,refreshToken:d}:b,g=n[a];return g?g(e,c):(0,f.J1)(a,d,e,c)}},46258:(a,b,c)=>{c.d(b,{J1:()=>s,ge:()=>v,Il:()=>u,XB:()=>F,SO:()=>E,Wm:()=>y,jR:()=>D,ZP:()=>L,go:()=>K,EF:()=>C,I9:()=>w,AH:()=>B,ng:()=>t,Ql:()=>A,Ms:()=>J,RM:()=>G,p9:()=>I,r_:()=>q,wt:()=>H});var d=c(55511),e=c.n(d),f=c(13073);function g(a){let b="string"==typeof a?a.split("."):[];if(3!==b.length||!b[1])return null;try{return JSON.parse(Buffer.from(b[1],"base64url").toString("utf8"))}catch{return null}}class h{constructor(){this.config=f.WN}getAuthorizationData(a="login"){let b=e().randomBytes(32).toString("base64url"),c=e().createHash("sha256").update(b).digest("base64url"),d=e().randomUUID(),f=new URLSearchParams({challenge:c,uuid:d,mode:a,supportsSelectedTeamLogin:"true"});return{authUrl:`${this.config.loginUrl}?${f.toString()}`,uuid:d,verifier:b,expiresIn:300}}async pollToken(a,b,c){if(!a||!b)throw Error("Cursor OAuth session is incomplete");let d=new URLSearchParams({uuid:a,verifier:b}),f=await fetch(`${this.config.pollUrl}?${d.toString()}`,{headers:{Accept:"application/json","User-Agent":"Cursor/3.12.29","x-cursor-client-type":this.config.clientType,"x-ghost-mode":"implicit-false","x-new-onboarding-completed":"false",traceparent:`00-${e().randomBytes(16).toString("hex")}-${e().randomBytes(8).toString("hex")}-01`},signal:c});if(404===f.status)return{success:!1,pending:!0,error:"authorization_pending"};if(!f.ok)throw Error(`Cursor OAuth polling failed with HTTP ${f.status}`);let g=await f.json();if(!g.accessToken||!g.refreshToken)throw Error("Cursor OAuth response was missing tokens");return{success:!0,tokens:g}}async refreshToken(a){let b;if(!a||"string"!=typeof a)throw Error("Cursor refresh token is required");for(let d=0;d<3;d+=1){var c;try{let c=await fetch(this.config.refreshUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:"{}",signal:AbortSignal.timeout(15e3)});if(c.ok){let b=await c.json();if(!b.accessToken)throw Error("Cursor refresh response was missing an access token");return this.mapTokens(b.accessToken,b.refreshToken||a)}if(429!==c.status&&c.status<500){let a=Error(`Cursor token refresh failed with HTTP ${c.status}`);throw a.retryable=!1,a}b=Error(`Cursor token refresh failed with HTTP ${c.status}`)}catch(a){if(!1===a.retryable)throw a;b=a}d<2&&await function(a){return new Promise(b=>setTimeout(b,a))}((c=d,Math.floor(300*2**c*(.8+.4*Math.random()))))}throw b||Error("Cursor token refresh failed")}mapTokens(a,b,c=null,d="oauth"){let e,f=(e=g(a),"number"==typeof e?.exp?1e3*e.exp-3e5:Date.now()+36e5),h=this.extractUserInfo(a);return{accessToken:a,refreshToken:b,...c?{machineId:c}:{},expiresAt:new Date(f).toISOString(),expiresIn:Math.max(1,Math.floor((f-Date.now())/1e3)),email:h?.email||null,providerSpecificData:{authMethod:d,...c?{machineId:c}:{},...h?.userId?{userId:h.userId}:{}}}}async validateImportToken(a,b){if(!a||"string"!=typeof a)throw Error("Access token is required");if(!b||"string"!=typeof b)throw Error("Machine ID is required");if(a.length<50)throw Error("Invalid token format. Token appears too short.");if(!/^[a-f0-9-]{32,}$/i.test(b.replace(/-/g,"")))throw Error("Invalid machine ID format. Expected UUID format.");return this.mapTokens(a,null,b,"imported")}extractUserInfo(a){let b=g(a);return b?{email:"string"==typeof b.email&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(b.email)?b.email:null,userId:b.sub||b.user_id||null}:null}getTokenStorageInstructions(){return{title:"How to import your existing Cursor session",steps:["Open Cursor IDE and make sure you're logged in",`Linux: ${this.config.tokenStoragePaths.linux}`,`macOS: ${this.config.tokenStoragePaths.macos}`,`Windows: ${this.config.tokenStoragePaths.windows}`,"Read cursorAuth/accessToken and storage.serviceMachineId from itemTable"]}}}var i=c(38421),j=c(10793),k=c(26762);let l=new Map;async function m(a,b,c,d){if(!b)return c();let e=`${a}:${b}`,f=l.get(e);if(f){if(f.promise)return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),f.promise;if(f.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),f.result;l.delete(e)}let g=(async()=>{try{let a=await c();return l.set(e,{result:a,expiresAt:Date.now()+1e4}),a}catch(a){throw l.delete(e),a}})();return l.set(e,{promise:g}),g}let n=new Set(["login.microsoftonline.com","login.microsoft.com","login.windows.net"]);function o(a){return"string"==typeof a?a.trim():""}let p=null;async function q(a,b){return a?m("xai",a,async()=>{try{p||(p=new(await c.e(8749).then(c.bind(c,38749))).XaiService);let b=await p.refreshAccessToken(a);return{accessToken:b.access_token,refreshToken:b.refresh_token||a,expiresIn:b.expires_in,idToken:b.id_token}}catch(c){b?.warn?.("TOKEN_REFRESH",`xai refresh failed: ${c?.message||c}`);let a=String(c?.message||"");if(a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant"};return null}},b):null}let r={claude:{bodyFormat:"json",includeClientSecret:!1,url:()=>j.NA.anthropic.token,dedupKey:"claude"},qwen:{url:()=>j.NA.qwen.token,dedupKey:"qwen",parse:a=>a.resource_url?{providerSpecificData:{resourceUrl:a.resource_url}}:{}},iflow:{url:()=>j.NA.iflow.token,dedupKey:"iflow",extraHeaders:(a,b)=>({Authorization:`Basic ${btoa(`${b.clientId}:${b.clientSecret}`)}`})},github:{url:()=>j.NA.github.token,dedupKey:"github",includeClientSecret:a=>!!a?.clientSecret},kimi:{dedupKey:"kimi",extraHeaders:a=>(0,j.buildKimiHeaders)(a?.providerSpecificData?.deviceId)}};async function s(a,b,c,d){let e=i.xq[a],f=r[a]||{},g=function(a,b,c){if(c?.url)try{return c.url()}catch{}return b?.refreshUrl||i.sr[a]?.tokenUrl||null}(a,e,f);return e&&g?b?m(f.dedupKey||a,b,async()=>{try{let h,i,j,{format:k,body:l}=(h=f?.bodyFormat==="json"?"json":"form",i=f?.includeClientSecret===void 0||("function"==typeof f.includeClientSecret?f.includeClientSecret(e):f.includeClientSecret),j={grant_type:"refresh_token",refresh_token:b,client_id:e.clientId},(i&&e.clientSecret&&(j.client_secret=e.clientSecret),"json"===h)?{format:"json",body:JSON.stringify(j)}:{format:"form",body:new URLSearchParams(j)}),m={"Content-Type":"json"===k?"application/json":"application/x-www-form-urlencoded",Accept:"application/json",...f.extraHeaders&&f.extraHeaders(c,e)||{}},n=await fetch(g,{method:"POST",headers:m,body:l});if(!n.ok){let b=await n.text();return d?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:n.status,error:b}),null}let o=await n.json();return d?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!o.access_token,hasNewRefreshToken:!!o.refresh_token,expiresIn:o.expires_in}),{accessToken:o.access_token,refreshToken:o.refresh_token||b,expiresIn:o.expires_in,...f.parse&&f.parse(o)||{}}}catch(b){return d?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},d):(d?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(d?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function t(a,b,c){return s("kimi",a,b,c)}async function u(a,b){return a?m("cline",a,async()=>{try{let c=await fetch(i.xq.cline?.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a,grantType:"refresh_token",clientType:"extension"})});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Cline token",{status:c.status,error:a}),null}let d=await c.json(),e=d?.data||d;if(!e?.accessToken)return null;let f=e.expiresAt?Math.max(1,Math.floor((new Date(e.expiresAt).getTime()-Date.now())/1e3)):e.expiresIn||e.expires_in||3600;return{accessToken:e.accessToken,refreshToken:e.refreshToken||a,expiresIn:f}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing Cline token: ${a.message}`),null}},b):null}async function v(a,b){return s("claude",a,{},b)}async function w(a,b,c,d){return a?m(`google:${b}`,a,async()=>{try{let e=await fetch(j.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})});if(!e.ok){let a=await e.text();return d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:e.status,error:a}),null}let f=await e.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!f.access_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}function x(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error?.code||c?.error||c?.error_code||"",e=c?.error_description||c?.message||a||"",f=`${d} ${e}`.toLowerCase();return{status:b,code:d,description:e,permanent:["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_grant"].some(a=>f.includes(a))}}async function y(a,b){return a?m("codex",a,async()=>{try{let c=await fetch(j.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:i.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text(),d=x(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-auth required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:c.status,error:a,code:d.code,permanent:d.permanent}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,hasIdToken:!!d.id_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||a,idToken:d.id_token,expiresIn:d.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function z(a,b,d){if(a?.profileArn)return{};let e=d?.trim?.()||null;if(!e){let{fetchKiroProfileArn:a}=await Promise.all([c.e(3433),c.e(1253),c.e(3814),c.e(9303),c.e(6975),c.e(9217),c.e(6950)]).then(c.bind(c,9217));e=await a(b)}return e?{providerSpecificData:{profileArn:e}}:{}}async function A(a,b,c,d=null){return a?m("kiro",a,async()=>{let e=b?.authMethod,f=b?.clientId,g=b?.clientSecret,h=b?.region;if("external_idp"===e){let e;try{e=function(a,b={}){var c;let d=o(b.clientId||b.client_id),e=function(a){let b,c=o(a);if(!c)throw Error("token_endpoint is required");try{b=new URL(c)}catch{throw Error("token_endpoint must be a valid URL")}if("https:"!==b.protocol)throw Error("token_endpoint must use https");let d=b.hostname.toLowerCase();if(!n.has(d))throw Error("token_endpoint must be a Microsoft login endpoint");return b.toString()}(b.tokenEndpoint||b.token_endpoint),f=Array.isArray(c=b.scope||b.scopes)?c.map(o).filter(Boolean).join(" "):o(c);if(!a)throw Error("refresh token is required");if(!d)throw Error("clientId is required for external_idp refresh");if(!f)throw Error("scope is required for external_idp refresh");return{tokenEndpoint:e,body:new URLSearchParams({grant_type:"refresh_token",client_id:d,refresh_token:a,scope:f}),providerSpecificData:{...b,authMethod:"external_idp",clientId:d,tokenEndpoint:e,scope:f}}}(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Invalid Kiro external_idp refresh config: ${a.message}`),null}let f=await (0,k.Fm)(e.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:e.body},d);if(!f.ok){let a=await f.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro external_idp token",{status:f.status,error:a}),null}let g=await f.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro external_idp token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in,providerSpecificData:e.providerSpecificData}}if(f&&g){let i="idc"===e&&h?`https://oidc.${h}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",j=await (0,k.Fm)(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:f,clientSecret:g,refreshToken:a,grantType:"refresh_token"})},d);if(!j.ok){let a=await j.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:j.status,error:a}),null}let l=await j.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!l.accessToken,expiresIn:l.expiresIn}),{accessToken:l.accessToken,refreshToken:l.refreshToken||a,expiresIn:l.expiresIn,...await z(b,l.accessToken,l.profileArn)}}let j=await (0,k.Fm)(i.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a})},d);if(!j.ok){let a=await j.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:j.status,error:a}),null}let l=await j.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!l.accessToken,expiresIn:l.expiresIn}),{accessToken:l.accessToken,refreshToken:l.refreshToken||a,expiresIn:l.expiresIn,...await z(b,l.accessToken,l.profileArn)}},c):null}async function B(a,b){return s("iflow",a,{},b)}async function C(a,b){return s("github",a,{},b)}async function D(a,b){return a?m("copilot",a,async()=>{try{let c=await fetch(i.sr.github?.copilotTokenUrl,{headers:{Authorization:`token ${a}`,"User-Agent":j.x0.USER_AGENT,"Editor-Version":`vscode/${j.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${j.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":j.x0.API_VERSION}});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:c.status,error:a}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function E(a,b){return a?m("codebuddy-cn",a,async()=>{let c=i.sr["codebuddy-cn"]||{},d=await fetch(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!d.ok){let a=await d.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy token",{status:d.status,error:a}),null}let e=await d.json();return 0===e.code&&e.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy token",{hasNewAccessToken:!!e.data.accessToken,hasNewRefreshToken:!!e.data.refreshToken,expiresIn:e.data.expiresIn}),{accessToken:e.data.accessToken,refreshToken:e.data.refreshToken||a,expiresIn:e.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy token refresh returned no token",{code:e.code,msg:e.msg}),null)},b):null}async function F(a,b){return a?m("codebuddy-intl",a,async()=>{let c=i.sr["codebuddy-intl"]||{},d=await fetch(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!d.ok){let a=await d.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy intl token",{status:d.status,error:a}),null}let e=await d.json();return 0===e.code&&e.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy intl token",{hasNewAccessToken:!!e.data.accessToken,hasNewRefreshToken:!!e.data.refreshToken,expiresIn:e.data.expiresIn}),{accessToken:e.data.accessToken,refreshToken:e.data.refreshToken||a,expiresIn:e.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy intl token refresh returned no token",{code:e.code,msg:e.msg}),null)},b):null}async function G(a,b,c){if(!a)return null;let d=i.sr.trae||{},e=d.exchangeTokenUrl||d.tokenUrl;return e?m("trae",a,async()=>{try{let b,f=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"Trae/1.0.0 antigravity-cockpit-tools"},body:JSON.stringify({ClientID:d.clientId||"ono9krqynydwx5",RefreshToken:a,ClientSecret:d.clientSecret||"-",UserID:""})});if(!f.ok){let a=await f.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Trae token",{status:f.status,error:a}),null}let g=await f.json(),h=g?.Result||g?.result||g,i=h?.AccessToken||h?.accessToken;if(!i)return c?.error?.("TOKEN_REFRESH","Trae refresh returned no AccessToken",{payload:g}),null;let j=h?.RefreshToken||h?.refreshToken||a,k=h?.ExpiresAt||h?.expiresAt;if("number"==typeof k)b=Math.max(1,k-Math.floor(Date.now()/1e3));else if("string"==typeof k){let a=new Date(k).getTime()-Date.now();b=a>0?Math.floor(a/1e3):void 0}return c?.info?.("TOKEN_REFRESH","Successfully refreshed Trae token",{hasNewAccessToken:!!i,hasNewRefreshToken:j!==a,expiresIn:b}),{accessToken:i,refreshToken:j,expiresIn:b}}catch(a){return c?.error?.("TOKEN_REFRESH",`Error refreshing Trae token: ${a.message}`),null}},c):(c?.warn?.("TOKEN_REFRESH","No Trae exchangeTokenUrl configured"),null)}function H(){return null}async function I(a,b){return b?.info?.("TOKEN_REFRESH","windsurf: apiKey is long-lived (no refresh_token flow) — skipping"),null}async function J(a,b="intl",d){return a?m(`qoder:${b||"intl"}`,a,async()=>{try{let e=new(await Promise.all([c.e(3814),c.e(7726)]).then(c.bind(c,37726))).QoderService({profile:b}),f=await e.refreshDeviceToken(a);return d?.info?.("TOKEN_REFRESH","Successfully refreshed Qoder device token",{profile:b,hasNewAccessToken:!!f.accessToken,hasNewRefreshToken:!!f.refreshToken,expiresIn:f.expiresIn}),{accessToken:f.accessToken,refreshToken:f.refreshToken||a,expiresIn:f.expiresIn}}catch(c){let a=c?.status;if(d?.error?.("TOKEN_REFRESH",`Qoder device refresh failed (${b})`,{error:c?.message||String(c),status:a}),401===a||403===a)return{error:"invalid_grant",message:c?.message||"Qoder refresh rejected"};return null}},d):null}async function K(a,b){return a?m("frontier-for-all",a,async()=>{try{let c=await fetch(j.NA["frontier-for-all"].token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:i.xq["frontier-for-all"].clientId})});if(!c.ok){let a=await c.text().catch(()=>""),d=x(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Frontier refresh token rotated or revoked. Re-login required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Frontier token",{status:c.status,error:a}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Frontier token",{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||a,expiresIn:d.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Frontier token: ${a.message}`),null}},b):null}async function L(a,b){return a?m("cursor",a,async()=>{try{let c=await new h().refreshToken(a);return b?.info?.("TOKEN_REFRESH","Successfully refreshed Cursor token",{hasNewAccessToken:!!c.accessToken,hasNewRefreshToken:!!c.refreshToken,expiresIn:c.expiresIn}),c}catch(a){return b?.warn?.("TOKEN_REFRESH",`Cursor refresh failed: ${a?.message||a}`),null}},b):null}},98976:(a,b,c)=>{c.d(b,{Dz:()=>i,Vq:()=>l,fp:()=>j});var d=c(44855),e=c(15251);let f=e.sr.codex?.maxRefreshAgeMs,g=new Map;function h(a){if(null==a||""===a)return null;if("number"==typeof a)return a<1e12?1e3*a:a;let b=new Date(a).getTime();return Number.isFinite(b)?b:null}function i(a,b=Date.now()){let c=h(a?.expiresAt??a?.tokenExpiresAt);if(null!==c)return c;let d=a?.expiresIn;return"number"==typeof d&&d>0?b+1e3*d:null}function j(a,b,c=Date.now()){if(!b)return!1;let g=i(b);if(null!==g&&g-c<(0,d.Og)(a))return!0;let k=e.sr[a]?.maxRefreshAgeMs;return!!(k&&b.refreshToken&&function(a,b=Date.now(),c=f){let d=h(a?.lastRefreshAt??a?.lastRefresh??a?.providerSpecificData?.lastRefreshAt);return!d||b-d>=c}(b,c,k))}async function k(a,b,c){let d,e=(d=b?.connectionId||b?.id||b?.email||b?.name||b?.refreshToken?.slice?.(-16)||"default",`${a}:${d}`),f=g.get(e);if(f)return f;let h=Promise.resolve().then(c).finally(()=>{g.delete(e)});return g.set(e,h),h}async function l(a,b,c){return b?k(a,b,async()=>{let f=await (0,d.$B)(a,b,c);return function(a,b,c,f=Date.now()){var g,h;if(!c)return null;if((0,d.jT)(c))return c;let i={},j=new Date(f).toISOString();c.accessToken&&(i.accessToken=c.accessToken),c.apiKey&&(i.apiKey=c.apiKey),c.token&&(i.token=c.token);let k=c.refreshToken??b?.refreshToken;k&&(i.refreshToken=k);let l=c.idToken??b?.idToken;return l&&(i.idToken=l),c.expiresIn?(i.expiresIn=c.expiresIn,i.expiresAt=function(a,b=Date.now()){return a?new Date(b+1e3*a).toISOString():null}(c.expiresIn,f)):c.expiresAt&&(i.expiresAt=c.expiresAt),c.projectId&&(i.projectId=c.projectId),c.providerSpecificData&&(g=b?.providerSpecificData,i.providerSpecificData=(h=c.providerSpecificData)&&"object"==typeof h?{...g||{},...h}:g),c.copilotToken&&(i.copilotToken=c.copilotToken),c.copilotTokenExpiresAt&&(i.copilotTokenExpiresAt=c.copilotTokenExpiresAt),(e.sr[a]?.trackRefreshAt||i.accessToken||i.apiKey||i.token||i.refreshToken||i.copilotToken)&&(i.lastRefreshAt=c.lastRefreshAt||j),i}(a,b,f)}):null}}};
@@ -1 +1 @@
1
- exports.id=9043,exports.ids=[9043,9718],exports.modules={30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rabbi696/ezrouter",installCmd:"npm i -g @rabbi696/ezrouter",installCmdLatest:"npm i -g @rabbi696/ezrouter@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:20126},h={maxLines:200,pollIntervalMs:1e3,streamTimeoutMs:5e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingInactiveSession:!0,inactiveMinPingIntervalMs:18e6,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},38238:(a,b,c)=>{"use strict";c.d(b,{P:()=>h});var d=c(89718),e=c(30869),f=c(54603);async function g(a=null){let b=null;try{let a=await (0,d.PX)();b=a.find(a=>!1!==a.isActive)?.key||null}catch{}let c={"Content-Type":"application/json"};return b&&(c.Authorization=`Bearer ${b}`),c["x-9r-cli-token"]=await (0,f.Xj)("9r-cli-auth"),a&&(c["x-9r-connection-id"]=a),c}async function h(a,b="llm",c=`http://127.0.0.1:${process.env.PORT||e.h0.appPort}`,d=null){let f,i=d&&"object"==typeof d,j=i?d.customPrompt:d,k=i?d.connectionId:null,l=i&&"number"==typeof d.timeoutMs?d.timeoutMs:6e4,m=await g(k),n=Date.now();if("embedding"===b){let b,d="string"==typeof j&&j.trim()?j.trim():"test";try{b=await fetch(`${c}/api/v1/embeddings`,{method:"POST",headers:m,body:JSON.stringify({model:a,input:d}),signal:AbortSignal.timeout(l)})}catch(b){let a=Date.now()-n;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(l/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"Embedding request failed"}}let e=Date.now()-n,f=await b.text().catch(()=>""),g=null;try{g=f?JSON.parse(f):null}catch{}if(!b.ok){let a=g?.error?.message||g?.error||f;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(g?.data)&&g.data.length>0&&Array.isArray(g.data[0]?.embedding)?{ok:!0,latencyMs:e,error:null,status:b.status,preview:`Embedding [${g.data[0].embedding.length} dims]`}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no embedding data"}}if("image"===b){let b,d="string"==typeof j&&j.trim()?j.trim():"test";try{b=await fetch(`${c}/api/v1/images/generations`,{method:"POST",headers:m,body:JSON.stringify({model:a,prompt:d}),signal:AbortSignal.timeout(l)})}catch(b){let a=Date.now()-n;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(l/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"Image generation request failed"}}let e=Date.now()-n,f=await b.text().catch(()=>""),g=null;try{g=f?JSON.parse(f):null}catch{}if(!b.ok){let a=g?.error?.message||g?.msg||g?.message||g?.error||f;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(g?.data)&&g.data.length>0?{ok:!0,latencyMs:e,error:null,status:b.status,preview:"Image generated successfully"}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no image data for this model"}}if("stt"===b){let b,d,e,f,g,h=new FormData,i=(f=new DataView(e=new ArrayBuffer(44+(d=2*Math.max(1,Math.floor(4e3))))),(g=(a,b)=>{for(let c=0;c<b.length;c+=1)f.setUint8(a+c,b.charCodeAt(c))})(0,"RIFF"),f.setUint32(4,36+d,!0),g(8,"WAVE"),g(12,"fmt "),f.setUint32(16,16,!0),f.setUint16(20,1,!0),f.setUint16(22,1,!0),f.setUint32(24,16e3,!0),f.setUint32(28,32e3,!0),f.setUint16(32,2,!0),f.setUint16(34,16,!0),g(36,"data"),f.setUint32(40,d,!0),new Blob([e],{type:"audio/wav"}));h.append("file",i,"test.wav"),h.append("model",a);try{b=await fetch(`${c}/api/v1/audio/transcriptions`,{method:"POST",headers:Object.fromEntries(Object.entries(m).filter(([a])=>"content-type"!==a.toLowerCase())),body:h,signal:AbortSignal.timeout(l)})}catch(b){let a=Date.now()-n;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(l/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"STT request failed"}}let j=Date.now()-n,k=await b.text().catch(()=>""),o=null;try{o=k?JSON.parse(k):null}catch{}if(!b.ok){let a=o?.error?.message||o?.msg||o?.message||o?.error||k;return{ok:!1,latencyMs:j,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}let p="string"==typeof o?.text?o.text:"";return p.trim()?{ok:!0,latencyMs:j,error:null,status:b.status,preview:p}:{ok:!1,latencyMs:j,status:b.status,error:"Provider returned no transcription text for this model"}}let o="string"==typeof j&&j.trim()?j.trim():"hi";try{f=await fetch(`${c}/api/v1/chat/completions`,{method:"POST",headers:m,body:JSON.stringify({model:a,max_tokens:1024,stream:!1,messages:[{role:"user",content:o}]}),signal:AbortSignal.timeout(l)})}catch(b){let a=Date.now()-n;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(l/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"Chat completion request failed"}}let p=Date.now()-n,q=await f.text().catch(()=>""),r=null;try{r=q?JSON.parse(q):null}catch{}if(!f.ok){let a=r?.error?.message||r?.msg||r?.message||r?.error||q;return{ok:!1,latencyMs:p,error:`HTTP ${f.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:f.status}}let s=r?.status,t=r?.msg||r?.message;if(null!=s&&"200"!==String(s)&&"0"!==String(s)&&t)return{ok:!1,latencyMs:p,status:f.status,error:`Provider status ${s}: ${String(t).slice(0,240)}`};if(r?.error){let a=r?.error?.message||r?.error||"Provider returned an error";return{ok:!1,latencyMs:p,status:f.status,error:String(a).slice(0,240)}}let u=Array.isArray(r?.choices)&&r.choices.length>0,v=r?.choices?.[0]||{},w=v.message?.reasoning||v.message?.reasoning_content||v.message?.thinking||v.message?.thinking_content,x=!String(v.message?.content||"").trim();if(u&&"length"===v.finish_reason&&x&&w)return{ok:!0,latencyMs:p,error:null,status:f.status,note:"reasoning-only response (length-limited)"};if(!u)return{ok:!1,latencyMs:p,status:f.status,error:"Provider returned no completion choices for this model"};let y=r?.choices?.[0]?.message?.content||r?.choices?.[0]?.text||null;return{ok:!0,latencyMs:p,error:null,status:f.status,preview:y}}},39006:a=>{"use strict";a.exports={rE:"0.5.98"}},54603:(a,b,c)=>{"use strict";c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(49120);let l=h().join(k.n,"machine-id"),m=h().join(k.n,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.n,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="9r-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}},60290:(a,b,c)=>{"use strict";c.d(b,{C8:()=>t,DR:()=>s,IK:()=>m,Ps:()=>h,Qn:()=>q,SA:()=>p,UH:()=>k,Uc:()=>n,Ur:()=>g,Z1:()=>j,cI:()=>r,eo:()=>o,gx:()=>d,pH:()=>l,v1:()=>e,xM:()=>i}),c(87252);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,PAYLOAD_TOO_LARGE:413,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,sessionAffinityMaxSize:5e3,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20};function f(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}function g(){return{firstActionTimeoutMs:f("COMBO_RESPONSE_FIRST_ACTION_TIMEOUT_MS",5e3),maxBytes:f("COMBO_RESPONSE_PREFLIGHT_MAX_BYTES",65536)}}let h=process.env.SEARXNG_URL?.trim()||"http://localhost:8888/search",i=f("STREAM_STALL_TIMEOUT_MS",36e4),j=f("STREAM_FIRST_CHUNK_TIMEOUT_MS",3e4),k=(()=>{let a=process.env.SSE_KEEPALIVE_MS;if(null==a||""===a)return 1e4;let b=parseInt(a,10);return Number.isFinite(b)&&b>=0?b:1e4})(),l=f("FETCH_CONNECT_TIMEOUT_MS",6e4);f("RESPONSE_BODY_TIMEOUT_MS",3e5);let m=f("GEMINI_NATIVE_TTS_FETCH_TIMEOUT_MS",45e3),n=64e3,o=32e3,p="x-9router-token-saver",q={maxTokenLength:160,maxAttempts:32,headers:{requestedModel:"X-9Router-Requested-Model",routePath:"X-9Router-Route-Path",resolvedProvider:"X-9Router-Resolved-Provider",resolvedModel:"X-9Router-Resolved-Model",fallbackCount:"X-9Router-Fallback-Count",attemptedModels:"X-9Router-Attempted-Models"}},r={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function s(a){return null==a?{attempts:0,delayMs:2e3}:"number"==typeof a?{attempts:a,delayMs:2e3}:{attempts:a.attempts||0,delayMs:null!=a.delayMs?a.delayMs:2e3}}let t=["Please write a 5-10 word title for the following conversation:"]},78335:()=>{},87252:(a,b,c)=>{"use strict";c.d(b,{Dp:()=>g,EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i});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:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},413:{type:"invalid_request_error",code:"context_length_exceeded"},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:"You exceeded your current quota",404:"Model not found",406:"Model not supported",413:"Your input exceeds the context window of this model",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:18e5,maxLevel:15},g=42e4,h=26784e5,i=[{text:"monthly_request_count",cooldownMs:216e5},{text:"monthly limit",cooldownMs:216e5},{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{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:413,fallback:!1},{status:429,backoff:!0}]},89718:(a,b,c)=>{"use strict";c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,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,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mV:()=>d.mV,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,y7:()=>d.y7,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(5129)},96487:()=>{}};
1
+ exports.id=9043,exports.ids=[290,9043,9718],exports.modules={30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rabbi696/ezrouter",installCmd:"npm i -g @rabbi696/ezrouter",installCmdLatest:"npm i -g @rabbi696/ezrouter@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:20126},h={maxLines:200,pollIntervalMs:1e3,streamTimeoutMs:5e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingInactiveSession:!0,inactiveMinPingIntervalMs:18e6,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},38238:(a,b,c)=>{"use strict";c.d(b,{P:()=>h});var d=c(89718),e=c(30869),f=c(54603);async function g(a=null){let b=null;try{let a=await (0,d.PX)();b=a.find(a=>!1!==a.isActive)?.key||null}catch{}let c={"Content-Type":"application/json"};return b&&(c.Authorization=`Bearer ${b}`),c["x-9r-cli-token"]=await (0,f.Xj)("9r-cli-auth"),a&&(c["x-9r-connection-id"]=a),c}async function h(a,b="llm",c=`http://127.0.0.1:${process.env.PORT||e.h0.appPort}`,d=null){let f,i=d&&"object"==typeof d,j=i?d.customPrompt:d,k=i?d.connectionId:null,l=i&&"number"==typeof d.timeoutMs?d.timeoutMs:6e4,m=await g(k),n=Date.now();if("embedding"===b){let b,d="string"==typeof j&&j.trim()?j.trim():"test";try{b=await fetch(`${c}/api/v1/embeddings`,{method:"POST",headers:m,body:JSON.stringify({model:a,input:d}),signal:AbortSignal.timeout(l)})}catch(b){let a=Date.now()-n;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(l/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"Embedding request failed"}}let e=Date.now()-n,f=await b.text().catch(()=>""),g=null;try{g=f?JSON.parse(f):null}catch{}if(!b.ok){let a=g?.error?.message||g?.error||f;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(g?.data)&&g.data.length>0&&Array.isArray(g.data[0]?.embedding)?{ok:!0,latencyMs:e,error:null,status:b.status,preview:`Embedding [${g.data[0].embedding.length} dims]`}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no embedding data"}}if("image"===b){let b,d="string"==typeof j&&j.trim()?j.trim():"test";try{b=await fetch(`${c}/api/v1/images/generations`,{method:"POST",headers:m,body:JSON.stringify({model:a,prompt:d}),signal:AbortSignal.timeout(l)})}catch(b){let a=Date.now()-n;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(l/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"Image generation request failed"}}let e=Date.now()-n,f=await b.text().catch(()=>""),g=null;try{g=f?JSON.parse(f):null}catch{}if(!b.ok){let a=g?.error?.message||g?.msg||g?.message||g?.error||f;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(g?.data)&&g.data.length>0?{ok:!0,latencyMs:e,error:null,status:b.status,preview:"Image generated successfully"}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no image data for this model"}}if("stt"===b){let b,d,e,f,g,h=new FormData,i=(f=new DataView(e=new ArrayBuffer(44+(d=2*Math.max(1,Math.floor(4e3))))),(g=(a,b)=>{for(let c=0;c<b.length;c+=1)f.setUint8(a+c,b.charCodeAt(c))})(0,"RIFF"),f.setUint32(4,36+d,!0),g(8,"WAVE"),g(12,"fmt "),f.setUint32(16,16,!0),f.setUint16(20,1,!0),f.setUint16(22,1,!0),f.setUint32(24,16e3,!0),f.setUint32(28,32e3,!0),f.setUint16(32,2,!0),f.setUint16(34,16,!0),g(36,"data"),f.setUint32(40,d,!0),new Blob([e],{type:"audio/wav"}));h.append("file",i,"test.wav"),h.append("model",a);try{b=await fetch(`${c}/api/v1/audio/transcriptions`,{method:"POST",headers:Object.fromEntries(Object.entries(m).filter(([a])=>"content-type"!==a.toLowerCase())),body:h,signal:AbortSignal.timeout(l)})}catch(b){let a=Date.now()-n;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(l/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"STT request failed"}}let j=Date.now()-n,k=await b.text().catch(()=>""),o=null;try{o=k?JSON.parse(k):null}catch{}if(!b.ok){let a=o?.error?.message||o?.msg||o?.message||o?.error||k;return{ok:!1,latencyMs:j,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}let p="string"==typeof o?.text?o.text:"";return p.trim()?{ok:!0,latencyMs:j,error:null,status:b.status,preview:p}:{ok:!1,latencyMs:j,status:b.status,error:"Provider returned no transcription text for this model"}}let o="string"==typeof j&&j.trim()?j.trim():"hi";try{f=await fetch(`${c}/api/v1/chat/completions`,{method:"POST",headers:m,body:JSON.stringify({model:a,max_tokens:1024,stream:!1,messages:[{role:"user",content:o}]}),signal:AbortSignal.timeout(l)})}catch(b){let a=Date.now()-n;if("TimeoutError"===b.name||"AbortError"===b.name)return{ok:!1,latencyMs:a,status:504,error:`HTTP 504: Request timed out (${Math.round(l/1e3)}s)`};return{ok:!1,latencyMs:a,status:500,error:b.message||"Chat completion request failed"}}let p=Date.now()-n,q=await f.text().catch(()=>""),r=null;try{r=q?JSON.parse(q):null}catch{}if(!f.ok){let a=r?.error?.message||r?.msg||r?.message||r?.error||q;return{ok:!1,latencyMs:p,error:`HTTP ${f.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:f.status}}let s=r?.status,t=r?.msg||r?.message;if(null!=s&&"200"!==String(s)&&"0"!==String(s)&&t)return{ok:!1,latencyMs:p,status:f.status,error:`Provider status ${s}: ${String(t).slice(0,240)}`};if(r?.error){let a=r?.error?.message||r?.error||"Provider returned an error";return{ok:!1,latencyMs:p,status:f.status,error:String(a).slice(0,240)}}let u=Array.isArray(r?.choices)&&r.choices.length>0,v=r?.choices?.[0]||{},w=v.message?.reasoning||v.message?.reasoning_content||v.message?.thinking||v.message?.thinking_content,x=!String(v.message?.content||"").trim();if(u&&"length"===v.finish_reason&&x&&w)return{ok:!0,latencyMs:p,error:null,status:f.status,note:"reasoning-only response (length-limited)"};if(!u)return{ok:!1,latencyMs:p,status:f.status,error:"Provider returned no completion choices for this model"};let y=r?.choices?.[0]?.message?.content||r?.choices?.[0]?.text||null;return{ok:!0,latencyMs:p,error:null,status:f.status,preview:y}}},39006:a=>{"use strict";a.exports={rE:"0.6.0"}},54603:(a,b,c)=>{"use strict";c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(49120);let l=h().join(k.n,"machine-id"),m=h().join(k.n,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.n,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="9r-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}},60290:(a,b,c)=>{"use strict";c.d(b,{C8:()=>t,DR:()=>s,IK:()=>m,Ps:()=>h,Qn:()=>q,SA:()=>p,UH:()=>k,Uc:()=>n,Ur:()=>g,Z1:()=>j,cI:()=>r,eo:()=>o,gx:()=>d,pH:()=>l,v1:()=>e,xM:()=>i}),c(87252);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,PAYLOAD_TOO_LARGE:413,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,sessionAffinityMaxSize:5e3,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20};function f(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}function g(){return{firstActionTimeoutMs:f("COMBO_RESPONSE_FIRST_ACTION_TIMEOUT_MS",5e3),maxBytes:f("COMBO_RESPONSE_PREFLIGHT_MAX_BYTES",65536)}}let h=process.env.SEARXNG_URL?.trim()||"http://localhost:8888/search",i=f("STREAM_STALL_TIMEOUT_MS",36e4),j=f("STREAM_FIRST_CHUNK_TIMEOUT_MS",3e4),k=(()=>{let a=process.env.SSE_KEEPALIVE_MS;if(null==a||""===a)return 1e4;let b=parseInt(a,10);return Number.isFinite(b)&&b>=0?b:1e4})(),l=f("FETCH_CONNECT_TIMEOUT_MS",6e4);f("RESPONSE_BODY_TIMEOUT_MS",3e5);let m=f("GEMINI_NATIVE_TTS_FETCH_TIMEOUT_MS",45e3),n=64e3,o=32e3,p="x-9router-token-saver",q={maxTokenLength:160,maxAttempts:32,headers:{requestedModel:"X-9Router-Requested-Model",routePath:"X-9Router-Route-Path",resolvedProvider:"X-9Router-Resolved-Provider",resolvedModel:"X-9Router-Resolved-Model",fallbackCount:"X-9Router-Fallback-Count",attemptedModels:"X-9Router-Attempted-Models"}},r={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function s(a){return null==a?{attempts:0,delayMs:2e3}:"number"==typeof a?{attempts:a,delayMs:2e3}:{attempts:a.attempts||0,delayMs:null!=a.delayMs?a.delayMs:2e3}}let t=["Please write a 5-10 word title for the following conversation:"]},78335:()=>{},87252:(a,b,c)=>{"use strict";c.d(b,{Dp:()=>g,EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i});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:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},413:{type:"invalid_request_error",code:"context_length_exceeded"},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:"You exceeded your current quota",404:"Model not found",406:"Model not supported",413:"Your input exceeds the context window of this model",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:18e5,maxLevel:15},g=42e4,h=26784e5,i=[{text:"monthly_request_count",cooldownMs:216e5},{text:"monthly limit",cooldownMs:216e5},{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{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:413,fallback:!1},{status:429,backoff:!0}]},89718:(a,b,c)=>{"use strict";c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,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,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mV:()=>d.mV,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,y7:()=>d.y7,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(5129)},96487:()=>{}};
@@ -1 +1 @@
1
- "use strict";exports.id=9217,exports.ids=[9217],exports.modules={9217:(a,b,c)=>{c.d(b,{exchangeTokens:()=>p,fetchKiroProfileArn:()=>l}),c(58901);var d=c(55511),e=c.n(d);c(25467);var f=c(13073),g=c(25482);function h(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}function i(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=(4-a.length%4)%4,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}}function j(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=(4-c.length%4)%4,e=c+"=".repeat(d);return JSON.parse(Buffer.from(e,"base64").toString("utf8"))}catch{return null}}function k(a){let b=j(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function l(a){if(!a)return null;try{let b=await fetch("https://codewhisperer.us-east-1.amazonaws.com/ListAvailableProfiles",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({maxResults:10})});if(!b.ok)return null;let c=await b.json();return c.profiles?.find(a=>a.arn?.trim())?.arn?.trim()||null}catch{return null}}let m=null;async function n(){if(m)return m;try{let a=await fetch(g.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return m={authorizeUrl:h(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:h(b.token_endpoint,"token_endpoint")}}}catch{}return m={authorizeUrl:g.oT.authorizeUrl,tokenUrl:g.oT.tokenUrl}}let o={claude:{config:f.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:f.DI,flowType:"authorization_code_pkce",fixedPort:f.DI.fixedPort,callbackPath:f.DI.callbackPath,buildAuthUrl:(a,b,c,d)=>{let e=Object.entries({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}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${e}`},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=function(a){let b=j(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}}(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||k(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}},xai:{config:g.oT,flowType:"authorization_code_pkce",fixedPort:g.oT.loopbackPort,callbackPath:g.oT.callbackPath,pkceVerifierBytes:g.Ue,prepareConfig:async a=>{let b=await n();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let f=e().randomBytes(16).toString("hex"),g=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c,nonce:f,plan:"generic",referrer:"cli-proxy-api"}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${g}`},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=i(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}},"grok-cli":{config:f.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{c={error:"invalid_response",error_description:await d.text()}}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=i(a.id_token)||k(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,f=a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null;return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:f,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}}}},"frontier-for-all":{config:f.V1,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.scope})});if(!b.ok){let a=await b.text();throw Error(`Frontier device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.deviceTokenUrl||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",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}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(f.V1.modelsUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json"}});if(b.ok){let a=await b.json();return{model:a?.data?.[0]||null}}}catch{}return{model:null}},mapTokens:(a,b)=>{let c=b?.model||null,d=c?.frontier||{};return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null,scope:a.scope,displayName:c?.id?`Frontier — ${c.id}`:void 0,providerSpecificData:{authMethod:"device_code",resolvedModel:c?.id||null,upstreamProvider:d.provider||null,eligible:d.eligible??null}}}},"gemini-cli":{config:f.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(`${f.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,f.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:f.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={Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","User-Agent":f.YT.loadCodeAssistUserAgent,"X-Goog-Api-Client":f.YT.loadCodeAssistApiClient,"Client-Metadata":f.YT.loadCodeAssistClientMetadata,"x-request-source":"local"},c=(0,f.cD)(),d=await fetch(`${f.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"}}),e=d.ok?await d.json():{},g="",h="legacy-tier";try{let a=await fetch(f.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c})});if(a.ok){let b=await a.json();if(g=b.cloudaicompanionProject?.id||b.cloudaicompanionProject||"",Array.isArray(b.allowedTiers)){for(let a of b.allowedTiers)if(a.isDefault&&a.id){h=a.id.trim();break}}}}catch(a){console.log("Failed to load code assist:",a)}return g&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(f.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:h,metadata:c})});if(a.ok){let b=await a.json();if(!0===b.done)break}}catch(a){break}await new Promise(a=>setTimeout(a,5e3))}})().catch(()=>{}),{userInfo:e,projectId:g}},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:f.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(`${f.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:f.hF,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(5345).then(c.bind(c,37726)),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(5345).then(c.bind(c,37726)),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.max(86400,Math.floor((f.expireTime-Date.now())/1e3));return{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:l,_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:f.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:f.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(a){c={error:"invalid_response",error_description:await d.text()}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(f.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":f.Nu.apiVersion,"User-Agent":f.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(f.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":f.Nu.apiVersion,"User-Agent":f.Nu.userAgent}});return{copilotToken:c,userInfo:d.ok?await d.json():{}}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,name:b?.userInfo?.login||b?.userInfo?.name,displayName:b?.userInfo?.name||b?.userInfo?.login,email:b?.userInfo?.email||null,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:f.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,f.S6)(d);let e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,g="idc"===c.authMethod?"idc":"builder-id",h=`https://oidc.${d}.amazonaws.com/client/register`,i=`https://oidc.${d}.amazonaws.com/device_authorization`,j=await fetch(h,{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(!j.ok){let a=await j.text();throw Error(`Client registration failed: ${a}`)}let k=await j.json(),l=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:k.clientId,clientSecret:k.clientSecret,startUrl:e})});if(!l.ok){let a=await l.text();throw Error(`Device authorization failed: ${a}`)}let m=await l.json();return{device_code:m.deviceCode,user_code:m.userCode,verification_uri:m.verificationUri,verification_uri_complete:m.verificationUriComplete,expires_in:m.expiresIn,interval:m.interval||5,_clientId:k.clientId,_clientSecret:k.clientSecret,_region:d,_authMethod:g,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,g=d?._region||"us-east-1";(0,f.S6)(g);let h=`https://oidc.${g}.amazonaws.com/token`,i=await fetch(h,{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 i.json()}catch(a){e={error:"invalid_response",error_description:await i.text()}}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=k(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||f.Tx.startUrl}}}},cursor:{config:f.WN,flowType:"authorization_code_pkce",buildAuthUrl:()=>null,mapTokens:a=>a},kimi:{config:f.aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,10793)),d=e().randomUUID(),f={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...b(d)},g=await fetch(a.deviceCodeUrl,{method:"POST",headers:f,body:new URLSearchParams({client_id:a.clientId})});if(!g.ok){let a=await g.text();throw Error(`Device code request failed: ${a}`)}let h=await g.json(),i=a.authorizeDeviceUrl||"https://www.kimi.com/code/authorize_device";return{device_code:h.device_code,user_code:h.user_code,verification_uri:h.verification_uri||i,verification_uri_complete:h.verification_uri_complete||`${i}?user_code=${h.user_code}`,expires_in:h.expires_in,interval:h.interval||5,_kimiDeviceId:d}},pollToken:async(a,b,d,e)=>{let f,{buildKimiHeaders:g}=await Promise.resolve().then(c.bind(c,10793)),h=e?._kimiDeviceId,i={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...g(h)},j=await fetch(a.tokenUrl,{method:"POST",headers:i,body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{f=await j.json()}catch{f={error:"invalid_response",error_description:"non-json token response"}}return"authorization_pending"===f.error||"slow_down"===f.error?{ok:!0,data:f}:(f.access_token&&h&&(f._kimiDeviceId=h),{ok:j.ok||!!f.access_token||!!f.error,data:f})},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{authMethod:"device_code",...a._kimiDeviceId?{deviceId:a._kimiDeviceId}:{}}})},kilocode:{config:f.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:f.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:f.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(f){let d=await fetch(a.tokenUrl,{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(`ClinePass 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}})},gitlab:{config:f.f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=new URLSearchParams({client_id:e.clientId||"",redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${g.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-cn":{config:f.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":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"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=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})},kimchi:{config:f.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}}}}};async function p(a,b,c,d,e,f){let g=function(a){let b=o["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}(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)}}};
1
+ "use strict";exports.id=9217,exports.ids=[9217],exports.modules={9217:(a,b,c)=>{c.d(b,{exchangeTokens:()=>p,fetchKiroProfileArn:()=>l}),c(96975);var d=c(55511),e=c.n(d);c(25467);var f=c(13073),g=c(25482);function h(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}function i(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=(4-a.length%4)%4,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}}function j(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=(4-c.length%4)%4,e=c+"=".repeat(d);return JSON.parse(Buffer.from(e,"base64").toString("utf8"))}catch{return null}}function k(a){let b=j(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function l(a){if(!a)return null;try{let b=await fetch("https://codewhisperer.us-east-1.amazonaws.com/ListAvailableProfiles",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({maxResults:10})});if(!b.ok)return null;let c=await b.json();return c.profiles?.find(a=>a.arn?.trim())?.arn?.trim()||null}catch{return null}}let m=null;async function n(){if(m)return m;try{let a=await fetch(g.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return m={authorizeUrl:h(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:h(b.token_endpoint,"token_endpoint")}}}catch{}return m={authorizeUrl:g.oT.authorizeUrl,tokenUrl:g.oT.tokenUrl}}let o={claude:{config:f.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:f.DI,flowType:"authorization_code_pkce",fixedPort:f.DI.fixedPort,callbackPath:f.DI.callbackPath,buildAuthUrl:(a,b,c,d)=>{let e=Object.entries({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}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${e}`},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=function(a){let b=j(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}}(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||k(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}},xai:{config:g.oT,flowType:"authorization_code_pkce",fixedPort:g.oT.loopbackPort,callbackPath:g.oT.callbackPath,pkceVerifierBytes:g.Ue,prepareConfig:async a=>{let b=await n();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let f=e().randomBytes(16).toString("hex"),g=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c,nonce:f,plan:"generic",referrer:"cli-proxy-api"}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${g}`},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=i(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}},"grok-cli":{config:f.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{c={error:"invalid_response",error_description:await d.text()}}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=i(a.id_token)||k(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,f=a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null;return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:f,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}}}},"frontier-for-all":{config:f.V1,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.scope})});if(!b.ok){let a=await b.text();throw Error(`Frontier device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.deviceTokenUrl||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",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}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(f.V1.modelsUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json"}});if(b.ok){let a=await b.json();return{model:a?.data?.[0]||null}}}catch{}return{model:null}},mapTokens:(a,b)=>{let c=b?.model||null,d=c?.frontier||{};return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null,scope:a.scope,displayName:c?.id?`Frontier — ${c.id}`:void 0,providerSpecificData:{authMethod:"device_code",resolvedModel:c?.id||null,upstreamProvider:d.provider||null,eligible:d.eligible??null}}}},"gemini-cli":{config:f.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(`${f.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,f.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:f.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}),signal:AbortSignal.timeout(1e4)});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b={Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","User-Agent":f.YT.loadCodeAssistUserAgent,"X-Goog-Api-Client":f.YT.loadCodeAssistApiClient,"Client-Metadata":f.YT.loadCodeAssistClientMetadata,"x-request-source":"local"},c=(0,f.cD)(),d={};try{let b=await fetch(`${f.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"},signal:AbortSignal.timeout(5e3)});b.ok&&(d=await b.json())}catch(a){console.log("Failed to fetch user info:",a)}let e="",g="legacy-tier";try{let a=await fetch(f.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c}),signal:AbortSignal.timeout(5e3)});if(a.ok){let b=await a.json();if(e=b.cloudaicompanionProject?.id||b.cloudaicompanionProject||"",Array.isArray(b.allowedTiers)){for(let a of b.allowedTiers)if(a.isDefault&&a.id){g=a.id.trim();break}}}}catch(a){console.log("Failed to load code assist:",a)}return e&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(f.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:g,metadata:c})});if(a.ok){let b=await a.json();if(!0===b.done)break}}catch(a){break}await new Promise(a=>setTimeout(a,5e3))}})().catch(()=>{}),{userInfo:d,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:f.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(`${f.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:f.hF,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(5345).then(c.bind(c,37726)),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(5345).then(c.bind(c,37726)),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.max(86400,Math.floor((f.expireTime-Date.now())/1e3));return{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:l,_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:f.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:f.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(a){c={error:"invalid_response",error_description:await d.text()}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(f.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":f.Nu.apiVersion,"User-Agent":f.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(f.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":f.Nu.apiVersion,"User-Agent":f.Nu.userAgent}});return{copilotToken:c,userInfo:d.ok?await d.json():{}}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,name:b?.userInfo?.login||b?.userInfo?.name,displayName:b?.userInfo?.name||b?.userInfo?.login,email:b?.userInfo?.email||null,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:f.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,f.S6)(d);let e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,g="idc"===c.authMethod?"idc":"builder-id",h=`https://oidc.${d}.amazonaws.com/client/register`,i=`https://oidc.${d}.amazonaws.com/device_authorization`,j=await fetch(h,{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(!j.ok){let a=await j.text();throw Error(`Client registration failed: ${a}`)}let k=await j.json(),l=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:k.clientId,clientSecret:k.clientSecret,startUrl:e})});if(!l.ok){let a=await l.text();throw Error(`Device authorization failed: ${a}`)}let m=await l.json();return{device_code:m.deviceCode,user_code:m.userCode,verification_uri:m.verificationUri,verification_uri_complete:m.verificationUriComplete,expires_in:m.expiresIn,interval:m.interval||5,_clientId:k.clientId,_clientSecret:k.clientSecret,_region:d,_authMethod:g,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,g=d?._region||"us-east-1";(0,f.S6)(g);let h=`https://oidc.${g}.amazonaws.com/token`,i=await fetch(h,{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 i.json()}catch(a){e={error:"invalid_response",error_description:await i.text()}}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=k(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||f.Tx.startUrl}}}},cursor:{config:f.WN,flowType:"authorization_code_pkce",buildAuthUrl:()=>null,mapTokens:a=>a},kimi:{config:f.aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,10793)),d=e().randomUUID(),f={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...b(d)},g=await fetch(a.deviceCodeUrl,{method:"POST",headers:f,body:new URLSearchParams({client_id:a.clientId})});if(!g.ok){let a=await g.text();throw Error(`Device code request failed: ${a}`)}let h=await g.json(),i=a.authorizeDeviceUrl||"https://www.kimi.com/code/authorize_device";return{device_code:h.device_code,user_code:h.user_code,verification_uri:h.verification_uri||i,verification_uri_complete:h.verification_uri_complete||`${i}?user_code=${h.user_code}`,expires_in:h.expires_in,interval:h.interval||5,_kimiDeviceId:d}},pollToken:async(a,b,d,e)=>{let f,{buildKimiHeaders:g}=await Promise.resolve().then(c.bind(c,10793)),h=e?._kimiDeviceId,i={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...g(h)},j=await fetch(a.tokenUrl,{method:"POST",headers:i,body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{f=await j.json()}catch{f={error:"invalid_response",error_description:"non-json token response"}}return"authorization_pending"===f.error||"slow_down"===f.error?{ok:!0,data:f}:(f.access_token&&h&&(f._kimiDeviceId=h),{ok:j.ok||!!f.access_token||!!f.error,data:f})},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{authMethod:"device_code",...a._kimiDeviceId?{deviceId:a._kimiDeviceId}:{}}})},kilocode:{config:f.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:f.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:f.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(f){let d=await fetch(a.tokenUrl,{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(`ClinePass 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}})},gitlab:{config:f.f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=new URLSearchParams({client_id:e.clientId||"",redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${g.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-cn":{config:f.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":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"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=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})},kimchi:{config:f.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}}}}};async function p(a,b,c,d,e,f){let g=function(a){let b=o["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}(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)}}};