@jheavenknows/bluerouter 2.0.86 → 2.0.87

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 (434) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +2 -2
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  35. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  36. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  37. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  38. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  39. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  40. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  41. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  42. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  44. package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  45. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  46. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  47. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  48. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  49. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  50. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  51. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  87. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  89. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  90. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  91. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  166. package/app/.next-cli-build/server/app/callback.html +1 -1
  167. package/app/.next-cli-build/server/app/callback.rsc +3 -3
  168. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  169. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  170. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  171. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  172. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  173. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  174. package/app/.next-cli-build/server/app/dashboard/analytics.html +1 -1
  175. package/app/.next-cli-build/server/app/dashboard/analytics.rsc +4 -4
  176. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +1 -1
  177. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
  178. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  179. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  180. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_full.segment.rsc +4 -4
  181. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
  182. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_index.segment.rsc +3 -3
  183. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_tree.segment.rsc +1 -1
  184. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  185. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +5 -5
  186. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +2 -2
  187. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys.segment.rsc +1 -1
  188. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  189. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  190. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +5 -5
  191. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_head.segment.rsc +1 -1
  192. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_index.segment.rsc +3 -3
  193. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +1 -1
  194. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  195. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  196. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  197. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  198. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  199. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  200. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  201. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  202. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  203. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  204. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  205. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  206. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  207. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  208. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  209. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  210. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  211. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  212. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  213. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  214. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  215. package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  216. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  217. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  218. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  219. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  220. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  221. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  222. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  223. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  224. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  225. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  226. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  227. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  228. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  229. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  230. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  231. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  232. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  233. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  234. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  235. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  236. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  237. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  238. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  239. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  240. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  241. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  242. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  243. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  244. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  245. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  246. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  247. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  248. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  249. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  250. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  251. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  252. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  253. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  254. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  255. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  256. package/app/.next-cli-build/server/app/dashboard/profile.rsc +4 -4
  257. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +1 -1
  258. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  259. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  260. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  261. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +4 -4
  262. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  263. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  264. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  265. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  266. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +4 -4
  267. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +1 -1
  268. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
  269. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  270. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  271. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +4 -4
  272. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
  273. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +3 -3
  274. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +1 -1
  275. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  276. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +4 -4
  277. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +1 -1
  278. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
  279. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  280. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  281. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +4 -4
  282. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
  283. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +3 -3
  284. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +1 -1
  285. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  286. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  287. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  288. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  289. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  290. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  291. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  292. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  293. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  294. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  295. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  296. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  297. package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  298. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  299. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  300. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  301. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  302. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  303. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  304. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  305. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  306. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  307. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  308. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  309. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  310. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  311. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  312. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  313. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  314. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  315. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  316. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  317. package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  318. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  319. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  320. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  321. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  322. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  323. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  324. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  325. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  326. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  327. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  328. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  329. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  330. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  331. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  332. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  333. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  334. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  335. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  336. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  337. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  338. package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  339. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  340. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  341. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  342. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  343. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  344. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  345. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  346. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  347. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  348. package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  349. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  350. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  351. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  352. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  353. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  354. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  355. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  356. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  357. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  358. package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  359. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  360. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  361. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  362. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  363. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  364. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  365. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  366. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  367. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  368. package/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  369. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  370. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  371. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  372. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  373. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  374. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  375. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  376. package/app/.next-cli-build/server/app/index.html +1 -1
  377. package/app/.next-cli-build/server/app/index.rsc +3 -3
  378. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  379. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  380. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  381. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  382. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  383. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  384. package/app/.next-cli-build/server/app/landing.html +1 -1
  385. package/app/.next-cli-build/server/app/landing.rsc +3 -3
  386. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  387. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  388. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  389. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  390. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  391. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  392. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  393. package/app/.next-cli-build/server/app/login.html +1 -1
  394. package/app/.next-cli-build/server/app/login.rsc +3 -3
  395. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +3 -3
  396. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  397. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  398. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  399. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  400. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  401. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  402. package/app/.next-cli-build/server/app-paths-manifest.json +2 -2
  403. package/app/.next-cli-build/server/chunks/232.js +1 -45
  404. package/app/.next-cli-build/server/chunks/2338.js +1 -1
  405. package/app/.next-cli-build/server/chunks/3110.js +1 -1
  406. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  407. package/app/.next-cli-build/server/chunks/4684.js +1 -45
  408. package/app/.next-cli-build/server/chunks/4739.js +1 -1
  409. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  410. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  411. package/app/.next-cli-build/server/chunks/4803.js +1 -1
  412. package/app/.next-cli-build/server/chunks/507.js +1 -1
  413. package/app/.next-cli-build/server/chunks/5258.js +1 -1
  414. package/app/.next-cli-build/server/chunks/6252.js +1 -1
  415. package/app/.next-cli-build/server/chunks/698.js +1 -1
  416. package/app/.next-cli-build/server/chunks/7130.js +1 -1
  417. package/app/.next-cli-build/server/chunks/7153.js +1 -1
  418. package/app/.next-cli-build/server/chunks/7324.js +1 -45
  419. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  420. package/app/.next-cli-build/server/chunks/8062.js +1 -1
  421. package/app/.next-cli-build/server/chunks/8469.js +1 -1
  422. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  423. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  424. package/app/.next-cli-build/server/pages/404.html +1 -1
  425. package/app/.next-cli-build/server/pages/500.html +1 -1
  426. package/app/.next-cli-build/static/chunks/{1321-f3cc4cb82223ddbc.js → 1321-8c45bbbccb18c6e5.js} +1 -1
  427. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
  428. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
  429. package/app/package.json +1 -1
  430. package/app/src/lib/db/migrate.js +3 -36
  431. package/package.json +1 -1
  432. /package/app/.next-cli-build/static/{nUC1NH0H7SuyJGE-I1rvP → iOcCnF-oha4dR4oAXJ9EM}/_buildManifest.js +0 -0
  433. /package/app/.next-cli-build/static/{nUC1NH0H7SuyJGE-I1rvP → iOcCnF-oha4dR4oAXJ9EM}/_ssgManifest.js +0 -0
  434. /package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-2.0.83-to-2.0.84-2.0.84-20260616-110714 → upgrade-2.0.86-to-2.0.87-2.0.87-20260616-155538}/data.sqlite +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=7153,exports.ids=[1998,7153],exports.modules={15626:(a,b,c)=>{c.d(b,{w$:()=>e});let d=c(39006).rE||"0.0.0";function e(a,b={}){let c,f=(c=function(a){if("string"!=typeof a)return"";let b=a.trim();return b?b.startsWith("workos:")?b:`workos:${b}`:""}(a))?`Bearer ${c}`:"",g={"HTTP-Referer":"https://cline.bot","X-Title":"Cline","User-Agent":`Bluerouter/${d}`,"X-PLATFORM":process.platform||"unknown","X-PLATFORM-VERSION":process.version||"unknown","X-CLIENT-TYPE":"bluerouter","X-CLIENT-VERSION":d,"X-CORE-VERSION":d,"X-IS-MULTIROOT":"false",...b};return f&&(g.Authorization=f),g}},30869:(a,b,c)=>{c.d(b,{UY:()=>i,X3:()=>j,eh:()=>f.eh,fg:()=>e.fg,h0:()=>h,vQ:()=>g});var d=c(39006),e=c(75681),f=c(81329);let g={name:"Blue Router Gateway",description:"AI Infrastructure Management",version:d.rE},h={npmPackageName:"@jheavenknows/bluerouter",installCmd:"npm i -g @jheavenknows/bluerouter",installCmdLatest:"npm install -g @jheavenknows/bluerouter@latest",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20128},i={maxLines:200,pollIntervalMs:1e3},j={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat"}},39006:a=>{a.exports={rE:"2.0.86"}},39326:(a,b,c)=>{c.d(b,{B:()=>g});var d=c(71998);let e=new Set(["vercel","cloudflare","deno"]);function f(a){return null==a?"":String(a).trim()}async function g(a={}){try{let b=f(a?.proxyPoolId),c="__none__"===b?"":b,g=function(a={}){let b=a?.connectionProxyEnabled===!0,c=f(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:f(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=f(a?.proxyUrl),g=f(a?.noProxy);if(a&&!0===a.isActive&&b){if(e.has(a.type))return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:g,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:g,strictProxy:!0===a.strictProxy}}}if(g.connectionProxyEnabled&&g.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...g};return{source:"none",proxyPoolId:c||null,proxyPool:null,...g}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},66811:(a,b,c)=>{c.d(b,{F:()=>s});var d=c(89718),e=c(39326),f=c(74926),g=c(75681),h=c(30869),i=c(44404),j=c(35024),k=c(92990),l=c(15626);let m={claude:{checkExpiry:!0,refreshable:!0},codex:{url:"https://chatgpt.com/backend-api/codex/responses",method:"POST",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{"Content-Type":"application/json",originator:"codex-cli","User-Agent":"codex-cli/1.0.18 (macOS; arm64)"},body:JSON.stringify({model:"gpt-5.3-codex",input:[],stream:!1,store:!1}),acceptStatuses:[400],refreshable:!0},"gemini-cli":{url:"https://www.googleapis.com/oauth2/v1/userinfo?alt=json",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!0},antigravity:{url:"https://www.googleapis.com/oauth2/v1/userinfo?alt=json",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!0},github:{url:"https://api.github.com/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{"User-Agent":"Bluerouter",Accept:"application/vnd.github+json"}},iflow:{buildUrl:a=>`https://iflow.cn/api/oauth/getUserInfo?accessToken=${encodeURIComponent(a)}`,method:"GET",noAuth:!0},qwen:{checkExpiry:!0,refreshable:!0},kiro:{checkExpiry:!0,refreshable:!0},"kimi-coding":{checkExpiry:!0,refreshable:!1},cursor:{tokenExists:!0},kilocode:{url:`${k.MZ.apiBaseUrl}/api/profile`,method:"GET",authHeader:"Authorization",authPrefix:"Bearer "},cline:{refreshable:!0},gitlab:{url:"https://gitlab.com/api/v4/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer "},codebuddy:{tokenExists:!0}};async function n(a){return await fetch("https://api.cline.bot/api/v1/users/me",{method:"GET",headers:(0,l.w$)(a,{Accept:"application/json"})})}async function o(a){let b=a.provider,c=a.refreshToken;if(!c)return null;try{if("gemini-cli"===b||"antigravity"===b){let a="gemini-cli"===b?k.LT:k.YT,d=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:a.clientId,client_secret:a.clientSecret,grant_type:"refresh_token",refresh_token:c})});if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,expiresIn:e.expires_in,refreshToken:e.refresh_token||c}}if("codex"===b){let a=await fetch(k.DI.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",client_id:k.DI.clientId,refresh_token:c})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("claude"===b){let a=await fetch(k.OV.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:c,client_id:k.OV.clientId})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("kiro"===b){let b=a.providerSpecificData||{},d=b.clientId||a.clientId,e=b.clientSecret||a.clientSecret,f=b.region||a.region;if(d&&e){let a=`https://oidc.${f||"us-east-1"}.amazonaws.com/token`,b=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:d,clientSecret:e,refreshToken:c,grantType:"refresh_token"})});if(!b.ok)return null;let g=await b.json();return{accessToken:g.accessToken,expiresIn:g.expiresIn||3600,refreshToken:g.refreshToken||c}}let g=await fetch(k.Tx.socialRefreshUrl,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:c})});if(!g.ok)return null;let h=await g.json();return{accessToken:h.accessToken,expiresIn:h.expiresIn||3600,refreshToken:h.refreshToken||c}}if("qwen"===b){let a=await fetch(k.Hp.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:c,client_id:k.Hp.clientId})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("cline"===b){let a=await fetch(k.lB.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:c,grantType:"refresh_token",clientType:"extension"})});if(!a.ok)return null;let b=await a.json(),d=b?.data||b,e=d?.expiresAt?Math.max(1,Math.floor((new Date(d.expiresAt).getTime()-Date.now())/1e3)):3600;return{accessToken:d?.accessToken,expiresIn:e,refreshToken:d?.refreshToken||c}}return null}catch(a){return console.log(`Error refreshing ${b} token:`,a.message),null}}async function p(a,b=null){var c;let d=m[a.provider];if(!d)return{valid:!1,error:"Provider test not supported",refreshed:!1};if(!a.accessToken)return{valid:!1,error:"No access token",refreshed:!1};if(d.tokenExists)return{valid:!0,error:null,refreshed:!1,newTokens:null};let e=a.accessToken,f=!1,g=null,h=!!(c=a).expiresAt&&new Date(c.expiresAt).getTime()<=Date.now()+3e5;if(d.refreshable&&h&&a.refreshToken){let b=await o(a);if(!b)return{valid:!1,error:"Token expired and refresh failed",refreshed:!1};e=b.accessToken,f=!0,g=b}if(d.checkExpiry)return f?{valid:!0,error:null,refreshed:f,newTokens:g}:h?{valid:!1,error:"Token expired",refreshed:!1}:{valid:!0,error:null,refreshed:!1,newTokens:null};if("cline"===a.provider){let b=async a=>{let b=await n(a);return b.ok?{valid:!0,error:null,refreshed:f,newTokens:g}:401===b.status?{valid:!1,error:"Token invalid or revoked",refreshed:f}:403===b.status?{valid:!1,error:"Access denied",refreshed:f}:{valid:!1,error:`API returned ${b.status}`,refreshed:f}},c=await b(e);if(c.valid||"Token invalid or revoked"!==c.error||!a.refreshToken)return c;let d=await o(a);return d?.accessToken?(f=!0,g=d,e=d.accessToken,await b(e)):{valid:!1,error:"Token invalid or revoked",refreshed:!1}}try{let c=d.buildUrl?d.buildUrl(e):d.url,h=d.noAuth?{...d.extraHeaders}:{[d.authHeader]:`${d.authPrefix}${e}`,...d.extraHeaders},i={method:d.method,headers:h};d.body&&(i.body=d.body);let j=await q(c,i,b);if(j.ok||d.acceptStatuses&&d.acceptStatuses.includes(j.status))return{valid:!0,error:null,refreshed:f,newTokens:g};if(401===j.status&&d.refreshable&&!f&&a.refreshToken){let e=await o(a);if(e){let a=d.buildUrl?d.buildUrl(e.accessToken):c,f=d.noAuth?{...d.extraHeaders}:{[d.authHeader]:`${d.authPrefix}${e.accessToken}`,...d.extraHeaders},g={method:d.method,headers:f};d.body&&(g.body=d.body);let h=await q(a,g,b);if(h.ok||d.acceptStatuses&&d.acceptStatuses.includes(h.status))return{valid:!0,error:null,refreshed:!0,newTokens:e}}return{valid:!1,error:"Token invalid or revoked",refreshed:!1}}if(401===j.status)return{valid:!1,error:"Token invalid or revoked",refreshed:f};if(403===j.status)return{valid:!1,error:"Access denied",refreshed:f};return{valid:!1,error:`API returned ${j.status}`,refreshed:f}}catch(a){return{valid:!1,error:a.message,refreshed:f}}}async function q(a,b={},d=null){if(d?.vercelRelayUrl){let{proxyAwareFetch:e}=await c.e(9609).then(c.bind(c,39609));return e(a,b,{vercelRelayUrl:d.vercelRelayUrl})}if(!d?.connectionProxyEnabled||!d?.connectionProxyUrl)return fetch(a,b);let{proxyAwareFetch:e}=await c.e(9609).then(c.bind(c,39609));return e(a,b,{connectionProxyEnabled:!0,connectionProxyUrl:d.connectionProxyUrl,connectionNoProxy:d.connectionNoProxy||""})}async function r(a,b=null){if((0,g.mq)(a.provider)){let c=a.providerSpecificData?.baseUrl;if(!c)return{valid:!1,error:"Missing base URL"};try{let d=await q(`${c.replace(/\/$/,"")}/models`,{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key or base URL"}}catch(a){return{valid:!1,error:a.message}}}if((0,g.gb)(a.provider)){let c=a.providerSpecificData?.baseUrl;if(!c)return{valid:!1,error:"Missing base URL"};try{(c=c.replace(/\/$/,"")).endsWith("/messages")&&(c=c.slice(0,-9));let d=await q(`${c}/models`,{headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01",Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key or base URL"}}catch(a){return{valid:!1,error:a.message}}}try{switch(a.provider){case"cloudflare-ai":{let c=(a.providerSpecificData||{}).accountId;if(!c)return{valid:!1,error:"Missing Account ID"};let d=`https://api.cloudflare.com/client/v4/accounts/${c}/ai/v1/chat/completions`,e=await q(d,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:(0,i.fZ)("cloudflare-ai"),messages:[{role:"user",content:"test"}],max_tokens:1})},b),f=401!==e.status&&403!==e.status&&404!==e.status;return{valid:f,error:f?null:"Invalid API token or Account ID"}}case"azure":{let c=a.providerSpecificData||{},d=(c.azureEndpoint||"").replace(/\/$/,""),e=c.deployment||"gpt-4",f=c.apiVersion||"2024-10-01-preview",g=`${d}/openai/deployments/${e}/chat/completions?api-version=${f}`,h={"api-key":a.apiKey,"Content-Type":"application/json"};c.organization&&(h["OpenAI-Organization"]=c.organization);let i=await q(g,{method:"POST",headers:h,body:JSON.stringify({messages:[{role:"user",content:"test"}],max_completion_tokens:1})},b),j=401!==i.status&&403!==i.status;return{valid:j,error:j?null:"Invalid API key or Azure configuration"}}case"openai":{let c=await q("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"vercel-ai-gateway":{let c=await q("https://ai-gateway.vercel.sh/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"anthropic":{let c=await q("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"claude-3-haiku-20240307",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"gemini":{let c=await q(`https://generativelanguage.googleapis.com/v1/models?key=${a.apiKey}`,{},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"openrouter":{let c=await q("https://openrouter.ai/api/v1/auth/key",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"glm":{let c=await q("https://api.z.ai/api/anthropic/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"glm-4.7",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"glm-cn":{let c=await q("https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:"glm-4.7",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"minimax":case"minimax-cn":{let c=await q({minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages"}[a.provider],{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"minimax-m2",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"kimi":{let c=await q("https://api.kimi.com/coding/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"kimi-latest",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"alicode":case"alicode-intl":{let c="alicode-intl"===a.provider?"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions":"https://coding.dashscope.aliyuncs.com/v1/chat/completions",d=await q(c,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:(0,i.fZ)(a.provider),max_tokens:1,messages:[{role:"user",content:"test"}]})},b),e=401!==d.status&&403!==d.status;return{valid:e,error:e?null:"Invalid API key"}}case"volcengine-ark":case"byteplus":{let c=await q(h.X3[a.provider],{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:(0,i.fZ)(a.provider),max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"deepseek":{let c=await q("https://api.deepseek.com/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"groq":{let c=await q("https://api.groq.com/openai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"mistral":{let c=await q("https://api.mistral.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"xai":{let c=await q("https://api.x.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nvidia":{let c=await q("https://integrate.api.nvidia.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"perplexity":{let c=await q("https://api.perplexity.ai/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"together":{let c=await q("https://api.together.xyz/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"fireworks":{let c=await q("https://api.fireworks.ai/inference/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"cerebras":{let c=await q("https://api.cerebras.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"cohere":{let c=await q("https://api.cohere.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nebius":{let c=await q("https://api.studio.nebius.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"siliconflow":{let c=await q("https://api.siliconflow.cn/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"hyperbolic":{let c=await q("https://api.hyperbolic.xyz/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"ollama":{let b=await fetch("https://ollama.com/api/tags",{headers:{Authorization:`Bearer ${a.apiKey}`}});return{valid:b.ok,error:b.ok?null:"Invalid API key"}}case"ollama-local":{let b=(0,j.Ak)(a),c=await fetch(`${b}/api/tags`);return{valid:c.ok,error:c.ok?null:`Ollama not reachable at ${b}`}}case"deepgram":{let c=await q("https://api.deepgram.com/v1/projects",{headers:{Authorization:`Token ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"assemblyai":{let c=await q("https://api.assemblyai.com/v1/account",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nanobanana":{let c=await q("https://api.nanobananaapi.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"fal-ai":{let c=await q("https://api.fal.ai/v1/models?limit=1",{headers:{Authorization:`Key ${a.apiKey}`}},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"chutes":{let c=await q("https://llm.chutes.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"grok-web":{let c=a.apiKey.startsWith("sso=")?a.apiKey.slice(4):a.apiKey,d=a=>Array.from(crypto.getRandomValues(new Uint8Array(a)),a=>a.toString(16).padStart(2,"0")).join(""),e=Buffer.from("e:TypeError: Cannot read properties of null (reading 'children')").toString("base64"),f=await q("https://grok.com/rest/app-chat/conversations/new",{method:"POST",headers:{Accept:"*/*","Content-Type":"application/json",Cookie:`sso=${c}`,Origin:"https://grok.com",Referer:"https://grok.com/","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","x-statsig-id":e,"x-xai-request-id":crypto.randomUUID(),traceparent:`00-${d(16)}-${d(8)}-00`},body:JSON.stringify({temporary:!0,modelName:"grok-4",message:"ping",fileAttachments:[],imageAttachments:[],disableSearch:!1,enableImageGeneration:!1,sendFinalMetadata:!0})},b),g=401!==f.status&&403!==f.status;return{valid:g,error:g?null:"Invalid SSO cookie"}}case"perplexity-web":{let c=a.apiKey;c.startsWith("__Secure-next-auth.session-token=")&&(c=c.slice(33));let d=await q("https://www.perplexity.ai/api/auth/session",{method:"GET",headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36",Cookie:`__Secure-next-auth.session-token=${c}`}},b);if(!d.ok)return{valid:!1,error:"Invalid session cookie"};let e=await d.json().catch(()=>null),f=!!(e&&e.user);return{valid:f,error:f?null:"Session expired — re-paste cookie"}}default:return{valid:!1,error:"Provider test not supported"}}}catch(a){return{valid:!1,error:a.message}}}async function s(a){let b,c=await (0,d.Mc)(a);if(!c)return{valid:!1,error:"Connection not found",latencyMs:0,testedAt:new Date().toISOString()};let g=await (0,e.B)(c.providerSpecificData||{});if(g.connectionProxyEnabled&&g.connectionProxyUrl&&!g.vercelRelayUrl){let b=await (0,f.C)({proxyUrl:g.connectionProxyUrl});if(!b.ok){let c=b.error||`Proxy test failed with status ${b.status}`;return await (0,d.updateProviderConnection)(a,{testStatus:"error",lastError:c,lastErrorAt:new Date().toISOString()}),{valid:!1,error:c,latencyMs:0,testedAt:new Date().toISOString()}}}let h=Date.now();b="apikey"===c.authType||"cookie"===c.authType?await r(c,g):await p(c,g);let i=Date.now()-h,j={testStatus:b.valid?"active":"error",lastError:b.valid?null:b.error,lastErrorAt:b.valid?null:new Date().toISOString()};return b.refreshed&&b.newTokens&&(j.accessToken=b.newTokens.accessToken,b.newTokens.refreshToken&&(j.refreshToken=b.newTokens.refreshToken),b.newTokens.expiresIn&&(j.expiresAt=new Date(Date.now()+1e3*b.newTokens.expiresIn).toISOString())),await (0,d.updateProviderConnection)(a,j),{valid:b.valid,error:b.error,latencyMs:i,testedAt:new Date().toISOString()}}},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)},74926:(a,b,c)=>{c.d(b,{C:()=>f});var d=c(47774);function e(a){return null==a?"":String(a).trim()}async function f({proxyUrl:a,testUrl:b,timeoutMs:c}={}){let g,h=e(a);if(!h)return{ok:!1,status:400,error:"proxyUrl is required"};let i=e(b)||"https://google.com/",j=Number(c),k=Number.isFinite(j)&&j>0?Math.min(j,3e4):8e3;try{try{g=new d.ProxyAgent({uri:h})}catch(a){return{ok:!1,status:400,error:`Invalid proxy URL: ${a?.message||String(a)}`}}let a=new AbortController,b=Date.now(),c=setTimeout(()=>a.abort(),k);try{let c=await (0,d.hd)(i,{method:"HEAD",dispatcher:g,signal:a.signal,headers:{"User-Agent":"Bluerouter"}});return{ok:c.ok,status:c.status,statusText:c.statusText,url:i,elapsedMs:Date.now()-b}}catch(b){let a=b?.name==="AbortError"?"Proxy test timed out":function(a){if(!a)return"Unknown error";let b=a?.message||String(a),c=a?.cause?.code||a?.code,d=a?.cause?.message;return d&&d!==b?c?`${b}: ${d} (${c})`:`${b}: ${d}`:c&&!b.includes(c)?`${b} (${c})`:b}(b);return{ok:!1,status:500,error:a}}finally{clearTimeout(c)}}finally{try{await g?.close?.()}catch{}}}},92990:(a,b,c)=>{c.d(b,{DI:()=>g,Hp:()=>i,LT:()=>h,MZ:()=>r,Nl:()=>u,Nu:()=>n,OV:()=>f,Tx:()=>o,WN:()=>p,Ww:()=>v,YT:()=>l,ZL:()=>k,cD:()=>m,f7:()=>t,hF:()=>j,lB:()=>s,t:()=>q});var d=c(21820);function e(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let f={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"},g={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"}},h={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"]},i={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"},j={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"},k={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"}},l={clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/cclog","https://www.googleapis.com/auth/experimentsandconfigs"],apiEndpoint:"https://cloudcode-pa.googleapis.com",apiVersion:"v1internal",loadCodeAssistEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUserEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser",loadCodeAssistUserAgent:"google-api-nodejs-client/9.15.1",loadCodeAssistApiClient:"google-cloud-sdk vscode_cloudshelleditor/0.1",loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:e(),pluginType:2})};function m(){return{ideType:9,platform:e(),pluginType:2}}let n={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"},o={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"]},p={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"}},q={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"},r={apiBaseUrl:"https://api.kilo.ai",initiateUrl:"https://api.kilo.ai/api/device-auth/codes",pollUrlBase:"https://api.kilo.ai/api/device-auth/codes"},s={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"},t={defaultBaseUrl:"https://gitlab.com",authorizeUrlPath:"/oauth/authorize",tokenUrlPath:"/oauth/token",userInfoUrlPath:"/api/v4/user",scope:"api read_user",codeChallengeMethod:"S256"},u={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},v=3e5},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};
1
+ "use strict";exports.id=7153,exports.ids=[1998,7153],exports.modules={15626:(a,b,c)=>{c.d(b,{w$:()=>e});let d=c(39006).rE||"0.0.0";function e(a,b={}){let c,f=(c=function(a){if("string"!=typeof a)return"";let b=a.trim();return b?b.startsWith("workos:")?b:`workos:${b}`:""}(a))?`Bearer ${c}`:"",g={"HTTP-Referer":"https://cline.bot","X-Title":"Cline","User-Agent":`Bluerouter/${d}`,"X-PLATFORM":process.platform||"unknown","X-PLATFORM-VERSION":process.version||"unknown","X-CLIENT-TYPE":"bluerouter","X-CLIENT-VERSION":d,"X-CORE-VERSION":d,"X-IS-MULTIROOT":"false",...b};return f&&(g.Authorization=f),g}},30869:(a,b,c)=>{c.d(b,{UY:()=>i,X3:()=>j,eh:()=>f.eh,fg:()=>e.fg,h0:()=>h,vQ:()=>g});var d=c(39006),e=c(75681),f=c(81329);let g={name:"Blue Router Gateway",description:"AI Infrastructure Management",version:d.rE},h={npmPackageName:"@jheavenknows/bluerouter",installCmd:"npm i -g @jheavenknows/bluerouter",installCmdLatest:"npm install -g @jheavenknows/bluerouter@latest",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20128},i={maxLines:200,pollIntervalMs:1e3},j={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat"}},39006:a=>{a.exports={rE:"2.0.87"}},39326:(a,b,c)=>{c.d(b,{B:()=>g});var d=c(71998);let e=new Set(["vercel","cloudflare","deno"]);function f(a){return null==a?"":String(a).trim()}async function g(a={}){try{let b=f(a?.proxyPoolId),c="__none__"===b?"":b,g=function(a={}){let b=a?.connectionProxyEnabled===!0,c=f(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:f(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=f(a?.proxyUrl),g=f(a?.noProxy);if(a&&!0===a.isActive&&b){if(e.has(a.type))return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:g,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:g,strictProxy:!0===a.strictProxy}}}if(g.connectionProxyEnabled&&g.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...g};return{source:"none",proxyPoolId:c||null,proxyPool:null,...g}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},66811:(a,b,c)=>{c.d(b,{F:()=>s});var d=c(89718),e=c(39326),f=c(74926),g=c(75681),h=c(30869),i=c(44404),j=c(35024),k=c(92990),l=c(15626);let m={claude:{checkExpiry:!0,refreshable:!0},codex:{url:"https://chatgpt.com/backend-api/codex/responses",method:"POST",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{"Content-Type":"application/json",originator:"codex-cli","User-Agent":"codex-cli/1.0.18 (macOS; arm64)"},body:JSON.stringify({model:"gpt-5.3-codex",input:[],stream:!1,store:!1}),acceptStatuses:[400],refreshable:!0},"gemini-cli":{url:"https://www.googleapis.com/oauth2/v1/userinfo?alt=json",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!0},antigravity:{url:"https://www.googleapis.com/oauth2/v1/userinfo?alt=json",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!0},github:{url:"https://api.github.com/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{"User-Agent":"Bluerouter",Accept:"application/vnd.github+json"}},iflow:{buildUrl:a=>`https://iflow.cn/api/oauth/getUserInfo?accessToken=${encodeURIComponent(a)}`,method:"GET",noAuth:!0},qwen:{checkExpiry:!0,refreshable:!0},kiro:{checkExpiry:!0,refreshable:!0},"kimi-coding":{checkExpiry:!0,refreshable:!1},cursor:{tokenExists:!0},kilocode:{url:`${k.MZ.apiBaseUrl}/api/profile`,method:"GET",authHeader:"Authorization",authPrefix:"Bearer "},cline:{refreshable:!0},gitlab:{url:"https://gitlab.com/api/v4/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer "},codebuddy:{tokenExists:!0}};async function n(a){return await fetch("https://api.cline.bot/api/v1/users/me",{method:"GET",headers:(0,l.w$)(a,{Accept:"application/json"})})}async function o(a){let b=a.provider,c=a.refreshToken;if(!c)return null;try{if("gemini-cli"===b||"antigravity"===b){let a="gemini-cli"===b?k.LT:k.YT,d=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:a.clientId,client_secret:a.clientSecret,grant_type:"refresh_token",refresh_token:c})});if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,expiresIn:e.expires_in,refreshToken:e.refresh_token||c}}if("codex"===b){let a=await fetch(k.DI.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",client_id:k.DI.clientId,refresh_token:c})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("claude"===b){let a=await fetch(k.OV.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:c,client_id:k.OV.clientId})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("kiro"===b){let b=a.providerSpecificData||{},d=b.clientId||a.clientId,e=b.clientSecret||a.clientSecret,f=b.region||a.region;if(d&&e){let a=`https://oidc.${f||"us-east-1"}.amazonaws.com/token`,b=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:d,clientSecret:e,refreshToken:c,grantType:"refresh_token"})});if(!b.ok)return null;let g=await b.json();return{accessToken:g.accessToken,expiresIn:g.expiresIn||3600,refreshToken:g.refreshToken||c}}let g=await fetch(k.Tx.socialRefreshUrl,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:c})});if(!g.ok)return null;let h=await g.json();return{accessToken:h.accessToken,expiresIn:h.expiresIn||3600,refreshToken:h.refreshToken||c}}if("qwen"===b){let a=await fetch(k.Hp.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:c,client_id:k.Hp.clientId})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("cline"===b){let a=await fetch(k.lB.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:c,grantType:"refresh_token",clientType:"extension"})});if(!a.ok)return null;let b=await a.json(),d=b?.data||b,e=d?.expiresAt?Math.max(1,Math.floor((new Date(d.expiresAt).getTime()-Date.now())/1e3)):3600;return{accessToken:d?.accessToken,expiresIn:e,refreshToken:d?.refreshToken||c}}return null}catch(a){return console.log(`Error refreshing ${b} token:`,a.message),null}}async function p(a,b=null){var c;let d=m[a.provider];if(!d)return{valid:!1,error:"Provider test not supported",refreshed:!1};if(!a.accessToken)return{valid:!1,error:"No access token",refreshed:!1};if(d.tokenExists)return{valid:!0,error:null,refreshed:!1,newTokens:null};let e=a.accessToken,f=!1,g=null,h=!!(c=a).expiresAt&&new Date(c.expiresAt).getTime()<=Date.now()+3e5;if(d.refreshable&&h&&a.refreshToken){let b=await o(a);if(!b)return{valid:!1,error:"Token expired and refresh failed",refreshed:!1};e=b.accessToken,f=!0,g=b}if(d.checkExpiry)return f?{valid:!0,error:null,refreshed:f,newTokens:g}:h?{valid:!1,error:"Token expired",refreshed:!1}:{valid:!0,error:null,refreshed:!1,newTokens:null};if("cline"===a.provider){let b=async a=>{let b=await n(a);return b.ok?{valid:!0,error:null,refreshed:f,newTokens:g}:401===b.status?{valid:!1,error:"Token invalid or revoked",refreshed:f}:403===b.status?{valid:!1,error:"Access denied",refreshed:f}:{valid:!1,error:`API returned ${b.status}`,refreshed:f}},c=await b(e);if(c.valid||"Token invalid or revoked"!==c.error||!a.refreshToken)return c;let d=await o(a);return d?.accessToken?(f=!0,g=d,e=d.accessToken,await b(e)):{valid:!1,error:"Token invalid or revoked",refreshed:!1}}try{let c=d.buildUrl?d.buildUrl(e):d.url,h=d.noAuth?{...d.extraHeaders}:{[d.authHeader]:`${d.authPrefix}${e}`,...d.extraHeaders},i={method:d.method,headers:h};d.body&&(i.body=d.body);let j=await q(c,i,b);if(j.ok||d.acceptStatuses&&d.acceptStatuses.includes(j.status))return{valid:!0,error:null,refreshed:f,newTokens:g};if(401===j.status&&d.refreshable&&!f&&a.refreshToken){let e=await o(a);if(e){let a=d.buildUrl?d.buildUrl(e.accessToken):c,f=d.noAuth?{...d.extraHeaders}:{[d.authHeader]:`${d.authPrefix}${e.accessToken}`,...d.extraHeaders},g={method:d.method,headers:f};d.body&&(g.body=d.body);let h=await q(a,g,b);if(h.ok||d.acceptStatuses&&d.acceptStatuses.includes(h.status))return{valid:!0,error:null,refreshed:!0,newTokens:e}}return{valid:!1,error:"Token invalid or revoked",refreshed:!1}}if(401===j.status)return{valid:!1,error:"Token invalid or revoked",refreshed:f};if(403===j.status)return{valid:!1,error:"Access denied",refreshed:f};return{valid:!1,error:`API returned ${j.status}`,refreshed:f}}catch(a){return{valid:!1,error:a.message,refreshed:f}}}async function q(a,b={},d=null){if(d?.vercelRelayUrl){let{proxyAwareFetch:e}=await c.e(9609).then(c.bind(c,39609));return e(a,b,{vercelRelayUrl:d.vercelRelayUrl})}if(!d?.connectionProxyEnabled||!d?.connectionProxyUrl)return fetch(a,b);let{proxyAwareFetch:e}=await c.e(9609).then(c.bind(c,39609));return e(a,b,{connectionProxyEnabled:!0,connectionProxyUrl:d.connectionProxyUrl,connectionNoProxy:d.connectionNoProxy||""})}async function r(a,b=null){if((0,g.mq)(a.provider)){let c=a.providerSpecificData?.baseUrl;if(!c)return{valid:!1,error:"Missing base URL"};try{let d=await q(`${c.replace(/\/$/,"")}/models`,{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key or base URL"}}catch(a){return{valid:!1,error:a.message}}}if((0,g.gb)(a.provider)){let c=a.providerSpecificData?.baseUrl;if(!c)return{valid:!1,error:"Missing base URL"};try{(c=c.replace(/\/$/,"")).endsWith("/messages")&&(c=c.slice(0,-9));let d=await q(`${c}/models`,{headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01",Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key or base URL"}}catch(a){return{valid:!1,error:a.message}}}try{switch(a.provider){case"cloudflare-ai":{let c=(a.providerSpecificData||{}).accountId;if(!c)return{valid:!1,error:"Missing Account ID"};let d=`https://api.cloudflare.com/client/v4/accounts/${c}/ai/v1/chat/completions`,e=await q(d,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:(0,i.fZ)("cloudflare-ai"),messages:[{role:"user",content:"test"}],max_tokens:1})},b),f=401!==e.status&&403!==e.status&&404!==e.status;return{valid:f,error:f?null:"Invalid API token or Account ID"}}case"azure":{let c=a.providerSpecificData||{},d=(c.azureEndpoint||"").replace(/\/$/,""),e=c.deployment||"gpt-4",f=c.apiVersion||"2024-10-01-preview",g=`${d}/openai/deployments/${e}/chat/completions?api-version=${f}`,h={"api-key":a.apiKey,"Content-Type":"application/json"};c.organization&&(h["OpenAI-Organization"]=c.organization);let i=await q(g,{method:"POST",headers:h,body:JSON.stringify({messages:[{role:"user",content:"test"}],max_completion_tokens:1})},b),j=401!==i.status&&403!==i.status;return{valid:j,error:j?null:"Invalid API key or Azure configuration"}}case"openai":{let c=await q("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"vercel-ai-gateway":{let c=await q("https://ai-gateway.vercel.sh/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"anthropic":{let c=await q("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"claude-3-haiku-20240307",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"gemini":{let c=await q(`https://generativelanguage.googleapis.com/v1/models?key=${a.apiKey}`,{},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"openrouter":{let c=await q("https://openrouter.ai/api/v1/auth/key",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"glm":{let c=await q("https://api.z.ai/api/anthropic/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"glm-4.7",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"glm-cn":{let c=await q("https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:"glm-4.7",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"minimax":case"minimax-cn":{let c=await q({minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages"}[a.provider],{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"minimax-m2",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"kimi":{let c=await q("https://api.kimi.com/coding/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"kimi-latest",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"alicode":case"alicode-intl":{let c="alicode-intl"===a.provider?"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions":"https://coding.dashscope.aliyuncs.com/v1/chat/completions",d=await q(c,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:(0,i.fZ)(a.provider),max_tokens:1,messages:[{role:"user",content:"test"}]})},b),e=401!==d.status&&403!==d.status;return{valid:e,error:e?null:"Invalid API key"}}case"volcengine-ark":case"byteplus":{let c=await q(h.X3[a.provider],{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:(0,i.fZ)(a.provider),max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"deepseek":{let c=await q("https://api.deepseek.com/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"groq":{let c=await q("https://api.groq.com/openai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"mistral":{let c=await q("https://api.mistral.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"xai":{let c=await q("https://api.x.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nvidia":{let c=await q("https://integrate.api.nvidia.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"perplexity":{let c=await q("https://api.perplexity.ai/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"together":{let c=await q("https://api.together.xyz/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"fireworks":{let c=await q("https://api.fireworks.ai/inference/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"cerebras":{let c=await q("https://api.cerebras.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"cohere":{let c=await q("https://api.cohere.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nebius":{let c=await q("https://api.studio.nebius.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"siliconflow":{let c=await q("https://api.siliconflow.cn/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"hyperbolic":{let c=await q("https://api.hyperbolic.xyz/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"ollama":{let b=await fetch("https://ollama.com/api/tags",{headers:{Authorization:`Bearer ${a.apiKey}`}});return{valid:b.ok,error:b.ok?null:"Invalid API key"}}case"ollama-local":{let b=(0,j.Ak)(a),c=await fetch(`${b}/api/tags`);return{valid:c.ok,error:c.ok?null:`Ollama not reachable at ${b}`}}case"deepgram":{let c=await q("https://api.deepgram.com/v1/projects",{headers:{Authorization:`Token ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"assemblyai":{let c=await q("https://api.assemblyai.com/v1/account",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nanobanana":{let c=await q("https://api.nanobananaapi.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"fal-ai":{let c=await q("https://api.fal.ai/v1/models?limit=1",{headers:{Authorization:`Key ${a.apiKey}`}},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"chutes":{let c=await q("https://llm.chutes.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"grok-web":{let c=a.apiKey.startsWith("sso=")?a.apiKey.slice(4):a.apiKey,d=a=>Array.from(crypto.getRandomValues(new Uint8Array(a)),a=>a.toString(16).padStart(2,"0")).join(""),e=Buffer.from("e:TypeError: Cannot read properties of null (reading 'children')").toString("base64"),f=await q("https://grok.com/rest/app-chat/conversations/new",{method:"POST",headers:{Accept:"*/*","Content-Type":"application/json",Cookie:`sso=${c}`,Origin:"https://grok.com",Referer:"https://grok.com/","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","x-statsig-id":e,"x-xai-request-id":crypto.randomUUID(),traceparent:`00-${d(16)}-${d(8)}-00`},body:JSON.stringify({temporary:!0,modelName:"grok-4",message:"ping",fileAttachments:[],imageAttachments:[],disableSearch:!1,enableImageGeneration:!1,sendFinalMetadata:!0})},b),g=401!==f.status&&403!==f.status;return{valid:g,error:g?null:"Invalid SSO cookie"}}case"perplexity-web":{let c=a.apiKey;c.startsWith("__Secure-next-auth.session-token=")&&(c=c.slice(33));let d=await q("https://www.perplexity.ai/api/auth/session",{method:"GET",headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36",Cookie:`__Secure-next-auth.session-token=${c}`}},b);if(!d.ok)return{valid:!1,error:"Invalid session cookie"};let e=await d.json().catch(()=>null),f=!!(e&&e.user);return{valid:f,error:f?null:"Session expired — re-paste cookie"}}default:return{valid:!1,error:"Provider test not supported"}}}catch(a){return{valid:!1,error:a.message}}}async function s(a){let b,c=await (0,d.Mc)(a);if(!c)return{valid:!1,error:"Connection not found",latencyMs:0,testedAt:new Date().toISOString()};let g=await (0,e.B)(c.providerSpecificData||{});if(g.connectionProxyEnabled&&g.connectionProxyUrl&&!g.vercelRelayUrl){let b=await (0,f.C)({proxyUrl:g.connectionProxyUrl});if(!b.ok){let c=b.error||`Proxy test failed with status ${b.status}`;return await (0,d.updateProviderConnection)(a,{testStatus:"error",lastError:c,lastErrorAt:new Date().toISOString()}),{valid:!1,error:c,latencyMs:0,testedAt:new Date().toISOString()}}}let h=Date.now();b="apikey"===c.authType||"cookie"===c.authType?await r(c,g):await p(c,g);let i=Date.now()-h,j={testStatus:b.valid?"active":"error",lastError:b.valid?null:b.error,lastErrorAt:b.valid?null:new Date().toISOString()};return b.refreshed&&b.newTokens&&(j.accessToken=b.newTokens.accessToken,b.newTokens.refreshToken&&(j.refreshToken=b.newTokens.refreshToken),b.newTokens.expiresIn&&(j.expiresAt=new Date(Date.now()+1e3*b.newTokens.expiresIn).toISOString())),await (0,d.updateProviderConnection)(a,j),{valid:b.valid,error:b.error,latencyMs:i,testedAt:new Date().toISOString()}}},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)},74926:(a,b,c)=>{c.d(b,{C:()=>f});var d=c(47774);function e(a){return null==a?"":String(a).trim()}async function f({proxyUrl:a,testUrl:b,timeoutMs:c}={}){let g,h=e(a);if(!h)return{ok:!1,status:400,error:"proxyUrl is required"};let i=e(b)||"https://google.com/",j=Number(c),k=Number.isFinite(j)&&j>0?Math.min(j,3e4):8e3;try{try{g=new d.ProxyAgent({uri:h})}catch(a){return{ok:!1,status:400,error:`Invalid proxy URL: ${a?.message||String(a)}`}}let a=new AbortController,b=Date.now(),c=setTimeout(()=>a.abort(),k);try{let c=await (0,d.hd)(i,{method:"HEAD",dispatcher:g,signal:a.signal,headers:{"User-Agent":"Bluerouter"}});return{ok:c.ok,status:c.status,statusText:c.statusText,url:i,elapsedMs:Date.now()-b}}catch(b){let a=b?.name==="AbortError"?"Proxy test timed out":function(a){if(!a)return"Unknown error";let b=a?.message||String(a),c=a?.cause?.code||a?.code,d=a?.cause?.message;return d&&d!==b?c?`${b}: ${d} (${c})`:`${b}: ${d}`:c&&!b.includes(c)?`${b} (${c})`:b}(b);return{ok:!1,status:500,error:a}}finally{clearTimeout(c)}}finally{try{await g?.close?.()}catch{}}}},92990:(a,b,c)=>{c.d(b,{DI:()=>g,Hp:()=>i,LT:()=>h,MZ:()=>r,Nl:()=>u,Nu:()=>n,OV:()=>f,Tx:()=>o,WN:()=>p,Ww:()=>v,YT:()=>l,ZL:()=>k,cD:()=>m,f7:()=>t,hF:()=>j,lB:()=>s,t:()=>q});var d=c(21820);function e(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let f={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"},g={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"}},h={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"]},i={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"},j={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"},k={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"}},l={clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/cclog","https://www.googleapis.com/auth/experimentsandconfigs"],apiEndpoint:"https://cloudcode-pa.googleapis.com",apiVersion:"v1internal",loadCodeAssistEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUserEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser",loadCodeAssistUserAgent:"google-api-nodejs-client/9.15.1",loadCodeAssistApiClient:"google-cloud-sdk vscode_cloudshelleditor/0.1",loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:e(),pluginType:2})};function m(){return{ideType:9,platform:e(),pluginType:2}}let n={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"},o={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"]},p={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"}},q={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"},r={apiBaseUrl:"https://api.kilo.ai",initiateUrl:"https://api.kilo.ai/api/device-auth/codes",pollUrlBase:"https://api.kilo.ai/api/device-auth/codes"},s={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"},t={defaultBaseUrl:"https://gitlab.com",authorizeUrlPath:"/oauth/authorize",tokenUrlPath:"/oauth/token",userInfoUrlPath:"/api/v4/user",scope:"api read_user",codeChallengeMethod:"S256"},u={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},v=3e5},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};
@@ -6,48 +6,4 @@ PRAGMA mmap_size = 30000000;
6
6
  PRAGMA cache_size = -64000;
7
7
  PRAGMA foreign_keys = ON;
8
8
  PRAGMA busy_timeout = 5000;
9
- `,e={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",adminDisabled:"INTEGER DEFAULT 0",allowedModels:"TEXT DEFAULT '[]'",ownerUser:"TEXT DEFAULT ''",createdByUser:"TEXT DEFAULT ''",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)","CREATE INDEX IF NOT EXISTS idx_ak_owner ON apiKeys(ownerUser)","CREATE INDEX IF NOT EXISTS idx_ak_created_by ON apiKeys(createdByUser)","CREATE INDEX IF NOT EXISTS idx_ak_admin_disabled ON apiKeys(adminDisabled)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",apiKeyId:"TEXT",apiKeyFingerprint:"TEXT",apiKeyName:"TEXT",apiKeyOwner:"TEXT",endpoint:"TEXT",requestId:"TEXT",sessionId:"TEXT",clientIp:"TEXT",clientIpNormalized:"TEXT",clientHost:"TEXT",clientUserAgent:"TEXT",sourceTool:"TEXT",sourceToolLabel:"TEXT",sourceHost:"TEXT",latencyMs:"INTEGER DEFAULT 0",ttftMs:"INTEGER DEFAULT 0",statusCode:"INTEGER",errorCode:"TEXT",errorType:"TEXT",errorMessageShort:"TEXT",isStreaming:"INTEGER DEFAULT 0",isCombo:"INTEGER DEFAULT 0",comboName:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_ts_status ON usageHistory(timestamp DESC, status)","CREATE INDEX IF NOT EXISTS idx_uh_ts_provider ON usageHistory(timestamp DESC, provider)","CREATE INDEX IF NOT EXISTS idx_uh_ts_model ON usageHistory(timestamp DESC, model)","CREATE INDEX IF NOT EXISTS idx_uh_ts_conn ON usageHistory(timestamp DESC, connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_ts_endpoint ON usageHistory(timestamp DESC, endpoint)","CREATE INDEX IF NOT EXISTS idx_uh_ts_apikey ON usageHistory(timestamp DESC, apiKey)","CREATE INDEX IF NOT EXISTS idx_uh_provider_model_ts ON usageHistory(provider, model, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_status_ts ON usageHistory(status, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_endpoint_ts ON usageHistory(endpoint, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_ts ON usageHistory(apiKey, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_conn_ts ON usageHistory(connectionId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_request_id ON usageHistory(requestId)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_id_ts ON usageHistory(apiKeyId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_fp_ts ON usageHistory(apiKeyFingerprint, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_ip_ts ON usageHistory(clientIpNormalized, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_tool_ts ON usageHistory(sourceTool, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_session_ts ON usageHistory(sessionId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_status_code_ts ON usageHistory(statusCode, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_error_type_ts ON usageHistory(errorType, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_latency_ts ON usageHistory(timestamp DESC, latencyMs)","CREATE INDEX IF NOT EXISTS idx_uh_combo_ts ON usageHistory(isCombo, comboName, timestamp DESC)"]},usageHourlyRollup:{columns:{bucket:"TEXT NOT NULL",dimension:"TEXT NOT NULL",key:"TEXT NOT NULL",requests:"INTEGER DEFAULT 0",success:"INTEGER DEFAULT 0",errors:"INTEGER DEFAULT 0",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",lastSeen:"TEXT"},primaryKey:"PRIMARY KEY (bucket, dimension, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_uhr_dim_bucket ON usageHourlyRollup(dimension, bucket DESC)","CREATE INDEX IF NOT EXISTS idx_uhr_bucket ON usageHourlyRollup(bucket DESC)"]},usageDailyRollup:{columns:{bucket:"TEXT NOT NULL",dimension:"TEXT NOT NULL",key:"TEXT NOT NULL",requests:"INTEGER DEFAULT 0",success:"INTEGER DEFAULT 0",errors:"INTEGER DEFAULT 0",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",lastSeen:"TEXT"},primaryKey:"PRIMARY KEY (bucket, dimension, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_udr_dim_bucket ON usageDailyRollup(dimension, bucket DESC)","CREATE INDEX IF NOT EXISTS idx_udr_bucket ON usageDailyRollup(bucket DESC)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function f(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}},87324:(a,b,c)=>{c.d(b,{runMigrationOnce:()=>C});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(7841),i=c(76040);let j=["CREATE INDEX IF NOT EXISTS idx_uh_ts_status ON usageHistory(timestamp DESC, status)","CREATE INDEX IF NOT EXISTS idx_uh_ts_provider ON usageHistory(timestamp DESC, provider)","CREATE INDEX IF NOT EXISTS idx_uh_ts_model ON usageHistory(timestamp DESC, model)","CREATE INDEX IF NOT EXISTS idx_uh_ts_conn ON usageHistory(timestamp DESC, connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_ts_endpoint ON usageHistory(timestamp DESC, endpoint)","CREATE INDEX IF NOT EXISTS idx_uh_ts_apikey ON usageHistory(timestamp DESC, apiKey)","CREATE INDEX IF NOT EXISTS idx_uh_provider_model_ts ON usageHistory(provider, model, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_status_ts ON usageHistory(status, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_endpoint_ts ON usageHistory(endpoint, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_ts ON usageHistory(apiKey, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_conn_ts ON usageHistory(connectionId, timestamp DESC)"],k={apiKeyId:"TEXT",apiKeyFingerprint:"TEXT",apiKeyName:"TEXT",apiKeyOwner:"TEXT",requestId:"TEXT",sessionId:"TEXT",clientIp:"TEXT",clientIpNormalized:"TEXT",clientHost:"TEXT",clientUserAgent:"TEXT",sourceTool:"TEXT",sourceToolLabel:"TEXT",sourceHost:"TEXT",latencyMs:"INTEGER DEFAULT 0",ttftMs:"INTEGER DEFAULT 0",statusCode:"INTEGER",errorCode:"TEXT",errorType:"TEXT",errorMessageShort:"TEXT",isStreaming:"INTEGER DEFAULT 0",isCombo:"INTEGER DEFAULT 0",comboName:"TEXT",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0"},l=["CREATE INDEX IF NOT EXISTS idx_uh_request_id ON usageHistory(requestId)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_id_ts ON usageHistory(apiKeyId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_fp_ts ON usageHistory(apiKeyFingerprint, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_ip_ts ON usageHistory(clientIpNormalized, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_tool_ts ON usageHistory(sourceTool, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_session_ts ON usageHistory(sessionId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_status_code_ts ON usageHistory(statusCode, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_error_type_ts ON usageHistory(errorType, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_latency_ts ON usageHistory(timestamp DESC, latencyMs)","CREATE INDEX IF NOT EXISTS idx_uh_combo_ts ON usageHistory(isCombo, comboName, timestamp DESC)"],m=[`CREATE TABLE IF NOT EXISTS usageHourlyRollup(
10
- bucket TEXT NOT NULL,
11
- dimension TEXT NOT NULL,
12
- key TEXT NOT NULL,
13
- requests INTEGER DEFAULT 0,
14
- success INTEGER DEFAULT 0,
15
- errors INTEGER DEFAULT 0,
16
- promptTokens INTEGER DEFAULT 0,
17
- completionTokens INTEGER DEFAULT 0,
18
- totalTokens INTEGER DEFAULT 0,
19
- cachedTokens INTEGER DEFAULT 0,
20
- reasoningTokens INTEGER DEFAULT 0,
21
- cost REAL DEFAULT 0,
22
- lastSeen TEXT,
23
- PRIMARY KEY (bucket, dimension, key)
24
- )`,`CREATE TABLE IF NOT EXISTS usageDailyRollup(
25
- bucket TEXT NOT NULL,
26
- dimension TEXT NOT NULL,
27
- key TEXT NOT NULL,
28
- requests INTEGER DEFAULT 0,
29
- success INTEGER DEFAULT 0,
30
- errors INTEGER DEFAULT 0,
31
- promptTokens INTEGER DEFAULT 0,
32
- completionTokens INTEGER DEFAULT 0,
33
- totalTokens INTEGER DEFAULT 0,
34
- cachedTokens INTEGER DEFAULT 0,
35
- reasoningTokens INTEGER DEFAULT 0,
36
- cost REAL DEFAULT 0,
37
- lastSeen TEXT,
38
- PRIMARY KEY (bucket, dimension, key)
39
- )`,"CREATE INDEX IF NOT EXISTS idx_uhr_dim_bucket ON usageHourlyRollup(dimension, bucket DESC)","CREATE INDEX IF NOT EXISTS idx_uhr_bucket ON usageHourlyRollup(bucket DESC)","CREATE INDEX IF NOT EXISTS idx_udr_dim_bucket ON usageDailyRollup(dimension, bucket DESC)","CREATE INDEX IF NOT EXISTS idx_udr_bucket ON usageDailyRollup(bucket DESC)"];function n(a,b,c){let d=function(a,b){try{return new Set((a.all(`PRAGMA table_info(${b})`)||[]).map(a=>a.name))}catch{return new Set}}(a,b);for(let[e,f]of Object.entries(c))d.has(e)||a.exec(`ALTER TABLE ${b} ADD COLUMN ${e} ${f}`)}let o=[{version:1,name:"initial",up(a){for(let[b,c]of Object.entries(i.CG))for(let d of(a.exec((0,i.zE)(b,c)),c.indexes||[]))a.exec(d)}},{version:2,name:"usage-history-analytics-indexes",up(a){for(let b of j)a.exec(b)}},{version:3,name:"request-observability-rollups",up(a){for(let b of(n(a,"apiKeys",{ownerUser:"TEXT DEFAULT ''",createdByUser:"TEXT DEFAULT ''",allowedModels:"TEXT DEFAULT '[]'"}),n(a,"usageHistory",k),l))a.exec(b);for(let b of m)a.exec(b);a.exec("CREATE INDEX IF NOT EXISTS idx_ak_owner ON apiKeys(ownerUser)"),a.exec("CREATE INDEX IF NOT EXISTS idx_ak_created_by ON apiKeys(createdByUser)"),a.exec(`UPDATE usageHistory
40
- SET totalTokens = COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0)
41
- WHERE totalTokens IS NULL OR totalTokens = 0`),a.exec(`UPDATE usageHistory
42
- SET apiKeyId = COALESCE(NULLIF(apiKeyId, ''), (SELECT id FROM apiKeys WHERE apiKeys.key = usageHistory.apiKey LIMIT 1)),
43
- apiKeyName = COALESCE(NULLIF(apiKeyName, ''), (SELECT name FROM apiKeys WHERE apiKeys.key = usageHistory.apiKey LIMIT 1)),
44
- apiKeyOwner = COALESCE(NULLIF(apiKeyOwner, ''), (SELECT ownerUser FROM apiKeys WHERE apiKeys.key = usageHistory.apiKey LIMIT 1))
45
- WHERE apiKey IS NOT NULL AND apiKey <> ''`),a.exec(`UPDATE usageHistory
46
- SET apiKeyFingerprint = CASE
47
- WHEN apiKey IS NULL OR apiKey = '' THEN 'local-no-key'
48
- WHEN length(apiKey) <= 12 THEN apiKey
49
- ELSE substr(apiKey, 1, 8) || '...' || substr(apiKey, -4)
50
- END
51
- WHERE apiKeyFingerprint IS NULL OR apiKeyFingerprint = ''`),a.exec(`UPDATE usageHistory
52
- SET apiKey = apiKeyFingerprint
53
- WHERE apiKey IS NOT NULL AND apiKey <> '' AND apiKeyFingerprint IS NOT NULL AND apiKeyFingerprint <> ''`)}},{version:4,name:"api-key-admin-disabled",up(a){(function(a,b){try{return new Set((a.all(`PRAGMA table_info(${b})`)||[]).map(a=>a.name))}catch{return new Set}})(a,"apiKeys").has("adminDisabled")||a.exec("ALTER TABLE apiKeys ADD COLUMN adminDisabled INTEGER DEFAULT 0"),a.exec("CREATE INDEX IF NOT EXISTS idx_ak_admin_disabled ON apiKeys(adminDisabled)")}}].sort((a,b)=>a.version-b.version);function p(a,b,c=null){let d=a.get("SELECT value FROM _meta WHERE key = ?",[b]);return d?d.value:c}function q(a,b,c){a.run("INSERT INTO _meta(key, value) VALUES(?, ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[b,String(c)])}c(59339);let r=null;function s(){if(r)return r;try{let a=g().join(process.cwd(),"package.json");r=JSON.parse(e().readFileSync(a,"utf-8")).version||"0.0.0"}catch{r="0.0.0"}return r}function t(a){(0,h.Jh)();let b=s(),c=`${a}-${b}-${function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}${b(a.getMonth()+1)}${b(a.getDate())}-${b(a.getHours())}${b(a.getMinutes())}${b(a.getSeconds())}`}()}`,d=g().join(h.KQ,c);return e().mkdirSync(d,{recursive:!0}),d}function u(a,b,c=null){if(!e().existsSync(a))return null;let d=c||g().basename(a),f=g().join(b,d);return e().copyFileSync(a,f),f}function v(){if(e().existsSync(h.KQ))for(let a of e().readdirSync(h.KQ,{withFileTypes:!0}).filter(a=>a.isDirectory()).map(a=>({name:a.name,full:g().join(h.KQ,a.name),mtime:e().statSync(g().join(h.KQ,a.name)).mtimeMs})).sort((a,b)=>b.mtime-a.mtime).slice(5))try{e().rmSync(a.full,{recursive:!0,force:!0})}catch{}}var w=c(33323);let x=g().join(h.HG,".migrated-from-json"),y=new WeakSet;class z extends Error{constructor(a,b){super(a),this.name="MigrationAborted",this.droppedRows=b}}function A(a,b,c,d,e){let f=[];for(let a of c)try{d(a)}catch(b){f.push({...e(a),reason:b.message})}let g=a.get(`SELECT COUNT(*) as c FROM ${b}`)?.c??0;if(g!==c.length)throw console.warn(`[DB][migrate] ${b} row-count mismatch: expected ${c.length}, got ${g}. Dropped:`,f),new z(`${b} row-count mismatch: expected ${c.length}, got ${g}`,f)}function B(a){if(!e().existsSync(a))return null;try{return JSON.parse(e().readFileSync(a,"utf-8"))}catch{return null}}async function C(a){if(y.has(a))return;y.add(a);let b=function(a){try{let b=a.get("SELECT COUNT(*) as c FROM _meta");return!b||0===b.c}catch{return!0}}(a),c=function(a){a.exec((0,i.zE)("_meta",i.CG._meta));let b=parseInt(p(a,"schemaVersion","0"),10)||0;if(b>=(o.length?o[o.length-1].version:0))return{applied:0,from:b,to:b};let c=o.filter(a=>a.version>b),d=b;for(let b of c)a.transaction(()=>{b.up(a),q(a,"schemaVersion",b.version)}),d=b.version,console.log(`[DB][migrate] applied #${b.version} ${b.name}`);return{applied:c.length,from:b,to:d}}(a);for(let[b,c]of Object.entries(i.CG)){a.exec((0,i.zE)(b,c));let d=new Set(a.all(`PRAGMA table_info(${b})`).map(a=>a.name));for(let[e,f]of Object.entries(c.columns))if(!d.has(e)){let c=f.replace(/PRIMARY KEY( AUTOINCREMENT)?/i,"").replace(/UNIQUE/i,"").trim();try{a.exec(`ALTER TABLE ${b} ADD COLUMN ${e} ${c}`),console.log(`[DB][sync] +column ${b}.${e}`)}catch(a){console.warn(`[DB][sync] add column ${b}.${e} failed: ${a.message}`)}}for(let b of c.indexes||[])try{a.exec(b)}catch{}}let d=e().existsSync(x),f=B(h.Or.main),g=B(h.Or.usage),j=B(h.Or.disabled),k=B(h.Or.details);if(b&&(f||g||j||k)&&!d){let b=Date.now(),c=t("migrate-from-json");for(let a of Object.values(h.Or))u(a,c);try{a.transaction(()=>{if(f&&"object"==typeof f){for(let[b,c]of(f.settings&&a.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,w.s)(f.settings)]),A(a,"providerConnections",f.providerConnections||[],b=>{let{id:c,provider:d,authType:e,name:f,email:g,priority:h,isActive:i,createdAt:j,updatedAt:k,...l}=b;a.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[c,d,e||"oauth",f||null,g||null,h||null,+(!1!==i),(0,w.s)(l),j||new Date().toISOString(),k||new Date().toISOString()])},a=>({id:a.id??null,provider:a.provider??null,name:a.name??null})),A(a,"providerNodes",f.providerNodes||[],b=>{let{id:c,type:d,name:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,d||null,e||null,(0,w.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null,type:a.type??null,name:a.name??null})),A(a,"proxyPools",f.proxyPools||[],b=>{let{id:c,isActive:d,testStatus:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,+(!1!==d),e||"unknown",(0,w.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null})),A(a,"apiKeys",f.apiKeys||[],b=>{a.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.key,b.name||null,b.machineId||null,+(!1!==b.isActive),b.createdAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),A(a,"combos",f.combos||[],b=>{a.run("INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.name,b.kind||null,(0,w.s)(b.models||[]),b.createdAt||new Date().toISOString(),b.updatedAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),Object.entries(f.modelAliases||{})))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[b,(0,w.s)(c)]);for(let b of f.customModels||[]){let c=`${b.providerAlias}|${b.id}|${b.type||"llm"}`;a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[c,(0,w.s)(b)])}for(let[b,c]of Object.entries(f.mitmAlias||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[b,(0,w.s)(c||{})]);for(let[b,c]of Object.entries(f.pricing||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[b,(0,w.s)(c||{})])}if(g&&"object"==typeof g){for(let b of g.history||[]){let c=b.tokens||{};a.run("INSERT INTO usageHistory(timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, status, tokens, meta) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[b.timestamp||new Date().toISOString(),b.provider||null,b.model||null,b.connectionId||null,b.apiKey||null,b.endpoint||null,c.prompt_tokens||c.input_tokens||0,c.completion_tokens||c.output_tokens||0,b.cost||0,b.status||"ok",(0,w.s)(c),(0,w.s)({})])}for(let[b,c]of Object.entries(g.dailySummary||{}))a.run("INSERT OR REPLACE INTO usageDaily(dateKey, data) VALUES(?, ?)",[b,(0,w.s)(c)]);"number"==typeof g.totalRequestsLifetime&&q(a,"totalRequestsLifetime",g.totalRequestsLifetime)}if(j&&"object"==typeof j.disabled)for(let[b,c]of Object.entries(j.disabled))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('disabledModels', ?, ?)",[b,(0,w.s)(c||[])]);if(k&&Array.isArray(k.records))for(let b of k.records)a.run("INSERT OR REPLACE INTO requestDetails(id, timestamp, provider, model, connectionId, status, data) VALUES(?, ?, ?, ?, ?, ?, ?)",[b.id,b.timestamp||new Date().toISOString(),b.provider||null,b.model||null,b.connectionId||null,b.status||null,(0,w.s)(b)]);q(a,"appVersion",s()),q(a,"migratedAt",new Date().toISOString())})}catch(a){if(a instanceof z)return void console.error(`[DB][migrate] aborted: ${a.message} | legacy JSON kept | backup: ${c}`);throw a}try{e().writeFileSync(x,new Date().toISOString())}catch{}v(),console.log(`[DB][migrate] JSON → SQLite in ${Date.now()-b}ms | legacy JSON kept at DATA_DIR | backup: ${c}`);return}if(b)return void q(a,"appVersion",s());let l=p(a,"appVersion",null),m=s();if(l&&l!==m){let b=t(`upgrade-${l}-to-${m}`);try{u(h.AL,b)}catch{}q(a,"appVersion",m),v(),console.log(`[DB][migrate] App ${l} → ${m} | schema ${c.from} → ${c.to} | backup: ${b}`)}else if(c.applied>0){let a=t(`schema-${c.from}-to-${c.to}`);try{u(h.AL,a)}catch{}v()}}}};
9
+ `,e={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",adminDisabled:"INTEGER DEFAULT 0",allowedModels:"TEXT DEFAULT '[]'",ownerUser:"TEXT DEFAULT ''",createdByUser:"TEXT DEFAULT ''",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)","CREATE INDEX IF NOT EXISTS idx_ak_owner ON apiKeys(ownerUser)","CREATE INDEX IF NOT EXISTS idx_ak_created_by ON apiKeys(createdByUser)","CREATE INDEX IF NOT EXISTS idx_ak_admin_disabled ON apiKeys(adminDisabled)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]}};function f(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}},87324:(a,b,c)=>{c.d(b,{runMigrationOnce:()=>x});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(7841),i=c(76040);let j=[{version:1,name:"initial",up(a){for(let[b,c]of Object.entries(i.CG))for(let d of(a.exec((0,i.zE)(b,c)),c.indexes||[]))a.exec(d)}},{version:2,name:"usage-history-analytics-indexes",up(){}},{version:3,name:"request-observability-rollups",up(a){var b="apiKeys";let c=function(a,b){try{return new Set((a.all(`PRAGMA table_info(${b})`)||[]).map(a=>a.name))}catch{return new Set}}(a,b);for(let[d,e]of Object.entries({ownerUser:"TEXT DEFAULT ''",createdByUser:"TEXT DEFAULT ''",allowedModels:"TEXT DEFAULT '[]'"}))c.has(d)||a.exec(`ALTER TABLE ${b} ADD COLUMN ${d} ${e}`);a.exec("CREATE INDEX IF NOT EXISTS idx_ak_owner ON apiKeys(ownerUser)"),a.exec("CREATE INDEX IF NOT EXISTS idx_ak_created_by ON apiKeys(createdByUser)")}},{version:4,name:"api-key-admin-disabled",up(a){(function(a,b){try{return new Set((a.all(`PRAGMA table_info(${b})`)||[]).map(a=>a.name))}catch{return new Set}})(a,"apiKeys").has("adminDisabled")||a.exec("ALTER TABLE apiKeys ADD COLUMN adminDisabled INTEGER DEFAULT 0"),a.exec("CREATE INDEX IF NOT EXISTS idx_ak_admin_disabled ON apiKeys(adminDisabled)")}}].sort((a,b)=>a.version-b.version);function k(a,b,c=null){let d=a.get("SELECT value FROM _meta WHERE key = ?",[b]);return d?d.value:c}function l(a,b,c){a.run("INSERT INTO _meta(key, value) VALUES(?, ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[b,String(c)])}c(59339);let m=null;function n(){if(m)return m;try{let a=g().join(process.cwd(),"package.json");m=JSON.parse(e().readFileSync(a,"utf-8")).version||"0.0.0"}catch{m="0.0.0"}return m}function o(a){(0,h.Jh)();let b=n(),c=`${a}-${b}-${function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}${b(a.getMonth()+1)}${b(a.getDate())}-${b(a.getHours())}${b(a.getMinutes())}${b(a.getSeconds())}`}()}`,d=g().join(h.KQ,c);return e().mkdirSync(d,{recursive:!0}),d}function p(a,b,c=null){if(!e().existsSync(a))return null;let d=c||g().basename(a),f=g().join(b,d);return e().copyFileSync(a,f),f}function q(){if(e().existsSync(h.KQ))for(let a of e().readdirSync(h.KQ,{withFileTypes:!0}).filter(a=>a.isDirectory()).map(a=>({name:a.name,full:g().join(h.KQ,a.name),mtime:e().statSync(g().join(h.KQ,a.name)).mtimeMs})).sort((a,b)=>b.mtime-a.mtime).slice(5))try{e().rmSync(a.full,{recursive:!0,force:!0})}catch{}}var r=c(33323);let s=g().join(h.HG,".migrated-from-json"),t=new WeakSet;class u extends Error{constructor(a,b){super(a),this.name="MigrationAborted",this.droppedRows=b}}function v(a,b,c,d,e){let f=[];for(let a of c)try{d(a)}catch(b){f.push({...e(a),reason:b.message})}let g=a.get(`SELECT COUNT(*) as c FROM ${b}`)?.c??0;if(g!==c.length)throw console.warn(`[DB][migrate] ${b} row-count mismatch: expected ${c.length}, got ${g}. Dropped:`,f),new u(`${b} row-count mismatch: expected ${c.length}, got ${g}`,f)}function w(a){if(!e().existsSync(a))return null;try{return JSON.parse(e().readFileSync(a,"utf-8"))}catch{return null}}async function x(a){if(t.has(a))return;t.add(a);let b=function(a){try{let b=a.get("SELECT COUNT(*) as c FROM _meta");return!b||0===b.c}catch{return!0}}(a),c=function(a){a.exec((0,i.zE)("_meta",i.CG._meta));let b=parseInt(k(a,"schemaVersion","0"),10)||0;if(b>=(j.length?j[j.length-1].version:0))return{applied:0,from:b,to:b};let c=j.filter(a=>a.version>b),d=b;for(let b of c)a.transaction(()=>{b.up(a),l(a,"schemaVersion",b.version)}),d=b.version,console.log(`[DB][migrate] applied #${b.version} ${b.name}`);return{applied:c.length,from:b,to:d}}(a);for(let[b,c]of Object.entries(i.CG)){a.exec((0,i.zE)(b,c));let d=new Set(a.all(`PRAGMA table_info(${b})`).map(a=>a.name));for(let[e,f]of Object.entries(c.columns))if(!d.has(e)){let c=f.replace(/PRIMARY KEY( AUTOINCREMENT)?/i,"").replace(/UNIQUE/i,"").trim();try{a.exec(`ALTER TABLE ${b} ADD COLUMN ${e} ${c}`),console.log(`[DB][sync] +column ${b}.${e}`)}catch(a){console.warn(`[DB][sync] add column ${b}.${e} failed: ${a.message}`)}}for(let b of c.indexes||[])try{a.exec(b)}catch{}}let d=e().existsSync(s),f=w(h.Or.main),g=w(h.Or.usage),m=w(h.Or.disabled),x=w(h.Or.details);if(b&&(f||g||m||x)&&!d){let b=Date.now(),c=o("migrate-from-json");for(let a of Object.values(h.Or))p(a,c);try{a.transaction(()=>{if(f&&"object"==typeof f){for(let[b,c]of(f.settings&&a.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,r.s)(f.settings)]),v(a,"providerConnections",f.providerConnections||[],b=>{let{id:c,provider:d,authType:e,name:f,email:g,priority:h,isActive:i,createdAt:j,updatedAt:k,...l}=b;a.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[c,d,e||"oauth",f||null,g||null,h||null,+(!1!==i),(0,r.s)(l),j||new Date().toISOString(),k||new Date().toISOString()])},a=>({id:a.id??null,provider:a.provider??null,name:a.name??null})),v(a,"providerNodes",f.providerNodes||[],b=>{let{id:c,type:d,name:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,d||null,e||null,(0,r.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null,type:a.type??null,name:a.name??null})),v(a,"proxyPools",f.proxyPools||[],b=>{let{id:c,isActive:d,testStatus:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,+(!1!==d),e||"unknown",(0,r.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null})),v(a,"apiKeys",f.apiKeys||[],b=>{a.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.key,b.name||null,b.machineId||null,+(!1!==b.isActive),b.createdAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),v(a,"combos",f.combos||[],b=>{a.run("INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.name,b.kind||null,(0,r.s)(b.models||[]),b.createdAt||new Date().toISOString(),b.updatedAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),Object.entries(f.modelAliases||{})))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[b,(0,r.s)(c)]);for(let b of f.customModels||[]){let c=`${b.providerAlias}|${b.id}|${b.type||"llm"}`;a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[c,(0,r.s)(b)])}for(let[b,c]of Object.entries(f.mitmAlias||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[b,(0,r.s)(c||{})]);for(let[b,c]of Object.entries(f.pricing||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[b,(0,r.s)(c||{})])}if(m&&"object"==typeof m.disabled)for(let[b,c]of Object.entries(m.disabled))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('disabledModels', ?, ?)",[b,(0,r.s)(c||[])]);l(a,"appVersion",n()),l(a,"migratedAt",new Date().toISOString())})}catch(a){if(a instanceof u)return void console.error(`[DB][migrate] aborted: ${a.message} | legacy JSON kept | backup: ${c}`);throw a}try{e().writeFileSync(s,new Date().toISOString())}catch{}q(),console.log(`[DB][migrate] JSON → SQLite in ${Date.now()-b}ms | legacy JSON kept at DATA_DIR | backup: ${c}`);return}if(b)return void l(a,"appVersion",n());let y=k(a,"appVersion",null),z=n();if(y&&y!==z){let b=o(`upgrade-${y}-to-${z}`);try{p(h.AL,b)}catch{}l(a,"appVersion",z),q(),console.log(`[DB][migrate] App ${y} → ${z} | schema ${c.from} → ${c.to} | backup: ${b}`)}else if(c.applied>0){let a=o(`schema-${c.from}-to-${c.to}`);try{p(h.AL,a)}catch{}q()}}}};
@@ -6,4 +6,4 @@ PRAGMA mmap_size = 30000000;
6
6
  PRAGMA cache_size = -64000;
7
7
  PRAGMA foreign_keys = ON;
8
8
  PRAGMA busy_timeout = 5000;
9
- `,e={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",adminDisabled:"INTEGER DEFAULT 0",allowedModels:"TEXT DEFAULT '[]'",ownerUser:"TEXT DEFAULT ''",createdByUser:"TEXT DEFAULT ''",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)","CREATE INDEX IF NOT EXISTS idx_ak_owner ON apiKeys(ownerUser)","CREATE INDEX IF NOT EXISTS idx_ak_created_by ON apiKeys(createdByUser)","CREATE INDEX IF NOT EXISTS idx_ak_admin_disabled ON apiKeys(adminDisabled)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",apiKeyId:"TEXT",apiKeyFingerprint:"TEXT",apiKeyName:"TEXT",apiKeyOwner:"TEXT",endpoint:"TEXT",requestId:"TEXT",sessionId:"TEXT",clientIp:"TEXT",clientIpNormalized:"TEXT",clientHost:"TEXT",clientUserAgent:"TEXT",sourceTool:"TEXT",sourceToolLabel:"TEXT",sourceHost:"TEXT",latencyMs:"INTEGER DEFAULT 0",ttftMs:"INTEGER DEFAULT 0",statusCode:"INTEGER",errorCode:"TEXT",errorType:"TEXT",errorMessageShort:"TEXT",isStreaming:"INTEGER DEFAULT 0",isCombo:"INTEGER DEFAULT 0",comboName:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_ts_status ON usageHistory(timestamp DESC, status)","CREATE INDEX IF NOT EXISTS idx_uh_ts_provider ON usageHistory(timestamp DESC, provider)","CREATE INDEX IF NOT EXISTS idx_uh_ts_model ON usageHistory(timestamp DESC, model)","CREATE INDEX IF NOT EXISTS idx_uh_ts_conn ON usageHistory(timestamp DESC, connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_ts_endpoint ON usageHistory(timestamp DESC, endpoint)","CREATE INDEX IF NOT EXISTS idx_uh_ts_apikey ON usageHistory(timestamp DESC, apiKey)","CREATE INDEX IF NOT EXISTS idx_uh_provider_model_ts ON usageHistory(provider, model, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_status_ts ON usageHistory(status, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_endpoint_ts ON usageHistory(endpoint, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_ts ON usageHistory(apiKey, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_conn_ts ON usageHistory(connectionId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_request_id ON usageHistory(requestId)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_id_ts ON usageHistory(apiKeyId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_fp_ts ON usageHistory(apiKeyFingerprint, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_ip_ts ON usageHistory(clientIpNormalized, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_tool_ts ON usageHistory(sourceTool, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_session_ts ON usageHistory(sessionId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_status_code_ts ON usageHistory(statusCode, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_error_type_ts ON usageHistory(errorType, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_latency_ts ON usageHistory(timestamp DESC, latencyMs)","CREATE INDEX IF NOT EXISTS idx_uh_combo_ts ON usageHistory(isCombo, comboName, timestamp DESC)"]},usageHourlyRollup:{columns:{bucket:"TEXT NOT NULL",dimension:"TEXT NOT NULL",key:"TEXT NOT NULL",requests:"INTEGER DEFAULT 0",success:"INTEGER DEFAULT 0",errors:"INTEGER DEFAULT 0",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",lastSeen:"TEXT"},primaryKey:"PRIMARY KEY (bucket, dimension, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_uhr_dim_bucket ON usageHourlyRollup(dimension, bucket DESC)","CREATE INDEX IF NOT EXISTS idx_uhr_bucket ON usageHourlyRollup(bucket DESC)"]},usageDailyRollup:{columns:{bucket:"TEXT NOT NULL",dimension:"TEXT NOT NULL",key:"TEXT NOT NULL",requests:"INTEGER DEFAULT 0",success:"INTEGER DEFAULT 0",errors:"INTEGER DEFAULT 0",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",lastSeen:"TEXT"},primaryKey:"PRIMARY KEY (bucket, dimension, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_udr_dim_bucket ON usageDailyRollup(dimension, bucket DESC)","CREATE INDEX IF NOT EXISTS idx_udr_bucket ON usageDailyRollup(bucket DESC)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function f(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}}};
9
+ `,e={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",adminDisabled:"INTEGER DEFAULT 0",allowedModels:"TEXT DEFAULT '[]'",ownerUser:"TEXT DEFAULT ''",createdByUser:"TEXT DEFAULT ''",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)","CREATE INDEX IF NOT EXISTS idx_ak_owner ON apiKeys(ownerUser)","CREATE INDEX IF NOT EXISTS idx_ak_created_by ON apiKeys(createdByUser)","CREATE INDEX IF NOT EXISTS idx_ak_admin_disabled ON apiKeys(adminDisabled)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]}};function f(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}}};
@@ -6,4 +6,4 @@ PRAGMA mmap_size = 30000000;
6
6
  PRAGMA cache_size = -64000;
7
7
  PRAGMA foreign_keys = ON;
8
8
  PRAGMA busy_timeout = 5000;
9
- `,e={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",adminDisabled:"INTEGER DEFAULT 0",allowedModels:"TEXT DEFAULT '[]'",ownerUser:"TEXT DEFAULT ''",createdByUser:"TEXT DEFAULT ''",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)","CREATE INDEX IF NOT EXISTS idx_ak_owner ON apiKeys(ownerUser)","CREATE INDEX IF NOT EXISTS idx_ak_created_by ON apiKeys(createdByUser)","CREATE INDEX IF NOT EXISTS idx_ak_admin_disabled ON apiKeys(adminDisabled)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",apiKeyId:"TEXT",apiKeyFingerprint:"TEXT",apiKeyName:"TEXT",apiKeyOwner:"TEXT",endpoint:"TEXT",requestId:"TEXT",sessionId:"TEXT",clientIp:"TEXT",clientIpNormalized:"TEXT",clientHost:"TEXT",clientUserAgent:"TEXT",sourceTool:"TEXT",sourceToolLabel:"TEXT",sourceHost:"TEXT",latencyMs:"INTEGER DEFAULT 0",ttftMs:"INTEGER DEFAULT 0",statusCode:"INTEGER",errorCode:"TEXT",errorType:"TEXT",errorMessageShort:"TEXT",isStreaming:"INTEGER DEFAULT 0",isCombo:"INTEGER DEFAULT 0",comboName:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_ts_status ON usageHistory(timestamp DESC, status)","CREATE INDEX IF NOT EXISTS idx_uh_ts_provider ON usageHistory(timestamp DESC, provider)","CREATE INDEX IF NOT EXISTS idx_uh_ts_model ON usageHistory(timestamp DESC, model)","CREATE INDEX IF NOT EXISTS idx_uh_ts_conn ON usageHistory(timestamp DESC, connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_ts_endpoint ON usageHistory(timestamp DESC, endpoint)","CREATE INDEX IF NOT EXISTS idx_uh_ts_apikey ON usageHistory(timestamp DESC, apiKey)","CREATE INDEX IF NOT EXISTS idx_uh_provider_model_ts ON usageHistory(provider, model, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_status_ts ON usageHistory(status, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_endpoint_ts ON usageHistory(endpoint, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_ts ON usageHistory(apiKey, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_conn_ts ON usageHistory(connectionId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_request_id ON usageHistory(requestId)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_id_ts ON usageHistory(apiKeyId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_fp_ts ON usageHistory(apiKeyFingerprint, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_ip_ts ON usageHistory(clientIpNormalized, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_tool_ts ON usageHistory(sourceTool, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_session_ts ON usageHistory(sessionId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_status_code_ts ON usageHistory(statusCode, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_error_type_ts ON usageHistory(errorType, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_latency_ts ON usageHistory(timestamp DESC, latencyMs)","CREATE INDEX IF NOT EXISTS idx_uh_combo_ts ON usageHistory(isCombo, comboName, timestamp DESC)"]},usageHourlyRollup:{columns:{bucket:"TEXT NOT NULL",dimension:"TEXT NOT NULL",key:"TEXT NOT NULL",requests:"INTEGER DEFAULT 0",success:"INTEGER DEFAULT 0",errors:"INTEGER DEFAULT 0",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",lastSeen:"TEXT"},primaryKey:"PRIMARY KEY (bucket, dimension, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_uhr_dim_bucket ON usageHourlyRollup(dimension, bucket DESC)","CREATE INDEX IF NOT EXISTS idx_uhr_bucket ON usageHourlyRollup(bucket DESC)"]},usageDailyRollup:{columns:{bucket:"TEXT NOT NULL",dimension:"TEXT NOT NULL",key:"TEXT NOT NULL",requests:"INTEGER DEFAULT 0",success:"INTEGER DEFAULT 0",errors:"INTEGER DEFAULT 0",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",lastSeen:"TEXT"},primaryKey:"PRIMARY KEY (bucket, dimension, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_udr_dim_bucket ON usageDailyRollup(dimension, bucket DESC)","CREATE INDEX IF NOT EXISTS idx_udr_bucket ON usageDailyRollup(bucket DESC)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function f(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}},38062:(a,b,c)=>{c.d(b,{createBunSqliteAdapter:()=>e});var d=c(34050);async function e(a){let{Database:b}=await Promise.resolve().then(c.t.bind(c,81787,23)),e=new b(a,{create:!0});e.exec(d.oG);let f=new Map;function g(a){let b=f.get(a);return b||(b=e.prepare(a),f.set(a,b)),b}let h=setInterval(()=>{try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},6e4);function i(){try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}try{f.clear()}catch{}try{e.close()}catch{}}"function"==typeof h.unref&&h.unref();let j=()=>i();return process.once("beforeExit",j),process.once("SIGINT",()=>{j(),process.exit(0)}),process.once("SIGTERM",()=>{j(),process.exit(0)}),{driver:"bun:sqlite",run(a,b=[]){let c=g(a).run(...b);return{changes:Number(c.changes??0),lastInsertRowid:Number(c.lastInsertRowid??0)}},get:(a,b=[])=>g(a).get(...b),all:(a,b=[])=>g(a).all(...b),exec:a=>e.exec(a),transaction:a=>e.transaction(a)(),checkpoint(){try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(h),i()},raw:e}}}};
9
+ `,e={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",adminDisabled:"INTEGER DEFAULT 0",allowedModels:"TEXT DEFAULT '[]'",ownerUser:"TEXT DEFAULT ''",createdByUser:"TEXT DEFAULT ''",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)","CREATE INDEX IF NOT EXISTS idx_ak_owner ON apiKeys(ownerUser)","CREATE INDEX IF NOT EXISTS idx_ak_created_by ON apiKeys(createdByUser)","CREATE INDEX IF NOT EXISTS idx_ak_admin_disabled ON apiKeys(adminDisabled)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]}};function f(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}},38062:(a,b,c)=>{c.d(b,{createBunSqliteAdapter:()=>e});var d=c(34050);async function e(a){let{Database:b}=await Promise.resolve().then(c.t.bind(c,81787,23)),e=new b(a,{create:!0});e.exec(d.oG);let f=new Map;function g(a){let b=f.get(a);return b||(b=e.prepare(a),f.set(a,b)),b}let h=setInterval(()=>{try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},6e4);function i(){try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}try{f.clear()}catch{}try{e.close()}catch{}}"function"==typeof h.unref&&h.unref();let j=()=>i();return process.once("beforeExit",j),process.once("SIGINT",()=>{j(),process.exit(0)}),process.once("SIGTERM",()=>{j(),process.exit(0)}),{driver:"bun:sqlite",run(a,b=[]){let c=g(a).run(...b);return{changes:Number(c.changes??0),lastInsertRowid:Number(c.lastInsertRowid??0)}},get:(a,b=[])=>g(a).get(...b),all:(a,b=[])=>g(a).all(...b),exec:a=>e.exec(a),transaction:a=>e.transaction(a)(),checkpoint(){try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(h),i()},raw:e}}}};
@@ -6,4 +6,4 @@ PRAGMA mmap_size = 30000000;
6
6
  PRAGMA cache_size = -64000;
7
7
  PRAGMA foreign_keys = ON;
8
8
  PRAGMA busy_timeout = 5000;
9
- `,e={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",adminDisabled:"INTEGER DEFAULT 0",allowedModels:"TEXT DEFAULT '[]'",ownerUser:"TEXT DEFAULT ''",createdByUser:"TEXT DEFAULT ''",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)","CREATE INDEX IF NOT EXISTS idx_ak_owner ON apiKeys(ownerUser)","CREATE INDEX IF NOT EXISTS idx_ak_created_by ON apiKeys(createdByUser)","CREATE INDEX IF NOT EXISTS idx_ak_admin_disabled ON apiKeys(adminDisabled)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",apiKeyId:"TEXT",apiKeyFingerprint:"TEXT",apiKeyName:"TEXT",apiKeyOwner:"TEXT",endpoint:"TEXT",requestId:"TEXT",sessionId:"TEXT",clientIp:"TEXT",clientIpNormalized:"TEXT",clientHost:"TEXT",clientUserAgent:"TEXT",sourceTool:"TEXT",sourceToolLabel:"TEXT",sourceHost:"TEXT",latencyMs:"INTEGER DEFAULT 0",ttftMs:"INTEGER DEFAULT 0",statusCode:"INTEGER",errorCode:"TEXT",errorType:"TEXT",errorMessageShort:"TEXT",isStreaming:"INTEGER DEFAULT 0",isCombo:"INTEGER DEFAULT 0",comboName:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_ts_status ON usageHistory(timestamp DESC, status)","CREATE INDEX IF NOT EXISTS idx_uh_ts_provider ON usageHistory(timestamp DESC, provider)","CREATE INDEX IF NOT EXISTS idx_uh_ts_model ON usageHistory(timestamp DESC, model)","CREATE INDEX IF NOT EXISTS idx_uh_ts_conn ON usageHistory(timestamp DESC, connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_ts_endpoint ON usageHistory(timestamp DESC, endpoint)","CREATE INDEX IF NOT EXISTS idx_uh_ts_apikey ON usageHistory(timestamp DESC, apiKey)","CREATE INDEX IF NOT EXISTS idx_uh_provider_model_ts ON usageHistory(provider, model, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_status_ts ON usageHistory(status, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_endpoint_ts ON usageHistory(endpoint, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_ts ON usageHistory(apiKey, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_conn_ts ON usageHistory(connectionId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_request_id ON usageHistory(requestId)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_id_ts ON usageHistory(apiKeyId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_fp_ts ON usageHistory(apiKeyFingerprint, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_ip_ts ON usageHistory(clientIpNormalized, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_tool_ts ON usageHistory(sourceTool, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_session_ts ON usageHistory(sessionId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_status_code_ts ON usageHistory(statusCode, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_error_type_ts ON usageHistory(errorType, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_latency_ts ON usageHistory(timestamp DESC, latencyMs)","CREATE INDEX IF NOT EXISTS idx_uh_combo_ts ON usageHistory(isCombo, comboName, timestamp DESC)"]},usageHourlyRollup:{columns:{bucket:"TEXT NOT NULL",dimension:"TEXT NOT NULL",key:"TEXT NOT NULL",requests:"INTEGER DEFAULT 0",success:"INTEGER DEFAULT 0",errors:"INTEGER DEFAULT 0",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",lastSeen:"TEXT"},primaryKey:"PRIMARY KEY (bucket, dimension, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_uhr_dim_bucket ON usageHourlyRollup(dimension, bucket DESC)","CREATE INDEX IF NOT EXISTS idx_uhr_bucket ON usageHourlyRollup(bucket DESC)"]},usageDailyRollup:{columns:{bucket:"TEXT NOT NULL",dimension:"TEXT NOT NULL",key:"TEXT NOT NULL",requests:"INTEGER DEFAULT 0",success:"INTEGER DEFAULT 0",errors:"INTEGER DEFAULT 0",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",lastSeen:"TEXT"},primaryKey:"PRIMARY KEY (bucket, dimension, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_udr_dim_bucket ON usageDailyRollup(dimension, bucket DESC)","CREATE INDEX IF NOT EXISTS idx_udr_bucket ON usageDailyRollup(bucket DESC)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function f(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}},88469:(a,b,c)=>{c.d(b,{createBetterSqliteAdapter:()=>g});var d=c(87550),e=c.n(d),f=c(34050);function g(a){let b=new(e())(a);b.exec(f.oG);let c=new Map;function d(a){let d=c.get(a);return d||(d=b.prepare(a),c.set(a,d)),d}let g=setInterval(()=>{try{b.pragma("wal_checkpoint(TRUNCATE)")}catch{}},6e4);function h(){try{b.pragma("wal_checkpoint(TRUNCATE)")}catch{}try{c.clear()}catch{}try{b.close()}catch{}}"function"==typeof g.unref&&g.unref();let i=()=>h();return process.once("beforeExit",i),process.once("SIGINT",()=>{i(),process.exit(0)}),process.once("SIGTERM",()=>{i(),process.exit(0)}),{driver:"better-sqlite3",run:(a,b=[])=>d(a).run(b),get:(a,b=[])=>d(a).get(b),all:(a,b=[])=>d(a).all(b),exec:a=>b.exec(a),transaction:a=>b.transaction(a)(),checkpoint(){try{b.pragma("wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(g),h()},raw:b}}}};
9
+ `,e={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",adminDisabled:"INTEGER DEFAULT 0",allowedModels:"TEXT DEFAULT '[]'",ownerUser:"TEXT DEFAULT ''",createdByUser:"TEXT DEFAULT ''",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)","CREATE INDEX IF NOT EXISTS idx_ak_owner ON apiKeys(ownerUser)","CREATE INDEX IF NOT EXISTS idx_ak_created_by ON apiKeys(createdByUser)","CREATE INDEX IF NOT EXISTS idx_ak_admin_disabled ON apiKeys(adminDisabled)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]}};function f(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}},88469:(a,b,c)=>{c.d(b,{createBetterSqliteAdapter:()=>g});var d=c(87550),e=c.n(d),f=c(34050);function g(a){let b=new(e())(a);b.exec(f.oG);let c=new Map;function d(a){let d=c.get(a);return d||(d=b.prepare(a),c.set(a,d)),d}let g=setInterval(()=>{try{b.pragma("wal_checkpoint(TRUNCATE)")}catch{}},6e4);function h(){try{b.pragma("wal_checkpoint(TRUNCATE)")}catch{}try{c.clear()}catch{}try{b.close()}catch{}}"function"==typeof g.unref&&g.unref();let i=()=>h();return process.once("beforeExit",i),process.once("SIGINT",()=>{i(),process.exit(0)}),process.once("SIGTERM",()=>{i(),process.exit(0)}),{driver:"better-sqlite3",run:(a,b=[])=>d(a).run(b),get:(a,b=[])=>d(a).get(b),all:(a,b=[])=>d(a).all(b),exec:a=>b.exec(a),transaction:a=>b.transaction(a)(),checkpoint(){try{b.pragma("wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(g),h()},raw:b}}}};
@@ -6,4 +6,4 @@ PRAGMA mmap_size = 30000000;
6
6
  PRAGMA cache_size = -64000;
7
7
  PRAGMA foreign_keys = ON;
8
8
  PRAGMA busy_timeout = 5000;
9
- `,e={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",adminDisabled:"INTEGER DEFAULT 0",allowedModels:"TEXT DEFAULT '[]'",ownerUser:"TEXT DEFAULT ''",createdByUser:"TEXT DEFAULT ''",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)","CREATE INDEX IF NOT EXISTS idx_ak_owner ON apiKeys(ownerUser)","CREATE INDEX IF NOT EXISTS idx_ak_created_by ON apiKeys(createdByUser)","CREATE INDEX IF NOT EXISTS idx_ak_admin_disabled ON apiKeys(adminDisabled)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",apiKeyId:"TEXT",apiKeyFingerprint:"TEXT",apiKeyName:"TEXT",apiKeyOwner:"TEXT",endpoint:"TEXT",requestId:"TEXT",sessionId:"TEXT",clientIp:"TEXT",clientIpNormalized:"TEXT",clientHost:"TEXT",clientUserAgent:"TEXT",sourceTool:"TEXT",sourceToolLabel:"TEXT",sourceHost:"TEXT",latencyMs:"INTEGER DEFAULT 0",ttftMs:"INTEGER DEFAULT 0",statusCode:"INTEGER",errorCode:"TEXT",errorType:"TEXT",errorMessageShort:"TEXT",isStreaming:"INTEGER DEFAULT 0",isCombo:"INTEGER DEFAULT 0",comboName:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_ts_status ON usageHistory(timestamp DESC, status)","CREATE INDEX IF NOT EXISTS idx_uh_ts_provider ON usageHistory(timestamp DESC, provider)","CREATE INDEX IF NOT EXISTS idx_uh_ts_model ON usageHistory(timestamp DESC, model)","CREATE INDEX IF NOT EXISTS idx_uh_ts_conn ON usageHistory(timestamp DESC, connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_ts_endpoint ON usageHistory(timestamp DESC, endpoint)","CREATE INDEX IF NOT EXISTS idx_uh_ts_apikey ON usageHistory(timestamp DESC, apiKey)","CREATE INDEX IF NOT EXISTS idx_uh_provider_model_ts ON usageHistory(provider, model, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_status_ts ON usageHistory(status, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_endpoint_ts ON usageHistory(endpoint, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_ts ON usageHistory(apiKey, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_conn_ts ON usageHistory(connectionId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_request_id ON usageHistory(requestId)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_id_ts ON usageHistory(apiKeyId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_fp_ts ON usageHistory(apiKeyFingerprint, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_ip_ts ON usageHistory(clientIpNormalized, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_tool_ts ON usageHistory(sourceTool, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_session_ts ON usageHistory(sessionId, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_status_code_ts ON usageHistory(statusCode, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_error_type_ts ON usageHistory(errorType, timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_latency_ts ON usageHistory(timestamp DESC, latencyMs)","CREATE INDEX IF NOT EXISTS idx_uh_combo_ts ON usageHistory(isCombo, comboName, timestamp DESC)"]},usageHourlyRollup:{columns:{bucket:"TEXT NOT NULL",dimension:"TEXT NOT NULL",key:"TEXT NOT NULL",requests:"INTEGER DEFAULT 0",success:"INTEGER DEFAULT 0",errors:"INTEGER DEFAULT 0",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",lastSeen:"TEXT"},primaryKey:"PRIMARY KEY (bucket, dimension, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_uhr_dim_bucket ON usageHourlyRollup(dimension, bucket DESC)","CREATE INDEX IF NOT EXISTS idx_uhr_bucket ON usageHourlyRollup(bucket DESC)"]},usageDailyRollup:{columns:{bucket:"TEXT NOT NULL",dimension:"TEXT NOT NULL",key:"TEXT NOT NULL",requests:"INTEGER DEFAULT 0",success:"INTEGER DEFAULT 0",errors:"INTEGER DEFAULT 0",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",totalTokens:"INTEGER DEFAULT 0",cachedTokens:"INTEGER DEFAULT 0",reasoningTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",lastSeen:"TEXT"},primaryKey:"PRIMARY KEY (bucket, dimension, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_udr_dim_bucket ON usageDailyRollup(dimension, bucket DESC)","CREATE INDEX IF NOT EXISTS idx_udr_bucket ON usageDailyRollup(bucket DESC)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function f(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}},88520:(a,b,c)=>{c.d(b,{createNodeSqliteAdapter:()=>e});var d=c(63775);async function e(a){let b=process.emit;process.emit=function(a,c,...d){return!("warning"===a&&c?.name==="ExperimentalWarning"&&/SQLite/i.test(c.message||""))&&b.call(process,a,c,...d)};let e=new(await Promise.resolve().then(c.t.bind(c,80099,23))).DatabaseSync(a);e.exec(d.oG);let f=new Map;function g(a){let b=f.get(a);return b||(b=e.prepare(a),f.set(a,b)),b}let h=setInterval(()=>{try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},6e4);function i(){try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}try{f.clear()}catch{}try{e.close()}catch{}}"function"==typeof h.unref&&h.unref();let j=()=>i();return process.once("beforeExit",j),process.once("SIGINT",()=>{j(),process.exit(0)}),process.once("SIGTERM",()=>{j(),process.exit(0)}),{driver:"node:sqlite",run(a,b=[]){let c=g(a).run(...b);return{changes:Number(c.changes??0),lastInsertRowid:Number(c.lastInsertRowid??0)}},get:(a,b=[])=>g(a).get(...b),all:(a,b=[])=>g(a).all(...b),exec:a=>e.exec(a),transaction(a){let b=`sp_${Math.random().toString(36).slice(2)}`;e.exec(`SAVEPOINT ${b}`);try{let c=a();return e.exec(`RELEASE ${b}`),c}catch(a){try{e.exec(`ROLLBACK TO ${b}`),e.exec(`RELEASE ${b}`)}catch{}throw a}},checkpoint(){try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(h),i()},raw:e}}}};
9
+ `,e={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",adminDisabled:"INTEGER DEFAULT 0",allowedModels:"TEXT DEFAULT '[]'",ownerUser:"TEXT DEFAULT ''",createdByUser:"TEXT DEFAULT ''",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)","CREATE INDEX IF NOT EXISTS idx_ak_owner ON apiKeys(ownerUser)","CREATE INDEX IF NOT EXISTS idx_ak_created_by ON apiKeys(createdByUser)","CREATE INDEX IF NOT EXISTS idx_ak_admin_disabled ON apiKeys(adminDisabled)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]}};function f(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}},88520:(a,b,c)=>{c.d(b,{createNodeSqliteAdapter:()=>e});var d=c(63775);async function e(a){let b=process.emit;process.emit=function(a,c,...d){return!("warning"===a&&c?.name==="ExperimentalWarning"&&/SQLite/i.test(c.message||""))&&b.call(process,a,c,...d)};let e=new(await Promise.resolve().then(c.t.bind(c,80099,23))).DatabaseSync(a);e.exec(d.oG);let f=new Map;function g(a){let b=f.get(a);return b||(b=e.prepare(a),f.set(a,b)),b}let h=setInterval(()=>{try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},6e4);function i(){try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}try{f.clear()}catch{}try{e.close()}catch{}}"function"==typeof h.unref&&h.unref();let j=()=>i();return process.once("beforeExit",j),process.once("SIGINT",()=>{j(),process.exit(0)}),process.once("SIGTERM",()=>{j(),process.exit(0)}),{driver:"node:sqlite",run(a,b=[]){let c=g(a).run(...b);return{changes:Number(c.changes??0),lastInsertRowid:Number(c.lastInsertRowid??0)}},get:(a,b=[])=>g(a).get(...b),all:(a,b=[])=>g(a).all(...b),exec:a=>e.exec(a),transaction(a){let b=`sp_${Math.random().toString(36).slice(2)}`;e.exec(`SAVEPOINT ${b}`);try{let c=a();return e.exec(`RELEASE ${b}`),c}catch(a){try{e.exec(`ROLLBACK TO ${b}`),e.exec(`RELEASE ${b}`)}catch{}throw a}},checkpoint(){try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(h),i()},raw:e}}}};
@@ -1 +1 @@
1
- globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/nUC1NH0H7SuyJGE-I1rvP/_buildManifest.js","static/nUC1NH0H7SuyJGE-I1rvP/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-a990cabb6976f421.js","static/chunks/4bd1b696-e356ca5ba0218e27.js","static/chunks/3794-e569667691edc8f7.js","static/chunks/main-app-0a27584eea53a4b0.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
1
+ globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/iOcCnF-oha4dR4oAXJ9EM/_buildManifest.js","static/iOcCnF-oha4dR4oAXJ9EM/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-a990cabb6976f421.js","static/chunks/4bd1b696-e356ca5ba0218e27.js","static/chunks/3794-e569667691edc8f7.js","static/chunks/main-app-0a27584eea53a4b0.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/7a3e1568f247f3d0.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/45266bc037984bd5.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-a990cabb6976f421.js"/><script src="/_next/static/chunks/4bd1b696-e356ca5ba0218e27.js" async=""></script><script src="/_next/static/chunks/3794-e569667691edc8f7.js" async=""></script><script src="/_next/static/chunks/main-app-0a27584eea53a4b0.js" async=""></script><script src="/_next/static/chunks/1a258343-bc0b514c079d8898.js" async=""></script><script src="/_next/static/chunks/2649-64ab34e3d24f7ee7.js" async=""></script><script src="/_next/static/chunks/1321-f3cc4cb82223ddbc.js" async=""></script><script src="/_next/static/chunks/5497-6c5a0c9232ccb4c6.js" async=""></script><script src="/_next/static/chunks/app/(dashboard)/layout-673571386bf76d48.js" async=""></script><script src="/_next/static/chunks/app/layout-39f1f36912db26e1.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="theme-color" content="#0a0a0a"/><title>AI Router Gateway - AI Infrastructure Management</title><meta name="description" content="One endpoint for all your AI providers. Manage keys, monitor usage, and scale effortlessly."/><link rel="manifest" href="/manifest.webmanifest"/><link rel="icon" href="/favicon.ico?d69b7278ea27dcf7" type="image/x-icon" sizes="32x32"/><link rel="icon" href="/favicon.svg"/><script>if(document.fonts&&document.fonts.ready){document.fonts.ready.then(function(){document.documentElement.classList.add('fonts-loaded')})}else{document.documentElement.classList.add('fonts-loaded')}</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_f367f3 font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-a990cabb6976f421.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[21110,[\"3862\",\"static/chunks/1a258343-bc0b514c079d8898.js\",\"2649\",\"static/chunks/2649-64ab34e3d24f7ee7.js\",\"1321\",\"static/chunks/1321-f3cc4cb82223ddbc.js\",\"5497\",\"static/chunks/5497-6c5a0c9232ccb4c6.js\",\"9305\",\"static/chunks/app/(dashboard)/layout-673571386bf76d48.js\"],\"ThemeProvider\"]\n3:I[94635,[\"1321\",\"static/chunks/1321-f3cc4cb82223ddbc.js\",\"7177\",\"static/chunks/app/layout-39f1f36912db26e1.js\"],\"RuntimeI18nProvider\"]\n4:I[57121,[],\"\"]\n5:I[74581,[],\"\"]\n6:I[90484,[],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[90484,[],\"ViewportBoundary\"]\nc:I[90484,[],\"MetadataBoundary\"]\ne:I[27123,[],\"default\",1]\n:HL[\"/_next/static/css/7a3e1568f247f3d0.css\",\"style\"]\n:HL[\"/_next/static/css/45266bc037984bd5.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7a3e1568f247f3d0.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/45266bc037984bd5.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"if(document.fonts\u0026\u0026document.fonts.ready){document.fonts.ready.then(function(){document.documentElement.classList.add('fonts-loaded')})}else{document.documentElement.classList.add('fonts-loaded')}\"}}]}],[\"$\",\"body\",null,{\"className\":\"__variable_f367f3 font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"nUC1NH0H7SuyJGE-I1rvP\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#0a0a0a\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[86869,[],\"IconMark\"]\n8:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"AI Router Gateway - AI Infrastructure Management\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"One endpoint for all your AI providers. Manage keys, monitor usage, and scale effortlessly.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?d69b7278ea27dcf7\",\"type\":\"image/x-icon\",\"sizes\":\"32x32\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.svg\"}],[\"$\",\"$L10\",\"5\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/7a3e1568f247f3d0.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/45266bc037984bd5.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-a990cabb6976f421.js"/><script src="/_next/static/chunks/4bd1b696-e356ca5ba0218e27.js" async=""></script><script src="/_next/static/chunks/3794-e569667691edc8f7.js" async=""></script><script src="/_next/static/chunks/main-app-0a27584eea53a4b0.js" async=""></script><script src="/_next/static/chunks/1a258343-bc0b514c079d8898.js" async=""></script><script src="/_next/static/chunks/2649-64ab34e3d24f7ee7.js" async=""></script><script src="/_next/static/chunks/1321-8c45bbbccb18c6e5.js" async=""></script><script src="/_next/static/chunks/5497-6c5a0c9232ccb4c6.js" async=""></script><script src="/_next/static/chunks/app/(dashboard)/layout-673571386bf76d48.js" async=""></script><script src="/_next/static/chunks/app/layout-39f1f36912db26e1.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="theme-color" content="#0a0a0a"/><title>AI Router Gateway - AI Infrastructure Management</title><meta name="description" content="One endpoint for all your AI providers. Manage keys, monitor usage, and scale effortlessly."/><link rel="manifest" href="/manifest.webmanifest"/><link rel="icon" href="/favicon.ico?d69b7278ea27dcf7" type="image/x-icon" sizes="32x32"/><link rel="icon" href="/favicon.svg"/><script>if(document.fonts&&document.fonts.ready){document.fonts.ready.then(function(){document.documentElement.classList.add('fonts-loaded')})}else{document.documentElement.classList.add('fonts-loaded')}</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_f367f3 font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-a990cabb6976f421.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[21110,[\"3862\",\"static/chunks/1a258343-bc0b514c079d8898.js\",\"2649\",\"static/chunks/2649-64ab34e3d24f7ee7.js\",\"1321\",\"static/chunks/1321-8c45bbbccb18c6e5.js\",\"5497\",\"static/chunks/5497-6c5a0c9232ccb4c6.js\",\"9305\",\"static/chunks/app/(dashboard)/layout-673571386bf76d48.js\"],\"ThemeProvider\"]\n3:I[94635,[\"1321\",\"static/chunks/1321-8c45bbbccb18c6e5.js\",\"7177\",\"static/chunks/app/layout-39f1f36912db26e1.js\"],\"RuntimeI18nProvider\"]\n4:I[57121,[],\"\"]\n5:I[74581,[],\"\"]\n6:I[90484,[],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[90484,[],\"ViewportBoundary\"]\nc:I[90484,[],\"MetadataBoundary\"]\ne:I[27123,[],\"default\",1]\n:HL[\"/_next/static/css/7a3e1568f247f3d0.css\",\"style\"]\n:HL[\"/_next/static/css/45266bc037984bd5.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7a3e1568f247f3d0.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/45266bc037984bd5.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"if(document.fonts\u0026\u0026document.fonts.ready){document.fonts.ready.then(function(){document.documentElement.classList.add('fonts-loaded')})}else{document.documentElement.classList.add('fonts-loaded')}\"}}]}],[\"$\",\"body\",null,{\"className\":\"__variable_f367f3 font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"iOcCnF-oha4dR4oAXJ9EM\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#0a0a0a\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[86869,[],\"IconMark\"]\n8:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"AI Router Gateway - AI Infrastructure Management\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"One endpoint for all your AI providers. Manage keys, monitor usage, and scale effortlessly.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?d69b7278ea27dcf7\",\"type\":\"image/x-icon\",\"sizes\":\"32x32\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon.svg\"}],[\"$\",\"$L10\",\"5\",{}]]\n"])</script></body></html>