@rsalmn/extremerouter 0.7.8 → 0.7.9

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 (958) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +9 -6
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/required-server-files.json +1 -1
  5. package/app/.next-cli-build/routes-manifest.json +20 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  88. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  94. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  99. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  101. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  102. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  103. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  104. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
  106. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  108. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  109. package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
  110. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  130. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  134. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  148. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  154. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
  168. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  174. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  180. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  190. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  192. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -0
  216. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -0
  217. package/app/.next-cli-build/server/app/api/oauth/1min/import/route_client-reference-manifest.js +1 -0
  218. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  225. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -0
  245. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -0
  246. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route_client-reference-manifest.js +1 -0
  247. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  248. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -0
  260. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -0
  261. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route_client-reference-manifest.js +1 -0
  262. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  305. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  307. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  311. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  313. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  315. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +3 -3
  329. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  335. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  383. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  397. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  429. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  431. package/app/.next-cli-build/server/app/callback.html +1 -1
  432. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  433. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  434. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  435. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
  436. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  437. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  440. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  444. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  445. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
  447. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  448. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  452. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  453. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/index.html +1 -1
  455. package/app/.next-cli-build/server/app/index.rsc +5 -5
  456. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  457. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  458. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
  460. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  461. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  462. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  464. package/app/.next-cli-build/server/app/landing.html +1 -1
  465. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  466. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  467. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  468. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
  469. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  470. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  471. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  472. package/app/.next-cli-build/server/app/login/page.js +2 -2
  473. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  475. package/app/.next-cli-build/server/app/login.html +1 -1
  476. package/app/.next-cli-build/server/app/login.rsc +6 -6
  477. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  478. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
  480. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  482. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  484. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/page.js +2 -2
  486. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  487. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  488. package/app/.next-cli-build/server/app-paths-manifest.json +9 -6
  489. package/app/.next-cli-build/server/chunks/1239.js +1 -0
  490. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  491. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  492. package/app/.next-cli-build/server/chunks/212.js +1 -1
  493. package/app/.next-cli-build/server/chunks/2231.js +1 -1
  494. package/app/.next-cli-build/server/chunks/{2722.js → 2342.js} +24 -24
  495. package/app/.next-cli-build/server/chunks/2701.js +1 -1
  496. package/app/.next-cli-build/server/chunks/2926.js +1 -1
  497. package/app/.next-cli-build/server/chunks/318.js +37 -35
  498. package/app/.next-cli-build/server/chunks/319.js +1 -1
  499. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  500. package/app/.next-cli-build/server/chunks/3992.js +1 -0
  501. package/app/.next-cli-build/server/chunks/4040.js +5 -3
  502. package/app/.next-cli-build/server/chunks/412.js +2 -2
  503. package/app/.next-cli-build/server/chunks/4632.js +1 -1
  504. package/app/.next-cli-build/server/chunks/4741.js +4 -2
  505. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  506. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  507. package/app/.next-cli-build/server/chunks/5628.js +1 -0
  508. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  509. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  510. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  511. package/app/.next-cli-build/server/chunks/615.js +1 -1
  512. package/app/.next-cli-build/server/chunks/6316.js +2 -2
  513. package/app/.next-cli-build/server/chunks/6630.js +1 -1
  514. package/app/.next-cli-build/server/chunks/7152.js +1 -1
  515. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  516. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  517. package/app/.next-cli-build/server/chunks/8895.js +2 -2
  518. package/app/.next-cli-build/server/chunks/9630.js +1 -1
  519. package/app/.next-cli-build/server/chunks/9703.js +1 -1
  520. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  521. package/app/.next-cli-build/server/middleware.js +2 -2
  522. package/app/.next-cli-build/server/pages/404.html +1 -1
  523. package/app/.next-cli-build/server/pages/500.html +1 -1
  524. package/app/.next-cli-build/static/LTz0FqDsVsVSFbsHZibmc/_buildManifest.js +1 -0
  525. package/app/.next-cli-build/static/chunks/1321-7d2ce22078e1dffb.js +1 -0
  526. package/app/.next-cli-build/static/chunks/{1636-25599a8426fd97ed.js → 1636-47ea773ffa2d3a4b.js} +1 -1
  527. package/app/.next-cli-build/static/chunks/3794-1b03b52e3112452e.js +32 -0
  528. package/app/.next-cli-build/static/chunks/5497-c5ee857b78a8cf8a.js +7 -0
  529. package/app/.next-cli-build/static/chunks/{6069-bd1f2f41043f8c30.js → 682-03720d6613bcbd0f.js} +3 -3
  530. package/app/.next-cli-build/{server/chunks/8084.js → static/chunks/8105-705e80a4c161374b.js} +1 -1
  531. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-4a622e705e5c4efc.js → page-920869c698a8b3cf.js} +1 -1
  532. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-76e413764f752c03.js → page-75247ad22e97f7cc.js} +1 -1
  533. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-d722ccf5e0fec340.js +1 -0
  534. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-afc62a0533448ca0.js +1 -0
  535. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-262aee689cd6eb34.js → page-a91bcaf7425e68a3.js} +1 -1
  536. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-18b262b802c95472.js → page-a8c4d8c681e19868.js} +1 -1
  537. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-408845bd809806a6.js +1 -0
  538. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-d077213deca8c217.js +1 -0
  539. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-e8d14560b2019a5f.js → page-b635b8b051acb5a5.js} +1 -1
  540. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-a27c538ea71ebf8a.js → page-d9958dfec1d2e28e.js} +1 -1
  541. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-5e3375dcb5344f35.js → page-a36b3b632d16f4cb.js} +1 -1
  542. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-e1875ca8be7183eb.js → page-92a0799a23d869b3.js} +1 -1
  543. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-99540bfed3193080.js +1 -0
  544. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/{page-640703af38ea9eed.js → page-262fa6911888d4f1.js} +1 -1
  545. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-f644da989b8878c3.js +1 -0
  546. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-0a50de81e7b688fc.js +1 -0
  547. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-1b18b64a9ced4e9f.js → page-aa26b25a26b5dac8.js} +1 -1
  548. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-53ab489f01e3da19.js +10 -0
  549. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-f2075be55913fe76.js → page-8965749fb7d0fac3.js} +1 -1
  550. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-e71aac08cb013b28.js → page-96d3eb0dfde0711b.js} +1 -1
  551. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-964ac16d6816983d.js → page-843c810c0818ce1b.js} +1 -1
  552. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-da7dccb599243439.js → page-bc16a0312f0a7915.js} +1 -1
  553. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-6c82876d3dc71dfb.js → page-97c920b552343488.js} +1 -1
  554. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-73e504f021474182.js → page-2592739cbb862828.js} +1 -1
  555. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-422974480d3bd378.js → page-a8af04fbd6293d2f.js} +1 -1
  556. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-6235a5ba123759b2.js → page-5433f8ac60dd59f0.js} +1 -1
  557. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-fbd9ba3da73c1af0.js → layout-df0ed16971ba7386.js} +1 -1
  558. package/app/.next-cli-build/static/chunks/app/_global-error/page-abffaa46b4637bee.js +1 -0
  559. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-abffaa46b4637bee.js +1 -0
  560. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-abffaa46b4637bee.js +1 -0
  561. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-abffaa46b4637bee.js +1 -0
  562. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-abffaa46b4637bee.js +1 -0
  563. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-abffaa46b4637bee.js +1 -0
  564. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-abffaa46b4637bee.js +1 -0
  565. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-abffaa46b4637bee.js +1 -0
  566. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-abffaa46b4637bee.js +1 -0
  567. package/app/.next-cli-build/static/chunks/app/api/cache/route-abffaa46b4637bee.js +1 -0
  568. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-abffaa46b4637bee.js +1 -0
  569. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-abffaa46b4637bee.js +1 -0
  570. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-abffaa46b4637bee.js +1 -0
  571. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-abffaa46b4637bee.js +1 -0
  572. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-abffaa46b4637bee.js +1 -0
  573. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-abffaa46b4637bee.js +1 -0
  574. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-abffaa46b4637bee.js +1 -0
  575. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-abffaa46b4637bee.js +1 -0
  576. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-abffaa46b4637bee.js +1 -0
  577. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-abffaa46b4637bee.js +1 -0
  578. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-abffaa46b4637bee.js +1 -0
  579. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-abffaa46b4637bee.js +1 -0
  580. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-abffaa46b4637bee.js +1 -0
  581. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-abffaa46b4637bee.js +1 -0
  582. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-abffaa46b4637bee.js +1 -0
  583. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-abffaa46b4637bee.js +1 -0
  584. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-abffaa46b4637bee.js +1 -0
  585. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-abffaa46b4637bee.js +1 -0
  586. package/app/.next-cli-build/static/chunks/app/api/combos/route-abffaa46b4637bee.js +1 -0
  587. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-abffaa46b4637bee.js +1 -0
  588. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-abffaa46b4637bee.js +1 -0
  589. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-abffaa46b4637bee.js +1 -0
  590. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-abffaa46b4637bee.js +1 -0
  591. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-abffaa46b4637bee.js +1 -0
  592. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-abffaa46b4637bee.js +1 -0
  593. package/app/.next-cli-build/static/chunks/app/api/health/route-abffaa46b4637bee.js +1 -0
  594. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-abffaa46b4637bee.js +1 -0
  595. package/app/.next-cli-build/static/chunks/app/api/init/route-abffaa46b4637bee.js +1 -0
  596. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-abffaa46b4637bee.js +1 -0
  597. package/app/.next-cli-build/static/chunks/app/api/keys/route-abffaa46b4637bee.js +1 -0
  598. package/app/.next-cli-build/static/chunks/app/api/locale/route-abffaa46b4637bee.js +1 -0
  599. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-abffaa46b4637bee.js +1 -0
  600. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-abffaa46b4637bee.js +1 -0
  601. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-abffaa46b4637bee.js +1 -0
  602. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-abffaa46b4637bee.js +1 -0
  603. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-abffaa46b4637bee.js +1 -0
  604. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-abffaa46b4637bee.js +1 -0
  605. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-abffaa46b4637bee.js +1 -0
  606. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-abffaa46b4637bee.js +1 -0
  607. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-abffaa46b4637bee.js +1 -0
  608. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-abffaa46b4637bee.js +1 -0
  609. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-abffaa46b4637bee.js +1 -0
  610. package/app/.next-cli-build/static/chunks/app/api/models/route-abffaa46b4637bee.js +1 -0
  611. package/app/.next-cli-build/static/chunks/app/api/models/test/route-abffaa46b4637bee.js +1 -0
  612. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-abffaa46b4637bee.js +1 -0
  613. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-abffaa46b4637bee.js +1 -0
  614. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-abffaa46b4637bee.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-abffaa46b4637bee.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-abffaa46b4637bee.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-abffaa46b4637bee.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-abffaa46b4637bee.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-abffaa46b4637bee.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-abffaa46b4637bee.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-abffaa46b4637bee.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-abffaa46b4637bee.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-abffaa46b4637bee.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-abffaa46b4637bee.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-abffaa46b4637bee.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-abffaa46b4637bee.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-abffaa46b4637bee.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-abffaa46b4637bee.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/pricing/route-abffaa46b4637bee.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-abffaa46b4637bee.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-abffaa46b4637bee.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-abffaa46b4637bee.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-abffaa46b4637bee.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-abffaa46b4637bee.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-abffaa46b4637bee.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-abffaa46b4637bee.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-abffaa46b4637bee.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-abffaa46b4637bee.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-abffaa46b4637bee.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-abffaa46b4637bee.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-abffaa46b4637bee.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-abffaa46b4637bee.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-abffaa46b4637bee.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-abffaa46b4637bee.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-abffaa46b4637bee.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-abffaa46b4637bee.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-abffaa46b4637bee.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-abffaa46b4637bee.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/providers/route-abffaa46b4637bee.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-abffaa46b4637bee.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-abffaa46b4637bee.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-abffaa46b4637bee.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-abffaa46b4637bee.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-abffaa46b4637bee.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-abffaa46b4637bee.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-abffaa46b4637bee.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-abffaa46b4637bee.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-abffaa46b4637bee.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-abffaa46b4637bee.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-abffaa46b4637bee.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-abffaa46b4637bee.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-abffaa46b4637bee.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-abffaa46b4637bee.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/settings/route-abffaa46b4637bee.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-abffaa46b4637bee.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-abffaa46b4637bee.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-abffaa46b4637bee.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/tags/route-abffaa46b4637bee.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-abffaa46b4637bee.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-abffaa46b4637bee.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-abffaa46b4637bee.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-abffaa46b4637bee.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-abffaa46b4637bee.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-abffaa46b4637bee.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-abffaa46b4637bee.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-abffaa46b4637bee.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-abffaa46b4637bee.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-abffaa46b4637bee.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-abffaa46b4637bee.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-abffaa46b4637bee.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-abffaa46b4637bee.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-abffaa46b4637bee.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-abffaa46b4637bee.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-abffaa46b4637bee.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-abffaa46b4637bee.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-abffaa46b4637bee.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-abffaa46b4637bee.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-abffaa46b4637bee.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-abffaa46b4637bee.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-abffaa46b4637bee.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-abffaa46b4637bee.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-abffaa46b4637bee.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-abffaa46b4637bee.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-abffaa46b4637bee.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-abffaa46b4637bee.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-abffaa46b4637bee.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-abffaa46b4637bee.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-abffaa46b4637bee.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-abffaa46b4637bee.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-abffaa46b4637bee.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-abffaa46b4637bee.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-abffaa46b4637bee.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-abffaa46b4637bee.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-abffaa46b4637bee.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-abffaa46b4637bee.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-abffaa46b4637bee.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-abffaa46b4637bee.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-abffaa46b4637bee.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/v1/route-abffaa46b4637bee.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-abffaa46b4637bee.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-abffaa46b4637bee.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-abffaa46b4637bee.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-abffaa46b4637bee.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/version/route-abffaa46b4637bee.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-abffaa46b4637bee.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/version/update/route-abffaa46b4637bee.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/{layout-402f477579b8a063.js → layout-16b611f4f5717ccd.js} +1 -1
  718. package/app/.next-cli-build/static/chunks/app/login/{page-f9cc5c6db5a0cf57.js → page-0831b035aa4c0f17.js} +1 -1
  719. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-abffaa46b4637bee.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/page-abffaa46b4637bee.js +1 -0
  721. package/app/.next-cli-build/static/chunks/{main-52cce31a84751ecc.js → main-28015457a328b97c.js} +1 -1
  722. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-abffaa46b4637bee.js +1 -0
  723. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-abffaa46b4637bee.js +1 -0
  724. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-abffaa46b4637bee.js +1 -0
  725. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-abffaa46b4637bee.js +1 -0
  726. package/app/.next-cli-build/static/css/d7d86034708483b4.css +1 -0
  727. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
  728. package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
  729. package/app/node_modules/@next/env/package.json +1 -1
  730. package/app/node_modules/nanoid/non-secure/index.cjs +2 -2
  731. package/app/node_modules/nanoid/package.json +1 -1
  732. package/app/node_modules/next/dist/build/load-jsconfig.js +40 -20
  733. package/app/node_modules/next/dist/build/next-config-ts/transpile-config.js +3 -114
  734. package/app/node_modules/next/dist/build/swc/index.js +1 -1
  735. package/app/node_modules/next/dist/build/webpack-config.js +3 -3
  736. package/app/node_modules/next/dist/cli/next-test.js +2 -1
  737. package/app/node_modules/next/dist/compiled/http-proxy/index.js +5 -5
  738. package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +11 -10
  739. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +11 -10
  740. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +11 -10
  741. package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +11 -10
  742. package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +2 -2
  743. package/app/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +9 -9
  744. package/app/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +9 -9
  745. package/app/node_modules/next/dist/lib/install-dependencies.js +1 -1
  746. package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  747. package/app/node_modules/next/dist/lib/typescript/loadTsConfig.js +181 -0
  748. package/app/node_modules/next/dist/lib/typescript/missingDependencyError.js +1 -1
  749. package/app/node_modules/next/dist/lib/typescript/runTypeCheckCli.js +53 -0
  750. package/app/node_modules/next/dist/lib/typescript/runTypeScriptCli.js +256 -0
  751. package/app/node_modules/next/dist/lib/verify-typescript-setup.js +97 -56
  752. package/app/node_modules/next/dist/server/app-render/action-handler.js +129 -34
  753. package/app/node_modules/next/dist/server/app-render/manifests-singleton.js +52 -4
  754. package/app/node_modules/next/dist/server/config-schema.js +1 -1
  755. package/app/node_modules/next/dist/server/config-shared.js +1 -2
  756. package/app/node_modules/next/dist/server/config.js +1 -1
  757. package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  758. package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  759. package/app/node_modules/next/dist/server/image-optimizer.js +8 -27
  760. package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  761. package/app/node_modules/next/dist/server/lib/incremental-cache/index.js +90 -53
  762. package/app/node_modules/next/dist/server/lib/patch-fetch.js +15 -2
  763. package/app/node_modules/next/dist/server/lib/router-utils/proxy-request.js +4 -0
  764. package/app/node_modules/next/dist/server/lib/router-utils/setup-dev-bundler.js +2 -1
  765. package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
  766. package/app/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  767. package/app/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +2 -1
  768. package/app/node_modules/next/dist/shared/lib/server-reference-info.js +12 -0
  769. package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  770. package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  771. package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
  772. package/app/node_modules/next/package.json +10 -10
  773. package/app/package.json +9 -3
  774. package/app/public/providers/agnes-api.svg +6 -0
  775. package/app/public/providers/agnes-web.svg +6 -0
  776. package/app/public/providers/stepfun.svg +54 -0
  777. package/app/public/providers/wp-studio.svg +11 -0
  778. package/app/server.js +1 -1
  779. package/app/src/lib/db/adapters/sqljsAdapter.js +4 -4
  780. package/package.json +1 -1
  781. package/app/.next-cli-build/server/chunks/1914.js +0 -1
  782. package/app/.next-cli-build/static/chunks/1321-d29ac582f42c2ed2.js +0 -1
  783. package/app/.next-cli-build/static/chunks/3794-c66b3d8325973459.js +0 -32
  784. package/app/.next-cli-build/static/chunks/5497-ffa6b6463e401ac2.js +0 -7
  785. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-4efb04e1eca7f27c.js +0 -1
  786. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-f6cb00bfa1358617.js +0 -1
  787. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-cb5d0aca5faba3b4.js +0 -1
  788. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-406bf4ebc93eda61.js +0 -1
  789. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-325de46b5cec5533.js +0 -1
  790. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-3538bc80a52010ff.js +0 -1
  791. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-8a44865bda8d1138.js +0 -1
  792. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-cd819afe3da4581e.js +0 -10
  793. package/app/.next-cli-build/static/chunks/app/_global-error/page-200d63272da34918.js +0 -1
  794. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-200d63272da34918.js +0 -1
  795. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-200d63272da34918.js +0 -1
  796. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-200d63272da34918.js +0 -1
  797. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-200d63272da34918.js +0 -1
  798. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-200d63272da34918.js +0 -1
  799. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-200d63272da34918.js +0 -1
  800. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-200d63272da34918.js +0 -1
  801. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-200d63272da34918.js +0 -1
  802. package/app/.next-cli-build/static/chunks/app/api/cache/route-200d63272da34918.js +0 -1
  803. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-200d63272da34918.js +0 -1
  804. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-200d63272da34918.js +0 -1
  805. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-200d63272da34918.js +0 -1
  806. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-200d63272da34918.js +0 -1
  807. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-200d63272da34918.js +0 -1
  808. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-200d63272da34918.js +0 -1
  809. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-200d63272da34918.js +0 -1
  810. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-200d63272da34918.js +0 -1
  811. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-200d63272da34918.js +0 -1
  812. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-200d63272da34918.js +0 -1
  813. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-200d63272da34918.js +0 -1
  814. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-200d63272da34918.js +0 -1
  815. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-200d63272da34918.js +0 -1
  816. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-200d63272da34918.js +0 -1
  817. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-200d63272da34918.js +0 -1
  818. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-200d63272da34918.js +0 -1
  819. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-200d63272da34918.js +0 -1
  820. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-200d63272da34918.js +0 -1
  821. package/app/.next-cli-build/static/chunks/app/api/combos/route-200d63272da34918.js +0 -1
  822. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-200d63272da34918.js +0 -1
  823. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-200d63272da34918.js +0 -1
  824. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-200d63272da34918.js +0 -1
  825. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-200d63272da34918.js +0 -1
  826. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-200d63272da34918.js +0 -1
  827. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-200d63272da34918.js +0 -1
  828. package/app/.next-cli-build/static/chunks/app/api/health/route-200d63272da34918.js +0 -1
  829. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-200d63272da34918.js +0 -1
  830. package/app/.next-cli-build/static/chunks/app/api/init/route-200d63272da34918.js +0 -1
  831. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-200d63272da34918.js +0 -1
  832. package/app/.next-cli-build/static/chunks/app/api/keys/route-200d63272da34918.js +0 -1
  833. package/app/.next-cli-build/static/chunks/app/api/locale/route-200d63272da34918.js +0 -1
  834. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-200d63272da34918.js +0 -1
  835. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-200d63272da34918.js +0 -1
  836. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-200d63272da34918.js +0 -1
  837. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-200d63272da34918.js +0 -1
  838. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-200d63272da34918.js +0 -1
  839. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-200d63272da34918.js +0 -1
  840. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-200d63272da34918.js +0 -1
  841. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-200d63272da34918.js +0 -1
  842. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-200d63272da34918.js +0 -1
  843. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-200d63272da34918.js +0 -1
  844. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-200d63272da34918.js +0 -1
  845. package/app/.next-cli-build/static/chunks/app/api/models/route-200d63272da34918.js +0 -1
  846. package/app/.next-cli-build/static/chunks/app/api/models/test/route-200d63272da34918.js +0 -1
  847. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-200d63272da34918.js +0 -1
  848. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-200d63272da34918.js +0 -1
  849. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-200d63272da34918.js +0 -1
  850. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-200d63272da34918.js +0 -1
  851. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-200d63272da34918.js +0 -1
  852. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-200d63272da34918.js +0 -1
  853. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-200d63272da34918.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-200d63272da34918.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-200d63272da34918.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-200d63272da34918.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-200d63272da34918.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-200d63272da34918.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-200d63272da34918.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-200d63272da34918.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-200d63272da34918.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/pricing/route-200d63272da34918.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-200d63272da34918.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-200d63272da34918.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-200d63272da34918.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-200d63272da34918.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-200d63272da34918.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-200d63272da34918.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-200d63272da34918.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-200d63272da34918.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-200d63272da34918.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-200d63272da34918.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-200d63272da34918.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-200d63272da34918.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-200d63272da34918.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-200d63272da34918.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-200d63272da34918.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-200d63272da34918.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-200d63272da34918.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-200d63272da34918.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/providers/route-200d63272da34918.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-200d63272da34918.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-200d63272da34918.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-200d63272da34918.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-200d63272da34918.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-200d63272da34918.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-200d63272da34918.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-200d63272da34918.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-200d63272da34918.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-200d63272da34918.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-200d63272da34918.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-200d63272da34918.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-200d63272da34918.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-200d63272da34918.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-200d63272da34918.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/settings/route-200d63272da34918.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-200d63272da34918.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-200d63272da34918.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-200d63272da34918.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/tags/route-200d63272da34918.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-200d63272da34918.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-200d63272da34918.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-200d63272da34918.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-200d63272da34918.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-200d63272da34918.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-200d63272da34918.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-200d63272da34918.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-200d63272da34918.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-200d63272da34918.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-200d63272da34918.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-200d63272da34918.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-200d63272da34918.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-200d63272da34918.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-200d63272da34918.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-200d63272da34918.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-200d63272da34918.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-200d63272da34918.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-200d63272da34918.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-200d63272da34918.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-200d63272da34918.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-200d63272da34918.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-200d63272da34918.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-200d63272da34918.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-200d63272da34918.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-200d63272da34918.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-200d63272da34918.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-200d63272da34918.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-200d63272da34918.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-200d63272da34918.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-200d63272da34918.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-200d63272da34918.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-200d63272da34918.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-200d63272da34918.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-200d63272da34918.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-200d63272da34918.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-200d63272da34918.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-200d63272da34918.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-200d63272da34918.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-200d63272da34918.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-200d63272da34918.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/v1/route-200d63272da34918.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-200d63272da34918.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-200d63272da34918.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-200d63272da34918.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-200d63272da34918.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/version/route-200d63272da34918.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-200d63272da34918.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/version/update/route-200d63272da34918.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-200d63272da34918.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/page-200d63272da34918.js +0 -1
  951. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-200d63272da34918.js +0 -1
  952. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-200d63272da34918.js +0 -1
  953. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-200d63272da34918.js +0 -1
  954. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-200d63272da34918.js +0 -1
  955. package/app/.next-cli-build/static/css/78539cadb589145c.css +0 -1
  956. package/app/.next-cli-build/static/dHWTn-aPGqZj1NLa8-PSh/_buildManifest.js +0 -1
  957. /package/app/.next-cli-build/static/{dHWTn-aPGqZj1NLa8-PSh → LTz0FqDsVsVSFbsHZibmc}/_ssgManifest.js +0 -0
  958. /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.7.4-to-0.7.5-0.7.5-20260722-212802 → upgrade-0.7.7-to-0.7.8-0.7.8-20260727-004850}/data.sqlite +0 -0
@@ -1,4 +1,26 @@
1
- "use strict";exports.id=2722,exports.ids=[2722],exports.modules={36811:a=>{a.exports={TOOL_HOSTS:{antigravity:["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com"],copilot:["api.individual.githubcopilot.com"],kiro:["runtime.us-east-1.kiro.dev","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"],cursor:["api2.cursor.sh"],zed:["cloud.zed.dev"]}}},44283:(a,b,c)=>{c.d(b,{Tk:()=>r,aG:()=>E,Ah:()=>s,h1:()=>D,Q6:()=>C,lF:()=>H,a7:()=>z,ZM:()=>u,RF:()=>x,mW:()=>I,c9:()=>F,gY:()=>P,tA:()=>K,kn:()=>M,yZ:()=>v,qO:()=>A});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(12020);let i="__custom__",j="__save__",k=a=>{};function l({value:a,onChange:b,requiresExternalUrl:c=!1,tunnelEnabled:f=!1,tunnelPublicUrl:g="",tailscaleEnabled:m=!1,tailscaleUrl:n="",cloudEnabled:o=!1,cloudUrl:p="",withV1:q=!0}){let[r,s]=(0,e.useState)([]),[t,u]=(0,e.useState)(""),[v,w]=(0,e.useState)("");(0,e.useRef)(!1);let x=(0,e.useMemo)(()=>(({requiresExternalUrl:a,tunnelEnabled:b,tunnelPublicUrl:c,tailscaleEnabled:d,tailscaleUrl:e,cloudEnabled:f,cloudUrl:g,savedPresets:j,withV1:k})=>{let l=[],m=a=>{let b;return k?(b=(a||"").replace(/\/+$/,""))?/\/v1$/.test(b)?b:`${b}/v1`:"":(a||"").replace(/\/+$/,"")};if(!a){let a=m(`http://127.0.0.1:${h.h0.appPort}`);l.push({value:"local",label:a,url:a})}if(b&&c){let a=m(c);l.push({value:"tunnel",label:a,url:a})}if(d&&e){let a=m(e);l.push({value:"tailscale",label:a,url:a})}if(f&&g){let a=m(g);l.push({value:"cloud",label:a,url:a})}return j.forEach(a=>{l.push({value:`saved:${a.name}`,label:a.baseUrl,url:a.baseUrl,saved:!0})}),l.push({value:i,label:"Custom URL...",url:""}),l})({requiresExternalUrl:c,tunnelEnabled:f,tunnelPublicUrl:g,tailscaleEnabled:m,tailscaleUrl:n,cloudEnabled:o,cloudUrl:p,savedPresets:r,withV1:q}),[c,f,g,m,n,o,p,r,q]),y=t.startsWith("saved:"),z=t===i,A=z&&(v||"").trim().length>0;return(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("select",{value:t,onChange:c=>{let d=c.target.value;if(d===j){let b=(a||"").trim();if(!b)return;let c=b;try{c=new URL(b).host}catch{}let d=window.prompt("Save endpoint as:",c);if(!d?.trim())return;let e=[...r.filter(a=>a.name!==d.trim()),{name:d.trim(),baseUrl:b}].sort((a,b)=>a.name.localeCompare(b.name));s(e),k(e);return}if(u(d),d===i){w(""),b("");return}let e=x.find(a=>a.value===d);e&&b(e.url)},className:"flex-1 min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[x.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value)),A&&(0,d.jsx)("option",{value:j,children:"+ Save current as..."})]}),y&&(0,d.jsx)("button",{type:"button",onClick:()=>{if(!t.startsWith("saved:"))return;let a=t.slice(6),c=r.filter(b=>b.name!==a);s(c),k(c),u(i),w(""),b("")},className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors shrink-0",title:"Delete saved endpoint",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]}),z&&(0,d.jsx)("input",{type:"text",value:v,onChange:a=>{let c=a.target.value;w(c),b(c)},placeholder:q?"https://example.com/v1":"https://example.com",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"})]})}let m="__custom__";function n({value:a,onChange:b,apiKeys:c=[],cloudEnabled:f=!1,className:g=""}){let h=!c.some(b=>b.key===a)&&""!==a,[i,j]=(0,e.useState)(()=>a?c.some(b=>b.key===a)?a:m:c.length>0?c[0].key:m),[k,l]=(0,e.useState)(h?a:"");return 0===c.length&&i!==m&&i!==m?(0,d.jsx)("span",{className:`min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5 ${g}`,children:f?"No API keys - Create one in Keys page":"sk_extremerouter (default)"}):(0,d.jsxs)("div",{className:`flex flex-col gap-1.5 ${g}`,children:[(0,d.jsxs)("select",{value:i,onChange:a=>{let c=a.target.value;j(c),c===m?(l(""),b("")):b(c)},className:"w-full min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[c.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id)),(0,d.jsx)("option",{value:m,children:"Custom..."})]}),i===m&&(0,d.jsx)("input",{type:"text",value:k,onChange:a=>{let c=a.target.value;l(c),b(c)},placeholder:"sk-...",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"})]})}let o=a=>(a||"").replace(/\/+$/,"");function p(a,b={}){if(!a)return!1;let c=o(a),{tunnelPublicUrl:d,tailscaleUrl:e,cloudUrl:f}=b;return!!(/localhost|127\.0\.0\.1|0\.0\.0\.0/.test(c)||d&&c.startsWith(o(d))||e&&c.startsWith(o(e))||f&&c.startsWith(o(f)))}let q=process.env.NEXT_PUBLIC_CLOUD_URL;function r({tool:a,isExpanded:b,onToggle:c,activeProviders:h,modelMappings:i,onModelMappingChange:j,baseUrl:k,hasActiveProviders:m,apiKeys:o,cloudEnabled:s,initialStatus:t,tunnelEnabled:u,tunnelPublicUrl:v,tailscaleEnabled:w,tailscaleUrl:x}){let y,z,A,[B,C]=(0,e.useState)(t||null),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(null),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)(null),[R,S]=(0,e.useState)(""),[T,U]=(0,e.useState)({}),[V,W]=(0,e.useState)(!1),[X,Y]=(0,e.useState)(""),[Z,$]=(0,e.useState)(!1);(0,e.useRef)(!1);let _=(()=>{if(!B?.installed)return null;let a=B.settings?.env?.ANTHROPIC_BASE_URL;return a?p(a,{tunnelPublicUrl:v,tailscaleUrl:x,cloudUrl:s?q:null})?"configured":"other":"not_configured"})(),aa=async a=>{let b=a.target.checked;$(b),await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({ccFilterNaming:b})}).catch(()=>{})},ab=()=>{let a=X||k;return a.endsWith("/v1")?a:`${a}/v1`},ac=async()=>{G(!0),K(null);try{let b={ANTHROPIC_BASE_URL:ab()},c=R?.trim()||(o?.length>0?o[0].key:null)||(s?null:"sk_extremerouter");c&&(b.ANTHROPIC_AUTH_TOKEN=c),a.defaultModels.forEach(a=>{let c=i[a.alias];c&&a.envKey&&(b[a.envKey]=c)});let d=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:b})}),e=await d.json();d.ok?(K({type:"success",text:"Settings applied successfully!"}),C(a=>({...a,hasBackup:!0,settings:{...a?.settings,env:b}}))):K({type:"error",text:e.error||"Failed to apply settings"})}catch(a){K({type:"error",text:a.message})}finally{G(!1)}},ad=async()=>{I(!0),K(null);try{let b=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),c=await b.json();b.ok?(K({type:"success",text:"Settings reset successfully!"}),a.defaultModels.forEach(a=>j(a.alias,a.defaultValue||"")),S("")):K({type:"error",text:c.error||"Failed to reset settings"})}catch(a){K({type:"error",text:a.message})}finally{I(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/claude.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===_&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===_&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===_&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[D&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Claude CLI..."})]}),!D&&B&&!B.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if extremerouter is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>W(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>M(!L),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:L?"expand_less":"help"}),L?"Hide":"How to Install"]})]})]}),L&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!D&&B?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(l,{value:X||((y=X||k).endsWith("/v1")?y:`${y}/v1`),onChange:Y,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:u,tunnelPublicUrl:v,tailscaleEnabled:w,tailscaleUrl:x})]}),B?.settings?.env?.ANTHROPIC_BASE_URL&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:B.settings.env.ANTHROPIC_BASE_URL})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(n,{value:R,onChange:S,apiKeys:o,cloudEnabled:s})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:i[a.alias]||"",onChange:b=>j(a.alias,b.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),i[a.alias]&&(0,d.jsx)("button",{onClick:()=>j(a.alias,""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>{Q(a.alias),O(!0)},disabled:!m,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${m?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]},a.alias)),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Filter naming"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,d.jsx)("input",{type:"checkbox",checked:Z,onChange:aa,className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Filter naming requests"}),(0,d.jsx)(f.m_,{text:"Intercepts Claude Code's topic-naming requests and returns a fake response locally, saving API tokens.",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]})]}),J&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===J.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===J.type?"check_circle":"error"}),(0,d.jsx)("span",{children:J.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ac,disabled:!m,loading:F,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ad,disabled:!B?.hasExtremeRouter,loading:H,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>W(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:N,onClose:()=>O(!1),onSelect:a=>{P&&j(P,a.value)},selectedModel:P?i[P]:null,activeProviders:h,modelAliases:T,title:`Select model for ${P}`}),(0,d.jsx)(f.uR,{isOpen:V,onClose:()=>W(!1),title:"Claude CLI - Manual Configuration",configs:(z=R&&R.trim()?R:s?"<API_KEY_FROM_DASHBOARD>":"sk_extremerouter",A={ANTHROPIC_BASE_URL:ab(),ANTHROPIC_AUTH_TOKEN:z},a.defaultModels.forEach(a=>{let b=i[a.alias];b&&a.envKey&&(A[a.envKey]=b)}),[{filename:"~/.claude/settings.json",content:JSON.stringify({hasCompletedOnboarding:!0,env:A},null,2)}])})]})}function s({tool:a,isExpanded:b,onToggle:c,baseUrl:h,apiKeys:i,activeProviders:j,cloudEnabled:k,initialStatus:m,tunnelEnabled:o,tunnelPublicUrl:q,tailscaleEnabled:r,tailscaleUrl:t}){let u,v,w,x,[y,z]=(0,e.useState)(m||null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(null),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(""),[M,N]=(0,e.useState)(""),[O,P]=(0,e.useState)(""),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)({}),[W,X]=(0,e.useState)(!1),[Y,Z]=(0,e.useState)(""),$=(()=>{if(!y?.installed)return null;if(!y.config)return"not_configured";let a=y.config.match(/base_url\s*=\s*"([^"]+)"/);return p(a?a[1]:"",{tunnelPublicUrl:q,tailscaleUrl:t})?"configured":"other"})(),_=()=>{let a=Y||`${h}/v1`;return a.endsWith("/v1")?a:`${a}/v1`},aa=async()=>{B(!0);try{let a=await fetch("/api/cli-tools/codex-settings"),b=await a.json();z(b)}catch(a){z({installed:!1,error:a.message})}finally{B(!1)}},ab=async()=>{D(!0),H(null);try{let a=K&&K.trim()||k?K:"sk_extremerouter",b=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:_(),apiKey:a,model:M,subagentModel:O||M})}),c=await b.json();b.ok?(H({type:"success",text:"Settings applied successfully!"}),aa()):H({type:"error",text:c.error||"Failed to apply settings"})}catch(a){H({type:"error",text:a.message})}finally{D(!1)}},ac=async()=>{F(!0),H(null);try{let a=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),b=await a.json();a.ok?(H({type:"success",text:"Settings reset successfully!"}),N(""),P(""),aa()):H({type:"error",text:b.error||"Failed to reset settings"})}catch(a){H({type:"error",text:a.message})}finally{F(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/codex.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===$&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===$&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===$&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[A&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Codex CLI..."})]}),!A&&y&&!y.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Codex CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if extremerouter is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>X(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>J(!I),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:I?"expand_less":"help"}),I?"Hide":"How to Install"]})]})]}),I&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," to verify."]}),(0,d.jsx)("div",{className:"pt-2 border-t border-border",children:(0,d.jsxs)("p",{className:"text-text-muted text-xs",children:["Codex uses ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/auth.json"})," with ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"OPENAI_API_KEY"}),'. Click "Apply" to auto-configure.']})})]})]})]}),!A&&y?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(l,{value:Y||Y||`${h}/v1`,onChange:Z,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:o,tunnelPublicUrl:q,tailscaleEnabled:r,tailscaleUrl:t})]}),y?.config&&((v=(u=y.config.match(/base_url\s*=\s*"([^"]+)"/))?u[1]:null)?(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:v})]}):null),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(n,{value:K,onChange:L,apiKeys:i,cloudEnabled:k})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:M,onChange:a=>N(a.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),M&&(0,d.jsx)("button",{onClick:()=>N(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>R(!0),disabled:!j?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Subagent Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:O,onChange:a=>P(a.target.value),placeholder:M||"provider/model-id (defaults to main model)",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),O&&(0,d.jsx)("button",{onClick:()=>P(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>T(!0),disabled:!j?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]})]}),G&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===G.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===G.type?"check_circle":"error"}),(0,d.jsx)("span",{children:G.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ab,disabled:!K&&k&&i.length>0||!M,loading:C,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ac,disabled:E,loading:E,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>X(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:Q,onClose:()=>R(!1),onSelect:a=>{N(a.value),O||P(a.value),R(!1)},selectedModel:M,activeProviders:j,modelAliases:U,title:"Select Model for Codex"}),(0,d.jsx)(f.rq,{isOpen:S,onClose:()=>T(!1),onSelect:a=>{P(a.value),T(!1)},selectedModel:O,activeProviders:j,modelAliases:U,title:"Select Subagent Model for Codex"}),(0,d.jsx)(f.uR,{isOpen:W,onClose:()=>X(!1),title:"Codex CLI - Manual Configuration",configs:(w=K&&K.trim()?K:k?"<API_KEY_FROM_DASHBOARD>":"sk_extremerouter",x=O||M,[{filename:"~/.codex/config.toml",content:`# ExtremeRouter Configuration for Codex CLI
1
+ "use strict";exports.id=2342,exports.ids=[2342],exports.modules={36811:a=>{a.exports={TOOL_HOSTS:{antigravity:["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com"],copilot:["api.individual.githubcopilot.com"],kiro:["runtime.us-east-1.kiro.dev","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"],cursor:["api2.cursor.sh"],zed:["cloud.zed.dev"]}}},62911:(a,b,c)=>{c.d(b,{dM:()=>e,wn:()=>d});let d={antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",mitmDomain:"daily-cloudcode-pa.googleapis.com",modelAliases:["gemini-3.5-flash-low","gemini-3-flash-agent","gemini-3.5-flash-extra-low","gemini-3.1-pro-low","gemini-pro-agent","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3-flash"],defaultModels:[{id:"gemini-3.5-flash-low",name:"Gemini 3.5 Flash (Medium) / Default",alias:"gemini-3.5-flash-low"},{id:"gemini-3-flash-agent",name:"Gemini 3.5 Flash (High)",alias:"gemini-3-flash-agent"},{id:"gemini-3.5-flash-extra-low",name:"Gemini 3.5 Flash (Low)",alias:"gemini-3.5-flash-extra-low"},{id:"gemini-3.1-pro-low",name:"Gemini 3.1 Pro (Low)",alias:"gemini-3.1-pro-low"},{id:"gemini-pro-agent",name:"Gemini 3.1 Pro (High)",alias:"gemini-pro-agent"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6 (Thinking)",alias:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 (Thinking)",alias:"claude-opus-4-6-thinking"},{id:"gpt-oss-120b-medium",name:"GPT-OSS 120B (Medium)",alias:"gpt-oss-120b-medium"},{id:"gemini-3-flash",name:"Gemini 3 Flash (Command)",alias:"gemini-3-flash"}]},copilot:{id:"copilot",name:"GitHub Copilot",image:"/providers/copilot.png",color:"#1F6FEB",description:"GitHub Copilot IDE with MITM",configType:"mitm",mitmDomain:"api.individual.githubcopilot.com",modelAliases:["gpt-5-mini","gpt-5.4-nano","claude-haiku-4.5","gpt-4o","gpt-4.1"],defaultModels:[{id:"gpt-5-mini",name:"GPT-5 mini",alias:"gpt-5-mini"},{id:"gpt-5.4-nano",name:"GPT-5.4 nano",alias:"gpt-5.4-nano"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"gpt-4o",name:"GPT-4o",alias:"gpt-4o"},{id:"gpt-4.1",name:"GPT-4.1",alias:"gpt-4.1"}]},kiro:{id:"kiro",name:"Kiro",image:"/providers/kiro.png",color:"#FF6B00",description:"Kiro IDE with MITM",configType:"mitm",mitmDomain:"q.us-east-1.amazonaws.com",defaultModels:[{id:"claude-sonnet-5",name:"Claude Sonnet 5",alias:"claude-sonnet-5"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4",alias:"claude-sonnet-4"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"deepseek-3.2",name:"DeepSeek 3.2",alias:"deepseek-3.2"},{id:"minimax-m2.1",name:"MiniMax M2.1",alias:"minimax-m2.1"},{id:"simple-task",name:"Qwen3 Coder Next",alias:"simple-task"},{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",alias:"gpt-5.6-sol"},{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",alias:"gpt-5.6-terra"},{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",alias:"gpt-5.6-luna"}]},zed:{id:"zed",name:"Zed Editor",image:"/providers/zed.svg",color:"#1348DC",description:"Zed Editor (Hosted AI) with MITM",configType:"mitm",mitmDomain:"cloud.zed.dev",defaultModels:[{id:"claude-sonnet-5",name:"Claude Sonnet 5",alias:"claude-sonnet-5"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6"},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4-5"},{id:"claude-haiku-4-5",name:"Claude Haiku 4.5",alias:"claude-haiku-4-5"},{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",alias:"gpt-5.6-sol"},{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",alias:"gpt-5.6-terra"},{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",alias:"gpt-5.6-luna"},{id:"gpt-5.5",name:"GPT-5.5",alias:"gpt-5.5"},{id:"gpt-5-mini",name:"GPT-5 mini",alias:"gpt-5-mini"},{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro",alias:"gemini-3.1-pro-preview"},{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",alias:"gemini-3.5-flash"}]}},e={claude:{id:"claude",name:"Claude Code",image:"/providers/claude.png",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-6"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-4-6"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},codex:{id:"codex",name:"OpenAI Codex CLI / App",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},grok:{id:"grok",name:"Grok Build CLI",image:"/providers/xai.png",color:"#1DA1F2",description:"xAI Grok Build — open-source terminal coding CLI",configType:"guide",guideSteps:[{step:1,title:"Install Grok Build",desc:"Install via npm or cargo (see grok-build on GitHub)"},{step:2,title:"Set API Key",desc:"Export your ExtremeRouter API key",value:"export XAI_API_KEY={{apiKey}}",copyable:!0},{step:3,title:"Set Base URL",desc:"Point Grok Build at ExtremeRouter",value:"export XAI_BASE_URL={{baseUrl}}",copyable:!0},{step:4,title:"Set Model",desc:"Pick a model from ExtremeRouter",value:"export XAI_MODEL={{model}}",copyable:!0},{step:5,title:"Run",desc:"Start Grok Build in your project directory",value:"grok-build",copyable:!0}],modelAliases:["grok-4.5","grok-4-fast-reasoning","grok-code-fast-1"],defaultModels:[{id:"grok-4.5",name:"Grok 4.5",alias:"grok-4.5",defaultValue:"xai/grok-4.5"},{id:"grok-4-fast-reasoning",name:"Grok 4 Fast Reasoning",alias:"grok-4-fast-reasoning",defaultValue:"xai/grok-4-fast-reasoning"},{id:"grok-code-fast-1",name:"Grok Code Fast 1",alias:"grok-code-fast-1",defaultValue:"xai/grok-code-fast-1"}]},opencode:{id:"opencode",name:"OpenCode",image:"/providers/opencode.png",color:"#E87040",description:"OpenCode AI Terminal Assistant",configType:"custom"},cowork:{id:"cowork",name:"Claude Cowork",image:"/providers/claude.png",color:"#D97757",description:"Claude Desktop Cowork (third-party inference)",configType:"custom"},hermes:{id:"hermes",name:"Hermes Agent",image:"/providers/hermes.png",color:"#8B5CF6",description:"Nous Research self-improving AI agent",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresExternalUrl:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Tunnel or Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},zed:{id:"zed",name:"Zed",image:"/providers/zed.svg",color:"#1348DC",description:"Zed Editor with Hosted AI",configType:"custom",authMethod:"import",notes:[{type:"info",text:"Import your Zed Editor cloud credentials (user ID + access token) to route Zed Hosted AI through ExtremeRouter."}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#00D1B2",description:"Cline AI Coding Assistant",configType:"custom"},kilo:{id:"kilo",name:"Kilo Code",image:"/providers/kilocode.png",color:"#FF6B6B",description:"Kilo Code AI Assistant",configType:"custom"},roo:{id:"roo",name:"Roo",image:"/providers/roo.png",color:"#FF6B6B",description:"Roo AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Roo Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
2
+ "apiBase": "{{baseUrl}}",
3
+ "title": "{{model}}",
4
+ "model": "{{model}}",
5
+ "provider": "openai",
6
+ "apiKey": "{{apiKey}}"
7
+ }`}},amp:{id:"amp",name:"Amp CLI",image:"/providers/amp.png",color:"#F97316",description:"Sourcegraph Amp coding assistant CLI",docsUrl:"/docs?section=cli-tools&tool=amp",configType:"guide",defaultCommand:"amp",modelAliases:["g25p","g25f","cs45","g54"],notes:[{type:"info",text:"Use ExtremeRouter model aliases to keep Amp shorthand mappings stable across provider updates."},{type:"warning",text:"Suggested shorthand examples: g25p → gemini/gemini-2.5-pro, g25f → gemini/gemini-2.5-flash, cs45 → cc/claude-sonnet-4-5-20250929."}],guideSteps:[{step:1,title:"Install Amp",desc:"Install the Amp CLI using the package manager supported by your environment."},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"Select Model",type:"modelSelector"},{step:5,title:"Add Shorthands",desc:"Map Amp shorthand names such as g25p or cs45 to ExtremeRouter aliases in your local config."}],codeBlock:{language:"bash",code:`export OPENAI_API_KEY="{{apiKey}}"
8
+ export OPENAI_BASE_URL="{{baseUrl}}"
9
+ amp --model "{{model}}"
10
+ # Example shorthand aliases you can map locally:
11
+ # g25p -> gemini/gemini-2.5-pro
12
+ # cs45 -> cc/claude-sonnet-4-5-20250929`}},qwen:{id:"qwen",name:"Qwen Code",image:"/providers/qwen.png",color:"#10B981",description:"Alibaba Qwen Code CLI — supports OpenAI, Anthropic & Gemini providers via ExtremeRouter",docsUrl:"https://qwenlm.github.io/qwen-code-docs/en/users/configuration/model-providers/",configType:"guide",defaultCommand:"qwen",notes:[{type:"info",text:"Qwen Code supports multiple provider types (openai, anthropic, gemini) via modelProviders in settings.json. ExtremeRouter works as an OpenAI-compatible endpoint."},{type:"info",text:"Any model available in ExtremeRouter can be used — not just Qwen models. Select from Qwen, Claude, Gemini, GPT, and more."},{type:"warning",text:"Config path: Linux/macOS ~/.qwen/settings.json • Windows %USERPROFILE%\\.qwen\\settings.json"},{type:"error",text:"Qwen OAuth free tier was discontinued on 2026-04-15. Use ExtremeRouter with alicode/openrouter/anthropic/gemini providers instead."}],modelAliases:["coder-model","qwen3-coder-plus","qwen3-coder-flash","vision-model","claude-sonnet-4-6","claude-opus-4-6-thinking","gemini-3-flash","gemini-3.1-pro-high"],defaultModels:[{id:"coder-model",name:"Coder Model (Qwen 3.6 Plus)",alias:"coder-model",envKey:"OPENAI_MODEL",defaultValue:"coder-model",isTopLevel:!0},{id:"qwen3-coder-plus",name:"Qwen 3 Coder Plus",alias:"qwen3-coder-plus",envKey:"OPENAI_MODEL",defaultValue:"qwen3-coder-plus"},{id:"qwen3-coder-flash",name:"Qwen 3 Coder Flash",alias:"qwen3-coder-flash",envKey:"OPENAI_MODEL",defaultValue:"qwen3-coder-flash"},{id:"vision-model",name:"Vision Model (Multimodal)",alias:"vision-model",envKey:"OPENAI_MODEL",defaultValue:"vision-model"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6",envKey:"OPENAI_MODEL",defaultValue:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",alias:"claude-opus-4-6-thinking",envKey:"OPENAI_MODEL",defaultValue:"claude-opus-4-6-thinking"},{id:"gemini-3.1-pro-high",name:"Gemini 3.1 Pro High",alias:"gemini-3.1-pro-high",envKey:"OPENAI_MODEL",defaultValue:"gemini-3.1-pro-high"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash",envKey:"OPENAI_MODEL",defaultValue:"gemini-3-flash"}],guideSteps:[{step:1,title:"Install Qwen Code",desc:"npm install -g @qwen-code/qwen-code"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"Select Model",type:"modelSelector"},{step:5,title:"Save Config",desc:"Copy the JSON below to your ~/.qwen/settings.json file."}],codeBlock:{language:"json",code:`{
13
+ "security": {
14
+ "auth": {
15
+ "selectedType": "openai",
16
+ "apiKey": "{{apiKey}}",
17
+ "baseUrl": "{{baseUrl}}"
18
+ }
19
+ },
20
+ "model": {
21
+ "name": "{{model}}"
22
+ }
23
+ }`}},"deepseek-tui":{id:"deepseek-tui",name:"DeepSeek TUI",image:"/providers/deepseek-tui.png",color:"#4D6BFE",description:"DeepSeek Terminal Coding Agent (Rust TUI)",docsUrl:"https://github.com/DeepSeek-TUI/DeepSeek-TUI",configType:"custom",defaultCommand:"deepseek",modelAliases:["deepseek-v4-pro","deepseek-v4-flash","deepseek-chat","deepseek-reasoner"],defaultModels:[{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",alias:"deepseek-v4-pro"},{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash",alias:"deepseek-v4-flash"},{id:"deepseek-chat",name:"DeepSeek V3 Chat",alias:"deepseek-chat"}],notes:[{type:"info",text:"DeepSeek TUI uses ~/.deepseek/config.toml for configuration. ExtremeRouter will update the provider to 'openai' mode with your base_url, api_key, and model."},{type:"warning",text:"Config path: Linux/macOS ~/.deepseek/config.toml • Windows %USERPROFILE%\\.deepseek\\config.toml"}]},jcode:{id:"jcode",name:"jcode",image:"/providers/jcode.png",color:"#FF6B35",description:"High-performance Rust-based coding agent harness",configType:"custom",docsUrl:"https://github.com/1jehuang/jcode",notes:[{type:"info",text:"jcode is a Rust-based coding agent with semantic memory, multi-agent swarms, and extreme performance (27.8 MB RAM, 14ms boot)."},{type:"info",text:"Configure extremerouter as an OpenAI-compatible provider to route all jcode requests through extremerouter's optimization layer."},{type:"warning",text:"Requires jcode installed. Install via: curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.sh | bash"}],defaultModels:[{id:"claude-opus-4-7",name:"Claude Opus 4.7",alias:"opus",defaultValue:"cc/claude-opus-4-7"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"sonnet",defaultValue:"cc/claude-sonnet-4-6"},{id:"gpt-5.5",name:"GPT 5.5",alias:"gpt5",defaultValue:"cx/gpt-5.5"},{id:"gemini-3.1-pro",name:"Gemini 3.1 Pro",alias:"gemini",defaultValue:"gemini/gemini-3.1-pro"}]}}},95231:(a,b,c)=>{c.d(b,{Tk:()=>r,aG:()=>E,Ah:()=>s,h1:()=>D,Q6:()=>C,lF:()=>H,a7:()=>z,ZM:()=>u,RF:()=>x,mW:()=>I,c9:()=>F,gY:()=>P,tA:()=>K,kn:()=>M,yZ:()=>v,qO:()=>A});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(12020);let i="__custom__",j="__save__",k=a=>{};function l({value:a,onChange:b,requiresExternalUrl:c=!1,tunnelEnabled:f=!1,tunnelPublicUrl:g="",tailscaleEnabled:m=!1,tailscaleUrl:n="",cloudEnabled:o=!1,cloudUrl:p="",withV1:q=!0}){let[r,s]=(0,e.useState)([]),[t,u]=(0,e.useState)(""),[v,w]=(0,e.useState)("");(0,e.useRef)(!1);let x=(0,e.useMemo)(()=>(({requiresExternalUrl:a,tunnelEnabled:b,tunnelPublicUrl:c,tailscaleEnabled:d,tailscaleUrl:e,cloudEnabled:f,cloudUrl:g,savedPresets:j,withV1:k})=>{let l=[],m=a=>{let b;return k?(b=(a||"").replace(/\/+$/,""))?/\/v1$/.test(b)?b:`${b}/v1`:"":(a||"").replace(/\/+$/,"")};if(!a){let a=m(`http://127.0.0.1:${h.h0.appPort}`);l.push({value:"local",label:a,url:a})}if(b&&c){let a=m(c);l.push({value:"tunnel",label:a,url:a})}if(d&&e){let a=m(e);l.push({value:"tailscale",label:a,url:a})}if(f&&g){let a=m(g);l.push({value:"cloud",label:a,url:a})}return j.forEach(a=>{l.push({value:`saved:${a.name}`,label:a.baseUrl,url:a.baseUrl,saved:!0})}),l.push({value:i,label:"Custom URL...",url:""}),l})({requiresExternalUrl:c,tunnelEnabled:f,tunnelPublicUrl:g,tailscaleEnabled:m,tailscaleUrl:n,cloudEnabled:o,cloudUrl:p,savedPresets:r,withV1:q}),[c,f,g,m,n,o,p,r,q]),y=t.startsWith("saved:"),z=t===i,A=z&&(v||"").trim().length>0;return(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("select",{value:t,onChange:c=>{let d=c.target.value;if(d===j){let b=(a||"").trim();if(!b)return;let c=b;try{c=new URL(b).host}catch{}let d=window.prompt("Save endpoint as:",c);if(!d?.trim())return;let e=[...r.filter(a=>a.name!==d.trim()),{name:d.trim(),baseUrl:b}].sort((a,b)=>a.name.localeCompare(b.name));s(e),k(e);return}if(u(d),d===i){w(""),b("");return}let e=x.find(a=>a.value===d);e&&b(e.url)},className:"flex-1 min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[x.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value)),A&&(0,d.jsx)("option",{value:j,children:"+ Save current as..."})]}),y&&(0,d.jsx)("button",{type:"button",onClick:()=>{if(!t.startsWith("saved:"))return;let a=t.slice(6),c=r.filter(b=>b.name!==a);s(c),k(c),u(i),w(""),b("")},className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors shrink-0",title:"Delete saved endpoint",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]}),z&&(0,d.jsx)("input",{type:"text",value:v,onChange:a=>{let c=a.target.value;w(c),b(c)},placeholder:q?"https://example.com/v1":"https://example.com",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"})]})}let m="__custom__";function n({value:a,onChange:b,apiKeys:c=[],cloudEnabled:f=!1,className:g=""}){let h=!c.some(b=>b.key===a)&&""!==a,[i,j]=(0,e.useState)(()=>a?c.some(b=>b.key===a)?a:m:c.length>0?c[0].key:m),[k,l]=(0,e.useState)(h?a:"");return 0===c.length&&i!==m&&i!==m?(0,d.jsx)("span",{className:`min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5 ${g}`,children:f?"No API keys - Create one in Keys page":"sk_extremerouter (default)"}):(0,d.jsxs)("div",{className:`flex flex-col gap-1.5 ${g}`,children:[(0,d.jsxs)("select",{value:i,onChange:a=>{let c=a.target.value;j(c),c===m?(l(""),b("")):b(c)},className:"w-full min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[c.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id)),(0,d.jsx)("option",{value:m,children:"Custom..."})]}),i===m&&(0,d.jsx)("input",{type:"text",value:k,onChange:a=>{let c=a.target.value;l(c),b(c)},placeholder:"sk-...",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"})]})}let o=a=>(a||"").replace(/\/+$/,"");function p(a,b={}){if(!a)return!1;let c=o(a),{tunnelPublicUrl:d,tailscaleUrl:e,cloudUrl:f}=b;return!!(/localhost|127\.0\.0\.1|0\.0\.0\.0/.test(c)||d&&c.startsWith(o(d))||e&&c.startsWith(o(e))||f&&c.startsWith(o(f)))}let q=process.env.NEXT_PUBLIC_CLOUD_URL;function r({tool:a,isExpanded:b,onToggle:c,activeProviders:h,modelMappings:i,onModelMappingChange:j,baseUrl:k,hasActiveProviders:m,apiKeys:o,cloudEnabled:s,initialStatus:t,tunnelEnabled:u,tunnelPublicUrl:v,tailscaleEnabled:w,tailscaleUrl:x}){let y,z,A,[B,C]=(0,e.useState)(t||null),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(null),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)(null),[R,S]=(0,e.useState)(""),[T,U]=(0,e.useState)({}),[V,W]=(0,e.useState)(!1),[X,Y]=(0,e.useState)(""),[Z,$]=(0,e.useState)(!1);(0,e.useRef)(!1);let _=(()=>{if(!B?.installed)return null;let a=B.settings?.env?.ANTHROPIC_BASE_URL;return a?p(a,{tunnelPublicUrl:v,tailscaleUrl:x,cloudUrl:s?q:null})?"configured":"other":"not_configured"})(),aa=async a=>{let b=a.target.checked;$(b),await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({ccFilterNaming:b})}).catch(()=>{})},ab=()=>{let a=X||k;return a.endsWith("/v1")?a:`${a}/v1`},ac=async()=>{G(!0),K(null);try{let b={ANTHROPIC_BASE_URL:ab()},c=R?.trim()||(o?.length>0?o[0].key:null)||(s?null:"sk_extremerouter");c&&(b.ANTHROPIC_AUTH_TOKEN=c),a.defaultModels.forEach(a=>{let c=i[a.alias];c&&a.envKey&&(b[a.envKey]=c)});let d=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:b})}),e=await d.json();d.ok?(K({type:"success",text:"Settings applied successfully!"}),C(a=>({...a,hasBackup:!0,settings:{...a?.settings,env:b}}))):K({type:"error",text:e.error||"Failed to apply settings"})}catch(a){K({type:"error",text:a.message})}finally{G(!1)}},ad=async()=>{I(!0),K(null);try{let b=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),c=await b.json();b.ok?(K({type:"success",text:"Settings reset successfully!"}),a.defaultModels.forEach(a=>j(a.alias,a.defaultValue||"")),S("")):K({type:"error",text:c.error||"Failed to reset settings"})}catch(a){K({type:"error",text:a.message})}finally{I(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/claude.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===_&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===_&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===_&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[D&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Claude CLI..."})]}),!D&&B&&!B.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if extremerouter is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>W(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>M(!L),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:L?"expand_less":"help"}),L?"Hide":"How to Install"]})]})]}),L&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!D&&B?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(l,{value:X||((y=X||k).endsWith("/v1")?y:`${y}/v1`),onChange:Y,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:u,tunnelPublicUrl:v,tailscaleEnabled:w,tailscaleUrl:x})]}),B?.settings?.env?.ANTHROPIC_BASE_URL&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:B.settings.env.ANTHROPIC_BASE_URL})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(n,{value:R,onChange:S,apiKeys:o,cloudEnabled:s})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:i[a.alias]||"",onChange:b=>j(a.alias,b.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),i[a.alias]&&(0,d.jsx)("button",{onClick:()=>j(a.alias,""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>{Q(a.alias),O(!0)},disabled:!m,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${m?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]},a.alias)),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Filter naming"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,d.jsx)("input",{type:"checkbox",checked:Z,onChange:aa,className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Filter naming requests"}),(0,d.jsx)(f.m_,{text:"Intercepts Claude Code's topic-naming requests and returns a fake response locally, saving API tokens.",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]})]}),J&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===J.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===J.type?"check_circle":"error"}),(0,d.jsx)("span",{children:J.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ac,disabled:!m,loading:F,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ad,disabled:!B?.hasExtremeRouter,loading:H,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>W(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:N,onClose:()=>O(!1),onSelect:a=>{P&&j(P,a.value)},selectedModel:P?i[P]:null,activeProviders:h,modelAliases:T,title:`Select model for ${P}`}),(0,d.jsx)(f.uR,{isOpen:V,onClose:()=>W(!1),title:"Claude CLI - Manual Configuration",configs:(z=R&&R.trim()?R:s?"<API_KEY_FROM_DASHBOARD>":"sk_extremerouter",A={ANTHROPIC_BASE_URL:ab(),ANTHROPIC_AUTH_TOKEN:z},a.defaultModels.forEach(a=>{let b=i[a.alias];b&&a.envKey&&(A[a.envKey]=b)}),[{filename:"~/.claude/settings.json",content:JSON.stringify({hasCompletedOnboarding:!0,env:A},null,2)}])})]})}function s({tool:a,isExpanded:b,onToggle:c,baseUrl:h,apiKeys:i,activeProviders:j,cloudEnabled:k,initialStatus:m,tunnelEnabled:o,tunnelPublicUrl:q,tailscaleEnabled:r,tailscaleUrl:t}){let u,v,w,x,[y,z]=(0,e.useState)(m||null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(null),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(""),[M,N]=(0,e.useState)(""),[O,P]=(0,e.useState)(""),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)({}),[W,X]=(0,e.useState)(!1),[Y,Z]=(0,e.useState)(""),$=(()=>{if(!y?.installed)return null;if(!y.config)return"not_configured";let a=y.config.match(/base_url\s*=\s*"([^"]+)"/);return p(a?a[1]:"",{tunnelPublicUrl:q,tailscaleUrl:t})?"configured":"other"})(),_=()=>{let a=Y||`${h}/v1`;return a.endsWith("/v1")?a:`${a}/v1`},aa=async()=>{B(!0);try{let a=await fetch("/api/cli-tools/codex-settings"),b=await a.json();z(b)}catch(a){z({installed:!1,error:a.message})}finally{B(!1)}},ab=async()=>{D(!0),H(null);try{let a=K&&K.trim()||k?K:"sk_extremerouter",b=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:_(),apiKey:a,model:M,subagentModel:O||M})}),c=await b.json();b.ok?(H({type:"success",text:"Settings applied successfully!"}),aa()):H({type:"error",text:c.error||"Failed to apply settings"})}catch(a){H({type:"error",text:a.message})}finally{D(!1)}},ac=async()=>{F(!0),H(null);try{let a=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),b=await a.json();a.ok?(H({type:"success",text:"Settings reset successfully!"}),N(""),P(""),aa()):H({type:"error",text:b.error||"Failed to reset settings"})}catch(a){H({type:"error",text:a.message})}finally{F(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/codex.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===$&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===$&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===$&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[A&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Codex CLI..."})]}),!A&&y&&!y.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Codex CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if extremerouter is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>X(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>J(!I),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:I?"expand_less":"help"}),I?"Hide":"How to Install"]})]})]}),I&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," to verify."]}),(0,d.jsx)("div",{className:"pt-2 border-t border-border",children:(0,d.jsxs)("p",{className:"text-text-muted text-xs",children:["Codex uses ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/auth.json"})," with ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"OPENAI_API_KEY"}),'. Click "Apply" to auto-configure.']})})]})]})]}),!A&&y?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(l,{value:Y||Y||`${h}/v1`,onChange:Z,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:o,tunnelPublicUrl:q,tailscaleEnabled:r,tailscaleUrl:t})]}),y?.config&&((v=(u=y.config.match(/base_url\s*=\s*"([^"]+)"/))?u[1]:null)?(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:v})]}):null),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(n,{value:K,onChange:L,apiKeys:i,cloudEnabled:k})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:M,onChange:a=>N(a.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),M&&(0,d.jsx)("button",{onClick:()=>N(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>R(!0),disabled:!j?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Subagent Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:O,onChange:a=>P(a.target.value),placeholder:M||"provider/model-id (defaults to main model)",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),O&&(0,d.jsx)("button",{onClick:()=>P(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>T(!0),disabled:!j?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]})]}),G&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===G.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===G.type?"check_circle":"error"}),(0,d.jsx)("span",{children:G.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ab,disabled:!K&&k&&i.length>0||!M,loading:C,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ac,disabled:E,loading:E,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>X(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:Q,onClose:()=>R(!1),onSelect:a=>{N(a.value),O||P(a.value),R(!1)},selectedModel:M,activeProviders:j,modelAliases:U,title:"Select Model for Codex"}),(0,d.jsx)(f.rq,{isOpen:S,onClose:()=>T(!1),onSelect:a=>{P(a.value),T(!1)},selectedModel:O,activeProviders:j,modelAliases:U,title:"Select Subagent Model for Codex"}),(0,d.jsx)(f.uR,{isOpen:W,onClose:()=>X(!1),title:"Codex CLI - Manual Configuration",configs:(w=K&&K.trim()?K:k?"<API_KEY_FROM_DASHBOARD>":"sk_extremerouter",x=O||M,[{filename:"~/.codex/config.toml",content:`# ExtremeRouter Configuration for Codex CLI
2
24
  model = "${M}"
3
25
  model_provider = "@rsalmn/extremerouter"
4
26
 
@@ -28,26 +50,4 @@ default_model = "${J||"cc/claude-opus-4-7"}"
28
50
  requires_api_key = true
29
51
 
30
52
  [[providers.extremerouter.models]]
31
- id = "${J||"cc/claude-opus-4-7"}"`},{filename:"~/.config/jcode/provider-extremerouter.env",content:`JCODE_EXTREMEROUTER_API_KEY="${v}"`}])})]})}let J="http://localhost:20128";function K({apiKeys:a,cloudEnabled:b,onStatusChange:c}){let[g,h]=(0,e.useState)(null),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(()=>a?.[0]?.key||""),[q,r]=(0,e.useState)(null),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(J),[y,z]=(0,e.useState)(null),A=g?.isWin===!0,B=A||g?.hasCachedPassword||g?.needsSudoPassword===!1,C=g?.isAdmin!==!1;!C&&(A||g?.hasCachedPassword||g?.needsSudoPassword);let D=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/cli-tools/antigravity-mitm");if(a.ok){let b=await a.json();h(b),b.mitmRouterBaseUrl&&x(b.mitmRouterBaseUrl),c?.(b)}}catch{h({running:!1,certExists:!1,dnsStatus:{}})}},[c]),E=a=>{v(null),g&&(B?F(a,""):(r(a),l(!0),t(null)))},F=async(c,d,e=!1)=>{j(!0),v(null);try{let f;if("trust-cert"===c)f=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"trust-cert",sudoPassword:d})});else if("start"===c){let c=o?.trim()||(a?.length>0?a[0].key:null)||(b?null:"sk_extremerouter");f=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:c,sudoPassword:d,mitmRouterBaseUrl:w.trim()||J,forceKillPort443:e})})}else f=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:d})});if(!f.ok){let a=await f.json().catch(()=>({}));if("PORT_443_BUSY"===a.code&&a.portOwner){l(!1),z({owner:a.portOwner,password:d});return}v(a.error||`Failed to ${c} MITM server`);return}l(!1),n(""),z(null),await D()}catch(a){v(a.message||"Network error")}finally{j(!1),r(null)}},G=()=>{m.trim()?F(q,m):t("Sudo password is required")},H=g?.running;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.Zp,{padding:"sm",className:"border-primary/20 bg-primary/5",children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"security"}),(0,d.jsx)("span",{className:"font-semibold text-sm text-text-main",children:"MITM Server"}),H?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Running"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Stopped"})]}),(0,d.jsx)("div",{className:"flex flex-wrap items-center gap-1 text-xs text-text-muted","data-i18n-skip":"true",children:[{label:"Cert",ok:g?.certExists},{label:"Trusted",ok:g?.certTrusted},{label:"Server",ok:H}].map(({label:a,ok:b})=>(0,d.jsxs)("span",{className:`flex items-center gap-0.5 px-1.5 py-0.5 rounded ${b?"text-green-600":"text-text-muted"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:b?"check_circle":"cancel"}),a]},a))})]}),(0,d.jsxs)("div",{className:"px-2 py-2 rounded-lg bg-surface/50 border border-border/50 flex flex-col gap-2",children:[(0,d.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"Purpose:"})," Use Antigravity IDE & GitHub Copilot → with ANY provider/model from ExtremeRouter"]}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Antigravity/Copilot IDE request → DNS redirect to localhost:443 → MITM proxy intercepts → ExtremeRouter → response to Antigravity/Copilot"]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid gap-1 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"ExtremeRouter Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:w,onChange:a=>x(a.target.value),placeholder:J,disabled:H,className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50"})]}),!H&&(0,d.jsxs)("div",{className:"grid gap-1 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",list:"mitm-api-keys",value:o,onChange:a=>p(a.target.value),placeholder:b?"Enter or pick API key":"sk_extremerouter (default)",className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50"}),a?.length>0&&(0,d.jsx)("datalist",{id:"mitm-api-keys",children:a.map(a=>(0,d.jsx)("option",{value:a.key,children:a.name||a.key},a.id))})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center","data-i18n-skip":"true",children:[g?.certExists&&!g?.certTrusted&&(0,d.jsxs)("button",{onClick:()=>E("trust-cert"),disabled:i,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-yellow-500/30 bg-yellow-500/10 px-4 py-2 text-xs font-medium text-yellow-600 transition-colors hover:bg-yellow-500/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"verified_user"}),"Trust Cert"]}),H?(0,d.jsxs)("button",{onClick:()=>E("stop"),disabled:i,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-xs font-medium text-red-500 transition-colors hover:bg-red-500/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop Server"]}):(0,d.jsxs)("button",{onClick:()=>E("start"),disabled:i||!g||A&&!C,title:A&&!C?"Administrator required":void 0,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-xs font-medium text-primary transition-colors hover:bg-primary/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start Server"]}),H&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Enable DNS per tool below to activate interception"})]}),u&&(0,d.jsxs)("div",{className:"flex items-start gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 dark:text-red-400 border border-red-500/20",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mt-0.5 shrink-0",children:"error"}),(0,d.jsx)("span",{children:u})]}),A&&!C&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 border border-red-500/20",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"shield_lock"}),(0,d.jsx)("span",{children:"Administrator required — restart ExtremeRouter as Administrator to use MITM"})]})]})}),k&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"mx-4 flex w-full max-w-sm flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and server startup"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:m,onChange:a=>n(a.target.value),onKeyDown:a=>{"Enter"!==a.key||i||G()}}),s&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,d.jsx)("span",{children:s})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{l(!1),n(""),t(null)},disabled:i,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:G,loading:i,children:"Confirm"})]})]})}),y&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Port 443 Already In Use"}),(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1 text-xs text-text-muted",children:[(0,d.jsx)("p",{children:"Port 443 is currently used by another process:"}),(0,d.jsxs)("p",{className:"font-mono text-text-main","data-i18n-skip":"true",children:[y.owner.name," (PID ",y.owner.pid,")"]}),(0,d.jsx)("p",{children:"Kill this process to start MITM Server?"})]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{z(null),j(!1)},disabled:i,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:()=>{F("start",y?.password||"",!0)},loading:i,children:"Kill & Start"})]})]})})]})}var L=c(36811);function M({tool:a,isExpanded:b,onToggle:c,serverRunning:h,dnsActive:i,hasCachedPassword:j,needsSudoPassword:k,isWin:l,apiKeys:m,activeProviders:n,hasActiveProviders:o,modelAliases:p={},cloudEnabled:q,onDnsChange:r}){let[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)(null),[E,F]=(0,e.useState)({}),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(null),K=L.TOOL_HOSTS[a.id]??[],N=l||j||!1===k,O=(0,e.useCallback)(async b=>{try{await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:a.id,mappings:b})})}catch{}},[a.id]),P=(a,b)=>{F(c=>({...c,[a]:b}))},Q=()=>{if(!h)return;let a=i?"disable":"enable";N?R(a,""):(B(a),x(!0),D(null))},R=async(b,c)=>{t(!0),v(null);try{let d=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:a.id,action:b,sudoPassword:c})}),e=await d.json();if(!d.ok)throw Error(e.error||"Failed to toggle DNS");"enable"===b&&v(`Restart ${a.name} to apply changes`),x(!1),z(""),r?.(e)}catch{}finally{t(!1),B(null)}},S=()=>{y.trim()?R(A,y):D("Sudo password is required")};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:a.image,alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),h?i?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Active"}):(0,d.jsx)(f.Ex,{variant:"warning",size:"sm",children:"DNS off"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Server off"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted sm:truncate",children:["Intercept ",a.name," requests via MITM proxy"]})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[K.length>0&&(0,d.jsxs)("div",{className:"mt-2 rounded-md border border-border bg-surface/50 px-2 py-1.5",children:[(0,d.jsx)("p",{className:"text-[10px] font-medium tracking-wide text-text-main/80 mb-1",children:"Edit hosts file manually to add the following entries:"}),(0,d.jsx)("ul",{className:"list-none space-y-0.5 font-mono text-[10px] text-text-muted break-all",children:K.map(a=>(0,d.jsxs)("li",{children:["127.0.0.1 ",a]},a))})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted px-1",children:[(0,d.jsxs)("p",{children:["Toggle DNS to redirect ",a.name," traffic through ExtremeRouter via MITM."]}),!i&&(0,d.jsx)("p",{className:"text-amber-600 text-[10px] mt-1",children:"⚠️ Enable DNS to edit model mappings"})]}),a.defaultModels?.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-2",children:a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[9rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:E[a.alias]||"",onChange:b=>P(a.alias,b.target.value),onBlur:b=>{var c,d;return c=a.alias,d=b.target.value,void O({...E,[c]:d})},placeholder:"provider/model-id",disabled:!i,className:`w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5 ${!i?"opacity-50 cursor-not-allowed":""}`}),E[a.alias]&&(0,d.jsx)("button",{onClick:()=>{P(a.alias,""),O({...E,[a.alias]:""})},className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>{J(a.alias),H(!0)},disabled:!o||!i,className:`rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 ${o&&i?"bg-surface border-border hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"})]},a.alias))}),a.defaultModels?.length===0&&(0,d.jsx)("p",{className:"text-xs text-text-muted px-1",children:"Model mappings will be available soon."}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:items-start",children:[i?(0,d.jsxs)("button",{onClick:Q,disabled:!h||s,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-xs font-medium text-red-500 transition-colors hover:bg-red-500/20 disabled:cursor-not-allowed disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop DNS"]}):(0,d.jsxs)("button",{onClick:Q,disabled:!h||s,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-xs font-medium text-primary transition-colors hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start DNS"]}),u&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs text-amber-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"warning"}),(0,d.jsx)("span",{children:u})]})]})]})]}),w&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"mx-4 flex w-full max-w-sm flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Required to modify /etc/hosts and flush DNS cache"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:y,onChange:a=>z(a.target.value),onKeyDown:a=>{"Enter"!==a.key||s||S()}}),C&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,d.jsx)("span",{children:C})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{x(!1),z(""),D(null)},disabled:s,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:S,loading:s,children:"Confirm"})]})]})}),(0,d.jsx)(f.rq,{isOpen:G,onClose:()=>H(!1),onSelect:a=>{if(!I||a.isPlaceholder)return;let b={...E,[I]:a.value};F(b),O(b)},selectedModel:I?E[I]:null,activeProviders:n,modelAliases:p,title:`Select model for ${I}`})]})}var N=c(2116),O=c.n(N);function P({tool:a}){return(0,d.jsx)(O(),{href:"/dashboard/mitm",className:"block",children:(0,d.jsx)(f.Zp,{padding:"sm",className:"overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:a.image,alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-purple-500/10 text-purple-600 dark:text-purple-400 rounded-full",children:"MITM"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"chevron_right"})]})})})}},62911:(a,b,c)=>{c.d(b,{dM:()=>e,wn:()=>d});let d={antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",mitmDomain:"daily-cloudcode-pa.googleapis.com",modelAliases:["gemini-3.5-flash-low","gemini-3-flash-agent","gemini-3.5-flash-extra-low","gemini-3.1-pro-low","gemini-pro-agent","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3-flash"],defaultModels:[{id:"gemini-3.5-flash-low",name:"Gemini 3.5 Flash (Medium) / Default",alias:"gemini-3.5-flash-low"},{id:"gemini-3-flash-agent",name:"Gemini 3.5 Flash (High)",alias:"gemini-3-flash-agent"},{id:"gemini-3.5-flash-extra-low",name:"Gemini 3.5 Flash (Low)",alias:"gemini-3.5-flash-extra-low"},{id:"gemini-3.1-pro-low",name:"Gemini 3.1 Pro (Low)",alias:"gemini-3.1-pro-low"},{id:"gemini-pro-agent",name:"Gemini 3.1 Pro (High)",alias:"gemini-pro-agent"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6 (Thinking)",alias:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 (Thinking)",alias:"claude-opus-4-6-thinking"},{id:"gpt-oss-120b-medium",name:"GPT-OSS 120B (Medium)",alias:"gpt-oss-120b-medium"},{id:"gemini-3-flash",name:"Gemini 3 Flash (Command)",alias:"gemini-3-flash"}]},copilot:{id:"copilot",name:"GitHub Copilot",image:"/providers/copilot.png",color:"#1F6FEB",description:"GitHub Copilot IDE with MITM",configType:"mitm",mitmDomain:"api.individual.githubcopilot.com",modelAliases:["gpt-5-mini","gpt-5.4-nano","claude-haiku-4.5","gpt-4o","gpt-4.1"],defaultModels:[{id:"gpt-5-mini",name:"GPT-5 mini",alias:"gpt-5-mini"},{id:"gpt-5.4-nano",name:"GPT-5.4 nano",alias:"gpt-5.4-nano"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"gpt-4o",name:"GPT-4o",alias:"gpt-4o"},{id:"gpt-4.1",name:"GPT-4.1",alias:"gpt-4.1"}]},kiro:{id:"kiro",name:"Kiro",image:"/providers/kiro.png",color:"#FF6B00",description:"Kiro IDE with MITM",configType:"mitm",mitmDomain:"q.us-east-1.amazonaws.com",defaultModels:[{id:"claude-sonnet-5",name:"Claude Sonnet 5",alias:"claude-sonnet-5"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4",alias:"claude-sonnet-4"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"deepseek-3.2",name:"DeepSeek 3.2",alias:"deepseek-3.2"},{id:"minimax-m2.1",name:"MiniMax M2.1",alias:"minimax-m2.1"},{id:"simple-task",name:"Qwen3 Coder Next",alias:"simple-task"},{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",alias:"gpt-5.6-sol"},{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",alias:"gpt-5.6-terra"},{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",alias:"gpt-5.6-luna"}]},zed:{id:"zed",name:"Zed Editor",image:"/providers/zed.svg",color:"#1348DC",description:"Zed Editor (Hosted AI) with MITM",configType:"mitm",mitmDomain:"cloud.zed.dev",defaultModels:[{id:"claude-sonnet-5",name:"Claude Sonnet 5",alias:"claude-sonnet-5"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6"},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4-5"},{id:"claude-haiku-4-5",name:"Claude Haiku 4.5",alias:"claude-haiku-4-5"},{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",alias:"gpt-5.6-sol"},{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",alias:"gpt-5.6-terra"},{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",alias:"gpt-5.6-luna"},{id:"gpt-5.5",name:"GPT-5.5",alias:"gpt-5.5"},{id:"gpt-5-mini",name:"GPT-5 mini",alias:"gpt-5-mini"},{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro",alias:"gemini-3.1-pro-preview"},{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",alias:"gemini-3.5-flash"}]}},e={claude:{id:"claude",name:"Claude Code",image:"/providers/claude.png",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-6"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-4-6"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},codex:{id:"codex",name:"OpenAI Codex CLI / App",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},grok:{id:"grok",name:"Grok Build CLI",image:"/providers/xai.png",color:"#1DA1F2",description:"xAI Grok Build — open-source terminal coding CLI",configType:"guide",guideSteps:[{step:1,title:"Install Grok Build",desc:"Install via npm or cargo (see grok-build on GitHub)"},{step:2,title:"Set API Key",desc:"Export your ExtremeRouter API key",value:"export XAI_API_KEY={{apiKey}}",copyable:!0},{step:3,title:"Set Base URL",desc:"Point Grok Build at ExtremeRouter",value:"export XAI_BASE_URL={{baseUrl}}",copyable:!0},{step:4,title:"Set Model",desc:"Pick a model from ExtremeRouter",value:"export XAI_MODEL={{model}}",copyable:!0},{step:5,title:"Run",desc:"Start Grok Build in your project directory",value:"grok-build",copyable:!0}],modelAliases:["grok-4.5","grok-4-fast-reasoning","grok-code-fast-1"],defaultModels:[{id:"grok-4.5",name:"Grok 4.5",alias:"grok-4.5",defaultValue:"xai/grok-4.5"},{id:"grok-4-fast-reasoning",name:"Grok 4 Fast Reasoning",alias:"grok-4-fast-reasoning",defaultValue:"xai/grok-4-fast-reasoning"},{id:"grok-code-fast-1",name:"Grok Code Fast 1",alias:"grok-code-fast-1",defaultValue:"xai/grok-code-fast-1"}]},opencode:{id:"opencode",name:"OpenCode",image:"/providers/opencode.png",color:"#E87040",description:"OpenCode AI Terminal Assistant",configType:"custom"},cowork:{id:"cowork",name:"Claude Cowork",image:"/providers/claude.png",color:"#D97757",description:"Claude Desktop Cowork (third-party inference)",configType:"custom"},hermes:{id:"hermes",name:"Hermes Agent",image:"/providers/hermes.png",color:"#8B5CF6",description:"Nous Research self-improving AI agent",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresExternalUrl:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Tunnel or Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},zed:{id:"zed",name:"Zed",image:"/providers/zed.svg",color:"#1348DC",description:"Zed Editor with Hosted AI",configType:"custom",authMethod:"import",notes:[{type:"info",text:"Import your Zed Editor cloud credentials (user ID + access token) to route Zed Hosted AI through ExtremeRouter."}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#00D1B2",description:"Cline AI Coding Assistant",configType:"custom"},kilo:{id:"kilo",name:"Kilo Code",image:"/providers/kilocode.png",color:"#FF6B6B",description:"Kilo Code AI Assistant",configType:"custom"},roo:{id:"roo",name:"Roo",image:"/providers/roo.png",color:"#FF6B6B",description:"Roo AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Roo Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
32
- "apiBase": "{{baseUrl}}",
33
- "title": "{{model}}",
34
- "model": "{{model}}",
35
- "provider": "openai",
36
- "apiKey": "{{apiKey}}"
37
- }`}},amp:{id:"amp",name:"Amp CLI",image:"/providers/amp.png",color:"#F97316",description:"Sourcegraph Amp coding assistant CLI",docsUrl:"/docs?section=cli-tools&tool=amp",configType:"guide",defaultCommand:"amp",modelAliases:["g25p","g25f","cs45","g54"],notes:[{type:"info",text:"Use ExtremeRouter model aliases to keep Amp shorthand mappings stable across provider updates."},{type:"warning",text:"Suggested shorthand examples: g25p → gemini/gemini-2.5-pro, g25f → gemini/gemini-2.5-flash, cs45 → cc/claude-sonnet-4-5-20250929."}],guideSteps:[{step:1,title:"Install Amp",desc:"Install the Amp CLI using the package manager supported by your environment."},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"Select Model",type:"modelSelector"},{step:5,title:"Add Shorthands",desc:"Map Amp shorthand names such as g25p or cs45 to ExtremeRouter aliases in your local config."}],codeBlock:{language:"bash",code:`export OPENAI_API_KEY="{{apiKey}}"
38
- export OPENAI_BASE_URL="{{baseUrl}}"
39
- amp --model "{{model}}"
40
- # Example shorthand aliases you can map locally:
41
- # g25p -> gemini/gemini-2.5-pro
42
- # cs45 -> cc/claude-sonnet-4-5-20250929`}},qwen:{id:"qwen",name:"Qwen Code",image:"/providers/qwen.png",color:"#10B981",description:"Alibaba Qwen Code CLI — supports OpenAI, Anthropic & Gemini providers via ExtremeRouter",docsUrl:"https://qwenlm.github.io/qwen-code-docs/en/users/configuration/model-providers/",configType:"guide",defaultCommand:"qwen",notes:[{type:"info",text:"Qwen Code supports multiple provider types (openai, anthropic, gemini) via modelProviders in settings.json. ExtremeRouter works as an OpenAI-compatible endpoint."},{type:"info",text:"Any model available in ExtremeRouter can be used — not just Qwen models. Select from Qwen, Claude, Gemini, GPT, and more."},{type:"warning",text:"Config path: Linux/macOS ~/.qwen/settings.json • Windows %USERPROFILE%\\.qwen\\settings.json"},{type:"error",text:"Qwen OAuth free tier was discontinued on 2026-04-15. Use ExtremeRouter with alicode/openrouter/anthropic/gemini providers instead."}],modelAliases:["coder-model","qwen3-coder-plus","qwen3-coder-flash","vision-model","claude-sonnet-4-6","claude-opus-4-6-thinking","gemini-3-flash","gemini-3.1-pro-high"],defaultModels:[{id:"coder-model",name:"Coder Model (Qwen 3.6 Plus)",alias:"coder-model",envKey:"OPENAI_MODEL",defaultValue:"coder-model",isTopLevel:!0},{id:"qwen3-coder-plus",name:"Qwen 3 Coder Plus",alias:"qwen3-coder-plus",envKey:"OPENAI_MODEL",defaultValue:"qwen3-coder-plus"},{id:"qwen3-coder-flash",name:"Qwen 3 Coder Flash",alias:"qwen3-coder-flash",envKey:"OPENAI_MODEL",defaultValue:"qwen3-coder-flash"},{id:"vision-model",name:"Vision Model (Multimodal)",alias:"vision-model",envKey:"OPENAI_MODEL",defaultValue:"vision-model"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6",envKey:"OPENAI_MODEL",defaultValue:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",alias:"claude-opus-4-6-thinking",envKey:"OPENAI_MODEL",defaultValue:"claude-opus-4-6-thinking"},{id:"gemini-3.1-pro-high",name:"Gemini 3.1 Pro High",alias:"gemini-3.1-pro-high",envKey:"OPENAI_MODEL",defaultValue:"gemini-3.1-pro-high"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash",envKey:"OPENAI_MODEL",defaultValue:"gemini-3-flash"}],guideSteps:[{step:1,title:"Install Qwen Code",desc:"npm install -g @qwen-code/qwen-code"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"Select Model",type:"modelSelector"},{step:5,title:"Save Config",desc:"Copy the JSON below to your ~/.qwen/settings.json file."}],codeBlock:{language:"json",code:`{
43
- "security": {
44
- "auth": {
45
- "selectedType": "openai",
46
- "apiKey": "{{apiKey}}",
47
- "baseUrl": "{{baseUrl}}"
48
- }
49
- },
50
- "model": {
51
- "name": "{{model}}"
52
- }
53
- }`}},"deepseek-tui":{id:"deepseek-tui",name:"DeepSeek TUI",image:"/providers/deepseek-tui.png",color:"#4D6BFE",description:"DeepSeek Terminal Coding Agent (Rust TUI)",docsUrl:"https://github.com/DeepSeek-TUI/DeepSeek-TUI",configType:"custom",defaultCommand:"deepseek",modelAliases:["deepseek-v4-pro","deepseek-v4-flash","deepseek-chat","deepseek-reasoner"],defaultModels:[{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",alias:"deepseek-v4-pro"},{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash",alias:"deepseek-v4-flash"},{id:"deepseek-chat",name:"DeepSeek V3 Chat",alias:"deepseek-chat"}],notes:[{type:"info",text:"DeepSeek TUI uses ~/.deepseek/config.toml for configuration. ExtremeRouter will update the provider to 'openai' mode with your base_url, api_key, and model."},{type:"warning",text:"Config path: Linux/macOS ~/.deepseek/config.toml • Windows %USERPROFILE%\\.deepseek\\config.toml"}]},jcode:{id:"jcode",name:"jcode",image:"/providers/jcode.png",color:"#FF6B35",description:"High-performance Rust-based coding agent harness",configType:"custom",docsUrl:"https://github.com/1jehuang/jcode",notes:[{type:"info",text:"jcode is a Rust-based coding agent with semantic memory, multi-agent swarms, and extreme performance (27.8 MB RAM, 14ms boot)."},{type:"info",text:"Configure extremerouter as an OpenAI-compatible provider to route all jcode requests through extremerouter's optimization layer."},{type:"warning",text:"Requires jcode installed. Install via: curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.sh | bash"}],defaultModels:[{id:"claude-opus-4-7",name:"Claude Opus 4.7",alias:"opus",defaultValue:"cc/claude-opus-4-7"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"sonnet",defaultValue:"cc/claude-sonnet-4-6"},{id:"gpt-5.5",name:"GPT 5.5",alias:"gpt5",defaultValue:"cx/gpt-5.5"},{id:"gemini-3.1-pro",name:"Gemini 3.1 Pro",alias:"gemini",defaultValue:"gemini/gemini-3.1-pro"}]}}}};
53
+ id = "${J||"cc/claude-opus-4-7"}"`},{filename:"~/.config/jcode/provider-extremerouter.env",content:`JCODE_EXTREMEROUTER_API_KEY="${v}"`}])})]})}let J="http://localhost:20128";function K({apiKeys:a,cloudEnabled:b,onStatusChange:c}){let[g,h]=(0,e.useState)(null),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(()=>a?.[0]?.key||""),[q,r]=(0,e.useState)(null),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(J),[y,z]=(0,e.useState)(null),A=g?.isWin===!0,B=A||g?.hasCachedPassword||g?.needsSudoPassword===!1,C=g?.isAdmin!==!1;!C&&(A||g?.hasCachedPassword||g?.needsSudoPassword);let D=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/cli-tools/antigravity-mitm");if(a.ok){let b=await a.json();h(b),b.mitmRouterBaseUrl&&x(b.mitmRouterBaseUrl),c?.(b)}}catch{h({running:!1,certExists:!1,dnsStatus:{}})}},[c]),E=a=>{v(null),g&&(B?F(a,""):(r(a),l(!0),t(null)))},F=async(c,d,e=!1)=>{j(!0),v(null);try{let f;if("trust-cert"===c)f=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"trust-cert",sudoPassword:d})});else if("start"===c){let c=o?.trim()||(a?.length>0?a[0].key:null)||(b?null:"sk_extremerouter");f=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:c,sudoPassword:d,mitmRouterBaseUrl:w.trim()||J,forceKillPort443:e})})}else f=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:d})});if(!f.ok){let a=await f.json().catch(()=>({}));if("PORT_443_BUSY"===a.code&&a.portOwner){l(!1),z({owner:a.portOwner,password:d});return}v(a.error||`Failed to ${c} MITM server`);return}l(!1),n(""),z(null),await D()}catch(a){v(a.message||"Network error")}finally{j(!1),r(null)}},G=()=>{m.trim()?F(q,m):t("Sudo password is required")},H=g?.running;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.Zp,{padding:"sm",className:"border-primary/20 bg-primary/5",children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"security"}),(0,d.jsx)("span",{className:"font-semibold text-sm text-text-main",children:"MITM Server"}),H?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Running"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Stopped"})]}),(0,d.jsx)("div",{className:"flex flex-wrap items-center gap-1 text-xs text-text-muted","data-i18n-skip":"true",children:[{label:"Cert",ok:g?.certExists},{label:"Trusted",ok:g?.certTrusted},{label:"Server",ok:H}].map(({label:a,ok:b})=>(0,d.jsxs)("span",{className:`flex items-center gap-0.5 px-1.5 py-0.5 rounded ${b?"text-green-600":"text-text-muted"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:b?"check_circle":"cancel"}),a]},a))})]}),(0,d.jsxs)("div",{className:"px-2 py-2 rounded-lg bg-surface/50 border border-border/50 flex flex-col gap-2",children:[(0,d.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"Purpose:"})," Use Antigravity IDE & GitHub Copilot → with ANY provider/model from ExtremeRouter"]}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Antigravity/Copilot IDE request → DNS redirect to localhost:443 → MITM proxy intercepts → ExtremeRouter → response to Antigravity/Copilot"]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid gap-1 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"ExtremeRouter Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:w,onChange:a=>x(a.target.value),placeholder:J,disabled:H,className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50"})]}),!H&&(0,d.jsxs)("div",{className:"grid gap-1 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",list:"mitm-api-keys",value:o,onChange:a=>p(a.target.value),placeholder:b?"Enter or pick API key":"sk_extremerouter (default)",className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50"}),a?.length>0&&(0,d.jsx)("datalist",{id:"mitm-api-keys",children:a.map(a=>(0,d.jsx)("option",{value:a.key,children:a.name||a.key},a.id))})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center","data-i18n-skip":"true",children:[g?.certExists&&!g?.certTrusted&&(0,d.jsxs)("button",{onClick:()=>E("trust-cert"),disabled:i,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-yellow-500/30 bg-yellow-500/10 px-4 py-2 text-xs font-medium text-yellow-600 transition-colors hover:bg-yellow-500/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"verified_user"}),"Trust Cert"]}),H?(0,d.jsxs)("button",{onClick:()=>E("stop"),disabled:i,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-xs font-medium text-red-500 transition-colors hover:bg-red-500/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop Server"]}):(0,d.jsxs)("button",{onClick:()=>E("start"),disabled:i||!g||A&&!C,title:A&&!C?"Administrator required":void 0,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-xs font-medium text-primary transition-colors hover:bg-primary/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start Server"]}),H&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Enable DNS per tool below to activate interception"})]}),u&&(0,d.jsxs)("div",{className:"flex items-start gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 dark:text-red-400 border border-red-500/20",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mt-0.5 shrink-0",children:"error"}),(0,d.jsx)("span",{children:u})]}),A&&!C&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 border border-red-500/20",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"shield_lock"}),(0,d.jsx)("span",{children:"Administrator required — restart ExtremeRouter as Administrator to use MITM"})]})]})}),k&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"mx-4 flex w-full max-w-sm flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and server startup"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:m,onChange:a=>n(a.target.value),onKeyDown:a=>{"Enter"!==a.key||i||G()}}),s&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,d.jsx)("span",{children:s})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{l(!1),n(""),t(null)},disabled:i,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:G,loading:i,children:"Confirm"})]})]})}),y&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Port 443 Already In Use"}),(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1 text-xs text-text-muted",children:[(0,d.jsx)("p",{children:"Port 443 is currently used by another process:"}),(0,d.jsxs)("p",{className:"font-mono text-text-main","data-i18n-skip":"true",children:[y.owner.name," (PID ",y.owner.pid,")"]}),(0,d.jsx)("p",{children:"Kill this process to start MITM Server?"})]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{z(null),j(!1)},disabled:i,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:()=>{F("start",y?.password||"",!0)},loading:i,children:"Kill & Start"})]})]})})]})}var L=c(36811);function M({tool:a,isExpanded:b,onToggle:c,serverRunning:h,dnsActive:i,hasCachedPassword:j,needsSudoPassword:k,isWin:l,apiKeys:m,activeProviders:n,hasActiveProviders:o,modelAliases:p={},cloudEnabled:q,onDnsChange:r}){let[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)(null),[E,F]=(0,e.useState)({}),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(null),K=L.TOOL_HOSTS[a.id]??[],N=l||j||!1===k,O=(0,e.useCallback)(async b=>{try{await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:a.id,mappings:b})})}catch{}},[a.id]),P=(a,b)=>{F(c=>({...c,[a]:b}))},Q=()=>{if(!h)return;let a=i?"disable":"enable";N?R(a,""):(B(a),x(!0),D(null))},R=async(b,c)=>{t(!0),v(null);try{let d=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:a.id,action:b,sudoPassword:c})}),e=await d.json();if(!d.ok)throw Error(e.error||"Failed to toggle DNS");"enable"===b&&v(`Restart ${a.name} to apply changes`),x(!1),z(""),r?.(e)}catch{}finally{t(!1),B(null)}},S=()=>{y.trim()?R(A,y):D("Sudo password is required")};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:a.image,alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),h?i?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Active"}):(0,d.jsx)(f.Ex,{variant:"warning",size:"sm",children:"DNS off"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Server off"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted sm:truncate",children:["Intercept ",a.name," requests via MITM proxy"]})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[K.length>0&&(0,d.jsxs)("div",{className:"mt-2 rounded-md border border-border bg-surface/50 px-2 py-1.5",children:[(0,d.jsx)("p",{className:"text-[10px] font-medium tracking-wide text-text-main/80 mb-1",children:"Edit hosts file manually to add the following entries:"}),(0,d.jsx)("ul",{className:"list-none space-y-0.5 font-mono text-[10px] text-text-muted break-all",children:K.map(a=>(0,d.jsxs)("li",{children:["127.0.0.1 ",a]},a))})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted px-1",children:[(0,d.jsxs)("p",{children:["Toggle DNS to redirect ",a.name," traffic through ExtremeRouter via MITM."]}),!i&&(0,d.jsx)("p",{className:"text-amber-600 text-[10px] mt-1",children:"⚠️ Enable DNS to edit model mappings"})]}),a.defaultModels?.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-2",children:a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[9rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:E[a.alias]||"",onChange:b=>P(a.alias,b.target.value),onBlur:b=>{var c,d;return c=a.alias,d=b.target.value,void O({...E,[c]:d})},placeholder:"provider/model-id",disabled:!i,className:`w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5 ${!i?"opacity-50 cursor-not-allowed":""}`}),E[a.alias]&&(0,d.jsx)("button",{onClick:()=>{P(a.alias,""),O({...E,[a.alias]:""})},className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>{J(a.alias),H(!0)},disabled:!o||!i,className:`rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 ${o&&i?"bg-surface border-border hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"})]},a.alias))}),a.defaultModels?.length===0&&(0,d.jsx)("p",{className:"text-xs text-text-muted px-1",children:"Model mappings will be available soon."}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:items-start",children:[i?(0,d.jsxs)("button",{onClick:Q,disabled:!h||s,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-xs font-medium text-red-500 transition-colors hover:bg-red-500/20 disabled:cursor-not-allowed disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop DNS"]}):(0,d.jsxs)("button",{onClick:Q,disabled:!h||s,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-xs font-medium text-primary transition-colors hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start DNS"]}),u&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs text-amber-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"warning"}),(0,d.jsx)("span",{children:u})]})]})]})]}),w&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"mx-4 flex w-full max-w-sm flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Required to modify /etc/hosts and flush DNS cache"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:y,onChange:a=>z(a.target.value),onKeyDown:a=>{"Enter"!==a.key||s||S()}}),C&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,d.jsx)("span",{children:C})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{x(!1),z(""),D(null)},disabled:s,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:S,loading:s,children:"Confirm"})]})]})}),(0,d.jsx)(f.rq,{isOpen:G,onClose:()=>H(!1),onSelect:a=>{if(!I||a.isPlaceholder)return;let b={...E,[I]:a.value};F(b),O(b)},selectedModel:I?E[I]:null,activeProviders:n,modelAliases:p,title:`Select model for ${I}`})]})}var N=c(2116),O=c.n(N);function P({tool:a}){return(0,d.jsx)(O(),{href:"/dashboard/mitm",className:"block",children:(0,d.jsx)(f.Zp,{padding:"sm",className:"overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:a.image,alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-purple-500/10 text-purple-600 dark:text-purple-400 rounded-full",children:"MITM"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"chevron_right"})]})})})}}};
@@ -2,7 +2,7 @@
2
2
  ${l}
3
3
  ${n}
4
4
  ${k.toString("latin1")}
5
- ${q}`,s=h(Buffer.from(r,"latin1")),t=c.machineId||(0,f.A)(),u=h(k),v=String(k.length);return{Authorization:`Bearer COSY.${p}.${s}`,"Cosy-Key":l,"Cosy-User":c.userId,"Cosy-Date":n,"Cosy-Version":g.cT,"Cosy-Machineid":t,"Cosy-Machinetoken":t,"Cosy-Machinetype":g.RB,"Cosy-Machineos":g.pM,"Cosy-Clienttype":g.Ty,"Cosy-Clientip":"127.0.0.1","Cosy-Bodyhash":u,"Cosy-Bodylength":v,"Cosy-Sigpath":q,"Cosy-Data-Policy":g.qk,"Cosy-Organization-Id":"","Cosy-Organization-Tags":"","Login-Version":g.xG,"X-Request-Id":(0,f.A)()}}},45699:(a,b,c)=>{c.d(b,{Xg:()=>o,PROVIDER_MODELS:()=>f.vq,fZ:()=>j,cY:()=>q,ux:()=>k,OA:()=>l,kt:()=>m,KC:()=>p,SM:()=>i});var d=c(35024),e=c(70568),f=c(26070),g=c(99511);let h="-review";function i(a){return f.vq[a]||[]}function j(a){let b=f.vq[a];return b?.[0]?.id||null}function k(a,b){let c=f.vq[a];return c?(0,g.gr)(c.find(a=>a.id===b)):null}function l(a,b){let c=f.vq[a];if(!c)return null;let d=c.find(a=>a.id===b);return d?.kind||d?.type||null}function m(a,b){let c=f.vq[a],d=c?.find(a=>a.id===b);if(d?.upstreamModelId){let a=d.upstreamModelId,c=a.match(/\([^()]+\)\s*$/),e=c?.[0]||"";if(e){let d=a.slice(0,c.index).trim(),f="string"==typeof b?b.match(/-(high|medium|low)$/i):null;return d+((f?.[0]?`(${f[0].slice(1).toLowerCase()})`:"")||e)}return a}return"cx"===a&&"string"==typeof b&&b.endsWith(h)?b.slice(0,-h.length):b}let n=Object.fromEntries(e.A.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),o=Object.fromEntries(Object.keys(d.xq).map(a=>[a,n[a]||a]));function p(a){let b=o[a]||a;return f.vq[b]||[]}function q(a,b){return(0,g.g5)(f.vq[a]?.find(a=>a.id===b))}},52007:(a,b,c)=>{c.d(b,{av:()=>o,gK:()=>m});var d=c(55511),e=c(39609);let f="https://llm.kimchi.dev",g=new Set([429,500,502,503,504]),h=new Map,i=new Map;function j(a){return(("string"==typeof a?a.trim():"")||f).replace(/\/+$/,"")}function k(a){return a?.accessToken||a?.apiKey||a?.providerSpecificData?.apiKey||null}function l(a){if(!a||"object"!=typeof a)return null;let b=a.slug||a.id||a.model||a.name;if("string"!=typeof b||""===b.trim())return null;let c=Array.isArray(a.input_modalities)?a.input_modalities.filter(a=>"text"===a||"image"===a):[],d=a.limits&&"object"==typeof a.limits?a.limits:{},e=Number(d.context_window||a.contextLength||a.context_length)||void 0,f=Number(d.max_output_tokens||a.maxOutputTokens||a.max_output_tokens)||void 0,g="string"==typeof a.provider?a.provider:"",h=!0===a.reasoning,i=Array.isArray(c)&&c.includes("image")?"imageToText":"llm",j={...a,id:b.trim(),name:String(a.display_name||a.displayName||a.name||b).trim(),provider:g,upstreamProvider:g,reasoning:h,inputModalities:c,kind:i,type:i,capabilities:{vision:c.includes("image"),reasoning:h,...e?{contextWindow:e}:{},...f?{maxOutput:f}:{},...g?{upstreamProvider:g}:{}},...e?{contextLength:e}:{},...f?{maxOutputTokens:f}:{}};return"anthropic"===g&&(j.compat={supportsReasoningEffort:!1,cacheControlFormat:"anthropic"}),j}function m(a){if("string"!=typeof a||""===a.trim())return null;let b=a.includes("/")?a.split("/").pop():a;return i.get(b)||i.get(b.toLowerCase())||null}async function n(a,b,c={}){let d=`${j(b)}/v1/models/metadata?include_in_cli=true`,f=new AbortController,h=setTimeout(()=>f.abort(Error("Kimchi models fetch timeout")),2e4),i=c.signal?AbortSignal.any([c.signal,f.signal]):f.signal;try{let b=await (0,e.proxyAwareFetch)(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${a}`,"User-Agent":"kimchi/0.1.40"},cache:"no-store",signal:i},c.proxyOptions||null);if(!b.ok){let a=Error(`Kimchi models ${b.status}: ${b.statusText}`);throw a.status=b.status,a.retryable=g.has(b.status),a}let f=await b.json();return Array.isArray(f?.models)?f.models:[]}finally{clearTimeout(h)}}async function o(a,b={}){let c,e,g,m=k(a);if(!m)return null;let p=a?.providerSpecificData?.kimchiEndpoint||b.endpoint||f,q=(g=(e=a?.providerSpecificData||{}).userId||e.username||a?.refreshToken||k(a)||"anonymous",(0,d.createHash)("sha256").update(`kimchi:${j(p)}:${g}`).digest("hex")),r=Date.now();if(!b.forceRefresh){let a=h.get(q);if(a&&a.expiresAt>r)return a}try{c=await n(m,p,b)}catch(a){return b.log?.warn?.("KIMCHI_MODELS",a.message),null}let s=c.map(l).filter(Boolean);if(0===s.length)return null;for(let a of s||[])a?.id&&(i.set(a.id,a),i.set(a.id.toLowerCase(),a));let t={expiresAt:Date.now()+3e5,models:s,rawModels:c};return h.set(q,t),t}},53225:(a,b,c)=>{c.d(b,{EV:()=>l,X5:()=>k});var d=c(55511),e=c(39609),f=c(30015),g=c(69704);let h=new Map,i=new Map;async function j(a,b,c=null){let d,h,i={userId:(h=a?.providerSpecificData||{}).userId,authToken:a.accessToken,name:a.displayName||"",email:a.email||"",machineId:h.machineId||""};if(!i.userId||!i.authToken)return null;let k={Accept:"application/json","Accept-Encoding":"identity",...(0,f.d)(Buffer.alloc(0),g.t6,i)},l=new AbortController,m=null,n=null;try{m=setTimeout(()=>l.abort("timeout"),15e3),b&&"function"==typeof b.addEventListener&&(b.aborted?l.abort(b.reason):(n=()=>l.abort(b.reason),b.addEventListener("abort",n))),d=await (0,e.proxyAwareFetch)(g.t6,{method:"GET",headers:k,signal:l.signal},c)}finally{m&&clearTimeout(m),b&&n&&b.removeEventListener("abort",n)}if(!d.ok)return null;let o=await d.json().catch(()=>null);if(!o||!Array.isArray(o.chat))return null;let p=[],q=new Map;for(let a of o.chat){if(!a||"object"!=typeof a)continue;let b=a.key;if(!b||(q.set(b,a),!1===a.enable))continue;let c=a.display_name||b,d=Number(a.max_input_tokens)||131072;p.push({id:b,name:`${c}`,contextLength:d,isVL:!!a.is_vl,isReasoning:!!a.is_reasoning,maxOutputTokens:Number(a.max_output_tokens)||0,description:a.description||""})}return{models:p,rawConfigs:q}}async function k(a,b,c={}){let d=await l(a,c);if(!d)return null;let e=d.rawConfigs.get(b);return e?{...e,key:b}:null}async function l(a,b={}){let c;if(!a?.accessToken||!(a.providerSpecificData||{}).userId)return null;let e=(c=(a?.providerSpecificData||{}).userId||a?.refreshToken||a?.accessToken||"anonymous",(0,d.createHash)("sha256").update(`qoder:${c}`).digest("hex")),f=Date.now();if(!b.forceRefresh){let a=h.get(e);if(a&&a.expiresAt>f)return a}let g=i.get(e);if(g&&!b.forceRefresh)return g;let k=(async()=>{let c=await j(a,b.signal,b.proxyOptions);if(!c)return null;let d={expiresAt:Date.now()+36e5,models:c.models,rawConfigs:c.rawConfigs,fetched:!0};return h.set(e,d),d})();i.set(e,k);try{return await k}finally{i.get(e)===k&&i.delete(e)}}},69704:(a,b,c)=>{c.d(b,{KC:()=>j,RB:()=>q,Ty:()=>m,_G:()=>h,bg:()=>g,cT:()=>l,pM:()=>p,pr:()=>r,qk:()=>n,rf:()=>f,t6:()=>k,xG:()=>o});let d="https://openapi.qoder.sh",e="https://api3.qoder.sh",f="https://qoder.com/device/selectAccounts",g=`${d}/api/v1/deviceToken/poll`,h=`${d}/api/v1/userinfo`,i=`${e}/algo/api/v2/service/pro/sse/agent_chat_generation?FetchKeys=llm_model_result&AgentId=agent_common`,j=`${i}&Encode=1`,k=`${e}/algo/api/v2/model/list`,l="1.0.0",m="5",n="disagree",o="v2",p="x86_64_windows",q="5",r=`-----BEGIN PUBLIC KEY-----
5
+ ${q}`,s=h(Buffer.from(r,"latin1")),t=c.machineId||(0,f.A)(),u=h(k),v=String(k.length);return{Authorization:`Bearer COSY.${p}.${s}`,"Cosy-Key":l,"Cosy-User":c.userId,"Cosy-Date":n,"Cosy-Version":g.cT,"Cosy-Machineid":t,"Cosy-Machinetoken":t,"Cosy-Machinetype":g.RB,"Cosy-Machineos":g.pM,"Cosy-Clienttype":g.Ty,"Cosy-Clientip":"127.0.0.1","Cosy-Bodyhash":u,"Cosy-Bodylength":v,"Cosy-Sigpath":q,"Cosy-Data-Policy":g.qk,"Cosy-Organization-Id":"","Cosy-Organization-Tags":"","Login-Version":g.xG,"X-Request-Id":(0,f.A)()}}},45699:(a,b,c)=>{c.d(b,{Xg:()=>o,PROVIDER_MODELS:()=>f.vq,fZ:()=>j,cY:()=>q,ux:()=>k,OA:()=>l,kt:()=>m,KC:()=>p,SM:()=>i});var d=c(35024),e=c(72491),f=c(26070),g=c(99511);let h="-review";function i(a){return f.vq[a]||[]}function j(a){let b=f.vq[a];return b?.[0]?.id||null}function k(a,b){let c=f.vq[a];return c?(0,g.gr)(c.find(a=>a.id===b)):null}function l(a,b){let c=f.vq[a];if(!c)return null;let d=c.find(a=>a.id===b);return d?.kind||d?.type||null}function m(a,b){let c=f.vq[a],d=c?.find(a=>a.id===b);if(d?.upstreamModelId){let a=d.upstreamModelId,c=a.match(/\([^()]+\)\s*$/),e=c?.[0]||"";if(e){let d=a.slice(0,c.index).trim(),f="string"==typeof b?b.match(/-(high|medium|low)$/i):null;return d+((f?.[0]?`(${f[0].slice(1).toLowerCase()})`:"")||e)}return a}return"cx"===a&&"string"==typeof b&&b.endsWith(h)?b.slice(0,-h.length):b}let n=Object.fromEntries(e.A.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),o=Object.fromEntries(Object.keys(d.xq).map(a=>[a,n[a]||a]));function p(a){let b=o[a]||a;return f.vq[b]||[]}function q(a,b){return(0,g.g5)(f.vq[a]?.find(a=>a.id===b))}},52007:(a,b,c)=>{c.d(b,{av:()=>o,gK:()=>m});var d=c(55511),e=c(39609);let f="https://llm.kimchi.dev",g=new Set([429,500,502,503,504]),h=new Map,i=new Map;function j(a){return(("string"==typeof a?a.trim():"")||f).replace(/\/+$/,"")}function k(a){return a?.accessToken||a?.apiKey||a?.providerSpecificData?.apiKey||null}function l(a){if(!a||"object"!=typeof a)return null;let b=a.slug||a.id||a.model||a.name;if("string"!=typeof b||""===b.trim())return null;let c=Array.isArray(a.input_modalities)?a.input_modalities.filter(a=>"text"===a||"image"===a):[],d=a.limits&&"object"==typeof a.limits?a.limits:{},e=Number(d.context_window||a.contextLength||a.context_length)||void 0,f=Number(d.max_output_tokens||a.maxOutputTokens||a.max_output_tokens)||void 0,g="string"==typeof a.provider?a.provider:"",h=!0===a.reasoning,i=Array.isArray(c)&&c.includes("image")?"imageToText":"llm",j={...a,id:b.trim(),name:String(a.display_name||a.displayName||a.name||b).trim(),provider:g,upstreamProvider:g,reasoning:h,inputModalities:c,kind:i,type:i,capabilities:{vision:c.includes("image"),reasoning:h,...e?{contextWindow:e}:{},...f?{maxOutput:f}:{},...g?{upstreamProvider:g}:{}},...e?{contextLength:e}:{},...f?{maxOutputTokens:f}:{}};return"anthropic"===g&&(j.compat={supportsReasoningEffort:!1,cacheControlFormat:"anthropic"}),j}function m(a){if("string"!=typeof a||""===a.trim())return null;let b=a.includes("/")?a.split("/").pop():a;return i.get(b)||i.get(b.toLowerCase())||null}async function n(a,b,c={}){let d=`${j(b)}/v1/models/metadata?include_in_cli=true`,f=new AbortController,h=setTimeout(()=>f.abort(Error("Kimchi models fetch timeout")),2e4),i=c.signal?AbortSignal.any([c.signal,f.signal]):f.signal;try{let b=await (0,e.proxyAwareFetch)(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${a}`,"User-Agent":"kimchi/0.1.40"},cache:"no-store",signal:i},c.proxyOptions||null);if(!b.ok){let a=Error(`Kimchi models ${b.status}: ${b.statusText}`);throw a.status=b.status,a.retryable=g.has(b.status),a}let f=await b.json();return Array.isArray(f?.models)?f.models:[]}finally{clearTimeout(h)}}async function o(a,b={}){let c,e,g,m=k(a);if(!m)return null;let p=a?.providerSpecificData?.kimchiEndpoint||b.endpoint||f,q=(g=(e=a?.providerSpecificData||{}).userId||e.username||a?.refreshToken||k(a)||"anonymous",(0,d.createHash)("sha256").update(`kimchi:${j(p)}:${g}`).digest("hex")),r=Date.now();if(!b.forceRefresh){let a=h.get(q);if(a&&a.expiresAt>r)return a}try{c=await n(m,p,b)}catch(a){return b.log?.warn?.("KIMCHI_MODELS",a.message),null}let s=c.map(l).filter(Boolean);if(0===s.length)return null;for(let a of s||[])a?.id&&(i.set(a.id,a),i.set(a.id.toLowerCase(),a));let t={expiresAt:Date.now()+3e5,models:s,rawModels:c};return h.set(q,t),t}},53225:(a,b,c)=>{c.d(b,{EV:()=>l,X5:()=>k});var d=c(55511),e=c(39609),f=c(30015),g=c(69704);let h=new Map,i=new Map;async function j(a,b,c=null){let d,h,i={userId:(h=a?.providerSpecificData||{}).userId,authToken:a.accessToken,name:a.displayName||"",email:a.email||"",machineId:h.machineId||""};if(!i.userId||!i.authToken)return null;let k={Accept:"application/json","Accept-Encoding":"identity",...(0,f.d)(Buffer.alloc(0),g.t6,i)},l=new AbortController,m=null,n=null;try{m=setTimeout(()=>l.abort("timeout"),15e3),b&&"function"==typeof b.addEventListener&&(b.aborted?l.abort(b.reason):(n=()=>l.abort(b.reason),b.addEventListener("abort",n))),d=await (0,e.proxyAwareFetch)(g.t6,{method:"GET",headers:k,signal:l.signal},c)}finally{m&&clearTimeout(m),b&&n&&b.removeEventListener("abort",n)}if(!d.ok)return null;let o=await d.json().catch(()=>null);if(!o||!Array.isArray(o.chat))return null;let p=[],q=new Map;for(let a of o.chat){if(!a||"object"!=typeof a)continue;let b=a.key;if(!b||(q.set(b,a),!1===a.enable))continue;let c=a.display_name||b,d=Number(a.max_input_tokens)||131072;p.push({id:b,name:`${c}`,contextLength:d,isVL:!!a.is_vl,isReasoning:!!a.is_reasoning,maxOutputTokens:Number(a.max_output_tokens)||0,description:a.description||""})}return{models:p,rawConfigs:q}}async function k(a,b,c={}){let d=await l(a,c);if(!d)return null;let e=d.rawConfigs.get(b);return e?{...e,key:b}:null}async function l(a,b={}){let c;if(!a?.accessToken||!(a.providerSpecificData||{}).userId)return null;let e=(c=(a?.providerSpecificData||{}).userId||a?.refreshToken||a?.accessToken||"anonymous",(0,d.createHash)("sha256").update(`qoder:${c}`).digest("hex")),f=Date.now();if(!b.forceRefresh){let a=h.get(e);if(a&&a.expiresAt>f)return a}let g=i.get(e);if(g&&!b.forceRefresh)return g;let k=(async()=>{let c=await j(a,b.signal,b.proxyOptions);if(!c)return null;let d={expiresAt:Date.now()+36e5,models:c.models,rawConfigs:c.rawConfigs,fetched:!0};return h.set(e,d),d})();i.set(e,k);try{return await k}finally{i.get(e)===k&&i.delete(e)}}},69704:(a,b,c)=>{c.d(b,{KC:()=>j,RB:()=>q,Ty:()=>m,_G:()=>h,bg:()=>g,cT:()=>l,pM:()=>p,pr:()=>r,qk:()=>n,rf:()=>f,t6:()=>k,xG:()=>o});let d="https://openapi.qoder.sh",e="https://api3.qoder.sh",f="https://qoder.com/device/selectAccounts",g=`${d}/api/v1/deviceToken/poll`,h=`${d}/api/v1/userinfo`,i=`${e}/algo/api/v2/service/pro/sse/agent_chat_generation?FetchKeys=llm_model_result&AgentId=agent_common`,j=`${i}&Encode=1`,k=`${e}/algo/api/v2/model/list`,l="1.0.0",m="5",n="disagree",o="v2",p="x86_64_windows",q="5",r=`-----BEGIN PUBLIC KEY-----
6
6
  MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA8iMH5c02LilrsERw9t6Pv5Nc
7
7
  4k6Pz1EaDicBMpdpxKduSZu5OANqUq8er4GM95omAGIOPOh+Nx0spthYA2BqGz+l
8
8
  6HRkPJ7S236FZz73In/KVuLnwI8JJ2CbuJap8kvheCCZpmAWpb/cPx/3Vr/J6I17
@@ -48,7 +48,7 @@ WRONG: Generating massive code blocks without chunking -> TIMEOUT
48
48
 
49
49
  REMEMBER: When in doubt, write LESS per operation. Multiple small operations > one large operation.
50
50
  `.trim();function j(a,b,c){let f=(0,d.sS)(a);if(f)return"none"===f.mode?null:"budget"===f.mode?f.budget:"level"===f.mode?(0,e.nE)(f.level)??16e3:16e3;if(b){let a=function(a,b){if(!a)return;if("function"==typeof a.get)return a.get(b);let c=b.toLowerCase();for(let b of Object.keys(a))if(b.toLowerCase()===c)return a[b]}(b,"anthropic-beta");if("string"==typeof a&&a.toLowerCase().includes("interleaved-thinking"))return 16e3}if(function(a){for(let b of Array.isArray(a?.messages)?a.messages:[]){if(!b||"system"!==b.role&&"user"!==b.role)continue;let a=b.content;if("string"==typeof a){if(q(a))return!0}else if(Array.isArray(a))for(let b of a){let a=b?.text;if("string"==typeof a&&q(a))return!0}}return!!("string"==typeof a?.system&&q(a.system))}(a))return 16e3;if("string"==typeof c&&c){let a=c.toLowerCase();if(a.includes("thinking")||a.includes("-reason"))return 16e3}return null}function k(a){return"string"==typeof a&&a.endsWith(f)}function l(a){return"string"==typeof a&&a.endsWith(g)}function m(a){var b,c;let d=a,e=d.lastIndexOf("(");e>0&&d.endsWith(")")&&(d=d.slice(0,e).trim());let h=!1,i=!1;return k(d)&&(h=!0,d=k(b=d)?b.slice(0,-f.length):b),l(d)&&(i=!0,d=l(c=d)?c.slice(0,-g.length):c),{upstream:d,agentic:h,thinking:i}}function n(a){let{cleanModel:b,override:c}=(0,d.nF)(a);return{model:b,...m(b),thinkingOverride:c}}function o(a,b){if(!b)return a;let c={...a};return"budget"===b.mode?(delete c.output_config,delete c.reasoning_effort,delete c.reasoning,c.thinking={type:"enabled",budget_tokens:b.budget}):c.output_config={...a.output_config||{},effort:"level"===b.mode?b.level:b.mode},c}function p(a=16e3){let b=Math.max(1,Math.min(32e3,Number(a)||16e3));return`<thinking_mode>enabled</thinking_mode>
51
- <max_thinking_length>${b}</max_thinking_length>`}function q(a){return!!a&&!!a.includes("<thinking_mode>")&&(a.includes("<thinking_mode>enabled</thinking_mode>")||a.includes("<thinking_mode>interleaved</thinking_mode>"))}},8526:(a,b,c)=>{c.d(b,{Fb:()=>e,Hd:()=>g,lJ:()=>f});let d=new Set(["function_call","custom_tool_call"]);class e{constructor(){this._tools=new Map,this._messages=new Map,this._order=[],this._itemIdToIndex=new Map,this._toolsByItemId=new Map,this._toolsByCallId=new Map,this._emitted=new Set,this._status=null,this._usage=null,this._responseId=null,this._created=null,this._hasTools=!1,this._error=null,this._model=null,this._incompleteDetails=null,this._finalized=!1}ingest(a,b){if(a&&b)switch(a){case"response.created":this._responseId=b.response?.id||this._responseId,this._created=b.response?.created_at||this._created;break;case"response.output_item.added":{let a=b.item;if(!a)break;let c=b.output_index??a.id??this._order.length;if(this._registerKey(c),this._itemIdToIndex.set(a.id,c),d.has(a.type)){this._hasTools=!0;let b=a.id?this._toolsByItemId.get(a.id):null,d=a.call_id?this._toolsByCallId.get(a.call_id):null,e=b||d;if(e)this._tools.set(c,e),a.id&&this._toolsByItemId.set(a.id,e),a.call_id&&this._toolsByCallId.set(a.call_id,e),!e.name&&a.name&&(e.name=a.name),!e.callId&&a.call_id&&(e.callId=a.call_id),!e.itemId&&a.id&&(e.itemId=a.id);else if(!this._tools.has(c)){let b={itemId:a.id||"",callId:a.call_id||"",name:a.name||"",argsBuffer:"",done:!1,emitted:!1};this._tools.set(c,b),a.id&&this._toolsByItemId.set(a.id,b),a.call_id&&this._toolsByCallId.set(a.call_id,b)}}else"message"!==a.type||this._messages.has(c)||this._messages.set(c,{itemId:a.id||"",textBuffer:"",done:!1,item:{...a,content:[]}});break}case"response.output_text.delta":{let a=b.delta||"";if(a){let c=b.output_index??b.item_id??this._lastMessageKey();this._registerKey(c);let d=this._messages.get(c);d||(d={itemId:b.item_id||"",textBuffer:"",done:!1,item:{type:"message",content:[],role:"assistant"}},this._messages.set(c,d)),d.textBuffer+=a}break}case"response.function_call_arguments.delta":case"response.custom_tool_call_input.delta":{let a=b.delta||"";if(!a)break;let c=this._resolveToolKey(b),d=this._tools.get(c);d&&(d.argsBuffer+=a);break}case"response.output_item.done":{let a=b.item;if(!a)break;let f=b.output_index??this._itemIdToIndex.get(a.id)??a.id;if(d.has(a.type)){let b=this._tools.get(f)||(a.id?this._toolsByItemId.get(a.id):null)||(a.call_id?this._toolsByCallId.get(a.call_id):null);if(b){if(b.done=!0,a.arguments){var c,e;let d="string"==typeof a.arguments?a.arguments:JSON.stringify(a.arguments);c=b.argsBuffer,b.argsBuffer="string"!=typeof(e=d)||""===e?c||"":!c||e.startsWith(c)?e:c.startsWith(e)?c:e}!b.name&&a.name&&(b.name=a.name),!b.callId&&a.call_id&&(b.callId=a.call_id),!b.itemId&&a.id&&(b.itemId=a.id),a.id&&this._toolsByItemId.set(a.id,b),a.call_id&&this._toolsByCallId.set(a.call_id,b)}}else if("message"===a.type){let b=this._messages.get(f);b&&(b.done=!0,b.item=a)}break}case"response.completed":case"response.done":{this._status="completed";let a=b.response?.usage;if(a&&"object"==typeof a){let b=a.input_tokens||a.prompt_tokens||0,c=a.output_tokens||a.completion_tokens||0,d=a.input_tokens_details?.cached_tokens||a.cache_read_input_tokens||0;this._usage={input_tokens:b,output_tokens:c,total_tokens:a.total_tokens||b+c,cached_tokens:d}}let c=b.response?.output;if(Array.isArray(c))for(let a=0;a<c.length;a++)this._ingestFullItem(a,c[a]);break}case"response.failed":case"error":this._status="failed",this._error=b.error||b.response?.error||null;break;case"response.incomplete":{this._status="incomplete",this._incompleteDetails=b.response?.incomplete_details||null;let a=b.response?.usage;if(a&&!this._usage){let b=a.input_tokens||a.prompt_tokens||0,c=a.output_tokens||a.completion_tokens||0;this._usage={input_tokens:b,output_tokens:c,total_tokens:a.total_tokens||b+c,cached_tokens:a.input_tokens_details?.cached_tokens||a.cache_read_input_tokens||0}}break}case"response.cancelled":this._status="cancelled"}}_ingestFullItem(a,b){if(b&&"object"==typeof b)if(this._registerKey(a),this._itemIdToIndex.set(b.id,a),d.has(b.type)){this._hasTools=!0;let c=this._tools.get(a);if(c)c.done=!0,!c.name&&b.name&&(c.name=b.name),!c.callId&&b.call_id&&(c.callId=b.call_id),!c.itemId&&b.id&&(c.itemId=b.id);else{let c="string"==typeof b.arguments?b.arguments:null!=b.arguments?JSON.stringify(b.arguments):"";this._tools.set(a,{itemId:b.id||"",callId:b.call_id||"",name:b.name||"",argsBuffer:c,done:!0,emitted:!1}),b.id&&this._toolsByItemId.set(b.id,this._tools.get(a)),b.call_id&&this._toolsByCallId.set(b.call_id,this._tools.get(a))}}else"message"===b.type&&this._messages.set(a,{itemId:b.id||"",textBuffer:"",done:!0,item:b})}_resolveToolKey(a){if(void 0!==a.output_index)return a.output_index;if(a.item_id){let b=this._itemIdToIndex.get(a.item_id);return void 0!==b?b:a.item_id}let b=[...this._tools.keys()];return b.length>0?b[b.length-1]:0}_registerKey(a){this._order.includes(a)||this._order.push(a)}_lastMessageKey(){let a=[...this._messages.keys()];return a.length>0?a[a.length-1]:0}get status(){return this._status}get usage(){return this._usage}get responseId(){return this._responseId}get created(){return this._created}get error(){return this._error||null}get hasTools(){return this._hasTools}get output(){if(0===this._order.length)return[];let a=[],b=new Set,c=this._order.filter(a=>"number"==typeof a),d=this._order.filter(a=>"string"==typeof a);if(c.length>0){let d=Math.max(...c),e=new Set(c);for(let c=0;c<=d;c++){if(!e.has(c)){a.push({type:"message",content:[],role:"assistant"});continue}let d=this._tools.get(c);if(d){let e=d.itemId||d.callId||`idx-${c}`;b.has(e)||(b.add(e),a.push(this._buildToolOutput(d)));continue}let f=this._messages.get(c);if(f){a.push(this._buildMessageOutput(f));continue}}}for(let c of d){let d=this._tools.get(c);if(d){let e=d.itemId||d.callId||`key-${c}`;b.has(e)||(b.add(e),a.push(this._buildToolOutput(d)));continue}let e=this._messages.get(c);e&&a.push(this._buildMessageOutput(e))}return a}_buildToolOutput(a){return{type:"function_call",id:a.itemId,call_id:a.callId,name:a.name,arguments:a.argsBuffer}}_buildMessageOutput(a){return a.done&&a.item?a.item:{type:"message",role:"assistant",content:[{type:"output_text",text:a.textBuffer}]}}toolCallIndexFor(a){let b=this.getTool(a);if(!b)return 0;let c=new Set,d=0;for(let a of this._order){let e=this._tools.get(a);if(!(!e||c.has(e))){if(c.add(e),e===b)return d;d++}}return d}getTool(a){let b=this._resolveToolKey({item_id:"string"==typeof a?a:void 0,output_index:"number"==typeof a?a:void 0});return this._tools.get(b)}markToolCallEmitted(a){this._emitted.add(a)}isToolCallEmitted(a){return this._emitted.has(a)}get incompleteDetails(){return this._incompleteDetails}get finalized(){return this._finalized}get response(){let a=this._status||"completed";return{id:this._responseId||`resp_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,object:"response",created_at:this._created||Math.floor(Date.now()/1e3),status:a,output:this.output,...this._usage?{usage:this._usage}:{},...this._error?{error:this._error}:{},...this._incompleteDetails?{incomplete_details:this._incompleteDetails}:{}}}finalize(a={}){return this._finalized||(this._finalized=!0,a.error&&!this._error&&(this._error=a.error,this._status||(this._status="failed")),a.status&&!this._status&&(this._status=a.status)),this}}function f(a={}){let b=new e;return a.model&&(b._model=a.model),b}function g(a,b={}){return a.finalize(b),{response:a.response,accumulator:a}}},14170:(a,b,c)=>{c.d(b,{h:()=>d,t:()=>e});let d={OPENAI:"openai",OPENAI_RESPONSES:"openai-responses",OPENAI_RESPONSE:"openai-response",CLAUDE:"claude",GEMINI:"gemini",GEMINI_CLI:"gemini-cli",VERTEX:"vertex",CODEX:"codex",ANTIGRAVITY:"antigravity",KIRO:"kiro",CURSOR:"cursor",OLLAMA:"ollama",COMMANDCODE:"commandcode",ZED:"zed"};function e(a,b){return a.includes("/v1/responses")?d.OPENAI_RESPONSES:a.includes("/v1/messages")?d.CLAUDE:a.includes("/v1/chat/completions")&&Array.isArray(b?.input)?d.OPENAI:null}},17242:(a,b,c)=>{c.d(b,{SF:()=>i,eG:()=>e,fH:()=>h});let d=/^[a-zA-Z0-9_-]+$/;function e(a){return void 0===a?`call_${Date.now()}`:`call_${a}_${Date.now()}`}function f(a=0,b=0,c=""){let d=c?`_${c.replace(/[^a-zA-Z0-9_-]/g,"")}`:"";return`call_msg${a}_tc${b}${d}`}function g(a){if(!a||"string"!=typeof a)return null;let b=a.replace(/[^a-zA-Z0-9_-]/g,"");return b.length>0?b:null}function h(a){if(!a.messages||!Array.isArray(a.messages))return a;for(let b=0;b<a.messages.length;b++){let c=a.messages[b];if("assistant"===c.role&&c.tool_calls&&Array.isArray(c.tool_calls))for(let a=0;a<c.tool_calls.length;a++){let e=c.tool_calls[a];if(!e.id||!d.test(e.id)){let c=g(e.id);e.id=c||f(b,a,e.function?.name)}e.type||(e.type="function"),e.function?.arguments&&"string"!=typeof e.function.arguments&&(e.function.arguments=JSON.stringify(e.function.arguments))}if("tool"===c.role&&c.tool_call_id&&!d.test(c.tool_call_id)){let a=g(c.tool_call_id);c.tool_call_id=a||f(b,0)}if(Array.isArray(c.content))for(let a=0;a<c.content.length;a++){let e=c.content[a];if("tool_use"===e.type&&e.id&&!d.test(e.id)){let c=g(e.id);e.id=c||f(b,a,e.name)}if("tool_result"===e.type&&e.tool_use_id&&!d.test(e.tool_use_id)){let c=g(e.tool_use_id);e.tool_use_id=c||f(b,a)}}}return a}function i(a){if(!a.messages||!Array.isArray(a.messages))return a;let b=[];for(let c=0;c<a.messages.length;c++){let d=a.messages[c],e=a.messages[c+1];b.push(d);let f=function(a){if("assistant"!==a.role)return[];let b=[];if(a.tool_calls&&Array.isArray(a.tool_calls))for(let c of a.tool_calls)c.id&&b.push(c.id);if(Array.isArray(a.content))for(let c of a.content)"tool_use"===c.type&&c.id&&b.push(c.id);return b}(d);if(0!==f.length&&e&&!function(a,b){if(!a||!b.length)return!1;if("tool"===a.role&&a.tool_call_id)return b.includes(a.tool_call_id);if("user"===a.role&&Array.isArray(a.content)){for(let c of a.content)if("tool_result"===c.type&&b.includes(c.tool_use_id))return!0}return!1}(e,f))for(let a of f)b.push({role:"tool",tool_call_id:a,content:""})}return a.messages=b,a}},19979:(a,b,c)=>{c.d(b,{C:()=>n,p:()=>l});var d=c(82926),e=c(14170),f=c(75924),g=c(74525),h=c(62842),i=c(71301),j=c(26922),k=c(55673);function l(a,b,c){let d=new Map,e={model:a,max_tokens:(0,g.M)(b),stream:c};void 0!==b.temperature&&(e.temperature=b.temperature),e.messages=[];let l=[];if(b.messages&&Array.isArray(b.messages)){let a;for(let a of b.messages)a.role===k.z7.SYSTEM&&l.push("string"==typeof a.content?a.content:(0,j.kU)(a.content,"\n"));let c=b.messages.filter(a=>a.role!==k.z7.SYSTEM),f=[],g=()=>{a&&f.length>0&&(e.messages.push({role:a,content:f}),f=[])};for(let b of c){let c=b.role===k.z7.USER||b.role===k.z7.TOOL?k.z7.USER:k.z7.ASSISTANT,l=function(a,b=new Map){let c=[];if(a.role===k.z7.TOOL)c.push({type:k.R4.TOOL_RESULT,tool_use_id:a.tool_call_id,content:a.content});else if(a.role===k.z7.USER){if("string"==typeof a.content)a.content&&c.push({type:k.R4.TEXT,text:a.content});else if(Array.isArray(a.content)){for(let b of a.content)if(b.type===k.x4.TEXT&&b.text)c.push({type:k.R4.TEXT,text:b.text});else if(b.type===k.R4.TOOL_RESULT)c.push({type:k.R4.TOOL_RESULT,tool_use_id:b.tool_use_id,content:b.content,...b.is_error&&{is_error:b.is_error}});else if(b.type===k.x4.IMAGE_URL){let a=b.image_url.url,d=(0,i.W$)(a);d?c.push({type:k.R4.IMAGE,source:{type:"base64",media_type:d.mimeType,data:d.base64}}):(a.startsWith("http://")||a.startsWith("https://"))&&c.push({type:k.R4.IMAGE,source:{type:"url",url:a}})}else if(b.type===k.x4.IMAGE&&b.source)c.push({type:k.R4.IMAGE,source:b.source});else if(b.type===k.x4.FILE&&b.file){let a=b.file.file_data,d=(0,i.W$)(a);d&&"application/pdf"===d.mimeType&&c.push({type:k.R4.DOCUMENT,source:{type:"base64",media_type:d.mimeType,data:d.base64}})}}}else if(a.role===k.z7.ASSISTANT){if(Array.isArray(a.content)){for(let b of a.content)if(b.type===k.x4.TEXT&&b.text)c.push({type:k.R4.TEXT,text:b.text});else if(b.type===k.R4.TOOL_USE)c.push({type:k.R4.TOOL_USE,id:b.id,name:b.name,input:b.input});else if(b.type===k.R4.THINKING){let{cache_control:a,...d}=b;c.push(d)}}else if(a.content){let b="string"==typeof a.content?a.content:(0,j.kU)(a.content,"\n");b&&c.push({type:k.R4.TEXT,text:b})}if(a.tool_calls&&Array.isArray(a.tool_calls)){for(let b of a.tool_calls)if(b.type===k.x4.FUNCTION){let a=""+b.function.name;c.push({type:k.R4.TOOL_USE,id:b.id,name:a,input:(0,h.N)(b.function.arguments,b.function.arguments)})}}}return c}(b,d),m=l.some(a=>a.type===k.R4.TOOL_USE);if(l.some(a=>a.type===k.R4.TOOL_RESULT)){let b=l.filter(a=>a.type===k.R4.TOOL_RESULT),d=l.filter(a=>a.type!==k.R4.TOOL_RESULT);g(),b.length>0&&e.messages.push({role:k.z7.USER,content:b}),d.length>0&&(a=c,f.push(...d));continue}a!==c&&(g(),a=c),f.push(...l),m&&g()}g();for(let a=e.messages.length-1;a>=0;a--){let b=e.messages[a];if(b.role===k.z7.ASSISTANT&&Array.isArray(b.content)&&b.content.length>0){let a=[k.R4.TEXT,k.R4.TOOL_USE,k.R4.TOOL_RESULT,k.R4.IMAGE];for(let c=b.content.length-1;c>=0;c--){let d=b.content[c];if(a.includes(d.type)){d.cache_control={type:"ephemeral"};break}}break}}}if(b.response_format){let a=b.response_format;if("json_schema"===a.type&&a.json_schema?.schema){let b=JSON.stringify(a.json_schema.schema,null,2);l.push(`You must respond with valid JSON that strictly follows this JSON schema:
51
+ <max_thinking_length>${b}</max_thinking_length>`}function q(a){return!!a&&!!a.includes("<thinking_mode>")&&(a.includes("<thinking_mode>enabled</thinking_mode>")||a.includes("<thinking_mode>interleaved</thinking_mode>"))}},8526:(a,b,c)=>{c.d(b,{Fb:()=>e,Hd:()=>g,lJ:()=>f});let d=new Set(["function_call","custom_tool_call"]);class e{constructor(){this._tools=new Map,this._messages=new Map,this._order=[],this._itemIdToIndex=new Map,this._toolsByItemId=new Map,this._toolsByCallId=new Map,this._emitted=new Set,this._status=null,this._usage=null,this._responseId=null,this._created=null,this._hasTools=!1,this._error=null,this._model=null,this._incompleteDetails=null,this._finalized=!1}ingest(a,b){if(a&&b)switch(a){case"response.created":this._responseId=b.response?.id||this._responseId,this._created=b.response?.created_at||this._created;break;case"response.output_item.added":{let a=b.item;if(!a)break;let c=b.output_index??a.id??this._order.length;if(this._registerKey(c),this._itemIdToIndex.set(a.id,c),d.has(a.type)){this._hasTools=!0;let b=a.id?this._toolsByItemId.get(a.id):null,d=a.call_id?this._toolsByCallId.get(a.call_id):null,e=b||d;if(e)this._tools.set(c,e),a.id&&this._toolsByItemId.set(a.id,e),a.call_id&&this._toolsByCallId.set(a.call_id,e),!e.name&&a.name&&(e.name=a.name),!e.callId&&a.call_id&&(e.callId=a.call_id),!e.itemId&&a.id&&(e.itemId=a.id);else if(!this._tools.has(c)){let b={itemId:a.id||"",callId:a.call_id||"",name:a.name||"",argsBuffer:"",done:!1,emitted:!1};this._tools.set(c,b),a.id&&this._toolsByItemId.set(a.id,b),a.call_id&&this._toolsByCallId.set(a.call_id,b)}}else"message"!==a.type||this._messages.has(c)||this._messages.set(c,{itemId:a.id||"",textBuffer:"",done:!1,item:{...a,content:[]}});break}case"response.output_text.delta":{let a=b.delta||"";if(a){let c=b.output_index??b.item_id??this._lastMessageKey();this._registerKey(c);let d=this._messages.get(c);d||(d={itemId:b.item_id||"",textBuffer:"",done:!1,item:{type:"message",content:[],role:"assistant"}},this._messages.set(c,d)),d.textBuffer+=a}break}case"response.function_call_arguments.delta":case"response.custom_tool_call_input.delta":{let a=b.delta||"";if(!a)break;let c=this._resolveToolKey(b),d=this._tools.get(c);d&&(d.argsBuffer+=a);break}case"response.output_item.done":{let a=b.item;if(!a)break;let f=b.output_index??this._itemIdToIndex.get(a.id)??a.id;if(d.has(a.type)){let b=this._tools.get(f)||(a.id?this._toolsByItemId.get(a.id):null)||(a.call_id?this._toolsByCallId.get(a.call_id):null);if(b){if(b.done=!0,a.arguments){var c,e;let d="string"==typeof a.arguments?a.arguments:JSON.stringify(a.arguments);c=b.argsBuffer,b.argsBuffer="string"!=typeof(e=d)||""===e?c||"":!c||e.startsWith(c)?e:c.startsWith(e)?c:e}!b.name&&a.name&&(b.name=a.name),!b.callId&&a.call_id&&(b.callId=a.call_id),!b.itemId&&a.id&&(b.itemId=a.id),a.id&&this._toolsByItemId.set(a.id,b),a.call_id&&this._toolsByCallId.set(a.call_id,b)}}else if("message"===a.type){let b=this._messages.get(f);b&&(b.done=!0,b.item=a)}break}case"response.completed":case"response.done":{this._status="completed";let a=b.response?.usage;if(a&&"object"==typeof a){let b=a.input_tokens||a.prompt_tokens||0,c=a.output_tokens||a.completion_tokens||0,d=a.input_tokens_details?.cached_tokens||a.cache_read_input_tokens||0;this._usage={input_tokens:b,output_tokens:c,total_tokens:a.total_tokens||b+c,cached_tokens:d}}let c=b.response?.output;if(Array.isArray(c))for(let a=0;a<c.length;a++)this._ingestFullItem(a,c[a]);break}case"response.failed":case"error":this._status="failed",this._error=b.error||b.response?.error||null;break;case"response.incomplete":{this._status="incomplete",this._incompleteDetails=b.response?.incomplete_details||null;let a=b.response?.usage;if(a&&!this._usage){let b=a.input_tokens||a.prompt_tokens||0,c=a.output_tokens||a.completion_tokens||0;this._usage={input_tokens:b,output_tokens:c,total_tokens:a.total_tokens||b+c,cached_tokens:a.input_tokens_details?.cached_tokens||a.cache_read_input_tokens||0}}break}case"response.cancelled":this._status="cancelled"}}_ingestFullItem(a,b){if(b&&"object"==typeof b)if(this._registerKey(a),this._itemIdToIndex.set(b.id,a),d.has(b.type)){this._hasTools=!0;let c=this._tools.get(a);if(c)c.done=!0,!c.name&&b.name&&(c.name=b.name),!c.callId&&b.call_id&&(c.callId=b.call_id),!c.itemId&&b.id&&(c.itemId=b.id);else{let c="string"==typeof b.arguments?b.arguments:null!=b.arguments?JSON.stringify(b.arguments):"";this._tools.set(a,{itemId:b.id||"",callId:b.call_id||"",name:b.name||"",argsBuffer:c,done:!0,emitted:!1}),b.id&&this._toolsByItemId.set(b.id,this._tools.get(a)),b.call_id&&this._toolsByCallId.set(b.call_id,this._tools.get(a))}}else"message"===b.type&&this._messages.set(a,{itemId:b.id||"",textBuffer:"",done:!0,item:b})}_resolveToolKey(a){if(void 0!==a.output_index)return a.output_index;if(a.item_id){let b=this._itemIdToIndex.get(a.item_id);return void 0!==b?b:a.item_id}let b=[...this._tools.keys()];return b.length>0?b[b.length-1]:0}_registerKey(a){this._order.includes(a)||this._order.push(a)}_lastMessageKey(){let a=[...this._messages.keys()];return a.length>0?a[a.length-1]:0}get status(){return this._status}get usage(){return this._usage}get responseId(){return this._responseId}get created(){return this._created}get error(){return this._error||null}get hasTools(){return this._hasTools}get output(){if(0===this._order.length)return[];let a=[],b=new Set,c=this._order.filter(a=>"number"==typeof a),d=this._order.filter(a=>"string"==typeof a);if(c.length>0){let d=Math.max(...c),e=new Set(c);for(let c=0;c<=d;c++){if(!e.has(c)){a.push({type:"message",content:[],role:"assistant"});continue}let d=this._tools.get(c);if(d){let e=d.itemId||d.callId||`idx-${c}`;b.has(e)||(b.add(e),a.push(this._buildToolOutput(d)));continue}let f=this._messages.get(c);if(f){a.push(this._buildMessageOutput(f));continue}}}for(let c of d){let d=this._tools.get(c);if(d){let e=d.itemId||d.callId||`key-${c}`;b.has(e)||(b.add(e),a.push(this._buildToolOutput(d)));continue}let e=this._messages.get(c);e&&a.push(this._buildMessageOutput(e))}return a}_buildToolOutput(a){return{type:"function_call",id:a.itemId,call_id:a.callId,name:a.name,arguments:a.argsBuffer}}_buildMessageOutput(a){return a.done&&a.item?a.item:{type:"message",role:"assistant",content:[{type:"output_text",text:a.textBuffer}]}}toolCallIndexFor(a){let b=this.getTool(a);if(!b)return 0;let c=new Set,d=0;for(let a of this._order){let e=this._tools.get(a);if(!(!e||c.has(e))){if(c.add(e),e===b)return d;d++}}return d}getTool(a){let b=this._resolveToolKey({item_id:"string"==typeof a?a:void 0,output_index:"number"==typeof a?a:void 0});return this._tools.get(b)}markToolCallEmitted(a){this._emitted.add(a)}isToolCallEmitted(a){return this._emitted.has(a)}get incompleteDetails(){return this._incompleteDetails}get finalized(){return this._finalized}get response(){let a=this._status||"completed";return{id:this._responseId||`resp_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,object:"response",created_at:this._created||Math.floor(Date.now()/1e3),status:a,output:this.output,...this._usage?{usage:this._usage}:{},...this._error?{error:this._error}:{},...this._incompleteDetails?{incomplete_details:this._incompleteDetails}:{}}}finalize(a={}){return this._finalized||(this._finalized=!0,a.error&&!this._error&&(this._error=a.error,this._status||(this._status="failed")),a.status&&!this._status&&(this._status=a.status)),this}}function f(a={}){let b=new e;return a.model&&(b._model=a.model),b}function g(a,b={}){return a.finalize(b),{response:a.response,accumulator:a}}},14170:(a,b,c)=>{c.d(b,{h:()=>d,t:()=>e});let d={OPENAI:"openai",OPENAI_RESPONSES:"openai-responses",OPENAI_RESPONSE:"openai-response",CLAUDE:"claude",GEMINI:"gemini",GEMINI_CLI:"gemini-cli",VERTEX:"vertex",CODEX:"codex",ANTIGRAVITY:"antigravity",KIRO:"kiro",CURSOR:"cursor",OLLAMA:"ollama",COMMANDCODE:"commandcode",ZED:"zed"};function e(a,b){return a.includes("/v1/responses")?d.OPENAI_RESPONSES:a.includes("/v1/messages")?d.CLAUDE:a.includes("/v1/chat/completions")&&Array.isArray(b?.input)?d.OPENAI:null}},17242:(a,b,c)=>{c.d(b,{SF:()=>i,eG:()=>e,fH:()=>h});let d=/^[a-zA-Z0-9_-]+$/;function e(a){return void 0===a?`call_${Date.now()}`:`call_${a}_${Date.now()}`}function f(a=0,b=0,c=""){let d=c?`_${c.replace(/[^a-zA-Z0-9_-]/g,"")}`:"";return`call_msg${a}_tc${b}${d}`}function g(a){if(!a||"string"!=typeof a)return null;let b=a.replace(/[^a-zA-Z0-9_-]/g,"");return b.length>0?b:null}function h(a){if(!a.messages||!Array.isArray(a.messages))return a;for(let b=0;b<a.messages.length;b++){let c=a.messages[b];if("assistant"===c.role&&c.tool_calls&&Array.isArray(c.tool_calls))for(let a=0;a<c.tool_calls.length;a++){let e=c.tool_calls[a];if(!e.id||!d.test(e.id)){let c=g(e.id);e.id=c||f(b,a,e.function?.name)}e.type||(e.type="function"),e.function?.arguments&&"string"!=typeof e.function.arguments&&(e.function.arguments=JSON.stringify(e.function.arguments))}if("tool"===c.role&&c.tool_call_id&&!d.test(c.tool_call_id)){let a=g(c.tool_call_id);c.tool_call_id=a||f(b,0)}if(Array.isArray(c.content))for(let a=0;a<c.content.length;a++){let e=c.content[a];if("tool_use"===e.type&&e.id&&!d.test(e.id)){let c=g(e.id);e.id=c||f(b,a,e.name)}if("tool_result"===e.type&&e.tool_use_id&&!d.test(e.tool_use_id)){let c=g(e.tool_use_id);e.tool_use_id=c||f(b,a)}}}return a}function i(a){if(!a.messages||!Array.isArray(a.messages))return a;let b=[];for(let c=0;c<a.messages.length;c++){let d=a.messages[c],e=a.messages[c+1];b.push(d);let f=function(a){if("assistant"!==a.role)return[];let b=[];if(a.tool_calls&&Array.isArray(a.tool_calls))for(let c of a.tool_calls)c.id&&b.push(c.id);if(Array.isArray(a.content))for(let c of a.content)"tool_use"===c.type&&c.id&&b.push(c.id);return b}(d);if(0!==f.length&&e&&!function(a,b){if(!a||!b.length)return!1;if("tool"===a.role&&a.tool_call_id)return b.includes(a.tool_call_id);if("user"===a.role&&Array.isArray(a.content)){for(let c of a.content)if("tool_result"===c.type&&b.includes(c.tool_use_id))return!0}return!1}(e,f))for(let a of f)b.push({role:"tool",tool_call_id:a,content:""})}return a.messages=b,a}},19979:(a,b,c)=>{c.d(b,{C:()=>n,p:()=>l});var d=c(82926),e=c(14170),f=c(75924),g=c(74525),h=c(62842),i=c(71301),j=c(26922),k=c(55673);function l(a,b,c){let d=new Map,e={model:a,max_tokens:(0,g.M)(b),stream:c};void 0!==b.temperature&&(e.temperature=b.temperature),e.messages=[];let l=[];if(b.messages&&Array.isArray(b.messages)){let a;for(let a of b.messages)a.role===k.z7.SYSTEM&&l.push("string"==typeof a.content?a.content:(0,j.kU)(a.content,"\n"));let c=b.messages.filter(a=>a.role!==k.z7.SYSTEM),f=[],g=()=>{a&&f.length>0&&(e.messages.push({role:a,content:f}),f=[])};for(let b of c){let c=b.role===k.z7.USER||b.role===k.z7.TOOL?k.z7.USER:k.z7.ASSISTANT,l=function(a,b=new Map){let c=[];if(a.role===k.z7.TOOL)c.push({type:k.R4.TOOL_RESULT,tool_use_id:a.tool_call_id,content:a.content});else if(a.role===k.z7.USER){if("string"==typeof a.content)a.content&&c.push({type:k.R4.TEXT,text:a.content});else if(Array.isArray(a.content)){for(let b of a.content)if(b.type===k.x4.TEXT&&b.text)c.push({type:k.R4.TEXT,text:b.text});else if(b.type===k.R4.TOOL_RESULT)c.push({type:k.R4.TOOL_RESULT,tool_use_id:b.tool_use_id,content:b.content,...b.is_error&&{is_error:b.is_error}});else if(b.type===k.x4.IMAGE_URL){let a=b.image_url.url,d=(0,i.W$)(a);d?c.push({type:k.R4.IMAGE,source:{type:"base64",media_type:d.mimeType,data:d.base64}}):(a.startsWith("http://")||a.startsWith("https://"))&&c.push({type:k.R4.IMAGE,source:{type:"url",url:a}})}else if(b.type===k.x4.IMAGE&&b.source)c.push({type:k.R4.IMAGE,source:b.source});else if(b.type===k.x4.FILE&&b.file){let a=b.file.file_data,d=(0,i.W$)(a);d&&"application/pdf"===d.mimeType&&c.push({type:k.R4.DOCUMENT,source:{type:"base64",media_type:d.mimeType,data:d.base64}})}}}else if(a.role===k.z7.ASSISTANT){if(a.reasoning_content&&c.push({type:k.R4.THINKING,thinking:a.reasoning_content}),Array.isArray(a.content)){for(let b of a.content)if(b.type===k.x4.TEXT&&b.text)c.push({type:k.R4.TEXT,text:b.text});else if(b.type===k.R4.TOOL_USE)c.push({type:k.R4.TOOL_USE,id:b.id,name:b.name,input:b.input});else if(b.type===k.R4.THINKING){let{cache_control:a,...d}=b;c.push(d)}}else if(a.content){let b="string"==typeof a.content?a.content:(0,j.kU)(a.content,"\n");b&&c.push({type:k.R4.TEXT,text:b})}if(a.tool_calls&&Array.isArray(a.tool_calls)){for(let b of a.tool_calls)if(b.type===k.x4.FUNCTION){let a=""+b.function.name;c.push({type:k.R4.TOOL_USE,id:b.id,name:a,input:(0,h.N)(b.function.arguments,b.function.arguments)})}}}return c}(b,d),m=l.some(a=>a.type===k.R4.TOOL_USE);if(l.some(a=>a.type===k.R4.TOOL_RESULT)){let b=l.filter(a=>a.type===k.R4.TOOL_RESULT),d=l.filter(a=>a.type!==k.R4.TOOL_RESULT);g(),b.length>0&&e.messages.push({role:k.z7.USER,content:b}),d.length>0&&(a=c,f.push(...d));continue}a!==c&&(g(),a=c),f.push(...l),m&&g()}g();for(let a=e.messages.length-1;a>=0;a--){let b=e.messages[a];if(b.role===k.z7.ASSISTANT&&Array.isArray(b.content)&&b.content.length>0){let a=[k.R4.TEXT,k.R4.TOOL_USE,k.R4.TOOL_RESULT,k.R4.IMAGE];for(let c=b.content.length-1;c>=0;c--){let d=b.content[c];if(a.includes(d.type)){d.cache_control={type:"ephemeral"};break}}break}}}if(b.response_format){let a=b.response_format;if("json_schema"===a.type&&a.json_schema?.schema){let b=JSON.stringify(a.json_schema.schema,null,2);l.push(`You must respond with valid JSON that strictly follows this JSON schema:
52
52
  \`\`\`json
53
53
  ${b}
54
54
  \`\`\`