@rabbi696/ezrouter 0.6.22 → 0.6.23

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 (928) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +5 -5
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/react-loadable-manifest.json +1 -1
  5. package/app/.next-cli-build/required-server-files.json +3 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +26 -6
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page.js +1 -1
  94. package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  106. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  107. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  109. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  110. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  111. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  112. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  113. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  114. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  115. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  116. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  117. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js +2 -2
  241. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/models/enabled/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/models/enabled/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/callback/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  304. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/routing-health/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  384. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  457. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  460. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  474. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  475. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  478. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  480. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  484. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  486. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  487. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  488. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  489. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  490. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  491. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  492. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  493. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  494. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  496. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  497. package/app/.next-cli-build/server/app/api/wakeup/route.js +1 -1
  498. package/app/.next-cli-build/server/app/api/wakeup/route.js.nft.json +1 -1
  499. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  500. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  501. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  502. package/app/.next-cli-build/server/app/callback.html +1 -1
  503. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  504. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  505. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  506. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  507. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  508. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  509. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  512. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  517. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  519. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  520. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  522. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  523. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  527. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  529. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  530. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  532. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  537. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  539. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  540. package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/convoy.rsc +6 -6
  542. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
  543. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +6 -6
  547. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +4 -4
  549. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +2 -2
  550. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  552. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  553. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  556. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  557. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  559. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  560. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
  561. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +6 -6
  562. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
  563. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  566. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  567. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +6 -6
  568. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +4 -4
  570. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +2 -2
  571. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
  572. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +6 -6
  573. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
  574. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  576. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  578. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +6 -6
  579. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
  580. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +4 -4
  581. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +2 -2
  582. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
  583. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +6 -6
  584. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
  585. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  586. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  588. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +6 -6
  589. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +4 -4
  591. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +2 -2
  592. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  594. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  595. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  596. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  597. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  598. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  599. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  600. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  601. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  602. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  603. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  604. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  605. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  606. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  607. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  608. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  609. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  610. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  611. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  612. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  613. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  614. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  615. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  616. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  618. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  619. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  620. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  622. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  623. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  624. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  625. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  626. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  628. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  629. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  630. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  631. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  632. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  633. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  634. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  635. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  636. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  637. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  638. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  639. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  640. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  641. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  642. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  643. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  644. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  645. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  646. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  647. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  648. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  649. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  650. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  651. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  652. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  653. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  654. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  655. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  656. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  657. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  658. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  659. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  660. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  661. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  662. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  663. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  664. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  665. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  666. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  667. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  668. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  669. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  670. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  671. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  672. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  673. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  674. package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
  675. package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +6 -6
  676. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
  677. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
  678. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  679. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  680. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +6 -6
  681. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
  682. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +4 -4
  683. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +2 -2
  684. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  685. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  686. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  687. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  688. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  689. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  690. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  691. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  692. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  693. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  694. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  695. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  696. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  697. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  698. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  699. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  700. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  701. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  702. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  703. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  704. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  705. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  706. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  707. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  708. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  709. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  710. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  711. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  712. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  713. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  714. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  715. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  716. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  717. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  718. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  719. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  720. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  721. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  722. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  723. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  724. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  725. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  726. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  727. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  728. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  729. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  730. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  731. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  732. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  733. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  734. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  735. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  736. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  737. package/app/.next-cli-build/server/app/dashboard/wakeup.html +1 -1
  738. package/app/.next-cli-build/server/app/dashboard/wakeup.rsc +6 -6
  739. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup/__PAGE__.segment.rsc +2 -2
  740. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup.segment.rsc +1 -1
  741. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  742. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  743. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_full.segment.rsc +6 -6
  744. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_head.segment.rsc +1 -1
  745. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_index.segment.rsc +4 -4
  746. package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_tree.segment.rsc +2 -2
  747. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  748. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  749. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  750. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  751. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  752. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  753. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  754. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  755. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  756. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  757. package/app/.next-cli-build/server/app/index.html +1 -1
  758. package/app/.next-cli-build/server/app/index.rsc +4 -4
  759. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  760. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  761. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  762. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  763. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  764. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  765. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  766. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  767. package/app/.next-cli-build/server/app/landing.html +1 -1
  768. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  769. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  770. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  771. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  772. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  773. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  774. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  775. package/app/.next-cli-build/server/app/login/page.js +1 -1
  776. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  777. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  778. package/app/.next-cli-build/server/app/login.html +1 -1
  779. package/app/.next-cli-build/server/app/login.rsc +5 -5
  780. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  781. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  782. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  783. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  784. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  785. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  786. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  787. package/app/.next-cli-build/server/app/page.js +1 -1
  788. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  789. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  790. package/app/.next-cli-build/server/app-paths-manifest.json +5 -5
  791. package/app/.next-cli-build/server/chunks/1446.js +1 -1
  792. package/app/.next-cli-build/server/chunks/1482.js +2 -2
  793. package/app/.next-cli-build/server/chunks/1522.js +1 -1
  794. package/app/.next-cli-build/server/chunks/1530.js +1 -0
  795. package/app/.next-cli-build/server/chunks/1561.js +9 -0
  796. package/app/.next-cli-build/server/chunks/1641.js +1 -1
  797. package/app/.next-cli-build/server/chunks/1733.js +5 -1
  798. package/app/.next-cli-build/server/chunks/1847.js +1 -1
  799. package/app/.next-cli-build/server/chunks/1923.js +1 -0
  800. package/app/.next-cli-build/server/chunks/2072.js +255 -0
  801. package/app/.next-cli-build/server/chunks/2180.js +1 -1
  802. package/app/.next-cli-build/server/chunks/2348.js +1 -1
  803. package/app/.next-cli-build/server/chunks/2414.js +1 -0
  804. package/app/.next-cli-build/server/chunks/2687.js +1 -1
  805. package/app/.next-cli-build/server/chunks/2898.js +1 -1
  806. package/app/.next-cli-build/server/chunks/290.js +1 -1
  807. package/app/.next-cli-build/server/chunks/2937.js +1 -0
  808. package/app/.next-cli-build/server/chunks/3092.js +1 -1
  809. package/app/.next-cli-build/server/chunks/3159.js +9 -0
  810. package/app/.next-cli-build/server/chunks/321.js +2 -2
  811. package/app/.next-cli-build/server/chunks/3245.js +1 -1
  812. package/app/.next-cli-build/server/chunks/3433.js +4 -4
  813. package/app/.next-cli-build/server/chunks/3449.js +1 -1
  814. package/app/.next-cli-build/server/chunks/3547.js +1 -1
  815. package/app/.next-cli-build/server/chunks/3548.js +9 -0
  816. package/app/.next-cli-build/server/chunks/369.js +9 -9
  817. package/app/.next-cli-build/server/chunks/3759.js +5 -0
  818. package/app/.next-cli-build/server/chunks/3794.js +1 -1
  819. package/app/.next-cli-build/server/chunks/3966.js +1 -1
  820. package/app/.next-cli-build/server/chunks/3977.js +1 -1
  821. package/app/.next-cli-build/server/chunks/4017.js +1 -0
  822. package/app/.next-cli-build/server/chunks/412.js +5 -5
  823. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  824. package/app/.next-cli-build/server/chunks/4190.js +1 -1
  825. package/app/.next-cli-build/server/chunks/4370.js +2 -0
  826. package/app/.next-cli-build/server/chunks/4642.js +1 -0
  827. package/app/.next-cli-build/server/chunks/4807.js +1 -1
  828. package/app/.next-cli-build/server/chunks/4811.js +1 -1
  829. package/app/.next-cli-build/server/chunks/4827.js +1 -1
  830. package/app/.next-cli-build/server/chunks/4878.js +1 -1
  831. package/app/.next-cli-build/server/chunks/4882.js +1 -1
  832. package/app/.next-cli-build/server/chunks/5005.js +1 -0
  833. package/app/.next-cli-build/server/chunks/5251.js +1 -1
  834. package/app/.next-cli-build/server/chunks/5292.js +1 -1
  835. package/app/.next-cli-build/server/chunks/5434.js +1 -1
  836. package/app/.next-cli-build/server/chunks/5460.js +4 -4
  837. package/app/.next-cli-build/server/chunks/5749.js +1 -1
  838. package/app/.next-cli-build/server/chunks/5872.js +1 -1
  839. package/app/.next-cli-build/server/chunks/6038.js +1 -1
  840. package/app/.next-cli-build/server/chunks/6103.js +1 -1
  841. package/app/.next-cli-build/server/chunks/615.js +1 -1
  842. package/app/.next-cli-build/server/chunks/6569.js +1 -1
  843. package/app/.next-cli-build/server/chunks/6646.js +1 -0
  844. package/app/.next-cli-build/server/chunks/6708.js +1 -1
  845. package/app/.next-cli-build/server/chunks/6889.js +3 -0
  846. package/app/.next-cli-build/server/chunks/6988.js +1 -1
  847. package/app/.next-cli-build/server/chunks/7144.js +1 -0
  848. package/app/.next-cli-build/server/chunks/722.js +1 -0
  849. package/app/.next-cli-build/server/chunks/7511.js +9 -0
  850. package/app/.next-cli-build/server/chunks/7716.js +1 -1
  851. package/app/.next-cli-build/server/chunks/7775.js +1 -1
  852. package/app/.next-cli-build/server/chunks/7811.js +1 -1
  853. package/app/.next-cli-build/server/chunks/7828.js +1 -1
  854. package/app/.next-cli-build/server/chunks/7982.js +9 -0
  855. package/app/.next-cli-build/server/chunks/7995.js +2 -2
  856. package/app/.next-cli-build/server/chunks/8129.js +1 -1
  857. package/app/.next-cli-build/server/chunks/823.js +1 -1
  858. package/app/.next-cli-build/server/chunks/8243.js +1 -1
  859. package/app/.next-cli-build/server/chunks/8306.js +1 -1
  860. package/app/.next-cli-build/server/chunks/8327.js +24 -15
  861. package/app/.next-cli-build/server/chunks/8459.js +1 -1
  862. package/app/.next-cli-build/server/chunks/8670.js +1 -0
  863. package/app/.next-cli-build/server/chunks/8950.js +1 -1
  864. package/app/.next-cli-build/server/chunks/8976.js +1 -1
  865. package/app/.next-cli-build/server/chunks/9303.js +1 -1
  866. package/app/.next-cli-build/server/chunks/9485.js +1 -1
  867. package/app/.next-cli-build/server/chunks/9616.js +1 -1
  868. package/app/.next-cli-build/server/chunks/9761.js +2 -2
  869. package/app/.next-cli-build/server/chunks/9843.js +1 -1
  870. package/app/.next-cli-build/server/chunks/9865.js +1 -1
  871. package/app/.next-cli-build/server/chunks/9898.js +2 -2
  872. package/app/.next-cli-build/server/instrumentation.js +1 -1
  873. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  874. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  875. package/app/.next-cli-build/server/middleware.js +5 -5
  876. package/app/.next-cli-build/server/next-font-manifest.js +1 -1
  877. package/app/.next-cli-build/server/next-font-manifest.json +1 -1
  878. package/app/.next-cli-build/server/pages/404.html +1 -1
  879. package/app/.next-cli-build/server/pages/500.html +1 -1
  880. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  881. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  882. package/app/.next-cli-build/static/chunks/1321-374cf8300fa9283a.js +1 -0
  883. package/app/.next-cli-build/static/chunks/5497-552ad04ae3380014.js +17 -0
  884. package/app/.next-cli-build/static/chunks/{6252-0f14a5b69160c9da.js → 6252-361b1d5b9d98e0f6.js} +1 -1
  885. package/app/.next-cli-build/static/chunks/6509-8408cfa51bab02b8.js +1 -0
  886. package/app/.next-cli-build/static/chunks/8105-2341cae0a3b70fc9.js +1 -0
  887. package/app/.next-cli-build/static/chunks/9227-08a1ad2fd60f90a1.js +5 -0
  888. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-2ac64e666515ee53.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/error-log/page-1f6447383234195f.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-948cbe61db1d6e26.js → page-94eb5202d9b42b30.js} +1 -1
  891. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-886fa42ab104c02b.js → page-5b823a675c71106d.js} +2 -2
  892. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-9e25e5d249d9c772.js +27 -0
  893. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-61cabb346811532e.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-ed31b8fb16ed1c2c.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/wakeup/{page-cc38ba001d74e072.js → page-97d58b76627b2b45.js} +1 -1
  896. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-0441382e88eeda7c.js → layout-afb8830458a68375.js} +1 -1
  897. package/app/.next-cli-build/static/chunks/{webpack-63e69ceb57f8fc86.js → webpack-d3b25b624caf2b22.js} +1 -1
  898. package/app/.next-cli-build/static/css/09d93ff4fa82a09d.css +1 -0
  899. package/app/CHANGELOG.md +32 -0
  900. package/app/package.json +1 -1
  901. package/app/public/CHANGELOG.md +32 -0
  902. package/app/server.js +1 -1
  903. package/package.json +1 -1
  904. package/src/cli/api/client.js +28 -9
  905. package/src/cli/utils/modelSelector.js +4 -2
  906. package/app/.next-cli-build/server/chunks/1133.js +0 -1
  907. package/app/.next-cli-build/server/chunks/1837.js +0 -3
  908. package/app/.next-cli-build/server/chunks/3275.js +0 -1
  909. package/app/.next-cli-build/server/chunks/5743.js +0 -254
  910. package/app/.next-cli-build/server/chunks/6464.js +0 -1
  911. package/app/.next-cli-build/server/chunks/6765.js +0 -1
  912. package/app/.next-cli-build/server/chunks/7358.js +0 -1
  913. package/app/.next-cli-build/server/chunks/7362.js +0 -2
  914. package/app/.next-cli-build/server/chunks/8540.js +0 -1
  915. package/app/.next-cli-build/server/chunks/9352.js +0 -1
  916. package/app/.next-cli-build/static/chunks/1321-8a4ed98cd27f3c72.js +0 -1
  917. package/app/.next-cli-build/static/chunks/5497-b45e1c7b332ddf12.js +0 -17
  918. package/app/.next-cli-build/static/chunks/6509-3113291463d9844c.js +0 -1
  919. package/app/.next-cli-build/static/chunks/8105-09b5824ceb7fd21b.js +0 -1
  920. package/app/.next-cli-build/static/chunks/9227-96f7384b30545e0d.js +0 -5
  921. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b29a8b9ee4742767.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/error-log/page-862a88526522df85.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-5cddf336494d65c2.js +0 -27
  924. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-bb32b01b204c30e6.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-c804bcf327d3ef5a.js +0 -1
  926. package/app/.next-cli-build/static/css/99e24003a7301d8b.css +0 -1
  927. /package/app/.next-cli-build/static/{Y99WYOLLyt5Zmp6hx75Z1 → qhov0HpMB8g5P8LJxjypq}/_buildManifest.js +0 -0
  928. /package/app/.next-cli-build/static/{Y99WYOLLyt5Zmp6hx75Z1 → qhov0HpMB8g5P8LJxjypq}/_ssgManifest.js +0 -0
@@ -4,4 +4,4 @@
4
4
  data: ${d}
5
5
 
6
6
  `)}catch{}}}),f.stderr.on("data",b=>console.log(`[mcp:${a}]`,b.toString().trim())),f.on("exit",c=>{console.log(`[mcp:${a}] exited`,c),b.delete(a)}),c}a.exports={getOrSpawn:j,registerSession:function(a,b){let c=j(a),d=e.randomUUID();return c.sessions.set(d,b),d},unregisterSession:function(a,b){let c=h().get(a);if(c&&(c.sessions.delete(b),0===c.sessions.size)){try{c.proc.kill()}catch{}h().delete(a)}},sendToChild:function(a,b){let c=h().get(a);if(!c?.proc?.stdin?.writable)throw Error(`Bridge not running: ${a}`);c.proc.stdin.write(`${JSON.stringify(b)}
7
- `)},isRunning:function(a){let b=h().get(a);return!!(b?.proc&&!b.proc.killed&&null===b.proc.exitCode)},findPlugin:i,killAllBridges:function(){let a=h();for(let[b,c]of a){try{c.proc.kill()}catch{}a.delete(b)}}}},28286:a=>{a.exports={DEFAULT_PLUGINS:[{name:"exa",title:"Exa",description:"Real-time web search and code documentation",url:"https://mcp.exa.ai/mcp",transport:"http",oauth:!1,toolNames:["web_search_exa","web_fetch_exa"]},{name:"tavily",title:"Tavily",description:"Real-time web search optimized for LLM agents",url:"https://mcp.tavily.com/mcp",transport:"http",oauth:!0,toolNames:["tavily_search","tavily_extract","tavily_crawl","tavily_map"]}],LOCAL_STDIO_PLUGINS:[{name:"browsermcp",title:"Browser MCP",description:"Control your running Chrome (requires Chrome extension)",extensionUrl:"https://chromewebstore.google.com/detail/browser-mcp-automate-your/bjfgambnhccakkhmkepdoekmckoijdlc",command:"npx",args:["-y","@browsermcp/mcp@latest"],toolNames:["browser_navigate","browser_snapshot","browser_click","browser_type","browser_screenshot","browser_get_console_logs","browser_wait","browser_press_key","browser_go_back","browser_go_forward"]}],buildManagedMcpServers:function(a){let b=Array.isArray(a)?a:[],c=[],d=new Set;for(let a of b){if(!a?.name||!a?.url||d.has(a.name))continue;d.add(a.name);let b={name:a.name,url:a.url,transport:a.transport||(/\/sse(\b|\/)/i.test(a.url)?"sse":"http")};if(a.oauth&&(b.oauth=!0),Array.isArray(a.toolNames)&&a.toolNames.length>0){let c=`${a.name}-`,d=new Set;for(let b of a.toolNames){if("string"!=typeof b||!b)continue;let a=b;for(;a.startsWith(c);)a=a.slice(c.length);d.add(a)}let e={};for(let a of d)e[a]="allow",e[`${c}${a}`]="allow";b.toolPolicy=e}c.push(b)}return c}}},76476:(a,b,c)=>{c.d(b,{N:()=>n,v:()=>m});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h);let j=process.env.DATA_DIR||("win32"===process.platform?g().join(process.env.APPDATA||g().join(i().homedir(),"AppData","Roaming"),"ezrouter"):g().join(i().homedir(),".ezrouter")),k=g().join(j,"mitm","aliases.json");function l(a){let b=g().dirname(k);e().mkdirSync(b,{recursive:!0});let c=`${k}.tmp`;e().writeFileSync(c,JSON.stringify(a,null,2),"utf8"),e().renameSync(c,k)}async function m(){try{let{getMitmAlias:a}=await Promise.resolve().then(c.bind(c,9460)),b=await a();l(b||{})}catch(a){console.log("[mitmAliasCache] sync failed:",a.message)}}function n(a,b){try{let c={};if(e().existsSync(k))try{c=JSON.parse(e().readFileSync(k,"utf8"))}catch{}c[a]=b||{},l(c)}catch(a){console.log("[mitmAliasCache] write failed:",a.message)}}},94123:(a,b,c)=>{c.d(b,{Ay:()=>w,Zh:()=>v});var d=c(21820),e=c.n(d),f=c(1932),g=c(33873),h=c(29021),i=c(89718),j=c(17302),k=c(96182),l=c(76476),m=c(17113),n=c(16329);if(!process.env.MITM_SERVER_PATH)try{let a=(0,f.fileURLToPath)("file:///Volumes/Files/Projects/EzRouter/EzRouter/src/shared/services/initializeApp.js"),b=(0,g.dirname)((0,g.dirname)(a)),c=(0,g.join)(b,"mitm","server.js");(0,h.existsSync)(c)&&(process.env.MITM_SERVER_PATH=c)}catch{}try{(0,k.initDbHooks)(i.mt,i.Xx)}catch{}process.setMaxListeners(20);let o=global.__appSingleton??={signalHandlersRegistered:!1,watchdogInterval:null,networkMonitorInterval:null,lastNetworkFingerprint:null,lastWatchdogTick:Date.now(),lastOnline:null,mitmStartInProgress:!1,tunnelAutoResumed:!1,tailscaleAutoResumed:!1};async function p(){var a;await (0,i.bI)();let b=await (0,i.mt)();b.tunnelEnabled&&!o.tunnelAutoResumed&&(o.tunnelAutoResumed=!0,console.log("[InitApp] Tunnel was enabled, auto-resuming..."),s("startup").catch(a=>console.log("[InitApp] Tunnel resume failed:",a.message))),b.tailscaleEnabled&&!o.tailscaleAutoResumed&&(o.tailscaleAutoResumed=!0,console.log("[InitApp] Tailscale was enabled, auto-resuming..."),t("startup").catch(a=>console.log("[InitApp] Tailscale resume failed:",a.message))),b.tunnelEnabled&&(0,j.Al)().catch(()=>{}),b.mitmEnabled&&((0,l.v)().catch(()=>{}),q(b)),v(b),b.wakeupState?.tasks?.length&&Promise.all([c.e(7774),c.e(1522),c.e(4646),c.e(1847),c.e(9843),c.e(9761),c.e(4378),c.e(8129),c.e(5749),c.e(9865),c.e(9021),c.e(5292),c.e(6588),c.e(1733),c.e(5743),c.e(369),c.e(3547),c.e(1133),c.e(3092)]).then(c.bind(c,16504)).then(({configureWakeupTasks:a})=>a(b.wakeupState)).catch(()=>console.warn("[Wakeup] Scheduler start failed.")),a=b,[a?.claudeAutoPing,a?.codexAutoPing].some(a=>Object.values(a?.connections||{}).some(Boolean))&&Promise.all([c.e(7774),c.e(1522),c.e(4646),c.e(1847),c.e(9843),c.e(9761),c.e(4378),c.e(8129),c.e(5749),c.e(9865),c.e(9021),c.e(5292),c.e(6588),c.e(1733),c.e(5743),c.e(369),c.e(3547),c.e(1133),c.e(4989)]).then(c.bind(c,1133)).then(({startQuotaAutoPing:a})=>a()).catch(a=>console.log("[AutoPing] scheduler start failed:",a.message)),Promise.all([c.e(1522),c.e(9843),c.e(8129),c.e(8459)]).then(c.bind(c,3256)).then(({startBackgroundTokenRefresh:a})=>a()).catch(a=>console.log("[BackgroundTokenRefresh] scheduler start failed:",a.message))}async function q(a){if(!o.mitmStartInProgress){o.mitmStartInProgress=!0;try{if(!a.mitmEnabled||(await (0,k.getMitmStatus)()).running)return;let b=await (0,k.loadEncryptedPassword)();if(!b&&"win32"!==process.platform)return void console.log("[InitApp] MITM was enabled but no saved password found, skipping auto-start");let c=(await (0,i.PX)()).find(a=>!1!==a.isActive);console.log("[InitApp] MITM was enabled, auto-starting..."),await (0,k.startMitm)(c?.key||"sk_ezrouter",b),console.log("[InitApp] MITM auto-started");try{await (0,k.restoreToolDNS)(b),console.log("[InitApp] DNS restored from saved state")}catch(a){console.log("[InitApp] DNS restore failed:",a.message)}}catch(a){console.log("[InitApp] MITM auto-start failed:",a.message)}finally{o.mitmStartInProgress=!1}}}let r=/^(startup|netchange|sleep|sleep\+netchange|online|unexpected-exit)$/;async function s(a){let b=(0,j.Qn)();if(!(await (0,i.mt)()).tunnelEnabled||b.cancelToken.cancelled||b.spawnInProgress)return;let c=r.test(a);if(!(0,j.nN)()){if(!c&&Date.now()-b.lastRestartAt<j.Lh)return void console.log(`[Tunnel] degraded but cooldown active, skip (${a})`);if(await (0,j.u7)()){console.log(`[Tunnel] safeRestart (${a}) — tunnel unreachable${c?" [force]":""}`);try{await (0,j.cb)(),b.lastRestartAt=Date.now(),console.log("[Tunnel] restart success")}catch(a){/cloudflared killed|tunnel cancelled/.test(a.message)||console.log("[Tunnel] restart failed:",a.message)}}}}async function t(a){let b=(0,j.oN)();if(!(await (0,i.mt)()).tailscaleEnabled||b.cancelToken.cancelled||b.spawnInProgress||("startup"===a?await (0,j.hp)():(0,j.Kp)()))return;if((0,j.si)()&&b.activeLocalPort){try{await (0,j.LC)(b.activeLocalPort),b.lastRestartAt=Date.now(),console.log("[Tailscale] funnel re-established (daemon alive)")}catch(a){console.log("[Tailscale] funnel recovery failed:",a.message)}return}let c=r.test(a);if(!c&&Date.now()-b.lastRestartAt<j.Lh)return void console.log(`[Tailscale] degraded but cooldown active, skip (${a})`);if(await (0,j.u7)()){console.log(`[Tailscale] safeRestart (${a}) — daemon not running${c?" [force]":""}`);try{await (0,j.mh)(),b.lastRestartAt=Date.now(),console.log("[Tailscale] restart success")}catch(a){console.log("[Tailscale] restart failed:",a.message)}}}function u(){let a=e().networkInterfaces(),b=[];for(let[c,d]of Object.entries(a))if(d&&!j.Lx.test(c))for(let a of d)a.internal||"IPv4"!==a.family||b.push(`${c}:${a.address}`);return b.sort().join("|")}function v(a){if(a?.tunnelEnabled||a?.tailscaleEnabled){!o.watchdogInterval&&(o.watchdogInterval=setInterval(()=>{s("watchdog").catch(()=>{}),t("watchdog").catch(()=>{})},j.DA),o.watchdogInterval.unref&&o.watchdogInterval.unref()),!o.networkMonitorInterval&&(o.lastNetworkFingerprint=u(),o.lastWatchdogTick=Date.now(),o.lastOnline=null,o.networkMonitorInterval=setInterval(async()=>{try{let a=Date.now(),b=a-o.lastWatchdogTick;o.lastWatchdogTick=a;let c=u(),d=c!==o.lastNetworkFingerprint,e=b>6*j.rI;d&&(o.lastNetworkFingerprint=c);let f=await (0,j.u7)(),g=!1===o.lastOnline;if(o.lastOnline=f,!f||!d&&!e&&!g)return;await new Promise(a=>setTimeout(a,j.cw));let h=g?"online":e&&d?"sleep+netchange":e?"sleep":"netchange";s(h).catch(()=>{}),t(h).catch(()=>{})}catch(a){console.log("[NetworkMonitor] error:",a.message)}},j.rI),o.networkMonitorInterval.unref&&o.networkMonitorInterval.unref());return}o.watchdogInterval&&(clearInterval(o.watchdogInterval),o.watchdogInterval=null),o.networkMonitorInterval&&(clearInterval(o.networkMonitorInterval),o.networkMonitorInterval=null,o.lastNetworkFingerprint=null,o.lastOnline=null)}let w=async function a(){try{o.signalHandlersRegistered||((0,n.Bb)(()=>{try{(0,k.removeAllDNSEntriesSync)()}catch{}try{(0,m.killAllBridges)()}catch{}(0,j.ss)()},-100),process.on("exit",()=>{try{(0,k.removeAllDNSEntriesSync)()}catch{}}),o.signalHandlersRegistered=!0),(0,j.X$)(()=>{s("unexpected-exit").catch(()=>{})}),setTimeout(()=>{p().catch(a=>console.error("[InitApp] deferred startup failed:",a.message))},3e3)}catch(a){console.error("[InitApp] Error:",a)}}}};
7
+ `)},isRunning:function(a){let b=h().get(a);return!!(b?.proc&&!b.proc.killed&&null===b.proc.exitCode)},findPlugin:i,killAllBridges:function(){let a=h();for(let[b,c]of a){try{c.proc.kill()}catch{}a.delete(b)}}}},28286:a=>{a.exports={DEFAULT_PLUGINS:[{name:"exa",title:"Exa",description:"Real-time web search and code documentation",url:"https://mcp.exa.ai/mcp",transport:"http",oauth:!1,toolNames:["web_search_exa","web_fetch_exa"]},{name:"tavily",title:"Tavily",description:"Real-time web search optimized for LLM agents",url:"https://mcp.tavily.com/mcp",transport:"http",oauth:!0,toolNames:["tavily_search","tavily_extract","tavily_crawl","tavily_map"]}],LOCAL_STDIO_PLUGINS:[{name:"browsermcp",title:"Browser MCP",description:"Control your running Chrome (requires Chrome extension)",extensionUrl:"https://chromewebstore.google.com/detail/browser-mcp-automate-your/bjfgambnhccakkhmkepdoekmckoijdlc",command:"npx",args:["-y","@browsermcp/mcp@latest"],toolNames:["browser_navigate","browser_snapshot","browser_click","browser_type","browser_screenshot","browser_get_console_logs","browser_wait","browser_press_key","browser_go_back","browser_go_forward"]}],buildManagedMcpServers:function(a){let b=Array.isArray(a)?a:[],c=[],d=new Set;for(let a of b){if(!a?.name||!a?.url||d.has(a.name))continue;d.add(a.name);let b={name:a.name,url:a.url,transport:a.transport||(/\/sse(\b|\/)/i.test(a.url)?"sse":"http")};if(a.oauth&&(b.oauth=!0),Array.isArray(a.toolNames)&&a.toolNames.length>0){let c=`${a.name}-`,d=new Set;for(let b of a.toolNames){if("string"!=typeof b||!b)continue;let a=b;for(;a.startsWith(c);)a=a.slice(c.length);d.add(a)}let e={};for(let a of d)e[a]="allow",e[`${c}${a}`]="allow";b.toolPolicy=e}c.push(b)}return c}}},76476:(a,b,c)=>{c.d(b,{N:()=>n,v:()=>m});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h);let j=process.env.DATA_DIR||("win32"===process.platform?g().join(process.env.APPDATA||g().join(i().homedir(),"AppData","Roaming"),"ezrouter"):g().join(i().homedir(),".ezrouter")),k=g().join(j,"mitm","aliases.json");function l(a){let b=g().dirname(k);e().mkdirSync(b,{recursive:!0});let c=`${k}.tmp`;e().writeFileSync(c,JSON.stringify(a,null,2),"utf8"),e().renameSync(c,k)}async function m(){try{let{getMitmAlias:a}=await Promise.resolve().then(c.bind(c,9460)),b=await a();l(b||{})}catch(a){console.log("[mitmAliasCache] sync failed:",a.message)}}function n(a,b){try{let c={};if(e().existsSync(k))try{c=JSON.parse(e().readFileSync(k,"utf8"))}catch{}c[a]=b||{},l(c)}catch(a){console.log("[mitmAliasCache] write failed:",a.message)}}},94123:(a,b,c)=>{c.d(b,{Ay:()=>w,Zh:()=>v});var d=c(21820),e=c.n(d),f=c(1932),g=c(33873),h=c(29021),i=c(89718),j=c(17302),k=c(96182),l=c(76476),m=c(17113),n=c(16329);if(!process.env.MITM_SERVER_PATH)try{let a=(0,f.fileURLToPath)("file:///Volumes/Files/Projects/EzRouter/EzRouter/src/shared/services/initializeApp.js"),b=(0,g.dirname)((0,g.dirname)(a)),c=(0,g.join)(b,"mitm","server.js");(0,h.existsSync)(c)&&(process.env.MITM_SERVER_PATH=c)}catch{}try{(0,k.initDbHooks)(i.mt,i.Xx)}catch{}process.setMaxListeners(20);let o=global.__appSingleton??={signalHandlersRegistered:!1,watchdogInterval:null,networkMonitorInterval:null,lastNetworkFingerprint:null,lastWatchdogTick:Date.now(),lastOnline:null,mitmStartInProgress:!1,tunnelAutoResumed:!1,tailscaleAutoResumed:!1};async function p(){var a;await (0,i.bI)();let b=await (0,i.mt)();b.tunnelEnabled&&!o.tunnelAutoResumed&&(o.tunnelAutoResumed=!0,console.log("[InitApp] Tunnel was enabled, auto-resuming..."),s("startup").catch(a=>console.log("[InitApp] Tunnel resume failed:",a.message))),b.tailscaleEnabled&&!o.tailscaleAutoResumed&&(o.tailscaleAutoResumed=!0,console.log("[InitApp] Tailscale was enabled, auto-resuming..."),t("startup").catch(a=>console.log("[InitApp] Tailscale resume failed:",a.message))),b.tunnelEnabled&&(0,j.Al)().catch(()=>{}),b.mitmEnabled&&((0,l.v)().catch(()=>{}),q(b)),v(b),b.wakeupState?.tasks?.length&&Promise.all([c.e(7774),c.e(1522),c.e(4646),c.e(1847),c.e(9843),c.e(9761),c.e(4378),c.e(8129),c.e(5749),c.e(9865),c.e(9021),c.e(5292),c.e(6588),c.e(1733),c.e(3759),c.e(2072),c.e(369),c.e(3547),c.e(2937),c.e(3092)]).then(c.bind(c,16504)).then(({configureWakeupTasks:a})=>a(b.wakeupState)).catch(()=>console.warn("[Wakeup] Scheduler start failed.")),a=b,[a?.claudeAutoPing,a?.codexAutoPing].some(a=>Object.values(a?.connections||{}).some(Boolean)||Object.values(a?.schedules||{}).some(a=>a?.enabled===!0))&&Promise.all([c.e(7774),c.e(1522),c.e(4646),c.e(1847),c.e(9843),c.e(9761),c.e(4378),c.e(8129),c.e(5749),c.e(9865),c.e(9021),c.e(5292),c.e(6588),c.e(1733),c.e(3759),c.e(2072),c.e(369),c.e(3547),c.e(2937),c.e(4989)]).then(c.bind(c,32937)).then(({startQuotaAutoPing:a})=>a()).catch(a=>console.log("[AutoPing] scheduler start failed:",a.message)),Promise.all([c.e(1522),c.e(9843),c.e(8129),c.e(8459)]).then(c.bind(c,3256)).then(({startBackgroundTokenRefresh:a})=>a()).catch(a=>console.log("[BackgroundTokenRefresh] scheduler start failed:",a.message))}async function q(a){if(!o.mitmStartInProgress){o.mitmStartInProgress=!0;try{if(!a.mitmEnabled||(await (0,k.getMitmStatus)()).running)return;let b=await (0,k.loadEncryptedPassword)();if(!b&&"win32"!==process.platform)return void console.log("[InitApp] MITM was enabled but no saved password found, skipping auto-start");let c=(await (0,i.PX)()).find(a=>!1!==a.isActive);console.log("[InitApp] MITM was enabled, auto-starting..."),await (0,k.startMitm)(c?.key||"sk_ezrouter",b),console.log("[InitApp] MITM auto-started");try{await (0,k.restoreToolDNS)(b),console.log("[InitApp] DNS restored from saved state")}catch(a){console.log("[InitApp] DNS restore failed:",a.message)}}catch(a){console.log("[InitApp] MITM auto-start failed:",a.message)}finally{o.mitmStartInProgress=!1}}}let r=/^(startup|netchange|sleep|sleep\+netchange|online|unexpected-exit)$/;async function s(a){let b=(0,j.Qn)();if(!(await (0,i.mt)()).tunnelEnabled||b.cancelToken.cancelled||b.spawnInProgress)return;let c=r.test(a);if(!(0,j.nN)()){if(!c&&Date.now()-b.lastRestartAt<j.Lh)return void console.log(`[Tunnel] degraded but cooldown active, skip (${a})`);if(await (0,j.u7)()){console.log(`[Tunnel] safeRestart (${a}) — tunnel unreachable${c?" [force]":""}`);try{await (0,j.cb)(),b.lastRestartAt=Date.now(),console.log("[Tunnel] restart success")}catch(a){/cloudflared killed|tunnel cancelled/.test(a.message)||console.log("[Tunnel] restart failed:",a.message)}}}}async function t(a){let b=(0,j.oN)();if(!(await (0,i.mt)()).tailscaleEnabled||b.cancelToken.cancelled||b.spawnInProgress||("startup"===a?await (0,j.hp)():(0,j.Kp)()))return;if((0,j.si)()&&b.activeLocalPort){try{await (0,j.LC)(b.activeLocalPort),b.lastRestartAt=Date.now(),console.log("[Tailscale] funnel re-established (daemon alive)")}catch(a){console.log("[Tailscale] funnel recovery failed:",a.message)}return}let c=r.test(a);if(!c&&Date.now()-b.lastRestartAt<j.Lh)return void console.log(`[Tailscale] degraded but cooldown active, skip (${a})`);if(await (0,j.u7)()){console.log(`[Tailscale] safeRestart (${a}) — daemon not running${c?" [force]":""}`);try{await (0,j.mh)(),b.lastRestartAt=Date.now(),console.log("[Tailscale] restart success")}catch(a){console.log("[Tailscale] restart failed:",a.message)}}}function u(){let a=e().networkInterfaces(),b=[];for(let[c,d]of Object.entries(a))if(d&&!j.Lx.test(c))for(let a of d)a.internal||"IPv4"!==a.family||b.push(`${c}:${a.address}`);return b.sort().join("|")}function v(a){if(a?.tunnelEnabled||a?.tailscaleEnabled){!o.watchdogInterval&&(o.watchdogInterval=setInterval(()=>{s("watchdog").catch(()=>{}),t("watchdog").catch(()=>{})},j.DA),o.watchdogInterval.unref&&o.watchdogInterval.unref()),!o.networkMonitorInterval&&(o.lastNetworkFingerprint=u(),o.lastWatchdogTick=Date.now(),o.lastOnline=null,o.networkMonitorInterval=setInterval(async()=>{try{let a=Date.now(),b=a-o.lastWatchdogTick;o.lastWatchdogTick=a;let c=u(),d=c!==o.lastNetworkFingerprint,e=b>6*j.rI;d&&(o.lastNetworkFingerprint=c);let f=await (0,j.u7)(),g=!1===o.lastOnline;if(o.lastOnline=f,!f||!d&&!e&&!g)return;await new Promise(a=>setTimeout(a,j.cw));let h=g?"online":e&&d?"sleep+netchange":e?"sleep":"netchange";s(h).catch(()=>{}),t(h).catch(()=>{})}catch(a){console.log("[NetworkMonitor] error:",a.message)}},j.rI),o.networkMonitorInterval.unref&&o.networkMonitorInterval.unref());return}o.watchdogInterval&&(clearInterval(o.watchdogInterval),o.watchdogInterval=null),o.networkMonitorInterval&&(clearInterval(o.networkMonitorInterval),o.networkMonitorInterval=null,o.lastNetworkFingerprint=null,o.lastOnline=null)}let w=async function a(){try{o.signalHandlersRegistered||((0,n.Bb)(()=>{try{(0,k.removeAllDNSEntriesSync)()}catch{}try{(0,m.killAllBridges)()}catch{}(0,j.ss)()},-100),process.on("exit",()=>{try{(0,k.removeAllDNSEntriesSync)()}catch{}}),o.signalHandlersRegistered=!0),(0,j.X$)(()=>{s("unexpected-exit").catch(()=>{})}),setTimeout(()=>{p().catch(a=>console.error("[InitApp] deferred startup failed:",a.message))},3e3)}catch(a){console.error("[InitApp] Error:",a)}}}};
@@ -1 +1 @@
1
- "use strict";exports.id=4190,exports.ids=[4190],exports.modules={14190:(a,b,c)=>{c.r(b),c.d(b,{default:()=>r});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(48679),i=c(21621),j=c(5277),k=c(22393),l=c(54206),m=c(32937),n=c(71610),o=c(17660);let p=[{value:"tokens",label:"Tokens"},{value:"requests",label:"Requests"},{value:"cost",label:"Cost"}],q={tokens:{dataKey:"tokens",color:"#6366f1",gradId:"gradTokens",formatter:a=>a>=1e6?`${(a/1e6).toFixed(1)}M`:a>=1e3?`${(a/1e3).toFixed(1)}K`:String(a||0),label:"Tokens"},requests:{dataKey:"requests",color:"#14b8a6",gradId:"gradRequests",formatter:a=>String(a||0),label:"Requests"},cost:{dataKey:"cost",color:"#f59e0b",gradId:"gradCost",formatter:a=>`$${(a||0).toFixed(4)}`,label:"Cost"}};function r({period:a="7d",refreshKey:b=0}){let[c,f]=(0,e.useState)([]),[g,s]=(0,e.useState)(!0),[t,u]=(0,e.useState)("tokens");(0,e.useCallback)(async()=>{s(!0);try{let b=Intl.DateTimeFormat().resolvedOptions().timeZone,c=await fetch(`/api/usage/chart?period=${a}&tz=${encodeURIComponent(b)}`);if(c.ok){let a=await c.json();f(a)}}catch(a){console.error("Failed to fetch chart data:",a)}finally{s(!1)}},[a,b]);let v=q[t],w=c.some(a=>(a[v.dataKey]||0)>0);return(0,d.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-3 p-3 sm:p-4",children:[(0,d.jsx)("div",{className:"grid w-full items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:w-auto sm:self-start",style:{gridTemplateColumns:`repeat(${p.length}, minmax(0, 1fr))`},children:p.map(a=>(0,d.jsx)("button",{onClick:()=>u(a.value),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${t===a.value?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:a.label},a.value))}),g?(0,d.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):w?(0,d.jsx)(h.u,{width:"100%",height:220,children:(0,d.jsxs)(i.Q,{data:c,margin:{top:4,right:8,left:0,bottom:0},children:[(0,d.jsxs)("defs",{children:[(0,d.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,d.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,d.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,d.jsxs)("linearGradient",{id:"gradRequests",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,d.jsx)("stop",{offset:"5%",stopColor:"#14b8a6",stopOpacity:.25}),(0,d.jsx)("stop",{offset:"95%",stopColor:"#14b8a6",stopOpacity:0})]}),(0,d.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,d.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,d.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,d.jsx)(j.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,d.jsx)(k.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,d.jsx)(l.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:v.formatter,width:50}),(0,d.jsx)(m.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:a=>[v.formatter(a),v.label]}),(0,d.jsx)(n.Gk,{type:"monotone",dataKey:v.dataKey,stroke:v.color,strokeWidth:2,fill:`url(#${v.gradId})`,dot:!1,activeDot:{r:4}})]})}):(0,d.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}r.propTypes={period:g().string,refreshKey:g().number}}};
1
+ "use strict";exports.id=4190,exports.ids=[4190],exports.modules={14190:(a,b,c)=>{c.r(b),c.d(b,{default:()=>r});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(48679),i=c(21621),j=c(5277),k=c(22393),l=c(54206),m=c(55318),n=c(71610),o=c(17660);let p=[{value:"tokens",label:"Tokens"},{value:"requests",label:"Requests"},{value:"cost",label:"Cost"}],q={tokens:{dataKey:"tokens",color:"#6366f1",gradId:"gradTokens",formatter:a=>a>=1e6?`${(a/1e6).toFixed(1)}M`:a>=1e3?`${(a/1e3).toFixed(1)}K`:String(a||0),label:"Tokens"},requests:{dataKey:"requests",color:"#14b8a6",gradId:"gradRequests",formatter:a=>String(a||0),label:"Requests"},cost:{dataKey:"cost",color:"#f59e0b",gradId:"gradCost",formatter:a=>`$${(a||0).toFixed(4)}`,label:"Cost"}};function r({period:a="7d",refreshKey:b=0}){let[c,f]=(0,e.useState)([]),[g,s]=(0,e.useState)(!0),[t,u]=(0,e.useState)("tokens");(0,e.useCallback)(async()=>{s(!0);try{let b=Intl.DateTimeFormat().resolvedOptions().timeZone,c=await fetch(`/api/usage/chart?period=${a}&tz=${encodeURIComponent(b)}`);if(c.ok){let a=await c.json();f(a)}}catch(a){console.error("Failed to fetch chart data:",a)}finally{s(!1)}},[a,b]);let v=q[t],w=c.some(a=>(a[v.dataKey]||0)>0);return(0,d.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-3 p-3 sm:p-4",children:[(0,d.jsx)("div",{className:"grid w-full items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:w-auto sm:self-start",style:{gridTemplateColumns:`repeat(${p.length}, minmax(0, 1fr))`},children:p.map(a=>(0,d.jsx)("button",{onClick:()=>u(a.value),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${t===a.value?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:a.label},a.value))}),g?(0,d.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):w?(0,d.jsx)(h.u,{width:"100%",height:220,children:(0,d.jsxs)(i.Q,{data:c,margin:{top:4,right:8,left:0,bottom:0},children:[(0,d.jsxs)("defs",{children:[(0,d.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,d.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,d.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,d.jsxs)("linearGradient",{id:"gradRequests",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,d.jsx)("stop",{offset:"5%",stopColor:"#14b8a6",stopOpacity:.25}),(0,d.jsx)("stop",{offset:"95%",stopColor:"#14b8a6",stopOpacity:0})]}),(0,d.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,d.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,d.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,d.jsx)(j.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,d.jsx)(k.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,d.jsx)(l.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:v.formatter,width:50}),(0,d.jsx)(m.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:a=>[v.formatter(a),v.label]}),(0,d.jsx)(n.Gk,{type:"monotone",dataKey:v.dataKey,stroke:v.color,strokeWidth:2,fill:`url(#${v.gradId})`,dot:!1,activeDot:{r:4}})]})}):(0,d.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}r.propTypes={period:g().string,refreshKey:g().number}}};
@@ -0,0 +1,2 @@
1
+ "use strict";exports.id=4370,exports.ids=[4370,4989],exports.modules={47370:(a,b,c)=>{c.d(b,{BY:()=>d.BY,E5:()=>d.E5,QB:()=>d.QB,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw,wV:()=>d.wV});var d=c(33079)},58362:(a,b,c)=>{c.d(b,{EI:()=>l,xL:()=>k});var d=c(60290);let e=Object.values(d.Qn.headers);function f(a){return String(a||"").trim().replace(/[^A-Za-z0-9._:/-]+/g,"-").slice(0,d.Qn.maxTokenLength)}function g(a){let b=f(a),c=b.indexOf("/");return c>0?{leaf:b,provider:b.slice(0,c),model:b.slice(c+1)}:{leaf:b,provider:"",model:b}}function h(a){return String(a||"").split(",").map(f).filter(Boolean)}function i(a){return[...new Set(a.filter(Boolean))].slice(0,d.Qn.maxAttempts)}function j(a,b){if(!(a instanceof Response))return a;let c=new Headers(a.headers);for(let[a,d]of Object.entries(b))null!=d&&""!==d&&c.set(a,String(d));return c.set("Access-Control-Expose-Headers",i([...h(c.get("Access-Control-Expose-Headers")),...e]).join(", ")),new Response(a.body,{status:a.status,statusText:a.statusText,headers:c})}function k({requestedModel:a,resolvedModel:b},c){let e=f(a),h=g(b||e),i=h.leaf||e;return j(c,{[d.Qn.headers.requestedModel]:e||h.leaf,[d.Qn.headers.routePath]:h.leaf,[d.Qn.headers.resolvedProvider]:h.provider||"unknown",[d.Qn.headers.resolvedModel]:h.model,[d.Qn.headers.fallbackCount]:0,[d.Qn.headers.attemptedModels]:h.leaf,[d.Qn.headers.model]:i,[d.Qn.headers.routerModel]:i})}function l({comboName:a,selectedModel:b,attemptedModels:c=[]},e){if(!(e instanceof Response))return e;let k=d.Qn.headers,m=f(a),n=g(b),o=h(e.headers.get(k.routePath)),p=f(e.headers.get(k.resolvedProvider))||n.provider||"unknown",q=f(e.headers.get(k.resolvedModel))||n.model,r=i(c.map(f)),s=h(e.headers.get(k.attemptedModels)),t=Number.parseInt(e.headers.get(k.fallbackCount)||"0",10),u=e.headers.get(k.model)||(p&&"unknown"!==p?`${p}/${q}`:n.leaf||q);return j(e,{[k.requestedModel]:m,[k.routePath]:i([m,...o.length?o:[n.leaf]]).join(","),[k.resolvedProvider]:p,[k.resolvedModel]:q,[k.fallbackCount]:Math.max(0,Number.isFinite(t)?t:0)+Math.max(0,r.length-1),[k.attemptedModels]:i([...r,...s]).join(","),[k.model]:u,[k.routerModel]:u,[k.combo]:"true"})}},84370:(a,b,c)=>{c.d(b,{t8:()=>A,Vu:()=>D,Ao:()=>B,Pr:()=>E,vt:()=>H,NS:()=>x,UP:()=>C});var d=c(49263),e=c(89865),f=c(11847),g=c(60290),h=c(48644),i=c(47370);function j(a,b){if(!a||"object"!=typeof a||!b)return!1;let c=a.name||a.function?.name;return"string"==typeof c&&c===b}async function k(a,b){let c;if(!a?.body||!a.headers.get("content-type")?.toLowerCase().includes("text/event-stream"))return a;let{firstActionTimeoutMs:d,maxBytes:e}=(0,g.Ur)(),f=a.body.getReader(),h=new TextDecoder,i=[],k=0,l="",m=function(a){let b=a?.tool_choice;if(!b||"object"!=typeof b||Array.isArray(b)||!["custom","function","tool"].includes(b.type))return"";let c=b.name||b.function?.name;return"string"==typeof c?c.trim():""}(b),n=new Promise(a=>{c=setTimeout(()=>a({timedOut:!0}),d)});try{for(;;){let b=await Promise.race([f.read(),n]);if(b.timedOut)return await f.cancel("combo first-action timeout").catch(()=>{}),null;if(b.done)return await f.cancel("combo response ended before first action").catch(()=>{}),null;i.push(b.value),k+=b.value.byteLength,l+=h.decode(b.value,{stream:!0});let c=function(a,b=""){let c=/\r\n\r\n|\n\n|\r\r/g,d=0,e=!1;for(let f=c.exec(a);f;f=c.exec(a))e||=function(a,b=""){if(b)return function(a,b){let{event:c="",payload:d}=a||{};return!!d&&!!b&&("response.output_item.added"===c||"response.output_item.done"===c?j(d.item,b):"content_block_start"===c?j(d.content_block,b):"response.completed"===c?d.response?.output?.some(a=>j(a,b))===!0:d.choices?.some(a=>j(a?.delta?.function_call,b)||a?.delta?.tool_calls?.some(a=>j(a,b)))===!0)}(a,b);let{event:c="",payload:d}=a||{};return!!(("response.output_text.delta"===c||"response.refusal.delta"===c)&&d?.delta||"response.output_item.added"===c&&["function_call","custom_tool_call"].includes(d?.item?.type)||"content_block_start"===c&&d?.content_block?.type==="tool_use"||"content_block_delta"===c&&(d?.delta?.type==="text_delta"&&d.delta.text||d?.delta?.type==="input_json_delta"&&d.delta.partial_json||d?.delta?.type==="thinking_delta"&&d.delta.thinking||d?.delta?.thinking)||d?.candidates?.[0]?.content?.parts?.some(a=>a?.text||a?.functionCall||a?.inlineData)||d?.message?.content||d?.response||d?.message?.tool_calls?.length||d?.usage?.completion_tokens>0||d?.usage?.output_tokens>0||d?.response?.usage?.output_tokens>0)||d?.choices?.some(a=>"string"==typeof a?.delta?.content&&a.delta.content.length>0||"string"==typeof a?.delta?.reasoning_content&&a.delta.reasoning_content.length>0||"string"==typeof a?.delta?.reasoning&&a.delta.reasoning.length>0||Array.isArray(a?.delta?.tool_calls)&&a.delta.tool_calls.length>0||!!a?.delta?.function_call)===!0}(function(a){let b="",c=[];for(let d of a.split(/\r\n|\n|\r/))d.startsWith("event:")&&(b=d.slice(6).trim()),d.startsWith("data:")&&c.push(d.slice(5).trimStart());if(0===c.length||"[DONE]"===c.join("\n"))return null;try{let a=JSON.parse(c.join("\n"));return{event:b||a?.type||"",payload:a}}catch{return null}}(a.slice(d,f.index)),b),d=f.index+f[0].length;return{actionable:e,remainder:a.slice(d)}}(l,m);if(l=c.remainder,c.actionable||k>e)return function(a,b,c){let d=!1;return new Response(new ReadableStream({start(a){for(let b of c)a.enqueue(b)},async pull(a){if(!d)try{let{done:c,value:e}=await b.read();c?(d=!0,a.close()):a.enqueue(e)}catch(b){d=!0,a.error(b)}},async cancel(a){d=!0,await b.cancel(a)}}),{status:a.status,statusText:a.statusText,headers:a.headers})}(a,f,i)}}catch{return await f.cancel("combo pre-action read failed").catch(()=>{}),null}finally{clearTimeout(c)}}var l=c(58362);c(67677);let m=new Set(["vision","pdf","audioInput","videoInput"]),n="[Called tools: ",o="[Tool result: ";function p(a){let b;if(!a.startsWith("data:"))return!1;let c=a.slice(5).trim();if(!c||"[DONE]"===c)return!1;try{b=JSON.parse(c)}catch{return!1}if(r(b.usage)||r(b.response?.usage))return!0;let d=b.choices?.[0]?.delta;if(q(d?.content)||q(d?.reasoning_content)||q(d?.reasoning)||d?.tool_calls?.length||d?.function_call)return!0;if("content_block_delta"===b.type){let a=b.delta;if(q(a?.text)||q(a?.partial_json)||q(a?.thinking))return!0}if("content_block_start"===b.type&&b.content_block?.type==="tool_use"||"string"==typeof b.type&&b.type.endsWith(".delta")&&q(b.delta))return!0;let e=b.candidates?.[0]?.content?.parts;return!!(Array.isArray(e)&&e.some(a=>q(a?.text)||a?.functionCall||a?.inlineData)||q(b.message?.content)||q(b.response)||b.message?.tool_calls?.length)}function q(a){return"string"==typeof a&&a.length>0}function r(a){if(!a||"object"!=typeof a)return!1;let b=Number(a.completion_tokens??a.output_tokens??a.candidatesTokenCount??0);return Number.isFinite(b)&&b>0}async function s(a,b=g.Z1){if(!(a.headers.get("content-type")||"").toLowerCase().includes("text/event-stream")||!a.body)return{hasContent:!0,body:null};let c=a.body.getReader(),d=new TextDecoder("utf-8",{fatal:!1}),e=[],f=0,h="",i=!1,j=!1,k=Date.now()+b,l=null,m=new Promise(a=>{l=setTimeout(()=>a({timedOut:!0}),b)});try{for(;!i;){let a;if(Date.now()>=k)break;let b=await Promise.race([c.read(),m]);if(b?.timedOut)break;let{done:g,value:l}=b;if(g){j=!0,(h+=d.decode()).trim()&&p(h.trim())&&(i=!0);break}for(e.push(l),f+=l.byteLength,h+=d.decode(l,{stream:!0});-1!==(a=h.indexOf("\n"));){let b=h.slice(0,a).trim();if(h=h.slice(a+1),p(b)){i=!0;break}}if(i)break;if(f>=262144){i=!0;break}}}catch{i=!1}finally{l&&clearTimeout(l)}return i?{hasContent:!0,body:new ReadableStream({start(a){for(let b of e)a.enqueue(b);e.length=0,j&&a.close()},async pull(a){if(!j)try{let{done:b,value:d}=await c.read();if(b){j=!0,a.close();return}a.enqueue(d)}catch(b){a.error(b)}},cancel(a){c.cancel(a).catch(()=>{})}})}:(await c.cancel().catch(()=>{}),{hasContent:!1,body:null})}function t(a){let b=a[a.length-1];return b?.role!=="assistant"&&b?.role!=="model"?a:[...a,{role:"user",content:"Continue from where the previous assistant message left off."}]}function u(a){return a.filter(a=>a).map(a=>{if("tool"===a.role||"function"===a.role)return{role:"user",content:`${o}${(0,h.kU)(a.content)||String(a.content??"")}]`};if("assistant"===a.role&&Array.isArray(a.tool_calls)){let{tool_calls:b,...c}=a,d=b.map(a=>a?.function?.name||a?.name||"tool").join(", "),e=(0,h.kU)(c.content)||("string"==typeof c.content?c.content:"");return{...c,content:`${e}${e?"\n":""}${n}${d}]`}}if(Array.isArray(a.content)){let b=a.content.some(a=>"tool_use"===a.type),c=a.content.some(a=>"tool_result"===a.type);if(b||c){let b=[],c=[],d=[];for(let e of a.content)"text"===e.type&&e.text&&b.push(e.text),"tool_use"===e.type&&c.push(e.name||"tool"),"tool_result"===e.type&&d.push((0,h.kU)(e.content)||String(e.content??""));let{...e}=a,f=b.join("\n");return c.length>0&&(f=`${f}${f?"\n":""}${n}${c.join(", ")}]`),d.length>0&&(f=`${f}${f?"\n":""}${o}${d.join("\n")}]`),{...e,content:f}}}return a})}let v=new Map;function w(a){let b=v.get(a);return!!b&&(!(Date.now()>=b)||(v.delete(a),!1))}function x(a,b,c){if(!Array.isArray(a)||0===a.length||!b)return a;let d=(c&&Object.keys(c).length>0?c:function(a){if(!Array.isArray(a)||0===a.length)return{};let b=a.length-1;return{REASONING:a[0],COMPLEX:a[0],MEDIUM:a[Math.ceil(b/2)],SIMPLE:a[b]}}(a))[b];if("string"!=typeof d||!d.trim())return a;let e=a.indexOf(d);return 0===e?a:e>0?[d,...a.filter((a,b)=>b!==e)]:[d,...a]}let y=new Map;function z(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 A(a){let b=new Set;if(!a||"object"!=typeof a)return b;let c=a=>{"string"==typeof a&&(a.startsWith("image/")?b.add("vision"):a.startsWith("audio/")?b.add("audioInput"):"application/pdf"===a&&b.add("pdf"))},d=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")},e=a=>{if(Array.isArray(a))for(let b of a)d(b)},f=a=>{if(!a||"object"!=typeof a)return;Array.isArray(a.images)&&a.images.length>0&&b.add("vision");let d=a.experimental_attachments||a.attachments;if(Array.isArray(d))for(let a of d){if(!a)continue;let d=a.contentType||a.mediaType||"string"==typeof a.url&&a.url.match(/^data:([^;,]+)/)?.[1];d?c(d):(a.url||a.data)&&b.add("vision")}(a.image_url||a.image)&&b.add("vision"),(a.audio_url||a.audio)&&b.add("audioInput"),e(a.content),"string"==typeof a.content&&(a.content.includes("data:image/")?b.add("vision"):a.content.includes("data:audio/")?b.add("audioInput"):a.content.includes("data:application/pdf")&&b.add("pdf"))};for(let b of z(a.messages))f(b);for(let b of z(a.input))e(b.content);for(let b of z(a.contents||a.request?.contents))e(b.parts);return b}function B(a,b,c,d=1,e=null){let f;if("weighted"===c&&Array.isArray(e)&&e.length>1)return e.map(a=>({m:a,key:Math.pow(Math.random(),1/(a.weight||1))})).sort((a,b)=>b.key-a.key).map(a=>a.m).map(a=>a.id);if("weighted"===c&&a&&a.length>1)return[...a].sort(()=>Math.random()-.5);if(!a||a.length<=1||"round-robin"!==c)return a;let g=b||"__default__",h=Number.isFinite(f=Number.parseInt(d,10))&&f>0?f:1,i=y.get(g),j="number"==typeof i?{index:i,consecutiveUseCount:0}:i||{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>=h?y.set(g,{index:(k+1)%a.length,consecutiveUseCount:0}):y.set(g,{index:k,consecutiveUseCount:m}),l}function C(a){a?y.delete(a):y.clear()}function D(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 E({body:a,models:b,members:c,policy:g,handleSingleModel:h,log:j,comboName:n,comboStrategy:o,comboStickyLimit:p=1,autoSwitch:q=!0,isModelLocked:r=null}){let t=Array.isArray(c)&&c.length>0?c.map(a=>"string"==typeof a?{id:a,weight:1}:a&&"string"==typeof a.id?{id:a.id,weight:Number.isFinite(a.weight)&&a.weight>0?a.weight:1,retryOn:a.retryOn,skipOn:a.skipOn,timeoutMs:a.timeoutMs}:null).filter(Boolean):Array.isArray(b)?b.map(a=>({id:a,weight:1})):[],u=B(t.length?t.map(a=>a.id):b,n,o,g?.sticky??p,t.length?t:null),x=null;if(t.length){let a=new Map(t.map(a=>[a.id,a]));x=u.map(b=>a.get(b)).filter(Boolean)}if(q){let b=A(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=>m.has(a)),d=[...b].filter(a=>!m.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.getCapabilitiesForModel)(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)}(u,b);a[0]!==u[0]&&j.info("COMBO",`auto-switch for [${[...b].join(",")}] → ${a[0]}`),u=a}}let y=function(a,b=w){if(!Array.isArray(a)||a.length<=1)return a;let c=[],d=[];for(let e of a)b&&b(e)?d.push(e):c.push(e);return d.length>0&&c.length>0?[...c,...d]:a}(u,a=>w(a)||"function"==typeof r&&r(a));y[0]!==u[0]&&j.info("COMBO",`health-floating: [${y[0]}] promoted to front over locked models`),u=y;let z=null,C=null,D=null;for(let b=0;b<u.length;b++){let c=u[b];j.info("COMBO",`Trying model ${b+1}/${u.length}: ${c}`);try{let e=await h(a,c);if(e.ok){let d=e.headers?.get?.("content-type")||"",f=!1;if(d.includes("application/json"))try{let a=await e.clone().json();f=function(a){if(!a||"object"!=typeof a)return!1;if(Array.isArray(a.choices)){if(0===a.choices.length)return!0;let b=a.choices[0];if(!b)return!0;let c=b.message||b.delta,d=c?.content,e="string"==typeof d?d.trim().length>0:Array.isArray(d)&&d.length>0,f=Array.isArray(c?.tool_calls)&&c.tool_calls.length>0||!!c?.function_call,g="string"==typeof c?.reasoning_content&&c.reasoning_content.trim().length>0,h=b.finish_reason;if(!e&&!f&&!g&&("stop"!==h&&"length"!==h&&"tool_calls"!==h&&"function_call"!==h||"in_progress"===h||"incomplete"===h))return!0}if(Array.isArray(a.content)){let b=a.content.some(a=>"text"===a.type&&a.text?.trim().length>0||"tool_use"===a.type),c=a.stop_reason;if(!b&&(!c||"in_progress"===c||"incomplete"===c))return!0}return!1}(a)||function(a){if(!a||"object"!=typeof a)return!0;if(F(a))return!1;let b=a.choices?.[0]?.message;if(b&&(Array.isArray(b.tool_calls)&&b.tool_calls.length>0||"string"==typeof b.reasoning_content&&b.reasoning_content.trim())||Array.isArray(a.content)&&a.content.filter(a=>a&&"text"!==a.type&&""!==a.text).length>0)return!1;let c=a.candidates?.[0]?.content?.parts;if(Array.isArray(c)&&c.some(a=>a?.functionCall))return!1;let d=a.choices?.[0]?.finish_reason??a.stop_reason;return!d||"in_progress"===d||"incomplete"===d||"null"===d||null===d}(a)}catch{}if(f){j.warn("COMBO",`Model ${c} returned 2xx with no usable content, trying next`),z="empty response from upstream";continue}let{hasContent:g,body:h}=await s(e);if(!g){z="provider returned an empty stream",D||(D=503),j.warn("COMBO",`Model ${c} returned an empty stream, trying next`);continue}let i=h?new Response(h,{status:e.status,statusText:e.statusText,headers:e.headers}):e,m="fallback"===o||void 0===o&&Array.isArray(a?.tools)&&a.tools.length>0?await k(i,a):i;if(m)return v.delete(c),j.info("COMBO",`Model ${c} succeeded \xb7 ATTEMPT ${b+1}/${u.length}`),(0,l.EI)({comboName:n||a?.model,selectedModel:c,attemptedModels:u.slice(0,b+1)},m);z="Response ended before its first actionable event",D||(D=502),j.warn("COMBO",`Model ${c} produced no action, trying next`);continue}let f=e.statusText||"",m=null,p=null;try{p=await e.clone().json(),f=p?.error?.message||p?.error||p?.message||f,m=p?.retryAfter||null}catch{}if(m&&(!C||new Date(m)<new Date(C))&&(C=m),"string"!=typeof f)try{f=JSON.stringify(f)}catch{f=String(f)}if(429===e.status||503===e.status||502===e.status||504===e.status){let a=function(a,b,c){if(b?.retryAfter){let a=new Date(b.retryAfter).getTime();if(Number.isFinite(a)&&a>Date.now())return a-Date.now()}let d=Number(a?.headers?.get?.("retry-after"));if(Number.isFinite(d)&&d>0)return 1e3*d;if("string"==typeof c){let a=c.match(/reset after (?:(\d+)h\s*)?(?:(\d+)m\s*)?(?:(\d+)s)?/i);if(a){let b=Number(a[1]||0),c=Number(a[2]||0),d=(3600*b+60*c+Number(a[3]||0))*1e3;if(d>0)return d}}return null}(e,p,f)||6e4;!function(a,b=null,c=6e4){let d=null;if("number"==typeof b&&Number.isFinite(b)&&b>0)d=b>1e12?b:Date.now()+b;else if("string"==typeof b&&b.trim()){let a=new Date(b).getTime();Number.isFinite(a)&&a>Date.now()&&(d=a)}(!d||!Number.isFinite(d)||d<=Date.now())&&(d=Date.now()+c),v.set(a,d)}(c,a)}let q=x?x[b]:null;if(g?.maxHops&&b+1>=g.maxHops)return j.warn("COMBO",`Model ${c} failed - maxHops ${g.maxHops} reached`,{status:e.status}),(0,l.EI)({comboName:n||a?.model,selectedModel:c,attemptedModels:u.slice(0,b+1)},e);if(g||q){let{shouldFallback:h,advanceChain:i}=function(a,b,c,e){let f=(b||"").toLowerCase();if(e?.skipOn){let b=e.skipOn;if(Array.isArray(b.statuses)&&b.statuses.includes(a)||Array.isArray(b.texts)&&b.texts.some(a=>f.includes(String(a).toLowerCase())))return{shouldFallback:!1,cooldownMs:0}}if(e?.retryOn){let c=e.retryOn;if(Array.isArray(c.statuses)&&c.statuses.includes(a)||Array.isArray(c.texts)&&c.texts.some(a=>f.includes(String(a).toLowerCase())))return(0,d.hk)(a,b);if(c.statuses&&c.statuses.length||c.texts&&c.texts.length)return{shouldFallback:!1,cooldownMs:0}}if(c?.triggers){let e=c.triggers;if(e.fatal&&(Array.isArray(e.fatal.statuses)&&e.fatal.statuses.includes(a)||Array.isArray(e.fatal.texts)&&e.fatal.texts.some(a=>f.includes(String(a).toLowerCase()))))return{shouldFallback:!1,cooldownMs:0};if(e.retryable){if(Array.isArray(e.retryable.statuses)&&e.retryable.statuses.includes(a)||Array.isArray(e.retryable.texts)&&e.retryable.texts.some(a=>f.includes(String(a).toLowerCase())))return(0,d.hk)(a,b);if(e.retryable.statuses&&e.retryable.statuses.length||e.retryable.texts&&e.retryable.texts.length)return{shouldFallback:!1,cooldownMs:0}}}return(0,d.hk)(a,b)}(e.status,f,g,q);if(!h&&!i)return j.warn("COMBO",`Model ${c} failed (no fallback)`,{status:e.status}),(0,l.EI)({comboName:n||a?.model,selectedModel:c,attemptedModels:u.slice(0,b+1)},e)}else{let{shouldFallback:g,advanceChain:h}=(0,d.hk)(e.status,f);if(!g&&!h)return j.warn("COMBO",`Model ${c} failed (no fallback)`,{status:e.status}),(0,l.EI)({comboName:n||a?.model,selectedModel:c,attemptedModels:u.slice(0,b+1)},e)}z=f||String(e.status),D=e.status,j.warn("COMBO",`Model ${c} failed, trying next`,{status:e.status});let r=c.includes("/")?c.slice(0,c.indexOf("/")):"unknown",t=c.includes("/")?c.slice(c.indexOf("/")+1):c;(0,i.QB)({endpoint:"/v1/chat/completions",provider:r,model:t,connectionId:`combo-${n||c}`,comboName:n||null,statusCode:e.status,errorMessage:f||e.statusText,request:null,providerRequest:null,providerResponse:null,meta:{fallback:!0,retryAfter:m,retryAfterHuman:m?(0,d.Qo)(m):null,latency:{}}}).catch(()=>{})}catch(a){z=a.message||String(a),D=500,j.warn("COMBO",`Model ${c} threw error, trying next`,{error:z})}}let G=z&&z.toLowerCase().includes("no credentials")?503:(0,e.fP)(D||503,z),H=z||"All combo models unavailable";if(C){let b=(0,d.Qo)(C);return j.warn("COMBO",`All models failed | ${G} | ${H} (${b})`),(0,l.EI)({comboName:n||a?.model,selectedModel:"failed",attemptedModels:u},(0,e.wO)(G,H,C,b))}return j.warn("COMBO",`All models failed | ${H}`),(0,l.EI)({comboName:n||a?.model,selectedModel:"failed",attemptedModels:u},new Response(JSON.stringify({error:{message:H}}),{status:G,headers:{"Content-Type":"application/json"}}))}function F(a){if(!a||"object"!=typeof a)return"";let b=a.choices?.[0];if(b){let a=b.message??b.delta??{},c=(0,h.kU)(a.content);if(c.trim())return c;if("string"==typeof b.text&&b.text.trim())return b.text}let c=(0,h.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""}let G={minPanel:2,stragglerGraceMs:8e3,panelHardTimeoutMs:9e4};async function H({body:a,models:b,handleSingleModel:c,log:d,comboName:e,judgeModel:f,tuning:g}){var h;let i,j,k=Array.isArray(b)?b.filter(Boolean):[];if(0===k.length)return new Response(JSON.stringify({error:{message:"Fusion combo has no models"}}),{status:400,headers:{"Content-Type":"application/json"}});if(1===k.length)return c(a,k[0]);let l={...G,...g||{}},m=Math.min(Math.max(2,l.minPanel),k.length),n=f&&f.trim()?f.trim():k[0];d.info("FUSION",`Combo "${e}" | panel=${k.length} [${k.join(", ")}] | judge=${n} | quorum=${m}`);let{tools:o,tool_choice:p,stream_options:q,...r}=a,s={...r,stream:!1};Array.isArray(s.messages)?s.messages=t(u(s.messages)):Array.isArray(s.input)&&(s.input=t(u(s.input)));let v=Date.now(),w=k.map(a=>{var b,d;return b=c(s,a,!0),d=l.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,{...l,minPanel:m});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=k[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=F(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=(i=y.map((a,b)=>`[Source ${b+1}]
2
+ ${a.text}`).join("\n\n"),h=[`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 ===",i,"=== END PANEL RESPONSES ===\n\nNow write the final answer to the user's original request."].join("\n"),j={...a},Array.isArray(a.messages)?j.messages=[...a.messages,{role:"user",content:h}]:Array.isArray(a.input)?j.input=[...a.input,{role:"user",content:h}]:Array.isArray(a.contents)?j.contents=[...a.contents,{role:"user",parts:[{text:h}]}]:j.messages=[{role:"user",content:h}],j);return d.info("FUSION",`Judging ${y.length} answers with ${n}`),c(z,n)}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=4642,exports.ids=[4642,4989],exports.modules={9001:(a,b,c)=>{c.d(b,{PY:()=>ak,exchangeTokens:()=>ag,extractCodexAccountInfo:()=>e.YR,fetchKiroProfileArn:()=>e.gR,kP:()=>af,sO:()=>ae,Su:()=>ai,Re:()=>ah}),c(30369);var d=c(13808),e=c(53129),f=c(92990);let g={config:f.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})},h={config:f.DI,flowType:"authorization_code_pkce",fixedPort:f.DI.fixedPort,callbackPath:f.DI.callbackPath,buildAuthUrl:(a,b,c,d)=>{let e=Object.entries({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}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${e}`},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,e.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,e.J_)(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}};var i=c(55511),j=c.n(i),k=c(73159);let l=null;async function m(){if(l)return l;try{let a=await fetch(k.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return l={authorizeUrl:(0,e.js)(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:(0,e.js)(b.token_endpoint,"token_endpoint")}}}catch{}return l={authorizeUrl:k.oT.authorizeUrl,tokenUrl:k.oT.tokenUrl}}let n={config:k.oT,flowType:"authorization_code_pkce",fixedPort:k.oT.loopbackPort,callbackPath:k.oT.callbackPath,pkceVerifierBytes:k.Ue,prepareConfig:async a=>{let b=await m();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let e=j().randomBytes(16).toString("hex"),f=Object.entries({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"}).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(`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,e.pG)(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}};var o=c(13247);let p={config:f.qp,flowType:"device_code",requestDeviceCode:async a=>{let b=new URLSearchParams({client_id:a.clientId,scope:a.scope});a.referrer&&b.set("referrer",a.referrer);let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":o.hY},body:b});if(!c.ok){let a=await c.text();throw Error(`Grok CLI device code request failed: ${a}`)}return await c.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","User-Agent":o.hY},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch("https://cli-chat-proxy.grok.com/v1/user",{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","User-Agent":o.hY,"x-xai-token-auth":"xai-grok-cli","x-grok-client-version":o.uG}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=(0,e.pG)(a.id_token)||(0,e.J_)(a.access_token)||b?.user?.email||null,d=b?.user?.userId||b?.user?.principalId||null,f=[b?.user?.firstName,b?.user?.lastName].filter(Boolean).join(" ").trim()||null,g=a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null;return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:g,scope:a.scope,email:c||void 0,displayName:f||void 0,providerSpecificData:{authMethod:"device_code",idToken:a.id_token||null,email:c||null,userId:d,hasGrokCodeAccess:b?.user?.hasGrokCodeAccess??null,subscriptionTier:b?.user?.subscriptionTier??null}}}},q="1.0.0",r={config:f.sA,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","x-api-version":q},body:new URLSearchParams({client_id:a.clientId})});if(!b.ok){let a=await b.text();throw Error(`Muse Code 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","x-api-version":q},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{let b,c;for(let c=0;(429===(b=await fetch("https://api.meta.ai/muse-code/key",{method:"POST",headers:{Accept:"application/json",Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","x-api-version":q},body:JSON.stringify({onboard:!0}),redirect:"error"})).status||b.status>=500)&&!(c>=2);c++)await new Promise(a=>setTimeout(a,5e3*(c+1)));let d=await b.text();if(!b.ok){let a=`${b.status} ${d.slice(0,200)}`;try{let b=JSON.parse(d);(b?.title||b?.detail)&&(a=[b.title,b.detail].filter(Boolean).join(": "),b.action_url&&(a+=` — ${b.action_url}`))}catch{}throw Error(`Muse Code key mint failed: ${a}`)}try{c=JSON.parse(d)}catch{throw Error("Muse Code key mint returned invalid JSON")}if(!1===c.is_subs_active)throw Error("Muse Code subscription is inactive — activate it on muse.ai first");let e=c.action_url||c.require_payment_action_url;if(!c.api_key&&(c.require_payment||e))throw Error(`Muse Code subscription required${e?`: ${e}`:""}`);if(!c.api_key)throw Error("Muse Code key response is missing api_key");return{key:c}},mapTokens:(a,b)=>{let c=b?.key||{};return{accessToken:c.api_key,refreshToken:null,expiresIn:null,email:c.user_email?.trim().toLowerCase()||void 0,providerSpecificData:{authMethod:"device_code",oauthAccessToken:a.access_token,subscriptionTier:c.subs_tier_name||null}}}},s={config:f.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(`${f.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,f.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})},t={config:f.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}),signal:AbortSignal.timeout(1e4)});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":f.YT.loadCodeAssistUserAgent,"x-request-source":"local"},c=(0,f.cD)(),d={};try{let b=await fetch(`${f.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"},signal:AbortSignal.timeout(5e3)});b.ok&&(d=await b.json())}catch(a){console.log("Failed to fetch user info:",a)}let e="",g="legacy-tier";try{let a=await fetch(f.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c}),signal:AbortSignal.timeout(5e3)});if(a.ok){let b=await a.json();if(e=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 e&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(f.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:d,projectId:e}},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})},u={config:f.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(`${f.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})};function v(a){return{config:a,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(3912).then(c.bind(c,91531)),d=await new b(a).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,_qoderMachineToken:d.machineToken}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(3912).then(c.bind(c,91531)),h=new g(a),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.max(86400,Math.floor((f.expireTime-Date.now())/1e3));return{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:l,_qoderUserId:f.userId,_qoderMachineId:e?._qoderMachineId||"",_qoderMachineToken:e?._qoderMachineToken||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||"",machineToken:a._qoderMachineToken||a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}}}let w=v(f.hF),x=v(f.t3),y={config:f.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(a){c={error:"invalid_response",error_description:await d.text()}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(f.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":f.Nu.apiVersion,"User-Agent":f.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(f.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":f.Nu.apiVersion,"User-Agent":f.Nu.userAgent}});return{copilotToken:c,userInfo:d.ok?await d.json():{}}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,name:b?.userInfo?.login||b?.userInfo?.name,displayName:b?.userInfo?.name||b?.userInfo?.login,email:b?.userInfo?.email||null,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}})},z={config:f.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,f.S6)(d);let e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,g="idc"===c.authMethod?"idc":"builder-id",h=`https://oidc.${d}.amazonaws.com/client/register`,i=`https://oidc.${d}.amazonaws.com/device_authorization`,j=await fetch(h,{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(!j.ok){let a=await j.text();throw Error(`Client registration failed: ${a}`)}let k=await j.json(),l=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:k.clientId,clientSecret:k.clientSecret,startUrl:e})});if(!l.ok){let a=await l.text();throw Error(`Device authorization failed: ${a}`)}let m=await l.json();return{device_code:m.deviceCode,user_code:m.userCode,verification_uri:m.verificationUri,verification_uri_complete:m.verificationUriComplete,expires_in:m.expiresIn,interval:m.interval||5,_clientId:k.clientId,_clientSecret:k.clientSecret,_region:d,_authMethod:g,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,g=d?._region||"us-east-1";(0,f.S6)(g);let h=`https://oidc.${g}.amazonaws.com/token`,i=await fetch(h,{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 i.json()}catch(a){e={error:"invalid_response",error_description:await i.text()}}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,e.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||f.Tx.startUrl}}}},A={config:f.WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})},B={config:f.aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,28730)),d=j().randomUUID(),e={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...b(d)},f=await fetch(a.deviceCodeUrl,{method:"POST",headers:e,body:new URLSearchParams({client_id:a.clientId})});if(!f.ok){let a=await f.text();throw Error(`Device code request failed: ${a}`)}let g=await f.json(),h=a.authorizeDeviceUrl||"https://www.kimi.com/code/authorize_device";return{device_code:g.device_code,user_code:g.user_code,verification_uri:g.verification_uri||h,verification_uri_complete:g.verification_uri_complete||`${h}?user_code=${g.user_code}`,expires_in:g.expires_in,interval:g.interval||5,_kimiDeviceId:d}},pollToken:async(a,b,d,e)=>{let f,{buildKimiHeaders:g}=await Promise.resolve().then(c.bind(c,28730)),h=e?._kimiDeviceId,i={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...g(h)},j=await fetch(a.tokenUrl,{method:"POST",headers:i,body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{f=await j.json()}catch{f={error:"invalid_response",error_description:"non-json token response"}}return"authorization_pending"===f.error||"slow_down"===f.error?{ok:!0,data:f}:(f.access_token&&h&&(f._kimiDeviceId=h),{ok:j.ok||!!f.access_token||!!f.error,data:f})},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{authMethod:"device_code",...a._kimiDeviceId?{deviceId:a._kimiDeviceId}:{}}})},C={config:f.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}}:{}})},D={config:f.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}})},E={config:f.w1,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.tokenUrl,{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(`ClinePass 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}})},F={config:f.f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=new URLSearchParams({client_id:e.clientId||"",redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${g.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"}})},G={config:f.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}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{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-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});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",expires_in:d.data.expiresIn}}: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:a.expires_in||86400,providerSpecificData:{}})},H={config:f.DV,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":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy Intl state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy Intl 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}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});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",expires_in:d.data.expiresIn}}: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:a.expires_in||86400,providerSpecificData:{}})},I={config:f.Td,flowType:"browser_token",buildAuthUrl:(a,b,c)=>{let d=(a.webAppUrl||"https://app.kimchi.dev").replace(/\/+$/,""),e=new URLSearchParams({callback:b,state:c});return`${d}/cli-auth?${e.toString()}`},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!c)throw Error("Missing Kimchi token");let d=a.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",e=await fetch(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});if(!e.ok)throw Error(`Kimchi token validation failed: ${e.status}`);let f={};if(a.userInfoUrl)try{let b=await fetch(a.userInfoUrl,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});b.ok&&(f=await b.json())}catch{f={}}return{access_token:c,token_type:"Bearer",_kimchiUser:f}},mapTokens:a=>{let b=a._kimchiUser||{},c=b.id?String(b.id):"",d=b.username||"",e=b.email||(c?`kimchi-user-${c}`:null);return{accessToken:a.access_token,refreshToken:null,email:e,displayName:b.name||d||null,providerSpecificData:{authMethod:"browser_token",userId:c,username:d}}}};function J(a,b){for(let c of b){let b=a;for(let a of c){if(null==b||"object"!=typeof b){b=void 0;break}b=b[a]}if("string"==typeof b&&b.trim())return b.trim();if("number"==typeof b)return String(b)}return null}async function K(a){let b=JSON.stringify({loginTraceID:a,login_trace_id:a}),c="no successful response";for(let a of f.SK.loginGuidanceUrls)try{let d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent},body:b});if(!d.ok){c=`${a} HTTP ${d.status}`;continue}let e=await d.json(),g=J(e,[["Result","LoginHost"],["Result","loginHost"],["Result","LoginURL"],["result","loginHost"],["data","Result","LoginHost"],["data","loginHost"],["LoginHost"],["loginHost"]]);if(g)return g;c=`${a} missing LoginHost`}catch(b){c=`${a} ${b.message}`}throw Error(`Trae GetLoginGuidance failed: ${c}`)}function L(){return[...f.SK.apiOrigins]}async function M(a,b){let c=JSON.stringify({ClientID:f.SK.clientId,RefreshToken:a,ClientSecret:f.SK.clientSecret,UserID:""}),d="no successful response";for(let e of L()){let g=`${e.replace(/\/$/,"")}${f.SK.exchangeTokenPath}`;try{let e,h={Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent};b&&(h["x-cloudide-token"]=b);let i=await fetch(g,{method:"POST",headers:h,body:c}),j=await i.text();if(!i.ok){d=`${g} HTTP ${i.status}`;continue}try{e=JSON.parse(j)}catch{d=`${g} invalid JSON`;continue}let k=J(e,[["Result","AccessToken"],["Result","accessToken"],["result","access_token"],["accessToken"]]);if(!k){let a=J(e,[["message"],["msg"],["error"],["Result","Message"]])||"missing AccessToken";d=`${g} ${a}`;continue}return{accessToken:k,refreshToken:J(e,[["Result","RefreshToken"],["result","refresh_token"],["refreshToken"]])||a,expiresIn:null,expiresAt:J(e,[["Result","ExpiresAt"],["Result","expiresAt"],["result","expires_at"],["expiresAt"]])}}catch(a){d=`${g} ${a.message}`}}throw Error(`Trae ExchangeToken failed: ${d}`)}async function N(a){for(let b of L()){let c=`${b.replace(/\/$/,"")}${f.SK.getUserInfoPath}`;try{let b=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent,"x-cloudide-token":a},body:JSON.stringify({})});if(!b.ok)continue;let d=await b.json();return{email:J(d,[["Result","NonPlainTextEmail"],["Result","Email"],["Result","email"],["email"],["data","email"]]),name:J(d,[["Result","ScreenName"],["Result","Nickname"],["Result","Name"],["result","nickname"],["nickname"],["name"]]),aiRegion:J(d,[["Result","AIRegion"],["Result","aiRegion"],["aiRegion"]]),region:J(d,[["Result","Region"],["Result","region"],["region"]]),tenant:J(d,[["Result","TenantID"],["Result","tenantId"],["tenantId"]]),userId:J(d,[["Result","UserID"],["Result","userId"],["userId"]])}}catch{}}return{email:null,name:null}}let O={config:f.SK,flowType:"authorization_code",callbackPath:f.SK.callbackPath,prepareConfig:async a=>{let b=j().randomUUID(),c=await K(b);return{...a,loginTraceID:b,loginHost:c}},buildAuthUrl:(a,b,c)=>{var d;let e,g,h={plugin_version:f.SK.defaultPluginVersion,machine_id:j().randomUUID(),device_id:f.SK.defaultDeviceId,x_device_brand:"unknown",x_device_type:"unknown",x_os_version:"unknown",x_env:"",x_app_version:f.SK.defaultAppVersion,x_app_type:f.SK.defaultAppType},i=a.loginTraceID||c;return d=a.loginHost,(e=new URL(d.startsWith("http")?d:`https://${d.replace(/^\/+/,"")}`)).pathname=f.SK.authorizationPath,(g=new URLSearchParams).set("login_version","1"),g.set("auth_from","trae"),g.set("login_channel","native_ide"),g.set("plugin_version",h.plugin_version),g.set("auth_type","local"),g.set("client_id",f.SK.clientId),g.set("redirect","0"),g.set("login_trace_id",i),g.set("auth_callback_url",b),g.set("machine_id",h.machine_id),g.set("device_id",h.device_id),g.set("x_device_id",h.device_id),g.set("x_machine_id",h.machine_id),g.set("x_device_brand",h.x_device_brand),g.set("x_device_type",h.x_device_type),g.set("x_os_version",h.x_os_version),g.set("x_env",h.x_env),g.set("x_app_version",h.x_app_version),g.set("x_app_type",h.x_app_type),e.search=g.toString(),e.toString()},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!(/[?=&]/.test(c)&&(c.includes("refreshToken")||c.includes("refresh_token"))))return{accessToken:c.replace(/^(Cloud-IDE-JWT|Bearer)\s+/i,""),refreshToken:null,expiresIn:24*f.SK.tokenLifetimeDays*3600,_authMethod:"imported"};let{refreshToken:d,cloudideToken:e}=function(a){let b=String(a||"").trim(),c=b;b.includes("?")&&(c=b.slice(b.indexOf("?")+1)),b.startsWith("#")&&(c=b.slice(1));let d=Object.fromEntries(new URLSearchParams(c)),e=a=>{for(let b of a){let a=d[b];if(a&&String(a).trim())return String(a).trim()}return null},f=e(["error","error_code","errorCode"]);if(f){let a=e(["error_description","error_desc","message"]);throw Error(a?`Trae auth failed: ${f} (${a})`:`Trae auth failed: ${f}`)}let g=e(["refreshToken","refresh_token","RefreshToken"]);if(!g)throw Error("Trae callback missing refreshToken");let h=e(["loginHost","login_host","LoginHost","host","consoleHost"]);if(!h)throw Error("Trae callback missing loginHost");return{refreshToken:g,loginHost:h,cloudideToken:e(["x-cloudide-token","xCloudideToken","accessToken","access_token","token"])}}(c);return{...await M(d,e),_authMethod:"oauth"}},postExchange:async a=>({userInfo:await N(a.accessToken)}),mapTokens:(a,b)=>{let c,d=a.expiresIn||(a.expiresAt?Math.max(60,Number(a.expiresAt)-Math.floor(Date.now()/1e3)):24*f.SK.tokenLifetimeDays*3600),e=b?.userInfo||{},g=e.aiRegion||"US-East";return{accessToken:a.accessToken,refreshToken:a.refreshToken,expiresIn:d,email:e.email||void 0,displayName:e.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",aiRegion:g,region:e.region||g,tenant:e.tenant||"marscode",userId:e.userId||"",scope:"sg"===(c=(g||"").toLowerCase())||c.includes("singapore")?"marscode-sg":"cn"===c||c.includes("cn")||c.includes("china")?"marscode-cn":"marscode-us",webId:"",bizUserId:"",userUniqueId:"",appLanguage:"en",appVersion:f.SK.defaultAppVersion,userRegion:"SG"===g?"SG":"US",userIdentity:"Free"}}}};async function P(a,b,c){let d=`${a.replace(/\/$/,"")}${b}`,e=await fetch(d,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.eD.userAgent},body:JSON.stringify(c)}),g=await e.text();if(!e.ok)throw Error(`Windsurf ${b} HTTP ${e.status}: ${g.slice(0,200)}`);try{return JSON.parse(g)}catch{throw Error(`Windsurf ${b} invalid JSON`)}}async function Q(a){let b=await P(f.eD.registerApiBaseUrl,f.eD.registerPath,{firebase_id_token:a}),c=J(b,[["apiKey"],["api_key"]]);if(!c)throw Error("Windsurf RegisterUser missing apiKey");return{apiKey:c,apiServerUrl:J(b,[["apiServerUrl"],["api_server_url"]])||f.eD.defaultApiServerUrl,name:J(b,[["name"]])}}async function R(a,b){try{let c=await P(a,f.eD.oneTimeAuthPath,{firebaseIdToken:b}),d=J(c,[["authToken"],["auth_token"]]);if(!d)return{email:null,name:null};let e=await P(a,f.eD.currentUserPath,{authToken:d,includeSubscription:!0}),g=e.user||e;return{email:J(g,[["email"]]),name:J(g,[["name"]])}}catch{return{email:null,name:null}}}let S={config:f.eD,flowType:"authorization_code",callbackPath:f.eD.callbackPath,buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({response_type:"token",client_id:a.clientId,redirect_uri:b,state:c,prompt:"login",redirect_parameters_type:"query",workflow:"onboarding"});return`${a.authBaseUrl}${a.signInPath}?${d.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=String(b||"").trim();if(!(f.includes("?")||f.includes("access_token="))){let b=f.replace(/^Bearer\s+/i,"");if(b.startsWith("sk-ws-"))return{accessToken:b,refreshToken:null,expiresIn:null,apiServerUrl:a.defaultApiServerUrl,firebaseIdToken:null,_authMethod:"imported"};let c=await Q(b);return{accessToken:c.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:c.apiServerUrl,firebaseIdToken:b,_authMethod:"imported"}}let{firebaseIdToken:g}=function(a,b){let c=String(a||"").trim(),d=c;c.includes("?")&&(d=c.slice(c.indexOf("?")+1)),c.startsWith("#")&&(d=c.slice(1));let e=Object.fromEntries(new URLSearchParams(d)),f=a=>{for(let b of a){let a=e[b];if(a&&String(a).trim())return String(a).trim()}return null},g=f(["error"]);if(g){let a=f(["error_description"]);throw Error(a?`Windsurf auth failed: ${g} (${a})`:`Windsurf auth failed: ${g}`)}let h=f(["access_token","token"]);if(!h)throw Error("Windsurf callback missing access_token");let i=f(["state"]);if(b&&i&&i!==b)throw Error("Windsurf callback state mismatch");return{firebaseIdToken:h}}(f,e),h=await Q(g);return{accessToken:h.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:h.apiServerUrl,firebaseIdToken:g,_authMethod:"oauth"}},postExchange:async a=>a.firebaseIdToken?{userInfo:await R(a.apiServerUrl,a.firebaseIdToken)}:{userInfo:{email:null,name:null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.userInfo?.email||void 0,displayName:b?.userInfo?.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",apiServerUrl:a.apiServerUrl,firebaseIdToken:a.firebaseIdToken}})};var T=c(49934);let U={config:f.RY,flowType:"authorization_code",callbackPath:"/",prepareConfig:async(a,b)=>{let c=Number(b?.nativeAppPort)||f.RY.defaultNativeAppPort,d=(0,T.le)(a,{nativeAppPort:c});return{...a,...d}},buildAuthUrl:(a,b,c)=>a.authUrl,exchangeToken:async(a,b,c,d,e,f)=>{let{userId:g,encryptedAccessToken:h}=(0,T.Q_)(b);return{accessToken:(0,T.Wc)(h,d),userId:g,systemId:f?.systemId||a.systemId}},postExchange:async a=>{let b={accessToken:a.accessToken,providerSpecificData:{userId:a.userId,systemId:a.systemId}},c=null;try{c=await (0,T.qJ)(b,{config:f.RY})}catch{}let d=(0,T.k9)(b,c);return{userInfo:c,organizationId:d,email:c?.email||null,name:c?.name||c?.display_name||null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.email||void 0,displayName:b?.name||void 0,providerSpecificData:{authMethod:"oauth",userId:a.userId,systemId:a.systemId,organizationId:b?.organizationId||""}})},V={config:f._0,flowType:"device_code",requestDeviceCode:async a=>{let b=j().randomBytes(32).toString("hex"),c=await fetch(a.cliInitUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${b}`},body:JSON.stringify({provider:a.providerId||"zai"})});if(!c.ok){let a=await c.text();throw Error(`ZCode OAuth init failed: ${a}`)}let d=await c.json();if(!$(d.code)||!d.data)throw Error(d.msg||"ZCode OAuth init returned no data");let e=d.data;if(!e.flow_id||!e.authorize_url)throw Error("ZCode OAuth init response missing flow_id/authorize_url");return{device_code:e.flow_id,verification_uri:e.authorize_url,expires_in:function(a){let b=Number(a);if(!Number.isFinite(b)||b<=0)return null;let c=Math.floor(((b>1e12?b:1e3*b)-Date.now())/1e3);return c>0?c:null}(e.expires_at)??300,interval:e.poll_interval_sec||3,_zcodePollToken:b}},pollToken:async(a,b,c,d)=>{let e=d?._zcodePollToken;if(!e)return{ok:!0,data:{error:"access_denied",error_description:"Missing ZCode poll token — restart the login flow"}};let f=await fetch(`${a.cliPollUrl}/${encodeURIComponent(b)}`,{headers:{Authorization:`Bearer ${e}`}});if(!f.ok)return{ok:!0,data:{error:"access_denied",error_description:`ZCode poll failed (HTTP ${f.status})`}};let g=await f.json();if(!$(g.code))return{ok:!0,data:{error:"access_denied",error_description:g.msg||"ZCode poll failed"}};let h=g.data||{};if("pending"===h.status)return{ok:!0,data:{error:"authorization_pending"}};if("failed"===h.status)return{ok:!0,data:{error:"access_denied",error_description:"ZCode authorization failed or was cancelled"}};if("ready"!==h.status)return{ok:!0,data:{error:"authorization_pending",error_description:`Unknown status: ${h.status}`}};let i=h[a.providerId]||h[h.providerId]||{},j=i.access_token||i.accessToken||h.accessToken||h.access_token;if(!j)return{ok:!0,data:{error:"access_denied",error_description:"ZCode poll response missing access token"}};let{planApiKey:k,businessToken:l}=await W(a,j);return{ok:!0,data:{access_token:k,_zcodeJwtToken:h.token||"",_zaiBusinessToken:l,_zaiRefreshToken:i.refresh_token||i.refreshToken||h.refresh_token||h.refreshToken||"",_zcodeUser:h.user||{}}}},mapTokens:a=>{let b=a._zcodeUser||{},c=b.name||b.email||null;return{accessToken:a.access_token,refreshToken:null,email:b.email||null,...c?{displayName:c}:{},providerSpecificData:{authMethod:"cli_poll",username:b.name||void 0,userId:b.user_id||void 0,zcodeJwtToken:a._zcodeJwtToken||void 0,zaiBusinessToken:a._zaiBusinessToken||void 0,...a._zaiRefreshToken?{zaiRefreshToken:a._zaiRefreshToken}:{}}}}};async function W(a,b){let c=await X(a,b),d={Authorization:`Bearer ${c}`,"Content-Type":"application/json"},e=function(a){let b=(Array.isArray(a?.organizations)?a.organizations:[]).map(a=>({organization:a,projects:(a?.projects||[]).filter(a=>"2"!==String(a?.projectType??"").trim())})).filter(({organization:a,projects:b})=>!!(a?.organizationId&&b.length));if(!b.length)return null;let c=b.find(({organization:a})=>Z(a.organizationName))||b[0],d=c.projects.find(a=>Z(a?.projectName))||c.projects[0];return c.organization?.organizationId&&d?.projectId?{organizationId:c.organization.organizationId,projectId:d.projectId}:null}(await Y(`${a.apiBaseUrl}/api/biz/customer/getCustomerInfo`,{headers:d},"customer info"));if(!e)throw Error("Unable to resolve Z.ai organization and project for the coding plan");let f=`${a.apiBaseUrl}/api/biz/v1/organization/${e.organizationId}/projects/${e.projectId}/api_keys`,g=await Y(f,{headers:d},"api keys")||[],h=Array.isArray(g)?g.find(b=>b?.name===a.planApiKeyName):null;h||(h=await Y(f,{method:"POST",headers:d,body:JSON.stringify({name:a.planApiKeyName})},"api key create"));let i=h?.apiKey?.trim();if(!i)throw Error("Z.ai api_keys response is missing apiKey");let j=await Y(`${f}/copy/${encodeURIComponent(i)}`,{headers:d},"api key copy"),k=j?.secretKey?.trim();if(!k)throw Error("Z.ai api key copy response is missing secretKey");return{planApiKey:`${i}.${k}`,businessToken:c}}async function X(a,b){let c=await Y(a.businessLoginUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:b})},"Z.ai business login"),d=c?.access_token?.trim()||c?.accessToken?.trim();if(!d)throw Error("Z.ai business login response is missing access_token");return d}async function Y(a,b,c){let d,e=await fetch(a,b),f=await e.text();if(!e.ok)throw Error(`Z.ai ${c} request failed (HTTP ${e.status}): ${f.slice(0,200)}`);try{d=JSON.parse(f)}catch{throw Error(`Z.ai ${c} response is not valid JSON`)}if(!$(d?.code)||d?.success===!1)throw Error(d?.msg||`Z.ai ${c} returned business error ${d?.code}`);return d?.data??d??null}function Z(a){let b=String(a||"").trim().toLowerCase();return b.includes("默认机构")||b.includes("默认项目")||"default"===b}function $(a){return null==a||0===a||200===a||"0"===a||"200"===a}let _=(a,b)=>"string"==typeof a?.[b]&&a[b].trim()?a[b].trim():void 0,aa=(a,b)=>"number"==typeof a?.[b]&&Number.isFinite(a[b])&&a[b]>0?a[b]:void 0;async function ab(a,b){let c,d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(b).toString(),signal:AbortSignal.timeout(3e4)});try{c=JSON.parse(await d.text())}catch{}return c&&"object"==typeof c||(c={error:`invalid_json_response (HTTP ${d.status})`}),{status:d.status,body:c}}function ac(a){return{config:{clientId:"mcode-public",scope:"agent.default",audience:"agent-backend",deviceUrl:`${a.account}/oauth2/device/code`,tokenUrl:`${a.account}/oauth2/token`},flowType:"device_code",async requestDeviceCode(a,b){let c,d,e;if(!b)throw Error("MiniMax Code sign-in requires a PKCE code challenge");let{status:f,body:g}=await ab(a.deviceUrl,{client_id:a.clientId,scope:a.scope,audience:a.audience,code_challenge:b,code_challenge_method:"S256"}),{userCode:h,deviceCode:i,uri:j}={userCode:_(g,"user_code"),deviceCode:_(g,"device_code"),uri:_(g,"verification_uri_complete")??_(g,"verification_uri")??_(g,"verification_url")};if(!h||!j)throw Error(`MiniMax device code response unusable (HTTP ${f})`);let k=!i;return{device_code:i??h,user_code:h,verification_uri:j,expires_in:(c=aa(g,"expires_in"),d=aa(g,"expired_in"),(c||(d?d<1e12?d:Math.max(1,Math.ceil((d-Date.now())/1e3)):void 0))??Math.floor(600)),interval:(e=aa(g,"interval"))?k&&e>=60?Math.round(e/1e3):e:5,_minimaxPollByUser:k}},async pollToken(a,b,c,d){if(!b)return{ok:!0,data:{error:"authorization_pending"}};let e={grant_type:"urn:ietf:params:oauth:grant-type:device_code",...d?._minimaxPollByUser?{user_code:b}:{device_code:b},client_id:a.clientId,code_verifier:c},{body:f}=await ab(a.tokenUrl,e),g=_(f,"status");return"pending"===g?{ok:!0,data:{error:"authorization_pending"}}:"slow_down"===g?{ok:!0,data:{error:"slow_down"}}:"denied"===g||"access_denied"===g?{ok:!0,data:{error:"access_denied"}}:"expired"===g||"expired_token"===g?{ok:!0,data:{error:"expired_token"}}:g?{ok:!0,data:{error:`unexpected_status:${g}`}}:_(f,"error")?{ok:!0,data:{error:_(f,"error"),error_description:_(f,"error_description")}}:_(f,"access_token")?{ok:!0,data:f}:{ok:!0,data:{error:"no_access_token"}}},mapTokens(a){let b=aa(a,"expires_in");return{accessToken:_(a,"access_token"),refreshToken:_(a,"refresh_token")??"",expiresIn:b??3600}}}}let ad={claude:g,codex:h,xai:n,"grok-cli":p,muse:r,"gemini-cli":s,antigravity:t,iflow:u,qoder:w,"qoder-cn":x,github:y,kiro:z,cursor:A,kimi:B,kilocode:C,cline:D,clinepass:E,gitlab:F,"codebuddy-cn":G,"codebuddy-intl":H,kimchi:I,trae:O,windsurf:S,zed:U,glm:V,"minimax-code":ac({account:"https://account.minimax.cn"}),"minimax-code-global":ac({account:"https://account.minimax.io"}),nous:{config:f.Z2,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.scope})});if(!b.ok){let a=await b.text();throw Error(`Nous 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,verification_uri_complete:c.verification_uri_complete,expires_in:c.expires_in,interval:c.interval}},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{c={error:"invalid_response",error_description:await d.text().catch(()=>"")}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch(f.Z2.agentKeyUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a.access_token}`},body:JSON.stringify({min_ttl_seconds:7200})});if(!b.ok){let a=await b.text().catch(()=>"");return console.warn(`[oauth] Nous agent key mint failed (${b.status}): ${a}`),{agentKey:null}}let c=await b.json();return{agentKey:c.api_key||null,agentKeyId:c.key_id||null,agentKeyExpiresAt:c.expires_at||null,agentKeyExpiresIn:c.expires_in||null}}catch(a){return console.warn(`[oauth] Nous agent key mint error: ${a?.message||a}`),{agentKey:null}}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,apiKey:b?.agentKey||a.access_token,providerSpecificData:{inferenceBaseUrl:f.Z2.inferenceBaseUrl,...b?.agentKeyId?{agentKeyId:b.agentKeyId}:{},...b?.agentKeyExpiresAt?{agentKeyExpiresAt:b.agentKeyExpiresAt}:{}}})}};function ae(a){let b=ad["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}async function af(a,b,c){let e=ae(a),f=e.prepareConfig?await e.prepareConfig(e.config,c||{}):e.config,{codeVerifier:g,codeChallenge:h,state:i}=(0,d.lz)(e.pkceVerifierBytes),j=f.loginTraceID||i,k=f.privateKeyVerifier||g;return{authUrl:"device_code"===e.flowType?null:"authorization_code_pkce"===e.flowType?e.buildAuthUrl(f,b,j,h,c||{}):e.buildAuthUrl(f,b,j,void 0,c||{}),state:j,codeVerifier:k,codeChallenge:h,redirectUri:b,flowType:e.flowType,fixedPort:e.fixedPort,callbackPath:e.callbackPath||"/callback",...f.systemId?{systemId:f.systemId}:{}}}async function ag(a,b,c,d,e,f){let g=ae(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 ah(a,b,c){let d=ae(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 ai(a,b,c,d){let f=ae(a);if("device_code"!==f.flowType)throw Error(`Provider ${a} does not support device code flow`);let g=await f.pollToken(f.config,b,c,d);if(g.ok)if(g.data.access_token){let b=null;if(f.postExchange)try{b=await f.postExchange(g.data)}catch(b){return console.warn(`[oauth] ${a} postExchange failed:`,b?.message||b),{success:!1,error:"exchange_failed",errorDescription:b.message,fatal:!0}}let c=f.mapTokens(g.data,b);if("kiro"===a&&!c.providerSpecificData?.profileArn){let a=await (0,e.gR)(c.accessToken);a&&(c.providerSpecificData.profileArn=a)}return{success:!0,tokens:c}}else if("authorization_pending"===g.data.error||"slow_down"===g.data.error)return{success:!1,error:g.data.error,errorDescription:g.data.error_description||g.data.message,pending:"authorization_pending"===g.data.error};else return{success:!1,error:g.data.error||"no_access_token",errorDescription:g.data.error_description||g.data.message||"No access token received"};return{success:!1,error:g.data.error,errorDescription:g.data.error_description}}let aj=!1;async function ak(){if(!aj){aj=!0;try{let{getProviderConnections:a,updateProviderConnection:b}=await c.e(9718).then(c.bind(c,89718));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,e.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){aj=!1,console.log("backfillCodexEmails failed:",a?.message||a)}}}},13808:(a,b,c)=>{c.d(b,{$N:()=>f,OK:()=>g,Zl:()=>h,lz:()=>i});var d=c(55511),e=c.n(d);function f(a=32){return e().randomBytes(a).toString("base64url")}function g(a){return e().createHash("sha256").update(a).digest("base64url")}function h(){return e().randomBytes(32).toString("base64url")}function i(a=32){let b=f(a),c=g(b);return{codeVerifier:b,codeChallenge:c,state:h()}}},47370:(a,b,c)=>{c.d(b,{BY:()=>d.BY,E5:()=>d.E5,QB:()=>d.QB,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw,wV:()=>d.wV});var d=c(33079)},53129:(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})},73159:(a,b,c)=>{c.d(b,{Ue:()=>k,oT:()=>l});var d=c(39141);let e=d.xq.xai?.clientId,f="https://auth.x.ai",g="/oauth2/authorize",h="/oauth2/token",i="/.well-known/openid-configuration",j="/callback",k=96,l={clientId:e,issuer:f,authEndpointPath:g,tokenEndpointPath:h,discoveryPath:i,authorizeUrl:`${f}${g}`,tokenUrl:`${f}${h}`,discoveryUrl:`${f}${i}`,scope:"openid profile email offline_access grok-cli:access api:access",apiBaseUrl:"https://api.x.ai/v1",redirectUri:`http://127.0.0.1:56121${j}`,loopbackPort:56121,callbackPath:j,pkceVerifierBytes:96,refreshLeadSeconds:300,userAgent:"grok-cli/9router",codeChallengeMethod:"S256"}}};
@@ -1 +1 @@
1
- "use strict";exports.id=4807,exports.ids=[4807],exports.modules={74807:(a,b,c)=>{c.d(b,{checkAndRefreshToken:()=>s});var d=c(87886),e=c(70321),f=c(10793);let g=new Map,h=new Map,i=null;async function j(a,b,c="gemini-cli"){if(!a||!b)return null;let d=g.get(a);if(d&&Date.now()-d.fetchedAt<36e5)return d.projectId;if(h.has(a))return h.get(a).promise;let e=new AbortController,f=(async()=>{try{let d=await k(b,e.signal,c);if(d)return g.set(a,{projectId:d,fetchedAt:Date.now()}),d;return console.warn("[ProjectId] could not fetch projectId for connection",a.slice(0,8)),null}catch(a){return console.warn(`[ProjectId] Error fetching project ID: ${a.message}`),null}finally{h.delete(a)}})();return h.set(a,{promise:f,controller:e,startedAt:Date.now()}),f}async function k(a,b,c){let d=f.nZ[c]||f.nZ["gemini-cli"],e="antigravity"===c?f.j5:f.Ic,g=await fetch(d.loadCodeAssist,{method:"POST",headers:{...e,Authorization:`Bearer ${a}`},body:JSON.stringify({metadata:f.zv}),signal:b});if(!g.ok){let a=await g.text().catch(()=>"");throw Error(`loadCodeAssist failed: HTTP ${g.status} ${a.slice(0,200)}`)}let h=await g.json(),i=function(a){if(!a)return null;if("string"==typeof a.cloudaicompanionProject){let b=a.cloudaicompanionProject.trim();if(b)return b}if(a.cloudaicompanionProject&&"object"==typeof a.cloudaicompanionProject){let b=a.cloudaicompanionProject.id;if("string"==typeof b&&b.trim())return b.trim()}return null}(h);if(i)return i;let j="legacy-tier";if(Array.isArray(h.allowedTiers)){for(let a of h.allowedTiers)if(a&&"object"==typeof a&&!0===a.isDefault&&a.id&&"string"==typeof a.id&&a.id.trim()){j=a.id.trim();break}}return l(a,j,b,d,c)}async function l(a,b,c,d,e){console.log(`[ProjectId] Onboarding user with tier: ${b}`);let g={tierId:b,metadata:f.zv},h="antigravity"===e?f.j5:f.Ic,i=Number(process.env.ONBOARD_MAX_ATTEMPTS)||2,j=Number(process.env.ONBOARD_RETRY_DELAY_MS)||12e3;for(let b=1;b<=i&&!c?.aborted;b++){let e=new AbortController,f=setTimeout(()=>e.abort(),3e4),k=()=>e.abort();c?.addEventListener("abort",k);try{let c=await fetch(d.onboardUser,{method:"POST",headers:{...h,Authorization:`Bearer ${a}`},body:JSON.stringify(g),signal:e.signal});if(clearTimeout(f),!c.ok){let a=await c.text().catch(()=>"");throw Error(`onboardUser HTTP ${c.status}: ${a.slice(0,200)}`)}let k=await c.json();if(!0===k.done){let a=function(a){if(!a?.response)return null;let b=a.response.cloudaicompanionProject;if("string"==typeof b){let a=b.trim();if(a)return a}if(b&&"object"==typeof b){let a=b.id;if("string"==typeof a&&a.trim())return a.trim()}return null}(k);if(a)return console.log(`[ProjectId] Successfully onboarded, project ID: ${a}`),a;return console.warn("[ProjectId] onboardUser finished without a project ID (account not provisioned)"),null}let l=Math.floor(5e3*Math.random());console.log(`[ProjectId] Onboard attempt ${b}/${i}: not done yet, waiting...`),await new Promise(a=>setTimeout(a,j+l))}catch(d){if(clearTimeout(f),"AbortError"===d.name){if(console.warn(`[ProjectId] onboardUser attempt ${b} aborted (timeout or connection removed)`),c?.aborted)return null;continue}if(b===i)return console.warn(`[ProjectId] onboardUser failed after ${i} attempts: ${d.message}`),null;let a=Math.floor(5e3*Math.random());console.warn(`[ProjectId] onboardUser attempt ${b} failed: ${d.message}, retrying...`),await new Promise(b=>setTimeout(b,j+a))}finally{clearTimeout(f),c?.removeEventListener("abort",k)}}return null}i=setInterval(()=>{try{let a=Date.now();for(let[b,c]of g)(!c||a-c.fetchedAt>=36e5)&&g.delete(b);for(let[b,c]of h){if(!c||"number"!=typeof c.startedAt){h.delete(b);continue}if(a-c.startedAt>12e4){try{c.controller.abort()}catch(a){}h.delete(b)}}}catch(a){console.warn("[ProjectId] cleanup sweep error:",a?.message??a)}},6e5),i?.unref?.();var m=c(44855),n=c(98976);let o=m.oD;function p(a){return new Date(Date.now()+1e3*a).toISOString()}function q(a){let b=(0,n.jR)(a);return null===b?null:new Date(b).toISOString()}async function r(a,b){try{let c={};if(b.accessToken&&(c.accessToken=b.accessToken),b.refreshToken&&(c.refreshToken=b.refreshToken),b.idToken&&(c.idToken=b.idToken),b.lastRefreshAt&&(c.lastRefreshAt=b.lastRefreshAt),b.expiresAt&&(c.expiresAt=b.expiresAt),b.expiresIn)c.expiresAt=p(b.expiresIn),c.expiresIn=b.expiresIn;else if(b.expiresAt){let a=q(b.expiresAt);a&&(c.expiresAt=a,c.expiresIn=Math.max(1,Math.floor((new Date(a).getTime()-Date.now())/1e3)))}if(b.providerSpecificData&&(c.providerSpecificData={...b.existingProviderSpecificData||{},...b.providerSpecificData}),b.refreshToken){let a=c.providerSpecificData||b.existingProviderSpecificData;a&&(c.providerSpecificData={...a,refreshToken:b.refreshToken})}(b.copilotToken||b.copilotTokenExpiresAt)&&(c.providerSpecificData={...c.providerSpecificData||b.existingProviderSpecificData||{},...b.copilotToken?{copilotToken:b.copilotToken}:{},...b.copilotTokenExpiresAt?{copilotTokenExpiresAt:b.copilotTokenExpiresAt}:{}}),b.projectId&&(c.projectId=b.projectId);let f=await (0,e.updateProviderConnection)(a,c);return d.info("TOKEN_REFRESH","Credentials updated in localDb",{connectionId:a,success:!!f}),!!f}catch(b){return d.error("TOKEN_REFRESH","Error updating credentials in localDb",{connectionId:a,error:b.message}),!1}}async function s(a,b,c={}){let f=c&&"function"==typeof c.needsRefresh?c:null,h=c&&"object"==typeof c&&!f?c:{},i={...b};if(!i.connectionId&&i.id&&(i.connectionId=i.id),i.connectionId){let a=await (0,e.Mc)(i.connectionId).catch(()=>null),b=Date.parse(a?.lastRefreshAt||""),c=Date.parse(i.lastRefreshAt||"");Number.isFinite(b)&&(!Number.isFinite(c)||b>c)&&a.refreshToken&&a.refreshToken!==i.refreshToken&&(i={...i,refreshToken:a.refreshToken,accessToken:a.accessToken||i.accessToken,expiresAt:a.expiresAt||a.tokenExpiresAt||i.expiresAt,lastRefreshAt:a.lastRefreshAt||i.lastRefreshAt})}if(h?.force===!0||(f?f.needsRefresh(i):(0,n.fp)(a,i))){let b=i.expiresAt?new Date(i.expiresAt).getTime():null,c=b?b-Date.now():null,e=(0,m.Og)(a);d.info("TOKEN_REFRESH","Refreshing provider credentials proactively",{provider:a,expiresIn:null===c?null:Math.round(c/1e3),refreshLeadMs:e,lastRefreshAt:i.lastRefreshAt||null});let f=await (0,n.Vq)(a,i,d);if(f?.accessToken||f?.apiKey||f?.copilotToken){let b={...f,existingProviderSpecificData:i.providerSpecificData};await r(i.connectionId,b),(i={...i,...f,expiresAt:f.expiresIn?p(f.expiresIn):q(f.expiresAt)||f.expiresAt||i.expiresAt,providerSpecificData:f.providerSpecificData?{...i.providerSpecificData,...f.providerSpecificData}:i.providerSpecificData}).projectId||function(a,b,c){("antigravity"===a||"gemini-cli"===a)&&b&&c&&(g.delete(b),"true"===process.env.EAGER_PROJECT_ID_REFRESH&&j(b,c,a).then(a=>{a&&r(b,{projectId:a}).catch(a=>{d.debug("TOKEN_REFRESH","Failed to persist refreshed projectId",{connectionId:b,error:a?.message??a})})}).catch(a=>{d.debug("TOKEN_REFRESH","Failed to fetch projectId after token refresh",{connectionId:b,error:a?.message??a})}))}(a,i.connectionId,i.accessToken)}}if("github"===a){let b=i.providerSpecificData?.copilotToken,c=(i.providerSpecificData?.copilotTokenExpiresAt?1e3*i.providerSpecificData.copilotTokenExpiresAt:0)-Date.now();if(!b||c<o){let e;d.info("TOKEN_REFRESH","Copilot token expiring soon or missing, refreshing proactively",{provider:a,expiresIn:b?Math.round(c/1e3):"missing"});let f=await (e=i.accessToken,(0,m.jR)(e,d));if(f){let a={...i.providerSpecificData,copilotToken:f.token,copilotTokenExpiresAt:f.expiresAt};await r(i.connectionId,{providerSpecificData:a}),i.providerSpecificData=a,i.copilotToken=f.token}}}return i}}};
1
+ "use strict";exports.id=4807,exports.ids=[4807],exports.modules={74807:(a,b,c)=>{c.d(b,{checkAndRefreshToken:()=>s});var d=c(87886),e=c(70321),f=c(10793);let g=new Map,h=new Map,i=null;async function j(a,b,c="gemini-cli"){if(!a||!b)return null;let d=g.get(a);if(d&&Date.now()-d.fetchedAt<36e5)return d.projectId;if(h.has(a))return h.get(a).promise;let e=new AbortController,f=(async()=>{try{let d=await k(b,e.signal,c);if(d)return g.set(a,{projectId:d,fetchedAt:Date.now()}),d;return console.warn("[ProjectId] could not fetch projectId for connection",a.slice(0,8)),null}catch(a){return console.warn(`[ProjectId] Error fetching project ID: ${a.message}`),null}finally{h.delete(a)}})();return h.set(a,{promise:f,controller:e,startedAt:Date.now()}),f}async function k(a,b,c){let d=f.nZ[c]||f.nZ["gemini-cli"],e="antigravity"===c?f.j5:f.Ic,g=await fetch(d.loadCodeAssist,{method:"POST",headers:{...e,Authorization:`Bearer ${a}`},body:JSON.stringify({metadata:f.zv}),signal:b});if(!g.ok){let a=await g.text().catch(()=>"");throw Error(`loadCodeAssist failed: HTTP ${g.status} ${a.slice(0,200)}`)}let h=await g.json(),i=function(a){if(!a)return null;if("string"==typeof a.cloudaicompanionProject){let b=a.cloudaicompanionProject.trim();if(b)return b}if(a.cloudaicompanionProject&&"object"==typeof a.cloudaicompanionProject){let b=a.cloudaicompanionProject.id;if("string"==typeof b&&b.trim())return b.trim()}return null}(h);if(i)return i;let j="legacy-tier";if(Array.isArray(h.allowedTiers)){for(let a of h.allowedTiers)if(a&&"object"==typeof a&&!0===a.isDefault&&a.id&&"string"==typeof a.id&&a.id.trim()){j=a.id.trim();break}}return l(a,j,b,d,c)}async function l(a,b,c,d,e){console.log(`[ProjectId] Onboarding user with tier: ${b}`);let g={tierId:b,metadata:f.zv},h="antigravity"===e?f.j5:f.Ic,i=Number(process.env.ONBOARD_MAX_ATTEMPTS)||2,j=Number(process.env.ONBOARD_RETRY_DELAY_MS)||12e3;for(let b=1;b<=i&&!c?.aborted;b++){let e=new AbortController,f=setTimeout(()=>e.abort(),3e4),k=()=>e.abort();c?.addEventListener("abort",k);try{let c=await fetch(d.onboardUser,{method:"POST",headers:{...h,Authorization:`Bearer ${a}`},body:JSON.stringify(g),signal:e.signal});if(clearTimeout(f),!c.ok){let a=await c.text().catch(()=>"");throw Error(`onboardUser HTTP ${c.status}: ${a.slice(0,200)}`)}let k=await c.json();if(!0===k.done){let a=function(a){if(!a?.response)return null;let b=a.response.cloudaicompanionProject;if("string"==typeof b){let a=b.trim();if(a)return a}if(b&&"object"==typeof b){let a=b.id;if("string"==typeof a&&a.trim())return a.trim()}return null}(k);if(a)return console.log(`[ProjectId] Successfully onboarded, project ID: ${a}`),a;return console.warn("[ProjectId] onboardUser finished without a project ID (account not provisioned)"),null}let l=Math.floor(5e3*Math.random());console.log(`[ProjectId] Onboard attempt ${b}/${i}: not done yet, waiting...`),await new Promise(a=>setTimeout(a,j+l))}catch(d){if(clearTimeout(f),"AbortError"===d.name){if(console.warn(`[ProjectId] onboardUser attempt ${b} aborted (timeout or connection removed)`),c?.aborted)return null;continue}if(b===i)return console.warn(`[ProjectId] onboardUser failed after ${i} attempts: ${d.message}`),null;let a=Math.floor(5e3*Math.random());console.warn(`[ProjectId] onboardUser attempt ${b} failed: ${d.message}, retrying...`),await new Promise(b=>setTimeout(b,j+a))}finally{clearTimeout(f),c?.removeEventListener("abort",k)}}return null}i=setInterval(()=>{try{let a=Date.now();for(let[b,c]of g)(!c||a-c.fetchedAt>=36e5)&&g.delete(b);for(let[b,c]of h){if(!c||"number"!=typeof c.startedAt){h.delete(b);continue}if(a-c.startedAt>12e4){try{c.controller.abort()}catch(a){}h.delete(b)}}}catch(a){console.warn("[ProjectId] cleanup sweep error:",a?.message??a)}},6e5),i?.unref?.();var m=c(44855),n=c(98976);let o=m.oD;function p(a){return new Date(Date.now()+1e3*a).toISOString()}function q(a){let b=(0,n.jR)(a);return null===b?null:new Date(b).toISOString()}async function r(a,b){try{let c={};if(b.accessToken&&(c.accessToken=b.accessToken),b.refreshToken&&(c.refreshToken=b.refreshToken),b.apiKey&&(c.apiKey=b.apiKey),b.idToken&&(c.idToken=b.idToken),b.lastRefreshAt&&(c.lastRefreshAt=b.lastRefreshAt),b.expiresAt&&(c.expiresAt=b.expiresAt),b.expiresIn)c.expiresAt=p(b.expiresIn),c.expiresIn=b.expiresIn;else if(b.expiresAt){let a=q(b.expiresAt);a&&(c.expiresAt=a,c.expiresIn=Math.max(1,Math.floor((new Date(a).getTime()-Date.now())/1e3)))}if(b.providerSpecificData&&(c.providerSpecificData={...b.existingProviderSpecificData||{},...b.providerSpecificData}),b.refreshToken){let a=c.providerSpecificData||b.existingProviderSpecificData;a&&(c.providerSpecificData={...a,refreshToken:b.refreshToken})}(b.copilotToken||b.copilotTokenExpiresAt)&&(c.providerSpecificData={...c.providerSpecificData||b.existingProviderSpecificData||{},...b.copilotToken?{copilotToken:b.copilotToken}:{},...b.copilotTokenExpiresAt?{copilotTokenExpiresAt:b.copilotTokenExpiresAt}:{}}),b.projectId&&(c.projectId=b.projectId);let f=await (0,e.updateProviderConnection)(a,c);return d.info("TOKEN_REFRESH","Credentials updated in localDb",{connectionId:a,success:!!f}),!!f}catch(b){return d.error("TOKEN_REFRESH","Error updating credentials in localDb",{connectionId:a,error:b.message}),!1}}async function s(a,b,c={}){let f=c&&"function"==typeof c.needsRefresh?c:null,h=c&&"object"==typeof c&&!f?c:{},i={...b};if(!i.connectionId&&i.id&&(i.connectionId=i.id),i.connectionId){let a=await (0,e.Mc)(i.connectionId).catch(()=>null),b=Date.parse(a?.lastRefreshAt||""),c=Date.parse(i.lastRefreshAt||"");Number.isFinite(b)&&(!Number.isFinite(c)||b>c)&&a.refreshToken&&a.refreshToken!==i.refreshToken&&(i={...i,refreshToken:a.refreshToken,accessToken:a.accessToken||i.accessToken,expiresAt:a.expiresAt||a.tokenExpiresAt||i.expiresAt,lastRefreshAt:a.lastRefreshAt||i.lastRefreshAt})}if(h?.force===!0||(f?f.needsRefresh(i):(0,n.fp)(a,i))){let b=i.expiresAt?new Date(i.expiresAt).getTime():null,c=b?b-Date.now():null,e=(0,m.Og)(a);d.info("TOKEN_REFRESH","Refreshing provider credentials proactively",{provider:a,expiresIn:null===c?null:Math.round(c/1e3),refreshLeadMs:e,lastRefreshAt:i.lastRefreshAt||null});let f=await (0,n.Vq)(a,i,d);if(f?.accessToken||f?.apiKey||f?.copilotToken){let b={...f,existingProviderSpecificData:i.providerSpecificData};await r(i.connectionId,b),(i={...i,...f,expiresAt:f.expiresIn?p(f.expiresIn):q(f.expiresAt)||f.expiresAt||i.expiresAt,providerSpecificData:f.providerSpecificData?{...i.providerSpecificData,...f.providerSpecificData}:i.providerSpecificData}).projectId||function(a,b,c){("antigravity"===a||"gemini-cli"===a)&&b&&c&&(g.delete(b),"true"===process.env.EAGER_PROJECT_ID_REFRESH&&j(b,c,a).then(a=>{a&&r(b,{projectId:a}).catch(a=>{d.debug("TOKEN_REFRESH","Failed to persist refreshed projectId",{connectionId:b,error:a?.message??a})})}).catch(a=>{d.debug("TOKEN_REFRESH","Failed to fetch projectId after token refresh",{connectionId:b,error:a?.message??a})}))}(a,i.connectionId,i.accessToken)}}if("github"===a){let b=i.providerSpecificData?.copilotToken,c=(i.providerSpecificData?.copilotTokenExpiresAt?1e3*i.providerSpecificData.copilotTokenExpiresAt:0)-Date.now();if(!b||c<o){let e;d.info("TOKEN_REFRESH","Copilot token expiring soon or missing, refreshing proactively",{provider:a,expiresIn:b?Math.round(c/1e3):"missing"});let f=await (e=i.accessToken,(0,m.jR)(e,d));if(f){let a={...i.providerSpecificData,copilotToken:f.token,copilotTokenExpiresAt:f.expiresAt};await r(i.connectionId,{providerSpecificData:a}),i.providerSpecificData=a,i.copilotToken=f.token}}}return i}}};
@@ -1 +1 @@
1
- "use strict";exports.id=4811,exports.ids=[3794,4811],exports.modules={4811:(a,b,c)=>{c.r(b),c.d(b,{MIMO_API_BASE:()=>z,MIMO_API_UA:()=>A,getMimoAccountCookie:()=>B,getMimoAccountUsage:()=>C,invalidateMimoAccountCookieCache:()=>y,readDesktopPassToken:()=>r,resolveMimoServerBase:()=>u});var d=c(73024),e=c(48161),f=c(76760),g=c(77598),h=c(73794);let i={cn:"https://mimo-server-cn.xiaomimimo.com",sgp:"https://mimo-server-sgp.xiaomimimo.com",ams:"https://mimo-server-ams.xiaomimimo.com",ru:"https://mimo-server-ru.xiaomimimo.com",in:"https://mimo-server-in.xiaomimimo.com"},j=i.sgp,k={cn:"mimopc",sgp:"mimosgp",ams:"mimoams",ru:"mimoru",in:"mimoin"},l="account.xiaomi.com",m="miNative PC/Normal Windows_NT/10.0.19045 SDKV/1.0.0 DEVT/PC DEVS/Windows APP/miaccount_desktop APPV/0.1.0",n="MiClaw/1.0",o=new Map,p=new Map;async function q(){let a,b=(a=e.homedir(),"win32"===process.platform?f.join(a,"AppData","Roaming","Xiaomi MiMo","Partitions","xiaomi-account","Network","Cookies"):"darwin"===process.platform?f.join(a,"Library","Application Support","Xiaomi MiMo","Partitions","xiaomi-account","Network","Cookies"):f.join(a,".config","Xiaomi MiMo","Partitions","xiaomi-account","Network","Cookies"));if(!d.existsSync(b))return null;let h=f.join(e.tmpdir(),`9r-mimo-cookies-${process.pid}-${g.randomBytes(4).toString("hex")}.db`);try{d.copyFileSync(b,h)}catch{return null}try{let{DatabaseSync:a}=await Promise.resolve().then(c.t.bind(c,79868,19)),b=new a(h,{readOnly:!0}),d=b.prepare("SELECT name, value FROM cookies WHERE host_key = ?").all("."+l);b.close();let e=Object.fromEntries(d.map(a=>[a.name,a.value]));return e.passToken?e:null}catch{return null}finally{try{d.unlinkSync(h)}catch{}}}async function r(){try{let a=await q();if(!a?.passToken)return null;return{passToken:a.passToken,userId:a.userId||null,cUserId:a.cUserId||null}}catch{return null}}function s(a,b){for(let c of b.headers.getSetCookie?.()||[]){let b=/^([^=]+)=([^;]*)/.exec(c.trim());b&&b[2]&&(a[b[1]]=b[2])}}function t(a){return Object.entries(a).filter(([,a])=>a).map(([a,b])=>`${a}=${b}`).join("; ")}function u(a=null){return i[String(a?.region||"").toLowerCase()]||j}async function v(a,b,c=j,d="sgp"){let e=String(d||"").toLowerCase(),f=k[String(e||"").toLowerCase()]||k.sgp,g=await w(a,"cn"===e?null:b,c,f);return g&&console.log(`[mimoAccount] desktop 2-phase OK (sid=${f})`),g}async function w(a,b,c,d){var e,f;let i,j=a=>console.log(`[mimoAccount] desktopPhase fail: ${a}`),k={...a},m={};k.userId&&(m.userId=k.userId),k.passToken&&(m.passToken=k.passToken),k.cUserId&&(m.cUserId=k.cUserId);let o=`https://${l}/pass/serviceLogin?_locale=zh_CN&_snsNone=true&sid=${encodeURIComponent(d)}&_json=true`,p=await (0,h.proxyAwareFetch)(o,{headers:{Cookie:t(m),"User-Agent":n,Accept:"application/json"}},b),q=await p.text(),r=q.replace(/^&&&START&&&/,""),u=r.match(/"nonce"\s*:\s*(\d+)/)?.[1],v=null;try{v=JSON.parse(r)}catch{}if(u&&v&&(v.nonce=u),!v||"number"!=typeof v.code||0!==v.code||!v.location||!v.nonce||!v.ssecurity)return j(`phase1 sid=${d} http=${p.status} code=${v?.code??"?"} hasLoc=${!!v?.location} secondValidation=${v?.bSecondValidation??"?"} notificationUrl=${v?.notificationUrl?"present":"no"} body=${JSON.stringify(q.slice(0,200))}`),null;s(k,p);let w=v.location.includes("?")?"&":"?",x=`${v.location}${w}clientSign=${(e=u||v.nonce,i=`nonce=${e}`+((f=v.ssecurity)&&f.trim()?`&${f}`:""),encodeURIComponent(g.createHash("sha1").update(i).digest("base64")))}`;for(let a=0;a<8;a++){let a=await (0,h.proxyAwareFetch)(x,{redirect:"manual",headers:{"User-Agent":n}},b);s(k,a);let c=a.headers.get("location");if(a.status>=300&&a.status<400&&c){x=new URL(c,x).toString();continue}break}let y=`${d}_serviceToken`;if(!k.serviceToken&&k[y]&&(k.serviceToken=k[y]),!k.serviceToken)return j(`phase2 no serviceToken sid=${d} jar=[${Object.keys(k).join(",")}]`),null;let z={};for(let[a,b]of Object.entries(k))b&&("serviceToken"===a||"userId"===a||/_(ph|slh)$/.test(a))&&(z[a]=b);return t(z)}async function x(a,b){let c=u(a),d=a?.mimoPassToken?{passToken:a.mimoPassToken,userId:a.mimoUserId,cUserId:a.mimoCUserId}:await q();if(!d)return{cookie:null,reason:"no-pass-token"};let e=g.createHash("sha256").update(`${c}|${d.passToken}`).digest("hex"),f=o.get(e);if(f&&Date.now()-f.at<18e5)return{cookie:f.cookie};let h=p.get(e);if(h){let a=await h;return a?{cookie:a}:{cookie:null,reason:"sso-failed"}}let i=(async()=>{try{return await v(d,b,c,a?.region)}catch(a){return console.log(`[mimoAccount] acquire threw: ${a?.message||a} | ${String(a?.stack||"").split("\n").slice(1,4).join(" <- ")}`),null}finally{p.delete(e)}})();p.set(e,i);let j=await i;return j?(o.set(e,{cookie:j,at:Date.now()}),{cookie:j}):{cookie:null,reason:"sso-failed"}}function y(){o.clear()}let z=j,A=m;async function B(a=null,b=null){try{let{cookie:c}=await x(a,b);return c}catch(a){return console.log(`[mimoAccount] getMimoAccountCookie threw: ${a?.message||a} | ${String(a?.stack||"").split("\n").slice(1,4).join(" <- ")}`),null}}async function C(a=null,b=null){let{cookie:c,reason:d}=await x(a,b);if(!c)return{error:"no-pass-token"===d?"no-session":"session-failed"};try{let d=await (0,h.proxyAwareFetch)(`${u(a)}/api/user/usage`,{headers:{"User-Agent":m,Cookie:c,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b);if(!d.ok)return{error:`http-${d.status}`};let e=await d.json().catch(()=>null);if(!e||0!==e.code||!e.data)return{error:"bad-response"};return{percent:e.data.percent,resetDate:e.data.resetDate,resetAt:e.data.resetAt}}catch(a){return{error:a.message}}}},73794:(a,b,c)=>{c.r(b),c.d(b,{DIRECT_KEEP_ALIVE_MAX_TIMEOUT_MS:()=>j,DIRECT_KEEP_ALIVE_TIMEOUT_MS:()=>i,default:()=>D,getDirectDispatcher:()=>l,isLoopbackTarget:()=>v,isStaleSocketError:()=>n,proxyAwareFetch:()=>B,resetDirectDispatcherForTests:()=>m});var d=c(27910),e=c(19874);let f=globalThis.fetch,g=new Map;function h(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}let i=h("FETCH_KEEP_ALIVE_TIMEOUT_MS",3e4),j=h("FETCH_KEEP_ALIVE_MAX_TIMEOUT_MS",3e4),k=null;async function l(){if(k)return k;try{let{Agent:a}=await c.e(7995).then(c.t.bind(c,17995,19));k=new a({keepAliveTimeout:i,keepAliveMaxTimeout:j})}catch(a){a?.message,k=null}return k}function m(){k=null}function n(a){let b=a?.cause?.code||a?.code;return"UND_ERR_SOCKET"===b||"ECONNRESET"===b||"EPIPE"===b}let o=new Map,p=new Set(["SELF_SIGNED_CERT_IN_CHAIN","DEPTH_ZERO_SELF_SIGNED_CERT","UNABLE_TO_VERIFY_LEAF_SIGNATURE","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","CERT_HAS_EXPIRED","ERR_TLS_CERT_ALTNAME_INVALID"]),q=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],r=["8.8.8.8","8.8.4.4"];function s(a){return null==a?"":String(a).trim()}function t(a,b){let c=s(process.env[a]);if(!/^[1-9]\d*$/.test(c))return b;let d=Number(c);return Number.isSafeInteger(d)?d:b}async function u(a){let b=o.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,19)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,19)),f=new b.Resolver;f.setServers(r);let g=d(f.resolve4.bind(f)),h=await g(a);return o.set(a,{ip:h[0],expiry:Date.now()+e.v1.dnsCacheTtlMs}),h[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function v(a){let b;try{b=new URL(a).hostname.toLowerCase()}catch{return!1}let c=b.startsWith("[")&&b.endsWith("]")?b.slice(1,-1):b;if("localhost"===c||c.endsWith(".localhost")||"::1"===c||"0:0:0:0:0:0:0:1"===c)return!0;let d=/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i.exec(c);if(d)return(parseInt(d[1],16)>>8&255)==127;let e=/^::ffff:(\d{1,3}(?:\.\d{1,3}){3})$/i.exec(c),f=e?e[1]:c;return/^127(?:\.\d{1,3}){3}$/.test(f)}function w(a,b){let c,d=s(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function x(a){let b=s(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function y(a,b=!1){let d=x(a);if(!d&&!b)return null;let f=`${d||"direct"}::${b?"insecure":"secure"}`;if(!g.has(f)){g.size>=e.v1.proxyDispatchersMaxSize&&g.delete(g.keys().next().value);let{Agent:a,ProxyAgent:h}=await c.e(7995).then(c.t.bind(c,17995,19)),i=t("PROXY_CONNECT_TIMEOUT_MS",9e4),j=t("PROXY_HEADERS_TIMEOUT_MS",3e5),k=b?{rejectUnauthorized:!1}:void 0,l=d?new h({uri:d,connectTimeout:i,headersTimeout:j,bodyTimeout:0,...b?{requestTls:k}:{}}):new a({connect:k});g.set(f,l)}return g.get(f)}async function z(a,b,c){let d="string"==typeof a?a:a.toString();try{if(c){let d=await y(c);return await f(a,d?{...b,dispatcher:d}:b)}let d=await l(),e=d?{...b,dispatcher:d}:{...b};try{return await f(a,e)}catch(c){if(!d||!n(c))throw c;let b={...e.headers||{},Connection:"close"};return await f(a,{...e,headers:b})}}catch(e){let d;if("true"!==process.env.STRICT_SSL&&"1"!==process.env.STRICT_SSL&&(d=e?.cause?.code||e?.code,p.has(d))){if(b.body&&"function"==typeof b.body.getReader&&b.body.locked)throw e;console.warn(`[ProxyFetch] TLS cert verification failed (${e.cause?.code||e.code}), retrying with insecure TLS: ${a}`);let d=await y(c,!0);return await f(a,{...b,dispatcher:d})}throw e}}async function A(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,19)),g=await Promise.resolve().then(c.t.bind(c,91645,19)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:e.method||"POST",headers:{...e.headers,Host:a.hostname}},i=h.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:d.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};c(b)});i.on("error",f),e.body&&i.write("string"==typeof e.body?e.body:JSON.stringify(e.body)),i.end()}),g.on("error",f)})}async function B(a,b={},c=null){let d="string"==typeof a?a:a.toString(),e=s(c?.vercelRelayUrl);if(e){let a=new URL(d),c={...b.headers instanceof Headers?Object.fromEntries(b.headers.entries()):{...b.headers||{}},"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return f(e,{...b,headers:c})}let g=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0||v(a))return null;let c=s(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=s(b?.noProxy??b?.connectionNoProxy);return d&&w(a,d)?null:x(c)}(d,c),h=g?null:x(function(a){let b;if(v(a)||w(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(d)),i=g||h;if(function(a){try{let b=new URL(a).hostname;return q.some(a=>b.includes(a))}catch{return!1}}(d)){if(i)try{return await z(a,b,i)}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await u(a.hostname);if(c)return await A(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(i)try{return await z(a,b,i)}catch(d){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${d.message}`);return console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${d.message}`),z(a,b,null)}let j=c?.proxyPoolId||c?.enabled===!0||c?.connectionProxyEnabled===!0||!!s(c?.url??c?.connectionProxyUrl);if(c?.strictProxy===!0&&j)throw Error("[ProxyFetch] Proxy required but none resolved (strictProxy=true)");return z(a,b,null)}async function C(a,b={}){return B(a,b,null)}globalThis.fetch!==C&&(globalThis.fetch=C);let D=C}};
1
+ "use strict";exports.id=4811,exports.ids=[3794,4811],exports.modules={4811:(a,b,c)=>{c.r(b),c.d(b,{MIMO_API_BASE:()=>z,MIMO_API_UA:()=>A,getMimoAccountCookie:()=>B,getMimoAccountUsage:()=>C,invalidateMimoAccountCookieCache:()=>y,readDesktopPassToken:()=>r,resolveMimoServerBase:()=>u});var d=c(73024),e=c(48161),f=c(76760),g=c(77598),h=c(73794);let i={cn:"https://mimo-server-cn.xiaomimimo.com",sgp:"https://mimo-server-sgp.xiaomimimo.com",ams:"https://mimo-server-ams.xiaomimimo.com",ru:"https://mimo-server-ru.xiaomimimo.com",in:"https://mimo-server-in.xiaomimimo.com"},j=i.sgp,k={cn:"mimopc",sgp:"mimosgp",ams:"mimoams",ru:"mimoru",in:"mimoin"},l="account.xiaomi.com",m="miNative PC/Normal Windows_NT/10.0.19045 SDKV/1.0.0 DEVT/PC DEVS/Windows APP/miaccount_desktop APPV/0.1.0",n="MiClaw/1.0",o=new Map,p=new Map;async function q(){let a,b=(a=e.homedir(),"win32"===process.platform?f.join(a,"AppData","Roaming","Xiaomi MiMo","Partitions","xiaomi-account","Network","Cookies"):"darwin"===process.platform?f.join(a,"Library","Application Support","Xiaomi MiMo","Partitions","xiaomi-account","Network","Cookies"):f.join(a,".config","Xiaomi MiMo","Partitions","xiaomi-account","Network","Cookies"));if(!d.existsSync(b))return null;let h=f.join(e.tmpdir(),`9r-mimo-cookies-${process.pid}-${g.randomBytes(4).toString("hex")}.db`);try{d.copyFileSync(b,h)}catch{return null}try{let{DatabaseSync:a}=await Promise.resolve().then(c.t.bind(c,79868,19)),b=new a(h,{readOnly:!0}),d=b.prepare("SELECT name, value FROM cookies WHERE host_key = ?").all("."+l);b.close();let e=Object.fromEntries(d.map(a=>[a.name,a.value]));return e.passToken?e:null}catch{return null}finally{try{d.unlinkSync(h)}catch{}}}async function r(){try{let a=await q();if(!a?.passToken)return null;return{passToken:a.passToken,userId:a.userId||null,cUserId:a.cUserId||null}}catch{return null}}function s(a,b){for(let c of b.headers.getSetCookie?.()||[]){let b=/^([^=]+)=([^;]*)/.exec(c.trim());b&&b[2]&&(a[b[1]]=b[2])}}function t(a){return Object.entries(a).filter(([,a])=>a).map(([a,b])=>`${a}=${b}`).join("; ")}function u(a=null){return i[String(a?.region||"").toLowerCase()]||j}async function v(a,b,c=j,d="sgp"){let e=String(d||"").toLowerCase(),f=k[String(e||"").toLowerCase()]||k.sgp,g=await w(a,"cn"===e?null:b,c,f);return g&&console.log(`[mimoAccount] desktop 2-phase OK (sid=${f})`),g}async function w(a,b,c,d){var e,f;let i,j=a=>console.log(`[mimoAccount] desktopPhase fail: ${a}`),k={...a},m={};k.userId&&(m.userId=k.userId),k.passToken&&(m.passToken=k.passToken),k.cUserId&&(m.cUserId=k.cUserId);let o=`https://${l}/pass/serviceLogin?_locale=zh_CN&_snsNone=true&sid=${encodeURIComponent(d)}&_json=true`,p=await (0,h.proxyAwareFetch)(o,{headers:{Cookie:t(m),"User-Agent":n,Accept:"application/json"}},b),q=await p.text(),r=q.replace(/^&&&START&&&/,""),u=r.match(/"nonce"\s*:\s*(\d+)/)?.[1],v=null;try{v=JSON.parse(r)}catch{}if(u&&v&&(v.nonce=u),!v||"number"!=typeof v.code||0!==v.code||!v.location||!v.nonce||!v.ssecurity)return j(`phase1 sid=${d} http=${p.status} code=${v?.code??"?"} hasLoc=${!!v?.location} secondValidation=${v?.bSecondValidation??"?"} notificationUrl=${v?.notificationUrl?"present":"no"} body=${JSON.stringify(q.slice(0,200))}`),null;s(k,p);let w=v.location.includes("?")?"&":"?",x=`${v.location}${w}clientSign=${(e=u||v.nonce,i=`nonce=${e}`+((f=v.ssecurity)&&f.trim()?`&${f}`:""),encodeURIComponent(g.createHash("sha1").update(i).digest("base64")))}`;for(let a=0;a<8;a++){let a=await (0,h.proxyAwareFetch)(x,{redirect:"manual",headers:{"User-Agent":n}},b);s(k,a);let c=a.headers.get("location");if(a.status>=300&&a.status<400&&c){x=new URL(c,x).toString();continue}break}let y=`${d}_serviceToken`;if(!k.serviceToken&&k[y]&&(k.serviceToken=k[y]),!k.serviceToken)return j(`phase2 no serviceToken sid=${d} jar=[${Object.keys(k).join(",")}]`),null;let z={};for(let[a,b]of Object.entries(k))b&&("serviceToken"===a||"userId"===a||/_(ph|slh)$/.test(a))&&(z[a]=b);return t(z)}async function x(a,b){let c=u(a),d=a?.mimoPassToken?{passToken:a.mimoPassToken,userId:a.mimoUserId,cUserId:a.mimoCUserId}:await q();if(!d)return{cookie:null,reason:"no-pass-token"};let e=g.createHash("sha256").update(`${c}|${d.passToken}`).digest("hex"),f=o.get(e);if(f&&Date.now()-f.at<18e5)return{cookie:f.cookie};let h=p.get(e);if(h){let a=await h;return a?{cookie:a}:{cookie:null,reason:"sso-failed"}}let i=(async()=>{try{return await v(d,b,c,a?.region)}catch(a){return console.log(`[mimoAccount] acquire threw: ${a?.message||a} | ${String(a?.stack||"").split("\n").slice(1,4).join(" <- ")}`),null}finally{p.delete(e)}})();p.set(e,i);let j=await i;return j?(o.set(e,{cookie:j,at:Date.now()}),{cookie:j}):{cookie:null,reason:"sso-failed"}}function y(){o.clear()}let z=j,A=m;async function B(a=null,b=null){try{let{cookie:c}=await x(a,b);return c}catch(a){return console.log(`[mimoAccount] getMimoAccountCookie threw: ${a?.message||a} | ${String(a?.stack||"").split("\n").slice(1,4).join(" <- ")}`),null}}async function C(a=null,b=null){let{cookie:c,reason:d}=await x(a,b);if(!c)return{error:"no-pass-token"===d?"no-session":"session-failed"};try{let d=await (0,h.proxyAwareFetch)(`${u(a)}/api/user/usage`,{headers:{"User-Agent":m,Cookie:c,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b);if(!d.ok)return{error:`http-${d.status}`};let e=await d.json().catch(()=>null);if(!e||0!==e.code||!e.data)return{error:"bad-response"};return{percent:e.data.percent,resetDate:e.data.resetDate,resetAt:e.data.resetAt}}catch(a){return{error:a.message}}}},73794:(a,b,c)=>{c.r(b),c.d(b,{DIRECT_KEEP_ALIVE_MAX_TIMEOUT_MS:()=>j,DIRECT_KEEP_ALIVE_TIMEOUT_MS:()=>i,createBypassRequest:()=>A,default:()=>D,getDirectDispatcher:()=>l,isLoopbackTarget:()=>v,isStaleSocketError:()=>n,proxyAwareFetch:()=>B,resetDirectDispatcherForTests:()=>m});var d=c(27910),e=c(19874);let f=globalThis.fetch,g=new Map;function h(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}let i=h("FETCH_KEEP_ALIVE_TIMEOUT_MS",3e4),j=h("FETCH_KEEP_ALIVE_MAX_TIMEOUT_MS",3e4),k=null;async function l(){if(k)return k;try{let{Agent:a}=await c.e(7995).then(c.t.bind(c,17995,19));k=new a({keepAliveTimeout:i,keepAliveMaxTimeout:j})}catch(a){a?.message,k=null}return k}function m(){k=null}function n(a){let b=a?.cause?.code||a?.code;return"UND_ERR_SOCKET"===b||"ECONNRESET"===b||"EPIPE"===b}let o=new Map,p=new Set(["SELF_SIGNED_CERT_IN_CHAIN","DEPTH_ZERO_SELF_SIGNED_CERT","UNABLE_TO_VERIFY_LEAF_SIGNATURE","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","CERT_HAS_EXPIRED","ERR_TLS_CERT_ALTNAME_INVALID"]),q=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],r=["8.8.8.8","8.8.4.4"];function s(a){return null==a?"":String(a).trim()}function t(a,b){let c=s(process.env[a]);if(!/^[1-9]\d*$/.test(c))return b;let d=Number(c);return Number.isSafeInteger(d)?d:b}async function u(a){let b=o.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,19)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,19)),f=new b.Resolver;f.setServers(r);let g=d(f.resolve4.bind(f)),h=await g(a);return o.set(a,{ip:h[0],expiry:Date.now()+e.v1.dnsCacheTtlMs}),h[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function v(a){let b;try{b=new URL(a).hostname.toLowerCase()}catch{return!1}let c=b.startsWith("[")&&b.endsWith("]")?b.slice(1,-1):b;if("localhost"===c||c.endsWith(".localhost")||"::1"===c||"0:0:0:0:0:0:0:1"===c)return!0;let d=/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i.exec(c);if(d)return(parseInt(d[1],16)>>8&255)==127;let e=/^::ffff:(\d{1,3}(?:\.\d{1,3}){3})$/i.exec(c),f=e?e[1]:c;return/^127(?:\.\d{1,3}){3}$/.test(f)}function w(a,b){let c,d=s(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function x(a){let b=s(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function y(a,b=!1){let d=x(a);if(!d&&!b)return null;let f=`${d||"direct"}::${b?"insecure":"secure"}`;if(!g.has(f)){g.size>=e.v1.proxyDispatchersMaxSize&&g.delete(g.keys().next().value);let{Agent:a,ProxyAgent:h}=await c.e(7995).then(c.t.bind(c,17995,19)),i=t("PROXY_CONNECT_TIMEOUT_MS",9e4),j=t("PROXY_HEADERS_TIMEOUT_MS",3e5),k=b?{rejectUnauthorized:!1}:void 0,l=d?new h({uri:d,connectTimeout:i,headersTimeout:j,bodyTimeout:0,...b?{requestTls:k}:{}}):new a({connect:k});g.set(f,l)}return g.get(f)}async function z(a,b,c){let d="string"==typeof a?a:a.toString();try{if(c){let d=await y(c);return await f(a,d?{...b,dispatcher:d}:b)}let d=await l(),e=d?{...b,dispatcher:d}:{...b};try{return await f(a,e)}catch(c){if(!d||!n(c))throw c;let b={...e.headers||{},Connection:"close"};return await f(a,{...e,headers:b})}}catch(e){let d;if("true"!==process.env.STRICT_SSL&&"1"!==process.env.STRICT_SSL&&(d=e?.cause?.code||e?.code,p.has(d))){if(b.body&&"function"==typeof b.body.getReader&&b.body.locked)throw e;console.warn(`[ProxyFetch] TLS cert verification failed (${e.cause?.code||e.code}), retrying with insecure TLS: ${a}`);let d=await y(c,!0);return await f(a,{...b,dispatcher:d})}throw e}}async function A(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,19)),g=await Promise.resolve().then(c.t.bind(c,91645,19)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:e.method||"POST",headers:{...e.headers,Host:a.hostname}},i=h.request(b,a=>{let b=new Headers;for(let[c,d]of Object.entries(a.headers||{}))Array.isArray(d)?d.forEach(a=>b.append(c,String(a))):null!=d&&b.set(c,String(d));let e={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:b,body:d.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await e.text())};c(e)});i.on("error",f),e.body&&i.write("string"==typeof e.body?e.body:JSON.stringify(e.body)),i.end()}),g.on("error",f)})}async function B(a,b={},c=null){let d="string"==typeof a?a:a.toString(),e=s(c?.vercelRelayUrl);if(e){let a=new URL(d),c={...b.headers instanceof Headers?Object.fromEntries(b.headers.entries()):{...b.headers||{}},"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return f(e,{...b,headers:c})}let g=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0||v(a))return null;let c=s(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=s(b?.noProxy??b?.connectionNoProxy);return d&&w(a,d)?null:x(c)}(d,c),h=g?null:x(function(a){let b;if(v(a)||w(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(d)),i=g||h;if(function(a){try{let b=new URL(a).hostname;return q.some(a=>b.includes(a))}catch{return!1}}(d)){if(i)try{return await z(a,b,i)}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await u(a.hostname);if(c)return await A(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(i)try{return await z(a,b,i)}catch(d){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${d.message}`);return console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${d.message}`),z(a,b,null)}let j=c?.proxyPoolId||c?.enabled===!0||c?.connectionProxyEnabled===!0||!!s(c?.url??c?.connectionProxyUrl);if(c?.strictProxy===!0&&j)throw Error("[ProxyFetch] Proxy required but none resolved (strictProxy=true)");return z(a,b,null)}async function C(a,b={}){return B(a,b,null)}globalThis.fetch!==C&&(globalThis.fetch=C);let D=C}};
@@ -1 +1 @@
1
- exports.id=4827,exports.ids=[615,4827,9485],exports.modules={16329:(a,b,c)=>{"use strict";c.d(b,{Bb:()=>e,Om:()=>g});let d=globalThis.__9routerShutdownState??={flushers:new Set,priorities:new Map,shutdownPromise:null,signalHandler:null,beforeExitHandler:null};function e(a,b=0){if("function"!=typeof a)throw TypeError("shutdown flusher must be a function");return d.flushers.add(a),d.priorities.set(a,Number.isFinite(b)?b:0),d.signalHandler??=()=>g(0),d.beforeExitHandler??=()=>f(),process.listeners("SIGINT").includes(d.signalHandler)||process.once("SIGINT",d.signalHandler),process.listeners("SIGTERM").includes(d.signalHandler)||process.once("SIGTERM",d.signalHandler),process.listeners("beforeExit").includes(d.beforeExitHandler)||process.once("beforeExit",d.beforeExitHandler),()=>{d.flushers.delete(a),d.priorities.delete(a)}}function f(){return d.shutdownPromise||(d.shutdownPromise=(async()=>{let a=new Map;for(let b of d.flushers){let c=d.priorities.get(b)??0;a.has(c)||a.set(c,[]),a.get(c).push(b)}for(let b of[...a.keys()].sort((a,b)=>a-b))for(let c of(await Promise.allSettled(a.get(b).map(a=>Promise.resolve().then(a)))))"rejected"===c.status&&console.error("[Shutdown] flusher failed:",c.reason?.message||c.reason)})()),d.shutdownPromise}async function g(a=0){await f(),process.exit(a)}},21719:(a,b,c)=>{"use strict";c.d(b,{g:()=>n,l:()=>m});var d=c(79646),e=c(33873),f=c.n(e),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(30869),l=c(16329);async function m(){!function(){try{let a=f().join("win32"===process.platform?f().join(process.env.APPDATA||"","ezrouter"):f().join(j().homedir(),".ezrouter"),"mitm",".mitm.pid");if(!h().existsSync(a))return;let b=parseInt(h().readFileSync(a,"utf8").trim(),10);if(!b)return;if("win32"===process.platform)try{(0,d.execSync)(`taskkill /F /T /PID ${b}`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{try{(0,d.execSync)(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${b} -Force"`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{}}else try{(0,d.execSync)(`sudo -n kill -9 ${b} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{try{process.kill(b,"SIGKILL")}catch{}}try{h().unlinkSync(a)}catch{}}catch{}}();let a=function(){let a=[];if("win32"===process.platform){try{(0,d.execSync)('powershell -NonInteractive -WindowStyle Hidden -Command "Get-WmiObject Win32_Process -Filter \'Name=\\"node.exe\\"\' | Select-Object ProcessId,CommandLine | ConvertTo-Csv -NoTypeInformation"',{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").slice(1).filter(a=>a.trim()).forEach(b=>{let c=b.toLowerCase();if(c.includes("ezrouter")||c.includes("9router")||c.includes("next-server")||c.includes("\\bin\\app\\")||c.includes("/bin/app/")||c.includes("cli.js")){let c=b.match(/^"(\d+)"/);c&&c[1]&&c[1]!==process.pid.toString()&&a.push(c[1])}})}catch{}for(let b of["cloudflared","tray_windows_release"])try{let c=`powershell -NonInteractive -WindowStyle Hidden -Command "Get-Process ${b} -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Id"`;(0,d.execSync)(c,{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").forEach(b=>{let c=b.trim();c&&!isNaN(c)&&a.push(c)})}catch{}}else try{(0,d.execSync)("ps -eo pid,comm,args 2>/dev/null",{encoding:"utf8",timeout:5e3}).split("\n").slice(1).forEach(b=>{let c=b.trim();if(!c)return;let d=c.split(/\s+/)[0];if(!d||isNaN(d)||d===process.pid.toString())return;let e=c.toLowerCase();(e.includes("node")&&(e.includes("ezrouter")||e.includes("9router"))&&(e.includes("cli.js")||e.includes("/ezrouter")||e.includes("/9router"))||e.includes("next-server")||e.includes("cloudflared")&&(e.includes("ezrouter")||e.includes("9router"))||e.includes("/bin/app/")||e.includes("tray_darwin")||e.includes("tray_linux"))&&a.push(d)})}catch{}return a}(),b=process.platform;a.forEach(a=>{try{"win32"===b?(0,d.execSync)(`taskkill /F /PID ${a} 2>nul`,{stdio:"ignore",shell:!0,windowsHide:!0,timeout:3e3}):(0,d.execSync)(`kill -9 ${a} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{}}),a.length>0&&await new Promise(a=>setTimeout(a,1500))}function n(a=k.h0.npmPackageName){let b=function(a){try{if(!a||!h().existsSync(a))return a;let b=f().join(process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?f().join(process.env.APPDATA||f().join(j().homedir(),"AppData","Roaming"),"ezrouter"):f().join(j().homedir(),".ezrouter"),"runtime","updater"),c=f().join(b,"updater.js");if(h().existsSync(c))try{if(h().statSync(a).size===h().statSync(c).size)return c}catch{}return h().mkdirSync(b,{recursive:!0}),h().copyFileSync(a,c),c}catch{return a}}(function(){if(process.env.UPDATER_SCRIPT_PATH&&h().existsSync(process.env.UPDATER_SCRIPT_PATH))return process.env.UPDATER_SCRIPT_PATH;let a=f().join(process.cwd(),"src","lib","updater","updater.js");if(h().existsSync(a))return a;let b=f().join(process.cwd(),"..","src","lib","updater","updater.js");return h().existsSync(b)?b:a}()),c="1"===process.env.TRAY_MODE,e={cmd:"win32"===process.platform?"npx.cmd":"npx",args:[k.h0.npmPackageName]},g=c?[...e.args,"--tray","--skip-update"]:[...e.args,"--skip-update"];(0,d.spawn)(process.execPath,[b],{detached:!0,stdio:"ignore",windowsHide:!0,env:{...process.env,UPDATER_PKG_NAME:a,UPDATER_PORT:String(k.h0.statusPort),UPDATER_TAIL_LINES:String(k.h0.statusLogTailLines),UPDATER_RETRIES:String(k.h0.installRetries),UPDATER_RETRY_DELAY_MS:String(k.h0.installRetryDelayMs),UPDATER_LINGER_MS:String(k.h0.lingerAfterDoneMs),UPDATER_WAIT_MIN_MS:String(k.h0.waitForExitMinMs),UPDATER_WAIT_MAX_MS:String(k.h0.waitForExitMaxMs),UPDATER_WAIT_CHECK_MS:String(k.h0.waitForExitCheckMs),UPDATER_APP_PORT:String(process.env.PORT||k.h0.appPort),UPDATER_RELAUNCH:"1",UPDATER_RELAUNCH_CMD:e.cmd,UPDATER_RELAUNCH_ARGS:JSON.stringify(g)}}).unref(),setTimeout(()=>(0,l.Om)(0),k.h0.exitDelayMs)}},29485:(a,b,c)=>{"use strict";c.d(b,{KC:()=>s,OA:()=>p,PROVIDER_MODELS:()=>e.vq,SM:()=>j,Xg:()=>r,cY:()=>t,ez:()=>o,fZ:()=>k,kt:()=>q,ux:()=>n});var d=c(78540),e=c(39141),f=c(6595),g=c(8382),h=c(19956);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}function k(a){let b=e.vq[a];return b?.[0]?.id||null}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function n(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function o(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.ec)(d):i(a)?(0,g.i8)(b)?.supportedFormats||[h.h.OPENAI]:null}function p(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?.kind||d?.type||null}function q(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",f=d?b.slice(0,c.index).trim():b,h=m(e.vq[a],f,a),i=h?.upstreamModelId||h?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof f&&f.endsWith(g.d5)?f.slice(0,-g.d5.length)+d:f+d}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));let r=Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]));function s(a){let b=r[a]||a;return e.vq[b]||[]}function t(a,b){return(0,f.g5)(m(e.vq[a],b,a))}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rabbi696/ezrouter",installCmd:"npm i -g @rabbi696/ezrouter",installCmdLatest:"npm i -g @rabbi696/ezrouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20126},h={maxLines:200,pollIntervalMs:1e3,streamTimeoutMs:5e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,catchUpWindowMs:18e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingInactiveSession:!0,inactiveMinPingIntervalMs:18e6,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},39006:a=>{"use strict";a.exports={rE:"0.6.22"}},40615:(a,b,c)=>{"use strict";c.d(b,{AI_PROVIDERS:()=>u,js:()=>B,DI:()=>n,fg:()=>k,Pd:()=>o,Vj:()=>p,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>D,wb:()=>C,br:()=>l,wG:()=>A,zt:()=>v,gb:()=>r,gC:()=>s,AR:()=>t,mq:()=>q,YI:()=>x,rs:()=>w,p5:()=>z});var d=c(78540);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.default.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","systemoneConfig","credentialFallback","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.default.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.fastMode?{fastMode:a.fastMode}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.baseUrlField?{baseUrlField:a.baseUrlField}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.models?{models:a.models}:{},...a.authModes?{authModes:a.authModes}:{},...a.features?{features:{...a.features}}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.apiKeyOptionalWith?{apiKeyOptionalWith:a.apiKeyOptionalWith}:{}}}(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-",p="custom-video-";function q(a){return"string"==typeof a&&a.startsWith(m)}function r(a){return"string"==typeof a&&a.startsWith(n)}function s(a){return"string"==typeof a&&a.startsWith(o)}function t(a){return"string"==typeof a&&a.startsWith(p)}let u={...h,...i,...j,...k,...l};function v(a){for(let b of Object.values(u))if(b.alias===a||b.id===a)return b;return null}function w(a){let b=v(a);return b?.id||a}function x(a){return!!a&&(!!v(a)||q(a)||r(a))}let y={nvidia:40};function z(a,b){let c=(a?.rpmByProvider||{})[b];if(0===c||"0"===c)return 0;let d=Number(c);return Number.isFinite(d)&&d>0?d:y[b]||0}function A(a){let b=u[a];return b?.alias||a}let B=Object.values(u).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(u).reduce((a,b)=>(a[b.id]=b.alias,a),{});let C=d.default.filter(a=>a.features?.usage).map(a=>a.id),D=d.default.filter(a=>a.features?.usageApikey).map(a=>a.id)},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{CP:()=>f,Xg:()=>d.Xg,bs:()=>g,eh:()=>e,vq:()=>d.PROVIDER_MODELS,zc:()=>i});var d=c(29485);Object.entries(c(40615).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,g={vision:{icon:"visibility",label:"Vision",desc:"Supports image input",color:"text-blue-500"},reasoning:{icon:"neurology",label:"Reasoning",desc:"Supports reasoning / thinking",color:"text-amber-500"}},h={"gemini-live":{label:"Gemini Live (realtime WebSocket)",desc:"Streams audio over bidiGenerateContent and returns incremental transcription segments"}};function i(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(h,a.trim())}Object.freeze(Object.keys(h))},96487:()=>{}};
1
+ exports.id=4827,exports.ids=[615,4827,9485],exports.modules={16329:(a,b,c)=>{"use strict";c.d(b,{Bb:()=>e,Om:()=>g});let d=globalThis.__9routerShutdownState??={flushers:new Set,priorities:new Map,shutdownPromise:null,signalHandler:null,beforeExitHandler:null};function e(a,b=0){if("function"!=typeof a)throw TypeError("shutdown flusher must be a function");return d.flushers.add(a),d.priorities.set(a,Number.isFinite(b)?b:0),d.signalHandler??=()=>g(0),d.beforeExitHandler??=()=>f(),process.listeners("SIGINT").includes(d.signalHandler)||process.once("SIGINT",d.signalHandler),process.listeners("SIGTERM").includes(d.signalHandler)||process.once("SIGTERM",d.signalHandler),process.listeners("beforeExit").includes(d.beforeExitHandler)||process.once("beforeExit",d.beforeExitHandler),()=>{d.flushers.delete(a),d.priorities.delete(a)}}function f(){return d.shutdownPromise||(d.shutdownPromise=(async()=>{let a=new Map;for(let b of d.flushers){let c=d.priorities.get(b)??0;a.has(c)||a.set(c,[]),a.get(c).push(b)}for(let b of[...a.keys()].sort((a,b)=>a-b))for(let c of(await Promise.allSettled(a.get(b).map(a=>Promise.resolve().then(a)))))"rejected"===c.status&&console.error("[Shutdown] flusher failed:",c.reason?.message||c.reason)})()),d.shutdownPromise}async function g(a=0){await f(),process.exit(a)}},21719:(a,b,c)=>{"use strict";c.d(b,{g:()=>n,l:()=>m});var d=c(79646),e=c(33873),f=c.n(e),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(30869),l=c(16329);async function m(){!function(){try{let a=f().join("win32"===process.platform?f().join(process.env.APPDATA||"","ezrouter"):f().join(j().homedir(),".ezrouter"),"mitm",".mitm.pid");if(!h().existsSync(a))return;let b=parseInt(h().readFileSync(a,"utf8").trim(),10);if(!b)return;if("win32"===process.platform)try{(0,d.execSync)(`taskkill /F /T /PID ${b}`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{try{(0,d.execSync)(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${b} -Force"`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{}}else try{(0,d.execSync)(`sudo -n kill -9 ${b} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{try{process.kill(b,"SIGKILL")}catch{}}try{h().unlinkSync(a)}catch{}}catch{}}();let a=function(){let a=[];if("win32"===process.platform){try{(0,d.execSync)('powershell -NonInteractive -WindowStyle Hidden -Command "Get-WmiObject Win32_Process -Filter \'Name=\\"node.exe\\"\' | Select-Object ProcessId,CommandLine | ConvertTo-Csv -NoTypeInformation"',{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").slice(1).filter(a=>a.trim()).forEach(b=>{let c=b.toLowerCase();if(c.includes("ezrouter")||c.includes("9router")||c.includes("next-server")||c.includes("\\bin\\app\\")||c.includes("/bin/app/")||c.includes("cli.js")){let c=b.match(/^"(\d+)"/);c&&c[1]&&c[1]!==process.pid.toString()&&a.push(c[1])}})}catch{}for(let b of["cloudflared","tray_windows_release"])try{let c=`powershell -NonInteractive -WindowStyle Hidden -Command "Get-Process ${b} -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Id"`;(0,d.execSync)(c,{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").forEach(b=>{let c=b.trim();c&&!isNaN(c)&&a.push(c)})}catch{}}else try{(0,d.execSync)("ps -eo pid,comm,args 2>/dev/null",{encoding:"utf8",timeout:5e3}).split("\n").slice(1).forEach(b=>{let c=b.trim();if(!c)return;let d=c.split(/\s+/)[0];if(!d||isNaN(d)||d===process.pid.toString())return;let e=c.toLowerCase();(e.includes("node")&&(e.includes("ezrouter")||e.includes("9router"))&&(e.includes("cli.js")||e.includes("/ezrouter")||e.includes("/9router"))||e.includes("next-server")||e.includes("cloudflared")&&(e.includes("ezrouter")||e.includes("9router"))||e.includes("/bin/app/")||e.includes("tray_darwin")||e.includes("tray_linux"))&&a.push(d)})}catch{}return a}(),b=process.platform;a.forEach(a=>{try{"win32"===b?(0,d.execSync)(`taskkill /F /PID ${a} 2>nul`,{stdio:"ignore",shell:!0,windowsHide:!0,timeout:3e3}):(0,d.execSync)(`kill -9 ${a} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{}}),a.length>0&&await new Promise(a=>setTimeout(a,1500))}function n(a=k.h0.npmPackageName){let b=function(a){try{if(!a||!h().existsSync(a))return a;let b=f().join(process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?f().join(process.env.APPDATA||f().join(j().homedir(),"AppData","Roaming"),"ezrouter"):f().join(j().homedir(),".ezrouter"),"runtime","updater"),c=f().join(b,"updater.js");if(h().existsSync(c))try{if(h().statSync(a).size===h().statSync(c).size)return c}catch{}return h().mkdirSync(b,{recursive:!0}),h().copyFileSync(a,c),c}catch{return a}}(function(){if(process.env.UPDATER_SCRIPT_PATH&&h().existsSync(process.env.UPDATER_SCRIPT_PATH))return process.env.UPDATER_SCRIPT_PATH;let a=f().join(process.cwd(),"src","lib","updater","updater.js");if(h().existsSync(a))return a;let b=f().join(process.cwd(),"..","src","lib","updater","updater.js");return h().existsSync(b)?b:a}()),c="1"===process.env.TRAY_MODE,e={cmd:"win32"===process.platform?"npx.cmd":"npx",args:[k.h0.npmPackageName]},g=c?[...e.args,"--tray","--skip-update"]:[...e.args,"--skip-update"];(0,d.spawn)(process.execPath,[b],{detached:!0,stdio:"ignore",windowsHide:!0,env:{...process.env,UPDATER_PKG_NAME:a,UPDATER_PORT:String(k.h0.statusPort),UPDATER_TAIL_LINES:String(k.h0.statusLogTailLines),UPDATER_RETRIES:String(k.h0.installRetries),UPDATER_RETRY_DELAY_MS:String(k.h0.installRetryDelayMs),UPDATER_LINGER_MS:String(k.h0.lingerAfterDoneMs),UPDATER_WAIT_MIN_MS:String(k.h0.waitForExitMinMs),UPDATER_WAIT_MAX_MS:String(k.h0.waitForExitMaxMs),UPDATER_WAIT_CHECK_MS:String(k.h0.waitForExitCheckMs),UPDATER_APP_PORT:String(process.env.PORT||k.h0.appPort),UPDATER_RELAUNCH:"1",UPDATER_RELAUNCH_CMD:e.cmd,UPDATER_RELAUNCH_ARGS:JSON.stringify(g)}}).unref(),setTimeout(()=>(0,l.Om)(0),k.h0.exitDelayMs)}},29485:(a,b,c)=>{"use strict";c.d(b,{KC:()=>t,OA:()=>p,PROVIDER_MODELS:()=>e.vq,SM:()=>j,V2:()=>q,Xg:()=>s,cY:()=>u,ez:()=>o,fZ:()=>k,kt:()=>r,ux:()=>n});var d=c(30722),e=c(39141),f=c(6595),g=c(8382),h=c(19956);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}function k(a){let b=e.vq[a];return b?.[0]?.id||null}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function n(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function o(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.ec)(d):i(a)?(0,g.i8)(b)?.supportedFormats||[h.h.OPENAI]:null}function p(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?.kind||d?.type||null}function q(a,b){return m(e.vq[a],b,a)||null}function r(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",f=d?b.slice(0,c.index).trim():b,h=m(e.vq[a],f,a),i=h?.upstreamModelId||h?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof f&&f.endsWith(g.d5)?f.slice(0,-g.d5.length)+d:f+d}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));let s=Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]));function t(a){let b=s[a]||a;return e.vq[b]||[]}function u(a,b){return(0,f.g5)(m(e.vq[a],b,a))}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rabbi696/ezrouter",installCmd:"npm i -g @rabbi696/ezrouter",installCmdLatest:"npm i -g @rabbi696/ezrouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20126},h={maxLines:200,pollIntervalMs:1e3,streamTimeoutMs:5e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,catchUpWindowMs:18e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingInactiveSession:!0,inactiveMinPingIntervalMs:18e6,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.6-terra",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},39006:a=>{"use strict";a.exports={rE:"0.6.23"}},40615:(a,b,c)=>{"use strict";c.d(b,{AI_PROVIDERS:()=>u,js:()=>B,DI:()=>n,fg:()=>k,Pd:()=>o,Vj:()=>p,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>D,wb:()=>C,br:()=>l,wG:()=>A,zt:()=>v,gb:()=>r,gC:()=>s,AR:()=>t,mq:()=>q,YI:()=>x,rs:()=>w,p5:()=>z});var d=c(30722);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.default.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","systemoneConfig","credentialFallback","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.default.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.fastMode?{fastMode:a.fastMode}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.baseUrlField?{baseUrlField:a.baseUrlField}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.models?{models:a.models}:{},...a.authModes?{authModes:a.authModes}:{},...a.features?{features:{...a.features}}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.apiKeyOptionalWith?{apiKeyOptionalWith:a.apiKeyOptionalWith}:{}}}(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-",p="custom-video-";function q(a){return"string"==typeof a&&a.startsWith(m)}function r(a){return"string"==typeof a&&a.startsWith(n)}function s(a){return"string"==typeof a&&a.startsWith(o)}function t(a){return"string"==typeof a&&a.startsWith(p)}let u={...h,...i,...j,...k,...l};function v(a){for(let b of Object.values(u))if(b.alias===a||b.id===a)return b;return null}function w(a){let b=v(a);return b?.id||a}function x(a){return!!a&&(!!v(a)||q(a)||r(a))}let y={nvidia:40};function z(a,b){let c=(a?.rpmByProvider||{})[b];if(0===c||"0"===c)return 0;let d=Number(c);return Number.isFinite(d)&&d>0?d:y[b]||0}function A(a){let b=u[a];return b?.alias||a}let B=Object.values(u).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(u).reduce((a,b)=>(a[b.id]=b.alias,a),{});let C=d.default.filter(a=>a.features?.usage).map(a=>a.id),D=d.default.filter(a=>a.features?.usageApikey).map(a=>a.id)},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{CP:()=>f,Xg:()=>d.Xg,bs:()=>g,eh:()=>e,vq:()=>d.PROVIDER_MODELS,zc:()=>i});var d=c(29485);Object.entries(c(40615).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,g={vision:{icon:"visibility",label:"Vision",desc:"Supports image input",color:"text-blue-500"},reasoning:{icon:"neurology",label:"Reasoning",desc:"Supports reasoning / thinking",color:"text-amber-500"}},h={"gemini-live":{label:"Gemini Live (realtime WebSocket)",desc:"Streams audio over bidiGenerateContent and returns incremental transcription segments"}};function i(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(h,a.trim())}Object.freeze(Object.keys(h))},96487:()=>{}};