9router 0.5.2 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1044) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +10 -10
  3. package/app/.next-cli-build/build-manifest.json +6 -6
  4. package/app/.next-cli-build/react-loadable-manifest.json +2 -2
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +4 -4
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  69. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  72. package/app/.next-cli-build/server/app/_global-error.rsc +7 -7
  73. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +7 -7
  74. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
  75. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +3 -3
  76. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +3 -3
  77. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +3 -3
  78. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  80. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  83. package/app/.next-cli-build/server/app/_not-found.rsc +18 -17
  84. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +18 -17
  85. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +4 -4
  86. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +7 -6
  87. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  88. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  89. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  90. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  91. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +10 -10
  105. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  107. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  111. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  113. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  117. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  119. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  121. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  125. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  127. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  129. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  133. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  153. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +3 -3
  155. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  185. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  235. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  237. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  241. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  257. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  279. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -0
  289. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -0
  290. package/app/.next-cli-build/server/app/api/usage/logs/route_client-reference-manifest.js +1 -0
  291. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  300. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  314. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  346. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  348. package/app/.next-cli-build/server/app/callback.html +1 -1
  349. package/app/.next-cli-build/server/app/callback.rsc +22 -21
  350. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +22 -21
  351. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +4 -4
  352. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +7 -6
  353. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  354. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  355. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +3 -3
  356. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  357. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +20 -19
  358. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +3 -3
  359. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +3 -3
  360. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  361. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  362. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +20 -19
  363. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +4 -4
  364. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +7 -6
  365. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  366. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  367. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +21 -20
  368. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +3 -3
  369. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +3 -3
  370. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  371. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  372. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +21 -20
  373. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +4 -4
  374. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +7 -6
  375. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  376. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  377. package/app/.next-cli-build/server/app/dashboard/combos.rsc +23 -22
  378. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +4 -4
  379. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +3 -3
  380. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  381. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  382. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +23 -22
  383. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +4 -4
  384. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +7 -6
  385. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  386. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  387. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +21 -20
  388. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +3 -3
  389. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +3 -3
  390. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  391. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  392. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +21 -20
  393. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +4 -4
  394. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +7 -6
  395. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  396. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +23 -22
  398. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +4 -4
  399. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +3 -3
  400. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +3 -3
  401. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  402. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  403. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +23 -22
  404. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +4 -4
  405. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +7 -6
  406. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  407. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +20 -19
  409. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +3 -3
  410. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +3 -3
  411. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  412. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  413. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +20 -19
  414. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +4 -4
  415. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +7 -6
  416. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  417. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/profile.rsc +23 -22
  419. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +4 -4
  420. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +3 -3
  421. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  422. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  423. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +23 -22
  424. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +4 -4
  425. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +7 -6
  426. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  427. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +23 -22
  429. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +4 -4
  430. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +3 -3
  431. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +3 -3
  432. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  433. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  434. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +23 -22
  435. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +4 -4
  436. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +7 -6
  437. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  438. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/providers.rsc +23 -22
  440. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +4 -4
  441. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +3 -3
  442. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  443. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  444. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +23 -22
  445. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +4 -4
  446. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +7 -6
  447. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  448. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +23 -22
  450. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +4 -4
  451. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +3 -3
  452. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  453. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  454. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +23 -22
  455. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +4 -4
  456. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +7 -6
  457. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  458. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  459. package/app/.next-cli-build/server/app/dashboard/quota.rsc +21 -20
  460. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +4 -4
  461. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +3 -3
  462. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  463. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  464. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +21 -20
  465. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +4 -4
  466. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +7 -6
  467. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  468. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  469. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  471. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +22 -21
  473. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +22 -21
  474. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +4 -4
  475. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +7 -6
  476. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
  478. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +3 -3
  479. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +3 -3
  480. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +3 -3
  481. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/skills.rsc +23 -22
  483. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +4 -4
  484. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +3 -3
  485. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  486. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  487. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +23 -22
  488. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +4 -4
  489. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +7 -6
  490. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  491. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/translator.rsc +23 -22
  493. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +4 -4
  494. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +3 -3
  495. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  496. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  497. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +23 -22
  498. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +4 -4
  499. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +7 -6
  500. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  501. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  502. package/app/.next-cli-build/server/app/dashboard/usage.rsc +23 -22
  503. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +4 -4
  504. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +3 -3
  505. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  506. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  507. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +23 -22
  508. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +4 -4
  509. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +7 -6
  510. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  511. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  512. package/app/.next-cli-build/server/app/dashboard.rsc +21 -20
  513. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +3 -3
  514. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +3 -3
  515. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +4 -4
  516. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +21 -20
  517. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +4 -4
  518. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +7 -6
  519. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  520. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  521. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  522. package/app/.next-cli-build/server/app/index.html +1 -1
  523. package/app/.next-cli-build/server/app/index.rsc +17 -16
  524. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +17 -16
  526. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +4 -4
  527. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +7 -6
  528. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  530. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  531. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  532. package/app/.next-cli-build/server/app/landing.html +1 -1
  533. package/app/.next-cli-build/server/app/landing.rsc +22 -21
  534. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +22 -21
  535. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +4 -4
  536. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +7 -6
  537. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  538. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
  539. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +3 -3
  540. package/app/.next-cli-build/server/app/login/page.js +2 -2
  541. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  542. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  543. package/app/.next-cli-build/server/app/login.html +1 -1
  544. package/app/.next-cli-build/server/app/login.rsc +22 -21
  545. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +22 -21
  546. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +4 -4
  547. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +7 -6
  548. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  549. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  550. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +3 -3
  551. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  552. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  553. package/app/.next-cli-build/server/app/page.js +2 -2
  554. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  555. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  556. package/app/.next-cli-build/server/app-paths-manifest.json +10 -10
  557. package/app/.next-cli-build/server/chunks/1220.js +3 -0
  558. package/app/.next-cli-build/server/chunks/1241.js +1 -0
  559. package/app/.next-cli-build/server/chunks/1260.js +1 -0
  560. package/app/.next-cli-build/server/chunks/1813.js +1 -0
  561. package/app/.next-cli-build/server/chunks/{9442.js → 1998.js} +1 -1
  562. package/app/.next-cli-build/server/chunks/2231.js +1 -0
  563. package/app/.next-cli-build/server/chunks/2391.js +1 -0
  564. package/app/.next-cli-build/server/chunks/{64.js → 241.js} +1 -1
  565. package/app/.next-cli-build/server/chunks/{4185.js → 2722.js} +25 -25
  566. package/app/.next-cli-build/server/chunks/28.js +1 -0
  567. package/app/.next-cli-build/server/chunks/318.js +170 -0
  568. package/app/.next-cli-build/server/chunks/3390.js +1 -0
  569. package/app/.next-cli-build/server/chunks/3535.js +1 -0
  570. package/app/.next-cli-build/server/chunks/{6067.js → 3546.js} +1 -1
  571. package/app/.next-cli-build/server/chunks/3586.js +73 -0
  572. package/app/.next-cli-build/server/chunks/3593.js +9 -0
  573. package/app/.next-cli-build/server/chunks/3913.js +64 -0
  574. package/app/.next-cli-build/server/chunks/4055.js +9 -0
  575. package/app/.next-cli-build/server/chunks/412.js +7 -0
  576. package/app/.next-cli-build/server/chunks/4161.js +1 -0
  577. package/app/.next-cli-build/server/chunks/4306.js +1 -0
  578. package/app/.next-cli-build/server/chunks/4632.js +1 -0
  579. package/app/.next-cli-build/server/chunks/{8495.js → 4739.js} +1 -1
  580. package/app/.next-cli-build/server/chunks/4741.js +18 -0
  581. package/app/.next-cli-build/server/chunks/4746.js +1 -0
  582. package/app/.next-cli-build/server/chunks/4780.js +9 -0
  583. package/app/.next-cli-build/server/chunks/4827.js +1 -0
  584. package/app/.next-cli-build/server/chunks/{9022.js → 4852.js} +1 -1
  585. package/app/.next-cli-build/server/chunks/4884.js +13 -0
  586. package/app/.next-cli-build/server/chunks/{593.js → 507.js} +2 -2
  587. package/app/.next-cli-build/server/chunks/5217.js +9 -0
  588. package/app/.next-cli-build/server/chunks/{3630.js → 5258.js} +1 -1
  589. package/app/.next-cli-build/server/chunks/5573.js +1 -0
  590. package/app/.next-cli-build/server/chunks/5615.js +43 -0
  591. package/app/.next-cli-build/server/chunks/5699.js +1 -0
  592. package/app/.next-cli-build/server/chunks/595.js +1 -0
  593. package/app/.next-cli-build/server/chunks/5961.js +1 -0
  594. package/app/.next-cli-build/server/chunks/6070.js +1 -0
  595. package/app/.next-cli-build/server/chunks/615.js +1 -0
  596. package/app/.next-cli-build/server/chunks/6182.js +63 -0
  597. package/app/.next-cli-build/server/chunks/63.js +45 -0
  598. package/app/.next-cli-build/server/chunks/6306.js +1 -0
  599. package/app/.next-cli-build/server/chunks/6445.js +10 -0
  600. package/app/.next-cli-build/server/chunks/6457.js +4 -0
  601. package/app/.next-cli-build/server/chunks/6482.js +11 -0
  602. package/app/.next-cli-build/server/chunks/{8613.js → 6763.js} +1 -1
  603. package/app/.next-cli-build/server/chunks/6777.js +1 -0
  604. package/app/.next-cli-build/server/chunks/{7243.js → 6844.js} +1 -1
  605. package/app/.next-cli-build/server/chunks/6935.js +1 -0
  606. package/app/.next-cli-build/server/chunks/6936.js +1 -0
  607. package/app/.next-cli-build/server/chunks/{1444.js → 698.js} +2 -2
  608. package/app/.next-cli-build/server/chunks/7774.js +120 -0
  609. package/app/.next-cli-build/server/chunks/7828.js +1 -0
  610. package/app/.next-cli-build/server/chunks/{7292.js → 7965.js} +1 -1
  611. package/app/.next-cli-build/server/chunks/8238.js +1 -0
  612. package/app/.next-cli-build/server/chunks/8255.js +1 -0
  613. package/app/.next-cli-build/server/chunks/8271.js +1 -0
  614. package/app/.next-cli-build/server/chunks/{14.js → 8473.js} +5 -5
  615. package/app/.next-cli-build/server/chunks/{499.js → 8520.js} +2 -2
  616. package/app/.next-cli-build/server/chunks/8895.js +56 -0
  617. package/app/.next-cli-build/server/chunks/8910.js +2 -0
  618. package/app/.next-cli-build/server/chunks/{1892.js → 8920.js} +1 -1
  619. package/app/.next-cli-build/server/chunks/8971.js +1 -0
  620. package/app/.next-cli-build/server/chunks/{2212.js → 9528.js} +3 -3
  621. package/app/.next-cli-build/server/chunks/9862.js +3 -0
  622. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  623. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  624. package/app/.next-cli-build/server/middleware.js +14 -14
  625. package/app/.next-cli-build/server/pages/404.html +1 -1
  626. package/app/.next-cli-build/server/pages/500.html +1 -1
  627. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  628. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  629. package/app/.next-cli-build/static/chunks/1051-eb9b83e9f5c9533e.js +64 -0
  630. package/app/.next-cli-build/static/chunks/1321-6d4c988307efce9c.js +1 -0
  631. package/app/.next-cli-build/static/chunks/1393-deaa3e3fe5da3c0c.js +3 -0
  632. package/app/.next-cli-build/static/chunks/1a258343-5938f676ed376386.js +1 -0
  633. package/app/.next-cli-build/static/chunks/3794-123fdf632563f469.js +32 -0
  634. package/app/.next-cli-build/static/chunks/4bd1b696-e356ca5ba0218e27.js +1 -0
  635. package/app/.next-cli-build/static/chunks/5242-bb1a1a7ec3bfb62f.js +1 -0
  636. package/app/.next-cli-build/static/chunks/5497-ac9b18e2b3f003b0.js +7 -0
  637. package/app/.next-cli-build/static/chunks/5772-901f1092d831ec37.js +3 -0
  638. package/app/.next-cli-build/static/chunks/{3771-eede9b56a48ba2e7.js → 6069-62b10374f45001c3.js} +26 -26
  639. package/app/.next-cli-build/static/chunks/705-979ff3eb195b9023.js +1 -0
  640. package/app/.next-cli-build/static/chunks/7055-e60e20f43bfbe5f8.js +1 -0
  641. package/app/.next-cli-build/static/chunks/{1310.277601b1f5c247fc.js → 8202.1ffc6ce531e066ce.js} +1 -1
  642. package/app/.next-cli-build/static/chunks/8982-2ded4564d1c237bf.js +11 -0
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-8ee5e31272f7892c.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-d51be3d3bd57417a.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-9ddb019b546bcbba.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-f172b328f6511b37.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-88cd993b836dec9c.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-b2d5d55248dcd3d3.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-ae6bf8152d48c36c.js → page-39f27df3486a01a2.js} +3 -3
  650. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-2c067b98b7f56068.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-c091e40d2edabce6.js → page-2f8b58c042f39540.js} +2 -2
  652. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-73fb8942bb7fa117.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-c9ccbe661325f70b.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-bad276eb75372477.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-69a63c8c1b1f84e7.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-16bc4a53254fc734.js → page-c9314d6159658d8f.js} +2 -2
  657. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-e1d9bab947553056.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-48377e2f21dbeb44.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-950414df960c3e60.js → page-ab3911903c69147a.js} +2 -2
  660. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-f72e66dd55d53998.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-0346bcad05ea40a4.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-38349afd23d063e2.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-b32efa0400b90a7f.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-db0c91ee7e56c647.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/_global-error/{page-70063f9482377fce.js → page-39495f6c1c52b83a.js} +1 -1
  666. package/app/.next-cli-build/static/chunks/app/_not-found/page-3396db0e61e07183.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/auth/login/{route-70063f9482377fce.js → route-39495f6c1c52b83a.js} +1 -1
  668. package/app/.next-cli-build/static/chunks/app/api/auth/logout/{route-70063f9482377fce.js → route-39495f6c1c52b83a.js} +1 -1
  669. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/{route-70063f9482377fce.js → route-39495f6c1c52b83a.js} +1 -1
  670. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-39495f6c1c52b83a.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-39495f6c1c52b83a.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-39495f6c1c52b83a.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-39495f6c1c52b83a.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-39495f6c1c52b83a.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-39495f6c1c52b83a.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-39495f6c1c52b83a.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-39495f6c1c52b83a.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-39495f6c1c52b83a.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-39495f6c1c52b83a.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-39495f6c1c52b83a.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-39495f6c1c52b83a.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-39495f6c1c52b83a.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-39495f6c1c52b83a.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-39495f6c1c52b83a.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-39495f6c1c52b83a.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-39495f6c1c52b83a.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-39495f6c1c52b83a.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-39495f6c1c52b83a.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-39495f6c1c52b83a.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-39495f6c1c52b83a.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-39495f6c1c52b83a.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/combos/route-39495f6c1c52b83a.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/health/route-39495f6c1c52b83a.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/init/route-39495f6c1c52b83a.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-39495f6c1c52b83a.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/keys/route-39495f6c1c52b83a.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/locale/route-39495f6c1c52b83a.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-39495f6c1c52b83a.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-39495f6c1c52b83a.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-39495f6c1c52b83a.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-39495f6c1c52b83a.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-39495f6c1c52b83a.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-39495f6c1c52b83a.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-39495f6c1c52b83a.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-39495f6c1c52b83a.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-39495f6c1c52b83a.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-39495f6c1c52b83a.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-39495f6c1c52b83a.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/models/route-39495f6c1c52b83a.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/models/test/route-39495f6c1c52b83a.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-39495f6c1c52b83a.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-39495f6c1c52b83a.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-39495f6c1c52b83a.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-39495f6c1c52b83a.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-39495f6c1c52b83a.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-39495f6c1c52b83a.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-39495f6c1c52b83a.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-39495f6c1c52b83a.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-39495f6c1c52b83a.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-39495f6c1c52b83a.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-39495f6c1c52b83a.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-39495f6c1c52b83a.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/pricing/route-39495f6c1c52b83a.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-39495f6c1c52b83a.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-39495f6c1c52b83a.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-39495f6c1c52b83a.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-39495f6c1c52b83a.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-39495f6c1c52b83a.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-39495f6c1c52b83a.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-39495f6c1c52b83a.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-39495f6c1c52b83a.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-39495f6c1c52b83a.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/providers/route-39495f6c1c52b83a.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-39495f6c1c52b83a.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-39495f6c1c52b83a.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-39495f6c1c52b83a.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-39495f6c1c52b83a.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-39495f6c1c52b83a.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-39495f6c1c52b83a.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-39495f6c1c52b83a.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-39495f6c1c52b83a.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-39495f6c1c52b83a.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-39495f6c1c52b83a.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-39495f6c1c52b83a.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-39495f6c1c52b83a.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/settings/route-39495f6c1c52b83a.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-39495f6c1c52b83a.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/tags/route-39495f6c1c52b83a.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-39495f6c1c52b83a.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-39495f6c1c52b83a.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-39495f6c1c52b83a.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-39495f6c1c52b83a.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-39495f6c1c52b83a.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-39495f6c1c52b83a.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-39495f6c1c52b83a.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-39495f6c1c52b83a.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-39495f6c1c52b83a.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-39495f6c1c52b83a.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-39495f6c1c52b83a.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-39495f6c1c52b83a.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-39495f6c1c52b83a.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-39495f6c1c52b83a.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-39495f6c1c52b83a.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-39495f6c1c52b83a.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-39495f6c1c52b83a.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-39495f6c1c52b83a.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-39495f6c1c52b83a.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-39495f6c1c52b83a.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-39495f6c1c52b83a.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-39495f6c1c52b83a.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-39495f6c1c52b83a.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-39495f6c1c52b83a.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-39495f6c1c52b83a.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-39495f6c1c52b83a.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-39495f6c1c52b83a.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-39495f6c1c52b83a.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-39495f6c1c52b83a.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-39495f6c1c52b83a.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-39495f6c1c52b83a.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-39495f6c1c52b83a.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-39495f6c1c52b83a.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-39495f6c1c52b83a.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-39495f6c1c52b83a.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-39495f6c1c52b83a.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-39495f6c1c52b83a.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/v1/route-39495f6c1c52b83a.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-39495f6c1c52b83a.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-39495f6c1c52b83a.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-39495f6c1c52b83a.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-39495f6c1c52b83a.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/version/route-39495f6c1c52b83a.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-39495f6c1c52b83a.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/version/update/route-39495f6c1c52b83a.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/callback/page-9e4704ee20743942.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-6586c129a35d40ef.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/landing/page-89ca9e565739184f.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/layout-81136c44a44956ea.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/login/page-b860537d58a9f64e.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-39495f6c1c52b83a.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/page-39495f6c1c52b83a.js +1 -0
  801. package/app/.next-cli-build/static/chunks/framework-711ef29bc66f648c.js +1 -0
  802. package/app/.next-cli-build/static/chunks/main-app-8803a230dfc5c361.js +1 -0
  803. package/app/.next-cli-build/static/chunks/main-d645701bfd70a30d.js +5 -0
  804. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-39495f6c1c52b83a.js +1 -0
  805. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-39495f6c1c52b83a.js +1 -0
  806. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-f740e7b53cfd899a.js +1 -0
  807. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-39495f6c1c52b83a.js +1 -0
  808. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-39495f6c1c52b83a.js +1 -0
  809. package/app/.next-cli-build/static/chunks/{webpack-ab7d9d893d55abd4.js → webpack-f482ccef6733ebcc.js} +1 -1
  810. package/app/.next-cli-build/static/css/8f9ac5a7bd3a79e5.css +1 -0
  811. package/app/.next-cli-build/static/media/material-symbols-outlined.ec1fa111.woff2 +0 -0
  812. package/app/cli/.build-home/.9router/db/backups/{upgrade-0.4.65-to-0.4.66-0.4.66-20260529-174857 → upgrade-0.5.2-to-0.5.3-0.5.3-20260618-172402}/data.sqlite +0 -0
  813. package/app/cli/.build-home/.9router/db/backups/{upgrade-0.4.66-to-0.4.71-0.4.71-20260606-161630 → upgrade-0.5.3-to-0.5.4-0.5.4-20260618-174450}/data.sqlite +0 -0
  814. package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
  815. package/app/logs/translator/1_req_client.json +1112 -0
  816. package/app/logs/translator/2_req_source.json +1085 -0
  817. package/app/logs/translator/3_req_openai.json +1106 -0
  818. package/app/logs/translator/4_req_target.json +1094 -0
  819. package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
  820. package/app/node_modules/baseline-browser-mapping/package.json +2 -2
  821. package/app/package.json +2 -1
  822. package/package.json +1 -1
  823. package/app/.next-cli-build/server/chunks/107.js +0 -1
  824. package/app/.next-cli-build/server/chunks/1574.js +0 -3
  825. package/app/.next-cli-build/server/chunks/1735.js +0 -1
  826. package/app/.next-cli-build/server/chunks/1790.js +0 -1
  827. package/app/.next-cli-build/server/chunks/1883.js +0 -1
  828. package/app/.next-cli-build/server/chunks/2280.js +0 -10
  829. package/app/.next-cli-build/server/chunks/2371.js +0 -1
  830. package/app/.next-cli-build/server/chunks/2466.js +0 -1
  831. package/app/.next-cli-build/server/chunks/2701.js +0 -1
  832. package/app/.next-cli-build/server/chunks/3595.js +0 -1
  833. package/app/.next-cli-build/server/chunks/375.js +0 -45
  834. package/app/.next-cli-build/server/chunks/4116.js +0 -1
  835. package/app/.next-cli-build/server/chunks/4309.js +0 -1
  836. package/app/.next-cli-build/server/chunks/4343.js +0 -1
  837. package/app/.next-cli-build/server/chunks/4378.js +0 -1
  838. package/app/.next-cli-build/server/chunks/450.js +0 -7
  839. package/app/.next-cli-build/server/chunks/478.js +0 -1
  840. package/app/.next-cli-build/server/chunks/4839.js +0 -1
  841. package/app/.next-cli-build/server/chunks/5046.js +0 -3
  842. package/app/.next-cli-build/server/chunks/5053.js +0 -64
  843. package/app/.next-cli-build/server/chunks/514.js +0 -63
  844. package/app/.next-cli-build/server/chunks/5514.js +0 -1
  845. package/app/.next-cli-build/server/chunks/5607.js +0 -73
  846. package/app/.next-cli-build/server/chunks/583.js +0 -1
  847. package/app/.next-cli-build/server/chunks/6288.js +0 -120
  848. package/app/.next-cli-build/server/chunks/6359.js +0 -43
  849. package/app/.next-cli-build/server/chunks/6379.js +0 -56
  850. package/app/.next-cli-build/server/chunks/6502.js +0 -9
  851. package/app/.next-cli-build/server/chunks/6560.js +0 -1
  852. package/app/.next-cli-build/server/chunks/6634.js +0 -1
  853. package/app/.next-cli-build/server/chunks/666.js +0 -4
  854. package/app/.next-cli-build/server/chunks/6799.js +0 -1
  855. package/app/.next-cli-build/server/chunks/7061.js +0 -9
  856. package/app/.next-cli-build/server/chunks/7171.js +0 -9
  857. package/app/.next-cli-build/server/chunks/7234.js +0 -1
  858. package/app/.next-cli-build/server/chunks/7417.js +0 -1
  859. package/app/.next-cli-build/server/chunks/7686.js +0 -13
  860. package/app/.next-cli-build/server/chunks/7773.js +0 -18
  861. package/app/.next-cli-build/server/chunks/7870.js +0 -1
  862. package/app/.next-cli-build/server/chunks/7958.js +0 -1
  863. package/app/.next-cli-build/server/chunks/8146.js +0 -2
  864. package/app/.next-cli-build/server/chunks/8202.js +0 -170
  865. package/app/.next-cli-build/server/chunks/8474.js +0 -1
  866. package/app/.next-cli-build/server/chunks/8515.js +0 -1
  867. package/app/.next-cli-build/server/chunks/8539.js +0 -1
  868. package/app/.next-cli-build/server/chunks/9060.js +0 -9
  869. package/app/.next-cli-build/server/chunks/9068.js +0 -1
  870. package/app/.next-cli-build/server/chunks/9737.js +0 -1
  871. package/app/.next-cli-build/static/chunks/1273-62c3e49612c8936b.js +0 -1
  872. package/app/.next-cli-build/static/chunks/4156-c80440b839fa0061.js +0 -7
  873. package/app/.next-cli-build/static/chunks/505-189215c1255c77e3.js +0 -1
  874. package/app/.next-cli-build/static/chunks/5158-4b48a3595c794bbc.js +0 -32
  875. package/app/.next-cli-build/static/chunks/6673-c6da4639b0bceacc.js +0 -1
  876. package/app/.next-cli-build/static/chunks/6795-3ddcc1d55c65c001.js +0 -64
  877. package/app/.next-cli-build/static/chunks/8035-6f4bef6a09a84180.js +0 -3
  878. package/app/.next-cli-build/static/chunks/8038-368cfbdf9080110b.js +0 -1
  879. package/app/.next-cli-build/static/chunks/8872-3d43cb238f9deea9.js +0 -3
  880. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-5b35e4cbcb76147d.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-3e2500811f2b0bf2.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-f49db7ddac15e532.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-4faa8f623e956994.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-946e0efba371b5bd.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-f412ae23aeeab19f.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-29fbdd65fe6e902b.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-94cf7dba4b913805.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-b9be8108b66dc9b6.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-a6050eaf504110ab.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-a629454f53628ff6.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-7b8fb94e9856fef7.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-558d3a18b8075b24.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-6d17452b1d84b7f8.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-f1beedf73a6e8e84.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-27691bf39397a877.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-95236879b6ed5efa.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-b7cead5ba7eff7d3.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/_not-found/page-1ab122ef64d03506.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-70063f9482377fce.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-70063f9482377fce.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-70063f9482377fce.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-70063f9482377fce.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-70063f9482377fce.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-70063f9482377fce.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-70063f9482377fce.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-70063f9482377fce.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-70063f9482377fce.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-70063f9482377fce.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-70063f9482377fce.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-70063f9482377fce.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-70063f9482377fce.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-70063f9482377fce.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-70063f9482377fce.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-70063f9482377fce.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-70063f9482377fce.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-70063f9482377fce.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-70063f9482377fce.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-70063f9482377fce.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-70063f9482377fce.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-70063f9482377fce.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/combos/route-70063f9482377fce.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/health/route-70063f9482377fce.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/init/route-70063f9482377fce.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-70063f9482377fce.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/keys/route-70063f9482377fce.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/locale/route-70063f9482377fce.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-70063f9482377fce.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-70063f9482377fce.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-70063f9482377fce.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-70063f9482377fce.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-70063f9482377fce.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-70063f9482377fce.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-70063f9482377fce.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-70063f9482377fce.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-70063f9482377fce.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-70063f9482377fce.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-70063f9482377fce.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/models/route-70063f9482377fce.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/models/test/route-70063f9482377fce.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-70063f9482377fce.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-70063f9482377fce.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-70063f9482377fce.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-70063f9482377fce.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-70063f9482377fce.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-70063f9482377fce.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-70063f9482377fce.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-70063f9482377fce.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-70063f9482377fce.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-70063f9482377fce.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-70063f9482377fce.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-70063f9482377fce.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/pricing/route-70063f9482377fce.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-70063f9482377fce.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-70063f9482377fce.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-70063f9482377fce.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-70063f9482377fce.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-70063f9482377fce.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-70063f9482377fce.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-70063f9482377fce.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-70063f9482377fce.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-70063f9482377fce.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/providers/route-70063f9482377fce.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-70063f9482377fce.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-70063f9482377fce.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-70063f9482377fce.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-70063f9482377fce.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-70063f9482377fce.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-70063f9482377fce.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-70063f9482377fce.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-70063f9482377fce.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-70063f9482377fce.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-70063f9482377fce.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-70063f9482377fce.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-70063f9482377fce.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/settings/route-70063f9482377fce.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-70063f9482377fce.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/tags/route-70063f9482377fce.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-70063f9482377fce.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-70063f9482377fce.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-70063f9482377fce.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-70063f9482377fce.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-70063f9482377fce.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-70063f9482377fce.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-70063f9482377fce.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-70063f9482377fce.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-70063f9482377fce.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-70063f9482377fce.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-70063f9482377fce.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-70063f9482377fce.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-70063f9482377fce.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-70063f9482377fce.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-70063f9482377fce.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-70063f9482377fce.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-70063f9482377fce.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-70063f9482377fce.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-70063f9482377fce.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-70063f9482377fce.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-70063f9482377fce.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-70063f9482377fce.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-70063f9482377fce.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-70063f9482377fce.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-70063f9482377fce.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-70063f9482377fce.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-70063f9482377fce.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-70063f9482377fce.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-70063f9482377fce.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-70063f9482377fce.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-70063f9482377fce.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-70063f9482377fce.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-70063f9482377fce.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-70063f9482377fce.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-70063f9482377fce.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-70063f9482377fce.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/v1/route-70063f9482377fce.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-70063f9482377fce.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-70063f9482377fce.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-70063f9482377fce.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-70063f9482377fce.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/version/route-70063f9482377fce.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-70063f9482377fce.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/version/update/route-70063f9482377fce.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/callback/page-6ea4675be396cdb5.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-6aa73fef210a1080.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/landing/page-0084367666bd9046.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/layout-fcda570933db809f.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/login/page-f9158636f427d342.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-70063f9482377fce.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/page-70063f9482377fce.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/c6123951-b42288d628b452ba.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/c7879cf7-255d52e3eda24cb7.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/framework-ec2c38cd02cb5c98.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/main-app-2c8be355ba1c4e93.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/main-dc8d0a9e54eb27e6.js +0 -5
  1034. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-70063f9482377fce.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-70063f9482377fce.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-2e4f2b5b71d077f6.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-70063f9482377fce.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-70063f9482377fce.js +0 -1
  1039. package/app/.next-cli-build/static/css/2e1b7d528c228ec3.css +0 -1
  1040. package/app/.next-cli-build/static/media/material-symbols-outlined.1060ac06.woff2 +0 -0
  1041. /package/app/.next-cli-build/static/{V5d3w7MLY-kaI3zRYObvZ → xyLO6p2GvjiOH2bcsnQ5N}/_buildManifest.js +0 -0
  1042. /package/app/.next-cli-build/static/{V5d3w7MLY-kaI3zRYObvZ → xyLO6p2GvjiOH2bcsnQ5N}/_ssgManifest.js +0 -0
  1043. /package/app/node_modules/{next/node_modules/@next → @next}/env/dist/index.js +0 -0
  1044. /package/app/node_modules/{next/node_modules/@next → @next}/env/package.json +0 -0
@@ -1,2 +0,0 @@
1
- "use strict";exports.id=8146,exports.ids=[8146],exports.modules={48146:(a,b,c)=>{c.d(b,{Pr:()=>m,UP:()=>k,Vu:()=>l,vt:()=>o});var d=c(2449),e=c(29807),f=c(21790),g=c(14262);let h=new Set(["vision","pdf","audioInput","videoInput"]),i=new Map;function j(a){if(!Array.isArray(a)||0===a.length)return[];let b=a=>"assistant"===a||"model"===a,c=a.length-1;for(;c>=0&&!b(a[c]?.role);)c--;return a.slice(c+1)}function k(a){a?i.delete(a):i.clear()}function l(a,b){if(a.includes("/"))return null;let c=(Array.isArray(b)?b:b?.combos||[]).find(b=>b.name===a);return c&&c.models&&c.models.length>0?c.models:null}async function m({body:a,models:b,handleSingleModel:c,log:g,comboName:k,comboStrategy:l,comboStickyLimit:n=1,autoSwitch:o=!0}){let p=function(a,b,c,d=1){let e;if(!a||a.length<=1||"round-robin"!==c)return a;let f=b||"__default__",g=Number.isFinite(e=Number.parseInt(d,10))&&e>0?e:1,h=i.get(f),j="number"==typeof h?{index:h,consecutiveUseCount:0}:h||{index:0,consecutiveUseCount:0},k=j.index%a.length,l=function(a,b){let c=[...a];for(let a=0;a<b;a++){let a=c.shift();c.push(a)}return c}(a,k),m=j.consecutiveUseCount+1;return m>=g?i.set(f,{index:(k+1)%a.length,consecutiveUseCount:0}):i.set(f,{index:k,consecutiveUseCount:m}),l}(b,k,l,n);if(o){let b=function(a){let b=new Set;if(!a||"object"!=typeof a)return b;let c=a=>{if(!a||"object"!=typeof a)return;let c=a.type;("image_url"===c||"image"===c||"input_image"===c)&&b.add("vision"),("file"===c||"document"===c||"input_file"===c)&&b.add("pdf");let d=a.inlineData?.mimeType||a.fileData?.mimeType;"string"==typeof d&&d.startsWith("image/")&&b.add("vision"),"application/pdf"===d&&b.add("pdf")},d=a=>{if(Array.isArray(a))for(let b of a)c(b)};for(let b of j(a.messages))d(b.content);for(let b of j(a.input))d(b.content);for(let b of j(a.contents||a.request?.contents))d(b.parts);return b}(a);if(b.size>0){let a=function(a,b){if(!b||0===b.size||!Array.isArray(a)||a.length<=1)return a;let c=[...b].filter(a=>h.has(a)),d=[...b].filter(a=>!h.has(a));return a.map((a,b)=>{let e,g,h,i;return{m:a,i:b,t:(g=(e="string"==typeof a?a.indexOf("/"):-1)>0?a.slice(0,e):"",h=e>0?a.slice(e+1):a,i=(0,f.nl)(g,h),c.every(a=>!0===i[a])?+!d.every(a=>!0===i[a]):2)}}).sort((a,b)=>a.t-b.t||a.i-b.i).map(a=>a.m)}(p,b);a[0]!==p[0]&&g.info("COMBO",`auto-switch for [${[...b].join(",")}] → ${a[0]}`),p=a}}let q=null,r=null,s=null;for(let b=0;b<p.length;b++){let e=p[b];g.info("COMBO",`Trying model ${b+1}/${p.length}: ${e}`);try{let b=await c(a,e);if(b.ok)return g.info("COMBO",`Model ${e} succeeded`),b;let f=b.statusText||"",h=null;try{let a=await b.clone().json();f=a?.error?.message||a?.error||a?.message||f,h=a?.retryAfter||null}catch{}if(h&&(!r||new Date(h)<new Date(r))&&(r=h),"string"!=typeof f)try{f=JSON.stringify(f)}catch{f=String(f)}let{shouldFallback:i,cooldownMs:j}=(0,d.hk)(b.status,f);if(!i)return g.warn("COMBO",`Model ${e} failed (no fallback)`,{status:b.status}),b;j&&j>0&&j<=5e3&&(503===b.status||502===b.status||504===b.status)&&(g.info("COMBO",`Model ${e} transient ${b.status}, waiting ${j}ms before next`),await new Promise(a=>setTimeout(a,j))),q=f||String(b.status),s||(s=b.status),g.warn("COMBO",`Model ${e} failed, trying next`,{status:b.status})}catch(a){q=a.message||String(a),s||(s=500),g.warn("COMBO",`Model ${e} threw error, trying next`,{error:q})}}let t=q&&q.toLowerCase().includes("no credentials")?503:s||503,u=q||"All combo models unavailable";if(r){let a=(0,d.Qo)(r);return g.warn("COMBO",`All models failed | ${u} (${a})`),(0,e.wO)(t,u,r,a)}return g.warn("COMBO",`All models failed | ${u}`),new Response(JSON.stringify({error:{message:u}}),{status:t,headers:{"Content-Type":"application/json"}})}let n={minPanel:2,stragglerGraceMs:8e3,panelHardTimeoutMs:9e4};async function o({body:a,models:b,handleSingleModel:c,log:d,comboName:e,judgeModel:f,tuning:h}){var i;let j,k,l=Array.isArray(b)?b.filter(Boolean):[];if(0===l.length)return new Response(JSON.stringify({error:{message:"Fusion combo has no models"}}),{status:400,headers:{"Content-Type":"application/json"}});if(1===l.length)return c(a,l[0]);let m={...n,...h||{}},p=Math.min(Math.max(2,m.minPanel),l.length),q=f&&f.trim()?f.trim():l[0];d.info("FUSION",`Combo "${e}" | panel=${l.length} [${l.join(", ")}] | judge=${q} | quorum=${p}`);let{tools:r,tool_choice:s,...t}=a,u={...t,stream:!1},v=Date.now(),w=l.map(a=>{var b,d;return b=c(u,a),d=m.panelHardTimeoutMs,new Promise(a=>{let c=setTimeout(()=>a({__timeout:!0}),d);Promise.resolve(b).then(b=>{clearTimeout(c),a(b)}).catch(b=>{clearTimeout(c),a({__error:b})})})}),x=await function(a,{minPanel:b,stragglerGraceMs:c,panelHardTimeoutMs:d}){return new Promise(e=>{let f=Array(a.length),g=0,h=0,i=!1,j=null,k=()=>{i||(i=!0,clearTimeout(l),j&&clearTimeout(j),e(f))},l=setTimeout(k,d);a.forEach((d,e)=>{Promise.resolve(d).then(a=>{f[e]=a}).catch(a=>{f[e]={__error:a}}).finally(()=>{if(g++,f[e]&&f[e].ok&&h++,g===a.length)return k();h>=b&&!j&&(j=setTimeout(k,c))})})})}(w,{...m,minPanel:p});d.info("FUSION",`fan-out collected in ${Date.now()-v}ms`);let y=[];for(let a=0;a<x.length;a++){let b=x[a],c=l[a];if(!b){d.warn("FUSION",`Panel ${c} dropped (straggler/timeout)`);continue}if(b.__timeout){d.warn("FUSION",`Panel ${c} timed out`);continue}if(b.__error){d.warn("FUSION",`Panel ${c} threw`,{error:b.__error?.message||String(b.__error)});continue}if(!b.ok){d.warn("FUSION",`Panel ${c} failed`,{status:b.status});continue}try{let a=await b.clone().json(),e=function(a){if(!a||"object"!=typeof a)return"";let b=a.choices?.[0];if(b){let a=b.message??b.delta??{},c=(0,g.kU)(a.content);if(c.trim())return c;if("string"==typeof b.text&&b.text.trim())return b.text}let c=(0,g.kU)(a.content);if(c.trim())return c;let d=a.candidates?.[0]?.content?.parts;if(Array.isArray(d)){let a=d.map(a=>a?.text||"").join("");if(a.trim())return a}if(Array.isArray(a.output)){let b=a.output.flatMap(a=>Array.isArray(a.content)?a.content.map(a=>a?.text||""):[]).join("");if(b.trim())return b}return""}(a);e?(y.push({model:c,text:e}),d.info("FUSION",`Panel ${c} ok (${e.length} chars)`)):d.warn("FUSION",`Panel ${c} returned empty content`)}catch(a){d.warn("FUSION",`Panel ${c} unparseable`,{error:a.message||String(a)})}}if(0===y.length)return d.warn("FUSION","All panel models failed"),new Response(JSON.stringify({error:{message:"All fusion panel models failed"}}),{status:503,headers:{"Content-Type":"application/json"}});if(1===y.length)return d.info("FUSION",`Only ${y[0].model} succeeded — answering directly (no fusion)`),c(a,y[0].model);let z=(j=y.map((a,b)=>`[Source ${b+1}]
2
- ${a.text}`).join("\n\n"),i=[`You are the JUDGE in a model-fusion panel. ${y.length} expert models independently answered the user's most recent request. Their responses are below, anonymized by source.`,"\nDo NOT mention that multiple models were used, and do NOT refer to the sources. Produce ONE authoritative final answer addressed directly to the user.\n\nFirst, internally analyze the panel along these dimensions: consensus (points most sources agree on — treat as higher-confidence), contradictions (where they disagree — resolve with your own judgment), partial coverage, unique insights only one source surfaced, and blind spots every source missed. Then write the best possible final answer grounded in that analysis — more complete and correct than any single response, with no filler.\n\n=== PANEL RESPONSES ===",j,"=== END PANEL RESPONSES ===\n\nNow write the final answer to the user's original request."].join("\n"),k={...a},Array.isArray(a.messages)?k.messages=[...a.messages,{role:"user",content:i}]:Array.isArray(a.input)?k.input=[...a.input,{role:"user",content:i}]:Array.isArray(a.contents)?k.contents=[...a.contents,{role:"user",parts:[{text:i}]}]:k.messages=[{role:"user",content:i}],k);return d.info("FUSION",`Judging ${y.length} answers with ${q}`),c(z,q)}}};
@@ -1,170 +0,0 @@
1
- "use strict";exports.id=8202,exports.ids=[8202],exports.modules={4436:(a,b,c)=>{function d(a){return`data: ${JSON.stringify(a)}
2
-
3
- `}function e({id:a,created:b,model:c,delta:f,finishReason:g=null}){return d({id:a,object:"chat.completion.chunk",created:b,model:c,choices:[{index:0,delta:f,finish_reason:g}]})}c.d(b,{N:()=>d,z:()=>e})},7843:(a,b,c)=>{c.d(b,{d:()=>i});var d=c(55511),e=c.n(d),f=c(37873),g=c(75732);function h(a){return e().createHash("md5").update(a).digest("hex")}function i(a,b,c){var d;let i,j;if(!c?.userId)throw Error("cosy: user id is empty");if(!c?.authToken)throw Error("cosy: auth token is empty");let k=Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"latin1"):Buffer.from(a||[]),{cosyKey:l,info:m}=(d={uid:c.userId,security_oauth_token:c.authToken,name:c.name||"",aid:"",email:c.email||""},i=(0,f.A)().slice(0,16),j=function(a,b){var c;let d,f,g=Buffer.from(b,"utf8");if(16!==g.length)throw Error(`aes key must be 16 bytes, got ${g.length}`);let h=g.subarray(0,16),i=e().createCipheriv("aes-128-cbc",g,h);i.setAutoPadding(!1);let j=(d=16-(c=Buffer.from(a,"utf8")).length%16,f=Buffer.alloc(c.length+d,d),c.copy(f,0),f);return Buffer.concat([i.update(j),i.final()]).toString("base64")}(JSON.stringify(d),i),{cosyKey:e().publicEncrypt({key:g.pr,padding:e().constants.RSA_PKCS1_PADDING},Buffer.from(i,"utf8")).toString("base64"),info:j}),n=String(Math.floor(Date.now()/1e3)),o=JSON.stringify({version:"v1",requestId:(0,f.A)(),info:m,cosyVersion:g.cT,ideVersion:""}),p=Buffer.from(o,"utf8").toString("base64"),q=function(a){let b;try{b=new URL(a).pathname||""}catch{return""}return b.startsWith("/algo")?b.slice(5):b}(b),r=`${p}
4
- ${l}
5
- ${n}
6
- ${k.toString("latin1")}
7
- ${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)()}}},11572:(a,b,c)=>{c.d(b,{A4:()=>g,c2:()=>f,tV:()=>e,v8:()=>i});var d=c(56790);function e(a,b=null){if(!a)return null;if(b===d.h.OLLAMA){let b=a.trim();if(b.startsWith("{"))try{return JSON.parse(b)}catch(a){}return null}if(100!==a.charCodeAt(0))return null;let c=a.slice(5).trim();if("[DONE]"===c)return{done:!0};try{return JSON.parse(c)}catch(a){return c.length>0&&c.length<1e3&&console.log(`[WARN] Failed to parse SSE line (${c.length} chars): ${c.substring(0,100)}...`),null}}function f(a,b){if(b===d.h.OPENAI&&a.choices?.[0]?.delta){let b=a.choices[0].delta;return b.content&&""!==b.content||b.reasoning_content&&""!==b.reasoning_content||b.tool_calls&&b.tool_calls.length>0||a.choices[0].finish_reason||b.role}if(b===d.h.CLAUDE){let b="content_block_delta"===a.type,c=a.delta?.text&&""!==a.delta.text,d=a.delta?.thinking&&""!==a.delta.thinking,e=a.delta?.partial_json&&""!==a.delta.partial_json;if(b&&!c&&!d&&!e)return!1}return!0}function g(a){if(a.id&&("chat"===a.id||"completion"===a.id||a.id.length<8)){let b=a.extend_fields?.requestId||a.extend_fields?.traceId||Date.now().toString(36);return a.id=`chatcmpl-${b}`,!0}return!1}function h(a){if(!a||"object"!=typeof a||Array.isArray(a))return a;let b=a;if("usage"in b){if(null===b.usage){let{usage:a,...c}=b;b=c}else if("object"==typeof b.usage&&null===b.usage.perf_metrics){let{perf_metrics:a,...c}=b.usage;b={...b,usage:c}}}if(b.response&&"object"==typeof b.response&&!Array.isArray(b.response)){let a=h(b.response);a!==b.response&&(b={...b,response:a})}return b}function i(a,b){if(null==a)return"data: null\n\n";if(a&&a.done)return"data: [DONE]\n\n";if(a&&a.event&&a.data){let b=h(a.data);return`event: ${a.event}
8
- data: ${JSON.stringify(b)}
9
-
10
- `}return(a=h(a),b===d.h.CLAUDE&&a&&a.type)?`event: ${a.type}
11
- data: ${JSON.stringify(a)}
12
-
13
- `:`data: ${JSON.stringify(a)}
14
-
15
- `}},21241:(a,b,c)=>{c.d(b,{j:()=>h});var d=c(24353),e=c(62276),f=c(74264);let g=new Set;class h extends d.H{constructor(){super("opencode",e.xq.opencode)}transformRequest(a,b){return(0,f.Z)({provider:this.provider,model:a,body:b})}buildUrl(a){let b=this.config.baseUrl;return g.has(a)?`${b}/zen/v1/messages`:`${b}/zen/v1/chat/completions`}buildHeaders(){return{"Content-Type":"application/json",Authorization:"Bearer public","x-opencode-client":"desktop",Accept:"text/event-stream"}}}},21303:(a,b,c)=>{c.d(b,{B:()=>i});var d=c(24353),e=c(62276),f=c(37873),g=c(54177),h=c(63483);class i extends d.H{constructor(){super("kiro",e.xq.kiro)}buildHeaders(a,b=!0){let c={...this.config.headers,"Amz-Sdk-Request":"attempt=1; max=3","Amz-Sdk-Invocation-Id":(0,f.A)()},d=a?.providerSpecificData?.authMethod==="api_key",e=a?.apiKey||(d?a?.accessToken:null);return d&&e?(c.Authorization=`Bearer ${e}`,c.tokentype="API_KEY"):a.accessToken&&(c.Authorization=`Bearer ${a.accessToken}`),c}getOrderedBaseUrls(a){let b=this.getBaseUrls();if(a?.providerSpecificData?.authMethod!=="api_key")return b;let c=b.filter(a=>a.includes("amazonaws.com")),d=b.filter(a=>!a.includes("amazonaws.com"));return c.length>0?[...c,...d]:b}buildUrl(a,b,c=0,d=null){let e=this.getOrderedBaseUrls(d);return e[c]||e[0]||this.config.baseUrl}transformRequest(a,b,c,d){return b}async execute(a){let b=await super.execute(a);return b?.response?.ok&&(b.response=this.transformEventStreamToSSE(b.response,a.model)),b}transformEventStreamToSSE(a,b){let c=new Uint8Array(0),d=0,e=`chatcmpl-${Date.now()}`,f=Math.floor(Date.now()/1e3),g={endDetected:!1,finishEmitted:!1,hasToolCalls:!1,hasReasoningContent:!1,reasoningChunkCount:0,toolCallIndex:0,seenToolIds:new Map},i=new TransformStream({async transform(a,h){let i=d,j=new Uint8Array(c.length+a.length);j.set(c),j.set(a,c.length),c=j;let k=0;for(;c.length>=16&&k<1e3;){k++;let a=new DataView(c.buffer,c.byteOffset).getUint32(0,!1);if(a<16||a>c.length||c.length<a)break;let i=c.slice(0,a);c=c.slice(a);let j=function(a){try{let b=new DataView(a.buffer,a.byteOffset).getUint32(4,!1),c={},d=12,e=12+b;for(;d<e&&d<a.length;){let b=a[d];if(++d+b>a.length)break;let e=new TextDecoder().decode(a.slice(d,d+b)),f=a[d+=b];if(d++,7===f){let b=a[d]<<8|a[d+1];if((d+=2)+b>a.length)break;let f=new TextDecoder().decode(a.slice(d,d+b));d+=b,c[e]=f}else break}let f=12+b,g=a.length-4,h=null;if(g>f){let b=new TextDecoder().decode(a.slice(f,g));if(!b||!b.trim())return{headers:c,payload:null};try{h=JSON.parse(b)}catch(a){console.warn(`[Kiro] Failed to parse payload: ${a.message} | payload: ${b.substring(0,100)}`),h={raw:b}}}return{headers:c,payload:h}}catch{return null}}(i);if(!j)continue;let l=j.headers[":event-type"]||"";if(g.totalContentLength||(g.totalContentLength=0),g.contextUsagePercentage||(g.contextUsagePercentage=0),"assistantResponseEvent"===l&&j.payload?.content){let a=j.payload.content;g.totalContentLength+=a.length;let c={id:e,object:"chat.completion.chunk",created:f,model:b,choices:[{index:0,delta:0===d?{role:"assistant",content:a}:{content:a},finish_reason:null}]};d++,h.enqueue(new TextEncoder().encode(`data: ${JSON.stringify(c)}
16
-
17
- `))}if("reasoningContentEvent"===l){let a=j.payload?.reasoningContentEvent||j.payload||{},c="string"==typeof a?a:a.text||a.content||"";if(c){g.hasReasoningContent=!0,g.totalContentLength+=c.length;let a={id:e,object:"chat.completion.chunk",created:f,model:b,choices:[{index:0,delta:0===g.reasoningChunkCount&&0===d?{role:"assistant",reasoning_content:c}:{reasoning_content:c},finish_reason:null}]};d++,g.reasoningChunkCount++,h.enqueue(new TextEncoder().encode(`data: ${JSON.stringify(a)}
18
-
19
- `))}}if("codeEvent"===l&&j.payload?.content){let a={id:e,object:"chat.completion.chunk",created:f,model:b,choices:[{index:0,delta:{content:j.payload.content},finish_reason:null}]};d++,h.enqueue(new TextEncoder().encode(`data: ${JSON.stringify(a)}
20
-
21
- `))}if("toolUseEvent"===l&&j.payload){g.hasToolCalls=!0;let a=j.payload;for(let c of Array.isArray(a)?a:[a]){let a,i=c.toolUseId||`call_${Date.now()}`,j=c.name||"",k=c.input;if(g.seenToolIds.has(i))a=g.seenToolIds.get(i);else{a=g.toolCallIndex++,g.seenToolIds.set(i,a);let c={id:e,object:"chat.completion.chunk",created:f,model:b,choices:[{index:0,delta:{...0===d?{role:"assistant"}:{},tool_calls:[{index:a,id:i,type:"function",function:{name:j,arguments:""}}]},finish_reason:null}]};d++,h.enqueue(new TextEncoder().encode(`data: ${JSON.stringify(c)}
22
-
23
- `))}if(void 0!==k){let c;if("string"==typeof k)c=k;else{if("object"!=typeof k)continue;c=JSON.stringify(k)}let g={id:e,object:"chat.completion.chunk",created:f,model:b,choices:[{index:0,delta:{tool_calls:[{index:a,function:{arguments:c}}]},finish_reason:null}]};d++,h.enqueue(new TextEncoder().encode(`data: ${JSON.stringify(g)}
24
-
25
- `))}}}if("messageStopEvent"===l){let a={id:e,object:"chat.completion.chunk",created:f,model:b,choices:[{index:0,delta:{},finish_reason:g.hasToolCalls?"tool_calls":"stop"}]};g.finishEmitted=!0,h.enqueue(new TextEncoder().encode(`data: ${JSON.stringify(a)}
26
-
27
- `))}if("contextUsageEvent"===l&&j.payload?.contextUsagePercentage&&(g.contextUsagePercentage=j.payload.contextUsagePercentage,g.hasContextUsage=!0),"meteringEvent"===l&&(g.hasMeteringEvent=!0),"metricsEvent"===l){let a=j.payload?.metricsEvent||j.payload;if(a&&"object"==typeof a){let b=a.inputTokens||0,c=a.outputTokens||0;(b>0||c>0)&&(g.usage={prompt_tokens:b,completion_tokens:c,total_tokens:b+c})}}if(g.hasMeteringEvent&&g.hasContextUsage&&!g.finishEmitted){if(g.finishEmitted=!0,!g.usage){let a=g.totalContentLength>0?Math.max(1,Math.floor(g.totalContentLength/4)):0,b=g.contextUsagePercentage>0?Math.floor(2e5*g.contextUsagePercentage/100):0;g.usage={prompt_tokens:b,completion_tokens:a,total_tokens:b+a}}let a={id:e,object:"chat.completion.chunk",created:f,model:b,choices:[{index:0,delta:{},finish_reason:g.hasToolCalls?"tool_calls":"stop"}]};g.usage&&(a.usage=g.usage),h.enqueue(new TextEncoder().encode(`data: ${JSON.stringify(a)}
28
-
29
- `))}}k>=1e3&&console.warn("[Kiro] Max iterations reached in event parsing"),d!==i||g.finishEmitted||h.enqueue(new TextEncoder().encode(": ka\n\n"))},flush(a){if(!g.finishEmitted){g.finishEmitted=!0;let c={id:e,object:"chat.completion.chunk",created:f,model:b,choices:[{index:0,delta:{},finish_reason:g.hasToolCalls?"tool_calls":"stop"}]};a.enqueue(new TextEncoder().encode(`data: ${JSON.stringify(c)}
30
-
31
- `))}a.enqueue(new TextEncoder().encode(h.$U))}});return a.body?new Response(a.body.pipeThrough(i),{status:a.status,statusText:a.statusText,headers:{...h.pb}}):new Response(h.$U,{status:a.status,headers:{"Content-Type":"text/event-stream"}})}async refreshCredentials(a,b,c=null){if(!a.refreshToken)return null;try{return await (0,g.Ql)(a.refreshToken,a.providerSpecificData,b,c)}catch(a){return b?.error?.("TOKEN",`Kiro refresh error: ${a.message}`),null}}}},23082:(a,b,c)=>{c.d(b,{w:()=>k});var d=c(24353),e=c(62276),f=c(54177),g=c(37973);let h=new Map;function i(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("authorized_user"===b.type&&b.client_id&&b.client_secret&&b.refresh_token)return b;return null}catch{return null}}async function j(a){if(h.has(a))return h.get(a);let b=await fetch(`https://aiplatform.googleapis.com/v1/publishers/google/models/__probe__:generateContent?key=${a}`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}),c=await b.json().catch(()=>null),d=(c?.[0]?.error?.message||c?.error?.message||"").match(/projects\/([^/]+)\//),e=d?.[1]||null;return e&&h.set(a,e),e}class k extends d.H{constructor(a="vertex"){super(a,e.xq[a]||{})}buildUrl(a,b,c=0,d=null){let e=(0,f.Sc)(d?.apiKey),g=i(d?.apiKey),h=!!e||!!g||!!d?.accessToken,j=h?null:d?.apiKey,k=e?.project_id||g?.quota_project_id||d?.providerSpecificData?.projectId;if("vertex-partner"===this.provider){if(!k)throw Error("Vertex partner models require a project_id. Add it in providerSpecificData or use Service Account JSON.");let a=`https://aiplatform.googleapis.com/v1/projects/${k}/locations/global/endpoints/openapi/chat/completions`;return j?`${a}?key=${j}`:a}let l=b?"streamGenerateContent":"generateContent";if(h){if(!k)throw Error("Vertex OAuth/ADC requires a project_id. Add quota_project_id to your ADC JSON or set providerSpecificData.projectId.");let c=d?.providerSpecificData?.location||"us-central1",e=`https://aiplatform.googleapis.com/v1/projects/${k}/locations/${c}/publishers/google/models/${a}:${l}`;return b&&(e+="?alt=sse"),e}let m=`https://aiplatform.googleapis.com/v1/publishers/google/models/${a}:${l}`;return b&&(m+="?alt=sse"),j&&(m+=b?`&key=${j}`:`?key=${j}`),m}buildHeaders(a,b=!0){let c={"Content-Type":"application/json"};return a.accessToken&&(c.Authorization=`Bearer ${a.accessToken}`),b&&(c.Accept="text/event-stream"),c}async refreshCredentials(a,b){let c=(0,f.Sc)(a?.apiKey);if(!c)return null;let d=await (0,f.pb)(c,b);return d?{accessToken:d.accessToken,expiresAt:d.expiresAt}:null}async execute({model:a,body:b,stream:c,credentials:d,signal:e,log:h,proxyOptions:k=null}){let l=(0,f.Sc)(d?.apiKey),m=i(d?.apiKey);if(l){let a=await (0,f.pb)(l,h);if(!a?.accessToken)throw Error("Vertex: failed to mint access token from Service Account JSON");d.accessToken=a.accessToken}if(m){let a=await (0,f.I9)(m.refresh_token,m.client_id,m.client_secret,h);if(!a?.accessToken)throw Error("Vertex: failed to refresh access token from ADC JSON (authorized_user)");d.accessToken=a.accessToken}if("vertex-partner"===this.provider&&!l&&!m&&!d?.providerSpecificData?.projectId){let a=await j(d.apiKey);if(!a)throw Error("Vertex: could not resolve project_id from API key. Please add it manually in provider settings.");h?.debug?.("VERTEX",`Resolved project_id: ${a}`),d.providerSpecificData={...d.providerSpecificData,projectId:a}}let n=this.buildUrl(a,c,0,d),o=this.buildHeaders(d,c),p=this.transformRequest(a,b,c,d);return{response:await (0,g.proxyAwareFetch)(n,{method:"POST",headers:o,body:JSON.stringify(p),signal:e},k),url:n,headers:o,transformedBody:p}}}},23568:(a,b,c)=>{c.d(b,{$:()=>o});var d=c(24353),e=c(62276),f=c(63483),g=c(4436);let h=e.xq["grok-web"].baseUrl,i={"grok-3":{grokModel:"grok-3",modelMode:"MODEL_MODE_GROK_3",isThinking:!1},"grok-3-mini":{grokModel:"grok-3",modelMode:"MODEL_MODE_GROK_3_MINI_THINKING",isThinking:!0},"grok-3-thinking":{grokModel:"grok-3",modelMode:"MODEL_MODE_GROK_3_THINKING",isThinking:!0},"grok-4":{grokModel:"grok-4",modelMode:"MODEL_MODE_GROK_4",isThinking:!1},"grok-4-mini":{grokModel:"grok-4-mini",modelMode:"MODEL_MODE_GROK_4_MINI_THINKING",isThinking:!0},"grok-4-thinking":{grokModel:"grok-4",modelMode:"MODEL_MODE_GROK_4_THINKING",isThinking:!0},"grok-4-heavy":{grokModel:"grok-4",modelMode:"MODEL_MODE_HEAVY",isThinking:!0},"grok-4.1-mini":{grokModel:"grok-4-1-thinking-1129",modelMode:"MODEL_MODE_GROK_4_1_MINI_THINKING",isThinking:!0},"grok-4.1-fast":{grokModel:"grok-4-1-thinking-1129",modelMode:"MODEL_MODE_FAST",isThinking:!1},"grok-4.1-expert":{grokModel:"grok-4-1-thinking-1129",modelMode:"MODEL_MODE_EXPERT",isThinking:!0},"grok-4.1-thinking":{grokModel:"grok-4-1-thinking-1129",modelMode:"MODEL_MODE_GROK_4_1_THINKING",isThinking:!0},"grok-4.2":{grokModel:"grok-420",modelMode:"MODEL_MODE_GROK_420",isThinking:!1},"grok-4.20":{grokModel:"grok-420",modelMode:"MODEL_MODE_GROK_420",isThinking:!1},"grok-4.20-beta":{grokModel:"grok-420",modelMode:"MODEL_MODE_GROK_420",isThinking:!1}};function j(a,b=!1){let c=b?"abcdefghijklmnopqrstuvwxyz0123456789":"abcdefghijklmnopqrstuvwxyz",d="";for(let b=0;b<a;b++)d+=c[Math.floor(Math.random()*c.length)];return d}function k(a){let b=new Uint8Array(a);return crypto.getRandomValues(b),Array.from(b,a=>a.toString(16).padStart(2,"0")).join("")}async function*l(a,b){let c=a.getReader(),d=new TextDecoder,e="";try{for(;;){if(b?.aborted)return;let{value:a,done:f}=await c.read();if(f)break;for(e+=d.decode(a,{stream:!0});;){let a=e.indexOf("\n");if(a<0)break;let b=e.slice(0,a).trim();if(e=e.slice(a+1),b)try{yield JSON.parse(b)}catch{}}}let a=(e+=d.decode()).trim();if(a)try{yield JSON.parse(a)}catch{}}finally{c.releaseLock()}}async function*m(a,b,c){let d="",e="",f=!1;for await(let g of l(a,c)){if(g.error)return void(yield{error:g.error.message||`Grok error: ${g.error.code}`,done:!0});let a=g.result?.response;if(a){if(a.llmInfo?.modelHash&&!d&&(d=a.llmInfo.modelHash),a.responseId&&(e=a.responseId),a.modelResponse){let c=a.modelResponse;f&&b&&(c.message&&(yield{thinking:c.message}),f=!1),c.message&&(yield{fullMessage:c.message,fingerprint:d,responseId:e}),c.metadata?.llm_info?.modelHash&&(d=c.metadata.llm_info.modelHash);continue}null!=a.token&&(yield{delta:a.token,fingerprint:d,responseId:e})}}yield{done:!0,fingerprint:d,responseId:e}}async function n(a,b,c,d,e,f){let g="",h="",i=[];for await(let b of m(a,e,f)){if(b.fingerprint&&(h=b.fingerprint),b.error)return new Response(JSON.stringify({error:{message:b.error,type:"upstream_error",code:"GROK_ERROR"}}),{status:502,headers:{"Content-Type":"application/json"}});if(b.thinking){i.push(b.thinking);continue}if(b.done)break;b.fullMessage?g=b.fullMessage:b.delta&&(g+=b.delta)}let j={role:"assistant",content:g};i.length>0&&(j.reasoning_content=i.join("\n"));let k=Math.ceil(g.length/4),l=Math.ceil(g.length/4);return new Response(JSON.stringify({id:c,object:"chat.completion",created:d,model:b,system_fingerprint:h||null,choices:[{index:0,message:j,finish_reason:"stop",logprobs:null}],usage:{prompt_tokens:k,completion_tokens:l,total_tokens:k+l}}),{status:200,headers:{"Content-Type":"application/json"}})}class o extends d.H{constructor(){super("grok-web",e.xq["grok-web"])}async execute({model:a,body:b,stream:c,credentials:d,signal:e,log:l}){let o,p,q=b?.messages;if(!q||!Array.isArray(q)||0===q.length)return{response:new Response(JSON.stringify({error:{message:"Missing or empty messages array",type:"invalid_request"}}),{status:400,headers:{"Content-Type":"application/json"}}),url:h,headers:{},transformedBody:b};let r=i[a];r||l?.info?.("GROK-WEB",`Unmapped model ${a}, defaulting to grok-4.1-fast`);let{grokModel:s,modelMode:t,isThinking:u}=r||i["grok-4.1-fast"],v=function(a){let b=[];for(let c of a){let a=String(c.role||"user");"developer"===a&&(a="system");let d="";"string"==typeof c.content?d=c.content:Array.isArray(c.content)&&(d=c.content.filter(a=>"text"===a.type).map(a=>String(a.text||"")).join(" ")),d.trim()&&b.push({role:a,text:d})}let c=-1;for(let a=b.length-1;a>=0;a--)if("user"===b[a].role){c=a;break}let d=[];for(let a=0;a<b.length;a++){let{role:e,text:f}=b[a];d.push(a===c?f:`${e}: ${f}`)}return d.join("\n\n")}(q);if(!v.trim())return{response:new Response(JSON.stringify({error:{message:"Empty query after processing",type:"invalid_request"}}),{status:400,headers:{"Content-Type":"application/json"}}),url:h,headers:{},transformedBody:b};let w={temporary:!0,modelName:s,modelMode:t,message:v,fileAttachments:[],imageAttachments:[],disableSearch:!1,enableImageGeneration:!1,returnImageBytes:!1,returnRawGrokInXaiRequest:!1,enableImageStreaming:!1,imageGenerationCount:0,forceConcise:!1,toolOverrides:{},enableSideBySide:!0,sendFinalMetadata:!0,isReasoning:!1,disableTextFollowUps:!1,disableMemory:!0,forceSideBySide:!1,isAsyncChat:!1,disableSelfHarmShortCircuit:!1,deviceEnvInfo:{darkModeEnabled:!1,devicePixelRatio:2,screenWidth:2056,screenHeight:1329,viewportWidth:2056,viewportHeight:1083}},x=k(16),y=k(8),z={Accept:"*/*","Accept-Encoding":"gzip, deflate, br, zstd","Accept-Language":"en-US,en;q=0.9",Baggage:"sentry-environment=production,sentry-release=d6add6fb0460641fd482d767a335ef72b9b6abb8,sentry-public_key=b311e0f2690c81f25e2c4cf6d4f7ce1c","Cache-Control":"no-cache","Content-Type":"application/json",Origin:"https://grok.com",Pragma:"no-cache",Referer:"https://grok.com/","Sec-Ch-Ua":'"Google Chrome";v="136", "Chromium";v="136", "Not(A:Brand";v="24"',"Sec-Ch-Ua-Mobile":"?0","Sec-Ch-Ua-Platform":'"macOS"',"Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","x-statsig-id":btoa(.5>Math.random()?`e:TypeError: Cannot read properties of null (reading 'children["${j(5,!0)}"]')`:`e:TypeError: Cannot read properties of undefined (reading '${j(10)}')`),"x-xai-request-id":crypto.randomUUID(),traceparent:`00-${x}-${y}-00`};if(d.apiKey){let a=d.apiKey;a.startsWith("sso=")&&(a=a.slice(4)),z.Cookie=`sso=${a}`}l?.info?.("GROK-WEB",`Query to ${a} (grok=${s}, mode=${t}), len=${v.length}`);try{o=await fetch(h,{method:"POST",headers:z,body:JSON.stringify(w),signal:e})}catch(a){return l?.error?.("GROK-WEB",`Fetch failed: ${a.message||String(a)}`),{response:new Response(JSON.stringify({error:{message:`Grok connection failed: ${a.message||String(a)}`,type:"upstream_error"}}),{status:502,headers:{"Content-Type":"application/json"}}),url:h,headers:z,transformedBody:w}}if(!o.ok){let a=o.status,b=`Grok returned HTTP ${a}`;return 401===a||403===a?b="Grok auth failed — SSO cookie may be expired. Re-paste your sso cookie value from grok.com.":429===a&&(b="Grok rate limited. Wait a moment and retry, or rotate cookies."),l?.warn?.("GROK-WEB",b),{response:new Response(JSON.stringify({error:{message:b,type:"upstream_error",code:`HTTP_${a}`}}),{status:a,headers:{"Content-Type":"application/json"}}),url:h,headers:z,transformedBody:w}}if(!o.body)return{response:new Response(JSON.stringify({error:{message:"Grok returned empty response body",type:"upstream_error"}}),{status:502,headers:{"Content-Type":"application/json"}}),url:h,headers:z,transformedBody:w};let A=`chatcmpl-grok-${crypto.randomUUID().slice(0,12)}`,B=Math.floor(Date.now()/1e3);if(c){var C;let b;p=new Response((C=o.body,b=new TextEncoder,new ReadableStream({async start(c){try{c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:null,choices:[{index:0,delta:{role:"assistant"},finish_reason:null,logprobs:null}]})));let d="";for await(let f of m(C,u,e)){if(f.fingerprint&&(d=f.fingerprint),f.error){c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:d||null,choices:[{index:0,delta:{content:`[Error: ${f.error}]`},finish_reason:null,logprobs:null}]})));break}if(f.thinking){c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:d||null,choices:[{index:0,delta:{reasoning_content:f.thinking},finish_reason:null,logprobs:null}]})));continue}if(f.done)break;f.delta&&c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:d||null,choices:[{index:0,delta:{content:f.delta},finish_reason:null,logprobs:null}]})))}c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:d||null,choices:[{index:0,delta:{},finish_reason:"stop",logprobs:null}]}))),c.enqueue(b.encode(f.$U))}catch(d){c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:null,choices:[{index:0,delta:{content:`[Stream error: ${d.message||String(d)}]`},finish_reason:"stop",logprobs:null}]}))),c.enqueue(b.encode(f.$U))}finally{c.close()}}})),{status:200,headers:{...f.uB}})}else p=await n(o.body,a,A,B,u,e);return{response:p,url:h,headers:z,transformedBody:w}}}},24221:(a,b,c)=>{c.d(b,{Yh:()=>p});var d=c(24353),e=c(62276),f=c(37973),g=c(55511),h=c(21820),i=c.n(h);let j=e.xq["mimo-free"].baseUrl,k="abcdefghijklmnopqrstuvwxyz0123456789",l="You are MiMoCode, an interactive CLI tool that helps users with software engineering tasks.",m=null,n=0;async function o(a=null){if(m&&Date.now()<n-3e5)return m;let b=await (0,f.proxyAwareFetch)("https://api.xiaomimimo.com/api/free-ai/bootstrap",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client:function(){let a="unknown-user";try{a=i().userInfo().username}catch{}let b=(i().cpus()[0]?.model||"unknown-cpu").trim(),c=`${i().hostname()}|${i().platform()}|${i().arch()}|${b}|${a}`;return(0,g.createHash)("sha256").update(c).digest("hex")}()})},a);if(!b.ok)throw Error(`MiMo bootstrap failed: ${b.status}`);let c=await b.json();if(!c.jwt)throw Error("MiMo bootstrap returned no JWT");return m=c.jwt,n=function(a){try{let b=JSON.parse(Buffer.from(a.split(".")[1],"base64").toString());if(b.exp)return 1e3*b.exp}catch{}return Date.now()+3e6}(c.jwt),m}class p extends d.H{constructor(){super("mimo-free",e.xq["mimo-free"]),this.sessionId=function(){let a="ses_";for(let b=0;b<24;b++)a+=k[Math.floor(Math.random()*k.length)];return a}()}buildUrl(){return j}buildHeaders(a,b=!0){return{"Content-Type":"application/json","X-Mimo-Source":"mimocode-cli-free","x-session-affinity":this.sessionId,Accept:b?"text/event-stream":"application/json"}}transformRequest(a,b){let c;return!Array.isArray(c=b?.messages)||c.some(a=>a?.role==="system"&&"string"==typeof a.content&&a.content.includes(l))?b:{...b,messages:[{role:"system",content:l},...c]}}async execute({model:a,body:b,stream:c,credentials:d,signal:e,log:g,proxyOptions:h=null}){let i;try{i=await o(h)}catch(a){throw g?.error?.("AUTH",`MiMo bootstrap failed: ${a.message}`),a}let j=this.buildUrl(),k=this.transformRequest(a,b),l={...this.buildHeaders(d,c),Authorization:`Bearer ${i}`},p=JSON.stringify(k);g?.debug?.("FETCH",`MIMO-FREE → ${j} | body=${p.length}B`);let q=await (0,f.proxyAwareFetch)(j,{method:"POST",headers:l,body:p,signal:e},h);return 401===q.status||403===q.status?(g?.debug?.("AUTH",`MiMo auth failed (${q.status}), re-bootstrapping...`),m=null,n=0,i=await o(h),l.Authorization=`Bearer ${i}`,{response:await (0,f.proxyAwareFetch)(j,{method:"POST",headers:l,body:p,signal:e},h),url:j,headers:l,transformedBody:k}):{response:q,url:j,headers:l,transformedBody:k}}}},27381:(a,b,c)=>{c.d(b,{P:()=>e});var d=c(83543);class e extends d.L{constructor(){super("azure")}buildUrl(a,b,c=0,d=null){let e=d?.providerSpecificData?.azureEndpoint||process.env.AZURE_ENDPOINT||"https://api.openai.com",f=d?.providerSpecificData?.apiVersion||process.env.AZURE_API_VERSION||"2024-10-01-preview",g=d?.providerSpecificData?.deployment||a||process.env.AZURE_DEPLOYMENT||"gpt-4",h=e.replace(/\/$/,"");return`${h}/openai/deployments/${g}/chat/completions?api-version=${f}`}buildHeaders(a,b=!0){let c={"Content-Type":"application/json",...this.config.headers},d=a?.apiKey||a?.accessToken||process.env.OPENAI_API_KEY;d&&(c["api-key"]=d);let e=a?.providerSpecificData?.organization||process.env.AZURE_ORGANIZATION;return e&&(c["OpenAI-Organization"]=e),b&&(c.Accept="text/event-stream"),c}transformRequest(a,b,c,d){return b}}},27544:(a,b,c)=>{c.d(b,{w$:()=>e});let d=c(39006).rE||"0.0.0";function e(a,b={}){let c,f=(c=function(a){if("string"!=typeof a)return"";let b=a.trim();return b?b.startsWith("workos:")?b:`workos:${b}`:""}(a))?`Bearer ${c}`:"",g={"HTTP-Referer":"https://cline.bot","X-Title":"Cline","User-Agent":`9Router/${d}`,"X-PLATFORM":process.platform||"unknown","X-PLATFORM-VERSION":process.version||"unknown","X-CLIENT-TYPE":"9router","X-CLIENT-VERSION":d,"X-CORE-VERSION":d,"X-IS-MULTIROOT":"false",...b};return f&&(g.Authorization=f),g}},31440:(a,b,c)=>{c.d(b,{JA:()=>h});var d=c(55511),e=c.n(d),f=c(3455);function g(a,b=""){return e().createHash("sha256").update(a+b).digest("hex")}function h(a,b=null,c=!0){let d=a.includes("::")?a.split("::")[1]:a,i=b||g(d,"machineId"),j=(0,f.Ay)(d,f.Ay.DNS),k=g(d),l=function(a){let b=Math.floor(Date.now()/1e6),c=new Uint8Array([b>>40&255,b>>32&255,b>>24&255,b>>16&255,b>>8&255,255&b]),d=165;for(let a=0;a<c.length;a++)c[a]=(c[a]^d)+a%256&255,d=c[a];let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",f="";for(let a=0;a<c.length;a+=3){let b=c[a],d=a+1<c.length?c[a+1]:0,g=a+2<c.length?c[a+2]:0;f+=e[b>>2],f+=e[(3&b)<<4|d>>4],a+1<c.length&&(f+=e[(15&d)<<2|g>>6]),a+2<c.length&&(f+=e[63&g])}return`${f}${a}`}(i),m="linux";"u">typeof process&&("win32"===process.platform?m="windows":"darwin"===process.platform&&(m="macos"));let n="x64";return"u">typeof process&&"arm64"===process.arch&&(n="aarch64"),{authorization:`Bearer ${d}`,"connect-accept-encoding":"gzip","connect-protocol-version":"1","content-type":"application/connect+proto","user-agent":"connect-es/1.6.1","x-amzn-trace-id":`Root=${e().randomUUID()}`,"x-client-key":k,"x-cursor-checksum":l,"x-cursor-client-version":"3.1.0","x-cursor-client-type":"ide","x-cursor-client-os":m,"x-cursor-client-arch":n,"x-cursor-client-device-type":"desktop","x-cursor-config-version":e().randomUUID(),"x-cursor-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC","x-ghost-mode":c?"true":"false","x-request-id":e().randomUUID(),"x-session-id":j}}},32917:(a,b,c)=>{c.d(b,{EV:()=>l,X5:()=>k});var d=c(55511),e=c(37973),f=c(7843),g=c(75732);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)}}},38461:(a,b,c)=>{c.d(b,{r:()=>h});var d=c(55511),e=c.n(d),f=c(24353),g=c(62276);class h extends f.H{constructor(){super("iflow",g.xq.iflow)}generateUUID(){return e().randomUUID()}createIFlowSignature(a,b,c,d){if(!d)return"";let f=`${a}:${b}:${c}`,g=e().createHmac("sha256",d);return g.update(f),g.digest("hex")}buildHeaders(a,b=!0){let c=`session-${this.generateUUID()}`,d=Date.now(),e=this.config.headers["User-Agent"]||"iFlow-Cli",f=a.apiKey||a.accessToken||"",g=this.createIFlowSignature(e,c,d,f),h={"Content-Type":"application/json",...this.config.headers,"session-id":c,"x-iflow-timestamp":d.toString(),"x-iflow-signature":g};return a.apiKey&&(h.Authorization=`Bearer ${a.apiKey}`),b&&(h.Accept="text/event-stream"),h}buildUrl(a,b,c=0,d=null){return this.config.baseUrl}transformRequest(a,b,c,d){return c&&b.messages&&!b.stream_options&&(b.stream_options={include_usage:!0}),b}}},38531:(a,b,c)=>{c.d(b,{DH:()=>q});let d=(()=>{let a=new Int16Array(128).fill(-1);for(let b=0;b<64;b++)a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(b)]="_doRTgHZBKcGVjlvpC,@aFSx#DPuNJme&i*MzLOEn)sUrthbf%Y^w.(kIQyXqWA!".charCodeAt(b);return a[61]=36,a})();var e=c(7843),f=c(37873),g=c(55511),h=c(24353),i=c(62276),j=c(37973),k=c(63483),l=c(23016),m=c(75732),n=c(32917);function o(a,b){return a&&a.length>b?`${a.slice(0,b)}...`:a||""}async function p({model:a,body:b,credentials:c,log:d,proxyOptions:e,signal:h}){let i=String(a||"").replace(/^qoder\//,""),j=await (0,n.X5)(c,i,{log:d,proxyOptions:e,signal:h});if(!j){let a=await (0,n.EV)(c,{forceRefresh:!0,log:d,proxyOptions:e,signal:h}),b=a?.rawConfigs.get(i);if(!b)throw Error(`qoder: model_config for "${i}" not yet known (run a model list fetch or check upstream connectivity)`);j={...b,key:i}}let{messages:k,systemText:l}=function(a){if(!Array.isArray(a)||0===a.length)return{messages:[],systemText:""};let b=[],c=[];for(let d of a){if(!d||"object"!=typeof d)continue;let a=function(a){if("string"==typeof a)return a;if(null==a)return"";if(Array.isArray(a)){let b=[];for(let c of a)c&&"object"==typeof c&&("text"===c.type&&"string"==typeof c.text?b.push(c.text):"string"==typeof c.text&&b.push(c.text));return b.join("\n")}return String(a)}(d.content);if("system"===d.role){a&&b.push(a);continue}let e={...d};e.content=a,c.push(e)}return{messages:c,systemText:b.join("\n\n")}}(b.messages||[]),m=b.tools,q=!!j.is_reasoning,r=Number(j.max_output_tokens)||0,s=32768;r>0&&(s=r),"number"==typeof b.max_tokens&&b.max_tokens>0&&b.max_tokens<s&&(s=b.max_tokens),"number"==typeof b.max_completion_tokens&&b.max_completion_tokens>0&&b.max_completion_tokens<s&&(s=b.max_completion_tokens);let t=function(a){for(let b=a.length-1;b>=0;b--){let c=a[b];if(c?.role==="user"&&"string"==typeof c.content)return c.content}return""}(k),u=function(a,...b){let c=(0,g.createHash)("sha256");for(let d of(c.update(a),b))c.update("\0"),c.update(String(d??""));return c.digest("hex").slice(0,16)}("qoder-session",(c.providerSpecificData||{}).userId,i),v=function(a,b,c,d){let e=(0,g.createHash)("sha256");for(let c of(e.update("qoder-record\0"),e.update(String(a)),b))c&&"object"==typeof c&&(c.role&&(e.update("\0"),e.update(c.role)),"string"==typeof c.content&&c.content&&(e.update("\0"),e.update(c.content)));if(c){e.update("\0");try{e.update(JSON.stringify(c))}catch{}}return e.update(`\0mt=${d}`),e.digest("hex").slice(0,16)}(i,k,m,s);return{qoderKey:i,payload:{request_id:(0,f.A)(),request_set_id:v,chat_record_id:v,session_id:u,stream:!0,chat_task:"FREE_INPUT",is_reply:!0,is_retry:!1,source:1,version:"3",session_type:"qodercli",agent_id:"agent_common",task_id:"common",code_language:"",chat_prompt:"",image_urls:null,aliyun_user_type:"",system:l,messages:k,tools:Array.isArray(m)?m:[],parameters:{max_tokens:s},chat_context:{chatPrompt:"",imageUrls:null,extra:{context:[],modelConfig:{key:i,is_reasoning:q},originalContent:t},features:[],text:t},model_config:j,business:{product:"cli",version:"1.0.0",type:"agent",stage:"start",id:(0,f.A)(),name:o(t,30),begin_at:Date.now()}},modelConfig:j}}class q extends h.H{constructor(){super("qoder",i.xq.qoder)}buildUrl(){return m.KC}async execute({model:a,body:b,stream:c,credentials:f,signal:g,log:h,proxyOptions:i=null}){let m,n,q,r,s=this.buildUrl(),t=f?.providerSpecificData||{};if(!t.userId)return{response:new Response(JSON.stringify({error:{message:"qoder credential is missing userId; reconnect the account"}}),{status:401,headers:{"Content-Type":"application/json"}}),url:s,headers:{},transformedBody:b};if(!f?.accessToken)return{response:new Response(JSON.stringify({error:{message:"qoder credential is missing accessToken; reconnect the account"}}),{status:401,headers:{"Content-Type":"application/json"}}),url:s,headers:{},transformedBody:b};try{({qoderKey:m,payload:n}=await p({model:a,body:b,credentials:f,log:h,proxyOptions:i,signal:g}))}catch(a){return{response:new Response(JSON.stringify({error:{message:a.message}}),{status:400,headers:{"Content-Type":"application/json"}}),url:s,headers:{},transformedBody:b}}let u=function(a){let b=(Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"utf8"):Buffer.from(a)).toString("base64"),c=b.length,e=Math.floor(c/3),f=b.slice(c-e)+b.slice(e,c-e)+b.slice(0,e),g=Buffer.alloc(c);for(let a=0;a<c;a++){let b=f.charCodeAt(a);b<128&&d[b]>=0?g[a]=d[b]:g[a]=b}return g.toString("latin1")}(Buffer.from(JSON.stringify(n),"utf8")),v=Buffer.from(u,"latin1");try{q=(0,e.d)(v,s,{userId:t.userId,authToken:f.accessToken,name:f.displayName||"",email:f.email||"",machineId:t.machineId||""})}catch(a){return{response:new Response(JSON.stringify({error:{message:`qoder cosy signing failed: ${a.message}`}}),{status:401,headers:{"Content-Type":"application/json"}}),url:s,headers:{},transformedBody:b}}let w={"Content-Type":"application/json",Accept:"text/event-stream","Cache-Control":"no-cache","X-Model-Key":m,"X-Model-Source":n.model_config&&n.model_config.source||"system","Accept-Encoding":"identity",...q},x=this.config?.timeoutMs||l.pH,y=new AbortController,z=setTimeout(()=>y.abort(Error("fetch connect timeout")),x),A=g?AbortSignal.any([g,y.signal]):y.signal;try{r=await (0,j.proxyAwareFetch)(s,{method:"POST",headers:w,body:v,signal:A},i)}finally{clearTimeout(z)}return r.ok?{response:function(a,b){if(!a.ok||!a.body)return a;let c=new TextDecoder,d=new TextEncoder,e="",f=!1,g=(a,c)=>{let e,g=a.replace(/\r$/,"").trim();if(!g||!g.startsWith("data:")||f)return;let h=g.slice(5).trimStart();if("[DONE]"===h){c.enqueue(d.encode(k.$U)),f=!0;return}try{e=JSON.parse(h)}catch{return}let i="number"==typeof e.statusCodeValue?e.statusCodeValue:200,j="string"==typeof e.body?e.body:"";if(200!==i){let a=j||`upstream status ${i}`,e=JSON.stringify({id:`qoder-error-${Date.now()}`,object:"chat.completion.chunk",created:Math.floor(Date.now()/1e3),model:b,choices:[{index:0,delta:{content:`
32
- [qoder error ${i}: ${o(a,200)}]`},finish_reason:"stop"}]});c.enqueue(d.encode(`data: ${e}
33
-
34
- `)),c.enqueue(d.encode(k.$U)),f=!0;return}if(!j)return;if("[DONE]"===j){c.enqueue(d.encode(k.$U)),f=!0;return}let l=j.replace(/\r?\n/g,"");c.enqueue(d.encode(`data: ${l}
35
-
36
- `))},h=new TransformStream({transform(a,b){let d;for(e+=c.decode(a,{stream:!0});-1!==(d=e.indexOf("\n"));){let a=e.slice(0,d);e=e.slice(d+1),g(a,b)}},flush(a){(e+=c.decode()).length>0&&(g(e,a),e=""),f||(a.enqueue(d.encode(k.$U)),f=!0)}});return new Response(a.body.pipeThrough(h),{status:a.status,statusText:a.statusText,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache"}})}(r,`qoder/${m}`),url:s,headers:w,transformedBody:n}:{response:r,url:s,headers:w,transformedBody:n}}async refreshCredentials(){return null}needsRefresh(){return!1}}},39006:a=>{a.exports={rE:"0.5.2"}},42506:(a,b,c)=>{c.d(b,{b:()=>g,n:()=>f});let d=["user-agent","anthropic-beta","anthropic-version","anthropic-dangerous-direct-browser-access","x-app","x-stainless-helper-method","x-stainless-retry-count","x-stainless-runtime-version","x-stainless-package-version","x-stainless-runtime","x-stainless-lang","x-stainless-arch","x-stainless-os","x-stainless-timeout","x-claude-code-session-id","package-version","runtime-version","os","arch"],e=null;function f(a){let b,c;if(!a||"object"!=typeof a||(b=(a["user-agent"]||"").toLowerCase(),c=(a["x-app"]||"").toLowerCase(),!(b.includes("claude-cli")||b.includes("claude-code"))&&"cli"!==c))return;let f={};for(let b of d)void 0!==a[b]&&null!==a[b]&&(f[b]=a[b]);Object.keys(f).length>0&&(e=f,console.log(`[ClaudeHeaders] Cached ${Object.keys(f).length} identity headers from Claude Code client`))}function g(){return e}},48788:(a,b,c)=>{c.d(b,{CP:()=>q,yI:()=>n});var d=c(37873),e=c(74075),f=c.n(e);let g="1"===process.env.CURSOR_PROTOBUF_DEBUG,h=(a,...b)=>g&&console.log(`[PROTOBUF:${a}]`,...b);new TextDecoder;let i="1.1.3",j=new Set([1,2,3,9,10,11,27,1,25]);function k(a){let b=[];for(;a>=128;)b.push(127&a|128),a>>>=7;return b.push(127&a),new Uint8Array(b)}function l(a,b,c){let d=k(a<<3|b);if(0===b)return m(d,k(c));if(2===b){let a="string"==typeof c?new TextEncoder().encode(c):c instanceof Uint8Array?c:Buffer.isBuffer(c)?new Uint8Array(c):new Uint8Array(0);return m(d,k(a.length),a)}return new Uint8Array(0)}function m(...a){let b=new Uint8Array(a.reduce((a,b)=>a+b.length,0)),c=0;for(let d of a)b.set(d,c),c+=d.length;return b}function n(a,b,c=[],e=null,g=!1){h("BODY",`Generating: ${a.length} msgs, model=${b}, tools=${c.length}, reasoning=${e||"none"}, forceAgentMode=${g}`);let i=function(a,b,c=[],e=null,f=!1){return l(1,2,function(a,b,c=[],e=null,f=!1){let g,i=c?.length>0,j=i||f,n=[],o=[],p=[];for(let b=0;b<a.length;b++){let c=a[b],d=Array.isArray(c?.tool_calls)&&c.tool_calls.length>0,e=Array.isArray(c?.tool_results)&&c.tool_results.length>0;if(c?.role==="assistant"&&d&&e){h("ENCODE",`normalizing mixed assistant tool payload at msg[${b}] (calls=${c.tool_calls.length}, results=${c.tool_results.length})`),p.push({...c,tool_results:[]});let d=a[b+1],e=d?.role==="assistant"&&Array.isArray(d?.tool_results)&&d.tool_results.length>0,f=new Set(c.tool_results.map(a=>a?.tool_call_id).filter(a=>"string"==typeof a)),g=new Set((d?.tool_results||[]).map(a=>a?.tool_call_id).filter(a=>"string"==typeof a)),i=f.size>0&&f.size===g.size;if(i){for(let a of f)if(!g.has(a)){i=!1;break}}e&&i||p.push({role:"assistant",content:"",tool_results:c.tool_results});continue}p.push(c)}for(let a=0;a<p.length;a++){let b=p[a],c="user"===b.role?1:2,e=(0,d.A)(),f=a===p.length-1;n.push({content:b.content,role:c,messageId:e,isLast:f,hasTools:i,toolResults:b.tool_results||[]}),o.push({messageId:e,role:c})}let q=0;return"medium"===e?q=1:"high"===e&&(q=2),m(...n.map(a=>l(1,2,function(a,b,c,d=null,e=!1,f=!1,g=[],h=null){let i=g.length>0;return m(l(1,2,a),l(2,0,b),l(13,2,c),...h?[l(32,2,h)]:[],...i?g.map(a=>l(18,2,function(a){var b;let c,d,e=function(a){let b="string"==typeof a&&a.length>0?a:"tool";if(b.startsWith("mcp__")){let a=b.slice(5),c=a.indexOf("__");if(c>=0){let b=a.slice(0,c)||"custom",d=a.slice(c+2)||"tool";return`mcp_${b}_${d}`}return`mcp_custom_${a||"tool"}`}return b.startsWith("mcp_")?b:`mcp_custom_${b}`}(a.tool_name||a.name||""),f=a.raw_args||"{}",g=a.result_content||a.result||"",{toolCallId:h,modelCallId:i}=(b=a.tool_call_id||"",c="\nmc_",(d=b.indexOf(c))>=0?{toolCallId:b.slice(0,d),modelCallId:b.slice(d+c.length)}:{toolCallId:b,modelCallId:null}),j=a.tool_index||a.index||1,{serverName:k,selectedTool:n}=function(a){if("string"!=typeof a||!a.startsWith("mcp_"))return{serverName:"custom",selectedTool:a||"tool"};let b=a.slice(4),c=b.indexOf("_");return c<0?{serverName:"custom",selectedTool:b||"tool"}:{serverName:b.slice(0,c)||"custom",selectedTool:b.slice(c+1)||"tool"}}(e);return m(l(1,2,h),l(2,2,e),l(3,0,j>0?j:1),...i?[l(12,2,i)]:[],l(5,2,f),l(8,2,function(a,b,c,d,e=1){return m(l(1,0,19),l(28,2,m(l(1,2,c),l(2,2,d))),l(35,2,a),...b?[l(48,2,b)]:[],l(49,0,e>0?e:1))}(h,i,n,g,j)),l(11,2,function(a,b,c,d,e,f,g=1){let h;return m(l(1,0,19),l(27,2,(h=m(l(1,2,c),l(3,2,e),l(4,2,d)),l(1,2,h))),l(3,2,a),l(9,2,b),l(10,2,e),l(48,0,g>0?g:1),...f?[l(49,2,f)]:[])}(h,e,n,k,f,i,j)))}(a))):[],l(29,0,+!!f),l(47,0,f?2:1),...e&&f?[l(51,2,k(1))]:[])}(a.content,a.role,a.messageId,null,a.isLast,a.hasTools,a.toolResults))),l(2,0,1),l(3,2,new Uint8Array(0)),l(4,0,1),l(5,2,m(l(1,2,b),l(4,2,new Uint8Array(0)))),l(8,2,""),l(13,0,1),l(15,2,(g=m(l(1,2,new Uint8Array(0)),l(2,2,new Uint8Array(0))),m(l(1,2,"cursor\\aisettings"),l(3,2,new Uint8Array(0)),l(6,2,g),l(8,0,1),l(9,0,1)))),l(19,0,1),l(23,2,(0,d.A)()),l(26,2,m(l(1,2,process.platform||"linux"),l(2,2,process.arch||"x64"),l(3,2,process.version||"v20.0.0"),l(4,2,process.cwd?.()||"/"),l(5,2,new Date().toISOString()))),l(27,0,+!!j),...j?[l(29,2,k(1))]:[],...o.map(a=>l(30,2,function(a,b,c=null){return m(l(1,2,a),...c?[l(2,2,c)]:[],l(3,0,b))}(a.messageId,a.role))),...c?.length>0?c.map(a=>{let b,c,d;return l(34,2,(b=a.function?.name||a.name||"",c=a.function?.description||a.description||"",d=a.function?.parameters||a.input_schema||{},m(...b?[l(1,2,b)]:[],...c?[l(2,2,c)]:[],...Object.keys(d).length>0?[l(3,2,JSON.stringify(d))]:[],l(4,2,"custom"))))}):[],l(35,0,0),l(38,0,0),l(46,0,j?2:1),l(47,2,""),l(48,0,+!j),l(49,0,q),l(51,0,0),l(53,0,1),l(54,2,j?"Agent":"Ask"))}(a,b,c,e,f))}(a,b,c,e,g),j=function(a,b=!1){let c=a,d=0;b&&(c=new Uint8Array(f().gzipSync(Buffer.from(a))),d=1);let e=new Uint8Array(5+c.length);return e[0]=d,e[1]=c.length>>24&255,e[2]=c.length>>16&255,e[3]=c.length>>8&255,e[4]=255&c.length,e.set(c,5),e}(i,!1);return h("BODY",`Protobuf=${i.length}B, Framed=${j.length}B`),j}function o(a,b){let c=0,d=0,e=b;for(;e<a.length;){let b=a[e];if(c|=(127&b)<<d,e++,!(128&b))break;d+=7}return[c,e]}function p(a){let b=new Map,c=0;for(;c<a.length;){let[d,e,f,g]=function(a,b){let c;if(b>=a.length)return[null,null,null,b];let[d,e]=o(a,b),f=7&d,g=e;if(0===f)[c,g]=o(a,g);else if(2===f){let[b,d]=o(a,g);c=a.slice(d,d+b),g=d+b}else 1===f?(c=a.slice(g,g+8),g+=8):5===f?(c=a.slice(g,g+4),g+=4):c=null;return[d>>3,f,c,g]}(a,c);if(null===d)break;b.has(d)||b.set(d,[]),b.get(d).push({wireType:e,value:f}),c=g}return b}function q(a){try{let b=p(a);for(let a of b.keys())j.has(a)||h("SCHEMA",`Unknown response field #${a} detected. Schema v${i} may be outdated.`);if(b.has(1)){let a=function(a){let b=p(a),c="",d="",e="",f=!1;if(b.has(3)&&(c=new TextDecoder().decode(b.get(3)[0].value).split("\n")[0]),b.has(9)&&(d=new TextDecoder().decode(b.get(9)[0].value)),b.has(11)&&(f=0!==b.get(11)[0].value),b.has(27))try{let a=p(b.get(27)[0].value);if(a.has(1)){let b=p(a.get(1)[0].value);b.has(1)&&(d=new TextDecoder().decode(b.get(1)[0].value)),b.has(3)&&(e=new TextDecoder().decode(b.get(3)[0].value))}}catch(a){h("EXTRACT",`MCP parse error: ${a.message}`)}return(!e&&b.has(10)&&(e=new TextDecoder().decode(b.get(10)[0].value)),c&&d)?{id:c,type:"function",function:{name:d,arguments:e||"{}"},isLast:f}:null}(b.get(1)[0].value);if(a)return h("EXTRACT",`Tool call: ${a.function.name}`),{text:null,error:null,toolCall:a,thinking:null}}if(b.has(2)){let{text:a,thinking:c}=function(a){let b=p(a),c=null,d=null;if(b.has(1)&&(c=new TextDecoder().decode(b.get(1)[0].value)),b.has(25))try{let a=p(b.get(25)[0].value);a.has(1)&&(d=new TextDecoder().decode(a.get(1)[0].value))}catch(a){h("EXTRACT",`Thinking parse error: ${a.message}`)}return{text:c,thinking:d}}(b.get(2)[0].value);if(a||c)return{text:a,error:null,toolCall:null,thinking:c}}return{text:null,error:null,toolCall:null,thinking:null}}catch(b){return h("EXTRACT",`Decode failed (schema v${i}): ${b.message}`),{text:null,error:null,toolCall:null,thinking:null,raw:Buffer.from(a).toString("base64"),decodeError:b.message}}}},49593:(a,b,c)=>{c.d(b,{T:()=>r});var d=c(24353);let e=`You are Codex, based on GPT-5. You are running as a coding agent in the Codex CLI on a user's computer.
37
-
38
- ## General
39
-
40
- - When searching for text or files, prefer using \`rg\` or \`rg --files\` respectively because \`rg\` is much faster than alternatives like \`grep\`. (If the \`rg\` command is not found, then use alternatives.)
41
-
42
- ## Editing constraints
43
-
44
- - Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.
45
- - Add succinct code comments that explain what is going on if code is not self-explanatory. You should not add comments like "Assigns the value to the variable", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare.
46
- - Try to use apply_patch for single file edits, but it is fine to explore other options to make the edit if it does not work well. Do not use apply_patch for changes that are auto-generated (i.e. generating package.json or running a lint or format command like gofmt) or when scripting is more efficient (such as search and replacing a string across a codebase).
47
- - You may be in a dirty git worktree.
48
- * NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.
49
- * If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.
50
- * If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.
51
- * If the changes are in unrelated files, just ignore them and don't revert them.
52
- - Do not amend a commit unless explicitly requested to do so.
53
- - While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.
54
- - **NEVER** use destructive commands like \`git reset --hard\` or \`git checkout --\` unless specifically requested or approved by the user.
55
-
56
- ## Plan tool
57
-
58
- When using the planning tool:
59
- - Skip using the planning tool for straightforward tasks (roughly the easiest 25%).
60
- - Do not make single-step plans.
61
- - When you made a plan, update it after having performed one of the sub-tasks that you shared on the plan.
62
-
63
- ## Codex CLI harness, sandboxing, and approvals
64
-
65
- The Codex CLI harness supports several different configurations for sandboxing and escalation approvals that the user can choose from.
66
-
67
- Filesystem sandboxing defines which files can be read or written. The options for \`sandbox_mode\` are:
68
- - **read-only**: The sandbox only permits reading files.
69
- - **workspace-write**: The sandbox permits reading files, and editing files in \`cwd\` and \`writable_roots\`. Editing files in other directories requires approval.
70
- - **danger-full-access**: No filesystem sandboxing - all commands are permitted.
71
-
72
- Network sandboxing defines whether network can be accessed without approval. Options for \`network_access\` are:
73
- - **restricted**: Requires approval
74
- - **enabled**: No approval needed
75
-
76
- Approvals are your mechanism to get user consent to run shell commands without the sandbox. Possible configuration options for \`approval_policy\` are
77
- - **untrusted**: The harness will escalate most commands for user approval, apart from a limited allowlist of safe "read" commands.
78
- - **on-failure**: The harness will allow all commands to run in the sandbox (if enabled), and failures will be escalated to the user for approval to run again without the sandbox.
79
- - **on-request**: Commands will be run in the sandbox by default, and you can specify in your tool call if you want to escalate a command to run without sandboxing. (Note that this mode is not always available. If it is, you'll see parameters for it in the \`shell\` command description.)
80
- - **never**: This is a non-interactive mode where you may NEVER ask the user for approval to run commands. Instead, you must always persist and work around constraints to solve the task for the user. You MUST do your utmost best to finish the task and validate your work before yielding. If this mode is paired with \`danger-full-access\`, take advantage of it to deliver the best outcome for the user. Further, in this mode, your default testing philosophy is overridden: Even if you don't see local patterns for testing, you may add tests and scripts to validate your work. Just remove them before yielding.
81
-
82
- When you are running with \`approval_policy == on-request\`, and sandboxing enabled, here are scenarios where you'll need to request approval:
83
- - You need to run a command that writes to a directory that requires it (e.g. running tests that write to /var)
84
- - You need to run a GUI app (e.g., open/xdg-open/osascript) to open browsers or files.
85
- - You are running sandboxed and need to run a command that requires network access (e.g. installing packages)
86
- - If you run a command that is important to solving the user's query, but it fails because of sandboxing, rerun the command with approval. ALWAYS proceed to use the \`sandbox_permissions\` and \`justification\` parameters - do not message the user before requesting approval for the command.
87
- - You are about to take a potentially destructive action such as an \`rm\` or \`git reset\` that the user did not explicitly ask for
88
- - (for all of these, you should weigh alternative paths that do not require approval)
89
-
90
- When \`sandbox_mode\` is set to read-only, you'll need to request approval for any command that isn't a read.
91
-
92
- You will be told what filesystem sandboxing, network sandboxing, and approval mode are active in a developer or user message. If you are not told about this, assume that you are running with workspace-write, network sandboxing enabled, and approval on-failure.
93
-
94
- Although they introduce friction to the user because your work is paused until the user responds, you should leverage them when necessary to accomplish important work. If the completing the task requires escalated permissions, Do not let these settings or the sandbox deter you from attempting to accomplish the user's task unless it is set to "never", in which case never ask for approvals.
95
-
96
- When requesting approval to execute a command that will require escalated privileges:
97
- - Provide the \`sandbox_permissions\` parameter with the value \`"require_escalated"\`
98
- - Include a short, 1 sentence explanation for why you need escalated permissions in the justification parameter
99
-
100
- ## Special user requests
101
-
102
- - If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as \`date\`), you should do so.
103
- - If the user asks for a "review", default to a code review mindset: prioritise identifying bugs, risks, behavioural regressions, and missing tests. Findings must be the primary focus of the response - keep summaries or overviews brief and only after enumerating the issues. Present findings first (ordered by severity with file/line references), follow with open questions or assumptions, and offer a change-summary only as a secondary detail. If no findings are discovered, state that explicitly and mention any residual risks or testing gaps.
104
-
105
- ## Frontend tasks
106
- When doing frontend design tasks, avoid collapsing into "AI slop" or safe, average-looking layouts.
107
- Aim for interfaces that feel intentional, bold, and a bit surprising.
108
- - Typography: Use expressive, purposeful fonts and avoid default stacks (Inter, Roboto, Arial, system).
109
- - Color & Look: Choose a clear visual direction; define CSS variables; avoid purple-on-white defaults. No purple bias or dark mode bias.
110
- - Motion: Use a few meaningful animations (page-load, staggered reveals) instead of generic micro-motions.
111
- - Background: Don't rely on flat, single-color backgrounds; use gradients, shapes, or subtle patterns to build atmosphere.
112
- - Overall: Avoid boilerplate layouts and interchangeable UI patterns. Vary themes, type families, and visual languages across outputs.
113
- - Ensure the page loads properly on both desktop and mobile
114
-
115
- Exception: If working within an existing website or design system, preserve the established patterns, structure, and visual language.
116
-
117
- ## Presenting your work and final message
118
-
119
- You are producing plain text that will later be styled by the CLI. Follow these rules exactly. Formatting should make results easy to scan, but not feel mechanical. Use judgment to decide how much structure adds value.
120
-
121
- - Default: be very concise; friendly coding teammate tone.
122
- - Ask only when needed; suggest ideas; mirror the user's style.
123
- - For substantial work, summarize clearly; follow final‑answer formatting.
124
- - Skip heavy formatting for simple confirmations.
125
- - Don't dump large files you've written; reference paths only.
126
- - No "save/copy this file" - User is on the same machine.
127
- - Offer logical next steps (tests, commits, build) briefly; add verify steps if you couldn't do something.
128
- - For code changes:
129
- * Lead with a quick explanation of the change, and then give more details on the context covering where and why a change was made. Do not start this explanation with "summary", just jump right in.
130
- * If there are natural next steps the user may want to take, suggest them at the end of your response. Do not make suggestions if there are no natural next steps.
131
- * When suggesting multiple options, use numeric lists for the suggestions so the user can quickly respond with a single number.
132
- - The user does not command execution outputs. When asked to show the output of a command (e.g. \`git show\`), relay the important details in your answer or summarize the key lines so the user understands the result.
133
-
134
- ### Final answer structure and style guidelines
135
-
136
- - Plain text; CLI handles styling. Use structure only when it helps scanability.
137
- - Headers: optional; short Title Case (1-3 words) wrapped in **…**; no blank line before the first bullet; add only if they truly help.
138
- - Bullets: use - ; merge related points; keep to one line when possible; 4–6 per list ordered by importance; keep phrasing consistent.
139
- - Monospace: backticks for commands/paths/env vars/code ids and inline examples; use for literal keyword bullets; never combine with **.
140
- - Code samples or multi-line snippets should be wrapped in fenced code blocks; include an info string as often as possible.
141
- - Structure: group related bullets; order sections general → specific → supporting; for subsections, start with a bolded keyword bullet, then items; match complexity to the task.
142
- - Tone: collaborative, concise, factual; present tense, active voice; self‑contained; no "above/below"; parallel wording.
143
- - Don'ts: no nested bullets/hierarchies; no ANSI codes; don't cram unrelated keywords; keep keyword lists short—wrap/reformat if long; avoid naming formatting styles in answers.
144
- - Adaptation: code explanations → precise, structured with code refs; simple tasks → lead with outcome; big changes → logical walkthrough + rationale + next actions; casual one-offs → plain sentences, no headers/bullets.
145
- - File References: When referencing files in your response follow the below rules:
146
- * Use inline code to make file paths clickable.
147
- * Each reference should have a stand alone path. Even if it's the same file.
148
- * Accepted: absolute, workspace‑relative, a/ or b/ diff prefixes, or bare filename/suffix.
149
- * Optionally include line/column (1‑based): :line[:column] or #Lline[Ccolumn] (column defaults to 1).
150
- * Do not use URIs like file://, vscode://, or https://.
151
- * Do not provide range of lines
152
- * Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\\repo\\project\\main.rs:12:5`;var f=c(62276),g=c(56659),h=c(74985),i=c(56178),j=c(22371),k=c(23016),l=c(18230),m=c(20362);let n=["server_is_overloaded","service_unavailable_error"],o=/^(rs|fc|resp|msg)_/,p=new Set(["image_generation","web_search","web_search_preview","file_search","computer","computer_use_preview","code_interpreter","mcp","local_shell"]),q=new Set(["model","input","instructions","tools","tool_choice","stream","store","reasoning","service_tier","include","prompt_cache_key","client_metadata"]);class r extends d.H{constructor(){super("codex",f.xq.codex),this._currentSessionId=null}buildHeaders(a,b=!0){let c=super.buildHeaders(a,b);c.session_id=this._currentSessionId||a?.connectionId||"default",c.originator||(c.originator="codex_cli_rs");let d=a?.providerSpecificData?.workspaceId;return"string"==typeof d&&d&&!c["chatgpt-account-id"]&&(c["chatgpt-account-id"]=d),c}buildUrl(a,b,c=0,d=null){let e=super.buildUrl(a,b,c,d);return this._isCompact?`${e}/compact`:e}async refreshCredentials(a,b){return a?.refreshToken?(0,g.Vq)("codex",a,b):null}needsRefresh(a){return(0,g.fp)("codex",a)}async prefetchImages(a){if(Array.isArray(a?.input))for(let b of a.input){if(!Array.isArray(b.content))continue;let a=b.content.map(async a=>{if("image_url"!==a.type)return a;let b="string"==typeof a.image_url?a.image_url:a.image_url?.url,c=a.image_url?.detail||"auto";if(!b)return a;if(b.startsWith("data:"))return{type:"input_image",image_url:b,detail:c};let d=await (0,i.ni)(b,{timeoutMs:15e3});return{type:"input_image",image_url:d?.url||b,detail:c}});b.content=await Promise.all(a)}}async execute(a){let b=Array.isArray(a.body?.input)?a.body.input.reduce((a,b)=>a+(Array.isArray(b.content)?b.content.filter(a=>"image_url"===a.type).length:0),0):0,c=Array.isArray(a.body?.input)?a.body.input.length:0;if((0,l.s)("CODEX",`execute start | inputItems=${c} | images=${b} | sessionId=${this._currentSessionId||"pending"}`),b>0){let b=Date.now();await this.prefetchImages(a.body),(0,l.s)("CODEX",`prefetchImages done | ${Date.now()-b}ms`)}else await this.prefetchImages(a.body);let d={...k.cI,...this.config.retry},{attempts:e,delayMs:f}=(0,k.DR)(d[503]),g=0;for(;;){let b=await super.execute(a),c=await this._peekSseOverloaded(b.response);if(!c.matched)return c.replacementBody&&(b.response=new Response(c.replacementBody,{status:b.response.status,statusText:b.response.statusText,headers:b.response.headers})),b;if(g>=e)return a.log?.warn?.("RETRY",`CODEX | SSE overloaded "${c.matched}" — retries exhausted (${g}/${e})`),c.replacementBody&&(b.response=new Response(c.replacementBody,{status:b.response.status,statusText:b.response.statusText,headers:b.response.headers})),b;g++,a.log?.debug?.("RETRY",`CODEX | SSE "${c.matched}" retry ${g}/${e} after ${f/1e3}s`),(0,l.s)("CODEX",`SSE overloaded "${c.matched}" → retry ${g}/${e} in ${f}ms`);try{await b.response.body?.cancel?.()}catch{}await new Promise(a=>setTimeout(a,f))}}async _peekSseOverloaded(a){if(!a||!a.ok||!a.body)return{matched:null,replacementBody:null};let b=a.body.getReader(),c=new TextDecoder,d=[],e="",f=null;try{for(;e.length<4096;){let{done:a,value:g}=await b.read();if(a)break;d.push(g),e+=c.decode(g,{stream:!0});let h=n.find(a=>e.includes(a));if(h){f=h;break}}}catch(a){(0,l.s)("CODEX",`peek read error: ${a.message}`)}b.releaseLock();let g=a.body,h=null;return{matched:f,replacementBody:new ReadableStream({start(a){for(let b of d)a.enqueue(b);h=g.getReader()},async pull(a){try{let{done:b,value:c}=await h.read();if(b)return void a.close();a.enqueue(c)}catch(b){a.error(b)}},cancel(a){try{h?.cancel(a)}catch{}}})}}parseError(a,b){if(429===a.status&&b)try{let a=JSON.parse(b),c=a?.error;if(c?.type==="usage_limit_reached"){let a=Date.now(),d=null;if("number"==typeof c.resets_at&&c.resets_at>0){let b=1e3*c.resets_at;b>a&&(d=b)}if(!d&&"number"==typeof c.resets_in_seconds&&c.resets_in_seconds>0&&(d=a+1e3*c.resets_in_seconds),d)return{status:429,message:c.message||b,resetsAtMs:d}}}catch{}return super.parseError(a,b)}transformRequest(a,b,c,d){this._isCompact=!!b._compact,delete b._compact,this._currentSessionId=(0,m.oV)({headers:d?.rawHeaders,body:b,connectionId:d?.connectionId,workspaceId:d?.providerSpecificData?.workspaceId,scope:"codex"});let f=(0,h.m)(b.input);if(f&&(b.input=f),(!b.input||Array.isArray(b.input)&&0===b.input.length)&&(b.input=[{type:"message",role:"user",content:[{type:"input_text",text:"..."}]}]),Array.isArray(b.input))for(let a of b.input)!(!a||"object"!=typeof a||Array.isArray(a))&&("system"!==a.role||a.type&&"message"!==a.type||(a.role="developer"));Array.isArray(b.input)&&(b.input=b.input.filter(a=>{if("string"==typeof a&&o.test(a))return!1;if(a&&"object"==typeof a&&!Array.isArray(a)){if("item_reference"===a.type)return!1;"string"==typeof a.id&&o.test(a.id)&&delete a.id}return!0})),function(a){if(!Array.isArray(a.tools))return;let b=new Set;if(a.tools=a.tools.filter(a=>{if(!a||"object"!=typeof a||Array.isArray(a))return!1;let c="string"==typeof a.type?a.type:"";if("namespace"===c){if(Array.isArray(a.tools))for(let c of a.tools){let a="string"==typeof c?.name?c.name.trim().slice(0,128):"";a&&b.add(a)}return!0}if("function"!==c)return!!c&&!a.function&&"string"!=typeof a.name&&p.has(c);let d=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null,e=("string"==typeof a.name?a.name:"string"==typeof d?.name?d.name:"").trim();if(!e)return!1;let f="string"==typeof a.description?a.description:"string"==typeof d?.description?d.description:"",g=a.parameters&&"object"==typeof a.parameters&&!Array.isArray(a.parameters)?a.parameters:d?.parameters&&"object"==typeof d.parameters&&!Array.isArray(d.parameters)?d.parameters:{type:"object",properties:{}};for(let b of Object.keys(a))delete a[b];return a.type="function",a.name=e.slice(0,128),f&&(a.description=f),a.parameters=g,b.add(e),!0}),a.tool_choice&&"object"==typeof a.tool_choice&&!Array.isArray(a.tool_choice)&&"function"===a.tool_choice.type){let c="string"==typeof a.tool_choice.name?a.tool_choice.name.trim():"";c&&b.has(c)||delete a.tool_choice}}(b),b.stream=!0,b.instructions&&""!==b.instructions.trim()||(b.instructions=e),b.store=!1,!b.prompt_cache_key&&this._currentSessionId&&(b.prompt_cache_key=this._currentSessionId),b.model=(0,j.kt)("cx",b.model||a);let g=null;for(let a of["none","low","medium","high","xhigh"])if(b.model.endsWith(`-${a}`)){g=a,b.model=b.model.replace(`-${a}`,"");break}if(b.reasoning)b.reasoning.summary||(b.reasoning.summary="auto");else{let a=b.reasoning_effort||g||"low";b.reasoning={effort:a,summary:"auto"}}for(let a of(delete b.reasoning_effort,b.reasoning&&b.reasoning.effort&&"none"!==b.reasoning.effort&&(b.include=["reasoning.encrypted_content"]),delete b.temperature,delete b.top_p,delete b.frequency_penalty,delete b.presence_penalty,delete b.logprobs,delete b.top_logprobs,delete b.n,delete b.seed,delete b.max_tokens,delete b.max_completion_tokens,delete b.max_output_tokens,delete b.user,delete b.prompt_cache_retention,delete b.metadata,delete b.stream_options,delete b.safety_identifier,delete b.previous_response_id,Object.keys(b)))q.has(a)||delete b[a];return b}}},53057:(a,b,c)=>{c.d(b,{Xh:()=>f,js:()=>g});var d=c(49022);let e={el:"elevenlabs",jina:"jina-ai","jina-ai":"jina-ai",polly:"aws-polly","aws-polly":"aws-polly"};for(let a of d.A)for(let b of(e[a.id]=a.id,a.alias&&(e[a.alias]=a.id),a.aliases||[]))e[b]=a.id;function f(a){if(!a)return{provider:null,model:null,isAlias:!1,providerAlias:null};if(a.includes("/")){let b=a.indexOf("/"),c=a.slice(0,b),d=a.slice(b+1);return{provider:e[c]||c,model:d,isAlias:!1,providerAlias:c}}return{provider:null,model:a,isAlias:!0,providerAlias:null}}async function g(a,b){let c=f(a);if(!c.isAlias)return{provider:c.provider,model:c.model};let d="function"==typeof b?await b():b,g=function(a,b){var c,d;if(!b)return null;let f=b[a];if(!f)return null;if("string"==typeof f&&f.includes("/")){let a=f.indexOf("/");return{provider:e[c=f.slice(0,a)]||c,model:f.slice(a+1)}}return"object"==typeof f&&f.provider&&f.model?{provider:e[d=f.provider]||d,model:f.model}:null}(c.model,d);return g||{provider:function(a){if(!a)return"openai";let b=a.toLowerCase();return h.find(([a])=>a.test(b))?.[1]||"openai"}(c.model),model:c.model}}let h=[[/^claude-/,"anthropic"],[/^gemini-/,"gemini"],[/^gpt-/,"openai"],[/^o[134]/,"openai"],[/^deepseek-/,"openrouter"]]},57650:(a,b,c)=>{c.d(b,{F:()=>h});var d=c(83543),e=c(62276),f=c(22371),g=c(56790);class h extends d.L{constructor(){super("xiaomi-tokenplan")}buildUrl(a,b,c=0,d=null){let h=(0,e.Yg)(d);return(0,f.ux)(a,a)===g.h.CLAUDE?`${h.replace(/\/v1\/?$/,"/anthropic/v1")}/messages`:`${h}/chat/completions`}}},60126:(a,b,c)=>{c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(19886)},63483:(a,b,c)=>{c.d(b,{$U:()=>d,RK:()=>g,pb:()=>e,uB:()=>f});let d="data: [DONE]\n\n",e={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"},f={"Content-Type":"text/event-stream","Cache-Control":"no-cache","X-Accel-Buffering":"no"},g={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","Access-Control-Allow-Origin":"*"}},65640:(a,b,c)=>{c.d(b,{D:()=>f});var d=c(83543),e=c(62276);class f extends d.L{constructor(){super("ollama-local")}buildUrl(a,b,c=0,d=null){return`${(0,e.Ak)(d)}/api/chat`}}},65787:(a,b,c)=>{c.d(b,{x:()=>q});var d=c(24353),e=c(62276),f=c(43528),g=c(23016),h=c(77021),i=c(1950),j=c(50317),k=c(11572),l=c(37973),m=c(74508),n=c(63483),o=c(55511),p=c.n(o);class q extends d.H{constructor(){super("github",e.xq.github),this.knownCodexModels=new Set}buildUrl(a,b,c=0){return this.config.baseUrl}buildHeaders(a,b=!0){let c=a.copilotToken||a.accessToken;return{Authorization:`Bearer ${c}`,"Content-Type":"application/json","copilot-integration-id":"vscode-chat","editor-version":`vscode/${f.x0.VSCODE_VERSION}`,"editor-plugin-version":`copilot-chat/${f.x0.COPILOT_CHAT_VERSION}`,"user-agent":f.x0.USER_AGENT,"openai-intent":"conversation-panel","x-github-api-version":f.x0.API_VERSION,"x-request-id":p().randomUUID?.()||`${Date.now()}-${Math.random().toString(36).slice(2)}`,"x-vscode-user-agent-library-version":"electron-fetch","X-Initiator":"user",Accept:b?"text/event-stream":"application/json"}}sanitizeMessagesForChatCompletions(a){if(!a?.messages)return a;let b={...a};if(a.response_format&&a.model?.includes("claude")){let b=a.response_format,c="";if("json_schema"===b.type&&b.json_schema?.schema?c="CRITICAL: You must ONLY output raw JSON. Never use markdown code blocks. Never use backticks. Never wrap JSON in triple backticks. Output ONLY the raw JSON object.":"json_object"===b.type&&(c="CRITICAL: You must ONLY output raw JSON. Never use markdown code blocks. Never use backticks."),c){let b=a.messages.findIndex(a=>"system"===a.role);b>=0?a.messages[b].content=c+"\n\n"+a.messages[b].content:a.messages.unshift({role:"system",content:c});let d=a.messages.map((a,b)=>"user"===a.role?b:-1).filter(a=>a>=0).pop();if(d>=0){let b=a.messages[d],c="string"==typeof b.content?b.content:JSON.stringify(b.content);b.content="Respond with ONLY raw JSON (no markdown, no backticks, no code blocks): "+c}}}return b.messages=a.messages.map(a=>{if(!a.content||"string"==typeof a.content)return a;if(Array.isArray(a.content)){let b=a.content.map(a=>{if("text"===a.type||"image_url"===a.type)return a;let b=a.text||a.content||JSON.stringify(a);return{type:"text",text:"string"==typeof b?b:JSON.stringify(b)}}).filter(a=>""!==a.text);return{...a,content:b.length>0?b:null}}return a}),b}requiresMaxCompletionTokens(a){return/gpt-5|o[134]-/i.test(a)}transformRequest(a,b,c,d){let e={...b};return this.requiresMaxCompletionTokens(a)&&void 0!==e.max_tokens&&(e.max_completion_tokens=e.max_tokens,delete e.max_tokens),"none"===e.reasoning_effort&&delete e.reasoning_effort,(0,m.c)("github",a,e),e}supportsResponsesEndpoint(a){let b=(a||"").toLowerCase();return!(b.includes("gemini")||b.includes("claude"))}async execute(a){let{model:b,log:c}=a;if(this.knownCodexModels.has(b)&&this.supportsResponsesEndpoint(b))return c?.debug("GITHUB",`Using cached /responses route for ${b}`),this.executeWithResponsesEndpoint(a);let d={...a,body:this.sanitizeMessagesForChatCompletions(a.body)},e=await super.execute({...d,proxyOptions:a.proxyOptions||null});if(e.response.status===g.gx.BAD_REQUEST&&this.supportsResponsesEndpoint(b)){let d=await e.response.clone().text();if(d.includes("not accessible via the /chat/completions endpoint")||d.includes("The requested model is not supported"))return c?.warn("GITHUB",`Model ${b} requires /responses. Switching...`),this.knownCodexModels.add(b),this.executeWithResponsesEndpoint(a)}return e}async executeWithResponsesEndpoint({model:a,body:b,stream:c,credentials:d,signal:e,log:f,proxyOptions:g=null}){let m=this.config.responsesUrl,o=this.buildHeaders(d,c),p=(0,h.h)(a,b,c,d);f?.debug("GITHUB","Sending translated request to /responses");let q=await (0,l.proxyAwareFetch)(m,{method:"POST",headers:o,body:JSON.stringify(p),signal:e},g);if(!q.ok)return{response:q,url:m,headers:o,transformedBody:p};let r=(0,j.Ws)("openai-responses");r.model=a;let s=new TextDecoder,t="",u=new TransformStream({async transform(a,b){let d=(t+=s.decode(a,{stream:!0})).split("\n");for(let a of(t=d.pop()||"",d)){let d=a.trim();if(!d)continue;let e=(0,k.tV)(d);if(!e)continue;if(e.done&&!0===c){b.enqueue(new TextEncoder().encode(n.$U));continue}let f=(0,i.v)(e,r);if(f){let a=(0,k.v8)(f,"openai");b.enqueue(new TextEncoder().encode(a))}}},flush(a){if(t.trim()){let b=(0,k.tV)(t.trim());if(b&&!b.done){let c=(0,i.v)(b,r);c&&a.enqueue(new TextEncoder().encode((0,k.v8)(c,"openai")))}}}});return q.body?{response:new Response(q.body.pipeThrough(u),{status:q.status,statusText:q.statusText,headers:q.headers}),url:m,headers:o,transformedBody:p}:{response:new Response("",{status:q.status,headers:q.headers}),url:m,headers:o,transformedBody:p}}async refreshCopilotToken(a,b,c=null){try{let d=await (0,l.proxyAwareFetch)("https://api.github.com/copilot_internal/v2/token",{headers:{Authorization:`token ${a}`,"User-Agent":f.x0.USER_AGENT,"Editor-Version":`vscode/${f.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${f.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":f.x0.API_VERSION}},c);if(!d.ok){let a=await d.text();return b?.error?.("TOKEN",`Copilot token refresh failed: ${d.status} ${a}`),null}let e=await d.json();return b?.info?.("TOKEN","Copilot token refreshed"),{token:e.token,expiresAt:e.expires_at}}catch(a){return b?.error?.("TOKEN",`Copilot refresh error: ${a.message}`),null}}async refreshGitHubToken(a,b,c=null){try{let d={grant_type:"refresh_token",refresh_token:a,client_id:this.config.clientId};this.config.clientSecret&&(d.client_secret=this.config.clientSecret);let e=await (0,l.proxyAwareFetch)(f.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(d)},c);if(!e.ok)return null;let g=await e.json();return b?.info?.("TOKEN","GitHub token refreshed"),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return b?.error?.("TOKEN",`GitHub refresh error: ${a.message}`),null}}async refreshCredentials(a,b,c=null){let d=await this.refreshCopilotToken(a.accessToken,b,c);if(!d&&a.refreshToken){let e=await this.refreshGitHubToken(a.refreshToken,b,c);if(e?.accessToken)return(d=await this.refreshCopilotToken(e.accessToken,b,c))?{...e,copilotToken:d.token,copilotTokenExpiresAt:d.expiresAt}:e}return d?{accessToken:a.accessToken,refreshToken:a.refreshToken,copilotToken:d.token,copilotTokenExpiresAt:d.expiresAt}:null}needsRefresh(a){if(!a.copilotToken)return!0;if(a.copilotTokenExpiresAt){let b=a.copilotTokenExpiresAt;if("number"==typeof b&&b<1e12?b*=1e3:"string"==typeof b&&(b=new Date(b).getTime()),b-Date.now()<3e5)return!0}return super.needsRefresh(a)}}},68735:(a,b,c)=>{c.d(b,{Gh:()=>j,IF:()=>m,O9:()=>g,OF:()=>l,WL:()=>h,f5:()=>k,lm:()=>f});var d=c(60126),e=c(56790);let f={reset:"\x1b[0m",red:"\x1b[31m",green:"\x1b[32m",yellow:"\x1b[33m",blue:"\x1b[34m",cyan:"\x1b[36m"};function g(a){if(!a||"object"!=typeof a)return a;let b={...a};return void 0!==b.input_tokens&&(b.input_tokens+=2e3),void 0!==b.prompt_tokens&&(b.prompt_tokens+=2e3),void 0!==b.total_tokens?b.total_tokens+=2e3:void 0!==b.prompt_tokens&&void 0!==b.completion_tokens&&(b.total_tokens=b.prompt_tokens+b.completion_tokens),b}function h(a,b){if(!a||"object"!=typeof a)return a;let c={[e.h.CLAUDE]:["input_tokens","output_tokens","cache_read_input_tokens","cache_creation_input_tokens","estimated"],[e.h.GEMINI]:["promptTokenCount","candidatesTokenCount","totalTokenCount","cachedContentTokenCount","thoughtsTokenCount","estimated"],[e.h.OPENAI_RESPONSES]:["input_tokens","output_tokens","input_tokens_details","output_tokens_details","estimated"],default:["prompt_tokens","completion_tokens","total_tokens","cached_tokens","reasoning_tokens","prompt_tokens_details","completion_tokens_details","estimated"]},d=c[b];b===e.h.GEMINI_CLI||b===e.h.ANTIGRAVITY?d=c[e.h.GEMINI]:b===e.h.OPENAI_RESPONSE?d=c[e.h.OPENAI_RESPONSES]:d||(d=c.default);let f={};for(let b of d)void 0!==a[b]&&(f[b]=a[b]);return f}function i(a){if(!a||"object"!=typeof a||Array.isArray(a))return null;let b={},c=(a,c)=>{if(null==c)return;let d=Number(c);Number.isFinite(d)&&(b[a]=d)};return(c("prompt_tokens",a?.prompt_tokens),c("completion_tokens",a?.completion_tokens),c("total_tokens",a?.total_tokens),c("cache_read_input_tokens",a?.cache_read_input_tokens),c("cache_creation_input_tokens",a?.cache_creation_input_tokens),c("cached_tokens",a?.cached_tokens),c("reasoning_tokens",a?.reasoning_tokens),a?.prompt_tokens_details&&"object"==typeof a.prompt_tokens_details&&(b.prompt_tokens_details=a.prompt_tokens_details),a?.completion_tokens_details&&"object"==typeof a.completion_tokens_details&&(b.completion_tokens_details=a.completion_tokens_details),0===Object.keys(b).length)?null:b}function j(a){if(!a||"object"!=typeof a)return!1;for(let b of["prompt_tokens","completion_tokens","total_tokens","input_tokens","output_tokens","promptTokenCount","candidatesTokenCount"])if("number"==typeof a[b]&&a[b]>0)return!0;return!1}function k(a){if(!a||"object"!=typeof a)return null;if("message_delta"===a.type&&a.usage&&"object"==typeof a.usage)return i({prompt_tokens:a.usage.input_tokens||0,completion_tokens:a.usage.output_tokens||0,cache_read_input_tokens:a.usage.cache_read_input_tokens,cache_creation_input_tokens:a.usage.cache_creation_input_tokens});if(("response.completed"===a.type||"response.done"===a.type)&&a.response?.usage&&"object"==typeof a.response.usage){let b=a.response.usage,c=b.input_tokens_details?.cached_tokens;return i({prompt_tokens:b.input_tokens||b.prompt_tokens||0,completion_tokens:b.output_tokens||b.completion_tokens||0,cached_tokens:c,reasoning_tokens:b.output_tokens_details?.reasoning_tokens,prompt_tokens_details:c?{cached_tokens:c}:void 0})}if(a.usage&&"object"==typeof a.usage&&void 0!==a.usage.prompt_tokens)return i({prompt_tokens:a.usage.prompt_tokens,completion_tokens:a.usage.completion_tokens||0,cached_tokens:a.usage.prompt_tokens_details?.cached_tokens||a.usage.prompt_cache_hit_tokens,reasoning_tokens:a.usage.completion_tokens_details?.reasoning_tokens,prompt_tokens_details:a.usage.prompt_tokens_details,completion_tokens_details:a.usage.completion_tokens_details});let b=a.usageMetadata||a.response?.usageMetadata;return b&&"object"==typeof b?i({prompt_tokens:b.promptTokenCount||0,completion_tokens:b.candidatesTokenCount||0,total_tokens:b.totalTokenCount,cached_tokens:b.cachedContentTokenCount,reasoning_tokens:b.thoughtsTokenCount}):!0===a.done&&"number"==typeof a.prompt_eval_count?i({prompt_tokens:a.prompt_eval_count||0,completion_tokens:a.eval_count||0,total_tokens:(a.prompt_eval_count||0)+(a.eval_count||0)}):null}function l(a,b,c=e.h.OPENAI){var d,f;return d=function(a){if(!a||"object"!=typeof a)return 0;try{let b=JSON.stringify(a).length;return Math.ceil(b/4)}catch(a){return 0}}(a),f=b&&!(b<=0)?Math.max(1,Math.floor(b/4)):0,c===e.h.CLAUDE?g({input_tokens:d,output_tokens:f,estimated:!0}):g({prompt_tokens:d,completion_tokens:f,total_tokens:d+f,estimated:!0})}function m(a,b,c=null,e=null,g=null){if(!b||"object"!=typeof b)return;let h=a?.toUpperCase()||"UNKNOWN",i=b?.prompt_tokens||b?.input_tokens||0,j=b?.completion_tokens||b?.output_tokens||0,k=e?e.slice(0,8)+"...":"unknown",l=`[${new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}] 📊 ${f.green}[USAGE] ${h} | in=${i} | out=${j} | account=${k}${f.reset}`;b.estimated&&(l+=` ${f.yellow}(estimated)${f.reset}`);let n=b.cache_read_input_tokens||b.cached_tokens||b.prompt_tokens_details?.cached_tokens;n&&(l+=` | cache_read=${n}`);let o=b.cache_creation_input_tokens;o&&(l+=` | cache_create=${o}`);let p=b.reasoning_tokens;p&&(l+=` | reasoning=${p}`),console.log(l);let q={prompt_tokens:i,completion_tokens:j,cache_read_input_tokens:n||0,cache_creation_input_tokens:o||0,reasoning_tokens:p||0};(0,d.sZ)({model:c,provider:a,connectionId:e,tokens:q,apiKey:g||void 0}).catch(()=>{}),(0,d.E5)({model:c,provider:a,connectionId:e,tokens:q,status:"200 OK"}).catch(()=>{})}},71246:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{SB:()=>z});var e=c(1820),f=c(27381),g=c(84868),h=c(65787),i=c(38461),j=c(38531),k=c(21303),l=c(49593),m=c(86758),n=c(23082),o=c(87767),p=c(21241),q=c(83628),r=c(23568),s=c(74009),t=c(65640),u=c(92930),v=c(57650),w=c(24221),x=c(83543);c(24353);var y=a([m]);m=(y.then?(await y)():y)[0];let A={antigravity:new e.c,azure:new f.P,"gemini-cli":new g.V,github:new h.x,iflow:new i.r,qoder:new j.DH,kiro:new k.B,codex:new l.T,cursor:new m.o,cu:new m.o,vertex:new n.w("vertex"),"vertex-partner":new n.w("vertex-partner"),qwen:new o.R,opencode:new p.j,"opencode-go":new q.H,"grok-web":new r.$,"perplexity-web":new s.Ay,"ollama-local":new t.D,commandcode:new u.A,"xiaomi-tokenplan":new v.F,"mimo-free":new w.Yh,mmf:new w.Yh},B=new Map;function z(a){return A[a]?A[a]:(B.has(a)||B.set(a,new x.L(a)),B.get(a))}d()}catch(a){d(a)}})},74009:(a,b,c)=>{c.d(b,{Ay:()=>z});var d=c(24353),e=c(62276),f=c(63483),g=c(4436);let h=e.xq["perplexity-web"].baseUrl,i="2.18",j={"pplx-auto":["concise","pplx_pro"],"pplx-sonar":["copilot","experimental"],"pplx-gpt":["copilot","gpt54"],"pplx-gemini":["copilot","gemini31pro_high"],"pplx-sonnet":["copilot","claude46sonnet"],"pplx-opus":["copilot","claude46opus"],"pplx-nemotron":["copilot","nv_nemotron_3_super"]},k={"pplx-gpt":"gpt54_thinking","pplx-sonnet":"claude46sonnetthinking","pplx-opus":"claude46opusthinking"},l=/\[\d+\]/g,m=/<grok:[^>]*>.*?<\/grok:[^>]*>/gs,n=/<grok:[^>]*\/>/g,o=/<[?]xml[^?]*[?]>/g,p=/<\/?response\b[^>]*>/gi,q=/ {2,}/g,r=/\n{3,}/g,s=new Map;function t(a){let b=a.map(a=>`${a.role}:${a.content}`).join("\n"),c=0x811c9dc5;for(let a=0;a<b.length;a++)c^=b.charCodeAt(a),c=0x1000193*c>>>0;return c.toString(16).padStart(8,"0")}function u(a,b,c,d){if(!d)return;let e=t([...a,{role:"user",content:b},{role:"assistant",content:c}]);if(s.set(e,{backendUuid:d,ts:Date.now()}),s.size>200){let a=null,b=1/0;for(let[c,d]of s)d.ts<b&&(b=d.ts,a=c);a&&s.delete(a)}}function v(a,b=!0){let c=a;return c=(c=(c=(c=(c=c.replace(o,"")).replace(l,"")).replace(m,"")).replace(n,"")).replace(p,""),b&&(c=(c=(c=c.replace(q," ")).replace(r,"\n\n")).trim()),c}async function*w(a,b){let c=a.getReader(),d=new TextDecoder,e="",f=[];function g(){if(0===f.length)return null;let a=f.join("\n");f=[];let b=a.trim();if(!b||"[DONE]"===b)return"done";try{return JSON.parse(b)}catch{return null}}try{for(;;){if(b?.aborted)return;let{value:a,done:h}=await c.read();if(h)break;for(e+=d.decode(a,{stream:!0});;){let a=e.indexOf("\n");if(a<0)break;let b=e.slice(0,a);e=e.slice(a+1);let c=b.endsWith("\r")?b.slice(0,-1):b;if(""===c){let a=g();if("done"===a)return;a&&(yield a);continue}if(c.startsWith("data:")&&f.push(c.slice(5).trimStart()),"event: end_of_stream"===c)return}}(e+=d.decode()).trim().startsWith("data:")&&f.push(e.trim().slice(5).trimStart());let a=g();a&&"done"!==a&&(yield a)}finally{c.releaseLock()}}async function*x(a,b){let c="",d=null,e=0,f=new Set;for await(let g of w(a,b)){if(g.error_code||g.error_message)return void(yield{error:g.error_message||`Perplexity error: ${g.error_code}`,done:!0});g.backend_uuid&&(d=g.backend_uuid);let a=g.blocks??[];for(let b of a){let a=b.intended_usage??"";if("pro_search_steps"===a&&b.plan_block?.steps){for(let a of b.plan_block.steps)if("SEARCH_WEB"===a.step_type)for(let b of a.search_web_content?.queries??[]){let a=b.query??"";a&&!f.has(a)&&(f.add(a),yield{thinking:`Searching: ${a}`,backendUuid:d??void 0})}else if("READ_RESULTS"===a.step_type)for(let b of(a.read_results_content?.urls??[]).slice(0,3))b&&!f.has(b)&&(f.add(b),yield{thinking:`Reading: ${b}`,backendUuid:d??void 0})}if("plan"===a&&b.plan_block?.goals)for(let a of b.plan_block.goals){let b=a.description??"";b&&!f.has(b)&&(f.add(b),yield{thinking:b,backendUuid:d??void 0})}if(!a.includes("markdown"))continue;let g=b.markdown_block;if(!g)continue;let h=g.chunks??[];if(0!==h.length)if("DONE"===g.progress)c=h.join("");else{let a=c+h.join("");if(a.length>e){let b=a.slice(e);c=a,e=a.length,yield{delta:b,answer:c,backendUuid:d??void 0}}}}if(0===a.length&&g.text){let a=g.text.trim();if(a.length>e){let b=a.slice(e);c=a,e=a.length,yield{delta:b,answer:c,backendUuid:d??void 0}}}if(g.final||"COMPLETED"===g.status)break}yield{delta:"",answer:c,backendUuid:d??void 0,done:!0}}async function y(a,b,c,d,e,f,g){let h="",i=null,j=[];for await(let b of x(a,g)){if(b.backendUuid&&(i=b.backendUuid),b.error)return new Response(JSON.stringify({error:{message:b.error,type:"upstream_error",code:"PPLX_ERROR"}}),{status:502,headers:{"Content-Type":"application/json"}});if(b.thinking){j.push(b.thinking);continue}if(b.done){h=b.answer||h;break}b.answer&&(h=b.answer)}u(e,f,h=v(h),i);let k=j.length>0?j.join("\n"):void 0,l={role:"assistant",content:h};k&&(l.reasoning_content=k);let m=Math.ceil(f.length/4),n=Math.ceil(h.length/4);return new Response(JSON.stringify({id:c,object:"chat.completion",created:d,model:b,system_fingerprint:null,choices:[{index:0,message:l,finish_reason:"stop",logprobs:null}],usage:{prompt_tokens:m,completion_tokens:n,total_tokens:m+n}}),{status:200,headers:{"Content-Type":"application/json"}})}class z extends d.H{constructor(){super("perplexity-web",e.xq["perplexity-web"])}async execute({model:a,body:b,stream:c,credentials:d,signal:e,log:l}){var m,n,o,p,q;let r,w,z,A,B,C=b?.messages;if(!C||!Array.isArray(C)||0===C.length)return{response:new Response(JSON.stringify({error:{message:"Missing or empty messages array",type:"invalid_request"}}),{status:400,headers:{"Content-Type":"application/json"}}),url:h,headers:{},transformedBody:b};(b?.thinking===!0||b?.reasoning_effort!=null&&"none"!==b.reasoning_effort)&&k[a]?(r="copilot",w=k[a],l?.info?.("PPLX-WEB",`Thinking mode → ${a} using ${w}`)):j[a]?[r,w]=j[a]:(r="copilot",w=a,l?.info?.("PPLX-WEB",`Unmapped model ${a}, using as raw preference`));let D=function(a){let b="",c=[];for(let d of a){let a=String(d.role||"user");"developer"===a&&(a="system");let e="";"string"==typeof d.content?e=d.content:Array.isArray(d.content)&&(e=d.content.filter(a=>"text"===a.type).map(a=>String(a.text||"")).join(" ")),e.trim()&&("system"===a?b+=e+"\n":("user"===a||"assistant"===a)&&c.push({role:a,content:e}))}let d="";return c.length>0&&"user"===c[c.length-1].role&&(d=c.pop().content),{systemMsg:b,history:c,currentMsg:d}}(C),E=function(a){if(0===a.length)return null;let b=t(a),c=s.get(b);return c?Date.now()-c.ts>36e5?(s.delete(b),null):c.backendUuid:null}(D.history);E&&l?.info?.("PPLX-WEB",`Session continue: ${E.slice(0,12)}...`);let F=function(a,b,c){if(b)return a.currentMsg;let d={},e=[];a.systemMsg.trim()&&e.push(a.systemMsg.trim());let f=function(a){if(!Array.isArray(a)||0===a.length)return"";let b=a.map(a=>{let b=a?.function||a||{},c=b.name||"unnamed",d=(b.description||"").split("\n")[0].slice(0,200);return`- ${c}: ${d}`});return`Available tools (reference only, cannot invoke):
153
- ${b.join("\n")}`}(c);f&&e.push(f),e.push("You have built-in web search. Answer questions directly using search results."),d.instructions=e,a.history.length>0&&(d.history=a.history),a.currentMsg?d.query=a.currentMsg:0===a.history.length&&(d.query="");let g=JSON.stringify(d);return g.length>96e3?g.slice(-96e3):g}(D,E,b?.tools);if(!F.trim())return{response:new Response(JSON.stringify({error:{message:"Empty query after processing",type:"invalid_request"}}),{status:400,headers:{"Content-Type":"application/json"}}),url:h,headers:{},transformedBody:b};let G=(m=r,n=w,B="u">typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:"UTC",{query_str:F,params:{query_str:F,search_focus:"internet",mode:m,model_preference:n,sources:["web"],attachments:[],frontend_uuid:crypto.randomUUID(),frontend_context_uuid:crypto.randomUUID(),version:i,language:"en-US",timezone:B,search_recency_filter:null,is_incognito:!0,use_schematized_api:!0,last_backend_uuid:E}}),H={"Content-Type":"application/json",Accept:"text/event-stream",Origin:"https://www.perplexity.ai",Referer:"https://www.perplexity.ai/","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36","X-App-ApiClient":"default","X-App-ApiVersion":i};d.accessToken?H.Authorization=`Bearer ${d.accessToken}`:d.apiKey&&(H.Cookie=`__Secure-next-auth.session-token=${d.apiKey}`),l?.info?.("PPLX-WEB",`Query to ${a} (pref=${w}, mode=${r}), len=${F.length}`);let I={method:"POST",headers:H,body:JSON.stringify(G)};e&&(I.signal=e);try{z=await fetch(h,I)}catch(a){return l?.error?.("PPLX-WEB",`Fetch failed: ${a.message||String(a)}`),{response:new Response(JSON.stringify({error:{message:`Perplexity connection failed: ${a.message||String(a)}`,type:"upstream_error"}}),{status:502,headers:{"Content-Type":"application/json"}}),url:h,headers:H,transformedBody:G}}if(!z.ok){let a=z.status,b=`Perplexity returned HTTP ${a}`;return 401===a||403===a?b="Perplexity auth failed — session cookie may be expired. Re-paste your __Secure-next-auth.session-token.":429===a&&(b="Perplexity rate limited. Wait a moment and retry."),l?.warn?.("PPLX-WEB",b),{response:new Response(JSON.stringify({error:{message:b,type:"upstream_error",code:`HTTP_${a}`}}),{status:a,headers:{"Content-Type":"application/json"}}),url:h,headers:H,transformedBody:G}}if(!z.body)return{response:new Response(JSON.stringify({error:{message:"Perplexity returned empty response body",type:"upstream_error"}}),{status:502,headers:{"Content-Type":"application/json"}}),url:h,headers:H,transformedBody:G};let J=`chatcmpl-pplx-${crypto.randomUUID().slice(0,12)}`,K=Math.floor(Date.now()/1e3);if(c){let b;A=new Response((o=z.body,p=D.history,q=D.currentMsg,b=new TextEncoder,new ReadableStream({async start(c){try{c.enqueue(b.encode((0,g.N)({id:J,object:"chat.completion.chunk",created:K,model:a,system_fingerprint:null,choices:[{index:0,delta:{role:"assistant"},finish_reason:null,logprobs:null}]})));let d="",h=null;for await(let f of x(o,e)){if(f.backendUuid&&(h=f.backendUuid),f.error){c.enqueue(b.encode((0,g.N)({id:J,object:"chat.completion.chunk",created:K,model:a,system_fingerprint:null,choices:[{index:0,delta:{content:`[Error: ${f.error}]`},finish_reason:null,logprobs:null}]})));break}if(f.thinking){c.enqueue(b.encode((0,g.N)({id:J,object:"chat.completion.chunk",created:K,model:a,system_fingerprint:null,choices:[{index:0,delta:{reasoning_content:f.thinking+"\n"},finish_reason:null,logprobs:null}]})));continue}if(f.done){d=f.answer||d;break}let e=f.delta||"";e&&(e=v(e,!1))&&c.enqueue(b.encode((0,g.N)({id:J,object:"chat.completion.chunk",created:K,model:a,system_fingerprint:null,choices:[{index:0,delta:{content:e},finish_reason:null,logprobs:null}]}))),f.answer&&(d=f.answer)}c.enqueue(b.encode((0,g.N)({id:J,object:"chat.completion.chunk",created:K,model:a,system_fingerprint:null,choices:[{index:0,delta:{},finish_reason:"stop",logprobs:null}]}))),c.enqueue(b.encode(f.$U)),u(p,q,v(d),h)}catch(d){c.enqueue(b.encode((0,g.N)({id:J,object:"chat.completion.chunk",created:K,model:a,system_fingerprint:null,choices:[{index:0,delta:{content:`[Stream error: ${d.message||String(d)}]`},finish_reason:"stop",logprobs:null}]}))),c.enqueue(b.encode(f.$U))}finally{c.close()}}})),{status:200,headers:{...f.uB}})}else A=await y(z.body,a,J,K,D.history,D.currentMsg,e);return{response:A,url:h,headers:H,transformedBody:G}}}},74264:(a,b,c)=>{c.d(b,{Z:()=>h});var d=c(62276);let e=[{match:a=>/^kimi-/i.test(a||""),scope:"toolCalls"},{match:a=>/deepseek/i.test(a||""),scope:"all"}],f="deepseek-v4-pro",g={[`${f}-max`]:{thinkingType:"enabled",reasoningEffort:"max"},[`${f}-none`]:{thinkingType:"disabled",reasoningEffort:null}};function h({provider:a,model:b,body:c}){let i=d.xq[a]?.reasoningInject,j=e.find(a=>a.match(b));var k=function({provider:a,model:b,body:c}){let d=g[b];if("deepseek"!==a||!d||!c)return c;let e={...c,model:f,extra_body:{...c.extra_body||{},thinking:{...c.extra_body?.thinking||{},type:d.thinkingType}}};return d.reasoningEffort?e.reasoning_effort=d.reasoningEffort:delete e.reasoning_effort,e}({provider:a,model:b,body:c}),l=i||j;if(!l||!k?.messages)return k;let m=k.messages.map(a=>!function(a,b){if(a?.role!=="assistant")return!1;let c=a.reasoning_content;return("string"!=typeof c||!(c.length>0))&&("toolCalls"!==b||Array.isArray(a.tool_calls)&&a.tool_calls.length>0)}(a,l.scope)?a:{...a,reasoning_content:" "});return{...k,messages:m}}},74508:(a,b,c)=>{c.d(b,{c:()=>e});let d=[{match:/claude-opus-4/i,drop:["temperature"]},{provider:"github",match:/gpt-5\.4/i,drop:["temperature"]},{provider:"github",match:a=>/claude/i.test(a)&&!/claude.*(opus|sonnet).*4\.6/i.test(a),drop:["thinking","reasoning_effort"]}];function e(a,b,c){if(!b||!c||"object"!=typeof c)return c;for(let e of d)if((!e.provider||e.provider===a)&&("function"==typeof e.match?e.match(b):e.match.test(b)))for(let a of e.drop)void 0!==c[a]&&delete c[a];return c}},75732:(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-----
154
- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA8iMH5c02LilrsERw9t6Pv5Nc
155
- 4k6Pz1EaDicBMpdpxKduSZu5OANqUq8er4GM95omAGIOPOh+Nx0spthYA2BqGz+l
156
- 6HRkPJ7S236FZz73In/KVuLnwI8JJ2CbuJap8kvheCCZpmAWpb/cPx/3Vr/J6I17
157
- XcW+ML9FoCI6AOvOzwIDAQAB
158
- -----END PUBLIC KEY-----`},83543:(a,b,c)=>{c.d(b,{L:()=>s});var d=c(24353),e=c(62276),f=c(48293),g=c(43528),h=c(27544),i=c(42506),j=c(37973),k=c(74264),l=c(74508);let m={combined:!0,header:"Authorization",scheme:"bearer"},n={combined:!0,header:"x-api-key",scheme:"raw"},o=Object.fromEntries(Object.entries(e.xq).filter(([,a])=>a.auth).map(([a,b])=>[a,b.auth]));function p(a,b,c){a[b.header]="bearer"===b.scheme?`Bearer ${c}`:c}let q={kimiHeaders:a=>Object.assign(a,(0,g.VK)()),clineHeaders:(a,b)=>Object.assign(a,(0,h.w$)(b.apiKey||b.accessToken)),kilocodeOrg:(a,b)=>{b.providerSpecificData?.orgId&&(a["X-Kilocode-OrganizationID"]=b.providerSpecificData.orgId)},claudeOverlay:a=>{let b=(0,i.b)();if(b){for(let c of Object.keys(b)){let d=c.replace(/(^|-)([a-z])/g,(a,b,c)=>b+c.toUpperCase());if("anthropic-beta"===c){let e=new Set((a[d]||a[c]||"").split(",").map(a=>a.trim()).filter(Boolean));for(let a of b[c].split(",").map(a=>a.trim()).filter(Boolean))e.add(a);b[c]=Array.from(e).join(",")}d!==c&&void 0!==a[d]&&delete a[d]}Object.assign(a,b)}}},r=Object.fromEntries(Object.entries(e.sr).filter(([,a])=>a.refresh).map(([a,b])=>{let c=b.tokenUrl,d=b.refresh.encoding,e=b.refresh.scope?{scope:b.refresh.scope}:{};return[a,{encoding:d,url:()=>c,params:c=>"gemini"===a?{client_id:c.config.clientId,client_secret:c.config.clientSecret,...e}:{client_id:b.clientId,...e}}]}));class s extends d.H{constructor(a){super(a,e.xq[a]||e.xq.openai)}transformRequest(a,b){let c=this.applyJsonSchemaFallback(b);return c&&"object"==typeof c&&(this.config.quirks?.dropClientMetadata&&delete c.client_metadata,(0,l.c)(this.provider,a,c)),(0,k.Z)({provider:this.provider,model:a,body:c})}applyJsonSchemaFallback(a){if(!this.provider?.startsWith?.("openai-compatible-"))return a;let b=a?.response_format;if(b?.type!=="json_schema"||!b.json_schema?.schema)return a;let c=JSON.stringify(b.json_schema.schema,null,2),d=`You must respond with valid JSON that strictly follows this JSON schema:
159
- \`\`\`json
160
- ${c}
161
- \`\`\`
162
- Respond ONLY with the JSON object, no other text.`,e=Array.isArray(a.messages)?a.messages.map(a=>({...a})):[],f=e.find(a=>"system"===a.role);return f?"string"==typeof f.content?f.content=`${f.content}
163
-
164
- ${d}`:Array.isArray(f.content)&&f.content.push({type:"text",text:`
165
-
166
- ${d}`}):e.unshift({role:"system",content:d}),{...a,messages:e,response_format:{type:"json_object"}}}buildUrl(a,b,c=0,d=null){if(this.provider?.startsWith?.("openai-compatible-")){let a=(d?.providerSpecificData?.baseUrl||f.Es).replace(/\/$/,""),b=this.provider.includes("responses")?"/responses":"/chat/completions";return`${a}${b}`}if(this.provider?.startsWith?.("anthropic-compatible-")){let a=(d?.providerSpecificData?.baseUrl||f.ky).replace(/\/$/,"");return`${a}/messages`}if("gemini"===this.config.format)return`${this.config.baseUrl}/${a}:${b?"streamGenerateContent?alt=sse":"generateContent"}`;if(this.config.urlSuffix)return`${this.config.baseUrl}${this.config.urlSuffix}`;let e=this.config.baseUrl;if(e?.includes("{accountId}")){let a=d?.providerSpecificData?.accountId;if(!a)throw Error(`${this.provider} requires accountId in providerSpecificData`);return e.replace("{accountId}",a)}return e}resolveAuthDescriptor(){return this.provider?.startsWith?.("anthropic-compatible-")?{apiKey:{header:"x-api-key",scheme:"raw"},oauth:{header:"Authorization",scheme:"bearer"},anthropicVersion:!0}:this.config?.format==="claude"?{...n,anthropicVersion:!0}:m}buildHeaders(a,b=!0){let c={"Content-Type":"application/json",...this.config.headers},d=o[this.provider]||this.resolveAuthDescriptor();for(let b of d.hooks||[])q[b]?.(c,a);if(!function(a,b,c){if(b.combined){p(a,b,c.apiKey||c.accessToken),b.anthropicVersion&&!a["anthropic-version"]&&(a["anthropic-version"]=f.b8);return}c.apiKey?p(a,b.apiKey,c.apiKey):c.accessToken&&p(a,b.oauth,c.accessToken),b.anthropicVersion&&!a["anthropic-version"]&&(a["anthropic-version"]=f.b8)}(c,d,a),this.provider?.startsWith?.("anthropic-compatible-")){let b=a?.providerSpecificData?.baseUrl||"";if(!(""===b||b.includes("api.anthropic.com"))){for(let b of(a.apiKey&&!c.Authorization&&(c.Authorization=`Bearer ${a.apiKey}`),delete c["anthropic-dangerous-direct-browser-access"],delete c["Anthropic-Dangerous-Direct-Browser-Access"],delete c["x-app"],delete c["X-App"],["anthropic-beta","Anthropic-Beta"]))if(c[b]){let a=c[b].split(",").map(a=>a.trim()).filter(a=>a&&"claude-code-20250219"!==a).join(",");a?c[b]=a:delete c[b]}}}return b&&(c.Accept="text/event-stream"),c}refreshFromGrant(a,b){let c=r[this.provider],d={grant_type:"refresh_token",refresh_token:a.refreshToken,...c.params(this)};return"json"===c.encoding?this.refreshWithJSON(c.url(),d,b):this.refreshWithForm(c.url(),d,b)}async refreshCredentials(a,b,c=null){if(!a.refreshToken)return null;let d={claude:()=>this.refreshFromGrant(a,c),codex:()=>this.refreshFromGrant(a,c),qwen:()=>this.refreshWithForm(g.NA.qwen.token,{grant_type:"refresh_token",refresh_token:a.refreshToken,client_id:e.xq.qwen.clientId},c),iflow:()=>this.refreshIflow(a.refreshToken,c),gemini:()=>this.refreshFromGrant(a,c),kiro:()=>this.refreshKiro(a.refreshToken,c),cline:()=>this.refreshCline(a.refreshToken,c),"kimi-coding":()=>this.refreshKimiCoding(a.refreshToken,c),kilocode:()=>this.refreshKilocode(a.refreshToken,c)}[this.provider];if(!d)return null;try{let a=await d();return a&&b?.info?.("TOKEN",`${this.provider} refreshed`),a}catch(a){return b?.error?.("TOKEN",`${this.provider} refresh error: ${a.message}`),null}}async refreshWithJSON(a,b,c=null){let d=await (0,j.proxyAwareFetch)(a,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(b)},c);if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,refreshToken:e.refresh_token||b.refresh_token,expiresIn:e.expires_in}}async refreshWithForm(a,b,c=null){let d=await (0,j.proxyAwareFetch)(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(b)},c);if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,refreshToken:e.refresh_token||b.refresh_token,expiresIn:e.expires_in}}async refreshIflow(a,b=null){let c=btoa(`${e.xq.iflow.clientId}:${e.xq.iflow.clientSecret}`),d=await (0,j.proxyAwareFetch)(g.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:e.xq.iflow.clientId,client_secret:e.xq.iflow.clientSecret})},b);if(!d.ok)return null;let f=await d.json();return{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}async refreshKiro(a,b=null){let c=await (0,j.proxyAwareFetch)(e.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a})},b);if(!c.ok)return null;let d=await c.json();return{accessToken:d.accessToken,refreshToken:d.refreshToken||a,expiresIn:d.expiresIn}}async refreshCline(a,b=null){let c=await (0,j.proxyAwareFetch)(e.xq.cline.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a,grantType:"refresh_token",clientType:"extension"})},b);if(!c.ok)return null;let d=await c.json(),f=d?.data||d,g=f?.expiresAt,h=g?Math.max(1,Math.floor((new Date(g).getTime()-Date.now())/1e3)):void 0;return{accessToken:f?.accessToken,refreshToken:f?.refreshToken||a,expiresIn:h}}async refreshKimiCoding(a,b=null){let c=(0,g.VK)(),d=await (0,j.proxyAwareFetch)(e.xq["kimi-coding"].refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...c},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:e.xq["kimi-coding"].clientId})},b);if(!d.ok)return null;let f=await d.json();return{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}async refreshKilocode(a,b=null){return null}}},83628:(a,b,c)=>{c.d(b,{H:()=>j});var d=c(24353),e=c(62276),f=c(74264),g=c(48293);let h=new Set(["minimax-m2.5","minimax-m2.7"]),i="https://opencode.ai/zen/go/v1";class j extends d.H{constructor(){super("opencode-go",e.xq["opencode-go"])}buildUrl(a){return this._lastModel=a,h.has(a)?`${i}/messages`:`${i}/chat/completions`}buildHeaders(a,b=!0){let c=a?.apiKey||a?.accessToken,d={"Content-Type":"application/json"};return h.has(this._lastModel)?(d["x-api-key"]=c,d["anthropic-version"]=g.b8):d.Authorization=`Bearer ${c}`,b&&(d.Accept="text/event-stream"),d}transformRequest(a,b){return(0,f.Z)({provider:this.provider,model:a,body:b})}}},84868:(a,b,c)=>{c.d(b,{V:()=>g});var d=c(24353),e=c(62276),f=c(43528);class g extends d.H{constructor(){super("gemini-cli",e.xq["gemini-cli"])}buildUrl(a,b,c=0){return`${this.config.baseUrl}:${b?"streamGenerateContent?alt=sse":"generateContent"}`}buildHeaders(a,b=!0){return{"Content-Type":"application/json",Authorization:`Bearer ${a.accessToken}`,"User-Agent":(0,f.sX)(this._currentModel),"X-Goog-Api-Client":f.go,Accept:b?"text/event-stream":"application/json"}}transformRequest(a,b,c,d){return(this._currentModel=a,b&&b.request&&b.model)?b:{project:d?.projectId||b?.project,model:a,request:b}}parseError(a,b){let c=super.parseError(a,b);if(429!==a.status||!b)return c;try{let a=JSON.parse(b),d=a?.error?.details;if(Array.isArray(d)){for(let a of d)if(a?.["@type"]==="type.googleapis.com/google.rpc.RetryInfo"&&a?.retryDelay){c.retryAfter=a.retryDelay;break}}}catch{}return c}async refreshCredentials(a,b){if(!a.refreshToken)return null;try{let c=await fetch(f.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a.refreshToken,client_id:this.config.clientId,client_secret:this.config.clientSecret})});if(!c.ok)return null;let d=await c.json();return b?.info?.("TOKEN","Gemini CLI refreshed"),{accessToken:d.access_token,refreshToken:d.refresh_token||a.refreshToken,expiresIn:d.expires_in,projectId:a.projectId}}catch(a){return b?.error?.("TOKEN",`Gemini CLI refresh error: ${a.message}`),null}}}},86758:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{o:()=>w});var e=c(24353),f=c(62276),g=c(23016),h=c(48788),i=c(31440),j=c(68735),k=c(63483),l=c(4436),m=c(56790),n=c(37973),o=c(74075),p=c.n(o);let a=null;if(!("u">typeof caches&&"object"==typeof caches||"u">typeof EdgeRuntime))try{a=await Promise.resolve().then(c.t.bind(c,73496,23))}catch{}let u="1"===process.env.CURSOR_STREAM_DEBUG,v=(...a)=>{u&&console.log(...a)};function q(a){let b=String(a||"").split("/").pop();return/^composer(?:-|$)/i.test(b)}function r(a){if(!a)return"";let b="</think>",c=a.lastIndexOf(b);return c<0?"":a.slice(c+b.length).trimStart()}function s(a,b,c,d){if(b+5>a.length)return v(`[CURSOR BUFFER${d}] Reached end, offset=${b}, remaining=${a.length-b}`),{status:"done"};let e=a[b],f=a.readUInt32BE(b+1);if(v(`[CURSOR BUFFER${d}] Frame ${c+1}: flags=0x${e.toString(16).padStart(2,"0")}, length=${f}`),b+5+f>a.length)return v(`[CURSOR BUFFER${d}] Incomplete frame, offset=${b}, length=${f}, buffer.length=${a.length}`),{status:"done"};let g=a.slice(b+5,b+5+f),h=b+5+f;return(g=function(a,b){if(a.length>10&&123===a[0]&&34===a[1])try{if(a.toString("utf-8").startsWith('{"error"'))return v("[DECOMPRESS] Detected JSON error, skipping decompression"),a}catch{}if(1===b||2===b||3===b)try{return p().gunzipSync(a)}catch(c){try{return p().inflateSync(a)}catch(d){try{return p().inflateRawSync(a)}catch(e){v(`[DECOMPRESS ERROR] flags=${b}, payloadSize=${a.length}, gzip=${c.message}, deflate=${d.message}, raw=${e.message}`),v("[DECOMPRESS ERROR] First 50 bytes (hex):",a.slice(0,50).toString("hex"))}}}return a}(g,e))?{status:"ok",payload:g,offset:h}:(v(`[CURSOR BUFFER${d}] Frame ${c+1}: decompression failed, skipping`),{status:"skip",offset:h})}function t(a){let b=a?.error?.details?.[0]?.debug?.details?.title||a?.error?.details?.[0]?.debug?.details?.detail||a?.error?.message||"API Error",c=a?.error?.code==="resource_exhausted";return new Response(JSON.stringify({error:{message:b,type:c?"rate_limit_error":"api_error",code:a?.error?.details?.[0]?.debug?.error||"unknown"}}),{status:c?g.gx.RATE_LIMITED:g.gx.BAD_REQUEST,headers:{"Content-Type":"application/json"}})}class w extends e.H{constructor(){super("cursor",f.xq.cursor)}buildUrl(){return`${this.config.baseUrl}${this.config.chatPath}`}buildHeaders(a){let b=a.accessToken,c=a.providerSpecificData?.machineId,d=a.providerSpecificData?.ghostMode!==!1;if(!c)throw Error("Machine ID is required for Cursor API");return(0,i.JA)(b,c,d)}transformRequest(a,b,c,d){let e=b.messages||[],f=b.tools||[],g=b.reasoning_effort||null,i=d?.rawHeaders?.["user-agent"]||"",j=i.includes("claude-cli")||i.includes("claude-code")||i.includes("Claude Code");return(0,h.yI)(e,a,f,g,j)}async makeFetchRequest(a,b,c,d,e=null){let f=await (0,n.proxyAwareFetch)(a,{method:"POST",headers:b,body:c,signal:d},e);return{status:f.status,headers:Object.fromEntries(f.headers.entries()),body:Buffer.from(await f.arrayBuffer())}}makeHttp2Request(b,c,d,e){if(!a)throw Error("http2 module not available");return new Promise((f,g)=>{let h=new URL(b),i=a.connect(`https://${h.host}`),j=[],k={},l=!1,m=a=>(...b)=>{l||(l=!0,clearTimeout(n),i.close(),a(...b))},n=setTimeout(m(()=>{g(Error("HTTP/2 request timed out"))}),6e4);i.on("error",m(g));let o=i.request({":method":"POST",":path":h.pathname,":authority":h.host,":scheme":"https",...c});if(o.on("response",a=>{k=a}),o.on("data",a=>{j.push(a)}),o.on("end",m(()=>{f({status:k[":status"],headers:k,body:Buffer.concat(j)})})),o.on("error",m(g)),e){let a=m(()=>g(Error("Request aborted")));e.addEventListener("abort",a,{once:!0})}o.write(d),o.end()})}async execute({model:b,body:c,stream:d,credentials:e,signal:f,log:h,proxyOptions:i=null}){let j=this.buildUrl(),k=this.buildHeaders(e),l=this.transformRequest(b,c,d,e);try{let e=i?.enabled===!0||i?.connectionProxyEnabled===!0||!!i?.vercelRelayUrl,g=a&&!e?await this.makeHttp2Request(j,k,l,f):await this.makeFetchRequest(j,k,l,f,i);if(200!==g.status){let a=g.body?.toString()||"Unknown error";return{response:new Response(JSON.stringify({error:{message:`[${g.status}]: ${a}`,type:"invalid_request_error",code:""}}),{status:g.status,headers:{"Content-Type":"application/json"}}),url:j,headers:k,transformedBody:c}}return{response:!1!==d?this.transformProtobufToSSE(g.body,b,c):this.transformProtobufToJSON(g.body,b,c),url:j,headers:k,transformedBody:c}}catch(a){return{response:new Response(JSON.stringify({error:{message:a.message,type:"connection_error",code:""}}),{status:g.gx.SERVER_ERROR,headers:{"Content-Type":"application/json"}}),url:j,headers:k,transformedBody:c}}}transformProtobufToJSON(a,b,c){let d=`chatcmpl-cursor-${Date.now()}`,e=Math.floor(Date.now()/1e3),f=0,i="",k="",l=[],n=new Map,o=new Set,p=0;for(v(`[CURSOR BUFFER] Total length: ${a.length} bytes`);f<a.length;){let b=s(a,f,p,"");if("done"===b.status)break;if(f=b.offset,p++,"skip"===b.status)continue;let c=b.payload;if(c.length>0&&123===c[0])try{let a=c.toString("utf-8");if(a.includes('"error"')){let b=i||n.size>0;if(v(`[CURSOR BUFFER] Error frame (hasContent=${b}): ${a.slice(0,500)}`),b)break;return t(JSON.parse(a))}}catch{}let d=(0,h.CP)(new Uint8Array(c));if(v(`[CURSOR DECODED] Frame ${p}:`,d),d.error){let a=i||n.size>0;if(v(`[CURSOR BUFFER] Decoded error (hasContent=${a}): ${d.error}`),a)break;return new Response(JSON.stringify({error:{message:d.error,type:"rate_limit_error",code:"rate_limited"}}),{status:g.gx.RATE_LIMITED,headers:{"Content-Type":"application/json"}})}if(d.toolCall){let a=d.toolCall;if(n.has(a.id)){let b=n.get(a.id);b.function.arguments+=a.function.arguments,b.isLast=a.isLast}else n.set(a.id,{...a});if(a.isLast){let b=n.get(a.id);o.add(a.id),l.push({id:b.id,type:b.type,function:{name:b.function.name,arguments:b.function.arguments}})}}d.text&&(i+=d.text),d.thinking&&(k+=d.thinking)}let u=q(b)?r(k):"",w=i||u;for(let[a,b]of(v(`[CURSOR BUFFER] Parsed ${p} frames, toolCallsMap size: ${n.size}, finalized toolCalls: ${l.length}`),n.entries()))o.has(a)||(v(`[CURSOR BUFFER] Finalizing incomplete tool call: ${a}, isLast=${b.isLast}`),l.push({id:b.id,type:b.type,function:{name:b.function.name,arguments:b.function.arguments}}));v(`[CURSOR BUFFER] Final toolCalls count: ${l.length}`);let x={role:"assistant",content:w||null};l.length>0&&(x.tool_calls=l);let y=(0,j.OF)(c,w.length,m.h.OPENAI),z={id:d,object:"chat.completion",created:e,model:b,choices:[{index:0,message:x,finish_reason:l.length>0?"tool_calls":"stop"}],usage:y};return new Response(JSON.stringify(z),{status:200,headers:{"Content-Type":"application/json"}})}transformProtobufToSSE(a,b,c){let d=`chatcmpl-cursor-${Date.now()}`,e=Math.floor(Date.now()/1e3),f=[],i=0,n="",o="",p=0,u=[],w=new Map,x=new Set,y=new Set,z=0;for(v(`[CURSOR BUFFER SSE] Total length: ${a.length} bytes`);i<a.length;){let c=s(a,i,z," SSE");if("done"===c.status)break;if(i=c.offset,z++,"skip"===c.status)continue;let j=c.payload;if(123===j[0])try{let a=j.toString("utf-8");if(a.includes('"error"')){let b=f.length>0||n||w.size>0;if(v(`[CURSOR BUFFER SSE] Error frame (hasContent=${b}): ${a.slice(0,500)}`),b)break;return t(JSON.parse(a))}}catch{}let k=(0,h.CP)(new Uint8Array(j));if(v(`[CURSOR DECODED SSE] Frame ${z}:`,k),k.error){let a=f.length>0||n||w.size>0;if(v(`[CURSOR BUFFER SSE] Decoded error (hasContent=${a}): ${k.error}`),a)break;return new Response(JSON.stringify({error:{message:k.error,type:"rate_limit_error",code:"rate_limited"}}),{status:g.gx.RATE_LIMITED,headers:{"Content-Type":"application/json"}})}if(k.toolCall){let a=k.toolCall;if(0===f.length&&f.push((0,l.z)({id:d,created:e,model:b,delta:{role:"assistant",content:""}})),w.has(a.id)){let c=w.get(a.id);c.function.arguments.length,c.function.arguments+=a.function.arguments,c.isLast=a.isLast,a.function.arguments&&(y.add(a.id),f.push((0,l.z)({id:d,created:e,model:b,delta:{tool_calls:[{index:c.index,id:a.id,type:"function",function:{name:a.function.name,arguments:a.function.arguments}}]}})))}else{let c=u.length;x.add(a.id),u.push({...a,index:c}),w.set(a.id,{...a,index:c}),y.add(a.id),f.push((0,l.z)({id:d,created:e,model:b,delta:{tool_calls:[{index:c,id:a.id,type:"function",function:{name:a.function.name,arguments:a.function.arguments}}]}}))}}if(k.text&&(n+=k.text,f.push((0,l.z)({id:d,created:e,model:b,delta:0===f.length&&0===u.length?{role:"assistant",content:k.text}:{content:k.text}}))),q(b)&&k.thinking){o+=k.thinking;let a=r(o);if(a.length>p){let c=a.slice(p);p=a.length,n+=c,f.push((0,l.z)({id:d,created:e,model:b,delta:0===f.length&&0===u.length?{role:"assistant",content:c}:{content:c}}))}}}for(let[a,c]of(v(`[CURSOR BUFFER SSE] Parsed ${z} frames, toolCallsMap size: ${w.size}, toolCalls array: ${u.length}`),w.entries()))if(!x.has(a)){v(`[CURSOR BUFFER SSE] Finalizing incomplete tool call: ${a}, isLast=${c.isLast}`);let g=u.length;u.push({id:c.id,type:c.type,index:g,function:{name:c.function.name,arguments:c.function.arguments}}),y.has(c.id)||f.push((0,l.z)({id:d,created:e,model:b,delta:{tool_calls:[{index:g,id:c.id,type:"function",function:{name:c.function.name,arguments:c.function.arguments}}]}}))}0===f.length&&0===u.length&&f.push((0,l.z)({id:d,created:e,model:b,delta:{role:"assistant",content:""}}));let A=(0,j.OF)(c,n.length,m.h.OPENAI);return f.push(`data: ${JSON.stringify({id:d,object:"chat.completion.chunk",created:e,model:b,choices:[{index:0,delta:{},finish_reason:u.length>0?"tool_calls":"stop"}],usage:A})}
167
-
168
- `),f.push(k.$U),new Response(f.join(""),{status:200,headers:{...k.pb}})}async refreshCredentials(){return null}}d()}catch(a){d(a)}},1)},87767:(a,b,c)=>{c.d(b,{R:()=>i});var d=c(83543),e=c(62276),f=c(43528);let g="QwenCode/0.12.3 (linux; x64)",h={role:"system",content:[{type:"text",text:"",cache_control:{type:"ephemeral"}}]};class i extends d.L{constructor(){super("qwen")}buildUrl(a,b,c=0,d=null){let e=d?.providerSpecificData?.resourceUrl,f=e?e.replace(/^https?:\/\//,"").replace(/\/$/,""):"portal.qwen.ai";return`https://${f}/v1/chat/completions`}buildHeaders(a,b=!0){return function(a,b=!0){let c=a?.apiKey||a?.accessToken||"",d={"Content-Type":"application/json",Authorization:`Bearer ${c}`,"User-Agent":g,"X-DashScope-AuthType":"qwen-oauth","X-DashScope-CacheControl":"enable","X-DashScope-UserAgent":g,"X-Stainless-Arch":"x64","X-Stainless-Lang":"js","X-Stainless-Os":"Linux","X-Stainless-Package-Version":"5.11.0","X-Stainless-Retry-Count":"1","X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":"v18.19.1",Connection:"keep-alive","Accept-Language":"*","Sec-Fetch-Mode":"cors"};return d.Accept=b?"text/event-stream":"application/json",d}(a,b)}transformRequest(a,b,c,d){let e=b&&"object"==typeof b?{...b}:b;c&&e?.messages&&!e.stream_options&&!e.thinking&&!e.enable_thinking&&!1!==e.stream&&(e.stream_options={include_usage:!0});var f=e=function(a){let b;if(!0!==(b=a?.thinking)&&a?.enable_thinking!==!0&&("object"!=typeof b||null===b||Array.isArray(b)||"enabled"!==b.type))return a;let c=a.tool_choice;return"required"!==c&&("object"!=typeof c||null===c)?a:{...a,tool_choice:"auto"}}(e);if(!f||"object"!=typeof f)return f;let g={...f};return Array.isArray(g.messages)?g.messages=[h,...g.messages]:g.messages=[h],g}async refreshCredentials(a,b){if(!a?.refreshToken)return null;try{let c=await fetch(f.NA.qwen.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a.refreshToken,client_id:e.xq.qwen.clientId})});if(!c.ok)return null;let d=await c.json();return b?.info?.("TOKEN","qwen refreshed"),{accessToken:d.access_token,refreshToken:d.refresh_token||a.refreshToken,expiresIn:d.expires_in,providerSpecificData:{...a.providerSpecificData||{},...d.resource_url?{resourceUrl:d.resource_url}:{}}}}catch(a){return b?.error?.("TOKEN",`qwen refresh error: ${a.message}`),null}}}},92930:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(55511),e=c(24353),f=c(62276),g=c(80319),h=c(63483);class i extends e.H{constructor(){super("commandcode",f.xq.commandcode)}transformRequest(a,b,c,d){return b.stream=!0,b}buildHeaders(a,b=!0){let c={"Content-Type":"application/json",...this.config.headers||{},"x-session-id":(0,d.randomUUID)()},e=a?.apiKey||a?.accessToken;return e&&(c.Authorization=`Bearer ${e}`),b&&(c.Accept="text/event-stream"),c}async execute(a){var b,c;let d,e,f,i,j,k,l=await super.execute(a);return l?.response?.ok&&l.response.body&&(b=l.response,c=a.model,d=new TextDecoder,e=new TextEncoder,f="",i={model:c},j=(a,b)=>{if(a)for(let c of Array.isArray(a)?a:[a])null!=c&&b.enqueue(e.encode(`data: ${JSON.stringify(c)}
169
-
170
- `))},k=new TransformStream({transform(a,b){let c=(f+=d.decode(a,{stream:!0})).split("\n");for(let a of(f=c.pop()||"",c)){let c=a.trim();c&&j((0,g.H)(c,i),b)}},flush(a){let b=f.trim();b&&j((0,g.H)(b,i),a),a.enqueue(e.encode(h.$U))}}),l.response=new Response(b.body.pipeThrough(k),{status:b.status,statusText:b.statusText,headers:b.headers})),l}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=8474,exports.ids=[2371,4378,8474],exports.modules={18474:(a,b,c)=>{c.d(b,{P:()=>h});var d=c(37770),e=c(89489),f=c(99119);async function g(){let a=null;try{let b=await (0,d.PX)();a=b.find(a=>!1!==a.isActive)?.key||null}catch{}let b={"Content-Type":"application/json"};return a&&(b.Authorization=`Bearer ${a}`),b["x-9r-cli-token"]=await (0,f.Xj)("9r-cli-auth"),b}async function h(a,b,c=`http://127.0.0.1:${process.env.PORT||e.h0.appPort}`){let d=await g(),f=Date.now();if("embedding"===b){let b=await fetch(`${c}/api/v1/embeddings`,{method:"POST",headers:d,body:JSON.stringify({model:a,input:"test"}),signal:AbortSignal.timeout(15e3)}),e=Date.now()-f,g=await b.text().catch(()=>""),h=null;try{h=g?JSON.parse(g):null}catch{}if(!b.ok){let a=h?.error?.message||h?.error||g;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(h?.data)&&h.data.length>0&&Array.isArray(h.data[0]?.embedding)?{ok:!0,latencyMs:e,error:null,status:b.status}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no embedding data"}}if("image"===b){let b=await fetch(`${c}/api/v1/images/generations`,{method:"POST",headers:d,body:JSON.stringify({model:a,prompt:"test"}),signal:AbortSignal.timeout(15e3)}),e=Date.now()-f,g=await b.text().catch(()=>""),h=null;try{h=g?JSON.parse(g):null}catch{}if(!b.ok){let a=h?.error?.message||h?.msg||h?.message||h?.error||g;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(h?.data)&&h.data.length>0?{ok:!0,latencyMs:e,error:null,status:b.status}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no image data for this model"}}if("stt"===b){let b,e,g,h,i=new FormData,j=(g=new DataView(e=new ArrayBuffer(44+(b=2*Math.max(1,Math.floor(4e3))))),(h=(a,b)=>{for(let c=0;c<b.length;c+=1)g.setUint8(a+c,b.charCodeAt(c))})(0,"RIFF"),g.setUint32(4,36+b,!0),h(8,"WAVE"),h(12,"fmt "),g.setUint32(16,16,!0),g.setUint16(20,1,!0),g.setUint16(22,1,!0),g.setUint32(24,16e3,!0),g.setUint32(28,32e3,!0),g.setUint16(32,2,!0),g.setUint16(34,16,!0),h(36,"data"),g.setUint32(40,b,!0),new Blob([e],{type:"audio/wav"}));i.append("file",j,"test.wav"),i.append("model",a);let k=await fetch(`${c}/api/v1/audio/transcriptions`,{method:"POST",headers:Object.fromEntries(Object.entries(d).filter(([a])=>"content-type"!==a.toLowerCase())),body:i,signal:AbortSignal.timeout(15e3)}),l=Date.now()-f,m=await k.text().catch(()=>""),n=null;try{n=m?JSON.parse(m):null}catch{}if(!k.ok){let a=n?.error?.message||n?.msg||n?.message||n?.error||m;return{ok:!1,latencyMs:l,error:`HTTP ${k.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:k.status}}return("string"==typeof n?.text?n.text:"").trim()?{ok:!0,latencyMs:l,error:null,status:k.status}:{ok:!1,latencyMs:l,status:k.status,error:"Provider returned no transcription text for this model"}}let i=await fetch(`${c}/api/v1/chat/completions`,{method:"POST",headers:d,body:JSON.stringify({model:a,max_tokens:1,stream:!1,messages:[{role:"user",content:"hi"}]}),signal:AbortSignal.timeout(15e3)}),j=Date.now()-f,k=await i.text().catch(()=>""),l=null;try{l=k?JSON.parse(k):null}catch{}if(!i.ok){let a=l?.error?.message||l?.msg||l?.message||l?.error||k;return{ok:!1,latencyMs:j,error:`HTTP ${i.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:i.status}}let m=l?.status,n=l?.msg||l?.message;if(null!=m&&"200"!==String(m)&&"0"!==String(m)&&n)return{ok:!1,latencyMs:j,status:i.status,error:`Provider status ${m}: ${String(n).slice(0,240)}`};if(l?.error){let a=l?.error?.message||l?.error||"Provider returned an error";return{ok:!1,latencyMs:j,status:i.status,error:String(a).slice(0,240)}}return Array.isArray(l?.choices)&&l.choices.length>0?{ok:!0,latencyMs:j,error:null,status:i.status}:{ok:!1,latencyMs:j,status:i.status,error:"Provider returned no completion choices for this model"}}},22371:(a,b,c)=>{c.d(b,{Xg:()=>o,PROVIDER_MODELS:()=>f.vq,fZ:()=>j,cY:()=>p,ux:()=>k,OA:()=>l,kt:()=>m,SM:()=>i});var d=c(62276),e=c(49022),f=c(12466),g=c(57636);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);return d?.upstreamModelId?d.upstreamModelId:"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,b){return(0,g.g5)(f.vq[a]?.find(a=>a.id===b))}},24378:(a,b,c)=>{c.d(b,{AI_PROVIDERS:()=>s,js:()=>w,DI:()=>n,fg:()=>k,Pd:()=>o,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>y,wb:()=>x,br:()=>l,wG:()=>v,zt:()=>t,gb:()=>q,gC:()=>r,mq:()=>p,rs:()=>u});var d=c(49022);let e="⚠️ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.A.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.A.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.authModes?{authModes:a.authModes}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-";function p(a){return"string"==typeof a&&a.startsWith(m)}function q(a){return"string"==typeof a&&a.startsWith(n)}function r(a){return"string"==typeof a&&a.startsWith(o)}let s={...h,...i,...j,...k,...l};function t(a){for(let b of Object.values(s))if(b.alias===a||b.id===a)return b;return null}function u(a){let b=t(a);return b?.id||a}function v(a){let b=s[a];return b?.alias||a}let w=Object.values(s).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(s).reduce((a,b)=>(a[b.id]=b.alias,a),{});let x=d.A.filter(a=>a.features?.usage).map(a=>a.id),y=d.A.filter(a=>a.features?.usageApikey).map(a=>a.id)},24709:(a,b,c)=>{c.d(b,{CP:()=>f,Xg:()=>d.Xg,eh:()=>e,vq:()=>d.PROVIDER_MODELS});var d=c(22371);Object.entries(c(24378).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b},37770:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(19886)},39006:a=>{a.exports={rE:"0.5.2"}},62276:(a,b,c)=>{c.d(b,{Ak:()=>e,Yg:()=>h,sr:()=>d.sr,xq:()=>d.xq});var d=c(12466);function e(a){return(a?.providerSpecificData?.baseUrl?.trim()||"http://localhost:11434").replace(/\/$/,"")}let f=d.xq["xiaomi-tokenplan"]?.regions||{},g=d.xq["xiaomi-tokenplan"]?.defaultRegion;function h(a){return f[a?.providerSpecificData?.region]||f[g]}},89489:(a,b,c)=>{c.d(b,{AA:()=>i,UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g});var d=c(39006),e=c(24378),f=c(24709);d.rE;let g={npmPackageName:"9router",installCmd:"npm i -g 9router",installCmdLatest:"npm i -g 9router@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20128},h={maxLines:200,pollIntervalMs:1e3},i={settingsKey:"claudeAutoPing",tickIntervalMs:6e4,pingLeadMs:5e3,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1,refreshAheadMs:3e5,fiveHourKey:"session (5h)"}},99119:(a,b,c)=>{c.d(b,{Xj:()=>q});var d=c(20243),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(81372);let l=h().join(k.n,"machine-id"),m=h().join(k.n,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.n,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="9r-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=8515,exports.ids=[8515],exports.modules={22371:(a,b,c)=>{c.d(b,{Xg:()=>o,PROVIDER_MODELS:()=>f.vq,fZ:()=>j,cY:()=>p,ux:()=>k,OA:()=>l,kt:()=>m,SM:()=>i});var d=c(62276),e=c(49022),f=c(12466),g=c(57636);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);return d?.upstreamModelId?d.upstreamModelId:"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,b){return(0,g.g5)(f.vq[a]?.find(a=>a.id===b))}},24709:(a,b,c)=>{c.d(b,{CP:()=>f,Xg:()=>d.Xg,eh:()=>e,vq:()=>d.PROVIDER_MODELS});var d=c(22371);Object.entries(c(24378).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b},55103:(a,b,c)=>{a.exports=c(44870)},60475:(a,b,c)=>{c.d(b,{oF:()=>d.oF,tm:()=>d.tm,vF:()=>d.vF});var d=c(19886)},61250:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>r,OPTIONS:()=>q,buildModelsList:()=>p});var d=c(24709),e=c(24378),f=c(37770),g=c(60475),h=c(66419),i=c(32917);let j={kiro:async a=>{let b=await (0,h.cW)({accessToken:a.accessToken,refreshToken:a.refreshToken,providerSpecificData:a.providerSpecificData||{}},{log:console});return b?.models?.length?{models:b.models}:null},qoder:async a=>{let b=await (0,i.EV)({accessToken:a.accessToken,refreshToken:a.refreshToken,email:a.email,displayName:a.displayName,providerSpecificData:a.providerSpecificData||{}});return b?.models?.length?{models:b.models.map(a=>({id:a.id,name:a.name}))}:null}},k=/[-_][0-9a-f]{8,}$/i,l={image:"image",tts:"tts",embedding:"embedding",stt:"stt",imageToText:"imageToText"};function m(a){let b=a?.kind||a?.type;return b&&l[b]||"llm"}async function n(a){if(!a?.apiKey)return[];let b="string"==typeof a?.providerSpecificData?.baseUrl?a.providerSpecificData.baseUrl.trim().replace(/\/$/,""):"";if(!b)return[];let c=`${b}/models`,d={"Content-Type":"application/json"};if((0,e.mq)(a.provider))d.Authorization=`Bearer ${a.apiKey}`;else{if(!(0,e.gb)(a.provider))return[];c.endsWith("/messages/models")?c=c.slice(0,-9):c.endsWith("/messages")&&(c=`${c.slice(0,-9)}/models`),d["x-api-key"]=a.apiKey,d["anthropic-version"]="2023-06-01",d.Authorization=`Bearer ${a.apiKey}`}try{var f;let a=new AbortController,b=setTimeout(()=>a.abort(),5e3),e=await fetch(c,{method:"GET",headers:d,cache:"no-store",signal:a.signal});if(clearTimeout(b),!e.ok)return[];let g=(f=await e.json(),Array.isArray(f)?f:f?.data||f?.models||f?.results||[]);return Array.from(new Set(g.map(a=>a?.id||a?.name||a?.model).filter(a=>"string"==typeof a&&""!==a.trim())))}catch{return[]}}function o(a,b){let c=e.AI_PROVIDERS[a],d=Array.isArray(c?.serviceKinds)&&c.serviceKinds.length>0?c.serviceKinds:["llm"];return b.some(a=>d.includes(a))}async function p(a){let b=[];try{b=(b=await (0,f.getProviderConnections)()).filter(a=>!1!==a.isActive)}catch(a){console.log("Could not fetch providers, returning all models")}let c=[];try{c=await (0,f.Uv)()}catch(a){console.log("Could not fetch combos")}let h=[];try{h=await (0,f.uv)()}catch(a){console.log("Could not fetch custom models")}let i={};try{i=await (0,f.OM)()}catch(a){console.log("Could not fetch model aliases")}let l={};try{l=await (0,g.vF)()}catch(a){console.log("Could not fetch disabled models")}let p=(a,b)=>Array.isArray(l[a])&&l[a].includes(b),q=new Map;for(let a of b)q.has(a.provider)||q.set(a.provider,a);let r=[];for(let b of c){if(!function(a,b){let c=a?.kind||"llm";return b.includes(c)}(b,a))continue;let c={id:b.name,object:"model",owned_by:"combo"};("webSearch"===b.kind||"webFetch"===b.kind)&&(c.kind=b.kind),r.push(c)}if(0===b.length){let b=Object.fromEntries(Object.entries(d.Xg).map(([a,b])=>[b,a]));for(let[c,e]of Object.entries(d.vq))if(o(b[c]||c,a))for(let b of e)a.includes(m(b))&&(p(c,b.id)||r.push({id:`${c}/${b.id}`,object:"model",owned_by:c}));for(let b of h){if(!b?.id||b.type&&"llm"!==b.type||!a.includes("llm"))continue;let c=b.providerAlias;if(!c)continue;let d=String(b.id).trim();d&&r.push({id:`${c}/${d}`,object:"model",owned_by:c})}}else for(let[b,c]of q.entries()){if(!o(b,a))continue;let f=d.Xg[b]||b,g=(c?.providerSpecificData?.prefix||(0,e.wG)(b)||f).trim(),l=d.vq[f]||[],q=c?.providerSpecificData?.enabledModels,s=Array.isArray(q)&&q.length>0,t=(0,e.mq)(b)||(0,e.gb)(b),u=new Map(l.map(a=>[a.id,m(a)])),v=s?Array.from(new Set(q.filter(a=>"string"==typeof a&&""!==a.trim()))):l.map(a=>a.id);t&&0===v.length&&!k.test(b)&&(v=await n(c));let w=j[b];if(w&&!s)try{let a=await w(c);a?.models?.length&&(v=a.models.map(a=>a.id))}catch(a){console.log(`Live model fetch failed for ${b}: ${a?.message||a}`)}for(let c of Array.from(new Set([...v.map(a=>a.startsWith(`${g}/`)?a.slice(g.length+1):a.startsWith(`${f}/`)?a.slice(f.length+1):a.startsWith(`${b}/`)?a.slice(b.length+1):a).filter(a=>"string"==typeof a&&""!==a.trim()),...h.filter(a=>{if(!a?.id||(0,d.CP)(a)&&"llm"!==(0,d.CP)(a))return!1;let c=a.providerAlias;return c===f||c===g||c===b}).map(a=>String(a.id).trim()).filter(a=>""!==a),...Object.values(i||{}).filter(a=>"string"==typeof a&&!!a.includes("/")&&(a.startsWith(`${g}/`)||a.startsWith(`${f}/`)||a.startsWith(`${b}/`))).map(a=>a.startsWith(`${g}/`)?a.slice(g.length+1):a.startsWith(`${f}/`)?a.slice(f.length+1):a.startsWith(`${b}/`)?a.slice(b.length+1):a).filter(a=>"string"==typeof a&&""!==a.trim())]))){let b=u.get(c)||function(a){let b=String(a).toLowerCase();return/embed/.test(b)?"embedding":/tts|speech|audio|voice/.test(b)?"tts":/image|imagen|dall-?e|flux|sdxl|sd-|stable-diffusion/.test(b)?"image":"llm"}(c);a.includes(b)&&(p(g,c)||p(f,c)||r.push({id:`${g}/${c}`,object:"model",owned_by:g}))}let x=e.AI_PROVIDERS[b];a.includes("webSearch")&&x?.searchConfig&&r.push({id:`${g}/search`,object:"model",kind:"webSearch",owned_by:g}),a.includes("webFetch")&&x?.fetchConfig&&r.push({id:`${g}/fetch`,object:"model",kind:"webFetch",owned_by:g})}let s=[],t=new Set;for(let a of r)!a?.id||t.has(a.id)||(t.add(a.id),s.push(a));return s}async function q(){return new Response(null,{headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, OPTIONS","Access-Control-Allow-Headers":"*"}})}async function r(){try{let a=await p(["llm"]);return Response.json({object:"list",data:a},{headers:{"Access-Control-Allow-Origin":"*"}})}catch(a){return console.log("Error fetching models:",a),Response.json({error:{message:a.message,type:"server_error"}},{status:500})}}},99218:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71330),e=c(90711),f=c(43448);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=8539,exports.ids=[8539],exports.modules={3455:(a,b,c)=>{c.d(b,{Ay:()=>j});var d=c(77598);let e=function(a){return Array.isArray(a)?a=Buffer.from(a):"string"==typeof a&&(a=Buffer.from(a,"utf8")),(0,d.createHash)("sha1").update(a).digest()},f=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,g=function(a){let b;if(!("string"==typeof a&&f.test(a)))throw TypeError("Invalid UUID");return Uint8Array.of((b=parseInt(a.slice(0,8),16))>>>24,b>>>16&255,b>>>8&255,255&b,(b=parseInt(a.slice(9,13),16))>>>8,255&b,(b=parseInt(a.slice(14,18),16))>>>8,255&b,(b=parseInt(a.slice(19,23),16))>>>8,255&b,(b=parseInt(a.slice(24,36),16))/0x10000000000&255,b/0x100000000&255,b>>>24&255,b>>>16&255,b>>>8&255,255&b)};var h=c(7468);function i(a,b,c,d){var f=b,i=d;let j="string"==typeof a?function(a){let b=new Uint8Array((a=unescape(encodeURIComponent(a))).length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}(a):a,k="string"==typeof f?g(f):f;if("string"==typeof f&&(f=g(f)),f?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+j.length);if(l.set(k),l.set(j,k.length),(l=e(l))[6]=15&l[6]|80,l[8]=63&l[8]|128,c){i=i||0;for(let a=0;a<16;++a)c[i+a]=l[a];return c}return(0,h.k)(l)}i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";let j=i},11909:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{PY:()=>s,Re:()=>q,Su:()=>r,exchangeTokens:()=>p,extractCodexAccountInfo:()=>k.YR,fetchKiroProfileArn:()=>k.gR,kP:()=>o,sO:()=>n});var e=c(46379),f=c(55511),g=c.n(f),h=c(9988),i=c(47978),j=c(75771),k=c(60021),l=a([e]);e=(l.then?(await l)():l)[0];let t=null;async function m(){if(t)return t;try{let a=await fetch(j.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return t={authorizeUrl:(0,k.js)(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:(0,k.js)(b.token_endpoint,"token_endpoint")}}}catch{}return t={authorizeUrl:j.oT.authorizeUrl,tokenUrl:j.oT.tokenUrl}}let u={claude:{config:i.OV,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d)=>{let e=new URLSearchParams({code:"true",client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c});return`${a.authorizeUrl}?${e.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=b,g="";if(f.includes("#")){let a=f.split("#");f=a[0],g=a[1]||""}let h=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({code:f,state:g||e,grant_type:"authorization_code",client_id:a.clientId,redirect_uri:c,code_verifier:d})});if(!h.ok){let a=await h.text();throw Error(`Token exchange failed: ${a}`)}return await h.json()},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope})},codex:{config:i.DI,flowType:"authorization_code_pkce",fixedPort:i.DI.fixedPort,callbackPath:i.DI.callbackPath,buildAuthUrl:(a,b,c,d)=>{let e={response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,...a.extraParams,state:c},f=Object.entries(e).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${f}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b=(0,k.YR)(a.id_token),c={accessToken:a.access_token,refreshToken:a.refresh_token,idToken:a.id_token,expiresIn:a.expires_in,lastRefreshAt:new Date().toISOString()},d=b.email||(0,k.J_)(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}},xai:{config:j.oT,flowType:"authorization_code_pkce",fixedPort:j.oT.loopbackPort,callbackPath:j.oT.callbackPath,pkceVerifierBytes:j.Ue,prepareConfig:async a=>{let b=await m();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let e=g().randomBytes(16).toString("hex"),f={response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c,nonce:e,plan:"generic",referrer:"cli-proxy-api"},h=Object.entries(f).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${h}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`xAI token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b={accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope},c=(0,k.pG)(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}},"gemini-cli":{config:i.LT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b=await fetch(`${i.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},d="";try{let b=await fetch("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:(0,i.cD)(),mode:1})});if(b.ok){let a=await b.json();d=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})},antigravity:{config:i.YT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b={Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","User-Agent":i.YT.loadCodeAssistUserAgent,"X-Goog-Api-Client":i.YT.loadCodeAssistApiClient,"Client-Metadata":i.YT.loadCodeAssistClientMetadata,"x-request-source":"local"},c=(0,i.cD)(),d=await fetch(`${i.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"}}),e=d.ok?await d.json():{},f="",g="legacy-tier";try{let a=await fetch(i.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c})});if(a.ok){let b=await a.json();if(f=b.cloudaicompanionProject?.id||b.cloudaicompanionProject||"",Array.isArray(b.allowedTiers)){for(let a of b.allowedTiers)if(a.isDefault&&a.id){g=a.id.trim();break}}}}catch(a){console.log("Failed to load code assist:",a)}return f&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(i.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:g,metadata:c})});if(a.ok){let b=await a.json();if(!0===b.done)break}}catch(a){break}await new Promise(a=>setTimeout(a,5e3))}})().catch(()=>{}),{userInfo:e,projectId:f}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})},iflow:{config:i.ZL,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({loginMethod:a.extraParams.loginMethod,type:a.extraParams.type,redirect:b,state:c,client_id:a.clientId});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=Buffer.from(`${a.clientId}:${a.clientSecret}`).toString("base64"),e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${d}`},body:new URLSearchParams({grant_type:"authorization_code",code:b,redirect_uri:c,client_id:a.clientId,client_secret:a.clientSecret})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},postExchange:async a=>{let b=await fetch(`${i.ZL.userInfoUrl}?accessToken=${encodeURIComponent(a.access_token)}`,{headers:{Accept:"application/json"}});if(!b.ok){let a=await b.text();throw Error(`Failed to fetch user info: ${a}`)}let c=await b.json();if(!c.success)throw Error(`User info request failed: ${c.message||"Unknown error"}`);let d=c.data||{};if(!d.apiKey||""===d.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(d.email?.trim()||d.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,apiKey:b?.userInfo?.apiKey,email:b?.userInfo?.email||b?.userInfo?.phone,displayName:b?.userInfo?.nickname||b?.userInfo?.name})},qoder:{config:i.hF,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(6067).then(c.bind(c,88448)),d=new b().initiateDeviceFlow();return{device_code:d.nonce,user_code:d.nonce.slice(0,8).toUpperCase(),verification_uri:a.loginUrl,verification_uri_complete:d.verificationUriComplete,expires_in:300,interval:2,codeVerifier:d.codeVerifier,_qoderNonce:d.nonce,_qoderMachineId:d.machineId}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(6067).then(c.bind(c,88448)),h=new g,i=b||e?._qoderNonce,j=d||e?._qoderVerifier;if(!i||!j)return{ok:!1,data:{error:"invalid_request",error_description:"Missing nonce/verifier"}};try{f=await h.pollDeviceToken({nonce:i,codeVerifier:j})}catch(a){return{ok:!1,data:{error:"poll_failed",error_description:a.message}}}if("pending"===f.status)return{ok:!1,data:{error:"authorization_pending"}};let k=await h.fetchUserInfo(f.accessToken),l=Math.floor((f.expireTime-Date.now())/1e3),m=Math.max(86400,l);return{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:m,_qoderUserId:f.userId,_qoderMachineId:e?._qoderMachineId||"",_qoderName:k.name,_qoderEmail:k.email,_qoderOrganizationId:k.organizationId}}},mapTokens:a=>{let b=(a._qoderEmail||"").trim(),c=(a._qoderName||"").trim()||null,d=a._qoderUserId||"",e=b||(d?`qoder-user-${d}`:null);return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,email:e,displayName:c,providerSpecificData:{authMethod:"device",userId:d,machineId:a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}},qwen:{config:i.Hp,flowType:"device_code",requestDeviceCode:async(a,b)=>{let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scope,code_challenge:b,code_challenge_method:a.codeChallengeMethod})});if(!c.ok){let a=await c.text();throw Error(`Device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b,code_verifier:c})});return{ok:d.ok,data:await d.json()}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{resourceUrl:a.resource_url}})},github:{config:i.Nu,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scopes})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,device_code:b,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});try{c=await d.json()}catch(b){let a=await d.text();c={error:"invalid_response",error_description:a}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(i.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":i.Nu.apiVersion,"User-Agent":i.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(i.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":i.Nu.apiVersion,"User-Agent":i.Nu.userAgent}}),e=d.ok?await d.json():{};return{copilotToken:c,userInfo:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{copilotToken:b?.copilotToken?.token,copilotTokenExpiresAt:b?.copilotToken?.expires_at,githubUserId:b?.userInfo?.id,githubLogin:b?.userInfo?.login,githubName:b?.userInfo?.name,githubEmail:b?.userInfo?.email}})},kiro:{config:i.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1",e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,f="idc"===c.authMethod?"idc":"builder-id",g=`https://oidc.${d}.amazonaws.com/client/register`,h=`https://oidc.${d}.amazonaws.com/device_authorization`,i=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientName:a.clientName,clientType:a.clientType,scopes:a.scopes,grantTypes:a.grantTypes,issuerUrl:a.issuerUrl})});if(!i.ok){let a=await i.text();throw Error(`Client registration failed: ${a}`)}let j=await i.json(),k=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:j.clientId,clientSecret:j.clientSecret,startUrl:e})});if(!k.ok){let a=await k.text();throw Error(`Device authorization failed: ${a}`)}let l=await k.json();return{device_code:l.deviceCode,user_code:l.userCode,verification_uri:l.verificationUri,verification_uri_complete:l.verificationUriComplete,expires_in:l.expiresIn,interval:l.interval||5,_clientId:j.clientId,_clientSecret:j.clientSecret,_region:d,_authMethod:f,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,f=d?._region||"us-east-1",g=`https://oidc.${f}.amazonaws.com/token`,h=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:d?._clientId,clientSecret:d?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{e=await h.json()}catch(b){let a=await h.text();e={error:"invalid_response",error_description:a}}return e.accessToken?{ok:!0,data:{access_token:e.accessToken,refresh_token:e.refreshToken,expires_in:e.expiresIn,profile_arn:e?.profileArn||null,_clientId:d?._clientId,_clientSecret:d?._clientSecret,_region:d?._region,_authMethod:d?._authMethod,_startUrl:d?._startUrl}}:{ok:!1,data:{error:e.error||"authorization_pending",error_description:e.error_description||e.message}}},mapTokens:a=>{let b=(0,k.J_)(a.access_token);return{accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,email:b,providerSpecificData:{profileArn:a?.profile_arn||null,clientId:a._clientId,clientSecret:a._clientSecret,region:a._region||"us-east-1",authMethod:a._authMethod||"builder-id",startUrl:a._startUrl||i.Tx.startUrl}}}},cursor:{config:i.WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})},"kimi-coding":{config:i.t,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}let c=await b.json();return{device_code:c.device_code,user_code:c.user_code,verification_uri:c.verification_uri||"https://www.kimi.com/code/authorize_device",verification_uri_complete:c.verification_uri_complete||`https://www.kimi.com/code/authorize_device?user_code=${c.user_code}`,expires_in:c.expires_in,interval:c.interval||5}},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{c=await d.json()}catch(b){let a=await d.text();c={error:"invalid_response",error_description:a}}return{ok:d.ok,data:c}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in})},kilocode:{config:i.MZ,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.initiateUrl,{method:"POST",headers:{"Content-Type":"application/json"}});if(!b.ok){if(429===b.status)throw Error("Too many pending authorization requests. Please try again later.");let a=await b.text();throw Error(`Device auth initiation failed: ${a}`)}let c=await b.json();return{device_code:c.code,user_code:c.code,verification_uri:c.verificationUrl,verification_uri_complete:c.verificationUrl,expires_in:c.expiresIn||300,interval:3}},pollToken:async(a,b)=>{let c=await fetch(`${a.pollUrlBase}/${b}`);if(202===c.status)return{ok:!1,data:{error:"authorization_pending"}};if(403===c.status)return{ok:!1,data:{error:"access_denied",error_description:"Authorization denied by user"}};if(410===c.status)return{ok:!1,data:{error:"expired_token",error_description:"Authorization code expired"}};if(!c.ok)return{ok:!1,data:{error:"poll_failed",error_description:`Poll failed: ${c.status}`}};let d=await c.json();if("approved"===d.status&&d.token){let b=null;try{let c=await fetch(`${a.apiBaseUrl}/api/profile`,{headers:{Authorization:`Bearer ${d.token}`}});if(c.ok){let a=await c.json();b=a.organizations?.[0]?.id||null}}catch{}return{ok:!0,data:{access_token:d.token,_userEmail:d.userEmail,_orgId:b}}}return{ok:!1,data:{error:"authorization_pending"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:null,expiresIn:null,email:a._userEmail,...a._orgId?{providerSpecificData:{orgId:a._orgId}}:{}})},cline:{config:i.lB,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Cline token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})},gitlab:{config:i.f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=e.clientId||"",h=new URLSearchParams({client_id:g,redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${h.toString()}`},exchangeToken:async(a,b,c,d,e,f={})=>{let g=f.baseUrl||a.defaultBaseUrl,h=f.clientId||"",i=f.clientSecret||"",j=new URLSearchParams({client_id:h,grant_type:"authorization_code",code:b,redirect_uri:c,code_verifier:d});i&&j.set("client_secret",i);let k=await fetch(`${g}${a.tokenUrlPath}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:j.toString()});if(!k.ok)throw Error(`GitLab token exchange failed: ${await k.text()}`);let l=await k.json(),m=await fetch(`${g}${a.userInfoUrlPath}`,{headers:{Authorization:`Bearer ${l.access_token}`}}),n=m.ok?await m.json():{};return{...l,_user:n,_baseUrl:g,_clientId:h}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,providerSpecificData:{username:a._user?.username||"",email:a._user?.email||a._user?.public_email||"",name:a._user?.name||"",baseUrl:a._baseUrl,clientId:a._clientId,authKind:"oauth"}})},codebuddy:{config:i.Nl,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:JSON.stringify({state:b})});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer"}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:86400,providerSpecificData:{}})}};function n(a){let b=u[a];if(!b)throw Error(`Unknown provider: ${a}`);return b}async function o(a,b,c){let d=n(a),e=d.prepareConfig?await d.prepareConfig(d.config,c||{}):d.config,{codeVerifier:f,codeChallenge:g,state:i}=(0,h.lz)(d.pkceVerifierBytes);return{authUrl:"device_code"===d.flowType?null:"authorization_code_pkce"===d.flowType?d.buildAuthUrl(e,b,i,g,c||{}):d.buildAuthUrl(e,b,i,void 0,c||{}),state:i,codeVerifier:f,codeChallenge:g,redirectUri:b,flowType:d.flowType,fixedPort:d.fixedPort,callbackPath:d.callbackPath||"/callback"}}async function p(a,b,c,d,e,f){let g=n(a),h=g.prepareConfig?await g.prepareConfig(g.config,f||{}):g.config,i=await g.exchangeToken(h,b,c,d,e,f||{}),j=null;return g.postExchange&&(j=await g.postExchange(i)),g.mapTokens(i,j)}async function q(a,b,c){let d=n(a);if("device_code"!==d.flowType)throw Error(`Provider ${a} does not support device code flow`);return await d.requestDeviceCode(d.config,b,c||{})}async function r(a,b,c,d){let e=n(a);if("device_code"!==e.flowType)throw Error(`Provider ${a} does not support device code flow`);let f=await e.pollToken(e.config,b,c,d);if(f.ok)if(f.data.access_token){let b=null;e.postExchange&&(b=await e.postExchange(f.data));let c=e.mapTokens(f.data,b);if("kiro"===a&&!c.providerSpecificData?.profileArn){let a=await (0,k.gR)(c.accessToken);a&&(c.providerSpecificData.profileArn=a)}return{success:!0,tokens:c}}else if("authorization_pending"===f.data.error||"slow_down"===f.data.error)return{success:!1,error:f.data.error,errorDescription:f.data.error_description||f.data.message,pending:"authorization_pending"===f.data.error};else return{success:!1,error:f.data.error||"no_access_token",errorDescription:f.data.error_description||f.data.message||"No access token received"};return{success:!1,error:f.data.error,errorDescription:f.data.error_description}}let v=!1;async function s(){if(!v){v=!0;try{let{getProviderConnections:a,updateProviderConnection:b}=await Promise.resolve().then(c.bind(c,37770));for(let c of(await a()).filter(a=>{if("codex"!==a.provider||"oauth"!==a.authType||!a.idToken)return!1;let b=!!a.email,c=!!a.providerSpecificData?.chatgptAccountId;return!b||!c})){let a=(0,k.YR)(c.idToken);if(!a.email&&!a.chatgptAccountId)continue;let d={};!c.email&&a.email&&(d.email=a.email),(a.chatgptAccountId||a.chatgptPlanType)&&(d.providerSpecificData={...c.providerSpecificData||{},chatgptAccountId:a.chatgptAccountId,chatgptPlanType:a.chatgptPlanType}),Object.keys(d).length&&await b(c.id,d)}}catch(a){v=!1,console.log("backfillCodexEmails failed:",a?.message||a)}}}d()}catch(a){d(a)}})},60021:(a,b,c)=>{function d(a,b){let c,d=String(a||"").trim();if(!d)throw Error(`xai discovery ${b} is empty`);try{c=new URL(d)}catch(a){throw Error(`xai discovery ${b} is invalid: ${a.message}`)}if("https:"!==c.protocol)throw Error(`xai discovery ${b} must use https: ${d}`);let e=c.hostname.toLowerCase().trim();if("x.ai"!==e&&!e.endsWith(".x.ai"))throw Error(`xai discovery ${b} host ${e} is not on x.ai`);return d}function e(a){if(!a||"string"!=typeof a)return;let b=a.split(".");if(3===b.length)try{let a=b[1].replace(/-/g,"+").replace(/_/g,"/"),c=(4-a.length%4)%4,d=Buffer.from(a+"=".repeat(c),"base64").toString("utf8"),e=JSON.parse(d);return e.email||e.preferred_username||e.sub||void 0}catch{return}}function f(a){try{if(!a||"string"!=typeof a)return null;let b=a.split(".");if(3!==b.length)return null;let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=(4-c.length%4)%4,e=c+"=".repeat(d);return JSON.parse(Buffer.from(e,"base64").toString("utf8"))}catch{return null}}function g(a){let b=f(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function h(a){if(!a)return null;try{let b=await fetch("https://codewhisperer.us-east-1.amazonaws.com/ListAvailableProfiles",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({maxResults:10})});if(!b.ok)return null;let c=await b.json();return c.profiles?.find(a=>a.arn?.trim())?.arn?.trim()||null}catch{return null}}function i(a){let b=f(a);if(!b)return{};let c=b["https://api.openai.com/auth"]||{};return{email:b.email,chatgptAccountId:c.chatgpt_account_id||b.account_id,chatgptPlanType:c.chatgpt_plan_type||b.plan_type}}c.d(b,{J_:()=>g,YR:()=>i,gR:()=>h,js:()=>d,pG:()=>e})}};