@ltgiang/9router 0.4.56 → 0.4.60

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 (888) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +14 -11
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/routes-manifest.json +18 -0
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +9 -9
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  69. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  72. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  73. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  74. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  75. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  76. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  80. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  83. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  84. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  85. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  87. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  90. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  91. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  103. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  105. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  109. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  125. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  133. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/combos/reorder/route.js +1 -0
  139. package/app/.next-cli-build/server/app/api/combos/reorder/route.js.nft.json +1 -0
  140. package/app/.next-cli-build/server/app/api/combos/reorder/route_client-reference-manifest.js +1 -0
  141. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  154. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  156. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/models/order/route.js +1 -0
  176. package/app/.next-cli-build/server/app/api/models/order/route.js.nft.json +1 -0
  177. package/app/.next-cli-build/server/app/api/models/order/route_client-reference-manifest.js +1 -0
  178. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -6
  183. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -0
  185. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -0
  186. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +1 -0
  187. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  188. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  238. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  254. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
  280. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  296. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  310. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  342. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  344. package/app/.next-cli-build/server/app/callback.html +1 -1
  345. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  346. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  347. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  348. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  349. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  350. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  351. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  352. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  353. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  354. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  355. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  356. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  357. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  358. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  359. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  360. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  361. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  362. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  363. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  364. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  365. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  366. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  367. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  368. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  369. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  370. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  371. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  372. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  373. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  374. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  375. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  376. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  377. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  378. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  379. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  380. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  381. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  382. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  383. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  384. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  385. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  386. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  387. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  388. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  389. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  390. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  391. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  392. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  394. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  395. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  396. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  398. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  399. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  400. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  401. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  402. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  403. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  405. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  406. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  409. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  410. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  411. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  412. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  413. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  415. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  416. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  419. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  420. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  421. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  422. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  423. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  425. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  426. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  427. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  429. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  430. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  431. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  432. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  433. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  434. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  436. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  437. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  440. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  441. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  443. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  444. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  446. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  447. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  450. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  451. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  452. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  453. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  454. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  455. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  456. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  457. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  458. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  460. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  461. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  463. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  464. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  465. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  467. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  468. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  469. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  470. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  471. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  472. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  473. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  474. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  477. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  478. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  479. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  480. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  483. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  484. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  486. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  487. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  489. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  490. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  493. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  494. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  496. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  497. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  499. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  500. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  502. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  503. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  504. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  506. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  507. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  508. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  509. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  510. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  511. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  512. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  513. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  515. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  517. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  518. package/app/.next-cli-build/server/app/index.html +1 -1
  519. package/app/.next-cli-build/server/app/index.rsc +4 -4
  520. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  522. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  523. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  524. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  526. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  527. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  528. package/app/.next-cli-build/server/app/landing.html +1 -1
  529. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  530. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  531. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  532. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  533. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/login/page.js +2 -2
  537. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  538. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  539. package/app/.next-cli-build/server/app/login.html +1 -1
  540. package/app/.next-cli-build/server/app/login.rsc +5 -5
  541. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  542. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  543. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  544. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  545. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  548. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/page.js +2 -2
  550. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  551. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  552. package/app/.next-cli-build/server/app-paths-manifest.json +14 -11
  553. package/app/.next-cli-build/server/chunks/1051.js +1 -0
  554. package/app/.next-cli-build/server/chunks/1140.js +1 -1
  555. package/app/.next-cli-build/server/chunks/1998.js +1 -0
  556. package/app/.next-cli-build/server/chunks/2409.js +1 -1
  557. package/app/.next-cli-build/server/chunks/2506.js +1 -1
  558. package/app/.next-cli-build/server/chunks/2971.js +1 -1
  559. package/app/.next-cli-build/server/chunks/3104.js +43 -0
  560. package/app/.next-cli-build/server/chunks/3110.js +1 -1
  561. package/app/.next-cli-build/server/chunks/318.js +11 -9
  562. package/app/.next-cli-build/server/chunks/3381.js +2 -2
  563. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  564. package/app/.next-cli-build/server/chunks/3813.js +1 -0
  565. package/app/.next-cli-build/server/chunks/4055.js +1 -1
  566. package/app/.next-cli-build/server/chunks/412.js +1 -1
  567. package/app/.next-cli-build/server/chunks/4177.js +1 -0
  568. package/app/.next-cli-build/server/chunks/4404.js +1 -1
  569. package/app/.next-cli-build/server/chunks/4632.js +1 -1
  570. package/app/.next-cli-build/server/chunks/4657.js +1 -0
  571. package/app/.next-cli-build/server/chunks/4739.js +1 -1
  572. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  573. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  574. package/app/.next-cli-build/server/chunks/5010.js +1 -1
  575. package/app/.next-cli-build/server/chunks/507.js +1 -1
  576. package/app/.next-cli-build/server/chunks/5217.js +1 -1
  577. package/app/.next-cli-build/server/chunks/5258.js +1 -1
  578. package/app/.next-cli-build/server/chunks/5422.js +13 -0
  579. package/app/.next-cli-build/server/chunks/{1655.js → 5433.js} +1 -1
  580. package/app/.next-cli-build/server/chunks/5681.js +1 -1
  581. package/app/.next-cli-build/server/chunks/5852.js +8 -0
  582. package/app/.next-cli-build/server/chunks/6064.js +1 -0
  583. package/app/.next-cli-build/server/chunks/6182.js +3 -3
  584. package/app/.next-cli-build/server/chunks/6936.js +1 -1
  585. package/app/.next-cli-build/server/chunks/698.js +1 -1
  586. package/app/.next-cli-build/server/chunks/7153.js +1 -1
  587. package/app/.next-cli-build/server/chunks/7250.js +1 -1
  588. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  589. package/app/.next-cli-build/server/chunks/8255.js +1 -1
  590. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  591. package/app/.next-cli-build/server/chunks/8590.js +1 -0
  592. package/app/.next-cli-build/server/chunks/8895.js +1 -1
  593. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  594. package/app/.next-cli-build/server/middleware.js +5 -5
  595. package/app/.next-cli-build/server/pages/404.html +1 -1
  596. package/app/.next-cli-build/server/pages/500.html +1 -1
  597. package/app/.next-cli-build/static/Y7UbUy_s5WLTuHEIbjB6o/_buildManifest.js +1 -0
  598. package/app/.next-cli-build/static/chunks/1321-62ec4b372b24e0ef.js +1 -0
  599. package/app/.next-cli-build/static/chunks/5497-a745e8d5e628b264.js +7 -0
  600. package/app/.next-cli-build/static/chunks/914-573e927dd0d28804.js +3 -0
  601. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-f51fdb8b8935fd11.js +1 -0
  602. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-a357671c9472c787.js → page-0518b1d85c00fe3e.js} +6 -6
  603. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-b472ea378da03bc3.js +3 -0
  604. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-7d8ba7acdca3b1c6.js +1 -0
  605. package/app/.next-cli-build/static/chunks/app/_global-error/page-eb759813c7c6ab7c.js +1 -0
  606. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-eb759813c7c6ab7c.js +1 -0
  607. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-eb759813c7c6ab7c.js +1 -0
  608. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-eb759813c7c6ab7c.js +1 -0
  609. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-eb759813c7c6ab7c.js +1 -0
  610. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-eb759813c7c6ab7c.js +1 -0
  611. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-eb759813c7c6ab7c.js +1 -0
  612. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-eb759813c7c6ab7c.js +1 -0
  613. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-eb759813c7c6ab7c.js +1 -0
  614. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-eb759813c7c6ab7c.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-eb759813c7c6ab7c.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-eb759813c7c6ab7c.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-eb759813c7c6ab7c.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-eb759813c7c6ab7c.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-eb759813c7c6ab7c.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-eb759813c7c6ab7c.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-eb759813c7c6ab7c.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-eb759813c7c6ab7c.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-eb759813c7c6ab7c.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-eb759813c7c6ab7c.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-eb759813c7c6ab7c.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-eb759813c7c6ab7c.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-eb759813c7c6ab7c.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-eb759813c7c6ab7c.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-eb759813c7c6ab7c.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/combos/reorder/route-eb759813c7c6ab7c.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/combos/route-eb759813c7c6ab7c.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/health/route-eb759813c7c6ab7c.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/init/route-eb759813c7c6ab7c.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-eb759813c7c6ab7c.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/keys/route-eb759813c7c6ab7c.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/locale/route-eb759813c7c6ab7c.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-eb759813c7c6ab7c.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-eb759813c7c6ab7c.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-eb759813c7c6ab7c.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-eb759813c7c6ab7c.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-eb759813c7c6ab7c.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-eb759813c7c6ab7c.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-eb759813c7c6ab7c.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-eb759813c7c6ab7c.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-eb759813c7c6ab7c.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-eb759813c7c6ab7c.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-eb759813c7c6ab7c.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/models/order/route-eb759813c7c6ab7c.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/models/route-eb759813c7c6ab7c.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/models/test/route-eb759813c7c6ab7c.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-eb759813c7c6ab7c.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-eb759813c7c6ab7c.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-eb759813c7c6ab7c.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-eb759813c7c6ab7c.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-eb759813c7c6ab7c.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-eb759813c7c6ab7c.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-eb759813c7c6ab7c.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-eb759813c7c6ab7c.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-eb759813c7c6ab7c.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-eb759813c7c6ab7c.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/pricing/route-eb759813c7c6ab7c.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-eb759813c7c6ab7c.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-eb759813c7c6ab7c.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-eb759813c7c6ab7c.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-eb759813c7c6ab7c.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-eb759813c7c6ab7c.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-eb759813c7c6ab7c.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-eb759813c7c6ab7c.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-eb759813c7c6ab7c.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-eb759813c7c6ab7c.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/providers/route-eb759813c7c6ab7c.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-eb759813c7c6ab7c.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-eb759813c7c6ab7c.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-eb759813c7c6ab7c.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-eb759813c7c6ab7c.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-eb759813c7c6ab7c.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-eb759813c7c6ab7c.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-eb759813c7c6ab7c.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-eb759813c7c6ab7c.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-eb759813c7c6ab7c.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-eb759813c7c6ab7c.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/settings/route-eb759813c7c6ab7c.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-eb759813c7c6ab7c.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/tags/route-eb759813c7c6ab7c.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-eb759813c7c6ab7c.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-eb759813c7c6ab7c.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-eb759813c7c6ab7c.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-eb759813c7c6ab7c.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-eb759813c7c6ab7c.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-eb759813c7c6ab7c.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-eb759813c7c6ab7c.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-eb759813c7c6ab7c.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-eb759813c7c6ab7c.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-eb759813c7c6ab7c.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-eb759813c7c6ab7c.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-eb759813c7c6ab7c.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-eb759813c7c6ab7c.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-eb759813c7c6ab7c.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-eb759813c7c6ab7c.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-eb759813c7c6ab7c.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-eb759813c7c6ab7c.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-eb759813c7c6ab7c.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-eb759813c7c6ab7c.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-eb759813c7c6ab7c.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-eb759813c7c6ab7c.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-eb759813c7c6ab7c.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-eb759813c7c6ab7c.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-eb759813c7c6ab7c.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-eb759813c7c6ab7c.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-eb759813c7c6ab7c.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-eb759813c7c6ab7c.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-eb759813c7c6ab7c.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-eb759813c7c6ab7c.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-eb759813c7c6ab7c.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-eb759813c7c6ab7c.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-eb759813c7c6ab7c.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-eb759813c7c6ab7c.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-eb759813c7c6ab7c.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-eb759813c7c6ab7c.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-eb759813c7c6ab7c.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-eb759813c7c6ab7c.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/v1/route-eb759813c7c6ab7c.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-eb759813c7c6ab7c.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-eb759813c7c6ab7c.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-eb759813c7c6ab7c.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-eb759813c7c6ab7c.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/version/route-eb759813c7c6ab7c.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-eb759813c7c6ab7c.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/version/update/route-eb759813c7c6ab7c.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/login/page-756b163b5203414c.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-eb759813c7c6ab7c.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/page-eb759813c7c6ab7c.js +1 -0
  733. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-eb759813c7c6ab7c.js +1 -0
  734. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-eb759813c7c6ab7c.js +1 -0
  735. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-eb759813c7c6ab7c.js +1 -0
  736. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-eb759813c7c6ab7c.js +1 -0
  737. package/app/.next-cli-build/static/css/{1db2ff3a7369d178.css → 8f5036fca165eebd.css} +1 -1
  738. package/app/cli/.build-home/.9router/db/backups/{upgrade-0.4.47-to-0.4.53-0.4.53-20260518-093628 → upgrade-0.4.55-to-0.4.56-0.4.56-20260521-162223}/data.sqlite +0 -0
  739. package/app/cli/.build-home/.9router/db/backups/{upgrade-0.4.46-to-0.4.47-0.4.47-20260516-124227 → upgrade-0.4.56-to-0.4.59-0.4.59-20260522-103707}/data.sqlite +0 -0
  740. package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
  741. package/app/package.json +1 -1
  742. package/app/src/lib/oauth/services/xai.js +238 -0
  743. package/app/src/mitm/server.js +23 -23
  744. package/cli.js +12 -12
  745. package/package.json +1 -1
  746. package/src/cli/api/client.js +20 -1
  747. package/app/.next-cli-build/server/chunks/2549.js +0 -1
  748. package/app/.next-cli-build/server/chunks/4884.js +0 -13
  749. package/app/.next-cli-build/server/chunks/7501.js +0 -1
  750. package/app/.next-cli-build/server/chunks/7828.js +0 -1
  751. package/app/.next-cli-build/server/chunks/8491.js +0 -1
  752. package/app/.next-cli-build/static/chunks/1321-d037a8598e0ed4cf.js +0 -1
  753. package/app/.next-cli-build/static/chunks/5497-ebaac20f2fcfd25c.js +0 -7
  754. package/app/.next-cli-build/static/chunks/914-5d7d110eb3b938ed.js +0 -3
  755. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-0834cdd2712e896e.js +0 -1
  756. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-6dab1b1de42ced97.js +0 -3
  757. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-44a8b419b6016726.js +0 -1
  758. package/app/.next-cli-build/static/chunks/app/_global-error/page-6b02c15143bc1cca.js +0 -1
  759. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-6b02c15143bc1cca.js +0 -1
  760. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-6b02c15143bc1cca.js +0 -1
  761. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-6b02c15143bc1cca.js +0 -1
  762. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-6b02c15143bc1cca.js +0 -1
  763. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-6b02c15143bc1cca.js +0 -1
  764. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-6b02c15143bc1cca.js +0 -1
  765. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-6b02c15143bc1cca.js +0 -1
  766. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-6b02c15143bc1cca.js +0 -1
  767. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-6b02c15143bc1cca.js +0 -1
  768. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-6b02c15143bc1cca.js +0 -1
  769. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-6b02c15143bc1cca.js +0 -1
  770. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-6b02c15143bc1cca.js +0 -1
  771. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-6b02c15143bc1cca.js +0 -1
  772. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-6b02c15143bc1cca.js +0 -1
  773. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-6b02c15143bc1cca.js +0 -1
  774. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-6b02c15143bc1cca.js +0 -1
  775. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-6b02c15143bc1cca.js +0 -1
  776. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-6b02c15143bc1cca.js +0 -1
  777. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-6b02c15143bc1cca.js +0 -1
  778. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-6b02c15143bc1cca.js +0 -1
  779. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-6b02c15143bc1cca.js +0 -1
  780. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-6b02c15143bc1cca.js +0 -1
  781. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-6b02c15143bc1cca.js +0 -1
  782. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-6b02c15143bc1cca.js +0 -1
  783. package/app/.next-cli-build/static/chunks/app/api/combos/route-6b02c15143bc1cca.js +0 -1
  784. package/app/.next-cli-build/static/chunks/app/api/health/route-6b02c15143bc1cca.js +0 -1
  785. package/app/.next-cli-build/static/chunks/app/api/init/route-6b02c15143bc1cca.js +0 -1
  786. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-6b02c15143bc1cca.js +0 -1
  787. package/app/.next-cli-build/static/chunks/app/api/keys/route-6b02c15143bc1cca.js +0 -1
  788. package/app/.next-cli-build/static/chunks/app/api/locale/route-6b02c15143bc1cca.js +0 -1
  789. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-6b02c15143bc1cca.js +0 -1
  790. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-6b02c15143bc1cca.js +0 -1
  791. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-6b02c15143bc1cca.js +0 -1
  792. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-6b02c15143bc1cca.js +0 -1
  793. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-6b02c15143bc1cca.js +0 -1
  794. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-6b02c15143bc1cca.js +0 -1
  795. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-6b02c15143bc1cca.js +0 -1
  796. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-6b02c15143bc1cca.js +0 -1
  797. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-6b02c15143bc1cca.js +0 -1
  798. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-6b02c15143bc1cca.js +0 -1
  799. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-6b02c15143bc1cca.js +0 -1
  800. package/app/.next-cli-build/static/chunks/app/api/models/route-6b02c15143bc1cca.js +0 -1
  801. package/app/.next-cli-build/static/chunks/app/api/models/test/route-6b02c15143bc1cca.js +0 -1
  802. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-6b02c15143bc1cca.js +0 -1
  803. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-6b02c15143bc1cca.js +0 -1
  804. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-6b02c15143bc1cca.js +0 -1
  805. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-6b02c15143bc1cca.js +0 -1
  806. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-6b02c15143bc1cca.js +0 -1
  807. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-6b02c15143bc1cca.js +0 -1
  808. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-6b02c15143bc1cca.js +0 -1
  809. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-6b02c15143bc1cca.js +0 -1
  810. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-6b02c15143bc1cca.js +0 -1
  811. package/app/.next-cli-build/static/chunks/app/api/pricing/route-6b02c15143bc1cca.js +0 -1
  812. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-6b02c15143bc1cca.js +0 -1
  813. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-6b02c15143bc1cca.js +0 -1
  814. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-6b02c15143bc1cca.js +0 -1
  815. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-6b02c15143bc1cca.js +0 -1
  816. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-6b02c15143bc1cca.js +0 -1
  817. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-6b02c15143bc1cca.js +0 -1
  818. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-6b02c15143bc1cca.js +0 -1
  819. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-6b02c15143bc1cca.js +0 -1
  820. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-6b02c15143bc1cca.js +0 -1
  821. package/app/.next-cli-build/static/chunks/app/api/providers/route-6b02c15143bc1cca.js +0 -1
  822. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-6b02c15143bc1cca.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-6b02c15143bc1cca.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-6b02c15143bc1cca.js +0 -1
  825. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-6b02c15143bc1cca.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-6b02c15143bc1cca.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-6b02c15143bc1cca.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-6b02c15143bc1cca.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-6b02c15143bc1cca.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-6b02c15143bc1cca.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-6b02c15143bc1cca.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/api/settings/route-6b02c15143bc1cca.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-6b02c15143bc1cca.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/api/tags/route-6b02c15143bc1cca.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-6b02c15143bc1cca.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-6b02c15143bc1cca.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-6b02c15143bc1cca.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-6b02c15143bc1cca.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-6b02c15143bc1cca.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-6b02c15143bc1cca.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-6b02c15143bc1cca.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-6b02c15143bc1cca.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-6b02c15143bc1cca.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-6b02c15143bc1cca.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-6b02c15143bc1cca.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-6b02c15143bc1cca.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-6b02c15143bc1cca.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-6b02c15143bc1cca.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-6b02c15143bc1cca.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-6b02c15143bc1cca.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-6b02c15143bc1cca.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-6b02c15143bc1cca.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-6b02c15143bc1cca.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-6b02c15143bc1cca.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-6b02c15143bc1cca.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-6b02c15143bc1cca.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-6b02c15143bc1cca.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-6b02c15143bc1cca.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-6b02c15143bc1cca.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-6b02c15143bc1cca.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-6b02c15143bc1cca.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-6b02c15143bc1cca.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-6b02c15143bc1cca.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-6b02c15143bc1cca.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-6b02c15143bc1cca.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-6b02c15143bc1cca.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-6b02c15143bc1cca.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-6b02c15143bc1cca.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-6b02c15143bc1cca.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-6b02c15143bc1cca.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-6b02c15143bc1cca.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/v1/route-6b02c15143bc1cca.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-6b02c15143bc1cca.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-6b02c15143bc1cca.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-6b02c15143bc1cca.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-6b02c15143bc1cca.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/version/route-6b02c15143bc1cca.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-6b02c15143bc1cca.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/version/update/route-6b02c15143bc1cca.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/login/page-ecf983fcd7ff9995.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-6b02c15143bc1cca.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/page-6b02c15143bc1cca.js +0 -1
  883. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-6b02c15143bc1cca.js +0 -1
  884. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-6b02c15143bc1cca.js +0 -1
  885. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-6b02c15143bc1cca.js +0 -1
  886. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-6b02c15143bc1cca.js +0 -1
  887. package/app/.next-cli-build/static/ufC8FPl2yBPeh7OMV4m8N/_buildManifest.js +0 -1
  888. /package/app/.next-cli-build/static/{ufC8FPl2yBPeh7OMV4m8N → Y7UbUy_s5WLTuHEIbjB6o}/_ssgManifest.js +0 -0
package/cli.js CHANGED
@@ -197,8 +197,8 @@ function killCloudflaredByAppPort(appPort) {
197
197
  function killAllAppProcesses(appPort) {
198
198
  return new Promise((resolve) => {
199
199
  try {
200
- // Kill MITM first (admin/sudo process, needs special handling)
201
- killMitmByPidFile();
200
+ // Kill MIT first (privileged process, needs special handling)
201
+ killProxyByPidFile();
202
202
  // Kill cloudflared/tailscale by PID file (precise, only this app's tunnel)
203
203
  killTunnelByPidFile();
204
204
 
@@ -305,13 +305,13 @@ function waitForExit(pid, timeoutMs) {
305
305
  return false;
306
306
  }
307
307
 
308
- // Kill MITM server by PID file (MITM runs as admin/sudo, needs special handling)
309
- // Sends SIGTERM first so MITM can clean up /etc/hosts entries before dying.
310
- function killMitmByPidFile() {
308
+ // Kill MIT server by PID file (runs privileged, needs special handling)
309
+ // Sends SIGTERM first so MIT can clean up host entries before dying.
310
+ function killProxyByPidFile() {
311
311
  try {
312
- const mitmPidFile = path.join(getAppDataDir(), "mitm", ".mitm.pid");
313
- if (!fs.existsSync(mitmPidFile)) return;
314
- const pid = parseInt(fs.readFileSync(mitmPidFile, "utf8").trim(), 10);
312
+ const pidFile = path.join(getAppDataDir(), "mitm", ".mitm.pid");
313
+ if (!fs.existsSync(pidFile)) return;
314
+ const pid = parseInt(fs.readFileSync(pidFile, "utf8").trim(), 10);
315
315
  if (!pid) return;
316
316
 
317
317
  if (process.platform === "win32") {
@@ -333,7 +333,7 @@ function killMitmByPidFile() {
333
333
  catch { try { process.kill(pid, "SIGKILL"); } catch { } }
334
334
  }
335
335
  }
336
- try { fs.unlinkSync(mitmPidFile); } catch { }
336
+ try { fs.unlinkSync(pidFile); } catch { }
337
337
  } catch { }
338
338
  }
339
339
 
@@ -584,8 +584,8 @@ function startServer(latestVersion) {
584
584
  const { killTray } = require("./src/cli/tray/tray");
585
585
  killTray();
586
586
  } catch (e) { }
587
- // Kill MITM server (admin/sudo process) via PID file
588
- killMitmByPidFile();
587
+ // Kill MIT server (privileged process) via PID file
588
+ killProxyByPidFile();
589
589
  // Kill cloudflared/tailscale via PID file (only this app's tunnel)
590
590
  killTunnelByPidFile();
591
591
  // Kill server process directly
@@ -772,7 +772,7 @@ function startServer(latestVersion) {
772
772
  if (aliveMs >= RESTART_RESET_MS) restartCount = 0;
773
773
 
774
774
  if (restartCount >= MAX_RESTARTS) {
775
- console.error(`\nâš ī¸ Server crashed ${MAX_RESTARTS} times. Disabling MITM and restarting...`);
775
+ console.error(`\nâš ī¸ Server crashed ${MAX_RESTARTS} times. Disabling MIT and restarting...`);
776
776
  try {
777
777
  const dbPath = path.join(os.homedir(), process.platform === "win32" ? path.join("AppData", "Roaming", "9router", "db.json") : path.join(".9router", "db.json"));
778
778
  if (fs.existsSync(dbPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ltgiang/9router",
3
- "version": "0.4.56",
3
+ "version": "0.4.60",
4
4
  "description": "9Router CLI - Start and manage 9Router server",
5
5
  "bin": {
6
6
  "9router": "./cli.js"
@@ -26,9 +26,12 @@ function getDataDir() {
26
26
  }
27
27
 
28
28
  const MACHINE_ID_FILE = path.join(getDataDir(), "machine-id");
29
+ const AUTH_DIR = path.join(getDataDir(), "auth");
30
+ const CLI_SECRET_FILE = path.join(AUTH_DIR, "cli-secret");
29
31
 
30
32
  let config = { ...DEFAULT_CONFIG };
31
33
  let cachedCliToken = null;
34
+ let cachedCliSecret = null;
32
35
 
33
36
  // Read raw machineId from shared file (written by server) → guarantees token match
34
37
  function loadRawMachineId() {
@@ -39,10 +42,26 @@ function loadRawMachineId() {
39
42
  try { return machineIdSync(); } catch { return ""; }
40
43
  }
41
44
 
45
+ // Random secret shared with server via file → token unpredictable from machineId alone.
46
+ function loadCliSecret() {
47
+ if (cachedCliSecret) return cachedCliSecret;
48
+ try {
49
+ cachedCliSecret = fs.readFileSync(CLI_SECRET_FILE, "utf8").trim();
50
+ if (cachedCliSecret) return cachedCliSecret;
51
+ } catch {}
52
+ cachedCliSecret = crypto.randomBytes(32).toString("hex");
53
+ try {
54
+ fs.mkdirSync(AUTH_DIR, { recursive: true });
55
+ fs.writeFileSync(CLI_SECRET_FILE, cachedCliSecret, { mode: 0o600 });
56
+ } catch {}
57
+ return cachedCliSecret;
58
+ }
59
+
42
60
  function getCliToken() {
43
61
  if (cachedCliToken !== null) return cachedCliToken;
44
62
  const raw = loadRawMachineId();
45
- cachedCliToken = raw ? crypto.createHash("sha256").update(raw + CLI_TOKEN_SALT).digest("hex").substring(0, 16) : "";
63
+ const secret = loadCliSecret();
64
+ cachedCliToken = raw ? crypto.createHash("sha256").update(raw + CLI_TOKEN_SALT + secret).digest("hex").substring(0, 16) : "";
46
65
  return cachedCliToken;
47
66
  }
48
67
 
@@ -1 +0,0 @@
1
- "use strict";exports.id=2549,exports.ids=[2549],exports.modules={12557:(a,b,c)=>{c.d(b,{Bl:()=>j,Qo:()=>f,S5:()=>l,hk:()=>e,kJ:()=>k});var d=c(3662);function e(a,b,c=0){let f=b?("string"==typeof b?b:JSON.stringify(b)).toLowerCase():"";for(let b of d.t2)if(b.text&&f&&f.includes(b.text)||b.status&&b.status===a){if(b.backoff){let a=Math.min(c+1,d.EQ.maxLevel);return{shouldFallback:!0,cooldownMs:function(a=0){let b=Math.max(0,a-1);return Math.min(d.EQ.base*Math.pow(2,b),d.EQ.max)}(a),newBackoffLevel:a}}return{shouldFallback:!0,cooldownMs:b.cooldownMs}}return{shouldFallback:!0,cooldownMs:d.wf}}function f(a){if(!a)return"";let b=new Date(a).getTime()-Date.now();if(b<=0)return"reset after 0s";let c=Math.ceil(b/1e3),d=Math.floor(c/3600),e=Math.floor(c%3600/60),f=c%60,g=[];return d>0&&g.push(`${d}h`),e>0&&g.push(`${e}m`),(f>0||0===g.length)&&g.push(`${f}s`),`reset after ${g.join(" ")}`}let g="modelLock_",h=`${g}__all`;function i(a){return a?`${g}${a}`:h}function j(a,b){let c=a[i(b)]||a[h];return!!c&&new Date(c).getTime()>Date.now()}function k(a){if(!a)return null;let b=null,c=Date.now();for(let[d,e]of Object.entries(a)){if(!d.startsWith(g)||!e)continue;let a=new Date(e).getTime();a<=c||(!b||a<b)&&(b=a)}return b?new Date(b).toISOString():null}function l(a,b){return{[i(a)]:new Date(Date.now()+b).toISOString()}}},13808:(a,b,c)=>{c.d(b,{lz:()=>f});var d=c(55511),e=c.n(d);function f(){let a=e().randomBytes(32).toString("base64url"),b=e().createHash("sha256").update(a).digest("base64url");return{codeVerifier:a,codeChallenge:b,state:e().randomBytes(32).toString("base64url")}}},43659:(a,b,c)=>{c.d(b,{A1:()=>g,lR:()=>i,wO:()=>h,yj:()=>e,zL:()=>f});var d=c(3662);function e(a,b){let c;return new Response(JSON.stringify((c=d.LY[a]||(a>=500?{type:"server_error",code:"internal_server_error"}:{type:"invalid_request_error",code:""}),{error:{message:b||d.O[a]||"An error occurred",type:c.type,code:c.code}})),{status:a,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}async function f(a,b=null){let c="";try{c=await a.text()}catch{c=""}if(b&&"function"==typeof b.parseError)try{let e=b.parseError(a,c);if(e&&"object"==typeof e){let b=e.message||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:e.status||a.status,message:b,resetsAtMs:e.resetsAtMs}}}catch{}let e="";try{let a=JSON.parse(c);e=a.error?.message||a.message||a.error||c}catch{e=c}let g=("string"==typeof e?e:JSON.stringify(e))||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:a.status,message:g}}function g(a,b,c){return{success:!1,status:a,error:b,resetsAtMs:c,response:e(a,b)}}function h(a,b,c,d){let e=Math.max(Math.ceil((new Date(c).getTime()-Date.now())/1e3),1);return new Response(JSON.stringify({error:{message:`${b} (${d})`}}),{status:a,headers:{"Content-Type":"application/json","Retry-After":String(e)}})}function i(a,b,c,d){let e=d||a.code||"FETCH_FAILED",f=a.message||"Unknown error",g=a.cause?.code,h=a.cause?.message,i=g||h?` (cause: ${[g,h].filter(Boolean).join(": ")})`:"";return`[${e}]: ${f}${i}`}},74177:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{PY:()=>p,Re:()=>n,Su:()=>o,exchangeTokens:()=>m,kP:()=>l,sO:()=>k});var e=c(48895),f=c(13808),g=c(92990),h=a([e]);function i(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 j(a){let b=i(a);if(!b)return{};let c=b["https://api.openai.com/auth"]||{};return{email:b.email,chatgptAccountId:c.chatgpt_account_id,chatgptPlanType:c.chatgpt_plan_type}}e=(h.then?(await h)():h)[0];let q={claude:{config:g.OV,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d)=>{let e=new URLSearchParams({code:"true",client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c});return`${a.authorizeUrl}?${e.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=b,g="";if(f.includes("#")){let a=f.split("#");f=a[0],g=a[1]||""}let h=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({code:f,state:g||e,grant_type:"authorization_code",client_id:a.clientId,redirect_uri:c,code_verifier:d})});if(!h.ok){let a=await h.text();throw Error(`Token exchange failed: ${a}`)}return await h.json()},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope})},codex:{config:g.DI,flowType:"authorization_code_pkce",fixedPort:1455,callbackPath:"/auth/callback",buildAuthUrl:(a,b,c,d)=>{let e={response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,...a.extraParams,state:c},f=Object.entries(e).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${f}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b=j(a.id_token),c={accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in};return b.email&&(c.email=b.email),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}},"gemini-cli":{config:g.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(`${g.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},d="";try{let b=await fetch("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:getOAuthClientMetadata(),mode:1})});if(b.ok){let a=await b.json();d=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})},antigravity:{config:g.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":g.YT.loadCodeAssistUserAgent,"X-Goog-Api-Client":g.YT.loadCodeAssistApiClient,"Client-Metadata":g.YT.loadCodeAssistClientMetadata,"x-request-source":"local"},c={ideType:"IDE_UNSPECIFIED",platform:"PLATFORM_UNSPECIFIED",pluginType:"GEMINI"},d=await fetch(`${g.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"}}),e=d.ok?await d.json():{},f="",h="legacy-tier";try{let a=await fetch(g.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c})});if(a.ok){let b=await a.json();if(f=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 f&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(g.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:h,metadata:c})});if(a.ok){let b=await a.json();if(!0===b.done)break}}catch(a){break}await new Promise(a=>setTimeout(a,5e3))}})().catch(()=>{}),{userInfo:e,projectId:f}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})},iflow:{config:g.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(`${g.ZL.userInfoUrl}?accessToken=${encodeURIComponent(a.access_token)}`,{headers:{Accept:"application/json"}});if(!b.ok){let a=await b.text();throw Error(`Failed to fetch user info: ${a}`)}let c=await b.json();if(!c.success)throw Error(`User info request failed: ${c.message||"Unknown error"}`);let d=c.data||{};if(!d.apiKey||""===d.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(d.email?.trim()||d.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,apiKey:b?.userInfo?.apiKey,email:b?.userInfo?.email||b?.userInfo?.phone,displayName:b?.userInfo?.nickname||b?.userInfo?.name})},qoder:{config:g.hF,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,state:c});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(`${g.hF.userInfoUrl}?accessToken=${encodeURIComponent(a.access_token)}`,{headers:{Accept:"application/json"}});if(!b.ok){let a=await b.text();throw Error(`Failed to fetch user info: ${a}`)}let c=await b.json();if(!c.success)throw Error(`User info request failed: ${c.message||"Unknown error"}`);let d=c.data||{};if(!d.apiKey||""===d.apiKey.trim())throw Error("Empty API key returned from Qoder");if(!(d.email?.trim()||d.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,apiKey:b?.userInfo?.apiKey,email:b?.userInfo?.email||b?.userInfo?.phone,displayName:b?.userInfo?.nickname||b?.userInfo?.name})},qwen:{config:g.Hp,flowType:"device_code",requestDeviceCode:async(a,b)=>{let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scope,code_challenge:b,code_challenge_method:a.codeChallengeMethod})});if(!c.ok){let a=await c.text();throw Error(`Device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b,code_verifier:c})});return{ok:d.ok,data:await d.json()}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{resourceUrl:a.resource_url}})},github:{config:g.Nu,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scopes})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,device_code:b,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});try{c=await d.json()}catch(b){let a=await d.text();c={error:"invalid_response",error_description:a}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(g.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":g.Nu.apiVersion,"User-Agent":g.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(g.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":g.Nu.apiVersion,"User-Agent":g.Nu.userAgent}}),e=d.ok?await d.json():{};return{copilotToken:c,userInfo:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{copilotToken:b?.copilotToken?.token,copilotTokenExpiresAt:b?.copilotToken?.expires_at,githubUserId:b?.userInfo?.id,githubLogin:b?.userInfo?.login,githubName:b?.userInfo?.name,githubEmail:b?.userInfo?.email}})},kiro:{config:g.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1",e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,f="idc"===c.authMethod?"idc":"builder-id",g=`https://oidc.${d}.amazonaws.com/client/register`,h=`https://oidc.${d}.amazonaws.com/device_authorization`,i=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientName:a.clientName,clientType:a.clientType,scopes:a.scopes,grantTypes:a.grantTypes,issuerUrl:a.issuerUrl})});if(!i.ok){let a=await i.text();throw Error(`Client registration failed: ${a}`)}let j=await i.json(),k=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:j.clientId,clientSecret:j.clientSecret,startUrl:e})});if(!k.ok){let a=await k.text();throw Error(`Device authorization failed: ${a}`)}let l=await k.json();return{device_code:l.deviceCode,user_code:l.userCode,verification_uri:l.verificationUri,verification_uri_complete:l.verificationUriComplete,expires_in:l.expiresIn,interval:l.interval||5,_clientId:j.clientId,_clientSecret:j.clientSecret,_region:d,_authMethod:f,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,f=d?._region||"us-east-1",g=`https://oidc.${f}.amazonaws.com/token`,h=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:d?._clientId,clientSecret:d?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{e=await h.json()}catch(b){let a=await h.text();e={error:"invalid_response",error_description:a}}return e.accessToken?{ok:!0,data:{access_token:e.accessToken,refresh_token:e.refreshToken,expires_in:e.expiresIn,profile_arn:e?.profileArn||null,_clientId:d?._clientId,_clientSecret:d?._clientSecret,_region:d?._region,_authMethod:d?._authMethod,_startUrl:d?._startUrl}}:{ok:!1,data:{error:e.error||"authorization_pending",error_description:e.error_description||e.message}}},mapTokens:a=>{let b=function(a){let b=i(a);if(b)return b.email||b.preferred_username||b.sub||void 0}(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||g.Tx.startUrl}}}},cursor:{config:g.WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})},"kimi-coding":{config:g.t,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}let c=await b.json();return{device_code:c.device_code,user_code:c.user_code,verification_uri:c.verification_uri||"https://www.kimi.com/code/authorize_device",verification_uri_complete:c.verification_uri_complete||`https://www.kimi.com/code/authorize_device?user_code=${c.user_code}`,expires_in:c.expires_in,interval:c.interval||5}},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{c=await d.json()}catch(b){let a=await d.text();c={error:"invalid_response",error_description:a}}return{ok:d.ok,data:c}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in})},kilocode:{config:g.MZ,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.initiateUrl,{method:"POST",headers:{"Content-Type":"application/json"}});if(!b.ok){if(429===b.status)throw Error("Too many pending authorization requests. Please try again later.");let a=await b.text();throw Error(`Device auth initiation failed: ${a}`)}let c=await b.json();return{device_code:c.code,user_code:c.code,verification_uri:c.verificationUrl,verification_uri_complete:c.verificationUrl,expires_in:c.expiresIn||300,interval:3}},pollToken:async(a,b)=>{let c=await fetch(`${a.pollUrlBase}/${b}`);if(202===c.status)return{ok:!1,data:{error:"authorization_pending"}};if(403===c.status)return{ok:!1,data:{error:"access_denied",error_description:"Authorization denied by user"}};if(410===c.status)return{ok:!1,data:{error:"expired_token",error_description:"Authorization code expired"}};if(!c.ok)return{ok:!1,data:{error:"poll_failed",error_description:`Poll failed: ${c.status}`}};let d=await c.json();if("approved"===d.status&&d.token){let b=null;try{let c=await fetch(`${a.apiBaseUrl}/api/profile`,{headers:{Authorization:`Bearer ${d.token}`}});if(c.ok){let a=await c.json();b=a.organizations?.[0]?.id||null}}catch{}return{ok:!0,data:{access_token:d.token,_userEmail:d.userEmail,_orgId:b}}}return{ok:!1,data:{error:"authorization_pending"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:null,expiresIn:null,email:a._userEmail,...a._orgId?{providerSpecificData:{orgId:a._orgId}}:{}})},cline:{config:g.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}})},gitlab:{config:g.f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=e.clientId||"",h=new URLSearchParams({client_id:g,redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${h.toString()}`},exchangeToken:async(a,b,c,d,e,f={})=>{let g=f.baseUrl||a.defaultBaseUrl,h=f.clientId||"",i=f.clientSecret||"",j=new URLSearchParams({client_id:h,grant_type:"authorization_code",code:b,redirect_uri:c,code_verifier:d});i&&j.set("client_secret",i);let k=await fetch(`${g}${a.tokenUrlPath}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:j.toString()});if(!k.ok)throw Error(`GitLab token exchange failed: ${await k.text()}`);let l=await k.json(),m=await fetch(`${g}${a.userInfoUrlPath}`,{headers:{Authorization:`Bearer ${l.access_token}`}}),n=m.ok?await m.json():{};return{...l,_user:n,_baseUrl:g,_clientId:h}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,providerSpecificData:{username:a._user?.username||"",email:a._user?.email||a._user?.public_email||"",name:a._user?.name||"",baseUrl:a._baseUrl,clientId:a._clientId,authKind:"oauth"}})},codebuddy:{config:g.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,{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:JSON.stringify({state:b})});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"}}: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:86400,providerSpecificData:{}})}};function k(a){let b=q[a];if(!b)throw Error(`Unknown provider: ${a}`);return b}function l(a,b,c){let d=k(a),{codeVerifier:e,codeChallenge:g,state:h}=(0,f.lz)();return{authUrl:"device_code"===d.flowType?null:"authorization_code_pkce"===d.flowType?d.buildAuthUrl(d.config,b,h,g,c||{}):d.buildAuthUrl(d.config,b,h,void 0,c||{}),state:h,codeVerifier:e,codeChallenge:g,redirectUri:b,flowType:d.flowType,fixedPort:d.fixedPort,callbackPath:d.callbackPath||"/callback"}}async function m(a,b,c,d,e,f){let g=k(a),h=await g.exchangeToken(g.config,b,c,d,e,f||{}),i=null;return g.postExchange&&(i=await g.postExchange(h)),g.mapTokens(h,i)}async function n(a,b,c){let d=k(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 o(a,b,c,d){let e=k(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 a=null;return e.postExchange&&(a=await e.postExchange(f.data)),{success:!0,tokens:e.mapTokens(f.data,a)}}else if("authorization_pending"===f.data.error||"slow_down"===f.data.error)return{success:!1,error:f.data.error,errorDescription:f.data.error_description||f.data.message,pending:"authorization_pending"===f.data.error};else return{success:!1,error:f.data.error||"no_access_token",errorDescription:f.data.error_description||f.data.message||"No access token received"};return{success:!1,error:f.data.error,errorDescription:f.data.error_description}}let r=!1;async function p(){if(!r){r=!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=j(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){r=!1,console.log("backfillCodexEmails failed:",a?.message||a)}}}d()}catch(a){d(a)}})},92990:(a,b,c)=>{c.d(b,{DI:()=>e,Hp:()=>g,LT:()=>f,MZ:()=>o,Nl:()=>r,Nu:()=>k,OV:()=>d,Tx:()=>l,WN:()=>m,YT:()=>j,ZL:()=>i,f7:()=>q,hF:()=>h,lB:()=>p,t:()=>n}),c(21820);let d={clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",authorizeUrl:"https://claude.ai/oauth/authorize",tokenUrl:"https://api.anthropic.com/v1/oauth/token",scopes:["org:create_api_key","user:profile","user:inference"],codeChallengeMethod:"S256"},e={clientId:"app_EMoamEEZ73f0CkXaXp7hrann",authorizeUrl:"https://auth.openai.com/oauth/authorize",tokenUrl:"https://auth.openai.com/oauth/token",scope:"openid profile email offline_access",codeChallengeMethod:"S256",extraParams:{id_token_add_organizations:"true",codex_cli_simplified_flow:"true",originator:"codex_cli_rs"}},f={clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile"]},g={clientId:"f0304373b74a44d2b584a3fb70ca9e56",deviceCodeUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",scope:"openid profile email model.completion",codeChallengeMethod:"S256"},h={apiBaseUrl:"https://api2.qoder.sh",deviceTokenUrl:"https://api2.qoder.sh/api/v1/deviceToken/poll",deviceRefreshUrl:"https://api2.qoder.sh/api/v1/deviceToken/refresh",refreshUrl:"https://api2.qoder.sh/api/v3/user/refresh_token",userInfoUrl:"https://api2.qoder.sh/api/v1/userinfo",statusUrl:"https://api2.qoder.sh/api/v3/user/status",loginUrl:"https://qoder.com/login"},i={clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",authorizeUrl:"https://iflow.cn/oauth",tokenUrl:"https://iflow.cn/oauth/token",userInfoUrl:"https://iflow.cn/api/oauth/getUserInfo",extraParams:{loginMethod:"phone",type:"phone"}},j={clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/cclog","https://www.googleapis.com/auth/experimentsandconfigs"],apiEndpoint:"https://cloudcode-pa.googleapis.com",apiVersion:"v1internal",loadCodeAssistEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUserEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser",loadCodeAssistUserAgent:"google-api-nodejs-client/9.15.1",loadCodeAssistApiClient:"google-cloud-sdk vscode_cloudshelleditor/0.1",loadCodeAssistClientMetadata:JSON.stringify({ideType:"IDE_UNSPECIFIED",platform:"PLATFORM_UNSPECIFIED",pluginType:"GEMINI"})},k={clientId:"Iv1.b507a08c87ecfe98",deviceCodeUrl:"https://github.com/login/device/code",tokenUrl:"https://github.com/login/oauth/access_token",userInfoUrl:"https://api.github.com/user",scopes:"read:user",apiVersion:"2022-11-28",copilotTokenUrl:"https://api.github.com/copilot_internal/v2/token",userAgent:"GitHubCopilotChat/0.26.7",editorVersion:"vscode/1.85.0",editorPluginVersion:"copilot-chat/0.26.7"},l={ssoOidcEndpoint:"https://oidc.us-east-1.amazonaws.com",registerClientUrl:"https://oidc.us-east-1.amazonaws.com/client/register",deviceAuthUrl:"https://oidc.us-east-1.amazonaws.com/device_authorization",tokenUrl:"https://oidc.us-east-1.amazonaws.com/token",startUrl:"https://view.awsapps.com/start",clientName:"kiro-oauth-client",clientType:"public",scopes:["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations"],grantTypes:["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],issuerUrl:"https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6",socialAuthEndpoint:"https://prod.us-east-1.auth.desktop.kiro.dev",socialLoginUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/login",socialTokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token",socialRefreshUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",authMethods:["builder-id","idc","google","github","import"]},m={apiEndpoint:"https://api2.cursor.sh",chatEndpoint:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",modelsEndpoint:"/aiserver.v1.AiService/GetDefaultModelNudgeData",api3Endpoint:"https://api3.cursor.sh",agentEndpoint:"https://agent.api5.cursor.sh",agentNonPrivacyEndpoint:"https://agentn.api5.cursor.sh",clientVersion:"3.1.0",clientType:"ide",tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"},dbKeys:{accessToken:"cursorAuth/accessToken",machineId:"storage.serviceMachineId"}},n={clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||"17e5f671-d194-4dfb-9706-5516cb48c098",deviceCodeUrl:"https://auth.kimi.com/api/oauth/device_authorization",tokenUrl:"https://auth.kimi.com/api/oauth/token"},o={apiBaseUrl:"https://api.kilo.ai",initiateUrl:"https://api.kilo.ai/api/device-auth/codes",pollUrlBase:"https://api.kilo.ai/api/device-auth/codes"},p={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},q={defaultBaseUrl:"https://gitlab.com",authorizeUrlPath:"/oauth/authorize",tokenUrlPath:"/oauth/token",userInfoUrlPath:"/api/v4/user",scope:"api read_user",codeChallengeMethod:"S256"},r={baseUrl:"https://copilot.tencent.com",stateUrl:"https://copilot.tencent.com/v2/plugin/auth/state",tokenUrl:"https://copilot.tencent.com/v2/plugin/auth/token",refreshUrl:"https://copilot.tencent.com/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",platform:"CLI",pollInterval:5e3}}};
@@ -1,13 +0,0 @@
1
- exports.id=4884,exports.ids=[4884],exports.modules={644:(a,b,c)=>{"use strict";function d(a,b=null){if(null==a)return b;if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return b}}function e(a){return JSON.stringify(a??null)}c.d(b,{q:()=>d,s:()=>e})},1129:(a,b,c)=>{"use strict";c.r(b),c.d(b,{createProviderNode:()=>k,deleteProviderNode:()=>m,getProviderNodeById:()=>j,getProviderNodes:()=>i,updateProviderNode:()=>l});var d=c(94755),e=c(36366),f=c(644);function g(a){return a?{...(0,f.q)(a.data,{}),id:a.id,type:a.type,name:a.name,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}function h(a,b){let c=function(a){let{id:b,type:c,name:d,createdAt:e,updatedAt:g,...h}=a;return{id:b,type:c??null,name:d??null,data:(0,f.s)(h),createdAt:e,updatedAt:g}}(b);a.run(`INSERT INTO providerNodes(id, type, name, data, createdAt, updatedAt)
2
- VALUES(?, ?, ?, ?, ?, ?)
3
- ON CONFLICT(id) DO UPDATE SET
4
- type=excluded.type, name=excluded.name, data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.type,c.name,c.data,c.createdAt,c.updatedAt])}async function i(a={}){let b=await (0,e.c)(),c=[],d=[];a.type&&(c.push("type = ?"),d.push(a.type));let f=`SELECT * FROM providerNodes${c.length?` WHERE ${c.join(" AND ")}`:""}`;return b.all(f,d).map(g)}async function j(a){return g((await (0,e.c)()).get("SELECT * FROM providerNodes WHERE id = ?",[a]))}async function k(a){let b=await (0,e.c)(),c=new Date().toISOString(),f={id:a.id||(0,d.A)(),type:a.type,name:a.name,prefix:a.prefix,apiType:a.apiType,baseUrl:a.baseUrl,createdAt:c,updatedAt:c};return h(b,f),f}async function l(a,b){let c=await (0,e.c)(),d=null;return c.transaction(()=>{let e=c.get("SELECT * FROM providerNodes WHERE id = ?",[a]);if(!e)return;let f={...g(e),...b,updatedAt:new Date().toISOString()};h(c,f),d=f}),d}async function m(a){let b=await (0,e.c)(),c=null;return b.transaction(()=>{let d=b.get("SELECT * FROM providerNodes WHERE id = ?",[a]);d&&(c=g(d),b.run("DELETE FROM providerNodes WHERE id = ?",[a]))}),c}},5781:(a,b,c)=>{"use strict";c.r(b),c.d(b,{cleanupProviderConnections:()=>r,createProviderConnection:()=>m,deleteProviderConnection:()=>o,deleteProviderConnectionsByProvider:()=>p,getProviderConnectionById:()=>k,getProviderConnections:()=>j,reorderProviderConnections:()=>q,updateProviderConnection:()=>n});var d=c(94755),e=c(36366),f=c(644);let g=["displayName","email","globalPriority","defaultModel","accessToken","refreshToken","expiresAt","tokenType","scope","projectId","apiKey","testStatus","lastTested","lastError","lastErrorAt","rateLimitedUntil","expiresIn","errorCode","consecutiveUseCount"];function h(a){return a?{...(0,f.q)(a.data,{}),id:a.id,provider:a.provider,authType:a.authType,name:a.name,email:a.email,priority:a.priority,isActive:1===a.isActive||!0===a.isActive,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}function i(a,b){let c=function(a){let{id:b,provider:c,authType:d,name:e,email:g,priority:h,isActive:i,createdAt:j,updatedAt:k,...l}=a;return{id:b,provider:c,authType:d,name:e??null,email:g??null,priority:h??null,isActive:+(!1!==i),data:(0,f.s)(l),createdAt:j,updatedAt:k}}(b);a.run(`INSERT INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt)
5
- VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
6
- ON CONFLICT(id) DO UPDATE SET
7
- provider=excluded.provider, authType=excluded.authType, name=excluded.name,
8
- email=excluded.email, priority=excluded.priority, isActive=excluded.isActive,
9
- data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.provider,c.authType,c.name,c.email,c.priority,c.isActive,c.data,c.createdAt,c.updatedAt])}async function j(a={}){let b=await (0,e.c)(),c=[],d=[];a.provider&&(c.push("provider = ?"),d.push(a.provider)),void 0!==a.isActive&&(c.push("isActive = ?"),d.push(+!!a.isActive));let f=`SELECT * FROM providerConnections${c.length?` WHERE ${c.join(" AND ")}`:""}`,g=b.all(f,d).map(h);return g.sort((a,b)=>(a.priority||999)-(b.priority||999)),g}async function k(a){return h((await (0,e.c)()).get("SELECT * FROM providerConnections WHERE id = ?",[a]))}function l(a,b){let c=a.all("SELECT * FROM providerConnections WHERE provider = ?",[b]).map(h);c.sort((a,b)=>{let c=(a.priority||0)-(b.priority||0);return 0!==c?c:new Date(b.updatedAt||0)-new Date(a.updatedAt||0)}),c.forEach((b,c)=>{a.run("UPDATE providerConnections SET priority = ? WHERE id = ?",[c+1,b.id])})}async function m(a){let b,c=await (0,e.c)(),f=new Date().toISOString();return c.transaction(()=>{let e=c.all("SELECT * FROM providerConnections WHERE provider = ?",[a.provider]).map(h),j=null;if("oauth"===a.authType&&a.email?j=e.find(b=>"oauth"===b.authType&&b.email===a.email):"apikey"===a.authType&&a.name&&(j=e.find(b=>"apikey"===b.authType&&b.name===a.name)),j){let d={...j,...a,updatedAt:f};i(c,d),b=d;return}let k=a.name||null;k||"oauth"!==a.authType||(k=a.email||`Account ${e.length+1}`);let m=a.priority;m||(m=e.reduce((a,b)=>Math.max(a,b.priority||0),0)+1);let n={id:(0,d.A)(),provider:a.provider,authType:a.authType||"oauth",name:k,priority:m,isActive:void 0===a.isActive||a.isActive,createdAt:f,updatedAt:f};for(let b of g)void 0!==a[b]&&null!==a[b]&&(n[b]=a[b]);a.providerSpecificData&&Object.keys(a.providerSpecificData).length>0&&(n.providerSpecificData=a.providerSpecificData),void 0!==a.email&&(n.email=a.email),i(c,n),l(c,a.provider),b=n}),b}async function n(a,b){let c,d=await (0,e.c)();return d.transaction(()=>{let e=d.get("SELECT * FROM providerConnections WHERE id = ?",[a]);if(!e){c=null;return}let f=h(e),g={...f,...b,updatedAt:new Date().toISOString()};i(d,g),void 0!==b.priority&&l(d,f.provider),c=g}),c}async function o(a){let b=await (0,e.c)(),c=!1;return b.transaction(()=>{let d=b.get("SELECT provider FROM providerConnections WHERE id = ?",[a]);d&&(b.run("DELETE FROM providerConnections WHERE id = ?",[a]),l(b,d.provider),c=!0)}),c}async function p(a){let b=await (0,e.c)(),c=b.get("SELECT COUNT(*) AS n FROM providerConnections WHERE provider = ?",[a]);return b.run("DELETE FROM providerConnections WHERE provider = ?",[a]),c?.n||0}async function q(a){let b=await (0,e.c)();b.transaction(()=>l(b,a))}async function r(){let a=await (0,e.c)(),b=["displayName","email","globalPriority","defaultModel","accessToken","refreshToken","expiresAt","tokenType","scope","projectId","apiKey","testStatus","lastTested","lastError","lastErrorAt","rateLimitedUntil","expiresIn","consecutiveUseCount"],c=0;return a.transaction(()=>{for(let d of a.all("SELECT * FROM providerConnections")){let e=h(d),f=!1;for(let a of b)(null===e[a]||void 0===e[a])&&a in e&&(delete e[a],c++,f=!0);e.providerSpecificData&&0===Object.keys(e.providerSpecificData).length&&(delete e.providerSpecificData,c++,f=!0),f&&i(a,e)}}),c}},9248:(a,b,c)=>{"use strict";c.d(b,{S8:()=>y.S8,E5:()=>V,Iq:()=>q.createApiKey,jd:()=>v,iE:()=>g.createProviderConnection,i0:()=>h.createProviderNode,ZO:()=>n,Lh:()=>q.deleteApiKey,CG:()=>x,uL:()=>y.uL,fv:()=>y.fv,fK:()=>g.deleteProviderConnection,op:()=>g.deleteProviderConnectionsByProvider,Pc:()=>h.deleteProviderNode,Yd:()=>p,tm:()=>C,oF:()=>D,zP:()=>ag,rg:()=>Q,yg:()=>q.getApiKeyById,PX:()=>q.getApiKeys,j$:()=>U,L:()=>t,Dj:()=>u,Uv:()=>s,uv:()=>y.uv,vF:()=>B,c:()=>y.getMitmAlias,OM:()=>y.OM,r4:()=>z.r4,Mc:()=>g.getProviderConnectionById,P:()=>g.getProviderConnections,Qu:()=>h.getProviderNodeById,Fh:()=>h.getProviderNodes,hr:()=>m,ui:()=>l,Zx:()=>W,SL:()=>ae,mt:()=>f.getSettings,BY:()=>T,K1:()=>ah,VT:()=>z.VT,yF:()=>z.yF,ox:()=>ad,sZ:()=>R,L9:()=>y.L9,o5:()=>y.o5,_V:()=>K,uw:()=>P,XW:()=>q.updateApiKey,oG:()=>w,KJ:()=>z.KJ,rj:()=>g.updateProviderConnection,ho:()=>h.updateProviderNode,Q_:()=>o,Xx:()=>f.Xx,ek:()=>q.validateApiKey});var d=c(36366),e=c(644),f=c(42655),g=c(5781),h=c(1129),i=c(94755);function j(a){return a?{...(0,e.q)(a.data,{}),id:a.id,isActive:1===a.isActive||!0===a.isActive,testStatus:a.testStatus,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}function k(a,b){let c=function(a){let{id:b,isActive:c,testStatus:d,createdAt:f,updatedAt:g,...h}=a;return{id:b,isActive:+(!1!==c),testStatus:d??null,data:(0,e.s)(h),createdAt:f,updatedAt:g}}(b);a.run(`INSERT INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt)
10
- VALUES(?, ?, ?, ?, ?, ?)
11
- ON CONFLICT(id) DO UPDATE SET
12
- isActive=excluded.isActive, testStatus=excluded.testStatus,
13
- data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.isActive,c.testStatus,c.data,c.createdAt,c.updatedAt])}async function l(a={}){let b=await (0,d.c)(),c=[],e=[];void 0!==a.isActive&&(c.push("isActive = ?"),e.push(+!!a.isActive)),a.testStatus&&(c.push("testStatus = ?"),e.push(a.testStatus));let f=`SELECT * FROM proxyPools${c.length?` WHERE ${c.join(" AND ")}`:""}`,g=b.all(f,e).map(j);return g.sort((a,b)=>new Date(b.updatedAt||0)-new Date(a.updatedAt||0)),g}async function m(a){return j((await (0,d.c)()).get("SELECT * FROM proxyPools WHERE id = ?",[a]))}async function n(a){let b=await (0,d.c)(),c=new Date().toISOString(),e={id:a.id||(0,i.A)(),name:a.name,proxyUrl:a.proxyUrl,noProxy:a.noProxy||"",type:a.type||"http",isActive:void 0===a.isActive||a.isActive,strictProxy:!0===a.strictProxy,testStatus:a.testStatus||"unknown",lastTestedAt:a.lastTestedAt||null,lastError:a.lastError||null,createdAt:c,updatedAt:c};return k(b,e),e}async function o(a,b){let c=await (0,d.c)(),e=null;return c.transaction(()=>{let d=c.get("SELECT * FROM proxyPools WHERE id = ?",[a]);if(!d)return;let f={...j(d),...b,updatedAt:new Date().toISOString()};k(c,f),e=f}),e}async function p(a){let b=await (0,d.c)(),c=null;return b.transaction(()=>{let d=b.get("SELECT * FROM proxyPools WHERE id = ?",[a]);d&&(c=j(d),b.run("DELETE FROM proxyPools WHERE id = ?",[a]))}),c}var q=c(74452);function r(a){return a?{id:a.id,name:a.name,kind:a.kind,models:(0,e.q)(a.models,[]),createdAt:a.createdAt,updatedAt:a.updatedAt}:null}async function s(){return(await (0,d.c)()).all("SELECT * FROM combos ORDER BY createdAt ASC").map(r)}async function t(a){return r((await (0,d.c)()).get("SELECT * FROM combos WHERE id = ?",[a]))}async function u(a){return r((await (0,d.c)()).get("SELECT * FROM combos WHERE name = ?",[a]))}async function v(a){let b=await (0,d.c)(),c=new Date().toISOString(),f={id:(0,i.A)(),name:a.name,kind:a.kind||null,models:a.models||[],createdAt:c,updatedAt:c};return b.run("INSERT INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[f.id,f.name,f.kind,(0,e.s)(f.models),f.createdAt,f.updatedAt]),f}async function w(a,b){let c=await (0,d.c)(),f=null;return c.transaction(()=>{let d=c.get("SELECT * FROM combos WHERE id = ?",[a]);if(!d)return;let g={...r(d),...b,updatedAt:new Date().toISOString()};c.run("UPDATE combos SET name = ?, kind = ?, models = ?, updatedAt = ? WHERE id = ?",[g.name,g.kind,(0,e.s)(g.models||[]),g.updatedAt,a]),f=g}),f}async function x(a){let b=(await (0,d.c)()).run("DELETE FROM combos WHERE id = ?",[a]);return(b?.changes??0)>0}var y=c(9460),z=c(97914);let A="disabledModels";async function B(){let a=(await (0,d.c)()).all("SELECT key, value FROM kv WHERE scope = ?",[A]),b={};for(let c of a)b[c.key]=(0,e.q)(c.value,[]);return b}async function C(a,b){if(!a||!Array.isArray(b))return;let c=await (0,d.c)();c.transaction(()=>{let d=c.get("SELECT value FROM kv WHERE scope = ? AND key = ?",[A,a]),f=[...new Set([...d&&(0,e.q)(d.value,[])||[],...b])];c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[A,a,(0,e.s)(f)])})}async function D(a,b){if(!a)return;let c=await (0,d.c)();c.transaction(()=>{if(!Array.isArray(b)||0===b.length)return void c.run("DELETE FROM kv WHERE scope = ? AND key = ?",[A,a]);let d=c.get("SELECT value FROM kv WHERE scope = ? AND key = ?",[A,a]),f=d&&(0,e.q)(d.value,[])||[],g=new Set(b),h=f.filter(a=>!g.has(a));0===h.length?c.run("DELETE FROM kv WHERE scope = ? AND key = ?",[A,a]):c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[A,a,(0,e.s)(h)])})}var E=c(94735);c(62674);global._pendingRequests||(global._pendingRequests={byModel:{},byAccount:{}}),global._lastErrorProvider||(global._lastErrorProvider={provider:"",ts:0}),global._statsEmitter||(global._statsEmitter=new E.EventEmitter,global._statsEmitter.setMaxListeners(50)),global._pendingTimers||(global._pendingTimers={}),global._recentRing||(global._recentRing={items:[],initialized:!1}),global._connectionMapCache||(global._connectionMapCache={map:{},ts:0});let F=global._pendingRequests,G=global._lastErrorProvider,H=global._pendingTimers,I=global._recentRing,J=global._connectionMapCache,K=global._statsEmitter;function L(a,b,c){a[b]||(a[b]={requests:0,promptTokens:0,completionTokens:0,cost:0}),a[b].requests+=c.requests||1,a[b].promptTokens+=c.promptTokens||0,a[b].completionTokens+=c.completionTokens||0,a[b].cost+=c.cost||0,c.meta&&Object.assign(a[b],c.meta)}async function M(){if(Date.now()-J.ts<3e4)return J.map;try{let{getProviderConnections:a}=await Promise.resolve().then(c.bind(c,5781)),b=await a(),d={};for(let a of b)d[a.id]=a.name||a.email||a.id;J.map=d,J.ts=Date.now()}catch{}return J.map}async function N(){if(!I.initialized){I.initialized=!0;try{I.items=(await (0,d.c)()).all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, cost, status, tokens FROM usageHistory ORDER BY id DESC LIMIT ?",[50]).reverse().map(a=>({timestamp:a.timestamp,provider:a.provider,model:a.model,connectionId:a.connectionId,apiKey:a.apiKey,endpoint:a.endpoint,cost:a.cost,status:a.status,tokens:(0,e.q)(a.tokens,{})}))}catch{}}}async function O(a,b,d){if(!d||!a||!b)return 0;try{let{getPricingForModel:e}=await Promise.resolve().then(c.bind(c,97914)),f=await e(a,b);if(!f)return 0;let g=0,h=d.prompt_tokens||d.input_tokens||0,i=d.cached_tokens||d.cache_read_input_tokens||0,j=Math.max(0,h-i);if(g+=j*(f.input/1e6),i>0){let a=f.cached||f.input;g+=a/1e6*i}let k=d.completion_tokens||d.output_tokens||0;g+=k*(f.output/1e6);let l=d.reasoning_tokens||0;if(l>0){let a=f.reasoning||f.output;g+=a/1e6*l}let m=d.cache_creation_input_tokens||0;if(m>0){let a=f.cache_creation||f.input;g+=a/1e6*m}return g}catch(a){return console.error("Error calculating cost:",a),0}}function P(a,b,c,d,e=!1){let f=b?`${a} (${b})`:a,g=`${c}|${f}`;F.byModel[f]||(F.byModel[f]=0),F.byModel[f]=Math.max(0,F.byModel[f]+(d?1:-1)),0===F.byModel[f]&&delete F.byModel[f],c&&(F.byAccount[c]||(F.byAccount[c]={}),F.byAccount[c][f]||(F.byAccount[c][f]=0),F.byAccount[c][f]=Math.max(0,F.byAccount[c][f]+(d?1:-1)),0===F.byAccount[c][f]&&(delete F.byAccount[c][f],0===Object.keys(F.byAccount[c]).length&&delete F.byAccount[c])),d?(clearTimeout(H[g]),H[g]=setTimeout(()=>{delete H[g],F.byModel[f]>0&&(F.byModel[f]=0),c&&F.byAccount[c]?.[f]>0&&(F.byAccount[c][f]=0),K.emit("pending")},6e4)):(clearTimeout(H[g]),delete H[g]),!d&&e&&b&&(G.provider=b.toLowerCase(),G.ts=Date.now());let h=new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});console.log(`[${h}] [PENDING] ${d?"START":"END"}${e?" (ERROR)":""} | provider=${b} | model=${a}`),K.emit("pending")}async function Q(){let a=[],b=await M();for(let[c,d]of Object.entries(F.byAccount))for(let[e,f]of Object.entries(d))if(f>0){let d=b[c]||`Account ${c.slice(0,8)}...`,g=e.match(/^(.*) \((.*)\)$/);a.push({model:g?g[1]:e,provider:g?g[2]:"unknown",account:d,count:f})}await N();let c=new Set;return{activeRequests:a,recentRequests:[...I.items].sort((a,b)=>new Date(b.timestamp)-new Date(a.timestamp)).map(a=>{let b=a.tokens||{};return{timestamp:a.timestamp,model:a.model,provider:a.provider||"",promptTokens:b.prompt_tokens||b.input_tokens||0,completionTokens:b.completion_tokens||b.output_tokens||0,status:a.status||"ok"}}).filter(a=>{if(0===a.promptTokens&&0===a.completionTokens)return!1;let b=a.timestamp?a.timestamp.slice(0,16):"",d=`${a.model}|${a.provider}|${a.promptTokens}|${a.completionTokens}|${b}`;return!c.has(d)&&(c.add(d),!0)}).slice(0,20),errorProvider:Date.now()-G.ts<1e4?G.provider:""}}async function R(a){try{let b=await (0,d.c)();a.timestamp||(a.timestamp=new Date().toISOString()),a.cost=await O(a.provider,a.model,a.tokens);let c=a.tokens||{},f=c.prompt_tokens||c.input_tokens||0,g=c.completion_tokens||c.output_tokens||0;b.transaction(()=>{var d;let h,i,j,k,l,m,n,o,p,q;b.run("INSERT INTO usageHistory(timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, status, tokens, meta) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[a.timestamp,a.provider||null,a.model||null,a.connectionId||null,a.apiKey||null,a.endpoint||null,f,g,a.cost||0,a.status||"ok",(0,e.s)(c),(0,e.s)({})]);let r=(h=(d=a.timestamp)?new Date(d):new Date,`${h.getFullYear()}-${String(h.getMonth()+1).padStart(2,"0")}-${String(h.getDate()).padStart(2,"0")}`),s=b.get("SELECT data FROM usageDaily WHERE dateKey = ?",[r]),t=s?(0,e.q)(s.data,{}):{requests:0,promptTokens:0,completionTokens:0,cost:0,byProvider:{},byModel:{},byAccount:{},byApiKey:{},byEndpoint:{}};i=a.tokens?.prompt_tokens||a.tokens?.input_tokens||0,j=a.tokens?.completion_tokens||a.tokens?.output_tokens||0,k=a.cost||0,l={promptTokens:i,completionTokens:j,cost:k},t.requests=(t.requests||0)+1,t.promptTokens=(t.promptTokens||0)+i,t.completionTokens=(t.completionTokens||0)+j,t.cost=(t.cost||0)+k,t.byProvider||={},t.byModel||={},t.byAccount||={},t.byApiKey||={},t.byEndpoint||={},a.provider&&L(t.byProvider,a.provider,l),m=a.provider?`${a.model}|${a.provider}`:a.model,L(t.byModel,m,{...l,meta:{rawModel:a.model,provider:a.provider}}),a.connectionId&&L(t.byAccount,a.connectionId,{...l,meta:{rawModel:a.model,provider:a.provider}}),n=a.apiKey&&"string"==typeof a.apiKey?a.apiKey:"local-no-key",o=`${n}|${a.model}|${a.provider||"unknown"}`,L(t.byApiKey,o,{...l,meta:{rawModel:a.model,provider:a.provider,apiKey:a.apiKey||null}}),p=a.endpoint||"Unknown",q=`${p}|${a.model}|${a.provider||"unknown"}`,L(t.byEndpoint,q,{...l,meta:{endpoint:p,rawModel:a.model,provider:a.provider}}),b.run("INSERT INTO usageDaily(dateKey, data) VALUES(?, ?) ON CONFLICT(dateKey) DO UPDATE SET data = excluded.data",[r,(0,e.s)(t)]);let u=b.get("SELECT value FROM _meta WHERE key = 'totalRequestsLifetime'"),v=(u?parseInt(u.value,10):0)+1;b.run("INSERT INTO _meta(key, value) VALUES('totalRequestsLifetime', ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[String(v)])}),I.items.push(a),I.items.length>50&&(I.items=I.items.slice(-50)),K.emit("update")}catch(a){console.error("Failed to save usage stats:",a)}}function S(a,b){if(null==b)return a.all("SELECT dateKey, data FROM usageDaily");let c=new Date,d=new Date(c.getFullYear(),c.getMonth(),c.getDate()-b+1),e=`${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,"0")}-${String(d.getDate()).padStart(2,"0")}`;return a.all("SELECT dateKey, data FROM usageDaily WHERE dateKey >= ?",[e])}async function T(a="all"){let b=await (0,d.c)(),[{getProviderConnections:f},{getApiKeys:g},{getProviderNodes:h}]=await Promise.all([Promise.resolve().then(c.bind(c,5781)),Promise.resolve().then(c.bind(c,74452)),Promise.resolve().then(c.bind(c,1129))]),i=[];try{i=await f()}catch{}let j={};for(let a of i)j[a.id]=a.name||a.email||a.id;let k={};try{for(let a of(await h()))a.id&&a.name&&(k[a.id]=a.name)}catch{}let l=[];try{l=await g()}catch{}let m={};for(let a of l)m[a.key]={name:a.name,id:a.id,createdAt:a.createdAt};let n=b.all("SELECT timestamp, provider, model, tokens, status FROM usageHistory ORDER BY id DESC LIMIT 100"),o=new Set,p={totalRequests:0,totalPromptTokens:0,totalCompletionTokens:0,totalCost:0,byProvider:{},byModel:{},byAccount:{},byApiKey:{},byEndpoint:{},last10Minutes:[],pending:F,activeRequests:[],recentRequests:n.map(a=>{let b=(0,e.q)(a.tokens,{})||{};return{timestamp:a.timestamp,model:a.model,provider:a.provider||"",promptTokens:b.prompt_tokens||b.input_tokens||0,completionTokens:b.completion_tokens||b.output_tokens||0,status:a.status||"ok"}}).filter(a=>{if(0===a.promptTokens&&0===a.completionTokens)return!1;let b=a.timestamp?a.timestamp.slice(0,16):"",c=`${a.model}|${a.provider}|${a.promptTokens}|${a.completionTokens}|${b}`;return!o.has(c)&&(o.add(c),!0)}).slice(0,20),errorProvider:Date.now()-G.ts<1e4?G.provider:""};for(let[a,b]of Object.entries(F.byAccount))for(let[c,d]of Object.entries(b))if(d>0){let b=j[a]||`Account ${a.slice(0,8)}...`,e=c.match(/^(.*) \((.*)\)$/);p.activeRequests.push({model:e?e[1]:c,provider:e?e[2]:"unknown",account:b,count:d})}let q=new Date,r=new Date(6e4*Math.floor(q.getTime()/6e4)),s=new Date(r.getTime()-54e4),t={};for(let a=0;a<10;a++){let b=r.getTime()-(9-a)*6e4;t[b]={requests:0,promptTokens:0,completionTokens:0,cost:0},p.last10Minutes.push(t[b])}for(let a of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ? AND timestamp <= ?",[s.toISOString(),q.toISOString()])){let b=6e4*Math.floor(new Date(a.timestamp).getTime()/6e4);t[b]&&(t[b].requests++,t[b].promptTokens+=a.promptTokens||0,t[b].completionTokens+=a.completionTokens||0,t[b].cost+=a.cost||0)}if("24h"!==a&&"today"!==a){let c={"7d":7,"30d":30,"60d":60}[a]||null;for(let a of S(b,c)){let b=a.dateKey,c=(0,e.q)(a.data,{});for(let[a,b]of(p.totalPromptTokens+=c.promptTokens||0,p.totalCompletionTokens+=c.completionTokens||0,p.totalCost+=c.cost||0,Object.entries(c.byProvider||{})))p.byProvider[a]||(p.byProvider[a]={requests:0,promptTokens:0,completionTokens:0,cost:0}),p.byProvider[a].requests+=b.requests||0,p.byProvider[a].promptTokens+=b.promptTokens||0,p.byProvider[a].completionTokens+=b.completionTokens||0,p.byProvider[a].cost+=b.cost||0;for(let[a,d]of Object.entries(c.byModel||{})){let c=d.rawModel||a.split("|")[0],e=d.provider||a.split("|")[1]||"",f=e?`${c} (${e})`:c,g=k[e]||e;p.byModel[f]||(p.byModel[f]={requests:0,promptTokens:0,completionTokens:0,cost:0,rawModel:c,provider:g,lastUsed:b}),p.byModel[f].requests+=d.requests||0,p.byModel[f].promptTokens+=d.promptTokens||0,p.byModel[f].completionTokens+=d.completionTokens||0,p.byModel[f].cost+=d.cost||0,b>(p.byModel[f].lastUsed||"")&&(p.byModel[f].lastUsed=b)}for(let[a,d]of Object.entries(c.byAccount||{})){let c=j[a]||`Account ${a.slice(0,8)}...`,e=d.rawModel||"",f=d.provider||"",g=k[f]||f,h=`${e} (${f} - ${c})`;p.byAccount[h]||(p.byAccount[h]={requests:0,promptTokens:0,completionTokens:0,cost:0,rawModel:e,provider:g,connectionId:a,accountName:c,lastUsed:b}),p.byAccount[h].requests+=d.requests||0,p.byAccount[h].promptTokens+=d.promptTokens||0,p.byAccount[h].completionTokens+=d.completionTokens||0,p.byAccount[h].cost+=d.cost||0,b>(p.byAccount[h].lastUsed||"")&&(p.byAccount[h].lastUsed=b)}for(let[a,d]of Object.entries(c.byApiKey||{})){let c=d.rawModel||"",e=d.provider||"",f=k[e]||e,g=d.apiKey,h=g?m[g]:null,i=h?.name||(g?g.slice(0,8)+"...":"Local (No API Key)"),j=g||"local-no-key";p.byApiKey[a]||(p.byApiKey[a]={requests:0,promptTokens:0,completionTokens:0,cost:0,rawModel:c,provider:f,apiKey:g,keyName:i,apiKeyKey:j,lastUsed:b}),p.byApiKey[a].requests+=d.requests||0,p.byApiKey[a].promptTokens+=d.promptTokens||0,p.byApiKey[a].completionTokens+=d.completionTokens||0,p.byApiKey[a].cost+=d.cost||0,b>(p.byApiKey[a].lastUsed||"")&&(p.byApiKey[a].lastUsed=b)}for(let[a,d]of Object.entries(c.byEndpoint||{})){let c=d.endpoint||a.split("|")[0]||"Unknown",e=d.rawModel||"",f=d.provider||"",g=k[f]||f;p.byEndpoint[a]||(p.byEndpoint[a]={requests:0,promptTokens:0,completionTokens:0,cost:0,endpoint:c,rawModel:e,provider:g,lastUsed:b}),p.byEndpoint[a].requests+=d.requests||0,p.byEndpoint[a].promptTokens+=d.promptTokens||0,p.byEndpoint[a].completionTokens+=d.completionTokens||0,p.byEndpoint[a].cost+=d.cost||0,b>(p.byEndpoint[a].lastUsed||"")&&(p.byEndpoint[a].lastUsed=b)}}let d=c?Date.now()-864e5*c:0;for(let a of b.all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint FROM usageHistory WHERE timestamp >= ?",[new Date(d).toISOString()])){let b=a.timestamp,c=a.provider?`${a.model} (${a.provider})`:a.model;if(p.byModel[c]&&new Date(b)>new Date(p.byModel[c].lastUsed)&&(p.byModel[c].lastUsed=b),a.connectionId){let c=j[a.connectionId]||`Account ${a.connectionId.slice(0,8)}...`,d=`${a.model} (${a.provider} - ${c})`;p.byAccount[d]&&new Date(b)>new Date(p.byAccount[d].lastUsed)&&(p.byAccount[d].lastUsed=b)}let d=a.apiKey&&"string"==typeof a.apiKey?`${a.apiKey}|${a.model}|${a.provider||"unknown"}`:"local-no-key";p.byApiKey[d]&&new Date(b)>new Date(p.byApiKey[d].lastUsed)&&(p.byApiKey[d].lastUsed=b);let e=a.endpoint||"Unknown",f=`${e}|${a.model}|${a.provider||"unknown"}`;p.byEndpoint[f]&&new Date(b)>new Date(p.byEndpoint[f].lastUsed)&&(p.byEndpoint[f].lastUsed=b)}}else{let c;if("today"===a){let a=new Date;a.setHours(0,0,0,0),c=a.toISOString()}else c=new Date(Date.now()-864e5).toISOString();for(let a of b.all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, tokens FROM usageHistory WHERE timestamp >= ?",[c])){let b=(0,e.q)(a.tokens,{})||{},c=b.prompt_tokens||0,d=b.completion_tokens||0,f=a.cost||0,g=k[a.provider]||a.provider;p.totalPromptTokens+=c,p.totalCompletionTokens+=d,p.totalCost+=f,p.byProvider[a.provider]||(p.byProvider[a.provider]={requests:0,promptTokens:0,completionTokens:0,cost:0}),p.byProvider[a.provider].requests++,p.byProvider[a.provider].promptTokens+=c,p.byProvider[a.provider].completionTokens+=d,p.byProvider[a.provider].cost+=f;let h=a.provider?`${a.model} (${a.provider})`:a.model;if(p.byModel[h]||(p.byModel[h]={requests:0,promptTokens:0,completionTokens:0,cost:0,rawModel:a.model,provider:g,lastUsed:a.timestamp}),p.byModel[h].requests++,p.byModel[h].promptTokens+=c,p.byModel[h].completionTokens+=d,p.byModel[h].cost+=f,new Date(a.timestamp)>new Date(p.byModel[h].lastUsed)&&(p.byModel[h].lastUsed=a.timestamp),a.connectionId){let b=j[a.connectionId]||`Account ${a.connectionId.slice(0,8)}...`,e=`${a.model} (${a.provider} - ${b})`;p.byAccount[e]||(p.byAccount[e]={requests:0,promptTokens:0,completionTokens:0,cost:0,rawModel:a.model,provider:g,connectionId:a.connectionId,accountName:b,lastUsed:a.timestamp}),p.byAccount[e].requests++,p.byAccount[e].promptTokens+=c,p.byAccount[e].completionTokens+=d,p.byAccount[e].cost+=f,new Date(a.timestamp)>new Date(p.byAccount[e].lastUsed)&&(p.byAccount[e].lastUsed=a.timestamp)}if(a.apiKey&&"string"==typeof a.apiKey){let b=m[a.apiKey],e=b?.name||a.apiKey.slice(0,8)+"...",h=`${a.apiKey}|${a.model}|${a.provider||"unknown"}`;p.byApiKey[h]||(p.byApiKey[h]={requests:0,promptTokens:0,completionTokens:0,cost:0,rawModel:a.model,provider:g,apiKey:a.apiKey,keyName:e,apiKeyKey:a.apiKey,lastUsed:a.timestamp});let i=p.byApiKey[h];i.requests++,i.promptTokens+=c,i.completionTokens+=d,i.cost+=f,new Date(a.timestamp)>new Date(i.lastUsed)&&(i.lastUsed=a.timestamp)}else{p.byApiKey["local-no-key"]||(p.byApiKey["local-no-key"]={requests:0,promptTokens:0,completionTokens:0,cost:0,rawModel:a.model,provider:g,apiKey:null,keyName:"Local (No API Key)",apiKeyKey:"local-no-key",lastUsed:a.timestamp});let b=p.byApiKey["local-no-key"];b.requests++,b.promptTokens+=c,b.completionTokens+=d,b.cost+=f,new Date(a.timestamp)>new Date(b.lastUsed)&&(b.lastUsed=a.timestamp)}let i=a.endpoint||"Unknown",l=`${i}|${a.model}|${a.provider||"unknown"}`;p.byEndpoint[l]||(p.byEndpoint[l]={requests:0,promptTokens:0,completionTokens:0,cost:0,endpoint:i,rawModel:a.model,provider:g,lastUsed:a.timestamp});let n=p.byEndpoint[l];n.requests++,n.promptTokens+=c,n.completionTokens+=d,n.cost+=f,new Date(a.timestamp)>new Date(n.lastUsed)&&(n.lastUsed=a.timestamp)}}return p.totalRequests=Object.values(p.byProvider).reduce((a,b)=>a+(b.requests||0),0),p}async function U(a="7d"){let b=await (0,d.c)(),c=Date.now();if("today"===a){let a=new Date;a.setHours(0,0,0,0);let c=a.getTime(),d=c+864e5,e=Array.from({length:24},(a,b)=>({label:new Date(c+36e5*b).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),tokens:0,cost:0}));for(let a of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ?",[new Date(c).toISOString()])){let b=new Date(a.timestamp).getTime();if(b<c||b>=d)continue;let f=Math.floor((b-c)/36e5);f>=0&&f<24&&(e[f].tokens+=(a.promptTokens||0)+(a.completionTokens||0),e[f].cost+=a.cost||0)}return e}if("24h"===a){let a=c-864e5,d=Array.from({length:24},(b,c)=>({label:new Date(a+36e5*c).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),tokens:0,cost:0}));for(let e of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ?",[new Date(a).toISOString()])){let b=new Date(e.timestamp).getTime();if(b<a||b>c)continue;let f=Math.min(Math.floor((b-a)/36e5),23);d[f].tokens+=(e.promptTokens||0)+(e.completionTokens||0),d[f].cost+=e.cost||0}return d}let f="7d"===a?7:"30d"===a?30:60,g=new Date,h=S(b,f),i={};for(let a of h)i[a.dateKey]=(0,e.q)(a.data,{});return Array.from({length:f},(a,b)=>{let c=new Date(g);c.setDate(c.getDate()-(f-1-b));let d=i[`${c.getFullYear()}-${String(c.getMonth()+1).padStart(2,"0")}-${String(c.getDate()).padStart(2,"0")}`];return{label:c.toLocaleDateString("en-US",{month:"short",day:"numeric"}),tokens:d?(d.promptTokens||0)+(d.completionTokens||0):0,cost:d&&d.cost||0}})}async function V(){}async function W(a=200){try{let b=(0,d.c)().all("SELECT timestamp, provider, model, connectionId, promptTokens, completionTokens, status, tokens FROM usageHistory ORDER BY id DESC LIMIT ?",[a]);if(!b.length)return[];let f={};try{let{getProviderConnections:a}=await Promise.resolve().then(c.bind(c,5781));for(let b of(await a()))f[b.id]=b.name||b.email||""}catch{}return b.map(a=>{let b=function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${b(a.getDate())}-${b(a.getMonth()+1)}-${a.getFullYear()} ${b(a.getHours())}:${b(a.getMinutes())}:${b(a.getSeconds())}`}(new Date(a.timestamp)),c=a.provider?.toUpperCase()||"-",d=a.model||"-",g=f[a.connectionId]||(a.connectionId?a.connectionId.slice(0,8):"-"),h=a.tokens?(0,e.q)(a.tokens,{}):{},i=a.promptTokens??h.prompt_tokens??"-",j=a.completionTokens??h.completion_tokens??"-";return`${b} | ${d} | ${c} | ${g} | ${i} | ${j} | ${a.status||"-"}`})}catch(a){return console.error("[usageRepo] getRecentLogs failed:",a.message),[]}}let X=null,Y=0;async function Z(){if(X&&Date.now()-Y<5e3)return X;try{let{getSettings:a}=await Promise.resolve().then(c.bind(c,42655)),b=await a(),d="false"!==process.env.OBSERVABILITY_ENABLED;X={enabled:"boolean"==typeof b.enableObservability?b.enableObservability:d,maxRecords:b.observabilityMaxRecords||parseInt(process.env.OBSERVABILITY_MAX_RECORDS||String(200),10),batchSize:b.observabilityBatchSize||parseInt(process.env.OBSERVABILITY_BATCH_SIZE||String(20),10),flushIntervalMs:b.observabilityFlushIntervalMs||parseInt(process.env.OBSERVABILITY_FLUSH_INTERVAL_MS||String(5e3),10),maxJsonSize:1024*(b.observabilityMaxJsonSize||parseInt(process.env.OBSERVABILITY_MAX_JSON_SIZE||"5",10))}}catch{X={enabled:!1,maxRecords:200,batchSize:20,flushIntervalMs:5e3,maxJsonSize:5120}}return Y=Date.now(),X}let $=[],_=null,aa=!1;function ab(a,b){let c=JSON.stringify(a||{});return c.length>b?{_truncated:!0,_originalSize:c.length,_preview:c.substring(0,200)}:a||{}}async function ac(){if(!aa&&0!==$.length){aa=!0;try{for(;$.length>0;){let a=$.splice(0,$.length),b=await (0,d.c)(),c=await Z();b.transaction(()=>{for(let d of a){d.id||(d.id=function(a){let b=new Date().toISOString(),c=Math.random().toString(36).substring(2,8),d=a?a.replace(/[^a-zA-Z0-9-]/g,"-"):"unknown";return`${b}-${c}-${d}`}(d.model)),d.timestamp||(d.timestamp=new Date().toISOString()),d.request?.headers&&(d.request.headers=function(a){if(!a||"object"!=typeof a)return{};let b=["authorization","x-api-key","cookie","token","api-key"],c={...a};for(let a of Object.keys(c))b.some(b=>a.toLowerCase().includes(b))&&delete c[a];return c}(d.request.headers));let a={id:d.id,provider:d.provider||null,model:d.model||null,connectionId:d.connectionId||null,timestamp:d.timestamp,status:d.status||null,latency:d.latency||{},tokens:d.tokens||{},request:ab(d.request,c.maxJsonSize),providerRequest:ab(d.providerRequest,c.maxJsonSize),providerResponse:ab(d.providerResponse,c.maxJsonSize),response:ab(d.response,c.maxJsonSize)};b.run("INSERT INTO requestDetails(id, timestamp, provider, model, connectionId, status, data) VALUES(?, ?, ?, ?, ?, ?, ?) ON CONFLICT(id) DO UPDATE SET timestamp = excluded.timestamp, provider = excluded.provider, model = excluded.model, connectionId = excluded.connectionId, status = excluded.status, data = excluded.data",[a.id,a.timestamp,a.provider,a.model,a.connectionId,a.status,(0,e.s)(a)])}let d=b.get("SELECT COUNT(*) as c FROM requestDetails");d&&d.c>c.maxRecords&&b.run("DELETE FROM requestDetails WHERE id IN (SELECT id FROM requestDetails ORDER BY timestamp ASC LIMIT ?)",[d.c-c.maxRecords])})}}catch(a){console.error("[requestDetailsRepo] Batch write failed:",a)}finally{aa=!1}}}async function ad(a){let b=await Z();b.enabled&&($.push(a),$.length>=b.batchSize?(_&&(clearTimeout(_),_=null),ac().catch(a=>console.error("[requestDetailsRepo] flush err:",a))):_||(_=setTimeout(()=>{_=null,ac().catch(()=>{})},b.flushIntervalMs)))}async function ae(a={}){let b=await (0,d.c)(),c=[],f=[];a.provider&&(c.push("provider = ?"),f.push(a.provider)),a.model&&(c.push("model = ?"),f.push(a.model)),a.connectionId&&(c.push("connectionId = ?"),f.push(a.connectionId)),a.status&&(c.push("status = ?"),f.push(a.status)),a.startDate&&(c.push("timestamp >= ?"),f.push(new Date(a.startDate).toISOString())),a.endDate&&(c.push("timestamp <= ?"),f.push(new Date(a.endDate).toISOString()));let g=c.length?`WHERE ${c.join(" AND ")}`:"",h=b.get(`SELECT COUNT(*) as c FROM requestDetails ${g}`,f),i=h?h.c:0,j=a.page||1,k=a.pageSize||50,l=Math.ceil(i/k);return{details:b.all(`SELECT data FROM requestDetails ${g} ORDER BY timestamp DESC LIMIT ? OFFSET ?`,[...f,k,(j-1)*k]).map(a=>(0,e.q)(a.data,{})),pagination:{page:j,pageSize:k,totalItems:i,totalPages:l,hasNext:j<l,hasPrev:j>1}}}let af=async()=>{_&&(clearTimeout(_),_=null),$.length>0&&await ac()};async function ag(){let a=await (0,d.c)(),{exportSettings:b}=await Promise.resolve().then(c.bind(c,42655)),f={settings:await b(),providerConnections:a.all("SELECT * FROM providerConnections").map(a=>({...(0,e.q)(a.data,{}),id:a.id,provider:a.provider,authType:a.authType,name:a.name,email:a.email,priority:a.priority,isActive:1===a.isActive,createdAt:a.createdAt,updatedAt:a.updatedAt})),providerNodes:a.all("SELECT * FROM providerNodes").map(a=>({...(0,e.q)(a.data,{}),id:a.id,type:a.type,name:a.name,createdAt:a.createdAt,updatedAt:a.updatedAt})),proxyPools:a.all("SELECT * FROM proxyPools").map(a=>({...(0,e.q)(a.data,{}),id:a.id,isActive:1===a.isActive,testStatus:a.testStatus,createdAt:a.createdAt,updatedAt:a.updatedAt})),apiKeys:a.all("SELECT * FROM apiKeys").map(a=>({id:a.id,key:a.key,name:a.name,machineId:a.machineId,isActive:1===a.isActive,createdAt:a.createdAt})),combos:a.all("SELECT * FROM combos").map(a=>({id:a.id,name:a.name,kind:a.kind,models:(0,e.q)(a.models,[]),createdAt:a.createdAt,updatedAt:a.updatedAt})),modelAliases:{},customModels:[],mitmAlias:{},pricing:{}};for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'modelAliases'"))f.modelAliases[b.key]=(0,e.q)(b.value);for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'customModels'"))f.customModels.push((0,e.q)(b.value));for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'mitmAlias'"))f.mitmAlias[b.key]=(0,e.q)(b.value);for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'pricing'"))f.pricing[b.key]=(0,e.q)(b.value);return f}async function ah(a){if(!a||"object"!=typeof a||Array.isArray(a))throw Error("Invalid database payload");let b=await (0,d.c)();return b.transaction(()=>{for(let c of(b.run("DELETE FROM settings"),b.run("DELETE FROM providerConnections"),b.run("DELETE FROM providerNodes"),b.run("DELETE FROM proxyPools"),b.run("DELETE FROM apiKeys"),b.run("DELETE FROM combos"),b.run("DELETE FROM kv WHERE scope IN ('modelAliases', 'customModels', 'mitmAlias', 'pricing')"),a.settings&&b.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,e.s)(a.settings)]),a.providerConnections||[])){let{id:a,provider:d,authType:f,name:g,email:h,priority:i,isActive:j,createdAt:k,updatedAt:l,...m}=c;b.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[a,d,f||"oauth",g||null,h||null,i||null,+(!1!==j),(0,e.s)(m),k||new Date().toISOString(),l||new Date().toISOString()])}for(let c of a.providerNodes||[]){let{id:a,type:d,name:f,createdAt:g,updatedAt:h,...i}=c;b.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[a,d||null,f||null,(0,e.s)(i),g||new Date().toISOString(),h||new Date().toISOString()])}for(let c of a.proxyPools||[]){let{id:a,isActive:d,testStatus:f,createdAt:g,updatedAt:h,...i}=c;b.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[a,+(!1!==d),f||"unknown",(0,e.s)(i),g||new Date().toISOString(),h||new Date().toISOString()])}for(let c of a.apiKeys||[])b.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)",[c.id,c.key,c.name||null,c.machineId||null,+(!1!==c.isActive),c.createdAt||new Date().toISOString()]);for(let c of a.combos||[])b.run("INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c.id,c.name,c.kind||null,(0,e.s)(c.models||[]),c.createdAt||new Date().toISOString(),c.updatedAt||new Date().toISOString()]);for(let[c,d]of Object.entries(a.modelAliases||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[c,(0,e.s)(d)]);for(let c of a.customModels||[]){let a=`${c.providerAlias}|${c.id}|${c.type||"llm"}`;b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[a,(0,e.s)(c)])}for(let[c,d]of Object.entries(a.mitmAlias||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[c,(0,e.s)(d||{})]);for(let[c,d]of Object.entries(a.pricing||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[c,(0,e.s)(d||{})])}),await ag()}process.off("beforeExit",af),process.off("SIGINT",af),process.off("SIGTERM",af),process.off("exit",af),process.on("beforeExit",af),process.on("SIGINT",af),process.on("SIGTERM",af),process.on("exit",af)},9460:(a,b,c)=>{"use strict";c.d(b,{L9:()=>r,OM:()=>j,S8:()=>o,fv:()=>l,getMitmAlias:()=>q,o5:()=>k,uL:()=>p,uv:()=>n});var d=c(36366),e=c(644),f=c(22846);let g=(0,f.U)("modelAliases"),h=(0,f.U)("customModels"),i=(0,f.U)("mitmAlias");async function j(){return await g.getAll()}async function k(a,b){await g.set(a,b)}async function l(a){await g.remove(a)}function m(a,b,c){return`${a}|${b}|${c}`}async function n(){return Object.values(await h.getAll())}async function o({providerAlias:a,id:b,type:c="llm",name:f}){let g=m(a,b,c),h=await (0,d.c)(),i=!1;return h.transaction(()=>{if(h.get("SELECT 1 FROM kv WHERE scope = 'customModels' AND key = ?",[g]))return;let d=(0,e.s)({providerAlias:a,id:b,type:c,name:f||b});h.run("INSERT INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[g,d]),i=!0}),i}async function p({providerAlias:a,id:b,type:c="llm"}){await h.remove(m(a,b,c))}async function q(a){return a?await i.get(a)||{}:await i.getAll()}async function r(a,b){await i.set(a,b||{})}},22846:(a,b,c)=>{"use strict";c.d(b,{U:()=>f});var d=c(36366),e=c(644);function f(a){return{async get(b,c=null){let f=(await (0,d.c)()).get("SELECT value FROM kv WHERE scope = ? AND key = ?",[a,b]);return f?(0,e.q)(f.value,c):c},async getAll(){let b=(await (0,d.c)()).all("SELECT key, value FROM kv WHERE scope = ?",[a]),c={};for(let a of b)c[a.key]=(0,e.q)(a.value);return c},async set(b,c){(await (0,d.c)()).run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,b,(0,e.s)(c)])},async setMany(b){let c=await (0,d.c)();c.transaction(()=>{for(let[d,f]of Object.entries(b))c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,d,(0,e.s)(f)])})},async remove(b){(await (0,d.c)()).run("DELETE FROM kv WHERE scope = ? AND key = ?",[a,b])},async clear(){(await (0,d.c)()).run("DELETE FROM kv WHERE scope = ?",[a])}}}},36366:(a,b,c)=>{"use strict";c.d(b,{c:()=>k});var d=c(95658);global._dbAdapter||(global._dbAdapter={instance:null,initPromise:null,logged:!1});let e=global._dbAdapter;async function f(){if(!process.versions.bun)return null;try{let{createBunSqliteAdapter:a}=await c.e(4739).then(c.bind(c,24739));return await a(d.AL)}catch(a){return console.warn(`[DB] bun:sqlite unavailable: ${a.message}`),null}}async function g(){if(process.versions.bun)return null;try{let{createBetterSqliteAdapter:a}=await c.e(5258).then(c.bind(c,25258));return await a(d.AL)}catch(a){return console.warn(`[DB] better-sqlite3 unavailable: ${a.message}`),null}}async function h(){if(process.versions.bun)return null;let[a,b]=process.versions.node.split(".").map(Number);if(a<22||22===a&&b<5)return null;try{let{createNodeSqliteAdapter:a}=await c.e(8520).then(c.bind(c,88520));return await a(d.AL)}catch(a){return console.warn(`[DB] node:sqlite unavailable: ${a.message}`),null}}async function i(){try{let{createSqlJsAdapter:a}=await c.e(3593).then(c.bind(c,53593));return await a(d.AL)}catch(a){return console.warn(`[DB] sql.js unavailable: ${a.message}`),null}}async function j(){(0,d.Jh)();let a=await f();if(a||(a=await g()),a||(a=await h()),a||(a=await i()),!a)throw Error("[DB] No SQLite driver available (bun/better/node/sql.js all failed)");e.logged||(console.log(`[DB] Driver: ${a.driver} | file: ${d.AL}`),e.logged=!0);let{runMigrationOnce:b}=await c.e(5217).then(c.bind(c,45217));return await b(a),a}async function k(){return e.instance?e.instance:(e.initPromise||(e.initPromise=j().then(a=>(e.instance=a,a))),e.initPromise)}},42655:(a,b,c)=>{"use strict";c.d(b,{Xx:()=>j,exportSettings:()=>k,getSettings:()=>i});var d=c(36366),e=c(644);let f={cloudEnabled:!1,tunnelEnabled:!1,tunnelUrl:"",tunnelProvider:"cloudflare",tailscaleEnabled:!1,tailscaleUrl:"",stickyRoundRobinLimit:3,providerStrategies:{},comboStrategy:"fallback",comboStickyRoundRobinLimit:1,comboStrategies:{},requireLogin:!0,tunnelDashboardAccess:!0,authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcClientSecret:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC",enableObservability:!0,observabilityMaxRecords:1e3,observabilityBatchSize:20,observabilityFlushIntervalMs:5e3,observabilityMaxJsonSize:5,outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:"",mitmRouterBaseUrl:"http://localhost:20128",dnsToolEnabled:{},rtkEnabled:!0,cavemanEnabled:!1,cavemanLevel:"full"};async function g(){let a=(await (0,d.c)()).get("SELECT data FROM settings WHERE id = 1");return a?(0,e.q)(a.data,{}):{}}function h(a){let b={...f,...a||{}};for(let[a,c]of Object.entries(f))void 0===b[a]&&("outboundProxyEnabled"===a&&"string"==typeof b.outboundProxyUrl&&b.outboundProxyUrl.trim()?b[a]=!0:b[a]=c);return b}async function i(){return h(await g())}async function j(a){let b,c=await (0,d.c)();return c.transaction(()=>{let d=c.get("SELECT data FROM settings WHERE id = 1");b={...d?(0,e.q)(d.data,{}):{},...a},c.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,e.s)(b)])}),h(b)}async function k(){return await g()}},49120:(a,b,c)=>{"use strict";c.r(b),c.d(b,{DATA_DIR:()=>m,getDataDir:()=>l});var d=c(73024),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h);let j="9router";function k(){return"win32"===process.platform?g().join(process.env.APPDATA||g().join(i().homedir(),"AppData","Roaming"),j):g().join(i().homedir(),`.${j}`)}function l(){let a=process.env.DATA_DIR;if(!a)return k();try{return e().mkdirSync(a,{recursive:!0}),a}catch(b){if(b?.code==="EACCES"||b?.code==="EPERM")return console.warn(`[DATA_DIR] '${a}' not writable → fallback ~/.${j}`),k();throw b}}let m=l()},62674:(a,b,c)=>{"use strict";function d(a,b,c=null){let e=a.get("SELECT value FROM _meta WHERE key = ?",[b]);return e?e.value:c}function e(a,b,c){a.run("INSERT INTO _meta(key, value) VALUES(?, ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[b,String(c)])}c.d(b,{dy:()=>d,np:()=>e}),c(36366)},74452:(a,b,c)=>{"use strict";c.r(b),c.d(b,{createApiKey:()=>i,deleteApiKey:()=>k,getApiKeyById:()=>h,getApiKeys:()=>g,updateApiKey:()=>j,validateApiKey:()=>l});var d=c(94755),e=c(36366);function f(a){return a?{id:a.id,key:a.key,name:a.name,machineId:a.machineId,isActive:1===a.isActive||!0===a.isActive,createdAt:a.createdAt}:null}async function g(){return(await (0,e.c)()).all("SELECT * FROM apiKeys ORDER BY createdAt ASC").map(f)}async function h(a){return f((await (0,e.c)()).get("SELECT * FROM apiKeys WHERE id = ?",[a]))}async function i(a,b){if(!b)throw Error("machineId is required");let f=await (0,e.c)(),{generateApiKeyWithMachine:g}=await c.e(6844).then(c.bind(c,86844)),h=g(b),i={id:(0,d.A)(),name:a,key:h.key,machineId:b,isActive:!0,createdAt:new Date().toISOString()};return f.run("INSERT INTO apiKeys(id, key, name, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)",[i.id,i.key,i.name,i.machineId,1,i.createdAt]),i}async function j(a,b){let c=await (0,e.c)(),d=null;return c.transaction(()=>{let e=c.get("SELECT * FROM apiKeys WHERE id = ?",[a]);if(!e)return;let g={...f(e),...b};c.run("UPDATE apiKeys SET key = ?, name = ?, machineId = ?, isActive = ? WHERE id = ?",[g.key,g.name,g.machineId,+!!g.isActive,a]),d=g}),d}async function k(a){let b=(await (0,e.c)()).run("DELETE FROM apiKeys WHERE id = ?",[a]);return(b?.changes??0)>0}async function l(a){let b=(await (0,e.c)()).get("SELECT isActive FROM apiKeys WHERE key = ?",[a]);return!!b&&(1===b.isActive||!0===b.isActive)}},78335:()=>{},95658:(a,b,c)=>{"use strict";c.d(b,{AL:()=>j,HG:()=>i,Jh:()=>m,KQ:()=>k,Or:()=>l});var d=c(76760),e=c.n(d),f=c(73024),g=c.n(f),h=c(49120);let i=e().join(h.DATA_DIR,"db"),j=e().join(i,"data.sqlite"),k=e().join(i,"backups"),l={main:e().join(h.DATA_DIR,"db.json"),usage:e().join(h.DATA_DIR,"usage.json"),disabled:e().join(h.DATA_DIR,"disabledModels.json"),details:e().join(h.DATA_DIR,"request-details.json")};function m(){for(let a of[h.DATA_DIR,i,k])g().existsSync(a)||g().mkdirSync(a,{recursive:!0})}},96487:()=>{},97914:(a,b,c)=>{"use strict";c.d(b,{KJ:()=>l,VT:()=>n,getPricingForModel:()=>k,r4:()=>j,yF:()=>m});var d=c(36366),e=c(644);let f=(0,c(22846).U)("pricing"),g={value:null,expiresAt:0};function h(){g={value:null,expiresAt:0}}async function i(){return await f.getAll()}async function j(){let a=Date.now();if(g.value&&g.expiresAt>a)return g.value;let b=await i(),{PROVIDER_PRICING:d}=await c.e(7341).then(c.bind(c,57341)),e={};for(let[a,c]of Object.entries(d))if(e[a]={...c},b[a])for(let[c,d]of Object.entries(b[a]))e[a][c]=e[a][c]?{...e[a][c],...d}:d;for(let[a,c]of Object.entries(b))if(e[a])for(let[b,d]of Object.entries(c))e[a][b]||(e[a][b]=d);else e[a]={...c};return g={value:e,expiresAt:a+5e3},e}async function k(a,b){if(!b)return null;let d=await i();if(a&&d[a]?.[b])return d[a][b];let{getPricingForModel:e}=await c.e(7341).then(c.bind(c,57341));return e(a,b)}async function l(a){let b=await (0,d.c)();return b.transaction(()=>{for(let[c,d]of Object.entries(a)){let a=b.get("SELECT value FROM kv WHERE scope = 'pricing' AND key = ?",[c]),f={...a&&(0,e.q)(a.value,{})||{}};for(let[a,b]of Object.entries(d))f[a]=b;b.run("INSERT INTO kv(scope, key, value) VALUES('pricing', ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[c,(0,e.s)(f)])}}),h(),await i()}async function m(a,b){if(!a)return await i();let c=await (0,d.c)();return c.transaction(()=>{if(!b)return void c.run("DELETE FROM kv WHERE scope = 'pricing' AND key = ?",[a]);let d=c.get("SELECT value FROM kv WHERE scope = 'pricing' AND key = ?",[a]),f=d&&(0,e.q)(d.value,{})||{};delete f[b],0===Object.keys(f).length?c.run("DELETE FROM kv WHERE scope = 'pricing' AND key = ?",[a]):c.run("INSERT INTO kv(scope, key, value) VALUES('pricing', ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,(0,e.s)(f)])}),h(),await i()}async function n(){return await f.clear(),h(),{}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=7501,exports.ids=[7501,9609],exports.modules={8590:(a,b,c)=>{c.d(b,{$B:()=>u,I9:()=>l,Og:()=>i,Ql:()=>o,Sc:()=>v,iD:()=>s,jR:()=>r,oD:()=>g,pb:()=>x,qZ:()=>y});var d=c(35024),e=c(75924),f=c(39609);let g=3e5,h=new Map;function i(a){return e.Wu[a]||g}async function j(a,b,c,e){let f=d.xq[a];if(!f||!f.refreshUrl)return e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null;if(!b)return e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null;try{let c=await fetch(f.refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:f.clientId,client_secret:f.clientSecret})});if(!c.ok){let b=await c.text();return e?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:c.status,error:b}),null}let d=await c.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||b,expiresIn:d.expires_in}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}}async function k(a,b){try{let c=await fetch(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.claude.clientId})});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Claude OAuth token",{status:c.status,error:a}),null}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!f.access_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}}async function l(a,b,c,d){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}}async function m(a,b){let c=e.NA.qwen.token;try{let e=await fetch(c,{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:d.xq.qwen.clientId})});if(200===e.status){let c=await e.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await e.text().catch(()=>"");b?.warn?.("TOKEN_REFRESH","Error with Qwen endpoint",{status:e.status,error:a})}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null}async function n(a,b){try{let c=await fetch(e.NA.openai.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:d.xq.codex.clientId,scope:"openid profile email offline_access"})});if(!c.ok){let a=await c.text(),d=null;try{let b=JSON.parse(a);d=b?.error?.code||("string"==typeof b?.error?b.error:null)}catch{}if("refresh_token_reused"===d||"invalid_grant"===d||"token_expired"===d||"invalid_token"===d)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-auth required.",{status:c.status,errorCode:d}),{error:"unrecoverable_refresh_error",code:d};return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:c.status,error:a}),null}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}}async function o(a,b,c,e=null){let g=b?.authMethod,h=b?.clientId,i=b?.clientSecret,j=b?.region;if(h&&i){let b="idc"===g&&j?`https://oidc.${j}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",d=await (0,f.proxyAwareFetch)(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:h,clientSecret:i,refreshToken:a,grantType:"refresh_token"})},e);if(!d.ok){let a=await d.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:d.status,error:a}),null}let k=await d.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}}let k=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(!k.ok){let a=await k.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:k.status,error:a}),null}let l=await k.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!l.accessToken,expiresIn:l.expiresIn}),{accessToken:l.accessToken,refreshToken:l.refreshToken||a,expiresIn:l.expiresIn}}async function p(a,b){let c=btoa(`${d.xq.iflow.clientId}:${d.xq.iflow.clientSecret}`),f=await fetch(e.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.iflow.clientId,client_secret:d.xq.iflow.clientSecret})});if(!f.ok){let a=await f.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh iFlow token",{status:f.status,error:a}),null}let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed iFlow token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}async function q(a,b){let c={grant_type:"refresh_token",refresh_token:a,client_id:d.xq.github.clientId};d.xq.github.clientSecret&&(c.client_secret=d.xq.github.clientSecret);let f=await fetch(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(c)});if(!f.ok){let a=await f.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh GitHub token",{status:f.status,error:a}),null}let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}async function r(a,b){try{let c=await fetch("https://api.github.com/copilot_internal/v2/token",{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 d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}}async function s(a,b,c){var d;if(!b||!b.refreshToken||"string"!=typeof b.refreshToken)return c?.warn?.("TOKEN_REFRESH",`No valid refresh token available for provider: ${a}`),null;let e=(d=b.refreshToken,`${a}:${d}`);if(h.has(e))return c?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),h.get(e);let f=t(a,b,c).finally(()=>{h.delete(e)});return h.set(e,f),f}async function t(a,b,c){switch(a){case"gemini":case"gemini-cli":case"antigravity":return await l(b.refreshToken,d.xq[a].clientId,d.xq[a].clientSecret,c);case"claude":return await k(b.refreshToken,c);case"codex":return await n(b.refreshToken,c);case"qwen":return await m(b.refreshToken,c);case"iflow":return await p(b.refreshToken,c);case"github":return await q(b.refreshToken,c);case"kiro":return await o(b.refreshToken,b.providerSpecificData,c);case"vertex":case"vertex-partner":{let a=v(b.apiKey);if(!a)return null;return await x(a,c)}default:return c?.warn?.("TOKEN_REFRESH",`Unsupported provider for token refresh: ${a}`),null}}async function u(a,b,c){if(!b.refreshToken)return null;switch(a){case"gemini-cli":case"antigravity":return l(b.refreshToken,d.xq[a].clientId,d.xq[a].clientSecret,c);case"claude":return k(b.refreshToken,c);case"codex":return n(b.refreshToken,c);case"qwen":return m(b.refreshToken,c);case"iflow":return p(b.refreshToken,c);case"github":return q(b.refreshToken,c);case"kiro":return o(b.refreshToken,b.providerSpecificData,c);case"vertex":case"vertex-partner":{let a=v(b.apiKey);if(!a)return null;return x(a,c)}default:return j(a,b.refreshToken,b,c)}}function v(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 w=new Map;async function x(a,b){let d=a.client_email,e=w.get(d);if(e&&e.expiresAt-Date.now()>3e5)return{accessToken:e.token,expiresAt:e.expiresAt};try{let{SignJWT:e,importPKCS8:f}=await Promise.all([c.e(6935),c.e(8971)]).then(c.bind(c,8971));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let g=await f(a.private_key.replace(/\\n/g,"\n"),"RS256"),h=Math.floor(Date.now()/1e3),i=await new e({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience("https://oauth2.googleapis.com/token").setIssuedAt(h).setExpirationTime(h+3600).sign(g),j=await fetch("https://oauth2.googleapis.com/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:i})});if(!j.ok){let a=await j.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:k,expires_in:l}=await j.json(),m=Date.now()+(l??3600)*1e3;return w.set(d,{token:k,expiresAt:m}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:k,expiresAt:m}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}async function y(a,b=3,c=null){for(let d=0;d<b;d++){if(d>0){let a=1e3*d;c?.debug?.("TOKEN_REFRESH",`Retry ${d}/${b} after ${a}ms`),await new Promise(b=>setTimeout(b,a))}try{let b=await a();if(b)return b}catch(a){c?.warn?.("TOKEN_REFRESH",`Attempt ${d+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}},39609:(a,b,c)=>{c.d(b,{proxyAwareFetch:()=>o});var d=c(27910);let e=globalThis.fetch,f=new Map,g=["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"],h=["8.8.8.8","8.8.4.4"];function i(a){return null==a?"":String(a).trim()}async function j(a){let b=f.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)),e=new b.Resolver;e.setServers(h);let g=d(e.resolve4.bind(e)),i=await g(a);return f.set(a,{ip:i[0],expiry:Date.now()+3e5}),i[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function k(a,b){let c,d=i(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 l(a){let b=i(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function m(a){let b=l(a);if(!b)return null;let{ProxyAgent:d}=await c.e(7774).then(c.t.bind(c,47774,19));return new d({uri:b,connections:1,pipelining:0})}async function n(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 o(a,b={},c=null){let d="string"==typeof a?a:a.toString(),f=i(c?.vercelRelayUrl);if(f){let a=new URL(d),c={...b.headers,"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return e(f,{...b,headers:c})}let h=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0)return null;let c=i(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=i(b?.noProxy??b?.connectionNoProxy);return d&&k(a,d)?null:l(c)}(d,c),p=h?null:l(function(a){let b;if(k(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)),q=h||p;if(function(a){try{let b=new URL(a).hostname;return g.some(a=>b.includes(a))}catch{return!1}}(d)){if(q){let d=await m(q);try{return await e(a,{...b,dispatcher:d,headers:{...b.headers,connection:"close"}})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}}try{let a=new URL(d),c=await j(a.hostname);if(c)return await n(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(q){let d=await m(q);try{return await e(a,{...b,dispatcher:d,headers:{...b.headers,connection:"close"}})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${a.message}`)}}return e(a,b)}async function p(a,b={}){return o(a,b,null)}globalThis.fetch!==p&&(globalThis.fetch=p)},75924:(a,b,c)=>{c.d(b,{$V:()=>t,A9:()=>i,Cn:()=>j,Co:()=>s,Ic:()=>q,J5:()=>n,K:()=>o,NA:()=>v,Ox:()=>k,QH:()=>l,VK:()=>w,Wu:()=>u,go:()=>e,nZ:()=>p,sX:()=>f,uR:()=>m,x0:()=>g,zv:()=>r});var d=c(21820);let e="google-genai-sdk/1.41.0 gl-node/v22.19.0";function f(a="unknown"){let b="win32"===(0,d.platform)()?"windows":(0,d.platform)();return`GeminiCLI/0.31.0/${a||"unknown"} (${b}; ${(0,d.arch)()})`}let g={VSCODE_VERSION:"1.110.0",COPILOT_CHAT_VERSION:"0.38.0",USER_AGENT:"GitHubCopilotChat/0.38.0",API_VERSION:"2025-04-01"};function h(){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)}function i(){return`antigravity/1.104.0 ${(0,d.platform)()}/${(0,d.arch)()}`}let j={ideType:9,platform:h(),pluginType:2},k={name:"x-request-source",value:"local"},l="_ide",m="_ide",n=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"]),o={"User-Agent":`antigravity/1.107.0 ${(0,d.platform)()}/${(0,d.arch)()}`},p={loadCodeAssist:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUser:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser"},q={"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:h(),pluginType:2})},r={ideType:9,platform:h(),pluginType:2},s="You are Claude Code, Anthropic's official CLI for Claude.",t="You are Antigravity, a powerful agentic AI coding assistant designed by the Google Deepmind team working on Advanced Agentic Coding.You are pair programming with a USER to solve their coding task. The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question.**Absolute paths only****Proactiveness**",u={codex:432e6,claude:144e5,iflow:864e5,qwen:12e5,"kimi-coding":3e5,antigravity:3e5},v={google:{token:"https://oauth2.googleapis.com/token",auth:"https://accounts.google.com/o/oauth2/auth"},openai:{token:"https://auth.openai.com/oauth/token",auth:"https://auth.openai.com/oauth/authorize"},anthropic:{token:"https://api.anthropic.com/v1/oauth/token",auth:"https://api.anthropic.com/v1/oauth/authorize"},qwen:{token:"https://qwen.ai/api/v1/oauth2/token",auth:"https://qwen.ai/api/v1/oauth2/device/code"},iflow:{token:"https://iflow.cn/oauth/token",auth:"https://iflow.cn/oauth"},github:{token:"https://github.com/login/oauth/access_token",auth:"https://github.com/login/oauth/authorize",deviceCode:"https://github.com/login/device/code"}};function w(){return{"X-Msh-Platform":"9router","X-Msh-Version":"2.1.2","X-Msh-Device-Model":"u">typeof process?`${process.platform} ${process.arch}`:"unknown","X-Msh-Device-Id":`kimi-${Date.now()}`}}},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=7828,exports.ids=[7828],exports.modules={38160:(a,b,c)=>{c.d(b,{Ou:()=>i,eG:()=>h});var d=c(75924);let e=new Map,f=new Map,g=null;async function h(a,b){if(!a||!b)return null;let c=e.get(a);if(c&&Date.now()-c.fetchedAt<36e5)return c.projectId;if(f.has(a))return f.get(a).promise;let d=new AbortController,g=(async()=>{try{let c=await j(b,d.signal);if(c)return e.set(a,{projectId:c,fetchedAt:Date.now()}),c;return console.warn("[ProjectId] could not fetch projectId for connection",a.slice(0,8)),null}catch(a){return console.warn(`[ProjectId] Error fetching project ID: ${a.message}`),null}finally{f.delete(a)}})();return f.set(a,{promise:g,controller:d,startedAt:Date.now()}),g}function i(a){e.delete(a)}async function j(a,b){let c=await fetch(d.nZ.loadCodeAssist,{method:"POST",headers:{...d.Ic,Authorization:`Bearer ${a}`},body:JSON.stringify({metadata:d.zv}),signal:b});if(!c.ok){let a=await c.text().catch(()=>"");throw Error(`loadCodeAssist failed: HTTP ${c.status} ${a.slice(0,200)}`)}let e=await c.json(),f=function(a){if(!a)return null;if("string"==typeof a.cloudaicompanionProject){let b=a.cloudaicompanionProject.trim();if(b)return b}if(a.cloudaicompanionProject&&"object"==typeof a.cloudaicompanionProject){let b=a.cloudaicompanionProject.id;if("string"==typeof b&&b.trim())return b.trim()}return null}(e);if(f)return f;let g="legacy-tier";if(Array.isArray(e.allowedTiers)){for(let a of e.allowedTiers)if(a&&"object"==typeof a&&!0===a.isDefault&&a.id&&"string"==typeof a.id&&a.id.trim()){g=a.id.trim();break}}return k(a,g,b)}async function k(a,b,c){console.log(`[ProjectId] Onboarding user with tier: ${b}`);let e={tierId:b,metadata:d.zv};for(let b=1;b<=5&&!c?.aborted;b++){let f=new AbortController,g=setTimeout(()=>f.abort(),3e4),h=()=>f.abort();c?.addEventListener("abort",h);try{let c=await fetch(d.nZ.onboardUser,{method:"POST",headers:{...d.Ic,Authorization:`Bearer ${a}`},body:JSON.stringify(e),signal:f.signal});if(clearTimeout(g),!c.ok){let a=await c.text().catch(()=>"");throw Error(`onboardUser HTTP ${c.status}: ${a.slice(0,200)}`)}let h=await c.json();if(!0===h.done){let a=function(a){if(!a?.response)return null;let b=a.response.cloudaicompanionProject;if("string"==typeof b){let a=b.trim();if(a)return a}if(b&&"object"==typeof b){let a=b.id;if("string"==typeof a&&a.trim())return a.trim()}return null}(h);if(a)return console.log(`[ProjectId] Successfully onboarded, project ID: ${a}`),a;throw Error("onboardUser done but no project_id in response")}console.log(`[ProjectId] Onboard attempt ${b}/5: not done yet, waiting...`),await new Promise(a=>setTimeout(a,2e3))}catch(a){if(clearTimeout(g),"AbortError"===a.name){if(console.warn(`[ProjectId] onboardUser attempt ${b} aborted (timeout or connection removed)`),c?.aborted)return null;continue}if(5===b)return console.warn(`[ProjectId] onboardUser failed after 5 attempts: ${a.message}`),null;console.warn(`[ProjectId] onboardUser attempt ${b} failed: ${a.message}, retrying...`),await new Promise(a=>setTimeout(a,2e3))}finally{clearTimeout(g),c?.removeEventListener("abort",h)}}return null}g=setInterval(()=>{try{let a=Date.now();for(let[b,c]of e)(!c||a-c.fetchedAt>=36e5)&&e.delete(b);for(let[b,c]of f){if(!c||"number"!=typeof c.startedAt){f.delete(b);continue}if(a-c.startedAt>12e4){try{c.controller.abort()}catch(a){}f.delete(b)}}}catch(a){console.warn("[ProjectId] cleanup sweep error:",a?.message??a)}},6e5),g?.unref?.()},67828:(a,b,c)=>{c.d(b,{I9:()=>i,eU:()=>l,vN:()=>k});var d=c(7803),e=c(89718),f=c(38160),g=c(8590);let h=g.oD,i=(a,b,c)=>(0,g.I9)(a,b,c,d);function j(a){return new Date(Date.now()+1e3*a).toISOString()}async function k(a,b){try{let c={};b.accessToken&&(c.accessToken=b.accessToken),b.refreshToken&&(c.refreshToken=b.refreshToken),b.expiresIn&&(c.expiresAt=j(b.expiresIn),c.expiresIn=b.expiresIn),b.providerSpecificData&&(c.providerSpecificData={...b.existingProviderSpecificData||{},...b.providerSpecificData}),b.projectId&&(c.projectId=b.projectId);let f=await (0,e.updateProviderConnection)(a,c);return d.info("TOKEN_REFRESH","Credentials updated in localDb",{connectionId:a,success:!!f}),!!f}catch(b){return d.error("TOKEN_REFRESH","Error updating credentials in localDb",{connectionId:a,error:b.message}),!1}}async function l(a,b){let c={...b};if(c.expiresAt){let b=new Date(c.expiresAt).getTime()-Date.now(),e=(0,g.Og)(a);if(b<e){let h;d.info("TOKEN_REFRESH","Token expiring soon, refreshing proactively",{provider:a,expiresIn:Math.round(b/1e3),refreshLeadMs:e});let i=await (h=c,(0,g.iD)(a,h,d));if(i?.accessToken){let b={...i,existingProviderSpecificData:c.providerSpecificData};await k(c.connectionId,b),function(a,b,c){("antigravity"===a||"gemini-cli"===a)&&b&&c&&((0,f.Ou)(b),(0,f.eG)(b,c).then(a=>{a&&k(b,{projectId:a}).catch(a=>{d.debug("TOKEN_REFRESH","Failed to persist refreshed projectId",{connectionId:b,error:a?.message??a})})}).catch(a=>{d.debug("TOKEN_REFRESH","Failed to fetch projectId after token refresh",{connectionId:b,error:a?.message??a})}))}(a,(c={...c,accessToken:i.accessToken,refreshToken:i.refreshToken??c.refreshToken,providerSpecificData:i.providerSpecificData?{...c.providerSpecificData,...i.providerSpecificData}:c.providerSpecificData,expiresAt:i.expiresIn?j(i.expiresIn):c.expiresAt}).connectionId,c.accessToken)}}}if("github"===a&&c.providerSpecificData?.copilotTokenExpiresAt){let b=1e3*c.providerSpecificData.copilotTokenExpiresAt-Date.now();if(b<h){let e;d.info("TOKEN_REFRESH","Copilot token expiring soon, refreshing proactively",{provider:a,expiresIn:Math.round(b/1e3)});let f=await (e=c.accessToken,(0,g.jR)(e,d));if(f){let a={...c.providerSpecificData,copilotToken:f.token,copilotTokenExpiresAt:f.expiresAt};await k(c.connectionId,{providerSpecificData:a}),c.providerSpecificData=a,c.copilotToken=f.token}}}return c}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=8491,exports.ids=[8491],exports.modules={7803:(a,b,c)=>{c.r(b),c.d(b,{debug:()=>f,error:()=>i,info:()=>g,maskKey:()=>m,request:()=>j,response:()=>k,stream:()=>l,warn:()=>h});function d(){return new Date().toLocaleTimeString("en-US",{hour12:!1})}function e(a){if(!a)return"";if("string"==typeof a)return a;try{return JSON.stringify(a)}catch{return String(a)}}function f(a,b,c){!0;{let f=c?` ${e(c)}`:"";console.log(`[${d()}] 🔍 [${a}] ${b}${f}`)}}function g(a,b,c){!0;{let f=c?` ${e(c)}`:"";console.log(`[${d()}] â„šī¸ [${a}] ${b}${f}`)}}function h(a,b,c){c&&e(c)}function i(a,b,c){!0;{let f=c?` ${e(c)}`:"";console.log(`[${d()}] ❌ [${a}] ${b}${f}`)}}function j(a,b,c){let f=c?` ${e(c)}`:"";console.log(`\x1b[36m[${d()}] đŸ“Ĩ ${a} ${b}${f}\x1b[0m`)}function k(a,b,c){let f=c?` ${e(c)}`:"";console.log(`[${d()}] ${a<400?"\uD83D\uDCE4":"\uD83D\uDCA5"} ${a} (${b}ms)${f}`)}function l(a,b){let c=b?` ${e(b)}`:"";console.log(`[${d()}] 🌊 [STREAM] ${a}${c}`)}function m(a){return!a||a.length<8?"***":`${a.slice(0,4)}...${a.slice(-4)}`}},12557:(a,b,c)=>{c.d(b,{Bl:()=>j,Qo:()=>f,S5:()=>l,hk:()=>e,kJ:()=>k});var d=c(3662);function e(a,b,c=0){let f=b?("string"==typeof b?b:JSON.stringify(b)).toLowerCase():"";for(let b of d.t2)if(b.text&&f&&f.includes(b.text)||b.status&&b.status===a){if(b.backoff){let a=Math.min(c+1,d.EQ.maxLevel);return{shouldFallback:!0,cooldownMs:function(a=0){let b=Math.max(0,a-1);return Math.min(d.EQ.base*Math.pow(2,b),d.EQ.max)}(a),newBackoffLevel:a}}return{shouldFallback:!0,cooldownMs:b.cooldownMs}}return{shouldFallback:!0,cooldownMs:d.wf}}function f(a){if(!a)return"";let b=new Date(a).getTime()-Date.now();if(b<=0)return"reset after 0s";let c=Math.ceil(b/1e3),d=Math.floor(c/3600),e=Math.floor(c%3600/60),f=c%60,g=[];return d>0&&g.push(`${d}h`),e>0&&g.push(`${e}m`),(f>0||0===g.length)&&g.push(`${f}s`),`reset after ${g.join(" ")}`}let g="modelLock_",h=`${g}__all`;function i(a){return a?`${g}${a}`:h}function j(a,b){let c=a[i(b)]||a[h];return!!c&&new Date(c).getTime()>Date.now()}function k(a){if(!a)return null;let b=null,c=Date.now();for(let[d,e]of Object.entries(a)){if(!d.startsWith(g)||!e)continue;let a=new Date(e).getTime();a<=c||(!b||a<b)&&(b=a)}return b?new Date(b).toISOString():null}function l(a,b){return{[i(a)]:new Date(Date.now()+b).toISOString()}}},19225:(a,b,c)=>{a.exports=c(44870)},39326:(a,b,c)=>{c.d(b,{B:()=>f});var d=c(71998);function e(a){return null==a?"":String(a).trim()}async function f(a={}){try{let b=e(a?.proxyPoolId),c="__none__"===b?"":b,f=function(a={}){let b=a?.connectionProxyEnabled===!0,c=e(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:e(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=e(a?.proxyUrl),f=e(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type)return{source:"vercel",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:f,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:f,strictProxy:!0===a.strictProxy}}}if(f.connectionProxyEnabled&&f.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...f};return{source:"none",proxyPoolId:c||null,proxyPool:null,...f}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},43659:(a,b,c)=>{c.d(b,{A1:()=>g,lR:()=>i,wO:()=>h,yj:()=>e,zL:()=>f});var d=c(3662);function e(a,b){let c;return new Response(JSON.stringify((c=d.LY[a]||(a>=500?{type:"server_error",code:"internal_server_error"}:{type:"invalid_request_error",code:""}),{error:{message:b||d.O[a]||"An error occurred",type:c.type,code:c.code}})),{status:a,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}async function f(a,b=null){let c="";try{c=await a.text()}catch{c=""}if(b&&"function"==typeof b.parseError)try{let e=b.parseError(a,c);if(e&&"object"==typeof e){let b=e.message||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:e.status||a.status,message:b,resetsAtMs:e.resetsAtMs}}}catch{}let e="";try{let a=JSON.parse(c);e=a.error?.message||a.message||a.error||c}catch{e=c}let g=("string"==typeof e?e:JSON.stringify(e))||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:a.status,message:g}}function g(a,b,c){return{success:!1,status:a,error:b,resetsAtMs:c,response:e(a,b)}}function h(a,b,c,d){let e=Math.max(Math.ceil((new Date(c).getTime()-Date.now())/1e3),1);return new Response(JSON.stringify({error:{message:`${b} (${d})`}}),{status:a,headers:{"Content-Type":"application/json","Retry-After":String(e)}})}function i(a,b,c,d){let e=d||a.code||"FETCH_FAILED",f=a.message||"Unknown error",g=a.cause?.code,h=a.cause?.message,i=g||h?` (cause: ${[g,h].filter(Boolean).join(": ")})`:"";return`[${e}]: ${f}${i}`}},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,P:()=>d.getProviderConnections,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,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},80238:(a,b,c)=>{c.d(b,{Pt:()=>m,Tr:()=>n,c1:()=>k,kI:()=>o,vk:()=>l});var d=c(89718),e=c(39326),f=c(12557),g=c(3662),h=c(75681),i=c(7803);let j=Promise.resolve();async function k(a,b=null,c=null,g={}){let l,m=b instanceof Set?b:b?new Set([b]):new Set,n=g?.preferredConnectionId||null,o=j;j=new Promise(a=>{l=a});try{let b;await o;let g=(0,h.rs)(a);if(h.IS[g]?.noAuth){let a=((await (0,d.mt)()).providerStrategies||{})[g]||{},b=await (0,e.B)({proxyPoolId:a.proxyPoolId||""});return{id:"noauth",connectionName:"Public",isActive:!0,accessToken:"public",providerSpecificData:{connectionProxyEnabled:b.connectionProxyEnabled,connectionProxyUrl:b.connectionProxyUrl,connectionNoProxy:b.connectionNoProxy,connectionProxyPoolId:b.proxyPoolId||null,vercelRelayUrl:b.vercelRelayUrl||""}}}let j=await (0,d.getProviderConnections)({provider:g,isActive:!0});if(i.debug("AUTH",`${a} | total connections: ${j.length}, excludeIds: ${m.size>0?[...m].join(","):"none"}, model: ${c||"any"}`),0===j.length)return i.warn("AUTH",`No credentials for ${a}`),null;let k=j.filter(a=>!(m.has(a.id)||(0,f.Bl)(a,c)));if(i.debug("AUTH",`${a} | available: ${k.length}/${j.length}`),j.forEach(a=>{let b=m.has(a.id),d=(0,f.Bl)(a,c);if(b||d){let e=(0,f.kJ)(a);i.debug("AUTH",` → ${a.id?.slice(0,8)} | ${b?"excluded":""} ${d?`modelLocked(${c}) until ${e}`:""}`)}}),0===k.length){let b=j.filter(a=>(0,f.Bl)(a,c)),d=b.map(a=>(0,f.kJ)(a)).filter(Boolean).sort()[0]||null;if(d){let e=b[0];return i.warn("AUTH",`${a} | all ${j.length} accounts locked for ${c||"all"} (${(0,f.Qo)(d)}) | lastError=${e?.lastError?.slice(0,50)}`),{allRateLimited:!0,retryAfter:d,retryAfterHuman:(0,f.Qo)(d),lastError:e?.lastError||null,lastErrorCode:e?.errorCode||null}}return i.warn("AUTH",`${a} | all ${j.length} accounts unavailable`),null}let l=await (0,d.mt)(),p=(l.providerStrategies||{})[g]||{},q=p.fallbackStrategy||l.fallbackStrategy||"fill-first";if(n&&(b=k.find(a=>a.id===n))&&i.info("AUTH",`${a} | pinned to ${b.id?.slice(0,8)} (${b.name||b.email||"unnamed"})`),b);else if("round-robin"===q){let a=p.stickyRoundRobinLimit||l.stickyRoundRobinLimit||3,c=[...k].sort((a,b)=>a.lastUsedAt||b.lastUsedAt?a.lastUsedAt?b.lastUsedAt?new Date(b.lastUsedAt)-new Date(a.lastUsedAt):-1:1:(a.priority||999)-(b.priority||999))[0],e=c?.consecutiveUseCount||0;c&&c.lastUsedAt&&e<a?(b=c,await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:(b.consecutiveUseCount||0)+1})):(b=[...k].sort((a,b)=>a.lastUsedAt||b.lastUsedAt?a.lastUsedAt?b.lastUsedAt?new Date(a.lastUsedAt)-new Date(b.lastUsedAt):1:-1:(a.priority||999)-(b.priority||999))[0],await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:1}))}else b=k[0];let r=await (0,e.B)(b.providerSpecificData||{});return{apiKey:b.apiKey,accessToken:b.accessToken,refreshToken:b.refreshToken,projectId:b.projectId,connectionName:b.displayName||b.name||b.email||b.id,copilotToken:b.providerSpecificData?.copilotToken,providerSpecificData:{...b.providerSpecificData||{},connectionProxyEnabled:r.connectionProxyEnabled,connectionProxyUrl:r.connectionProxyUrl,connectionNoProxy:r.connectionNoProxy,connectionProxyPoolId:r.proxyPoolId||null,vercelRelayUrl:r.vercelRelayUrl||""},connectionId:b.id,testStatus:b.testStatus,lastError:b.lastError,_connection:b}}finally{l&&l()}}async function l(a,b,c,e=null,h=null,j=null){let k,m,n;if(!a||"noauth"===a)return{shouldFallback:!1,cooldownMs:0};let o=(await (0,d.getProviderConnections)({provider:e})).find(b=>b.id===a),p=o?.backoffLevel||0;if(j&&j>Date.now()?(k=!0,m=Math.min(j-Date.now(),g.fh),n=0):{shouldFallback:k,cooldownMs:m,newBackoffLevel:n}=(0,f.hk)(b,c,p),!k)return{shouldFallback:!1,cooldownMs:0};let q="string"==typeof c?c.slice(0,100):"Provider error",r=(0,f.S5)(h,m);await (0,d.updateProviderConnection)(a,{...r,testStatus:"unavailable",lastError:q,errorCode:b,lastErrorAt:new Date().toISOString(),backoffLevel:n??p});let s=Object.keys(r)[0],t=o?.displayName||o?.name||o?.email||a.slice(0,8);return i.warn("AUTH",`${t} locked ${s} for ${Math.round(m/1e3)}s [${b}]`),e&&b&&q&&console.error(`❌ ${e} [${b}]: ${q}`),{shouldFallback:!0,cooldownMs:m}}async function m(a,b,c=null){if(!a||"noauth"===a)return;let e=b._connection||b,f=Date.now(),g=Object.keys(e).filter(a=>a.startsWith("modelLock_"));if(!e.testStatus&&!e.lastError&&0===g.length)return;let h=g.filter(a=>{if(c&&a===`modelLock_${c}`||c&&"modelLock___all"===a)return!0;let b=e[a];return b&&new Date(b).getTime()<=f});if(0===h.length&&"unavailable"!==e.testStatus&&!e.lastError)return;let i=g.filter(a=>{if(h.includes(a))return!1;let b=e[a];return b&&new Date(b).getTime()>f}),j=Object.fromEntries(h.map(a=>[a,null]));0===i.length&&Object.assign(j,{testStatus:"active",lastError:null,lastErrorAt:null,backoffLevel:0}),await (0,d.updateProviderConnection)(a,j)}function n(a){let b=a.headers.get("Authorization");if(b?.startsWith("Bearer "))return b.slice(7);let c=a.headers.get("x-api-key");return c||null}async function o(a){return!!a&&await (0,d.ek)(a)}},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}}};