zevairouter 1.0.203 → 1.0.205

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 (636) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +8 -8
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  62. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  63. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  64. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  65. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  66. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  67. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  68. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  69. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  70. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  71. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  72. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  73. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  74. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  75. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  76. package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  77. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  78. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  79. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  80. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  81. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  82. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  83. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  84. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  85. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  86. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  87. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  88. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
  90. package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  91. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  92. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  93. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  94. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  95. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  96. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  97. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  98. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  99. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  100. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  101. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  102. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  103. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  104. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  105. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  106. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  133. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  135. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  299. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  317. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  319. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  321. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  325. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  338. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  339. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  340. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  341. package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
  342. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  343. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  344. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  345. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  346. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  347. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  348. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  349. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
  350. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  351. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  352. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  353. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  354. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
  355. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  356. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
  357. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  358. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  359. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  360. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  361. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  362. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  363. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  364. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  365. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  366. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  367. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  368. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  369. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  370. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  371. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  372. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  373. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  374. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  375. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  376. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  377. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  378. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  379. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  380. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  381. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  382. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  383. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  384. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  385. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  386. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  387. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  388. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  389. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
  390. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  391. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  392. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  393. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  394. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
  395. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  396. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
  397. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  398. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  399. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  400. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  401. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  402. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  403. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  404. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  405. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  406. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  407. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  408. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  409. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  410. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  411. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  412. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  413. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  414. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  415. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  416. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  417. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  418. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  419. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  420. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  421. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  422. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  423. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  424. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  425. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  426. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  427. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  428. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  429. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  430. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +5 -5
  431. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  432. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
  433. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  434. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  435. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +5 -5
  436. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
  437. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +3 -3
  438. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  439. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  440. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  441. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  442. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  443. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  444. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  445. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  446. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  447. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  448. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  449. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  450. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  451. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  452. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  453. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  454. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  455. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  456. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  457. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  458. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  459. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  460. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  461. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  462. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  463. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  464. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  465. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  466. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  467. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  468. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  469. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  470. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  471. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  472. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  473. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  474. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  475. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  476. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  477. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  478. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  479. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  480. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  481. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  482. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  483. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  484. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  485. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  486. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  487. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  488. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  489. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  490. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  491. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  492. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  493. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  494. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  495. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  496. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  497. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  498. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  499. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  500. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  501. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  502. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  503. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
  504. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
  505. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  506. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  507. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  508. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  509. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  510. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  511. package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  512. package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  513. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  514. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  515. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  516. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  517. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  518. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  519. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  520. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  521. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  522. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  523. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  524. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  525. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  526. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  527. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  528. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  529. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  530. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  531. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  532. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  533. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  534. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  535. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  536. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  537. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  538. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  539. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  540. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  541. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  542. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  543. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  544. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  545. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  546. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  547. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  548. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  549. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  550. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  551. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  552. package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  553. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  554. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  555. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  556. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  557. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  558. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  559. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  560. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  561. package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
  562. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  563. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  564. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  565. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  566. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  567. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  568. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  569. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  570. package/cli/app/.next-cli-build/server/app/landing.rsc +4 -4
  571. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  572. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  573. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  574. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  575. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  576. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  577. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  578. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  579. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  580. package/cli/app/.next-cli-build/server/app/login.rsc +4 -4
  581. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  582. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  583. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  584. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  585. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  586. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  587. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  588. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  589. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  590. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -1
  591. package/cli/app/.next-cli-build/server/app-paths-manifest.json +8 -8
  592. package/cli/app/.next-cli-build/server/chunks/1130.js +2 -0
  593. package/cli/app/.next-cli-build/server/chunks/1131.js +1 -1
  594. package/cli/app/.next-cli-build/server/chunks/2594.js +1 -1
  595. package/cli/app/.next-cli-build/server/chunks/3110.js +1 -1
  596. package/cli/app/.next-cli-build/server/chunks/3949.js +1 -1
  597. package/cli/app/.next-cli-build/server/chunks/3999.js +1 -1
  598. package/cli/app/.next-cli-build/server/chunks/412.js +1 -1
  599. package/cli/app/.next-cli-build/server/chunks/4404.js +1 -1
  600. package/cli/app/.next-cli-build/server/chunks/4566.js +1 -1
  601. package/cli/app/.next-cli-build/server/chunks/4827.js +1 -1
  602. package/cli/app/.next-cli-build/server/chunks/5024.js +1 -1
  603. package/cli/app/.next-cli-build/server/chunks/5295.js +1 -1
  604. package/cli/app/.next-cli-build/server/chunks/5307.js +1 -1
  605. package/cli/app/.next-cli-build/server/chunks/5330.js +4 -2
  606. package/cli/app/.next-cli-build/server/chunks/5470.js +1 -1
  607. package/cli/app/.next-cli-build/server/chunks/5681.js +1 -1
  608. package/cli/app/.next-cli-build/server/chunks/5949.js +2 -2
  609. package/cli/app/.next-cli-build/server/chunks/7276.js +1 -1
  610. package/cli/app/.next-cli-build/server/chunks/7319.js +18 -15
  611. package/cli/app/.next-cli-build/server/chunks/8274.js +1 -1
  612. package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
  613. package/cli/app/.next-cli-build/server/chunks/8895.js +1 -1
  614. package/cli/app/.next-cli-build/server/chunks/891.js +1 -1
  615. package/cli/app/.next-cli-build/server/chunks/9489.js +1 -1
  616. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  617. package/cli/app/.next-cli-build/server/middleware.js +1 -1
  618. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  619. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  620. package/cli/app/.next-cli-build/static/chunks/{5497-2f2c675f9d614163.js → 5497-65c0ca649eaadd17.js} +3 -3
  621. package/cli/app/.next-cli-build/static/chunks/620-3e93270d2dcd7939.js +1 -0
  622. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-02e4cc59850ca612.js +3 -0
  623. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-34af583532884dc8.js +1 -0
  624. package/cli/app/CHANGELOG.md +10 -0
  625. package/cli/app/cli/hooks/notionTlsRuntime.js +57 -0
  626. package/cli/app/cli/hooks/postinstall.js +9 -0
  627. package/cli/app/package.json +1 -1
  628. package/cli/hooks/notionTlsRuntime.js +57 -0
  629. package/cli/hooks/postinstall.js +9 -0
  630. package/cli/package.json +1 -1
  631. package/package.json +1 -1
  632. package/cli/app/.next-cli-build/static/chunks/620-08a5ff8c6d8949c8.js +0 -1
  633. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-4c3a2c103daf032d.js +0 -3
  634. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-53b93e9ce3d13457.js +0 -1
  635. /package/cli/app/.next-cli-build/static/{oZo5MtkCgsnZxSg1bTz0j → oPe8JiJ-BI_YnReOpg41f}/_buildManifest.js +0 -0
  636. /package/cli/app/.next-cli-build/static/{oZo5MtkCgsnZxSg1bTz0j → oPe8JiJ-BI_YnReOpg41f}/_ssgManifest.js +0 -0
@@ -0,0 +1,3 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{20412:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>F});var a=s(95155),i=s(12115),r=s(73321),l=s(98500),n=s.n(l),o=s(5772),d=s(35497),c=s(52679);let u=["kiro","codebuddy","codebuddy-cn","qoder","antigravity","cloudflare-ai","grok-cli"];function m(e){return u.includes(String(e||""))}function p(e){let t=String(e||"").trim();return t&&m(t)?`/dashboard/automation?provider=${encodeURIComponent(t)}`:"/dashboard/automation"}var x=s(28777),h=s(11059),f=s(73006);let g=new Map;async function b(e){if(!e?.url||!e?.type)return[];let t=g.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return g.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}var y=s(70217),v=s(51716),j=s(14051),w=s.n(j);function k({model:e,fullModel:t,alias:s,copied:i,onCopy:r,testStatus:l,isCustom:n,isFree:o,onDeleteAlias:d,onTest:c,isTesting:u,onDisable:m,thinkingSuffix:p}){let x="ok"===l?"#22c55e":"error"===l?"#ef4444":void 0,h=p?`${t}(${p})`:t;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===l?"border-green-500/40":"error"===l?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:x?{color:x}:void 0,children:"ok"===l?"check_circle":"error"===l?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:h}),e.name&&(0,a.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),c&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:c,disabled:u,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${u?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:u?{animation:"spin 1s linear infinite"}:void 0,children:u?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:u?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(h,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):m?(0,a.jsx)("button",{onClick:m,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function N({models:e,modelAliases:t,providerStorageAlias:s,providerDisplayAlias:a}){let i={...t||{}},r=new Set(Object.values(i)),l=[];for(let t of Array.isArray(e)?e:[]){let e=function(e){if(!e)return"";if("string"==typeof e)return e.trim();let t=e.id||e.name||e.model;return"string"==typeof t?t.trim():""}(t);if(!e)continue;let n=`${s}/${e}`;if(r.has(n))continue;let o=function(e,t,s){let a=e.split("/"),i=a[a.length-1];if(!i)return"";if(!t[i])return i;let r=`${s}-${i}`;if(!t[r])return r;let l=2;for(;t[`${r}-${l}`];)l+=1;return`${r}-${l}`}(e,i,a);o&&(l.push({alias:o,model:n,modelId:e}),i[o]=n,r.add(n))}return l}function C({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:r,onTest:l,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),l&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:l,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:r,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function S({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:r,onCopy:l,onSetAlias:n,onDeleteAlias:o,onAliasesChanged:c,connections:u,isAnthropic:m}){let[p,x]=(0,i.useState)(""),[h,f]=(0,i.useState)(!1),[g,b]=(0,i.useState)(!1),[y,v]=(0,i.useState)(()=>new Set),[j,w]=(0,i.useState)({}),k=async t=>{let s=`${e}/${t}`;v(e=>new Set(e).add(t));try{let e=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s})}),t=await e.json();w(e=>({...e,[s]:t.ok?"ok":"error"}))}catch{w(e=>({...e,[s]:"error"}))}finally{v(e=>{let s=new Set(e);return s.delete(t),s})}},$=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),A=async()=>{if(!p.trim()||h)return;let a=p.trim(),[i]=N({models:[{id:a}],modelAliases:s,providerStorageAlias:e,providerDisplayAlias:t});if(!i)return void alert("This model already exists.");f(!0);try{await n(a,i.alias,e),x("")}catch(e){console.log("Error adding model:",e),alert(e?.message||`Failed to add model "${a}".`)}finally{f(!1)}},T=async()=>{if(g)return;let a=u.find(e=>!1!==e.isActive);if(a){b(!0);try{let i=await fetch(`/api/providers/${a.id}/models`),r=await i.json();if(!i.ok)return void alert(r.error||"Failed to import models");let l=r.models||[];if(0===l.length)return void alert("No models returned from /models.");let n=N({models:l,modelAliases:s,providerStorageAlias:e,providerDisplayAlias:t});if(0===n.length)return void alert("No new models were added.");let o=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({aliases:n.map(({alias:e,model:t})=>({alias:e,model:t}))})}),d=await o.json();if(!o.ok)throw Error(d.error||"Failed to save imported models.");await c(),alert(`Successfully added ${d.count||n.length} models.`)}catch(e){console.log("Error importing models:",e),alert(e?.message||"Failed to import models from /models.")}finally{b(!1)}}},I=u.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",m?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:p,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&A(),placeholder:m?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:A,disabled:!p.trim()||h,children:h?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:T,disabled:!I||g,children:g?"Importing...":"Import from /models"})]}),!I&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),$.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:$.map(({modelId:s,fullModel:i,alias:n})=>(0,a.jsx)(C,{modelId:s,fullModel:`${t}/${s}`,copied:r,onCopy:l,onDeleteAlias:()=>o(n),onTest:u.length>0?()=>k(s):void 0,testStatus:j[`${e}/${s}`],isTesting:y.has(s)},i))})]})}k.propTypes={model:w().shape({id:w().string.isRequired}).isRequired,fullModel:w().string.isRequired,alias:w().string,copied:w().string,onCopy:w().func.isRequired,testStatus:w().oneOf(["ok","error"]),isCustom:w().bool,isFree:w().bool,onDeleteAlias:w().func,onTest:w().func,isTesting:w().bool,onDisable:w().func,thinkingSuffix:w().string},w().string.isRequired,w().string.isRequired,w().string,w().func.isRequired,w().func.isRequired,w().func,w().oneOf(["ok","error"]),w().bool,w().string.isRequired,w().object.isRequired,w().string,w().func.isRequired,w().func.isRequired,w().func.isRequired,S.propTypes={providerStorageAlias:w().string.isRequired,providerDisplayAlias:w().string.isRequired,modelAliases:w().object.isRequired,copied:w().string,onCopy:w().func.isRequired,onSetAlias:w().func.isRequired,onDeleteAlias:w().func.isRequired,onAliasesChanged:w().func.isRequired,connections:w().arrayOf(w().shape({id:w().string,isActive:w().bool})).isRequired,isAnthropic:w().bool};var $=s(81277);function A({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime();if(!Number.isFinite(t))return void s("");let a=t-Date.now();if(a<=0)return void s("");let i=Math.floor(a/1e3);if(i<60)s(`${i}s`);else if(i<3600)s(`${Math.floor(i/60)}m ${i%60}s`);else{let e=Math.floor(i/3600),t=Math.floor(i%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function T({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:l,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:u,onEdit:m,onDelete:p,autoPingEnabled:x=!1,onToggleAutoPing:h,oneByOneStatus:f=null}){let[g,b]=(0,i.useState)(!1),[v,j]=(0,i.useState)(!1),w=(0,i.useRef)(null),k=(0,i.useMemo)(()=>new Map((t||[]).map(e=>[e.id,e])),[t]),N=(0,i.useMemo)(()=>t||[],[t]),C=e.providerSpecificData?.proxyPoolId||null,S=C?k.get(C):null,I=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,E=!!C||I,P=S?`Pool: ${S.name}`:C?`Pool: ${C} (inactive/missing)`:I?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",O="";if(S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);O=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{O=t}}let R=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",_="default";S?.isActive===!0?_="success":(C||I)&&(_="error"),(0,i.useEffect)(()=>{if(!g)return;let e=e=>{w.current&&!w.current.contains(e.target)&&b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]);let D=async e=>{j(!0);try{await u("__none__"===e?null:e)}finally{j(!1),b(!1)}},q=e.authType||(s?"oauth":"apikey"),U="oauth"===q,z="cookie"===q,M=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),L=U?M(e.email)?e.email:M(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",F=(0,$.c)(e),K=null!==F,J="unavailable"!==e.testStatus||K?e.testStatus:"active",B=(0,y.d4)(e),V=!!e.quarantinedAt,H={policy_suspended:"Policy suspension",credential_rejected:"Credential rejected",reauth_required:"Sign-in required",authentication:"Repeated authentication failure"}[e.failureClass]||e.quarantineReason||"Account quarantined",W=Number.isFinite(Date.parse(e.quarantinedAt))?new Date(e.quarantinedAt).toLocaleString():e.quarantinedAt||null,G=e.modelLockReason?.resetsAt,Q=Number.isFinite(Date.parse(G))?new Date(G).toLocaleString():G||null,Z=()=>f?"queued"===f.state?"queued":"testing"===f.state?"testing":"success"===f.state?"success":"failed"===f.state?f.error?`failed: ${f.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive&&!V?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:z?"cookie":U?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:L}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:(()=>{if(!1===e.isActive)return"default";let t=(0,y.BU)(B);return"active"!==B.key?t:"active"===J||"success"===J?"success":"error"===J||"expired"===J||"unavailable"===J?"error":"default"})(),size:"sm",dot:!0,children:B.label||J||"unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:U?"OAuth":z?"Cookie":"API Key"}),V&&(0,a.jsx)(d.Ex,{variant:"error",size:"sm",children:"Quarantined"}),E&&(0,a.jsx)(d.Ex,{variant:_,size:"sm",children:"Proxy"}),e.autoDisabledAt&&!V&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["token_expired"===e.autoDisabledReason?"Token expired":"banned"===e.autoDisabledReason?"Banned":"quota_exhausted"===e.autoDisabledReason?"Quota exhausted":"Auto-disabled"," — ",new Date(e.autoDisabledAt).toLocaleDateString()]}),V&&(0,a.jsxs)("span",{className:"max-w-full truncate text-xs text-red-600 dark:text-red-400 sm:max-w-[420px]",title:`${e.quarantineReason||H}${W?` - ${W}`:""}`,children:[H,W?` - ${W}`:""]}),K&&!1!==e.isActive&&(0,a.jsx)(A,{until:F}),K&&e.modelLockReason&&!1!==e.isActive&&(0,a.jsxs)("span",{className:"max-w-full truncate text-xs text-amber-600 dark:text-amber-400 sm:max-w-[360px]",title:`${e.modelLockReason.reason}${Q?` — resets ${Q}`:""}`,children:[e.modelLockReason.model,e.modelLockReason.providerErrorCode?` (${e.modelLockReason.providerErrorCode})`:"",Q?` — resets ${Q}`:""]}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),Z()&&(0,a.jsx)(d.Ex,{variant:f?"success"===f.state?"success":"failed"===f.state?"error":"testing"===f.state?"primary":"default":"default",size:"sm",children:Z()})]}),E&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:P,children:P}),O&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:O}),R&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:R,children:["no_proxy: ",R]})]}),V&&!1===e.isActive&&(0,a.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Re-enable only permits router requests again; it does not change the account's upstream status."})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[N.length>0&&(0,a.jsxs)("div",{className:"relative",ref:w,children:[(0,a.jsxs)("button",{onClick:()=>b(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${E?"text-primary":"text-text-muted hover:text-primary"}`,disabled:v,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:v?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),g&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>D("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!C?"text-primary font-medium":"text-text-main"}`,children:"None"}),N.map(e=>(0,a.jsx)("button",{onClick:()=>D(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${C===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,a.jsxs)("button",{onClick:()=>h(!x),className:`flex flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${x?"text-primary":"text-text-muted hover:text-primary"}`,title:x?"Disable quota auto-ping for this account":"Warm the 5-hour quota window after reset with a tiny request",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]}),(0,a.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":V?"Re-enable routing only; upstream suspension or credential status is unchanged":"Enable connection"})]})]})}A.propTypes={until:w().string.isRequired},T.propTypes={connection:w().shape({id:w().string,name:w().string,email:w().string,displayName:w().string,modelLockUntil:w().string,testStatus:w().string,isActive:w().bool,lastError:w().string,failureClass:w().string,quarantinedAt:w().string,quarantineReason:w().string,priority:w().number,globalPriority:w().number}).isRequired,proxyPools:w().arrayOf(w().shape({id:w().string,name:w().string,proxyUrl:w().string,noProxy:w().string,isActive:w().bool})),isOAuth:w().bool.isRequired,isFirst:w().bool.isRequired,isLast:w().bool.isRequired,onMoveUp:w().func.isRequired,onMoveDown:w().func.isRequired,onToggleActive:w().func.isRequired,onUpdateProxy:w().func,autoPingEnabled:w().bool,onToggleAutoPing:w().func,onEdit:w().func.isRequired,onDelete:w().func.isRequired,oneByOneStatus:w().shape({state:w().string,error:w().string})};var I=s(28915);let E=`name1|sk-key1
2
+ name2|sk-key2
3
+ sk-key-only-auto-named`;function P({isOpen:e,provider:t,providerName:s,isCompatible:r,isAnthropic:l,authType:n,authHint:o,website:u,proxyPools:m,error:p,onSave:x,onBulkDone:h,onClose:f}){let g="__none__",b="ollama-local"===t,y="notion-ai"===t,v="cookie"===n,j="xai"===t&&!v,w=v?"Cookie Value":"API Key",k=v?"grok-web"===t?"sso=xxxxx... or just the raw value":y?"token_v2=xxxxx..., full Cookie header, or cookie-export JSON":"eyJhbGciOi...":j?"xai-...":"",N="azure"===t,C="cloudflare-ai"===t,S=c.Q2?.[t]?.regions||null,$=c.Q2?.[t]?.defaultRegion||S?.[0]?.id||"",[A,T]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[O,R]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[_,D]=(0,i.useState)({accountId:""}),[q,U]=(0,i.useState)({spaceId:"",spaceViewId:"",userId:"",clientVersion:"",cell:""}),[z,M]=(0,i.useState)($),[L,F]=(0,i.useState)(!1),[K,J]=(0,i.useState)(null),[B,V]=(0,i.useState)(!1),[H,W]=(0,i.useState)("single"),[G,Q]=(0,i.useState)(""),[Z,X]=(0,i.useState)(null),Y=(0,i.useRef)(!1);(0,i.useEffect)(()=>{e&&!Y.current&&(T({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),R({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),D({accountId:""}),U({spaceId:"",spaceViewId:"",userId:"",clientVersion:"",cell:""}),M($),J(null),W("single"),Q(""),X(null)),Y.current=e},[e]);let ee=()=>{if(b&&A.ollamaHostUrl.trim())return{baseUrl:A.ollamaHostUrl.trim()};if(N)return{azureEndpoint:O.azureEndpoint,apiVersion:O.apiVersion,deployment:O.deployment,organization:O.organization};if(C)return{accountId:_.accountId};if(y){let e=Object.entries({spaceId:q.spaceId.trim(),spaceViewId:q.spaceViewId.trim(),userId:q.userId.trim(),clientVersion:q.clientVersion.trim(),cell:q.cell.trim()}).filter(([,e])=>e);return e.length>0?Object.fromEntries(e):void 0}if(S&&z)return{region:z}},et=async()=>{F(!0);try{let e=await (0,I.x6)("/api/providers/validate",{method:"POST",body:{provider:t,apiKey:A.apiKey,providerSpecificData:ee()}});J(e.valid?"success":"failed")}catch{J("unknown")}finally{F(!1)}},es=async()=>{if(t&&(b||A.apiKey)&&(b||A.name)&&(!r||A.defaultModel.trim())){V(!0);try{let e=!1;try{F(!0),J(null),e=!!(await (0,I.x6)("/api/providers/validate",{method:"POST",body:{provider:t,apiKey:A.apiKey,providerSpecificData:ee()}})).valid,J(e?"success":"failed")}catch{J("unknown")}finally{F(!1)}let s=Number.parseInt(A.priority,10);await x({name:A.name||(b?"Ollama Local":""),apiKey:A.apiKey,defaultModel:r?A.defaultModel.trim():void 0,priority:Number.isFinite(s)?s:1,proxyPoolId:A.proxyPoolId===g?null:A.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:ee()})}finally{V(!1)}}},ea=async()=>{let e=G.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;V(!0),X(null);let s=0,a=0,i=[],r=[];for(let l=0;l<e.length;l++){let n=e[l].split("|"),o=n.length>=2?n.slice(1).join("|").trim():n[0].trim(),d=n.length>=2?n[0].trim():"Key",c=`${d} ${l+1}`;try{await (0,I.x6)("/api/providers",{method:"POST",body:{provider:t,apiKey:o,name:c,priority:1,testStatus:"unknown"}}),s++}catch(t){a++,i.push({line:e[l],message:t?.message||"Request failed"}),r.push(e[l])}}V(!1),X({success:s,failed:a,failedRows:i}),Q(r.join("\n")),s>0&&h&&h()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${w}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[!y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===H?"primary":"ghost",onClick:()=>{W("single"),X(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===H?"primary":"ghost",onClick:()=>{W("bulk"),X(null)},children:"Bulk Add"})]}),"bulk"===H&&!y&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:E,value:G,onChange:e=>Q(e.target.value)}),Z&&(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${Z.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",Z.success," added",Z.failed>0?`, ✗ ${Z.failed} failed`:""]}),Z.failedRows?.length>0&&(0,a.jsx)("ul",{className:"text-xs text-red-500 flex flex-col gap-0.5",children:Z.failedRows.map((e,t)=>(0,a.jsxs)("li",{className:"break-words",children:[(0,a.jsx)("span",{className:"font-mono",children:e.line.length>40?`${e.line.slice(0,40)}…`:e.line}),` — ${e.message}`]},t))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:ea,fullWidth:!0,disabled:B||!G.trim(),children:B?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),("single"===H||y)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:A.name,onChange:e=>T({...A,name:e.target.value}),placeholder:b?"Ollama Local":"Production Key"}),b&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:A.ollamaHostUrl,onChange:e=>T({...A,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:et,disabled:L||B,variant:"secondary",children:L?"Checking...":"Check"})})]}),!b&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:w,type:v?"text":"password",value:A.apiKey,onChange:e=>T({...A,apiKey:e.target.value}),placeholder:k,className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:et,disabled:!A.apiKey||L||B,variant:"secondary",children:L?"Checking...":"Check"})})]}),j&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),v&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,u&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",u.replace(/^https?:\/\//,"")]})]})]}),y&&(0,a.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-accent/20 bg-sidebar/50 p-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Notion workspace metadata (optional)"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed text-text-muted",children:"Space ID and User ID are optional. The router resolves them from Notion's authenticated getSpaces endpoint; enter them only to override discovery. They are metadata only, and the cookie stays in the encrypted provider credential store."}),(0,a.jsx)(d.pd,{label:"Space ID (optional)",value:q.spaceId,onChange:e=>U({...q,spaceId:e.target.value}),placeholder:"Auto-resolved from Notion"}),(0,a.jsx)(d.pd,{label:"User ID (optional)",value:q.userId,onChange:e=>U({...q,userId:e.target.value}),placeholder:"Auto-resolved from Notion"}),(0,a.jsx)(d.pd,{label:"Space View ID (optional)",value:q.spaceViewId,onChange:e=>U({...q,spaceViewId:e.target.value}),placeholder:"Leave blank to use Space ID"}),(0,a.jsx)(d.pd,{label:"Notion client version (optional)",value:q.clientVersion,onChange:e=>U({...q,clientVersion:e.target.value}),placeholder:"Copy from the browser request if required"}),(0,a.jsx)(d.pd,{label:"Cell (optional)",value:q.cell,onChange:e=>U({...q,cell:e.target.value}),placeholder:"Copy x-notion-cell if your request has it"})]}),S&&(0,a.jsx)(d.l6,{label:"Region",value:z,onChange:e=>M(e.target.value),options:S.map(e=>({value:e.id,label:e.label}))}),r&&(0,a.jsx)(d.pd,{label:"Default Model",value:A.defaultModel,onChange:e=>T({...A,defaultModel:e.target.value}),placeholder:l?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),b&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),K&&(0,a.jsx)(d.Ex,{variant:"success"===K?"success":"failed"===K?"error":"default",children:"success"===K?"Valid":"failed"===K?"Invalid":"Could not validate"}),p&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:p}),r&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),C&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:_.accountId,onChange:e=>D({..._,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),N&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:O.azureEndpoint,onChange:e=>R({...O,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:O.deployment,onChange:e=>R({...O,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:O.apiVersion,onChange:e=>R({...O,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:O.organization,onChange:e=>R({...O,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:A.priority,onChange:e=>T({...A,priority:e.target.value}),onBlur:e=>{let t=Number.parseInt(e.target.value,10);T(e=>({...e,priority:Number.isFinite(t)?t:1}))}}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:A.proxyPoolId,onChange:e=>T({...A,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(m||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(m||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:es,fullWidth:!0,disabled:B||!b&&(!A.name||!A.apiKey)||r&&!A.defaultModel.trim()||N&&(!O.azureEndpoint||!O.deployment||!O.organization)||C&&!_.accountId,children:B?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function O({isOpen:e,node:t,onSave:s,onClose:r,isAnthropic:l}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,u]=(0,i.useState)(!1),[m,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[b,y]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&(o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(l?"https://api.anthropic.com/v1":"https://api.openai.com/v1")}),p(""),h(""),y(null))},[t,l]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){u(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};l||(e.apiType=n.apiType),await s(e)}finally{u(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:m,type:l?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();y(t.valid?"success":"failed")}catch{y("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${l?"Anthropic":"OpenAI"} Compatible`,onClose:r,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${l?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:l?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!l&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:l?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${l?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>p(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!m||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:x,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),b&&(0,a.jsx)(d.Ex,{variant:"success"===b?"success":"error",children:"success"===b?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function R({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:r,onClose:l}){let[n,o]=(0,i.useState)(""),[c,u]=(0,i.useState)(null),[m,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),u(null),p(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(n.trim());if(e){u("testing"),p("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();u(a.ok?"ok":"error"),p(a.error||"")}catch(e){u("error"),p(e.message)}}},b=async()=>{let e=f(n.trim());if(e&&!x){h(!0);try{await r(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:l,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),u(null),p("")},onKeyDown:e=>{"Enter"===e.key&&g()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(n.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:m||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:b,fullWidth:!0,size:"sm",disabled:!n.trim()||x,children:x?"Adding...":"Add Model"})]})]})})}P.propTypes={isOpen:w().bool.isRequired,provider:w().string,providerName:w().string,isCompatible:w().bool,isAnthropic:w().bool,authType:w().string,authHint:w().string,website:w().string,proxyPools:w().arrayOf(w().shape({id:w().string,name:w().string})),error:w().string,onSave:w().func.isRequired,onBulkDone:w().func,onClose:w().func.isRequired},O.propTypes={isOpen:w().bool.isRequired,node:w().shape({id:w().string,name:w().string,prefix:w().string,apiType:w().string,baseUrl:w().string}),onSave:w().func.isRequired,onClose:w().func.isRequired,isAnthropic:w().bool},R.propTypes={isOpen:w().bool.isRequired,providerAlias:w().string.isRequired,providerDisplayAlias:w().string.isRequired,onSave:w().func.isRequired,onClose:w().func.isRequired};let _="kiro-bulk-import-active-job",D="Bulk import progress expired or was cleared.",q={claude:"claudeAutoPing",codex:"codexAutoPing"};function U(e){return["completed","cancelled","failed"].includes(e)}async function z(e){if(!e)return null;let t=await fetch(`/api/oauth/kiro/bulk-import/${e}`,{cache:"no-store"}),s=await t.json();return{res:t,data:s}}async function M(e="active"){let t=await fetch(`/api/oauth/kiro/bulk-import/latest?scope=${encodeURIComponent(e)}`,{cache:"no-store"}),s=await t.json();return{res:t,data:s}}async function L(e){let t=new AbortController,s=window.setTimeout(()=>t.abort(),8e3);try{let s=await fetch(e,{cache:"no-store",signal:t.signal}),a=null;try{a=await s.json()}catch{a=null}return{response:s,data:a}}finally{window.clearTimeout(s)}}function F(){let e,t=(0,r.useParams)(),s=(0,r.useRouter)(),l=t.id,[u,g]=(0,i.useState)([]),[j,w]=(0,i.useState)(!0),[N,C]=(0,i.useState)(""),[$,A]=(0,i.useState)(null),[I,E]=(0,i.useState)([]),[F,K]=(0,i.useState)(!1),[J,B]=(0,i.useState)(!1),[V,H]=(0,i.useState)(!1),[W,G]=(0,i.useState)(!1),[Q,Z]=(0,i.useState)(""),[X,Y]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(!1),[es,ea]=(0,i.useState)(!1),[ei,er]=(0,i.useState)(null),[el,en]=(0,i.useState)({}),[eo,ed]=(0,i.useState)(!1),[ec,eu]=(0,i.useState)({}),[em,ep]=(0,i.useState)({}),[ex,eh]=(0,i.useState)(()=>new Set),[ef,eg]=(0,i.useState)(!1),[eb,ey]=(0,i.useState)([]),[ev,ej]=(0,i.useState)("__none__"),[ew,ek]=(0,i.useState)(!1),[eN,eC]=(0,i.useState)(!1),[eS,e$]=(0,i.useState)(null),[eA,eT]=(0,i.useState)(""),[eI,eE]=(0,i.useState)("auto"),[eP,eO]=(0,i.useState)({}),[eR,e_]=(0,i.useState)([]),[eD,eq]=(0,i.useState)([]),[eU,ez]=(0,i.useState)([]),[eM,eL]=(0,i.useState)(null),[eF,eK]=(0,i.useState)(!1),[eJ,eB]=(0,i.useState)(!1),[eV,eH]=(0,i.useState)(!1),[eW,eG]=(0,i.useState)(null),[eQ,eZ]=(0,i.useState)({}),[eX,eY]=(0,i.useState)(null),e0=(0,i.useRef)(!1),e1=(0,i.useRef)(null),e2=(0,i.useRef)("1"),[e5,e4]=(0,i.useState)(!1),[e3,e6]=(0,i.useState)(null),[e7,e8]=(0,i.useState)(""),[e9,te]=(0,i.useState)(1),[tt,ts]=(0,i.useState)(20),[ta,ti]=(0,i.useState)("all"),[tr,tl]=(0,i.useState)(""),[tn,to]=(0,i.useState)(1),[td,tc]=(0,i.useState)(20),{copied:tu,copy:tm}=(0,h.C)(),tp=(0,i.useRef)(0),tx=(0,i.useRef)([]),th=(0,i.useRef)(!0),tf="ag_risk_confirmed",tg=(0,i.useCallback)(()=>{e6(null),e8(""),tp.current=0,window.localStorage.removeItem(_)},[]),tb=()=>{K(!0)},ty=()=>{"kiro"===l&&e3?.jobId&&U(e3.status)&&tg(),s.push(p(l))},tv=()=>{Z(""),G(!0)},tj=()=>{tN?(()=>{if(m(l))return"antigravity"===l&&"true"!==window.localStorage.getItem(tf)?eK(!0):ty();if("antigravity"===l&&"true"!==window.localStorage.getItem(tf))return eK(!0);tN?tb():(Z(""),G(!0))})():tv()},tw=$?{id:$.id,name:$.name||("anthropic-compatible"===$.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===$.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===$.type?"AC":"OC",apiType:$.apiType,baseUrl:$.baseUrl,type:$.type}:c.zN[l]||c.fg[l]||c.IS[l]||c.nJ[l]||c.br[l],tk=tw?.authModes||[],tN=!!c.zN[l]||!!c.IS[l]||tk.includes("oauth"),tC=!!c.fg[l]||tk.includes("apikey"),tS=!!c.IS[l]?.noAuth,t$=(0,x.KC)(l),tA=(0,c.wG)(l),tT=(0,c.mq)(l),tI=(0,c.gb)(l),tE=tT||tI,tP=!tE&&tN&&tC,tO=m(l),tR="xai"===l?"Grok Build OAuth":"OAuth",t_="xai"===l?"xAI API Key":"API Key",tD=c.Q2[l]?.thinkingConfig||c.s9.extended,tq=tE?l:tA,tU=tE?$?.prefix||l:tA,tz=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tq)}`,{cache:"no-store"}),t=await e.json();e.ok&&ez(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tq]),tM=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tq,ids:[e]})})).ok&&await tz()}catch(e){console.log("Error disabling model:",e)}},tL=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tq)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tz()}catch(e){console.log("Error enabling model:",e)}},tF=async e=>{e.length&&eL({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eL(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tq,ids:e})})).ok&&await tz()}catch(e){console.log("Error disabling all models:",e)}}})},tK=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tq)}`,{method:"DELETE"})).ok&&await tz()}catch(e){console.log("Error enabling all models:",e)}},tJ=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&en(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===l&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eq(e.models)}).catch(()=>{})},[l]);let tB=(0,i.useCallback)(async()=>{try{C("");let[e,t,s,a]=await Promise.allSettled([L("/api/providers"),L("/api/provider-nodes"),L("/api/proxy-pools?isActive=true"),L("/api/settings")]),i="fulfilled"===e.status?e.value.response:null,r="fulfilled"===e.status?e.value.data:{},n="fulfilled"===t.status?t.value.response:null,o="fulfilled"===t.status?t.value.data:{},d="fulfilled"===s.status?s.value.response:null,c="fulfilled"===s.status?s.value.data:{},u="fulfilled"===a.status?a.value.response:null,m=u?.ok&&a.value.data||{};if(i?.ok){let e=(r.connections||[]).filter(e=>e.provider===l);tx.current=e,g(e)}else C("Connections could not be loaded.");d?.ok&&E(c.proxyPools||[]);let p=(m.providerStrategies||{})[l]||{};e$(p.fallbackStrategy||null),eT(null!=p.stickyRoundRobinLimit?String(p.stickyRoundRobinLimit):"1"),e2.current=null!=p.stickyRoundRobinLimit?String(p.stickyRoundRobinLimit):"1";let x=(m.providerThinking||{})[l]||{};eE(x.mode||"auto");let h=q[l];if(eO(h&&m?.[h]?.connections||{}),n?.ok){let e=(o.nodes||[]).find(e=>e.id===l)||null;if(!e&&tE)for(let t=0;t<3;t+=1){if(await new Promise(e=>setTimeout(e,150)),!th.current)return;let{response:t,data:s}=await L("/api/provider-nodes");if(!th.current)return;if(t.ok&&(e=(s.nodes||[]).find(e=>e.id===l)||null))break}A(e)}}catch(e){console.log("Error fetching connections:",e),th.current&&C("Connections could not be loaded.")}finally{th.current&&w(!1)}},[l,tE]),tV=async e=>{try{let t=await fetch(`/api/provider-nodes/${l}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(A(s.node),await tB(),et(!1))}catch(e){console.log("Error updating provider node:",e)}},tH=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let r={...a};0===Object.keys(i).length?delete r[l]:r[l]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:r})})}catch(e){console.log("Error saving provider strategy:",e)}},tW=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?s[l]={mode:e}:delete s[l],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:s})})}catch(e){console.log("Error saving thinking config:",e)}},tG=async(e,t)=>{let s=q[l];if(!s)return;let a={...eP,[e]:t};eO(a);try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[s]||{},connections:a};if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[s]:t})})).ok)throw Error("Failed to save auto-ping setting")}catch(e){eO(eP),console.log("Error saving auto-ping config:",e)}};(0,i.useEffect)(()=>{tB(),tJ(),tz()},[tB,tJ,tz]),(0,i.useEffect)(()=>(th.current=!0,()=>{th.current=!1}),[]),(0,i.useEffect)(()=>{eL(null),eu({}),ep({}),eh(new Set),e_([]),eZ({}),eY(null),eG(null),eB(!1),eH(!1),e0.current=!0,e8("")},[l]),(0,i.useEffect)(()=>{te(1),to(1),ti("all"),tl("")},[l]),(0,i.useEffect)(()=>{te(1)},[ta,tt,tr]),(0,i.useEffect)(()=>{ed(!1)},[l]),(0,i.useEffect)(()=>{to(1)},[td,eU.length,t$.length,eD.length]),(0,i.useEffect)(()=>{if("kiro"!==l)return;let e=window.localStorage.getItem(_),t=!1;return(async()=>{try{if(e8(""),e3?.jobId)return;let a=await M();if(!t&&a.res.ok&&a.data?.job){e6(a.data.job),tp.current=a.data.job.summary?.success||0,window.localStorage.setItem(_,a.data.job.jobId);return}if(e){var s;let a=await z(e);if(!t&&a?.res.ok&&a.data?.job&&(s=a.data.job.status,["queued","running","needs_manual"].includes(s))){e6(a.data.job),tp.current=a.data.job.summary?.success||0;return}tg(),e8(D)}}catch{t||e8(D)}})(),()=>{t=!0}},[tg,e3?.jobId,l]),(0,i.useEffect)(()=>{if(!("kiro"!==l||!e3?.jobId||U(e3.status)))return(0,v.M)(async e=>{let t=await z(e3.jobId);if(!e()){if(t?.res.ok&&t.data?.job){let s=t.data.job.summary?.success||0;if(s>tp.current&&(tp.current=s,await tB(),e()))return;e8(""),e6(t.data.job);return}if(t?.res.status===404){let t=await M();if(e())return;if(t.res.ok&&t.data?.job){let s=t.data.job.summary?.success||0;if(s>tp.current&&(tp.current=s,await tB(),e()))return;e8(""),e6(t.data.job),window.localStorage.setItem(_,t.data.job.jobId);return}tg(),e8(D)}}},2e3)},[tg,tB,e3?.jobId,e3?.status,l]),(0,i.useEffect)(()=>{let e=(c.zN[l]||c.fg[l]||c.IS[l]||c.nJ[l])?.modelsFetcher;e&&b(e).then(e_)},[l]);let tQ=async(e,t,s=tA)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await tJ();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tZ=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tJ()}catch(e){console.log("Error deleting alias:",e)}},tX=async()=>{if(e5)return;let e=u.find(e=>!1!==e.isActive);if(!e)return void alert((0,f.Tl)("Please add an active Qoder connection first"));e4(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,f.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,f.Tl)("No models returned"));let i={...el},r=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,""),a=`${tq}/${s}`;!Object.values(i).includes(a)&&(i[s]||(await tQ(s,s,tq),i[s]=a,r+=1))}0===r?alert((0,f.Tl)("All models already exist, no new models added")):alert((0,f.Tl)("Successfully added")+` ${r} `+(0,f.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,f.Tl)("Error fetching models")+": "+e.message)}finally{e4(!1)}},tY=async()=>{let e=[...u];if(eJ||0===e.length)return;let t=Object.fromEntries(e.map(e=>[e.id,{state:"queued",error:null}]));e0.current=!1,eB(!0),eH(!1),eG(null),eZ(t),eY({total:e.length,completed:0,passed:0,failed:0,stopped:!1});let s=0,a=0;try{for(let t=0;t<e.length;t+=1){if(e0.current){eY({total:e.length,completed:t,passed:s,failed:a,stopped:!0});break}let i=e[t];if(!tx.current.some(e=>e.id===i.id)){eZ(e=>({...e,[i.id]:{state:"skipped",error:null}})),eY({total:e.length,completed:t+1,passed:s,failed:a,stopped:!1});continue}eG(i.id),eZ(e=>({...e,[i.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${i.id}/test`,{method:"POST"}),t=await e.json(),r=!!t.valid;r?s+=1:a+=1,eZ(e=>({...e,[i.id]:{state:r?"success":"failed",error:r?null:t.error||null}}))}catch(e){a+=1,eZ(t=>({...t,[i.id]:{state:"failed",error:e.message||"Test failed"}}))}eY({total:e.length,completed:t+1,passed:s,failed:a,stopped:!1}),t<e.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eG(null),eB(!1),eH(!1),e0.current=!1}},t0=async e=>{eL({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eL(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&g(u.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},t1=()=>{tB(),K(!1)},t2=(0,i.useCallback)(e=>{(e6(e),e8(""),e?.jobId)?(window.localStorage.setItem(_,e.jobId),tp.current=Math.max(tp.current,e.summary?.success||0)):tg()},[tg]),t5=async e=>{Z("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:l,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tB(),G(!1);return}Z(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),Z("Failed to save connection")}},t4=async e=>{try{(await fetch(`/api/providers/${ei.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tB(),Y(!1))}catch(e){console.log("Error updating connection:",e)}},t3=async(e,t)=>{try{let s=await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})});if(s.ok){let a=await s.json().catch(()=>null);g(s=>s.map(s=>s.id===e?{...s,isActive:t,...a?.connection||{}}:s))}}catch(e){console.log("Error updating connection status:",e)}},t6=async(e,t)=>{let s=[...u];[s[e],s[t]]=[s[t],s[e]],g(s);try{let[a,i]=await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e+1})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t+1})})]);a.ok&&i.ok||(console.log("Priority swap rejected:",a.status,i.status),await tB())}catch(e){console.log("Error swapping priority:",e),await tB()}},t7=(0,i.useMemo)(()=>{let e=tr.trim().toLowerCase();return u.filter(t=>!!(0,y.i2)(t,ta)&&(!e||[t.name,t.email,t.id,t.account,t.username,t.label,t.authType,t.notes,t.proxyPoolId].filter(Boolean).join(" ").toLowerCase().includes(e)))},[u,ta,tr]),t8=(0,i.useMemo)(()=>y.gJ.reduce((e,t)=>(e[t.id]="all"===t.id?u.length:u.filter(e=>(0,y.i2)(e,t.id)).length,e),{}),[u]),t9=eb.filter(e=>u.some(t=>t.id===e)),se=u.filter(e=>t9.includes(e.id)),st="codebuddy"===l?(se.length>0?se:u).map(e=>e.id):[],ss=t7.length>0&&t7.every(e=>t9.includes(e.id)),sa=(()=>{if(0===se.length)return"";let e=new Set(se.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let s=I.find(e=>e.id===t);return`All selected currently bound to ${s?.name||t}`}return"Selected connections have mixed proxy bindings"})(),si=()=>{ew||ea(!1)},sr=async e=>{ek(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tB(),ea(!1)}finally{ek(!1)}},sl=e=>sr(se.map(t=>({connectionId:t.id,proxyPoolId:e}))),sn=e=>{let t="gsuite"===e?"GSuite (non-Gmail)":"Gmail (@gmail.com)";eL({title:`Delete ${t}`,message:`Delete ALL ${t} accounts for this provider? This cannot be undone.`,onConfirm:async()=>{eL(null);try{(await fetch("/api/providers/bulk-delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:tw?.id||l,emailFilter:e})})).ok&&(ey([]),await tB())}catch(e){console.error("bulk delete error:",e)}}})},so=Math.max(1,Math.ceil(t7.length/tt)),sd=Math.min(e9,so),sc=t7.slice((sd-1)*tt,sd*tt),su=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:sc.map((e,t)=>{let s,i=u.findIndex(t=>t.id===e.id);return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("label",{className:"flex w-8 shrink-0 items-center justify-center",children:(0,a.jsx)("input",{type:"checkbox",checked:(s=e.id,t9.includes(s)),onChange:()=>{var t;return t=e.id,void ey(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"size-4 rounded border-black/20 dark:border-white/20","aria-label":`Select ${e.name||e.email||e.id}`})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(T,{connection:e,proxyPools:I,isOAuth:tN,isFirst:0===i,isLast:i===u.length-1,onMoveUp:()=>t6(i,i-1),onMoveDown:()=>t6(i,i+1),onToggleActive:t=>t3(e.id,t),autoPingEnabled:!0===eP[e.id],onToggleAutoPing:q[l]&&"oauth"===e.authType?t=>tG(e.id,t):void 0,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&g(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{er(e),Y(!0)},onDelete:()=>t0(e.id),oneByOneStatus:eQ[e.id]||null})})]},e.id)})}),sm=I.filter(e=>!0===e.isActive),sp=(0,a.jsx)(d.aF,{isOpen:es,onClose:si,title:`Apply Proxy (${se.length} selected)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=I.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):sr(se.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:ew||0===sm.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>sl(null),disabled:ew,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),I.map(e=>(0,a.jsxs)("button",{onClick:()=>sl(e.id),disabled:ew||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),ew&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:si,variant:"ghost",fullWidth:!0,disabled:ew,children:"Cancel"})]})}),sx=async e=>{eh(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tq}/${e}`})}),s=await t.json();eu(t=>({...t,[e]:s.ok?"ok":"error"})),ep(t=>({...t,[e]:s.ok?"":s.error||"Model not reachable"}))}catch{eu(t=>({...t,[e]:"error"})),ep(t=>({...t,[e]:"Network error"}))}finally{eh(t=>{let s=new Set(t);return s.delete(e),s})}};return j?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):tw?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${tw.color}15`},children:eo?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:tw.color},children:tw.textIcon||tw.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:tT&&tw.apiType?"responses"===tw.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tI?"/providers/anthropic-m.png":`/providers/${tw.id}.png`,alt:tw.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>ed(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:tw.name}),(tw.notice?.apiKeyUrl||tw.notice?.signupUrl||tw.website)&&(0,a.jsxs)("a",{href:tw.notice?.apiKeyUrl||tw.notice?.signupUrl||tw.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),tw.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[u.length," connection",1===u.length?"":"s"]})]})]})]}),tw.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:tw.deprecationNotice})]}),tw.notice?.text&&!tw.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:tw.notice.text}),tw.notice.apiKeyUrl&&(0,a.jsx)("a",{href:tw.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),tE&&$&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:tI?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tI?"Messages API":"responses"===$.apiType?"Responses API":"Chat Completions"," \xb7 ",($.baseUrl||"").replace(/\/$/,""),"/",tI?"messages":"responses"===$.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{Z(""),G(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>et(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eL({title:"Delete Compatible Node",message:`Delete this ${tI?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eL(null);try{(await fetch(`/api/provider-nodes/${l}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tS?(0,a.jsx)(d.gw,{providerId:l}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[u.length>0&&I.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>{if(0===se.length)return;let e=[...new Set(se.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"))];ej(1===e.length?e[0]:"__none__"),ea(!0)},disabled:0===se.length,children:"Apply Proxy"}),u.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tY,disabled:eJ,children:eJ?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eJ&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eJ&&(e0.current=!0,eH(!0))},disabled:eV,children:eV?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Thinking"}),(0,a.jsx)("select",{value:eI,onChange:e=>{var t;eE(t=e.target.value),tW(t)},className:"text-xs px-2 py-1 border border-border rounded-md bg-background focus:outline-none focus:border-primary",title:"Forces reasoning_effort on requests; model chips copy as alias/model(level)",children:(tD?.options||c.mt).map(e=>(0,a.jsx)("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===eS,onChange:e=>{let t=e?"round-robin":null,s=e?eA||"1":eA;e&&!eA&&eT("1"),e2.current=s,e1.current&&(clearTimeout(e1.current),e1.current=null),e$(t),tH(t,s)}}),"round-robin"===eS&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eA,onChange:e=>{var t;eT(t=e.target.value),e2.current=t,e1.current&&clearTimeout(e1.current),e1.current=setTimeout(()=>{tH("round-robin",e2.current)},500)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),u.length>0&&(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 rounded-lg border border-black/5 bg-black/[0.02] p-3 dark:border-white/5 dark:bg-white/[0.02]",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:ss,onChange:()=>{ss?ey(e=>e.filter(e=>!t7.some(t=>t.id===e))):ey(e=>Array.from(new Set([...e,...t7.map(e=>e.id)])))},className:"size-4 rounded border-black/20 dark:border-white/20"}),ss?"Unselect visible":"Select visible"]}),(0,a.jsxs)(d.Ex,{variant:"default",children:[t7.length," visible"]}),se.length>0&&(0,a.jsxs)(d.Ex,{variant:"default",children:[se.length," selected"]}),sa&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:sa}),se.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",onClick:()=>{ey([]),ej("__none__")},children:"Clear"}),se.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:()=>{0!==se.length&&eL({title:"Delete Selected Connections",message:`Delete ${se.length} selected connection(s)? This permanently removes the selected accounts.`,onConfirm:async()=>{eL(null);let e=[],t=0;for(let s of se)try{(await fetch(`/api/providers/${s.id}`,{method:"DELETE"})).ok?e.push(s.id):t+=1}catch(e){console.log("Error deleting selected connection:",e),t+=1}ey(t=>t.filter(t=>!e.includes(t))),t>0&&alert(`Deleted ${e.length} connection(s); ${t} failed.`),await tB()}})},children:["Delete Selected (",se.length,")"]}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"domain",onClick:()=>sn("gsuite"),children:"Delete GSuite"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"mail",onClick:()=>sn("gmail"),children:"Delete Gmail"})]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:y.gJ.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>ti(e.id),className:`rounded-full border px-2.5 py-1 text-xs transition-colors ${ta===e.id?"border-primary/50 bg-primary/10 text-primary":"border-border text-text-muted hover:border-primary/30 hover:text-text-main"}`,children:[e.label,(0,a.jsx)("span",{className:"ml-1 text-[10px] opacity-70",children:t8[e.id]||0})]},e.id))}),u.length>=20&&(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"material-symbols-outlined pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-[16px] text-text-subtle",children:"search"}),(0,a.jsx)("input",{type:"search",value:tr,onChange:e=>tl(e.target.value),placeholder:`Search ${u.length} connections (email, name, id)…`,className:"w-full rounded-lg border border-border bg-background py-2 pl-8 pr-3 text-xs text-text-main outline-none placeholder:text-text-subtle focus:border-primary/40"})]})]}),N?(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:N})]}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:()=>{w(!0),tB()},children:"Retry"})]}):0===u.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tN?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tP&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tR," or ",t_,"."]})]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[tO&&(0,a.jsx)(d.$n,{size:"sm",icon:"automation",onClick:ty,children:"Open Automation"}),tP?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tb,children:tR}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tv,children:t_})]}):tO?null:(0,a.jsxs)(a.Fragment,{children:[!tE&&"iflow"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>B(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:tj,children:tE?"Add API Key":"iflow"===l?"OAuth":"Add Connection"})]})]})]}),"kiro"===l&&e3?.jobId&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 rounded-lg border border-primary/20 bg-primary/[0.06] px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-text-main",children:"Bulk import progress is still available"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Status: ",e3.status," | Success: ",e3.summary?.success||0," | Running: ",e3.summary?.running||0," | Queued: ",e3.summary?.queued||0]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"monitoring",variant:"secondary",onClick:()=>s.push(p("kiro")),children:"Resume Bulk Progress"}),U(e3.status)&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"close",onClick:tg,children:"Clear"})]})]}),"kiro"===l&&!e3?.jobId&&e7&&(0,a.jsx)("div",{className:"mt-4 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:e7})]}):(0,a.jsxs)(a.Fragment,{children:[eX&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eX.total]}),(0,a.jsxs)("span",{children:["Completed: ",eX.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eX.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eX.failed]}),eX.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eJ&&eW&&(0,a.jsxs)("span",{children:["Running: ",u.find(e=>e.id===eW)?.name||eW]})]})}),"kiro"===l&&e3?.jobId&&(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 rounded-lg border border-primary/20 bg-primary/[0.06] px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-text-main",children:"Bulk import progress is still available"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Status: ",e3.status," | Success: ",e3.summary?.success||0," | Running: ",e3.summary?.running||0," | Queued: ",e3.summary?.queued||0]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"monitoring",variant:"secondary",onClick:()=>s.push(p("kiro")),children:"Resume Bulk Progress"}),U(e3.status)&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"close",onClick:tg,children:"Clear"})]})]}),"kiro"===l&&!e3?.jobId&&e7&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:e7}),su,"kiro"===l&&so>1&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Page ",sd," of ",so," • Showing ",(sd-1)*tt+1,"-",Math.min(sd*tt,t7.length)," of ",t7.length," connections"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",disabled:sd<=1,onClick:()=>te(e=>Math.max(1,e-1)),children:"Previous"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",disabled:sd>=so,onClick:()=>te(e=>Math.min(so,e+1)),children:"Next"})]})]}),"kiro"!==l&&t7.length>0&&(0,a.jsx)(d.dK,{currentPage:sd,pageSize:tt,totalItems:t7.length,onPageChange:te,onPageSizeChange:e=>{ts(e),te(1)},className:"mt-2"}),u.length>0&&0===t7.length&&(0,a.jsx)("div",{className:"py-8 text-center text-sm text-text-muted",children:"No connections match this status filter."}),!tE&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>B(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codebuddy"===l&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>{u.length>1&&0===se.length?alert("Select the CodeBuddy connection(s) that should use this quota cookie first."):H(!0)},title:"Attach CodeBuddy web cookie for quota tracking",className:"w-full sm:w-auto",children:"Quota Cookie"}),tO&&(0,a.jsx)(d.$n,{size:"sm",icon:"automation",onClick:ty,className:"w-full sm:w-auto",children:"Open Automation"}),tP?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tb,className:"w-full sm:w-auto",children:tR}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tv,className:"w-full sm:w-auto",children:t_})]}):tO?null:(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:tj,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!tE&&(e=[...t$,...eD.filter(e=>!t$.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eU.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eU.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tK,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tF(e),children:"Disable All"})]}))]}),Object.values(em).some(Boolean)&&(0,a.jsx)("div",{className:"mb-3 flex flex-col gap-1",children:Object.entries(em).filter(([,e])=>!!e).map(([e,t])=>(0,a.jsxs)("p",{className:"text-xs text-red-500 break-words",children:[e,": ",t]},e))}),(()=>{let e,t,s;if(tE)return(0,a.jsx)(S,{providerStorageAlias:tq,providerDisplayAlias:tU,modelAliases:el,copied:tu,onCopy:tm,onSetAlias:tQ,onDeleteAlias:tZ,onAliasesChanged:tJ,connections:u,isAnthropic:tI});let i=[...t$,...eD.filter(e=>!t$.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),r=new Set(eU),n=i.filter(e=>!r.has(e.id)),o=i.filter(e=>r.has(e.id)),c=Object.entries(el).filter(([e,t])=>{let s=`${tq}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return tw.passthroughModels?!t$.some(e=>e.id===a):!t$.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${tq}/`.length),alias:e,fullModel:t})),m=Math.min(tn,Math.max(1,Math.ceil(n.length/td))),p=n.slice((m-1)*td,m*td);return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[c.map(e=>(0,a.jsx)(k,{model:{id:e.id},fullModel:`${tU}/${e.id}`,alias:e.alias,copied:tu,onCopy:tm,onSetAlias:()=>{},onDeleteAlias:()=>tZ(e.alias),testStatus:ec[e.id],onTest:u.length>0||tS?()=>sx(e.id):void 0,isTesting:ex.has(e.id),isCustom:!0,isFree:!1,thinkingSuffix:eI&&"auto"!==eI&&"off"!==eI&&"none"!==eI?eI:null},e.id)),p.map(e=>{let t=`${tq}/${e.id}`,s=`${l}/${e.id}`,i=Object.entries(el).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(k,{model:e,fullModel:`${tU}/${e.id}`,alias:i,copied:tu,onCopy:tm,onSetAlias:t=>tQ(e.id,t,tq),onDeleteAlias:()=>tZ(i),testStatus:ec[e.id],onTest:u.length>0||tS?()=>sx(e.id):void 0,isTesting:ex.has(e.id),isFree:e.isFree,onDisable:()=>tM(e.id),thinkingSuffix:eI&&"auto"!==eI&&"off"!==eI&&"none"!==eI?eI:null},e.id)}),n.length>td&&(0,a.jsx)("div",{className:"w-full",children:(0,a.jsx)(d.dK,{currentPage:m,pageSize:td,totalItems:n.length,onPageChange:to,onPageSizeChange:e=>{tc(e),to(1)}})}),(0,a.jsxs)("button",{onClick:()=>eg(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===l&&u.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:tX,disabled:e5,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:e5?{animation:"spin 1s linear infinite"}:void 0,children:e5?"progress_activity":"download"}),e5?(0,f.Tl)("Fetching..."):(0,f.Tl)("Fetch Qoder Models")]}),eR.length>0&&(e=new Set(Object.values(el)),t=new Set(t$.map(e=>e.id)),0===(s=eR.filter(s=>!e.has(`${tq}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tQ(e.id,t,tq)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>tL(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),sp,"kiro"===l?(0,a.jsx)(d.Mh,{isOpen:F,providerInfo:tw,onSuccess:t1,onRefresh:tB,initialBulkJobId:e3?.jobId||null,onBulkJobChange:t2,onClose:()=>K(!1)}):"cursor"===l?(0,a.jsx)(d.G9,{isOpen:F,onSuccess:t1,onClose:()=>K(!1)}):"gitlab"===l?(0,a.jsx)(d.vj,{isOpen:F,providerInfo:tw,onSuccess:t1,onClose:()=>K(!1)}):(0,a.jsx)(d.LF,{isOpen:F,provider:l,providerInfo:tw,onSuccess:t1,onClose:()=>K(!1)}),"iflow"===l&&(0,a.jsx)(d.vE,{isOpen:J,onSuccess:()=>{tB(),B(!1)},onClose:()=>B(!1)}),"codebuddy"===l&&(0,a.jsx)(d.xl,{isOpen:V,connectionIds:st,onSuccess:()=>{tB(),H(!1)},onClose:()=>H(!1)}),(0,a.jsx)(P,{isOpen:W,provider:l,providerName:tw.name,isCompatible:tE,isAnthropic:tI,authType:tw?.authType,authHint:tw?.authHint,website:tw?.website,proxyPools:I,error:Q,onSave:t5,onBulkDone:tB,onClose:()=>{Z(""),G(!1)}}),(0,a.jsx)(d.wI,{isOpen:X,connection:ei,proxyPools:I,onSave:t4,onClose:()=>Y(!1)}),tE&&(0,a.jsx)(O,{isOpen:ee,node:$,onSave:tV,onClose:()=>et(!1),isAnthropic:tI}),!tE&&(0,a.jsx)(R,{isOpen:ef,providerAlias:tq,providerDisplayAlias:tU,onSave:async e=>{let t=tw?.passthroughModels?e.split("/").pop():e;await tQ(e,t,tq),eg(!1)},onClose:()=>eg(!1)}),(0,a.jsx)(d.uo,{isOpen:eF,onClose:()=>eK(!1),onConfirm:()=>{(window.localStorage.setItem(tf,"true"),eK(!1),m("antigravity"))?s.push(p("antigravity")):tN?tb():tv()},title:"Risk Notice",message:tw?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!eM,onClose:()=>{eN||eL(null)},onConfirm:async()=>{if(eN)return;let e=eM?.onConfirm;if(e){eC(!0);try{await e()}finally{eC(!1)}}},title:eM?.title||"Confirm",message:eM?.message,variant:"danger",loading:eN})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},28915:(e,t,s)=>{"use strict";s.d(t,{x6:()=>a.fetchJson,E2:()=>i,gs:()=>r});var a=s(68211);function i(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}function r(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);if(s<24)return`${s}h ago`;let a=Math.floor(s/24);return`${a}d ago`}},42911:(e,t,s)=>{Promise.resolve().then(s.bind(s,20412))},68211:(e,t,s)=>{"use strict";s.d(t,{fetchJson:()=>i});let a={"Content-Type":"application/json"};async function i(e,t={}){let{body:s,headers:r,...l}=t,n={...l,headers:{...a,...r}};void 0!==s&&"string"!=typeof s?n.body=JSON.stringify(s):void 0!==s&&(n.body=s);let o=await fetch(e,n),d=await o.text(),c=null;if(d)try{c=JSON.parse(d)}catch{let t=Error(`Non-JSON response from ${e} (HTTP ${o.status})`);throw t.status=o.status,t.rawBody=d.slice(0,300),t}if(!o.ok){let e=c&&(c.error?.message||c.error||c.message)||`Request failed (HTTP ${o.status})`,t=Error("string"==typeof e?e:`HTTP ${o.status}`);throw t.status=o.status,t.data=c,t}return c}i.get=(e,t)=>i(e,{...t,method:"GET"}),i.post=(e,t,s)=>i(e,{...s,method:"POST",body:t}),i.put=(e,t,s)=>i(e,{...s,method:"PUT",body:t}),i.patch=(e,t,s)=>i(e,{...s,method:"PATCH",body:t}),i.del=(e,t)=>i(e,{...t,method:"DELETE"})},70217:(e,t,s)=>{"use strict";s.d(t,{BU:()=>u,G9:()=>n,d4:()=>d,gJ:()=>a,i2:()=>c});let a=[{id:"all",label:"All"},{id:"active",label:"Active",keys:["active"]},{id:"errors",label:"Errors",keys:["connection_error","auth_error","quota_exhausted","rate_limited","banned","cooldown","unknown"]},{id:"connection",label:"Connection",keys:["connection_error"]},{id:"auth",label:"Auth",keys:["auth_error"]},{id:"limit",label:"Limit",keys:["rate_limited","cooldown"]},{id:"exhausted",label:"Exhausted",keys:["quota_exhausted"]},{id:"banned",label:"Banned",keys:["banned"]},{id:"disabled",label:"Disabled",keys:["disabled"]}],i={active:{label:"active",severity:"success",terminal:!1},disabled:{label:"disabled",severity:"default",terminal:!1},connection_error:{label:"connection error",severity:"error",terminal:!1},auth_error:{label:"auth error",severity:"error",terminal:!0},quota_exhausted:{label:"exhausted",severity:"error",terminal:!0},rate_limited:{label:"rate limited",severity:"warning",terminal:!1},banned:{label:"banned",severity:"error",terminal:!0},cooldown:{label:"cooldown",severity:"warning",terminal:!1},unknown:{label:"unknown",severity:"default",terminal:!1}},r={policy_suspended:"banned",credential_rejected:"auth_error",reauth_required:"auth_error",authentication:"auth_error",entitlement_or_quota:"quota_exhausted",rate_limited:"rate_limited",permission_denied:"auth_error",upstream_transient:"connection_error"};function l(e){if(!e)return"";if("string"==typeof e)return e.toLowerCase();try{return JSON.stringify(e).toLowerCase()}catch{return String(e).toLowerCase()}}function n(e={},t=Date.now()){let s=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>new Date(e).getTime()).filter(e=>Number.isFinite(e)&&e>t);return s.length>0?new Date(Math.min(...s)).toISOString():null}function o(e,t=""){let s=i[e]||i.unknown;return{key:e,...s,reason:t}}function d(e={}){var t;let s=(t=e).quarantinedAt?o(r[l(t.failureClass)]||"unknown",t.quarantineReason||t.lastError||"Connection is quarantined"):null;if(s)return s;if(!1===e.isActive)return o("disabled","Connection is disabled");if(function(e={}){return null!==n(e)}(e))return o("cooldown","Model cooldown is active");if(function(e){if(!e)return!1;let t=new Date(e).getTime();return Number.isFinite(t)&&t>Date.now()}(e.rateLimitedUntil))return o("rate_limited","Rate limit cooldown is active");let a=l(e.testStatus||e.status),i=l(e.lastErrorType||e.errorType),c=l(e.errorCode||e.statusCode),u=l(e.lastError||e.error),m=`${a} ${i} ${c} ${u}`.trim();return!m||["active","success","ok"].includes(a)?o("active",""):m.includes("ban")||m.includes("suspend")||m.includes("restricted")?o("banned",e.lastError||"Account appears restricted"):m.includes("exhaust")||m.includes("quota exceeded")||m.includes("insufficient_quota")||m.includes("payment required")||"402"===c?o("quota_exhausted",e.lastError||"Quota exhausted"):i.includes("rate_limited")||m.includes("rate limit")||m.includes("too many requests")||"429"===c?o("rate_limited",e.lastError||"Rate limited"):i.includes("auth")||i.includes("token")||m.includes("unauthorized")||m.includes("invalid api key")||m.includes("token invalid")||m.includes("token expired")||m.includes("revoked")||"401"===c||"403"===c?o("auth_error",e.lastError||"Authentication failed"):i.includes("network")||m.includes("network")||m.includes("timeout")||m.includes("fetch failed")||m.includes("econn")||m.includes("dns")||m.includes("proxy")?o("connection_error",e.lastError||"Connection failed"):["error","expired","unavailable","failed"].includes(a)?o("connection_error",e.lastError||e.testStatus||"Connection failed"):o("unknown",e.lastError||e.testStatus||"")}function c(e,t){if(!t||"all"===t)return!0;let s=a.find(e=>e.id===t);return!s||s.keys.includes(d(e).key)}function u(e){return e?.severity==="success"?"success":e?.severity==="error"?"error":"default"}},81277:(e,t,s)=>{"use strict";s.d(t,{c:()=>r});var a=s(12115),i=s(70217);function r(e={}){let[t,s]=(0,a.useState)(null),l=JSON.stringify(Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).sort(([e],[t])=>e.localeCompare(t)));return(0,a.useEffect)(()=>(function(e,t,s={}){let a=s.now||Date.now,r=s.setTimer||globalThis.setTimeout,l=s.clearTimer||globalThis.clearTimeout,n=!1,o=null,d=()=>{if(o=null,n)return;let s=a(),l=(0,i.G9)(e,s);t(l),l&&(o=r(d,Math.min(Math.max(1,new Date(l).getTime()-s+1),0x7fffffff)))};return o=r(d,0),()=>{n=!0,null!==o&&l(o),o=null}})(Object.fromEntries(JSON.parse(l)),s),[l]),t}}},e=>{e.O(0,[2574,3862,3745,3339,620,5497,8441,3794,7358],()=>e(e.s=42911)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{20490:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>j});var r=s(95155),a=s(12115),l=s(14051),i=s.n(l),n=s(35497),o=s(57250),d=s(90620),c=s(52679),m=s(98500),p=s.n(m),x=s(28915),u=s(65921),h=s(38003);let f={available:{icon:"check_circle",color:"#22c55e",label:"Available"},cooldown:{icon:"schedule",color:"#f59e0b",label:"Cooldown"},unavailable:{icon:"error",color:"#ef4444",label:"Unavailable"},unknown:{icon:"help",color:"#6b7280",label:"Unknown"}};function g(){let[e,t]=(0,a.useState)(null),[s,l]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!1),[d,c]=(0,a.useState)(null),m=(0,a.useRef)(null),p=(0,u.i)(),x=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/availability");if(e.ok){let s=await e.json();t(s)}}catch{}finally{l(!1)}},[]);(0,a.useEffect)(()=>{x();let e=setInterval(x,3e4);return()=>clearInterval(e)},[x]),(0,a.useEffect)(()=>{let e=e=>{m.current&&!m.current.contains(e.target)&&o(!1)};return i&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);let h=async(e,t)=>{c(`${e}:${t}`);try{(await fetch("/api/models/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clearCooldown",provider:e,model:t})})).ok?(p.success(`Cooldown cleared for ${t}`),await x()):p.error("Failed to clear cooldown")}catch{p.error("Failed to clear cooldown")}finally{c(null)}};if(s)return null;let g=e?.models||[],b=e?.unavailableCount||g.filter(e=>"available"!==e.status).length,v=0===b,y={};return g.forEach(e=>{if("available"===e.status)return;let t=e.provider||"unknown";y[t]||(y[t]=[]),y[t].push(e)}),(0,r.jsxs)("div",{className:"relative",ref:m,children:[(0,r.jsxs)("button",{onClick:()=>o(!i),className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border transition-all ${v?"bg-emerald-500/10 border-emerald-500/20 text-emerald-500 hover:bg-emerald-500/15":"bg-amber-500/10 border-amber-500/20 text-amber-500 hover:bg-amber-500/15"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:v?"verified":"warning"}),v?"All models operational":`${b} model${1!==b?"s":""} with issues`]}),i&&(0,r.jsxs)("div",{className:"absolute top-full right-0 mt-2 w-80 bg-surface border border-border rounded-xl shadow-2xl z-50 overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:v?"#22c55e":"#f59e0b"},children:v?"verified":"warning"}),(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,r.jsx)("button",{onClick:x,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,r.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:v?(0,r.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,r.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(y).map(([e,t])=>(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:e}),(0,r.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let t=f[e.status]||f.unknown,s=d===`${e.provider}:${e.model}`;return(0,r.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:t.color},children:t.icon}),(0,r.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:e.model})]}),"cooldown"===e.status&&(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>h(e.provider,e.model),disabled:s,className:"text-[10px] px-1.5! py-0.5! ml-2",children:s?"...":"Clear"})]},`${e.provider}-${e.model}`)})})]},e))})})]})]})}function b(e,t,s){if(e>0)return(0,r.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-[11px] font-medium text-success",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-success"}),e," connected"]});if(t>0){let e=s?`${t} Error (${s})`:`${t} Error`;return(0,r.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-[11px] font-medium text-error",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-error"}),e]})}return(0,r.jsx)("span",{className:"text-[11px] text-text-muted",children:"No connections"})}let v=[{value:"all",label:"All"},{value:"connected",label:"Connected"},{value:"ready",label:"Ready"},{value:"setup",label:"Needs setup"}];async function y(e){let t=new AbortController,s=window.setTimeout(()=>t.abort(),8e3);try{let s=await fetch(e,{cache:"no-store",signal:t.signal}),r=null;try{r=await s.json()}catch{r=null}return{response:s,data:r}}finally{window.clearTimeout(s)}}function j(){let e,t,[s,l]=(0,a.useState)([]),[i,o]=(0,a.useState)([]),[m,p]=(0,a.useState)(!0),[f,b]=(0,a.useState)(""),[j,S]=(0,a.useState)(1),[$,I]=(0,a.useState)(20),[R,E]=(0,a.useState)(!1),[P,O]=(0,a.useState)(!1),[U,_]=(0,a.useState)(()=>new Set),[q,M]=(0,a.useState)(null),[z,D]=(0,a.useState)("all"),[F,J]=(0,a.useState)({custom:!1,oauth:!1,free:!0,apikey:!0}),H=(0,u.i)(),K=(0,h.C)(e=>e.query),L=(0,h.C)(e=>e.register),W=(0,h.C)(e=>e.unregister);(0,a.useEffect)(()=>(L("Search providers..."),()=>W()),[L,W]),(0,a.useEffect)(()=>{S(1)},[K,$,z]);let B=e=>!K.trim()||e.toLowerCase().includes(K.trim().toLowerCase());(0,a.useEffect)(()=>{(async()=>{try{b("");let[e,t]=await Promise.allSettled([y("/api/providers"),y("/api/provider-nodes")]);"fulfilled"===e.status&&e.value.response.ok?l(e.value.data?.connections||[]):(l([]),b("Provider connection stats could not be loaded. The provider catalog is still available.")),"fulfilled"===t.status&&t.value.response.ok?o(t.value.data?.nodes||[]):(o([]),b(e=>e||"Custom provider data could not be loaded. The provider catalog is still available."))}catch(e){console.log("Error fetching data:",e),b("Provider data could not be loaded. The provider catalog is still available.")}finally{p(!1)}})()},[]);let Q=(0,a.useMemo)(()=>{let e=new Map;for(let t of s){let s=t.provider||t.id;e.has(s)||e.set(s,[]),e.get(s).push(t)}return e},[s]),V=s.length,X=(0,a.useMemo)(()=>s.filter(e=>!1!==e.isActive).length,[s]),Z=Q.size,G=Math.max(0,V-X),Y=V>0?Math.round(X/V*100):0,ee=(e,t)=>{let s=Array.isArray(t)?t:[t],r=(Q.get(e)||[]).filter(e=>s.includes(e.authType)),a=r.filter(e=>{let t,s=(t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now()),"unavailable"!==e.testStatus||t?e.testStatus:"active");return"error"===s||"expired"===s||"unavailable"===s}),l=r.length>0?r.length:0,i=r.length>0?0:a.length,n=r.length,o=n>0&&r.every(e=>!1===e.isActive),d=a.sort((e,t)=>new Date(t.lastErrorAt||0)-new Date(e.lastErrorAt||0))[0];return{connected:l,error:i,total:n,errorCode:d?function(e){if(!e)return null;let t=e.lastErrorType;if("runtime_error"===t)return"RUNTIME";if("upstream_auth_error"===t||"auth_missing"===t||"token_refresh_failed"===t||"token_expired"===t)return"AUTH";if("upstream_rate_limited"===t)return"429";if("upstream_unavailable"===t)return"5XX";if("network_error"===t)return"NET";let s=Number(e.errorCode);if(Number.isFinite(s)&&s>=400)return String(s);let r=(0,x.E2)(e.lastError);if("401"===r||"403"===r)return"AUTH";if(r&&"ERR"!==r)return r;let a=(e.lastError||"").toLowerCase();return a.includes("runtime")||a.includes("not runnable")||a.includes("not installed")?"RUNTIME":a.includes("invalid api key")||a.includes("token invalid")||a.includes("revoked")||a.includes("unauthorized")?"AUTH":"ERR"}(d):null,errorTime:d?.lastErrorAt?(0,x.gs)(d.lastErrorAt):null,allDisabled:o}},et=(e,t,s)=>{if("all"===z)return!0;let r=ee(e,s);return"connected"===z?r.connected>0:"ready"===z?0===r.connected&&!0===t.noAuth:0===r.connected&&!0!==t.noAuth},es=e=>{J(t=>({...t,[e]:!t[e]}))},er=async(e,t,r)=>{let a=s.filter(s=>s.provider===e&&s.authType===t);l(s=>s.map(s=>s.provider===e&&s.authType===t?{...s,isActive:r}:s));let i=(await Promise.allSettled(a.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:r})}).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e})))).filter(e=>"rejected"===e.status).length;i>0&&(l(s=>s.map(s=>s.provider===e&&s.authType===t?{...s,isActive:!r}:s)),H.error(`Failed to update ${i} connection${i>1?"s":""} — reverted`))},ea=async(e,t=null)=>{let s="provider"===e?t:e;if(s){_(e=>new Set(e).add(s)),M(null);try{let s=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),r=await s.json();if(M(r),r.summary){let{passed:e,failed:t,total:s}=r.summary;0===t?H.success(`All ${s} tests passed`):H.warning(`${e}/${s} passed, ${t} failed`)}}catch(e){M({error:"Test request failed"}),H.error("Provider test failed")}finally{_(e=>{let t=new Set(e);return t.delete(s),t})}}},el=i.filter(e=>"openai-compatible"===e.type).map(e=>({id:e.id,name:e.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:e.apiType})).filter(e=>B(e.name)&&et(e.id,e,"apikey")),ei=i.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>B(e.name)&&et(e.id,e,"apikey")),en=Object.entries(d.zN).filter(([e,t])=>{let s=t?.authModes?.includes("apikey")?["oauth","apikey"]:"oauth";return!t.hidden&&B(t.name)&&et(e,t,s)}),eo=Object.entries(c.IS).filter(([e,t])=>{let s=Array.isArray(t?.authModes)&&t.authModes.includes("apikey");return!t.hidden&&B(t.name)&&et(e,t,s?["oauth","apikey"]:"oauth")}),ed=Object.entries(c.nJ).filter(([e,t])=>!t.hidden&&B(t.name)&&et(e,t,"apikey")),ec=(e=Object.entries(d.fg).filter(([e,t])=>!t.hidden&&(t.serviceKinds??["llm"]).includes("llm")&&B(t.name)&&et(e,t,"apikey")),t="apikey",[...e].sort(([e,s],[r,a])=>{let l=ee(e,t),i=ee(r,t),n=+(l.connected>0),o=+(i.connected>0);return n!==o?o-n:(s.name||"").localeCompare(a.name||"")})),em=Math.min(j,Math.max(1,Math.ceil(ec.length/$))),ep=ec.slice((em-1)*$,em*$),ex=Object.entries(c.br).filter(([e,t])=>"notion-ai"===e&&!t.hidden&&B(t.name)&&et(e,t,"cookie"));if(m)return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]});let eu=en.length>0||eo.length>0||ed.length>0||ec.length>0||ex.length>0||el.length>0||ei.length>0,eh=el.length>0||ei.length>0||"all"===z&&!K.trim();return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[V>0&&(0,r.jsx)("div",{className:"overflow-hidden rounded-xl border border-border bg-surface/80 shadow-sm",children:(0,r.jsxs)("div",{className:"grid grid-cols-3 divide-x divide-y divide-border-subtle sm:grid-cols-4 sm:divide-y-0",children:[(0,r.jsxs)("div",{className:"col-span-3 flex items-center gap-3 px-4 py-3 sm:col-span-1",children:[(0,r.jsx)("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/[0.08] text-primary",children:(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined",style:{fontSize:18},children:"dns"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Connection health"}),(0,r.jsxs)("p",{className:"mt-0.5 text-sm font-semibold tabular-nums text-text-main",children:[Y,"% active"]})]})]}),(0,r.jsxs)("div",{className:"px-4 py-3",children:[(0,r.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Connections"}),(0,r.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-text-main",children:V})]}),(0,r.jsxs)("div",{className:"px-4 py-3",children:[(0,r.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Active"}),(0,r.jsxs)("div",{className:"mt-0.5 flex items-baseline gap-2",children:[(0,r.jsx)("p",{className:"text-lg font-semibold tabular-nums text-success",children:X}),G>0&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:[G," paused"]})]})]}),(0,r.jsxs)("div",{className:"px-4 py-3",children:[(0,r.jsx)("p",{className:"text-[11px] font-medium text-text-muted",children:"Providers"}),(0,r.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-info",children:Z})]})]})}),f&&(0,r.jsx)("div",{className:"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:f}),(0,r.jsx)("div",{className:"overflow-x-auto pb-0.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:(0,r.jsx)("div",{className:"inline-flex min-w-full items-center gap-1.5 rounded-xl border border-border-subtle bg-surface/70 p-1.5 sm:min-w-0",children:v.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>{D(e.value),S(1),J({custom:!1,oauth:!1,free:!1,apikey:!1})},"aria-pressed":z===e.value,className:`flex h-11 flex-1 items-center justify-center whitespace-nowrap rounded-lg px-3 text-xs font-medium transition-colors sm:h-8 sm:flex-none sm:px-3 ${z===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-black/5 hover:text-text-main dark:hover:bg-white/5"}`,children:e.label},e.value))})}),!eu&&(0,r.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,r.jsx)("p",{className:"text-text-muted text-sm",children:K.trim()?"No providers match your search":"No providers match this filter"})]}),eh&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(N,{icon:"extension",title:"Custom Providers",description:"OpenAI and Anthropic-compatible endpoints",count:el.length+ei.length,collapsed:F.custom&&!K.trim(),onToggle:()=>es("custom"),children:(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,r.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>O(!0),className:"min-h-11 w-full sm:min-h-0 sm:w-auto",children:"Add Anthropic Compatible"}),(0,r.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>E(!0),className:"min-h-11 w-full sm:min-h-0 sm:w-auto",children:"Add OpenAI Compatible"})]})}),(0,r.jsx)("div",{className:F.custom&&!K.trim()?"hidden sm:block":"",children:0===el.length&&0===ei.length?(0,r.jsxs)("div",{className:"flex items-center gap-3 rounded-xl border border-dashed border-border bg-surface/45 px-4 py-3 text-text-muted",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-2 text-[18px]",children:"add_link"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium text-text-main",children:"No custom endpoints yet"}),(0,r.jsx)("p",{className:"mt-0.5 text-xs",children:"Add an OpenAI or Anthropic-compatible endpoint when you need one."})]})]}):(0,r.jsx)("div",{className:"grid grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4",children:[...el,...ei].map(e=>(0,r.jsx)(k,{providerId:e.id,provider:e,stats:ee(e.id,"apikey"),onToggle:t=>er(e.id,"apikey",t)},e.id))})})]}),en.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(N,{icon:"passkey",title:"OAuth Providers",description:"Connect existing provider accounts securely",count:en.length,collapsed:F.oauth&&!K.trim(),onToggle:()=>es("oauth"),children:(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,r.jsx)(g,{}),(0,r.jsxs)("button",{onClick:()=>ea("oauth"),disabled:U.has("oauth"),className:`flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border px-3 text-xs font-medium transition-colors sm:h-8 sm:w-auto sm:rounded-lg ${U.has("oauth")?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all OAuth connections","aria-label":"Test all OAuth connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${U.has("oauth")?" animate-spin":""}`,children:"play_arrow"}),U.has("oauth")?"Testing...":"Test All"]})]})}),(0,r.jsx)("div",{className:`${F.oauth&&!K.trim()?"hidden sm:grid":"grid"} grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4`,children:en.map(([e,t])=>{let s=t?.authModes?.includes("apikey")?["oauth","apikey"]:"oauth";return(0,r.jsx)(w,{providerId:e,provider:t,stats:ee(e,s),onToggle:t=>er(e,"oauth",t)},e)})})]}),(eo.length>0||ed.length>0)&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(N,{icon:"savings",title:"Free Tier Providers",description:"Ready-to-use and free-tier routing options",count:eo.length+ed.length,collapsed:F.free&&!K.trim(),onToggle:()=>es("free"),children:(0,r.jsxs)("button",{onClick:()=>ea("free"),disabled:U.has("free"),className:`flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border px-3 text-xs font-medium transition-colors sm:h-8 sm:w-auto sm:rounded-lg ${U.has("free")?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all Free connections","aria-label":"Test all Free provider connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${U.has("free")?" animate-spin":""}`,children:"play_arrow"}),U.has("free")?"Testing...":"Test All"]})}),(0,r.jsxs)("div",{className:`${F.free&&!K.trim()?"hidden sm:grid":"grid"} grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4`,children:[eo.map(([e,t])=>{let s=Array.isArray(t?.authModes)&&t.authModes.includes("apikey");return(0,r.jsx)(w,{providerId:e,provider:t,stats:ee(e,s?["oauth","apikey"]:"oauth"),onToggle:t=>er(e,s?"apikey":"oauth",t)},e)}),ed.map(([e,t])=>(0,r.jsx)(k,{providerId:e,provider:t,stats:ee(e,"apikey"),onToggle:t=>er(e,"apikey",t)},e))]})]}),ec.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(N,{icon:"key",title:"API Key Providers",description:"Bring your own provider credentials",count:ec.length,collapsed:F.apikey&&!K.trim(),onToggle:()=>es("apikey"),children:(0,r.jsxs)("button",{onClick:()=>ea("apikey"),disabled:U.has("apikey"),className:`flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border px-3 text-xs font-medium transition-colors sm:h-8 sm:w-auto sm:rounded-lg ${U.has("apikey")?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all API Key connections","aria-label":"Test all API Key connections",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px]${U.has("apikey")?" animate-spin":""}`,children:"play_arrow"}),U.has("apikey")?"Testing...":"Test All"]})}),(0,r.jsx)("div",{className:`${F.apikey&&!K.trim()?"hidden sm:grid":"grid"} grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4`,children:ep.map(([e,t])=>(0,r.jsx)(k,{providerId:e,provider:t,stats:ee(e,"apikey"),onToggle:t=>er(e,"apikey",t)},e))}),ec.length>0&&(0,r.jsx)("div",{className:F.apikey&&!K.trim()?"hidden sm:block":"",children:(0,r.jsx)(n.dK,{currentPage:em,pageSize:$,totalItems:ec.length,onPageChange:S,onPageSizeChange:e=>{I(e),S(1)}})})]}),ex.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(N,{icon:"auto_awesome",title:"Experimental Web Providers",description:"Use a session from your own Notion workspace",count:ex.length}),(0,r.jsx)("div",{className:"grid grid-cols-1 gap-2.5 sm:grid-cols-2 sm:gap-3 lg:grid-cols-3 xl:grid-cols-4",children:ex.map(([e,t])=>(0,r.jsx)(k,{providerId:e,provider:t,stats:ee(e,"cookie"),onToggle:t=>er(e,"cookie",t)},e))})]}),(0,r.jsx)(C,{isOpen:R,onClose:()=>E(!1),onCreated:e=>{o(t=>[...t,e]),E(!1)}}),(0,r.jsx)(T,{isOpen:P,onClose:()=>O(!1),onCreated:e=>{o(t=>[...t,e]),O(!1)}}),q&&(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>M(null),children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,r.jsxs)("div",{className:"relative bg-surface border border-border rounded-xl w-full max-w-[600px] max-h-[86vh] sm:max-h-[80vh] overflow-y-auto shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between px-5 py-3 border-b border-border bg-surface/95 backdrop-blur-sm rounded-t-xl",children:[(0,r.jsx)("h3",{className:"font-semibold",children:"Test Results"}),(0,r.jsx)("button",{onClick:()=>M(null),className:"p-1 rounded-lg hover:bg-bg text-text-muted hover:text-text-main transition-colors","aria-label":"Close test results",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,r.jsx)("div",{className:"p-5",children:(0,r.jsx)(A,{results:q})})]})]})]})}function N({icon:e,title:t,description:s,count:a,collapsed:l,onToggle:i,children:n}){return(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex w-full min-w-0 items-center gap-2.5 sm:w-auto",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2.5 sm:flex-none",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/[0.08] text-[17px] text-primary",children:e}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("h2",{className:"truncate text-lg font-semibold leading-tight",children:t}),(0,r.jsx)("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold tabular-nums text-text-muted",children:a})]}),(0,r.jsx)("p",{className:"mt-0.5 truncate text-[11px] text-text-muted sm:text-xs",children:s})]})]}),(0,r.jsx)("button",{type:"button",onClick:i,className:"flex size-11 shrink-0 items-center justify-center rounded-xl border border-border text-text-muted transition-colors hover:border-primary/30 hover:text-primary sm:hidden","aria-expanded":!l,"aria-label":`${l?"Expand":"Collapse"} ${t}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:l?"expand_more":"expand_less"})})]}),n&&(0,r.jsx)("div",{className:l?"hidden sm:block":"block",children:n})]})}function w({providerId:e,provider:t,stats:s,onToggle:a}){let{connected:l,error:i,errorCode:d,allDisabled:c}=s,m=!!t.noAuth;return(0,r.jsx)(p(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,r.jsx)(n.Zp,{padding:"none",className:`relative h-[76px] min-h-[76px] cursor-pointer overflow-hidden transition-[border-color,box-shadow,opacity] group-hover:border-primary/30 group-hover:shadow-[0_10px_26px_-22px_rgba(229,106,74,0.55)] sm:h-[78px] sm:min-h-[78px] ${c?"opacity-55":""}`,children:(0,r.jsxs)("div",{className:"flex h-full min-w-0 items-center justify-between gap-2.5 p-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,r.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg ring-1 ring-black/[0.04] dark:ring-white/[0.06]",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,r.jsx)(o.A,{src:`/providers/${t.id}.png`,alt:"",size:28,className:"max-h-7 max-w-7 rounded-md object-contain",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:t.name}),(0,r.jsx)("div",{className:"mt-1 flex min-w-0 items-center overflow-hidden whitespace-nowrap",children:c?(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[13px]",children:"pause_circle"}),"Disabled"]}):m?(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-[11px] font-medium text-success",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-1.5 rounded-full bg-success"}),"Ready"]}):b(l,i,d)})]})]}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[s.total>0&&(0,r.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),a(!!c)},children:(0,r.jsx)(n.lM,{size:"sm",touchTarget:!0,checked:!c,onChange:()=>{},title:c?"Enable provider":"Disable provider"})}),(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[17px] text-text-subtle transition-[transform,color] group-hover:translate-x-0.5 group-hover:text-primary",children:"chevron_right"})]})]})})})}function k({providerId:e,provider:t,stats:s,onToggle:a}){let{connected:l,error:i,errorCode:d,allDisabled:m}=s,x=e.startsWith(c.JH),u=e.startsWith(c.DI);return(0,r.jsx)(p(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,r.jsx)(n.Zp,{padding:"none",className:`relative h-[76px] min-h-[76px] cursor-pointer overflow-hidden transition-[border-color,box-shadow,opacity] group-hover:border-primary/30 group-hover:shadow-[0_10px_26px_-22px_rgba(229,106,74,0.55)] sm:h-[78px] sm:min-h-[78px] ${m?"opacity-55":""}`,children:(0,r.jsxs)("div",{className:"flex h-full min-w-0 items-center justify-between gap-2.5 p-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,r.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg ring-1 ring-black/[0.04] dark:ring-white/[0.06]",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,r.jsx)(o.A,{src:x?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":u?"/providers/anthropic-m.png":`/providers/${t.id}.png`,alt:"",size:28,className:"max-h-7 max-w-7 rounded-md object-contain",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:t.name}),(0,r.jsx)("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 overflow-hidden whitespace-nowrap",children:m?(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[13px]",children:"pause_circle"}),"Disabled"]}):(0,r.jsxs)(r.Fragment,{children:[b(l,i,d),x&&(0,r.jsxs)("span",{className:"text-[10px] text-text-subtle",children:["\xb7 ","responses"===t.apiType?"Responses":"Chat"]}),u&&(0,r.jsx)("span",{className:"text-[10px] text-text-subtle",children:"\xb7 Messages"})]})})]})]}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[s.total>0&&(0,r.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),a(!!m)},children:(0,r.jsx)(n.lM,{size:"sm",touchTarget:!0,checked:!m,onChange:()=>{},title:m?"Enable provider":"Disable provider"})}),(0,r.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[17px] text-text-subtle transition-[transform,color] group-hover:translate-x-0.5 group-hover:text-primary",children:"chevron_right"})]})]})})})}function C({isOpen:e,onClose:t,onCreated:s}){let[l,i]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[o,d]=(0,a.useState)(!1),[c,m]=(0,a.useState)(""),[p,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),[b,v]=(0,a.useState)("");(0,a.useEffect)(()=>{let e="https://api.openai.com/v1";i(t=>t.baseUrl&&t.baseUrl!==e?t:{...t,baseUrl:e})},[l.apiType]);let y=async()=>{if(l.name.trim()&&l.prefix.trim()&&l.baseUrl.trim()){d(!0),v("");try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l.name,prefix:l.prefix,apiType:l.apiType,baseUrl:l.baseUrl,type:"openai-compatible"})}),t=await e.json().catch(()=>({}));e.ok?(s(t.node),i({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),m(""),g(null)):v(t?.error||`Failed to create node (HTTP ${e.status})`)}catch(e){console.log("Error creating OpenAI Compatible node:",e),v("Network error — could not create the node")}finally{d(!1)}}},j=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:l.baseUrl,apiKey:c,type:"openai-compatible",modelId:p.trim()||void 0})}),t=await e.json();g(t)}catch{g({valid:!1,error:"Network error"})}finally{h(!1)}};return(0,r.jsx)(n.aF,{isOpen:e,title:"Add OpenAI Compatible",onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(n.pd,{label:"Name",value:l.name,onChange:e=>i({...l,name:e.target.value}),placeholder:"OpenAI Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,r.jsx)(n.pd,{label:"Prefix",value:l.prefix,onChange:e=>i({...l,prefix:e.target.value}),placeholder:"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,r.jsx)(n.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:l.apiType,onChange:e=>i({...l,apiType:e.target.value})}),(0,r.jsx)(n.pd,{label:"Base URL",value:l.baseUrl,onChange:e=>i({...l,baseUrl:e.target.value}),placeholder:"https://api.openai.com/v1",hint:"Use the base URL (ending in /v1) for your OpenAI-compatible API."}),(0,r.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:c,onChange:e=>m(e.target.value)}),(0,r.jsx)(n.pd,{label:"Model ID (optional)",value:p,onChange:e=>x(e.target.value),placeholder:"e.g. gpt-4, claude-3-opus",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),b&&(0,r.jsx)("p",{className:"text-sm text-red-500 break-words",children:b}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,r.jsx)(n.$n,{onClick:j,disabled:!c||u||!l.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:u?"Checking...":"Check"}),(()=>{if(!f)return null;let{valid:e,error:t,method:s}=f;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===s&&(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,r.jsx)(n.$n,{onClick:y,fullWidth:!0,disabled:!l.name.trim()||!l.prefix.trim()||!l.baseUrl.trim()||o,children:o?"Creating...":"Create"}),(0,r.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function T({isOpen:e,onClose:t,onCreated:s}){let[l,i]=(0,a.useState)({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),[o,d]=(0,a.useState)(!1),[c,m]=(0,a.useState)(""),[p,x]=(0,a.useState)(""),[u,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)(null),[b,v]=(0,a.useState)("");(0,a.useEffect)(()=>{e&&(g(null),m(""),x(""),v(""))},[e]);let y=async()=>{if(l.name.trim()&&l.prefix.trim()&&l.baseUrl.trim()){d(!0),v("");try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l.name,prefix:l.prefix,baseUrl:l.baseUrl,type:"anthropic-compatible"})}),t=await e.json().catch(()=>({}));e.ok?(s(t.node),i({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),m(""),g(null)):v(t?.error||`Failed to create node (HTTP ${e.status})`)}catch(e){console.log("Error creating Anthropic Compatible node:",e),v("Network error — could not create the node")}finally{d(!1)}}},j=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:l.baseUrl,apiKey:c,type:"anthropic-compatible",modelId:p.trim()||void 0})}),t=await e.json();g(t)}catch{g({valid:!1,error:"Network error"})}finally{h(!1)}};return(0,r.jsx)(n.aF,{isOpen:e,title:"Add Anthropic Compatible",onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(n.pd,{label:"Name",value:l.name,onChange:e=>i({...l,name:e.target.value}),placeholder:"Anthropic Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,r.jsx)(n.pd,{label:"Prefix",value:l.prefix,onChange:e=>i({...l,prefix:e.target.value}),placeholder:"ac-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,r.jsx)(n.pd,{label:"Base URL",value:l.baseUrl,onChange:e=>i({...l,baseUrl:e.target.value}),placeholder:"https://api.anthropic.com/v1",hint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages."}),(0,r.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:c,onChange:e=>m(e.target.value)}),(0,r.jsx)(n.pd,{label:"Model ID (optional)",value:p,onChange:e=>x(e.target.value),placeholder:"e.g. claude-3-opus",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),b&&(0,r.jsx)("p",{className:"text-sm text-red-500 break-words",children:b}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,r.jsx)(n.$n,{onClick:j,disabled:!c||u||!l.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:u?"Checking...":"Check"}),(()=>{if(!f)return null;let{valid:e,error:t,method:s}=f;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===s&&(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,r.jsx)(n.$n,{onClick:y,fullWidth:!0,disabled:!l.name.trim()||!l.prefix.trim()||!l.baseUrl.trim()||o,children:o?"Creating...":"Create"}),(0,r.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function A({results:e}){if(e.error&&!e.results)return(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,r.jsx)("p",{className:"text-sm text-red-400",children:e.error})]});let{summary:t,mode:s}=e,a=e.results||[];return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,r.jsxs)("span",{className:"text-text-muted",children:[{oauth:"OAuth",free:"Free",apikey:"API Key",provider:"Provider",all:"All"}[s]||s," Test"]}),(0,r.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[t.passed," passed"]}),t.failed>0&&(0,r.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[t.failed," failed"]}),(0,r.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),a.map((e,t)=>(0,r.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-black/[0.03] px-3 py-2 text-xs dark:bg-white/[0.03] sm:flex-nowrap",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-emerald-500":"text-red-500"}`,children:e.valid?"check_circle":"error"}),(0,r.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,r.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,r.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,r.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[e.latencyMs,"ms"]}),(0,r.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${e.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===a.length&&(0,r.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:"No active connections found for this group."})]})}N.propTypes={icon:i().string.isRequired,title:i().string.isRequired,description:i().string.isRequired,count:i().number.isRequired,collapsed:i().bool.isRequired,onToggle:i().func.isRequired,children:i().node},w.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string,total:i().number,allDisabled:i().bool}).isRequired,onToggle:i().func},k.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string,apiType:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string,total:i().number,allDisabled:i().bool}).isRequired,onToggle:i().func},C.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired},T.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired},A.propTypes={results:i().shape({mode:i().string,results:i().array,summary:i().shape({total:i().number,passed:i().number,failed:i().number}),error:i().string}).isRequired}},28915:(e,t,s)=>{"use strict";s.d(t,{x6:()=>r.fetchJson,E2:()=>a,gs:()=>l});var r=s(68211);function a(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}function l(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);if(s<24)return`${s}h ago`;let r=Math.floor(s/24);return`${r}d ago`}},31703:(e,t,s)=>{Promise.resolve().then(s.bind(s,20490))},68211:(e,t,s)=>{"use strict";s.d(t,{fetchJson:()=>a});let r={"Content-Type":"application/json"};async function a(e,t={}){let{body:s,headers:l,...i}=t,n={...i,headers:{...r,...l}};void 0!==s&&"string"!=typeof s?n.body=JSON.stringify(s):void 0!==s&&(n.body=s);let o=await fetch(e,n),d=await o.text(),c=null;if(d)try{c=JSON.parse(d)}catch{let t=Error(`Non-JSON response from ${e} (HTTP ${o.status})`);throw t.status=o.status,t.rawBody=d.slice(0,300),t}if(!o.ok){let e=c&&(c.error?.message||c.error||c.message)||`Request failed (HTTP ${o.status})`,t=Error("string"==typeof e?e:`HTTP ${o.status}`);throw t.status=o.status,t.data=c,t}return c}a.get=(e,t)=>a(e,{...t,method:"GET"}),a.post=(e,t,s)=>a(e,{...s,method:"POST",body:t}),a.put=(e,t,s)=>a(e,{...s,method:"PUT",body:t}),a.patch=(e,t,s)=>a(e,{...s,method:"PATCH",body:t}),a.del=(e,t)=>a(e,{...t,method:"DELETE"})}},e=>{e.O(0,[2574,3862,3745,3339,620,5497,8441,3794,7358],()=>e(e.s=31703)),_N_E=e.O()}]);
@@ -1,5 +1,15 @@
1
1
  # Unreleased
2
2
 
3
+ # v1.0.205 (2026-08-08)
4
+
5
+ ## Fixes
6
+ - **Notion AI is now usable from the provider dashboard**: the experimental cookie provider is included in the published UI build, resolves workspace and model metadata from the authenticated session, uses a resilient TLS fallback, and keeps multi-turn threads stable.
7
+
8
+ # v1.0.204 (2026-08-08)
9
+
10
+ ## Fixes
11
+ - **Codex refresh failures are now durable and actionable**: `invalid_refresh_token` is treated as a permanent rejection, retry loops stop, live quota can continue using a still-valid access token, and the rejected credential is blocked until the account is reconnected.
12
+
3
13
  # v1.0.203 (2026-08-08)
4
14
 
5
15
  ## Fixes
@@ -0,0 +1,57 @@
1
+ // Install Notion's browser-TLS transport into the user-writable runtime.
2
+ // The package stays out of the published dependency manifest because it ships
3
+ // a platform-specific native library and is optional at request time.
4
+ const fs = require("fs");
5
+ const path = require("path");
6
+ const {
7
+ getRuntimeDir,
8
+ getRuntimeNodeModules,
9
+ runNpmInstall,
10
+ summarizeNpmError,
11
+ } = require("./sqliteRuntime");
12
+
13
+ const TLS_CLIENT_NODE_PACKAGE = "tls-client-node";
14
+ const TLS_CLIENT_NODE_VERSION = "0.2.0";
15
+
16
+ function hasNotionTlsRuntime() {
17
+ return fs.existsSync(path.join(
18
+ getRuntimeNodeModules(),
19
+ TLS_CLIENT_NODE_PACKAGE,
20
+ "package.json",
21
+ ));
22
+ }
23
+
24
+ function ensureRuntimeProject() {
25
+ const runtimeDir = getRuntimeDir();
26
+ fs.mkdirSync(runtimeDir, { recursive: true });
27
+ const packagePath = path.join(runtimeDir, "package.json");
28
+ if (!fs.existsSync(packagePath)) {
29
+ fs.writeFileSync(packagePath, JSON.stringify({
30
+ name: "zevai-runtime",
31
+ version: "1.0.0",
32
+ private: true,
33
+ }, null, 2));
34
+ }
35
+ return runtimeDir;
36
+ }
37
+
38
+ function ensureNotionTlsRuntime({ silent = false } = {}) {
39
+ if (hasNotionTlsRuntime()) return { ok: true, already: true };
40
+
41
+ const runtimeDir = ensureRuntimeProject();
42
+ const result = runNpmInstall({
43
+ cwd: runtimeDir,
44
+ pkgs: [`${TLS_CLIENT_NODE_PACKAGE}@${TLS_CLIENT_NODE_VERSION}`],
45
+ timeout: 300_000,
46
+ });
47
+ if (!result.ok && !silent) {
48
+ console.warn(`[zevai][runtime] Notion TLS install skipped: ${summarizeNpmError(result.stderr || result.stdout)}`);
49
+ console.warn(`[zevai][runtime] Retry: cd "${runtimeDir}" && npm install ${TLS_CLIENT_NODE_PACKAGE}@${TLS_CLIENT_NODE_VERSION}`);
50
+ }
51
+ return { ok: result.ok && hasNotionTlsRuntime() };
52
+ }
53
+
54
+ module.exports = {
55
+ ensureNotionTlsRuntime,
56
+ hasNotionTlsRuntime,
57
+ };
@@ -29,6 +29,7 @@ process.env.NPM_CONFIG_LOGLEVEL = process.env.NPM_CONFIG_LOGLEVEL || "error";
29
29
  const { ensureSqliteRuntime, runNpmInstall, getRuntimeDir } = require("./sqliteRuntime");
30
30
  const { ensureTrayRuntime } = require("./trayRuntime");
31
31
  const { ensureCloakbrowserRuntime } = require("./cloakbrowserRuntime");
32
+ const { ensureNotionTlsRuntime } = require("./notionTlsRuntime");
32
33
  const { hasBuiltInNodeSqlite } = require("./startupRuntime");
33
34
 
34
35
  const minimalSetting = String(process.env.ZEVAI_MINIMAL_POSTINSTALL || "").toLowerCase();
@@ -128,6 +129,14 @@ async function main() {
128
129
  return;
129
130
  }
130
131
 
132
+ try {
133
+ const notionTls = ensureNotionTlsRuntime({ silent: true });
134
+ if (notionTls.ok) log("✓ Notion Chrome TLS transport ready");
135
+ else warn("Notion Chrome TLS transport unavailable — the HTTP fallback remains available");
136
+ } catch (error) {
137
+ warn(`Notion TLS warm-up skipped: ${error.message}`);
138
+ }
139
+
131
140
  try {
132
141
  const cloak = ensureCloakbrowserRuntime({ silent: true });
133
142
  if (!cloak.ok) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter",
3
- "version": "1.0.203",
3
+ "version": "1.0.205",
4
4
  "description": "Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard",
5
5
  "bin": {
6
6
  "zevai": "cli/cli.js"
@@ -0,0 +1,57 @@
1
+ // Install Notion's browser-TLS transport into the user-writable runtime.
2
+ // The package stays out of the published dependency manifest because it ships
3
+ // a platform-specific native library and is optional at request time.
4
+ const fs = require("fs");
5
+ const path = require("path");
6
+ const {
7
+ getRuntimeDir,
8
+ getRuntimeNodeModules,
9
+ runNpmInstall,
10
+ summarizeNpmError,
11
+ } = require("./sqliteRuntime");
12
+
13
+ const TLS_CLIENT_NODE_PACKAGE = "tls-client-node";
14
+ const TLS_CLIENT_NODE_VERSION = "0.2.0";
15
+
16
+ function hasNotionTlsRuntime() {
17
+ return fs.existsSync(path.join(
18
+ getRuntimeNodeModules(),
19
+ TLS_CLIENT_NODE_PACKAGE,
20
+ "package.json",
21
+ ));
22
+ }
23
+
24
+ function ensureRuntimeProject() {
25
+ const runtimeDir = getRuntimeDir();
26
+ fs.mkdirSync(runtimeDir, { recursive: true });
27
+ const packagePath = path.join(runtimeDir, "package.json");
28
+ if (!fs.existsSync(packagePath)) {
29
+ fs.writeFileSync(packagePath, JSON.stringify({
30
+ name: "zevai-runtime",
31
+ version: "1.0.0",
32
+ private: true,
33
+ }, null, 2));
34
+ }
35
+ return runtimeDir;
36
+ }
37
+
38
+ function ensureNotionTlsRuntime({ silent = false } = {}) {
39
+ if (hasNotionTlsRuntime()) return { ok: true, already: true };
40
+
41
+ const runtimeDir = ensureRuntimeProject();
42
+ const result = runNpmInstall({
43
+ cwd: runtimeDir,
44
+ pkgs: [`${TLS_CLIENT_NODE_PACKAGE}@${TLS_CLIENT_NODE_VERSION}`],
45
+ timeout: 300_000,
46
+ });
47
+ if (!result.ok && !silent) {
48
+ console.warn(`[zevai][runtime] Notion TLS install skipped: ${summarizeNpmError(result.stderr || result.stdout)}`);
49
+ console.warn(`[zevai][runtime] Retry: cd "${runtimeDir}" && npm install ${TLS_CLIENT_NODE_PACKAGE}@${TLS_CLIENT_NODE_VERSION}`);
50
+ }
51
+ return { ok: result.ok && hasNotionTlsRuntime() };
52
+ }
53
+
54
+ module.exports = {
55
+ ensureNotionTlsRuntime,
56
+ hasNotionTlsRuntime,
57
+ };
@@ -29,6 +29,7 @@ process.env.NPM_CONFIG_LOGLEVEL = process.env.NPM_CONFIG_LOGLEVEL || "error";
29
29
  const { ensureSqliteRuntime, runNpmInstall, getRuntimeDir } = require("./sqliteRuntime");
30
30
  const { ensureTrayRuntime } = require("./trayRuntime");
31
31
  const { ensureCloakbrowserRuntime } = require("./cloakbrowserRuntime");
32
+ const { ensureNotionTlsRuntime } = require("./notionTlsRuntime");
32
33
  const { hasBuiltInNodeSqlite } = require("./startupRuntime");
33
34
 
34
35
  const minimalSetting = String(process.env.ZEVAI_MINIMAL_POSTINSTALL || "").toLowerCase();
@@ -128,6 +129,14 @@ async function main() {
128
129
  return;
129
130
  }
130
131
 
132
+ try {
133
+ const notionTls = ensureNotionTlsRuntime({ silent: true });
134
+ if (notionTls.ok) log("✓ Notion Chrome TLS transport ready");
135
+ else warn("Notion Chrome TLS transport unavailable — the HTTP fallback remains available");
136
+ } catch (error) {
137
+ warn(`Notion TLS warm-up skipped: ${error.message}`);
138
+ }
139
+
131
140
  try {
132
141
  const cloak = ensureCloakbrowserRuntime({ silent: true });
133
142
  if (!cloak.ok) {
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter-cli",
3
- "version": "1.0.203",
3
+ "version": "1.0.205",
4
4
  "private": true,
5
5
  "description": "ZevaiRouter CLI - Start and manage ZevaiRouter server",
6
6
  "bin": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter",
3
- "version": "1.0.203",
3
+ "version": "1.0.205",
4
4
  "description": "Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard",
5
5
  "bin": {
6
6
  "zevai": "cli/cli.js"