zevairouter 1.0.154 → 1.0.156

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 (1857) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/DOCKER.md +403 -0
  3. package/README.md +50 -22
  4. package/README.zh-CN.md +18 -11
  5. package/cli/LICENSE +1 -22
  6. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  7. package/cli/app/.next-cli-build/app-path-routes-manifest.json +5 -5
  8. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  9. package/cli/app/.next-cli-build/required-server-files.json +4 -4
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +2 -2
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +2 -2
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  62. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  63. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  64. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  65. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  66. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  67. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  68. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  69. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  70. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  71. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  72. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  73. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  74. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  75. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  76. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +2 -2
  77. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  78. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  79. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  80. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  81. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  82. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  83. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  84. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  85. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  86. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  87. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  88. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  90. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  91. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  92. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  93. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  94. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  95. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  96. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  97. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  98. package/cli/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  99. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  100. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  101. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  102. package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  103. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  104. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  105. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  106. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  107. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  108. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route_client-reference-manifest.js +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route_client-reference-manifest.js +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route_client-reference-manifest.js +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/cache/stats/route_client-reference-manifest.js +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/changelog/route.js +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/changelog/route_client-reference-manifest.js +1 -1
  133. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  135. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route_client-reference-manifest.js +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route_client-reference-manifest.js +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route_client-reference-manifest.js +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route_client-reference-manifest.js +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route_client-reference-manifest.js +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route_client-reference-manifest.js +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route_client-reference-manifest.js +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route_client-reference-manifest.js +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/combos/route_client-reference-manifest.js +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/context/[id]/route_client-reference-manifest.js +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/context/bulk/route_client-reference-manifest.js +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/context/route_client-reference-manifest.js +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route_client-reference-manifest.js +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route_client-reference-manifest.js +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route_client-reference-manifest.js +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route_client-reference-manifest.js +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route_client-reference-manifest.js +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route_client-reference-manifest.js +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/headroom/start/route_client-reference-manifest.js +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/headroom/status/route_client-reference-manifest.js +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route_client-reference-manifest.js +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/health/ready/route_client-reference-manifest.js +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/health/route.js +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/health/route_client-reference-manifest.js +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/init/route_client-reference-manifest.js +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route_client-reference-manifest.js +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/keys/route_client-reference-manifest.js +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/locale/route_client-reference-manifest.js +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route_client-reference-manifest.js +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route_client-reference-manifest.js +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route_client-reference-manifest.js +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route_client-reference-manifest.js +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route_client-reference-manifest.js +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/metrics/route.js +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/metrics/route_client-reference-manifest.js +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/models/custom/route_client-reference-manifest.js +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/models/disabled/route_client-reference-manifest.js +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/models/route_client-reference-manifest.js +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/models/test/route_client-reference-manifest.js +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route_client-reference-manifest.js +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  299. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route_client-reference-manifest.js +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route_client-reference-manifest.js +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route_client-reference-manifest.js +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route_client-reference-manifest.js +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route_client-reference-manifest.js +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route_client-reference-manifest.js +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js +1 -1
  317. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route_client-reference-manifest.js +1 -1
  319. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route_client-reference-manifest.js +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route_client-reference-manifest.js +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route_client-reference-manifest.js +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route_client-reference-manifest.js +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route_client-reference-manifest.js +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route_client-reference-manifest.js +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js +1 -1
  338. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  339. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route_client-reference-manifest.js +1 -1
  340. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
  341. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  342. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route_client-reference-manifest.js +1 -1
  343. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
  344. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  345. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route_client-reference-manifest.js +1 -1
  346. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +1 -1
  347. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  348. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route_client-reference-manifest.js +1 -1
  349. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  350. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  351. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route_client-reference-manifest.js +1 -1
  352. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +1 -1
  353. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  354. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route_client-reference-manifest.js +1 -1
  355. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +1 -1
  356. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  357. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route_client-reference-manifest.js +1 -1
  358. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  359. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  360. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route_client-reference-manifest.js +1 -1
  361. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js +1 -1
  362. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  363. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route_client-reference-manifest.js +1 -1
  364. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js +1 -1
  365. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  366. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route_client-reference-manifest.js +1 -1
  367. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  368. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  369. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +1 -1
  370. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  371. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  372. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  373. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  374. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  375. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  376. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  377. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  378. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route_client-reference-manifest.js +1 -1
  379. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  380. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  381. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
  382. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  383. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  384. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  385. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +1 -1
  386. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  387. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route_client-reference-manifest.js +1 -1
  388. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  389. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  390. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route_client-reference-manifest.js +1 -1
  391. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js +1 -1
  392. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  393. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route_client-reference-manifest.js +1 -1
  394. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js +1 -1
  395. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  396. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route_client-reference-manifest.js +1 -1
  397. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js +1 -1
  398. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  399. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route_client-reference-manifest.js +1 -1
  400. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  401. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  402. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  403. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  404. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  405. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  406. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  407. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  408. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  409. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +1 -1
  410. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  411. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route_client-reference-manifest.js +1 -1
  412. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  413. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  414. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route_client-reference-manifest.js +1 -1
  415. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js +1 -1
  416. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  417. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route_client-reference-manifest.js +1 -1
  418. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js +1 -1
  419. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  420. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route_client-reference-manifest.js +1 -1
  421. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js +1 -1
  422. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  423. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route_client-reference-manifest.js +1 -1
  424. package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  425. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  426. package/cli/app/.next-cli-build/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  427. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  428. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  429. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  430. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  431. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  432. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  433. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  434. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  435. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  436. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  437. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  438. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  439. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  440. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  441. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  442. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  443. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  444. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  445. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  446. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  447. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  448. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
  449. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  450. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route_client-reference-manifest.js +1 -1
  451. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  452. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  453. package/cli/app/.next-cli-build/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  454. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  455. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  456. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route_client-reference-manifest.js +1 -1
  457. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  458. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  459. package/cli/app/.next-cli-build/server/app/api/providers/route_client-reference-manifest.js +1 -1
  460. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  461. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  462. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route_client-reference-manifest.js +1 -1
  463. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  464. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  465. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  466. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  467. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  468. package/cli/app/.next-cli-build/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  469. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  470. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  471. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route_client-reference-manifest.js +1 -1
  472. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  473. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  474. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route_client-reference-manifest.js +1 -1
  475. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  476. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  477. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route_client-reference-manifest.js +1 -1
  478. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  479. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  480. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route_client-reference-manifest.js +1 -1
  481. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  482. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  483. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route_client-reference-manifest.js +1 -1
  484. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  485. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  486. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route_client-reference-manifest.js +1 -1
  487. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js +1 -1
  488. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  489. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route_client-reference-manifest.js +1 -1
  490. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js +1 -1
  491. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  492. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route_client-reference-manifest.js +1 -1
  493. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +1 -1
  494. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  495. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route_client-reference-manifest.js +1 -1
  496. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  497. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  498. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route_client-reference-manifest.js +1 -1
  499. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +1 -1
  500. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  501. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route_client-reference-manifest.js +1 -1
  502. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  503. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  504. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route_client-reference-manifest.js +1 -1
  505. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +1 -1
  506. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  507. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route_client-reference-manifest.js +1 -1
  508. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  509. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  510. package/cli/app/.next-cli-build/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  511. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  512. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  513. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
  514. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  515. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  516. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  517. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  518. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  519. package/cli/app/.next-cli-build/server/app/api/settings/route_client-reference-manifest.js +1 -1
  520. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  521. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  522. package/cli/app/.next-cli-build/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  523. package/cli/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  524. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  525. package/cli/app/.next-cli-build/server/app/api/tags/route_client-reference-manifest.js +1 -1
  526. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js +1 -1
  527. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  528. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route_client-reference-manifest.js +1 -1
  529. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js +1 -1
  530. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  531. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route_client-reference-manifest.js +1 -1
  532. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js +1 -1
  533. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  534. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route_client-reference-manifest.js +1 -1
  535. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js +1 -1
  536. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  537. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route_client-reference-manifest.js +1 -1
  538. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js +1 -1
  539. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  540. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route_client-reference-manifest.js +1 -1
  541. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js +1 -1
  542. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  543. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route_client-reference-manifest.js +1 -1
  544. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js +1 -1
  545. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  546. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route_client-reference-manifest.js +1 -1
  547. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js +1 -1
  548. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  549. package/cli/app/.next-cli-build/server/app/api/terminal/session/route_client-reference-manifest.js +1 -1
  550. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  551. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  552. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
  553. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  554. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  555. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
  556. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  557. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  558. package/cli/app/.next-cli-build/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  559. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  560. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  561. package/cli/app/.next-cli-build/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  562. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  563. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  564. package/cli/app/.next-cli-build/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  565. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  566. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  567. package/cli/app/.next-cli-build/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  568. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  569. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  570. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
  571. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  572. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  573. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
  574. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  575. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  576. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
  577. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  578. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  579. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route_client-reference-manifest.js +1 -1
  580. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  581. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  582. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route_client-reference-manifest.js +1 -1
  583. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  584. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  585. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route_client-reference-manifest.js +1 -1
  586. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  587. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  588. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route_client-reference-manifest.js +1 -1
  589. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  590. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  591. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  592. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  593. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  594. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route_client-reference-manifest.js +1 -1
  595. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  596. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  597. package/cli/app/.next-cli-build/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  598. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  599. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  600. package/cli/app/.next-cli-build/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  601. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  602. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  603. package/cli/app/.next-cli-build/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  604. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  605. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  606. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  607. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  608. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  609. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  610. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  611. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  612. package/cli/app/.next-cli-build/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
  613. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  614. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  615. package/cli/app/.next-cli-build/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  616. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  617. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  618. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  619. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  620. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  621. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  622. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  623. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  624. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  625. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  626. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  627. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route_client-reference-manifest.js +1 -1
  628. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  629. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  630. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  631. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  632. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  633. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  634. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  635. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  636. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  637. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  638. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  639. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  640. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  641. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  642. package/cli/app/.next-cli-build/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  643. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  644. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  645. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +1 -1
  646. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  647. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  648. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route_client-reference-manifest.js +1 -1
  649. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  650. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  651. package/cli/app/.next-cli-build/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  652. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  653. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  654. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route_client-reference-manifest.js +1 -1
  655. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  656. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  657. package/cli/app/.next-cli-build/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  658. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  659. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  660. package/cli/app/.next-cli-build/server/app/api/v1/route_client-reference-manifest.js +1 -1
  661. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  662. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  663. package/cli/app/.next-cli-build/server/app/api/v1/search/route_client-reference-manifest.js +1 -1
  664. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  665. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  666. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route_client-reference-manifest.js +1 -1
  667. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  668. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  669. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  670. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  671. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  672. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  673. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  674. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  675. package/cli/app/.next-cli-build/server/app/api/version/route_client-reference-manifest.js +1 -1
  676. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  677. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  678. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route_client-reference-manifest.js +1 -1
  679. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  680. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  681. package/cli/app/.next-cli-build/server/app/api/version/update/route_client-reference-manifest.js +1 -1
  682. package/cli/app/.next-cli-build/server/app/callback/page.js +1 -1
  683. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  684. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  685. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  686. package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
  687. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  688. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  689. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  690. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  691. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  692. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  693. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  694. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
  695. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  696. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  697. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  698. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  699. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
  700. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  701. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
  702. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  703. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  704. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  705. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  706. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  707. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  708. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  709. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  710. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  711. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  712. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  713. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  714. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  715. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  716. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  717. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  718. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  719. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  720. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  721. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  722. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  723. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  724. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  725. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  726. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  727. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  728. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  729. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  730. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  731. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  732. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  733. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  734. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
  735. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  736. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  737. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  738. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  739. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
  740. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  741. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
  742. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  743. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  744. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  745. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  746. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  747. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  748. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  749. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  750. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  751. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  752. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  753. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  754. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  755. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  756. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  757. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  758. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  759. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  760. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  761. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  762. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  763. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  764. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  765. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  766. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  767. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  768. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  769. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  770. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  771. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  772. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  773. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  774. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  775. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +5 -5
  776. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  777. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
  778. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  779. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  780. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +5 -5
  781. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
  782. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +3 -3
  783. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  784. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  785. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  786. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  787. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  788. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  789. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  790. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  791. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  792. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  793. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  794. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  795. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  796. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  797. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  798. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  799. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  800. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  801. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  802. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  803. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  804. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  805. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  806. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  807. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  808. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  809. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  810. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  811. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  812. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  813. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  814. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  815. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  816. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  817. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  818. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  819. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  820. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  821. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  822. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  823. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  824. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  825. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  826. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  827. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  828. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  829. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  830. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  831. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  832. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  833. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  834. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  835. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  836. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  837. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  838. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  839. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  840. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  841. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  842. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  843. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  844. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  845. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  846. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  847. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  848. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  849. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  850. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  851. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  852. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  853. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  854. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  855. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  856. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  857. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  858. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  859. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  860. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  861. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  862. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  863. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  864. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  865. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  866. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  867. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  868. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  869. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  870. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  871. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  872. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  873. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  874. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  875. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  876. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  877. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  878. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  879. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  880. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  881. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  882. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  883. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  884. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  885. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  886. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  887. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  888. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  889. package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  890. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  891. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  892. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  893. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  894. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  895. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  896. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  897. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  898. package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
  899. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  900. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  901. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  902. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  903. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  904. package/cli/app/.next-cli-build/server/app/landing/page.js +1 -1
  905. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  906. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  907. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  908. package/cli/app/.next-cli-build/server/app/landing.rsc +4 -4
  909. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  910. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  911. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  912. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  913. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  914. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  915. package/cli/app/.next-cli-build/server/app/login/page.js +2 -2
  916. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  917. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  918. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  919. package/cli/app/.next-cli-build/server/app/login.rsc +4 -4
  920. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  921. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  922. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  923. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  924. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  925. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  926. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  927. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  928. package/cli/app/.next-cli-build/server/app/page.js +1 -1
  929. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  930. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  931. package/cli/app/.next-cli-build/server/app-paths-manifest.json +5 -5
  932. package/cli/app/.next-cli-build/server/chunks/2030.js +1 -1
  933. package/cli/app/.next-cli-build/server/chunks/3155.js +1 -1
  934. package/cli/app/.next-cli-build/server/chunks/319.js +3 -3
  935. package/cli/app/.next-cli-build/server/chunks/4650.js +1 -1
  936. package/cli/app/.next-cli-build/server/chunks/4746.js +1 -1
  937. package/cli/app/.next-cli-build/server/chunks/5307.js +1 -1
  938. package/cli/app/.next-cli-build/server/chunks/5469.js +1 -1
  939. package/cli/app/.next-cli-build/server/chunks/5949.js +12 -11
  940. package/cli/app/.next-cli-build/server/chunks/8242.js +1 -1
  941. package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
  942. package/cli/app/.next-cli-build/server/chunks/9372.js +1 -1
  943. package/cli/app/.next-cli-build/server/chunks/9621.js +1 -1
  944. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  945. package/cli/app/.next-cli-build/server/next-font-manifest.js +1 -1
  946. package/cli/app/.next-cli-build/server/next-font-manifest.json +1 -1
  947. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  948. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  949. package/cli/app/.next-cli-build/static/chunks/{620-a13f0f7b318585ab.js → 620-e2ce4ad6877127f3.js} +1 -1
  950. package/cli/app/.next-cli-build/static/chunks/app/login/page-f7df7d9a053d65b7.js +1 -0
  951. package/cli/app/CHANGELOG.md +35 -0
  952. package/cli/app/cli/hooks/postinstall.js +82 -50
  953. package/cli/app/cli/hooks/safeGlobalInstall.js +178 -10
  954. package/cli/app/cli/hooks/startupRuntime.js +31 -0
  955. package/cli/app/cli/hooks/streamCommand.js +63 -0
  956. package/cli/app/package.json +48 -41
  957. package/cli/app/server.js +1 -1
  958. package/cli/cli.js +709 -248
  959. package/cli/hooks/postinstall.js +82 -50
  960. package/cli/hooks/safeGlobalInstall.js +178 -10
  961. package/cli/hooks/startupRuntime.js +31 -0
  962. package/cli/hooks/streamCommand.js +63 -0
  963. package/cli/package.json +6 -5
  964. package/cli/src/cli/systemdEnv.js +93 -0
  965. package/cli/src/cli/tray/autostart.js +87 -33
  966. package/cli/src/cli/tray/tray.js +3 -3
  967. package/cli/src/cli/updateRuntimeState.js +993 -0
  968. package/package.json +48 -41
  969. package/scripts/start-standalone.mjs +24 -15
  970. package/cli/app/.next-cli-build/static/chunks/app/login/page-9ea3f794879db097.js +0 -1
  971. package/i18n/README.ja-JP.md +0 -34
  972. package/i18n/README.ru.md +0 -34
  973. package/i18n/README.vi.md +0 -34
  974. package/i18n/README.zh-CN.md +0 -34
  975. package/images/screenshots/automation.png +0 -0
  976. package/images/screenshots/endpoint.png +0 -0
  977. package/images/screenshots/playground.png +0 -0
  978. package/images/screenshots/providers.png +0 -0
  979. package/images/screenshots/usage.png +0 -0
  980. package/images/zevairouter.png +0 -0
  981. package/jsconfig.json +0 -12
  982. package/next.config.mjs +0 -96
  983. package/open-sse/config/appConstants.js +0 -230
  984. package/open-sse/config/codexInstructions.js +0 -119
  985. package/open-sse/config/constants.js +0 -4
  986. package/open-sse/config/defaultThinkingSignature.js +0 -12
  987. package/open-sse/config/errorConfig.js +0 -92
  988. package/open-sse/config/googleTtsLanguages.js +0 -62
  989. package/open-sse/config/kiroConstants.js +0 -360
  990. package/open-sse/config/models.js +0 -13
  991. package/open-sse/config/ollamaModels.js +0 -19
  992. package/open-sse/config/providerModels.js +0 -1058
  993. package/open-sse/config/providers.js +0 -543
  994. package/open-sse/config/runtimeConfig.js +0 -72
  995. package/open-sse/config/ttsModels.js +0 -129
  996. package/open-sse/context/injectContext.js +0 -82
  997. package/open-sse/executors/antigravity.js +0 -605
  998. package/open-sse/executors/autoclaw.js +0 -121
  999. package/open-sse/executors/azure.js +0 -57
  1000. package/open-sse/executors/base.js +0 -221
  1001. package/open-sse/executors/codebuddy-cn.js +0 -31
  1002. package/open-sse/executors/codex.js +0 -484
  1003. package/open-sse/executors/commandcode.js +0 -88
  1004. package/open-sse/executors/cursor.js +0 -795
  1005. package/open-sse/executors/default.js +0 -532
  1006. package/open-sse/executors/gemini-cli.js +0 -89
  1007. package/open-sse/executors/github.js +0 -383
  1008. package/open-sse/executors/grok-cli.js +0 -397
  1009. package/open-sse/executors/grok-web.js +0 -345
  1010. package/open-sse/executors/iflow.js +0 -108
  1011. package/open-sse/executors/index.js +0 -92
  1012. package/open-sse/executors/kimchi.js +0 -123
  1013. package/open-sse/executors/kiro.js +0 -537
  1014. package/open-sse/executors/mimo-free.js +0 -156
  1015. package/open-sse/executors/ollama-local.js +0 -14
  1016. package/open-sse/executors/opencode-go.js +0 -41
  1017. package/open-sse/executors/opencode.js +0 -32
  1018. package/open-sse/executors/perplexity-web.js +0 -507
  1019. package/open-sse/executors/qoder.js +0 -468
  1020. package/open-sse/executors/qwen.js +0 -129
  1021. package/open-sse/executors/vertex.js +0 -131
  1022. package/open-sse/executors/xiaomi-tokenplan.js +0 -19
  1023. package/open-sse/handlers/chatCore/nonStreamingHandler.js +0 -261
  1024. package/open-sse/handlers/chatCore/requestDetail.js +0 -112
  1025. package/open-sse/handlers/chatCore/sseToJsonHandler.js +0 -540
  1026. package/open-sse/handlers/chatCore/streamingHandler.js +0 -125
  1027. package/open-sse/handlers/chatCore.js +0 -398
  1028. package/open-sse/handlers/embeddingProviders/_base.js +0 -4
  1029. package/open-sse/handlers/embeddingProviders/gemini.js +0 -57
  1030. package/open-sse/handlers/embeddingProviders/index.js +0 -23
  1031. package/open-sse/handlers/embeddingProviders/openai.js +0 -39
  1032. package/open-sse/handlers/embeddingProviders/openaiCompatNode.js +0 -16
  1033. package/open-sse/handlers/embeddingsCore.js +0 -126
  1034. package/open-sse/handlers/fetch/index.js +0 -237
  1035. package/open-sse/handlers/imageGenerationCore.js +0 -189
  1036. package/open-sse/handlers/imageProviders/_base.js +0 -31
  1037. package/open-sse/handlers/imageProviders/blackForestLabs.js +0 -46
  1038. package/open-sse/handlers/imageProviders/cloudflareAi.js +0 -181
  1039. package/open-sse/handlers/imageProviders/codex.js +0 -201
  1040. package/open-sse/handlers/imageProviders/comfyui.js +0 -11
  1041. package/open-sse/handlers/imageProviders/falAi.js +0 -44
  1042. package/open-sse/handlers/imageProviders/gemini.js +0 -28
  1043. package/open-sse/handlers/imageProviders/huggingface.js +0 -25
  1044. package/open-sse/handlers/imageProviders/index.js +0 -40
  1045. package/open-sse/handlers/imageProviders/nanobanana.js +0 -61
  1046. package/open-sse/handlers/imageProviders/openai.js +0 -40
  1047. package/open-sse/handlers/imageProviders/runwayml.js +0 -50
  1048. package/open-sse/handlers/imageProviders/sdwebui.js +0 -20
  1049. package/open-sse/handlers/imageProviders/stabilityAi.js +0 -37
  1050. package/open-sse/handlers/responsesHandler.js +0 -46
  1051. package/open-sse/handlers/search/callers.js +0 -371
  1052. package/open-sse/handlers/search/chatSearch.js +0 -409
  1053. package/open-sse/handlers/search/index.js +0 -201
  1054. package/open-sse/handlers/search/normalizers.js +0 -223
  1055. package/open-sse/handlers/sttCore.js +0 -194
  1056. package/open-sse/handlers/ttsCore.js +0 -74
  1057. package/open-sse/handlers/ttsProviders/_base.js +0 -39
  1058. package/open-sse/handlers/ttsProviders/edgeTts.js +0 -92
  1059. package/open-sse/handlers/ttsProviders/elevenlabs.js +0 -51
  1060. package/open-sse/handlers/ttsProviders/gemini.js +0 -120
  1061. package/open-sse/handlers/ttsProviders/genericFormats.js +0 -169
  1062. package/open-sse/handlers/ttsProviders/googleTts.js +0 -57
  1063. package/open-sse/handlers/ttsProviders/index.js +0 -50
  1064. package/open-sse/handlers/ttsProviders/localDevice.js +0 -90
  1065. package/open-sse/handlers/ttsProviders/minimax.js +0 -59
  1066. package/open-sse/handlers/ttsProviders/openai.js +0 -33
  1067. package/open-sse/handlers/ttsProviders/openrouter.js +0 -73
  1068. package/open-sse/index.js +0 -82
  1069. package/open-sse/rtk/applyFilter.js +0 -15
  1070. package/open-sse/rtk/autodetect.js +0 -111
  1071. package/open-sse/rtk/caveman.js +0 -100
  1072. package/open-sse/rtk/cavemanPrompts.js +0 -78
  1073. package/open-sse/rtk/constants.js +0 -55
  1074. package/open-sse/rtk/filters/buildOutput.js +0 -127
  1075. package/open-sse/rtk/filters/dedupLog.js +0 -44
  1076. package/open-sse/rtk/filters/find.js +0 -49
  1077. package/open-sse/rtk/filters/gitDiff.js +0 -92
  1078. package/open-sse/rtk/filters/gitStatus.js +0 -117
  1079. package/open-sse/rtk/filters/grep.js +0 -48
  1080. package/open-sse/rtk/filters/ls.js +0 -79
  1081. package/open-sse/rtk/filters/readNumbered.js +0 -27
  1082. package/open-sse/rtk/filters/searchList.js +0 -52
  1083. package/open-sse/rtk/filters/smartTruncate.js +0 -15
  1084. package/open-sse/rtk/filters/tree.js +0 -32
  1085. package/open-sse/rtk/headroom.js +0 -348
  1086. package/open-sse/rtk/index.js +0 -155
  1087. package/open-sse/rtk/ponytail.js +0 -91
  1088. package/open-sse/rtk/ponytailPrompts.js +0 -44
  1089. package/open-sse/rtk/pxpipe.js +0 -104
  1090. package/open-sse/rtk/registry.js +0 -38
  1091. package/open-sse/services/accountFallback.js +0 -467
  1092. package/open-sse/services/antigravityHeaderScrub.js +0 -78
  1093. package/open-sse/services/antigravityIdentity.js +0 -115
  1094. package/open-sse/services/antigravityObfuscation.js +0 -92
  1095. package/open-sse/services/clinepassModels.js +0 -63
  1096. package/open-sse/services/combo.js +0 -189
  1097. package/open-sse/services/compact.js +0 -71
  1098. package/open-sse/services/copilotModels.js +0 -155
  1099. package/open-sse/services/kimchiModels.js +0 -176
  1100. package/open-sse/services/kiroModels.js +0 -320
  1101. package/open-sse/services/model.js +0 -281
  1102. package/open-sse/services/oauthCredentialManager.js +0 -151
  1103. package/open-sse/services/projectId.js +0 -463
  1104. package/open-sse/services/provider.js +0 -356
  1105. package/open-sse/services/qoderModels.js +0 -216
  1106. package/open-sse/services/tokenRefresh.js +0 -949
  1107. package/open-sse/services/usage.js +0 -2415
  1108. package/open-sse/transformer/responsesTransformer.js +0 -509
  1109. package/open-sse/transformer/streamToJsonConverter.js +0 -151
  1110. package/open-sse/translator/formats.js +0 -36
  1111. package/open-sse/translator/helpers/claudeHelper.js +0 -217
  1112. package/open-sse/translator/helpers/geminiHelper.js +0 -372
  1113. package/open-sse/translator/helpers/imageHelper.js +0 -98
  1114. package/open-sse/translator/helpers/maxTokensHelper.js +0 -27
  1115. package/open-sse/translator/helpers/openaiHelper.js +0 -130
  1116. package/open-sse/translator/helpers/responsesApiHelper.js +0 -214
  1117. package/open-sse/translator/helpers/toolCallHelper.js +0 -148
  1118. package/open-sse/translator/index.js +0 -254
  1119. package/open-sse/translator/request/antigravity-to-openai.js +0 -255
  1120. package/open-sse/translator/request/claude-to-openai.js +0 -278
  1121. package/open-sse/translator/request/gemini-to-openai.js +0 -147
  1122. package/open-sse/translator/request/openai-responses.js +0 -212
  1123. package/open-sse/translator/request/openai-to-claude.js +0 -427
  1124. package/open-sse/translator/request/openai-to-commandcode.js +0 -178
  1125. package/open-sse/translator/request/openai-to-cursor.js +0 -195
  1126. package/open-sse/translator/request/openai-to-gemini.js +0 -478
  1127. package/open-sse/translator/request/openai-to-kiro.js +0 -641
  1128. package/open-sse/translator/request/openai-to-kiro.old.js +0 -278
  1129. package/open-sse/translator/request/openai-to-ollama.js +0 -192
  1130. package/open-sse/translator/request/openai-to-vertex.js +0 -42
  1131. package/open-sse/translator/response/claude-to-openai.js +0 -206
  1132. package/open-sse/translator/response/commandcode-to-openai.js +0 -197
  1133. package/open-sse/translator/response/cursor-to-openai.js +0 -30
  1134. package/open-sse/translator/response/gemini-to-openai.js +0 -245
  1135. package/open-sse/translator/response/kiro-to-openai.js +0 -195
  1136. package/open-sse/translator/response/ollama-to-openai.js +0 -152
  1137. package/open-sse/translator/response/openai-responses.js +0 -624
  1138. package/open-sse/translator/response/openai-to-antigravity.js +0 -122
  1139. package/open-sse/translator/response/openai-to-claude.js +0 -266
  1140. package/open-sse/utils/bypassHandler.js +0 -298
  1141. package/open-sse/utils/claudeCloaking.js +0 -155
  1142. package/open-sse/utils/claudeHeaderCache.js +0 -70
  1143. package/open-sse/utils/clientDetector.js +0 -64
  1144. package/open-sse/utils/cursorChecksum.js +0 -152
  1145. package/open-sse/utils/cursorProtobuf.js +0 -907
  1146. package/open-sse/utils/debugLog.js +0 -14
  1147. package/open-sse/utils/error.js +0 -147
  1148. package/open-sse/utils/ollamaTransform.js +0 -85
  1149. package/open-sse/utils/proxyFetch.js +0 -369
  1150. package/open-sse/utils/reasoningContentInjector.js +0 -79
  1151. package/open-sse/utils/requestLogger.js +0 -251
  1152. package/open-sse/utils/responsesStreamHelpers.js +0 -106
  1153. package/open-sse/utils/sessionManager.js +0 -231
  1154. package/open-sse/utils/stream.js +0 -590
  1155. package/open-sse/utils/streamHandler.js +0 -274
  1156. package/open-sse/utils/streamHelpers.js +0 -122
  1157. package/open-sse/utils/thinkingSuffix.js +0 -64
  1158. package/open-sse/utils/toolDeduper.js +0 -49
  1159. package/open-sse/utils/usageTracking.js +0 -351
  1160. package/postcss.config.mjs +0 -14
  1161. package/public/favicon.svg +0 -16
  1162. package/public/file.svg +0 -1
  1163. package/public/globe.svg +0 -1
  1164. package/public/i18n/literals/ar.json +0 -195
  1165. package/public/i18n/literals/bn.json +0 -195
  1166. package/public/i18n/literals/cs.json +0 -195
  1167. package/public/i18n/literals/da.json +0 -195
  1168. package/public/i18n/literals/de.json +0 -195
  1169. package/public/i18n/literals/el.json +0 -195
  1170. package/public/i18n/literals/es.json +0 -195
  1171. package/public/i18n/literals/fi.json +0 -195
  1172. package/public/i18n/literals/fr.json +0 -195
  1173. package/public/i18n/literals/he.json +0 -195
  1174. package/public/i18n/literals/hi.json +0 -195
  1175. package/public/i18n/literals/hu.json +0 -195
  1176. package/public/i18n/literals/id.json +0 -195
  1177. package/public/i18n/literals/it.json +0 -195
  1178. package/public/i18n/literals/ja.json +0 -195
  1179. package/public/i18n/literals/ko.json +0 -195
  1180. package/public/i18n/literals/nl.json +0 -195
  1181. package/public/i18n/literals/no.json +0 -195
  1182. package/public/i18n/literals/pl.json +0 -195
  1183. package/public/i18n/literals/pt-BR.json +0 -195
  1184. package/public/i18n/literals/pt-PT.json +0 -195
  1185. package/public/i18n/literals/ro.json +0 -195
  1186. package/public/i18n/literals/ru.json +0 -195
  1187. package/public/i18n/literals/sv.json +0 -195
  1188. package/public/i18n/literals/th.json +0 -195
  1189. package/public/i18n/literals/tl.json +0 -195
  1190. package/public/i18n/literals/tr.json +0 -195
  1191. package/public/i18n/literals/uk.json +0 -195
  1192. package/public/i18n/literals/ur.json +0 -195
  1193. package/public/i18n/literals/vi.json +0 -195
  1194. package/public/i18n/literals/zh-CN.json +0 -772
  1195. package/public/i18n/literals/zh-TW.json +0 -195
  1196. package/public/icons/discord.svg +0 -4
  1197. package/public/icons/icon-192.svg +0 -16
  1198. package/public/icons/icon-512.svg +0 -16
  1199. package/public/next.svg +0 -1
  1200. package/public/providers/alicode-intl.png +0 -0
  1201. package/public/providers/alicode.png +0 -0
  1202. package/public/providers/amp.png +0 -0
  1203. package/public/providers/anthropic-m.png +0 -0
  1204. package/public/providers/anthropic.png +0 -0
  1205. package/public/providers/antigravity.png +0 -0
  1206. package/public/providers/assemblyai.png +0 -0
  1207. package/public/providers/autoclaw.png +0 -0
  1208. package/public/providers/aws-polly.png +0 -0
  1209. package/public/providers/azure.png +0 -0
  1210. package/public/providers/black-forest-labs.png +0 -0
  1211. package/public/providers/blackbox.png +0 -0
  1212. package/public/providers/brave-search.png +0 -0
  1213. package/public/providers/byteplus.png +0 -0
  1214. package/public/providers/cartesia.png +0 -0
  1215. package/public/providers/cerebras.png +0 -0
  1216. package/public/providers/chutes.png +0 -0
  1217. package/public/providers/claude.png +0 -0
  1218. package/public/providers/cline.png +0 -0
  1219. package/public/providers/clinepass.png +0 -0
  1220. package/public/providers/cloudflare-ai.png +0 -0
  1221. package/public/providers/codebuddy-cn.png +0 -0
  1222. package/public/providers/codebuddy.png +0 -0
  1223. package/public/providers/codebuddy.svg +0 -37
  1224. package/public/providers/codex.png +0 -0
  1225. package/public/providers/cohere.png +0 -0
  1226. package/public/providers/comfyui.png +0 -0
  1227. package/public/providers/commandcode.png +0 -0
  1228. package/public/providers/continue.png +0 -0
  1229. package/public/providers/copilot.png +0 -0
  1230. package/public/providers/coqui.png +0 -0
  1231. package/public/providers/cursor.png +0 -0
  1232. package/public/providers/deepgram.png +0 -0
  1233. package/public/providers/deepseek-tui.png +0 -0
  1234. package/public/providers/deepseek.png +0 -0
  1235. package/public/providers/droid.png +0 -0
  1236. package/public/providers/edge-tts.png +0 -0
  1237. package/public/providers/elevenlabs.png +0 -0
  1238. package/public/providers/exa.png +0 -0
  1239. package/public/providers/fal-ai.png +0 -0
  1240. package/public/providers/firecrawl.png +0 -0
  1241. package/public/providers/fireworks.png +0 -0
  1242. package/public/providers/gemini-cli.png +0 -0
  1243. package/public/providers/gemini.png +0 -0
  1244. package/public/providers/github.png +0 -0
  1245. package/public/providers/glm-cn.png +0 -0
  1246. package/public/providers/glm.png +0 -0
  1247. package/public/providers/google-pse.png +0 -0
  1248. package/public/providers/google-tts.png +0 -0
  1249. package/public/providers/grok-cli.png +0 -0
  1250. package/public/providers/grok-web.png +0 -0
  1251. package/public/providers/groq.png +0 -0
  1252. package/public/providers/hermes.png +0 -0
  1253. package/public/providers/huggingface.png +0 -0
  1254. package/public/providers/hyperbolic.png +0 -0
  1255. package/public/providers/iflow.png +0 -0
  1256. package/public/providers/inworld.png +0 -0
  1257. package/public/providers/jcode.png +0 -0
  1258. package/public/providers/jina-ai.png +0 -0
  1259. package/public/providers/jina-reader.png +0 -0
  1260. package/public/providers/kilocode.png +0 -0
  1261. package/public/providers/kimchi.png +0 -0
  1262. package/public/providers/kimchi.svg +0 -4
  1263. package/public/providers/kimi-coding.png +0 -0
  1264. package/public/providers/kimi.png +0 -0
  1265. package/public/providers/kiro.png +0 -0
  1266. package/public/providers/linkup.png +0 -0
  1267. package/public/providers/local-device.png +0 -0
  1268. package/public/providers/mimo-free.png +0 -0
  1269. package/public/providers/minimax-cn.png +0 -0
  1270. package/public/providers/minimax.png +0 -0
  1271. package/public/providers/mistral.png +0 -0
  1272. package/public/providers/nanobanana.png +0 -0
  1273. package/public/providers/nebius.png +0 -0
  1274. package/public/providers/nvidia.png +0 -0
  1275. package/public/providers/oai-cc.png +0 -0
  1276. package/public/providers/oai-r.png +0 -0
  1277. package/public/providers/ollama-local.png +0 -0
  1278. package/public/providers/ollama.png +0 -0
  1279. package/public/providers/openai.png +0 -0
  1280. package/public/providers/openclaw.png +0 -0
  1281. package/public/providers/opencode-go.png +0 -0
  1282. package/public/providers/opencode.png +0 -0
  1283. package/public/providers/openrouter.png +0 -0
  1284. package/public/providers/perplexity-agent.png +0 -0
  1285. package/public/providers/perplexity-web.png +0 -0
  1286. package/public/providers/perplexity.png +0 -0
  1287. package/public/providers/playht.png +0 -0
  1288. package/public/providers/qoder.png +0 -0
  1289. package/public/providers/qwen.png +0 -0
  1290. package/public/providers/recraft.png +0 -0
  1291. package/public/providers/roo.png +0 -0
  1292. package/public/providers/runwayml.png +0 -0
  1293. package/public/providers/sdwebui.png +0 -0
  1294. package/public/providers/searchapi.png +0 -0
  1295. package/public/providers/searxng.png +0 -0
  1296. package/public/providers/serper.png +0 -0
  1297. package/public/providers/siliconflow.png +0 -0
  1298. package/public/providers/stability-ai.png +0 -0
  1299. package/public/providers/tavily.png +0 -0
  1300. package/public/providers/together.png +0 -0
  1301. package/public/providers/topaz.png +0 -0
  1302. package/public/providers/tortoise.png +0 -0
  1303. package/public/providers/vertex-partner.png +0 -0
  1304. package/public/providers/vertex.png +0 -0
  1305. package/public/providers/volcengine-ark.png +0 -0
  1306. package/public/providers/voyage-ai.png +0 -0
  1307. package/public/providers/xai.png +0 -0
  1308. package/public/providers/xiaomi-mimo.png +0 -0
  1309. package/public/providers/xiaomi-tokenplan.png +0 -0
  1310. package/public/providers/youcom.png +0 -0
  1311. package/public/sw.js +0 -22
  1312. package/public/vercel.svg +0 -1
  1313. package/public/window.svg +0 -1
  1314. package/scripts/translate-readme.js +0 -201
  1315. package/src/app/(dashboard)/dashboard/automation/page.js +0 -774
  1316. package/src/app/(dashboard)/dashboard/basic-chat/BasicChatPageClient.js +0 -1592
  1317. package/src/app/(dashboard)/dashboard/basic-chat/page.js +0 -5
  1318. package/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.js +0 -81
  1319. package/src/app/(dashboard)/dashboard/cli-tools/[toolId]/ToolDetailClient.js +0 -173
  1320. package/src/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +0 -11
  1321. package/src/app/(dashboard)/dashboard/cli-tools/components/AntigravityToolCard.js +0 -487
  1322. package/src/app/(dashboard)/dashboard/cli-tools/components/ApiKeySelect.js +0 -14
  1323. package/src/app/(dashboard)/dashboard/cli-tools/components/BaseUrlSelect.js +0 -176
  1324. package/src/app/(dashboard)/dashboard/cli-tools/components/ClaudeToolCard.js +0 -396
  1325. package/src/app/(dashboard)/dashboard/cli-tools/components/ClineToolCard.js +0 -307
  1326. package/src/app/(dashboard)/dashboard/cli-tools/components/CodexToolCard.js +0 -466
  1327. package/src/app/(dashboard)/dashboard/cli-tools/components/CopilotToolCard.js +0 -330
  1328. package/src/app/(dashboard)/dashboard/cli-tools/components/CoworkToolCard.js +0 -646
  1329. package/src/app/(dashboard)/dashboard/cli-tools/components/DeepSeekTuiToolCard.js +0 -344
  1330. package/src/app/(dashboard)/dashboard/cli-tools/components/DefaultToolCard.js +0 -271
  1331. package/src/app/(dashboard)/dashboard/cli-tools/components/DroidToolCard.js +0 -421
  1332. package/src/app/(dashboard)/dashboard/cli-tools/components/EndpointPresetControl.js +0 -129
  1333. package/src/app/(dashboard)/dashboard/cli-tools/components/HermesToolCard.js +0 -323
  1334. package/src/app/(dashboard)/dashboard/cli-tools/components/JcodeToolCard.js +0 -386
  1335. package/src/app/(dashboard)/dashboard/cli-tools/components/KiloToolCard.js +0 -280
  1336. package/src/app/(dashboard)/dashboard/cli-tools/components/MitmLinkCard.js +0 -40
  1337. package/src/app/(dashboard)/dashboard/cli-tools/components/MitmServerCard.js +0 -329
  1338. package/src/app/(dashboard)/dashboard/cli-tools/components/MitmToolCard.js +0 -320
  1339. package/src/app/(dashboard)/dashboard/cli-tools/components/OpenClawToolCard.js +0 -394
  1340. package/src/app/(dashboard)/dashboard/cli-tools/components/OpenCodeToolCard.js +0 -512
  1341. package/src/app/(dashboard)/dashboard/cli-tools/components/ToolSummaryCard.js +0 -40
  1342. package/src/app/(dashboard)/dashboard/cli-tools/components/cliEndpointMatch.js +0 -13
  1343. package/src/app/(dashboard)/dashboard/cli-tools/components/index.js +0 -19
  1344. package/src/app/(dashboard)/dashboard/cli-tools/page.js +0 -7
  1345. package/src/app/(dashboard)/dashboard/combos/page.js +0 -615
  1346. package/src/app/(dashboard)/dashboard/console-log/ConsoleLogClient.js +0 -118
  1347. package/src/app/(dashboard)/dashboard/console-log/page.js +0 -8
  1348. package/src/app/(dashboard)/dashboard/context/page.js +0 -276
  1349. package/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js +0 -1594
  1350. package/src/app/(dashboard)/dashboard/endpoint/endpointConstants.js +0 -32
  1351. package/src/app/(dashboard)/dashboard/endpoint/page.js +0 -7
  1352. package/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +0 -1907
  1353. package/src/app/(dashboard)/dashboard/media-providers/[kind]/page.js +0 -289
  1354. package/src/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +0 -413
  1355. package/src/app/(dashboard)/dashboard/media-providers/web/page.js +0 -209
  1356. package/src/app/(dashboard)/dashboard/mitm/MitmPageClient.js +0 -121
  1357. package/src/app/(dashboard)/dashboard/mitm/page.js +0 -5
  1358. package/src/app/(dashboard)/dashboard/page.js +0 -7
  1359. package/src/app/(dashboard)/dashboard/playground/page.js +0 -5
  1360. package/src/app/(dashboard)/dashboard/profile/page.js +0 -1284
  1361. package/src/app/(dashboard)/dashboard/providers/[id]/AddApiKeyModal.js +0 -389
  1362. package/src/app/(dashboard)/dashboard/providers/[id]/AddCustomModelModal.js +0 -126
  1363. package/src/app/(dashboard)/dashboard/providers/[id]/CompatibleModelsSection.js +0 -250
  1364. package/src/app/(dashboard)/dashboard/providers/[id]/ConnectionRow.js +0 -295
  1365. package/src/app/(dashboard)/dashboard/providers/[id]/CooldownTimer.js +0 -42
  1366. package/src/app/(dashboard)/dashboard/providers/[id]/EditCompatibleNodeModal.js +0 -162
  1367. package/src/app/(dashboard)/dashboard/providers/[id]/ModelRow.js +0 -99
  1368. package/src/app/(dashboard)/dashboard/providers/[id]/PassthroughModelsSection.js +0 -183
  1369. package/src/app/(dashboard)/dashboard/providers/[id]/page.js +0 -2170
  1370. package/src/app/(dashboard)/dashboard/providers/[id]/page.new.js +0 -1726
  1371. package/src/app/(dashboard)/dashboard/providers/components/ConnectionsCard.js +0 -486
  1372. package/src/app/(dashboard)/dashboard/providers/components/ModelAvailabilityBadge.js +0 -186
  1373. package/src/app/(dashboard)/dashboard/providers/components/ModelsCard.js +0 -295
  1374. package/src/app/(dashboard)/dashboard/providers/new/page.js +0 -220
  1375. package/src/app/(dashboard)/dashboard/providers/page.js +0 -1518
  1376. package/src/app/(dashboard)/dashboard/proxy-pools/page.js +0 -1107
  1377. package/src/app/(dashboard)/dashboard/pxpipe/PxpipeClient.js +0 -284
  1378. package/src/app/(dashboard)/dashboard/pxpipe/page.js +0 -5
  1379. package/src/app/(dashboard)/dashboard/quota/page.js +0 -11
  1380. package/src/app/(dashboard)/dashboard/terminal/TerminalPageClient.js +0 -735
  1381. package/src/app/(dashboard)/dashboard/terminal/page.js +0 -7
  1382. package/src/app/(dashboard)/dashboard/token-saver/TokenSaverClient.js +0 -1018
  1383. package/src/app/(dashboard)/dashboard/token-saver/page.js +0 -5
  1384. package/src/app/(dashboard)/dashboard/translator/page.js +0 -303
  1385. package/src/app/(dashboard)/dashboard/usage/components/OverviewCards.js +0 -87
  1386. package/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/ProviderLimitCard.js +0 -183
  1387. package/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/QuotaProgressBar.js +0 -127
  1388. package/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/QuotaTable.js +0 -269
  1389. package/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/index.js +0 -1571
  1390. package/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/utils.js +0 -320
  1391. package/src/app/(dashboard)/dashboard/usage/components/ProviderTopology.js +0 -468
  1392. package/src/app/(dashboard)/dashboard/usage/components/RequestDetailsTab.js +0 -454
  1393. package/src/app/(dashboard)/dashboard/usage/components/UsageChart.js +0 -155
  1394. package/src/app/(dashboard)/dashboard/usage/components/UsageTable.js +0 -253
  1395. package/src/app/(dashboard)/dashboard/usage/page.js +0 -75
  1396. package/src/app/(dashboard)/layout.js +0 -6
  1397. package/src/app/api/auth/login/route.js +0 -76
  1398. package/src/app/api/auth/logout/route.js +0 -14
  1399. package/src/app/api/auth/oidc/callback/route.js +0 -87
  1400. package/src/app/api/auth/oidc/start/route.js +0 -52
  1401. package/src/app/api/auth/oidc/test/route.js +0 -86
  1402. package/src/app/api/auth/status/route.js +0 -45
  1403. package/src/app/api/cache/stats/route.js +0 -13
  1404. package/src/app/api/changelog/route.js +0 -48
  1405. package/src/app/api/cli-tools/all-statuses/route.js +0 -46
  1406. package/src/app/api/cli-tools/antigravity-mitm/alias/route.js +0 -53
  1407. package/src/app/api/cli-tools/antigravity-mitm/route.js +0 -202
  1408. package/src/app/api/cli-tools/claude-settings/route.js +0 -203
  1409. package/src/app/api/cli-tools/cline-settings/route.js +0 -133
  1410. package/src/app/api/cli-tools/codex-gateway/accounts/route.js +0 -16
  1411. package/src/app/api/cli-tools/codex-settings/route.js +0 -271
  1412. package/src/app/api/cli-tools/copilot-settings/route.js +0 -153
  1413. package/src/app/api/cli-tools/cowork-mcp-registry/route.js +0 -77
  1414. package/src/app/api/cli-tools/cowork-mcp-tools/route.js +0 -95
  1415. package/src/app/api/cli-tools/cowork-settings/route.js +0 -412
  1416. package/src/app/api/cli-tools/deepseek-tui-settings/route.js +0 -164
  1417. package/src/app/api/cli-tools/droid-settings/route.js +0 -213
  1418. package/src/app/api/cli-tools/hermes-settings/route.js +0 -175
  1419. package/src/app/api/cli-tools/jcode-settings/route.js +0 -216
  1420. package/src/app/api/cli-tools/kilo-settings/route.js +0 -131
  1421. package/src/app/api/cli-tools/openclaw-settings/route.js +0 -292
  1422. package/src/app/api/cli-tools/opencode-settings/route.js +0 -259
  1423. package/src/app/api/combos/[id]/route.js +0 -81
  1424. package/src/app/api/combos/route.js +0 -48
  1425. package/src/app/api/context/[id]/route.js +0 -35
  1426. package/src/app/api/context/bulk/route.js +0 -25
  1427. package/src/app/api/context/route.js +0 -33
  1428. package/src/app/api/dashboard/chat/completions/route.js +0 -74
  1429. package/src/app/api/dashboard/cli-tools/keys/route.js +0 -33
  1430. package/src/app/api/dashboard/media/[operation]/route.js +0 -60
  1431. package/src/app/api/headroom/extras/route.js +0 -46
  1432. package/src/app/api/headroom/proxy/[...path]/route.js +0 -104
  1433. package/src/app/api/headroom/restart/route.js +0 -35
  1434. package/src/app/api/headroom/start/route.js +0 -35
  1435. package/src/app/api/headroom/status/route.js +0 -18
  1436. package/src/app/api/headroom/stop/route.js +0 -14
  1437. package/src/app/api/health/ready/route.js +0 -21
  1438. package/src/app/api/health/route.js +0 -15
  1439. package/src/app/api/init/route.js +0 -12
  1440. package/src/app/api/keys/[id]/rotate/route.js +0 -14
  1441. package/src/app/api/keys/[id]/route.js +0 -119
  1442. package/src/app/api/keys/route.js +0 -56
  1443. package/src/app/api/locale/route.js +0 -30
  1444. package/src/app/api/mcp/[plugin]/message/route.js +0 -21
  1445. package/src/app/api/mcp/[plugin]/sse/route.js +0 -37
  1446. package/src/app/api/media-providers/tts/deepgram/voices/route.js +0 -65
  1447. package/src/app/api/media-providers/tts/elevenlabs/voices/route.js +0 -71
  1448. package/src/app/api/media-providers/tts/inworld/voices/route.js +0 -61
  1449. package/src/app/api/media-providers/tts/minimax/voices/route.js +0 -113
  1450. package/src/app/api/media-providers/tts/voices/route.js +0 -99
  1451. package/src/app/api/metrics/route.js +0 -33
  1452. package/src/app/api/models/alias/route.js +0 -53
  1453. package/src/app/api/models/availability/route.js +0 -103
  1454. package/src/app/api/models/custom/route.js +0 -48
  1455. package/src/app/api/models/disabled/route.js +0 -50
  1456. package/src/app/api/models/route.js +0 -68
  1457. package/src/app/api/models/test/ping.js +0 -191
  1458. package/src/app/api/models/test/route.js +0 -14
  1459. package/src/app/api/oauth/[provider]/[action]/route.js +0 -340
  1460. package/src/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +0 -19
  1461. package/src/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +0 -30
  1462. package/src/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +0 -23
  1463. package/src/app/api/oauth/antigravity/bulk-import/latest/route.js +0 -24
  1464. package/src/app/api/oauth/antigravity/bulk-import/route.js +0 -51
  1465. package/src/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js +0 -19
  1466. package/src/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js +0 -30
  1467. package/src/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js +0 -25
  1468. package/src/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js +0 -27
  1469. package/src/app/api/oauth/cloudflare-ai/bulk-import/route.js +0 -56
  1470. package/src/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +0 -19
  1471. package/src/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js +0 -30
  1472. package/src/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js +0 -23
  1473. package/src/app/api/oauth/codebuddy/bulk-import/latest/route.js +0 -25
  1474. package/src/app/api/oauth/codebuddy/bulk-import/route.js +0 -51
  1475. package/src/app/api/oauth/codebuddy/bulk-token/route.js +0 -118
  1476. package/src/app/api/oauth/codebuddy/quota-cookie/route.js +0 -133
  1477. package/src/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +0 -19
  1478. package/src/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +0 -30
  1479. package/src/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +0 -26
  1480. package/src/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +0 -27
  1481. package/src/app/api/oauth/codebuddy-cn/bulk-import/route.js +0 -61
  1482. package/src/app/api/oauth/codebuddy-cn/bulk-token/route.js +0 -119
  1483. package/src/app/api/oauth/codebuddy-cn/quota-cookie/route.js +0 -28
  1484. package/src/app/api/oauth/codex/import-token/route.js +0 -96
  1485. package/src/app/api/oauth/cursor/auto-import/route.js +0 -257
  1486. package/src/app/api/oauth/cursor/import/route.js +0 -100
  1487. package/src/app/api/oauth/gitlab/pat/route.js +0 -62
  1488. package/src/app/api/oauth/iflow/cookie/route.js +0 -137
  1489. package/src/app/api/oauth/kiro/auto-import/route.js +0 -85
  1490. package/src/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +0 -19
  1491. package/src/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js +0 -30
  1492. package/src/app/api/oauth/kiro/bulk-import/[jobId]/route.js +0 -23
  1493. package/src/app/api/oauth/kiro/bulk-import/latest/route.js +0 -25
  1494. package/src/app/api/oauth/kiro/bulk-import/route.js +0 -51
  1495. package/src/app/api/oauth/kiro/import/route.js +0 -110
  1496. package/src/app/api/oauth/kiro/social-authorize/route.js +0 -27
  1497. package/src/app/api/oauth/kiro/social-exchange/route.js +0 -41
  1498. package/src/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +0 -19
  1499. package/src/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js +0 -30
  1500. package/src/app/api/oauth/qoder/bulk-import/[jobId]/route.js +0 -23
  1501. package/src/app/api/oauth/qoder/bulk-import/latest/route.js +0 -24
  1502. package/src/app/api/oauth/qoder/bulk-import/route.js +0 -49
  1503. package/src/app/api/pricing/route.js +0 -134
  1504. package/src/app/api/provider-nodes/[id]/route.js +0 -101
  1505. package/src/app/api/provider-nodes/route.js +0 -104
  1506. package/src/app/api/provider-nodes/validate/route.js +0 -201
  1507. package/src/app/api/providers/[id]/models/route.js +0 -605
  1508. package/src/app/api/providers/[id]/route.js +0 -251
  1509. package/src/app/api/providers/[id]/test/route.js +0 -23
  1510. package/src/app/api/providers/[id]/test/testUtils.js +0 -811
  1511. package/src/app/api/providers/[id]/test-models/route.js +0 -66
  1512. package/src/app/api/providers/bulk-delete/route.js +0 -60
  1513. package/src/app/api/providers/client/route.js +0 -136
  1514. package/src/app/api/providers/kilo/free-models/route.js +0 -55
  1515. package/src/app/api/providers/route.js +0 -278
  1516. package/src/app/api/providers/suggested-models/filters.js +0 -20
  1517. package/src/app/api/providers/suggested-models/route.js +0 -34
  1518. package/src/app/api/providers/test-batch/route.js +0 -131
  1519. package/src/app/api/providers/validate/route.js +0 -637
  1520. package/src/app/api/proxy-pools/[id]/route.js +0 -135
  1521. package/src/app/api/proxy-pools/[id]/test/route.js +0 -72
  1522. package/src/app/api/proxy-pools/cloudflare-deploy/route.js +0 -145
  1523. package/src/app/api/proxy-pools/deno-deploy/route.js +0 -175
  1524. package/src/app/api/proxy-pools/route.js +0 -112
  1525. package/src/app/api/proxy-pools/vercel-deploy/route.js +0 -142
  1526. package/src/app/api/pxpipe/health/route.js +0 -16
  1527. package/src/app/api/pxpipe/install/route.js +0 -20
  1528. package/src/app/api/pxpipe/logs/route.js +0 -21
  1529. package/src/app/api/pxpipe/restart/route.js +0 -16
  1530. package/src/app/api/pxpipe/start/route.js +0 -26
  1531. package/src/app/api/pxpipe/stats/route.js +0 -17
  1532. package/src/app/api/pxpipe/status/route.js +0 -21
  1533. package/src/app/api/pxpipe/stop/route.js +0 -16
  1534. package/src/app/api/settings/database/route.js +0 -36
  1535. package/src/app/api/settings/proxy-test/route.js +0 -23
  1536. package/src/app/api/settings/require-login/route.js +0 -15
  1537. package/src/app/api/settings/route.js +0 -115
  1538. package/src/app/api/shutdown/route.js +0 -24
  1539. package/src/app/api/tags/route.js +0 -18
  1540. package/src/app/api/terminal/auth/setup/route.js +0 -72
  1541. package/src/app/api/terminal/auth/status/route.js +0 -27
  1542. package/src/app/api/terminal/auth/unlock/route.js +0 -69
  1543. package/src/app/api/terminal/session/[id]/input/route.js +0 -32
  1544. package/src/app/api/terminal/session/[id]/resize/route.js +0 -18
  1545. package/src/app/api/terminal/session/[id]/route.js +0 -37
  1546. package/src/app/api/terminal/session/[id]/stream/route.js +0 -100
  1547. package/src/app/api/terminal/session/route.js +0 -30
  1548. package/src/app/api/translator/console-logs/route.js +0 -24
  1549. package/src/app/api/translator/console-logs/stream/route.js +0 -79
  1550. package/src/app/api/translator/load/route.js +0 -45
  1551. package/src/app/api/translator/save/route.js +0 -44
  1552. package/src/app/api/translator/send/route.js +0 -94
  1553. package/src/app/api/translator/translate/route.js +0 -90
  1554. package/src/app/api/tunnel/disable/route.js +0 -12
  1555. package/src/app/api/tunnel/enable/route.js +0 -16
  1556. package/src/app/api/tunnel/status/route.js +0 -13
  1557. package/src/app/api/tunnel/tailscale-check/route.js +0 -50
  1558. package/src/app/api/tunnel/tailscale-disable/route.js +0 -12
  1559. package/src/app/api/tunnel/tailscale-enable/route.js +0 -12
  1560. package/src/app/api/tunnel/tailscale-install/route.js +0 -72
  1561. package/src/app/api/usage/[connectionId]/route.js +0 -40
  1562. package/src/app/api/usage/aggregate/route.js +0 -126
  1563. package/src/app/api/usage/chart/route.js +0 -21
  1564. package/src/app/api/usage/history/route.js +0 -12
  1565. package/src/app/api/usage/logs/route.js +0 -12
  1566. package/src/app/api/usage/providers/route.js +0 -42
  1567. package/src/app/api/usage/request-details/route.js +0 -57
  1568. package/src/app/api/usage/request-logs/route.js +0 -13
  1569. package/src/app/api/usage/stats/route.js +0 -23
  1570. package/src/app/api/usage/stream/route.js +0 -142
  1571. package/src/app/api/v1/api/chat/route.js +0 -37
  1572. package/src/app/api/v1/audio/speech/route.js +0 -16
  1573. package/src/app/api/v1/audio/transcriptions/route.js +0 -19
  1574. package/src/app/api/v1/audio/voices/route.js +0 -68
  1575. package/src/app/api/v1/chat/completions/route.js +0 -35
  1576. package/src/app/api/v1/embeddings/route.js +0 -21
  1577. package/src/app/api/v1/images/generations/route.js +0 -16
  1578. package/src/app/api/v1/messages/count_tokens/route.js +0 -59
  1579. package/src/app/api/v1/messages/route.js +0 -36
  1580. package/src/app/api/v1/models/[kind]/route.js +0 -55
  1581. package/src/app/api/v1/models/info/route.js +0 -110
  1582. package/src/app/api/v1/models/route.js +0 -497
  1583. package/src/app/api/v1/responses/compact/route.js +0 -55
  1584. package/src/app/api/v1/responses/route.js +0 -30
  1585. package/src/app/api/v1/route.js +0 -1
  1586. package/src/app/api/v1/search/route.js +0 -21
  1587. package/src/app/api/v1/web/fetch/route.js +0 -21
  1588. package/src/app/api/v1beta/models/[...path]/route.js +0 -368
  1589. package/src/app/api/v1beta/models/route.js +0 -44
  1590. package/src/app/api/version/route.js +0 -198
  1591. package/src/app/api/version/shutdown/route.js +0 -15
  1592. package/src/app/api/version/update/route.js +0 -21
  1593. package/src/app/callback/page.js +0 -149
  1594. package/src/app/dashboard/settings/pricing/page.js +0 -174
  1595. package/src/app/globals.css +0 -659
  1596. package/src/app/landing/components/AnimatedBackground.js +0 -57
  1597. package/src/app/landing/components/Features.js +0 -133
  1598. package/src/app/landing/components/FlowAnimation.js +0 -175
  1599. package/src/app/landing/components/Footer.js +0 -61
  1600. package/src/app/landing/components/GetStarted.js +0 -97
  1601. package/src/app/landing/components/HeroSection.js +0 -72
  1602. package/src/app/landing/components/HowItWorks.js +0 -66
  1603. package/src/app/landing/components/Navigation.js +0 -77
  1604. package/src/app/landing/page.js +0 -106
  1605. package/src/app/layout.js +0 -48
  1606. package/src/app/login/page.js +0 -197
  1607. package/src/app/manifest.js +0 -30
  1608. package/src/app/page.js +0 -5
  1609. package/src/dashboardGuard.js +0 -288
  1610. package/src/i18n/RuntimeI18nProvider.js +0 -27
  1611. package/src/i18n/config.js +0 -146
  1612. package/src/i18n/runtime.js +0 -162
  1613. package/src/lib/alerter.js +0 -122
  1614. package/src/lib/appUpdater.js +0 -204
  1615. package/src/lib/auth/dashboardSession.js +0 -68
  1616. package/src/lib/auth/loginLimiter.js +0 -52
  1617. package/src/lib/auth/oidc.js +0 -303
  1618. package/src/lib/auth/terminalSession.js +0 -88
  1619. package/src/lib/autoclaw/constants.js +0 -63
  1620. package/src/lib/consoleLogBuffer.js +0 -79
  1621. package/src/lib/dataDir.js +0 -29
  1622. package/src/lib/db/adapters/betterSqliteAdapter.js +0 -58
  1623. package/src/lib/db/adapters/bunSqliteAdapter.js +0 -65
  1624. package/src/lib/db/adapters/nodeSqliteAdapter.js +0 -86
  1625. package/src/lib/db/adapters/sqljsAdapter.js +0 -207
  1626. package/src/lib/db/backup.js +0 -36
  1627. package/src/lib/db/dataDirMigration.js +0 -52
  1628. package/src/lib/db/driver.js +0 -131
  1629. package/src/lib/db/helpers/jsonCol.js +0 -9
  1630. package/src/lib/db/helpers/kvStore.js +0 -39
  1631. package/src/lib/db/helpers/metaStore.js +0 -22
  1632. package/src/lib/db/index.js +0 -218
  1633. package/src/lib/db/maintenance.js +0 -78
  1634. package/src/lib/db/migrate.js +0 -295
  1635. package/src/lib/db/migrations/001-initial.js +0 -17
  1636. package/src/lib/db/migrations/index.js +0 -10
  1637. package/src/lib/db/paths.js +0 -21
  1638. package/src/lib/db/repos/aliasRepo.js +0 -62
  1639. package/src/lib/db/repos/apiKeysRepo.js +0 -193
  1640. package/src/lib/db/repos/combosRepo.js +0 -73
  1641. package/src/lib/db/repos/connectionsRepo.js +0 -247
  1642. package/src/lib/db/repos/contextFilesRepo.js +0 -124
  1643. package/src/lib/db/repos/disabledModelsRepo.js +0 -56
  1644. package/src/lib/db/repos/nodesRepo.js +0 -95
  1645. package/src/lib/db/repos/pricingRepo.js +0 -108
  1646. package/src/lib/db/repos/proxyPoolsRepo.js +0 -103
  1647. package/src/lib/db/repos/quotaCacheRepo.js +0 -80
  1648. package/src/lib/db/repos/requestDetailsRepo.js +0 -275
  1649. package/src/lib/db/repos/settingsRepo.js +0 -120
  1650. package/src/lib/db/repos/usageRepo.js +0 -935
  1651. package/src/lib/db/schema.js +0 -193
  1652. package/src/lib/db/version.js +0 -21
  1653. package/src/lib/disabledModelsDb.js +0 -4
  1654. package/src/lib/headroom/detect.js +0 -192
  1655. package/src/lib/headroom/process.js +0 -327
  1656. package/src/lib/localDb.js +0 -26
  1657. package/src/lib/mcp/stdioSseBridge.js +0 -198
  1658. package/src/lib/mitmAliasCache.js +0 -46
  1659. package/src/lib/network/connectionProxy.js +0 -187
  1660. package/src/lib/network/initOutboundProxy.js +0 -25
  1661. package/src/lib/network/outboundProxy.js +0 -82
  1662. package/src/lib/network/proxyTest.js +0 -91
  1663. package/src/lib/oauth/constants/oauth.js +0 -337
  1664. package/src/lib/oauth/constants/xai.js +0 -61
  1665. package/src/lib/oauth/providers.js +0 -1821
  1666. package/src/lib/oauth/services/antigravity.js +0 -321
  1667. package/src/lib/oauth/services/antigravityBulkImportManager.js +0 -364
  1668. package/src/lib/oauth/services/autoclawTokenMonitor.js +0 -145
  1669. package/src/lib/oauth/services/bulkImportBrowserEngine.js +0 -756
  1670. package/src/lib/oauth/services/claude.js +0 -136
  1671. package/src/lib/oauth/services/cloudflareAiBulkImportManager.js +0 -503
  1672. package/src/lib/oauth/services/codebuddyAutomation.js +0 -6
  1673. package/src/lib/oauth/services/codebuddyBulkImportManager.js +0 -1033
  1674. package/src/lib/oauth/services/codebuddyCnBulkImportManager.js +0 -2088
  1675. package/src/lib/oauth/services/codebuddyCnPhoneAutomation.js +0 -1294
  1676. package/src/lib/oauth/services/codex.js +0 -144
  1677. package/src/lib/oauth/services/cursor.js +0 -179
  1678. package/src/lib/oauth/services/displayEnv.js +0 -134
  1679. package/src/lib/oauth/services/fiveSimClient.js +0 -567
  1680. package/src/lib/oauth/services/gemini.js +0 -240
  1681. package/src/lib/oauth/services/github.js +0 -225
  1682. package/src/lib/oauth/services/googleAutomation.js +0 -9
  1683. package/src/lib/oauth/services/iflow.js +0 -202
  1684. package/src/lib/oauth/services/index.js +0 -17
  1685. package/src/lib/oauth/services/kiro.js +0 -334
  1686. package/src/lib/oauth/services/kiroBulkImportManager.js +0 -1522
  1687. package/src/lib/oauth/services/kiroConnections.js +0 -93
  1688. package/src/lib/oauth/services/kiroGoogleAutomation.js +0 -2587
  1689. package/src/lib/oauth/services/oauth.js +0 -157
  1690. package/src/lib/oauth/services/openai.js +0 -123
  1691. package/src/lib/oauth/services/proxyUtils.js +0 -26
  1692. package/src/lib/oauth/services/qoder.js +0 -233
  1693. package/src/lib/oauth/services/qoderBulkImportManager.js +0 -340
  1694. package/src/lib/oauth/services/qwen.js +0 -170
  1695. package/src/lib/oauth/services/socksHttpBridge.js +0 -165
  1696. package/src/lib/oauth/services/tempmailClient.js +0 -288
  1697. package/src/lib/oauth/services/xai.js +0 -238
  1698. package/src/lib/oauth/utils/banner.js +0 -63
  1699. package/src/lib/oauth/utils/pkce.js +0 -39
  1700. package/src/lib/oauth/utils/server.js +0 -415
  1701. package/src/lib/oauth/utils/ui.js +0 -48
  1702. package/src/lib/providerConnectionSanitizer.js +0 -180
  1703. package/src/lib/providerNormalization.js +0 -45
  1704. package/src/lib/pxpipe/events.js +0 -125
  1705. package/src/lib/pxpipe/install.js +0 -123
  1706. package/src/lib/pxpipe/loader.js +0 -70
  1707. package/src/lib/pxpipe/service.js +0 -49
  1708. package/src/lib/qoder/constants.js +0 -64
  1709. package/src/lib/qoder/cosy.js +0 -175
  1710. package/src/lib/qoder/encoding.js +0 -55
  1711. package/src/lib/requestDetailsDb.js +0 -4
  1712. package/src/lib/responseCache.js +0 -169
  1713. package/src/lib/safeFetch.js +0 -167
  1714. package/src/lib/systemSpecs.js +0 -167
  1715. package/src/lib/terminal/ptyBridge.py +0 -163
  1716. package/src/lib/terminal/sessionManager.js +0 -434
  1717. package/src/lib/tunnel/cloudflare/cloudflared.js +0 -460
  1718. package/src/lib/tunnel/cloudflare/config.js +0 -9
  1719. package/src/lib/tunnel/cloudflare/healthCheck.js +0 -29
  1720. package/src/lib/tunnel/cloudflare/manager.js +0 -151
  1721. package/src/lib/tunnel/cloudflare/pid.js +0 -23
  1722. package/src/lib/tunnel/index.js +0 -48
  1723. package/src/lib/tunnel/shared/dnsResolver.js +0 -17
  1724. package/src/lib/tunnel/shared/internetCheck.js +0 -26
  1725. package/src/lib/tunnel/shared/state.js +0 -41
  1726. package/src/lib/tunnel/shared/watchdogConfig.js +0 -8
  1727. package/src/lib/tunnel/tailscale/config.js +0 -7
  1728. package/src/lib/tunnel/tailscale/healthCheck.js +0 -29
  1729. package/src/lib/tunnel/tailscale/manager.js +0 -129
  1730. package/src/lib/tunnel/tailscale/tailscale.js +0 -790
  1731. package/src/lib/updater/updater.js +0 -327
  1732. package/src/lib/usage/fetcher.js +0 -208
  1733. package/src/lib/usage/quotaRefresh.js +0 -100
  1734. package/src/lib/usage/quotaService.js +0 -206
  1735. package/src/lib/usageDb.js +0 -7
  1736. package/src/mitm/antigravityIdeVersion.js +0 -50
  1737. package/src/mitm/cert/generate.js +0 -32
  1738. package/src/mitm/cert/install.js +0 -274
  1739. package/src/mitm/cert/rootCA.js +0 -173
  1740. package/src/mitm/config.js +0 -87
  1741. package/src/mitm/dbReader.js +0 -22
  1742. package/src/mitm/dns/dnsConfig.js +0 -266
  1743. package/src/mitm/handlers/antigravity.js +0 -33
  1744. package/src/mitm/handlers/base.js +0 -226
  1745. package/src/mitm/handlers/copilot.js +0 -35
  1746. package/src/mitm/handlers/cursor.js +0 -15
  1747. package/src/mitm/handlers/kiro.js +0 -533
  1748. package/src/mitm/logger.js +0 -106
  1749. package/src/mitm/manager.js +0 -862
  1750. package/src/mitm/paths.js +0 -32
  1751. package/src/mitm/server.js +0 -447
  1752. package/src/mitm/winElevated.js +0 -81
  1753. package/src/models/index.js +0 -38
  1754. package/src/proxy.js +0 -5
  1755. package/src/shared/components/AddCustomEmbeddingModal.js +0 -184
  1756. package/src/shared/components/Avatar.js +0 -88
  1757. package/src/shared/components/Badge.js +0 -54
  1758. package/src/shared/components/BulkAccountAutomationModal.js +0 -640
  1759. package/src/shared/components/Button.js +0 -57
  1760. package/src/shared/components/Card.js +0 -116
  1761. package/src/shared/components/ChangelogModal.js +0 -108
  1762. package/src/shared/components/CodeBuddyCnPhoneRegisterModal.js +0 -563
  1763. package/src/shared/components/CodeBuddyQuotaCookieModal.js +0 -109
  1764. package/src/shared/components/ComboFormModal.js +0 -176
  1765. package/src/shared/components/CursorAuthModal.js +0 -213
  1766. package/src/shared/components/Drawer.js +0 -82
  1767. package/src/shared/components/EditConnectionModal.js +0 -287
  1768. package/src/shared/components/Footer.js +0 -132
  1769. package/src/shared/components/GitLabAuthModal.js +0 -194
  1770. package/src/shared/components/Header.js +0 -399
  1771. package/src/shared/components/HeaderLanguage.js +0 -48
  1772. package/src/shared/components/HeaderMenu.js +0 -127
  1773. package/src/shared/components/IFlowCookieModal.js +0 -132
  1774. package/src/shared/components/Input.js +0 -76
  1775. package/src/shared/components/KiroAuthModal.js +0 -1169
  1776. package/src/shared/components/KiroOAuthWrapper.js +0 -150
  1777. package/src/shared/components/KiroSocialOAuthModal.js +0 -205
  1778. package/src/shared/components/LanguageSwitcher.js +0 -192
  1779. package/src/shared/components/Loading.js +0 -75
  1780. package/src/shared/components/ManualConfigModal.js +0 -44
  1781. package/src/shared/components/McpMarketplaceModal.js +0 -255
  1782. package/src/shared/components/Modal.js +0 -196
  1783. package/src/shared/components/ModelSelectModal.js +0 -547
  1784. package/src/shared/components/NoAuthProxyCard.js +0 -134
  1785. package/src/shared/components/OAuthModal.js +0 -709
  1786. package/src/shared/components/Pagination.js +0 -150
  1787. package/src/shared/components/PricingModal.js +0 -209
  1788. package/src/shared/components/ProviderIcon.js +0 -68
  1789. package/src/shared/components/ProviderInfoCard.js +0 -82
  1790. package/src/shared/components/RequestLogger.js +0 -122
  1791. package/src/shared/components/SegmentedControl.js +0 -53
  1792. package/src/shared/components/Select.js +0 -67
  1793. package/src/shared/components/Sidebar.js +0 -486
  1794. package/src/shared/components/ThemeProvider.js +0 -15
  1795. package/src/shared/components/ThemeToggle.js +0 -42
  1796. package/src/shared/components/Toggle.js +0 -95
  1797. package/src/shared/components/Tooltip.js +0 -25
  1798. package/src/shared/components/UsageStats.js +0 -571
  1799. package/src/shared/components/index.js +0 -46
  1800. package/src/shared/components/layouts/AuthLayout.js +0 -29
  1801. package/src/shared/components/layouts/DashboardLayout.js +0 -121
  1802. package/src/shared/components/layouts/index.js +0 -4
  1803. package/src/shared/constants/automationProviders.js +0 -23
  1804. package/src/shared/constants/cliTools.js +0 -397
  1805. package/src/shared/constants/colors.js +0 -77
  1806. package/src/shared/constants/config.js +0 -98
  1807. package/src/shared/constants/coworkPlugins.js +0 -75
  1808. package/src/shared/constants/index.js +0 -4
  1809. package/src/shared/constants/locales.js +0 -36
  1810. package/src/shared/constants/mitmToolHosts.js +0 -12
  1811. package/src/shared/constants/models.js +0 -38
  1812. package/src/shared/constants/pricing.js +0 -311
  1813. package/src/shared/constants/providers.js +0 -450
  1814. package/src/shared/constants/ttsProviders.js +0 -138
  1815. package/src/shared/hooks/index.js +0 -2
  1816. package/src/shared/hooks/useCopyToClipboard.js +0 -43
  1817. package/src/shared/hooks/useModelLockUntil.js +0 -18
  1818. package/src/shared/hooks/useTheme.js +0 -60
  1819. package/src/shared/services/bootstrap.js +0 -12
  1820. package/src/shared/services/initializeApp.js +0 -294
  1821. package/src/shared/utils/api.js +0 -93
  1822. package/src/shared/utils/apiKey.js +0 -98
  1823. package/src/shared/utils/asyncPolling.js +0 -27
  1824. package/src/shared/utils/clineAuth.js +0 -37
  1825. package/src/shared/utils/cn.js +0 -11
  1826. package/src/shared/utils/codexCliConfig.js +0 -44
  1827. package/src/shared/utils/connectionStatus.js +0 -168
  1828. package/src/shared/utils/dashboardMedia.js +0 -19
  1829. package/src/shared/utils/index.js +0 -40
  1830. package/src/shared/utils/machine.js +0 -6
  1831. package/src/shared/utils/machineId.js +0 -66
  1832. package/src/shared/utils/modelLockTimer.js +0 -32
  1833. package/src/shared/utils/providerModelsFetcher.js +0 -30
  1834. package/src/shared/utils/usageStats.js +0 -10
  1835. package/src/sse/handlers/chat.js +0 -445
  1836. package/src/sse/handlers/embeddings.js +0 -141
  1837. package/src/sse/handlers/fetch.js +0 -213
  1838. package/src/sse/handlers/imageGeneration.js +0 -142
  1839. package/src/sse/handlers/search.js +0 -206
  1840. package/src/sse/handlers/streamFailure.js +0 -34
  1841. package/src/sse/handlers/stt.js +0 -88
  1842. package/src/sse/handlers/tts.js +0 -114
  1843. package/src/sse/services/auth.js +0 -576
  1844. package/src/sse/services/codexGateway.js +0 -215
  1845. package/src/sse/services/model.js +0 -99
  1846. package/src/sse/services/tokenRefresh.js +0 -319
  1847. package/src/sse/utils/logger.js +0 -75
  1848. package/src/store/headerSearchStore.js +0 -19
  1849. package/src/store/index.js +0 -6
  1850. package/src/store/notificationStore.js +0 -45
  1851. package/src/store/providerStore.js +0 -55
  1852. package/src/store/settingsStore.js +0 -51
  1853. package/src/store/themeStore.js +0 -54
  1854. package/src/store/userStore.js +0 -20
  1855. package/start.sh +0 -4
  1856. /package/cli/app/.next-cli-build/static/{SC3btW1lCuB9q-iyIwwWK → xutAvIqJIpkP-fqwioGku}/_buildManifest.js +0 -0
  1857. /package/cli/app/.next-cli-build/static/{SC3btW1lCuB9q-iyIwwWK → xutAvIqJIpkP-fqwioGku}/_ssgManifest.js +0 -0
@@ -1,2415 +0,0 @@
1
- /**
2
- * Usage Fetcher - Get usage data from provider APIs
3
- */
4
-
5
- import { CLIENT_METADATA, getPlatformUserAgent } from "../config/appConstants.js";
6
- import { proxyAwareFetch } from "../utils/proxyFetch.js";
7
-
8
- // GitHub API config
9
- const GITHUB_CONFIG = {
10
- apiVersion: "2022-11-28",
11
- userAgent: "GitHubCopilotChat/0.26.7",
12
- };
13
-
14
- // GLM quota endpoints (region-aware)
15
- const GLM_QUOTA_URLS = {
16
- international: "https://api.z.ai/api/monitor/usage/quota/limit",
17
- china: "https://open.bigmodel.cn/api/monitor/usage/quota/limit",
18
- };
19
-
20
- // MiniMax usage endpoints (try in order, fallback on transient errors)
21
- const MINIMAX_USAGE_URLS = {
22
- minimax: [
23
- "https://www.minimax.io/v1/token_plan/remains",
24
- "https://api.minimax.io/v1/api/openplatform/coding_plan/remains",
25
- ],
26
- "minimax-cn": [
27
- "https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains",
28
- "https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains",
29
- ],
30
- };
31
-
32
- // Antigravity API config (from Quotio)
33
- const ANTIGRAVITY_CONFIG = {
34
- // Multiple upstream domains — Google routes free/paid accounts differently and
35
- // some hosts 403 where others 200. Try in order until one answers (ported from
36
- // OmniRoute antigravityUpstream.ts).
37
- quotaApiHosts: [
38
- "https://daily-cloudcode-pa.googleapis.com",
39
- "https://cloudcode-pa.googleapis.com",
40
- "https://daily-cloudcode-pa.sandbox.googleapis.com",
41
- ],
42
- fetchAvailableModelsPath: "/v1internal:fetchAvailableModels",
43
- retrieveUserQuotaPath: "/v1internal:retrieveUserQuota",
44
- loadProjectApiUrl: "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",
45
- tokenUrl: "https://oauth2.googleapis.com/token",
46
- clientId: "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",
47
- clientSecret: "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",
48
- userAgent: getPlatformUserAgent(),
49
- };
50
-
51
- // Codex (OpenAI) API config
52
- const CODEX_CONFIG = {
53
- usageUrl: "https://chatgpt.com/backend-api/wham/usage",
54
- };
55
-
56
- // Claude API config
57
- const CLAUDE_CONFIG = {
58
- oauthUsageUrl: "https://api.anthropic.com/api/oauth/usage",
59
- usageUrl: "https://api.anthropic.com/v1/organizations/{org_id}/usage",
60
- settingsUrl: "https://api.anthropic.com/v1/settings",
61
- apiVersion: "2023-06-01",
62
- };
63
-
64
- const CODEBUDDY_CONFIG = {
65
- usageUrlPath: "/v2/billing/meter/get-user-resource",
66
- productCode: "p_tcaca",
67
- packageCodes: {
68
- free: "TCACA_code_001_PqouKr6QWV",
69
- proMon: "TCACA_code_002_AkiJS3ZHF5",
70
- gift: "TCACA_code_006_DbXS0lrypC",
71
- activity: "TCACA_code_007_nzdH5h4Nl0",
72
- proYear: "TCACA_code_003_FAnt7lcmRT",
73
- freeMon: "TCACA_code_008_cfWoLwvjU4",
74
- extra: "TCACA_code_009_0XmEQc2xOf",
75
- },
76
- };
77
-
78
- // Build the billing/meter endpoint for the given provider-specific data.
79
- // Global edition uses www.codebuddy.ai; the China edition (codebuddy-cn)
80
- // is served from www.codebuddy.cn. The stored domain takes precedence;
81
- // otherwise the provider id determines the default domain.
82
- function getCodeBuddyUsageUrl(providerSpecificData = {}, provider = "codebuddy") {
83
- const defaultDomain = provider === "codebuddy-cn" ? "www.codebuddy.cn" : "www.codebuddy.ai";
84
- const domain = providerSpecificData?.domain || providerSpecificData?.rawAuth?.domain || defaultDomain;
85
- return `https://${domain}${CODEBUDDY_CONFIG.usageUrlPath}`;
86
- }
87
-
88
- /**
89
- * Get usage data for a provider connection
90
- * @param {Object} connection - Provider connection with accessToken
91
- * @returns {Object} Usage data with quotas
92
- */
93
- export async function getUsageForProvider(connection, proxyOptions = null) {
94
- const { provider, accessToken, apiKey, providerSpecificData, projectId } = connection;
95
- const providerDataWithProjectId = {
96
- ...(providerSpecificData || {}),
97
- ...(projectId ? { projectId } : {}),
98
- };
99
-
100
- switch (provider) {
101
- case "github":
102
- return await getGitHubUsage(accessToken, providerSpecificData, proxyOptions);
103
- case "gemini-cli":
104
- return await getGeminiUsage(accessToken, providerDataWithProjectId, proxyOptions);
105
- case "antigravity":
106
- return await getAntigravityUsage(accessToken, providerDataWithProjectId, proxyOptions);
107
- case "claude":
108
- return await getClaudeUsage(accessToken, proxyOptions);
109
- case "codex":
110
- return await getCodexUsage(accessToken, proxyOptions);
111
- case "kiro":
112
- return await getKiroUsage(accessToken, providerSpecificData, proxyOptions);
113
- case "codebuddy":
114
- case "codebuddy-cn":
115
- return await getCodeBuddyUsage(accessToken, providerSpecificData, proxyOptions, apiKey, provider);
116
- case "qoder":
117
- return await getQoderUsage(accessToken, proxyOptions);
118
- case "autoclaw":
119
- return await getAutoclawUsage(accessToken, proxyOptions, connection);
120
- case "qwen":
121
- return await getQwenUsage(accessToken, providerSpecificData);
122
- case "iflow":
123
- return await getIflowUsage(accessToken);
124
- case "ollama":
125
- return await getOllamaUsage(accessToken);
126
- case "glm":
127
- case "glm-cn":
128
- return await getGlmUsage(apiKey, provider, proxyOptions);
129
- case "minimax":
130
- case "minimax-cn":
131
- return await getMiniMaxUsage(apiKey, provider, proxyOptions);
132
- case "grok-cli":
133
- return await getGrokCliUsage(accessToken, providerSpecificData, proxyOptions);
134
- case "cloudflare-ai":
135
- return await getCloudflareAiUsage(apiKey || accessToken, providerSpecificData, proxyOptions);
136
- case "xai":
137
- return await getXaiUsage(accessToken || apiKey, providerSpecificData, proxyOptions);
138
- case "cline":
139
- case "clinepass":
140
- return await getClineUsage(accessToken || apiKey, provider, proxyOptions);
141
- case "kimchi":
142
- return await getKimchiUsage(accessToken || apiKey, providerSpecificData, proxyOptions);
143
- case "cursor":
144
- return await getCursorUsage(accessToken, providerSpecificData);
145
- default:
146
- return { message: `Usage API not implemented for ${provider}` };
147
- }
148
- }
149
-
150
- async function fetchCodeBuddyUid(accessToken, providerSpecificData = {}, proxyOptions = null, provider = "codebuddy") {
151
- const cachedUid = providerSpecificData?.uid || providerSpecificData?.rawAuth?.uid;
152
- if (cachedUid) return { uid: cachedUid, enterpriseId: providerSpecificData?.enterpriseId || null };
153
-
154
- const defaultDomain = provider === "codebuddy-cn" ? "www.codebuddy.cn" : "www.codebuddy.ai";
155
- const domain = providerSpecificData?.domain || providerSpecificData?.rawAuth?.domain || defaultDomain;
156
- try {
157
- const response = await proxyAwareFetch(`https://${domain}/v2/plugin/accounts`, {
158
- method: "GET",
159
- headers: {
160
- Authorization: `Bearer ${accessToken}`,
161
- Accept: "application/json",
162
- "X-Domain": domain,
163
- },
164
- }, proxyOptions);
165
-
166
- if (!response.ok) return { uid: null, enterpriseId: null };
167
-
168
- const body = await response.json();
169
- const accounts = body?.data?.accounts || [];
170
- const account = accounts.find((a) => a.lastLogin) || accounts[0] || {};
171
- return {
172
- uid: account.uid || null,
173
- enterpriseId: account.enterpriseId || null,
174
- };
175
- } catch {
176
- return { uid: null, enterpriseId: null };
177
- }
178
- }
179
-
180
- async function getCodeBuddyUsage(accessToken, providerSpecificData = {}, proxyOptions = null, apiKey = null, provider = "codebuddy") {
181
- // Prefer the IDE OAuth token; fall back to the API key (chat key) when no
182
- // OAuth token is stored. The billing/meter endpoint on both the global (.ai)
183
- // and China (.cn) editions accepts the API key via Authorization: Bearer +
184
- // X-Api-Key, so even zevairouter-generated chat keys are tried. If the
185
- // endpoint rejects the key (401/403) we fall back to the local-router
186
- // tracking message instead of throwing.
187
- const isGeneratedKey = providerSpecificData?.authMode === "generated-api-key";
188
- const effectiveToken = accessToken || apiKey;
189
- const authMode = accessToken ? "oauth" : apiKey ? "api-key" : null;
190
-
191
- if (!effectiveToken) {
192
- return {
193
- plan: "CodeBuddy",
194
- message: "CodeBuddy upstream quota is unavailable because no valid IDE OAuth token or API key is stored.",
195
- quotas: {},
196
- trackingMode: "unavailable",
197
- };
198
- }
199
-
200
- // Local-router fallback message used when an API-key (chat key) connection
201
- // cannot read upstream quota — e.g. a generated key the upstream rejects.
202
- const chatKeyFallback = {
203
- plan: "CodeBuddy",
204
- message: "CodeBuddy chat key active. Upstream quota is unavailable without a valid IDE OAuth token; use ZevaiRouter Usage for local request and token tracking.",
205
- quotas: {},
206
- authMode: isGeneratedKey ? "generated-api-key" : "api-key",
207
- trackingMode: "local-router",
208
- };
209
-
210
- try {
211
- const { uid, enterpriseId } = await fetchCodeBuddyUid(effectiveToken, providerSpecificData, proxyOptions, provider);
212
-
213
- const response = await proxyAwareFetch(getCodeBuddyUsageUrl(providerSpecificData, provider), {
214
- method: "POST",
215
- headers: buildCodeBuddyUsageHeaders(effectiveToken, providerSpecificData, uid, enterpriseId, apiKey),
216
- body: JSON.stringify(buildCodeBuddyUsageBody()),
217
- }, proxyOptions);
218
-
219
- const rawText = await response.text();
220
- let payload = null;
221
- try {
222
- payload = rawText ? JSON.parse(rawText) : null;
223
- } catch {
224
- payload = null;
225
- }
226
-
227
- if (response.status === 401 || response.status === 403) {
228
- // OAuth token rejected — surface explicitly (callers may force-refresh & retry).
229
- if (authMode === "oauth") {
230
- return {
231
- plan: "CodeBuddy",
232
- message: `CodeBuddy IDE OAuth token was rejected (${response.status}). Upstream quota is unavailable; use ZevaiRouter Usage for local request and token tracking.`,
233
- quotas: {},
234
- authMode: "oauth-rejected",
235
- trackingMode: "local-router",
236
- };
237
- }
238
- // API key (chat key) rejected — fall back to local-router tracking.
239
- return chatKeyFallback;
240
- }
241
-
242
- if (!response.ok) {
243
- return {
244
- plan: "CodeBuddy",
245
- message: `CodeBuddy quota endpoint returned ${response.status}.`,
246
- quotas: {},
247
- };
248
- }
249
-
250
- return {
251
- ...parseCodeBuddyUsage(payload),
252
- authMode,
253
- };
254
- } catch (error) {
255
- return { plan: "CodeBuddy", message: `CodeBuddy connected. Unable to fetch quota: ${error.message}`, quotas: {} };
256
- }
257
- }
258
-
259
- /**
260
- * Parse reset date/time to ISO string
261
- * Handles multiple formats: Unix timestamp (ms), ISO date string, etc.
262
- */
263
- function parseResetTime(resetValue) {
264
- if (!resetValue) return null;
265
-
266
- try {
267
- // If it's already a Date object
268
- if (resetValue instanceof Date) {
269
- return resetValue.toISOString();
270
- }
271
-
272
- // Unix timestamps from provider APIs may be seconds or milliseconds.
273
- if (typeof resetValue === 'number') {
274
- return new Date(resetValue < 1e12 ? resetValue * 1000 : resetValue).toISOString();
275
- }
276
-
277
- // If it's a numeric string, treat it like a Unix timestamp too.
278
- if (typeof resetValue === 'string') {
279
- if (/^\d+$/.test(resetValue)) {
280
- const timestamp = Number(resetValue);
281
- return new Date(timestamp < 1e12 ? timestamp * 1000 : timestamp).toISOString();
282
- }
283
- return new Date(resetValue).toISOString();
284
- }
285
-
286
- return null;
287
- } catch (error) {
288
- console.warn(`Failed to parse reset time: ${resetValue}`, error);
289
- return null;
290
- }
291
- }
292
-
293
- function formatCodeBuddyDate(date) {
294
- const pad = (value) => String(value).padStart(2, "0");
295
- return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`;
296
- }
297
-
298
- function buildCodeBuddyUsageBody() {
299
- const now = new Date();
300
- const rangeEnd = new Date(now);
301
- rangeEnd.setFullYear(rangeEnd.getFullYear() + 101);
302
-
303
- return {
304
- PageNumber: 1,
305
- PageSize: 200,
306
- ProductCode: CODEBUDDY_CONFIG.productCode,
307
- Status: [0, 3],
308
- PackageCodes: Object.values(CODEBUDDY_CONFIG.packageCodes),
309
- PackageEndTimeRangeBegin: formatCodeBuddyDate(now),
310
- PackageEndTimeRangeEnd: formatCodeBuddyDate(rangeEnd),
311
- };
312
- }
313
-
314
- function buildCodeBuddyUsageHeaders(accessToken, providerSpecificData = {}, uid = null, enterpriseId = null, apiKey = null) {
315
- const domain = providerSpecificData?.domain || providerSpecificData?.rawAuth?.domain || "www.codebuddy.ai";
316
-
317
- const headers = {
318
- Authorization: `Bearer ${accessToken}`,
319
- Accept: "application/json, text/plain, */*",
320
- "Accept-Language": "zh-CN,zh;q=0.9",
321
- "Content-Type": "application/json",
322
- "X-Domain": domain,
323
- };
324
-
325
- // When authenticating with an API key (chat key) instead of an IDE OAuth
326
- // token, also send the key via X-Api-Key — the billing/meter endpoint on
327
- // both the global (.ai) and China (.cn) editions accepts this header.
328
- if (apiKey) {
329
- headers["X-Api-Key"] = apiKey;
330
- }
331
-
332
- if (uid) {
333
- headers["X-User-Id"] = uid;
334
- }
335
- if (enterpriseId) {
336
- headers["X-Enterprise-Id"] = enterpriseId;
337
- headers["X-Tenant-Id"] = enterpriseId;
338
- }
339
-
340
- return headers;
341
- }
342
-
343
- function parseCodeBuddyUsage(payload) {
344
- const data = payload?.data?.Response?.Data || payload?.Response?.Data || payload?.data || payload || {};
345
- const accounts = Array.isArray(data?.Accounts)
346
- ? data.Accounts
347
- : Array.isArray(data?.accounts)
348
- ? data.accounts
349
- : [];
350
-
351
- if (accounts.length === 0) {
352
- return {
353
- plan: "CodeBuddy",
354
- message: "CodeBuddy connected. No quota records were returned.",
355
- quotas: {},
356
- };
357
- }
358
-
359
- // Split refill packs (monthly cycle resets) vs one-shot bonus packs so the UI
360
- // does not imply bonus credits replenish every month (ported from zevairouter).
361
- const REFILL_GAP_MS = 2 * 24 * 60 * 60 * 1000;
362
- const cycleEndMs = (acc) => {
363
- const r = parseResetTime(acc.CycleEndTime);
364
- return r ? new Date(r).getTime() : Number.POSITIVE_INFINITY;
365
- };
366
- const isRefill = (acc) => {
367
- const ce = cycleEndMs(acc);
368
- const de = Number(acc.DeductionEndTime);
369
- return Number.isFinite(ce) && Number.isFinite(de) && de - ce > REFILL_GAP_MS;
370
- };
371
- const byExpiry = (a, b) => cycleEndMs(a) - cycleEndMs(b);
372
-
373
- const refills = accounts.filter(isRefill).sort(byExpiry);
374
- const bonuses = accounts.filter((a) => !isRefill(a)).sort(byExpiry);
375
-
376
- const quotas = {};
377
- let hasProPackage = false;
378
-
379
- const addQuota = (label, account, { recurring }) => {
380
- const quota = getCodeBuddyQuotaValues(account, { useCycle: recurring });
381
- if (!quota) return;
382
- if (account.PackageCode === CODEBUDDY_CONFIG.packageCodes.proMon
383
- || account.PackageCode === CODEBUDDY_CONFIG.packageCodes.proYear) {
384
- hasProPackage = true;
385
- }
386
- if (!quotas[label]) {
387
- quotas[label] = {
388
- used: 0,
389
- total: 0,
390
- remaining: 0,
391
- resetAt: null,
392
- unit: "credits",
393
- unlimited: false,
394
- recurring,
395
- };
396
- }
397
- quotas[label].used += quota.used;
398
- quotas[label].total += quota.total;
399
- quotas[label].remaining += quota.remaining;
400
- quotas[label].resetAt = getEarlierReset(quotas[label].resetAt, quota.resetAt);
401
- quotas[label].recurring = quotas[label].recurring && recurring;
402
- };
403
-
404
- // Aggregate ALL refill packs into one Monthly row and ALL bonus packs into one
405
- // Bonus row — Tencent often returns many small gift packages (10–20 rows) for a
406
- // single account, which flooded the dashboard as Bonus Pack 1..N.
407
- for (const account of refills) {
408
- addQuota("Monthly Credits", account, { recurring: true });
409
- }
410
- for (const account of bonuses) {
411
- addQuota("Bonus Credits", account, { recurring: false });
412
- }
413
- if (bonuses.length > 0 && quotas["Bonus Credits"]) {
414
- quotas["Bonus Credits"].packCount = bonuses.length;
415
- }
416
-
417
- // Fallback: if classification produced nothing, keep old package-label merge.
418
- if (Object.keys(quotas).length === 0) {
419
- for (const account of accounts) {
420
- if (!account || typeof account !== "object") continue;
421
- const label = getCodeBuddyQuotaLabel(account.PackageCode) || "Other Credits";
422
- const recurring = label !== "Activity Credits" && label !== "Gift Credits";
423
- addQuota(recurring ? "Monthly Credits" : "Bonus Credits", account, { recurring });
424
- }
425
- }
426
-
427
- if (Object.keys(quotas).length === 0) {
428
- return {
429
- plan: hasProPackage ? "Pro" : "Free",
430
- message: "CodeBuddy connected. Unable to extract quota values.",
431
- quotas: {},
432
- };
433
- }
434
-
435
- for (const quota of Object.values(quotas)) {
436
- quota.remainingPercentage = quota.total > 0
437
- ? Math.max(0, Math.min(100, (quota.remaining / quota.total) * 100))
438
- : 0;
439
- }
440
-
441
- const plan = hasProPackage ? "Pro" : "Free";
442
- return {
443
- plan,
444
- // packCount stays on Bonus Credits for UI/detail if needed; no noisy top-level message
445
- quotas,
446
- };
447
- }
448
-
449
- function getCodeBuddyQuotaLabel(packageCode) {
450
- const codes = CODEBUDDY_CONFIG.packageCodes;
451
- switch (packageCode) {
452
- case codes.free:
453
- case codes.freeMon:
454
- case codes.proMon:
455
- case codes.proYear:
456
- return "Monthly Credits";
457
- case codes.gift:
458
- return "Gift Credits";
459
- case codes.extra:
460
- return "Extra Credits";
461
- case codes.activity:
462
- return "Activity Credits";
463
- default:
464
- return packageCode ? "Other Credits" : null;
465
- }
466
- }
467
-
468
- function getCodeBuddyQuotaValues(account, { useCycle = true } = {}) {
469
- // Refill packs: Cycle* fields = current period. Bonus packs: plain Capacity* = lifetime one-shot.
470
- const total = useCycle
471
- ? firstFiniteNumber(
472
- account.CycleCapacitySizePrecise,
473
- account.CycleCapacitySize,
474
- account.CapacitySizePrecise,
475
- account.CapacitySize,
476
- )
477
- : firstFiniteNumber(
478
- account.CapacitySizePrecise,
479
- account.CapacitySize,
480
- account.CycleCapacitySizePrecise,
481
- account.CycleCapacitySize,
482
- );
483
- const remaining = useCycle
484
- ? firstFiniteNumber(
485
- account.CycleCapacityRemainPrecise,
486
- account.CapacityRemainPrecise,
487
- account.CapacityRemain,
488
- )
489
- : firstFiniteNumber(
490
- account.CapacityRemainPrecise,
491
- account.CapacityRemain,
492
- account.CycleCapacityRemainPrecise,
493
- );
494
- const used = firstFiniteNumber(
495
- account.CapacityUsedPrecise,
496
- account.CapacityUsed,
497
- total !== null && remaining !== null ? Math.max(0, total - remaining) : null,
498
- );
499
-
500
- if (total === null && remaining === null && used === null) return null;
501
-
502
- const safeTotal = Math.max(0, total ?? ((used ?? 0) + (remaining ?? 0)));
503
- const safeRemaining = Math.max(0, remaining ?? Math.max(0, safeTotal - (used ?? 0)));
504
- const safeUsed = Math.max(0, used ?? Math.max(0, safeTotal - safeRemaining));
505
-
506
- return {
507
- total: safeTotal,
508
- remaining: safeRemaining,
509
- used: safeUsed,
510
- resetAt: parseResetTime(account.CycleEndTime || account.DeductionEndTime || account.ExpiredTime),
511
- };
512
- }
513
-
514
- function firstFiniteNumber(...values) {
515
- for (const value of values) {
516
- if (value === null || value === undefined || value === "") continue;
517
- const number = Number(value);
518
- if (Number.isFinite(number)) return number;
519
- }
520
- return null;
521
- }
522
-
523
- function getEarlierReset(current, next) {
524
- if (!current) return next || null;
525
- if (!next) return current;
526
- return new Date(next).getTime() < new Date(current).getTime() ? next : current;
527
- }
528
-
529
- /**
530
- * GitHub Copilot Usage
531
- * Uses GitHub accessToken (not copilotToken) to call copilot_internal/user API
532
- */
533
- async function getGitHubUsage(accessToken, providerSpecificData, proxyOptions = null) {
534
- try {
535
- if (!accessToken) {
536
- throw new Error("No GitHub access token available. Please re-authorize the connection.");
537
- }
538
-
539
- // copilot_internal/user API requires GitHub OAuth token, not copilotToken
540
- const response = await proxyAwareFetch("https://api.github.com/copilot_internal/user", {
541
- headers: {
542
- "Authorization": `token ${accessToken}`,
543
- "Accept": "application/json",
544
- "X-GitHub-Api-Version": GITHUB_CONFIG.apiVersion,
545
- "User-Agent": GITHUB_CONFIG.userAgent,
546
- "Editor-Version": "vscode/1.100.0",
547
- "Editor-Plugin-Version": "copilot-chat/0.26.7",
548
- },
549
- }, proxyOptions);
550
-
551
- if (!response.ok) {
552
- const error = await response.text();
553
- throw new Error(`GitHub API error: ${error}`);
554
- }
555
-
556
- const data = await response.json();
557
-
558
- // Handle different response formats (paid vs free)
559
- if (data.quota_snapshots) {
560
- // Paid plan format
561
- const snapshots = data.quota_snapshots;
562
- const resetAt = parseResetTime(data.quota_reset_date);
563
-
564
- return {
565
- plan: data.copilot_plan,
566
- resetDate: data.quota_reset_date,
567
- quotas: {
568
- chat: { ...formatGitHubQuotaSnapshot(snapshots.chat), resetAt },
569
- completions: { ...formatGitHubQuotaSnapshot(snapshots.completions), resetAt },
570
- premium_interactions: { ...formatGitHubQuotaSnapshot(snapshots.premium_interactions), resetAt },
571
- },
572
- };
573
- } else if (data.monthly_quotas || data.limited_user_quotas) {
574
- // Free/limited plan format
575
- const monthlyQuotas = data.monthly_quotas || {};
576
- const usedQuotas = data.limited_user_quotas || {};
577
- const resetAt = parseResetTime(data.limited_user_reset_date);
578
-
579
- return {
580
- plan: data.copilot_plan || data.access_type_sku,
581
- resetDate: data.limited_user_reset_date,
582
- quotas: {
583
- chat: {
584
- used: usedQuotas.chat || 0,
585
- total: monthlyQuotas.chat || 0,
586
- unlimited: false,
587
- resetAt,
588
- },
589
- completions: {
590
- used: usedQuotas.completions || 0,
591
- total: monthlyQuotas.completions || 0,
592
- unlimited: false,
593
- resetAt,
594
- },
595
- },
596
- };
597
- }
598
-
599
- return { message: "GitHub Copilot connected. Unable to parse quota data." };
600
- } catch (error) {
601
- throw new Error(`Failed to fetch GitHub usage: ${error.message}`);
602
- }
603
- }
604
-
605
- function formatGitHubQuotaSnapshot(quota) {
606
- if (!quota) return { used: 0, total: 0, unlimited: true };
607
-
608
- return {
609
- used: quota.entitlement - quota.remaining,
610
- total: quota.entitlement,
611
- remaining: quota.remaining,
612
- unlimited: quota.unlimited || false,
613
- };
614
- }
615
-
616
- /**
617
- * Gemini CLI Usage \u2014 fetch per-model quota via Cloud Code Assist API.
618
- * Uses retrieveUserQuota (same endpoint as `gemini /stats`) returning
619
- * per-model buckets with remainingFraction + resetTime.
620
- */
621
- async function getGeminiUsage(accessToken, providerSpecificData, proxyOptions = null) {
622
- if (!accessToken) {
623
- return { plan: "Free", message: "Gemini CLI access token not available." };
624
- }
625
-
626
- try {
627
- // Resolve project id: prefer connection-stored id, else loadCodeAssist lookup.
628
- // #1271: OAuth save stores projectId on the connection, not providerSpecificData.
629
- let projectId = normalizeCloudCodeProjectId(providerSpecificData?.projectId);
630
- let plan = "Free";
631
-
632
- if (!projectId) {
633
- const subInfo = await getGeminiSubscriptionInfo(accessToken, proxyOptions);
634
- projectId = normalizeCloudCodeProjectId(subInfo?.cloudaicompanionProject);
635
- plan = subInfo?.currentTier?.name || plan;
636
- }
637
-
638
- if (!projectId) {
639
- return {
640
- plan,
641
- message: "Gemini CLI project ID not available. Reconnect Gemini CLI, or configure a Google Cloud project with Gemini Code Assist access before checking quota.",
642
- };
643
- }
644
-
645
- const controller = new AbortController();
646
- const timeoutId = setTimeout(() => controller.abort(), 10000);
647
- let response;
648
- try {
649
- response = await proxyAwareFetch(
650
- "https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuota",
651
- {
652
- method: "POST",
653
- headers: {
654
- Authorization: `Bearer ${accessToken}`,
655
- "Content-Type": "application/json",
656
- },
657
- body: JSON.stringify({ project: projectId }),
658
- signal: controller.signal,
659
- },
660
- proxyOptions
661
- );
662
- } finally {
663
- clearTimeout(timeoutId);
664
- }
665
-
666
- if (!response.ok) {
667
- return { plan, message: `Gemini CLI quota error (${response.status}).` };
668
- }
669
-
670
- const data = await response.json();
671
- const quotas = {};
672
-
673
- if (Array.isArray(data.buckets)) {
674
- for (const bucket of data.buckets) {
675
- if (!bucket.modelId || bucket.remainingFraction == null) continue;
676
-
677
- const remainingFraction = Number(bucket.remainingFraction) || 0;
678
- const total = 1000; // Normalized base, matches antigravity convention
679
- const remaining = Math.round(total * remainingFraction);
680
- const used = Math.max(0, total - remaining);
681
-
682
- quotas[bucket.modelId] = {
683
- used,
684
- total,
685
- resetAt: parseResetTime(bucket.resetTime),
686
- remainingPercentage: remainingFraction * 100,
687
- unlimited: false,
688
- };
689
- }
690
- }
691
-
692
- return { plan, quotas };
693
- } catch (error) {
694
- return { message: `Gemini CLI error: ${error.message}` };
695
- }
696
- }
697
-
698
- function normalizeCloudCodeProjectId(project) {
699
- if (typeof project === "string") return project.trim() || null;
700
- if (project && typeof project === "object" && typeof project.id === "string") {
701
- return project.id.trim() || null;
702
- }
703
- return null;
704
- }
705
-
706
- /**
707
- * Get Gemini CLI subscription info via loadCodeAssist
708
- */
709
- async function getGeminiSubscriptionInfo(accessToken, proxyOptions = null) {
710
- const controller = new AbortController();
711
- const timeoutId = setTimeout(() => controller.abort(), 10000);
712
- try {
713
- const response = await proxyAwareFetch(
714
- "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",
715
- {
716
- method: "POST",
717
- headers: {
718
- Authorization: `Bearer ${accessToken}`,
719
- "Content-Type": "application/json",
720
- },
721
- body: JSON.stringify({
722
- metadata: CLIENT_METADATA,
723
- }),
724
- signal: controller.signal,
725
- },
726
- proxyOptions
727
- );
728
- if (!response.ok) return null;
729
- return await response.json();
730
- } catch {
731
- return null;
732
- } finally {
733
- clearTimeout(timeoutId);
734
- }
735
- }
736
-
737
- /**
738
- * POST to the first Antigravity host that answers (2xx/401/403). Returns
739
- * { response, host } or throws if every host is unreachable.
740
- */
741
- async function antigravityQuotaFetch(path, accessToken, bodyObj, proxyOptions) {
742
- let lastError = null;
743
- for (const host of ANTIGRAVITY_CONFIG.quotaApiHosts) {
744
- const controller = new AbortController();
745
- const timeoutId = setTimeout(() => controller.abort(), 10000);
746
- try {
747
- const response = await proxyAwareFetch(`${host}${path}`, {
748
- method: "POST",
749
- headers: {
750
- "Authorization": `Bearer ${accessToken}`,
751
- "User-Agent": ANTIGRAVITY_CONFIG.userAgent,
752
- "Content-Type": "application/json",
753
- "x-request-source": "local", // MITM bypass
754
- },
755
- body: JSON.stringify(bodyObj || {}),
756
- signal: controller.signal,
757
- }, proxyOptions);
758
- // A definitive answer (ok, or auth/permission verdict) ends the loop; only
759
- // transient upstream errors (5xx / network) fall through to the next host.
760
- if (response.ok || response.status === 401 || response.status === 403) {
761
- return { response, host };
762
- }
763
- lastError = new Error(`Antigravity API error: ${response.status}`);
764
- } catch (error) {
765
- lastError = error;
766
- } finally {
767
- clearTimeout(timeoutId);
768
- }
769
- }
770
- if (lastError) throw lastError;
771
- throw new Error("Antigravity API unavailable");
772
- }
773
-
774
- /**
775
- * Antigravity Usage - Fetch quota from Google Cloud Code API.
776
- *
777
- * Two upstream sources are merged:
778
- * - fetchAvailableModels: catalog + per-model quotaInfo (can be stale/full).
779
- * - retrieveUserQuota: per-model consumption buckets (source of truth).
780
- * retrieveUserQuota wins when it reports a model, matching OmniRoute behaviour.
781
- */
782
- async function getAntigravityUsage(accessToken, providerSpecificData, proxyOptions = null) {
783
- try {
784
- // Prefer the projectId stored on the connection; use loadCodeAssist for tier metadata
785
- // and as the project fallback.
786
- const savedProjectId = normalizeCloudCodeProjectId(providerSpecificData?.projectId);
787
- const subscriptionInfo = await getAntigravitySubscriptionInfo(accessToken, proxyOptions);
788
- const projectId = savedProjectId
789
- || normalizeCloudCodeProjectId(subscriptionInfo?.cloudaicompanionProject);
790
-
791
- // fetchAvailableModels (catalog) \u2014 required. retrieveUserQuota (live) \u2014 best effort.
792
- let modelsResp;
793
- try {
794
- modelsResp = await antigravityQuotaFetch(
795
- ANTIGRAVITY_CONFIG.fetchAvailableModelsPath,
796
- accessToken,
797
- projectId ? { project: projectId } : {},
798
- proxyOptions
799
- );
800
- } catch (error) {
801
- return { message: `Antigravity quota unavailable: ${error.message}. Chat may still work.` };
802
- }
803
-
804
- const response = modelsResp.response;
805
-
806
- if (response.status === 401) {
807
- // Distinguish a dead account (refresh token revoked/deleted) from a merely
808
- // stale access token, so the dashboard can tell the user which is which.
809
- const deadReason = await getAntigravityAccountDeadReason(providerSpecificData, proxyOptions);
810
- if (deadReason) {
811
- return { accountDead: true, message: `Antigravity account ${deadReason}. Reconnect won't help \u2014 recreate the account.`, quotas: {} };
812
- }
813
- return { message: "Antigravity quota API authentication expired. Chat may still work.", quotas: {} };
814
- }
815
-
816
- if (response.status === 403) {
817
- return { message: "Antigravity quota API access forbidden (tier may not expose quota). Chat may still work.", quotas: {} };
818
- }
819
-
820
- if (!response.ok) {
821
- throw new Error(`Antigravity API error: ${response.status}`);
822
- }
823
-
824
- const data = await response.json();
825
-
826
- // Live consumption buckets keyed by modelId (source of truth).
827
- // retrieveUserQuota works with or without a project — send the project when
828
- // we have one, otherwise an empty body (Google resolves the default project).
829
- const liveBuckets = new Map();
830
- try {
831
- const quotaResp = await antigravityQuotaFetch(
832
- ANTIGRAVITY_CONFIG.retrieveUserQuotaPath,
833
- accessToken,
834
- projectId ? { project: projectId } : {},
835
- proxyOptions
836
- );
837
- if (quotaResp.response.ok) {
838
- const quotaData = await quotaResp.response.json();
839
- if (Array.isArray(quotaData.buckets)) {
840
- for (const bucket of quotaData.buckets) {
841
- const id = String(bucket.modelId || "").trim();
842
- if (id) liveBuckets.set(id, bucket);
843
- }
844
- }
845
- }
846
- } catch {
847
- // Non-fatal: fall back to catalog-only quotaInfo.
848
- }
849
-
850
- const quotas = {};
851
- if (data.models) {
852
- const importantModels = [
853
- 'gemini-3.6-flash-high',
854
- 'gemini-3.6-flash-medium',
855
- 'gemini-3.6-flash-low',
856
- 'gemini-3-flash-agent',
857
- 'gemini-3.5-flash-low',
858
- 'gemini-3.5-flash-extra-low',
859
- 'gemini-pro-agent',
860
- 'gemini-3.1-pro-low',
861
- 'claude-sonnet-4-6',
862
- 'claude-opus-4-6-thinking',
863
- 'gpt-oss-120b-medium',
864
- 'gemini-3-flash',
865
- ];
866
-
867
- for (const [modelKey, info] of Object.entries(data.models)) {
868
- if (info.isInternal || !importantModels.includes(modelKey)) continue;
869
-
870
- // retrieveUserQuota bucket wins over the (possibly stale) catalog quotaInfo.
871
- const live = liveBuckets.get(modelKey);
872
- const quotaSource = live || info.quotaInfo;
873
- if (!quotaSource) continue;
874
-
875
- const remainingFraction = Number(quotaSource.remainingFraction) || 0;
876
- const remainingPercentage = remainingFraction * 100;
877
- const total = 1000; // Normalized base
878
- const remaining = Math.round(total * remainingFraction);
879
- const used = Math.max(0, total - remaining);
880
-
881
- quotas[modelKey] = {
882
- used,
883
- total,
884
- resetAt: parseResetTime(quotaSource.resetTime),
885
- remainingPercentage,
886
- unlimited: false,
887
- displayName: info.displayName || modelKey,
888
- quotaSource: live ? "retrieveUserQuota" : "fetchAvailableModels",
889
- };
890
- }
891
- }
892
-
893
- return {
894
- plan: subscriptionInfo?.currentTier?.name || "Unknown",
895
- quotas,
896
- subscriptionInfo,
897
- };
898
- } catch (error) {
899
- console.error("[Antigravity Usage] Error:", error.message, error.cause);
900
- return { message: `Antigravity error: ${error.message}` };
901
- }
902
- }
903
-
904
- /**
905
- * Probe whether an Antigravity account is permanently dead (refresh token
906
- * revoked / account deleted). Returns a short reason string, or null if the
907
- * account looks alive (or we can't tell). Used to turn a misleading
908
- * "authentication expired" into an actionable "account deleted" verdict.
909
- */
910
- async function getAntigravityAccountDeadReason(providerSpecificData, proxyOptions = null) {
911
- const refreshToken = providerSpecificData?.refreshToken;
912
- if (!refreshToken) return null;
913
- try {
914
- const controller = new AbortController();
915
- const timeoutId = setTimeout(() => controller.abort(), 10000);
916
- let response;
917
- try {
918
- response = await proxyAwareFetch(ANTIGRAVITY_CONFIG.tokenUrl, {
919
- method: "POST",
920
- headers: { "Content-Type": "application/x-www-form-urlencoded" },
921
- body: new URLSearchParams({
922
- client_id: ANTIGRAVITY_CONFIG.clientId,
923
- client_secret: ANTIGRAVITY_CONFIG.clientSecret,
924
- refresh_token: refreshToken,
925
- grant_type: "refresh_token",
926
- }),
927
- signal: controller.signal,
928
- }, proxyOptions);
929
- } finally {
930
- clearTimeout(timeoutId);
931
- }
932
- if (response.ok) return null; // refresh works \u2192 account alive, token just stale
933
- const body = await response.json().catch(() => ({}));
934
- if (body.error === "invalid_grant") {
935
- const desc = (body.error_description || "").toLowerCase();
936
- if (desc.includes("deleted")) return "has been deleted";
937
- if (desc.includes("disabled") || desc.includes("suspend")) return "is disabled/suspended";
938
- return "authorization was revoked";
939
- }
940
- return null;
941
- } catch {
942
- return null;
943
- }
944
- }
945
-
946
- /**
947
- * Get Antigravity project ID from subscription info
948
- */
949
- async function getAntigravityProjectId(accessToken) {
950
- try {
951
- const info = await getAntigravitySubscriptionInfo(accessToken);
952
- return info?.cloudaicompanionProject || null;
953
- } catch {
954
- return null;
955
- }
956
- }
957
-
958
- /**
959
- * Get Antigravity subscription info
960
- */
961
- async function getAntigravitySubscriptionInfo(accessToken, proxyOptions = null) {
962
- const controller = new AbortController();
963
- const timeoutId = setTimeout(() => controller.abort(), 10000); // 10s timeout
964
- try {
965
- const response = await proxyAwareFetch(ANTIGRAVITY_CONFIG.loadProjectApiUrl, {
966
- method: "POST",
967
- headers: {
968
- "Authorization": `Bearer ${accessToken}`,
969
- "User-Agent": ANTIGRAVITY_CONFIG.userAgent,
970
- "Content-Type": "application/json",
971
- "x-request-source": "local", // MITM bypass
972
- },
973
- body: JSON.stringify({ metadata: CLIENT_METADATA, mode: 1 }),
974
- signal: controller.signal,
975
- }, proxyOptions);
976
-
977
- if (!response.ok) return null;
978
- return await response.json();
979
- } catch (error) {
980
- console.error("[Antigravity Subscription] Error:", error.message);
981
- return null;
982
- } finally {
983
- clearTimeout(timeoutId);
984
- }
985
- }
986
-
987
- /**
988
- * Claude Usage - Primary: OAuth endpoint, Fallback: legacy settings/org endpoint
989
- */
990
- async function getClaudeUsage(accessToken, proxyOptions = null) {
991
- try {
992
- // Primary: OAuth usage endpoint (Claude Code consumer OAuth tokens)
993
- const oauthResponse = await proxyAwareFetch(CLAUDE_CONFIG.oauthUsageUrl, {
994
- method: "GET",
995
- headers: {
996
- "Authorization": `Bearer ${accessToken}`,
997
- "anthropic-beta": "oauth-2025-04-20",
998
- "anthropic-version": CLAUDE_CONFIG.apiVersion,
999
- },
1000
- }, proxyOptions);
1001
-
1002
- if (oauthResponse.ok) {
1003
- const data = await oauthResponse.json();
1004
- const quotas = {};
1005
-
1006
- // utilization = % USED (e.g. 87 means 87% used, 13% remaining)
1007
- const hasUtilization = (window) =>
1008
- window && typeof window === "object" && typeof window.utilization === "number";
1009
-
1010
- const createQuotaObject = (window) => {
1011
- const used = window.utilization;
1012
- const remaining = Math.max(0, 100 - used);
1013
- return {
1014
- used,
1015
- total: 100,
1016
- remaining,
1017
- remainingPercentage: remaining,
1018
- resetAt: parseResetTime(window.resets_at),
1019
- unlimited: false,
1020
- };
1021
- };
1022
-
1023
- if (hasUtilization(data.five_hour)) {
1024
- quotas["session (5h)"] = createQuotaObject(data.five_hour);
1025
- }
1026
-
1027
- if (hasUtilization(data.seven_day)) {
1028
- quotas["weekly (7d)"] = createQuotaObject(data.seven_day);
1029
- }
1030
-
1031
- // Parse model-specific weekly windows (e.g. seven_day_sonnet, seven_day_opus)
1032
- for (const [key, value] of Object.entries(data)) {
1033
- if (key.startsWith("seven_day_") && key !== "seven_day" && hasUtilization(value)) {
1034
- const modelName = key.replace("seven_day_", "");
1035
- quotas[`weekly ${modelName} (7d)`] = createQuotaObject(value);
1036
- }
1037
- }
1038
-
1039
- return {
1040
- plan: "Claude Code",
1041
- extraUsage: data.extra_usage ?? null,
1042
- quotas,
1043
- };
1044
- }
1045
-
1046
- // Fallback: legacy settings + org usage endpoint
1047
- console.warn(`[Claude Usage] OAuth endpoint returned ${oauthResponse.status}, falling back to legacy`);
1048
- return await getClaudeUsageLegacy(accessToken, proxyOptions);
1049
- } catch (error) {
1050
- return { message: `Claude connected. Unable to fetch usage: ${error.message}` };
1051
- }
1052
- }
1053
-
1054
- /**
1055
- * Legacy Claude usage for API key / org admin users
1056
- */
1057
- async function getClaudeUsageLegacy(accessToken, proxyOptions = null) {
1058
- try {
1059
- const settingsResponse = await proxyAwareFetch(CLAUDE_CONFIG.settingsUrl, {
1060
- method: "GET",
1061
- headers: {
1062
- "Authorization": `Bearer ${accessToken}`,
1063
- "anthropic-version": CLAUDE_CONFIG.apiVersion,
1064
- },
1065
- }, proxyOptions);
1066
-
1067
- if (settingsResponse.ok) {
1068
- const settings = await settingsResponse.json();
1069
-
1070
- if (settings.organization_id) {
1071
- const usageResponse = await proxyAwareFetch(
1072
- CLAUDE_CONFIG.usageUrl.replace("{org_id}", settings.organization_id),
1073
- {
1074
- method: "GET",
1075
- headers: {
1076
- "Authorization": `Bearer ${accessToken}`,
1077
- "anthropic-version": CLAUDE_CONFIG.apiVersion,
1078
- },
1079
- },
1080
- proxyOptions
1081
- );
1082
-
1083
- if (usageResponse.ok) {
1084
- const usage = await usageResponse.json();
1085
- return {
1086
- plan: settings.plan || "Unknown",
1087
- organization: settings.organization_name,
1088
- quotas: usage,
1089
- };
1090
- }
1091
- }
1092
-
1093
- return {
1094
- plan: settings.plan || "Unknown",
1095
- organization: settings.organization_name,
1096
- message: "Claude connected. Usage details require admin access.",
1097
- };
1098
- }
1099
-
1100
- return { message: "Claude connected. Usage API requires admin permissions." };
1101
- } catch (error) {
1102
- return { message: `Claude connected. Unable to fetch usage: ${error.message}` };
1103
- }
1104
- }
1105
-
1106
- /**
1107
- * Codex (OpenAI) Usage - Fetch from ChatGPT backend API
1108
- */
1109
- function toFiniteNumber(value, fallback = 0) {
1110
- if (typeof value === "number" && Number.isFinite(value)) return value;
1111
- if (typeof value === "string" && value.trim()) {
1112
- const parsed = Number(value);
1113
- if (Number.isFinite(parsed)) return parsed;
1114
- }
1115
- return fallback;
1116
- }
1117
-
1118
- function getCodexRateLimitBody(snapshot) {
1119
- if (!snapshot || typeof snapshot !== "object" || Array.isArray(snapshot)) return null;
1120
- return snapshot.rate_limit && typeof snapshot.rate_limit === "object"
1121
- ? snapshot.rate_limit
1122
- : snapshot;
1123
- }
1124
-
1125
- function formatCodexWindow(window) {
1126
- const used = Math.max(0, Math.min(100, toFiniteNumber(window?.used_percent ?? window?.percent_used, 0)));
1127
- return {
1128
- used,
1129
- total: 100,
1130
- remaining: Math.max(0, 100 - used),
1131
- resetAt: parseResetTime(window?.reset_at ?? window?.resets_at ?? window?.resetAt ?? null),
1132
- unlimited: false,
1133
- };
1134
- }
1135
-
1136
- function appendCodexQuotaWindows(quotas, prefix, snapshot) {
1137
- const rateLimit = getCodexRateLimitBody(snapshot);
1138
- if (!rateLimit) return false;
1139
-
1140
- const primary = rateLimit.primary_window || rateLimit.primary || snapshot.primary_window || snapshot.primary;
1141
- const secondary = rateLimit.secondary_window || rateLimit.secondary || snapshot.secondary_window || snapshot.secondary;
1142
- let added = false;
1143
-
1144
- if (primary) {
1145
- quotas[prefix ? `${prefix}_session` : "session"] = formatCodexWindow(primary);
1146
- added = true;
1147
- }
1148
- if (secondary) {
1149
- quotas[prefix ? `${prefix}_weekly` : "weekly"] = formatCodexWindow(secondary);
1150
- added = true;
1151
- }
1152
-
1153
- return added;
1154
- }
1155
-
1156
- function getCodexReviewRateLimit(data) {
1157
- if (data.code_review_rate_limit || data.review_rate_limit) {
1158
- return data.code_review_rate_limit || data.review_rate_limit;
1159
- }
1160
-
1161
- const byLimitId = data.rate_limits_by_limit_id;
1162
- if (byLimitId && typeof byLimitId === "object" && !Array.isArray(byLimitId)) {
1163
- return byLimitId.code_review || byLimitId.codex_review || byLimitId.review || null;
1164
- }
1165
-
1166
- const additional = Array.isArray(data.additional_rate_limits) ? data.additional_rate_limits : [];
1167
- return additional.find((entry) => {
1168
- const id = String(entry?.limit_name || entry?.metered_feature || entry?.id || "").toLowerCase();
1169
- return id === "code_review" || id === "codex_review" || id === "review" || id.includes("review");
1170
- }) || null;
1171
- }
1172
-
1173
- async function getCodexUsage(accessToken, proxyOptions = null) {
1174
- try {
1175
- const response = await proxyAwareFetch(CODEX_CONFIG.usageUrl, {
1176
- method: "GET",
1177
- headers: {
1178
- "Authorization": `Bearer ${accessToken}`,
1179
- "Accept": "application/json",
1180
- },
1181
- }, proxyOptions);
1182
-
1183
- if (!response.ok) {
1184
- return { message: `Codex connected. Usage API temporarily unavailable (${response.status}).` };
1185
- }
1186
-
1187
- const data = await response.json();
1188
- const normalRateLimit = data.rate_limit || data.rate_limits || data.rate_limits_by_limit_id?.codex || {};
1189
- const reviewRateLimit = getCodexReviewRateLimit(data);
1190
- const quotas = {};
1191
-
1192
- appendCodexQuotaWindows(quotas, "", normalRateLimit);
1193
- appendCodexQuotaWindows(quotas, "review", reviewRateLimit);
1194
-
1195
- return {
1196
- plan: data.plan_type || data.summary?.plan || "unknown",
1197
- limitReached: getCodexRateLimitBody(normalRateLimit)?.limit_reached || false,
1198
- reviewLimitReached: getCodexRateLimitBody(reviewRateLimit)?.limit_reached || false,
1199
- quotas,
1200
- };
1201
- } catch (error) {
1202
- throw new Error(`Failed to fetch Codex usage: ${error.message}`);
1203
- }
1204
- }
1205
-
1206
- /**
1207
- * Kiro (AWS CodeWhisperer) Usage
1208
- */
1209
- function parseKiroQuotaData(data) {
1210
- const usageList = data.usageBreakdownList || [];
1211
- const quotaInfo = {};
1212
- const resetAt = parseResetTime(data.nextDateReset || data.resetDate);
1213
-
1214
- usageList.forEach((breakdown) => {
1215
- const resourceType = breakdown.resourceType?.toLowerCase() || "unknown";
1216
- const used = breakdown.currentUsageWithPrecision || 0;
1217
- const total = breakdown.usageLimitWithPrecision || 0;
1218
-
1219
- quotaInfo[resourceType] = {
1220
- used,
1221
- total,
1222
- remaining: total - used,
1223
- resetAt,
1224
- unlimited: false,
1225
- };
1226
-
1227
- // Add free trial if available
1228
- if (breakdown.freeTrialInfo) {
1229
- const freeUsed = breakdown.freeTrialInfo.currentUsageWithPrecision || 0;
1230
- const freeTotal = breakdown.freeTrialInfo.usageLimitWithPrecision || 0;
1231
-
1232
- quotaInfo[`${resourceType}_freetrial`] = {
1233
- used: freeUsed,
1234
- total: freeTotal,
1235
- remaining: freeTotal - freeUsed,
1236
- resetAt: parseResetTime(breakdown.freeTrialInfo.freeTrialExpiry || resetAt),
1237
- unlimited: false,
1238
- };
1239
- }
1240
- });
1241
-
1242
- return {
1243
- plan: data.subscriptionInfo?.subscriptionTitle || "Kiro",
1244
- quotas: quotaInfo,
1245
- };
1246
- }
1247
-
1248
- async function getKiroUsage(accessToken, providerSpecificData, proxyOptions = null) {
1249
- // Default profileArn fallback
1250
- const DEFAULT_PROFILE_ARN = "arn:aws:codewhisperer:us-east-1:638616132270:profile/AAAACCCCXXXX";
1251
- const profileArn = providerSpecificData?.profileArn || DEFAULT_PROFILE_ARN;
1252
- const authMethod = providerSpecificData?.authMethod || "builder-id";
1253
-
1254
- const getUsageParams = new URLSearchParams({
1255
- isEmailRequired: "true",
1256
- origin: "AI_EDITOR",
1257
- resourceType: "AGENTIC_REQUEST",
1258
- });
1259
-
1260
- // For compatibility, try multiple known Kiro usage endpoints
1261
- const attempts = [
1262
- {
1263
- name: "codewhisperer-get",
1264
- run: async () => proxyAwareFetch(
1265
- `https://codewhisperer.us-east-1.amazonaws.com/getUsageLimits?${getUsageParams.toString()}`,
1266
- {
1267
- method: "GET",
1268
- headers: {
1269
- "Authorization": `Bearer ${accessToken}`,
1270
- "Accept": "application/json",
1271
- "x-amz-user-agent": "aws-sdk-js/1.0.0 KiroIDE-1.0.138",
1272
- "user-agent": "aws-sdk-js/1.0.0 KiroIDE-1.0.138",
1273
- },
1274
- },
1275
- proxyOptions
1276
- ),
1277
- },
1278
- {
1279
- name: "codewhisperer-post",
1280
- run: async () => proxyAwareFetch("https://codewhisperer.us-east-1.amazonaws.com", {
1281
- method: "POST",
1282
- headers: {
1283
- "Authorization": `Bearer ${accessToken}`,
1284
- "Content-Type": "application/x-amz-json-1.0",
1285
- "x-amz-target": "AmazonCodeWhispererService.GetUsageLimits",
1286
- "Accept": "application/json",
1287
- },
1288
- body: JSON.stringify({
1289
- origin: "AI_EDITOR",
1290
- profileArn,
1291
- resourceType: "AGENTIC_REQUEST",
1292
- }),
1293
- }, proxyOptions),
1294
- },
1295
- {
1296
- name: "q-get",
1297
- run: async () => {
1298
- const params = new URLSearchParams({
1299
- origin: "AI_EDITOR",
1300
- profileArn,
1301
- resourceType: "AGENTIC_REQUEST",
1302
- });
1303
- return proxyAwareFetch(`https://q.us-east-1.amazonaws.com/getUsageLimits?${params}`, {
1304
- method: "GET",
1305
- headers: {
1306
- "Authorization": `Bearer ${accessToken}`,
1307
- "Accept": "application/json",
1308
- },
1309
- }, proxyOptions);
1310
- },
1311
- },
1312
- ];
1313
-
1314
- let sawAuthError = false;
1315
- const errors = [];
1316
-
1317
- for (const attempt of attempts) {
1318
- try {
1319
- const response = await attempt.run();
1320
- if (!response.ok) {
1321
- const errorText = await response.text().catch(() => "");
1322
- if (response.status === 401 || response.status === 403) {
1323
- sawAuthError = true;
1324
- }
1325
- errors.push(`${attempt.name}:${response.status}${errorText ? `:${errorText}` : ""}`);
1326
- continue;
1327
- }
1328
-
1329
- const data = await response.json();
1330
- return parseKiroQuotaData(data);
1331
- } catch (error) {
1332
- errors.push(`${attempt.name}:${error.message}`);
1333
- }
1334
- }
1335
-
1336
- if (sawAuthError && authMethod === "idc") {
1337
- return {
1338
- 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.",
1339
- quotas: {},
1340
- };
1341
- }
1342
-
1343
- // Social auth (Google/GitHub) - these use a different token format that may not work with AWS CodeWhisperer quota APIs
1344
- if (sawAuthError && (authMethod === "google" || authMethod === "github")) {
1345
- return {
1346
- message: "Kiro quota API authentication expired. Chat may still work.",
1347
- quotas: {},
1348
- };
1349
- }
1350
-
1351
- if (sawAuthError) {
1352
- return {
1353
- message: "Kiro quota API rejected the current token. Chat may still work.",
1354
- quotas: {},
1355
- };
1356
- }
1357
-
1358
- const fallbackMessage =
1359
- errors.length > 0
1360
- ? `Unable to fetch Kiro usage right now. (${errors[errors.length - 1]})`
1361
- : "Unable to fetch Kiro usage right now.";
1362
-
1363
- return {
1364
- message: fallbackMessage,
1365
- quotas: {},
1366
- };
1367
- }
1368
-
1369
- /**
1370
- * Qwen Usage
1371
- */
1372
- async function getQwenUsage(accessToken, providerSpecificData) {
1373
- try {
1374
- const resourceUrl = providerSpecificData?.resourceUrl;
1375
- if (!resourceUrl) {
1376
- return { message: "Qwen connected. No resource URL available." };
1377
- }
1378
-
1379
- // Qwen may have usage endpoint at resource URL
1380
- return { message: "Qwen connected. Usage tracked per request." };
1381
- } catch (error) {
1382
- return { message: "Unable to fetch Qwen usage." };
1383
- }
1384
- }
1385
-
1386
- /**
1387
- * iFlow Usage
1388
- */
1389
- async function getIflowUsage(accessToken) {
1390
- try {
1391
- // iFlow may have usage endpoint
1392
- return { message: "iFlow connected. Usage tracked per request." };
1393
- } catch (error) {
1394
- return { message: "Unable to fetch iFlow usage." };
1395
- }
1396
- }
1397
-
1398
- /**
1399
- * Ollama Cloud Usage
1400
- * Ollama Cloud uses an API key from ollama.com/settings/keys
1401
- * and has no public usage API \u2014 free tier has light usage limits (resets every 5h & 7d).
1402
- * This returns an informational message with the plan details.
1403
- */
1404
- async function getOllamaUsage(accessToken, providerSpecificData) {
1405
- try {
1406
- // Ollama Cloud does not expose a public quota/usage API.
1407
- // The provider is configured as noAuth with a notice explaining limits.
1408
- // We return a graceful message so the UI shows a friendly state instead of an error.
1409
- const plan = providerSpecificData?.plan || "Free";
1410
- return {
1411
- plan,
1412
- message: "Ollama Cloud uses a free tier with light usage limits (resets every 5h & 7d). For detailed usage tracking, visit ollama.com/settings/keys.",
1413
- quotas: [],
1414
- };
1415
- } catch (error) {
1416
- return { message: "Unable to fetch Ollama Cloud usage." };
1417
- }
1418
- }
1419
-
1420
- /**
1421
- * GLM Coding Plan usage (international + China regions)
1422
- */
1423
- async function getGlmUsage(apiKey, provider, proxyOptions = null) {
1424
- if (!apiKey) {
1425
- return { message: "GLM API key not available." };
1426
- }
1427
-
1428
- const region = provider === "glm-cn" ? "china" : "international";
1429
- const quotaUrl = GLM_QUOTA_URLS[region];
1430
-
1431
- try {
1432
- const response = await proxyAwareFetch(quotaUrl, {
1433
- headers: {
1434
- Authorization: `Bearer ${apiKey}`,
1435
- Accept: "application/json",
1436
- },
1437
- }, proxyOptions);
1438
-
1439
- if (!response.ok) {
1440
- if (response.status === 401) {
1441
- return { message: "GLM API key invalid or expired." };
1442
- }
1443
- return { message: `GLM quota API error (${response.status}).` };
1444
- }
1445
-
1446
- const json = await response.json();
1447
- const data = json?.data && typeof json.data === "object" ? json.data : {};
1448
- const limits = Array.isArray(data.limits) ? data.limits : [];
1449
- const quotas = {};
1450
-
1451
- for (const limit of limits) {
1452
- if (!limit || limit.type !== "TOKENS_LIMIT") continue;
1453
- const usedPercent = Number(limit.percentage) || 0;
1454
- const resetMs = Number(limit.nextResetTime) || 0;
1455
- const remaining = Math.max(0, 100 - usedPercent);
1456
-
1457
- quotas["session"] = {
1458
- used: usedPercent,
1459
- total: 100,
1460
- remaining,
1461
- remainingPercentage: remaining,
1462
- resetAt: resetMs > 0 ? new Date(resetMs).toISOString() : null,
1463
- unlimited: false,
1464
- };
1465
- }
1466
-
1467
- const levelRaw = typeof data.level === "string" ? data.level : "";
1468
- const plan = levelRaw
1469
- ? levelRaw.charAt(0).toUpperCase() + levelRaw.slice(1).toLowerCase()
1470
- : "Unknown";
1471
-
1472
- return { plan, quotas };
1473
- } catch (error) {
1474
- return { message: `GLM error: ${error.message}` };
1475
- }
1476
- }
1477
-
1478
- // \u2500\u2500 MiniMax helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
1479
- function getMiniMaxField(model, snakeKey, camelKey) {
1480
- if (!model || typeof model !== "object") return null;
1481
- return model[snakeKey] ?? model[camelKey] ?? null;
1482
- }
1483
-
1484
- function getMiniMaxModelName(model) {
1485
- return String(getMiniMaxField(model, "model_name", "modelName") || "").trim();
1486
- }
1487
-
1488
- function formatMiniMaxQuotaName(model) {
1489
- const rawName = getMiniMaxModelName(model);
1490
- if (!rawName) return "MiniMax";
1491
-
1492
- // M3+ shared quota pool: MiniMax reports M-series as a single wildcard
1493
- // bucket ("MiniMax-M*"). Newer responses rename it to plain "general".
1494
- // Render both as a friendly series label rather than leaking the
1495
- // asterisk or the vague "general" word to the UI.
1496
- if (rawName === "MiniMax-M*" || rawName === "general") return "M-series";
1497
-
1498
- return rawName
1499
- .replace(/[_-]+/g, " ")
1500
- .replace(/\s+/g, " ")
1501
- .trim()
1502
- .replace(/\b\w/g, (ch) => ch.toUpperCase())
1503
- .replace(/\bTo\b/g, "to")
1504
- .replace(/\bTts\b/g, "TTS")
1505
- .replace(/\bHd\b/g, "HD");
1506
- }
1507
-
1508
- function getMiniMaxProvidedPercent(model, snakeKey, camelKey) {
1509
- if (!model || typeof model !== "object") return null;
1510
- const raw = model[snakeKey] ?? model[camelKey];
1511
- if (raw === null || raw === undefined) return null;
1512
- const num = Number(raw);
1513
- if (!Number.isFinite(num)) return null;
1514
- return Math.max(0, Math.min(100, num));
1515
- }
1516
-
1517
- function getMiniMaxSessionTotal(model) {
1518
- return Math.max(0, Number(getMiniMaxField(model, "current_interval_total_count", "currentIntervalTotalCount")) || 0);
1519
- }
1520
-
1521
- function getMiniMaxWeeklyTotal(model) {
1522
- return Math.max(0, Number(getMiniMaxField(model, "current_weekly_total_count", "currentWeeklyTotalCount")) || 0);
1523
- }
1524
-
1525
- function hasMiniMaxQuota(model) {
1526
- // Old format has real count totals; M3-era M-series buckets ship percent-only
1527
- // (count fields are 0) so accept those too.
1528
- if (getMiniMaxSessionTotal(model) > 0 || getMiniMaxWeeklyTotal(model) > 0) return true;
1529
- if (getMiniMaxProvidedPercent(model, "current_interval_remaining_percent", "currentIntervalRemainingPercent") !== null) return true;
1530
- if (getMiniMaxProvidedPercent(model, "current_weekly_remaining_percent", "currentWeeklyRemainingPercent") !== null) return true;
1531
- return false;
1532
- }
1533
-
1534
- function getMiniMaxResetAt(model, capturedAtMs, remainsSnake, remainsCamel, endSnake, endCamel) {
1535
- const remainsMs = Number(getMiniMaxField(model, remainsSnake, remainsCamel)) || 0;
1536
- if (remainsMs > 0) return new Date(capturedAtMs + remainsMs).toISOString();
1537
- return parseResetTime(getMiniMaxField(model, endSnake, endCamel));
1538
- }
1539
-
1540
- function buildMiniMaxQuota(total, count, resetAt, countMeansRemaining, providedPercent = null) {
1541
- const safeTotal = Math.max(0, total);
1542
- const used = countMeansRemaining ? Math.max(safeTotal - count, 0) : Math.min(Math.max(0, count), safeTotal);
1543
- const remaining = Math.max(safeTotal - used, 0);
1544
- // M-series buckets ship percent-only (count = 0). Prefer the upstream value
1545
- // when present, otherwise fall back to the computed percentage. When the
1546
- // quota is unbounded (no count) and no upstream percent is available, surface
1547
- // the percent anyway as long as it is defined.
1548
- const remainingPercentage = providedPercentage(providedPercent, remaining, safeTotal);
1549
- return {
1550
- used,
1551
- total: safeTotal,
1552
- remaining,
1553
- remainingPercentage,
1554
- resetAt,
1555
- unlimited: false,
1556
- };
1557
- }
1558
-
1559
- function providedPercentage(provided, remaining, total) {
1560
- if (provided !== null && provided !== undefined && Number.isFinite(provided)) {
1561
- return Math.max(0, Math.min(100, provided));
1562
- }
1563
- return total > 0 ? Math.max(0, Math.min(100, (remaining / total) * 100)) : 0;
1564
- }
1565
-
1566
- function addMiniMaxQuota(quotas, key, model, getTotal, countSnake, countCamel, percentSnake, percentCamel, resetArgs, countMeansRemaining) {
1567
- const total = getTotal(model);
1568
- const providedPercent = getMiniMaxProvidedPercent(model, percentSnake, percentCamel);
1569
- if (total <= 0 && providedPercent === null) return;
1570
-
1571
- const count = Math.max(0, Number(getMiniMaxField(model, countSnake, countCamel)) || 0);
1572
- let effectiveTotal = total;
1573
- let effectiveCount = count;
1574
- if (total <= 0) {
1575
- // M-series bucket: API only ships *_remaining_percent (count = 0). Normalize
1576
- // to total=100. The downstream buildMiniMaxQuota treats the count as
1577
- // "used" or "remaining" depending on countMeansRemaining, so the synthetic
1578
- // count has to match that semantic \u2014 otherwise the UI flips the percentage.
1579
- effectiveTotal = 100;
1580
- const pct = providedPercent;
1581
- effectiveCount = countMeansRemaining
1582
- ? Math.round(effectiveTotal * (pct / 100))
1583
- : Math.round(effectiveTotal * (1 - pct / 100));
1584
- }
1585
- quotas[key] = buildMiniMaxQuota(
1586
- effectiveTotal,
1587
- effectiveCount,
1588
- getMiniMaxResetAt(model, ...resetArgs),
1589
- countMeansRemaining,
1590
- providedPercent
1591
- );
1592
- }
1593
-
1594
- /**
1595
- * MiniMax Token Plan / Coding Plan usage
1596
- */
1597
- async function getMiniMaxUsage(apiKey, provider, proxyOptions = null) {
1598
- if (!apiKey) {
1599
- return { message: "MiniMax API key not available." };
1600
- }
1601
-
1602
- const usageUrls = MINIMAX_USAGE_URLS[provider] || [];
1603
- let lastErrorMessage = "";
1604
-
1605
- for (let index = 0; index < usageUrls.length; index += 1) {
1606
- const usageUrl = usageUrls[index];
1607
- const canFallback = index < usageUrls.length - 1;
1608
-
1609
- try {
1610
- const response = await proxyAwareFetch(usageUrl, {
1611
- method: "GET",
1612
- headers: {
1613
- Authorization: `Bearer ${apiKey}`,
1614
- Accept: "application/json",
1615
- "Content-Type": "application/json",
1616
- },
1617
- }, proxyOptions);
1618
-
1619
- const rawText = await response.text();
1620
- let payload = {};
1621
- if (rawText) {
1622
- try { payload = JSON.parse(rawText); } catch { payload = {}; }
1623
- }
1624
-
1625
- const baseResp = (payload?.base_resp ?? payload?.baseResp) || {};
1626
- const apiStatusCode = Number(baseResp.status_code ?? baseResp.statusCode) || 0;
1627
- const apiStatusMessage = String(baseResp.status_msg ?? baseResp.statusMsg ?? "").trim();
1628
- const combined = `${apiStatusMessage} ${rawText}`.trim();
1629
- const authLike = /token plan|coding plan|invalid api key|invalid key|unauthorized|inactive/i;
1630
-
1631
- if (response.status === 401 || response.status === 403 || apiStatusCode === 1004 || authLike.test(combined)) {
1632
- return { message: "MiniMax API key invalid or inactive. Use an active Token/Coding Plan key." };
1633
- }
1634
-
1635
- if (!response.ok) {
1636
- lastErrorMessage = `MiniMax usage endpoint error (${response.status})`;
1637
- if ((response.status === 404 || response.status === 405 || response.status >= 500) && canFallback) continue;
1638
- return { message: `MiniMax connected. ${lastErrorMessage}` };
1639
- }
1640
-
1641
- if (apiStatusCode !== 0) {
1642
- return { message: `MiniMax connected. ${apiStatusMessage || "Upstream quota API error"}` };
1643
- }
1644
-
1645
- const modelRemains = payload?.model_remains ?? payload?.modelRemains;
1646
- const allModels = Array.isArray(modelRemains) ? modelRemains : [];
1647
- const quotaModels = allModels.filter(hasMiniMaxQuota);
1648
-
1649
- if (quotaModels.length === 0) {
1650
- return { message: "MiniMax connected. No quota data was returned." };
1651
- }
1652
-
1653
- const capturedAtMs = Date.now();
1654
- const countMeansRemaining = usageUrl.includes("/coding_plan/remains");
1655
- const quotas = {};
1656
-
1657
- for (const model of quotaModels) {
1658
- const displayName = formatMiniMaxQuotaName(model);
1659
- addMiniMaxQuota(
1660
- quotas,
1661
- `${displayName} (5h)`,
1662
- model,
1663
- getMiniMaxSessionTotal,
1664
- "current_interval_usage_count",
1665
- "currentIntervalUsageCount",
1666
- "current_interval_remaining_percent",
1667
- "currentIntervalRemainingPercent",
1668
- [capturedAtMs, "remains_time", "remainsTime", "end_time", "endTime"],
1669
- countMeansRemaining
1670
- );
1671
-
1672
- addMiniMaxQuota(
1673
- quotas,
1674
- `${displayName} (7d)`,
1675
- model,
1676
- getMiniMaxWeeklyTotal,
1677
- "current_weekly_usage_count",
1678
- "currentWeeklyUsageCount",
1679
- "current_weekly_remaining_percent",
1680
- "currentWeeklyRemainingPercent",
1681
- [capturedAtMs, "weekly_remains_time", "weeklyRemainsTime", "weekly_end_time", "weeklyEndTime"],
1682
- countMeansRemaining
1683
- );
1684
- }
1685
-
1686
- if (Object.keys(quotas).length === 0) {
1687
- return { message: "MiniMax connected. Unable to extract quota usage." };
1688
- }
1689
-
1690
- return { quotas };
1691
- } catch (error) {
1692
- lastErrorMessage = error.message;
1693
- if (!canFallback) break;
1694
- }
1695
- }
1696
-
1697
- return { message: lastErrorMessage ? `MiniMax connected. Unable to fetch usage: ${lastErrorMessage}` : "MiniMax connected. Unable to fetch usage." };
1698
- }
1699
-
1700
- async function getQoderUsage(accessToken, proxyOptions = null) {
1701
- if (!accessToken) {
1702
- return { message: "Qoder usage unavailable: no access token" };
1703
- }
1704
- try {
1705
- const response = await proxyAwareFetch(
1706
- "https://openapi.qoder.sh/api/v2/quota/usage",
1707
- {
1708
- method: "GET",
1709
- headers: {
1710
- Authorization: `Bearer ${accessToken}`,
1711
- Accept: "application/json",
1712
- },
1713
- },
1714
- proxyOptions,
1715
- );
1716
- if (!response.ok) {
1717
- return { message: `Qoder connected. Usage fetch returned ${response.status}.` };
1718
- }
1719
- const body = await response.json().catch(() => null);
1720
- if (!body) {
1721
- return { message: "Qoder connected. Usage response was not JSON." };
1722
- }
1723
- // Quota records live under `quotas`; scalar metadata
1724
- // (totalUsagePercentage, isQuotaExceeded, expiresAt) are surfaced as
1725
- // siblings so the dashboard parser doesn't try to render them as rows.
1726
- const userQuota = body.userQuota || {};
1727
- const orgQuota = body.orgResourcePackage || {};
1728
- // Qoder publishes a single absolute reset timestamp (`expiresAt` in ms);
1729
- // surface it on every quota record as ISO so the table can render
1730
- // "resets at" alongside used/total.
1731
- const expiresAtMs = Number.isFinite(Number(body.expiresAt)) && Number(body.expiresAt) > 0
1732
- ? Number(body.expiresAt)
1733
- : null;
1734
- const resetAt = expiresAtMs ? new Date(expiresAtMs).toISOString() : null;
1735
- const quotas = {
1736
- user: {
1737
- total: Number(userQuota.total) || 0,
1738
- used: Number(userQuota.used) || 0,
1739
- remaining: Number(userQuota.remaining) || 0,
1740
- unit: userQuota.unit || "credits",
1741
- resetAt,
1742
- },
1743
- organization: {
1744
- total: Number(orgQuota.total) || 0,
1745
- used: Number(orgQuota.used) || 0,
1746
- remaining: Number(orgQuota.remaining) || 0,
1747
- unit: orgQuota.unit || "credits",
1748
- resetAt,
1749
- },
1750
- };
1751
- return {
1752
- quotas,
1753
- totalUsagePercentage: Number(body.totalUsagePercentage) || 0,
1754
- isQuotaExceeded: !!body.isQuotaExceeded,
1755
- expiresAt: expiresAtMs,
1756
- };
1757
- } catch (error) {
1758
- return { message: `Qoder connected. Unable to fetch usage: ${error.message}` };
1759
- }
1760
- }
1761
-
1762
- async function getAutoclawUsage(accessToken, proxyOptions = null, connection = null) {
1763
- if (!accessToken) {
1764
- return { message: "AutoClaw usage unavailable: no access token" };
1765
- }
1766
- try {
1767
- const { AUTOCLAW_WALLET_ENDPOINT, buildAutoClawWalletHeaders } = await import("../../src/lib/autoclaw/constants.js");
1768
- const response = await proxyAwareFetch(
1769
- AUTOCLAW_WALLET_ENDPOINT,
1770
- { method: "GET", headers: buildAutoClawWalletHeaders(accessToken) },
1771
- proxyOptions,
1772
- );
1773
- if (!response.ok) {
1774
- return { message: `AutoClaw connected. Usage fetch returned ${response.status}.` };
1775
- }
1776
- const body = await response.json().catch(() => null);
1777
- if (!body || body.code !== 0) {
1778
- return { message: "AutoClaw connected. Unable to read balance." };
1779
- }
1780
- const total = Number(body.data?.total_balance);
1781
- const remaining = Number.isFinite(total) ? total : 0;
1782
-
1783
- // AutoClaw's wallet only returns the CURRENT balance, not how much was spent.
1784
- // To show real consumption, track the highest balance ever seen (baseline)
1785
- // in the cached snapshot: used = baseline - remaining. Baseline grows if the
1786
- // account is topped up.
1787
- let baseline = remaining;
1788
- try {
1789
- if (connection?.id) {
1790
- const { getQuotaSnapshot } = await import("@/lib/localDb.js");
1791
- const prev = await getQuotaSnapshot(connection.id);
1792
- const prevBaseline = Number(prev?.usage?.quotas?.points?.total) || 0;
1793
- const prevRemaining = Number(prev?.usage?.quotas?.points?.remaining);
1794
- // Baseline = max(prev baseline, current remaining). If balance jumped
1795
- // above the old baseline (top-up), adopt the new higher value.
1796
- baseline = Math.max(prevBaseline, remaining, Number.isFinite(prevRemaining) ? prevRemaining : 0);
1797
- }
1798
- } catch { /* first run / no snapshot */ }
1799
-
1800
- const used = Math.max(0, baseline - remaining);
1801
- const pct = baseline > 0 ? Math.round((remaining / baseline) * 100) : 0;
1802
- return {
1803
- quotas: {
1804
- points: {
1805
- total: baseline,
1806
- used,
1807
- remaining,
1808
- unit: "points",
1809
- resetAt: null,
1810
- },
1811
- },
1812
- totalUsagePercentage: baseline > 0 ? Math.round((used / baseline) * 100) : 0,
1813
- isQuotaExceeded: remaining <= 0,
1814
- };
1815
- } catch (error) {
1816
- return { message: `AutoClaw connected. Unable to fetch balance: ${error.message}` };
1817
- }
1818
- }
1819
-
1820
- // ─── Cloudflare Workers AI ──────────────────────────────────────────────────
1821
-
1822
- /**
1823
- * Cloudflare does not expose remaining free-tier "neurons" via a public API.
1824
- * Verify the token + account and surface a clear "Workers AI free tier" row so
1825
- * the quota page is not blank for cloudflare-ai connections.
1826
- */
1827
- export async function getCloudflareAiUsage(apiKey, providerSpecificData = null, proxyOptions = null) {
1828
- const token = String(apiKey || "").trim();
1829
- const accountId = String(providerSpecificData?.accountId || "").trim();
1830
- if (!token) {
1831
- return { message: "Cloudflare API token not available." };
1832
- }
1833
- if (!accountId) {
1834
- return { message: "Cloudflare account ID missing. Re-import or edit the connection." };
1835
- }
1836
-
1837
- try {
1838
- const verifyRes = await proxyAwareFetch(
1839
- "https://api.cloudflare.com/client/v4/user/tokens/verify",
1840
- {
1841
- method: "GET",
1842
- headers: {
1843
- Authorization: `Bearer ${token}`,
1844
- Accept: "application/json",
1845
- },
1846
- },
1847
- proxyOptions,
1848
- );
1849
-
1850
- if (verifyRes.status === 401 || verifyRes.status === 403) {
1851
- return { message: "Cloudflare API token invalid or expired. Re-import the account." };
1852
- }
1853
-
1854
- if (!verifyRes.ok) {
1855
- const errText = await verifyRes.text().catch(() => "");
1856
- return {
1857
- message: `Cloudflare token verify failed (${verifyRes.status})${errText ? `: ${errText.slice(0, 160)}` : ""}`,
1858
- };
1859
- }
1860
-
1861
- const verifyBody = await verifyRes.json().catch(() => null);
1862
- const status = verifyBody?.result?.status || (verifyBody?.success ? "active" : "unknown");
1863
-
1864
- // Bulk-harvested tokens are often scoped to Workers AI only — they may 403
1865
- // on GET /accounts/{id}. Do not treat that as dead; verify is enough.
1866
- let accountName = providerSpecificData?.accountName || "";
1867
- try {
1868
- const acctRes = await proxyAwareFetch(
1869
- `https://api.cloudflare.com/client/v4/accounts/${encodeURIComponent(accountId)}`,
1870
- {
1871
- method: "GET",
1872
- headers: {
1873
- Authorization: `Bearer ${token}`,
1874
- Accept: "application/json",
1875
- },
1876
- },
1877
- proxyOptions,
1878
- );
1879
- if (acctRes?.ok) {
1880
- const acctBody = await acctRes.json().catch(() => null);
1881
- accountName = acctBody?.result?.name || accountName;
1882
- }
1883
- } catch {
1884
- /* optional */
1885
- }
1886
-
1887
- const shortId = accountId.length > 10 ? `${accountId.slice(0, 8)}…` : accountId;
1888
- return {
1889
- plan: accountName
1890
- ? `Workers AI · ${accountName}`
1891
- : `Workers AI · ${shortId}`,
1892
- quotas: {
1893
- "Workers AI": {
1894
- used: 0,
1895
- total: 0,
1896
- remainingPercentage: 100,
1897
- resetAt: null,
1898
- unlimited: true,
1899
- },
1900
- },
1901
- message:
1902
- status && status !== "active"
1903
- ? `Token status: ${status}. Cloudflare does not publish remaining free-tier neurons via API.`
1904
- : "Token valid. CF does not expose remaining free-tier neurons via API — model rate limits still apply.",
1905
- };
1906
- } catch (error) {
1907
- return { message: `Cloudflare usage error: ${error.message}` };
1908
- }
1909
- }
1910
-
1911
- // ─── Grok CLI / Grok Build usage (cli-chat-proxy.grok.com) ─────────────────
1912
-
1913
- function unwrapGrokCliVal(value, fallback = 0) {
1914
- if (value == null) return fallback;
1915
- if (typeof value === "object" && !Array.isArray(value) && "val" in value) {
1916
- return toFiniteNumber(value.val, fallback);
1917
- }
1918
- return toFiniteNumber(value, fallback);
1919
- }
1920
-
1921
- function buildGrokCliUsageHeaders(accessToken, providerSpecificData = {}) {
1922
- const psd = providerSpecificData || {};
1923
- const headers = {
1924
- Authorization: `Bearer ${accessToken}`,
1925
- Accept: "application/json",
1926
- "User-Agent": "grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)",
1927
- "x-xai-token-auth": "xai-grok-cli",
1928
- "x-grok-client-identifier": "grok-pager",
1929
- "x-grok-client-version": "0.2.93",
1930
- };
1931
- const email = psd.email;
1932
- const userId = psd.userId || psd.principalId;
1933
- if (email) headers["x-email"] = email;
1934
- if (userId) headers["x-userid"] = userId;
1935
- return headers;
1936
- }
1937
-
1938
- function resolveGrokCliPlan(user, config) {
1939
- const tier = typeof user?.subscriptionTier === "string" ? user.subscriptionTier.trim() : "";
1940
- if (tier) {
1941
- return tier
1942
- .replace(/[_-]+/g, " ")
1943
- .replace(/\b\w/g, (c) => c.toUpperCase());
1944
- }
1945
- if (user?.hasGrokCodeAccess === true) return "Grok Code";
1946
- if (config?.isUnifiedBillingUser === true) return "Grok Build";
1947
- return "Grok Build";
1948
- }
1949
-
1950
- function makeGrokCliQuota({ used, total, resetAt, unlimited = false }) {
1951
- const safeTotal = Math.max(0, toFiniteNumber(total, 0));
1952
- const safeUsed = Math.max(0, toFiniteNumber(used, 0));
1953
- if (unlimited || safeTotal === 0) {
1954
- return {
1955
- used: safeUsed,
1956
- total: 0,
1957
- remainingPercentage: unlimited ? 100 : 0,
1958
- resetAt: resetAt || null,
1959
- unlimited: true,
1960
- };
1961
- }
1962
- const remaining = Math.max(0, safeTotal - safeUsed);
1963
- const remainingPercentage = (remaining / safeTotal) * 100;
1964
- return {
1965
- used: safeUsed,
1966
- total: safeTotal,
1967
- remainingPercentage,
1968
- resetAt: resetAt || null,
1969
- unlimited: false,
1970
- };
1971
- }
1972
-
1973
- export function parseGrokCliBilling(billing, user = null) {
1974
- const root = billing && typeof billing === "object" ? billing : {};
1975
- const config =
1976
- root.config && typeof root.config === "object" && !Array.isArray(root.config)
1977
- ? root.config
1978
- : root;
1979
-
1980
- const periodEnd =
1981
- parseResetTime(config.billingPeriodEnd) ||
1982
- parseResetTime(config.currentPeriod?.end) ||
1983
- parseResetTime(root.billingPeriodEnd) ||
1984
- null;
1985
-
1986
- const quotas = {};
1987
-
1988
- // On-demand spending budget (USD-style). Cap 0 means "not enabled", NOT exhausted.
1989
- // Old code faked used=1/total=1 → remainingPercentage 0 while chat still worked.
1990
- const onDemandCap = unwrapGrokCliVal(config.onDemandCap ?? root.onDemandCap, NaN);
1991
- const onDemandUsed = unwrapGrokCliVal(config.onDemandUsed ?? root.onDemandUsed, NaN);
1992
- if (Number.isFinite(onDemandCap) && onDemandCap > 0) {
1993
- const used = Number.isFinite(onDemandUsed) ? Math.max(0, onDemandUsed) : 0;
1994
- quotas["On-demand"] = makeGrokCliQuota({
1995
- used,
1996
- total: onDemandCap,
1997
- resetAt: periodEnd,
1998
- });
1999
- }
2000
-
2001
- // Non-credits billing payload also exposes monthlyLimit/used
2002
- const monthlyLimit = unwrapGrokCliVal(config.monthlyLimit ?? root.monthlyLimit, NaN);
2003
- const monthlyUsed = unwrapGrokCliVal(config.used ?? root.used, NaN);
2004
- if (Number.isFinite(monthlyLimit) && monthlyLimit > 0) {
2005
- quotas["Monthly"] = makeGrokCliQuota({
2006
- used: Number.isFinite(monthlyUsed) ? Math.max(0, monthlyUsed) : 0,
2007
- total: monthlyLimit,
2008
- resetAt: periodEnd,
2009
- });
2010
- }
2011
-
2012
- const prepaid = unwrapGrokCliVal(config.prepaidBalance ?? root.prepaidBalance, NaN);
2013
- if (Number.isFinite(prepaid) && prepaid > 0) {
2014
- quotas["Prepaid"] = {
2015
- used: 0,
2016
- total: prepaid,
2017
- remainingPercentage: 100,
2018
- resetAt: null,
2019
- unlimited: false,
2020
- };
2021
- }
2022
-
2023
- // Subscription / Grok Code included access: API often returns all dollar caps as 0
2024
- // while hasGrokCodeAccess / isUnifiedBillingUser is true and chat still works.
2025
- const hasIncludedAccess =
2026
- user?.hasGrokCodeAccess === true || config?.isUnifiedBillingUser === true;
2027
-
2028
- // Always surface Grok Code / included access when the account still has it —
2029
- // even if On-demand/Prepaid rows also exist. Previously we only added this
2030
- // when quotas was empty, so free Grok Code looked like "no quota data".
2031
- if (hasIncludedAccess) {
2032
- quotas["Grok Code"] = {
2033
- used: 0,
2034
- total: 0,
2035
- remainingPercentage: 100,
2036
- resetAt: periodEnd,
2037
- unlimited: true,
2038
- };
2039
- }
2040
-
2041
- // Soft fallback when billing returns nothing usable (no caps, no access flags).
2042
- if (Object.keys(quotas).length === 0) {
2043
- quotas["Included"] = {
2044
- used: 0,
2045
- total: 0,
2046
- remainingPercentage: 100,
2047
- resetAt: periodEnd,
2048
- unlimited: true,
2049
- };
2050
- }
2051
-
2052
- return {
2053
- plan: resolveGrokCliPlan(user, config),
2054
- quotas,
2055
- periodEnd,
2056
- };
2057
- }
2058
-
2059
- /**
2060
- * Grok CLI / Grok Build usage from cli-chat-proxy billing + user endpoints.
2061
- */
2062
- export async function getGrokCliUsage(accessToken, providerSpecificData = null, proxyOptions = null) {
2063
- if (!accessToken) {
2064
- return { message: "Grok CLI access token not available." };
2065
- }
2066
-
2067
- const headers = buildGrokCliUsageHeaders(accessToken, providerSpecificData);
2068
- const BILLING_URL = "https://cli-chat-proxy.grok.com/v1/billing?format=credits";
2069
- const USER_URL = "https://cli-chat-proxy.grok.com/v1/user?include=subscription";
2070
-
2071
- try {
2072
- const [billingRes, userRes] = await Promise.all([
2073
- proxyAwareFetch(BILLING_URL, { method: "GET", headers }, proxyOptions),
2074
- proxyAwareFetch(USER_URL, { method: "GET", headers }, proxyOptions).catch(() => null),
2075
- ]);
2076
-
2077
- if (billingRes.status === 401 || billingRes.status === 403) {
2078
- return { message: "Grok CLI authentication expired. Please re-authorize." };
2079
- }
2080
-
2081
- if (!billingRes.ok) {
2082
- const errText = await billingRes.text().catch(() => "");
2083
- const trimmed = errText ? `: ${errText.slice(0, 200)}` : "";
2084
- return { message: `Grok CLI billing API error (${billingRes.status})${trimmed}` };
2085
- }
2086
-
2087
- const billing = await billingRes.json().catch(() => null);
2088
- if (!billing || typeof billing !== "object") {
2089
- return { message: "Grok CLI billing response was not JSON." };
2090
- }
2091
-
2092
- let user = null;
2093
- if (userRes?.ok) {
2094
- user = await userRes.json().catch(() => null);
2095
- }
2096
-
2097
- const parsed = parseGrokCliBilling(billing, user);
2098
-
2099
- if (!parsed.quotas || Object.keys(parsed.quotas).length === 0) {
2100
- return {
2101
- plan: parsed.plan,
2102
- message:
2103
- "Grok Build connected, but no credit allotment was returned. Free promo may be exhausted — upgrade at https://grok.com/supergrok or add credits at https://grok.com/?_s=usage.",
2104
- quotas: {},
2105
- };
2106
- }
2107
-
2108
- return {
2109
- plan: parsed.plan,
2110
- quotas: parsed.quotas,
2111
- };
2112
- } catch (error) {
2113
- return { message: `Grok CLI usage error: ${error.message}` };
2114
- }
2115
- }
2116
-
2117
- // ─── Shared: dig credit-like fields from arbitrary JSON ─────────────────────
2118
-
2119
- function digCreditFields(obj, depth = 0, path = "") {
2120
- if (!obj || typeof obj !== "object" || depth > 4) return null;
2121
- const candidates = [];
2122
- const keys = Object.entries(obj);
2123
- for (const [k, v] of keys) {
2124
- const lk = k.toLowerCase();
2125
- if (v && typeof v === "object" && !Array.isArray(v)) {
2126
- const nested = digCreditFields(v, depth + 1, path ? `${path}.${k}` : k);
2127
- if (nested) candidates.push(nested);
2128
- continue;
2129
- }
2130
- if (typeof v !== "number" && typeof v !== "string") continue;
2131
- const n = toFiniteNumber(v, NaN);
2132
- if (!Number.isFinite(n)) continue;
2133
- if (/(remaining|balance|credit|quota|limit|allowance|cap|used|spent|consumed)/i.test(lk)) {
2134
- candidates.push({ key: path ? `${path}.${k}` : k, name: k, value: n, kind: lk });
2135
- }
2136
- }
2137
- if (!candidates.length) return null;
2138
- // Prefer explicit remaining/balance pairs
2139
- return candidates;
2140
- }
2141
-
2142
- function buildQuotaFromCreditFields(fields) {
2143
- if (!fields?.length) return null;
2144
- const by = (re) => fields.find((f) => re.test(f.kind) || re.test(f.name));
2145
- const remaining = by(/remaining|balance|credit(?!s_used)/i);
2146
- const total = by(/limit|cap|allowance|total|quota(?!_used)/i);
2147
- const used = by(/used|spent|consumed/i);
2148
- if (total && Number(total.value) > 0) {
2149
- const u = used
2150
- ? Math.max(0, Number(used.value))
2151
- : remaining
2152
- ? Math.max(0, Number(total.value) - Number(remaining.value))
2153
- : 0;
2154
- const rem = Math.max(0, Number(total.value) - u);
2155
- return {
2156
- used: u,
2157
- total: Number(total.value),
2158
- remainingPercentage: (rem / Number(total.value)) * 100,
2159
- resetAt: null,
2160
- unlimited: false,
2161
- };
2162
- }
2163
- if (remaining && Number(remaining.value) >= 0) {
2164
- const bal = Number(remaining.value);
2165
- return {
2166
- used: 0,
2167
- total: bal > 0 ? bal : 1,
2168
- remainingPercentage: bal > 0 ? 100 : 0,
2169
- resetAt: null,
2170
- unlimited: false,
2171
- };
2172
- }
2173
- return null;
2174
- }
2175
-
2176
- // ─── Cline / ClinePass ──────────────────────────────────────────────────────
2177
-
2178
- export async function getClineUsage(accessToken, provider = "cline", proxyOptions = null) {
2179
- if (!accessToken) return { message: "Cline access token not available." };
2180
- try {
2181
- // Dynamic import avoids circular deps with package.json in browser bundles
2182
- const { buildClineHeaders } = await import("../../src/shared/utils/clineAuth.js");
2183
- const headers = buildClineHeaders(accessToken, { Accept: "application/json" });
2184
- const res = await proxyAwareFetch("https://api.cline.bot/api/v1/users/me", {
2185
- method: "GET",
2186
- headers,
2187
- }, proxyOptions);
2188
-
2189
- if (res.status === 401 || res.status === 403) {
2190
- return { message: "Cline authentication expired. Please re-authorize." };
2191
- }
2192
- if (!res.ok) {
2193
- return { message: `Cline user API error (${res.status})` };
2194
- }
2195
-
2196
- const data = await res.json().catch(() => null);
2197
- if (!data || typeof data !== "object") {
2198
- return { message: "Cline user response was not JSON." };
2199
- }
2200
-
2201
- // Cline wraps payload in { data: {...} } sometimes
2202
- const user = data.data && typeof data.data === "object" ? data.data : data;
2203
- const email = user.email || user.user?.email || null;
2204
- const plan =
2205
- user.plan ||
2206
- user.subscription?.plan ||
2207
- user.subscription?.name ||
2208
- user.organization?.plan ||
2209
- user.organizations?.[0]?.plan ||
2210
- (provider === "clinepass" ? "ClinePass" : "Cline") ;
2211
-
2212
- const fields = digCreditFields(user) || [];
2213
- const quota = buildQuotaFromCreditFields(fields);
2214
- const quotas = {};
2215
- if (quota) quotas.Credits = quota;
2216
-
2217
- // Organization seats / orgs count as informational quota rows when no credits
2218
- const orgs = user.organizations || user.organization;
2219
- if (!Object.keys(quotas).length && orgs) {
2220
- quotas.Account = {
2221
- used: 0,
2222
- total: 0,
2223
- remainingPercentage: 100,
2224
- resetAt: null,
2225
- unlimited: true,
2226
- };
2227
- }
2228
-
2229
- if (!Object.keys(quotas).length) {
2230
- return {
2231
- plan: typeof plan === "string" ? plan : "Cline",
2232
- email,
2233
- message: "Cline connected. No credit allotment was returned by the account API.",
2234
- quotas: {},
2235
- };
2236
- }
2237
-
2238
- return {
2239
- plan: typeof plan === "string" ? plan : "Cline",
2240
- email,
2241
- quotas,
2242
- };
2243
- } catch (error) {
2244
- return { message: `Cline usage error: ${error.message}` };
2245
- }
2246
- }
2247
-
2248
- // ─── Kimchi ─────────────────────────────────────────────────────────────────
2249
-
2250
- export async function getKimchiUsage(accessToken, providerSpecificData = null, proxyOptions = null) {
2251
- if (!accessToken) return { message: "Kimchi access token not available." };
2252
- try {
2253
- const url = "https://app.kimchi.dev/api/v1/me";
2254
- const res = await proxyAwareFetch(url, {
2255
- method: "GET",
2256
- headers: {
2257
- Accept: "application/json",
2258
- Authorization: `Bearer ${accessToken}`,
2259
- "User-Agent": "kimchi/0.1.50",
2260
- },
2261
- }, proxyOptions);
2262
-
2263
- if (res.status === 401 || res.status === 403) {
2264
- return { message: "Kimchi authentication expired. Please re-authorize." };
2265
- }
2266
- if (!res.ok) {
2267
- return { message: `Kimchi user API error (${res.status})` };
2268
- }
2269
-
2270
- const user = await res.json().catch(() => null);
2271
- if (!user || typeof user !== "object") {
2272
- return { message: "Kimchi user response was not JSON." };
2273
- }
2274
-
2275
- const email = user.email || providerSpecificData?.username || null;
2276
- const plan = user.plan || user.tier || user.subscription?.name || "Kimchi";
2277
- const fields = digCreditFields(user) || [];
2278
- const quota = buildQuotaFromCreditFields(fields);
2279
- const quotas = {};
2280
- if (quota) quotas.Credits = quota;
2281
- else {
2282
- quotas.Account = {
2283
- used: 0,
2284
- total: 0,
2285
- remainingPercentage: 100,
2286
- resetAt: null,
2287
- unlimited: true,
2288
- };
2289
- }
2290
-
2291
- return {
2292
- plan: typeof plan === "string" ? plan : "Kimchi",
2293
- email,
2294
- quotas,
2295
- };
2296
- } catch (error) {
2297
- return { message: `Kimchi usage error: ${error.message}` };
2298
- }
2299
- }
2300
-
2301
- // ─── xAI (API key or OAuth → api.x.ai) ──────────────────────────────────────
2302
-
2303
- export async function getXaiUsage(token, providerSpecificData = null, proxyOptions = null) {
2304
- if (!token) return { message: "xAI token not available." };
2305
- try {
2306
- const headers = {
2307
- Authorization: `Bearer ${token}`,
2308
- Accept: "application/json",
2309
- };
2310
-
2311
- // Prefer management-style key probe when available; fall back to models list.
2312
- const probes = [
2313
- "https://api.x.ai/v1/api-key",
2314
- "https://api.x.ai/v1/models",
2315
- ];
2316
-
2317
- let lastStatus = 0;
2318
- let body = null;
2319
- let okUrl = null;
2320
- for (const url of probes) {
2321
- const res = await proxyAwareFetch(url, { method: "GET", headers }, proxyOptions);
2322
- lastStatus = res.status;
2323
- if (res.status === 401 || res.status === 403) {
2324
- return { message: "xAI authentication expired. Please re-authorize or update the API key." };
2325
- }
2326
- if (res.ok) {
2327
- body = await res.json().catch(() => null);
2328
- okUrl = url;
2329
- break;
2330
- }
2331
- }
2332
-
2333
- if (!body) {
2334
- return { message: `xAI API error (${lastStatus || "unknown"})` };
2335
- }
2336
-
2337
- const fields = digCreditFields(body) || [];
2338
- const quota = buildQuotaFromCreditFields(fields);
2339
- const quotas = {};
2340
- if (quota) {
2341
- quotas.Credits = quota;
2342
- } else {
2343
- // Connected / healthy without numeric allotment
2344
- const modelCount = Array.isArray(body?.data) ? body.data.length : 0;
2345
- quotas.API = {
2346
- used: 0,
2347
- total: 0,
2348
- remainingPercentage: 100,
2349
- resetAt: null,
2350
- unlimited: true,
2351
- };
2352
- if (modelCount > 0) {
2353
- // informational only via plan string
2354
- }
2355
- }
2356
-
2357
- const email = providerSpecificData?.email || null;
2358
- const plan =
2359
- body.name ||
2360
- body.api_key_name ||
2361
- body.team?.name ||
2362
- (okUrl?.includes("api-key") ? "xAI API Key" : "xAI");
2363
-
2364
- return {
2365
- plan: typeof plan === "string" ? plan : "xAI",
2366
- email,
2367
- quotas,
2368
- };
2369
- } catch (error) {
2370
- return { message: `xAI usage error: ${error.message}` };
2371
- }
2372
- }
2373
-
2374
- // ─── Cursor (session token — no public quota API) ───────────────────────────
2375
-
2376
- export async function getCursorUsage(accessToken, providerSpecificData = null) {
2377
- if (!accessToken) return { message: "Cursor access token not available." };
2378
-
2379
- // Cursor uses a long-lived session JWT; there is no stable public quota endpoint.
2380
- // Surface connection health + any plan hints from stored providerSpecificData / JWT claims.
2381
- let plan = providerSpecificData?.plan || providerSpecificData?.membershipType || "Cursor";
2382
- let email = providerSpecificData?.email || null;
2383
-
2384
- try {
2385
- const parts = String(accessToken).split(".");
2386
- if (parts.length === 3) {
2387
- const b64 = parts[1].replace(/-/g, "+").replace(/_/g, "/");
2388
- const padded = b64 + "=".repeat((4 - (b64.length % 4)) % 4);
2389
- const payload = JSON.parse(Buffer.from(padded, "base64").toString("utf8"));
2390
- email = email || payload.email || payload.preferred_username || null;
2391
- plan =
2392
- payload.plan ||
2393
- payload.subscription ||
2394
- payload.membershipType ||
2395
- payload.tier ||
2396
- plan;
2397
- }
2398
- } catch {
2399
- /* ignore JWT decode errors */
2400
- }
2401
-
2402
- return {
2403
- plan: typeof plan === "string" ? plan : "Cursor",
2404
- email,
2405
- quotas: {
2406
- Session: {
2407
- used: 0,
2408
- total: 0,
2409
- remainingPercentage: 100,
2410
- resetAt: null,
2411
- unlimited: true,
2412
- },
2413
- },
2414
- };
2415
- }