@rabbi696/ezrouter 0.6.13 → 0.6.14

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 (371) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +28 -28
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  36. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  37. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  38. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  39. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  40. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  41. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  42. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  43. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  45. package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  46. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  47. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  48. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  49. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  50. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  51. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  52. package/app/.next-cli-build/server/app/api/changelog/route.js +1 -1
  53. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  54. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  55. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  56. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
  57. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  58. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  59. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  60. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  61. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  62. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/callback.html +1 -1
  64. package/app/.next-cli-build/server/app/callback.rsc +3 -3
  65. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  66. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  67. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  68. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  69. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  70. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  71. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  72. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  73. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  74. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  75. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  76. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  77. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  78. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  80. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  82. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  83. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  84. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  85. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  87. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  88. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  90. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  92. package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  93. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  94. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  96. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  97. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  98. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  100. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
  102. package/app/.next-cli-build/server/app/dashboard/convoy.rsc +5 -5
  103. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
  104. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  106. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  107. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +5 -5
  108. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
  109. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +3 -3
  110. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +1 -1
  111. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  112. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  113. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  114. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  115. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  116. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  117. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  118. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  119. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  120. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  121. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
  122. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +5 -5
  123. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
  124. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
  125. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  126. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  127. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  128. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +5 -5
  129. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
  130. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +3 -3
  131. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +1 -1
  132. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
  133. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +5 -5
  134. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
  135. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
  136. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  137. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  138. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  139. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +5 -5
  140. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
  141. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +3 -3
  142. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +1 -1
  143. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
  144. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +5 -5
  145. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
  146. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  147. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  148. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  149. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +5 -5
  150. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
  151. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +3 -3
  152. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +1 -1
  153. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  154. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  155. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  156. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  157. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  158. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  159. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  160. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  161. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  162. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  163. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  164. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  165. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  166. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  167. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  168. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  169. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  170. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  171. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  172. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  173. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  174. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  175. package/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  176. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  177. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  178. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  179. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  180. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  181. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  182. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  183. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  184. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  185. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  186. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  187. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  188. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  189. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  190. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  191. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  192. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  193. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  194. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  195. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  196. package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  197. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  198. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  199. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  200. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  201. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  202. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  203. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  204. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  205. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  206. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  207. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  208. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  209. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  210. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  211. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  212. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  213. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  214. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  215. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  216. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  217. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  218. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  219. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  220. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  221. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  222. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  223. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  224. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  225. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -2
  226. package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  227. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  228. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  229. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  230. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  231. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  232. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  233. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  234. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  235. package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
  236. package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +5 -5
  237. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
  238. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
  239. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  240. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  241. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +5 -5
  242. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
  243. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +3 -3
  244. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +1 -1
  245. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  246. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  247. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  248. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  249. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  250. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  251. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  252. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  253. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  254. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  255. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  256. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  257. package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  258. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  259. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  260. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  261. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  262. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  263. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  264. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  265. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  266. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  267. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  268. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  269. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  270. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  271. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  272. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  273. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  274. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  275. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  276. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  277. package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  278. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  279. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  280. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  281. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  282. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  283. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  284. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  285. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  286. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  287. package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  288. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  289. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  290. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  291. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  292. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  293. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  294. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  295. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  296. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  297. package/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  298. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  299. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  300. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  301. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  302. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  303. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  304. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  305. package/app/.next-cli-build/server/app/index.html +1 -1
  306. package/app/.next-cli-build/server/app/index.rsc +3 -3
  307. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  308. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  309. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  310. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  311. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  312. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  313. package/app/.next-cli-build/server/app/landing.html +1 -1
  314. package/app/.next-cli-build/server/app/landing.rsc +3 -3
  315. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  316. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  317. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  318. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  319. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  320. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  321. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  322. package/app/.next-cli-build/server/app/login.html +1 -1
  323. package/app/.next-cli-build/server/app/login.rsc +4 -4
  324. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  325. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  326. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  327. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  328. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  329. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  330. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  331. package/app/.next-cli-build/server/app-paths-manifest.json +28 -28
  332. package/app/.next-cli-build/server/chunks/1733.js +1 -1
  333. package/app/.next-cli-build/server/chunks/1847.js +1 -1
  334. package/app/.next-cli-build/server/chunks/2348.js +1 -1
  335. package/app/.next-cli-build/server/chunks/3252.js +1 -1
  336. package/app/.next-cli-build/server/chunks/3267.js +4 -4
  337. package/app/.next-cli-build/server/chunks/3583.js +1 -1
  338. package/app/.next-cli-build/server/chunks/369.js +1 -1
  339. package/app/.next-cli-build/server/chunks/3886.js +1 -1
  340. package/app/.next-cli-build/server/chunks/3960.js +20 -20
  341. package/app/.next-cli-build/server/chunks/3977.js +1 -1
  342. package/app/.next-cli-build/server/chunks/412.js +4 -4
  343. package/app/.next-cli-build/server/chunks/4722.js +1 -1
  344. package/app/.next-cli-build/server/chunks/4827.js +1 -1
  345. package/app/.next-cli-build/server/chunks/7594.js +4 -4
  346. package/app/.next-cli-build/server/chunks/7663.js +1 -1
  347. package/app/.next-cli-build/server/chunks/7775.js +1 -1
  348. package/app/.next-cli-build/server/chunks/823.js +1 -1
  349. package/app/.next-cli-build/server/chunks/8243.js +1 -1
  350. package/app/.next-cli-build/server/chunks/8306.js +1 -1
  351. package/app/.next-cli-build/server/chunks/8644.js +1 -1
  352. package/app/.next-cli-build/server/chunks/8670.js +1 -1
  353. package/app/.next-cli-build/server/chunks/9026.js +17 -17
  354. package/app/.next-cli-build/server/chunks/9303.js +1 -1
  355. package/app/.next-cli-build/server/chunks/9843.js +1 -1
  356. package/app/.next-cli-build/server/chunks/9865.js +1 -1
  357. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  358. package/app/.next-cli-build/server/middleware.js +1 -1
  359. package/app/.next-cli-build/server/pages/404.html +1 -1
  360. package/app/.next-cli-build/server/pages/500.html +1 -1
  361. package/app/.next-cli-build/static/chunks/{1321-e4e8edf59a3efb3b.js → 1321-c3d563d8c76a4dac.js} +1 -1
  362. package/app/.next-cli-build/static/chunks/5497-ffaf8dc7c7c8f95c.js +17 -0
  363. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-6369f894b65720dd.js +1 -0
  364. package/app/CHANGELOG.md +41 -1
  365. package/app/package.json +1 -1
  366. package/app/public/CHANGELOG.md +88 -1
  367. package/package.json +1 -1
  368. package/app/.next-cli-build/static/chunks/5497-c231188e29c8168b.js +0 -17
  369. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-6affb06ce74675f4.js +0 -1
  370. /package/app/.next-cli-build/static/{iyE9-yOA2TKfxBG8WnbZ2 → BkbAW6wqVq3TFwhDZSKXi}/_buildManifest.js +0 -0
  371. /package/app/.next-cli-build/static/{iyE9-yOA2TKfxBG8WnbZ2 → BkbAW6wqVq3TFwhDZSKXi}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{62022:(e,t,a)=>{Promise.resolve().then(a.bind(a,76436)),Promise.resolve().then(a.bind(a,25086))},76436:(e,t,a)=>{"use strict";a.d(t,{default:()=>U});var r=a(95155),s=a(12115),i=a(73321),n=a(57250),l=a(47218);let o="quotaCacheData",d="quotaAutoRefresh",c="quotaTrackerPreferences",u=[10,20,50,100],m=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],x=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function h(e){return e.name?.trim()||e.email?.trim()||e.displayName?.trim()||null}function p(e,t){let a=t[e.id]?.quotas?.[0];return a&&"number"==typeof a.remaining?a.remaining:1/0}function b(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function g(e,t){let a=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>a.has(e)))}async function f(e,t){return await e(t)}function y(){try{let e=window.localStorage.getItem(o);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function w(e,t){try{let a=y();a[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(o,JSON.stringify(a))}catch(e){console.error("Error writing quota cache:",e)}}function k(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function v(e){return e&&"object"==typeof e?String(e.modelKey||e.name||"").trim():""}function j(e,t){let a=t?.[e]?.hidden;return new Set(Array.isArray(a)?a.map(String):[])}let N={green:{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"},yellow:{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"},red:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"}};function S({quotas:e=[],compact:t=!1,sortMode:a="default",showSortLabel:i=!1,onHideQuota:n=null}){let[l,o]=(0,s.useState)(1),d=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):k(e?.used,e?.total)})),[e]),c=(0,s.useMemo)(()=>"remaining-asc"===a?[...d].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===a?[...d].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):d,[d,a]),u=Math.max(1,Math.ceil(c.length/10));if((0,s.useEffect)(()=>{o(1)},[a,e]),(0,s.useEffect)(()=>{o(e=>Math.min(e,u))},[u]),!e||0===e.length)return null;let m=c.slice((l-1)*10,10*l),x=0===c.length?0:(l-1)*10+1,h=Math.min(10*l,c.length),p=t?"py-1 px-1.5":"py-2 px-3",b=t?"text-[11px]":"text-sm",g=t?"text-[11px]":"text-sm",f=t?"text-[10px] leading-tight":"text-xs",y="function"==typeof n;return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"text-[10px] text-text-muted",children:[c.length," quota",c.length>1?"s":""]}),i&&(0,r.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsx)("table",{className:"w-full table-fixed text-left",children:(0,r.jsx)("tbody",{children:m.map(e=>{var a;let s=!0===e.unlimited,i=!0===e.isCreditBalance,l=i?{text:"text-blue-600 dark:text-blue-400",bg:"bg-blue-500",bgLight:"bg-blue-500/10",emoji:"\uD83D\uDCB0"}:N[(a=e.remaining)>70?"green":a>=30?"yellow":"red"],o=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,a=new Date,r=t-a;if(r<=0)return"-";let s=Math.ceil(r/6e4);if(s<60)return`${s}m`;let i=Math.floor(s/60),n=s%60;if(i<24)return`${i}h ${n}m`;let l=Math.floor(i/24);return`${l}d ${i%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),d=function(e){if(!e)return null;try{let t=new Date(e),a=new Date,r=new Date(a.getFullYear(),a.getMonth(),a.getDate()),s=new Date(r);s.setDate(s.getDate()+1);let i="";i=t>=r&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${i}, ${n}`}catch{return null}}(e.resetAt),c=!1!==e.recurring?`in ${o}`:`expires in ${o}`;return(0,r.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,r.jsx)("td",{className:`${p} w-[30%]`,children:(0,r.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,r.jsx)("span",{className:"text-[10px] shrink-0",children:l.emoji}),(0,r.jsx)("span",{className:`${b} font-medium text-text-primary truncate`,children:e.name}),e.runtimeLimited&&(e.runtimeActionUrl?(0,r.jsx)("a",{href:e.runtimeActionUrl,target:"_blank",rel:"noreferrer",className:"shrink-0 rounded bg-amber-500/15 px-1 py-0.5 text-[9px] font-medium text-amber-600 underline decoration-dotted underline-offset-2 dark:text-amber-400",title:e.runtimeLimitReason||"Verify this Google account, then retry the model.",children:e.runtimeLimitLabel||"account blocked"}):(0,r.jsx)("span",{className:"shrink-0 rounded bg-amber-500/15 px-1 py-0.5 text-[9px] font-medium text-amber-600 dark:text-amber-400",title:e.runtimeLimitReason||"The provider runtime rejected this model even though the quota endpoint still reports capacity.",children:e.runtimeLimitLabel||"runtime limit"}))]})}),(0,r.jsx)("td",{className:`${p} w-[45%]`,children:(0,r.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[!s&&!i&&(0,r.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${l.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,r.jsx)("div",{className:`h-full transition-all duration-300 ${l.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,r.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,r.jsx)("span",{className:"text-text-muted",children:s?`${e.used.toLocaleString()} used \xb7 Unlimited`:i?`Credit: ${e.total.toFixed(2)} ${e.name.split(" ")[2]||""}`:e.percentageOnly?(0,r.jsx)("span",{title:e.quotaNote||"The provider does not expose an absolute request count.",children:"count unavailable"}):(0,r.jsxs)(r.Fragment,{children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]})}),(0,r.jsx)("span",{className:`font-medium ${s?"text-green-600 dark:text-green-400":i?"text-blue-600 dark:text-blue-400":l.text}`,children:s?"Unlimited":i?"":`${e.remaining}%`})]})]})}),(0,r.jsx)("td",{className:`${p} ${y?"w-[20%]":"w-[25%]"}`,children:"-"!==o||d?t?(0,r.jsx)("div",{className:`${g} text-text-primary font-medium truncate`,title:d||"",children:"-"!==o?c:d}):(0,r.jsxs)("div",{className:"space-y-0.5",children:["-"!==o&&(0,r.jsx)("div",{className:`${g} text-text-primary font-medium`,children:c}),d&&(0,r.jsx)("div",{className:`${f} text-text-muted`,children:d})]}):(0,r.jsx)("div",{className:`${g} text-text-muted italic`,children:"N/A"})}),y&&(0,r.jsx)("td",{className:`${p} w-[5%] text-right`,children:(0,r.jsx)("button",{type:"button",onClick:()=>n(e),className:"inline-flex h-6 w-6 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5",title:"Hide this quota row","aria-label":`Hide quota ${e.name}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"visibility_off"})})})]},`${e.name}-${e.index}`)})})})}),u>1&&(0,r.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,r.jsxs)("span",{children:["Showing ",x,"-",h," of ",c.length]}),(0,r.jsxs)("span",{children:["Page ",l," / ",u]})]}),(0,r.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,r.jsx)("button",{type:"button",onClick:()=>o(e=>Math.max(1,e-1)),disabled:1===l,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,r.jsx)("button",{type:"button",onClick:()=>o(e=>Math.min(u,e+1)),disabled:l===u,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var C=a(98542),A=a(97677),P=a(84588),$=a(35497),q=a(88105),E=a(11059),_=a(78177);let T={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},D={claude:"claudeAutoPing",codex:"codexAutoPing"},M={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny request to an available model. Consumes a small amount of quota."};function O(e){return e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null}function F(e){let t=e.providerSpecificData?.region;if(t)return t;let a=e.providerSpecificData?.profileArn;return("string"==typeof a?a.split(":")[3]:"")||""}let L={five_hour:"session",seven_day:"weekly",seven_day_overage_included:"weekly",seven_day_opus:"Opus weekly",seven_day_sonnet:"Sonnet weekly"};function R(e){let t=[...new Set((e||[]).map(e=>L[e]).filter(Boolean))];return t.length?`${t.join(" + ")} limits`:"limits"}function I(e){if(!e)return"N/A";let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"N/A"}function z(e){if(!e)return"N/A";let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t))return"N/A";if(t<=0)return"Expired";let a=Math.ceil(t/36e5),r=Math.floor(a/24),s=a%24;return r>0?`${r}d ${s}h`:`${s}h`}function U(){let{copied:e,copy:t}=(0,E.C)(),a=(0,i.useSearchParams)(),N=(0,i.useRouter)(),L=(0,i.usePathname)(),[U,W]=(0,s.useState)([]),[J,K]=(0,s.useState)({}),[H,G]=(0,s.useState)({}),[V,B]=(0,s.useState)({}),[Q,X]=(0,s.useState)(!0),[Y,Z]=(0,s.useState)({claude:{},codex:{}}),[ee,et]=(0,s.useState)(null),[ea,er]=(0,s.useState)(!1),[es,ei]=(0,s.useState)(!1),[en,el]=(0,s.useState)(!1),[eo,ed]=(0,s.useState)(60),[ec,eu]=(0,s.useState)(!0),[em,ex]=(0,s.useState)(null),[eh,ep]=(0,s.useState)(null),[eb,eg]=(0,s.useState)(null),[ef,ey]=(0,s.useState)(null),[ew,ek]=(0,s.useState)(null),[ev,ej]=(0,s.useState)(null),[eN,eS]=(0,s.useState)(!1),[eC,eA]=(0,s.useState)(null),[eP,e$]=(0,s.useState)([]),[eq,eE]=(0,s.useState)(()=>a?.get("provider")||"all"),e_=(0,s.useCallback)(e=>{eE(e);try{let t=new URLSearchParams(a?.toString()||"");"all"===e?t.delete("provider"):t.set("provider",e);let r=t.toString()?`${L}?${t.toString()}`:L;N.replace(r,{scroll:!1})}catch{}},[L,N,a]),[eT,eD]=(0,s.useState)([]),[eM,eO]=(0,s.useState)("all"),[eF,eL]=(0,s.useState)("default"),[eR,eI]=(0,s.useState)({}),[ez,eU]=(0,s.useState)(!1),[eW,eJ]=(0,s.useState)(!1),[eK,eH]=(0,s.useState)(!1),[eG,eV]=(0,s.useState)(1),[eB,eQ]=(0,s.useState)(20),[eX,eY]=(0,s.useState)(String(20)),[eZ,e0]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[e1,e5]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),e2=(0,s.useRef)(0),e3=(0,s.useCallback)(async(e=eG)=>{try{var t,a;let r=new URLSearchParams({page:String(e),pageSize:String(eB),accountStatus:eM,sort:"priority"});"all"!==eq&&r.set("provider",eq);let s=await fetch(`/api/providers/client?${r.toString()}`);if(!s.ok)throw Error("Failed to fetch connections");let i=await s.json(),n=i.connections||[],l=(t=i.pagination,t||{page:1,pageSize:eB,total:0,totalPages:1}),o=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(i.totals,n.length);return W(n),eD(i.providerOptions||[]),e0(l),e5(o),eV((a=i.pagination,a?.page||e)),n}catch(e){return console.error("Error fetching connections:",e),W([]),eD([]),e0({page:1,pageSize:eB,total:0,totalPages:1}),e5({eligibleConnections:0,providerFilteredConnections:0}),[]}},[eM,ez,eG,eB,eq]),e4=(0,s.useCallback)(async(e,t,{force:a=!1}={})=>{G(t=>({...t,[e]:!0})),B(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=`/api/usage/${e}${a?"?force=1":""}`,s=await fetch(r);if(!s.ok){let a=(await s.json().catch(()=>({}))).error||s.statusText;if(404===s.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===s.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,a);let r={quotas:[],message:a};K(t=>({...t,[e]:r})),w(e,r);return}throw Error(`HTTP ${s.status}: ${a}`)}let i=await s.json();console.log(`[ProviderLimits] Got quota for ${t}:`,i);let n={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let a=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":if(t.quotas){let e=Object.entries(t.quotas),r=new Set(["gemini_weekly","claude_gpt_weekly"]),s=new Set(["gemini_session","claude_gpt_session"]),i=new Set([...r,...s]),n=e.filter(([e])=>e.startsWith("gemini-")&&!e.includes("image")),l=e.filter(([e])=>e.startsWith("claude-")),o=e.filter(([e])=>e.includes("image")),d=e.filter(([e])=>i.has(e)),c=e.filter(([e])=>!e.startsWith("gemini-")&&!e.startsWith("claude-")&&!e.includes("image")&&!i.has(e)),u=!!t.quotas.gemini_weekly,m=!!t.quotas.gemini_session,x=!!t.quotas.claude_gpt_weekly,h=!!t.quotas.claude_gpt_session;if(m)d.filter(([e])=>"gemini_session"===e).forEach(([e,t])=>{a.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});else if(n.length>0){let e=n.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1],r=t.quotas.gemini_weekly?.resetAt;u&&e.resetAt===r&&(e.remainingPercentage??0)===0||a.push({name:"Gemini (Flash / Pro)",modelKey:"gemini",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage})}if(u&&d.filter(([e])=>"gemini_weekly"===e).forEach(([e,t])=>{a.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})}),h)d.filter(([e])=>"claude_gpt_session"===e).forEach(([e,t])=>{a.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});else if(l.length>0){let e=l.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1],r=t.quotas.claude_gpt_weekly?.resetAt;x&&e.resetAt===r&&(e.remainingPercentage??0)===0||a.push({name:"Claude (Sonnet / Opus)",modelKey:"claude",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage})}x&&d.filter(([e])=>"claude_gpt_weekly"===e).forEach(([e,t])=>{a.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})}),o.forEach(([e,t])=>{a.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})}),x||h||c.forEach(([e,t])=>{a.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})})}break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{let r=e;"spark_session"===e?r="Spark (5h)":"spark_weekly"===e?r="Spark (Weekly)":"session"===e?r="5h":"weekly"===e?r="Weekly":"review_session"===e?r="Review (5h)":"review_weekly"===e&&(r="Review (Weekly)"),a.push({name:r,quotaType:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":case"qoder-cn":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{"organization"===e&&(!t||[t.total,t.used,t.remaining].every(e=>0===(Number(e)||0)))||a.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:Math.max(0,Number(t.total)||0)||(Number(t.used)||0)+(Number(t.remaining)||0),unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?a.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,remaining:void 0!==t.remaining?t.remaining:Math.max(0,(t.total||100)-(t.used||0)),remainingPercentage:void 0!==t.remainingPercentage?t.remainingPercentage:k(t.used,t.total),resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codebuddy-cn":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,recurring:!1!==t.recurring})});break;case"grok-cli":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"kimi":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"cursor":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"deepseek":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"groq":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"ollama":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"zed":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,unlimited:t.unlimited})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}if(e?.toLowerCase()==="claude"){let e={"session (5h)":0,"weekly (7d)":1,"weekly fable (7d)":2,"weekly opus (7d)":3,"weekly sonnet (7d)":4};return a.sort((t,a)=>(e[t.name]??99)-(e[a.name]??99)),a}let r=(0,l.KC)(e);if(r.length>0){let e=new Map(r.map((e,t)=>[e.id,t]));a.sort((t,a)=>{let r=t.modelKey||t.name,s=a.modelKey||a.name;return("gemini"===r||"gemini_session"===r)&&(r="gemini-3.8-flash-high"),("claude"===r||"claude_gpt_session"===r)&&(r="claude-sonnet-4-6"),("gemini"===s||"gemini_session"===s)&&(s="gemini-3.8-flash-high"),("claude"===s||"claude_gpt_session"===s)&&(s="claude-sonnet-4-6"),(e.get(r)??999)-(e.get(s)??999)})}return a}(t,i),plan:i.plan||null,message:i.message||null,raw:i};K(t=>({...t,[e]:n})),w(e,n)}catch(a){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,a),B(t=>({...t,[e]:a.message||"Failed to fetch quota"}))}finally{G(t=>({...t,[e]:!1}))}},[]),e8=(0,s.useCallback)(async(e,t)=>{await e4(e,t,{force:!0}),et(new Date)},[e4]),e6=(0,s.useCallback)(async(e,t)=>{if(("codex"===t||"claude"===t)&&!ef){ey(e),B(t=>({...t,[e]:null}));try{let a="claude"===t?await fetch(`/api/usage/${e}/claude-reset`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grantId:J[e]?.raw?.resetCredits?.nextGrantId})}):await fetch(`/api/usage/${e}/codex-reset-credits`,{method:"POST"}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.message||r.error||r.code||"Failed to reset limit");await e4(e,t,{force:!0}),et(new Date)}catch(t){B(a=>({...a,[e]:t.message||"Failed to reset limit"}))}finally{ey(null)}}},[e4,ef,J]),e7=(0,s.useCallback)((e,t)=>{ej({connection:e,loading:!1,error:null,data:{kind:"claude",...t}})},[]),e9=(0,s.useCallback)(async e=>{ej({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||a.message||"Failed to load Codex reset credits");let r=Array.isArray(a.credits)?[...a.credits]:[];r.sort((e,t)=>{let a=e.expiresAt?new Date(e.expiresAt).getTime():1/0,r=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return a-r}),ej({connection:e,loading:!1,error:null,data:{...a,credits:r}})}catch(t){ej({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),te=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){ex(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){K(t=>{let a={...t};return delete a[e],a}),G(t=>{let a={...t};return delete a[e],a}),B(t=>{let a={...t};return delete a[e],a});try{let t=y();t[e]&&(delete t[e],window.localStorage.setItem(o,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await f(e3,eG)}}catch(e){console.error("Error deleting connection:",e)}finally{ex(null)}}},[e3,eG]),tt=(0,s.useCallback)(async(e,t)=>{ep(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(K(e=>({...e})),await f(e3,eG))}catch(e){console.error("Error updating connection status:",e)}finally{ep(null)}},[e3,eG]),ta=(0,s.useCallback)(async(e,t)=>{if(!eb){eg(e.id);try{let a=await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{fastMode:t}})}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to save fast mode");W(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:{...a.providerSpecificData,fastMode:t}}:a))}catch(e){alert(e.message||"Failed to save fast mode")}finally{eg(null)}}},[eb]),tr=(0,s.useCallback)(async e=>{if(!eC?.id)return;let t=eC.id,a=eC.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await e3(),eS(!1),eA(null),q.wb.includes(a)&&await e4(t,a))}catch(e){console.error("Error saving connection:",e)}},[eC,e3,e4]),ts=(0,s.useCallback)(async(e,t,a)=>{let r=U.find(t=>t.id===e);if(!r)return;let s={...r.quotaPauseThresholds&&"object"==typeof r.quotaPauseThresholds?r.quotaPauseThresholds:{}},i=Number(a);Number.isFinite(i)&&i>0&&i<=100?s[t]=i:delete s[t];try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaPauseThresholds:s})})).ok&&W(t=>t.map(t=>t.id===e?{...t,quotaPauseThresholds:s}:t))}catch(e){console.error("Error updating quota threshold:",e)}},[U]);(0,s.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&e$(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let ti=(0,s.useCallback)(async(e=!1)=>{if(en)return;el(!0),ed(60);let t=e2.current+=1,a=Math.round(10);try{let r=await e3(eG);G(b(r)),B(e=>g(e,r)),K(e=>g(e,r)),await Promise.all(r.filter(r=>e||"claude"!==r.provider||t%a==0).map(e=>e4(e.id,e.provider))),et(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{el(!1)}},[en,e3,e4,eG]);(0,s.useEffect)(()=>{(async()=>{eu(!0);let e=await e3(eG);eu(!1),G(b(e)),B(t=>g(t,e)),K(t=>g(t,e)),await Promise.all(e.map(e=>e4(e.id,e.provider))),et(new Date)})()},[e3,e4,eG]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(d);X(null===e||"true"===e),er(!0)},[]),(0,s.useEffect)(()=>{ea&&window.localStorage.setItem(d,String(Q))},[Q,ea]),(0,s.useEffect)(()=>{try{let e=window.localStorage.getItem(c);if(e){let t=JSON.parse(e);if(t?.accountFilter&&["all","active","inactive"].includes(t.accountFilter)&&eO(t.accountFilter),t?.pageSize){let e=Number(t.pageSize);Number.isFinite(e)&&e>0&&(eQ(e),eY(String(e)))}}}catch{}ei(!0)},[]),(0,s.useEffect)(()=>{if(es)try{window.localStorage.setItem(c,JSON.stringify({accountFilter:eM,pageSize:eB}))}catch{}},[eM,eB,es]),(0,s.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>{Z({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}}),eI(e?.quotaVisibility||{})}).catch(()=>{})},[]);let tn=(0,s.useCallback)(async(e,t,a)=>{let r=D[t];if(!r)return;let s={...Y[t]||{},[e]:a};Z({...Y,[t]:s});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[r]||{},connections:s};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:t})})}catch{Z(Y)}},[Y]),tl=(0,s.useCallback)(async(e,t)=>{eI(e);try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:e})})).ok)throw Error("Failed to update quota visibility")}catch(e){console.error("Error updating quota visibility:",e),eI(t)}},[]),to=(0,s.useCallback)((e,t)=>{let a=v(t);if(!e||!a)return;let r=eR[e]||{},s=new Set(r.hidden||[]);if(s.add(a),"antigravity"===e){if("gemini"===a)for(let e of s)e.startsWith("gemini-")&&!e.includes("image")&&s.delete(e);else if("claude"===a)for(let e of s)e.startsWith("claude-")&&s.delete(e)}tl({...eR,[e]:{...r,hidden:[...s]}},eR)},[eR,tl]),td=(0,s.useCallback)((e,t)=>{let a=v(t);if(!e||!a)return;let r=eR[e]||{},s=new Set(r.hidden||[]);if(s.delete(a),"antigravity"===e){if("gemini"===a)for(let e of s)e.startsWith("gemini-")&&!e.includes("image")&&s.delete(e);else if("claude"===a)for(let e of s)e.startsWith("claude-")&&s.delete(e)}tl({...eR,[e]:{...r,hidden:[...s]}},eR)},[eR,tl]),tc=(0,s.useRef)(ti);(0,s.useEffect)(()=>{tc.current=ti},[ti]);let tu=(0,s.useMemo)(()=>(function({onRefresh:e,onTick:t,refreshIntervalMs:a,tickMs:r=1e3}){let s=null,i=null,n=()=>{null!==s&&(clearInterval(s),s=null),null!==i&&(clearInterval(i),i=null)};return{start:()=>{n(),s=setInterval(()=>e(),a),i=setInterval(()=>t(),r)},stop:n,isRunning:()=>null!==s||null!==i}})({onRefresh:()=>tc.current(),onTick:()=>ed(e=>e<=1?60:e-1),refreshIntervalMs:6e4}),[]);(0,s.useEffect)(()=>!ea||!Q||"u">typeof document&&document.hidden?void tu.stop():(tu.start(),()=>tu.stop()),[Q,ea,tu]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?tu.stop():Q&&ea&&tu.start()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e),tu.stop()}},[Q,ea,tu]);let tm=(0,s.useMemo)(()=>(function(e,t,a,r,s){if("codex"===r&&"default"!==s)return[...e].sort((e,a)=>{let r=p(e,t),i=p(a,t),n="remaining-asc"===s?r-i:i-r;return 0!==n?n:(h(e)||"").localeCompare(h(a)||"")});if(!a){let t=new Map;for(let a of e){let e=a.provider||"";t.has(e)||t.set(e,[]),t.get(e).push(a)}return Array.from(t.values()).flat()}let i=e=>{let a=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return a.length>0?Math.min(...a):1/0};return[...e].sort((e,t)=>{let a=i(e)-i(t);return 0!==a?a:(e.provider||"").localeCompare(t.provider||"")||(h(e)||"").localeCompare(h(t)||"")})})(U,J,ez,eq,eF),[U,J,ez,eq,eF]),tx=e=>{let t=J[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=k(e.used,e.total))},th=(0,s.useCallback)(async(e,t)=>{if(e.length&&!eK){eH(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await f(e3,eG)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eH(!1)}}},[eK,e3,eG]),tp="all"===eq?"All providers":eq,tb=e1.eligibleConnections>0,tg=tm.length>0,tf=e1.eligibleConnections?e1.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===eq?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===eM?"turned off":"active"===eM?"active":"matching"} accounts found for ${eq}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},ty=function(e){var t;let{start:a,end:r}=(t=e).total?{start:(t.page-1)*t.pageSize+1,end:Math.min(t.page*t.pageSize,t.total)}:{start:0,end:0};return`Showing ${a}-${r} of ${e.total}`}(eZ),tw=!u.includes(eB);return ec||tb?ec||tg?(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>eJ(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":eW,title:"Filter quota providers",children:[(0,r.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===eq?(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,r.jsx)(n.A,{src:`/providers/${eq}.png`,alt:eq,size:18,className:"size-[18px] rounded object-contain",fallbackText:eq.slice(0,2).toUpperCase()}),(0,r.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:tp})]}),(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),eW&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>eJ(!1)}),(0,r.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-black/10 bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>{"all"!==eq&&eV(1),e_("all"),eJ(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===eq?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,r.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===eq&&(0,r.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,r.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,r.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:eT.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>{eq!==e&&eV(1),e_(e),eJ(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${eq===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,r.jsx)(n.A,{src:`/providers/${e}.png`,alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,r.jsx)("span",{className:"font-medium capitalize",children:e}),eq===e&&(0,r.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,r.jsx)("select",{value:eM,onChange:e=>{let t=e.target.value;eM!==t&&eV(1),eO(t)},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:m.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===eq&&(0,r.jsx)("select",{value:eF,onChange:e=>eL(e.target.value),className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:x.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,r.jsxs)("button",{type:"button",onClick:()=>eU(e=>!e),"aria-pressed":ez,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${ez?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>{th(tm.filter(e=>(e.isActive??!0)&&tx(e)).map(e=>e.id),!1)},disabled:eK,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>{th(tm.filter(e=>!(e.isActive??!0)&&!tx(e)).map(e=>e.id),!0)},disabled:eK,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,r.jsxs)("button",{onClick:()=>X(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:Q?"Disable auto-refresh":"Enable auto-refresh",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px] ${Q?"text-primary":"text-text-muted"}`,children:Q?"toggle_on":"toggle_off"}),(0,r.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),Q&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",eo,"s)"]})]}),(0,r.jsx)("button",{type:"button",onClick:()=>ti(!0),disabled:en,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px] ${en?"animate-spin":""}`,children:"refresh"})})]})}),ez&&(0,r.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:tm.map(a=>{let s,i,l,o,d=J[a.id],c=H[a.id],u=V[a.id],m=!1===a.isActive,x="codex"===a.provider,p=x?(s=d?.plan?.trim())&&"unknown"!==s.toLowerCase()?s:a?.providerSpecificData?.chatgptPlanType?.trim()||null:null,b="claude"===a.provider?d?.raw?.resetCredits:null,g=x?"Codex reset credit":"Claude limit reset",f=Number.isFinite(l="number"==typeof(i=d?.raw?.resetCredits?.availableCount)?i:Number(i))?Math.max(0,l):0,y=ef===a.id,w=eb===a.id,k=em===a.id||eh===a.id||y||w,N=d?.quotas||[],E=function(e,t=[],a={}){if(!Array.isArray(t)||0===t.length)return[];let r=j(e,a);return 0===r.size?t:t.filter(e=>!r.has(v(e)))}(a.provider,N,eR),L=function(e,t=[],a={}){if(!Array.isArray(t)||0===t.length)return[];let r=j(e,a);return 0===r.size?[]:t.filter(e=>r.has(v(e)))}(a.provider,N,eR),z=(0,_.XD)(a);return(0,r.jsxs)(P.default,{padding:"none",className:`min-w-0 ${m?"opacity-60":""}`,children:[(0,r.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,r.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,r.jsx)(n.A,{src:`/providers/${a.provider}.png`,alt:a.provider,size:32,className:"object-contain",fallbackText:a.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:a.provider}),h(a)?(0,r.jsx)("p",{className:"text-xs text-text-muted truncate",children:h(a)}):null,O(a)?(0,r.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:O(a)}):null,p?(0,r.jsx)("span",{className:"mt-1 inline-flex rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:p}):null,z.enabled&&(0,r.jsx)("p",{className:"mt-0.5",children:(0,r.jsx)($.Ex,{variant:z.paused?"warning":"default",size:"sm",children:z.paused?`Paused (quota${z.triggered?`: ${z.triggered.key}`:""})`:"Buffers set"})}),"kiro"===a.provider&&(0,r.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,r.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(o=a.providerSpecificData?.authMethod)&&T[o]?T[o]:"api_key"===a.authType?"API Key":"OAuth"}),F(a)&&(0,r.jsx)("span",{className:"rounded-full bg-blue-500/10 px-2 py-0.5 text-[10px] font-semibold text-blue-600 dark:text-blue-400",children:F(a)}),(0,r.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${m?"bg-surface-2 text-text-muted":"active"===a.testStatus||"success"===a.testStatus?"bg-green-500/10 text-green-600 dark:text-green-400":"error"===a.testStatus||"expired"===a.testStatus||"unavailable"===a.testStatus?"bg-red-500/10 text-red-600 dark:text-red-400":"bg-surface-2 text-text-muted"}`,children:m?"disabled":a.testStatus||"unknown"}),a.providerSpecificData?.profileArn&&(0,r.jsxs)("button",{type:"button",onClick:()=>t(a.providerSpecificData.profileArn,a.id),title:a.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:e===a.id?"check":"content_copy"}),(0,r.jsx)("code",{className:"truncate font-mono",children:a.providerSpecificData.profileArn})]})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(x||b)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(A.default,{text:f>0?b?`Use your reset now (${f} left, use by ${I(b.expiresAt)}) \xb7 refills ${R(b.clears)}`:`Use one ${g}. Available: ${f}`:`No ${g}s available`,children:(0,r.jsxs)("button",{type:"button",onClick:()=>ek({connection:a,resetCreditCount:f}),disabled:f<=0||c||k,"aria-label":f>0?`Use one ${g}. ${f} available.`:`No ${g}s available`,className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${f>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-black/10 bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[15px] ${y?"animate-spin":""}`,children:y?"progress_activity":"restart_alt"}),(0,r.jsx)("span",{children:f})]})}),(0,r.jsx)(A.default,{text:x?"View Codex reset credit expiry":"View Claude Code reset expiry",children:(0,r.jsx)("button",{type:"button",onClick:()=>x?e9(a):e7(a,b),disabled:c||k,"aria-label":x?"View Codex reset credit expiry":"View Claude Code reset expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-muted transition-colors hover:bg-black/5 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})}),q.Q2[a.provider]?.fastMode&&(0,r.jsx)(A.default,{text:`Fast mode is ${a.providerSpecificData?.fastMode===!0?"on":"off"}. Uses the provider's faster processing mode at a higher token cost.`,children:(0,r.jsxs)("button",{type:"button",onClick:()=>ta(a,a.providerSpecificData?.fastMode!==!0),disabled:c||k,role:"switch","aria-label":"Toggle fast mode","aria-checked":a.providerSpecificData?.fastMode===!0,className:`flex h-8 min-w-14 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${a.providerSpecificData?.fastMode===!0?"border-primary/30 bg-primary/10 text-primary":"border-black/10 text-text-muted hover:bg-black/5 hover:text-primary dark:border-white/10 dark:hover:bg-white/5"}`,children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[16px] ${w?"animate-spin":""}`,children:w?"progress_activity":"speed"}),(0,r.jsx)("span",{children:"Fast"})]})})]}),D[a.provider]&&"oauth"===a.authType&&(0,r.jsx)(A.default,{text:M[a.provider],children:(0,r.jsx)("button",{type:"button",onClick:()=>tn(a.id,a.provider,Y[a.provider]?.[a.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${Y[a.provider]?.[a.id]===!0?"text-primary":"text-text-muted"}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,r.jsx)(A.default,{text:"Refresh quota",children:(0,r.jsx)("button",{type:"button",onClick:()=>e8(a.id,a.provider),disabled:c||k,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",children:(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${c?"animate-spin":""}`,children:"refresh"})})}),(0,r.jsx)(A.default,{text:"Edit connection",children:(0,r.jsx)("button",{type:"button",onClick:()=>{eA(a),eS(!0)},disabled:k,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,r.jsx)(A.default,{text:"Delete connection",children:(0,r.jsx)("button",{type:"button",onClick:()=>te(a.id),disabled:k,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",children:(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] ${em===a.id?"animate-pulse":""}`,children:"delete"})})}),(0,r.jsx)("div",{className:"inline-flex items-center pl-0.5",title:a.isActive??!0?"Disable connection":"Enable connection",children:(0,r.jsx)(C.default,{size:"sm",checked:a.isActive??!0,disabled:k,onChange:e=>tt(a.id,e)})})]})]})}),(0,r.jsxs)("div",{className:"px-2 py-1.5",children:[c?(0,r.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):u?(0,r.jsxs)("div",{className:"text-center py-5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,r.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:u})]}):d?.message?(0,r.jsx)("div",{className:"text-center py-5",children:(0,r.jsx)("p",{className:"text-xs text-text-muted",children:d.message})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S,{quotas:E,compact:!0,sortMode:"default",showSortLabel:"codex"===a.provider&&"default"!==eF,onHideQuota:e=>to(a.provider,e)}),a.lastQuotaSnapshot?.windows?.length>0&&(0,r.jsxs)("div",{className:"mt-2 border-t border-black/5 pt-2 dark:border-white/5",children:[(0,r.jsx)("p",{className:"mb-1 text-[10px] text-text-muted",children:"Pause buffer — pause this account when a window's remaining % ≤"}),(0,r.jsx)("div",{className:"flex flex-col gap-1",children:a.lastQuotaSnapshot.windows.map(e=>{let t=Number(a.quotaPauseThresholds?.[e.key])||0;return(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate text-[11px] text-text-muted",title:e.key,children:e.key}),(0,r.jsx)("span",{className:"w-10 text-right text-[10px] tabular-nums text-text-muted",children:"number"==typeof e.remainingPercentage?`${e.remainingPercentage}%`:"—"}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"≤"}),(0,r.jsx)("input",{type:"number",min:0,max:100,value:t,onChange:t=>ts(a.id,e.key,Number.parseInt(t.target.value,10)||0),className:"w-14 rounded border border-border bg-background px-1 py-0.5 text-[11px] focus:border-primary focus:outline-none","aria-label":`Pause buffer for ${e.key}`}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"%"})]},e.key)})})]})]}),d?.message&&!u&&!c&&(0,r.jsx)("p",{className:"mt-2 px-1 text-[10px] leading-relaxed text-text-muted",children:d.message}),L.length>0&&(0,r.jsxs)("div",{className:"mt-2 flex min-w-0 items-center gap-1 border-t border-black/5 pt-2 text-[10px] text-text-muted dark:border-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px]",children:"visibility_off"}),(0,r.jsx)("span",{className:"shrink-0",children:"Hidden:"}),(0,r.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap pb-2",children:L.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>td(a.provider,e),className:"shrink-0 rounded-md border border-black/10 px-1.5 py-0.5 transition-colors hover:bg-black/5 hover:text-text-primary dark:border-white/10 dark:hover:bg-white/5",title:"Show this quota row",children:e.name},v(e)))})]})]})]},a.id)})}),(0,r.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted",children:ty}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsxs)("select",{value:tw?"custom":String(eB),onChange:e=>{let t=e.target.value;if("custom"===t)return;let a=Number.parseInt(t,10);Number.isFinite(a)&&(eV(1),eQ(a),eY(String(a)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[u.map(e=>(0,r.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,r.jsx)("option",{value:"custom",children:"Custom"})]}),(0,r.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:eX,onChange:e=>eY(e.target.value),onBlur:()=>{let e=Number.parseInt(eX,10);if(!Number.isFinite(e))return void eY(String(eB));let t=Math.min(500,Math.max(1,e));eV(1),eQ(t),eY(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eX,10);if(!Number.isFinite(t))return void eY(String(eB));let a=Math.min(500,Math.max(1,t));eV(1),eQ(a),eY(String(a))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eZ.page," / ",eZ.totalPages]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("button",{type:"button",onClick:()=>eV(1),disabled:eZ.page<=1||ec||en,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,r.jsx)("button",{type:"button",onClick:()=>eV(e=>Math.max(1,e-1)),disabled:eZ.page<=1||ec||en,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,r.jsx)("button",{type:"button",onClick:()=>eV(e=>Math.min(eZ.totalPages,e+1)),disabled:eZ.page>=eZ.totalPages||ec||en,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,r.jsx)("button",{type:"button",onClick:()=>eV(eZ.totalPages),disabled:eZ.page>=eZ.totalPages||ec||en,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,r.jsx)($.uo,{isOpen:!!ew,onClose:()=>{ef||ek(null)},onConfirm:async()=>{let e=ew?.connection;e&&(await e6(e.id,e.provider),ek(null))},title:ew?.connection?.provider==="claude"?"Reset Claude limits?":"Reset Codex limit?",message:ew?.connection?.provider==="claude"?`Refills your ${R(J[ew.connection.id]?.raw?.resetCredits?.clears)} now for ${h(ew.connection)||"this account"} \xb7 your weekly reset day stays ${I(J[ew.connection.id]?.raw?.resetCredits?.weeklyResetsAt)}. This cannot be undone. Resets left: ${ew.resetCreditCount??0}.`:`Use 1 Codex reset credit for ${h(ew?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${ew?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!ef}),ev&&(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-4 backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"w-full max-w-2xl overflow-hidden rounded-2xl border border-black/15 bg-white shadow-2xl ring-1 ring-black/10 dark:border-white/15 dark:bg-neutral-950 dark:ring-white/10",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-black/10 bg-black/[0.03] px-4 py-3 dark:border-white/10 dark:bg-white/[0.04]",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"text-base font-semibold text-text-primary",children:ev.data?.kind==="claude"?"Claude Code Limit Resets":"Codex Reset Credit Expiry"}),(0,r.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:h(ev.connection)||(ev.data?.kind==="claude"?"Claude account":"Codex account")})]}),(0,r.jsx)("button",{type:"button",onClick:()=>ej(null),className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5","aria-label":"Close reset credit expiry modal",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,r.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-white p-4 dark:bg-neutral-950",children:ev.loading?(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading reset credits..."]}):ev.error?(0,r.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300",children:ev.error}):ev.data?.kind==="claude"&&ev.data.grants?.length?(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,r.jsxs)("span",{children:[ev.data.availableCount??0," reset",1===ev.data.availableCount?"":"s"," left"]}),(0,r.jsxs)("span",{children:["Weekly reset day: ",I(ev.data.weeklyResetsAt)]})]}),(0,r.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,r.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,r.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Reset"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Left"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Refills"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Use By"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,r.jsx)("tbody",{children:(ev.data.grants||[]).map(e=>(0,r.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,r.jsxs)("td",{className:"px-3 py-2",children:[(0,r.jsx)("div",{className:"text-text-primary",children:e.label||e.id}),(0,r.jsx)("span",{className:"mt-1 inline-block rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.resetsLeft<=0?"used":e.paused?"paused":e.endsAt&&new Date(e.endsAt).getTime()<=Date.now()?"expired":e.usableNow?"usable now":e.startsAt&&new Date(e.startsAt).getTime()>Date.now()?"not started":e.useRequiresLimit?"at limit only":"unavailable"})]}),(0,r.jsxs)("td",{className:"whitespace-nowrap px-3 py-2 font-medium tabular-nums text-text-primary",children:[e.resetsLeft," / ",e.resetsTotal]}),(0,r.jsx)("td",{className:"px-3 py-2 text-text-muted",children:R(e.clears)}),(0,r.jsx)("td",{className:"px-3 py-2 text-text-primary",children:I(e.endsAt)}),(0,r.jsx)("td",{className:"whitespace-nowrap px-3 py-2 font-medium text-text-primary",children:z(e.endsAt)})]},e.id))})]})})]}):ev.data?.credits?.length?(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,r.jsxs)("span",{children:[ev.data.credits.length," reset credit",1===ev.data.credits.length?"":"s"]}),(0,r.jsxs)("span",{children:[ev.data.availableCount??0," available"]})]}),(0,r.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,r.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,r.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Granted At"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires At"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,r.jsx)("tbody",{children:ev.data.credits.map((e,t)=>(0,r.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,r.jsx)("td",{className:"px-3 py-2",children:(0,r.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.status||"unknown"})}),(0,r.jsx)("td",{className:"px-3 py-2 text-text-muted",children:I(e.grantedAt)}),(0,r.jsx)("td",{className:"px-3 py-2 text-text-primary",children:I(e.expiresAt)}),(0,r.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:z(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,r.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-8 text-center text-sm text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:ev.data?.kind==="claude"?"No limit resets available for this account.":"No reset credit details returned for this account."})})]})}),(0,r.jsx)($.wI,{isOpen:eN,connection:eC,proxyPools:eP,onSave:tr,onClose:()=>{eS(!1),eA(null)}})]}):(0,r.jsx)(P.default,{padding:"lg",children:(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:tf.icon}),(0,r.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:tf.title}),(0,r.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:tf.description})]})}):(0,r.jsx)(P.default,{padding:"lg",children:(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,r.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,r.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}}},e=>{e.O(0,[763,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=62022)),_N_E=e.O()}]);
package/app/CHANGELOG.md CHANGED
@@ -1,6 +1,46 @@
1
+ # v0.6.14 (2026-09-27)
2
+
3
+ ## Upstream Synchronization & Core Enhancements (decolua/9router #4375 - #4396)
4
+ - **Streaming & SSE Protocol Integrity**:
5
+ - Terminate OpenAI SSE stream with `[DONE]` sentinel on clean completions (`#4375`).
6
+ - Forward SSE comment heartbeats (`: keep-alive`) in translate mode to prevent reverse-proxy timeouts (`#4376`).
7
+ - Populate complete `output` array in OpenAI Responses `response.completed` event (`#4380`).
8
+ - **Structured Outputs & Tool Calling**:
9
+ - Carry structured outputs (`response_format` / `json_schema`) bi-directionally between OpenAI Responses and Chat Completions (`#4377`).
10
+ - Scope `tool_call_id` name lookup strictly to its own assistant turn to prevent cross-turn tool name contamination (`#4379`).
11
+ - Emit `custom_tool_call` instead of `function_call` for `type: "custom"` tools in Responses (`#4386`).
12
+ - Preserve message turns when input contains unknown or future content block types like `container_upload` (`#4383`).
13
+ - Keep function-tool `strict` semantics on all Responses routes (Chat->Responses maps omitted/null to `strict: false`, Claude->OpenAI carries boolean, executors preserve declared `null`/`false`/`true`) (`#4396`).
14
+ - **Provider & Schema Compatibility**:
15
+ - Automatically rename tool parameters named `properties` to `tool_properties` to avoid Gemini 400 rejection (`#4382`).
16
+ - Strip `errorMessage` and other non-standard draft JSON schema keywords from Gemini tool declarations (`#4391`).
17
+ - Clamp `max_output_tokens` for OpenCode `muse-spark` to `[8000, 1M]` to prevent empty completion responses (`#4387`).
18
+ - Add DeepSeek v4.1 Flash vision capability alias and add Zed to live catalog providers (`#4392`).
19
+ - Add `codebuddy-intl` to OAuth test configuration with `tokenExists` strategy (`#4394`).
20
+ - **Routing, Fallback & Error Handling**:
21
+ - Keep rotating connections on account-scoped 4xx errors (`#4378`).
22
+ - Fall through combos on model-scoped 400/410 errors and Codex SSE `response.failed` payloads (`#4381`).
23
+ - Reject disabled models at request time, not just in `/v1/models` listing (`#4388`).
24
+ - Reduce 500/502/503/504 connection cooldown from 30s to 5s to survive fast client retries (`#4393`).
25
+ - Keep upstream web search timeout armed until the entire response body is read (`#4385`).
26
+ - **Storage, CLI Settings & UI Improvements**:
27
+ - Preserve active `modelLock_*` entries in database when connection status is marked active (`#4389`).
28
+ - Merge provider block and preserve custom `contextWindow` / `maxTokens` on Pi settings save (`#4390`).
29
+ - Sync `?provider=` URL parameter with provider filter on Quota page for bookmarkable deep links (`#4395`).
30
+ - Narrow auto-updater process whitelist and use `ps -eo` to avoid unintended SIGKILL of unrelated processes (`#4384`).
31
+ - **Bug Fixes & Database Integrity**:
32
+ - **Usage Provider Map Test Node Leaks**: Fixed issue where automated test dummy connections (`seed-0`, `seed-1`, `seed-3`, etc.) leaked into the SQLite database and rendered as unwanted nodes in the `/dashboard/usage` topology map.
33
+ - **Topology Provider Guard**: Hardened `isLLMProvider` in `UsageStats.js` to strictly validate provider existence against `AI_PROVIDERS`, `FREE_PROVIDERS`, or user-registered custom provider nodes (`providerNodes`), preventing any unverified or orphaned connection names from appearing in the UI.
34
+ - **Database Migration 007**: Added automated migration `007-cleanup-test-connections` to automatically purge all residual test connection entries (`openai-compatible-*`, `seed-*`, `kimchi-nope`) from SQLite storage.
35
+ - **Test Isolation**: Isolated test databases in `provider-priority-insert-cost.test.js` and `api-key-policies.test.js` using temporary directories and set a global Vitest `DATA_DIR` fallback to completely safeguard the user's `~/.ezrouter` directory from being touched by test runs.
36
+ - **Grok CLI Tool Strict Preservation**: Enforced function tool strict preservation in `grok-cli-compat.js` via `readToolStrict` and `restoreToolStrict`.
37
+ - **Branding & Invariants**:
38
+ - Preserved default gateway port strictly at **20126**.
39
+ - Maintained EzRouter package and CLI branding (`@rabbi696/ezrouter`, `ezrouter-app`, `ezrouter`, `sk_ezrouter`, `~/.ezrouter`).
40
+
1
41
  # v0.6.13 (2026-09-27)
2
42
 
3
- ## Upstream Synchronization & Core Enhancements (decolua/9router #4176 - #4375)
43
+ ## Upstream Synchronization & Core Enhancements (decolua/9router #4176 - #4374)
4
44
  - **Models & Providers**:
5
45
  - Added support for Claude Opus 5.5 and updated spoofed CLI version to 2.1.280 (`#4355`).
6
46
  - Added GPT-6 Sol and Luna support for Codex (`#4345`).
package/app/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ezrouter-app",
3
- "version": "0.6.13",
3
+ "version": "0.6.14",
4
4
  "description": "EzRouter web dashboard",
5
5
  "private": true,
6
6
  "scripts": {
@@ -1,9 +1,96 @@
1
- # v0.6.11 (2026-09-21)
1
+ # v0.6.14 (2026-09-27)
2
+
3
+ ## Upstream Synchronization & Core Enhancements (decolua/9router #4375 - #4396)
4
+ - **Streaming & SSE Protocol Integrity**:
5
+ - Terminate OpenAI SSE stream with `[DONE]` sentinel on clean completions (`#4375`).
6
+ - Forward SSE comment heartbeats (`: keep-alive`) in translate mode to prevent reverse-proxy timeouts (`#4376`).
7
+ - Populate complete `output` array in OpenAI Responses `response.completed` event (`#4380`).
8
+ - **Structured Outputs & Tool Calling**:
9
+ - Carry structured outputs (`response_format` / `json_schema`) bi-directionally between OpenAI Responses and Chat Completions (`#4377`).
10
+ - Scope `tool_call_id` name lookup strictly to its own assistant turn to prevent cross-turn tool name contamination (`#4379`).
11
+ - Emit `custom_tool_call` instead of `function_call` for `type: "custom"` tools in Responses (`#4386`).
12
+ - Preserve message turns when input contains unknown or future content block types like `container_upload` (`#4383`).
13
+ - Keep function-tool `strict` semantics on all Responses routes (Chat->Responses maps omitted/null to `strict: false`, Claude->OpenAI carries boolean, executors preserve declared `null`/`false`/`true`) (`#4396`).
14
+ - **Provider & Schema Compatibility**:
15
+ - Automatically rename tool parameters named `properties` to `tool_properties` to avoid Gemini 400 rejection (`#4382`).
16
+ - Strip `errorMessage` and other non-standard draft JSON schema keywords from Gemini tool declarations (`#4391`).
17
+ - Clamp `max_output_tokens` for OpenCode `muse-spark` to `[8000, 1M]` to prevent empty completion responses (`#4387`).
18
+ - Add DeepSeek v4.1 Flash vision capability alias and add Zed to live catalog providers (`#4392`).
19
+ - Add `codebuddy-intl` to OAuth test configuration with `tokenExists` strategy (`#4394`).
20
+ - **Routing, Fallback & Error Handling**:
21
+ - Keep rotating connections on account-scoped 4xx errors (`#4378`).
22
+ - Fall through combos on model-scoped 400/410 errors and Codex SSE `response.failed` payloads (`#4381`).
23
+ - Reject disabled models at request time, not just in `/v1/models` listing (`#4388`).
24
+ - Reduce 500/502/503/504 connection cooldown from 30s to 5s to survive fast client retries (`#4393`).
25
+ - Keep upstream web search timeout armed until the entire response body is read (`#4385`).
26
+ - **Storage, CLI Settings & UI Improvements**:
27
+ - Preserve active `modelLock_*` entries in database when connection status is marked active (`#4389`).
28
+ - Merge provider block and preserve custom `contextWindow` / `maxTokens` on Pi settings save (`#4390`).
29
+ - Sync `?provider=` URL parameter with provider filter on Quota page for bookmarkable deep links (`#4395`).
30
+ - Narrow auto-updater process whitelist and use `ps -eo` to avoid unintended SIGKILL of unrelated processes (`#4384`).
31
+ - **Bug Fixes & Database Integrity**:
32
+ - **Usage Provider Map Test Node Leaks**: Fixed issue where automated test dummy connections (`seed-0`, `seed-1`, `seed-3`, etc.) leaked into the SQLite database and rendered as unwanted nodes in the `/dashboard/usage` topology map.
33
+ - **Topology Provider Guard**: Hardened `isLLMProvider` in `UsageStats.js` to strictly validate provider existence against `AI_PROVIDERS`, `FREE_PROVIDERS`, or user-registered custom provider nodes (`providerNodes`), preventing any unverified or orphaned connection names from appearing in the UI.
34
+ - **Database Migration 007**: Added automated migration `007-cleanup-test-connections` to automatically purge all residual test connection entries (`openai-compatible-*`, `seed-*`, `kimchi-nope`) from SQLite storage.
35
+ - **Test Isolation**: Isolated test databases in `provider-priority-insert-cost.test.js` and `api-key-policies.test.js` using temporary directories and set a global Vitest `DATA_DIR` fallback to completely safeguard the user's `~/.ezrouter` directory from being touched by test runs.
36
+ - **Grok CLI Tool Strict Preservation**: Enforced function tool strict preservation in `grok-cli-compat.js` via `readToolStrict` and `restoreToolStrict`.
37
+ - **Branding & Invariants**:
38
+ - Preserved default gateway port strictly at **20126**.
39
+ - Maintained EzRouter package and CLI branding (`@rabbi696/ezrouter`, `ezrouter-app`, `ezrouter`, `sk_ezrouter`, `~/.ezrouter`).
40
+
41
+ # v0.6.13 (2026-09-27)
42
+
43
+ ## Upstream Synchronization & Core Enhancements (decolua/9router #4176 - #4374)
44
+ - **Models & Providers**:
45
+ - Added support for Claude Opus 5.5 and updated spoofed CLI version to 2.1.280 (`#4355`).
46
+ - Added GPT-6 Sol and Luna support for Codex (`#4345`).
47
+ - Added Token Harbor provider integration (`#4350`).
48
+ - Added 4 OpenAI-compatible aggregator providers: Dahl, Atria, Agnes, and Bai (`#4351`).
49
+ - Added Qoder CN (`qoder-cn`) provider support (`#4353`).
50
+ - Added System One (Jev) native decision endpoint and dashboard integration (`#4354`).
51
+ - Added Xiaomi MiMo v2.6 models, server-assisted desktop login, and 5 account clusters (`#4341`).
52
+ - Exposed Cline free tier (`cline-free/*`) with zero-cost rating (`#4334`).
53
+ - Expanded OpenCode Go and Zen catalogs with reasoning effort tuning (`#4357`).
54
+ - **CLI Tools Dynamic Configuration**:
55
+ - Added dynamic configuration support and settings endpoints for Pi, OMP, Crush, ForgeCode, Smelt, and CodeWhale (`#4362`).
56
+ - Added multiple model profile management for Codex CLI (`#4346`).
57
+ - Preserved existing `ANTHROPIC_AUTH_TOKEN` when applying Claude settings (`#4348`).
58
+ - **Analytics & Usage Dashboard**:
59
+ - Added Requests view mode, provider/model breakdown charts, and All Time period filtering (`#4365`, `#4367`).
60
+ - Added free limit reset claim and redeem cards for Claude / Codex accounts (`#4371`).
61
+ - Keyed live usage statistics by full API key hash to guarantee proper attribution and eliminate team collision (`#4193`, `#4373`).
62
+ - **Combos & Capabilities**:
63
+ - Integrated model capability metadata on `/v1/models` and dynamic combo limit resolution (`#4360`, `#4361`).
64
+ - Added Cursor and Claude Default presets plus bulk selection, deletion, and routing strategy updates (`#4363`).
65
+ - Migrated legacy vision fallback adapter default to `mimo-v2.6-flash-free` (`#4340`).
66
+ - **Protocols, Streaming & Reliability**:
67
+ - Dispatched live-API-only Gemini STT models over Live WebSocket transport (`#4006`).
68
+ - Carried streamed output items in OpenAI Responses `response.completed` events (`#4307`).
69
+ - Dropped Antigravity `requestType: "agent"` to eliminate false 429 `RESOURCE_EXHAUSTED` errors (`#4364`).
70
+ - Maintained lossless header forwarding for proxy pool relay deployments (`#4366`).
71
+ - Lazy-loaded recharts and marked in the dashboard with background preloading on idle (`#4368`).
72
+ - Fixed Zed paste-token crash and added Zed IDE auto-import (`#4359`).
73
+ - Streamed Claude thinking content blocks back to OpenAI-format clients and eliminated redundant `<think>` tags (`#4220`, `#4358`).
74
+ - Made `POST /api/providers` O(1) and guarded against silent API key overwrites (`#4350`).
75
+ - **Bug Fixes & Database Integrity**:
76
+ - **Usage Provider Map Test Node Leaks**: Fixed issue where automated test dummy connections (`seed-0`, `seed-1`, `seed-3`, etc.) leaked into the SQLite database and rendered as unwanted nodes in the `/dashboard/usage` topology map.
77
+ - **Topology Provider Guard**: Hardened `isLLMProvider` in `UsageStats.js` to strictly validate provider existence against `AI_PROVIDERS`, `FREE_PROVIDERS`, or user-registered custom provider nodes (`providerNodes`), preventing any unverified or orphaned connection names from appearing in the UI.
78
+ - **Database Migration 007**: Added automated migration `007-cleanup-test-connections` to automatically purge all residual test connection entries (`openai-compatible-*`, `seed-*`, `kimchi-nope`) from SQLite storage.
79
+ - **Test Isolation**: Isolated test databases in `provider-priority-insert-cost.test.js` and `api-key-policies.test.js` using temporary directories and set a global Vitest `DATA_DIR` fallback to completely safeguard the user's `~/.ezrouter` directory from being touched by test runs.
80
+ - **Build & Import Resolution**: Resolved conflict marker in models route and corrected session ID generator import for System One core.
81
+ - **Branding & Local Invariants**:
82
+ - Preserved default gateway port strictly at **20126**.
83
+ - Maintained EzRouter package and CLI branding (`@rabbi696/ezrouter`, `ezrouter-app`, `ezrouter`, `sk_ezrouter`, `~/.ezrouter`).
84
+ - Preserved local Apple Silicon Rosetta 2 auto-detection for macOS tray and Provider Details React error boundaries.
85
+
86
+ # v0.6.12 (2026-09-21)
2
87
 
3
88
  ## Bug Fixes & Stability
89
+ - **macOS Apple Silicon System Tray**: Fixed tray icon failing to appear on Apple Silicon Macs (M1/M2/M3/M4) by automatically detecting missing Rosetta 2 runtime, providing auto-warmup (`softwareupdate --install-rosetta`), adding cached binary permissions fallback, and surfacing actionable error guidance.
4
90
  - **Provider Details Page Crash**: Fixed `ReferenceError: fastMode is not defined` in `ConnectionRow` by properly destructuring the `fastMode` prop, adding `updatingFastMode` state, and implementing `handleToggleFastMode`.
5
91
  - **Quota Tracker & Provider Limits Crash**: Fixed `ReferenceError: isUpdatingFastMode is not defined` in `ProviderLimits` by declaring `isUpdatingFastMode = fastModeUpdatingId === conn.id` and incorporating it into `rowBusy`.
6
92
  - **Combo Modal Test Run Crash**: Fixed `ReferenceError: models is not defined` in `ComboFormModal` on the Combos page by elevating `models = members.map((m) => m.id)` to component scope.
93
+ - **OAuth Modal Missing Constants & States**: Restored missing `PROXY_OAUTH_PROVIDERS`, `PASTE_TOKEN_PROVIDERS`, `authMode`, `pasteToken`, and `ideStatus` in `src/shared/components/OAuthModal.js` that caused `ReferenceError: PASTE_TOKEN_PROVIDERS is not defined` when opening provider details pages.
7
94
  - **OAuth Action Route Missing Imports**: Added missing `ZED_HOSTED_CONFIG` and `detectIdeInstalled` imports in `api/oauth/[provider]/[action]/route.js`.
8
95
 
9
96
  # v0.6.10 (2026-09-20)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabbi696/ezrouter",
3
- "version": "0.6.13",
3
+ "version": "0.6.14",
4
4
  "description": "EzRouter CLI - Start and manage EzRouter server (default port 20126)",
5
5
  "bin": {
6
6
  "ezrouter": "./cli.js",