@rabbi696/ezrouter 0.6.3 → 0.6.4

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 (1312) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +43 -31
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +72 -0
  5. package/app/.next-cli-build/routes-manifest.json +81 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js +2 -0
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -0
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -0
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js +2 -0
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -0
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -0
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js +2 -0
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -0
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -0
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  94. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  105. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  108. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  109. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  110. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  111. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  112. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  113. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  114. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  115. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +2 -2
  132. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +2 -2
  134. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/auth/status/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/changelog/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  142. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +2 -2
  154. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +2 -2
  156. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  162. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  166. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
  168. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  170. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  172. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  176. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  180. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/convoy/rules/route.js +2 -2
  198. package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  226. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js +1 -0
  228. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -0
  229. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route_client-reference-manifest.js +1 -0
  230. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js +1 -0
  231. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -0
  232. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route_client-reference-manifest.js +1 -0
  233. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js +1 -0
  234. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -0
  235. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route_client-reference-manifest.js +1 -0
  236. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js +1 -0
  237. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -0
  238. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route_client-reference-manifest.js +1 -0
  239. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js +1 -0
  240. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -0
  241. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route_client-reference-manifest.js +1 -0
  242. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js +4 -0
  243. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -0
  244. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route_client-reference-manifest.js +1 -0
  245. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js +5 -0
  246. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -0
  247. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route_client-reference-manifest.js +1 -0
  248. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js +1 -0
  249. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -0
  250. package/app/.next-cli-build/server/app/api/mcp-gateway/route_client-reference-manifest.js +1 -0
  251. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js +4 -0
  252. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js.nft.json +1 -0
  253. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route_client-reference-manifest.js +1 -0
  254. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/callback/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  287. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +19 -9
  343. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +16 -5
  345. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +16 -5
  349. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  351. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  353. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  355. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  357. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  359. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  361. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  363. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  365. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/routing-health/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +2 -2
  383. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  389. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js +3 -3
  419. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  433. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  463. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  473. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  475. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  476. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  477. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  478. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  479. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  480. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  481. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  482. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  483. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  484. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  485. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  486. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  487. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  488. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  489. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  490. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  491. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  493. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  494. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  495. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  496. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  497. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  498. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  499. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  500. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  501. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  502. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  503. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  504. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  505. package/app/.next-cli-build/server/app/callback.html +1 -1
  506. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  507. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  508. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  509. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  510. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  511. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  512. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  515. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  519. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  520. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  522. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  523. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  525. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  530. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  532. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  535. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  540. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  542. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  543. package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/convoy.rsc +6 -6
  545. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  549. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +6 -6
  550. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +4 -4
  552. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +2 -2
  553. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  555. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  556. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  557. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  559. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  560. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  561. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  562. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  563. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -0
  564. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.meta +18 -0
  565. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +27 -0
  566. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +9 -0
  567. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +5 -0
  568. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +6 -0
  569. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
  570. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -0
  571. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +27 -0
  572. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +6 -0
  573. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +8 -0
  574. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +4 -0
  575. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -0
  576. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.meta +18 -0
  577. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +27 -0
  578. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +9 -0
  579. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +5 -0
  580. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +6 -0
  581. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
  582. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -0
  583. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +27 -0
  584. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +6 -0
  585. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +8 -0
  586. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +4 -0
  587. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -0
  588. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.meta +17 -0
  589. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +27 -0
  590. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +9 -0
  591. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +6 -0
  592. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
  593. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -0
  594. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +27 -0
  595. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +6 -0
  596. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +8 -0
  597. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +4 -0
  598. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  599. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  600. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  601. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  602. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  603. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  604. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  605. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  606. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  607. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  608. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  609. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  610. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  611. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  612. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  613. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  614. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  615. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  616. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  618. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  619. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  620. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  621. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  622. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  623. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  624. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  625. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  626. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  628. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  629. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  630. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  631. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  632. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  633. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  634. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  635. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  636. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  637. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  638. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  639. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  640. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  641. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  642. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  643. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  644. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  645. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  646. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  647. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  648. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  649. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  650. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  651. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  652. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  653. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  654. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  655. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  656. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  657. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  658. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  659. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  660. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  661. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  662. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  663. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  664. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  665. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  666. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  667. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  668. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  669. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  670. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  671. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  672. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  673. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  674. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  675. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  676. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  677. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  678. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  679. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  680. package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
  681. package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +6 -6
  682. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
  683. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
  684. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  685. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  686. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +6 -6
  687. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
  688. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +4 -4
  689. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +2 -2
  690. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  691. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  692. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  693. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  694. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  695. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  696. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  697. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  698. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  699. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  700. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  701. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  702. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  703. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  704. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  705. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  706. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  707. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  708. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  709. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  710. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  711. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  712. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  713. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  714. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  715. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  716. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  717. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  718. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  719. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  720. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  721. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  722. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  723. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  724. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  725. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  726. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  727. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  728. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  729. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  730. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  731. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  732. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  733. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  734. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  735. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  736. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  737. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  738. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  739. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  740. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  741. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  742. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  743. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  744. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  745. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  746. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  747. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  748. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  749. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  750. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  751. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  752. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  753. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  754. package/app/.next-cli-build/server/app/index.html +1 -1
  755. package/app/.next-cli-build/server/app/index.rsc +4 -4
  756. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  757. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  758. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  759. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  760. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  761. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  762. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  763. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  764. package/app/.next-cli-build/server/app/landing.html +1 -1
  765. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  766. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  767. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  768. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  769. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  770. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  771. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  772. package/app/.next-cli-build/server/app/login/page.js +2 -2
  773. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  774. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  775. package/app/.next-cli-build/server/app/login.html +1 -1
  776. package/app/.next-cli-build/server/app/login.rsc +5 -5
  777. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  778. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  779. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  780. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  781. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  782. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  783. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  784. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  785. package/app/.next-cli-build/server/app/page.js +2 -2
  786. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  787. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  788. package/app/.next-cli-build/server/app-paths-manifest.json +43 -31
  789. package/app/.next-cli-build/server/chunks/1133.js +1 -1
  790. package/app/.next-cli-build/server/chunks/1482.js +2 -2
  791. package/app/.next-cli-build/server/chunks/1531.js +1 -1
  792. package/app/.next-cli-build/server/chunks/1847.js +1 -1
  793. package/app/.next-cli-build/server/chunks/2221.js +300 -0
  794. package/app/.next-cli-build/server/chunks/2670.js +1 -0
  795. package/app/.next-cli-build/server/chunks/2892.js +1 -1
  796. package/app/.next-cli-build/server/chunks/2898.js +2 -2
  797. package/app/.next-cli-build/server/chunks/3245.js +1 -0
  798. package/app/.next-cli-build/server/chunks/3311.js +9 -0
  799. package/app/.next-cli-build/server/chunks/3433.js +6 -6
  800. package/app/.next-cli-build/server/chunks/3547.js +1 -1
  801. package/app/.next-cli-build/server/chunks/3583.js +3 -0
  802. package/app/.next-cli-build/server/chunks/3593.js +2 -2
  803. package/app/.next-cli-build/server/chunks/369.js +28 -22
  804. package/app/.next-cli-build/server/chunks/3698.js +9 -0
  805. package/app/.next-cli-build/server/chunks/3854.js +1 -0
  806. package/app/.next-cli-build/server/chunks/3886.js +1 -1
  807. package/app/.next-cli-build/server/chunks/{9276.js → 3920.js} +1 -1
  808. package/app/.next-cli-build/server/chunks/3977.js +2 -0
  809. package/app/.next-cli-build/server/chunks/412.js +1 -1
  810. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  811. package/app/.next-cli-build/server/chunks/4485.js +1 -1
  812. package/app/.next-cli-build/server/chunks/4574.js +1 -1
  813. package/app/.next-cli-build/server/chunks/4739.js +2 -2
  814. package/app/.next-cli-build/server/chunks/4755.js +1 -0
  815. package/app/.next-cli-build/server/chunks/476.js +1 -1
  816. package/app/.next-cli-build/server/chunks/4780.js +2 -2
  817. package/app/.next-cli-build/server/chunks/4803.js +2 -2
  818. package/app/.next-cli-build/server/chunks/4807.js +1 -1
  819. package/app/.next-cli-build/server/chunks/4827.js +1 -0
  820. package/app/.next-cli-build/server/chunks/4878.js +1 -0
  821. package/app/.next-cli-build/server/chunks/4955.js +1 -0
  822. package/app/.next-cli-build/server/chunks/5011.js +1 -1
  823. package/app/.next-cli-build/server/chunks/507.js +2 -2
  824. package/app/.next-cli-build/server/chunks/5209.js +3 -0
  825. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  826. package/app/.next-cli-build/server/chunks/5364.js +1 -0
  827. package/app/.next-cli-build/server/chunks/5681.js +1 -0
  828. package/app/.next-cli-build/server/chunks/5822.js +1 -0
  829. package/app/.next-cli-build/server/chunks/5875.js +1 -1
  830. package/app/.next-cli-build/server/chunks/595.js +1 -1
  831. package/app/.next-cli-build/server/chunks/615.js +1 -1
  832. package/app/.next-cli-build/server/chunks/6252.js +2 -2
  833. package/app/.next-cli-build/server/chunks/6535.js +1 -1
  834. package/app/.next-cli-build/server/chunks/6790.js +1 -0
  835. package/app/.next-cli-build/server/chunks/6816.js +40 -0
  836. package/app/.next-cli-build/server/chunks/6892.js +1 -0
  837. package/app/.next-cli-build/server/chunks/6947.js +1 -1
  838. package/app/.next-cli-build/server/chunks/698.js +2 -2
  839. package/app/.next-cli-build/server/chunks/7239.js +2 -2
  840. package/app/.next-cli-build/server/chunks/7306.js +221 -0
  841. package/app/.next-cli-build/server/chunks/7321.js +1 -0
  842. package/app/.next-cli-build/server/chunks/7362.js +2 -2
  843. package/app/.next-cli-build/server/chunks/7603.js +1 -1
  844. package/app/.next-cli-build/server/chunks/7677.js +1 -0
  845. package/app/.next-cli-build/server/chunks/7775.js +1 -1
  846. package/app/.next-cli-build/server/chunks/7828.js +1 -1
  847. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  848. package/app/.next-cli-build/server/chunks/8062.js +2 -2
  849. package/app/.next-cli-build/server/chunks/8129.js +1 -1
  850. package/app/.next-cli-build/server/chunks/823.js +1 -0
  851. package/app/.next-cli-build/server/chunks/8243.js +4 -4
  852. package/app/.next-cli-build/server/chunks/8306.js +1 -0
  853. package/app/.next-cli-build/server/chunks/8459.js +1 -0
  854. package/app/.next-cli-build/server/chunks/8469.js +2 -2
  855. package/app/.next-cli-build/server/chunks/8520.js +2 -2
  856. package/app/.next-cli-build/server/chunks/8586.js +9 -0
  857. package/app/.next-cli-build/server/chunks/880.js +30 -0
  858. package/app/.next-cli-build/server/chunks/8946.js +1 -1
  859. package/app/.next-cli-build/server/chunks/8976.js +1 -1
  860. package/app/.next-cli-build/server/chunks/9217.js +1 -1
  861. package/app/.next-cli-build/server/chunks/9303.js +1 -1
  862. package/app/.next-cli-build/server/chunks/9485.js +1 -1
  863. package/app/.next-cli-build/server/chunks/{7054.js → 9637.js} +1 -1
  864. package/app/.next-cli-build/server/chunks/9718.js +1 -1
  865. package/app/.next-cli-build/server/functions-config-manifest.json +5 -0
  866. package/app/.next-cli-build/server/instrumentation.js +1 -1
  867. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  868. package/app/.next-cli-build/server/middleware.js +6 -6
  869. package/app/.next-cli-build/server/pages/404.html +1 -1
  870. package/app/.next-cli-build/server/pages/500.html +1 -1
  871. package/app/.next-cli-build/static/chunks/{1321-04a5de50abe02d2f.js → 1321-9fc4c75b11b42480.js} +1 -1
  872. package/app/.next-cli-build/static/chunks/{2595-2d703efb995163a7.js → 2595-96495a92ee7de154.js} +7 -7
  873. package/app/.next-cli-build/static/chunks/5497-f328c487bfcc0d0e.js +17 -0
  874. package/app/.next-cli-build/static/chunks/8105-b488efe0a830e2a7.js +1 -0
  875. package/app/.next-cli-build/static/chunks/9227-bb7d883d6cd67632.js +3 -0
  876. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-69c121887e473261.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mcp-gateway/error-8838c952fdd7eda6.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mcp-gateway/keys/page-f08a0a114048e6a2.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mcp-gateway/page-5d48568153ad3d87.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mcp-gateway/servers/page-64874ce3b8ea9143.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-85950757e9505005.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-c2fb956227849ef3.js +27 -0
  883. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-73fe7ee1ecd1bd52.js → page-e38b4f8ebf6a3d47.js} +1 -1
  884. package/app/.next-cli-build/static/chunks/app/_global-error/page-25eef5877853a92d.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-25eef5877853a92d.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-25eef5877853a92d.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-25eef5877853a92d.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-25eef5877853a92d.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-25eef5877853a92d.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-25eef5877853a92d.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-25eef5877853a92d.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-25eef5877853a92d.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-25eef5877853a92d.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-25eef5877853a92d.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-25eef5877853a92d.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/changelog/route-25eef5877853a92d.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/cli/providers/codex/route-25eef5877853a92d.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-25eef5877853a92d.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-25eef5877853a92d.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-25eef5877853a92d.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-25eef5877853a92d.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-25eef5877853a92d.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/models/route-25eef5877853a92d.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/readiness/route-25eef5877853a92d.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-25eef5877853a92d.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-25eef5877853a92d.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-25eef5877853a92d.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-25eef5877853a92d.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-25eef5877853a92d.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-25eef5877853a92d.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-25eef5877853a92d.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-25eef5877853a92d.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-25eef5877853a92d.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-25eef5877853a92d.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-25eef5877853a92d.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-25eef5877853a92d.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-25eef5877853a92d.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-25eef5877853a92d.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-25eef5877853a92d.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-25eef5877853a92d.js +1 -0
  921. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/test/route-25eef5877853a92d.js +1 -0
  922. package/app/.next-cli-build/static/chunks/app/api/combos/export/route-25eef5877853a92d.js +1 -0
  923. package/app/.next-cli-build/static/chunks/app/api/combos/import/route-25eef5877853a92d.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/api/combos/route-25eef5877853a92d.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/api/combos/test/route-25eef5877853a92d.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/api/convoy/rules/route-25eef5877853a92d.js +1 -0
  927. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-25eef5877853a92d.js +1 -0
  928. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-25eef5877853a92d.js +1 -0
  929. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-25eef5877853a92d.js +1 -0
  930. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-25eef5877853a92d.js +1 -0
  931. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-25eef5877853a92d.js +1 -0
  932. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-25eef5877853a92d.js +1 -0
  933. package/app/.next-cli-build/static/chunks/app/api/health/route-25eef5877853a92d.js +1 -0
  934. package/app/.next-cli-build/static/chunks/app/api/init/route-25eef5877853a92d.js +1 -0
  935. package/app/.next-cli-build/static/chunks/app/api/internal/codex-native/lease/[action]/route-25eef5877853a92d.js +1 -0
  936. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-25eef5877853a92d.js +1 -0
  937. package/app/.next-cli-build/static/chunks/app/api/keys/route-25eef5877853a92d.js +1 -0
  938. package/app/.next-cli-build/static/chunks/app/api/locale/route-25eef5877853a92d.js +1 -0
  939. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-25eef5877853a92d.js +1 -0
  940. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-25eef5877853a92d.js +1 -0
  941. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/route-25eef5877853a92d.js +1 -0
  942. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/test/route-25eef5877853a92d.js +1 -0
  943. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/route-25eef5877853a92d.js +1 -0
  944. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/[id]/route-25eef5877853a92d.js +1 -0
  945. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/route-25eef5877853a92d.js +1 -0
  946. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/message/route-25eef5877853a92d.js +1 -0
  947. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/oauth/[id]/[action]/route-25eef5877853a92d.js +1 -0
  948. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/route-25eef5877853a92d.js +1 -0
  949. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/sse/route-25eef5877853a92d.js +1 -0
  950. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-25eef5877853a92d.js +1 -0
  951. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-25eef5877853a92d.js +1 -0
  952. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-25eef5877853a92d.js +1 -0
  953. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-25eef5877853a92d.js +1 -0
  954. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-25eef5877853a92d.js +1 -0
  955. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-25eef5877853a92d.js +1 -0
  956. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-25eef5877853a92d.js +1 -0
  957. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-25eef5877853a92d.js +1 -0
  958. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-25eef5877853a92d.js +1 -0
  959. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-25eef5877853a92d.js +1 -0
  960. package/app/.next-cli-build/static/chunks/app/api/models/route-25eef5877853a92d.js +1 -0
  961. package/app/.next-cli-build/static/chunks/app/api/models/test/route-25eef5877853a92d.js +1 -0
  962. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-25eef5877853a92d.js +1 -0
  963. package/app/.next-cli-build/static/chunks/app/api/oauth/callback/route-25eef5877853a92d.js +1 -0
  964. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-25eef5877853a92d.js +1 -0
  965. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-25eef5877853a92d.js +1 -0
  966. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-25eef5877853a92d.js +1 -0
  967. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-25eef5877853a92d.js +1 -0
  968. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-25eef5877853a92d.js +1 -0
  969. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-25eef5877853a92d.js +1 -0
  970. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-25eef5877853a92d.js +1 -0
  971. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-25eef5877853a92d.js +1 -0
  972. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-25eef5877853a92d.js +1 -0
  973. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-25eef5877853a92d.js +1 -0
  974. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-25eef5877853a92d.js +1 -0
  975. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-25eef5877853a92d.js +1 -0
  976. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-25eef5877853a92d.js +1 -0
  977. package/app/.next-cli-build/static/chunks/app/api/pricing/route-25eef5877853a92d.js +1 -0
  978. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-25eef5877853a92d.js +1 -0
  979. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-25eef5877853a92d.js +1 -0
  980. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-25eef5877853a92d.js +1 -0
  981. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-25eef5877853a92d.js +1 -0
  982. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/refresh-profile/route-25eef5877853a92d.js +1 -0
  983. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-25eef5877853a92d.js +1 -0
  984. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-25eef5877853a92d.js +1 -0
  985. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-25eef5877853a92d.js +1 -0
  986. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-25eef5877853a92d.js +1 -0
  987. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-25eef5877853a92d.js +1 -0
  988. package/app/.next-cli-build/static/chunks/app/api/providers/route-25eef5877853a92d.js +1 -0
  989. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-25eef5877853a92d.js +1 -0
  990. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-25eef5877853a92d.js +1 -0
  991. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-25eef5877853a92d.js +1 -0
  992. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-25eef5877853a92d.js +1 -0
  993. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-25eef5877853a92d.js +1 -0
  994. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-25eef5877853a92d.js +1 -0
  995. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-25eef5877853a92d.js +1 -0
  996. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-25eef5877853a92d.js +1 -0
  997. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-25eef5877853a92d.js +1 -0
  998. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-25eef5877853a92d.js +1 -0
  999. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-25eef5877853a92d.js +1 -0
  1000. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-25eef5877853a92d.js +1 -0
  1001. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-25eef5877853a92d.js +1 -0
  1002. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-25eef5877853a92d.js +1 -0
  1003. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-25eef5877853a92d.js +1 -0
  1004. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-25eef5877853a92d.js +1 -0
  1005. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-25eef5877853a92d.js +1 -0
  1006. package/app/.next-cli-build/static/chunks/app/api/routing-health/route-25eef5877853a92d.js +1 -0
  1007. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-25eef5877853a92d.js +1 -0
  1008. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-25eef5877853a92d.js +1 -0
  1009. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-25eef5877853a92d.js +1 -0
  1010. package/app/.next-cli-build/static/chunks/app/api/settings/route-25eef5877853a92d.js +1 -0
  1011. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-25eef5877853a92d.js +1 -0
  1012. package/app/.next-cli-build/static/chunks/app/api/tags/route-25eef5877853a92d.js +1 -0
  1013. package/app/.next-cli-build/static/chunks/app/api/token-saver/stats/route-25eef5877853a92d.js +1 -0
  1014. package/app/.next-cli-build/static/chunks/app/api/token-saver/stream/route-25eef5877853a92d.js +1 -0
  1015. package/app/.next-cli-build/static/chunks/app/api/tool-disclosure/stats/route-25eef5877853a92d.js +1 -0
  1016. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-25eef5877853a92d.js +1 -0
  1017. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-25eef5877853a92d.js +1 -0
  1018. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-25eef5877853a92d.js +1 -0
  1019. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-25eef5877853a92d.js +1 -0
  1020. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-25eef5877853a92d.js +1 -0
  1021. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-25eef5877853a92d.js +1 -0
  1022. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-25eef5877853a92d.js +1 -0
  1023. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-25eef5877853a92d.js +1 -0
  1024. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-25eef5877853a92d.js +1 -0
  1025. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-25eef5877853a92d.js +1 -0
  1026. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-25eef5877853a92d.js +1 -0
  1027. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-25eef5877853a92d.js +1 -0
  1028. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-25eef5877853a92d.js +1 -0
  1029. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-25eef5877853a92d.js +1 -0
  1030. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-25eef5877853a92d.js +1 -0
  1031. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-25eef5877853a92d.js +1 -0
  1032. package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-25eef5877853a92d.js +1 -0
  1033. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-25eef5877853a92d.js +1 -0
  1034. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-25eef5877853a92d.js +1 -0
  1035. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-25eef5877853a92d.js +1 -0
  1036. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-25eef5877853a92d.js +1 -0
  1037. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-25eef5877853a92d.js +1 -0
  1038. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-25eef5877853a92d.js +1 -0
  1039. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-25eef5877853a92d.js +1 -0
  1040. package/app/.next-cli-build/static/chunks/app/api/v1/alpha/search/route-25eef5877853a92d.js +1 -0
  1041. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-25eef5877853a92d.js +1 -0
  1042. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-25eef5877853a92d.js +1 -0
  1043. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-25eef5877853a92d.js +1 -0
  1044. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-25eef5877853a92d.js +1 -0
  1045. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-25eef5877853a92d.js +1 -0
  1046. package/app/.next-cli-build/static/chunks/app/api/v1/codex/alpha/search/route-25eef5877853a92d.js +1 -0
  1047. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/edits/route-25eef5877853a92d.js +1 -0
  1048. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/generations/route-25eef5877853a92d.js +1 -0
  1049. package/app/.next-cli-build/static/chunks/app/api/v1/codex/memories/trace_summarize/route-25eef5877853a92d.js +1 -0
  1050. package/app/.next-cli-build/static/chunks/app/api/v1/codex/models/route-25eef5877853a92d.js +1 -0
  1051. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/compact/route-25eef5877853a92d.js +1 -0
  1052. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/route-25eef5877853a92d.js +1 -0
  1053. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-25eef5877853a92d.js +1 -0
  1054. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-25eef5877853a92d.js +1 -0
  1055. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-25eef5877853a92d.js +1 -0
  1056. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-25eef5877853a92d.js +1 -0
  1057. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-25eef5877853a92d.js +1 -0
  1058. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-25eef5877853a92d.js +1 -0
  1059. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-25eef5877853a92d.js +1 -0
  1060. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-25eef5877853a92d.js +1 -0
  1061. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-25eef5877853a92d.js +1 -0
  1062. package/app/.next-cli-build/static/chunks/app/api/v1/route-25eef5877853a92d.js +1 -0
  1063. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-25eef5877853a92d.js +1 -0
  1064. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-25eef5877853a92d.js +1 -0
  1065. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-25eef5877853a92d.js +1 -0
  1066. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-25eef5877853a92d.js +1 -0
  1067. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-25eef5877853a92d.js +1 -0
  1068. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-25eef5877853a92d.js +1 -0
  1069. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-25eef5877853a92d.js +1 -0
  1070. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-25eef5877853a92d.js +1 -0
  1071. package/app/.next-cli-build/static/chunks/app/api/version/route-25eef5877853a92d.js +1 -0
  1072. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-25eef5877853a92d.js +1 -0
  1073. package/app/.next-cli-build/static/chunks/app/api/version/update/route-25eef5877853a92d.js +1 -0
  1074. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-25eef5877853a92d.js +1 -0
  1075. package/app/.next-cli-build/static/chunks/app/page-25eef5877853a92d.js +1 -0
  1076. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-25eef5877853a92d.js +1 -0
  1077. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-25eef5877853a92d.js +1 -0
  1078. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-25eef5877853a92d.js +1 -0
  1079. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-25eef5877853a92d.js +1 -0
  1080. package/app/.next-cli-build/static/css/23be8b98c2bbb37d.css +1 -0
  1081. package/app/.next-cli-build/static/zcnLldFi31VdCGAeF10ex/_buildManifest.js +1 -0
  1082. package/app/CHANGELOG.md +12 -0
  1083. package/app/package.json +5 -3
  1084. package/app/public/CHANGELOG.md +12 -0
  1085. package/app/src/lib/mcp/gateway/aggregator.js +96 -0
  1086. package/app/src/lib/tokenizer.js +104 -0
  1087. package/app/src/lib/updater/updater.js +1 -1
  1088. package/app/src/mitm/server.js +1 -1
  1089. package/app/src/sse/services/backgroundTokenRefresh.js +28 -17
  1090. package/package.json +1 -1
  1091. package/src/cli/menus/providers.js +2 -1
  1092. package/app/.next-cli-build/server/chunks/1329.js +0 -1
  1093. package/app/.next-cli-build/server/chunks/1714.js +0 -1
  1094. package/app/.next-cli-build/server/chunks/2177.js +0 -1
  1095. package/app/.next-cli-build/server/chunks/2382.js +0 -1
  1096. package/app/.next-cli-build/server/chunks/2547.js +0 -30
  1097. package/app/.next-cli-build/server/chunks/290.js +0 -1
  1098. package/app/.next-cli-build/server/chunks/3647.js +0 -1
  1099. package/app/.next-cli-build/server/chunks/4562.js +0 -1
  1100. package/app/.next-cli-build/server/chunks/4611.js +0 -9
  1101. package/app/.next-cli-build/server/chunks/4704.js +0 -3
  1102. package/app/.next-cli-build/server/chunks/4928.js +0 -1
  1103. package/app/.next-cli-build/server/chunks/4999.js +0 -1
  1104. package/app/.next-cli-build/server/chunks/5083.js +0 -9
  1105. package/app/.next-cli-build/server/chunks/5129.js +0 -39
  1106. package/app/.next-cli-build/server/chunks/6112.js +0 -1
  1107. package/app/.next-cli-build/server/chunks/6436.js +0 -1
  1108. package/app/.next-cli-build/server/chunks/7413.js +0 -2
  1109. package/app/.next-cli-build/server/chunks/7438.js +0 -221
  1110. package/app/.next-cli-build/server/chunks/7467.js +0 -1
  1111. package/app/.next-cli-build/server/chunks/7734.js +0 -1
  1112. package/app/.next-cli-build/server/chunks/7785.js +0 -9
  1113. package/app/.next-cli-build/server/chunks/8326.js +0 -1
  1114. package/app/.next-cli-build/server/chunks/88.js +0 -1
  1115. package/app/.next-cli-build/server/chunks/8901.js +0 -300
  1116. package/app/.next-cli-build/server/chunks/9043.js +0 -1
  1117. package/app/.next-cli-build/static/GcwAw1-IZk3PMzf0bTeWl/_buildManifest.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/5497-675887789aaf2c43.js +0 -17
  1119. package/app/.next-cli-build/static/chunks/8105-e46089480e63b1a9.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/9227-8c6b5f001d34748c.js +0 -3
  1121. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-78c78a3108fbe60e.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-e996175d559e9e5a.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-f3d9a84f9e04119e.js +0 -27
  1124. package/app/.next-cli-build/static/chunks/app/_global-error/page-b71f397798104162.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-b71f397798104162.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-b71f397798104162.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-b71f397798104162.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-b71f397798104162.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-b71f397798104162.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-b71f397798104162.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-b71f397798104162.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-b71f397798104162.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-b71f397798104162.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-b71f397798104162.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-b71f397798104162.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/changelog/route-b71f397798104162.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/cli/providers/codex/route-b71f397798104162.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-b71f397798104162.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-b71f397798104162.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-b71f397798104162.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-b71f397798104162.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-b71f397798104162.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/models/route-b71f397798104162.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/readiness/route-b71f397798104162.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-b71f397798104162.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-b71f397798104162.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-b71f397798104162.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-b71f397798104162.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-b71f397798104162.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-b71f397798104162.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-b71f397798104162.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-b71f397798104162.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-b71f397798104162.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-b71f397798104162.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-b71f397798104162.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-b71f397798104162.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-b71f397798104162.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-b71f397798104162.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-b71f397798104162.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-b71f397798104162.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/test/route-b71f397798104162.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/combos/export/route-b71f397798104162.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/combos/import/route-b71f397798104162.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/combos/route-b71f397798104162.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/combos/test/route-b71f397798104162.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/convoy/rules/route-b71f397798104162.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-b71f397798104162.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-b71f397798104162.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-b71f397798104162.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-b71f397798104162.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-b71f397798104162.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-b71f397798104162.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/health/route-b71f397798104162.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/init/route-b71f397798104162.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/internal/codex-native/lease/[action]/route-b71f397798104162.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-b71f397798104162.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/keys/route-b71f397798104162.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/locale/route-b71f397798104162.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-b71f397798104162.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-b71f397798104162.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-b71f397798104162.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-b71f397798104162.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-b71f397798104162.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-b71f397798104162.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-b71f397798104162.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-b71f397798104162.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-b71f397798104162.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-b71f397798104162.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-b71f397798104162.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-b71f397798104162.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/models/route-b71f397798104162.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/models/test/route-b71f397798104162.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-b71f397798104162.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/oauth/callback/route-b71f397798104162.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-b71f397798104162.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-b71f397798104162.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-b71f397798104162.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-b71f397798104162.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-b71f397798104162.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-b71f397798104162.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-b71f397798104162.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-b71f397798104162.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-b71f397798104162.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-b71f397798104162.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-b71f397798104162.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-b71f397798104162.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-b71f397798104162.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/api/pricing/route-b71f397798104162.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-b71f397798104162.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-b71f397798104162.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-b71f397798104162.js +0 -1
  1212. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-b71f397798104162.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/refresh-profile/route-b71f397798104162.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-b71f397798104162.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-b71f397798104162.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-b71f397798104162.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-b71f397798104162.js +0 -1
  1218. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-b71f397798104162.js +0 -1
  1219. package/app/.next-cli-build/static/chunks/app/api/providers/route-b71f397798104162.js +0 -1
  1220. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-b71f397798104162.js +0 -1
  1221. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-b71f397798104162.js +0 -1
  1222. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-b71f397798104162.js +0 -1
  1223. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-b71f397798104162.js +0 -1
  1224. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-b71f397798104162.js +0 -1
  1225. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-b71f397798104162.js +0 -1
  1226. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-b71f397798104162.js +0 -1
  1227. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-b71f397798104162.js +0 -1
  1228. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-b71f397798104162.js +0 -1
  1229. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-b71f397798104162.js +0 -1
  1230. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-b71f397798104162.js +0 -1
  1231. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-b71f397798104162.js +0 -1
  1232. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-b71f397798104162.js +0 -1
  1233. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-b71f397798104162.js +0 -1
  1234. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-b71f397798104162.js +0 -1
  1235. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-b71f397798104162.js +0 -1
  1236. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-b71f397798104162.js +0 -1
  1237. package/app/.next-cli-build/static/chunks/app/api/routing-health/route-b71f397798104162.js +0 -1
  1238. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-b71f397798104162.js +0 -1
  1239. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-b71f397798104162.js +0 -1
  1240. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-b71f397798104162.js +0 -1
  1241. package/app/.next-cli-build/static/chunks/app/api/settings/route-b71f397798104162.js +0 -1
  1242. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-b71f397798104162.js +0 -1
  1243. package/app/.next-cli-build/static/chunks/app/api/tags/route-b71f397798104162.js +0 -1
  1244. package/app/.next-cli-build/static/chunks/app/api/token-saver/stats/route-b71f397798104162.js +0 -1
  1245. package/app/.next-cli-build/static/chunks/app/api/token-saver/stream/route-b71f397798104162.js +0 -1
  1246. package/app/.next-cli-build/static/chunks/app/api/tool-disclosure/stats/route-b71f397798104162.js +0 -1
  1247. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-b71f397798104162.js +0 -1
  1248. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-b71f397798104162.js +0 -1
  1249. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-b71f397798104162.js +0 -1
  1250. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-b71f397798104162.js +0 -1
  1251. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-b71f397798104162.js +0 -1
  1252. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-b71f397798104162.js +0 -1
  1253. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-b71f397798104162.js +0 -1
  1254. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-b71f397798104162.js +0 -1
  1255. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-b71f397798104162.js +0 -1
  1256. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-b71f397798104162.js +0 -1
  1257. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-b71f397798104162.js +0 -1
  1258. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-b71f397798104162.js +0 -1
  1259. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-b71f397798104162.js +0 -1
  1260. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-b71f397798104162.js +0 -1
  1261. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-b71f397798104162.js +0 -1
  1262. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-b71f397798104162.js +0 -1
  1263. package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-b71f397798104162.js +0 -1
  1264. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-b71f397798104162.js +0 -1
  1265. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-b71f397798104162.js +0 -1
  1266. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-b71f397798104162.js +0 -1
  1267. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-b71f397798104162.js +0 -1
  1268. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-b71f397798104162.js +0 -1
  1269. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-b71f397798104162.js +0 -1
  1270. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-b71f397798104162.js +0 -1
  1271. package/app/.next-cli-build/static/chunks/app/api/v1/alpha/search/route-b71f397798104162.js +0 -1
  1272. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-b71f397798104162.js +0 -1
  1273. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-b71f397798104162.js +0 -1
  1274. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-b71f397798104162.js +0 -1
  1275. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-b71f397798104162.js +0 -1
  1276. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-b71f397798104162.js +0 -1
  1277. package/app/.next-cli-build/static/chunks/app/api/v1/codex/alpha/search/route-b71f397798104162.js +0 -1
  1278. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/edits/route-b71f397798104162.js +0 -1
  1279. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/generations/route-b71f397798104162.js +0 -1
  1280. package/app/.next-cli-build/static/chunks/app/api/v1/codex/memories/trace_summarize/route-b71f397798104162.js +0 -1
  1281. package/app/.next-cli-build/static/chunks/app/api/v1/codex/models/route-b71f397798104162.js +0 -1
  1282. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/compact/route-b71f397798104162.js +0 -1
  1283. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/route-b71f397798104162.js +0 -1
  1284. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-b71f397798104162.js +0 -1
  1285. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-b71f397798104162.js +0 -1
  1286. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-b71f397798104162.js +0 -1
  1287. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-b71f397798104162.js +0 -1
  1288. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-b71f397798104162.js +0 -1
  1289. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-b71f397798104162.js +0 -1
  1290. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-b71f397798104162.js +0 -1
  1291. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-b71f397798104162.js +0 -1
  1292. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-b71f397798104162.js +0 -1
  1293. package/app/.next-cli-build/static/chunks/app/api/v1/route-b71f397798104162.js +0 -1
  1294. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-b71f397798104162.js +0 -1
  1295. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-b71f397798104162.js +0 -1
  1296. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-b71f397798104162.js +0 -1
  1297. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-b71f397798104162.js +0 -1
  1298. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-b71f397798104162.js +0 -1
  1299. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-b71f397798104162.js +0 -1
  1300. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-b71f397798104162.js +0 -1
  1301. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-b71f397798104162.js +0 -1
  1302. package/app/.next-cli-build/static/chunks/app/api/version/route-b71f397798104162.js +0 -1
  1303. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-b71f397798104162.js +0 -1
  1304. package/app/.next-cli-build/static/chunks/app/api/version/update/route-b71f397798104162.js +0 -1
  1305. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-b71f397798104162.js +0 -1
  1306. package/app/.next-cli-build/static/chunks/app/page-b71f397798104162.js +0 -1
  1307. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-b71f397798104162.js +0 -1
  1308. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-b71f397798104162.js +0 -1
  1309. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-b71f397798104162.js +0 -1
  1310. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-b71f397798104162.js +0 -1
  1311. package/app/.next-cli-build/static/css/abc246bcd6eb079c.css +0 -1
  1312. /package/app/.next-cli-build/static/{GcwAw1-IZk3PMzf0bTeWl → zcnLldFi31VdCGAeF10ex}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";exports.id=4928,exports.ids=[4928],exports.modules={6165:(a,b,c)=>{c.d(b,{Kr:()=>e,RU:()=>g,fo:()=>f,wi:()=>h});var d=c(40615);function e(a){if(!a)return!1;let b="oauth"===a.authType,c=("apikey"===a.authType||"api_key"===a.authType)&&d.jO.includes(a.provider);return b||c}function f(a){let b=a?.quotaPauseThresholds;return b&&"object"==typeof b?b:{}}function g(a){return null!==function(a){if(!e(a))return null;let b=f(a),c=a?.lastQuotaSnapshot?.windows;if(!c||!Array.isArray(c)||0===c.length)return null;let d=null;for(let a of c){if(!a||!0===a.unlimited)continue;let c=function(a){let b=Number(a);return!Number.isFinite(b)||b<=0||b>100?0:b}(b[a.key]);if(!c)continue;let e=Number(a.remainingPercentage);Number.isFinite(e)&&e<=c&&(null===d||e<Number(d.remainingPercentage))&&(d={key:a.key,remainingPercentage:e,threshold:c})}return d}(a)}function h(a,b){if(!b||"object"!=typeof b||b.message||b.error)return null;let c=b.quotas;if(!c||"object"!=typeof c)return null;let d=Array.isArray(c)?c:Object.entries(c);if(0===d.length)return null;let e=new Date().toISOString(),f=[];for(let a of d){let[b,c]=Array.isArray(a)?a:[a?.name,a];if(!c||"object"!=typeof c)continue;let d=function(a){var b;let c,d;return a&&"number"==typeof a.remainingPercentage&&Number.isFinite(a.remainingPercentage)?Math.max(0,Math.min(100,Math.round(a.remainingPercentage))):(b=a?.used,c=Number(a?.total),d=Number(b),!Number.isFinite(c)||c<=0?null:!Number.isFinite(d)||d<=0?100:d>=c?0:Math.max(0,Math.min(100,Math.round((c-d)/c*100))))}(c);if(null==d)continue;let e=null;if(c.resetAt){let a=new Date(c.resetAt).getTime();Number.isFinite(a)&&(e=new Date(a).toISOString())}f.push({key:String(b??c.name??"unknown"),remainingPercentage:d,resetAt:e,unlimited:!0===c.unlimited})}return 0===f.length?null:{windows:f,fetchedAt:e}}},9155:(a,b,c)=>{c.d(b,{EV:()=>d.EV,_M:()=>e});var d=c(18851);async function e(a,b=null,c=null){let d=a?.apiKey||a?.accessToken;return{...a,accessToken:d,apiKey:d}}},39326:(a,b,c)=>{c.d(b,{B:()=>h,p:()=>g});var d=c(71998);function e(a){return null==a?"":String(a).trim()}let f=new Map;function g(a,b,c){if(!a||0===a.length)return null;if(1===a.length)return a[0];if("round-robin"===b){let b=f.get(c)||{index:-1};return b.index=(b.index+1)%a.length,f.set(c,b),a[b.index]}return"random"===b?a[Math.floor(Math.random()*a.length)]:a[0]}async function h(a={}){try{let b=e(a?.proxyPoolId),c="__none__"===b?"":b,f=function(a={}){let b=a?.connectionProxyEnabled===!0,c=e(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:e(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=e(a?.proxyUrl),f=e(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type||"cloudflare"===a.type||"deno"===a.type)return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:f,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:f,strictProxy:!0===a.strictProxy}}}if(f.connectionProxyEnabled&&f.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...f};return{source:"none",proxyPoolId:c||null,proxyPool:null,...f}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},49485:(a,b,c)=>{c.d(b,{RO:()=>o,Tl:()=>m,Yt:()=>n,oH:()=>p});var d=c(89843),e=c(81358),f=c(88705);let g={usageUrl:(0,f.U)("codex").url,resetCreditsUrl:(0,f.U)("codex").resetCreditsUrl,resetCreditsConsumeUrl:(0,f.U)("codex").resetCreditsConsumeUrl};function h(a){if(!a)return null;let b=a instanceof Date?a:new Date("number"==typeof a&&a<1e12?1e3*a:a);return Number.isFinite(b.getTime())?b.toISOString():null}function i(a,b={},c={},d=null){let f={Authorization:`Bearer ${a}`,Accept:"application/json",originator:"codex_cli_rs",...c},g=(0,e.a)(b,d);return g&&(f["ChatGPT-Account-ID"]=g),f}function j(a){return!a||"object"!=typeof a||Array.isArray(a)?null:a.rate_limit&&"object"==typeof a.rate_limit?a.rate_limit:a}function k(a){let b=Math.max(0,Math.min(100,(0,f.IQ)(a?.used_percent??a?.percent_used,0)));return{used:b,total:100,remaining:Math.max(0,100-b),resetAt:(0,f.eZ)(a?.reset_at??a?.resets_at??a?.resetAt??null),unlimited:!1}}function l(a,b,c){let d=j(c);if(!d)return!1;let e=d.primary_window||d.primary||c.primary_window||c.primary,f=d.secondary_window||d.secondary||c.secondary_window||c.secondary,g=!1;return e&&(a[b?`${b}_session`:"session"]=k(e),g=!0),f&&(a[b?`${b}_weekly`:"weekly"]=k(f),g=!0),g}async function m(a,b={},c=null,h=null){var k,n,o;[b,c]=(k=b,!(n=c)&&(o=k)&&"object"==typeof o&&("connectionProxyEnabled"in o||"connectionProxyUrl"in o||"connectionNoProxy"in o||"vercelRelayUrl"in o||"strictProxy"in o)?(0,e.a)(k,h)?[k,k]:[{},k]:[k||{},n]);try{let e=await (0,d.proxyAwareFetch)(g.usageUrl,{method:"GET",headers:i(a,b,{},h)},c);if(!e.ok)return{message:`Codex connected. Usage API temporarily unavailable (${e.status}).`};let k=await e.json(),m=k.rate_limit||k.rate_limits||k.rate_limits_by_limit_id?.codex||{},n=function(a){if(a.code_review_rate_limit||a.review_rate_limit)return a.code_review_rate_limit||a.review_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b.code_review||b.codex_review||b.review||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return"code_review"===b||"codex_review"===b||"review"===b||b.includes("review")})||null}(k),o=function(a){if(a.spark_rate_limit||a.gpt_5_3_codex_spark_rate_limit)return a.spark_rate_limit||a.gpt_5_3_codex_spark_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b["gpt-5.3-codex-spark"]||b.gpt_5_3_codex_spark||b.spark||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return b.includes("spark")||b.includes("5.3-codex-spark")})||null}(k),p=Math.max(0,(0,f.IQ)(k.rate_limit_reset_credits?.available_count,0)),q={};return l(q,"",m),l(q,"review",n),l(q,"spark",o),{plan:k.plan_type||k.summary?.plan||"unknown",limitReached:j(m)?.limit_reached||!1,reviewLimitReached:j(n)?.limit_reached||!1,sparkLimitReached:j(o)?.limit_reached||!1,resetCredits:{availableCount:p},quotas:q}}catch(a){throw Error(`Failed to fetch Codex usage: ${a.message}`)}}async function n(a,b=null,c=null,e=null){if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");let j=i(a,c,{"OpenAI-Beta":"codex-1"},e),k=await (0,d.proxyAwareFetch)(g.resetCreditsUrl,{method:"GET",headers:j},b),l=null;try{l=await k.json()}catch{l=null}if(!k.ok)throw Error(l?.message||l?.error||l?.detail||`Codex reset credits API unavailable (${k.status}).`);let m=Array.isArray(l?.credits)?l.credits:[];return{availableCount:Math.max(0,(0,f.IQ)(l?.available_count??l?.availableCount,0)),credits:m.map(a=>({status:String(a?.status||"unknown"),grantedAt:h(a?.granted_at??a?.grantedAt),expiresAt:h(a?.expires_at??a?.expiresAt)}))}}async function o(a,b,c=null,h=null,j=null){let k;if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");if(!b||"string"!=typeof b)throw Error("A redeem request id is required to consume a Codex reset credit.");if(!(0,e.a)(h,j))throw Error("A ChatGPT account ID is required to consume a Codex reset credit. Please re-authorize the connection.");let l=null;try{k=await (0,d.proxyAwareFetch)(g.resetCreditsConsumeUrl,{method:"POST",headers:i(a,h,{"Content-Type":"application/json"},j),body:JSON.stringify({redeem_request_id:b})},c);let e=await k.text();l=e?JSON.parse(e):null}catch(a){throw Error(`Failed to consume Codex reset credit: ${a.message}`)}let m=l?.code||null,n=(0,f.IQ)(l?.windows_reset,0);return{ok:k.ok&&("reset"===m||n>0),noCredit:k.ok&&"no_credit"===m,status:k.status,code:m,windowsReset:n,message:l?.message||null,raw:l}}async function p(a,b=null,c=null,e=null){let g=new URL((0,f.U)("codex").modelsUrl||"https://chatgpt.com/backend-api/codex/models");(0,f.U)("codex").clientVersion&&g.searchParams.set("client_version",(0,f.U)("codex").clientVersion);let h=i(a,c,{},e),j=await (0,d.proxyAwareFetch)(g,{method:"GET",headers:h},b);if(!j.ok)return[];let k=await j.json();return(Array.isArray(k?.models)?k.models:[]).filter(a=>a?.supported_in_api!==!1&&"string"==typeof a?.slug&&a.slug).sort((a,b)=>Number(a.priority||0)-Number(b.priority||0))}},49934:(a,b,c)=>{c.d(b,{qJ:()=>n,w9:()=>u,xK:()=>f,zn:()=>r}),c(77598);var d=c(89843);let e="https://cloud.zed.dev",f={expiredToken:"x-zed-expired-token",outdatedToken:"x-zed-outdated-token",clientSupportsStatus:"x-zed-client-supports-status-messages",clientSupportsStreamEnded:"x-zed-client-supports-stream-ended-request-completion-status",serverSupportsStatus:"x-zed-server-supports-status-messages",clientSupportsXai:"x-zed-client-supports-x-ai",systemId:"x-zed-system-id"},g=new Map,h=new Map,i=new Map;function j(a,b,c,d){var e;let f=(e=a?.[b],String(e||d).replace(/\/+$/,""));return`${f}${c}`}function k(a){let b=(a?.providerSpecificData||{}).userId||a?.userId,c=a?.accessToken||a?.apiKey;if(!b||!c)throw Error("Zed credential is missing userId or accessToken");return`${b} ${c}`}function l(a){return String(a?.providerSpecificData?.systemId||a?.systemId||"")}async function m(a,b,c=null){let e=await (0,d.proxyAwareFetch)(a,b,c),f=await e.text(),g=null;if(f)try{g=JSON.parse(f)}catch{g={raw:f}}if(!e.ok){let a=Error(String(g?.message||g?.error?.message||g?.error||f||`HTTP ${e.status}`));throw a.status=e.status,a.body=g,a}return g}async function n(a,b={}){let c=b.config||{},d={Accept:"application/json",Authorization:k(a)},g=l(a);return g&&(d[f.systemId]=g),m(j(c,"cloudBaseUrl","/client/users/me",e),{method:"GET",headers:d,signal:b.signal??void 0},b.proxyOptions??null)}function o(a){if(!a)return"";if("string"==typeof a)return a;if("object"==typeof a&&null!==a){if("string"==typeof a[0])return a[0];if("string"==typeof a.id)return a.id}return String(a)}function p(a,b=null){let c=a?.providerSpecificData||{},d=o(c.organizationId||c.defaultOrganizationId);if(d)return d;let e=o(b?.default_organization_id||b?.defaultOrganizationId);if(e)return e;let f=b?.organizations||[],g=f.find(a=>a?.is_personal)||f[0];return o(g?.id)}async function q(a,b={}){var c;let d,h,i=b.config||{},o=b.organizationId||p(a);if(!o){let c=await n(a,b);o=p(a,c)}if(!o)throw Error("No Zed organization selected");let r=(c=o,d=(a?.providerSpecificData||{}).userId||a?.userId||"unknown",h=a?.accessToken||a?.apiKey||"",`${d}:${c||"default"}:${h.slice(-16)}`),s=g.get(r);if(!b.forceRefresh&&s&&s.expiresAt>Date.now())return s.token;let t={"Content-Type":"application/json",Accept:"application/json",Authorization:k(a)},u=l(a);u&&(t[f.systemId]=u);let v=await m(j(i,"cloudBaseUrl","/client/llm_tokens",e),{method:"POST",headers:t,body:JSON.stringify({organization_id:o}),signal:b.signal??void 0}),w="string"==typeof v?.token?v.token:v?.token?.[0]||v?.token?.value;if(!w)throw Error("Zed did not return an LLM token");return g.set(r,{token:w,expiresAt:Date.now()+3e6}),w}async function r(a,b,c={}){var e;let g=j(c.config||{},"llmBaseUrl",b,"https://cloud.zed.dev"),h=async b=>{let e=await q(a,{...c,forceRefresh:b});return(0,d.proxyAwareFetch)(g,{...c.fetchOptions,headers:{...c.fetchOptions?.headers||{},Authorization:`Bearer ${e}`},signal:c.signal??void 0})},i=await h(!1);return e=i,(e?.status===401||e?.headers?.has?.(f.expiredToken)||e?.headers?.has?.(f.outdatedToken))&&(i=await h(!0)),i}function s(a){if(!a)return"";if("string"==typeof a)return a;if("object"==typeof a&&null!==a){if("string"==typeof a[0])return a[0];if("string"==typeof a.id)return a.id}return String(a)}function t(a){let b=s(a?.id);return b?{id:b,name:a.display_name||a.displayName||b,provider:a.provider,isLatest:!!a.is_latest,contextLength:a.max_token_count??a.maxTokenCount,contextLengthInMaxMode:a.max_token_count_in_max_mode??a.maxTokenCountInMaxMode,maxOutputTokens:a.max_output_tokens??a.maxOutputTokens,supportsTools:!!a.supports_tools,supportsImages:!!a.supports_images,supportsThinking:!!a.supports_thinking,supportsDisablingThinking:!!a.supports_disabling_thinking,supportsFastMode:!!a.supports_fast_mode,supportsServerSideCompaction:!!a.supports_server_side_compaction,supportedEffortLevels:a.supported_effort_levels??a.supportedEffortLevels??[],supportsStreamingTools:!!a.supports_streaming_tools,supportsParallelToolCalls:!!a.supports_parallel_tool_calls,isDisabled:!!a.is_disabled,disabledReason:a.disabled_reason??null}:null}async function u(a,b={}){let c,d,e;if(!a?.accessToken)return null;let g=(d=(c=a?.providerSpecificData||{}).organizationId||c.defaultOrganizationId||"default",e=a?.accessToken||a?.apiKey||"",`${c.userId||"unknown"}:${d}:${e.slice(-16)}`),j=h.get(g);if(!b.forceRefresh&&j&&j.expiresAt>Date.now())return j;let k=i.get(g);if(k&&!b.forceRefresh)return k;let l=(async()=>{let c=await r(a,"/models",{...b,fetchOptions:{method:"GET",headers:{Accept:"application/json",[f.clientSupportsXai]:"true"}}});if(!c.ok){let a=await c.text().catch(()=>"");throw Error(`Zed models failed: ${c.status} ${a}`)}let d=await c.json(),e=Array.isArray(d?.models)?d.models:[],i=e.map(t).filter(Boolean).filter(a=>!a.isDisabled),j=new Map;for(let a of e){let b=s(a?.id);b&&j.set(b,a)}let k={expiresAt:Date.now()+36e5,models:i,rawModels:e,rawById:j,defaultModel:s(d?.default_model??d?.defaultModel),defaultFastModel:s(d?.default_fast_model??d?.defaultFastModel),recommendedModels:(d?.recommended_models||d?.recommendedModels||[]).map(s).filter(Boolean)};return h.set(g,k),k})();i.set(g,l);try{return await l}finally{i.get(g)===l&&i.delete(g)}}},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)},72251:(a,b,c)=>{c.d(b,{N:()=>h,c:()=>j});var d=c(28730),e=c(92675),f=c(88705);let g={...(0,f.U)("antigravity"),...e.XP,userAgent:e.Of};async function h(a,b,c=null){if(!a)return{plan:"Free",message:"Gemini CLI access token not available."};try{let d=(0,f.gD)(b?.projectId),e="Free";if(!d){let b=await i(a,c);d=(0,f.gD)(b?.cloudaicompanionProject),e=b?.currentTier?.name||e}if(!d)return{plan:e,message:"Gemini CLI project ID not available. Reconnect Gemini CLI, or configure a Google Cloud project with Gemini Code Assist access before checking quota."};let g=await (0,f.u9)((0,f.U)("gemini-cli").quotaUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({project:d})},1e4,c);if(!g.ok)return{plan:e,message:`Gemini CLI quota error (${g.status}).`};let h=await g.json(),j={};if(Array.isArray(h.buckets))for(let a of h.buckets){if(!a.modelId||null==a.remainingFraction)continue;let b=Number(a.remainingFraction)||0,c=Math.round(1e3*b),d=Math.max(0,1e3-c);j[a.modelId]={used:d,total:1e3,resetAt:(0,f.eZ)(a.resetTime),remainingPercentage:100*b,unlimited:!1}}return{plan:e,quotas:j}}catch(a){return{message:`Gemini CLI error: ${a.message}`}}}async function i(a,b=null){try{let c=await (0,f.u9)((0,f.U)("gemini-cli").loadCodeAssistUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:d.Cn})},1e4,b);if(!c.ok)return null;return await c.json()}catch{return null}}async function j(a,b,c=null){try{let d=await k(a,c),h=(0,f.gD)(b?.projectId)||(0,f.gD)(d?.cloudaicompanionProject),i={Authorization:`Bearer ${a}`,"User-Agent":g.userAgent,"Content-Type":"application/json","X-Client-Name":"antigravity","X-Client-Version":e.Tr},j=JSON.stringify({...h?{project:h}:{}}),l=await (0,f.u9)(g.quotaApiUrl,{method:"POST",headers:i,body:j},1e4,c);if(403===l.status)return{message:"Antigravity quota API access forbidden. Chat may still work.",quotas:{}};if(401===l.status)return{message:"Antigravity quota API authentication expired. Chat may still work.",quotas:{}};if(!l.ok)throw Error(`Antigravity API error: ${l.status}`);let m=await l.json(),n={};if(m.models){let a=["gemini-3.8-flash-high","gemini-3.8-flash-medium","gemini-3.8-flash-low","gemini-3.7-flash-high","gemini-3.7-flash-medium","gemini-3.7-flash-low","gemini-3.6-flash-high","gemini-3.6-flash-medium","gemini-3.6-flash-low","gemini-3.5-flash-low","gemini-3.5-flash-extra-low","gemini-pro-agent","gemini-3.1-pro-low","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3.1-flash-image"];for(let[b,c]of Object.entries(m.models)){if(!c.quotaInfo||c.isInternal||!a.includes(b))continue;let d=c.quotaInfo.remainingFraction||0,e=100*d,g=Math.round(1e3*d),h=1e3-g;n[b]={used:h,total:1e3,resetAt:(0,f.eZ)(c.quotaInfo.resetTime),remainingPercentage:e,percentageOnly:!0,quotaNote:"gemini-3.1-flash-image"===b?"Google does not expose the exact remaining image-generation count.":"Google exposes this quota as a percentage, not an absolute request count.",unlimited:!1,displayName:c.displayName||b}}}return{plan:d?.currentTier?.name||"Unknown",quotas:n,subscriptionInfo:d}}catch(a){return console.error("[Antigravity Usage] Error:",a.message,a.cause),{message:`Antigravity error: ${a.message}`}}}async function k(a,b=null){try{let c=await (0,f.u9)(g.loadProjectApiUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":g.userAgent,"Content-Type":"application/json"},body:JSON.stringify({metadata:d.Cn,mode:1})},1e4,b);if(!c.ok)return null;return await c.json()}catch(a){return console.error("[Antigravity Subscription] Error:",a.message),null}}},81358:(a,b,c)=>{c.d(b,{a:()=>d});function d(a={},b=null){let c=[a?.workspaceId,a?.chatgptAccountId,a?.accountId,function(a){if("string"!=typeof a)return"";try{let b=JSON.parse(Buffer.from(a.split(".")[1]||"","base64url").toString("utf8"));return b?.["https://api.openai.com/auth"]?.chatgpt_account_id||b?.account_id||""}catch{return""}}(b)];return c.find(a=>"string"==typeof a&&a.trim())?.trim()||""}},85543:(a,b,c)=>{c.d(b,{RO:()=>l.RO,Yt:()=>l.Yt,my:()=>an});var d=c(89843),e=c(39141),f=c(88705);let g={apiVersion:e.sr.github?.apiVersion,userAgent:e.sr.github?.userAgent};async function h(a,b,c=null){try{if(!a)throw Error("No GitHub access token available. Please re-authorize the connection.");let b=await (0,d.proxyAwareFetch)((0,f.U)("github").url,{headers:{Authorization:`token ${a}`,Accept:"application/json","X-GitHub-Api-Version":g.apiVersion,"User-Agent":g.userAgent,"Editor-Version":"vscode/1.100.0","Editor-Plugin-Version":"copilot-chat/0.26.7"}},c);if(!b.ok){let a=await b.text();throw Error(`GitHub API error: ${a}`)}let e=await b.json();if(e.quota_snapshots){let a=e.quota_snapshots,b=(0,f.eZ)(e.quota_reset_date);return{plan:e.copilot_plan,resetDate:e.quota_reset_date,quotas:{chat:{...i(a.chat),resetAt:b},completions:{...i(a.completions),resetAt:b},premium_interactions:{...i(a.premium_interactions),resetAt:b}}}}if(e.monthly_quotas||e.limited_user_quotas){let a=e.monthly_quotas||{},b=e.limited_user_quotas||{},c=(0,f.eZ)(e.limited_user_reset_date);return{plan:e.copilot_plan||e.access_type_sku,resetDate:e.limited_user_reset_date,quotas:{chat:{used:b.chat||0,total:a.chat||0,unlimited:!1,resetAt:c},completions:{used:b.completions||0,total:a.completions||0,unlimited:!1,resetAt:c}}}}return{message:"GitHub Copilot connected. Unable to parse quota data."}}catch(a){throw Error(`Failed to fetch GitHub usage: ${a.message}`)}}function i(a){return a?{used:a.entitlement-a.remaining,total:a.entitlement,remaining:a.remaining,unlimited:a.unlimited||!1}:{used:0,total:0,unlimited:!0}}var j=c(72251),k=c(98594),l=c(49485),m=c(3148);async function n(a,b,c=null){let e=b?.authMethod||"builder-id",g="api_key"===e,h=g?{tokentype:"API_KEY"}:{},i="external_idp"===e?{TokenType:"EXTERNAL_IDP"}:{},j=g?b?.profileArn||"":b?.profileArn||(0,m.We)(e),k=new URLSearchParams({isEmailRequired:"true",origin:"AI_EDITOR",resourceType:"AGENTIC_REQUEST"}),l=!1,o=[];for(let b of[{name:"codewhisperer-get",run:async()=>(0,d.proxyAwareFetch)(`${(0,f.U)("kiro").cwHost}${(0,f.U)("kiro").limitsPath}?${k.toString()}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","x-amz-user-agent":"aws-sdk-js/1.0.0 KiroIDE","user-agent":"aws-sdk-js/1.0.0 KiroIDE",...h,...i}},c)},{name:"codewhisperer-post",run:async()=>(0,d.proxyAwareFetch)((0,f.U)("kiro").cwHost,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.GetUsageLimits",Accept:"application/json",...h,...i},body:JSON.stringify({origin:"AI_EDITOR",...j?{profileArn:j}:{},resourceType:"AGENTIC_REQUEST"})},c)},{name:"q-get",run:async()=>{let b=new URLSearchParams({origin:"AI_EDITOR",...j?{profileArn:j}:{},resourceType:"AGENTIC_REQUEST"});return(0,d.proxyAwareFetch)(`${(0,f.U)("kiro").qHost}${(0,f.U)("kiro").limitsPath}?${b}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json",...h,...i}},c)}}])try{let a=await b.run();if(!a.ok){let c=await a.text().catch(()=>"");(401===a.status||403===a.status)&&(l=!0),o.push(`${b.name}:${a.status}${c?`:${c}`:""}`);continue}let c=await a.json();return function(a){let b=a.usageBreakdownList||[],c={},d=(0,f.eZ)(a.nextDateReset||a.resetDate);return b.forEach(a=>{let b=a.resourceType?.toLowerCase()||"unknown",e=a.currentUsageWithPrecision||0,g=a.usageLimitWithPrecision||0;if(c[b]={used:e,total:g,remaining:g-e,resetAt:d,unlimited:!1},a.freeTrialInfo){let e=a.freeTrialInfo.currentUsageWithPrecision||0,g=a.freeTrialInfo.usageLimitWithPrecision||0;c[`${b}_freetrial`]={used:e,total:g,remaining:g-e,resetAt:(0,f.eZ)(a.freeTrialInfo.freeTrialExpiry||d),unlimited:!1}}}),{plan:a.subscriptionInfo?.subscriptionTitle||"Kiro",quotas:c}}(c)}catch(a){o.push(`${b.name}:${a.message}`)}return l&&"idc"===e?{message:"Kiro quota API is unavailable for the current AWS IAM Identity Center session. Chat may still work. If this persists after renewing your session, reconnect Kiro.",quotas:{}}:l&&("google"===e||"github"===e)?{message:"Kiro quota API authentication expired. Chat may still work.",quotas:{}}:l?{message:"Kiro quota API rejected the current token. Chat may still work.",quotas:{}}:{message:o.length>0?`Unable to fetch Kiro usage right now. (${o[o.length-1]})`:"Unable to fetch Kiro usage right now.",quotas:{}}}let o={minimax:(0,f.U)("minimax").urls,"minimax-cn":(0,f.U)("minimax-cn").urls};function p(a,b,c){return a&&"object"==typeof a?a[b]??a[c]??null:null}function q(a,b,c){if(!a||"object"!=typeof a)return null;let d=a[b]??a[c];if(null==d)return null;let e=Number(d);return Number.isFinite(e)?Math.max(0,Math.min(100,e)):null}function r(a){return Math.max(0,Number(p(a,"current_interval_total_count","currentIntervalTotalCount"))||0)}function s(a){return Math.max(0,Number(p(a,"current_weekly_total_count","currentWeeklyTotalCount"))||0)}function t(a){return!!(r(a)>0||s(a)>0)||null!==q(a,"current_interval_remaining_percent","currentIntervalRemainingPercent")||null!==q(a,"current_weekly_remaining_percent","currentWeeklyRemainingPercent")}function u(a,b,c,d,e,g,h,i,j,k){let l=d(c),m=q(c,h,i);if(l<=0&&null===m)return;let n=Math.max(0,Number(p(c,e,g))||0),o=l,r=n;l<=0&&(o=100,r=k?Math.round(m/100*o):Math.round(o*(1-m/100))),a[b]=function(a,b,c,d,e=null){var f,g,h;let i=Math.max(0,a),j=d?Math.max(i-b,0):Math.min(Math.max(0,b),i),k=Math.max(i-j,0),l=(f=e,g=k,h=i,null!=f&&Number.isFinite(f)?Math.max(0,Math.min(100,f)):h>0?Math.max(0,Math.min(100,g/h*100)):0);return{used:j,total:i,remaining:k,remainingPercentage:l,resetAt:c,unlimited:!1}}(o,r,function(a,b,c,d,e,g){let h=Number(p(a,c,d))||0;return h>0?new Date(b+h).toISOString():(0,f.eZ)(p(a,e,g))}(c,...j),k,m)}async function v(a,b,c=null){if(!a)return{message:"MiniMax API key not available."};let e=o[b]||[],f="";for(let b=0;b<e.length;b+=1){let g=e[b],h=b<e.length-1;try{let b=await (0,d.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"}},c),e=await b.text(),i={};if(e)try{i=JSON.parse(e)}catch{i={}}let j=(i?.base_resp??i?.baseResp)||{},k=Number(j.status_code??j.statusCode)||0,l=String(j.status_msg??j.statusMsg??"").trim(),m=`${l} ${e}`.trim(),n=/token plan|coding plan|invalid api key|invalid key|unauthorized|inactive/i;if(401===b.status||403===b.status||1004===k||n.test(m))return{message:"MiniMax API key invalid or inactive. Use an active Token/Coding Plan key."};if(!b.ok){if(f=`MiniMax usage endpoint error (${b.status})`,(404===b.status||405===b.status||b.status>=500)&&h)continue;return{message:`MiniMax connected. ${f}`}}if(0!==k)return{message:`MiniMax connected. ${l||"Upstream quota API error"}`};let o=i?.model_remains??i?.modelRemains,q=(Array.isArray(o)?o:[]).filter(t);if(0===q.length)return{message:"MiniMax connected. No quota data was returned."};let v=Date.now(),w=g.includes("/coding_plan/remains"),x={};for(let a of q){let b=function(a){let b=String(p(a,"model_name","modelName")||"").trim();return b?"MiniMax-M*"===b||"general"===b?"M-series":b.replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,a=>a.toUpperCase()).replace(/\bTo\b/g,"to").replace(/\bTts\b/g,"TTS").replace(/\bHd\b/g,"HD"):"MiniMax"}(a);u(x,`${b} (5h)`,a,r,"current_interval_usage_count","currentIntervalUsageCount","current_interval_remaining_percent","currentIntervalRemainingPercent",[v,"remains_time","remainsTime","end_time","endTime"],w),u(x,`${b} (7d)`,a,s,"current_weekly_usage_count","currentWeeklyUsageCount","current_weekly_remaining_percent","currentWeeklyRemainingPercent",[v,"weekly_remains_time","weeklyRemainsTime","weekly_end_time","weeklyEndTime"],w)}if(0===Object.keys(x).length)return{message:"MiniMax connected. Unable to extract quota usage."};return{quotas:x}}catch(a){if(f=a.message,!h)break}}return{message:f?`MiniMax connected. Unable to fetch usage: ${f}`:"MiniMax connected. Unable to fetch usage."}}let w="Characters";async function x(a,b=null){if(!a)return{message:"ElevenLabs API key not available."};try{let c=await (0,f.u9)("https://api.elevenlabs.io/v1/user/subscription",{method:"GET",headers:{"xi-api-key":a,"Content-Type":"application/json"}},1e4,b);if(401===c.status)return{message:"ElevenLabs connected. Key lacks user_read permission to read credits."};if(!c.ok)return{message:`ElevenLabs connected. Usage endpoint error (${c.status}).`};let d=await c.json(),e=Math.max(0,(0,f.IQ)(d.character_limit)),g=Math.max(0,(0,f.IQ)(d.character_count)),h=Math.max(e-g,0),i=String(d.tier||"").trim();return{quotas:{[w]:{displayName:i?`${i.charAt(0).toUpperCase()}${i.slice(1)} characters`:w,used:g,total:e,remaining:h,remainingPercentage:e>0?h/e*100:0,resetAt:(0,f.eZ)(d.next_character_count_reset_unix),unlimited:0===e}}}}catch(a){return{message:`ElevenLabs connected. Unable to fetch usage: ${a.message}`}}}function y(a,b){let c=Number(a??b);return Number.isFinite(c)?c:0}async function z(a,b,c,g,h=null){let i=b||c;if(!i)return{message:`CodeBuddy (${a}) credential not available.`};try{let b=await (0,d.proxyAwareFetch)((0,f.U)(a).url,{method:"POST",headers:{...e.xq[a]?.headers||{},Authorization:`Bearer ${i}`,"Content-Type":"application/json",Accept:"application/json"},body:"{}"},h);if(401===b.status||403===b.status)return{message:"CodeBuddy CN credential invalid or expired."};if(!b.ok)return{message:`CodeBuddy CN quota API error (${b.status}).`};let c=await b.json();if(c?.code!==0)return{message:`CodeBuddy CN quota error: ${c?.msg||"unknown"}`};let g=c?.data?.Response?.Data||{},j=Array.isArray(g.Accounts)?g.Accounts:[];if(0===j.length)return{message:"CodeBuddy CN connected. No credit package found."};let k=a=>{let b=(0,f.eZ)(a.CycleEndTime);return b?new Date(b).getTime():1/0},l=a=>{let b=k(a),c=Number(a.DeductionEndTime);return Number.isFinite(b)&&Number.isFinite(c)&&c-b>1728e5},m=(a,b)=>k(a)-k(b),n=j.filter(l).sort(m),o=j.filter(a=>!l(a)).sort(m),p={},q={};n.forEach(a=>{let b=function(a){let b=(0,f.eZ)(a.CycleStartTime),c=(0,f.eZ)(a.CycleEndTime);if(b&&c){let a=(new Date(c).getTime()-new Date(b).getTime())/864e5;if(a<=1.5)return"Daily";if(a<=10)return"Weekly"}return"Monthly"}(a);q[b]=(q[b]||0)+1,p[q[b]>1?`${b} ${q[b]}`:b]={used:y(a.CycleCapacityUsedPrecise,a.CycleCapacityUsed),total:y(a.CycleCapacitySizePrecise,a.CycleCapacitySize),resetAt:(0,f.eZ)(a.CycleEndTime),unlimited:!1,recurring:!0}}),o.forEach((a,b)=>{p[`Bonus Pack ${b+1}`]={used:y(a.CapacityUsedPrecise,a.CapacityUsed),total:y(a.CapacitySizePrecise,a.CapacitySize),resetAt:(0,f.eZ)(a.CycleEndTime),unlimited:!1,recurring:!1}});let r=n[0]||j[0]||{};return{plan:r.PackageName||r.SubProductName||"CodeBuddy",quotas:p}}catch(b){return{message:`CodeBuddy (${a}) error: ${b.message}`}}}async function A(a,b,c,d=null){return z("codebuddy-cn",a,b,c,d)}async function B(a,b,c,d=null){return z("codebuddy-intl",a,b,c,d)}var C=c(13247);let D=(0,f.U)("grok-cli"),E=D.url||"https://cli-chat-proxy.grok.com/v1/billing?format=credits",F=D.userUrl||"https://cli-chat-proxy.grok.com/v1/user?include=subscription",G="string"==typeof E&&E.includes("?")?E.replace(/\?.*$/,""):"https://cli-chat-proxy.grok.com/v1/billing";function H(a,b=0){return null==a?b:"object"==typeof a&&!Array.isArray(a)&&"val"in a?(0,f.IQ)(a.val,b):(0,f.IQ)(a,b)}function I(a){return"string"==typeof a&&a.trim()?a.trim().replace(/[_-]+/g," ").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/\b\w/g,a=>a.toUpperCase()):null}function J(a,b){let c=a?.subscriptionTier??a?.subscription_tier??a?.subscription?.tier??b?.subscriptionTier??b?.subscription_tier;return"string"==typeof c?c.trim():""}function K({used:a,total:b,resetAt:c,unlimited:d=!1}){let e=Math.max(0,(0,f.IQ)(b,0)),g=Math.max(0,(0,f.IQ)(a,0));if(d||0===e)return{used:g,total:0,remainingPercentage:100*!!d,resetAt:c||null,unlimited:!0};let h=Math.max(0,e-g);return{used:g,total:e,remainingPercentage:h/e*100,resetAt:c||null,unlimited:!1}}function L(a,b){let c=Math.min(100,Math.max(0,(0,f.IQ)(a,0)));return{used:c,total:100,remainingPercentage:Math.max(0,100-c),resetAt:b||null,unlimited:!1}}function M(a){let b=a&&"object"==typeof a?a:{},c=b.config&&"object"==typeof b.config&&!Array.isArray(b.config)?b.config:b;return{root:b,config:c}}async function N(a,b=null,c=null){if(!a)return{message:"Grok CLI access token not available."};let e=function(a,b={}){let c=b||{},d={Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":C.fZ,"x-xai-token-auth":"xai-grok-cli","x-grok-client-identifier":C.rK,"x-grok-client-version":C.uG,"x-grok-client-mode":"headless"},e=c.email,f=c.userId||c.principalId;return e&&(d["x-email"]=e),f&&(d["x-userid"]=f),d}(a,b);try{let[a,b,g]=await Promise.all([(0,d.proxyAwareFetch)(E,{method:"GET",headers:e},c),(0,d.proxyAwareFetch)(G,{method:"GET",headers:e},c).catch(()=>null),(0,d.proxyAwareFetch)(F,{method:"GET",headers:e},c).catch(()=>null)]);if(401===a.status||403===a.status)return{message:"Grok CLI authentication expired. Please re-authorize."};if(!a.ok){let b=await a.text().catch(()=>""),c=b?`: ${b.slice(0,200)}`:"";return{message:`Grok CLI billing API error (${a.status})${c}`}}let h=await a.json().catch(()=>null);if(!h||"object"!=typeof h)return{message:"Grok CLI billing response was not JSON."};let i=null;b?.ok&&(i=await b.json().catch(()=>null));let j=null;g?.ok&&(j=await g.json().catch(()=>null));let k=function(a,b=null,c=null){let d,{root:e,config:g}=M(a),h=(0,f.eZ)(g.billingPeriodEnd)||(0,f.eZ)(g.billing_period_end)||(0,f.eZ)(g.currentPeriod?.end)||(0,f.eZ)(g.resetAt||g.resetsAt||g.periodEnd)||(0,f.eZ)(e.billingPeriodEnd)||(0,f.eZ)(e.billing_period_end)||(0,f.eZ)(e.resetAt||e.resetsAt||e.periodEnd)||null,i={},j=J(b,g),k=!!j&&!/^(free|none|null)$/i.test(j),l=H(g.monthlyLimit??g.monthly_limit??e.monthlyLimit??e.monthly_limit,NaN),m=H(g.includedUsed??g.included_used??e.includedUsed??e.included_used,NaN),n=H(g.totalUsed??g.total_used??e.totalUsed??e.total_used,NaN);Number.isFinite(l)&&l>0&&(i["Monthly included"]=K({used:Number.isFinite(m)?m:Number.isFinite(n)?n:0,total:l,resetAt:h}));let o=Array.isArray(g.productUsage)?g.productUsage:Array.isArray(e.productUsage)?e.productUsage:[],p=!1;if(o.length>0)for(let a of o){if(!a||"object"!=typeof a)continue;let b=H(a.usagePercent,NaN);if(!Number.isFinite(b))continue;let c=I(a.product)||"Usage";i[c]||(i[c]=L(b,h),p=!0)}let q=H(g.creditUsagePercent??e.creditUsagePercent,NaN);!p&&Number.isFinite(q)&&(i.Credits=L(q,h),p=!0);let r=H(g.onDemandCap??e.onDemandCap,NaN),s=H(g.onDemandUsed??e.onDemandUsed,NaN);if(Number.isFinite(r)&&r>0){let a=Number.isFinite(s)?Math.max(0,s):0;i["On-demand"]=K({used:a,total:r,resetAt:h})}else!p&&!k&&Number.isFinite(r)&&0===r&&Number.isFinite(s)&&(i["On-demand"]={used:1,total:1,remainingPercentage:0,resetAt:h,unlimited:!1});let t=H(g.prepaidBalance??e.prepaidBalance,NaN);for(let a of(Number.isFinite(t)&&t>0&&(i.Prepaid={used:0,total:t,remainingPercentage:100,resetAt:null,unlimited:!1}),[e.credits,e.creditBalance,e.usage,g.credits,g.includedCredits,g.subscriptionCredits].filter(a=>a&&"object"==typeof a&&!Array.isArray(a)))){let b=H(a.total??a.limit??a.cap??a.allocation??a.amount,NaN),c=H(a.used??a.spent??a.consumed,NaN),d=H(a.remaining??a.balance??a.left,NaN);if(Number.isFinite(b)&&b>0){let e=Number.isFinite(c)?c:Number.isFinite(d)?Math.max(0,b-d):0;i.Credits||(i.Credits=K({used:e,total:b,resetAt:(0,f.eZ)(a.resetAt||a.resetsAt||a.end)||h}))}else Number.isFinite(d)&&d>=0&&!i.Credits&&(i.Credits={used:0,total:d>0?d:1,remainingPercentage:100*(d>0),resetAt:h,unlimited:!1})}if(c&&"object"==typeof c){let{config:a}=M(c),b=H(a.monthlyLimit,NaN),d=H(a.used,NaN),e=(0,f.eZ)(a.billingPeriodEnd)||null;Number.isFinite(b)&&b>0&&(i.Monthly=K({used:Number.isFinite(d)?Math.max(0,d):0,total:b,resetAt:e}))}let u=Object.keys(i).length>0&&Object.values(i).every(a=>!0!==a.unlimited&&(a.remainingPercentage??100)<=0);return{plan:(d=J(b,g))?I(d)||d:b?.hasGrokCodeAccess===!0?"Grok Code":(g?.isUnifiedBillingUser,"Grok Build"),quotas:i,periodEnd:h,exhausted:u,subscriptionAccess:k,rawConfig:g}}(h,j,i);if(!k.quotas||0===Object.keys(k.quotas).length)return{plan:k.plan,message:k.subscriptionAccess?"Subscription access is active; Grok does not expose a numeric included quota.":"Grok Build connected, but no credit allotment was returned. Free promo may be exhausted.",quotas:{}};return{plan:k.plan,quotas:k.quotas}}catch(a){return{message:`Grok CLI usage error: ${a.message}`}}}var O=c(28730);let P={LEVEL_BASIC:"Moderato",LEVEL_INTERMEDIATE:"Allegretto",LEVEL_ADVANCED:"Allegro",LEVEL_STANDARD:"Vivace"};function Q({used:a,total:b,remaining:c,resetAt:d}){let e,g=Math.max(0,(0,f.IQ)(b,0)),h=Math.max(0,(0,f.IQ)(a,0));return e=g>0&&null!=c&&Number.isFinite(Number(c))?Math.max(0,Number(c))/g*100:g>0?Math.max(0,g-h)/g*100:0,{used:h,total:g,remainingPercentage:e,resetAt:d||null,unlimited:!1}}async function R(a=null,b=null,c=null,e=null){let g="string"==typeof b&&b.length>0,h=!g&&"string"==typeof a&&a.length>0;if(!g&&!h)return{message:"Kimi access token or API key not available."};let i=g?{"x-api-key":b}:{Authorization:`Bearer ${a}`,...(0,O.buildKimiHeaders)(e?.deviceId)};try{let a,b=await (0,d.proxyAwareFetch)(g?"https://api.moonshot.cn/v1/usage":"https://api.kimi.com/coding/v1/usages",{method:"GET",headers:{...i,"Content-Type":"application/json",Accept:"application/json"}},c),e=await b.text().catch(()=>"");if(!b.ok)return{plan:"Kimi Coding",message:function(a,b){let c=null;try{c=JSON.parse(b||"")}catch{}let d=Array.isArray(c?.details)?c.details[0]:null,e=d?.debug||c?.debug||null,f=e?.reason||c?.reason||"",g=e?.localizedMessage?.message||d?.localizedMessage?.message||c?.message||"";if(401===a)return"Kimi authentication expired. Please re-authorize.";if(403===a&&("REASON_FEATURE_NO_PERMISSION"===f||/permission_denied|do not have permission|subscribe/i.test(`${c?.code||""} ${g} ${b||""}`)))return g||"Kimi connected, but this account has no permission to view usage. Subscribe to Kimi Code to access quota.";let h=(g||b||"").slice(0,100);return h?`Kimi Coding connected. API Error ${a}: ${h}`:`Kimi Coding connected. API Error ${a}`}(b.status,e)};try{a=JSON.parse(e||"{}")}catch{return{plan:"Kimi Coding",message:"Kimi Coding connected. Invalid JSON response from API."}}let h={},j=a?.usage&&"object"==typeof a.usage?a.usage:{},k=(0,f.IQ)(j.limit??j.Limit,0),l=(0,f.IQ)(j.used??j.Used,0),m=j.remaining??j.Remaining,n=null!=m&&""!==m?(0,f.IQ)(m,NaN):NaN,o=j.resetTime||j.ResetTime||j.reset_at||j.resetAt;for(let b of(k>0&&(h.Weekly=Q({used:l,total:k,remaining:Number.isFinite(n)?n:null,resetAt:(0,f.eZ)(o)})),Array.isArray(a?.limits)?a.limits:[])){if(!b||"object"!=typeof b)continue;let a=b.detail&&"object"==typeof b.detail?b.detail:{},c=(0,f.IQ)(a.limit??a.Limit,0),d=(0,f.IQ)(a.remaining??a.Remaining,NaN),e=a.resetTime||a.reset_at||a.resetAt;if(c>0){let a=Number.isFinite(d)?d:Math.max(0,c);h.Ratelimit=Q({used:Math.max(0,c-a),total:c,remaining:a,resetAt:(0,f.eZ)(e)})}}let p=a?.user?.membership?.level,q=function(a){if(!a)return"";let b=String(a);return P[b]?P[b]:b.replace(/^LEVEL_/,"").toLowerCase()}(p)||"Kimi Coding";if(Object.keys(h).length>0)return{plan:q,quotas:h};return{plan:q,message:"Kimi Coding connected. Usage tracked per request."}}catch(a){return{message:`Kimi Coding connected. Unable to fetch usage: ${a.message}`}}}let S={usageUrl:(0,f.U)("cursor").usageUrl,planUrl:(0,f.U)("cursor").planUrl};async function T(a,b,c){return(0,d.proxyAwareFetch)(a,{method:"POST",headers:{Authorization:`Bearer ${b}`,"Content-Type":"application/json","Connect-Protocol-Version":"1"},body:"{}"},c)}function U(a,b){let c=Math.max(0,Math.min(100,a));return{used:c,total:100,remaining:Math.max(0,100-c),resetAt:b,unlimited:!1}}async function V(a,b){try{let c=await T(S.planUrl,a,b);if(!c.ok)return null;let d=await c.json(),e=d?.planInfo?.planName;return"string"==typeof e&&e.trim()?e.trim():null}catch{return null}}async function W(a,b=null){let c,d;if(!a)return{message:"No Cursor access token available. Re-import your Cursor session."};try{c=await T(S.usageUrl,a,b)}catch(a){return{message:`Cursor connected. Unable to fetch usage: ${a.message}`}}if(!c.ok)return{message:`Cursor connected. Usage API temporarily unavailable (${c.status}).`};try{d=await c.json()}catch{return{message:"Cursor connected. Usage API returned an invalid response."}}let e=d?.planUsage;if(d?.enabled===!1||!e)return{message:"No active Cursor subscription."};let g=Number(e.limit),h=Number.isFinite(g),i=Number(e.totalPercentUsed),j=Number.isFinite(i);if(!h&&!j)return{message:"Cursor connected. Usage totals unavailable for this account."};let k=(0,f.eZ)(d.billingCycleEnd),l={},m=Number(e.totalSpend),n=Number(e.remaining),o=0;Number.isFinite(m)?o=m:h&&Number.isFinite(n)&&(o=g-n);let p=h&&g>0?o/g*100:0;l["Total usage"]=U(j?i:p,k);let q=Number(e.autoPercentUsed);Number.isFinite(q)&&(l["Auto usage"]=U(q,k));let r=Number(e.apiPercentUsed);return Number.isFinite(r)&&(l["API usage"]=U(r,k)),{plan:await V(a,b)||"Cursor",quotas:l}}async function X(a=null,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"DeepSeek API key not available. Add a key to view usage."};try{let c=await (0,d.proxyAwareFetch)("https://api.deepseek.com/user/balance",{method:"GET",headers:{Authorization:`Bearer ${a.trim()}`,"Content-Type":"application/json",Accept:"application/json"}},b);if(401===c.status||403===c.status)return{plan:"DeepSeek",message:"DeepSeek authentication failed. Check the API key."};if(!c.ok){let a=await c.text().catch(()=>"");return{plan:"DeepSeek",message:`DeepSeek balance API error (${c.status})${a?`: ${a.slice(0,120)}`:""}`}}let e=await c.json().catch(()=>null);if(!e||"object"!=typeof e)return{message:"DeepSeek balance response was not JSON."};let g=function(a){let b=Array.isArray(a?.balance_infos)?a.balance_infos:[],c=[];for(let a of b){if(!a||"object"!=typeof a)continue;let b="string"==typeof a.currency?a.currency.toUpperCase():"";if(!b)continue;let d=(0,f.IQ)(a.total_balance??a.totalBalance,0);c.push({currency:b,totalBalance:d,grantedBalance:(0,f.IQ)(a.granted_balance??a.grantedBalance,0),toppedUpBalance:(0,f.IQ)(a.topped_up_balance??a.toppedUpBalance,0)})}return c}(e);if(0===g.length)return{plan:"DeepSeek",message:"DeepSeek connected. No balance data returned."};let h=!0===e.is_available||!0===e.isAvailable,i={};for(let a of g){let b=Math.max(0,a.totalBalance);i[`Balance (${a.currency})`]={used:0,total:b,remainingPercentage:100*(b>0),resetAt:null,unlimited:b>0}}return{plan:h?"DeepSeek":"DeepSeek (Insufficient Balance)",quotas:i}}catch(a){return{message:`DeepSeek error: ${a.message}`}}}let Y=(0,f.U)("groq").url;function Z(a,b,c,d){let e,f=a.get(b),g=a.get(c);if(null===f||null===g)return null;let h=Number(f),i=Number(g);return Number.isFinite(h)&&Number.isFinite(i)?{used:Math.max(0,h-i),total:h,resetAt:null===(e=function(a){let b;if("string"!=typeof a||!a.trim())return null;let c=/(\d+(?:\.\d+)?)(ms|s|m|h)/g,d=0,e=!1;for(;b=c.exec(a);){e=!0;let a=Number(b[1]),c=b[2];d+=a*("h"===c?36e5:"m"===c?6e4:"ms"===c?1:1e3)}return e?d:null}(a.get(d)))?null:new Date(Date.now()+e).toISOString(),unlimited:!1}:null}async function $(a,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"Groq API key not available. Add a key to view usage."};try{let c=await (0,d.proxyAwareFetch)(Y,{method:"GET",headers:{Authorization:`Bearer ${a.trim()}`,Accept:"application/json"}},b);if(401===c.status||403===c.status)return{plan:"Groq",message:"Groq authentication failed. Check the API key."};if(!c.ok){let a=await c.text().catch(()=>"");return{plan:"Groq",message:`Groq usage API error (${c.status})${a?`: ${a.slice(0,120)}`:""}`}}await c.text().catch(()=>{});let e=Z(c.headers,"x-ratelimit-limit-requests","x-ratelimit-remaining-requests","x-ratelimit-reset-requests"),f=Z(c.headers,"x-ratelimit-limit-tokens","x-ratelimit-remaining-tokens","x-ratelimit-reset-tokens");if(!e&&!f)return{plan:"Groq",message:"Groq connected. No rate-limit data reported for this key yet.",quotas:{}};let g={};return e&&(g.Requests=e),f&&(g.Tokens=f),{plan:"Groq",quotas:g}}catch(a){return{message:`Groq error: ${a.message}`}}}var _=c(49934);function aa(a){if(null==a)return{unlimited:!1,total:0};if("unlimited"===a||a?.unlimited===!0)return{unlimited:!0,total:0};if("number"==typeof a&&Number.isFinite(a))return{unlimited:!1,total:Math.max(0,a)};if("string"==typeof a){let b=a.trim();if("unlimited"===b)return{unlimited:!0,total:0};let c=Number(b);if(Number.isFinite(c))return{unlimited:!1,total:Math.max(0,c)}}let b=a.limited??a.Limited;return"number"==typeof b&&Number.isFinite(b)?{unlimited:!1,total:Math.max(0,b)}:{unlimited:!1,total:0}}function ab(a,b,c,d=null){let e=Math.max(0,(0,f.IQ)(b,0)),g=aa(c);if(g.unlimited)return{used:e,total:0,remainingPercentage:100,resetAt:d||null,unlimited:!0};let h=g.total;if(h<=0)return{used:e,total:0,remainingPercentage:0,resetAt:d||null,unlimited:!1};let i=Math.min(e,h),j=Math.max(0,h-i);return{used:i,total:h,remainingPercentage:j/h*100,resetAt:d||null,unlimited:!1}}function ac(a){return a&&"object"==typeof a?null!=a.limit?a.limit:a:null}async function ad(a=null,b={},c=null){let d=b||{},e=d.userId;if(!a||"string"!=typeof a||!a.trim())return{message:"Zed access token not available. Re-connect Zed to view quota."};if(!e)return{message:"Zed credential is missing user id. Re-connect Zed to view quota."};let g={accessToken:a.trim(),providerSpecificData:d};try{let a=await (0,_.qJ)(g,{proxyOptions:c});return function(a){let b,c=a?.plan||{},d=c.plan_v3||c.plan_v2||c.plan||a?.plan_v3||null,e=(0,f.eZ)(c.subscription_period?.ended_at)||(0,f.eZ)(c.subscriptionPeriod?.endedAt)||null,g={},h=c.usage||{},i=h.edit_predictions||h.editPredictions;i&&(g["Edit Predictions"]=ab("Edit Predictions",i.used,i.limit,e));let j=h.model_requests||h.modelRequests;if(j){let a=null!=j.limit?j.limit:ac(j)?.limit,b=aa(a);(b.unlimited||b.total>0)&&(g["Hosted Model Requests"]=ab("Hosted Model Requests",j.used,a,e))}let k=j&&!(b=aa(j.limit??ac(j)?.limit)).unlimited&&0===b.total?"Hosted AI models are billed per token (not request count). Edit Predictions are tracked below. Token spend is on dashboard.zed.dev.":null,l=function(a){let b=String(a||"").trim();if(!b)return"Zed";switch(b.toLowerCase()){case"zed_free":return"Zed Free";case"zed_pro":return"Zed Pro";case"zed_pro_trial":return"Zed Pro Trial";case"zed_student":return"Zed Student";case"zed_business":return"Zed Business";default:return b.replace(/_/g," ").split(/\s+/).map(a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()).join(" ")}}(d);(c.trial_started_at||c.trialStartedAt)&&!/trial/i.test(l)&&(l=`${l} (Trial active)`);let m=k;return(c.has_overdue_invoices||c.hasOverdueInvoices)&&(m="This Zed account has overdue invoices. Usage may be blocked until billing is resolved."),{plan:l,quotas:g,message:m,hasOverdueInvoices:!!(c.has_overdue_invoices||c.hasOverdueInvoices),trialStarted:!!(c.trial_started_at||c.trialStartedAt),planId:d||null,resetAt:e}}(a)}catch(b){let a=b?.status;if(401===a||403===a)return{message:"Zed authentication failed. Sign in again from the dashboard or Zed editor."};return{message:`Zed error: ${b.message||"Failed to fetch quota"}`}}}var ae=c(9155);let af={international:(0,f.U)("glm").url,china:(0,f.U)("glm-cn").url};async function ag(a,b,c=null){if(!a)return{message:"GLM API key not available."};let e=af["glm-cn"===b?"china":"international"];try{let b=await (0,d.proxyAwareFetch)(e,{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(!b.ok){if(401===b.status)return{message:"GLM API key invalid or expired."};return{message:`GLM quota API error (${b.status}).`}}let f=await b.json(),g=f?.data&&"object"==typeof f.data?f.data:{},h=Array.isArray(g.limits)?g.limits:[],i={};for(let a of h){if(!a||"TOKENS_LIMIT"!==a.type&&"CREDIT_LIMIT"!==a.type)continue;let b=Number(a.percentage)||0,c=Number(a.nextResetTime)||0,d=Math.max(0,100-b);i[3===a.unit?`Session (${a.number}h)`:6===a.unit?"Weekly (7d)":"TOKENS_LIMIT"===a.type?"Tokens":`Limit (${a.number})`]={used:b,total:100,remaining:d,remainingPercentage:d,resetAt:c>0?new Date(c).toISOString():null,unlimited:!1}}let j="string"==typeof g.level?g.level:"";return{plan:j?j.charAt(0).toUpperCase()+j.slice(1).toLowerCase():"Unknown",quotas:i}}catch(a){return{message:`GLM error: ${a.message}`}}}let ah=(0,f.U)("vercel-ai-gateway").url;async function ai(a){try{return{message:"iFlow connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch iFlow usage."}}}async function aj(a,b,c=null){if(!a)return{message:"Ollama Cloud API key not available."};try{let b,f=await (0,d.proxyAwareFetch)("https://ollama.com/api/usage",{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(401===f.status||403===f.status)return{message:"Ollama Cloud API key invalid or expired."};if(!f.ok)return{message:`Ollama Cloud usage API error (${f.status}).`};try{b=await f.json()}catch{return{message:"Ollama Cloud usage response was not JSON."}}let g=await (0,d.proxyAwareFetch)("https://ollama.com/api/me",{method:"POST",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Length":"0"}},c).then(a=>a.ok?a.json():null).catch(()=>null),h="string"==typeof g?.Plan?g.Plan:"",i=h?h.charAt(0).toUpperCase()+h.slice(1).toLowerCase():"Ollama Cloud",j=b?.limits&&"object"==typeof b.limits?b.limits:{};function e(a,b=null){let c=Math.max(0,Math.min(1,Number(a)||0)),d=Math.round(100*c);return{used:d,total:100,remainingPercentage:100-d,resetAt:b,unlimited:!1}}let k=j.session?.usage,l=j.weekly?.usage,m=Number(k),n=Number(l),o=null!=k&&!Number.isNaN(m),p=null!=l&&!Number.isNaN(n);if(!o&&!p)return{plan:i,message:"Ollama Cloud connected. No usage limits reported.",quotas:{}};let q={};return o&&(q["Session (5h)"]=e(m)),p&&(q["Weekly (7d)"]=e(n)),{plan:i,quotas:q}}catch(a){return{message:`Ollama Cloud error: ${a.message}`}}}async function ak(a,b=null){if(!a)return{message:"Vercel AI Gateway API key not available."};try{let c=await (0,d.proxyAwareFetch)(ah,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(401===c.status||403===c.status)return{message:"Vercel AI Gateway API key invalid or expired."};if(!c.ok){let a=await c.text().catch(()=>""),b=a?`: ${a.slice(0,200)}`:"";return{message:`Vercel AI Gateway credits API error (${c.status})${b}`}}let e=await c.json(),f=Number(e?.balance)||0,g=Number(e?.total_used)||0;if(f<=0&&g<=0)return{plan:"Pay-as-you-go",message:"Vercel AI Gateway connected. No credit allocation found (BYOK or unfunded account).",quotas:{}};return{plan:"Pay-as-you-go",quotas:{"Used (USD)":{used:g,total:0,remaining:0,remainingPercentage:100,unlimited:!0},"Remaining (USD)":{used:f,total:5,remaining:f,remainingPercentage:f/5*100,unlimited:!1}}}}catch(a){return{message:`Vercel AI Gateway error: ${a.message}`}}}async function al(a,b=null){if(!a)return{message:"Qoder usage unavailable: no access token"};try{let c=await (0,d.proxyAwareFetch)((0,f.U)("qoder").url,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Qoder connected. Usage fetch returned ${c.status}.`};let e=await c.json().catch(()=>null);if(!e)return{message:"Qoder connected. Usage response was not JSON."};let g=e.userQuota||{},h=e.orgResourcePackage||{},i=Number.isFinite(Number(e.expiresAt))&&Number(e.expiresAt)>0?Number(e.expiresAt):null,j=i?new Date(i).toISOString():null;return{quotas:{user:{total:Number(g.total)||0,used:Number(g.used)||0,remaining:Number(g.remaining)||0,unit:g.unit||"credits",resetAt:j},organization:{total:Number(h.total)||0,used:Number(h.used)||0,remaining:Number(h.remaining)||0,unit:h.unit||"credits",resetAt:j}},totalUsagePercentage:Number(e.totalUsagePercentage)||0,isQuotaExceeded:!!e.isQuotaExceeded,expiresAt:i}}catch(a){return{message:`Qoder connected. Unable to fetch usage: ${a.message}`}}}let am={github:a=>h(a.accessToken,a.providerSpecificData,a.proxyOptions),"gemini-cli":a=>(0,j.N)(a.accessToken,a.providerDataWithProjectId,a.proxyOptions),antigravity:a=>(0,j.c)(a.accessToken,a.providerDataWithProjectId,a.proxyOptions),claude:a=>(0,k.g)(a.accessToken,a.proxyOptions,{force:a.force}),codex:a=>(0,l.Tl)(a.accessToken,a.providerSpecificData,a.proxyOptions,a.idToken),kiro:a=>n(a.accessToken,a.providerSpecificData,a.proxyOptions),qoder:async a=>{let b=await (0,ae._M)(a,a.proxyOptions).catch(()=>null);return al(b?.accessToken||a.accessToken,a.proxyOptions)},iflow:a=>ai(a.accessToken),ollama:a=>aj(a.apiKey,a.providerSpecificData,a.proxyOptions),glm:a=>ag(a.apiKey,a.provider,a.proxyOptions),"glm-cn":a=>ag(a.apiKey,a.provider,a.proxyOptions),minimax:a=>v(a.apiKey,a.provider,a.proxyOptions),"minimax-cn":a=>v(a.apiKey,a.provider,a.proxyOptions),elevenlabs:a=>x(a.apiKey,a.proxyOptions),"vercel-ai-gateway":a=>ak(a.apiKey,a.proxyOptions),"codebuddy-cn":a=>A(a.accessToken,a.apiKey,a.providerSpecificData,a.proxyOptions),"codebuddy-intl":a=>B(a.accessToken,a.apiKey,a.providerSpecificData,a.proxyOptions),"grok-cli":a=>N(a.accessToken,a.providerSpecificData,a.proxyOptions),kimi:a=>R(a.accessToken,a.apiKey,a.proxyOptions,a.providerSpecificData),cursor:a=>W(a.accessToken,a.proxyOptions),deepseek:a=>X(a.apiKey,a.proxyOptions),groq:a=>$(a.apiKey,a.proxyOptions),zed:a=>ad(a.accessToken,a.providerSpecificData,a.proxyOptions)};async function an(a,b=null,c={}){let{provider:d,accessToken:e,apiKey:f,providerSpecificData:g,projectId:h,idToken:i}=a,j={...g||{},...h?{projectId:h}:{}},k=am[d];return k?await k({provider:d,accessToken:e,apiKey:f,providerSpecificData:g,providerDataWithProjectId:j,proxyOptions:b,idToken:i,force:!0===c.force}):{message:`Usage API not implemented for ${d}`}}},88705:(a,b,c)=>{c.d(b,{IQ:()=>i,U:()=>g,b8:()=>f,eZ:()=>h,gD:()=>j,u9:()=>k});var d=c(39141),e=c(89843);let f="2023-06-01",g=a=>d.xq[a]?.usage||{};function h(a){if(!a)return null;try{if(a instanceof Date)return a.toISOString();if("number"==typeof a)return new Date(a<1e12?1e3*a:a).toISOString();if("string"==typeof a){if(/^\d+$/.test(a)){let b=Number(a);return new Date(b<1e12?1e3*b:b).toISOString()}return new Date(a).toISOString()}return null}catch(b){return console.warn(`Failed to parse reset time: ${a}`,b),null}}function i(a,b=0){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return b}function j(a){return"string"==typeof a?a.trim()||null:a&&"object"==typeof a&&"string"==typeof a.id&&a.id.trim()||null}async function k(a,b,c=1e4,d=null){let f=new AbortController,g=setTimeout(()=>f.abort(),c);try{return await (0,e.proxyAwareFetch)(a,{...b,signal:f.signal},d)}finally{clearTimeout(g)}}},98594:(a,b,c)=>{c.d(b,{g:()=>m});var d=c(55511),e=c(89843),f=c(88705);let g={oauthUsageUrl:"https://api.anthropic.com/api/oauth/usage",settingsUrl:"https://api.anthropic.com/api/organizations/current",usageUrl:"https://api.anthropic.com/api/organizations/{org_id}/usage",apiVersion:f.b8},h=new Map,i=new Map;function j(a,b){for(h.delete(a),h.set(a,b);h.size>128;)h.delete(h.keys().next().value)}function k(a,b,c,d){if("number"==typeof c&&Number.isFinite(c)&&!Object.keys(a).some(a=>a.toLowerCase()===b.toLowerCase())){let e,g;a[b]=(g=100-(e=Math.min(100,Math.max(0,c))),{used:e,total:100,remaining:g,remainingPercentage:g,resetAt:(0,f.eZ)(d),unlimited:!1})}}async function l(a,b,c){try{let d=await (0,e.proxyAwareFetch)(g.oauthUsageUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":g.apiVersion},signal:AbortSignal.timeout(5e3)},b);if(d.ok){let a=function(a){let b={};for(let[c,d]of(k(b,"session (5h)",a?.five_hour?.utilization,a?.five_hour?.resets_at),k(b,"weekly (7d)",a?.seven_day?.utilization,a?.seven_day?.resets_at),Object.entries(a||{})))c.startsWith("seven_day_")&&d&&"object"==typeof d&&k(b,`weekly ${c.slice(10)} (7d)`,d.utilization,d.resets_at);for(let c of[...Array.isArray(a?.limits)?a.limits:[],...Array.isArray(a?.rate_limits)?a.rate_limits:[]]){let a=String(c?.group||"").toLowerCase(),d=String(c?.kind||"").toLowerCase();if("session"===d||"session"===a){k(b,"session (5h)",c.percent,c.resets_at);continue}if("weekly_scoped"===d||"weekly"===a){let a=c?.scope?.model?.display_name||c?.scope?.surface?.display_name;k(b,a?`weekly ${a} (7d)`:"weekly (7d)",c.percent,c.resets_at)}}return{plan:"Claude Code",extraUsage:a?.extra_usage??null,quotas:b}}(await d.json());return j(c,{value:a,expiresAt:Date.now()+65e3,retryAt:0}),a}if(429===d.status){let a,b=Date.now(),e=h.get(c),f=e?.value||{message:"Claude usage is rate limited. Retry later."};return j(c,{value:f,expiresAt:e?.expiresAt||0,retryAt:b+(a=function(a,b){let c=String(a||"").trim();if(!c)return null;let d=Number(c);if(Number.isFinite(d))return d>=0?1e3*d:null;let e=Date.parse(c);return Number.isFinite(e)?Math.max(0,e-b):null}(d.headers.get("retry-after"),b),null===a&&d.headers.forEach((c,d)=>{if(!/^anthropic-ratelimit-.+-reset$/i.test(d))return;let e=function(a,b){let c=String(a||"").trim();if(!c)return null;let d=Number(c),e=Number.isFinite(d)?d<1e12?1e3*d:d:Date.parse(c);return Number.isFinite(e)&&e>b&&e<=864e13?e-b:null}(c,b);null!==e&&(null===a||e>a)&&(a=e)}),Math.min(18e5,Math.max(18e4,a??18e4)))}),f}if(401===d.status)return{message:"Claude authentication expired (401). Re-authorize or refresh the connection."};if(404===d.status||405===d.status){let d=await n(a,b);return d.cacheable&&j(c,{value:d.value,expiresAt:Date.now()+65e3,retryAt:0}),d.value}return{message:`Claude connected. Usage endpoint returned HTTP ${d.status}.`}}catch{return{message:"Claude connected. Unable to fetch usage."}}}function m(a,b=null,c={}){let e,f=c?.force===!0,g=(0,d.createHash)("sha256").update(String(a??"")).digest("hex"),j=h.get(g),k=Date.now();return!f&&j&&(k<j.expiresAt||k<j.retryAt)?Promise.resolve(j.value):!f&&i.has(g)?i.get(g):i.size>=128?Promise.resolve({message:"Claude usage refresh is busy. Retry shortly."}):(e=l(a,b,g).finally(()=>{i.get(g)===e&&i.delete(g)}),i.set(g,e),e)}async function n(a,b=null){try{let c=await (0,e.proxyAwareFetch)(g.settingsUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":g.apiVersion}},b);if(c.ok){let d=await c.json();if(d.organization_id){let c=await (0,e.proxyAwareFetch)(g.usageUrl.replace("{org_id}",d.organization_id),{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":g.apiVersion}},b);if(c.ok){let a=await c.json();return{cacheable:!0,value:{plan:d.plan||"Unknown",organization:d.organization_name,quotas:a}}}return{cacheable:!1,value:{plan:d.plan||"Unknown",organization:d.organization_name,message:"Claude connected. Usage details require admin access."}}}return{cacheable:!0,value:{plan:d.plan||"Unknown",organization:d.organization_name,message:"Claude connected. Usage details require admin access."}}}return{cacheable:!1,value:{message:"Claude connected. Usage endpoint requires OAuth."}}}catch(a){return{cacheable:!1,value:{message:`Claude connected. Error checking usage: ${a.message}`}}}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=4999,exports.ids=[290,4999],exports.modules={7803:(a,b,c)=>{c.r(b),c.d(b,{debug:()=>o,debugEnabled:()=>w,error:()=>r,errorLine:()=>l,fmtThink:()=>m,info:()=>p,line:()=>k,maskKey:()=>v,nextTag:()=>i,request:()=>s,response:()=>t,stream:()=>u,tagForSession:()=>j,warn:()=>q});let d={DEBUG:0,INFO:1,WARN:2,ERROR:3},e=d[process.env.LOG_LEVEL?.toUpperCase?.()]??d.INFO;function f(){return new Date().toLocaleTimeString("en-US",{hour12:!1})}let g=["\uD83D\uDFE2","\uD83D\uDD35","\uD83D\uDFE3","\uD83D\uDFE1","\uD83D\uDFE0","\uD83D\uDD34","⚪","\uD83D\uDFE4"],h=0;function i(){let a=g[h%g.length];return h++,a}function j(a){if(!a)return i();let b=0;for(let c=0;c<a.length;c++)b=31*b+a.charCodeAt(c)|0;return g[Math.abs(b)%g.length]}function k(a,b,c){e>d.INFO||console.log(`[${f()}] ${a} ${b} ${c}`)}function l(a,b,c){console.log(`[${f()}] ${a} ${b} ${c}`)}function m(a){return a&&a.mode?"none"===a.mode?"off":"auto"===a.mode?"auto":"budget"===a.mode?a.budget>=1e3?`${Math.round(a.budget/1e3)}k`:`${a.budget}`:"level"===a.mode?a.level:null:null}function n(a){if(!a)return"";if("string"==typeof a)return a;try{return JSON.stringify(a)}catch{return String(a)}}function o(a,b,c){if(e<=d.DEBUG){let d=c?` ${n(c)}`:"";console.log(`[${f()}] 🔍 [${a}] ${b}${d}`)}}function p(a,b,c){if(e<=d.INFO){let d=c?` ${n(c)}`:"";console.log(`[${f()}] ℹ️ [${a}] ${b}${d}`)}}function q(a,b,c){if(e<=d.WARN){let d=c?` ${n(c)}`:"";console.warn(`[${f()}] ⚠️ [${a}] ${b}${d}`)}}function r(a,b,c){if(e<=d.ERROR){let d=c?` ${n(c)}`:"";console.log(`[${f()}] ❌ [${a}] ${b}${d}`)}}function s(a,b,c){let d=c?` ${n(c)}`:"";console.log(`\x1b[36m[${f()}] 📥 ${a} ${b}${d}\x1b[0m`)}function t(a,b,c){let d=c?` ${n(c)}`:"";console.log(`[${f()}] ${a<400?"\uD83D\uDCE4":"\uD83D\uDCA5"} ${a} (${b}ms)${d}`)}function u(a,b){let c=b?` ${n(b)}`:"";console.log(`[${f()}] 🌊 [STREAM] ${a}${c}`)}function v(a){return!a||a.length<8?"***":`${a.slice(0,4)}...${a.slice(-4)}`}let w=e<=d.DEBUG},19225:(a,b,c)=>{a.exports=c(44870)},23433:(a,b,c)=>{c.d(b,{Pt:()=>x,Tr:()=>y,c1:()=>v,kI:()=>B,vk:()=>w,$A:()=>A});var d=c(89718),e=c(39326),f=c(49263),g=c(87252),h=c(49190),i=c(58336),j=c(40615),k=c(79963),l=c(85543),m=c(6165);let n=new Map;function o(a,b){if(!a||!b)return null;let c="number"==typeof b?b:new Date(b).getTime();return!Number.isFinite(c)||Date.now()-c>=12e4?null:a}async function p(a){let b=await (0,e.B)(a.providerSpecificData||{}).then(a=>({connectionProxyEnabled:!0===a.connectionProxyEnabled,connectionProxyUrl:a.connectionProxyUrl||"",connectionNoProxy:a.connectionNoProxy||"",vercelRelayUrl:a.vercelRelayUrl||"",strictProxy:!1})),c=(0,l.my)(a,b,{}),d=new Promise((a,b)=>setTimeout(()=>b(Error("quota fetch timeout")),3e3)),f=await Promise.race([c,d]),g=(0,m.wi)(a.provider,f);return g||null}async function q(a){var b,c;if(!Object.values((0,m.fo)(a)).some(a=>Number(a)>0&&100>=Number(a)))return{paused:!1,reason:"disabled",snapshot:null};if(!(0,m.Kr)(a))return{paused:!1,reason:"ineligible",snapshot:null};let e=function(a){let b=n.get(a.id);if(b){let a=o(b.snapshot,b.fetchedAt);if(a)return a}let c=a.lastQuotaSnapshot;if(c){let a=o(c,c.fetchedAt);if(a)return a}return null}(a);if(!e){try{e=await p(a)}catch{e=null}e&&(b=a.id,c=e,n.set(b,{snapshot:c,fetchedAt:Date.now()}),(0,d.updateProviderConnection)(b,{lastQuotaSnapshot:c}).catch(()=>{}))}let f=(0,m.RU)({...a,lastQuotaSnapshot:e});return{paused:f,reason:f?"below-threshold":e?"ok":"no-data",snapshot:e}}var r=c(45974),s=c(7803);let t=Promise.resolve(),u=new Set([...Object.keys(j.IS),...Object.keys(j.nJ)]);async function v(a,b=null,c=null,g={}){let l,m=b instanceof Set?b:b?new Set([b]):new Set,n=g?.preferredConnectionId||null,o=t;t=new Promise(a=>{l=a});try{let b;await o;let g=(0,j.rs)(a);if(j.IS[g]?.noAuth){let a=((await (0,d.mt)()).providerStrategies||{})[g]||{},b=a.rotateStrategy||"none",c=a.proxyPoolId||null;if("none"!==b){let a=(await (0,d.ui)({isActive:!0})).filter(a=>a.proxyUrl).map(a=>a.id);c=(0,e.p)(a,b,g)}let f=await (0,e.B)({proxyPoolId:c||""});return{id:"noauth",connectionName:"Public",isActive:!0,accessToken:"public",providerSpecificData:{connectionProxyEnabled:f.connectionProxyEnabled,connectionProxyUrl:f.connectionProxyUrl,connectionNoProxy:f.connectionNoProxy,connectionProxyPoolId:f.proxyPoolId||null,vercelRelayUrl:f.vercelRelayUrl||""}}}let l=await (0,d.getProviderConnections)({provider:g,isActive:!0});if(s.debug("AUTH",`${a} | total connections: ${l.length}, excludeIds: ${m.size>0?[...m].join(","):"none"}, model: ${c||"any"}`),0===l.length)return s.warn("AUTH",`No credentials for ${a}`),null;let p=await (0,d.mt)(),t=(0,j.p5)(p,g),u="antigravity"===g,v=u&&c?(0,r.d0)():null,w=l.filter(a=>{if(m.has(a.id)||(0,f.Bl)(a,c)||(0,k.kM)(a.id,t))return!1;if(u&&c&&v){let b=v.get(a.id)?.[c];if(b&&b.remainingPercentage<=0&&b.resetAt&&new Date(b.resetAt).getTime()>Date.now()){let d=a.id?.slice(0,8)||"unknown";return s.info("AG_QUOTA",`${d} | CACHE_BLOCK ${c} — skip upstream until ${b.resetAt}`),!1}}return!0}),x=(await Promise.all(w.map(async b=>(await q(b)).paused?(s.info("AUTH",`${a} | ${b.id?.slice(0,8)} skipped: quota paused (window below per-window threshold)`),null):b))).filter(Boolean);if(s.debug("AUTH",`${a} | available: ${x.length}/${l.length}`),l.forEach(a=>{let b=m.has(a.id),d=(0,f.Bl)(a,c);if(b||d){let e=(0,f.kJ)(a);s.debug("AUTH",` → ${a.id?.slice(0,8)} | ${b?"excluded":""} ${d?`modelLocked(${c}) until ${e}`:""}`)}}),0===x.length){let b=l.filter(a=>(0,f.Bl)(a,c)),d=b.map(a=>(0,f.kJ)(a)).filter(Boolean);u&&c&&v&&l.forEach(a=>{let b=v.get(a.id)?.[c]?.resetAt;b&&new Date(b).getTime()>Date.now()&&d.push(b)});let e=d.sort()[0]||null;if(e){let d=b[0];return s.warn("AUTH",`${a} | all ${l.length} accounts locked for ${c||"all"} (${(0,f.Qo)(e)}) | lastError=${d?.lastError?.slice(0,50)}`),{allRateLimited:!0,retryAfter:e,retryAfterHuman:(0,f.Qo)(e),lastError:d?.lastError||null,lastErrorCode:d?.errorCode||null}}let g=l.map(a=>(0,k.Vs)(a.id,t)).filter(a=>null!=a);if(g.length===l.length&&g.length>0){let b=Math.min(...g),c=new Date(Date.now()+b).toISOString();return s.warn("AUTH",`${a} | all ${l.length} accounts at the ${t} RPM cap (${Math.ceil(b/1e3)}s)`),{allRateLimited:!0,retryAfter:c,retryAfterHuman:(0,f.Qo)(c),lastError:`Local ${t} RPM cap reached for every ${a} account`,lastErrorCode:null}}return s.warn("AUTH",`${a} | all ${l.length} accounts unavailable`),null}let y=(p.providerStrategies||{})[g]||{},z=y.fallbackStrategy||p.fallbackStrategy||"fill-first";if(n&&(b=x.find(a=>a.id===n))&&s.info("AUTH",`${a} | pinned to ${b.id?.slice(0,8)} (${b.name||b.email||"unnamed"})`),b);else if(z===h.cL){let{connection:e,reason:f}=(0,i.Sn)(w,{model:c,config:p.latencyAwareConfig});b=e||w[0],s.debug("AUTH",`${a} | latency-aware → ${b.id?.slice(0,8)} (${f})`),await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:1})}else if("round-robin"===z){let a=y.stickyRoundRobinLimit||p.stickyRoundRobinLimit||3,c=[...x].sort((a,b)=>a.lastUsedAt||b.lastUsedAt?a.lastUsedAt?b.lastUsedAt?new Date(b.lastUsedAt)-new Date(a.lastUsedAt):-1:1:(a.priority||999)-(b.priority||999))[0],e=c?.consecutiveUseCount||0;c&&c.lastUsedAt&&e<a?(b=c,await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:(b.consecutiveUseCount||0)+1})):(b=[...x].sort((a,b)=>a.lastUsedAt||b.lastUsedAt?a.lastUsedAt?b.lastUsedAt?new Date(a.lastUsedAt)-new Date(b.lastUsedAt):1:-1:(a.priority||999)-(b.priority||999))[0],await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:1}))}else b=x[0];t>0&&(0,k.Vi)(b.id);let A=await (0,e.B)(b.providerSpecificData||{});return{authType:b.authType,apiKey:b.apiKey,accessToken:b.accessToken,refreshToken:b.refreshToken,idToken:b.idToken,expiresAt:b.expiresAt,expiresIn:b.expiresIn,lastRefreshAt:b.lastRefreshAt,projectId:b.projectId,connectionName:b.displayName||b.name||b.email||b.id,copilotToken:b.providerSpecificData?.copilotToken,providerSpecificData:{...b.providerSpecificData||{},connectionProxyEnabled:A.connectionProxyEnabled,connectionProxyUrl:A.connectionProxyUrl,connectionNoProxy:A.connectionNoProxy,connectionProxyPoolId:A.proxyPoolId||null,vercelRelayUrl:A.vercelRelayUrl||""},connectionId:b.id,testStatus:b.testStatus,lastError:b.lastError,_connection:b}}finally{l&&l()}}async function w(a,b,c,e=null,h=null,i=null){let k,l,m;if(!a||"noauth"===a)return{shouldFallback:!1,cooldownMs:0};let n=(await (0,d.getProviderConnections)({provider:e})).find(b=>b.id===a),o=n?.backoffLevel||0,p=(0,j.rs)(e),q=null;try{let a=await (0,d.mt)(),b=a?.retryDelayByProvider?.[p];if(null!=b&&"auto"!==b){let a=Number(b);Number.isFinite(a)&&a>0&&(q=Math.min(1e3*a,g.fh))}}catch{}let r=(0,f.hk)(b,c,o);if(r.shouldFallback&&i&&i>Date.now()?(k=!0,l="antigravity"===(0,j.rs)(e)?i-Date.now():Math.min(i-Date.now(),g.fh),m=0):({shouldFallback:k,cooldownMs:l,newBackoffLevel:m}=r,k&&null==(0,f.Ib)(c)&&(null!=q?(l=q,m=0):l>6e4&&u.has(p)&&(l=6e4))),!k)return{shouldFallback:!1,cooldownMs:0};let t=function(a){let b=a=>String(a).replace(/\s+/g," ").trim().slice(0,100);if("string"==typeof a)return a.slice(0,100);if(!a||"object"!=typeof a)return"Provider error";let c="string"==typeof a.code?a.code:"string"==typeof a.cause?.code?a.cause.code:null;if(a instanceof Error){let d=a.message?b(a.message):a.name||"Provider error";return c&&!d.includes(c)?b(`${d} (${c})`):d}for(let d of[a.error?.message,a.message,"string"==typeof a.error?a.error:null,a.detail,a.reason])if("string"==typeof d&&d.trim())return b(c&&!d.includes(c)?`${d} (${c})`:d);return c?b(`Provider error (${c})`):"Provider error"}(c),v=(0,f.S5)(h,l);await (0,d.updateProviderConnection)(a,{...v,testStatus:"unavailable",lastError:t,errorCode:b,lastErrorAt:new Date().toISOString(),backoffLevel:m??o});let x=Object.keys(v)[0],y=n?.displayName||n?.name||n?.email||a.slice(0,8);return s.warn("AUTH",`${y} locked ${x} for ${Math.round(l/1e3)}s [${b}]`),e&&b&&t&&console.error(`❌ ${e} [${b}]: ${t}`),{shouldFallback:!0,cooldownMs:l}}async function x(a,b,c=null){if(!a||"noauth"===a)return;let e=b._connection||b,f=Date.now(),g=Object.keys(e).filter(a=>a.startsWith("modelLock_"));if(!e.testStatus&&!e.lastError&&0===g.length)return;let h=g.filter(a=>{if(c&&a===`modelLock_${c}`||c&&"modelLock___all"===a)return!0;let b=e[a];return b&&new Date(b).getTime()<=f});if(0===h.length&&"unavailable"!==e.testStatus&&!e.lastError)return;let i=g.filter(a=>{if(h.includes(a))return!1;let b=e[a];return b&&new Date(b).getTime()>f}),j=Object.fromEntries(h.map(a=>[a,null]));0===i.length&&Object.assign(j,{testStatus:"active",lastError:null,errorCode:null,lastErrorAt:null,backoffLevel:0}),await (0,d.updateProviderConnection)(a,j)}function y(a){return z(a)[0]||null}function z(a){let b=[],c=a=>{a&&!b.includes(a)&&b.push(a)},d=a.headers.get("Authorization");return d?.startsWith("Bearer ")&&c(d.slice(7)),c(a.headers.get("x-api-key")),b}async function A(a){let b=z(a);for(let a of b)if(await (0,d.ek)(a))return{apiKey:a,valid:!0};return{apiKey:b[0]||null,valid:!1}}async function B(a){return!!a&&await (0,d.ek)(a)}},45974:(a,b,c)=>{c.d(b,{XJ:()=>p,d0:()=>m,vO:()=>l});var d=c(39326),e=c(72251),f=c(7803);let g=new Map,h=new Map,i=new Map,j=new Map,k=new Map;function l(a,b){let c=`${a}|${b}`;j.delete(c);let d=k.get(c);if(void 0===d)return;k.delete(c);let e=g.get(a);e?.[b]?.resetAt===new Date(d).toISOString()&&(delete e[b],g.set(a,e))}function m(){return g}async function n(a,b,c){let d=Date.now(),e=i.get(a);if(e)return e;let j=h.get(a)||0;if(d-j<3e4)return f.debug("AG_QUOTA",`${a.slice(0,8)} | skip refresh (${Math.round((d-j)/1e3)}s ago)`),g.get(a)||null;h.set(a,d);let k=o(a,b,c,d);i.set(a,k);try{return await k}finally{i.delete(a)}}async function o(a,b,c,h){try{let f=await (0,d.B)(c||{}),h={connectionProxyEnabled:!0===f.connectionProxyEnabled,connectionProxyUrl:f.connectionProxyUrl||"",connectionNoProxy:f.connectionNoProxy||"",vercelRelayUrl:f.vercelRelayUrl||"",strictProxy:!0===f.strictProxy},i=await (0,e.c)(b,c,h);if(!i?.quotas||i.message)return null;return g.set(a,function(a,b){let c=Date.now();for(let[d,e]of k)if(d.startsWith(`${a}|`)){if(e<=c){k.delete(d);continue}b[d.slice(a.length+1)]={remainingPercentage:0,resetAt:new Date(e).toISOString()}}return b}(a,i.quotas)),i.quotas}catch(b){return f.warn("AG_QUOTA",`${a.slice(0,8)} | refresh failed: ${b.message}`),null}}async function p(a,b,c,d,e){f.info("AG_QUOTA",`${a.slice(0,8)} | ${b} on ${c} — refreshing quota`);let h=(await n(a,d,e))?.[c];if(!h||h.remainingPercentage>0){let d=`${a}|${c}`,e=Date.now(),i=j.get(d),l=i&&e-i.windowStart<=6e4?i.windowStart:e,m=i&&l===i.windowStart?i.count+1:1;if(j.set(d,{count:m,windowStart:l}),m>=3){j.delete(d);let i=e+9e5,l=h?`${Math.round(h.remainingPercentage)}%`:"unknown";f.warn("AG_QUOTA",`${a.slice(0,8)} | STRIKE_${b} ${c} — ${m}x 429 (quota ${l}); CACHE_BLOCK 15m`);let n=g.get(a)||{};return n[c]={remainingPercentage:0,resetAt:new Date(i).toISOString()},g.set(a,n),k.set(d,i),i}return null}if(j.delete(`${a}|${c}`),!h.resetAt)return null;let i=new Date(h.resetAt).getTime();return i<=Date.now()?null:(f.warn("AG_QUOTA",`${a.slice(0,8)} | UPSTREAM_${b} ${c} — quota exhausted; CACHE_BLOCK until ${h.resetAt}`),i)}},49263:(a,b,c)=>{c.d(b,{Bl:()=>k,Ib:()=>e,Qo:()=>g,S5:()=>m,hk:()=>f,kJ:()=>l});var d=c(87252);function e(a,b=Date.now()){let c;if(!a)return null;let d="string"==typeof a?a:JSON.stringify(a);if(c=d.match(/"?retry[_-]?delay"?\s*[:=]\s*"?\s*([0-9]+(?:\.[0-9]+)?)\s*s/i))return Math.round(1e3*parseFloat(c[1]));if(c=d.match(/"?(?:resets?_at|x-?ratelimit-?reset|ratelimit-?reset)"?\s*[:=]\s*"?\s*([0-9]{9,})/i)){let a=parseInt(c[1],10);a<1e12&&(a*=1e3);let d=a-b;return d>0?d:null}return(c=d.match(/"?retry[_-]?after"?\s*[:=]\s*"?\s*([0-9]+)\b/i))?1e3*parseInt(c[1],10):null}function f(a,b,c=0){let g=b?("string"==typeof b?b:JSON.stringify(b)).toLowerCase():"",h=g.includes("invalid_encrypted_content")||g.includes("encrypted content")&&(g.includes("could not be verified")||g.includes("could not be decrypted or parsed"));if(400===a&&h)return{shouldFallback:!1,cooldownMs:0};if(d.t2.find(b=>b.status===a&&!1===b.fallback))return{shouldFallback:!1,cooldownMs:0,newBackoffLevel:c};for(let f of d.t2)if(f.pattern&&g&&f.pattern.test(g)||f.text&&g&&g.includes(f.text)||f.status&&f.status===a){if(f.permanent||!1===f.fallback)return{shouldFallback:!1,cooldownMs:0};if(f.backoff){let a=Math.min(c+1,d.EQ.maxLevel);return{shouldFallback:!0,cooldownMs:function(a,b){let c=function(a=0){let b=Math.max(0,a-1);return Math.min(d.EQ.base*Math.pow(2,b),d.EQ.max)}(a),f=e(b);return null!=f&&f>0?Math.min(Math.max(f,c),d.fh):c}(a,b),newBackoffLevel:a}}return{shouldFallback:!0,cooldownMs:f.cooldownMs}}return{shouldFallback:!1,cooldownMs:0}}function g(a){if(!a)return"";let b=new Date(a).getTime()-Date.now();if(b<=0)return"reset after 0s";let c=Math.ceil(b/1e3),d=Math.floor(c/3600),e=Math.floor(c%3600/60),f=c%60,g=[];return d>0&&g.push(`${d}h`),e>0&&g.push(`${e}m`),(f>0||0===g.length)&&g.push(`${f}s`),`reset after ${g.join(" ")}`}let h="modelLock_",i=`${h}__all`;function j(a){return a?`${h}${a}`:i}function k(a,b){let c=Date.now(),d=a=>{if(!a)return!1;let b=new Date(a).getTime();return Number.isFinite(b)&&b>c};return d(a[j(b)])||d(a[i])}function l(a){if(!a)return null;let b=null,c=Date.now();for(let[d,e]of Object.entries(a)){if(!d.startsWith(h)||!e)continue;let a=new Date(e).getTime();a<=c||(!b||a<b)&&(b=a)}return b?new Date(b).toISOString():null}function m(a,b){return{[j(a)]:new Date(Date.now()+b).toISOString()}}},60290:(a,b,c)=>{c.d(b,{C8:()=>t,DR:()=>s,IK:()=>m,Ps:()=>h,Qn:()=>q,SA:()=>p,UH:()=>k,Uc:()=>n,Ur:()=>g,Z1:()=>j,cI:()=>r,eo:()=>o,gx:()=>d,pH:()=>l,v1:()=>e,xM:()=>i}),c(87252);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,PAYLOAD_TOO_LARGE:413,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,sessionAffinityMaxSize:5e3,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20};function f(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}function g(){return{firstActionTimeoutMs:f("COMBO_RESPONSE_FIRST_ACTION_TIMEOUT_MS",5e3),maxBytes:f("COMBO_RESPONSE_PREFLIGHT_MAX_BYTES",65536)}}let h=process.env.SEARXNG_URL?.trim()||"http://localhost:8888/search",i=f("STREAM_STALL_TIMEOUT_MS",36e4),j=f("STREAM_FIRST_CHUNK_TIMEOUT_MS",3e4),k=(()=>{let a=process.env.SSE_KEEPALIVE_MS;if(null==a||""===a)return 1e4;let b=parseInt(a,10);return Number.isFinite(b)&&b>=0?b:1e4})(),l=f("FETCH_CONNECT_TIMEOUT_MS",6e4);f("RESPONSE_BODY_TIMEOUT_MS",3e5);let m=f("GEMINI_NATIVE_TTS_FETCH_TIMEOUT_MS",45e3),n=64e3,o=32e3,p="x-9router-token-saver",q={maxTokenLength:160,maxAttempts:32,headers:{requestedModel:"X-9Router-Requested-Model",routePath:"X-9Router-Route-Path",resolvedProvider:"X-9Router-Resolved-Provider",resolvedModel:"X-9Router-Resolved-Model",fallbackCount:"X-9Router-Fallback-Count",attemptedModels:"X-9Router-Attempted-Models"}},r={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function s(a){return null==a?{attempts:0,delayMs:2e3}:"number"==typeof a?{attempts:a,delayMs:2e3}:{attempts:a.attempts||0,delayMs:null!=a.delayMs?a.delayMs:2e3}}let t=["Please write a 5-10 word title for the following conversation:"]},79963:(a,b,c)=>{c.d(b,{CI:()=>f,Vi:()=>h,Vs:()=>i,kM:()=>g});let d=new Map;function e(a,b){let c=d.get(a);if(!c)return[];let e=b-6e4,f=0;for(;f<c.length&&c[f].t<=e;)f+=1;let g=0===f?c:c.slice(f);return g.length?d.set(a,g):d.delete(a),g}function f(a,b=Date.now()){return e(a,b).reduce((a,b)=>a+b.n,0)}function g(a,b,c=Date.now()){return!!b&&!(b<=0)&&f(a,c)>=b}function h(a,b=1,c){if(!a)return;let f=1,g=Date.now();if(void 0!==c?(f=b,g=c):"number"==typeof b&&(b>=1e6?(f=1,g=b):(f=b,g=Date.now())),!(f>0))return;let i=e(a,g);i.push({t:g,n:f}),d.set(a,i)}function i(a,b,c=Date.now()){if(!g(a,b,c))return null;let e=(d.get(a)||[])[0];return e?Math.max(0,e.t+6e4-c):null}},87252:(a,b,c)=>{c.d(b,{Dp:()=>g,EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},413:{type:"invalid_request_error",code:"context_length_exceeded"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"You exceeded your current quota",404:"Model not found",406:"Model not supported",413:"Your input exceeds the context window of this model",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:18e5,maxLevel:15},g=42e4,h=26784e5,i=[{text:"monthly_request_count",cooldownMs:216e5},{text:"monthly limit",cooldownMs:216e5},{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:413,fallback:!1},{status:429,backoff:!0}]},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}}};
@@ -1,9 +0,0 @@
1
- "use strict";exports.id=5083,exports.ids=[5083],exports.modules={34050:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=3,e=`
2
- PRAGMA journal_mode = WAL;
3
- PRAGMA synchronous = NORMAL;
4
- PRAGMA temp_store = MEMORY;
5
- PRAGMA mmap_size = 30000000;
6
- PRAGMA cache_size = -64000;
7
- PRAGMA foreign_keys = ON;
8
- PRAGMA busy_timeout = 5000;
9
- `,f={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",endpoint:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)"]},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)"]},errorLogs:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",endpoint:"TEXT",provider:"TEXT",model:"TEXT",connectionId:"TEXT",comboName:"TEXT",statusCode:"TEXT",errorMessage:"TEXT",request:"TEXT",providerRequest:"TEXT",providerResponse:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_el_ts ON errorLogs(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_el_provider ON errorLogs(provider)","CREATE INDEX IF NOT EXISTS idx_el_model ON errorLogs(model)","CREATE INDEX IF NOT EXISTS idx_el_conn ON errorLogs(connectionId)","CREATE INDEX IF NOT EXISTS idx_el_combo ON errorLogs(comboName)"]},tokenSaverDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},convoyRules:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT NOT NULL",enabled:"INTEGER DEFAULT 1",priority:"INTEGER DEFAULT 0",matchType:"TEXT NOT NULL DEFAULT 'literal'",action:"TEXT NOT NULL DEFAULT 'replace'",pattern:"TEXT NOT NULL",replacement:"TEXT DEFAULT ''",caseSensitive:"INTEGER DEFAULT 1",providerIds:"TEXT DEFAULT '[]'",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_cr_enabled ON convoyRules(enabled)","CREATE INDEX IF NOT EXISTS idx_cr_priority ON convoyRules(enabled, priority)"]}};function g(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}},75083:(a,b,c)=>{c.d(b,{runMigrationOnce:()=>w});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(20437),i=c(34050);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:"convoy-provider-scope",up(a){a.all("PRAGMA table_info(convoyRules)").some(a=>"providerIds"===a.name)||a.exec("ALTER TABLE convoyRules ADD COLUMN providerIds TEXT DEFAULT '[]'")}},{version:2,name:"api-key-policies",up(a){let b=new Set(a.all("PRAGMA table_info(apiKeys)").map(a=>a.name));for(let[c,d]of Object.entries({expiresAt:"TEXT",tokenLimit:"INTEGER",tokensUsed:"INTEGER NOT NULL DEFAULT 0",tokensReserved:"INTEGER NOT NULL DEFAULT 0",allowedModels:"TEXT"}))b.has(c)||a.exec(`ALTER TABLE apiKeys ADD COLUMN ${c} ${d}`)},version:3}].sort((a,b)=>a.version-b.version);var k=c(8677);let l=null;function m(){if(l)return l;try{let a=g().join(process.cwd(),"package.json");l=JSON.parse(e().readFileSync(a,"utf-8")).version||"0.0.0"}catch{l="0.0.0"}return l}let n=["requestDetails"];function o(a){(0,h.Jh)();let b=m(),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(){if(e().existsSync(h.KQ))for(let a of e().readdirSync(h.KQ,{withFileTypes:!0}).filter(a=>a.isDirectory()).map(a=>({name:a.name,full:g().join(h.KQ,a.name),mtime:e().statSync(g().join(h.KQ,a.name)).mtimeMs})).sort((a,b)=>b.mtime-a.mtime).slice(3))try{e().rmSync(a.full,{recursive:!0,force:!0})}catch{}}var q=c(50743);let r=g().join(h.HG,".migrated-from-json"),s=new WeakSet;class t extends Error{constructor(a,b){super(a),this.name="MigrationAborted",this.droppedRows=b}}function u(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 t(`${b} row-count mismatch: expected ${c.length}, got ${g}`,f)}function v(a){if(!e().existsSync(a))return null;try{return JSON.parse(e().readFileSync(a,"utf-8"))}catch{return null}}async function w(a){if(s.has(a))return;s.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);p(),a.exec((0,i.zE)("_meta",i.CG._meta));let c=parseInt((0,k.dy)(a,"backupSchemaVersion","0"),10)||0;if(!b&&c<i.f$)try{let b=o(`schema-${c}-to-${i.f$}`);!function(a,b,c="data.sqlite"){let d=g().join(b,c);try{e().rmSync(d,{force:!0})}catch{}let f=d.replace(/'/g,"''");a.exec(`ATTACH DATABASE '${f}' AS bak`);try{let b=new Set(n),c=a.all("SELECT name, sql FROM main.sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'").filter(a=>!b.has(a.name));a.transaction(()=>{for(let b of c){let c=b.sql.replace(/CREATE TABLE\s+/i,"CREATE TABLE bak.");a.exec(c),a.exec(`INSERT INTO bak.${b.name} SELECT * FROM main.${b.name}`)}})}finally{try{a.exec("DETACH DATABASE bak")}catch{}}}(a,b),p(),console.log(`[DB][migrate] pre-schema backup ${c} → ${i.f$}: ${b}`)}catch(a){console.warn(`[DB][migrate] pre-schema backup failed (continuing): ${a.message}`)}!function(a){a.exec((0,i.zE)("_meta",i.CG._meta));let b=parseInt((0,k.dy)(a,"schemaVersion","0"),10)||0;if(b>=(j.length?j[j.length-1].version:0))return;let c=j.filter(a=>a.version>b);for(let b of c)a.transaction(()=>{b.up(a),(0,k.np)(a,"schemaVersion",b.version)}),b.version,console.log(`[DB][migrate] applied #${b.version} ${b.name}`);c.length}(a);for(let[b,c]of Object.entries(i.CG)){a.exec((0,i.zE)(b,c));let d=new Set(a.all(`PRAGMA table_info(${b})`).map(a=>a.name));for(let[e,f]of Object.entries(c.columns))if(!d.has(e)){let c=f.replace(/PRIMARY KEY( AUTOINCREMENT)?/i,"").replace(/UNIQUE/i,"").trim();try{a.exec(`ALTER TABLE ${b} ADD COLUMN ${e} ${c}`),console.log(`[DB][sync] +column ${b}.${e}`)}catch(a){console.warn(`[DB][sync] add column ${b}.${e} failed: ${a.message}`)}}for(let b of c.indexes||[])try{a.exec(b)}catch{}}(0,k.np)(a,"backupSchemaVersion",i.f$);let d=e().existsSync(r),f=v(h.Or.main),l=v(h.Or.usage),w=v(h.Or.disabled),x=v(h.Or.details);if(b&&(f||l||w||x)&&!d){let b=Date.now(),c=o("migrate-from-json");for(let a of Object.values(h.Or))!function(a,b,c=null){if(!e().existsSync(a))return;let d=c||g().basename(a),f=g().join(b,d);e().copyFileSync(a,f)}(a,c);try{a.transaction(()=>{if(f&&"object"==typeof f){for(let[b,c]of(f.settings&&a.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,q.s)(f.settings)]),u(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,q.s)(l),j||new Date().toISOString(),k||new Date().toISOString()])},a=>({id:a.id??null,provider:a.provider??null,name:a.name??null})),u(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,q.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null,type:a.type??null,name:a.name??null})),u(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,q.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null})),u(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})),u(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,q.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,q.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,q.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,q.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,q.s)(c||{})])}if(l&&"object"==typeof l){for(let b of l.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,q.s)(c),(0,q.s)({})])}for(let[b,c]of Object.entries(l.dailySummary||{}))a.run("INSERT OR REPLACE INTO usageDaily(dateKey, data) VALUES(?, ?)",[b,(0,q.s)(c)]);"number"==typeof l.totalRequestsLifetime&&(0,k.np)(a,"totalRequestsLifetime",l.totalRequestsLifetime)}if(w&&"object"==typeof w.disabled)for(let[b,c]of Object.entries(w.disabled))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('disabledModels', ?, ?)",[b,(0,q.s)(c||[])]);if(x&&Array.isArray(x.records))for(let b of x.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,q.s)(b)]);(0,k.np)(a,"appVersion",m()),(0,k.np)(a,"backupSchemaVersion",i.f$),(0,k.np)(a,"migratedAt",new Date().toISOString())})}catch(a){if(a instanceof t)return void console.error(`[DB][migrate] aborted: ${a.message} | legacy JSON kept | backup: ${c}`);throw a}try{e().writeFileSync(r,new Date().toISOString())}catch{}p(),console.log(`[DB][migrate] JSON → SQLite in ${Date.now()-b}ms | legacy JSON kept at DATA_DIR | backup: ${c}`);return}let y=m();(0,k.dy)(a,"appVersion",null)!==y&&(0,k.np)(a,"appVersion",y)}}};
@@ -1,39 +0,0 @@
1
- "use strict";exports.id=5129,exports.ids=[5129],exports.modules={644:(a,b,c)=>{function d(a,b=null){if(null==a)return b;if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return b}}function e(a){return JSON.stringify(a??null)}c.d(b,{q:()=>d,s:()=>e})},1129:(a,b,c)=>{c.r(b),c.d(b,{createProviderNode:()=>k,deleteProviderNode:()=>m,getProviderNodeById:()=>j,getProviderNodes:()=>i,updateProviderNode:()=>l});var d=c(94755),e=c(36366),f=c(644);function g(a){return a?{...(0,f.q)(a.data,{}),id:a.id,type:a.type,name:a.name,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}function h(a,b){let c=function(a){let{id:b,type:c,name:d,createdAt:e,updatedAt:g,...h}=a;return{id:b,type:c??null,name:d??null,data:(0,f.s)(h),createdAt:e,updatedAt:g}}(b);a.run(`INSERT INTO providerNodes(id, type, name, data, createdAt, updatedAt)
2
- VALUES(?, ?, ?, ?, ?, ?)
3
- ON CONFLICT(id) DO UPDATE SET
4
- type=excluded.type, name=excluded.name, data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.type,c.name,c.data,c.createdAt,c.updatedAt])}async function i(a={}){let b=await (0,e.c)(),c=[],d=[];a.type&&(c.push("type = ?"),d.push(a.type));let f=`SELECT * FROM providerNodes${c.length?` WHERE ${c.join(" AND ")}`:""}`;return b.all(f,d).map(g)}async function j(a){return g((await (0,e.c)()).get("SELECT * FROM providerNodes WHERE id = ?",[a]))}async function k(a){let b=await (0,e.c)(),c=new Date().toISOString(),f={id:a.id||(0,d.A)(),type:a.type,name:a.name,prefix:a.prefix,apiType:a.apiType,baseUrl:a.baseUrl,clientIdentityProfile:a.clientIdentityProfile,clientIdentityHeaders:a.clientIdentityHeaders,createdAt:c,updatedAt:c};return h(b,f),f}async function l(a,b){let c=await (0,e.c)(),d=null;return c.transaction(()=>{let e=c.get("SELECT * FROM providerNodes WHERE id = ?",[a]);if(!e)return;let f={...g(e),...b,updatedAt:new Date().toISOString()};h(c,f),d=f}),d}async function m(a){let b=await (0,e.c)(),c=null;return b.transaction(()=>{let d=b.get("SELECT * FROM providerNodes WHERE id = ?",[a]);d&&(c=g(d),b.run("DELETE FROM providerNodes WHERE id = ?",[a]))}),c}},5129:(a,b,c)=>{c.d(b,{S8:()=>y.S8,E5:()=>aa,Ld:()=>q.budgetPeriodMs,bI:()=>g.cleanupProviderConnections,Iq:()=>q.createApiKey,jd:()=>v,iE:()=>g.createProviderConnection,i0:()=>h.createProviderNode,ZO:()=>n,Lh:()=>q.deleteApiKey,CG:()=>x,uL:()=>y.uL,fv:()=>y.fv,fK:()=>g.deleteProviderConnection,op:()=>g.deleteProviderConnectionsByProvider,Pc:()=>h.deleteProviderNode,Yd:()=>p,tm:()=>C,oF:()=>D,zP:()=>aw,rg:()=>X,yg:()=>q.getApiKeyById,y7:()=>q.getApiKeyByValue,PX:()=>q.getApiKeys,j$:()=>_,L:()=>t,Dj:()=>u,Uv:()=>s,uv:()=>y.uv,vF:()=>B,Lk:()=>ap,c:()=>y.getMitmAlias,OM:()=>y.OM,r4:()=>z.r4,Mc:()=>g.getProviderConnectionById,P:()=>g.getProviderConnections,Qu:()=>h.getProviderNodeById,Fh:()=>h.getProviderNodes,hr:()=>m,ui:()=>l,Zx:()=>ab,SL:()=>ao,mt:()=>f.getSettings,wV:()=>au,BY:()=>$,K1:()=>ax,mV:()=>q.reserveApiKeyTokens,VT:()=>z.VT,yF:()=>z.yF,QB:()=>av.QB,ox:()=>an,sZ:()=>Y,L9:()=>y.L9,o5:()=>y.o5,_V:()=>P,uw:()=>V,XW:()=>q.updateApiKey,oG:()=>w,KJ:()=>z.KJ,rj:()=>g.updateProviderConnection,ho:()=>h.updateProviderNode,Q_:()=>o,Xx:()=>f.Xx,ek:()=>q.validateApiKey});var d=c(36366),e=c(644),f=c(42655),g=c(5781),h=c(1129),i=c(94755);function j(a){return a?{...(0,e.q)(a.data,{}),id:a.id,isActive:1===a.isActive||!0===a.isActive,testStatus:a.testStatus,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}function k(a,b){let c=function(a){let{id:b,isActive:c,testStatus:d,createdAt:f,updatedAt:g,...h}=a;return{id:b,isActive:+(!1!==c),testStatus:d??null,data:(0,e.s)(h),createdAt:f,updatedAt:g}}(b);a.run(`INSERT INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt)
5
- VALUES(?, ?, ?, ?, ?, ?)
6
- ON CONFLICT(id) DO UPDATE SET
7
- isActive=excluded.isActive, testStatus=excluded.testStatus,
8
- data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.isActive,c.testStatus,c.data,c.createdAt,c.updatedAt])}async function l(a={}){let b=await (0,d.c)(),c=[],e=[];void 0!==a.isActive&&(c.push("isActive = ?"),e.push(+!!a.isActive)),a.testStatus&&(c.push("testStatus = ?"),e.push(a.testStatus));let f=`SELECT * FROM proxyPools${c.length?` WHERE ${c.join(" AND ")}`:""}`,g=b.all(f,e).map(j);return g.sort((a,b)=>new Date(b.updatedAt||0)-new Date(a.updatedAt||0)),g}async function m(a){return j((await (0,d.c)()).get("SELECT * FROM proxyPools WHERE id = ?",[a]))}async function n(a){let b=await (0,d.c)(),c=new Date().toISOString(),e={id:a.id||(0,i.A)(),name:a.name,proxyUrl:a.proxyUrl,noProxy:a.noProxy||"",type:a.type||"http",isActive:void 0===a.isActive||a.isActive,strictProxy:!0===a.strictProxy,testStatus:a.testStatus||"unknown",lastTestedAt:a.lastTestedAt||null,lastError:a.lastError||null,createdAt:c,updatedAt:c};return k(b,e),e}async function o(a,b){let c=await (0,d.c)(),e=null;return c.transaction(()=>{let d=c.get("SELECT * FROM proxyPools WHERE id = ?",[a]);if(!d)return;let f={...j(d),...b,updatedAt:new Date().toISOString()};k(c,f),e=f}),e}async function p(a){let b=await (0,d.c)(),c=null;return b.transaction(()=>{let d=b.get("SELECT * FROM proxyPools WHERE id = ?",[a]);d&&(c=j(d),b.run("DELETE FROM proxyPools WHERE id = ?",[a]))}),c}var q=c(74452);function r(a){return a?{id:a.id,name:a.name,kind:a.kind,models:(0,e.q)(a.models,[]),createdAt:a.createdAt,updatedAt:a.updatedAt}:null}async function s(){return(await (0,d.c)()).all("SELECT * FROM combos ORDER BY createdAt ASC").map(r)}async function t(a){return r((await (0,d.c)()).get("SELECT * FROM combos WHERE id = ?",[a]))}async function u(a){return r((await (0,d.c)()).get("SELECT * FROM combos WHERE name = ?",[a]))}async function v(a){let b=await (0,d.c)(),c=new Date().toISOString(),f={id:(0,i.A)(),name:a.name,kind:a.kind||null,models:a.models||[],createdAt:c,updatedAt:c};return b.run("INSERT INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[f.id,f.name,f.kind,(0,e.s)(f.models),f.createdAt,f.updatedAt]),f}async function w(a,b){let c=await (0,d.c)(),f=null;return c.transaction(()=>{let d=c.get("SELECT * FROM combos WHERE id = ?",[a]);if(!d)return;let g={...r(d),...b,updatedAt:new Date().toISOString()};c.run("UPDATE combos SET name = ?, kind = ?, models = ?, updatedAt = ? WHERE id = ?",[g.name,g.kind,(0,e.s)(g.models||[]),g.updatedAt,a]),f=g}),f}async function x(a){let b=(await (0,d.c)()).run("DELETE FROM combos WHERE id = ?",[a]);return(b?.changes??0)>0}var y=c(9460),z=c(97914);let A="disabledModels";async function B(){let a=(await (0,d.c)()).all("SELECT key, value FROM kv WHERE scope = ?",[A]),b={};for(let c of a)b[c.key]=(0,e.q)(c.value,[]);return b}async function C(a,b){if(!a||!Array.isArray(b))return;let c=await (0,d.c)();c.transaction(()=>{let d=c.get("SELECT value FROM kv WHERE scope = ? AND key = ?",[A,a]),f=[...new Set([...d&&(0,e.q)(d.value,[])||[],...b])];c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[A,a,(0,e.s)(f)])})}async function D(a,b){if(!a)return;let c=await (0,d.c)();c.transaction(()=>{if(!Array.isArray(b)||0===b.length)return void c.run("DELETE FROM kv WHERE scope = ? AND key = ?",[A,a]);let d=c.get("SELECT value FROM kv WHERE scope = ? AND key = ?",[A,a]),f=d&&(0,e.q)(d.value,[])||[],g=new Set(b),h=f.filter(a=>!g.has(a));0===h.length?c.run("DELETE FROM kv WHERE scope = ? AND key = ?",[A,a]):c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[A,a,(0,e.s)(h)])})}var E=c(94735),F=c(77598);function G(a){return a&&"string"==typeof a?a.length<=8?a.charAt(0)+"***":a.slice(0,8)+"***":null}function H(a,b){return a&&"string"==typeof a?b?.id?`api-key:${b.id}`:`api-key:sha256:${(0,F.createHash)("sha256").update(a).digest("hex")}`:"local-no-key"}function I(a,b,c){if(!a||"string"!=typeof a)return"Local (No API Key)";let d="string"==typeof b?.name&&b.name.trim()||G(a),e=String(b?.id||c.split(":").at(-1)).slice(0,8);return`${d} (${e})`}c(62674);global._pendingRequests||(global._pendingRequests={byModel:{},byAccount:{}}),global._lastErrorProvider||(global._lastErrorProvider={provider:"",ts:0}),global._statsEmitter||(global._statsEmitter=new E.EventEmitter,global._statsEmitter.setMaxListeners(50)),global._pendingTimers||(global._pendingTimers={}),global._recentRing||(global._recentRing={items:[],initialized:!1}),global._connectionMapCache||(global._connectionMapCache={map:{},ts:0}),global._statsEmitTimers||(global._statsEmitTimers={pending:null,update:null});let J=global._pendingRequests,K=global._lastErrorProvider,L=global._pendingTimers,M=global._recentRing,N=global._connectionMapCache,O=global._statsEmitTimers,P=global._statsEmitter;function Q(a,b=150){let c="update"===a?"update":"pending";O[c]||(O[c]=setTimeout(()=>{O[c]=null,P.emit(a)},b),O[c]?.unref?.())}function R(a,b,c){a[b]||(a[b]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),a[b].requests+=c.requests||1,a[b].promptTokens+=c.promptTokens||0,a[b].completionTokens+=c.completionTokens||0,a[b].cachedTokens+=c.cachedTokens||0,a[b].cost+=c.cost||0,c.meta&&Object.assign(a[b],c.meta)}async function S(){if(Date.now()-N.ts<3e4)return N.map;try{let{getProviderConnections:a}=await Promise.resolve().then(c.bind(c,5781)),b=await a(),d={};for(let a of b)d[a.id]=a.name||a.email||a.id;N.map=d,N.ts=Date.now()}catch{}return N.map}async function T(){if(!M.initialized){M.initialized=!0;try{M.items=(await (0,d.c)()).all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, cost, status, tokens, meta FROM usageHistory ORDER BY id DESC LIMIT ?",[50]).reverse().map(a=>({timestamp:a.timestamp,provider:a.provider,model:a.model,connectionId:a.connectionId,apiKey:a.apiKey,endpoint:a.endpoint,cost:a.cost,status:a.status,tokens:(0,e.q)(a.tokens,{}),requestedModel:a.meta&&(0,e.q)(a.meta,{}).requestedModel||null}))}catch{}}}async function U(a,b,d){if(!d||!a||!b)return 0;try{let{getPricingForModel:e}=await Promise.resolve().then(c.bind(c,97914)),f=await e(a,b);if(!f)return 0;let{calculateCostFromTokens:g}=await c.e(4646).then(c.bind(c,84646));return g(d,f)}catch(a){return console.error("Error calculating cost:",a),0}}function V(a,b,c,d,e=!1){let f=b?`${a} (${b})`:a,g=`${c}|${f}`;J.byModel[f]||(J.byModel[f]=0),J.byModel[f]=Math.max(0,J.byModel[f]+(d?1:-1)),0===J.byModel[f]&&delete J.byModel[f],c&&(J.byAccount[c]||(J.byAccount[c]={}),J.byAccount[c][f]||(J.byAccount[c][f]=0),J.byAccount[c][f]=Math.max(0,J.byAccount[c][f]+(d?1:-1)),0===J.byAccount[c][f]&&(delete J.byAccount[c][f],0===Object.keys(J.byAccount[c]).length&&delete J.byAccount[c])),d?(clearTimeout(L[g]),L[g]=setTimeout(()=>{delete L[g],J.byModel[f]>0&&(J.byModel[f]=0),c&&J.byAccount[c]?.[f]>0&&(J.byAccount[c][f]=0),Q("pending")},6e4)):(clearTimeout(L[g]),delete L[g]),!d&&e&&b&&(K.provider=b.toLowerCase(),K.ts=Date.now()),Q("pending")}function W(a){let b="string"==typeof a.tokens?(0,e.q)(a.tokens,{}):a.tokens||{},c=a.requestedModel||a.meta&&(0,e.q)(a.meta,{}).requestedModel||null;return{timestamp:a.timestamp,model:a.model||"",requestedModel:c||null,provider:a.provider||"",promptTokens:b.prompt_tokens||b.input_tokens||0,completionTokens:b.completion_tokens||b.output_tokens||0,status:a.status||"ok"}}async function X(){let a=[],b=await S();for(let[c,d]of Object.entries(J.byAccount))for(let[e,f]of Object.entries(d))if(f>0){let d=b[c]||`Account ${c.slice(0,8)}...`,g=e.match(/^(.*) \((.*)\)$/);a.push({model:g?g[1]:e,provider:g?g[2]:"unknown",account:d,count:f})}await T();let c=new Set;return{activeRequests:a,recentRequests:[...M.items].sort((a,b)=>new Date(b.timestamp)-new Date(a.timestamp)).map(W).filter(a=>{if(0===a.promptTokens&&0===a.completionTokens)return!1;let b=a.timestamp?a.timestamp.slice(0,16):"",d=`${a.model}|${a.provider}|${a.promptTokens}|${a.completionTokens}|${b}`;return!c.has(d)&&(c.add(d),!0)}).slice(0,20),errorProvider:Date.now()-K.ts<1e4?K.provider:""}}async function Y(a){try{let b=await (0,d.c)();a.timestamp||(a.timestamp=new Date().toISOString()),a.cost=await U(a.provider,a.model,a.tokens);let c=a.tokens||{},f=c.prompt_tokens||c.input_tokens||0,g=c.completion_tokens||c.output_tokens||0,h=!1;(b.transaction(()=>{var d;let i,j,k,l,m,n,o,p,q,r,s,t=a.endpoint?b.get(`SELECT id FROM usageHistory
9
- WHERE timestamp = ?
10
- AND COALESCE(provider, '') = COALESCE(?, '')
11
- AND COALESCE(model, '') = COALESCE(?, '')
12
- AND COALESCE(connectionId, '') = COALESCE(?, '')
13
- AND COALESCE(apiKey, '') = COALESCE(?, '')
14
- AND promptTokens = ?
15
- AND completionTokens = ?
16
- AND COALESCE(endpoint, '') = ''
17
- ORDER BY id DESC LIMIT 1`,[a.timestamp,a.provider||null,a.model||null,a.connectionId||null,a.apiKey||null,f,g]):null;if(t)return void b.run("UPDATE usageHistory SET endpoint = ? WHERE id = ?",[a.endpoint,t.id]);b.run("INSERT INTO usageHistory(timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, status, tokens, meta) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[a.timestamp,a.provider||null,a.model||null,a.connectionId||null,a.apiKey||null,a.endpoint||null,f,g,a.cost||0,a.status||"ok",(0,e.s)(c),(0,e.s)({requestedModel:a.requestedModel||null})]);let u=(i=(d=a.timestamp)?new Date(d):new Date,`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}-${String(i.getDate()).padStart(2,"0")}`),v=b.get("SELECT data FROM usageDaily WHERE dateKey = ?",[u]),w=v?(0,e.q)(v.data,{}):{requests:0,promptTokens:0,completionTokens:0,cost:0,byProvider:{},byModel:{},byAccount:{},byApiKey:{},byEndpoint:{}};j=a.tokens?.prompt_tokens||a.tokens?.input_tokens||0,k=a.tokens?.completion_tokens||a.tokens?.output_tokens||0,l=a.tokens?.cached_tokens||a.tokens?.cache_read_input_tokens||0,m=a.cost||0,n={promptTokens:j,completionTokens:k,cachedTokens:l,cost:m},w.requests=(w.requests||0)+1,w.promptTokens=(w.promptTokens||0)+j,w.completionTokens=(w.completionTokens||0)+k,w.cachedTokens=(w.cachedTokens||0)+l,w.cost=(w.cost||0)+m,w.byProvider||={},w.byModel||={},w.byAccount||={},w.byApiKey||={},w.byEndpoint||={},a.provider&&R(w.byProvider,a.provider,n),o=a.provider?`${a.model}|${a.provider}`:a.model,R(w.byModel,o,{...n,meta:{rawModel:a.model,provider:a.provider}}),a.connectionId&&R(w.byAccount,a.connectionId,{...n,meta:{rawModel:a.model,provider:a.provider}}),p=a.apiKey&&"string"==typeof a.apiKey?a.apiKey:"local-no-key",q=`${p}|${a.model}|${a.provider||"unknown"}`,R(w.byApiKey,q,{...n,meta:{rawModel:a.model,provider:a.provider,apiKey:a.apiKey||null}}),r=a.endpoint||"Unknown",s=`${r}|${a.model}|${a.provider||"unknown"}`,R(w.byEndpoint,s,{...n,meta:{endpoint:r,rawModel:a.model,provider:a.provider}}),b.run("INSERT INTO usageDaily(dateKey, data) VALUES(?, ?) ON CONFLICT(dateKey) DO UPDATE SET data = excluded.data",[u,(0,e.s)(w)]);let x=b.get("SELECT value FROM _meta WHERE key = 'totalRequestsLifetime'"),y=(x?parseInt(x.value,10):0)+1;b.run("INSERT INTO _meta(key, value) VALUES('totalRequestsLifetime', ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[String(y)]),h=!0}),h)&&(M.items.push(a),M.items.length>50&&(M.items=M.items.slice(-50)),Q("update",250))}catch(a){console.error("Failed to save usage stats:",a)}}function Z(a,b){if(null==b)return a.all("SELECT dateKey, data FROM usageDaily");let c=new Date,d=new Date(c.getFullYear(),c.getMonth(),c.getDate()-b+1),e=`${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,"0")}-${String(d.getDate()).padStart(2,"0")}`;return a.all("SELECT dateKey, data FROM usageDaily WHERE dateKey >= ?",[e])}async function $(a="all"){let b=await (0,d.c)(),[{getProviderConnections:f},{getApiKeys:g},{getProviderNodes:h}]=await Promise.all([Promise.resolve().then(c.bind(c,5781)),Promise.resolve().then(c.bind(c,74452)),Promise.resolve().then(c.bind(c,1129))]),i=[];try{i=await f()}catch{}let j={};for(let a of i)j[a.id]=a.name||a.email||a.id;let k={};try{for(let a of(await h()))a.id&&a.name&&(k[a.id]=a.name)}catch{}let l=[];try{l=await g()}catch{}let m={};for(let a of l)m[a.key]={name:a.name,id:a.id,createdAt:a.createdAt};let n=b.all("SELECT timestamp, provider, model, tokens, status, meta FROM usageHistory ORDER BY id DESC LIMIT 100"),o=new Set,p={totalRequests:0,totalPromptTokens:0,totalCompletionTokens:0,totalCachedTokens:0,totalCost:0,byProvider:{},byModel:{},byAccount:{},byApiKey:{},byEndpoint:{},last10Minutes:[],pending:J,activeRequests:[],recentRequests:n.map(W).filter(a=>{if(0===a.promptTokens&&0===a.completionTokens)return!1;let b=a.timestamp?a.timestamp.slice(0,16):"",c=`${a.model}|${a.provider}|${a.promptTokens}|${a.completionTokens}|${b}`;return!o.has(c)&&(o.add(c),!0)}).slice(0,20),errorProvider:Date.now()-K.ts<1e4?K.provider:""};for(let[a,b]of Object.entries(J.byAccount))for(let[c,d]of Object.entries(b))if(d>0){let b=j[a]||`Account ${a.slice(0,8)}...`,e=c.match(/^(.*) \((.*)\)$/);p.activeRequests.push({model:e?e[1]:c,provider:e?e[2]:"unknown",account:b,count:d})}let q=new Date,r=new Date(6e4*Math.floor(q.getTime()/6e4)),s=new Date(r.getTime()-54e4),t={};for(let a=0;a<10;a++){let b=r.getTime()-(9-a)*6e4;t[b]={requests:0,promptTokens:0,completionTokens:0,cost:0},p.last10Minutes.push(t[b])}for(let a of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ? AND timestamp <= ?",[s.toISOString(),q.toISOString()])){let b=6e4*Math.floor(new Date(a.timestamp).getTime()/6e4);t[b]&&(t[b].requests++,t[b].promptTokens+=a.promptTokens||0,t[b].completionTokens+=a.completionTokens||0,t[b].cost+=a.cost||0)}if("24h"!==a&&"today"!==a){let c={"7d":7,"30d":30,"60d":60,"90d":90,"180d":180,"365d":365}[a]||null;for(let a of Z(b,c)){let b=a.dateKey,c=(0,e.q)(a.data,{});for(let[a,b]of(p.totalPromptTokens+=c.promptTokens||0,p.totalCompletionTokens+=c.completionTokens||0,p.totalCachedTokens+=c.cachedTokens||0,p.totalCost+=c.cost||0,Object.entries(c.byProvider||{})))p.byProvider[a]||(p.byProvider[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),p.byProvider[a].requests+=b.requests||0,p.byProvider[a].promptTokens+=b.promptTokens||0,p.byProvider[a].completionTokens+=b.completionTokens||0,p.byProvider[a].cachedTokens+=b.cachedTokens||0,p.byProvider[a].cost+=b.cost||0;for(let[a,d]of Object.entries(c.byModel||{})){let c=d.rawModel||a.split("|")[0],e=d.provider||a.split("|")[1]||"",f=e?`${c} (${e})`:c,g=k[e]||e;p.byModel[f]||(p.byModel[f]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:c,provider:g,lastUsed:b}),p.byModel[f].requests+=d.requests||0,p.byModel[f].promptTokens+=d.promptTokens||0,p.byModel[f].completionTokens+=d.completionTokens||0,p.byModel[f].cachedTokens+=d.cachedTokens||0,p.byModel[f].cost+=d.cost||0,b>(p.byModel[f].lastUsed||"")&&(p.byModel[f].lastUsed=b)}for(let[a,d]of Object.entries(c.byAccount||{})){let c=j[a]||`Account ${a.slice(0,8)}...`,e=d.rawModel||"",f=d.provider||"",g=k[f]||f,h=`${e} (${f} - ${c})`;p.byAccount[h]||(p.byAccount[h]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:e,provider:g,connectionId:a,accountName:c,lastUsed:b}),p.byAccount[h].requests+=d.requests||0,p.byAccount[h].promptTokens+=d.promptTokens||0,p.byAccount[h].completionTokens+=d.completionTokens||0,p.byAccount[h].cachedTokens+=d.cachedTokens||0,p.byAccount[h].cost+=d.cost||0,b>(p.byAccount[h].lastUsed||"")&&(p.byAccount[h].lastUsed=b)}for(let a of Object.values(c.byApiKey||{})){let c=a.rawModel||"",d=a.provider||"",e=k[d]||d,f=a.apiKey,g=f?m[f]:null,h=G(f),i=H(f,g),j=I(f,g,i),l=`${i}|${c}|${d||"unknown"}`;p.byApiKey[l]||(p.byApiKey[l]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:c,provider:e,apiKeyMasked:h,keyName:j,apiKeyKey:i,lastUsed:b}),p.byApiKey[l].requests+=a.requests||0,p.byApiKey[l].promptTokens+=a.promptTokens||0,p.byApiKey[l].completionTokens+=a.completionTokens||0,p.byApiKey[l].cachedTokens+=a.cachedTokens||0,p.byApiKey[l].cost+=a.cost||0,b>(p.byApiKey[l].lastUsed||"")&&(p.byApiKey[l].lastUsed=b)}for(let[a,d]of Object.entries(c.byEndpoint||{})){let c=d.endpoint||a.split("|")[0]||"Unknown",e=d.rawModel||"",f=d.provider||"",g=k[f]||f;p.byEndpoint[a]||(p.byEndpoint[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,endpoint:c,rawModel:e,provider:g,lastUsed:b}),p.byEndpoint[a].requests+=d.requests||0,p.byEndpoint[a].promptTokens+=d.promptTokens||0,p.byEndpoint[a].completionTokens+=d.completionTokens||0,p.byEndpoint[a].cachedTokens+=d.cachedTokens||0,p.byEndpoint[a].cost+=d.cost||0,b>(p.byEndpoint[a].lastUsed||"")&&(p.byEndpoint[a].lastUsed=b)}}let d=c?Date.now()-864e5*c:0;for(let a of b.all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint FROM usageHistory WHERE timestamp >= ?",[new Date(d).toISOString()])){let b=a.timestamp,c=a.provider?`${a.model} (${a.provider})`:a.model;if(p.byModel[c]&&new Date(b)>new Date(p.byModel[c].lastUsed)&&(p.byModel[c].lastUsed=b),a.connectionId){let c=j[a.connectionId]||`Account ${a.connectionId.slice(0,8)}...`,d=`${a.model} (${a.provider} - ${c})`;p.byAccount[d]&&new Date(b)>new Date(p.byAccount[d].lastUsed)&&(p.byAccount[d].lastUsed=b)}let d=a.apiKey?m[a.apiKey]:null,e=`${H(a.apiKey,d)}|${a.model}|${a.provider||"unknown"}`;p.byApiKey[e]&&new Date(b)>new Date(p.byApiKey[e].lastUsed)&&(p.byApiKey[e].lastUsed=b);let f=a.endpoint||"Unknown",g=`${f}|${a.model}|${a.provider||"unknown"}`;p.byEndpoint[g]&&new Date(b)>new Date(p.byEndpoint[g].lastUsed)&&(p.byEndpoint[g].lastUsed=b)}}else{let c;if("today"===a){let a=new Date;a.setHours(0,0,0,0),c=a.toISOString()}else c=new Date(Date.now()-864e5).toISOString();for(let a of b.all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, tokens FROM usageHistory WHERE timestamp >= ?",[c])){let b=(0,e.q)(a.tokens,{})||{},c=a.promptTokens||b.prompt_tokens||b.input_tokens||0,d=a.completionTokens||b.completion_tokens||b.output_tokens||0,f=b.cached_tokens||b.cache_read_input_tokens||0,g=a.cost||0,h=k[a.provider]||a.provider;p.totalPromptTokens+=c,p.totalCompletionTokens+=d,p.totalCachedTokens+=f,p.totalCost+=g,p.byProvider[a.provider]||(p.byProvider[a.provider]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),p.byProvider[a.provider].requests++,p.byProvider[a.provider].promptTokens+=c,p.byProvider[a.provider].completionTokens+=d,p.byProvider[a.provider].cachedTokens+=f,p.byProvider[a.provider].cost+=g;let i=a.provider?`${a.model} (${a.provider})`:a.model;if(p.byModel[i]||(p.byModel[i]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,lastUsed:a.timestamp}),p.byModel[i].requests++,p.byModel[i].promptTokens+=c,p.byModel[i].completionTokens+=d,p.byModel[i].cachedTokens+=f,p.byModel[i].cost+=g,new Date(a.timestamp)>new Date(p.byModel[i].lastUsed)&&(p.byModel[i].lastUsed=a.timestamp),a.connectionId){let b=j[a.connectionId]||`Account ${a.connectionId.slice(0,8)}...`,e=`${a.model} (${a.provider} - ${b})`;p.byAccount[e]||(p.byAccount[e]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,connectionId:a.connectionId,accountName:b,lastUsed:a.timestamp}),p.byAccount[e].requests++,p.byAccount[e].promptTokens+=c,p.byAccount[e].completionTokens+=d,p.byAccount[e].cachedTokens+=f,p.byAccount[e].cost+=g,new Date(a.timestamp)>new Date(p.byAccount[e].lastUsed)&&(p.byAccount[e].lastUsed=a.timestamp)}{let b=a.apiKey?m[a.apiKey]:null,e=H(a.apiKey,b),i=G(a.apiKey),j=I(a.apiKey,b,e),k=`${e}|${a.model}|${a.provider||"unknown"}`;p.byApiKey[k]||(p.byApiKey[k]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,apiKeyMasked:i,keyName:j,apiKeyKey:e,lastUsed:a.timestamp});let l=p.byApiKey[k];l.requests++,l.promptTokens+=c,l.completionTokens+=d,l.cachedTokens+=f,l.cost+=g,new Date(a.timestamp)>new Date(l.lastUsed)&&(l.lastUsed=a.timestamp)}let l=a.endpoint||"Unknown",n=`${l}|${a.model}|${a.provider||"unknown"}`;p.byEndpoint[n]||(p.byEndpoint[n]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,endpoint:l,rawModel:a.model,provider:h,lastUsed:a.timestamp});let o=p.byEndpoint[n];o.requests++,o.promptTokens+=c,o.completionTokens+=d,o.cachedTokens+=f,o.cost+=g,new Date(a.timestamp)>new Date(o.lastUsed)&&(o.lastUsed=a.timestamp)}}return p.totalRequests=Object.values(p.byProvider).reduce((a,b)=>a+(b.requests||0),0),p}async function _(a="7d",b){let c=await (0,d.c)(),f=Date.now(),g=!function(a){if(!a||"string"!=typeof a)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:a}),!0}catch{return!1}}(b)?void 0:b;if("today"===a){var h;let a,b,d,e,i=g?(h=new Date(f),b=Date.UTC((a=new Intl.DateTimeFormat("en-US",{timeZone:g,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(h).reduce((a,b)=>(a[b.type]=b.value,a),{})).year,a.month-1,a.day,a.hour,a.minute,a.second)-h.getTime(),(d=new Date(h.getTime()+b)).setUTCHours(0,0,0,0),d.getTime()-b):((e=new Date).setHours(0,0,0,0),e.getTime()),j=i+864e5,k=Array.from({length:24},(a,b)=>({label:new Date(i+36e5*b).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1,...g?{timeZone:g}:{}}),tokens:0,cost:0}));for(let a of c.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ?",[new Date(i).toISOString()])){let b=new Date(a.timestamp).getTime();if(b<i||b>=j)continue;let c=Math.floor((b-i)/36e5);c>=0&&c<24&&(k[c].tokens+=(a.promptTokens||0)+(a.completionTokens||0),k[c].cost+=a.cost||0)}return k}if("24h"===a){let a=f-864e5,b=Array.from({length:24},(b,c)=>({label:new Date(a+36e5*c).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1,...g?{timeZone:g}:{}}),tokens:0,cost:0}));for(let d of c.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ?",[new Date(a).toISOString()])){let c=new Date(d.timestamp).getTime();if(c<a||c>f)continue;let e=Math.min(Math.floor((c-a)/36e5),23);b[e].tokens+=(d.promptTokens||0)+(d.completionTokens||0),b[e].cost+=d.cost||0}return b}let i=new Date,j=a=>a.toLocaleDateString("en-US",{month:"short",day:"numeric"});if("all"===a){let a=Z(c,null).sort((a,b)=>a.dateKey.localeCompare(b.dateKey));return 0===a.length?[]:a.map(a=>{let b=(0,e.q)(a.data,{}),[c,d,f]=a.dateKey.split("-").map(Number);return{label:j(new Date(c,d-1,f)),tokens:b?(b.promptTokens||0)+(b.completionTokens||0):0,cost:b&&b.cost||0}})}let k={"7d":7,"30d":30,"60d":60,"90d":90,"180d":180,"365d":365}[a]||7,l=Z(c,k),m={};for(let a of l)m[a.dateKey]=(0,e.q)(a.data,{});return Array.from({length:k},(a,b)=>{let c=new Date(i);c.setDate(c.getDate()-(k-1-b));let d=m[`${c.getFullYear()}-${String(c.getMonth()+1).padStart(2,"0")}-${String(c.getDate()).padStart(2,"0")}`];return{label:j(c),tokens:d?(d.promptTokens||0)+(d.completionTokens||0):0,cost:d&&d.cost||0}})}async function aa(){}async function ab(a=200){try{let b=(await (0,d.c)()).all("SELECT timestamp, provider, model, connectionId, promptTokens, completionTokens, status, tokens, meta FROM usageHistory ORDER BY id DESC LIMIT ?",[a]);if(!b.length)return[];let f={};try{let{getProviderConnections:a}=await Promise.resolve().then(c.bind(c,5781));for(let b of(await a()))f[b.id]=b.name||b.email||""}catch{}return b.map(a=>{let b=function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${b(a.getDate())}-${b(a.getMonth()+1)}-${a.getFullYear()} ${b(a.getHours())}:${b(a.getMinutes())}:${b(a.getSeconds())}`}(new Date(a.timestamp)),c=a.provider?.toUpperCase()||"-",d=(a.meta?(0,e.q)(a.meta,{}):{}).requestedModel||null,g=d&&d!==a.model?`${d} → ${a.model}`:a.model||"-",h=f[a.connectionId]||(a.connectionId?a.connectionId.slice(0,8):"-"),i=a.tokens?(0,e.q)(a.tokens,{}):{},j=a.promptTokens??i.prompt_tokens??"-",k=a.completionTokens??i.completion_tokens??"-";return`${b} | ${g} | ${c} | ${h} | ${j} | ${k} | ${a.status||"-"}`})}catch(a){return console.error("[usageRepo] getRecentLogs failed:",a.message),[]}}var ac=c(16329);let ad=null,ae=0;function af(a,b){let c=a[b];return void 0===c||""===c.trim()?null:"true"===c.trim().toLowerCase()}async function ag(){if(ad&&Date.now()-ae<5e3)return ad;try{let{getSettings:a}=await Promise.resolve().then(c.bind(c,42655)),b=await a();ad={enabled:function(a,b=process.env){let c=af(b,"OBSERVABILITY_ENABLED");if(null!==c)return c;let d=af(b,"ENABLE_REQUEST_LOGS");return null!==d?d:a?.enableObservability===!0}(b),maxRecords:b.observabilityMaxRecords||parseInt(process.env.OBSERVABILITY_MAX_RECORDS||String(200),10),batchSize:b.observabilityBatchSize||parseInt(process.env.OBSERVABILITY_BATCH_SIZE||String(20),10),flushIntervalMs:b.observabilityFlushIntervalMs||parseInt(process.env.OBSERVABILITY_FLUSH_INTERVAL_MS||String(5e3),10),maxJsonSize:1024*(b.observabilityMaxJsonSize||parseInt(process.env.OBSERVABILITY_MAX_JSON_SIZE||"5",10))}}catch{ad={enabled:!1,maxRecords:200,batchSize:20,flushIntervalMs:5e3,maxJsonSize:5120}}return ae=Date.now(),ad}let ah=[],ai=null,aj=!1;function ak(a,b){let c=JSON.stringify(a||{});return c.length>b?{_truncated:!0,_originalSize:c.length,_preview:c.substring(0,200)}:a||{}}function al(a,b){let c=ak(a,b);return c?._truncated&&a&&"object"==typeof a&&void 0!==a.tools?{...c,tools:ak(a.tools,65536)}:c}async function am(){if(!aj&&0!==ah.length){aj=!0;try{for(;ah.length>0;){let a=ah.splice(0,ah.length),b=await (0,d.c)(),c=await ag();b.transaction(()=>{for(let d of a){d.id||(d.id=function(a){let b=new Date().toISOString(),c=Math.random().toString(36).substring(2,8),d=a?a.replace(/[^a-zA-Z0-9-]/g,"-"):"unknown";return`${b}-${c}-${d}`}(d.model)),d.timestamp||(d.timestamp=new Date().toISOString()),d.request?.headers&&(d.request.headers=function(a){if(!a||"object"!=typeof a)return{};let b=["authorization","x-api-key","cookie","token","api-key"],c={...a};for(let a of Object.keys(c))b.some(b=>a.toLowerCase().includes(b))&&delete c[a];return c}(d.request.headers));let a={id:d.id,provider:d.provider||null,model:d.model||null,connectionId:d.connectionId||null,timestamp:d.timestamp,status:d.status||null,latency:d.latency||{},tokens:d.tokens||{},request:al(d.request,c.maxJsonSize),providerRequest:al(d.providerRequest,c.maxJsonSize),providerResponse:ak(d.providerResponse,c.maxJsonSize),response:ak(d.response,c.maxJsonSize),pxpipe:d.pxpipe||void 0,convoy:d.convoy||void 0};b.run("INSERT INTO requestDetails(id, timestamp, provider, model, connectionId, status, data) VALUES(?, ?, ?, ?, ?, ?, ?) ON CONFLICT(id) DO UPDATE SET timestamp = excluded.timestamp, provider = excluded.provider, model = excluded.model, connectionId = excluded.connectionId, status = excluded.status, data = excluded.data",[a.id,a.timestamp,a.provider,a.model,a.connectionId,a.status,(0,e.s)(a)])}let d=b.get("SELECT COUNT(*) as c FROM requestDetails");d&&d.c>c.maxRecords&&b.run("DELETE FROM requestDetails WHERE id IN (SELECT id FROM requestDetails ORDER BY timestamp ASC LIMIT ?)",[d.c-c.maxRecords])})}}catch(a){console.error("[requestDetailsRepo] Batch write failed:",a)}finally{aj=!1}}}async function an(a){let b=await ag();b.enabled&&(ah.push(a),ah.length>=b.batchSize?(ai&&(clearTimeout(ai),ai=null),am().catch(a=>console.error("[requestDetailsRepo] flush err:",a))):ai||(ai=setTimeout(()=>{ai=null,am().catch(()=>{})},b.flushIntervalMs)))}async function ao(a={}){let b=await (0,d.c)(),c=[],f=[];a.provider&&(c.push("provider = ?"),f.push(a.provider)),a.model&&(c.push("model = ?"),f.push(a.model)),a.connectionId&&(c.push("connectionId = ?"),f.push(a.connectionId)),a.status&&(c.push("status = ?"),f.push(a.status)),a.startDate&&(c.push("timestamp >= ?"),f.push(new Date(a.startDate).toISOString())),a.endDate&&(c.push("timestamp <= ?"),f.push(new Date(a.endDate).toISOString()));let g=c.length?`WHERE ${c.join(" AND ")}`:"",h=b.get(`SELECT COUNT(*) as c FROM requestDetails ${g}`,f),i=h?h.c:0,j=a.page||1,k=a.pageSize||50,l=Math.ceil(i/k);return{details:b.all(`SELECT data FROM requestDetails ${g} ORDER BY timestamp DESC LIMIT ? OFFSET ?`,[...f,k,(j-1)*k]).map(a=>(0,e.q)(a.data,{})),pagination:{page:j,pageSize:k,totalItems:i,totalPages:l,hasNext:j<l,hasPrev:j>1}}}async function ap(){return(await (0,d.c)()).all("SELECT DISTINCT provider FROM requestDetails WHERE provider IS NOT NULL ORDER BY provider ASC").map(a=>a.provider)}let aq=async()=>{ai&&(clearTimeout(ai),ai=null),ah.length>0&&await am()};(0,ac.Bb)(aq);let ar=new Set(["today","24h","7d","30d","60d","365d"]);function as(a){return`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")}`}function at(){return{requestsObserved:0,rtk:{requestsWithHits:0,hits:0,bytesBefore:0,bytesAfter:0,bytesSaved:0},headroom:{compressed:0,skipped:0,disabled:0,tokensBefore:0,tokensAfter:0,tokensSaved:0,bodyBytesBefore:0,bodyBytesAfter:0,messageBytesBefore:0,messageBytesAfter:0,phantomSavings:0,skipReasons:{}},totals:{actualBytesSaved:0}}}async function au(a="7d"){if(!ar.has(a))throw Error(`Invalid period: ${a}`);let b=await (0,d.c)(),c={today:1,"24h":1,"7d":7,"30d":30,"60d":60,"365d":365}[a],f=function(a,b){if(!b)return a.all("SELECT dateKey, data FROM tokenSaverDaily");let c=new Date;c.setDate(c.getDate()-(b-1));let d=as(c);return a.all("SELECT dateKey, data FROM tokenSaverDaily WHERE dateKey >= ?",[d])}(b,c),g=at();for(let a of f){let b=(0,e.q)(a.data,at());if(!function(a,b){a.requestsObserved+=b.requestsObserved,a.rtk.requestsWithHits+=b.rtk.requestsWithHits,a.rtk.hits+=b.rtk.hits,a.rtk.bytesBefore+=b.rtk.bytesBefore,a.rtk.bytesAfter+=b.rtk.bytesAfter,a.rtk.bytesSaved+=b.rtk.bytesSaved;let c=a.headroom;if(c.compressed+=b.headroom.compressed,c.skipped+=b.headroom.skipped,c.disabled+=b.headroom.disabled,c.tokensBefore+=b.headroom.tokensBefore,c.tokensAfter+=b.headroom.tokensAfter,c.tokensSaved+=b.headroom.tokensSaved,c.bodyBytesBefore+=b.headroom.bodyBytesBefore,c.bodyBytesAfter+=b.headroom.bodyBytesAfter,c.messageBytesBefore+=b.headroom.messageBytesBefore,c.messageBytesAfter+=b.headroom.messageBytesAfter,c.phantomSavings+=b.headroom.phantomSavings,b.headroom.skipReasonKey){let a=b.headroom.skipReasonKey;c.skipReasons[a]=(c.skipReasons[a]||0)+1}let d=a.rtk.bytesSaved||0,e=Math.max(0,(a.headroom.bodyBytesBefore||0)-(a.headroom.bodyBytesAfter||0));a.totals.actualBytesSaved=d+e}(g,{state:"compressed",requestsObserved:b.requestsObserved||0,rtk:b.rtk||{},headroom:{...b.headroom,compressed:b.headroom?.compressed||0,skipped:b.headroom?.skipped||0,disabled:b.headroom?.disabled||0,tokensBefore:b.headroom?.tokensBefore||0,tokensAfter:b.headroom?.tokensAfter||0,tokensSaved:b.headroom?.tokensSaved||0,bodyBytesBefore:b.headroom?.bodyBytesBefore||0,bodyBytesAfter:b.headroom?.bodyBytesAfter||0,messageBytesBefore:b.headroom?.messageBytesBefore||0,messageBytesAfter:b.headroom?.messageBytesAfter||0,phantomSavings:b.headroom?.phantomSavings||0,skipReasonKey:null}}),b.headroom?.skipReasons)for(let[a,c]of Object.entries(b.headroom.skipReasons))g.headroom.skipReasons[a]=(g.headroom.skipReasons[a]||0)+(c||0)}let h=Object.fromEntries(f.map(a=>[a.dateKey,(0,e.q)(a.data,at())])),i=Array.from({length:c},(a,b)=>{let d=new Date;d.setHours(0,0,0,0),d.setDate(d.getDate()-(c-1-b));let e=h[as(d)]||at();return{dateKey:as(d),actualBytesSaved:Math.max(0,(e.rtk?.bytesSaved||0)+((e.headroom?.bodyBytesBefore||0)-(e.headroom?.bodyBytesAfter||0))),rtkBytesSaved:e.rtk?.bytesSaved||0,headroomBytesSaved:Math.max(0,(e.headroom?.bodyBytesBefore||0)-(e.headroom?.bodyBytesAfter||0)),headroomCompressed:e.headroom?.compressed||0}});return{requestsObserved:g.requestsObserved,rtk:g.rtk,headroom:g.headroom,totals:g.totals,dailyPoints:i}}var av=c(57473);async function aw(){let a=await (0,d.c)(),{exportSettings:b}=await Promise.resolve().then(c.bind(c,42655)),f={settings:await b(),providerConnections:a.all("SELECT * FROM providerConnections").map(a=>({...(0,e.q)(a.data,{}),id:a.id,provider:a.provider,authType:a.authType,name:a.name,email:a.email,priority:a.priority,isActive:1===a.isActive,createdAt:a.createdAt,updatedAt:a.updatedAt})),providerNodes:a.all("SELECT * FROM providerNodes").map(a=>({...(0,e.q)(a.data,{}),id:a.id,type:a.type,name:a.name,createdAt:a.createdAt,updatedAt:a.updatedAt})),proxyPools:a.all("SELECT * FROM proxyPools").map(a=>({...(0,e.q)(a.data,{}),id:a.id,isActive:1===a.isActive,testStatus:a.testStatus,createdAt:a.createdAt,updatedAt:a.updatedAt})),apiKeys:a.all("SELECT * FROM apiKeys").map(a=>({id:a.id,key:a.key,name:a.name,machineId:a.machineId,isActive:1===a.isActive,expiresAt:a.expiresAt||null,tokenLimit:null==a.tokenLimit?null:Number(a.tokenLimit),tokensUsed:Number(a.tokensUsed||0),tokensReserved:Number(a.tokensReserved||0),allowedModels:(0,e.q)(a.allowedModels,null),createdAt:a.createdAt})),combos:a.all("SELECT * FROM combos").map(a=>({id:a.id,name:a.name,kind:a.kind,models:(0,e.q)(a.models,[]),createdAt:a.createdAt,updatedAt:a.updatedAt})),modelAliases:{},customModels:[],mitmAlias:{},pricing:{}};for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'modelAliases'"))f.modelAliases[b.key]=(0,e.q)(b.value);for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'customModels'"))f.customModels.push((0,e.q)(b.value));for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'mitmAlias'"))f.mitmAlias[b.key]=(0,e.q)(b.value);for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'pricing'"))f.pricing[b.key]=(0,e.q)(b.value);return f}async function ax(a){if(!a||"object"!=typeof a||Array.isArray(a))throw Error("Invalid database payload");let b=await (0,d.c)();return b.transaction(()=>{for(let c of(b.run("DELETE FROM settings"),b.run("DELETE FROM providerConnections"),b.run("DELETE FROM providerNodes"),b.run("DELETE FROM proxyPools"),b.run("DELETE FROM apiKeys"),b.run("DELETE FROM combos"),b.run("DELETE FROM kv WHERE scope IN ('modelAliases', 'customModels', 'mitmAlias', 'pricing')"),a.settings&&b.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,e.s)(a.settings)]),a.providerConnections||[])){let{id:a,provider:d,authType:f,name:g,email:h,priority:i,isActive:j,createdAt:k,updatedAt:l,...m}=c;b.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[a,d,f||"oauth",g||null,h||null,i||null,+(!1!==j),(0,e.s)(m),k||new Date().toISOString(),l||new Date().toISOString()])}for(let c of a.providerNodes||[]){let{id:a,type:d,name:f,createdAt:g,updatedAt:h,...i}=c;b.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[a,d||null,f||null,(0,e.s)(i),g||new Date().toISOString(),h||new Date().toISOString()])}for(let c of a.proxyPools||[]){let{id:a,isActive:d,testStatus:f,createdAt:g,updatedAt:h,...i}=c;b.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[a,+(!1!==d),f||"unknown",(0,e.s)(i),g||new Date().toISOString(),h||new Date().toISOString()])}for(let c of a.apiKeys||[])b.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, expiresAt, tokenLimit, tokensUsed, tokensReserved, allowedModels, createdAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[c.id,c.key,c.name||null,c.machineId||null,+(!1!==c.isActive),c.expiresAt||null,null==c.tokenLimit?null:Number(c.tokenLimit),Number(c.tokensUsed||0),Number(c.tokensReserved||0),(0,e.s)(c.allowedModels||null),c.createdAt||new Date().toISOString()]);for(let c of a.combos||[])b.run("INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c.id,c.name,c.kind||null,(0,e.s)(c.models||[]),c.createdAt||new Date().toISOString(),c.updatedAt||new Date().toISOString()]);for(let[c,d]of Object.entries(a.modelAliases||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[c,(0,e.s)(d)]);for(let c of a.customModels||[]){let a=`${c.providerAlias}|${c.id}|${c.type||"llm"}`;b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[a,(0,e.s)(c)])}for(let[c,d]of Object.entries(a.mitmAlias||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[c,(0,e.s)(d||{})]);for(let[c,d]of Object.entries(a.pricing||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[c,(0,e.s)(d||{})])}),await aw()}},5781:(a,b,c)=>{c.r(b),c.d(b,{cleanupProviderConnections:()=>r,createProviderConnection:()=>m,deleteProviderConnection:()=>o,deleteProviderConnectionsByProvider:()=>p,getProviderConnectionById:()=>k,getProviderConnections:()=>j,reorderProviderConnections:()=>q,updateProviderConnection:()=>n});var d=c(94755),e=c(36366),f=c(644);let g=["displayName","email","globalPriority","defaultModel","accessToken","refreshToken","expiresAt","tokenType","scope","projectId","apiKey","testStatus","lastTested","lastError","lastErrorAt","rateLimitedUntil","expiresIn","errorCode","consecutiveUseCount","idToken","lastRefreshAt"];function h(a){return a?{...(0,f.q)(a.data,{}),id:a.id,provider:a.provider,authType:a.authType,name:a.name,email:a.email,priority:a.priority,isActive:1===a.isActive||!0===a.isActive,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}function i(a,b){let c=function(a){let{id:b,provider:c,authType:d,name:e,email:g,priority:h,isActive:i,createdAt:j,updatedAt:k,...l}=a;return{id:b,provider:c,authType:d,name:e??null,email:g??null,priority:h??null,isActive:+(!1!==i),data:(0,f.s)(l),createdAt:j,updatedAt:k}}(b);a.run(`INSERT INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt)
18
- VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
19
- ON CONFLICT(id) DO UPDATE SET
20
- provider=excluded.provider, authType=excluded.authType, name=excluded.name,
21
- email=excluded.email, priority=excluded.priority, isActive=excluded.isActive,
22
- data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.provider,c.authType,c.name,c.email,c.priority,c.isActive,c.data,c.createdAt,c.updatedAt])}async function j(a={}){let b=await (0,e.c)(),c=[],d=[];a.provider&&(c.push("provider = ?"),d.push(a.provider)),void 0!==a.isActive&&(c.push("isActive = ?"),d.push(+!!a.isActive));let f=`SELECT * FROM providerConnections${c.length?` WHERE ${c.join(" AND ")}`:""}`,g=b.all(f,d).map(h);return g.sort((a,b)=>(a.priority||999)-(b.priority||999)),g}async function k(a){return h((await (0,e.c)()).get("SELECT * FROM providerConnections WHERE id = ?",[a]))}function l(a,b){let c=a.all("SELECT * FROM providerConnections WHERE provider = ?",[b]).map(h);c.sort((a,b)=>{let c=(a.priority||0)-(b.priority||0);return 0!==c?c:new Date(b.updatedAt||0)-new Date(a.updatedAt||0)}),c.forEach((b,c)=>{a.run("UPDATE providerConnections SET priority = ? WHERE id = ?",[c+1,b.id])})}async function m(a){let b,c=await (0,e.c)(),f=new Date().toISOString();return c.transaction(()=>{var e;let j=c.all("SELECT * FROM providerConnections WHERE provider = ?",[a.provider]).map(h),k=null;if("oauth"===a.authType&&a.email){let b=a.providerSpecificData?.username,c=a.providerSpecificData?.chatgptAccountId;k=j.find(d=>{if("oauth"!==d.authType||d.email!==a.email)return!1;if("codex"===a.provider){let a=d.providerSpecificData?.chatgptAccountId;return!!c&&!!a&&c===a}let e=d.providerSpecificData?.chatgptAccountId;if(c&&e)return c===e;if(c&&!e||!c&&e)return!1;let f=d.providerSpecificData?.username;return b&&f?b===f:!b&&!f})}else"apikey"===a.authType&&a.name&&(k=j.find(b=>"apikey"===b.authType&&b.name===a.name));if(k){let d="codex"===a.provider&&"oauth"===a.authType&&a.accessToken?function(a,b,c){let d={...a,...b,updatedAt:c,isActive:!0,testStatus:"active"};for(let a of["lastError","lastErrorAt","errorCode","backoffLevel"])delete d[a];for(let a of Object.keys(d))a.startsWith("modelLock_")&&delete d[a];return d}(k,a,f):{...k,...a,updatedAt:f};i(c,d),b=d;return}let m=a.name||null;m||"oauth"!==a.authType&&"access_token"!==a.authType||(e=a.email||`Account ${j.length+1}`,m="github"===a.provider&&(a.providerSpecificData?.githubLogin||a.providerSpecificData?.githubEmail||a.email||a.providerSpecificData?.githubName)||e);let n=a.priority;n||(n=j.reduce((a,b)=>Math.max(a,b.priority||0),0)+1);let o={id:(0,d.A)(),provider:a.provider,authType:a.authType||"oauth",name:m,priority:n,isActive:void 0===a.isActive||a.isActive,createdAt:f,updatedAt:f};for(let b of g)void 0!==a[b]&&null!==a[b]&&(o[b]=a[b]);a.providerSpecificData&&Object.keys(a.providerSpecificData).length>0&&(o.providerSpecificData=a.providerSpecificData),void 0!==a.email&&(o.email=a.email),i(c,o),l(c,a.provider),b=o}),b}async function n(a,b){let c,d=await (0,e.c)();return d.transaction(()=>{let e=d.get("SELECT * FROM providerConnections WHERE id = ?",[a]);if(!e){c=null;return}let f=h(e),g={...f,...b,updatedAt:new Date().toISOString()};i(d,g),void 0!==b.priority&&l(d,f.provider),c=g}),c}async function o(a){let b=await (0,e.c)(),c=!1;return b.transaction(()=>{let d=b.get("SELECT provider FROM providerConnections WHERE id = ?",[a]);d&&(b.run("DELETE FROM providerConnections WHERE id = ?",[a]),l(b,d.provider),c=!0)}),c}async function p(a){let b=await (0,e.c)(),c=b.get("SELECT COUNT(*) AS n FROM providerConnections WHERE provider = ?",[a]);return b.run("DELETE FROM providerConnections WHERE provider = ?",[a]),c?.n||0}async function q(a){let b=await (0,e.c)();b.transaction(()=>l(b,a))}async function r(){let a=await (0,e.c)(),b=["displayName","email","globalPriority","defaultModel","accessToken","refreshToken","expiresAt","tokenType","scope","projectId","apiKey","testStatus","lastTested","lastError","lastErrorAt","rateLimitedUntil","expiresIn","consecutiveUseCount"],c=0;return a.transaction(()=>{for(let d of a.all("SELECT * FROM providerConnections")){let e=h(d),f=!1;for(let a of b)(null===e[a]||void 0===e[a])&&a in e&&(delete e[a],c++,f=!0);e.providerSpecificData&&0===Object.keys(e.providerSpecificData).length&&(delete e.providerSpecificData,c++,f=!0),f&&i(a,e)}}),c}},9460:(a,b,c)=>{c.d(b,{L9:()=>r,OM:()=>j,S8:()=>o,fv:()=>l,getMitmAlias:()=>q,o5:()=>k,uL:()=>p,uv:()=>n});var d=c(36366),e=c(644),f=c(22846);let g=(0,f.U)("modelAliases"),h=(0,f.U)("customModels"),i=(0,f.U)("mitmAlias");async function j(){return await g.getAll()}async function k(a,b){await g.set(a,b)}async function l(a){await g.remove(a)}function m(a,b,c){return`${a}|${b}|${c}`}async function n(){return Object.values(await h.getAll())}async function o({providerAlias:a,id:b,type:c="llm",name:f,caps:g}){let h=m(a,b,c),i=await (0,d.c)(),j=!1;return i.transaction(()=>{let d=i.get("SELECT value FROM kv WHERE scope = 'customModels' AND key = ?",[h]);if(d){let a={...(0,e.q)(d.value)||{},...f?{name:f}:{},...g?{caps:g}:{}};i.run("UPDATE kv SET value = ? WHERE scope = 'customModels' AND key = ?",[(0,e.s)(a),h]);return}let k=(0,e.s)({providerAlias:a,id:b,type:c,name:f||b,...g?{caps:g}:{}});i.run("INSERT INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[h,k]),j=!0}),j}async function p({providerAlias:a,id:b,type:c="llm"}){await h.remove(m(a,b,c))}async function q(a){return a?await i.get(a)||{}:await i.getAll()}async function r(a,b){await i.set(a,b||{})}},16329:(a,b,c)=>{c.d(b,{Bb:()=>e,Om:()=>g});let d=globalThis.__9routerShutdownState??={flushers:new Set,priorities:new Map,shutdownPromise:null,signalHandler:null,beforeExitHandler:null};function e(a,b=0){if("function"!=typeof a)throw TypeError("shutdown flusher must be a function");return d.flushers.add(a),d.priorities.set(a,Number.isFinite(b)?b:0),d.signalHandler??=()=>g(0),d.beforeExitHandler??=()=>f(),process.listeners("SIGINT").includes(d.signalHandler)||process.once("SIGINT",d.signalHandler),process.listeners("SIGTERM").includes(d.signalHandler)||process.once("SIGTERM",d.signalHandler),process.listeners("beforeExit").includes(d.beforeExitHandler)||process.once("beforeExit",d.beforeExitHandler),()=>{d.flushers.delete(a),d.priorities.delete(a)}}function f(){return d.shutdownPromise||(d.shutdownPromise=(async()=>{let a=new Map;for(let b of d.flushers){let c=d.priorities.get(b)??0;a.has(c)||a.set(c,[]),a.get(c).push(b)}for(let b of[...a.keys()].sort((a,b)=>a-b))for(let c of(await Promise.allSettled(a.get(b).map(a=>Promise.resolve().then(a)))))"rejected"===c.status&&console.error("[Shutdown] flusher failed:",c.reason?.message||c.reason)})()),d.shutdownPromise}async function g(a=0){await f(),process.exit(a)}},22846:(a,b,c)=>{c.d(b,{U:()=>f});var d=c(36366),e=c(644);function f(a){return{async get(b,c=null){let f=(await (0,d.c)()).get("SELECT value FROM kv WHERE scope = ? AND key = ?",[a,b]);return f?(0,e.q)(f.value,c):c},async getAll(){let b=(await (0,d.c)()).all("SELECT key, value FROM kv WHERE scope = ?",[a]),c={};for(let a of b)c[a.key]=(0,e.q)(a.value);return c},async set(b,c){(await (0,d.c)()).run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,b,(0,e.s)(c)])},async setMany(b){let c=await (0,d.c)();c.transaction(()=>{for(let[d,f]of Object.entries(b))c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,d,(0,e.s)(f)])})},async remove(b){(await (0,d.c)()).run("DELETE FROM kv WHERE scope = ? AND key = ?",[a,b])},async clear(){(await (0,d.c)()).run("DELETE FROM kv WHERE scope = ?",[a])}}}},36366:(a,b,c)=>{c.d(b,{c:()=>k});var d=c(95658);global._dbAdapter||(global._dbAdapter={instance:null,initPromise:null,logged:!1});let e=global._dbAdapter;async function f(a){if(!process.versions.bun)return null;try{let{createBunSqliteAdapter:a}=await c.e(4739).then(c.bind(c,24739));return await a(d.AL)}catch(b){return process.env.DEBUG_DB&&console.warn(`[DB] bun:sqlite unavailable: ${b.message}`),a&&a.push(`bun:sqlite: ${b.message}`),null}}async function g(a){if(process.versions.bun)return null;try{let{createBetterSqliteAdapter:a}=await c.e(5258).then(c.bind(c,25258));return a(d.AL)}catch(b){return process.env.DEBUG_DB&&console.warn(`[DB] better-sqlite3 unavailable: ${b.message}`),a&&a.push(`better-sqlite3: ${b.message}`),null}}async function h(a){if(process.versions.bun)return null;let[b,e]=process.versions.node.split(".").map(Number);if(b<22||22===b&&e<5)return null;try{let{createNodeSqliteAdapter:a}=await c.e(8520).then(c.bind(c,88520));return await a(d.AL)}catch(b){return process.env.DEBUG_DB&&console.warn(`[DB] node:sqlite unavailable: ${b.message}`),a&&a.push(`node:sqlite: ${b.message}`),null}}async function i(a){try{let{createSqlJsAdapter:a}=await c.e(3593).then(c.bind(c,53593));return await a(d.AL)}catch(b){return process.env.DEBUG_DB&&console.warn(`[DB] sql.js unavailable: ${b.message}`),a&&a.push(`sql.js: ${b.message}`),null}}async function j(){(0,d.Jh)();let a=[],b=await f(a);if(b||(b=await g(a)),b||(b=await h(a)),b||(b=await i(a)),!b)throw Error(`[DB] No SQLite driver available (bun/better/node/sql.js all failed):
23
- ${a.join("\n")}`);e.logged||(console.log(`[DB] Driver: ${b.driver} | file: ${d.AL}`),e.logged=!0);let{runMigrationOnce:j}=await c.e(7785).then(c.bind(c,82547));return await j(b),b}async function k(){return e.instance?e.instance:(e.initPromise||(e.initPromise=j().then(a=>(e.instance=a,a))),e.initPromise)}},42655:(a,b,c)=>{c.d(b,{Xx:()=>j,exportSettings:()=>k,getSettings:()=>i});var d=c(36366),e=c(644);let f={cloudEnabled:!1,tunnelEnabled:!1,tunnelUrl:"",tunnelProvider:"cloudflare",tailscaleEnabled:!1,tailscaleUrl:"",stickyRoundRobinLimit:3,providerStrategies:{},latencyAwareConfig:{},quotaVisibility:{},retryDelayByProvider:{},rpmByProvider:{},comboStrategy:"fallback",comboStickyRoundRobinLimit:1,comboStrategies:{},exposeComboOnly:!1,requireLogin:!0,tunnelDashboardAccess:!0,authMode:"password",ssoType:"oidc",oidcIssuerUrl:"",oidcClientId:"",oidcClientSecret:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC",samlEntryPoint:"",samlIssuer:"urn:ezrouter:sp",samlCert:"",samlLoginLabel:"Sign in with SAML SSO",samlAttributeEmail:"email",samlAttributeName:"name",enableObservability:!0,observabilityMaxRecords:1e3,observabilityBatchSize:20,observabilityFlushIntervalMs:5e3,observabilityMaxJsonSize:5,outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:"",mitmRouterBaseUrl:"http://localhost:20126",dnsToolEnabled:{},rtkEnabled:!0,headroomEnabled:!1,headroomUrl:process.env.HEADROOM_URL||"http://localhost:8787",headroomCompressUserMessages:!1,headroomTimeoutMs:3e3,cavemanEnabled:!1,cavemanLevel:"full",ponytailEnabled:!1,ponytailLevel:"full",customSystemPromptEnabled:!1,customSystemPrompt:"",pxpipeEnabled:!1,pxpipeAutoInstall:!0,pxpipeMinChars:25e3,pxpipeTimeoutMs:15e3,toolDisclosureEnabled:!1,toolDisclosureFilterEnabled:!1,toolDisclosureMaxTools:20};async function g(){let a=(await (0,d.c)()).get("SELECT data FROM settings WHERE id = 1");return a?(0,e.q)(a.data,{}):{}}function h(a){let b={...f,...a||{}};for(let[a,c]of Object.entries(f))void 0===b[a]&&("outboundProxyEnabled"===a&&"string"==typeof b.outboundProxyUrl&&b.outboundProxyUrl.trim()?b[a]=!0:b[a]=c);return b}async function i(){return h(await g())}async function j(a){let b,c=await (0,d.c)();return c.transaction(()=>{let d=c.get("SELECT data FROM settings WHERE id = 1");b={...d?(0,e.q)(d.data,{}):{},...a},c.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,e.s)(b)])}),h(b)}async function k(){return await g()}},49120:(a,b,c)=>{c.d(b,{n:()=>l});var d=c(73024),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h);let j="ezrouter";function k(){return"win32"===process.platform?g().join(process.env.APPDATA||g().join(i().homedir(),"AppData","Roaming"),j):g().join(i().homedir(),`.${j}`)}let l=function(){let a=process.env.DATA_DIR;if(!a)return k();if("win32"===process.platform&&/^\//.test(a))return console.warn(`[DATA_DIR] '${a}' is a Unix path on Windows → fallback to default`),k();try{return e().mkdirSync(a,{recursive:!0}),a}catch(b){if(b?.code==="EACCES"||b?.code==="EPERM")return console.warn(`[DATA_DIR] '${a}' not writable → fallback ~/.${j}`),k();throw b}}()},57473:(a,b,c)=>{c.d(b,{Nb:()=>j,QB:()=>h,oH:()=>i});var d=c(36366),e=c(644),f=c(94755);function g(a,b){if(null==a)return null;let c="string"==typeof a?a:JSON.stringify(a);if(Buffer.byteLength(c,"utf8")<=b)return c;let d=c.slice(0,b);return`${d}…`}async function h(a){let b=await (0,d.c)(),c=a.id||(0,f.A)(),h={id:c,timestamp:a.timestamp||new Date().toISOString(),endpoint:a.endpoint||null,provider:a.provider||null,model:a.model||null,connectionId:a.connectionId||null,comboName:a.comboName||null,statusCode:null!=a.statusCode?String(a.statusCode):null,errorMessage:"string"==typeof a.errorMessage?a.errorMessage:a.errorMessage?JSON.stringify(a.errorMessage):null,request:g(a.request,5120),providerRequest:g(a.providerRequest,5120),providerResponse:g(a.providerResponse,5120),meta:(0,e.s)({latency:a.latency||{},tokens:a.tokens||{},retryAfter:a.retryAfter||null,retryAfterHuman:a.retryAfterHuman||null,fallback:!!a.fallback,fallbackReason:a.fallbackReason||null,extra:a.meta||{}})};b.run(`INSERT INTO errorLogs(
24
- id, timestamp, endpoint, provider, model, connectionId, comboName,
25
- statusCode, errorMessage, request, providerRequest, providerResponse, meta
26
- ) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
27
- ON CONFLICT(id) DO UPDATE SET
28
- timestamp = excluded.timestamp,
29
- endpoint = excluded.endpoint,
30
- provider = excluded.provider,
31
- model = excluded.model,
32
- connectionId = excluded.connectionId,
33
- comboName = excluded.comboName,
34
- statusCode = excluded.statusCode,
35
- errorMessage = excluded.errorMessage,
36
- request = excluded.request,
37
- providerRequest = excluded.providerRequest,
38
- providerResponse = excluded.providerResponse,
39
- meta = excluded.meta`,[h.id,h.timestamp,h.endpoint,h.provider,h.model,h.connectionId,h.comboName,h.statusCode,h.errorMessage,h.request,h.providerRequest,h.providerResponse,h.meta]);let i=b.get("SELECT COUNT(*) c FROM errorLogs"),j=i?.c||0;return j>200&&b.run("DELETE FROM errorLogs WHERE id IN (SELECT id FROM errorLogs ORDER BY timestamp ASC LIMIT ?)",[j-200]),c}async function i(a={}){let b=await (0,d.c)(),c=[],f=[];a.provider&&(c.push("provider = ?"),f.push(a.provider)),a.model&&(c.push("model = ?"),f.push(a.model)),a.connectionId&&(c.push("connectionId = ?"),f.push(a.connectionId)),a.comboName&&(c.push("comboName = ?"),f.push(a.comboName)),a.statusCode&&(c.push("statusCode = ?"),f.push(String(a.statusCode))),a.startDate&&(c.push("timestamp >= ?"),f.push(new Date(a.startDate).toISOString())),a.endDate&&(c.push("timestamp <= ?"),f.push(new Date(a.endDate).toISOString()));let g=c.length?`WHERE ${c.join(" AND ")}`:"",h=a.page&&a.page>0?a.page:1,j=a.pageSize&&a.pageSize>0?Math.min(a.pageSize,100):20,k=b.get(`SELECT COUNT(*) c FROM errorLogs ${g}`,f),l=k?.c||0,m=Math.ceil(l/j)||1;return{details:b.all(`SELECT * FROM errorLogs ${g} ORDER BY timestamp DESC LIMIT ? OFFSET ?`,[...f,j,(h-1)*j]).map(a=>({id:a.id,timestamp:a.timestamp,endpoint:a.endpoint,provider:a.provider,model:a.model,connectionId:a.connectionId,comboName:a.comboName,statusCode:a.statusCode,errorMessage:a.errorMessage,request:(0,e.q)(a.request,null),providerRequest:(0,e.q)(a.providerRequest,null),providerResponse:(0,e.q)(a.providerResponse,null),meta:(0,e.q)(a.meta,{})})),pagination:{page:h,pageSize:j,totalItems:l,totalPages:m,hasNext:h<m,hasPrev:h>1}}}async function j(a){let b=(await (0,d.c)()).get("SELECT * FROM errorLogs WHERE id = ?",[a]);return b?{id:b.id,timestamp:b.timestamp,endpoint:b.endpoint,provider:b.provider,model:b.model,connectionId:b.connectionId,comboName:b.comboName,statusCode:b.statusCode,errorMessage:b.errorMessage,request:(0,e.q)(b.request,null),providerRequest:(0,e.q)(b.providerRequest,null),providerResponse:(0,e.q)(b.providerResponse,null),meta:(0,e.q)(b.meta,{})}:null}},62674:(a,b,c)=>{function d(a,b,c=null){let e=a.get("SELECT value FROM _meta WHERE key = ?",[b]);return e?e.value:c}function e(a,b,c){a.run("INSERT INTO _meta(key, value) VALUES(?, ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[b,String(c)])}c.d(b,{dy:()=>d,np:()=>e}),c(36366)},74452:(a,b,c)=>{c.r(b),c.d(b,{addKeySpend:()=>s,budgetPeriodMs:()=>r,createApiKey:()=>m,deleteApiKey:()=>o,getApiKeyById:()=>k,getApiKeyBySecret:()=>q,getApiKeyByValue:()=>l,getApiKeys:()=>j,reserveApiKeyTokens:()=>t,settleApiKeyTokens:()=>u,updateApiKey:()=>n,validateApiKey:()=>p});var d=c(94755),e=c(36366);function f(a){if(!Array.isArray(a))return null;let b=[...new Set(a.filter(a=>"string"==typeof a&&a.trim()).map(a=>a.trim()))];return b.length?b:null}function g(a){if(null==a||""===a)return null;let b=Number(a);if(!Number.isSafeInteger(b)||b<1)throw Error("tokenLimit must be a positive integer");return b}function h(a){if(null==a||""===a)return null;let b=new Date(a);if(Number.isNaN(b.getTime()))throw Error("expiresAt must be a valid date");return b.toISOString()}function i(a){return a?{id:a.id,key:a.key,name:a.name,machineId:a.machineId,isActive:1===a.isActive||!0===a.isActive,expiresAt:a.expiresAt||null,tokenLimit:null==a.tokenLimit?null:Number(a.tokenLimit),tokensUsed:Number(a.tokensUsed||0),tokensReserved:Number(a.tokensReserved||0),allowedModels:(()=>{try{return a.allowedModels?JSON.parse(a.allowedModels):null}catch{return null}})(),createdAt:a.createdAt}:null}async function j(){return(await (0,e.c)()).all("SELECT * FROM apiKeys ORDER BY createdAt ASC").map(i)}async function k(a){return i((await (0,e.c)()).get("SELECT * FROM apiKeys WHERE id = ?",[a]))}async function l(a){return i((await (0,e.c)()).get("SELECT * FROM apiKeys WHERE key = ?",[a]))}async function m(a,b,i={}){if(!b)throw Error("machineId is required");let j=await (0,e.c)(),{generateApiKeyWithMachine:k}=await c.e(6844).then(c.bind(c,86844)),l=k(b),n={id:(0,d.A)(),name:a,key:l.key,machineId:b,isActive:!0,expiresAt:h(i.expiresAt),tokenLimit:g(i.tokenLimit),tokensUsed:0,tokensReserved:0,allowedModels:f(i.allowedModels),createdAt:new Date().toISOString()};return j.run("INSERT INTO apiKeys(id, key, name, machineId, isActive, expiresAt, tokenLimit, tokensUsed, tokensReserved, allowedModels, createdAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[n.id,n.key,n.name,n.machineId,1,n.expiresAt,n.tokenLimit,0,0,n.allowedModels?JSON.stringify(n.allowedModels):null,n.createdAt]),n}async function n(a,b){let c=await (0,e.c)(),d=null;return c.transaction(()=>{let e=c.get("SELECT * FROM apiKeys WHERE id = ?",[a]);if(!e)return;let j={...i(e),...b};if(void 0!==b.allowedModels&&(j.allowedModels=f(b.allowedModels)),void 0!==b.expiresAt&&(j.expiresAt=h(b.expiresAt)),void 0!==b.tokenLimit&&(j.tokenLimit=g(b.tokenLimit)),void 0!==b.tokenLimitIncrement){let a=g(b.tokenLimitIncrement);if(null==j.tokenLimit)throw Error("Cannot add tokens to an unlimited key; set a token limit first");j.tokenLimit+=a}c.run("UPDATE apiKeys SET key = ?, name = ?, machineId = ?, isActive = ?, expiresAt = ?, tokenLimit = ?, tokensUsed = ?, tokensReserved = ?, allowedModels = ? WHERE id = ?",[j.key,j.name,j.machineId,+!!j.isActive,j.expiresAt||null,null==j.tokenLimit?null:Number(j.tokenLimit),Number(j.tokensUsed||0),Number(j.tokensReserved||0),j.allowedModels?JSON.stringify(j.allowedModels):null,a]),d=j}),d}async function o(a){let b=await (0,e.c)();return(b.run("DELETE FROM apiKeys WHERE id = ?",[a])?.changes??0)>0}async function p(a){let b=await l(a);return!!b&&b.isActive&&(!b.expiresAt||new Date(b.expiresAt).getTime()>Date.now())}async function q(a){return l(a)}function r(a){switch(a){case"daily":return 864e5;case"weekly":return 6048e5;case"monthly":return 2592e6;default:return null}}async function s(a,b){b&&!(b<=0)&&await l(a)&&(await (0,e.c)()).run("UPDATE apiKeys SET tokensUsed = tokensUsed + ? WHERE key = ?",[Math.round(1e4*b),a])}async function t(a,b){let c=await l(a);if(c?.tokenLimit==null)return{ok:!0,reserved:0};let d=Math.max(0,Math.floor(Number(b)||0)),f=await (0,e.c)(),g=!1;return f.transaction(()=>{let b=f.get("SELECT tokenLimit, tokensUsed, tokensReserved FROM apiKeys WHERE key = ? AND isActive = 1",[a]);!b||null==b.tokenLimit||Number(b.tokensUsed||0)+Number(b.tokensReserved||0)+d>Number(b.tokenLimit)||(f.run("UPDATE apiKeys SET tokensReserved = tokensReserved + ? WHERE key = ?",[d,a]),g=!0)}),g?{ok:!0,reserved:d}:{ok:!1,error:"API key token quota exceeded"}}async function u(a,b,c){if(!b)return;let d=Math.min(b,Math.max(0,Math.floor(Number(c)||0))),f=await (0,e.c)();f.transaction(()=>{f.run("UPDATE apiKeys SET tokensReserved = MAX(0, tokensReserved - ?), tokensUsed = tokensUsed + ? WHERE key = ?",[b,d,a])})}},95658:(a,b,c)=>{c.d(b,{AL:()=>j,HG:()=>i,Jh:()=>m,KQ:()=>k,Or:()=>l});var d=c(76760),e=c.n(d),f=c(73024),g=c.n(f),h=c(49120);let i=e().join(h.n,"db"),j=e().join(i,"data.sqlite"),k=e().join(i,"backups"),l={main:e().join(h.n,"db.json"),usage:e().join(h.n,"usage.json"),disabled:e().join(h.n,"disabledModels.json"),details:e().join(h.n,"request-details.json")};function m(){for(let a of[h.n,i,k])g().existsSync(a)||g().mkdirSync(a,{recursive:!0})}},97914:(a,b,c)=>{c.d(b,{KJ:()=>l,VT:()=>n,getPricingForModel:()=>k,r4:()=>j,yF:()=>m});var d=c(36366),e=c(644);let f=(0,c(22846).U)("pricing"),g={value:null,expiresAt:0};function h(){g={value:null,expiresAt:0}}async function i(){return await f.getAll()}async function j(){let a=Date.now();if(g.value&&g.expiresAt>a)return g.value;let b=await i(),{PROVIDER_PRICING:d}=await c.e(4646).then(c.bind(c,84646)),e={};for(let[a,c]of Object.entries(d))if(e[a]={...c},b[a])for(let[c,d]of Object.entries(b[a]))e[a][c]=e[a][c]?{...e[a][c],...d}:d;for(let[a,c]of Object.entries(b))if(e[a])for(let[b,d]of Object.entries(c))e[a][b]||(e[a][b]=d);else e[a]={...c};return g={value:e,expiresAt:a+5e3},e}async function k(a,b){if(!b)return null;let d=await i();if(a&&d[a]?.[b])return d[a][b];let{getPricingForModel:e}=await c.e(4646).then(c.bind(c,84646));return e(a,b)}async function l(a){let b=await (0,d.c)();return b.transaction(()=>{for(let[c,d]of Object.entries(a)){let a=b.get("SELECT value FROM kv WHERE scope = 'pricing' AND key = ?",[c]),f={...a&&(0,e.q)(a.value,{})||{}};for(let[a,b]of Object.entries(d))f[a]=b;b.run("INSERT INTO kv(scope, key, value) VALUES('pricing', ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[c,(0,e.s)(f)])}}),h(),await i()}async function m(a,b){if(!a)return await i();let c=await (0,d.c)();return c.transaction(()=>{if(!b)return void c.run("DELETE FROM kv WHERE scope = 'pricing' AND key = ?",[a]);let d=c.get("SELECT value FROM kv WHERE scope = 'pricing' AND key = ?",[a]),f=d&&(0,e.q)(d.value,{})||{};delete f[b],0===Object.keys(f).length?c.run("DELETE FROM kv WHERE scope = 'pricing' AND key = ?",[a]):c.run("INSERT INTO kv(scope, key, value) VALUES('pricing', ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,(0,e.s)(f)])}),h(),await i()}async function n(){return await f.clear(),h(),{}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=6112,exports.ids=[290,6112],exports.modules={19956:(a,b,c)=>{c.d(b,{h:()=>d,t:()=>e});let d={OPENAI:"openai",OPENAI_RESPONSES:"openai-responses",OPENAI_RESPONSE:"openai-response",CLAUDE:"claude",GEMINI:"gemini",GEMINI_CLI:"gemini-cli",VERTEX:"vertex",CODEX:"codex",ANTIGRAVITY:"antigravity",KIRO:"kiro",CURSOR:"cursor",OLLAMA:"ollama",COMMANDCODE:"commandcode"};function e(a,b){return a.includes("/v1/responses")?d.OPENAI_RESPONSES:a.includes("/v1/messages")?d.CLAUDE:a.includes("/v1/chat/completions")&&Array.isArray(b?.input)?d.OPENAI:null}},26892:(a,b,c)=>{c.d(b,{E8:()=>n,KM:()=>o,fO:()=>m,up:()=>p,wJ:()=>l});var d=c(94735),e=c(30869);let f=["log","info","warn","error","debug"];global._consoleLogBufferState||(global._consoleLogBufferState={logs:[],revision:0,patched:!1,originals:{},emitter:new d.EventEmitter},global._consoleLogBufferState.emitter.setMaxListeners(50));let g=global._consoleLogBufferState;function h(){if(g.flushTimer=null,!g.pendingLines.length)return;let a=g.pendingLines.splice(0,g.pendingLines.length);g.emitter.emit("lines",a)}g.emitter||(g.emitter=new d.EventEmitter,g.emitter.setMaxListeners(50)),g.pendingLines||(g.pendingLines=[]),g.flushTimer||(g.flushTimer=null),Number.isSafeInteger(g.revision)||(g.revision=0);let i=/\x1b\[[0-9;]*m/g;function j(a){return a.replace(i,"")}function k(a){if("string"==typeof a)return j(a);if(a instanceof Error)return j(a.stack||a.message||String(a));try{return j(JSON.stringify(a))}catch{return j(String(a))}}function l(){if(!g.patched){for(let a of f)g.originals[a]=console[a],console[a]=(...b)=>{!function(a){g.logs.push(a),g.revision+=1;let b=e.UY.maxLines;g.logs.length>b&&(g.logs=g.logs.slice(-b)),g.pendingLines.push(a),g.pendingLines.length>=50?(g.flushTimer&&(clearTimeout(g.flushTimer),g.flushTimer=null),h()):g.flushTimer||(g.flushTimer=setTimeout(h,100),g.flushTimer?.unref?.())}(b.map(k).join(" ")),g.originals[a](...b)};g.patched=!0}}function m(){return g.logs}function n(){return{logs:[...g.logs],revision:g.revision}}function o(){g.logs=[],g.pendingLines=[],g.revision+=1,g.flushTimer&&(clearTimeout(g.flushTimer),g.flushTimer=null),g.emitter.emit("clear")}function p(){return g.emitter}},30869:(a,b,c)=>{c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rabbi696/ezrouter",installCmd:"npm i -g @rabbi696/ezrouter",installCmdLatest:"npm i -g @rabbi696/ezrouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20126},h={maxLines:200,pollIntervalMs:1e3,streamTimeoutMs:5e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingInactiveSession:!0,inactiveMinPingIntervalMs:18e6,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},39006:a=>{a.exports={rE:"0.6.3"}},60290:(a,b,c)=>{c.d(b,{C8:()=>t,DR:()=>s,IK:()=>m,Ps:()=>h,Qn:()=>q,SA:()=>p,UH:()=>k,Uc:()=>n,Ur:()=>g,Z1:()=>j,cI:()=>r,eo:()=>o,gx:()=>d,pH:()=>l,v1:()=>e,xM:()=>i}),c(87252);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,PAYLOAD_TOO_LARGE:413,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,sessionAffinityMaxSize:5e3,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20};function f(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}function g(){return{firstActionTimeoutMs:f("COMBO_RESPONSE_FIRST_ACTION_TIMEOUT_MS",5e3),maxBytes:f("COMBO_RESPONSE_PREFLIGHT_MAX_BYTES",65536)}}let h=process.env.SEARXNG_URL?.trim()||"http://localhost:8888/search",i=f("STREAM_STALL_TIMEOUT_MS",36e4),j=f("STREAM_FIRST_CHUNK_TIMEOUT_MS",3e4),k=(()=>{let a=process.env.SSE_KEEPALIVE_MS;if(null==a||""===a)return 1e4;let b=parseInt(a,10);return Number.isFinite(b)&&b>=0?b:1e4})(),l=f("FETCH_CONNECT_TIMEOUT_MS",6e4);f("RESPONSE_BODY_TIMEOUT_MS",3e5);let m=f("GEMINI_NATIVE_TTS_FETCH_TIMEOUT_MS",45e3),n=64e3,o=32e3,p="x-9router-token-saver",q={maxTokenLength:160,maxAttempts:32,headers:{requestedModel:"X-9Router-Requested-Model",routePath:"X-9Router-Route-Path",resolvedProvider:"X-9Router-Resolved-Provider",resolvedModel:"X-9Router-Resolved-Model",fallbackCount:"X-9Router-Fallback-Count",attemptedModels:"X-9Router-Attempted-Models"}},r={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function s(a){return null==a?{attempts:0,delayMs:2e3}:"number"==typeof a?{attempts:a,delayMs:2e3}:{attempts:a.attempts||0,delayMs:null!=a.delayMs?a.delayMs:2e3}}let t=["Please write a 5-10 word title for the following conversation:"]},87252:(a,b,c)=>{c.d(b,{Dp:()=>g,EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},413:{type:"invalid_request_error",code:"context_length_exceeded"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"You exceeded your current quota",404:"Model not found",406:"Model not supported",413:"Your input exceeds the context window of this model",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:18e5,maxLevel:15},g=42e4,h=26784e5,i=[{text:"monthly_request_count",cooldownMs:216e5},{text:"monthly limit",cooldownMs:216e5},{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:413,fallback:!1},{status:429,backoff:!0}]}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=6436,exports.ids=[6436],exports.modules={15210:(a,b,c)=>{c.d(b,{g:()=>A,s:()=>B});var d=c(23433),e=c(89718),f=c(29273),g=c(40615),h=c(38775),i=c(89865),j=c(60290),k=c(85640),l=c(39141);let m={queued:"pending",running:"processing",succeeded:"done",failed:"failed",cancelled:"cancelled"};function n(a){return{error:(0,i.A1)(j.gx.BAD_REQUEST,a)}}let o=Number(process.env.VIDEO_FETCH_TIMEOUT_MS||12e4),p=new Set(["generations","edits","extensions"]);function q(a,b=null){let c=l.B$[a]?.videoConfig;if(c)return c;let d=b?.providerSpecificData?.baseUrl;return d?{baseUrl:d}:null}function r(a,b=null){if(!a)return a;let c=String(a).replace(/Bearer\s+[A-Za-z0-9._~+/=-]{8,}/gi,"Bearer [redacted]");for(let a of["accessToken","refreshToken","apiKey"]){let d=b?.[a];"string"==typeof d&&d.length>=8&&(c=c.split(d).join("[redacted]"))}return c}async function s({provider:a,action:b=null,requestId:c=null,rawBody:d=null,contentType:e=null,idempotencyKey:f=null,credentials:g,signal:h,timeoutMs:l=o,log:t,onCredentialsRefreshed:u}){let v,w,x=q(a,g);if(!x)return(0,i.A1)(j.gx.BAD_REQUEST,`Provider '${a}' does not support video generation`);if(!c&&!p.has(b))return(0,i.A1)(j.gx.BAD_REQUEST,`Unknown video action: ${b}`);let y=function(a,b){var c,d;let e;if("minimax-v2"===a.format)return function(a,{action:b,requestId:c,rawBody:d,contentType:e}){let f;if(c)return{method:"GET",url:`${a.queryUrl.replace(/\/$/,"")}/${encodeURIComponent(c)}`,body:void 0,contentType:null};if("generations"!==b)return n("MiniMax video generation supports the generations action only");if(!e?.includes("application/json"))return n("MiniMax video generation requires an application/json request body");try{f=JSON.parse(String(d||""))}catch{return n("Invalid JSON body")}let g="string"==typeof f.prompt?f.prompt.trim():"";if(!g)return n("MiniMax video generation requires a prompt");if(g.length>a.maxPromptCharacters)return n(`MiniMax video generation prompts must not exceed ${a.maxPromptCharacters} characters`);let h=f.model||a.defaultModel;if(!a.models.includes(h))return n(`Unsupported MiniMax video model: ${h}`);let i=f.resolution;if(!a.resolutions.includes(i))return n(`MiniMax video resolution must be one of: ${a.resolutions.join(", ")}`);let j=f.duration;if(!Number.isInteger(j)||j<a.duration.min||j>a.duration.max)return n(`MiniMax video duration must be an integer from ${a.duration.min} to ${a.duration.max} seconds`);let k=f.ratio||f.aspect_ratio;if(!a.textToVideoRatios.includes(k))return n(`MiniMax text-to-video ratio must be one of: ${a.textToVideoRatios.join(", ")}`);let l={model:h,content:[{type:"text",text:g}],resolution:i,duration:j,ratio:k};return"string"==typeof f.callback_url&&f.callback_url&&(l.callback_url=f.callback_url),a.supportsAigcWatermark&&"boolean"==typeof f.aigc_watermark&&(l.aigc_watermark=f.aigc_watermark),{method:"POST",url:a.createUrl,body:JSON.stringify(l),contentType:"application/json"}}(a,b);let f=b.requestId?"GET":"POST";return{method:f,url:(c=b.action,d=b.requestId,e=a.baseUrl.replace(/\/$/,""),d?`${e}/${encodeURIComponent(d)}`:`${e}/${c}`),body:"POST"===f?b.rawBody:void 0,contentType:"POST"===f?b.contentType:null}}(x,{action:b,requestId:c,rawBody:d,contentType:e});if(y.error)return y.error;let{method:z,url:A}=y,B=(w="function"==typeof AbortSignal?.timeout?AbortSignal.timeout(l):null,h&&w&&"function"==typeof AbortSignal.any?AbortSignal.any([h,w]):h||w||void 0),C=a=>fetch(A,{method:z,headers:function({token:a,contentType:b,idempotencyKey:c}){let d={Accept:"application/json"};return a&&(d.Authorization=`Bearer ${a}`),b&&(d["Content-Type"]=b),c&&(d["Idempotency-Key"]=c),d}({token:a,contentType:y.contentType,idempotencyKey:"POST"===z?f:null}),body:y.body,signal:B});try{v=await C(g?.accessToken||g?.apiKey)}catch(b){if(b?.name==="AbortError"||b?.name==="TimeoutError")return(0,i.A1)(j.gx.REQUEST_TIMEOUT,`[${a}] video ${z} aborted: ${b.message}`);return(0,i.A1)(j.gx.BAD_GATEWAY,r(`[${a}] video upstream fetch failed: ${b.message}`,g))}if((v.status===j.gx.UNAUTHORIZED||v.status===j.gx.FORBIDDEN)&&g?.refreshToken){let b=null;try{b=await (0,k.$B)(a,g,t)}catch(b){t?.warn?.("TOKEN",`${a} | video refresh error: ${r(b.message,g)}`)}if(b?.accessToken){t?.info?.("TOKEN",`${a.toUpperCase()} | refreshed for video ${z}`),Object.assign(g,b),u&&await u(b);try{await v.body?.cancel?.()}catch{}try{v=await C(g.accessToken||g.apiKey)}catch(b){return(0,i.A1)(j.gx.BAD_GATEWAY,r(`[${a}] video retry after refresh failed: ${b.message}`,g))}}else t?.warn?.("TOKEN",`${a.toUpperCase()} | video refresh failed — account needs re-auth`)}let D=await v.text().catch(()=>"");if(!v.ok){let b=r(D||`HTTP ${v.status}`,g);return(0,i.A1)(v.status,`[${a}] ${b.slice(0,2e3)}`)}let E=D;if("minimax-v2"===x.format){let a=function(a,b=null){let c;try{c=JSON.parse(a)}catch{return{error:(0,i.A1)(j.gx.BAD_GATEWAY,"MiniMax returned an invalid video response")}}if(!b)return c?.task_id?{bodyText:JSON.stringify({request_id:c.task_id})}:{error:(0,i.A1)(j.gx.BAD_GATEWAY,"MiniMax did not return a video task id")};let d=c?.task;if(!d?.status)return{error:(0,i.A1)(j.gx.BAD_GATEWAY,"MiniMax did not return a video task status")};let e={request_id:d.id||b,status:m[d.status]||d.status};return d.content?.url&&(e.video={url:d.content.url,...Number.isInteger(d.duration)?{duration:d.duration}:{},...d.resolution?{resolution:d.resolution}:{},...d.ratio?{aspect_ratio:d.ratio}:{}}),d.error&&(e.error=d.error),d.usage&&(e.usage=d.usage),{bodyText:JSON.stringify(e)}}(D,c);if(a.error)return a.error;E=a.bodyText}return{success:!0,response:new Response(E,{status:v.status,headers:{"Content-Type":v.headers.get("content-type")||"application/json","Access-Control-Allow-Origin":"*"}})}}var t=c(67828),u=c(7803);let v=new Set([j.gx.UNAUTHORIZED,j.gx.FORBIDDEN,j.gx.RATE_LIMITED]);async function w(a){if((await (0,e.mt)()).requireApiKey){let{apiKey:b,valid:c}=await (0,d.$A)(a);if(!b)return(0,i.yj)(j.gx.UNAUTHORIZED,"Missing API key");if(!c)return(0,i.yj)(j.gx.UNAUTHORIZED,"Invalid API key")}return null}async function x(a){let b=a.headers.get("content-type")||"";if(b.includes("application/json")){let c,d=await a.text();try{c=JSON.parse(d)}catch{return{error:(0,i.yj)(j.gx.BAD_REQUEST,"Invalid JSON body")}}return{raw:d,parsed:c,contentType:b}}return{raw:Buffer.from(await a.arrayBuffer()),parsed:null,contentType:b}}async function y(a){if(!a?.model)return{provider:"xai",model:null};let b=String(a.model),c=await (0,h.mA)(b);return c.provider?(0,g.AR)(c.provider)?{provider:c.provider,model:c.model}:q(c.provider)?{provider:c.provider,model:c.model}:b.includes("/")?{error:(0,i.yj)(j.gx.BAD_REQUEST,`Provider '${c.provider}' does not support video generation`)}:{provider:"xai",model:b}:{error:(0,i.yj)(j.gx.BAD_REQUEST,"Combos are not supported for video generation")}}function z(a,b){if(!b)return a;let c=new Headers(a.headers);return c.set("x-9router-connection-id",String(b)),new Response(a.body,{status:a.status,headers:c})}async function A(a,b){let c=await w(a);if(c)return c;let e=await x(a);if(e.error)return e.error;let g=await y(e.parsed);if(g.error)return g.error;let{provider:h,model:k}=g,l=await (0,f.K)(a,{model:k?`${h}/${k}`:"__implicit_video_model__"});if(l.error)return l.error;let m=e.raw;e.parsed&&k&&e.parsed.model!==k&&(m=JSON.stringify({...e.parsed,model:k}));let n=a.headers.get("x-connection-id")||null,o=a.headers.get("idempotency-key")||null,p=new Set,q=null,A=null;for(;;){let c=await (0,d.c1)(h,p,k,{preferredConnectionId:n});if(!c||c.allRateLimited){if(c?.allRateLimited){let a=q||c.lastError||"Unavailable",b=A||Number(c.lastErrorCode)||j.gx.SERVICE_UNAVAILABLE;return(0,i.wO)(b,`[${h}/${k||"video"}] ${a}`,c.retryAfter,c.retryAfterHuman)}if(0===p.size)return(0,i.yj)(j.gx.BAD_REQUEST,`No credentials for provider: ${h}`);return(0,i.yj)(A||j.gx.SERVICE_UNAVAILABLE,q||"All accounts unavailable")}let f=await (0,t.checkAndRefreshToken)(h,c),g=await s({provider:h,action:b,rawBody:m,contentType:e.contentType||null,idempotencyKey:o,credentials:f,signal:a.signal,log:u,onCredentialsRefreshed:async a=>{await (0,t.vN)(c.connectionId,{accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData,testStatus:"active"})}});if(g.success)return await (0,d.Pt)(c.connectionId,c,k),u.info("VIDEO",`${h.toUpperCase()} | ${b} accepted (connection ${c.connectionId})`),z(g.response,c.connectionId);let{shouldFallback:l}=await (0,d.vk)(c.connectionId,g.status,r(g.error,f),h,k);if(l&&v.has(g.status)){p.add(c.connectionId),q=g.error,A=g.status;continue}return g.response}}async function B(a,b){let c=await w(a);if(c)return c;if(!b)return(0,i.yj)(j.gx.BAD_REQUEST,"Missing video request id");let f=a.headers.get("x-connection-id")||null,h="xai";if(f){let a=await (0,e.Mc)(f);a?.provider&&(q(a.provider)||(0,g.AR)(a.provider))&&(h=a.provider)}let k=await (0,d.c1)(h,null,null,{preferredConnectionId:f});if(!k||k.allRateLimited)return(0,i.yj)(j.gx.BAD_REQUEST,`No credentials for provider: ${h}`);let l=await (0,t.checkAndRefreshToken)(h,k),m=await s({provider:h,requestId:b,credentials:l,signal:a.signal,log:u,onCredentialsRefreshed:async a=>{await (0,t.vN)(k.connectionId,{accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData,testStatus:"active"})}});return m.success?(await (0,d.Pt)(k.connectionId,k,null),z(m.response,k.connectionId)):(await (0,d.vk)(k.connectionId,m.status,r(m.error,l),h,null),m.response)}},19956:(a,b,c)=>{c.d(b,{h:()=>d,t:()=>e});let d={OPENAI:"openai",OPENAI_RESPONSES:"openai-responses",OPENAI_RESPONSE:"openai-response",CLAUDE:"claude",GEMINI:"gemini",GEMINI_CLI:"gemini-cli",VERTEX:"vertex",CODEX:"codex",ANTIGRAVITY:"antigravity",KIRO:"kiro",CURSOR:"cursor",OLLAMA:"ollama",COMMANDCODE:"commandcode"};function e(a,b){return a.includes("/v1/responses")?d.OPENAI_RESPONSES:a.includes("/v1/messages")?d.CLAUDE:a.includes("/v1/chat/completions")&&Array.isArray(b?.input)?d.OPENAI:null}},38775:(a,b,c)=>{c.d(b,{d_:()=>j,mA:()=>h});var d=c(89718),e=c(66451),f=c(99471);c(32892);let g={xmtp:"xiaomi-tokenplan","xiaomi-tokenplan":"xiaomi-tokenplan"};async function h(a){let b,c=(b=(0,e.Xh)(a),b?.providerAlias&&g[b.providerAlias]?{...b,provider:g[b.providerAlias]}:b);if(!c.isAlias){let a=(await (0,d.Fh)({type:"openai-compatible"})).find(a=>a.prefix===c.providerAlias);if(a)return{provider:a.id,model:c.model};let b=(await (0,d.Fh)({type:"anthropic-compatible"})).find(a=>a.prefix===c.providerAlias);if(b)return{provider:b.id,model:c.model};let e=(await (0,d.Fh)({type:"custom-embedding"})).find(a=>a.prefix===c.providerAlias);if(e)return{provider:e.id,model:c.model};let f=(await (0,d.Fh)({type:"custom-video"})).find(a=>a.prefix===c.providerAlias);return f?{provider:f.id,model:c.model}:{provider:c.provider,model:c.model}}if(await (0,d.Dj)(c.model))return{provider:null,model:c.model};let f=await i(c.model);return f||(0,e.js)(a,d.OM)}async function i(a){try{let b=(await (0,d.uv)()).find(b=>b&&b.id===a&&("llm"===b.type||!b.type));if(b&&b.providerAlias)return{provider:(0,e.g2)(b.providerAlias),model:b.id}}catch{}try{let b=await (0,d.OM)(),c=(0,e.sc)(a,b);if(c)return c}catch{}let b=(0,e.PN)(a);if(b)return{provider:b,model:a};try{let b=await (0,f.w)(a);if(b)return b}catch{}return null}async function j(a){if(a.includes("/"))return null;let b=await (0,d.Dj)(a);return b&&b.models&&b.models.length>0?b.models:null}},66451:(a,b,c)=>{c.d(b,{PN:()=>j,Xh:()=>k,g2:()=>i,js:()=>m,sc:()=>l});var d=c(32892),e=c(29485);let f={el:"elevenlabs",jina:"jina-ai","jina-ai":"jina-ai",polly:"aws-polly","aws-polly":"aws-polly"};for(let a of d.default)for(let b of(f[a.id]=a.id,a.alias&&(f[a.alias]=a.id),a.aliases||[]))f[b]=a.id;let g={"grok-build":"gcli/grok-build"},h=new Map;for(let a of d.default)a.noAuth&&a.modelsFetcher&&a.alias&&h.set(a.id,a.alias);function i(a){return f[a]||a}function j(a){if(!a)return null;let b=[];for(let[c,d]of Object.entries(e.PROVIDER_MODELS))Array.isArray(d)&&d.some(b=>b&&b.id===a)&&b.push(c);if(0===b.length)return null;if(1===b.length)return i(b[0]);let c=b.find(b=>a.startsWith(b));return c?i(c):null}function k(a){if(!a)return{provider:null,model:null,isAlias:!1,providerAlias:null};if(a.includes("/")){let b=a.indexOf("/"),c=a.slice(0,b),d=a.slice(b+1);return{provider:i(c),model:d,isAlias:!1,providerAlias:c}}return{provider:null,model:a,isAlias:!0,providerAlias:null}}function l(a,b){if(!b)return null;let c=b[a];if(!c)return null;if("string"==typeof c&&c.includes("/")){let a=c.indexOf("/");return{provider:i(c.slice(0,a)),model:c.slice(a+1)}}return"object"==typeof c&&c.provider&&c.model?{provider:i(c.provider),model:c.model}:null}async function m(a,b){let c=k(a);if(!c.isAlias)return{provider:c.provider,model:c.model};let d="function"==typeof b?await b():b,e=l(c.model,d)||l(c.model,g);return e||{provider:function(a){if(!a)return"openai";let b=a.toLowerCase();return"default"===b||"auto"===b?"cursor":n.find(([a])=>a.test(b))?.[1]||"openai"}(c.model),model:c.model}}let n=[[/^claude-/,"anthropic"],[/^gemini-/,"gemini"],[/^grok-/,"xai"],[/^gpt-/,"openai"],[/^o[134]/,"openai"],[/^deepseek-/,"openrouter"]]},68001:(a,b,c)=>{c.d(b,{S:()=>g});var d=c(38071);let e=["big-pickle"],f=new Set(["deepseek-v4-flash-free"]),g={"openrouter-free":a=>a.filter(a=>a.pricing?.prompt==="0"&&a.pricing?.completion==="0"&&a.context_length>=2e5).map(a=>({id:a.id,name:a.name,contextLength:a.context_length})).sort((a,b)=>b.contextLength-a.contextLength),"opencode-free":a=>a.filter(a=>(a.id?.endsWith("-free")||e.includes(a.id))&&!f.has(a.id)).map(a=>({id:a.id,name:a.id})),"mimo-free":a=>(Array.isArray(a)?a:[]).filter(a=>a.id?.startsWith("mimo")||a.name?.toLowerCase().includes("mimo")).map(a=>({id:a.id,name:a.name||a.id})),"nous-free":d.pD}},89865:(a,b,c)=>{c.d(b,{A1:()=>h,lR:()=>j,wO:()=>i,yj:()=>f,zL:()=>g});var d=c(87252),e=c(60290);function f(a,b,c){let e;return new Response(JSON.stringify((e=d.LY[a]||(a>=500?{type:"server_error",code:"internal_server_error"}:{type:"invalid_request_error",code:""}),{error:{message:b||d.O[a]||"An error occurred",type:e.type,code:c??e.code}})),{status:a,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}async function g(a,b=null){let c,f="";try{f=await a.text()}catch{f=""}let h="",i=null,j=!1;try{let a=JSON.parse(f);if(h=a.error?.message||a.message||a.error||f,c=a.error?.code||a.code,i=a.error?.metadata?.provider_name||null,"string"==typeof h){let a=/^Invalid URL:\s*(.*)$/.exec(h);a&&(j=""===a[1].trim())}}catch{h=f}let k="string"==typeof h?h:JSON.stringify(h);if((i||j)&&(a.status===e.gx.BAD_GATEWAY||a.status===e.gx.SERVER_ERROR||502===a.status||500===a.status)){let a=i?`OpenRouter upstream "${i}" returned an invalid routing URL — its endpoint is misconfigured on OpenRouter's side`:"Upstream returned an invalid (empty) routing URL";k=`${k} — ${a}. Try a different model, or set \`provider: { allow_fallbacks: true }\` to opt into OpenRouter's automatic upstream fallback.`}let l=k||d.O[a.status]||`Upstream error: ${a.status}`;if(b&&"function"==typeof b.parseError)try{let d=b.parseError(a,f);if(d&&"object"==typeof d){let b=d.message&&d.message!==f?d.message:l,e=d.resetsAtMs??(429===a.status?extractResetsAtMs(a,b):null);return{statusCode:d.status||a.status,message:b,resetsAtMs:e,code:d.code??c}}}catch{}return{statusCode:a.status,message:l,code:c}}function h(a,b,c,d){return{success:!1,status:a,error:b,resetsAtMs:c,response:f(a,b,d)}}function i(a,b,c,d){let e=Math.max(Math.ceil((new Date(c).getTime()-Date.now())/1e3),1);return new Response(JSON.stringify({error:{message:`${b} (${d})`}}),{status:a,headers:{"Content-Type":"application/json","Retry-After":String(e)}})}function j(a,b,c,d){let e=d||a.code||"FETCH_FAILED",f=a.message||"Unknown error",g=a.cause?.code,h=a.cause?.message,i=g||h?` (cause: ${[g,h].filter(Boolean).join(": ")})`:"";return`[${e}]: ${f}${i}`}},92990:(a,b,c)=>{c.d(b,{DI:()=>i,Hp:()=>k,LT:()=>j,MZ:()=>v,Nl:()=>z,Nu:()=>p,OV:()=>h,S6:()=>s,Td:()=>A,Tx:()=>q,V1:()=>C,WN:()=>t,Ww:()=>D,YT:()=>n,ZL:()=>m,aV:()=>u,cD:()=>o,f7:()=>y,hF:()=>l,lB:()=>w,qp:()=>B,w1:()=>x});var d=c(21820),e=c(92675),f=c(39141);function g(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let h={...f.sr.claude},i={...f.sr.codex},j={...e.dG,...f.sr["gemini-cli"]},k={...f.sr.qwen},l={...f.sr.qoder};({...f.sr["qoderwork-cn"]});let m={...f.sr.iflow},n={...e.XP,...f.sr.antigravity,loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:g(),pluginType:2})};function o(){return{ideType:9,platform:g(),pluginType:2}}({...f.sr.openai});let p={...f.sr.github},q={...f.sr.kiro},r=/^[a-z]{2}-[a-z]+-\d{1,2}$/;function s(a){if("string"!=typeof a||!r.test(a))throw Error("Invalid region");return a}let t={...f.sr.cursor,tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"}},u={...f.sr.kimi,clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||process.env.KIMI_OAUTH_CLIENT_ID||f.xq.kimi?.clientId||f.sr.kimi?.clientId},v={...f.sr.kilocode},w={...f.sr.cline},x={...f.sr.clinepass},y={...f.sr.gitlab},z={...f.sr["codebuddy-cn"]},A={...f.sr.kimchi},B={...f.sr["grok-cli"]};({...f.sr["codebuddy-intl"]});let C={...f.sr["frontier-for-all"]},D=3e5},99471:(a,b,c)=>{c.d(b,{Y:()=>k,w:()=>j});var d=c(68001);let e=null,f=0,g=null;async function h(){let a=new AbortController,b=setTimeout(()=>a.abort(),5e3);try{let b=await fetch("https://opencode.ai/zen/v1/models",{signal:a.signal});if(!b.ok)return e||[];let c=await b.json(),g=c.data??c.models??c,h=d.S["opencode-free"](Array.isArray(g)?g:[]);return e=h,f=Date.now(),h}catch{return e||[]}finally{clearTimeout(b)}}async function i(){if(e&&Date.now()-f<6e5)return e;if(!g){g=h();try{return await g}finally{g=null}}return g}async function j(a){let b=(await i()).find(b=>b&&b.id===a);return b?{provider:"opencode",model:b.id}:"big-pickle"===a||String(a).endsWith("-free")?{provider:"opencode",model:a}:null}async function k(){return await i()}}};
@@ -1,2 +0,0 @@
1
- exports.id=7413,exports.ids=[290,7413,9718],exports.modules={19956:(a,b,c)=>{"use strict";c.d(b,{h:()=>d,t:()=>e});let d={OPENAI:"openai",OPENAI_RESPONSES:"openai-responses",OPENAI_RESPONSE:"openai-response",CLAUDE:"claude",GEMINI:"gemini",GEMINI_CLI:"gemini-cli",VERTEX:"vertex",CODEX:"codex",ANTIGRAVITY:"antigravity",KIRO:"kiro",CURSOR:"cursor",OLLAMA:"ollama",COMMANDCODE:"commandcode"};function e(a,b){return a.includes("/v1/responses")?d.OPENAI_RESPONSES:a.includes("/v1/messages")?d.CLAUDE:a.includes("/v1/chat/completions")&&Array.isArray(b?.input)?d.OPENAI:null}},21350:(a,b,c)=>{"use strict";c.r(b),c.d(b,{DELETE:()=>S,GET:()=>Q,POST:()=>R});var d=c(49796),e=c(23211),f=c(79748),g=c.n(f),h=c(33873),i=c.n(h),j=c(21820),k=c.n(j),l=c(55511),m=c.n(l),n=c(28286),o=c(30869),p=c(54603),q=c(68658),r=c(24424);async function s(a){return!!(await (0,q.gN)(a)||await (0,q.wR)(a))}let t=o.h0.appPort,u=`http://localhost:${t}/api/mcp/`,v=null,w=async()=>(v||(v=await (0,p.Xj)("9r-cli-auth")),v),x=async a=>{let b=await w();for(let c of a)"string"==typeof c?.url&&c.url.startsWith(u)&&(c.headers={...c.headers||{},"x-9r-cli-token":b});return a},y="gateway",z={coworkEgressAllowedHosts:["*"],disabledBuiltinTools:[],isLocalDevMcpEnabled:!0,isDesktopExtensionEnabled:!0,isDesktopExtensionDirectoryEnabled:!0,isDesktopExtensionSignatureRequired:!1,isClaudeCodeForDesktopEnabled:!0,disableEssentialTelemetry:!0,disableNonessentialTelemetry:!0,disableNonessentialServices:!0},A=()=>{if("darwin"===k().platform()){let a=i().join(k().homedir(),"Library","Application Support");return[i().join(a,"Claude-3p"),i().join(a,"Claude")]}if("win32"===k().platform()){let a=process.env.LOCALAPPDATA||i().join(k().homedir(),"AppData","Local"),b=process.env.APPDATA||i().join(k().homedir(),"AppData","Roaming");return[i().join(a,"Claude-3p"),i().join(b,"Claude-3p"),i().join(a,"Claude"),i().join(b,"Claude")]}return[i().join(k().homedir(),".config","Claude-3p"),i().join(k().homedir(),".config","Claude")]},B=async()=>{let a=A();for(let b of a)try{return await g().access(i().join(b,"configLibrary")),b}catch{}return a[0]},C=()=>A()[0],D=async()=>i().join(await B(),"configLibrary"),E=()=>i().join(C(),"configLibrary"),F=async()=>i().join(await D(),"_meta.json"),G=()=>{if("darwin"===k().platform())return i().join(k().homedir(),"Library","Application Support","Claude");if("win32"===k().platform()){let a=process.env.APPDATA||i().join(k().homedir(),"AppData","Roaming");return i().join(a,"Claude")}return i().join(k().homedir(),".config","Claude")},H=()=>i().join(G(),"claude_desktop_config.json"),I=async()=>{try{let a=(await g().readFile(H(),"utf-8")).replace(/,(\s*[}\]])/g,"$1");return JSON.parse(a)||{}}catch(a){return{}}},J=async a=>{await g().mkdir(G(),{recursive:!0}),await g().writeFile(H(),JSON.stringify(a,null,2))},K=async()=>{let a=await I();return"3p"!==a.deploymentMode&&(a.deploymentMode="3p",await J(a),!0)},L=async()=>{let a=await I();if(!a.mcpServers||"object"!=typeof a.mcpServers)return;let b=new Set(n.LOCAL_STDIO_PLUGINS.map(a=>a.name));for(let c of Object.keys(a.mcpServers))b.has(c)&&delete a.mcpServers[c];0===Object.keys(a.mcpServers).length&&delete a.mcpServers,await J(a)},M=async()=>{for(let a of[...A(),...(()=>{if("darwin"===k().platform())return["/Applications/Claude.app",i().join(k().homedir(),"Applications","Claude.app")];if("win32"===k().platform()){let a=process.env.LOCALAPPDATA||i().join(k().homedir(),"AppData","Local"),b=process.env.ProgramFiles||"C:\\Program Files";return[i().join(a,"AnthropicClaude"),i().join(b,"Claude"),i().join(b,"AnthropicClaude")]}return[]})()])try{return await g().access(a),!0}catch{}return!1},N=async a=>{try{let b=(await g().readFile(a,"utf-8")).replace(/,(\s*[}\]])/g,"$1");return JSON.parse(b)}catch(a){return null}},O=async()=>{let a=i().join(E(),"_meta.json"),b=await N(a);if(!b||!b.appliedId){let c=await N(await F());if(c?.appliedId)b=c;else{let a=m().randomUUID();b={appliedId:a,entries:[{id:a,name:"Default"}]}}await g().mkdir(E(),{recursive:!0}),await g().writeFile(a,JSON.stringify(b,null,2))}return b};async function P(a){let b=i().join(C(),"config.json"),c={};try{c=JSON.parse(await g().readFile(b,"utf-8"))||{}}catch(a){if("ENOENT"!==a.code)return{error:a.code}}let d={};for(let b of a)b?.name&&(d[b.name]=!0);return c.operonSkipMcpApprovals=d,await g().mkdir(C(),{recursive:!0}),await g().writeFile(b,JSON.stringify(c,null,2)),{written:Object.keys(d).length}}async function Q(a){if(!await s(a))return e.NextResponse.json({error:"Unauthorized"},{status:401});try{if(!await M())return e.NextResponse.json({installed:!1,config:null,message:"Claude Desktop (Cowork mode) not detected"});let a=await N(await F()),b=a?.appliedId||null,c=await D(),d=b?i().join(c,`${b}.json`):null,f=d?await N(d):null,g=f?.inferenceGatewayBaseUrl||null,h=Array.isArray(f?.inferenceModels)?f.inferenceModels.map(a=>"string"==typeof a?a:a?.name).filter(Boolean):[],j=Array.isArray(f?.managedMcpServers)?f.managedMcpServers:[],k=!!(f?.inferenceProvider===y&&g),l=new Set(n.LOCAL_STDIO_PLUGINS.map(a=>a.name)),m=j.filter(a=>l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/")).map(a=>a.name),o=j.filter(a=>a.custom||!l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/")).map(a=>({name:a.name,url:a.url,transport:a.transport,custom:!0}));return e.NextResponse.json({installed:!0,config:f,has9Router:k,configPath:d,cowork:{appliedId:b,baseUrl:g,models:h,provider:f?.inferenceProvider||null,plugins:j.filter(a=>!a.custom&&!(l.has(a.name)&&"string"==typeof a.url&&a.url.includes("/api/mcp/"))).map(a=>{let b=a.toolPolicy?Object.keys(a.toolPolicy):[],c=`${a.name}-`,d=new Set;for(let a of b){let b=a;for(;b.startsWith(c);)b=b.slice(c.length);d.add(b)}let e=n.DEFAULT_PLUGINS.find(b=>b.name===a.name),f=e&&Array.isArray(e.toolNames)?e.toolNames:Array.from(d);return{name:a.name,url:a.url,transport:a.transport,oauth:!!a.oauth,toolNames:f}}),localPlugins:m,customPlugins:o},defaultPlugins:n.DEFAULT_PLUGINS,localStdioPlugins:n.LOCAL_STDIO_PLUGINS})}catch(a){return console.log("Error reading cowork settings:",a),e.NextResponse.json({error:"Failed to read cowork settings"},{status:500})}}async function R(a){if(!await s(a))return e.NextResponse.json({error:"Unauthorized"},{status:401});try{let{baseUrl:b,apiKey:c,models:d,plugins:f,localPlugins:h,customPlugins:j}=await a.json();if(!b||!c)return e.NextResponse.json({error:"baseUrl and apiKey are required"},{status:400});let k=Array.isArray(d)?d.filter(a=>"string"==typeof a&&a.trim()):[];if(0===k.length)return e.NextResponse.json({error:"At least one model is required"},{status:400});let l=Array.isArray(f)?f:n.DEFAULT_PLUGINS,m=Array.isArray(h)?h:[],o=(Array.isArray(j)?j:[]).filter(a=>a?.url),p=await x((a=>{let b=Array.isArray(a)?a:[],c=[];for(let a of b){let b=n.LOCAL_STDIO_PLUGINS.find(b=>b.name===a);if(!b)continue;let d={name:b.name,url:`http://localhost:${t}/api/mcp/${b.name}/sse`,transport:"sse"};if(Array.isArray(b.toolNames)&&b.toolNames.length>0){let a=`${b.name}-`,c={};for(let d of b.toolNames)c[d]="allow",c[`${a}${d}`]="allow";d.toolPolicy=c}c.push(d)}return c})(m)),q=await x((a=>{if(!Array.isArray(a))return[];let b=[];for(let c of a)c?.name&&c?.url&&b.push({name:c.name,url:c.url,transport:c.transport||"sse",custom:!0});return b})(o)),r=[...(0,n.buildManagedMcpServers)(l),...p,...q],s=await K(),u=await O(),v=i().join(E(),`${u.appliedId}.json`),w={...z,inferenceProvider:y,inferenceGatewayBaseUrl:b,inferenceGatewayApiKey:c,inferenceModels:k.map(a=>({name:a}))};r.length>0&&(w.managedMcpServers=r),await g().writeFile(v,JSON.stringify(w,null,2));let A=null;try{A=await P(r)}catch(a){A={error:a.message}}try{await L()}catch{}return e.NextResponse.json({success:!0,bootstrapped:s,message:s?"Cowork enabled (3p mode set). Quit & reopen Claude Desktop.":"Cowork settings applied. Quit & reopen Claude Desktop.",configPath:v,skipApprovals:A,localMcp:{applied:m,via:"3p-sse-bridge"}})}catch(a){return console.log("Error applying cowork settings:",a),e.NextResponse.json({error:"Failed to apply cowork settings"},{status:500})}}async function S(a){if(!await s(a))return e.NextResponse.json({error:"Unauthorized"},{status:401});try{let a=await N(await F());if(!a?.appliedId)return e.NextResponse.json({success:!0,message:"No active config to reset"});let b=i().join(await D(),`${a.appliedId}.json`);try{await g().writeFile(b,JSON.stringify({},null,2))}catch(a){if("ENOENT"!==a.code)throw a}try{await P([])}catch{}try{await L()}catch{}return e.NextResponse.json({success:!0,message:"Cowork config reset"})}catch(a){return console.log("Error resetting cowork settings:",a),e.NextResponse.json({error:"Failed to reset cowork settings"},{status:500})}}(0,r.D)([Q,R,S]),(0,d.A)(Q,"4059c7e26fde55825a3712d08f5a55c079d047f0e6",null),(0,d.A)(R,"4010530ec3a11e2fb755197427de425d12f3ef8f42",null),(0,d.A)(S,"407c7fc61b289fc3b03697e8a2d117de71147a33c6",null)},24424:(a,b)=>{"use strict";function c(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(b,"D",{enumerable:!0,get:function(){return c}})},28286:a=>{"use strict";a.exports={DEFAULT_PLUGINS:[{name:"exa",title:"Exa",description:"Real-time web search and code documentation",url:"https://mcp.exa.ai/mcp",transport:"http",oauth:!1,toolNames:["web_search_exa","web_fetch_exa"]},{name:"tavily",title:"Tavily",description:"Real-time web search optimized for LLM agents",url:"https://mcp.tavily.com/mcp",transport:"http",oauth:!0,toolNames:["tavily_search","tavily_extract","tavily_crawl","tavily_map"]}],LOCAL_STDIO_PLUGINS:[{name:"browsermcp",title:"Browser MCP",description:"Control your running Chrome (requires Chrome extension)",extensionUrl:"https://chromewebstore.google.com/detail/browser-mcp-automate-your/bjfgambnhccakkhmkepdoekmckoijdlc",command:"npx",args:["-y","@browsermcp/mcp@latest"],toolNames:["browser_navigate","browser_snapshot","browser_click","browser_type","browser_screenshot","browser_get_console_logs","browser_wait","browser_press_key","browser_go_back","browser_go_forward"]}],buildManagedMcpServers:function(a){let b=Array.isArray(a)?a:[],c=[],d=new Set;for(let a of b){if(!a?.name||!a?.url||d.has(a.name))continue;d.add(a.name);let b={name:a.name,url:a.url,transport:a.transport||(/\/sse(\b|\/)/i.test(a.url)?"sse":"http")};if(a.oauth&&(b.oauth=!0),Array.isArray(a.toolNames)&&a.toolNames.length>0){let c=`${a.name}-`,d=new Set;for(let b of a.toolNames){if("string"!=typeof b||!b)continue;let a=b;for(;a.startsWith(c);)a=a.slice(c.length);d.add(a)}let e={};for(let a of d)e[a]="allow",e[`${c}${a}`]="allow";b.toolPolicy=e}c.push(b)}return c}}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rabbi696/ezrouter",installCmd:"npm i -g @rabbi696/ezrouter",installCmdLatest:"npm i -g @rabbi696/ezrouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20126},h={maxLines:200,pollIntervalMs:1e3,streamTimeoutMs:5e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingInactiveSession:!0,inactiveMinPingIntervalMs:18e6,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},39006:a=>{"use strict";a.exports={rE:"0.6.3"}},49796:(a,b,c)=>{"use strict";Object.defineProperty(b,"A",{enumerable:!0,get:function(){return d.registerServerReference}});let d=c(77943)},60290:(a,b,c)=>{"use strict";c.d(b,{C8:()=>t,DR:()=>s,IK:()=>m,Ps:()=>h,Qn:()=>q,SA:()=>p,UH:()=>k,Uc:()=>n,Ur:()=>g,Z1:()=>j,cI:()=>r,eo:()=>o,gx:()=>d,pH:()=>l,v1:()=>e,xM:()=>i}),c(87252);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,PAYLOAD_TOO_LARGE:413,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,sessionAffinityMaxSize:5e3,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20};function f(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}function g(){return{firstActionTimeoutMs:f("COMBO_RESPONSE_FIRST_ACTION_TIMEOUT_MS",5e3),maxBytes:f("COMBO_RESPONSE_PREFLIGHT_MAX_BYTES",65536)}}let h=process.env.SEARXNG_URL?.trim()||"http://localhost:8888/search",i=f("STREAM_STALL_TIMEOUT_MS",36e4),j=f("STREAM_FIRST_CHUNK_TIMEOUT_MS",3e4),k=(()=>{let a=process.env.SSE_KEEPALIVE_MS;if(null==a||""===a)return 1e4;let b=parseInt(a,10);return Number.isFinite(b)&&b>=0?b:1e4})(),l=f("FETCH_CONNECT_TIMEOUT_MS",6e4);f("RESPONSE_BODY_TIMEOUT_MS",3e5);let m=f("GEMINI_NATIVE_TTS_FETCH_TIMEOUT_MS",45e3),n=64e3,o=32e3,p="x-9router-token-saver",q={maxTokenLength:160,maxAttempts:32,headers:{requestedModel:"X-9Router-Requested-Model",routePath:"X-9Router-Route-Path",resolvedProvider:"X-9Router-Resolved-Provider",resolvedModel:"X-9Router-Resolved-Model",fallbackCount:"X-9Router-Fallback-Count",attemptedModels:"X-9Router-Attempted-Models"}},r={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function s(a){return null==a?{attempts:0,delayMs:2e3}:"number"==typeof a?{attempts:a,delayMs:2e3}:{attempts:a.attempts||0,delayMs:null!=a.delayMs?a.delayMs:2e3}}let t=["Please write a 5-10 word title for the following conversation:"]},77943:(a,b,c)=>{"use strict";a.exports=c(7553).vendored["react-rsc"].ReactServerDOMWebpackServer},78335:()=>{},87252:(a,b,c)=>{"use strict";c.d(b,{Dp:()=>g,EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},413:{type:"invalid_request_error",code:"context_length_exceeded"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"You exceeded your current quota",404:"Model not found",406:"Model not supported",413:"Your input exceeds the context window of this model",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:18e5,maxLevel:15},g=42e4,h=26784e5,i=[{text:"monthly_request_count",cooldownMs:216e5},{text:"monthly limit",cooldownMs:216e5},{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:413,fallback:!1},{status:429,backoff:!0}]},89718:(a,b,c)=>{"use strict";c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mV:()=>d.mV,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,y7:()=>d.y7,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(5129)},96487:()=>{}};