@techysy/10router 1.3.6 → 1.5.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 (1134) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +13 -11
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +5 -5
  5. package/app/.next-cli-build/react-loadable-manifest.json +1 -1
  6. package/app/.next-cli-build/routes-manifest.json +14 -0
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +11 -6
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  80. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  88. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/_not-found.html +2 -2
  91. package/app/.next-cli-build/server/app/_not-found.rsc +7 -7
  92. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +7 -7
  93. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +7 -7
  94. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
  95. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +2 -2
  110. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +2 -2
  112. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +2 -2
  114. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/status/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  120. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  122. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js +2 -2
  126. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +2 -2
  132. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  144. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +3 -3
  154. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  156. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  158. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  160. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/external-quota/[source]/route.js +1 -0
  166. package/app/.next-cli-build/server/app/api/external-quota/[source]/route.js.nft.json +1 -0
  167. package/app/.next-cli-build/server/app/api/external-quota/[source]/route_client-reference-manifest.js +1 -0
  168. package/app/.next-cli-build/server/app/api/gateway-probe/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/gateway-probe/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  195. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/models/caps/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/network/egress-region/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/network/egress-region/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  269. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  275. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  311. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  313. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  317. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  319. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  321. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  323. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  327. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  329. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  331. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  333. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/security/status/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/security/status/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/settings/route.js +2 -2
  345. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  353. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  375. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/usage/quotas/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/usage/quotas/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  401. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/rerank/route.js +1 -0
  427. package/app/.next-cli-build/server/app/api/v1/rerank/route.js.nft.json +1 -0
  428. package/app/.next-cli-build/server/app/api/v1/rerank/route_client-reference-manifest.js +1 -0
  429. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  449. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  450. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/version/route.js +2 -2
  454. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  455. package/app/.next-cli-build/server/app/api/version/shell-update/route.js +1 -1
  456. package/app/.next-cli-build/server/app/api/version/shell-update/route.js.nft.json +1 -1
  457. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  460. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  461. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  462. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  464. package/app/.next-cli-build/server/app/callback.html +2 -2
  465. package/app/.next-cli-build/server/app/callback.rsc +7 -7
  466. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +7 -7
  467. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -3
  468. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +7 -7
  469. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +2 -2
  470. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +9 -9
  471. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +9 -9
  472. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +9 -9
  473. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +3 -3
  474. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +2 -2
  475. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +9 -9
  476. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +9 -9
  477. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +9 -9
  478. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -3
  479. package/app/.next-cli-build/server/app/dashboard/combos.html +2 -2
  480. package/app/.next-cli-build/server/app/dashboard/combos.rsc +9 -9
  481. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +9 -9
  482. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +9 -9
  483. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -3
  484. package/app/.next-cli-build/server/app/dashboard/endpoint.html +2 -2
  485. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +9 -9
  486. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +9 -9
  487. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +9 -9
  488. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -3
  489. package/app/.next-cli-build/server/app/dashboard/experimental.html +2 -2
  490. package/app/.next-cli-build/server/app/dashboard/experimental.rsc +9 -9
  491. package/app/.next-cli-build/server/app/dashboard/experimental.segments/!KGRhc2hib2FyZCk/dashboard/experimental/__PAGE__.segment.rsc +9 -9
  492. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_full.segment.rsc +9 -9
  493. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_tree.segment.rsc +3 -3
  494. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +2 -2
  495. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +9 -9
  496. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +9 -9
  497. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +9 -9
  498. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +3 -3
  499. package/app/.next-cli-build/server/app/dashboard/mitm.html +2 -2
  500. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +9 -9
  501. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +9 -9
  502. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +9 -9
  503. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
  504. package/app/.next-cli-build/server/app/dashboard/profile.html +2 -2
  505. package/app/.next-cli-build/server/app/dashboard/profile.rsc +9 -9
  506. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +9 -9
  507. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +9 -9
  508. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -3
  509. package/app/.next-cli-build/server/app/dashboard/providers/new.html +2 -2
  510. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +9 -9
  511. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +9 -9
  512. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +9 -9
  513. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -3
  514. package/app/.next-cli-build/server/app/dashboard/providers.html +2 -2
  515. package/app/.next-cli-build/server/app/dashboard/providers.rsc +9 -9
  516. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +9 -9
  517. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +9 -9
  518. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -3
  519. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +2 -2
  520. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +9 -9
  521. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +9 -9
  522. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +9 -9
  523. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +3 -3
  524. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +2 -2
  525. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +9 -9
  526. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +9 -9
  527. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +9 -9
  528. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +3 -3
  529. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  530. package/app/.next-cli-build/server/app/dashboard/quota.rsc +10 -10
  531. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +10 -10
  532. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +10 -10
  533. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +3 -3
  534. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  536. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +2 -2
  538. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +8 -8
  539. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +8 -8
  540. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
  541. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +8 -8
  542. package/app/.next-cli-build/server/app/dashboard/skills.html +2 -2
  543. package/app/.next-cli-build/server/app/dashboard/skills.rsc +9 -9
  544. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +9 -9
  545. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +9 -9
  546. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +3 -3
  547. package/app/.next-cli-build/server/app/dashboard/token-saver.html +2 -2
  548. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +9 -9
  549. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +9 -9
  550. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +9 -9
  551. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +3 -3
  552. package/app/.next-cli-build/server/app/dashboard/translator.html +2 -2
  553. package/app/.next-cli-build/server/app/dashboard/translator.rsc +9 -9
  554. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +9 -9
  555. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +9 -9
  556. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -3
  557. package/app/.next-cli-build/server/app/dashboard/usage.html +2 -2
  558. package/app/.next-cli-build/server/app/dashboard/usage.rsc +9 -9
  559. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +9 -9
  560. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +9 -9
  561. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -3
  562. package/app/.next-cli-build/server/app/dashboard.html +2 -2
  563. package/app/.next-cli-build/server/app/dashboard.rsc +9 -9
  564. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +9 -9
  565. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +9 -9
  566. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
  567. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  568. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  569. package/app/.next-cli-build/server/app/index.html +1 -1
  570. package/app/.next-cli-build/server/app/index.rsc +7 -7
  571. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +7 -7
  572. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +7 -7
  573. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
  574. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  575. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  576. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  577. package/app/.next-cli-build/server/app/landing.html +2 -2
  578. package/app/.next-cli-build/server/app/landing.rsc +8 -8
  579. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +8 -8
  580. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -3
  581. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +8 -8
  582. package/app/.next-cli-build/server/app/login/page.js +1 -1
  583. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  584. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  585. package/app/.next-cli-build/server/app/login.html +2 -2
  586. package/app/.next-cli-build/server/app/login.rsc +8 -8
  587. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +8 -8
  588. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -3
  589. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +8 -8
  590. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  591. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  592. package/app/.next-cli-build/server/app/page.js +1 -1
  593. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  594. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  595. package/app/.next-cli-build/server/app-paths-manifest.json +13 -11
  596. package/app/.next-cli-build/server/chunks/1329.js +1 -1
  597. package/app/.next-cli-build/server/chunks/1345.js +1 -0
  598. package/app/.next-cli-build/server/chunks/1386.js +2 -2
  599. package/app/.next-cli-build/server/chunks/1806.js +1 -0
  600. package/app/.next-cli-build/server/chunks/2112.js +1 -1
  601. package/app/.next-cli-build/server/chunks/2557.js +9 -0
  602. package/app/.next-cli-build/server/chunks/2926.js +1 -1
  603. package/app/.next-cli-build/server/chunks/2960.js +1 -0
  604. package/app/.next-cli-build/server/chunks/{5330.js → 318.js} +5 -5
  605. package/app/.next-cli-build/server/chunks/3256.js +1 -1
  606. package/app/.next-cli-build/server/chunks/3433.js +13 -13
  607. package/app/.next-cli-build/server/chunks/3500.js +1 -1
  608. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  609. package/app/.next-cli-build/server/chunks/3593.js +2 -2
  610. package/app/.next-cli-build/server/chunks/3599.js +1 -0
  611. package/app/.next-cli-build/server/chunks/3662.js +1 -0
  612. package/app/.next-cli-build/server/chunks/3792.js +1 -1
  613. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  614. package/app/.next-cli-build/server/chunks/3962.js +1 -0
  615. package/app/.next-cli-build/server/chunks/4008.js +1 -1
  616. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  617. package/app/.next-cli-build/server/chunks/4613.js +1 -1
  618. package/app/.next-cli-build/server/chunks/4689.js +1 -1
  619. package/app/.next-cli-build/server/chunks/4692.js +6 -0
  620. package/app/.next-cli-build/server/chunks/4739.js +2 -2
  621. package/app/.next-cli-build/server/chunks/4775.js +1 -0
  622. package/app/.next-cli-build/server/chunks/4780.js +2 -2
  623. package/app/.next-cli-build/server/chunks/4803.js +2 -2
  624. package/app/.next-cli-build/server/chunks/4927.js +5 -5
  625. package/app/.next-cli-build/server/chunks/507.js +2 -2
  626. package/app/.next-cli-build/server/chunks/5210.js +10 -10
  627. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  628. package/app/.next-cli-build/server/chunks/539.js +1 -1
  629. package/app/.next-cli-build/server/chunks/5527.js +1 -0
  630. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  631. package/app/.next-cli-build/server/chunks/5757.js +1 -0
  632. package/app/.next-cli-build/server/chunks/5781.js +2 -2
  633. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  634. package/app/.next-cli-build/server/chunks/615.js +1 -1
  635. package/app/.next-cli-build/server/chunks/6252.js +2 -2
  636. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  637. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  638. package/app/.next-cli-build/server/chunks/6457.js +1 -1
  639. package/app/.next-cli-build/server/chunks/6492.js +1 -1
  640. package/app/.next-cli-build/server/chunks/6593.js +1 -0
  641. package/app/.next-cli-build/server/chunks/6756.js +1 -1
  642. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  643. package/app/.next-cli-build/server/chunks/6790.js +1 -0
  644. package/app/.next-cli-build/server/chunks/6877.js +1 -0
  645. package/app/.next-cli-build/server/chunks/6947.js +1 -1
  646. package/app/.next-cli-build/server/chunks/6960.js +3 -3
  647. package/app/.next-cli-build/server/chunks/698.js +2 -2
  648. package/app/.next-cli-build/server/chunks/7067.js +1 -1
  649. package/app/.next-cli-build/server/chunks/7122.js +1 -1
  650. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  651. package/app/.next-cli-build/server/chunks/7252.js +1 -0
  652. package/app/.next-cli-build/server/chunks/7274.js +6 -3
  653. package/app/.next-cli-build/server/chunks/7322.js +2 -2
  654. package/app/.next-cli-build/server/chunks/75.js +1 -0
  655. package/app/.next-cli-build/server/chunks/7828.js +1 -1
  656. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  657. package/app/.next-cli-build/server/chunks/8062.js +2 -2
  658. package/app/.next-cli-build/server/chunks/8145.js +1 -0
  659. package/app/.next-cli-build/server/chunks/8172.js +2 -2
  660. package/app/.next-cli-build/server/chunks/{7239.js → 8318.js} +2 -2
  661. package/app/.next-cli-build/server/chunks/8410.js +1 -1
  662. package/app/.next-cli-build/server/chunks/8439.js +1 -0
  663. package/app/.next-cli-build/server/chunks/8469.js +2 -2
  664. package/app/.next-cli-build/server/chunks/8499.js +3 -3
  665. package/app/.next-cli-build/server/chunks/8520.js +2 -2
  666. package/app/.next-cli-build/server/chunks/8595.js +1 -1
  667. package/app/.next-cli-build/server/chunks/8672.js +1 -1
  668. package/app/.next-cli-build/server/chunks/8689.js +1 -1
  669. package/app/.next-cli-build/server/chunks/8749.js +4 -4
  670. package/app/.next-cli-build/server/chunks/8775.js +1 -0
  671. package/app/.next-cli-build/server/chunks/8838.js +1 -1
  672. package/app/.next-cli-build/server/chunks/8895.js +9 -9
  673. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  674. package/app/.next-cli-build/server/chunks/8972.js +1 -0
  675. package/app/.next-cli-build/server/chunks/9046.js +1 -1
  676. package/app/.next-cli-build/server/chunks/9154.js +1 -1
  677. package/app/.next-cli-build/server/chunks/939.js +1 -1
  678. package/app/.next-cli-build/server/chunks/9417.js +6 -0
  679. package/app/.next-cli-build/server/chunks/9451.js +2 -2
  680. package/app/.next-cli-build/server/chunks/9489.js +2 -2
  681. package/app/.next-cli-build/server/chunks/9601.js +1 -0
  682. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  683. package/app/.next-cli-build/server/chunks/9628.js +1 -1
  684. package/app/.next-cli-build/server/chunks/976.js +2 -2
  685. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  686. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  687. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  688. package/app/.next-cli-build/server/middleware.js +6 -6
  689. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  690. package/app/.next-cli-build/server/pages/404.html +2 -2
  691. package/app/.next-cli-build/server/pages/500.html +1 -1
  692. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  693. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  694. package/app/.next-cli-build/static/XaFYXXaFDzpbuL3LNeL29/_buildManifest.js +1 -0
  695. package/app/.next-cli-build/static/chunks/1243-acdc1dcbfcd9336d.js +3 -0
  696. package/app/.next-cli-build/static/chunks/1321-4faa820be59413ff.js +1 -0
  697. package/app/.next-cli-build/static/chunks/5497-83c412e719fec386.js +7 -0
  698. package/app/.next-cli-build/static/chunks/6109-7d8788b228fed22f.js +1 -0
  699. package/app/.next-cli-build/static/chunks/{6808-7c2c0ea1ee14763c.js → 6808-b0b12958916efbd5.js} +1 -1
  700. package/app/.next-cli-build/static/chunks/{8720-f1b68ba6d347a434.js → 8720-a2aa5581184c3985.js} +1 -1
  701. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/experimental/page-19458cb592a41b79.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-2a679f53191d77f7.js → page-bce04d7851a6bf65.js} +12 -7
  703. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-bbde3be24400b162.js +14 -0
  704. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-ceb259d31ded818a.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-4db11950e50a00bf.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-cefb3cbfe469dd51.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/_global-error/page-a5b1358c4ce45a48.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-a5b1358c4ce45a48.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-a5b1358c4ce45a48.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-a5b1358c4ce45a48.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-a5b1358c4ce45a48.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-a5b1358c4ce45a48.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-a5b1358c4ce45a48.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-a5b1358c4ce45a48.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-a5b1358c4ce45a48.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-a5b1358c4ce45a48.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-a5b1358c4ce45a48.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-a5b1358c4ce45a48.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-a5b1358c4ce45a48.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-a5b1358c4ce45a48.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-a5b1358c4ce45a48.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-a5b1358c4ce45a48.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-profiles/route-a5b1358c4ce45a48.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-a5b1358c4ce45a48.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-a5b1358c4ce45a48.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-a5b1358c4ce45a48.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-a5b1358c4ce45a48.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-a5b1358c4ce45a48.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-a5b1358c4ce45a48.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-a5b1358c4ce45a48.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-a5b1358c4ce45a48.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-a5b1358c4ce45a48.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-a5b1358c4ce45a48.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-a5b1358c4ce45a48.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-a5b1358c4ce45a48.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-a5b1358c4ce45a48.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-a5b1358c4ce45a48.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-a5b1358c4ce45a48.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-a5b1358c4ce45a48.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-a5b1358c4ce45a48.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-a5b1358c4ce45a48.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/combos/route-a5b1358c4ce45a48.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/external-quota/[source]/route-a5b1358c4ce45a48.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/gateway-probe/route-a5b1358c4ce45a48.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-a5b1358c4ce45a48.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-a5b1358c4ce45a48.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-a5b1358c4ce45a48.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-a5b1358c4ce45a48.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-a5b1358c4ce45a48.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-a5b1358c4ce45a48.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/health/route-a5b1358c4ce45a48.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/init/route-a5b1358c4ce45a48.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-a5b1358c4ce45a48.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-a5b1358c4ce45a48.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/keys/route-a5b1358c4ce45a48.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/locale/route-a5b1358c4ce45a48.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-a5b1358c4ce45a48.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-a5b1358c4ce45a48.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-a5b1358c4ce45a48.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-a5b1358c4ce45a48.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-a5b1358c4ce45a48.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-a5b1358c4ce45a48.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-a5b1358c4ce45a48.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-a5b1358c4ce45a48.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-a5b1358c4ce45a48.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/models/caps/route-a5b1358c4ce45a48.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-a5b1358c4ce45a48.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-a5b1358c4ce45a48.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-a5b1358c4ce45a48.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/models/route-a5b1358c4ce45a48.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/models/test/route-a5b1358c4ce45a48.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-a5b1358c4ce45a48.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-a5b1358c4ce45a48.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-a5b1358c4ce45a48.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-a5b1358c4ce45a48.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-a5b1358c4ce45a48.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-a5b1358c4ce45a48.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-a5b1358c4ce45a48.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-a5b1358c4ce45a48.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-a5b1358c4ce45a48.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-a5b1358c4ce45a48.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-a5b1358c4ce45a48.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-a5b1358c4ce45a48.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-a5b1358c4ce45a48.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-a5b1358c4ce45a48.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-a5b1358c4ce45a48.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-a5b1358c4ce45a48.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-a5b1358c4ce45a48.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder/checkin/route-a5b1358c4ce45a48.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder-cn/checkin/route-a5b1358c4ce45a48.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-a5b1358c4ce45a48.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-a5b1358c4ce45a48.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-a5b1358c4ce45a48.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-a5b1358c4ce45a48.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-kill/route-a5b1358c4ce45a48.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-status/route-a5b1358c4ce45a48.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-a5b1358c4ce45a48.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-a5b1358c4ce45a48.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/pricing/route-a5b1358c4ce45a48.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-a5b1358c4ce45a48.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-a5b1358c4ce45a48.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-a5b1358c4ce45a48.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-a5b1358c4ce45a48.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-a5b1358c4ce45a48.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-a5b1358c4ce45a48.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-a5b1358c4ce45a48.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-a5b1358c4ce45a48.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-a5b1358c4ce45a48.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/providers/route-a5b1358c4ce45a48.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-a5b1358c4ce45a48.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-a5b1358c4ce45a48.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-a5b1358c4ce45a48.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-a5b1358c4ce45a48.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-a5b1358c4ce45a48.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-a5b1358c4ce45a48.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-a5b1358c4ce45a48.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-a5b1358c4ce45a48.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-a5b1358c4ce45a48.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-a5b1358c4ce45a48.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-a5b1358c4ce45a48.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-a5b1358c4ce45a48.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-a5b1358c4ce45a48.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-a5b1358c4ce45a48.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-a5b1358c4ce45a48.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-a5b1358c4ce45a48.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-a5b1358c4ce45a48.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/security/status/route-a5b1358c4ce45a48.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-a5b1358c4ce45a48.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-a5b1358c4ce45a48.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-a5b1358c4ce45a48.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-a5b1358c4ce45a48.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/settings/route-a5b1358c4ce45a48.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-a5b1358c4ce45a48.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/tags/route-a5b1358c4ce45a48.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-a5b1358c4ce45a48.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-a5b1358c4ce45a48.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-a5b1358c4ce45a48.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-a5b1358c4ce45a48.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-a5b1358c4ce45a48.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-a5b1358c4ce45a48.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-a5b1358c4ce45a48.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-a5b1358c4ce45a48.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-a5b1358c4ce45a48.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-a5b1358c4ce45a48.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-a5b1358c4ce45a48.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-a5b1358c4ce45a48.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-a5b1358c4ce45a48.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-a5b1358c4ce45a48.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-a5b1358c4ce45a48.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-a5b1358c4ce45a48.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-a5b1358c4ce45a48.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-a5b1358c4ce45a48.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-a5b1358c4ce45a48.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-a5b1358c4ce45a48.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-a5b1358c4ce45a48.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/usage/quotas/route-a5b1358c4ce45a48.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-a5b1358c4ce45a48.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-a5b1358c4ce45a48.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-a5b1358c4ce45a48.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-a5b1358c4ce45a48.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-a5b1358c4ce45a48.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-a5b1358c4ce45a48.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-a5b1358c4ce45a48.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-a5b1358c4ce45a48.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-a5b1358c4ce45a48.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-a5b1358c4ce45a48.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-a5b1358c4ce45a48.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-a5b1358c4ce45a48.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-a5b1358c4ce45a48.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-a5b1358c4ce45a48.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-a5b1358c4ce45a48.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-a5b1358c4ce45a48.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/v1/rerank/route-a5b1358c4ce45a48.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-a5b1358c4ce45a48.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-a5b1358c4ce45a48.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/v1/route-a5b1358c4ce45a48.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-a5b1358c4ce45a48.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-a5b1358c4ce45a48.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-a5b1358c4ce45a48.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-a5b1358c4ce45a48.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-a5b1358c4ce45a48.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-a5b1358c4ce45a48.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-a5b1358c4ce45a48.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-a5b1358c4ce45a48.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-a5b1358c4ce45a48.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/version/route-a5b1358c4ce45a48.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/version/shell-update/route-a5b1358c4ce45a48.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-a5b1358c4ce45a48.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/version/update/route-a5b1358c4ce45a48.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-227586f513028910.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/landing/page-38924391f8649361.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-a5b1358c4ce45a48.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/page-a5b1358c4ce45a48.js +1 -0
  894. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-a5b1358c4ce45a48.js +1 -0
  895. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-a5b1358c4ce45a48.js +1 -0
  896. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-a5b1358c4ce45a48.js +1 -0
  897. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-a5b1358c4ce45a48.js +1 -0
  898. package/app/.next-cli-build/static/chunks/{webpack-1adc95943fa90500.js → webpack-f1d5e73ffd2bfb73.js} +1 -1
  899. package/app/.next-cli-build/static/css/{7a3e1568f247f3d0.css → 50fcf2faa21a2f51.css} +1 -1
  900. package/app/.next-cli-build/static/css/c9904b0ff2f0d4da.css +1 -0
  901. package/app/custom-server.js +46 -0
  902. package/app/package.json +1 -1
  903. package/app/public/i18n/changelog/en.md +43 -3
  904. package/app/public/i18n/changelog/zh-CN.md +43 -3
  905. package/app/public/i18n/changelog/zh-TW.md +43 -3
  906. package/app/public/i18n/literals/zh-CN.json +45 -5
  907. package/app/public/i18n/literals/zh-TW.json +45 -5
  908. package/app/public/providers/codiv.png +0 -0
  909. package/app/public/providers/minimax-code-global.png +0 -0
  910. package/app/public/providers/minimax-code.png +0 -0
  911. package/app/public/providers/modelscope.png +0 -0
  912. package/app/public/providers/river.png +0 -0
  913. package/app/public/providers/thx.png +0 -0
  914. package/app/src/lib/db/adapters/sqljsAdapter.js +42 -9
  915. package/app/src/sse/services/backgroundTokenRefresh.js +7 -0
  916. package/app/src/sse/services/codebuddyCheckin.js +6 -0
  917. package/package.json +1 -1
  918. package/app/.next-cli-build/server/chunks/1159.js +0 -7
  919. package/app/.next-cli-build/server/chunks/1710.js +0 -6
  920. package/app/.next-cli-build/server/chunks/2120.js +0 -1
  921. package/app/.next-cli-build/server/chunks/2468.js +0 -1
  922. package/app/.next-cli-build/server/chunks/3245.js +0 -1
  923. package/app/.next-cli-build/server/chunks/3885.js +0 -1
  924. package/app/.next-cli-build/server/chunks/4177.js +0 -1
  925. package/app/.next-cli-build/server/chunks/4282.js +0 -1
  926. package/app/.next-cli-build/server/chunks/436.js +0 -1
  927. package/app/.next-cli-build/server/chunks/4746.js +0 -1
  928. package/app/.next-cli-build/server/chunks/480.js +0 -6
  929. package/app/.next-cli-build/server/chunks/4886.js +0 -1
  930. package/app/.next-cli-build/server/chunks/5485.js +0 -1
  931. package/app/.next-cli-build/server/chunks/653.js +0 -1
  932. package/app/.next-cli-build/server/chunks/682.js +0 -1
  933. package/app/.next-cli-build/server/chunks/6982.js +0 -1
  934. package/app/.next-cli-build/static/chunks/1243-25be5a7b0193949d.js +0 -3
  935. package/app/.next-cli-build/static/chunks/1321-7d951e8069135f2f.js +0 -1
  936. package/app/.next-cli-build/static/chunks/5497-dce0ac54d3e8f165.js +0 -7
  937. package/app/.next-cli-build/static/chunks/6109-c3fa41c974584a96.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/experimental/page-5ec2e868aa2ff281.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-21ddfd8a9e7d781f.js +0 -14
  940. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-96c6e23fdaedd167.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-ec96de061407f126.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-528e2bc2a1bb20da.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/_global-error/page-7a2b8ef7454a1a22.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-7a2b8ef7454a1a22.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-7a2b8ef7454a1a22.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-7a2b8ef7454a1a22.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-7a2b8ef7454a1a22.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-7a2b8ef7454a1a22.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-7a2b8ef7454a1a22.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-7a2b8ef7454a1a22.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-7a2b8ef7454a1a22.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-7a2b8ef7454a1a22.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-7a2b8ef7454a1a22.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-7a2b8ef7454a1a22.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-7a2b8ef7454a1a22.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-7a2b8ef7454a1a22.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-7a2b8ef7454a1a22.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-7a2b8ef7454a1a22.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-profiles/route-7a2b8ef7454a1a22.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-7a2b8ef7454a1a22.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-7a2b8ef7454a1a22.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-7a2b8ef7454a1a22.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-7a2b8ef7454a1a22.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-7a2b8ef7454a1a22.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-7a2b8ef7454a1a22.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-7a2b8ef7454a1a22.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-7a2b8ef7454a1a22.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-7a2b8ef7454a1a22.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-7a2b8ef7454a1a22.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-7a2b8ef7454a1a22.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-7a2b8ef7454a1a22.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-7a2b8ef7454a1a22.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-7a2b8ef7454a1a22.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-7a2b8ef7454a1a22.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-7a2b8ef7454a1a22.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-7a2b8ef7454a1a22.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-7a2b8ef7454a1a22.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/combos/route-7a2b8ef7454a1a22.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/gateway-probe/route-7a2b8ef7454a1a22.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-7a2b8ef7454a1a22.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-7a2b8ef7454a1a22.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-7a2b8ef7454a1a22.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-7a2b8ef7454a1a22.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-7a2b8ef7454a1a22.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-7a2b8ef7454a1a22.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/health/route-7a2b8ef7454a1a22.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/init/route-7a2b8ef7454a1a22.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-7a2b8ef7454a1a22.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-7a2b8ef7454a1a22.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/keys/route-7a2b8ef7454a1a22.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/locale/route-7a2b8ef7454a1a22.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-7a2b8ef7454a1a22.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-7a2b8ef7454a1a22.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-7a2b8ef7454a1a22.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-7a2b8ef7454a1a22.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-7a2b8ef7454a1a22.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-7a2b8ef7454a1a22.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-7a2b8ef7454a1a22.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-7a2b8ef7454a1a22.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-7a2b8ef7454a1a22.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/models/caps/route-7a2b8ef7454a1a22.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-7a2b8ef7454a1a22.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-7a2b8ef7454a1a22.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-7a2b8ef7454a1a22.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/models/route-7a2b8ef7454a1a22.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/models/test/route-7a2b8ef7454a1a22.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-7a2b8ef7454a1a22.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-7a2b8ef7454a1a22.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-7a2b8ef7454a1a22.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-7a2b8ef7454a1a22.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-7a2b8ef7454a1a22.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-7a2b8ef7454a1a22.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-7a2b8ef7454a1a22.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-7a2b8ef7454a1a22.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-7a2b8ef7454a1a22.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-7a2b8ef7454a1a22.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-7a2b8ef7454a1a22.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-7a2b8ef7454a1a22.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-7a2b8ef7454a1a22.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-7a2b8ef7454a1a22.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-7a2b8ef7454a1a22.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-7a2b8ef7454a1a22.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-7a2b8ef7454a1a22.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder/checkin/route-7a2b8ef7454a1a22.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder-cn/checkin/route-7a2b8ef7454a1a22.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-7a2b8ef7454a1a22.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-7a2b8ef7454a1a22.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-7a2b8ef7454a1a22.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-7a2b8ef7454a1a22.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-kill/route-7a2b8ef7454a1a22.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/desktop-status/route-7a2b8ef7454a1a22.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-7a2b8ef7454a1a22.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-7a2b8ef7454a1a22.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/pricing/route-7a2b8ef7454a1a22.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-7a2b8ef7454a1a22.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-7a2b8ef7454a1a22.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-7a2b8ef7454a1a22.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-7a2b8ef7454a1a22.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-7a2b8ef7454a1a22.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-7a2b8ef7454a1a22.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-7a2b8ef7454a1a22.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-7a2b8ef7454a1a22.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-7a2b8ef7454a1a22.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/providers/route-7a2b8ef7454a1a22.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-7a2b8ef7454a1a22.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-7a2b8ef7454a1a22.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-7a2b8ef7454a1a22.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-7a2b8ef7454a1a22.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-7a2b8ef7454a1a22.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-7a2b8ef7454a1a22.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-7a2b8ef7454a1a22.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-7a2b8ef7454a1a22.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-7a2b8ef7454a1a22.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-7a2b8ef7454a1a22.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-7a2b8ef7454a1a22.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-7a2b8ef7454a1a22.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-7a2b8ef7454a1a22.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-7a2b8ef7454a1a22.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-7a2b8ef7454a1a22.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-7a2b8ef7454a1a22.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-7a2b8ef7454a1a22.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/security/status/route-7a2b8ef7454a1a22.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-7a2b8ef7454a1a22.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-7a2b8ef7454a1a22.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-7a2b8ef7454a1a22.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-7a2b8ef7454a1a22.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/settings/route-7a2b8ef7454a1a22.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-7a2b8ef7454a1a22.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/tags/route-7a2b8ef7454a1a22.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-7a2b8ef7454a1a22.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-7a2b8ef7454a1a22.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-7a2b8ef7454a1a22.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-7a2b8ef7454a1a22.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-7a2b8ef7454a1a22.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-7a2b8ef7454a1a22.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-7a2b8ef7454a1a22.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-7a2b8ef7454a1a22.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-7a2b8ef7454a1a22.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-7a2b8ef7454a1a22.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-7a2b8ef7454a1a22.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-7a2b8ef7454a1a22.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-7a2b8ef7454a1a22.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-7a2b8ef7454a1a22.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-7a2b8ef7454a1a22.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-7a2b8ef7454a1a22.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-7a2b8ef7454a1a22.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-7a2b8ef7454a1a22.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-7a2b8ef7454a1a22.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-7a2b8ef7454a1a22.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-7a2b8ef7454a1a22.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/usage/quotas/route-7a2b8ef7454a1a22.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-7a2b8ef7454a1a22.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-7a2b8ef7454a1a22.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-7a2b8ef7454a1a22.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-7a2b8ef7454a1a22.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-7a2b8ef7454a1a22.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-7a2b8ef7454a1a22.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-7a2b8ef7454a1a22.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-7a2b8ef7454a1a22.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-7a2b8ef7454a1a22.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-7a2b8ef7454a1a22.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-7a2b8ef7454a1a22.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-7a2b8ef7454a1a22.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-7a2b8ef7454a1a22.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-7a2b8ef7454a1a22.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-7a2b8ef7454a1a22.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-7a2b8ef7454a1a22.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-7a2b8ef7454a1a22.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-7a2b8ef7454a1a22.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/v1/route-7a2b8ef7454a1a22.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-7a2b8ef7454a1a22.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-7a2b8ef7454a1a22.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-7a2b8ef7454a1a22.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-7a2b8ef7454a1a22.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-7a2b8ef7454a1a22.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-7a2b8ef7454a1a22.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-7a2b8ef7454a1a22.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-7a2b8ef7454a1a22.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-7a2b8ef7454a1a22.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/version/route-7a2b8ef7454a1a22.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/version/shell-update/route-7a2b8ef7454a1a22.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-7a2b8ef7454a1a22.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/version/update/route-7a2b8ef7454a1a22.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-3659ea13d950adc1.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/landing/page-01cca10383327c01.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-7a2b8ef7454a1a22.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/page-7a2b8ef7454a1a22.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-7a2b8ef7454a1a22.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-7a2b8ef7454a1a22.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-7a2b8ef7454a1a22.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-7a2b8ef7454a1a22.js +0 -1
  1132. package/app/.next-cli-build/static/css/b80ae6e58b63fd53.css +0 -1
  1133. package/app/.next-cli-build/static/eqWYkzNeaSBj4mkYsjYbh/_buildManifest.js +0 -1
  1134. /package/app/.next-cli-build/static/{eqWYkzNeaSBj4mkYsjYbh → XaFYXXaFDzpbuL3LNeL29}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";exports.id=8972,exports.ids=[8972],exports.modules={220:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.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(`${d.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},e="";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,d.cD)(),mode:1})});if(b.ok){let a=await b.json();e=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})}},3198:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(55511),e=c.n(d);let f={config:c(92990).aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,75924)),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,75924)),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}:{}}})}},5867:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(30022);let f={config:{...d.hF,loginUrl:e.ii,deviceTokenUrl:e.h3,userInfoUrl:e.cn},flowType:"device_code",requestDeviceCode:async()=>{let{QoderService:a}=await c.e(1531).then(c.bind(c,91531)),b=new a({deviceTokenUrl:e.h3,loginUrl:e.ii,userInfoUrl:e.cn}).initiateDeviceFlow();return{device_code:b.nonce,user_code:b.nonce.slice(0,8).toUpperCase(),verification_uri:e.ii,verification_uri_complete:b.verificationUriComplete,expires_in:300,interval:2,codeVerifier:b.codeVerifier,_qoderNonce:b.nonce,_qoderMachineId:b.machineId}},pollToken:async(a,b,d,f)=>{let g,{QoderService:h}=await c.e(1531).then(c.bind(c,91531)),i=new h({deviceTokenUrl:e.h3,loginUrl:e.ii,userInfoUrl:e.cn}),j=b||f?._qoderNonce,k=d||f?._qoderVerifier;if(!j||!k)return{ok:!1,data:{error:"invalid_request",error_description:"Missing nonce/verifier"}};try{g=await i.pollDeviceToken({nonce:j,codeVerifier:k})}catch(a){return{ok:!1,data:{error:"poll_failed",error_description:a.message}}}if("pending"===g.status)return{ok:!1,data:{error:"authorization_pending"}};let l=await i.fetchUserInfo(g.accessToken),m=Math.max(86400,Math.floor((g.expireTime-Date.now())/1e3));return{ok:!0,data:{access_token:g.accessToken,refresh_token:g.refresh_token||"",expires_in:m,_qoderUserId:g.userId,_qoderMachineId:f?._qoderMachineId||"",_qoderName:l.name,_qoderEmail:l.email,_qoderOrganizationId:l.organizationId}}},mapTokens:a=>{let b=(a._qoderEmail||"").trim(),c=(a._qoderName||"").trim()||null,d=a._qoderUserId||"",e=b||c||(d?`qoder-cn-user-${d}`:null);return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,email:e,displayName:c||b||(d?`qoder-cn-user-${d}`:null),providerSpecificData:{authMethod:"device",userId:d,machineId:a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}}},12132:(a,b,c)=>{c.d(b,{$6:()=>G,Fp:()=>I,ND:()=>p,Nv:()=>F,XX:()=>x,getMimoAccountCookie:()=>H,readDesktopPassToken:()=>A});var d=c(73024),e=c.n(d),f=c(48161),g=c.n(f),h=c(76760),i=c.n(h),j=c(77598),k=c.n(j),l=c(39609);let m={cn:"https://mimo-server-cn.xiaomimimo.com",sgp:"https://mimo-server-sgp.xiaomimimo.com",ams:"https://mimo-server-ams.xiaomimimo.com",ru:"https://mimo-server-ru.xiaomimimo.com",in:"https://mimo-server-in.xiaomimimo.com"},n={cn:"mimopc",sgp:"mimosgp",ams:"mimoams",ru:"mimoru",in:"mimoin"};function o(a=null){return String(a?.region||"").toLowerCase()}function p(a=null){return m[o(a)]||m.cn}m.cn;let q="account.xiaomi.com",r="miNative PC/Normal Windows_NT/10.0.19045 SDKV/1.0.0 DEVT/PC DEVS/Windows APP/miaccount_desktop APPV/0.1.0",s="MiClaw/1.0",t=new Set(["EBUSY","EPERM","EACCES"]),u=new Map,v=new Map,w="Xiaomi MiMo";function x(){let a=g().homedir(),b=i().join(a,".local","share","mimocode"),c=process.env.XDG_DATA_HOME,d=c?i().join(c,"mimocode"):b;return(d===b?[d]:[d,b]).map(a=>i().join(a,"auth.json"))}async function y(){let a,b=i().join((a=g().homedir(),"win32"===process.platform?i().join(process.env.APPDATA||i().join(a,"AppData","Roaming"),w):"darwin"===process.platform?i().join(a,"Library","Application Support",w):i().join(process.env.XDG_CONFIG_HOME||i().join(a,".config"),w)),"Partitions","xiaomi-account","Network","Cookies");if(!e().existsSync(b))return null;let d=i().join(g().tmpdir(),`10router-mimo-cookies-${process.pid}-${k().randomBytes(4).toString("hex")}.db`);try{e().copyFileSync(b,d)}catch(a){if(t.has(a?.code)){let a=Error("Xiaomi MiMo Desktop is holding its cookie store (quit the app and retry)");throw a.code="DESKTOP_LOCKED",a}return null}try{e().chmodSync(d,384)}catch{}try{let{DatabaseSync:a}=await Promise.resolve().then(c.t.bind(c,80099,23)),b=null;try{let c=(b=new a(d,{readOnly:!0})).prepare("SELECT name, value FROM cookies WHERE host_key = ?").all("."+q),e=Object.fromEntries(c.map(a=>[a.name,a.value]));return e.passToken?e:null}finally{try{b?.close()}catch{}}}catch{return null}finally{await z(d)}}async function z(a){for(let b=0;b<3;b++)try{e().unlinkSync(a);return}catch(a){if("ENOENT"===a.code)return;b<2&&await new Promise(a=>setTimeout(a,20))}}async function A(){try{let a=await y();if(!a?.passToken)return null;return{passToken:a.passToken,userId:a.userId||null,cUserId:a.cUserId||null}}catch(a){if(a?.code==="DESKTOP_LOCKED")throw a;return null}}function B(a,b){for(let c of b.headers.getSetCookie?.()||[]){let b=/^([^=]+)=([^;]*)/.exec(c.trim());b&&b[2]&&(a[b[1]]=b[2])}}function C(a){return Object.entries(a).filter(([,a])=>a).map(([a,b])=>`${a}=${b}`).join("; ")}async function D(a,b,c=null){var d;let e,f={...a},g=p(c),h=function(a=null){return n[o(a)]||n.cn}(c),i=(await (0,l.proxyAwareFetch)(`${g}/api/user/xiaomi/me`,{redirect:"manual",headers:{"User-Agent":r,Cookie:C(f)},signal:AbortSignal.timeout(1e4)},b)).headers.get("location");if(!i)return null;let j=new URL(i).searchParams.get("callback");if(!j)return null;let m=await (0,l.proxyAwareFetch)(`https://${q}/pass/serviceLogin?sid=passportapi&_json=true`,{headers:{Cookie:C(f),"User-Agent":s,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b),t=JSON.parse((await m.text()).replace(/^&&&START&&&/,"")),u=t.nonce||(t.location?new URL(t.location).searchParams.get("nonce"):null);if(!u||!t.location)return null;let v=await (0,l.proxyAwareFetch)(`${t.location}&clientSign=${(e=`nonce=${u}`+((d=t.ssecurity)&&d.trim()?`&${d}`:""),encodeURIComponent(k().createHash("sha1").update(e).digest("base64")))}`,{redirect:"manual",headers:{Cookie:C(f),"User-Agent":s},signal:AbortSignal.timeout(1e4)},b);B(f,v);let w=await (0,l.proxyAwareFetch)(`https://${q}/pass/serviceLogin?sid=${encodeURIComponent(h)}&callback=${encodeURIComponent(j)}&_json=true`,{headers:{Cookie:C(f),"User-Agent":s,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b),x=JSON.parse((await w.text()).replace(/^&&&START&&&/,""));if(B(f,w),!x?.location||!/\/api\/sts/.test(x.location))return null;let y=await (0,l.proxyAwareFetch)(x.location,{redirect:"manual",headers:{"User-Agent":r,Cookie:C(f)},signal:AbortSignal.timeout(1e4)},b);if(B(f,y),!f.serviceToken)return null;let z={};for(let a of["serviceToken","mimopc_ph","mimopc_slh","userId"])f[a]&&(z[a]=f[a]);return C(z)}async function E(a,b){let c=a?.mimoPassToken?{passToken:a.mimoPassToken,userId:a.mimoUserId,cUserId:a.mimoCUserId}:null;if(!c)try{c=await y()}catch(a){if(a?.code==="DESKTOP_LOCKED")return{cookie:null,reason:"desktop-locked"};throw a}if(!c)return{cookie:null,reason:"no-pass-token"};let d=k().createHash("sha256").update(`${c.passToken}|${o(a)}`).digest("hex"),e=u.get(d);if(e&&Date.now()-e.at<18e5)return{cookie:e.cookie};let f=v.get(d);if(f){let a=await f;return a?{cookie:a}:{cookie:null,reason:"sso-failed"}}let g=(async()=>{try{return await D(c,b,a)}catch{return null}finally{v.delete(d)}})();v.set(d,g);let h=await g;return h?(u.set(d,{cookie:h,at:Date.now()}),{cookie:h}):{cookie:null,reason:"sso-failed"}}function F(){u.clear()}let G=r;async function H(a=null,b=null){try{let{cookie:c}=await E(a,b);return c}catch{return null}}async function I(a=null,b=null){let{cookie:c,reason:d}=await E(a,b);if(!c)return{error:"no-pass-token"===d||"desktop-locked"===d?"no-session":"session-failed"};try{let d=await (0,l.proxyAwareFetch)(`${p(a)}/api/user/usage`,{headers:{"User-Agent":r,Cookie:c,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b);if(!d.ok)return{error:`http-${d.status}`};let e=await d.json().catch(()=>null);if(!e||0!==e.code||!e.data)return{error:"bad-response"};return{percent:e.data.percent,resetDate:e.data.resetDate,resetAt:e.data.resetAt}}catch(a){return{error:a.message}}}},13342:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(92990),e=c(23358);async function f(a,b,c){let e=`${a.replace(/\/$/,"")}${b}`,f=await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":d.eD.userAgent},body:JSON.stringify(c)}),g=await f.text();if(!f.ok)throw Error(`Windsurf ${b} HTTP ${f.status}: ${g.slice(0,200)}`);try{return JSON.parse(g)}catch{throw Error(`Windsurf ${b} invalid JSON`)}}async function g(a){let b=await f(d.eD.registerApiBaseUrl,d.eD.registerPath,{firebase_id_token:a}),c=(0,e.j)(b,[["apiKey"],["api_key"]]);if(!c)throw Error("Windsurf RegisterUser missing apiKey");return{apiKey:c,apiServerUrl:(0,e.j)(b,[["apiServerUrl"],["api_server_url"]])||d.eD.defaultApiServerUrl,name:(0,e.j)(b,[["name"]])}}async function h(a,b){try{let c=await f(a,d.eD.oneTimeAuthPath,{firebaseIdToken:b}),g=(0,e.j)(c,[["authToken"],["auth_token"]]);if(!g)return{email:null,name:null};let h=await f(a,d.eD.currentUserPath,{authToken:g,includeSubscription:!0}),i=h.user||h;return{email:(0,e.j)(i,[["email"]]),name:(0,e.j)(i,[["name"]])}}catch{return{email:null,name:null}}}let i={config:d.eD,flowType:"authorization_code",callbackPath:d.eD.callbackPath,buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({response_type:"token",client_id:a.clientId,redirect_uri:b,state:c,prompt:"login",redirect_parameters_type:"query",workflow:"onboarding"});return`${a.authBaseUrl}${a.signInPath}?${d.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=String(b||"").trim();if(!(f.includes("?")||f.includes("access_token="))){let b=f.replace(/^Bearer\s+/i,"");if(b.startsWith("sk-ws-"))return{accessToken:b,refreshToken:null,expiresIn:null,apiServerUrl:a.defaultApiServerUrl,firebaseIdToken:null,_authMethod:"imported"};let c=await g(b);return{accessToken:c.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:c.apiServerUrl,firebaseIdToken:b,_authMethod:"imported"}}let{firebaseIdToken:h}=function(a,b){let c=String(a||"").trim(),d=c;c.includes("?")&&(d=c.slice(c.indexOf("?")+1)),c.startsWith("#")&&(d=c.slice(1));let e=Object.fromEntries(new URLSearchParams(d)),f=a=>{for(let b of a){let a=e[b];if(a&&String(a).trim())return String(a).trim()}return null},g=f(["error"]);if(g){let a=f(["error_description"]);throw Error(a?`Windsurf auth failed: ${g} (${a})`:`Windsurf auth failed: ${g}`)}let h=f(["access_token","token"]);if(!h)throw Error("Windsurf callback missing access_token");let i=f(["state"]);if(b&&i&&i!==b)throw Error("Windsurf callback state mismatch");return{firebaseIdToken:h}}(f,e),i=await g(h);return{accessToken:i.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:i.apiServerUrl,firebaseIdToken:h,_authMethod:"oauth"}},postExchange:async a=>a.firebaseIdToken?{userInfo:await h(a.apiServerUrl,a.firebaseIdToken)}:{userInfo:{email:null,name:null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.userInfo?.email||void 0,displayName:b?.userInfo?.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",apiServerUrl:a.apiServerUrl,firebaseIdToken:a.firebaseIdToken}})}},17691:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).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}}}}},18941:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).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}})}},20386:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990);let e="1.0.0",f={config:d.sA,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","x-api-version":e},body:new URLSearchParams({client_id:a.clientId})});if(!b.ok){let a=await b.text();throw Error(`Muse Code 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","x-api-version":e},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 f=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||f,data:c}},postExchange:async a=>{let b,c;for(let c=0;(429===(b=await fetch("https://api.meta.ai/muse-code/key",{method:"POST",headers:{Accept:"application/json",Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","x-api-version":e},body:JSON.stringify({onboard:!0}),redirect:"error"})).status||b.status>=500)&&!(c>=2);c++)await new Promise(a=>setTimeout(a,5e3*(c+1)));let d=await b.text();if(!b.ok){let a=`${b.status} ${d.slice(0,200)}`;try{let b=JSON.parse(d);(b?.title||b?.detail)&&(a=[b.title,b.detail].filter(Boolean).join(": "),b.action_url&&(a+=` — ${b.action_url}`))}catch{}throw Error(`Muse Code key mint failed: ${a}`)}try{c=JSON.parse(d)}catch{throw Error("Muse Code key mint returned invalid JSON")}if(!1===c.is_subs_active)throw Error("Muse Code subscription is inactive — activate it on muse.ai first");let f=c.action_url||c.require_payment_action_url;if(!c.api_key&&(c.require_payment||f))throw Error(`Muse Code subscription required${f?`: ${f}`:""}`);if(!c.api_key)throw Error("Muse Code key response is missing api_key");return{key:c}},mapTokens:(a,b)=>{let c=b?.key||{};return{accessToken:c.api_key,refreshToken:null,expiresIn:null,email:c.user_email?.trim().toLowerCase()||void 0,providerSpecificData:{authMethod:"device_code",oauthAccessToken:a.access_token,subscriptionTier:c.subs_tier_name||null}}}}},23358:(a,b,c)=>{c.d(b,{j:()=>d});function d(a,b){for(let c of b){let b=a;for(let a of c){if(null==b||"object"!=typeof b){b=void 0;break}b=b[a]}if("string"==typeof b&&b.trim())return b.trim();if("number"==typeof b)return String(b)}return null}},24329:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(53129);let f={config:d.DI,flowType:"authorization_code_pkce",fixedPort:d.DI.fixedPort,callbackPath:d.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=(0,e.YR)(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||(0,e.J_)(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}}},24336:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(55511),e=c.n(d),f=c(92990),g=c(23358);async function h(a){let b=JSON.stringify({loginTraceID:a,login_trace_id:a}),c="no successful response";for(let a of f.SK.loginGuidanceUrls)try{let d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent},body:b});if(!d.ok){c=`${a} HTTP ${d.status}`;continue}let e=await d.json(),h=(0,g.j)(e,[["Result","LoginHost"],["Result","loginHost"],["Result","LoginURL"],["result","loginHost"],["data","Result","LoginHost"],["data","loginHost"],["LoginHost"],["loginHost"]]);if(h)return h;c=`${a} missing LoginHost`}catch(b){c=`${a} ${b.message}`}throw Error(`Trae GetLoginGuidance failed: ${c}`)}function i(){return[...f.SK.apiOrigins]}async function j(a,b){let c=JSON.stringify({ClientID:f.SK.clientId,RefreshToken:a,ClientSecret:f.SK.clientSecret,UserID:""}),d="no successful response";for(let e of i()){let h=`${e.replace(/\/$/,"")}${f.SK.exchangeTokenPath}`;try{let e,i={Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent};b&&(i["x-cloudide-token"]=b);let j=await fetch(h,{method:"POST",headers:i,body:c}),k=await j.text();if(!j.ok){d=`${h} HTTP ${j.status}`;continue}try{e=JSON.parse(k)}catch{d=`${h} invalid JSON`;continue}let l=(0,g.j)(e,[["Result","AccessToken"],["Result","accessToken"],["result","access_token"],["accessToken"]]);if(!l){let a=(0,g.j)(e,[["message"],["msg"],["error"],["Result","Message"]])||"missing AccessToken";d=`${h} ${a}`;continue}return{accessToken:l,refreshToken:(0,g.j)(e,[["Result","RefreshToken"],["result","refresh_token"],["refreshToken"]])||a,expiresIn:null,expiresAt:(0,g.j)(e,[["Result","ExpiresAt"],["Result","expiresAt"],["result","expires_at"],["expiresAt"]])}}catch(a){d=`${h} ${a.message}`}}throw Error(`Trae ExchangeToken failed: ${d}`)}async function k(a){for(let b of i()){let c=`${b.replace(/\/$/,"")}${f.SK.getUserInfoPath}`;try{let b=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent,"x-cloudide-token":a},body:JSON.stringify({})});if(!b.ok)continue;let d=await b.json();return{email:(0,g.j)(d,[["Result","NonPlainTextEmail"],["Result","Email"],["Result","email"],["email"],["data","email"]]),name:(0,g.j)(d,[["Result","ScreenName"],["Result","Nickname"],["Result","Name"],["result","nickname"],["nickname"],["name"]]),aiRegion:(0,g.j)(d,[["Result","AIRegion"],["Result","aiRegion"],["aiRegion"]]),region:(0,g.j)(d,[["Result","Region"],["Result","region"],["region"]]),tenant:(0,g.j)(d,[["Result","TenantID"],["Result","tenantId"],["tenantId"]]),userId:(0,g.j)(d,[["Result","UserID"],["Result","userId"],["userId"]])}}catch{}}return{email:null,name:null}}let l={config:f.SK,flowType:"authorization_code",callbackPath:f.SK.callbackPath,prepareConfig:async a=>{let b=e().randomUUID(),c=await h(b);return{...a,loginTraceID:b,loginHost:c}},buildAuthUrl:(a,b,c)=>{var d;let g,h,i={plugin_version:f.SK.defaultPluginVersion,machine_id:e().randomUUID(),device_id:f.SK.defaultDeviceId,x_device_brand:"unknown",x_device_type:"unknown",x_os_version:"unknown",x_env:"",x_app_version:f.SK.defaultAppVersion,x_app_type:f.SK.defaultAppType},j=a.loginTraceID||c;return d=a.loginHost,(g=new URL(d.startsWith("http")?d:`https://${d.replace(/^\/+/,"")}`)).pathname=f.SK.authorizationPath,(h=new URLSearchParams).set("login_version","1"),h.set("auth_from","trae"),h.set("login_channel","native_ide"),h.set("plugin_version",i.plugin_version),h.set("auth_type","local"),h.set("client_id",f.SK.clientId),h.set("redirect","0"),h.set("login_trace_id",j),h.set("auth_callback_url",b),h.set("machine_id",i.machine_id),h.set("device_id",i.device_id),h.set("x_device_id",i.device_id),h.set("x_machine_id",i.machine_id),h.set("x_device_brand",i.x_device_brand),h.set("x_device_type",i.x_device_type),h.set("x_os_version",i.x_os_version),h.set("x_env",i.x_env),h.set("x_app_version",i.x_app_version),h.set("x_app_type",i.x_app_type),g.search=h.toString(),g.toString()},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!(/[?=&]/.test(c)&&(c.includes("refreshToken")||c.includes("refresh_token"))))return{accessToken:c.replace(/^(Cloud-IDE-JWT|Bearer)\s+/i,""),refreshToken:null,expiresIn:24*f.SK.tokenLifetimeDays*3600,_authMethod:"imported"};let{refreshToken:d,cloudideToken:e}=function(a){let b=String(a||"").trim(),c=b;b.includes("?")&&(c=b.slice(b.indexOf("?")+1)),b.startsWith("#")&&(c=b.slice(1));let d=Object.fromEntries(new URLSearchParams(c)),e=a=>{for(let b of a){let a=d[b];if(a&&String(a).trim())return String(a).trim()}return null},f=e(["error","error_code","errorCode"]);if(f){let a=e(["error_description","error_desc","message"]);throw Error(a?`Trae auth failed: ${f} (${a})`:`Trae auth failed: ${f}`)}let g=e(["refreshToken","refresh_token","RefreshToken"]);if(!g)throw Error("Trae callback missing refreshToken");let h=e(["loginHost","login_host","LoginHost","host","consoleHost"]);if(!h)throw Error("Trae callback missing loginHost");return{refreshToken:g,loginHost:h,cloudideToken:e(["x-cloudide-token","xCloudideToken","accessToken","access_token","token"])}}(c);return{...await j(d,e),_authMethod:"oauth"}},postExchange:async a=>({userInfo:await k(a.accessToken)}),mapTokens:(a,b)=>{let c,d=a.expiresIn||(a.expiresAt?Math.max(60,Number(a.expiresAt)-Math.floor(Date.now()/1e3)):24*f.SK.tokenLifetimeDays*3600),e=b?.userInfo||{},g=e.aiRegion||"US-East";return{accessToken:a.accessToken,refreshToken:a.refreshToken,expiresIn:d,email:e.email||void 0,displayName:e.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",aiRegion:g,region:e.region||g,tenant:e.tenant||"marscode",userId:e.userId||"",scope:"sg"===(c=(g||"").toLowerCase())||c.includes("singapore")?"marscode-sg":"cn"===c||c.includes("cn")||c.includes("china")?"marscode-cn":"marscode-us",webId:"",bizUserId:"",userUniqueId:"",appLanguage:"en",appVersion:f.SK.defaultAppVersion,userRegion:"SG"===g?"SG":"US",userIdentity:"Free"}}}}},30022:(a,b,c)=>{c.d(b,{_G:()=>d._G,bg:()=>d.bg,cn:()=>d.cn,h3:()=>d.h3,ii:()=>d.ii,rf:()=>d.rf});var d=c(69704)},31111:(a,b,c)=>{c.d(b,{LH:()=>i,Of:()=>j});var d=c(92990);function e(a,b){return"string"==typeof a?.[b]&&a[b].trim()?a[b].trim():void 0}function f(a,b){return"number"==typeof a?.[b]&&Number.isFinite(a[b])&&a[b]>0?a[b]:void 0}async function g(a,b){let c,d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(b).toString(),signal:AbortSignal.timeout(3e4)});try{c=JSON.parse(await d.text())}catch{c={error:`invalid_json_response (HTTP ${d.status})`}}return{status:d.status,body:c}}function h(a){return{config:a,flowType:"device_code",async requestDeviceCode(a,b){let c,d,h;if(!b)throw Error("MiniMax Code sign-in requires a PKCE code challenge");let{status:i,body:j}=await g(a.deviceUrl,{client_id:a.clientId,scope:a.scope,audience:a.audience,code_challenge:b,code_challenge_method:"S256"}),k=e(j,"user_code"),l=e(j,"device_code"),m=e(j,"verification_uri_complete")??e(j,"verification_uri")??e(j,"verification_url");if(!k||!m)throw Error(`MiniMax device code response unusable (HTTP ${i})`);let n=!l;return{device_code:l??k,user_code:k,verification_uri:m,verification_uri_complete:e(j,"verification_uri_complete")||m,expires_in:(c=f(j,"expires_in"),d=f(j,"expired_in"),(c||(d?d<1e12?d:Math.max(1,Math.ceil((d-Date.now())/1e3)):void 0))??600),interval:(h=f(j,"interval"))?n&&h>=60?Math.round(h/1e3):h:5,_minimaxPollByUser:n}},async pollToken(a,b,c,d){if(!b)return{ok:!0,data:{error:"authorization_pending"}};let f={grant_type:"urn:ietf:params:oauth:grant-type:device_code",...d?._minimaxPollByUser?{user_code:b}:{device_code:b},client_id:a.clientId,code_verifier:c},{body:h}=await g(a.tokenUrl,f),i=e(h,"status");return"pending"===i?{ok:!0,data:{error:"authorization_pending"}}:"slow_down"===i?{ok:!0,data:{error:"slow_down"}}:"denied"===i||"access_denied"===i?{ok:!0,data:{error:"access_denied"}}:"expired"===i||"expired_token"===i?{ok:!0,data:{error:"expired_token"}}:i?{ok:!0,data:{error:`unexpected_status:${i}`}}:e(h,"error")?{ok:!0,data:{error:e(h,"error"),error_description:e(h,"error_description")}}:e(h,"access_token")?{ok:!0,data:h}:{ok:!0,data:{error:"no_access_token"}}},mapTokens(a){let b=f(a,"expires_in");return{accessToken:e(a,"access_token"),refreshToken:e(a,"refresh_token")??"",expiresIn:b??3600,providerSpecificData:{authMethod:"device_code"}}}}}let i=h(d.Vv),j=h(d.b3)},34940:(a,b,c)=>{c.d(b,{A:()=>g});var d=c(90737),e=c(92990),f=c(53129);let g={config:e.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":d.hY},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,e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":d.hY},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await e.json()}catch{c={error:"invalid_response",error_description:await e.text()}}let f=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:e.ok||f,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":d.hY,"x-xai-token-auth":"xai-grok-cli","x-grok-client-version":d.uG}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=(0,f.pG)(a.id_token)||(0,f.J_)(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,g=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:g,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}}}}},35152:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).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}})}},40626:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(49804);let f={config:d.RY,flowType:"authorization_code",callbackPath:"/",prepareConfig:async(a,b)=>{let c=Number(b?.nativeAppPort)||d.RY.defaultNativeAppPort,f=(0,e.le)(a,{nativeAppPort:c});return{...a,...f}},buildAuthUrl:(a,b,c)=>a.authUrl,exchangeToken:async(a,b,c,d,f)=>{let{userId:g,encryptedAccessToken:h}=(0,e.Q_)(b);return{accessToken:(0,e.Wc)(h,d),userId:g,systemId:a.systemId}},postExchange:async a=>{let b={accessToken:a.accessToken,providerSpecificData:{userId:a.userId,systemId:a.systemId}},c=null;try{c=await (0,e.qJ)(b,{config:d.RY})}catch{}let f=(0,e.k9)(b,c);return{userInfo:c,organizationId:f,email:c?.email||null,name:c?.name||c?.display_name||null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.email||void 0,displayName:b?.name||void 0,providerSpecificData:{authMethod:"oauth",userId:a.userId,systemId:a.systemId,organizationId:b?.organizationId||""}})}},41902:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).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})}},43659:(a,b,c)=>{c.d(b,{A1:()=>k,Yx:()=>i,lR:()=>m,wO:()=>l,xJ:()=>f,yj:()=>g,zL:()=>j});var d=c(3662),e=c(12557);function f(a,b){let c=d.LY[a]||(a>=500?{type:"server_error",code:"internal_server_error"}:{type:"invalid_request_error",code:""});return{type:"error",error:{message:b||d.O[a]||"An error occurred",type:c.type,code:c.code}}}function g(a,b,c=null){return new Response(JSON.stringify(f(a,b)),{status:a,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*",...c}})}let h=/"validation_url"\s*:\s*"([^"]+)"/;function i(a){if(!a||!a.includes("VALIDATION_REQUIRED"))return null;let b=h.exec(a);if(!b)return null;let c=b[1];try{c=JSON.parse(`"${c}"`)}catch{}return`Google requires account verification (VALIDATION_REQUIRED). Most often this means the account's 18+ age verification is missing — complete it at https://myaccount.google.com/age-verification (check the birthdate at https://myaccount.google.com/birthday first). Otherwise open this URL in a browser signed in to the affected account, complete "Verify your account", then retry: ${c}`}async function j(a,b=null){let c="";try{c=await a.text()}catch{c=""}let e=i(c);if(b&&"function"==typeof b.parseError)try{let f=b.parseError(a,c);if(f&&"object"==typeof f){let b=e||f.message||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:f.status||a.status,message:b,resetsAtMs:f.resetsAtMs}}}catch{}if(e)return{statusCode:a.status,message:e};let f="";try{let a=JSON.parse(c);f=a.error?.message||a.message||a.error||c}catch{f=c}let g=("string"==typeof f?f:JSON.stringify(f))||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:a.status,message:g}}function k(a,b,c,d=null){return{success:!1,status:a,error:b,resetsAtMs:c,response:g(a,b,d)}}function l(a,b,c,d,e=null){let f=Math.max(Math.ceil((new Date(c).getTime()-Date.now())/1e3),1);return new Response(JSON.stringify({type:"error",error:{type:a>=500?"api_error":"invalid_request_error",message:`${b} (${d})`}}),{status:a,headers:{...e,"Content-Type":"application/json","retry-after":String(f)}})}function m(a,b,c,d){let f=d||a.code||"FETCH_FAILED",g=a.message||"Unknown error",h=a.cause?.code,i=a.cause?.message,j=h||i?` (cause: ${[h,i].filter(Boolean).join(": ")})`:"",k=`[${f}]: ${g}${j}`;return(0,e.Bp)(k,b)}},49475:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.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(d.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":d.Nu.apiVersion,"User-Agent":d.Nu.userAgent}}),c=b.ok?await b.json():{},e=await fetch(d.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":d.Nu.apiVersion,"User-Agent":d.Nu.userAgent}});return{copilotToken:c,userInfo:e.ok?await e.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}})}},53129:(a,b,c)=>{function d(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 e(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 f(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 g(a){let b=f(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function h(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}}function i(a){let b=f(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}}c.d(b,{J_:()=>g,YR:()=>i,gR:()=>h,js:()=>d,pG:()=>e})},56187:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).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"}})}},66678:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Gj:()=>K,PY:()=>N,Re:()=>L,Su:()=>M,YR:()=>g.YR,gR:()=>g.gR,kP:()=>J,sO:()=>I});var e=c(48895),f=c(13808),g=c(53129),h=c(41902),i=c(24329),j=c(72520),k=c(34940),l=c(220),m=c(79188),n=c(86725),o=c(67377),p=c(5867),q=c(49475),r=c(93551),s=c(68446),t=c(3198),u=c(67096),v=c(18941),w=c(35152),x=c(56187),y=c(99799),z=c(86857),A=c(17691),B=c(24336),C=c(13342),D=c(40626),E=c(81884),F=c(20386),G=c(31111),H=a([e]);e=(H.then?(await H)():H)[0];let O={claude:h.A,codex:i.A,xai:j.A,"grok-cli":k.A,"gemini-cli":l.A,antigravity:m.A,iflow:n.A,qoder:o.A,"qoder-cn":p.A,github:q.A,kiro:r.A,cursor:s.A,kimi:t.A,kilocode:u.A,cline:v.A,clinepass:w.A,gitlab:x.A,"codebuddy-cn":y.A,"codebuddy-intl":z.A,kimchi:A.A,trae:B.A,windsurf:C.A,zed:D.A,glm:E.A,muse:F.A,"minimax-code":G.LH,"minimax-code-global":G.Of};function I(a){let b=O["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}async function J(a,b,c){let d=I(a),e=d.prepareConfig?await d.prepareConfig(d.config,c||{}):d.config,{codeVerifier:g,codeChallenge:h,state:i}=(0,f.lz)(d.pkceVerifierBytes),j=e.loginTraceID||i,k=e.privateKeyVerifier||g;return{authUrl:"device_code"===d.flowType?null:"authorization_code_pkce"===d.flowType?d.buildAuthUrl(e,b,j,h,c||{}):d.buildAuthUrl(e,b,j,void 0,c||{}),state:j,codeVerifier:k,codeChallenge:h,redirectUri:b,flowType:d.flowType,fixedPort:d.fixedPort,callbackPath:d.callbackPath||"/callback"}}async function K(a,b,c,d,e,f){let g=I(a),h=g.prepareConfig?await g.prepareConfig(g.config,f||{}):g.config,i=await g.exchangeToken(h,b,c,d,e,f||{}),j=null;return g.postExchange&&(j=await g.postExchange(i)),g.mapTokens(i,j)}async function L(a,b,c){let d=I(a);if("device_code"!==d.flowType)throw Error(`Provider ${a} does not support device code flow`);return await d.requestDeviceCode(d.config,b,c||{})}async function M(a,b,c,d){let e=I(a);if("device_code"!==e.flowType)throw Error(`Provider ${a} does not support device code flow`);let f=await e.pollToken(e.config,b,c,d);if(f.ok)if(f.data.access_token){let b=null;if(e.postExchange)try{b=await e.postExchange(f.data)}catch(b){return console.warn(`[oauth] ${a} postExchange failed:`,b?.message||b),{success:!1,error:"exchange_failed",errorDescription:b.message,fatal:!0}}let c=e.mapTokens(f.data,b);if("kiro"===a&&!c.providerSpecificData?.profileArn){let a=await (0,g.gR)(c.accessToken);a&&(c.providerSpecificData.profileArn=a)}return{success:!0,tokens:c}}else if("authorization_pending"===f.data.error||"slow_down"===f.data.error)return{success:!1,error:f.data.error,errorDescription:f.data.error_description||f.data.message,pending:"authorization_pending"===f.data.error};else return{success:!1,error:f.data.error||"no_access_token",errorDescription:f.data.error_description||f.data.message||"No access token received"};return{success:!1,error:f.data.error,errorDescription:f.data.error_description}}let P=!1;async function N(){if(!P){P=!0;try{let{getProviderConnections:a,updateProviderConnection:b}=await Promise.resolve().then(c.bind(c,89718));for(let c of(await a()).filter(a=>{if("codex"!==a.provider||"oauth"!==a.authType||!a.idToken)return!1;let b=!!a.email,c=!!a.providerSpecificData?.chatgptAccountId;return!b||!c})){let a=(0,g.YR)(c.idToken);if(!a.email&&!a.chatgptAccountId)continue;let d={};!c.email&&a.email&&(d.email=a.email),(a.chatgptAccountId||a.chatgptPlanType)&&(d.providerSpecificData={...c.providerSpecificData||{},chatgptAccountId:a.chatgptAccountId,chatgptPlanType:a.chatgptPlanType}),Object.keys(d).length&&await b(c.id,d)}}catch(a){P=!1,console.log("backfillCodexEmails failed:",a?.message||a)}}}d()}catch(a){d(a)}})},67096:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).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}}:{}})}},67377:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).hF,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(1531).then(c.bind(c,91531)),d=new b().initiateDeviceFlow();return{device_code:d.nonce,user_code:d.nonce.slice(0,8).toUpperCase(),verification_uri:a.loginUrl,verification_uri_complete:d.verificationUriComplete,expires_in:300,interval:2,codeVerifier:d.codeVerifier,_qoderNonce:d.nonce,_qoderMachineId:d.machineId}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(1531).then(c.bind(c,91531)),h=new g,i=b||e?._qoderNonce,j=d||e?._qoderVerifier;if(!i||!j)return{ok:!1,data:{error:"invalid_request",error_description:"Missing nonce/verifier"}};try{f=await h.pollDeviceToken({nonce:i,codeVerifier:j})}catch(a){return{ok:!1,data:{error:"poll_failed",error_description:a.message}}}if("pending"===f.status)return{ok:!1,data:{error:"authorization_pending"}};let k=await h.fetchUserInfo(f.accessToken),l=Math.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||""}}}}},68446:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})}},72520:(a,b,c)=>{c.d(b,{A:()=>j});var d=c(55511),e=c.n(d),f=c(73159),g=c(53129);let h=null;async function i(){if(h)return h;try{let a=await fetch(f.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return h={authorizeUrl:(0,g.js)(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:(0,g.js)(b.token_endpoint,"token_endpoint")}}}catch{}return h={authorizeUrl:f.oT.authorizeUrl,tokenUrl:f.oT.tokenUrl}}let j={config:f.oT,flowType:"authorization_code_pkce",fixedPort:f.oT.loopbackPort,callbackPath:f.oT.callbackPath,pkceVerifierBytes:f.Ue,prepareConfig:async a=>{let b=await i();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=(0,g.pG)(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}}},74177:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{PY:()=>e.PY,Re:()=>e.Re,Su:()=>e.Su,exchangeTokens:()=>e.Gj,extractCodexAccountInfo:()=>e.YR,fetchKiroProfileArn:()=>e.gR,kP:()=>e.kP,sO:()=>e.sO});var e=c(66678),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},79188:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.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":d.YT.loadCodeAssistUserAgent,"x-request-source":"local"},c=(0,d.cD)(),e=await fetch(`${d.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"}}),f=e.ok?await e.json():{},g="",h="legacy-tier";try{let a=await fetch(d.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(d.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:f,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})}},81884:(a,b,c)=>{c.d(b,{A:()=>k});var d=c(55511),e=c.n(d);async function f(a,b){let c=await g(a,b),d={Authorization:`Bearer ${c}`,"Content-Type":"application/json"},e=function(a){let b=(Array.isArray(a?.organizations)?a.organizations:[]).map(a=>({organization:a,projects:(a?.projects||[]).filter(a=>"2"!==String(a?.projectType??"").trim())})).filter(({organization:a,projects:b})=>!!(a?.organizationId&&b.length));if(!b.length)return null;let c=b.find(({organization:a})=>i(a.organizationName))||b[0],d=c.projects.find(a=>i(a?.projectName))||c.projects[0];return c.organization?.organizationId&&d?.projectId?{organizationId:c.organization.organizationId,projectId:d.projectId}:null}(await h(`${a.apiBaseUrl}/api/biz/customer/getCustomerInfo`,{headers:d},"customer info"));if(!e)throw Error("Unable to resolve Z.ai organization and project for the coding plan");let f=`${a.apiBaseUrl}/api/biz/v1/organization/${e.organizationId}/projects/${e.projectId}/api_keys`,j=await h(f,{headers:d},"api keys")||[],k=Array.isArray(j)?j.find(b=>b?.name===a.planApiKeyName):null;k||(k=await h(f,{method:"POST",headers:d,body:JSON.stringify({name:a.planApiKeyName})},"api key create"));let l=k?.apiKey?.trim();if(!l)throw Error("Z.ai api_keys response is missing apiKey");let m=await h(`${f}/copy/${encodeURIComponent(l)}`,{headers:d},"api key copy"),n=m?.secretKey?.trim();if(!n)throw Error("Z.ai api key copy response is missing secretKey");return{planApiKey:`${l}.${n}`,businessToken:c}}async function g(a,b){let c=await h(a.businessLoginUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:b})},"Z.ai business login"),d=c?.access_token?.trim()||c?.accessToken?.trim();if(!d)throw Error("Z.ai business login response is missing access_token");return d}async function h(a,b,c){let d,e=await fetch(a,b),f=await e.text();if(!e.ok)throw Error(`Z.ai ${c} request failed (HTTP ${e.status}): ${f.slice(0,200)}`);try{d=JSON.parse(f)}catch{throw Error(`Z.ai ${c} response is not valid JSON`)}if(!j(d?.code)||d?.success===!1)throw Error(d?.msg||`Z.ai ${c} returned business error ${d?.code}`);return d?.data??d??null}function i(a){let b=String(a||"").trim().toLowerCase();return b.includes("默认机构")||b.includes("默认项目")||"default"===b}function j(a){return null==a||0===a||200===a||"0"===a||"200"===a}let k={config:c(92990)._0,flowType:"device_code",requestDeviceCode:async a=>{let b=e().randomBytes(32).toString("hex"),c=await fetch(a.cliInitUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${b}`},body:JSON.stringify({provider:a.providerId||"zai"})});if(!c.ok){let a=await c.text();throw Error(`Zai OAuth init failed: ${a}`)}let d=await c.json();if(!j(d.code)||!d.data)throw Error(d.msg||"Zai OAuth init returned no data");let f=d.data;if(!f.flow_id||!f.authorize_url)throw Error("Zai OAuth init response missing flow_id/authorize_url");return{device_code:f.flow_id,verification_uri:f.authorize_url,expires_in:function(a){let b=Number(a);if(!Number.isFinite(b)||b<=0)return null;let c=Math.floor(((b>1e12?b:1e3*b)-Date.now())/1e3);return c>0?c:null}(f.expires_at)??300,interval:f.poll_interval_sec||3,_zcodePollToken:b}},pollToken:async(a,b,c,d)=>{let e=d?._zcodePollToken;if(!e)return{ok:!0,data:{error:"access_denied",error_description:"Missing Zai poll token — restart the login flow"}};let g=await fetch(`${a.cliPollUrl}/${encodeURIComponent(b)}`,{headers:{Authorization:`Bearer ${e}`}});if(!g.ok)return{ok:!0,data:{error:"access_denied",error_description:`Zai poll failed (HTTP ${g.status})`}};let h=await g.json();if(!j(h.code))return{ok:!0,data:{error:"access_denied",error_description:h.msg||"Zai poll failed"}};let i=h.data||{};if("pending"===i.status)return{ok:!0,data:{error:"authorization_pending"}};if("failed"===i.status)return{ok:!0,data:{error:"access_denied",error_description:"Zai authorization failed or was cancelled"}};if("ready"!==i.status)return{ok:!0,data:{error:"authorization_pending",error_description:`Unknown status: ${i.status}`}};let k=i[a.providerId]||i[i.providerId]||{},l=k.access_token||k.accessToken||i.accessToken||i.access_token;if(!l)return{ok:!0,data:{error:"access_denied",error_description:"Zai poll response missing access token"}};let{planApiKey:m,businessToken:n}=await f(a,l);return{ok:!0,data:{access_token:m,_zcodeJwtToken:i.token||"",_zaiBusinessToken:n,_zaiRefreshToken:k.refresh_token||k.refreshToken||i.refresh_token||i.refreshToken||"",_zcodeUser:i.user||{}}}},mapTokens:a=>{let b=a._zcodeUser||{},c=b.name||b.email||null;return{accessToken:a.access_token,refreshToken:null,email:b.email||null,...c?{displayName:c}:{},providerSpecificData:{authMethod:"cli_poll",username:b.name||void 0,userId:b.user_id||void 0,zcodeJwtToken:a._zcodeJwtToken||void 0,zaiBusinessToken:a._zaiBusinessToken||void 0,...a._zaiRefreshToken?{zaiRefreshToken:a._zaiRefreshToken}:{}}}}}},86725:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.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(`${d.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 e=c.data||{};if(!e.apiKey||""===e.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(e.email?.trim()||e.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:e}},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})}},86857:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).DV,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":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy Intl state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy Intl 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":"www.codebuddy.ai","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:{}})}},93551:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(53129);let f={config:d.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let e=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,d.S6)(e);let f=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,g="idc"===c.authMethod?"idc":"builder-id",h=`https://oidc.${e}.amazonaws.com/client/register`,i=`https://oidc.${e}.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:f})});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:e,_authMethod:g,_startUrl:f}},pollToken:async(a,b,c,e)=>{let f,g=e?._region||"us-east-1";(0,d.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:e?._clientId,clientSecret:e?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{f=await i.json()}catch(a){f={error:"invalid_response",error_description:await i.text()}}return f.accessToken?{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:f.expiresIn,profile_arn:f?.profileArn||null,_clientId:e?._clientId,_clientSecret:e?._clientSecret,_region:e?._region,_authMethod:e?._authMethod,_startUrl:e?._startUrl}}:{ok:!1,data:{error:f.error||"authorization_pending",error_description:f.error_description||f.message}}},mapTokens:a=>{let b=(0,e.J_)(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||d.Tx.startUrl}}}}},99799:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).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:{}})}}};
@@ -1 +1 @@
1
- "use strict";exports.id=9046,exports.ids=[9046],exports.modules={13073:(a,b,c)=>{c.d(b,{DI:()=>i,DV:()=>z,LT:()=>j,MZ:()=>u,Nl:()=>y,Nu:()=>o,OV:()=>h,RY:()=>H,S6:()=>r,SK:()=>D,Td:()=>A,Tx:()=>p,WN:()=>s,Ww:()=>I,YT:()=>m,ZL:()=>l,_0:()=>F,aV:()=>t,cD:()=>n,eD:()=>E,f7:()=>x,hF:()=>k,lB:()=>v,oe:()=>C,qp:()=>B,sA:()=>G,w1:()=>w});var d=c(21820),e=c(63100),f=c(53223);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.qoder},l={...f.sr.iflow},m={...e.XP,...f.sr.antigravity,loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:g(),pluginType:2})};function n(){return{ideType:9,platform:g(),pluginType:2}}({...f.sr.openai});let o={...f.sr.github},p={...f.sr.kiro},q=/^[a-z]{2}-[a-z]+-\d{1,2}$/;function r(a){if("string"!=typeof a||!q.test(a))throw Error("Invalid region");return a}let s={...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"}},t={...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},u={...f.sr.kilocode},v={...f.sr.cline},w={...f.sr.clinepass},x={...f.sr.gitlab},y={...f.sr["codebuddy-cn"]},z={...f.sr["codebuddy-intl"]},A={...f.sr.kimchi},B={...f.sr["grok-cli"]},C={platformUrl:process.env.MIMO_PLATFORM_URL||"https://platform.xiaomimimo.com",defaultBaseUrl:"https://api.xiaomimimo.com/v1",kn:"mimocode",app:"MiMo",timeoutMs:3e5,pendingTtlMs:864e5},D={clientId:"ono9krqynydwx5",clientSecret:"-",loginGuidanceUrls:["https://api.marscode.com/cloudide/api/v3/trae/GetLoginGuidance","https://api.trae.ai/cloudide/api/v3/trae/GetLoginGuidance","https://www.trae.ai/cloudide/api/v3/trae/GetLoginGuidance"],apiOrigins:["https://api.marscode.com","https://api.trae.ai","https://www.trae.ai","https://www.marscode.com"],exchangeTokenPath:"/cloudide/api/v3/trae/oauth/ExchangeToken",getUserInfoPath:"/cloudide/api/v3/trae/GetUserInfo",authorizationPath:"/authorization",callbackPath:"/callback",minAppVersion:"3.5.54",defaultAppVersion:"3.5.54",defaultAppType:"stable",defaultPluginVersion:"local",defaultDeviceId:"0",userAgent:"Trae/1.0.0 antigravity-cockpit-tools",webUrl:"https://www.trae.ai",authScheme:"Cloud-IDE-JWT",tokenLifetimeDays:14,oauthTimeoutMs:6e5},E={clientId:"3GUryQ7ldAeKEuD2obYnppsnmj58eP5u",authBaseUrl:"https://www.windsurf.com",signInPath:"/windsurf/signin",registerApiBaseUrl:"https://register.windsurf.com",registerPath:"/exa.seat_management_pb.SeatManagementService/RegisterUser",oneTimeAuthPath:"/exa.seat_management_pb.SeatManagementService/GetOneTimeAuthToken",currentUserPath:"/exa.seat_management_pb.SeatManagementService/GetCurrentUser",planStatusPath:"/exa.seat_management_pb.SeatManagementService/GetPlanStatus",userStatusPath:"/exa.seat_management_pb.SeatManagementService/GetUserStatus",defaultApiServerUrl:"https://server.codeium.com",firebaseApiKey:"AIzaSyDsOl-1XpT5err0Tcn0TFFod1H8gVGIycY",callbackPath:"/windsurf-auth-callback",userAgent:"antigravity-cockpit-tools",oauthTimeoutMs:6e5},F={...f.sr.glm},G={...f.sr.muse},H={webBaseUrl:"https://zed.dev",cloudBaseUrl:"https://cloud.zed.dev",llmBaseUrl:"https://cloud.zed.dev",defaultNativeAppPort:58443,oauthTimeoutMs:6e5},I=3e5},25482:(a,b,c)=>{c.d(b,{Ue:()=>k,oT:()=>l});var d=c(53223);let e=d.xq.xai?.clientId,f="https://auth.x.ai",g="/oauth2/authorize",h="/oauth2/token",i="/.well-known/openid-configuration",j="/callback",k=96,l={clientId:e,issuer:f,authEndpointPath:g,tokenEndpointPath:h,discoveryPath:i,authorizeUrl:`${f}${g}`,tokenUrl:`${f}${h}`,discoveryUrl:`${f}${i}`,scope:"openid profile email offline_access grok-cli:access api:access",apiBaseUrl:"https://api.x.ai/v1",redirectUri:`http://127.0.0.1:56121${j}`,loopbackPort:56121,callbackPath:j,pkceVerifierBytes:96,refreshLeadSeconds:300,userAgent:"grok-cli/10router",codeChallengeMethod:"S256"}},47848:(a,b,c)=>{c.d(b,{$N:()=>f,OK:()=>g,Zl:()=>h,lz:()=>i});var d=c(55511),e=c.n(d);function f(a=32){return e().randomBytes(a).toString("base64url")}function g(a){return e().createHash("sha256").update(a).digest("base64url")}function h(){return e().randomBytes(32).toString("base64url")}function i(a=32){let b=f(a),c=g(b);return{codeVerifier:b,codeChallenge:c,state:h()}}}};
1
+ "use strict";exports.id=9046,exports.ids=[9046],exports.modules={13073:(a,b,c)=>{c.d(b,{DI:()=>i,DV:()=>z,LT:()=>j,MZ:()=>u,Nl:()=>y,Nu:()=>o,OV:()=>h,RY:()=>J,S6:()=>r,SK:()=>D,Td:()=>A,Tx:()=>p,Vv:()=>H,WN:()=>s,Ww:()=>K,YT:()=>m,ZL:()=>l,_0:()=>F,aV:()=>t,b3:()=>I,cD:()=>n,eD:()=>E,f7:()=>x,hF:()=>k,lB:()=>v,oe:()=>C,qp:()=>B,sA:()=>G,w1:()=>w});var d=c(21820),e=c(63100),f=c(53223);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.qoder},l={...f.sr.iflow},m={...e.XP,...f.sr.antigravity,loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:g(),pluginType:2})};function n(){return{ideType:9,platform:g(),pluginType:2}}({...f.sr.openai});let o={...f.sr.github},p={...f.sr.kiro},q=/^[a-z]{2}-[a-z]+-\d{1,2}$/;function r(a){if("string"!=typeof a||!q.test(a))throw Error("Invalid region");return a}let s={...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"}},t={...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},u={...f.sr.kilocode},v={...f.sr.cline},w={...f.sr.clinepass},x={...f.sr.gitlab},y={...f.sr["codebuddy-cn"]},z={...f.sr["codebuddy-intl"]},A={...f.sr.kimchi},B={...f.sr["grok-cli"]},C={platformUrl:process.env.MIMO_PLATFORM_URL||"https://platform.xiaomimimo.com",defaultBaseUrl:"https://api.xiaomimimo.com/v1",kn:"mimocode",app:"MiMo",timeoutMs:3e5,pendingTtlMs:864e5},D={clientId:"ono9krqynydwx5",clientSecret:"-",loginGuidanceUrls:["https://api.marscode.com/cloudide/api/v3/trae/GetLoginGuidance","https://api.trae.ai/cloudide/api/v3/trae/GetLoginGuidance","https://www.trae.ai/cloudide/api/v3/trae/GetLoginGuidance"],apiOrigins:["https://api.marscode.com","https://api.trae.ai","https://www.trae.ai","https://www.marscode.com"],exchangeTokenPath:"/cloudide/api/v3/trae/oauth/ExchangeToken",getUserInfoPath:"/cloudide/api/v3/trae/GetUserInfo",authorizationPath:"/authorization",callbackPath:"/callback",minAppVersion:"3.5.54",defaultAppVersion:"3.5.54",defaultAppType:"stable",defaultPluginVersion:"local",defaultDeviceId:"0",userAgent:"Trae/1.0.0 antigravity-cockpit-tools",webUrl:"https://www.trae.ai",authScheme:"Cloud-IDE-JWT",tokenLifetimeDays:14,oauthTimeoutMs:6e5},E={clientId:"3GUryQ7ldAeKEuD2obYnppsnmj58eP5u",authBaseUrl:"https://www.windsurf.com",signInPath:"/windsurf/signin",registerApiBaseUrl:"https://register.windsurf.com",registerPath:"/exa.seat_management_pb.SeatManagementService/RegisterUser",oneTimeAuthPath:"/exa.seat_management_pb.SeatManagementService/GetOneTimeAuthToken",currentUserPath:"/exa.seat_management_pb.SeatManagementService/GetCurrentUser",planStatusPath:"/exa.seat_management_pb.SeatManagementService/GetPlanStatus",userStatusPath:"/exa.seat_management_pb.SeatManagementService/GetUserStatus",defaultApiServerUrl:"https://server.codeium.com",firebaseApiKey:"AIzaSyDsOl-1XpT5err0Tcn0TFFod1H8gVGIycY",callbackPath:"/windsurf-auth-callback",userAgent:"antigravity-cockpit-tools",oauthTimeoutMs:6e5},F={...f.sr.glm},G={...f.sr.muse},H={...f.sr["minimax-code"]},I={...f.sr["minimax-code-global"]},J={webBaseUrl:"https://zed.dev",cloudBaseUrl:"https://cloud.zed.dev",llmBaseUrl:"https://cloud.zed.dev",defaultNativeAppPort:58443,oauthTimeoutMs:6e5},K=3e5},25467:(a,b,c)=>{c.d(b,{$N:()=>f,OK:()=>g,Zl:()=>h,lz:()=>i});var d=c(55511),e=c.n(d);function f(a=32){return e().randomBytes(a).toString("base64url")}function g(a){return e().createHash("sha256").update(a).digest("base64url")}function h(){return e().randomBytes(32).toString("base64url")}function i(a=32){let b=f(a),c=g(b);return{codeVerifier:b,codeChallenge:c,state:h()}}},25482:(a,b,c)=>{c.d(b,{Ue:()=>k,oT:()=>l});var d=c(53223);let e=d.xq.xai?.clientId,f="https://auth.x.ai",g="/oauth2/authorize",h="/oauth2/token",i="/.well-known/openid-configuration",j="/callback",k=96,l={clientId:e,issuer:f,authEndpointPath:g,tokenEndpointPath:h,discoveryPath:i,authorizeUrl:`${f}${g}`,tokenUrl:`${f}${h}`,discoveryUrl:`${f}${i}`,scope:"openid profile email offline_access grok-cli:access api:access",apiBaseUrl:"https://api.x.ai/v1",redirectUri:`http://127.0.0.1:56121${j}`,loopbackPort:56121,callbackPath:j,pkceVerifierBytes:96,refreshLeadSeconds:300,userAgent:"grok-cli/10router",codeChallengeMethod:"S256"}}};
@@ -1 +1 @@
1
- "use strict";exports.id=9154,exports.ids=[4575,6956,9154],exports.modules={46956:(a,b,c)=>{c.d(b,{proxyAwareFetch:()=>q});var d=c(27910),e=c(8735);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()}async function l(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,23)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,23)),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 m(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 n(a){let b=k(a);return b?/^[a-z][a-z0-9+.-]*:\/\//i.test(b)?b:`http://${b}`:null}async function o(a){let b=n(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));g.set(b,new a({uri:b}))}return g.get(b)}async function p(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,23)),g=await Promise.resolve().then(c.t.bind(c,91645,23)),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 q(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)return null;let c=k(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=k(b?.noProxy??b?.connectionNoProxy);return d&&m(a,d)?null:n(c)}(d,c),h=g?null:n(function(a){let b;if(m(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 o(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}`);if(c?.onProxyFallback)try{c.onProxyFallback(a)}catch{}console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await l(a.hostname);if(c)return await p(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}if(j)return f(a,b)}if(j)try{let c=await o(j);return await f(a,{...b,dispatcher:c})}catch(d){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${d.message}`);if(c?.onProxyFallback)try{c.onProxyFallback(d)}catch{}return console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${d.message}`),f(a,b)}let r=c?.proxyPoolId||c?.enabled===!0||c?.connectionProxyEnabled===!0||!!k(c?.url??c?.connectionProxyUrl);if(c?.strictProxy===!0&&r)throw Error("[ProxyFetch] Proxy required but none resolved (strictProxy=true)");return f(a,b)}async function r(a,b={}){return q(a,b,null)}globalThis.fetch!==r&&(globalThis.fetch=r)},48991:(a,b,c)=>{let d;c.d(b,{Cn:()=>n,Co:()=>x,IO:()=>A,Ic:()=>u,J5:()=>r,K:()=>s,NA:()=>z,QH:()=>o,Wu:()=>y,buildKimiHeaders:()=>B,go:()=>i,iO:()=>p,j5:()=>v,nZ:()=>t,sX:()=>j,uR:()=>q,x0:()=>l,zv:()=>w});var e=c(21820),f=c(52776),g=c(63100);let h=f.xq["gemini-cli"]?.cliVersion,i=f.xq["gemini-cli"]?.apiClient;function j(a="unknown"){let b;return`GeminiCLI/${h}/${a||"unknown"} (${(0,e.platform)()}; ${"ia32"===(b=(0,e.arch)())?"x86":b}; terminal)`}f.xq.codex?.cliVersion;let k=f.xq.github?.copilot||{},l={VSCODE_VERSION:k.vscodeVersion,COPILOT_CHAT_VERSION:k.chatVersion,USER_AGENT:k.userAgent,API_VERSION:k.apiVersion};function m(){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 n={ideType:9,platform:m(),pluginType:2},o="_ide",p=[{from:"You are a Claude agent, built on Anthropic's Claude Agent SDK.",to:""},{from:/You are Hermes(?: Agent)?(?:,\s*(?:an intelligent AI assistant|an AI assistant|an AI agent))?(?:,?\s*(?:built|created)\s+by\s+Nous Research)?\./gi,to:"You are an AI assistant."},{from:/opencode/gi,to:a=>"OpenCode"===a?"Antigravity":"OPENCODE"===a?"ANTIGRAVITY":"antigravity"},{from:/hermes-agent\.nousresearch\.com/gi,to:"antigravity.google.com"},{from:/hermes agent/gi,to:a=>a.startsWith("H")?"Antigravity":"antigravity"},{from:/nous research/gi,to:a=>a.startsWith("N")?"Google DeepMind":"google deepmind"},{from:/hermes-agent/gi,to:"antigravity"}],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:m(),pluginType:2})},v={"Content-Type":"application/json","User-Agent":g.Of},w={ideType:9,platform:m(),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}};function A(){if(d)return d;try{d=c(90053).rE||"0.0.0"}catch{d=process.env.npm_package_version||"0.0.0"}return d}function B(a){let b=(0,e.platform)(),c=(0,e.arch)(),d=`${b} ${c}`;"darwin"===b?d=`macOS ${c}`:"win32"===b?d=`Windows ${c}`:"linux"===b&&(d=`Linux ${c}`);let f="unknown";try{f=(0,e.hostname)()||"unknown"}catch{f="unknown"}let g="string"==typeof a&&a.trim()?a.trim():`kimi-${Date.now()}`;return{"X-Msh-Platform":"9router","X-Msh-Version":A(),"X-Msh-Device-Name":f,"X-Msh-Device-Model":d,"X-Msh-Device-Id":g}}},56463:(a,b,c)=>{c.d(b,{fd:()=>e,w$:()=>f});let d=c(90053).rE||"0.0.0";function e(a){if("string"!=typeof a)return"";let b=a.trim();return b?b.startsWith("workos:")?b:`workos:${b}`:""}function f(a,b={}){let c,g=(c=e(a))?`Bearer ${c}`:"",h={"HTTP-Referer":"https://cline.bot","X-Title":"Cline","User-Agent":`9Router/${d}`,"X-PLATFORM":process.platform||"unknown","X-PLATFORM-VERSION":process.version||"unknown","X-CLIENT-TYPE":"9router","X-CLIENT-VERSION":d,"X-CORE-VERSION":d,"X-IS-MULTIROOT":"false",...b};return g&&(h.Authorization=g),h}},79154:(a,b,c)=>{c.d(b,{Dz:()=>i,Vq:()=>l,fp:()=>j});var d=c(91628),e=c(53223);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){return h(a?.expiresAt??a?.tokenExpiresAt)}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}},91628:(a,b,c)=>{c.d(b,{oD:()=>E,Og:()=>G,jT:()=>F,Sc:()=>H,jR:()=>y,I9:()=>r,Ql:()=>v,$B:()=>M,pb:()=>J});var d=c(52776),e=c(48991),f=c(46956);let g=new Map;async function h(a,b,c,d){if(!b)return c();let e=`${a}:${b}`,f=g.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;g.delete(e)}let h=(async()=>{try{let a=await c();return g.set(e,{result:a,expiresAt:Date.now()+1e4}),a}catch(a){throw g.delete(e),a}})();return g.set(e,{promise:h}),h}var i=c(56463);let j=new Set(["login.microsoftonline.com","login.microsoft.com","login.windows.net"]);function k(a){return"string"==typeof a?a.trim():""}let l=null;async function m(a,b){return a?h("xai",a,async()=>{try{l||(l=new(await c.e(8749).then(c.bind(c,38749))).XaiService);let b=await l.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 n={claude:{bodyFormat:"json",includeClientSecret:!1,url:()=>e.NA.anthropic.token,dedupKey:"claude"},iflow:{url:()=>e.NA.iflow.token,dedupKey:"iflow",extraHeaders:(a,b)=>({Authorization:`Basic ${btoa(`${b.clientId}:${b.clientSecret}`)}`})},github:{url:()=>e.NA.github.token,dedupKey:"github",includeClientSecret:a=>!!a?.clientSecret},kimi:{dedupKey:"kimi",extraHeaders:a=>(0,e.buildKimiHeaders)(a?.providerSpecificData?.deviceId)}};async function o(a,b,c,e){let f=d.xq[a],g=n[a]||{},i=function(a,b,c){if(c?.url)try{return c.url()}catch{}return b?.refreshUrl||d.sr[a]?.tokenUrl||null}(a,f,g);return f&&i?b?h(g.dedupKey||a,b,async()=>{try{let d,h,j,{format:k,body:l}=(d=g?.bodyFormat==="json"?"json":"form",h=g?.includeClientSecret===void 0||("function"==typeof g.includeClientSecret?g.includeClientSecret(f):g.includeClientSecret),j={grant_type:"refresh_token",refresh_token:b,client_id:f.clientId},(h&&f.clientSecret&&(j.client_secret=f.clientSecret),"json"===d)?{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",...g.extraHeaders&&g.extraHeaders(c,f)||{}},n=await fetch(i,{method:"POST",headers:m,body:l});if(!n.ok){let b=await n.text();return e?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:n.status,error:b}),null}let o=await n.json();return e?.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,...g.parse&&g.parse(o)||{}}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},e):(e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function p(a,b,c){return o("kimi",a,b,c)}async function q(a,b){return o("claude",a,{},b)}async function r(a,b,c,d){return a?h(`google:${b}`,a,async()=>{try{let f=await fetch(e.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(!f.ok){let a=await f.text();return d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:f.status,error:a}),null}let g=await f.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}function s(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 t(a,b){return a?h("codex",a,async()=>{try{let c=await fetch(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:d.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text(),d=s(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 f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,hasIdToken:!!f.id_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,idToken:f.id_token,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function u(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(539),c.e(5692),c.e(5210),c.e(6492),c.e(9046)]).then(c.bind(c,46492));e=await a(b)}return e?{providerSpecificData:{profileArn:e}}:{}}async function v(a,b,c,e=null){return a?h("kiro",a,async()=>{let g=b?.authMethod,h=b?.clientId,i=b?.clientSecret,l=b?.region;if("external_idp"===g){let d;try{d=function(a,b={}){var c;let d=k(b.clientId||b.client_id),e=function(a){let b,c=k(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(!j.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(k).filter(Boolean).join(" "):k(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 g=await (0,f.proxyAwareFetch)(d.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:d.body},e);if(!g.ok){let a=await g.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro external_idp token",{status:g.status,error:a}),null}let h=await g.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro external_idp token",{hasNewAccessToken:!!h.access_token,hasNewRefreshToken:!!h.refresh_token,expiresIn:h.expires_in}),{accessToken:h.access_token,refreshToken:h.refresh_token||a,expiresIn:h.expires_in,providerSpecificData:d.providerSpecificData}}if(h&&i){let d="idc"===g&&l?`https://oidc.${l}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",j=await (0,f.proxyAwareFetch)(d,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:h,clientSecret:i,refreshToken:a,grantType:"refresh_token"})},e);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 k=await j.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!k.accessToken,expiresIn:k.expiresIn}),{accessToken:k.accessToken,refreshToken:k.refreshToken||a,expiresIn:k.expiresIn,...await u(b,k.accessToken,k.profileArn)}}let m=await (0,f.proxyAwareFetch)(d.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})},e);if(!m.ok){let a=await m.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:m.status,error:a}),null}let n=await m.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!n.accessToken,expiresIn:n.expiresIn}),{accessToken:n.accessToken,refreshToken:n.refreshToken||a,expiresIn:n.expiresIn,...await u(b,n.accessToken,n.profileArn)}},c):null}async function w(a,b){return o("iflow",a,{},b)}async function x(a,b){return o("github",a,{},b)}async function y(a,b){return a?h("copilot",a,async()=>{try{let c=await fetch(d.sr.github?.copilotTokenUrl,{headers:{Authorization:`token ${a}`,"User-Agent":e.x0.USER_AGENT,"Editor-Version":`vscode/${e.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${e.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":e.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 f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!f.token,expiresAt:f.expires_at}),{token:f.token,expiresAt:f.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function z(a,b){return a?h("codebuddy-cn",a,async()=>{let c=d.sr["codebuddy-cn"]||{},e=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(!e.ok){let a=await e.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy token",{status:e.status,error:a}),null}let f=await e.json();return 0===f.code&&f.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy token refresh returned no token",{code:f.code,msg:f.msg}),null)},b):null}async function A(a,b){return a?h("codebuddy-intl",a,async()=>{let c=d.sr["codebuddy-intl"]||{},e=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(!e.ok){let a=await e.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy intl token",{status:e.status,error:a}),null}let f=await e.json();return 0===f.code&&f.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy intl token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy intl token refresh returned no token",{code:f.code,msg:f.msg}),null)},b):null}async function B(a,b,c){if(!a)return null;let e=d.sr.trae||{},f=e.exchangeTokenUrl||e.tokenUrl;return f?h("trae",a,async()=>{try{let b,d=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"Trae/1.0.0 antigravity-cockpit-tools"},body:JSON.stringify({ClientID:e.clientId||"ono9krqynydwx5",RefreshToken:a,ClientSecret:e.clientSecret||"-",UserID:""})});if(!d.ok){let a=await d.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Trae token",{status:d.status,error:a}),null}let g=await d.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)}async function C(a,b){return b?.info?.("TOKEN_REFRESH","windsurf: apiKey is long-lived (no refresh_token flow) — skipping"),null}async function D(a,b,c){if(!b)return null;let e=(d.sr[a]||d.sr.cline||{}).refreshUrl;return e?h(a,b,async()=>{try{let d,f=await fetch(e,{method:"POST",headers:(0,i.w$)(null,{"Content-Type":"application/json",Accept:"application/json"}),body:JSON.stringify({refreshToken:b,grantType:"refresh_token",clientType:"extension"})});if(!f.ok){let b=await f.text(),d=s(b,f.status);if(d.permanent)return c?.error?.("TOKEN_REFRESH",`${a} refresh token invalid or expired — re-auth required`,{status:f.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return c?.error?.("TOKEN_REFRESH",`Failed to refresh ${a} token`,{status:f.status,error:b}),null}let g=await f.json(),h=g?.data||g,j=(0,i.fd)(h?.accessToken);if(!j)return c?.error?.("TOKEN_REFRESH",`${a} refresh returned no accessToken`,{payload:g}),null;let k=h?.refreshToken||b;if(h?.expiresAt){let a=new Date(h.expiresAt).getTime()-Date.now();Number.isFinite(a)&&a>0&&(d=Math.floor(a/1e3))}else"number"==typeof h?.expiresIn&&(d=h.expiresIn);return c?.info?.("TOKEN_REFRESH",`Successfully refreshed ${a} token`,{hasNewAccessToken:!0,hasNewRefreshToken:k!==b,expiresIn:d}),{accessToken:j,refreshToken:k,expiresIn:d}}catch(b){return c?.error?.("TOKEN_REFRESH",`${a} refresh error: ${b.message}`),null}},c):(c?.warn?.("TOKEN_REFRESH",`No Cline refreshUrl configured for ${a}`),null)}let E=3e5;function F(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 G(a){return e.Wu[a]?e.Wu[a]:"kimi-coding"===a&&e.Wu.kimi?e.Wu.kimi:E}function H(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 I=new Map;async function J(a,b){let d=a.client_email,f=I.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(1261).then(c.bind(c,91261));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),k=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(!k.ok){let a=await k.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:l,expires_in:m}=await k.json(),n=Date.now()+(m??3600)*1e3;return I.set(d,{token:l,expiresAt:n}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:l,expiresAt:n}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}function K(a,b){let c=H(a.apiKey);return c?J(c,b):null}let L={"gemini-cli":(a,b)=>r(a.refreshToken,d.xq["gemini-cli"].clientId,d.xq["gemini-cli"].clientSecret,b),antigravity:(a,b)=>r(a.refreshToken,d.xq.antigravity.clientId,d.xq.antigravity.clientSecret,b),claude:(a,b)=>q(a.refreshToken,b),codex:(a,b)=>t(a.refreshToken,b),iflow:(a,b)=>w(a.refreshToken,b),github:(a,b)=>x(a.refreshToken,b),kiro:(a,b)=>v(a.refreshToken,a.providerSpecificData,b),xai:(a,b)=>m(a.refreshToken,b),"grok-cli":(a,b)=>m(a.refreshToken,b),gcli:(a,b)=>m(a.refreshToken,b),"codebuddy-cn":(a,b)=>z(a.refreshToken,b),"codebuddy-intl":(a,b)=>A(a.refreshToken,b),trae:(a,b)=>B(a.refreshToken,a,b),cline:(a,b)=>D("cline",a.refreshToken,b),clinepass:(a,b)=>D("clinepass",a.refreshToken,b),zed:()=>null,windsurf:(a,b)=>C(a,b),kimi:(a,b)=>p(a.refreshToken,a,b),"kimi-coding":(a,b)=>p(a.refreshToken,a,b),vertex:K,"vertex-partner":K};async function M(a,b,c){if(!b.refreshToken)return null;let d=L[a];return d?d(b,c):o(a,b.refreshToken,b,c)}}};
1
+ "use strict";exports.id=9154,exports.ids=[4575,6956,9154],exports.modules={46956:(a,b,c)=>{c.d(b,{proxyAwareFetch:()=>q});var d=c(27910),e=c(8735);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()}async function l(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,23)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,23)),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 m(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 n(a){let b=k(a);return b?/^[a-z][a-z0-9+.-]*:\/\//i.test(b)?b:`http://${b}`:null}async function o(a){let b=n(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));g.set(b,new a({uri:b}))}return g.get(b)}async function p(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,23)),g=await Promise.resolve().then(c.t.bind(c,91645,23)),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 q(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)return null;let c=k(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=k(b?.noProxy??b?.connectionNoProxy);return d&&m(a,d)?null:n(c)}(d,c),h=g?null:n(function(a){let b;if(m(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 o(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}`);if(c?.onProxyFallback)try{c.onProxyFallback(a)}catch{}console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await l(a.hostname);if(c)return await p(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}if(j)return f(a,b)}if(j)try{let c=await o(j);return await f(a,{...b,dispatcher:c})}catch(d){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${d.message}`);if(c?.onProxyFallback)try{c.onProxyFallback(d)}catch{}return console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${d.message}`),f(a,b)}let r=c?.proxyPoolId||c?.enabled===!0||c?.connectionProxyEnabled===!0||!!k(c?.url??c?.connectionProxyUrl);if(c?.strictProxy===!0&&r)throw Error("[ProxyFetch] Proxy required but none resolved (strictProxy=true)");return f(a,b)}async function r(a,b={}){return q(a,b,null)}globalThis.fetch!==r&&(globalThis.fetch=r)},47153:(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(52776),e=c(48991),f=c(98125);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(1261).then(c.bind(c,91261));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={"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),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)("cline",a.refreshToken,b),clinepass:(a,b)=>(0,f.Il)("clinepass",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),"minimax-code":(a,b)=>(0,f.refreshMinimaxCodeToken)("minimax-code",a.refreshToken,b),"minimax-code-global":(a,b)=>(0,f.refreshMinimaxCodeToken)("minimax-code-global",a.refreshToken,b),vertex:m,"vertex-partner":m};async function o(a,b,c){if(!b.refreshToken)return null;let d=n[a];return d?d(b,c):(0,f.J1)(a,b.refreshToken,b,c)}},48991:(a,b,c)=>{let d;c.d(b,{Cn:()=>n,Co:()=>x,IO:()=>A,Ic:()=>u,J5:()=>r,K:()=>s,NA:()=>z,QH:()=>o,Wu:()=>y,buildKimiHeaders:()=>B,go:()=>i,iO:()=>p,j5:()=>v,nZ:()=>t,sX:()=>j,uR:()=>q,x0:()=>l,zv:()=>w});var e=c(21820),f=c(52776),g=c(63100);let h=f.xq["gemini-cli"]?.cliVersion,i=f.xq["gemini-cli"]?.apiClient;function j(a="unknown"){let b;return`GeminiCLI/${h}/${a||"unknown"} (${(0,e.platform)()}; ${"ia32"===(b=(0,e.arch)())?"x86":b}; terminal)`}f.xq.codex?.cliVersion;let k=f.xq.github?.copilot||{},l={VSCODE_VERSION:k.vscodeVersion,COPILOT_CHAT_VERSION:k.chatVersion,USER_AGENT:k.userAgent,API_VERSION:k.apiVersion};function m(){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 n={ideType:9,platform:m(),pluginType:2},o="_ide",p=[{from:"You are a Claude agent, built on Anthropic's Claude Agent SDK.",to:""},{from:/You are Hermes(?: Agent)?(?:,\s*(?:an intelligent AI assistant|an AI assistant|an AI agent))?(?:,?\s*(?:built|created)\s+by\s+Nous Research)?\./gi,to:"You are an AI assistant."},{from:/opencode/gi,to:a=>"OpenCode"===a?"Antigravity":"OPENCODE"===a?"ANTIGRAVITY":"antigravity"},{from:/hermes-agent\.nousresearch\.com/gi,to:"antigravity.google.com"},{from:/hermes agent/gi,to:a=>a.startsWith("H")?"Antigravity":"antigravity"},{from:/nous research/gi,to:a=>a.startsWith("N")?"Google DeepMind":"google deepmind"},{from:/hermes-agent/gi,to:"antigravity"}],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:m(),pluginType:2})},v={"Content-Type":"application/json","User-Agent":g.Of},w={ideType:9,platform:m(),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}};function A(){if(d)return d;try{d=c(90053).rE||"0.0.0"}catch{d=process.env.npm_package_version||"0.0.0"}return d}function B(a){let b=(0,e.platform)(),c=(0,e.arch)(),d=`${b} ${c}`;"darwin"===b?d=`macOS ${c}`:"win32"===b?d=`Windows ${c}`:"linux"===b&&(d=`Linux ${c}`);let f="unknown";try{f=(0,e.hostname)()||"unknown"}catch{f="unknown"}let g="string"==typeof a&&a.trim()?a.trim():`kimi-${Date.now()}`;return{"X-Msh-Platform":"9router","X-Msh-Version":A(),"X-Msh-Device-Name":f,"X-Msh-Device-Model":d,"X-Msh-Device-Id":g}}},56463:(a,b,c)=>{c.d(b,{fd:()=>e,w$:()=>f});let d=c(90053).rE||"0.0.0";function e(a){if("string"!=typeof a)return"";let b=a.trim();return b?b.startsWith("workos:")?b:`workos:${b}`:""}function f(a,b={}){let c,g=(c=e(a))?`Bearer ${c}`:"",h={"HTTP-Referer":"https://cline.bot","X-Title":"Cline","User-Agent":`9Router/${d}`,"X-PLATFORM":process.platform||"unknown","X-PLATFORM-VERSION":process.version||"unknown","X-CLIENT-TYPE":"9router","X-CLIENT-VERSION":d,"X-CORE-VERSION":d,"X-IS-MULTIROOT":"false",...b};return g&&(h.Authorization=g),h}},79154:(a,b,c)=>{c.d(b,{Dz:()=>i,Vq:()=>l,fp:()=>j});var d=c(47153),e=c(53223);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){return h(a?.expiresAt??a?.tokenExpiresAt)}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}},98125:(a,b,c)=>{c.d(b,{J1:()=>o,ge:()=>q,Il:()=>F,XB:()=>A,SO:()=>z,Wm:()=>t,jR:()=>y,EF:()=>x,I9:()=>r,AH:()=>w,ng:()=>p,Ql:()=>v,refreshMinimaxCodeToken:()=>B,RM:()=>C,p9:()=>E,r_:()=>m,wt:()=>D});var d=c(52776),e=c(48991),f=c(46956);let g=new Map;async function h(a,b,c,d){if(!b)return c();let e=`${a}:${b}`,f=g.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;g.delete(e)}let h=(async()=>{try{let a=await c();return g.set(e,{result:a,expiresAt:Date.now()+1e4}),a}catch(a){throw g.delete(e),a}})();return g.set(e,{promise:h}),h}var i=c(56463);let j=new Set(["login.microsoftonline.com","login.microsoft.com","login.windows.net"]);function k(a){return"string"==typeof a?a.trim():""}let l=null;async function m(a,b){return a?h("xai",a,async()=>{try{l||(l=new(await c.e(8749).then(c.bind(c,38749))).XaiService);let b=await l.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 n={claude:{bodyFormat:"json",includeClientSecret:!1,url:()=>e.NA.anthropic.token,dedupKey:"claude"},iflow:{url:()=>e.NA.iflow.token,dedupKey:"iflow",extraHeaders:(a,b)=>({Authorization:`Basic ${btoa(`${b.clientId}:${b.clientSecret}`)}`})},github:{url:()=>e.NA.github.token,dedupKey:"github",includeClientSecret:a=>!!a?.clientSecret},kimi:{dedupKey:"kimi",extraHeaders:a=>(0,e.buildKimiHeaders)(a?.providerSpecificData?.deviceId)}};async function o(a,b,c,e){let f=d.xq[a],g=n[a]||{},i=function(a,b,c){if(c?.url)try{return c.url()}catch{}return b?.refreshUrl||d.sr[a]?.tokenUrl||null}(a,f,g);return f&&i?b?h(g.dedupKey||a,b,async()=>{try{let d,h,j,{format:k,body:l}=(d=g?.bodyFormat==="json"?"json":"form",h=g?.includeClientSecret===void 0||("function"==typeof g.includeClientSecret?g.includeClientSecret(f):g.includeClientSecret),j={grant_type:"refresh_token",refresh_token:b,client_id:f.clientId},(h&&f.clientSecret&&(j.client_secret=f.clientSecret),"json"===d)?{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",...g.extraHeaders&&g.extraHeaders(c,f)||{}},n=await fetch(i,{method:"POST",headers:m,body:l});if(!n.ok){let b=await n.text();return e?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:n.status,error:b}),null}let o=await n.json();return e?.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,...g.parse&&g.parse(o)||{}}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},e):(e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function p(a,b,c){return o("kimi",a,b,c)}async function q(a,b){return o("claude",a,{},b)}async function r(a,b,c,d){return a?h(`google:${b}`,a,async()=>{try{let f=await fetch(e.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(!f.ok){let a=await f.text();return d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:f.status,error:a}),null}let g=await f.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}function s(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 t(a,b){return a?h("codex",a,async()=>{try{let c=await fetch(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:d.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text(),d=s(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 f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,hasIdToken:!!f.id_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,idToken:f.id_token,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function u(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(539),c.e(5692),c.e(5210),c.e(6492),c.e(9046)]).then(c.bind(c,46492));e=await a(b)}return e?{providerSpecificData:{profileArn:e}}:{}}async function v(a,b,c,e=null){return a?h("kiro",a,async()=>{let g=b?.authMethod,h=b?.clientId,i=b?.clientSecret,l=b?.region;if("external_idp"===g){let d;try{d=function(a,b={}){var c;let d=k(b.clientId||b.client_id),e=function(a){let b,c=k(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(!j.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(k).filter(Boolean).join(" "):k(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 g=await (0,f.proxyAwareFetch)(d.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:d.body},e);if(!g.ok){let a=await g.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro external_idp token",{status:g.status,error:a}),null}let h=await g.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro external_idp token",{hasNewAccessToken:!!h.access_token,hasNewRefreshToken:!!h.refresh_token,expiresIn:h.expires_in}),{accessToken:h.access_token,refreshToken:h.refresh_token||a,expiresIn:h.expires_in,providerSpecificData:d.providerSpecificData}}if(h&&i){let d="idc"===g&&l?`https://oidc.${l}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",j=await (0,f.proxyAwareFetch)(d,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:h,clientSecret:i,refreshToken:a,grantType:"refresh_token"})},e);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 k=await j.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!k.accessToken,expiresIn:k.expiresIn}),{accessToken:k.accessToken,refreshToken:k.refreshToken||a,expiresIn:k.expiresIn,...await u(b,k.accessToken,k.profileArn)}}let m=await (0,f.proxyAwareFetch)(d.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})},e);if(!m.ok){let a=await m.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:m.status,error:a}),null}let n=await m.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!n.accessToken,expiresIn:n.expiresIn}),{accessToken:n.accessToken,refreshToken:n.refreshToken||a,expiresIn:n.expiresIn,...await u(b,n.accessToken,n.profileArn)}},c):null}async function w(a,b){return o("iflow",a,{},b)}async function x(a,b){return o("github",a,{},b)}async function y(a,b){return a?h("copilot",a,async()=>{try{let c=await fetch(d.sr.github?.copilotTokenUrl,{headers:{Authorization:`token ${a}`,"User-Agent":e.x0.USER_AGENT,"Editor-Version":`vscode/${e.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${e.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":e.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 f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!f.token,expiresAt:f.expires_at}),{token:f.token,expiresAt:f.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function z(a,b){return a?h("codebuddy-cn",a,async()=>{let c=d.sr["codebuddy-cn"]||{},e=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(!e.ok){let a=await e.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy token",{status:e.status,error:a}),null}let f=await e.json();return 0===f.code&&f.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy token refresh returned no token",{code:f.code,msg:f.msg}),null)},b):null}async function A(a,b){return a?h("codebuddy-intl",a,async()=>{let c=d.sr["codebuddy-intl"]||{},e=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(!e.ok){let a=await e.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy intl token",{status:e.status,error:a}),null}let f=await e.json();return 0===f.code&&f.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy intl token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy intl token refresh returned no token",{code:f.code,msg:f.msg}),null)},b):null}async function B(a,b,c,e=null){return b?h(a,b,async()=>{let g=d.sr[a],h=g?.tokenUrl||("minimax-code-global"===a?"https://account.minimax.io/oauth2/token":"https://account.minimax.cn/oauth2/token");try{let d=await (0,f.proxyAwareFetch)(h,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",client_id:g?.clientId||"mcode-public",refresh_token:b}).toString()},e);if(!d.ok){let b=await d.text(),e=s(d.status,b);if(c?.warn?.("TOKEN_REFRESH",`Failed to refresh MiniMax Code token (${a})`,{status:d.status,error:b,code:e.code,permanent:e.permanent}),e.permanent)return{error:e.code||"invalid_grant"};return null}let i=await d.json();return c?.info?.("TOKEN_REFRESH",`Successfully refreshed MiniMax Code token (${a})`,{hasNewAccessToken:!!i.access_token,hasNewRefreshToken:!!i.refresh_token,expiresIn:i.expires_in}),{accessToken:i.access_token,refreshToken:i.refresh_token||b,expiresIn:i.expires_in}}catch(b){return c?.error?.("TOKEN_REFRESH",`Network error refreshing MiniMax Code token (${a}): ${b.message}`),null}},c):null}async function C(a,b,c){if(!a)return null;let e=d.sr.trae||{},f=e.exchangeTokenUrl||e.tokenUrl;return f?h("trae",a,async()=>{try{let b,d=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"Trae/1.0.0 antigravity-cockpit-tools"},body:JSON.stringify({ClientID:e.clientId||"ono9krqynydwx5",RefreshToken:a,ClientSecret:e.clientSecret||"-",UserID:""})});if(!d.ok){let a=await d.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Trae token",{status:d.status,error:a}),null}let g=await d.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 D(){return null}async function E(a,b){return b?.info?.("TOKEN_REFRESH","windsurf: apiKey is long-lived (no refresh_token flow) — skipping"),null}async function F(a,b,c){if(!b)return null;let e=(d.sr[a]||d.sr.cline||{}).refreshUrl;return e?h(a,b,async()=>{try{let d,f=await fetch(e,{method:"POST",headers:(0,i.w$)(null,{"Content-Type":"application/json",Accept:"application/json"}),body:JSON.stringify({refreshToken:b,grantType:"refresh_token",clientType:"extension"})});if(!f.ok){let b=await f.text(),d=s(b,f.status);if(d.permanent)return c?.error?.("TOKEN_REFRESH",`${a} refresh token invalid or expired — re-auth required`,{status:f.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return c?.error?.("TOKEN_REFRESH",`Failed to refresh ${a} token`,{status:f.status,error:b}),null}let g=await f.json(),h=g?.data||g,j=(0,i.fd)(h?.accessToken);if(!j)return c?.error?.("TOKEN_REFRESH",`${a} refresh returned no accessToken`,{payload:g}),null;let k=h?.refreshToken||b;if(h?.expiresAt){let a=new Date(h.expiresAt).getTime()-Date.now();Number.isFinite(a)&&a>0&&(d=Math.floor(a/1e3))}else"number"==typeof h?.expiresIn&&(d=h.expiresIn);return c?.info?.("TOKEN_REFRESH",`Successfully refreshed ${a} token`,{hasNewAccessToken:!0,hasNewRefreshToken:k!==b,expiresIn:d}),{accessToken:j,refreshToken:k,expiresIn:d}}catch(b){return c?.error?.("TOKEN_REFRESH",`${a} refresh error: ${b.message}`),null}},c):(c?.warn?.("TOKEN_REFRESH",`No Cline refreshUrl configured for ${a}`),null)}}};
@@ -1 +1 @@
1
- "use strict";exports.id=939,exports.ids=[939],exports.modules={30939:(a,b,c)=>{c.d(b,{default:()=>d});let d={id:"codebuddy-intl",alias:"cbai",uiAlias:"cbai",hidden:!1,priority:90,display:{name:"CodeBuddy",icon:"smart_toy",color:"#006EFF",website:"https://www.codebuddy.ai",notice:{signupUrl:"https://www.codebuddy.ai",webUrl:"https://www.codebuddy.ai/agents"}},category:"oauth",authModes:["oauth","apikey"],hasOAuth:!0,transport:{baseUrl:"https://www.codebuddy.ai/v2/chat/completions",forceStream:!0,thinkingFormat:"openai",headers:{"User-Agent":"IDE/2.108.1 CodeBuddy/2.108.1","X-Product":"SaaS","X-IDE-Type":"IDE","X-IDE-Name":"IDE","x-requested-with":"XMLHttpRequest","x-codebuddy-request":"1"},auth:{combined:!0,header:"Authorization",scheme:"bearer"},usage:{url:"https://www.codebuddy.ai/v2/billing/meter/get-user-resource"}},models:[{id:"hy4-preview",name:"Hy4-Preview",rateMultiplier:0},{id:"hy3",name:"Hy3",rateMultiplier:0},{id:"gpt-6-astra",name:"GPT 6.0 Astra",rateMultiplier:6.67},{id:"gpt-6-luna",name:"GPT-6-Luna"},{id:"gpt-6-sol",name:"GPT-6-Sol"},{id:"gpt-5.6-sol",name:"GPT-5.6-Sol",rateMultiplier:3.47},{id:"gpt-5.6-terra",name:"GPT-5.6-Terra",rateMultiplier:1.39},{id:"gpt-5.6-luna",name:"GPT-5.6-Luna",rateMultiplier:.14},{id:"gpt-5.5",name:"GPT-5.5",rateMultiplier:3.31},{id:"gpt-5.4",name:"GPT-5.4",rateMultiplier:1.65},{id:"gpt-5.3-codex",name:"GPT-5.3-Codex",rateMultiplier:1.25},{id:"gemini-3.5-flash",name:"Gemini-3.5-Flash",rateMultiplier:.99},{id:"glm-5v-turbo",name:"GLM-5v-Turbo",rateMultiplier:.71},{id:"glm-5.3",name:"GLM-5.3",rateMultiplier:.79},{id:"glm-5.3-flash",name:"GLM-5.3-Flash",rateMultiplier:.06},{id:"glm-5.2",name:"GLM-5.2",rateMultiplier:.79},{id:"glm-5.1",name:"GLM-5.1",rateMultiplier:.79},{id:"minimax-m3",name:"MiniMax-M3",rateMultiplier:.25},{id:"kimi-k3",name:"Kimi-K3",rateMultiplier:1.62},{id:"kimi-k2.7",name:"Kimi-K2.7-Code",rateMultiplier:.57},{id:"kimi-k2.6",name:"Kimi-K2.6",rateMultiplier:.52},{id:"deepseek-v4.1-flash",name:"DeepSeek-V4.1-Flash",rateMultiplier:.11}],oauth:{baseUrl:"https://www.codebuddy.ai",stateUrl:"https://www.codebuddy.ai/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.ai/v2/plugin/auth/token",refreshUrl:"https://www.codebuddy.ai/v2/plugin/auth/token/refresh",userAgent:"IDE/2.63.2 CodeBuddy/2.63.2",platform:"ide",pollInterval:5e3},features:{usage:!0,usageApikey:!0}}}};
1
+ "use strict";exports.id=939,exports.ids=[939],exports.modules={30939:(a,b,c)=>{c.d(b,{default:()=>d});let d={id:"codebuddy-intl",alias:"cbai",uiAlias:"cbai",hidden:!1,priority:90,display:{name:"CodeBuddy",icon:"smart_toy",color:"#006EFF",website:"https://www.codebuddy.ai",notice:{signupUrl:"https://www.codebuddy.ai",webUrl:"https://www.codebuddy.ai/agents"}},category:"oauth",authModes:["oauth","apikey"],hasOAuth:!0,transport:{baseUrl:"https://www.codebuddy.ai/v2/chat/completions",forceStream:!0,thinkingFormat:"openai",headers:{"User-Agent":"IDE/2.108.1 CodeBuddy/2.108.1","X-Product":"SaaS","X-IDE-Type":"IDE","X-IDE-Name":"IDE","x-requested-with":"XMLHttpRequest","x-codebuddy-request":"1"},auth:{combined:!0,header:"Authorization",scheme:"bearer"},usage:{url:"https://www.codebuddy.ai/v2/billing/meter/get-user-resource"}},models:[{id:"hy4-preview",name:"Hy4-Preview",rateMultiplier:0},{id:"hy3",name:"Hy3",rateMultiplier:0},{id:"gpt-6-astra",name:"GPT 6.0 Astra",rateMultiplier:6.67},{id:"gpt-6-luna",name:"GPT-6-Luna"},{id:"gpt-6-sol",name:"GPT-6-Sol"},{id:"gpt-5.6-sol",name:"GPT-5.6-Sol",rateMultiplier:3.47},{id:"gpt-5.6-terra",name:"GPT-5.6-Terra",rateMultiplier:1.39},{id:"gpt-5.6-luna",name:"GPT-5.6-Luna",rateMultiplier:.14},{id:"gpt-5.5",name:"GPT-5.5",rateMultiplier:3.31},{id:"gpt-5.4",name:"GPT-5.4",rateMultiplier:1.65},{id:"gpt-5.3-codex",name:"GPT-5.3-Codex",rateMultiplier:1.25},{id:"gpt-6.1-sol",name:"GPT-6.1-Sol"},{id:"claude-opus-5.5",name:"Claude-Opus-5.5",rateMultiplier:2.17,paidTier:!0},{id:"claude-sonnet-5.5",name:"Claude-Sonnet-5.5",rateMultiplier:1.33,paidTier:!0},{id:"claude-opus-5",name:"Claude-Opus-5",rateMultiplier:3.33,paidTier:!0},{id:"claude-sonnet-5",name:"Claude-Sonnet-5",rateMultiplier:1.33,paidTier:!0},{id:"claude-opus-4.8",name:"Claude-Opus-4.8",rateMultiplier:3.33,paidTier:!0},{id:"claude-opus-4.7",name:"Claude-Opus-4.7",rateMultiplier:3.33,paidTier:!0},{id:"claude-opus-4.6",name:"Claude-Opus-4.6",rateMultiplier:3.33,paidTier:!0},{id:"claude-sonnet-4.6",name:"Claude-Sonnet-4.6",rateMultiplier:1.33,paidTier:!0},{id:"gemini-3.8-flash",name:"Gemini-3.8-Flash"},{id:"grok-4.7",name:"Grok-4.7",rateMultiplier:1.9},{id:"space-bunny",name:"Space-Bunny",rateMultiplier:.08},{id:"gemini-3.5-flash",name:"Gemini-3.5-Flash",rateMultiplier:.99},{id:"glm-5v-turbo",name:"GLM-5v-Turbo",rateMultiplier:.71},{id:"glm-5.3",name:"GLM-5.3",rateMultiplier:.79},{id:"glm-5.3-flash",name:"GLM-5.3-Flash",rateMultiplier:.06},{id:"glm-5.2",name:"GLM-5.2",rateMultiplier:.79},{id:"glm-5.1",name:"GLM-5.1",rateMultiplier:.79},{id:"minimax-m3",name:"MiniMax-M3",rateMultiplier:.25},{id:"kimi-k3",name:"Kimi-K3",rateMultiplier:1.62},{id:"kimi-k2.7",name:"Kimi-K2.7-Code",rateMultiplier:.57},{id:"kimi-k2.8-preview",name:"Kimi-K2.8-Preview",rateMultiplier:.77,subPriority:!0},{id:"kimi-k2.6",name:"Kimi-K2.6",rateMultiplier:.52},{id:"deepseek-v4.1-flash",name:"DeepSeek-V4.1-Flash",rateMultiplier:.11}],oauth:{baseUrl:"https://www.codebuddy.ai",stateUrl:"https://www.codebuddy.ai/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.ai/v2/plugin/auth/token",refreshUrl:"https://www.codebuddy.ai/v2/plugin/auth/token/refresh",userAgent:"IDE/2.63.2 CodeBuddy/2.63.2",platform:"ide",pollInterval:5e3},features:{usage:!0,usageApikey:!0}}}};
@@ -0,0 +1,6 @@
1
+ exports.id=9417,exports.ids=[1998,3662,4755,5527,6457,8838,9417],exports.modules={3662:(a,b,c)=>{"use strict";c.d(b,{$e:()=>i,AZ:()=>m,Dt:()=>k,EQ:()=>f,LY:()=>d,O:()=>e,X8:()=>j,fh:()=>h,qS:()=>o,t2:()=>l,wf:()=>g,yD:()=>n});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"},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:"Not found (wrong endpoint path, or the model does not exist)",406:"Model not supported",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:3e5,maxLevel:15},g=3e4,h=18e5,i=864e5,j={short:6e4,long:6e5},k=3e5,l=[{provider:"codex",text:"model is not supported when using codex with a chatgpt account",cooldownMs:18e5},{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"unapproved channel",channelScope:!0,cooldownMs:j.short},{text:"illegal api invocation",channelScope:!0,cooldownMs:j.short},{text:"improperly formed request",cooldownMs:12e4},{text:"mimo desktop account",cooldownMs:0},{text:"real-name verification",cooldownMs:0},{text:"realname verification",cooldownMs:0},{text:"bind your alibaba cloud account",cooldownMs:0},{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:429,backoff:!0}],m=/real-name verification|realname|\bface verification\b|实名认证|bind your alibaba cloud account/i,n={"stepfun-plan-cn":"StepFun CN 的 Step Plan 免费套餐要求账号先完成实名(人脸)核验,未完成时上游一律拒绝,与本机额度、与 10Router 都无关。出路:1. 打开 https://account.stepfun.com/security?action=realname 完成人脸核验后重试(推荐);2. 或改用按量计费的 stepfun-cn 渠道(扣现金/代金券,无实名要求)。该账号不会被锁定,但在实名完成前每次调用都会得到这条提示。",modelscope:"ModelScope 魔搭要求账号先绑定阿里云账号(实名认证)才能使用免费推理 API。出路:打开 https://modelscope.cn/my/account 完成第三方账号「阿里云」绑定后重试。"},o="上游要求该账号先完成实名认证(real-name verification),未完成前所有调用都会被拒绝;请按上游提示的地址完成核验后重试。"},7803:(a,b,c)=>{"use strict";c.r(b),c.d(b,{debug:()=>o,error:()=>r,errorLine:()=>l,fmtThink:()=>m,info:()=>p,line:()=>k,maskKey:()=>v,nextTag:()=>i,request:()=>s,response:()=>t,stream:()=>u,tagForSession:()=>j,warn:()=>q});let d={DEBUG:0,INFO:1,WARN:2,ERROR:3},e=d[process.env.LOG_LEVEL?.toUpperCase?.()]??d.INFO;function f(){return new Date().toLocaleTimeString("en-US",{hour12:!1})}let g=["\uD83D\uDFE2","\uD83D\uDD35","\uD83D\uDFE3","\uD83D\uDFE1","\uD83D\uDFE0","\uD83D\uDD34","⚪","\uD83D\uDFE4"],h=0;function i(){let a=g[h%g.length];return h++,a}function j(a){if(!a)return i();let b=0;for(let c=0;c<a.length;c++)b=31*b+a.charCodeAt(c)|0;return g[Math.abs(b)%g.length]}function k(a,b,c){e>d.INFO||console.log(`[${f()}] ${a} ${b} ${c}`)}function l(a,b,c){console.log(`[${f()}] ${a} ${b} ${c}`)}function m(a){return a&&a.mode?"none"===a.mode?"off":"auto"===a.mode?"auto":"budget"===a.mode?a.budget>=1e3?`${Math.round(a.budget/1e3)}k`:`${a.budget}`:"level"===a.mode?a.level:null:null}function n(a){if(!a)return"";if("string"==typeof a)return a;try{return JSON.stringify(a)}catch{return String(a)}}function o(a,b,c){if(e<=d.DEBUG){let d=c?` ${n(c)}`:"";console.log(`[${f()}] 🔍 [${a}] ${b}${d}`)}}function p(a,b,c){if(e<=d.INFO){let d=c?` ${n(c)}`:"";console.log(`[${f()}] ℹ️ [${a}] ${b}${d}`)}}function q(a,b,c){if(e<=d.WARN){let d=c?` ${n(c)}`:"";console.warn(`[${f()}] ⚠️ [${a}] ${b}${d}`)}}function r(a,b,c){if(e<=d.ERROR){let d=c?` ${n(c)}`:"";console.log(`[${f()}] ❌ [${a}] ${b}${d}`)}}function s(a,b,c){let d=c?` ${n(c)}`:"";console.log(`\x1b[36m[${f()}] 📥 ${a} ${b}${d}\x1b[0m`)}function t(a,b,c){let d=c?` ${n(c)}`:"";console.log(`[${f()}] ${a<400?"\uD83D\uDCE4":"\uD83D\uDCA5"} ${a} (${b}ms)${d}`)}function u(a,b){let c=b?` ${n(b)}`:"";console.log(`[${f()}] 🌊 [STREAM] ${a}${c}`)}function v(a){return!a||a.length<8?"***":`${a.slice(0,4)}...${a.slice(-4)}`}},29679:(a,b,c)=>{"use strict";c.d(b,{cW:()=>l});var d=c(94755),e=c(55511),f=c(8590);let g="1.0.0",h="0.10.32",i="us-east-1",j=new Map;async function k(a,b){let c,f,j,k=a?.providerSpecificData?.profileArn||"",l=function(a){if(!a||"string"!=typeof a)return i;let b=a.split(":");return b.length>=4&&b[3]?b[3]:i}(k),m=new URLSearchParams;m.set("origin","AI_EDITOR"),k&&m.set("profileArn",k);let n=`https://q.${l}.amazonaws.com/ListAvailableModels?${m.toString()}`,o={...(f=a?.providerSpecificData?.clientId||a?.refreshToken||a?.providerSpecificData?.profileArn||a?.accessToken||"kiro-anonymous",j=(0,e.createHash)("sha256").update(String(f)).digest("hex"),{"User-Agent":`aws-sdk-js/${g} ua/2.1 os/windows#10.0.26200 lang/js md/nodejs#22.21.1 api/codewhispererruntime#${g} m/N,E KiroIDE-${h}-${j}`,"x-amz-user-agent":`aws-sdk-js/${g} KiroIDE-${h}-${j}`,"x-amzn-kiro-agent-mode":"vibe","x-amzn-codewhisperer-optout":"true","amz-sdk-request":"attempt=1; max=1","amz-sdk-invocation-id":(0,d.A)(),Accept:"application/json"}),Authorization:`Bearer ${a?.accessToken||""}`},p=new AbortController,q=setTimeout(()=>p.abort("timeout"),3e4);b&&"function"==typeof b.addEventListener&&b.addEventListener("abort",()=>p.abort(b.reason));try{c=await fetch(n,{method:"GET",headers:o,signal:p.signal})}finally{clearTimeout(q)}if(!c.ok){let a=await c.text().catch(()=>""),b=Error(`Kiro ListAvailableModels ${c.status}: ${a||c.statusText}`);throw b.status=c.status,b.body=a,b}let r=await c.json();return Array.isArray(r?.models)?r.models:[]}async function l(a,b={}){let c,d,g;if(!a||!a.accessToken)return b.log?.debug?.("KIRO_MODELS","No accessToken; skipping live fetch"),null;let h=(g=(d=a?.providerSpecificData||{}).profileArn||d.clientId||a?.refreshToken||a?.accessToken||"anonymous",(0,e.createHash)("sha256").update(`kiro:${g}`).digest("hex")),i=Date.now();if(!b.forceRefresh){let a=j.get(h);if(a&&a.expiresAt>i)return{models:a.models,rawModels:a.rawModels}}try{c=await k(a,b.signal)}catch(d){if(!d||401!==d.status||!a.refreshToken)return b.log?.warn?.("KIRO_MODELS",`ListAvailableModels failed: ${d?.message||d}`),null;{b.log?.info?.("KIRO_MODELS","Got 401 from Kiro; refreshing token");let d=await (0,f.Ql)(a.refreshToken,a.providerSpecificData,b.log);if(!d?.accessToken)return b.log?.warn?.("KIRO_MODELS","Token refresh did not return accessToken"),null;{let e={...a,...d};if("function"==typeof b.onCredentialsRefreshed)try{await b.onCredentialsRefreshed(d)}catch(a){b.log?.warn?.("KIRO_MODELS",`onCredentialsRefreshed failed: ${a?.message||a}`)}try{c=await k(e,b.signal),a.accessToken=e.accessToken,e.refreshToken&&(a.refreshToken=e.refreshToken)}catch(a){return b.log?.warn?.("KIRO_MODELS",`Retry after refresh failed: ${a?.message||a}`),null}}}}let m=[];for(let a of c){if(!a||"object"!=typeof a)continue;let b=a.modelId||a.id;if(!b)continue;let c=function(a,b,c){let d=(a||b||"Kiro").trim(),e=Number(c);if(!Number.isFinite(e)||1e-9>Math.abs(e-1)||e<=0)return`Kiro ${d}`;let f=e.toFixed(1).replace(",",".");return`Kiro ${d} (${f}x credit)`}(a.modelName,b,a.rateMultiplier),d=Number(a?.tokenLimits?.maxInputTokens)||2e5;for(let e of function(a,b){let c,d=((c=a).endsWith("-agentic")&&(c=c.slice(0,-8)),c.endsWith("-thinking")&&(c=c.slice(0,-9)),c),e=b||`Kiro ${d}`,f=[{id:d,name:e,capabilities:{thinking:!1,agentic:!1}},{id:`${d}-thinking`,name:`${e} (Thinking)`,capabilities:{thinking:!0,agentic:!1}}];return"auto"!==d&&(f.push({id:`${d}-agentic`,name:`${e} (Agentic)`,capabilities:{thinking:!1,agentic:!0}}),f.push({id:`${d}-thinking-agentic`,name:`${e} (Thinking + Agentic)`,capabilities:{thinking:!0,agentic:!0}})),f}(b,c))m.push({...e,contextLength:d,rateMultiplier:Number.isFinite(Number(a.rateMultiplier))?Number(a.rateMultiplier):1,upstreamModelId:b,description:a.description||""})}return j.set(h,{expiresAt:i+3e5,models:m,rawModels:c}),{models:m,rawModels:c}}},38709:(a,b,c)=>{"use strict";c.d(b,{M:()=>h});var d=c(90737),e=c(93943),f=c(39609);let g=`${d.Nr}/models`;async function h(a,b={}){let{fetchFn:c=f.proxyAwareFetch,log:i=console,proxyOptions:j=null,onCredentialsRefreshed:k}=b,l=a?.accessToken;if(!l)return{models:[],warning:"Grok CLI access token is missing."};let m=b=>c(g,{method:"GET",headers:function(a,b={}){let c={Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":d.fZ,"x-xai-token-auth":"xai-grok-cli","x-grok-client-version":d.uG,"x-grok-client-identifier":d.rK,"x-grok-client-mode":"headless"},e=b?.email,f=b?.userId||b?.principalId;return e&&(c["x-email"]=e),f&&(c["x-userid"]=f),c}(b,a?.providerSpecificData)},j);try{let b=await m(l);if((401===b.status||403===b.status)&&a?.refreshToken){let c=await (0,e.Vq)("grok-cli",a,i,j);if(c?.accessToken){l=c.accessToken;try{await k?.(c)}catch(a){i?.warn?.("Grok CLI credential persistence failed",a)}b=await m(l)}}if(!b.ok){let a=await b.text().catch(()=>"");return{models:[],warning:`Grok CLI model discovery failed (${b.status})${a?`: ${a.slice(0,160)}`:""}`}}let c=function(a){let b,c=new Set,e=[];for(let[f,g]of(b=Array.isArray(a)?a:a?.data??a?.models??a?.results??[],Array.isArray(b)?b.map(a=>[null,a]):b&&"object"==typeof b?Object.entries(b):[])){let a="string"==typeof g?{id:g}:g;if(!a||"object"!=typeof a||Array.isArray(a))continue;let b=String(a.id??a.model_id??a.modelId??a.model??a.slug??f??a.name??"").trim();if(!b||c.has(b))continue;c.add(b);let h={...a,id:b,name:a.display_name??a.displayName??a.name??b},i=Number(a.context_length??a.contextLength??a.context_window??a.contextWindow),j=Number(a.max_output_tokens??a.maxOutputTokens);Number.isFinite(i)&&i>0&&(h.contextLength=i),Number.isFinite(j)&&j>0&&(h.maxOutputTokens=j),b===d.to&&(h.contextLength||=5e5,h.maxOutputTokens||=64e3),e.push(h)}return e}(await b.json());return c.length?{models:c}:{models:[],warning:"Grok CLI returned no selectable models."}}catch(a){return{models:[],warning:`Grok CLI model discovery failed: ${a.message}`}}}},39326:(a,b,c)=>{"use strict";c.d(b,{B:()=>j,p:()=>i});var d=c(71998),e=c(72082);function f(a){return null==a?"":String(a).trim()}function g(a){let b=f(a);if(!b)return"";if((0,e.isEncrypted)(b))try{return f((0,e.decryptSecret)(b))}catch(a){console.warn(`[ConnectionProxy] Could not decrypt proxy URL: ${a?.message||a}`)}return b}let h=new Map;function i(a,b,c){if(!a||0===a.length)return null;if(1===a.length)return a[0];if("round-robin"===b){let b=h.get(c)||{index:-1};return b.index=(b.index+1)%a.length,h.set(c,b),a[b.index]}return"random"===b?a[Math.floor(Math.random()*a.length)]:a[0]}async function j(a={}){try{let b=f(a?.proxyPoolId),c="__none__"===b?"":b,e=function(a={}){let b=a?.connectionProxyEnabled===!0,c=g(a?.connectionProxyUrl),d=f(a?.connectionNoProxy);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:d,strictProxy:a?.strictProxy===!0}}(a),h=!1;if(c){let a=await (0,d.hr)(c);h=a?.strictProxy===!0;let b=g(a?.proxyUrl),e=f(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type||"cloudflare"===a.type||"deno"===a.type)return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:e,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:e,strictProxy:!0===a.strictProxy}}}if(e.connectionProxyEnabled&&e.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...e,strictProxy:h||e.strictProxy};return{source:"none",proxyPoolId:c||null,proxyPool:null,...e,strictProxy:h||e.strictProxy}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},50122:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},69704:(a,b,c)=>{"use strict";c.d(b,{Dg:()=>k,F8:()=>u,KC:()=>w,L7:()=>d,OQ:()=>j,R$:()=>l,RB:()=>D,Ty:()=>z,UJ:()=>q,VD:()=>r,_G:()=>i,bR:()=>t,bg:()=>h,cT:()=>y,cn:()=>p,h3:()=>o,ii:()=>n,j9:()=>f,jJ:()=>m,li:()=>s,pM:()=>C,pr:()=>E,qk:()=>A,rf:()=>g,t6:()=>x,xG:()=>B});let d="https://openapi.qoder.sh",e="https://api3.qoder.sh",f="https://api2.qoder.sh",g="https://qoder.com/device/selectAccounts",h=`${d}/api/v1/deviceToken/poll`,i=`${d}/api/v1/userinfo`,j=`${d}/api/v1/jobToken/exchange`,k="https://qoder.com",l="https://gateway.qoder.com.cn",m="https://openapi.qoder.com.cn",n="https://qoder.cn/device/selectAccounts",o=`${m}/api/v1/deviceToken/poll`,p=`${m}/api/v1/userinfo`,q=`${m}/api/v1/jobToken/exchange`,r="https://qoder.cn",s=l,t=`${l}/algo/api/v2/model/list`,u="/api/v2/service/pro/sse/agent_chat_generation",v=`${e}/algo${u}?FetchKeys=llm_model_result&AgentId=agent_common`,w=`${v}&Encode=1`,x=`${e}/algo/api/v2/model/list`,y="1.0.0",z="5",A="disagree",B="v2",C="x86_64_windows",D="5",E=`-----BEGIN PUBLIC KEY-----
2
+ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA8iMH5c02LilrsERw9t6Pv5Nc
3
+ 4k6Pz1EaDicBMpdpxKduSZu5OANqUq8er4GM95omAGIOPOh+Nx0spthYA2BqGz+l
4
+ 6HRkPJ7S236FZz73In/KVuLnwI8JJ2CbuJap8kvheCCZpmAWpb/cPx/3Vr/J6I17
5
+ XcW+ML9FoCI6AOvOzwIDAQAB
6
+ -----END PUBLIC KEY-----`},71998:(a,b,c)=>{"use strict";c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.getProviderConnections,h1:()=>d.h1,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.updateProviderConnection,uv:()=>d.uv});var d=c(89718)},78335:()=>{},82578:(a,b,c)=>{"use strict";c.d(b,{FD:()=>n});var d=c(55511),e=c.n(d),f=c(73496),g=c.n(f),h=c(26070),i=c(81756),j=c(55456);let k=new Map;function l(a,b){let c=a.get(b)?.[0]?.value;return c&&"number"!=typeof c?Buffer.from(c).toString("utf8"):""}async function m(a,b){var c;let d,e=a?.accessToken,f=a?.providerSpecificData?.machineId,k=(d=h.sr.cursor,d?.agentEndpoint&&d?.modelsEndpoint?`${d.agentEndpoint.replace(/\/$/,"")}${d.modelsEndpoint}`:null);if(!e||!f||!k)return null;let m={...(0,i.JA)(e,f,a?.providerSpecificData?.ghostMode!==!1),accept:"application/proto","content-type":"application/proto"};delete m["connect-accept-encoding"],delete m["connect-protocol-version"];let n=await (c=new Uint8Array,new Promise((a,d)=>{let e=new URL(k),f=g().connect(`https://${e.host}`),h=[],i={},j=!1,l=a=>(...b)=>{if(!j){j=!0,clearTimeout(n);try{f.close()}catch{}a(...b)}},n=setTimeout(l(()=>{d(Error("Cursor GetUsableModels timed out"))}),1e4);f.on("error",l(d));let o=f.request({":method":"POST",":path":e.pathname,":authority":e.host,":scheme":"https",...m});if(o.on("response",a=>{i=a}),o.on("data",a=>{h.push(a)}),o.on("end",l(()=>{a({status:Number(i[":status"]||0),body:Buffer.concat(h)})})),o.on("error",l(d)),b){let a=l(()=>d(Error("Request aborted")));b.aborted?a():b.addEventListener("abort",a,{once:!0})}o.end(c&&c.length?Buffer.from(c):void 0)}));if(200!==n.status){let a=Error(`Cursor GetUsableModels returned ${n.status}`);throw a.status=n.status,a}return function(a){let b=(0,j.Y8)(a),c=new Set,d=[];for(let a of b.get(1)||[]){if(!a?.value||"number"==typeof a.value)continue;let b=(0,j.Y8)(a.value),e=l(b,1).trim();if(!e||c.has(e))continue;c.add(e);let f=(l(b,4)||l(b,5)||l(b,3)||e).trim();d.push({id:e,name:f})}return d}(new Uint8Array(n.body))}async function n(a,b={}){let c;if(!a?.accessToken||!a?.providerSpecificData?.machineId)return b.log?.debug?.("CURSOR_MODELS","No Cursor access token or machine ID; skipping live fetch"),null;let d=(c=[a?.providerSpecificData?.machineId,a?.accessToken].filter(Boolean).join(":"))?e().createHash("sha256").update(`cursor:${c}`).digest("hex"):"cursor-anonymous",f=Date.now();if(!b.forceRefresh){let a=k.get(d);if(a?.expiresAt>f)return{models:a.models}}try{let c=await m(a,b.signal);if(!c?.length)return null;return k.set(d,{expiresAt:f+3e5,models:c}),{models:c}}catch(a){return b.log?.warn?.("CURSOR_MODELS",`Live model fetch failed: ${a?.message||a}`),null}}},85081:(a,b,c)=>{"use strict";c.d(b,{Ay:()=>j});var d=c(77598);let e=function(a){return Array.isArray(a)?a=Buffer.from(a):"string"==typeof a&&(a=Buffer.from(a,"utf8")),(0,d.createHash)("sha1").update(a).digest()},f=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,g=function(a){let b;if(!("string"==typeof a&&f.test(a)))throw TypeError("Invalid UUID");return Uint8Array.of((b=parseInt(a.slice(0,8),16))>>>24,b>>>16&255,b>>>8&255,255&b,(b=parseInt(a.slice(9,13),16))>>>8,255&b,(b=parseInt(a.slice(14,18),16))>>>8,255&b,(b=parseInt(a.slice(19,23),16))>>>8,255&b,(b=parseInt(a.slice(24,36),16))/0x10000000000&255,b/0x100000000&255,b>>>24&255,b>>>16&255,b>>>8&255,255&b)};var h=c(50122);function i(a,b,c,d){var f=b,i=d;let j="string"==typeof a?function(a){let b=new Uint8Array((a=unescape(encodeURIComponent(a))).length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}(a):a,k="string"==typeof f?g(f):f;if("string"==typeof f&&(f=g(f)),f?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+j.length);if(l.set(k),l.set(j,k.length),(l=e(l))[6]=15&l[6]|80,l[8]=63&l[8]|128,c){if((i=i||0)<0||i+16>c.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let a=0;a<16;++a)c[i+a]=l[a];return c}return(0,h.k)(l)}i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";let j=i},89718:(a,b,c)=>{"use strict";c.d(b,{Bf:()=>d.Bf,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,Um:()=>d.Um,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getApiKeyByKey:()=>d.mY,getProviderConnections:()=>d.P,getSettings:()=>d.mt,h1:()=>d.h1,hj:()=>d.hj,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,localStartOfDayIso:()=>d.Yq,lr:()=>d.lr,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,sV:()=>d.sV,sumApiKeyTokensSince:()=>d.ZQ,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,updateSettings:()=>d.Xx,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(27274)},94755:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}},96487:()=>{}};
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=9451,exports.ids=[9451],exports.modules={39451:(a,b,c)=>{c.d(b,{runMigrationOnce:()=>G});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(7841),i=c(76040);let j="stepfun",k="stepfun-cn";var l=c(34393),m=c(69128);let n=["mimoPassToken","mimoUserId","mimoCUserId"],o=new Set(["Xiaomi MiMo Desktop","Xiaomi MiMo Desktop Session"]),p="mimo-desktop-session";function q(a){if(!(0,l.ph)(a))return{ok:!0,value:a};try{return{ok:!0,value:(0,l.wu)(a)}}catch{return{ok:!1,value:a}}}function r(a){try{return JSON.parse(a.data||"{}")}catch{return null}}function s(a,b=null){let c=a?.providerSpecificData||{},d=q("string"==typeof a?.accessToken?a.accessToken:null),e="string"==typeof c.uid||"number"==typeof c.uid?String(c.uid):null,f="string"==typeof c.mimoUserId||"number"==typeof c.mimoUserId?String(c.mimoUserId):null,g=c.mimoPassToken;return{token:d.ok?d.value:null,uid:e,mu:f,email:"string"==typeof b&&b?b:null,hasSession:null!=g&&""!==g&&q(g).ok}}let t=[{version:1,name:"initial",up(a){for(let[b,c]of Object.entries(i.CG))for(let d of(a.exec((0,i.zE)(b,c)),c.indexes||[]))a.exec(d)}},{version:2,name:"stepfun-cn-rename",up(a){let b;for(let b of(a.run("UPDATE providerConnections SET provider = ? WHERE provider = ?",[k,j]),a.run("UPDATE kv SET key = ? WHERE scope = 'disabledModels' AND key = ?",[k,j]),["modelCaps","customModels"]))a.run("UPDATE kv SET key = ? || substr(key, ?) WHERE scope = ? AND key LIKE ?",[k,j.length+1,b,`${j}|%`]);let c=a.get("SELECT data FROM settings WHERE id = 1");if(!c?.data)return;try{b=JSON.parse(c.data)}catch{return}if(!b||"object"!=typeof b)return;let d=!1;if(Array.isArray(b.providerCardOrder)){let a=b.providerCardOrder.map(a=>a===j?k:a);a.some((a,c)=>a!==b.providerCardOrder[c])&&(b.providerCardOrder=a,d=!0)}for(let a of["topologyVisibility","providerStrategies"]){let c=b[a];c&&"object"==typeof c&&Object.prototype.hasOwnProperty.call(c,j)&&(k in c||(c[k]=c[j]),delete c[j],d=!0)}d&&a.run("UPDATE settings SET data = ? WHERE id = 1",[JSON.stringify(b)])}},{version:3,name:"encrypt-credentials",up(a){let b;try{b=a.all("SELECT id, data FROM providerConnections")}catch(a){console.warn("[migration] encrypt-credentials: could not read connections:",a?.message||a);return}let c=0,d=0;for(let e of b){let b;try{b=JSON.parse(e.data||"{}")}catch{continue}if((0,l.HG)(b))try{a.run("UPDATE providerConnections SET data = ? WHERE id = ?",[JSON.stringify((0,l.Wl)(b)),e.id]),c+=1}catch(a){1===(d+=1)&&console.warn("[migration] encrypt-credentials: could not encrypt a connection — credentials stay in plain text until they are rewritten:",a?.message||a)}}c&&console.log(`[migration] encrypt-credentials: encrypted ${c} connection row(s)`),d&&console.warn(`[migration] encrypt-credentials: ${d} row(s) left in plain text`)}},{version:4,name:"usage-apikey-digest",up(a){try{a.all("PRAGMA table_info(usageHistory)").map(a=>a.name).includes("apiKeyHash")||(a.exec("ALTER TABLE usageHistory ADD COLUMN apiKeyHash TEXT"),console.log("[migration] usage-apikey-digest: added usageHistory.apiKeyHash")),a.exec("CREATE INDEX IF NOT EXISTS idx_uh_apikey_hash ON usageHistory(apiKeyHash)")}catch(a){console.warn("[migration] usage-apikey-digest: could not ensure apiKeyHash column:",a?.message||a)}let b=0;try{for(let c of a.all("SELECT id, apiKey FROM usageHistory WHERE apiKey IS NOT NULL AND apiKey != ''"))(0,m.f0)(c.apiKey)||(a.run("UPDATE usageHistory SET apiKey = ?, apiKeyHash = ? WHERE id = ?",[(0,m.oO)(c.apiKey),(0,m.kk)(c.apiKey),c.id]),b+=1)}catch(a){console.warn("[migration] usage-apikey-digest: history rows skipped:",a?.message||a)}let c=0;try{for(let b of a.all("SELECT dateKey, data FROM usageDaily")){let d;try{d=JSON.parse(b.data||"{}")}catch{continue}let e=d?.byApiKey;if(!e||"object"!=typeof e)continue;let f={},g=!1;for(let[a,b]of Object.entries(e)){if(!b||"object"!=typeof b){f[a]=b;continue}let c="string"==typeof b.apiKey?b.apiKey:null;if(!c&&b.apiKeyHash||!c){f[a]=b;continue}let{apiKey:d,...e}=b,h=(0,m.kk)(c),i=a.split("|"),j=i.length>1?"|"+i.slice(1).join("|"):"";f[`${h||"local-no-key"}${j}`]={...e,apiKeyHash:h,apiKeyMasked:(0,m.oO)(c)},g=!0}g&&(a.run("UPDATE usageDaily SET data = ? WHERE dateKey = ?",[JSON.stringify({...d,byApiKey:f}),b.dateKey]),c+=1)}}catch(a){console.warn("[migration] usage-apikey-digest: daily aggregates skipped:",a?.message||a)}(b||c)&&console.log(`[migration] usage-apikey-digest: rewrote ${b} history row(s), ${c} day aggregate(s)`)}},{version:5,name:"strip-mimo-main-card-session",up(a){let b,c;try{b=a.all("SELECT id, email, data FROM providerConnections WHERE provider = 'xiaomi-mimo'"),c=a.all("SELECT id, email, data FROM providerConnections WHERE provider = 'mimo-desktop'")}catch(a){console.warn("[migration] strip-mimo-main-card-session: could not read connections:",a?.message||a);return}let d=c.map(a=>{let b=r(a);return b?s(b,a.email):null}).filter(Boolean),e=0,f=0,g=0,h=0;for(let c of b){let b=r(c);if(!b||"object"!=typeof b)continue;let i=b.providerSpecificData&&"object"==typeof b.providerSpecificData?b.providerSpecificData:{};if(!(n.some(a=>void 0!==i[a]&&null!==i[a]&&""!==i[a])||o.has(i.provider)||"desktop-session"===i.authMethod||"string"==typeof b.accessToken&&b.accessToken.startsWith(p)))continue;let j=q("string"==typeof b.accessToken?b.accessToken:null);if(!j.ok||i.mimoPassToken&&!q(i.mimoPassToken).ok){h+=1;continue}if(!("string"!=typeof j.value||""===j.value||j.value.startsWith(p))){let d=function(a){let b={...a};for(let a of n)delete b[a];return o.has(b.provider)&&delete b.provider,b}(i);"desktop-session"===d.authMethod&&(d.authMethod="api_key"),a.run("UPDATE providerConnections SET data = ? WHERE id = ?",[JSON.stringify((0,l.Wl)({...b,providerSpecificData:d})),c.id]),e+=1;continue}let k=s(b,c.email);if(d.find(a=>(!!a.token&&!!k.token&&a.token===k.token||!!a.uid&&!!k.uid&&a.uid===k.uid||!!a.mu&&!!k.mu&&a.mu===k.mu||!!a.uid&&!!k.mu&&a.uid===k.mu||!!a.mu&&!!k.uid&&a.mu===k.uid||!!a.email&&!!k.email&&a.email===k.email||!1)&&a.hasSession)){a.run("DELETE FROM providerConnections WHERE id = ?",[c.id]),g+=1;continue}a.run("UPDATE providerConnections SET provider = 'mimo-desktop', data = ? WHERE id = ?",[JSON.stringify((0,l.Wl)(b)),c.id]),f+=1}(e||f||g||h)&&console.log(`[migration] strip-mimo-main-card-session: stripped ${e} cloud row(s), moved ${f} session-only row(s) to mimo-desktop, removed ${g} duplicate row(s)`+(h?`, ${h} row(s) left untouched (undecryptable credentials)`:""))}},{version:6,name:"mimo-desktop-session-active",up(a){let b;try{b=a.all("SELECT id, data FROM providerConnections WHERE provider = 'mimo-desktop'")}catch(a){console.warn("[migration] mimo-desktop-session-active: could not read connections:",a?.message||a);return}for(let c of b)try{let b=JSON.parse(c.data);if("untested"!==b.testStatus)continue;b.testStatus="active",a.run("UPDATE providerConnections SET data = ? WHERE id = ?",[JSON.stringify(b),c.id])}catch{}}}].sort((a,b)=>a.version-b.version);var u=c(91117);let v=null;function w(){if(v)return v;try{let a=g().join(process.cwd(),"package.json");v=JSON.parse(e().readFileSync(a,"utf-8")).version||"0.0.0"}catch{v="0.0.0"}return v}let x=["requestDetails"];function y(a){(0,h.Jh)();let b=w(),c=`${a}-${b}-${function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}${b(a.getMonth()+1)}${b(a.getDate())}-${b(a.getHours())}${b(a.getMinutes())}${b(a.getSeconds())}`}()}`,d=g().join(h.KQ,c);return e().mkdirSync(d,{recursive:!0}),d}function z(){if(e().existsSync(h.KQ))for(let a of e().readdirSync(h.KQ,{withFileTypes:!0}).filter(a=>a.isDirectory()).map(a=>({name:a.name,full:g().join(h.KQ,a.name),mtime:e().statSync(g().join(h.KQ,a.name)).mtimeMs})).sort((a,b)=>b.mtime-a.mtime).slice(3))try{e().rmSync(a.full,{recursive:!0,force:!0})}catch{}}var A=c(33323);let B=g().join(h.HG,".migrated-from-json"),C=new WeakSet;class D extends Error{constructor(a,b){super(a),this.name="MigrationAborted",this.droppedRows=b}}function E(a,b,c,d,e){let f=[];for(let a of c)try{d(a)}catch(b){f.push({...e(a),reason:b.message})}let g=a.get(`SELECT COUNT(*) as c FROM ${b}`)?.c??0;if(g!==c.length)throw console.warn(`[DB][migrate] ${b} row-count mismatch: expected ${c.length}, got ${g}. Dropped:`,f),new D(`${b} row-count mismatch: expected ${c.length}, got ${g}`,f)}function F(a){if(!e().existsSync(a))return null;try{return JSON.parse(e().readFileSync(a,"utf-8"))}catch{return null}}async function G(a){if(C.has(a))return;C.add(a);let b=function(a){try{let b=a.get("SELECT COUNT(*) as c FROM _meta");return!b||0===b.c}catch{return!0}}(a);z(),a.exec((0,i.zE)("_meta",i.CG._meta));let c=parseInt((0,u.dy)(a,"backupSchemaVersion","0"),10)||0;if(!b&&c<i.f$)try{let b=y(`schema-${c}-to-${i.f$}`);!function(a,b,c="data.sqlite"){let d=g().join(b,c);try{e().rmSync(d,{force:!0})}catch{}let f=d.replace(/'/g,"''");a.exec(`ATTACH DATABASE '${f}' AS bak`);try{let b=new Set(x),c=a.all("SELECT name, sql FROM main.sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'").filter(a=>!b.has(a.name));a.transaction(()=>{for(let b of c){let c=b.sql.replace(/CREATE TABLE\s+/i,"CREATE TABLE bak.");a.exec(c),a.exec(`INSERT INTO bak.${b.name} SELECT * FROM main.${b.name}`)}})}finally{try{a.exec("DETACH DATABASE bak")}catch{}}}(a,b),z(),console.log(`[DB][migrate] pre-schema backup ${c} → ${i.f$}: ${b}`)}catch(a){console.warn(`[DB][migrate] pre-schema backup failed (continuing): ${a.message}`)}!function(a){a.exec((0,i.zE)("_meta",i.CG._meta));let b=parseInt((0,u.dy)(a,"schemaVersion","0"),10)||0;if(b>=(t.length?t[t.length-1].version:0))return;let c=t.filter(a=>a.version>b);for(let b of c)a.transaction(()=>{b.up(a),(0,u.np)(a,"schemaVersion",b.version)}),b.version,console.log(`[DB][migrate] applied #${b.version} ${b.name}`);c.length}(a);for(let[b,c]of Object.entries(i.CG)){a.exec((0,i.zE)(b,c));let d=new Set(a.all(`PRAGMA table_info(${b})`).map(a=>a.name));for(let[e,f]of Object.entries(c.columns))if(!d.has(e)){let c=f.replace(/PRIMARY KEY( AUTOINCREMENT)?/i,"").replace(/UNIQUE/i,"").trim();try{a.exec(`ALTER TABLE ${b} ADD COLUMN ${e} ${c}`),console.log(`[DB][sync] +column ${b}.${e}`)}catch(a){console.warn(`[DB][sync] add column ${b}.${e} failed: ${a.message}`)}}for(let b of c.indexes||[])try{a.exec(b)}catch{}}(0,u.np)(a,"backupSchemaVersion",i.f$);let d=e().existsSync(B),f=F(h.Or.main),j=F(h.Or.usage),k=F(h.Or.disabled),m=F(h.Or.details);if(b&&(f||j||k||m)&&!d){let b=Date.now(),c=y("migrate-from-json");for(let a of Object.values(h.Or))!function(a,b,c=null){if(!e().existsSync(a))return;let d=c||g().basename(a),f=g().join(b,d);e().copyFileSync(a,f)}(a,c);try{a.transaction(()=>{if(f&&"object"==typeof f){for(let[b,c]of(f.settings&&a.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,A.s)(f.settings)]),E(a,"providerConnections",f.providerConnections||[],b=>{let{id:c,provider:d,authType:e,name:f,email:g,priority:h,isActive:i,createdAt:j,updatedAt:k,...m}=b;a.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[c,d,e||"oauth",f||null,g||null,h||null,+(!1!==i),(0,A.s)((0,l.Wl)(m)),j||new Date().toISOString(),k||new Date().toISOString()])},a=>({id:a.id??null,provider:a.provider??null,name:a.name??null})),E(a,"providerNodes",f.providerNodes||[],b=>{let{id:c,type:d,name:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,d||null,e||null,(0,A.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null,type:a.type??null,name:a.name??null})),E(a,"proxyPools",f.proxyPools||[],b=>{let{id:c,isActive:d,testStatus:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,+(!1!==d),e||"unknown",(0,A.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null})),E(a,"apiKeys",f.apiKeys||[],b=>{a.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.key,b.name||null,b.machineId||null,+(!1!==b.isActive),b.createdAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),E(a,"combos",f.combos||[],b=>{a.run("INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.name,b.kind||null,(0,A.s)(b.models||[]),b.createdAt||new Date().toISOString(),b.updatedAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),Object.entries(f.modelAliases||{})))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[b,(0,A.s)(c)]);for(let b of f.customModels||[]){let c=`${b.providerAlias}|${b.id}|${b.type||"llm"}`;a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[c,(0,A.s)(b)])}for(let[b,c]of Object.entries(f.mitmAlias||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[b,(0,A.s)(c||{})]);for(let[b,c]of Object.entries(f.pricing||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[b,(0,A.s)(c||{})])}if(j&&"object"==typeof j){for(let b of j.history||[]){let c=b.tokens||{};a.run("INSERT INTO usageHistory(timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, status, tokens, meta) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[b.timestamp||new Date().toISOString(),b.provider||null,b.model||null,b.connectionId||null,b.apiKey||null,b.endpoint||null,c.prompt_tokens||c.input_tokens||0,c.completion_tokens||c.output_tokens||0,b.cost||0,b.status||"ok",(0,A.s)(c),(0,A.s)({})])}for(let[b,c]of Object.entries(j.dailySummary||{}))a.run("INSERT OR REPLACE INTO usageDaily(dateKey, data) VALUES(?, ?)",[b,(0,A.s)(c)]);"number"==typeof j.totalRequestsLifetime&&(0,u.np)(a,"totalRequestsLifetime",j.totalRequestsLifetime)}if(k&&"object"==typeof k.disabled)for(let[b,c]of Object.entries(k.disabled))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('disabledModels', ?, ?)",[b,(0,A.s)(c||[])]);if(m&&Array.isArray(m.records))for(let b of m.records)a.run("INSERT OR REPLACE INTO requestDetails(id, timestamp, provider, model, connectionId, status, data) VALUES(?, ?, ?, ?, ?, ?, ?)",[b.id,b.timestamp||new Date().toISOString(),b.provider||null,b.model||null,b.connectionId||null,b.status||null,(0,A.s)(b)]);(0,u.np)(a,"appVersion",w()),(0,u.np)(a,"backupSchemaVersion",i.f$),(0,u.np)(a,"migratedAt",new Date().toISOString())})}catch(a){if(a instanceof D)return void console.error(`[DB][migrate] aborted: ${a.message} | legacy JSON kept | backup: ${c}`);throw a}try{e().writeFileSync(B,new Date().toISOString())}catch{}z(),console.log(`[DB][migrate] JSON → SQLite in ${Date.now()-b}ms | legacy JSON kept at DATA_DIR | backup: ${c}`);return}let n=w();(0,u.dy)(a,"appVersion",null)!==n&&(0,u.np)(a,"appVersion",n)}},76040:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=1,e=`
1
+ "use strict";exports.id=9451,exports.ids=[9451],exports.modules={39451:(a,b,c)=>{c.d(b,{runMigrationOnce:()=>G});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(7841),i=c(76040);let j="stepfun",k="stepfun-cn";var l=c(34393),m=c(69128);let n=["mimoPassToken","mimoUserId","mimoCUserId"],o=new Set(["Xiaomi MiMo Desktop","Xiaomi MiMo Desktop Session"]),p="mimo-desktop-session";function q(a){if(!(0,l.ph)(a))return{ok:!0,value:a};try{return{ok:!0,value:(0,l.wu)(a)}}catch{return{ok:!1,value:a}}}function r(a){try{return JSON.parse(a.data||"{}")}catch{return null}}function s(a,b=null){let c=a?.providerSpecificData||{},d=q("string"==typeof a?.accessToken?a.accessToken:null),e="string"==typeof c.uid||"number"==typeof c.uid?String(c.uid):null,f="string"==typeof c.mimoUserId||"number"==typeof c.mimoUserId?String(c.mimoUserId):null,g=c.mimoPassToken;return{token:d.ok?d.value:null,uid:e,mu:f,email:"string"==typeof b&&b?b:null,hasSession:null!=g&&""!==g&&q(g).ok}}let t=[{version:1,name:"initial",up(a){for(let[b,c]of Object.entries(i.CG))for(let d of(a.exec((0,i.zE)(b,c)),c.indexes||[]))a.exec(d)}},{version:2,name:"stepfun-cn-rename",up(a){let b;for(let b of(a.run("UPDATE providerConnections SET provider = ? WHERE provider = ?",[k,j]),a.run("UPDATE kv SET key = ? WHERE scope = 'disabledModels' AND key = ?",[k,j]),["modelCaps","customModels"]))a.run("UPDATE kv SET key = ? || substr(key, ?) WHERE scope = ? AND key LIKE ?",[k,j.length+1,b,`${j}|%`]);let c=a.get("SELECT data FROM settings WHERE id = 1");if(!c?.data)return;try{b=JSON.parse(c.data)}catch{return}if(!b||"object"!=typeof b)return;let d=!1;if(Array.isArray(b.providerCardOrder)){let a=b.providerCardOrder.map(a=>a===j?k:a);a.some((a,c)=>a!==b.providerCardOrder[c])&&(b.providerCardOrder=a,d=!0)}for(let a of["topologyVisibility","providerStrategies"]){let c=b[a];c&&"object"==typeof c&&Object.prototype.hasOwnProperty.call(c,j)&&(k in c||(c[k]=c[j]),delete c[j],d=!0)}d&&a.run("UPDATE settings SET data = ? WHERE id = 1",[JSON.stringify(b)])}},{version:3,name:"encrypt-credentials",up(a){let b;try{b=a.all("SELECT id, data FROM providerConnections")}catch(a){console.warn("[migration] encrypt-credentials: could not read connections:",a?.message||a);return}let c=0,d=0;for(let e of b){let b;try{b=JSON.parse(e.data||"{}")}catch{continue}if((0,l.HG)(b))try{a.run("UPDATE providerConnections SET data = ? WHERE id = ?",[JSON.stringify((0,l.Wl)(b)),e.id]),c+=1}catch(a){1===(d+=1)&&console.warn("[migration] encrypt-credentials: could not encrypt a connection — credentials stay in plain text until they are rewritten:",a?.message||a)}}c&&console.log(`[migration] encrypt-credentials: encrypted ${c} connection row(s)`),d&&console.warn(`[migration] encrypt-credentials: ${d} row(s) left in plain text`)}},{version:4,name:"usage-apikey-digest",up(a){try{a.all("PRAGMA table_info(usageHistory)").map(a=>a.name).includes("apiKeyHash")||(a.exec("ALTER TABLE usageHistory ADD COLUMN apiKeyHash TEXT"),console.log("[migration] usage-apikey-digest: added usageHistory.apiKeyHash")),a.exec("CREATE INDEX IF NOT EXISTS idx_uh_apikey_hash ON usageHistory(apiKeyHash)")}catch(a){console.warn("[migration] usage-apikey-digest: could not ensure apiKeyHash column:",a?.message||a)}let b=0;try{for(let c of a.all("SELECT id, apiKey FROM usageHistory WHERE apiKey IS NOT NULL AND apiKey != ''"))(0,m.f0)(c.apiKey)||(a.run("UPDATE usageHistory SET apiKey = ?, apiKeyHash = ? WHERE id = ?",[(0,m.oO)(c.apiKey),(0,m.kk)(c.apiKey),c.id]),b+=1)}catch(a){console.warn("[migration] usage-apikey-digest: history rows skipped:",a?.message||a)}let c=0;try{for(let b of a.all("SELECT dateKey, data FROM usageDaily")){let d;try{d=JSON.parse(b.data||"{}")}catch{continue}let e=d?.byApiKey;if(!e||"object"!=typeof e)continue;let f={},g=!1;for(let[a,b]of Object.entries(e)){if(!b||"object"!=typeof b){f[a]=b;continue}let c="string"==typeof b.apiKey?b.apiKey:null;if(!c&&b.apiKeyHash||!c){f[a]=b;continue}let{apiKey:d,...e}=b,h=(0,m.kk)(c),i=a.split("|"),j=i.length>1?"|"+i.slice(1).join("|"):"";f[`${h||"local-no-key"}${j}`]={...e,apiKeyHash:h,apiKeyMasked:(0,m.oO)(c)},g=!0}g&&(a.run("UPDATE usageDaily SET data = ? WHERE dateKey = ?",[JSON.stringify({...d,byApiKey:f}),b.dateKey]),c+=1)}}catch(a){console.warn("[migration] usage-apikey-digest: daily aggregates skipped:",a?.message||a)}(b||c)&&console.log(`[migration] usage-apikey-digest: rewrote ${b} history row(s), ${c} day aggregate(s)`)}},{version:5,name:"strip-mimo-main-card-session",up(a){let b,c;try{b=a.all("SELECT id, email, data FROM providerConnections WHERE provider = 'xiaomi-mimo'"),c=a.all("SELECT id, email, data FROM providerConnections WHERE provider = 'mimo-desktop'")}catch(a){console.warn("[migration] strip-mimo-main-card-session: could not read connections:",a?.message||a);return}let d=c.map(a=>{let b=r(a);return b?s(b,a.email):null}).filter(Boolean),e=0,f=0,g=0,h=0;for(let c of b){let b=r(c);if(!b||"object"!=typeof b)continue;let i=b.providerSpecificData&&"object"==typeof b.providerSpecificData?b.providerSpecificData:{};if(!(n.some(a=>void 0!==i[a]&&null!==i[a]&&""!==i[a])||o.has(i.provider)||"desktop-session"===i.authMethod||"string"==typeof b.accessToken&&b.accessToken.startsWith(p)))continue;let j=q("string"==typeof b.accessToken?b.accessToken:null);if(!j.ok||i.mimoPassToken&&!q(i.mimoPassToken).ok){h+=1;continue}if(!("string"!=typeof j.value||""===j.value||j.value.startsWith(p))){let d=function(a){let b={...a};for(let a of n)delete b[a];return o.has(b.provider)&&delete b.provider,b}(i);"desktop-session"===d.authMethod&&(d.authMethod="api_key"),a.run("UPDATE providerConnections SET data = ? WHERE id = ?",[JSON.stringify((0,l.Wl)({...b,providerSpecificData:d})),c.id]),e+=1;continue}let k=s(b,c.email);if(d.find(a=>(!!a.token&&!!k.token&&a.token===k.token||!!a.uid&&!!k.uid&&a.uid===k.uid||!!a.mu&&!!k.mu&&a.mu===k.mu||!!a.uid&&!!k.mu&&a.uid===k.mu||!!a.mu&&!!k.uid&&a.mu===k.uid||!!a.email&&!!k.email&&a.email===k.email||!1)&&a.hasSession)){a.run("DELETE FROM providerConnections WHERE id = ?",[c.id]),g+=1;continue}a.run("UPDATE providerConnections SET provider = 'mimo-desktop', data = ? WHERE id = ?",[JSON.stringify((0,l.Wl)(b)),c.id]),f+=1}(e||f||g||h)&&console.log(`[migration] strip-mimo-main-card-session: stripped ${e} cloud row(s), moved ${f} session-only row(s) to mimo-desktop, removed ${g} duplicate row(s)`+(h?`, ${h} row(s) left untouched (undecryptable credentials)`:""))}},{version:6,name:"mimo-desktop-session-active",up(a){let b;try{b=a.all("SELECT id, data FROM providerConnections WHERE provider = 'mimo-desktop'")}catch(a){console.warn("[migration] mimo-desktop-session-active: could not read connections:",a?.message||a);return}for(let c of b)try{let b=JSON.parse(c.data);if("untested"!==b.testStatus)continue;b.testStatus="active",a.run("UPDATE providerConnections SET data = ? WHERE id = ?",[JSON.stringify(b),c.id])}catch{}}}].sort((a,b)=>a.version-b.version);var u=c(91117);let v=null;function w(){if(v)return v;try{let a=g().join(process.cwd(),"package.json");v=JSON.parse(e().readFileSync(a,"utf-8")).version||"0.0.0"}catch{v="0.0.0"}return v}let x=["requestDetails"];function y(a){(0,h.Jh)();let b=w(),c=`${a}-${b}-${function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}${b(a.getMonth()+1)}${b(a.getDate())}-${b(a.getHours())}${b(a.getMinutes())}${b(a.getSeconds())}`}()}`,d=g().join(h.KQ,c);return e().mkdirSync(d,{recursive:!0}),d}function z(){if(e().existsSync(h.KQ))for(let a of e().readdirSync(h.KQ,{withFileTypes:!0}).filter(a=>a.isDirectory()).map(a=>({name:a.name,full:g().join(h.KQ,a.name),mtime:e().statSync(g().join(h.KQ,a.name)).mtimeMs})).sort((a,b)=>b.mtime-a.mtime).slice(3))try{e().rmSync(a.full,{recursive:!0,force:!0})}catch{}}var A=c(33323);let B=g().join(h.HG,".migrated-from-json"),C=new WeakSet;class D extends Error{constructor(a,b){super(a),this.name="MigrationAborted",this.droppedRows=b}}function E(a,b,c,d,e){let f=[];for(let a of c)try{d(a)}catch(b){f.push({...e(a),reason:b.message})}let g=a.get(`SELECT COUNT(*) as c FROM ${b}`)?.c??0;if(g!==c.length)throw console.warn(`[DB][migrate] ${b} row-count mismatch: expected ${c.length}, got ${g}. Dropped:`,f),new D(`${b} row-count mismatch: expected ${c.length}, got ${g}`,f)}function F(a){if(!e().existsSync(a))return null;try{return JSON.parse(e().readFileSync(a,"utf-8"))}catch{return null}}async function G(a){if(C.has(a))return;C.add(a);let b=function(a){try{let b=a.get("SELECT COUNT(*) as c FROM _meta");return!b||0===b.c}catch{return!0}}(a);z(),a.exec((0,i.zE)("_meta",i.CG._meta));let c=parseInt((0,u.dy)(a,"backupSchemaVersion","0"),10)||0;if(!b&&c<i.f$)try{let b=y(`schema-${c}-to-${i.f$}`);!function(a,b,c="data.sqlite"){let d=g().join(b,c);try{e().rmSync(d,{force:!0})}catch{}let f=d.replace(/'/g,"''");a.exec(`ATTACH DATABASE '${f}' AS bak`);try{let b=new Set(x),c=a.all("SELECT name, sql FROM main.sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'").filter(a=>!b.has(a.name));a.transaction(()=>{for(let b of c){let c=b.sql.replace(/CREATE TABLE\s+/i,"CREATE TABLE bak.");a.exec(c),a.exec(`INSERT INTO bak.${b.name} SELECT * FROM main.${b.name}`)}})}finally{try{a.exec("DETACH DATABASE bak")}catch{}}}(a,b),z(),console.log(`[DB][migrate] pre-schema backup ${c} → ${i.f$}: ${b}`)}catch(a){console.warn(`[DB][migrate] pre-schema backup failed (continuing): ${a.message}`)}!function(a){a.exec((0,i.zE)("_meta",i.CG._meta));let b=parseInt((0,u.dy)(a,"schemaVersion","0"),10)||0;if(b>=(t.length?t[t.length-1].version:0))return;let c=t.filter(a=>a.version>b);for(let b of c)a.transaction(()=>{b.up(a),(0,u.np)(a,"schemaVersion",b.version)}),b.version,console.log(`[DB][migrate] applied #${b.version} ${b.name}`);c.length}(a);for(let[b,c]of Object.entries(i.CG)){a.exec((0,i.zE)(b,c));let d=new Set(a.all(`PRAGMA table_info(${b})`).map(a=>a.name));for(let[e,f]of Object.entries(c.columns))if(!d.has(e)){let c=f.replace(/PRIMARY KEY( AUTOINCREMENT)?/i,"").replace(/UNIQUE/i,"").trim();try{a.exec(`ALTER TABLE ${b} ADD COLUMN ${e} ${c}`),console.log(`[DB][sync] +column ${b}.${e}`)}catch(a){console.warn(`[DB][sync] add column ${b}.${e} failed: ${a.message}`)}}for(let b of c.indexes||[])try{a.exec(b)}catch{}}(0,u.np)(a,"backupSchemaVersion",i.f$);let d=e().existsSync(B),f=F(h.Or.main),j=F(h.Or.usage),k=F(h.Or.disabled),m=F(h.Or.details);if(b&&(f||j||k||m)&&!d){let b=Date.now(),c=y("migrate-from-json");for(let a of Object.values(h.Or))!function(a,b,c=null){if(!e().existsSync(a))return;let d=c||g().basename(a),f=g().join(b,d);e().copyFileSync(a,f)}(a,c);try{a.transaction(()=>{if(f&&"object"==typeof f){for(let[b,c]of(f.settings&&a.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,A.s)(f.settings)]),E(a,"providerConnections",f.providerConnections||[],b=>{let{id:c,provider:d,authType:e,name:f,email:g,priority:h,isActive:i,createdAt:j,updatedAt:k,...m}=b;a.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[c,d,e||"oauth",f||null,g||null,h||null,+(!1!==i),(0,A.s)((0,l.Wl)(m)),j||new Date().toISOString(),k||new Date().toISOString()])},a=>({id:a.id??null,provider:a.provider??null,name:a.name??null})),E(a,"providerNodes",f.providerNodes||[],b=>{let{id:c,type:d,name:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,d||null,e||null,(0,A.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null,type:a.type??null,name:a.name??null})),E(a,"proxyPools",f.proxyPools||[],b=>{let{id:c,isActive:d,testStatus:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,+(!1!==d),e||"unknown",(0,A.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null})),E(a,"apiKeys",f.apiKeys||[],b=>{a.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.key,b.name||null,b.machineId||null,+(!1!==b.isActive),b.createdAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),E(a,"combos",f.combos||[],b=>{a.run("INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.name,b.kind||null,(0,A.s)(b.models||[]),b.createdAt||new Date().toISOString(),b.updatedAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),Object.entries(f.modelAliases||{})))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[b,(0,A.s)(c)]);for(let b of f.customModels||[]){let c=`${b.providerAlias}|${b.id}|${b.type||"llm"}`;a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[c,(0,A.s)(b)])}for(let[b,c]of Object.entries(f.mitmAlias||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[b,(0,A.s)(c||{})]);for(let[b,c]of Object.entries(f.pricing||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[b,(0,A.s)(c||{})])}if(j&&"object"==typeof j){for(let b of j.history||[]){let c=b.tokens||{};a.run("INSERT INTO usageHistory(timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, status, tokens, meta) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[b.timestamp||new Date().toISOString(),b.provider||null,b.model||null,b.connectionId||null,b.apiKey||null,b.endpoint||null,c.prompt_tokens||c.input_tokens||0,c.completion_tokens||c.output_tokens||0,b.cost||0,b.status||"ok",(0,A.s)(c),(0,A.s)({})])}for(let[b,c]of Object.entries(j.dailySummary||{}))a.run("INSERT OR REPLACE INTO usageDaily(dateKey, data) VALUES(?, ?)",[b,(0,A.s)(c)]);"number"==typeof j.totalRequestsLifetime&&(0,u.np)(a,"totalRequestsLifetime",j.totalRequestsLifetime)}if(k&&"object"==typeof k.disabled)for(let[b,c]of Object.entries(k.disabled))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('disabledModels', ?, ?)",[b,(0,A.s)(c||[])]);if(m&&Array.isArray(m.records))for(let b of m.records)a.run("INSERT OR REPLACE INTO requestDetails(id, timestamp, provider, model, connectionId, status, data) VALUES(?, ?, ?, ?, ?, ?, ?)",[b.id,b.timestamp||new Date().toISOString(),b.provider||null,b.model||null,b.connectionId||null,b.status||null,(0,A.s)(b)]);(0,u.np)(a,"appVersion",w()),(0,u.np)(a,"backupSchemaVersion",i.f$),(0,u.np)(a,"migratedAt",new Date().toISOString())})}catch(a){if(a instanceof D)return void console.error(`[DB][migrate] aborted: ${a.message} | legacy JSON kept | backup: ${c}`);throw a}try{e().writeFileSync(B,new Date().toISOString())}catch{}z(),console.log(`[DB][migrate] JSON → SQLite in ${Date.now()-b}ms | legacy JSON kept at DATA_DIR | backup: ${c}`);return}let n=w();(0,u.dy)(a,"appVersion",null)!==n&&(0,u.np)(a,"appVersion",n)}},76040:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=3,e=`
2
2
  PRAGMA journal_mode = WAL;
3
3
  PRAGMA synchronous = NORMAL;
4
4
  PRAGMA temp_store = MEMORY;
@@ -6,4 +6,4 @@ PRAGMA mmap_size = 30000000;
6
6
  PRAGMA cache_size = -64000;
7
7
  PRAGMA foreign_keys = ON;
8
8
  PRAGMA busy_timeout = 5000;
9
- `,f={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",apiKeyHash:"TEXT",endpoint:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_hash ON usageHistory(apiKeyHash)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function g(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}}};
9
+ `,f={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",dailyTokenLimit:"INTEGER",allowedModels:"TEXT",allowedCombos:"TEXT",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",apiKeyHash:"TEXT",endpoint:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_hash ON usageHistory(apiKeyHash)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function g(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}}};