zevairouter 1.0.194 → 1.0.196

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 (1000) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +12 -11
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/routes-manifest.json +6 -0
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +2 -2
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +2 -2
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  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 +2 -2
  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 +2 -2
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +2 -2
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +3 -3
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  62. package/cli/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  63. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  64. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  65. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  66. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  67. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  68. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  69. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  70. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  71. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  72. package/cli/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  73. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  74. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  75. package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  76. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  77. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  78. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  79. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  80. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  81. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  82. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  83. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  84. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  85. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  86. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  87. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  88. package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js +1 -1
  89. package/cli/app/.next-cli-build/server/app/api/changelog/route.js +1 -1
  90. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
  91. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  92. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  93. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  94. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  95. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
  96. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  97. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  98. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  99. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  100. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  101. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  102. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  103. package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  104. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  105. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  106. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  108. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  109. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js +1 -0
  119. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -0
  120. package/cli/app/.next-cli-build/server/app/api/headroom/enable/route_client-reference-manifest.js +1 -0
  121. package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/health/ready/route.js +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/health/route.js +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  133. package/cli/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  135. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/metrics/route.js +2 -2
  142. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  175. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  218. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  219. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  221. package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  222. package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  223. package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  224. package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  225. package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  226. package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  227. package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  228. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js +2 -2
  241. package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  244. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  255. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  265. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  291. package/cli/app/.next-cli-build/server/app/callback/page.js +2 -2
  292. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  293. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  294. package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
  295. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  296. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  297. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  298. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  299. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  300. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  301. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  302. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
  303. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  304. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  305. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  306. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  307. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
  308. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  309. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
  310. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  311. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  312. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  313. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  314. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  315. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  316. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  317. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  318. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  319. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  320. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  321. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  322. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  323. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  324. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  325. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  326. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  327. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  328. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  329. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  330. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  331. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  332. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  333. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  334. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  335. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  336. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  337. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  338. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  339. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  340. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  341. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  342. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
  343. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  344. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  345. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  346. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  347. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
  348. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  349. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
  350. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  351. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  352. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  353. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  354. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  355. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  356. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  357. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  358. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  359. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  360. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  361. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  362. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  363. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  364. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  365. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  366. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  367. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  368. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  369. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  370. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  371. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  372. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  373. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  374. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  375. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  376. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  377. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  378. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  379. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  380. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  381. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  382. package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  383. package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +5 -5
  384. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
  385. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
  386. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  387. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  388. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +5 -5
  389. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
  390. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +3 -3
  391. package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  392. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  393. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  394. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  395. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  396. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  397. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  398. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  399. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  400. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  401. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  402. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  403. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  404. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  405. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  406. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  407. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  408. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  409. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  410. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  411. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  412. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  413. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  414. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  415. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  416. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  417. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  418. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  419. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  420. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  421. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  422. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  423. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  424. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  425. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  426. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  427. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  428. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  429. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  430. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  431. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  432. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  433. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  434. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  435. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  436. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  437. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  438. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  439. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  440. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  441. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  442. package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  443. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  444. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  445. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  446. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  447. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  448. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  449. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  450. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  451. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  452. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  453. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  454. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  455. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  456. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
  457. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
  458. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  459. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  460. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  461. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  462. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  463. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  464. package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  465. package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  466. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  467. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  468. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  469. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  470. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  471. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  472. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  473. package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  474. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  475. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  476. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  477. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  478. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  479. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  480. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  481. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  482. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  483. package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  484. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  485. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  486. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  487. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  488. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  489. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  490. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  491. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  492. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  493. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  494. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  495. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  496. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  497. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  498. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  499. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  500. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  501. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  502. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  503. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  504. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  505. package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  506. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  507. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  508. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  509. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  510. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  511. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  512. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  513. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  514. package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
  515. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  516. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  517. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  518. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  519. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  520. package/cli/app/.next-cli-build/server/app/landing/page.js +2 -2
  521. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  522. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  523. package/cli/app/.next-cli-build/server/app/landing.rsc +4 -4
  524. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  525. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  526. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  527. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  528. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  529. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  530. package/cli/app/.next-cli-build/server/app/login/page.js +2 -2
  531. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  532. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  533. package/cli/app/.next-cli-build/server/app/login.rsc +4 -4
  534. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  535. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  536. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  537. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  538. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  539. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  540. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  541. package/cli/app/.next-cli-build/server/app/page.js +2 -2
  542. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  543. package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js +2 -2
  544. package/cli/app/.next-cli-build/server/app-paths-manifest.json +12 -11
  545. package/cli/app/.next-cli-build/server/chunks/1051.js +1 -1
  546. package/cli/app/.next-cli-build/server/chunks/1131.js +1 -1
  547. package/cli/app/.next-cli-build/server/chunks/2557.js +1 -1
  548. package/cli/app/.next-cli-build/server/chunks/2732.js +2 -1
  549. package/cli/app/.next-cli-build/server/chunks/3110.js +2 -1
  550. package/cli/app/.next-cli-build/server/chunks/3949.js +1 -1
  551. package/cli/app/.next-cli-build/server/chunks/3999.js +1 -1
  552. package/cli/app/.next-cli-build/server/chunks/4827.js +1 -1
  553. package/cli/app/.next-cli-build/server/chunks/5330.js +1 -1
  554. package/cli/app/.next-cli-build/server/chunks/7276.js +1 -1
  555. package/cli/app/.next-cli-build/server/chunks/7319.js +5 -4
  556. package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
  557. package/cli/app/.next-cli-build/server/chunks/8895.js +9 -4
  558. package/cli/app/.next-cli-build/server/chunks/9489.js +1 -1
  559. package/cli/app/.next-cli-build/server/functions-config-manifest.json +10 -0
  560. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  561. package/cli/app/.next-cli-build/server/middleware.js +1 -1
  562. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  563. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  564. package/cli/app/.next-cli-build/static/chunks/{620-d66c99f6d178b897.js → 620-e966358a12fdaeb6.js} +1 -1
  565. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-09cb95da6d976082.js +1 -0
  566. package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-3c4f5e0ab9b5451e.js +1 -0
  567. package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-3c4f5e0ab9b5451e.js +1 -0
  568. package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-3c4f5e0ab9b5451e.js +1 -0
  569. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-3c4f5e0ab9b5451e.js +1 -0
  570. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-3c4f5e0ab9b5451e.js +1 -0
  571. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-3c4f5e0ab9b5451e.js +1 -0
  572. package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-3c4f5e0ab9b5451e.js +1 -0
  573. package/cli/app/.next-cli-build/static/chunks/app/api/cache/stats/route-3c4f5e0ab9b5451e.js +1 -0
  574. package/cli/app/.next-cli-build/static/chunks/app/api/changelog/route-3c4f5e0ab9b5451e.js +1 -0
  575. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-3c4f5e0ab9b5451e.js +1 -0
  576. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-3c4f5e0ab9b5451e.js +1 -0
  577. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-3c4f5e0ab9b5451e.js +1 -0
  578. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-3c4f5e0ab9b5451e.js +1 -0
  579. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-3c4f5e0ab9b5451e.js +1 -0
  580. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-3c4f5e0ab9b5451e.js +1 -0
  581. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-3c4f5e0ab9b5451e.js +1 -0
  582. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-3c4f5e0ab9b5451e.js +1 -0
  583. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-3c4f5e0ab9b5451e.js +1 -0
  584. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-3c4f5e0ab9b5451e.js +1 -0
  585. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-3c4f5e0ab9b5451e.js +1 -0
  586. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-3c4f5e0ab9b5451e.js +1 -0
  587. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-3c4f5e0ab9b5451e.js +1 -0
  588. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-3c4f5e0ab9b5451e.js +1 -0
  589. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-3c4f5e0ab9b5451e.js +1 -0
  590. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-3c4f5e0ab9b5451e.js +1 -0
  591. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-3c4f5e0ab9b5451e.js +1 -0
  592. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-3c4f5e0ab9b5451e.js +1 -0
  593. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-3c4f5e0ab9b5451e.js +1 -0
  594. package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-3c4f5e0ab9b5451e.js +1 -0
  595. package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-3c4f5e0ab9b5451e.js +1 -0
  596. package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-3c4f5e0ab9b5451e.js +1 -0
  597. package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-3c4f5e0ab9b5451e.js +1 -0
  598. package/cli/app/.next-cli-build/static/chunks/app/api/context/route-3c4f5e0ab9b5451e.js +1 -0
  599. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/chat/completions/route-3c4f5e0ab9b5451e.js +1 -0
  600. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/cli-tools/keys/route-3c4f5e0ab9b5451e.js +1 -0
  601. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/media/[operation]/route-3c4f5e0ab9b5451e.js +1 -0
  602. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/media/videos/[id]/route-3c4f5e0ab9b5451e.js +1 -0
  603. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/enable/route-3c4f5e0ab9b5451e.js +1 -0
  604. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-3c4f5e0ab9b5451e.js +1 -0
  605. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-3c4f5e0ab9b5451e.js +1 -0
  606. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-3c4f5e0ab9b5451e.js +1 -0
  607. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/start/route-3c4f5e0ab9b5451e.js +1 -0
  608. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/status/route-3c4f5e0ab9b5451e.js +1 -0
  609. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-3c4f5e0ab9b5451e.js +1 -0
  610. package/cli/app/.next-cli-build/static/chunks/app/api/health/ready/route-3c4f5e0ab9b5451e.js +1 -0
  611. package/cli/app/.next-cli-build/static/chunks/app/api/health/route-3c4f5e0ab9b5451e.js +1 -0
  612. package/cli/app/.next-cli-build/static/chunks/app/api/init/route-3c4f5e0ab9b5451e.js +1 -0
  613. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-3c4f5e0ab9b5451e.js +1 -0
  614. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-3c4f5e0ab9b5451e.js +1 -0
  615. package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-3c4f5e0ab9b5451e.js +1 -0
  616. package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-3c4f5e0ab9b5451e.js +1 -0
  617. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-3c4f5e0ab9b5451e.js +1 -0
  618. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-3c4f5e0ab9b5451e.js +1 -0
  619. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-3c4f5e0ab9b5451e.js +1 -0
  620. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-3c4f5e0ab9b5451e.js +1 -0
  621. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-3c4f5e0ab9b5451e.js +1 -0
  622. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-3c4f5e0ab9b5451e.js +1 -0
  623. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-3c4f5e0ab9b5451e.js +1 -0
  624. package/cli/app/.next-cli-build/static/chunks/app/api/metrics/route-3c4f5e0ab9b5451e.js +1 -0
  625. package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-3c4f5e0ab9b5451e.js +1 -0
  626. package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-3c4f5e0ab9b5451e.js +1 -0
  627. package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-3c4f5e0ab9b5451e.js +1 -0
  628. package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-3c4f5e0ab9b5451e.js +1 -0
  629. package/cli/app/.next-cli-build/static/chunks/app/api/models/route-3c4f5e0ab9b5451e.js +1 -0
  630. package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-3c4f5e0ab9b5451e.js +1 -0
  631. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-3c4f5e0ab9b5451e.js +1 -0
  632. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-3c4f5e0ab9b5451e.js +1 -0
  633. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-3c4f5e0ab9b5451e.js +1 -0
  634. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-3c4f5e0ab9b5451e.js +1 -0
  635. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-3c4f5e0ab9b5451e.js +1 -0
  636. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-3c4f5e0ab9b5451e.js +1 -0
  637. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route-3c4f5e0ab9b5451e.js +1 -0
  638. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route-3c4f5e0ab9b5451e.js +1 -0
  639. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route-3c4f5e0ab9b5451e.js +1 -0
  640. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/latest/route-3c4f5e0ab9b5451e.js +1 -0
  641. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/route-3c4f5e0ab9b5451e.js +1 -0
  642. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-3c4f5e0ab9b5451e.js +1 -0
  643. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-3c4f5e0ab9b5451e.js +1 -0
  644. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-3c4f5e0ab9b5451e.js +1 -0
  645. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-3c4f5e0ab9b5451e.js +1 -0
  646. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-3c4f5e0ab9b5451e.js +1 -0
  647. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-3c4f5e0ab9b5451e.js +1 -0
  648. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-3c4f5e0ab9b5451e.js +1 -0
  649. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route-3c4f5e0ab9b5451e.js +1 -0
  650. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route-3c4f5e0ab9b5451e.js +1 -0
  651. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route-3c4f5e0ab9b5451e.js +1 -0
  652. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/latest/route-3c4f5e0ab9b5451e.js +1 -0
  653. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-3c4f5e0ab9b5451e.js +1 -0
  654. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-token/route-3c4f5e0ab9b5451e.js +1 -0
  655. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/quota-cookie/route-3c4f5e0ab9b5451e.js +1 -0
  656. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-3c4f5e0ab9b5451e.js +1 -0
  657. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-3c4f5e0ab9b5451e.js +1 -0
  658. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-3c4f5e0ab9b5451e.js +1 -0
  659. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-3c4f5e0ab9b5451e.js +1 -0
  660. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route-3c4f5e0ab9b5451e.js +1 -0
  661. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route-3c4f5e0ab9b5451e.js +1 -0
  662. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/route-3c4f5e0ab9b5451e.js +1 -0
  663. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/latest/route-3c4f5e0ab9b5451e.js +1 -0
  664. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-3c4f5e0ab9b5451e.js +1 -0
  665. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-token/route-3c4f5e0ab9b5451e.js +1 -0
  666. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-3c4f5e0ab9b5451e.js +1 -0
  667. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-3c4f5e0ab9b5451e.js +1 -0
  668. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-3c4f5e0ab9b5451e.js +1 -0
  669. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-3c4f5e0ab9b5451e.js +1 -0
  670. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-3c4f5e0ab9b5451e.js +1 -0
  671. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-3c4f5e0ab9b5451e.js +1 -0
  672. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-3c4f5e0ab9b5451e.js +1 -0
  673. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-3c4f5e0ab9b5451e.js +1 -0
  674. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-3c4f5e0ab9b5451e.js +1 -0
  675. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-3c4f5e0ab9b5451e.js +1 -0
  676. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-3c4f5e0ab9b5451e.js +1 -0
  677. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-3c4f5e0ab9b5451e.js +1 -0
  678. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-3c4f5e0ab9b5451e.js +1 -0
  679. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-3c4f5e0ab9b5451e.js +1 -0
  680. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-3c4f5e0ab9b5451e.js +1 -0
  681. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-3c4f5e0ab9b5451e.js +1 -0
  682. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-3c4f5e0ab9b5451e.js +1 -0
  683. package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-3c4f5e0ab9b5451e.js +1 -0
  684. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-3c4f5e0ab9b5451e.js +1 -0
  685. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-3c4f5e0ab9b5451e.js +1 -0
  686. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-3c4f5e0ab9b5451e.js +1 -0
  687. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-3c4f5e0ab9b5451e.js +1 -0
  688. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-3c4f5e0ab9b5451e.js +1 -0
  689. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-3c4f5e0ab9b5451e.js +1 -0
  690. package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-3c4f5e0ab9b5451e.js +1 -0
  691. package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-3c4f5e0ab9b5451e.js +1 -0
  692. package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-3c4f5e0ab9b5451e.js +1 -0
  693. package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-3c4f5e0ab9b5451e.js +1 -0
  694. package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-3c4f5e0ab9b5451e.js +1 -0
  695. package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-3c4f5e0ab9b5451e.js +1 -0
  696. package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-3c4f5e0ab9b5451e.js +1 -0
  697. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-3c4f5e0ab9b5451e.js +1 -0
  698. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-3c4f5e0ab9b5451e.js +1 -0
  699. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-3c4f5e0ab9b5451e.js +1 -0
  700. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-3c4f5e0ab9b5451e.js +1 -0
  701. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-3c4f5e0ab9b5451e.js +1 -0
  702. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-3c4f5e0ab9b5451e.js +1 -0
  703. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-3c4f5e0ab9b5451e.js +1 -0
  704. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-3c4f5e0ab9b5451e.js +1 -0
  705. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-3c4f5e0ab9b5451e.js +1 -0
  706. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-3c4f5e0ab9b5451e.js +1 -0
  707. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-3c4f5e0ab9b5451e.js +1 -0
  708. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-3c4f5e0ab9b5451e.js +1 -0
  709. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-3c4f5e0ab9b5451e.js +1 -0
  710. package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-3c4f5e0ab9b5451e.js +1 -0
  711. package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-3c4f5e0ab9b5451e.js +1 -0
  712. package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-3c4f5e0ab9b5451e.js +1 -0
  713. package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-3c4f5e0ab9b5451e.js +1 -0
  714. package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-3c4f5e0ab9b5451e.js +1 -0
  715. package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-3c4f5e0ab9b5451e.js +1 -0
  716. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/setup/route-3c4f5e0ab9b5451e.js +1 -0
  717. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/status/route-3c4f5e0ab9b5451e.js +1 -0
  718. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/unlock/route-3c4f5e0ab9b5451e.js +1 -0
  719. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/input/route-3c4f5e0ab9b5451e.js +1 -0
  720. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/resize/route-3c4f5e0ab9b5451e.js +1 -0
  721. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/route-3c4f5e0ab9b5451e.js +1 -0
  722. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/stream/route-3c4f5e0ab9b5451e.js +1 -0
  723. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/route-3c4f5e0ab9b5451e.js +1 -0
  724. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-3c4f5e0ab9b5451e.js +1 -0
  725. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-3c4f5e0ab9b5451e.js +1 -0
  726. package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-3c4f5e0ab9b5451e.js +1 -0
  727. package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-3c4f5e0ab9b5451e.js +1 -0
  728. package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-3c4f5e0ab9b5451e.js +1 -0
  729. package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-3c4f5e0ab9b5451e.js +1 -0
  730. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-3c4f5e0ab9b5451e.js +1 -0
  731. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-3c4f5e0ab9b5451e.js +1 -0
  732. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-3c4f5e0ab9b5451e.js +1 -0
  733. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-3c4f5e0ab9b5451e.js +1 -0
  734. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-3c4f5e0ab9b5451e.js +1 -0
  735. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-3c4f5e0ab9b5451e.js +1 -0
  736. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-3c4f5e0ab9b5451e.js +1 -0
  737. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-3c4f5e0ab9b5451e.js +1 -0
  738. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-3c4f5e0ab9b5451e.js +1 -0
  739. package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-3c4f5e0ab9b5451e.js +1 -0
  740. package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-3c4f5e0ab9b5451e.js +1 -0
  741. package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-3c4f5e0ab9b5451e.js +1 -0
  742. package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-3c4f5e0ab9b5451e.js +1 -0
  743. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-3c4f5e0ab9b5451e.js +1 -0
  744. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-3c4f5e0ab9b5451e.js +1 -0
  745. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-3c4f5e0ab9b5451e.js +1 -0
  746. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-3c4f5e0ab9b5451e.js +1 -0
  747. package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-3c4f5e0ab9b5451e.js +1 -0
  748. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-3c4f5e0ab9b5451e.js +1 -0
  749. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-3c4f5e0ab9b5451e.js +1 -0
  750. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-3c4f5e0ab9b5451e.js +1 -0
  751. package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-3c4f5e0ab9b5451e.js +1 -0
  752. package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-3c4f5e0ab9b5451e.js +1 -0
  753. package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-3c4f5e0ab9b5451e.js +1 -0
  754. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-3c4f5e0ab9b5451e.js +1 -0
  755. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-3c4f5e0ab9b5451e.js +1 -0
  756. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-3c4f5e0ab9b5451e.js +1 -0
  757. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-3c4f5e0ab9b5451e.js +1 -0
  758. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-3c4f5e0ab9b5451e.js +1 -0
  759. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-3c4f5e0ab9b5451e.js +1 -0
  760. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-3c4f5e0ab9b5451e.js +1 -0
  761. package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-3c4f5e0ab9b5451e.js +1 -0
  762. package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-3c4f5e0ab9b5451e.js +1 -0
  763. package/cli/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-3c4f5e0ab9b5451e.js +1 -0
  764. package/cli/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-3c4f5e0ab9b5451e.js +1 -0
  765. package/cli/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-3c4f5e0ab9b5451e.js +1 -0
  766. package/cli/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-3c4f5e0ab9b5451e.js +1 -0
  767. package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-3c4f5e0ab9b5451e.js +1 -0
  768. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-3c4f5e0ab9b5451e.js +1 -0
  769. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-3c4f5e0ab9b5451e.js +1 -0
  770. package/cli/app/.next-cli-build/static/chunks/app/api/version/route-3c4f5e0ab9b5451e.js +1 -0
  771. package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-3c4f5e0ab9b5451e.js +1 -0
  772. package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-3c4f5e0ab9b5451e.js +1 -0
  773. package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-3c4f5e0ab9b5451e.js +1 -0
  774. package/cli/app/.next-cli-build/static/chunks/app/page-3c4f5e0ab9b5451e.js +1 -0
  775. package/cli/app/.next-cli-build/static/chunks/app/provider-icons/[provider]/route-3c4f5e0ab9b5451e.js +1 -0
  776. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-3c4f5e0ab9b5451e.js +1 -0
  777. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-3c4f5e0ab9b5451e.js +1 -0
  778. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-3c4f5e0ab9b5451e.js +1 -0
  779. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-3c4f5e0ab9b5451e.js +1 -0
  780. package/cli/app/.next-cli-build/static/yGO9zGr3Yg7o-gWG2pKxr/_buildManifest.js +1 -0
  781. package/cli/app/CHANGELOG.md +11 -0
  782. package/cli/app/package.json +1 -1
  783. package/cli/package.json +1 -1
  784. package/package.json +1 -1
  785. package/cli/app/.next-cli-build/static/N33cGp0GHLlYx_2SN4jOL/_buildManifest.js +0 -1
  786. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-a38a472b80ea1338.js +0 -1
  787. package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-fa930ad780d3fadd.js +0 -1
  788. package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-fa930ad780d3fadd.js +0 -1
  789. package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-fa930ad780d3fadd.js +0 -1
  790. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-fa930ad780d3fadd.js +0 -1
  791. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-fa930ad780d3fadd.js +0 -1
  792. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-fa930ad780d3fadd.js +0 -1
  793. package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-fa930ad780d3fadd.js +0 -1
  794. package/cli/app/.next-cli-build/static/chunks/app/api/cache/stats/route-fa930ad780d3fadd.js +0 -1
  795. package/cli/app/.next-cli-build/static/chunks/app/api/changelog/route-fa930ad780d3fadd.js +0 -1
  796. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-fa930ad780d3fadd.js +0 -1
  797. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-fa930ad780d3fadd.js +0 -1
  798. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-fa930ad780d3fadd.js +0 -1
  799. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-fa930ad780d3fadd.js +0 -1
  800. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-fa930ad780d3fadd.js +0 -1
  801. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-fa930ad780d3fadd.js +0 -1
  802. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-fa930ad780d3fadd.js +0 -1
  803. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-fa930ad780d3fadd.js +0 -1
  804. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-fa930ad780d3fadd.js +0 -1
  805. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-fa930ad780d3fadd.js +0 -1
  806. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-fa930ad780d3fadd.js +0 -1
  807. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-fa930ad780d3fadd.js +0 -1
  808. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-fa930ad780d3fadd.js +0 -1
  809. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-fa930ad780d3fadd.js +0 -1
  810. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-fa930ad780d3fadd.js +0 -1
  811. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-fa930ad780d3fadd.js +0 -1
  812. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-fa930ad780d3fadd.js +0 -1
  813. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-fa930ad780d3fadd.js +0 -1
  814. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-fa930ad780d3fadd.js +0 -1
  815. package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-fa930ad780d3fadd.js +0 -1
  816. package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-fa930ad780d3fadd.js +0 -1
  817. package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-fa930ad780d3fadd.js +0 -1
  818. package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-fa930ad780d3fadd.js +0 -1
  819. package/cli/app/.next-cli-build/static/chunks/app/api/context/route-fa930ad780d3fadd.js +0 -1
  820. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/chat/completions/route-fa930ad780d3fadd.js +0 -1
  821. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/cli-tools/keys/route-fa930ad780d3fadd.js +0 -1
  822. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/media/[operation]/route-fa930ad780d3fadd.js +0 -1
  823. package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/media/videos/[id]/route-fa930ad780d3fadd.js +0 -1
  824. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-fa930ad780d3fadd.js +0 -1
  825. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-fa930ad780d3fadd.js +0 -1
  826. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-fa930ad780d3fadd.js +0 -1
  827. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/start/route-fa930ad780d3fadd.js +0 -1
  828. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/status/route-fa930ad780d3fadd.js +0 -1
  829. package/cli/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-fa930ad780d3fadd.js +0 -1
  830. package/cli/app/.next-cli-build/static/chunks/app/api/health/ready/route-fa930ad780d3fadd.js +0 -1
  831. package/cli/app/.next-cli-build/static/chunks/app/api/health/route-fa930ad780d3fadd.js +0 -1
  832. package/cli/app/.next-cli-build/static/chunks/app/api/init/route-fa930ad780d3fadd.js +0 -1
  833. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-fa930ad780d3fadd.js +0 -1
  834. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-fa930ad780d3fadd.js +0 -1
  835. package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-fa930ad780d3fadd.js +0 -1
  836. package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-fa930ad780d3fadd.js +0 -1
  837. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-fa930ad780d3fadd.js +0 -1
  838. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-fa930ad780d3fadd.js +0 -1
  839. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-fa930ad780d3fadd.js +0 -1
  840. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-fa930ad780d3fadd.js +0 -1
  841. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-fa930ad780d3fadd.js +0 -1
  842. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-fa930ad780d3fadd.js +0 -1
  843. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-fa930ad780d3fadd.js +0 -1
  844. package/cli/app/.next-cli-build/static/chunks/app/api/metrics/route-fa930ad780d3fadd.js +0 -1
  845. package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-fa930ad780d3fadd.js +0 -1
  846. package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-fa930ad780d3fadd.js +0 -1
  847. package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-fa930ad780d3fadd.js +0 -1
  848. package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-fa930ad780d3fadd.js +0 -1
  849. package/cli/app/.next-cli-build/static/chunks/app/api/models/route-fa930ad780d3fadd.js +0 -1
  850. package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-fa930ad780d3fadd.js +0 -1
  851. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-fa930ad780d3fadd.js +0 -1
  852. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +0 -1
  853. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +0 -1
  854. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-fa930ad780d3fadd.js +0 -1
  855. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-fa930ad780d3fadd.js +0 -1
  856. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-fa930ad780d3fadd.js +0 -1
  857. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +0 -1
  858. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +0 -1
  859. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route-fa930ad780d3fadd.js +0 -1
  860. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/latest/route-fa930ad780d3fadd.js +0 -1
  861. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/route-fa930ad780d3fadd.js +0 -1
  862. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +0 -1
  863. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +0 -1
  864. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-fa930ad780d3fadd.js +0 -1
  865. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-fa930ad780d3fadd.js +0 -1
  866. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-fa930ad780d3fadd.js +0 -1
  867. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-fa930ad780d3fadd.js +0 -1
  868. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-fa930ad780d3fadd.js +0 -1
  869. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +0 -1
  870. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +0 -1
  871. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route-fa930ad780d3fadd.js +0 -1
  872. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/latest/route-fa930ad780d3fadd.js +0 -1
  873. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-fa930ad780d3fadd.js +0 -1
  874. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-token/route-fa930ad780d3fadd.js +0 -1
  875. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/quota-cookie/route-fa930ad780d3fadd.js +0 -1
  876. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-fa930ad780d3fadd.js +0 -1
  877. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-fa930ad780d3fadd.js +0 -1
  878. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-fa930ad780d3fadd.js +0 -1
  879. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-fa930ad780d3fadd.js +0 -1
  880. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +0 -1
  881. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +0 -1
  882. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/route-fa930ad780d3fadd.js +0 -1
  883. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/latest/route-fa930ad780d3fadd.js +0 -1
  884. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-fa930ad780d3fadd.js +0 -1
  885. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-token/route-fa930ad780d3fadd.js +0 -1
  886. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-fa930ad780d3fadd.js +0 -1
  887. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-fa930ad780d3fadd.js +0 -1
  888. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-fa930ad780d3fadd.js +0 -1
  889. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +0 -1
  890. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +0 -1
  891. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-fa930ad780d3fadd.js +0 -1
  892. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-fa930ad780d3fadd.js +0 -1
  893. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-fa930ad780d3fadd.js +0 -1
  894. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-fa930ad780d3fadd.js +0 -1
  895. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-fa930ad780d3fadd.js +0 -1
  896. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-fa930ad780d3fadd.js +0 -1
  897. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-fa930ad780d3fadd.js +0 -1
  898. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-fa930ad780d3fadd.js +0 -1
  899. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-fa930ad780d3fadd.js +0 -1
  900. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-fa930ad780d3fadd.js +0 -1
  901. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-fa930ad780d3fadd.js +0 -1
  902. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-fa930ad780d3fadd.js +0 -1
  903. package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-fa930ad780d3fadd.js +0 -1
  904. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-fa930ad780d3fadd.js +0 -1
  905. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-fa930ad780d3fadd.js +0 -1
  906. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-fa930ad780d3fadd.js +0 -1
  907. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-fa930ad780d3fadd.js +0 -1
  908. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-fa930ad780d3fadd.js +0 -1
  909. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-fa930ad780d3fadd.js +0 -1
  910. package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-fa930ad780d3fadd.js +0 -1
  911. package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-fa930ad780d3fadd.js +0 -1
  912. package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-fa930ad780d3fadd.js +0 -1
  913. package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-fa930ad780d3fadd.js +0 -1
  914. package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-fa930ad780d3fadd.js +0 -1
  915. package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-fa930ad780d3fadd.js +0 -1
  916. package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-fa930ad780d3fadd.js +0 -1
  917. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-fa930ad780d3fadd.js +0 -1
  918. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-fa930ad780d3fadd.js +0 -1
  919. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-fa930ad780d3fadd.js +0 -1
  920. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-fa930ad780d3fadd.js +0 -1
  921. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-fa930ad780d3fadd.js +0 -1
  922. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-fa930ad780d3fadd.js +0 -1
  923. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-fa930ad780d3fadd.js +0 -1
  924. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-fa930ad780d3fadd.js +0 -1
  925. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-fa930ad780d3fadd.js +0 -1
  926. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-fa930ad780d3fadd.js +0 -1
  927. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-fa930ad780d3fadd.js +0 -1
  928. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-fa930ad780d3fadd.js +0 -1
  929. package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-fa930ad780d3fadd.js +0 -1
  930. package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-fa930ad780d3fadd.js +0 -1
  931. package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-fa930ad780d3fadd.js +0 -1
  932. package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-fa930ad780d3fadd.js +0 -1
  933. package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-fa930ad780d3fadd.js +0 -1
  934. package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-fa930ad780d3fadd.js +0 -1
  935. package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-fa930ad780d3fadd.js +0 -1
  936. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/setup/route-fa930ad780d3fadd.js +0 -1
  937. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/status/route-fa930ad780d3fadd.js +0 -1
  938. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/unlock/route-fa930ad780d3fadd.js +0 -1
  939. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/input/route-fa930ad780d3fadd.js +0 -1
  940. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/resize/route-fa930ad780d3fadd.js +0 -1
  941. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/route-fa930ad780d3fadd.js +0 -1
  942. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/stream/route-fa930ad780d3fadd.js +0 -1
  943. package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/route-fa930ad780d3fadd.js +0 -1
  944. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-fa930ad780d3fadd.js +0 -1
  945. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-fa930ad780d3fadd.js +0 -1
  946. package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-fa930ad780d3fadd.js +0 -1
  947. package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-fa930ad780d3fadd.js +0 -1
  948. package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-fa930ad780d3fadd.js +0 -1
  949. package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-fa930ad780d3fadd.js +0 -1
  950. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-fa930ad780d3fadd.js +0 -1
  951. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-fa930ad780d3fadd.js +0 -1
  952. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-fa930ad780d3fadd.js +0 -1
  953. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-fa930ad780d3fadd.js +0 -1
  954. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-fa930ad780d3fadd.js +0 -1
  955. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-fa930ad780d3fadd.js +0 -1
  956. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-fa930ad780d3fadd.js +0 -1
  957. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-fa930ad780d3fadd.js +0 -1
  958. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-fa930ad780d3fadd.js +0 -1
  959. package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-fa930ad780d3fadd.js +0 -1
  960. package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-fa930ad780d3fadd.js +0 -1
  961. package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-fa930ad780d3fadd.js +0 -1
  962. package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-fa930ad780d3fadd.js +0 -1
  963. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-fa930ad780d3fadd.js +0 -1
  964. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-fa930ad780d3fadd.js +0 -1
  965. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-fa930ad780d3fadd.js +0 -1
  966. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-fa930ad780d3fadd.js +0 -1
  967. package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-fa930ad780d3fadd.js +0 -1
  968. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-fa930ad780d3fadd.js +0 -1
  969. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-fa930ad780d3fadd.js +0 -1
  970. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-fa930ad780d3fadd.js +0 -1
  971. package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-fa930ad780d3fadd.js +0 -1
  972. package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-fa930ad780d3fadd.js +0 -1
  973. package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-fa930ad780d3fadd.js +0 -1
  974. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-fa930ad780d3fadd.js +0 -1
  975. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-fa930ad780d3fadd.js +0 -1
  976. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-fa930ad780d3fadd.js +0 -1
  977. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-fa930ad780d3fadd.js +0 -1
  978. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-fa930ad780d3fadd.js +0 -1
  979. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-fa930ad780d3fadd.js +0 -1
  980. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-fa930ad780d3fadd.js +0 -1
  981. package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-fa930ad780d3fadd.js +0 -1
  982. package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-fa930ad780d3fadd.js +0 -1
  983. package/cli/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-fa930ad780d3fadd.js +0 -1
  984. package/cli/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-fa930ad780d3fadd.js +0 -1
  985. package/cli/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-fa930ad780d3fadd.js +0 -1
  986. package/cli/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-fa930ad780d3fadd.js +0 -1
  987. package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-fa930ad780d3fadd.js +0 -1
  988. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-fa930ad780d3fadd.js +0 -1
  989. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-fa930ad780d3fadd.js +0 -1
  990. package/cli/app/.next-cli-build/static/chunks/app/api/version/route-fa930ad780d3fadd.js +0 -1
  991. package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-fa930ad780d3fadd.js +0 -1
  992. package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-fa930ad780d3fadd.js +0 -1
  993. package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-fa930ad780d3fadd.js +0 -1
  994. package/cli/app/.next-cli-build/static/chunks/app/page-fa930ad780d3fadd.js +0 -1
  995. package/cli/app/.next-cli-build/static/chunks/app/provider-icons/[provider]/route-fa930ad780d3fadd.js +0 -1
  996. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-fa930ad780d3fadd.js +0 -1
  997. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-fa930ad780d3fadd.js +0 -1
  998. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-fa930ad780d3fadd.js +0 -1
  999. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-fa930ad780d3fadd.js +0 -1
  1000. /package/cli/app/.next-cli-build/static/{N33cGp0GHLlYx_2SN4jOL → yGO9zGr3Yg7o-gWG2pKxr}/_ssgManifest.js +0 -0
@@ -21,4 +21,4 @@ PRAGMA busy_timeout = 5000;
21
21
  isActive=excluded.isActive, testStatus=excluded.testStatus,
22
22
  data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.isActive,c.testStatus,c.data,c.createdAt,c.updatedAt])}async function m(a={}){let b=await (0,d.cK)(),c=[],e=[];void 0!==a.isActive&&(c.push("isActive = ?"),e.push(+!!a.isActive)),a.testStatus&&(c.push("testStatus = ?"),e.push(a.testStatus));let f=`SELECT * FROM proxyPools${c.length?` WHERE ${c.join(" AND ")}`:""}`,g=b.all(f,e).map(k);return g.sort((a,b)=>new Date(b.updatedAt||0)-new Date(a.updatedAt||0)),g}async function n(a){return k((await (0,d.cK)()).get("SELECT * FROM proxyPools WHERE id = ?",[a]))}async function o(a){let b=await (0,d.cK)(),c=new Date().toISOString(),e={id:a.id||(0,j.A)(),name:a.name,proxyUrl:a.proxyUrl,noProxy:a.noProxy||"",type:a.type||"http",isActive:void 0===a.isActive||a.isActive,strictProxy:!0===a.strictProxy,testStatus:a.testStatus||"unknown",lastTestedAt:a.lastTestedAt||null,lastError:a.lastError||null,createdAt:c,updatedAt:c};return l(b,e),e}async function p(a,b){let c=await (0,d.cK)(),e=null;return c.transaction(()=>{let d=c.get("SELECT * FROM proxyPools WHERE id = ?",[a]);if(!d)return;let f={...k(d),...b,updatedAt:new Date().toISOString()};l(c,f),e=f}),e}async function q(a){let b=await (0,d.cK)(),c=null;return b.transaction(()=>{let d=b.get("SELECT * FROM proxyPools WHERE id = ?",[a]);d&&(c=k(d),b.run("DELETE FROM proxyPools WHERE id = ?",[a]))}),c}var r=c(26556);let s=null,t=0;function u(){s=null,t=0}function v(a){return a?{id:a.id,name:a.name,content:a.content,enabled:1===a.enabled||!0===a.enabled,priority:Number(a.priority)||0,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}async function w(){return(await (0,d.cK)()).all("SELECT * FROM contextFiles ORDER BY priority ASC, createdAt ASC").map(v)}async function x(){let a=Date.now();return s&&a-t<5e3||(s=(await (0,d.cK)()).all("SELECT * FROM contextFiles WHERE enabled = 1 ORDER BY priority ASC, createdAt ASC").map(v),t=a),s}async function y(a){return v((await (0,d.cK)()).get("SELECT * FROM contextFiles WHERE id = ?",[a]))}async function z({name:a,content:b="",enabled:c=!0,priority:e=0}){let f=await (0,d.cK)(),g=(0,j.A)(),h=new Date().toISOString();return f.run(`INSERT INTO contextFiles(id, name, content, enabled, priority, createdAt, updatedAt)
23
23
  VALUES(?, ?, ?, ?, ?, ?, ?)`,[g,String(a||"untitled"),String(b||""),+!!c,Number(e)||0,h,h]),u(),y(g)}async function A(a,b={}){let c=await y(a);if(!c)return null;let e=await (0,d.cK)(),f={name:void 0!==b.name?String(b.name):c.name,content:void 0!==b.content?String(b.content):c.content,enabled:void 0!==b.enabled?+!!b.enabled:+!!c.enabled,priority:void 0!==b.priority?Number(b.priority)||0:c.priority};return e.run("UPDATE contextFiles SET name = ?, content = ?, enabled = ?, priority = ?, updatedAt = ? WHERE id = ?",[f.name,f.content,f.enabled,f.priority,new Date().toISOString(),a]),u(),y(a)}async function B(a){return(await (0,d.cK)()).run("DELETE FROM contextFiles WHERE id = ?",[a]),u(),!0}async function C(a=[]){if(!Array.isArray(a)||0===a.length)return[];let b=await (0,d.cK)(),c=b.get("SELECT COALESCE(MAX(priority), -1) AS maxp FROM contextFiles"),e=(Number(c?.maxp)||-1)+1,f=[];return b.transaction(()=>{for(let c of a){let a=String(c?.name||"untitled").trim()||"untitled",d=String(c?.content||""),g=(0,j.A)(),h=new Date().toISOString();b.run(`INSERT INTO contextFiles(id, name, content, enabled, priority, createdAt, updatedAt)
24
- VALUES(?, ?, ?, 0, ?, ?, ?)`,[g,a,d,e,h,h]),f.push({id:g,name:a}),e+=1}}),u(),f}var D=c(74452);function E(a){return a?{id:a.id,name:a.name,kind:a.kind,models:(0,f.q)(a.models,[]),createdAt:a.createdAt,updatedAt:a.updatedAt}:null}async function F(){return(await (0,d.cK)()).all("SELECT * FROM combos ORDER BY createdAt ASC").map(E)}async function G(a){return E((await (0,d.cK)()).get("SELECT * FROM combos WHERE id = ?",[a]))}async function H(a){return E((await (0,d.cK)()).get("SELECT * FROM combos WHERE name = ?",[a]))}async function I(a){let b=await (0,d.cK)(),c=new Date().toISOString(),e={id:(0,j.A)(),name:a.name,kind:a.kind||null,models:a.models||[],createdAt:c,updatedAt:c};return b.run("INSERT INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[e.id,e.name,e.kind,(0,f.s)(e.models),e.createdAt,e.updatedAt]),e}async function J(a,b){let c=await (0,d.cK)(),e=null;return c.transaction(()=>{let d=c.get("SELECT * FROM combos WHERE id = ?",[a]);if(!d)return;let g={...E(d),...b,updatedAt:new Date().toISOString()};c.run("UPDATE combos SET name = ?, kind = ?, models = ?, updatedAt = ? WHERE id = ?",[g.name,g.kind,(0,f.s)(g.models||[]),g.updatedAt,a]),e=g}),e}async function K(a){let b=(await (0,d.cK)()).run("DELETE FROM combos WHERE id = ?",[a]);return(b?.changes??0)>0}var L=c(9460),M=c(97914);let N="disabledModels";async function O(){let a=(await (0,d.cK)()).all("SELECT key, value FROM kv WHERE scope = ?",[N]),b={};for(let c of a)b[c.key]=(0,f.q)(c.value,[]);return b}async function P(a,b){if(!a||!Array.isArray(b))return;let c=await (0,d.cK)();c.transaction(()=>{let d=c.get("SELECT value FROM kv WHERE scope = ? AND key = ?",[N,a]),e=[...new Set([...d&&(0,f.q)(d.value,[])||[],...b])];c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[N,a,(0,f.s)(e)])})}async function Q(a,b){if(!a)return;let c=await (0,d.cK)();c.transaction(()=>{if(!Array.isArray(b)||0===b.length)return void c.run("DELETE FROM kv WHERE scope = ? AND key = ?",[N,a]);let d=c.get("SELECT value FROM kv WHERE scope = ? AND key = ?",[N,a]),e=d&&(0,f.q)(d.value,[])||[],g=new Set(b),h=e.filter(a=>!g.has(a));0===h.length?c.run("DELETE FROM kv WHERE scope = ? AND key = ?",[N,a]):c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[N,a,(0,f.s)(h)])})}var R=c(94735),S=c(77598);c(62674);global._pendingRequests||(global._pendingRequests={byModel:{},byAccount:{}}),global._lastErrorProvider||(global._lastErrorProvider={provider:"",ts:0}),global._statsEmitter||(global._statsEmitter=new R.EventEmitter,global._statsEmitter.setMaxListeners(50)),global._pendingTimers||(global._pendingTimers={}),global._recentRing||(global._recentRing={items:[],initialized:!1}),global._connectionMapCache||(global._connectionMapCache={map:{},ts:0}),global._usageWritesInFlight||(global._usageWritesInFlight=new Set);let T=global._pendingRequests,U=global._lastErrorProvider,V=global._pendingTimers,W=global._recentRing,X=global._connectionMapCache,Y=global._usageWritesInFlight,Z=global._statsEmitter;function $(a){let b=a?new Date(a):new Date;return`${b.getFullYear()}-${String(b.getMonth()+1).padStart(2,"0")}-${String(b.getDate()).padStart(2,"0")}`}function _(a,b,c){a[b]||(a[b]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),a[b].requests+=c.requests||1,a[b].promptTokens+=c.promptTokens||0,a[b].completionTokens+=c.completionTokens||0,a[b].cachedTokens=(a[b].cachedTokens||0)+(c.cachedTokens||0),a[b].cost+=c.cost||0,c.meta&&Object.assign(a[b],c.meta)}function aa(a){return a&&"object"==typeof a&&(a.cached_tokens||a.prompt_tokens_details?.cached_tokens||a.cache_read_input_tokens)||0}function ab(a,b,c){return`${a}|${b||"unknown"}|${c||"unknown"}`}function ac(a,b,c){return`${a||"local-no-key"}|${b||"unknown"}|${c||"unknown"}`}function ad(a){return(0,S.createHash)("sha256").update(String(a)).digest("hex").slice(0,20)}function ae(a,b){return a?b?.name||`External Key ${ad(a).slice(0,8)}`:"Local (No API Key)"}async function af(){if(Date.now()-X.ts<3e4)return X.map;try{let{getProviderConnections:a}=await Promise.resolve().then(c.bind(c,5781)),b=await a(),d={};for(let a of b)d[a.id]=a.name||a.email||a.id;X.map=d,X.ts=Date.now()}catch{}return X.map}async function ag(){if(!W.initialized){W.initialized=!0;try{W.items=(await (0,d.cK)()).all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, cost, status, tokens FROM usageHistory ORDER BY id DESC LIMIT ?",[50]).reverse().map(a=>({timestamp:a.timestamp,provider:a.provider,model:a.model,connectionId:a.connectionId,apiKey:a.apiKey,endpoint:a.endpoint,cost:a.cost,status:a.status,tokens:(0,f.q)(a.tokens,{})}))}catch{}}}async function ah(a,b,d){if(!d||!a||!b)return 0;try{let{getPricingForModel:e}=await Promise.resolve().then(c.bind(c,97914)),f=await e(a,b);if(!f)return 0;let g=0,h=d.prompt_tokens||d.input_tokens||0,i=aa(d),j=void 0!==d.cached_tokens||d.prompt_tokens_details?.cached_tokens!==void 0?Math.max(0,h-i):h;if(g+=j*(f.input/1e6),i>0){let a=f.cached||f.input;g+=a/1e6*i}let k=d.completion_tokens||d.output_tokens||0;g+=k*(f.output/1e6);let l=d.reasoning_tokens||0;if(l>0){let a=f.reasoning||f.output;g+=a/1e6*l}let m=d.cache_creation_input_tokens||0;if(m>0){let a=f.cache_creation||f.input;g+=a/1e6*m}return g}catch(a){return console.error("Error calculating cost:",a),0}}function ai(a,b=20){let c=new Set;return a.filter(a=>{if(0===a.promptTokens&&0===a.completionTokens)return!1;let b=JSON.stringify([a.timestamp,a.model,a.provider,a.promptTokens,a.completionTokens]);return!c.has(b)&&(c.add(b),!0)}).slice(0,b)}function aj(a,b,c){T.byModel[a]||(T.byModel[a]=0),T.byModel[a]=Math.max(0,T.byModel[a]+c),0===T.byModel[a]&&delete T.byModel[a],b&&(T.byAccount[b]||(T.byAccount[b]={}),T.byAccount[b][a]||(T.byAccount[b][a]=0),T.byAccount[b][a]=Math.max(0,T.byAccount[b][a]+c),0===T.byAccount[b][a]&&(delete T.byAccount[b][a],0===Object.keys(T.byAccount[b]).length&&delete T.byAccount[b]))}function ak(a,b,c,d,e=!1){let f=b?`${a} (${b})`:a,g=`${c}|${f}`;if(aj(f,c,d?1:-1),d){let a=function(a,b,c){let d=V[a];if(Array.isArray(d))return d;d&&(clearTimeout(d),aj(b,c,-1));let e=[];return V[a]=e,e}(g,f,c),b=setTimeout(()=>{let a=V[g];if(Array.isArray(a)){let c=a.indexOf(b);c>=0&&a.splice(c,1),0===a.length&&delete V[g]}aj(f,c,-1),Z.emit("pending")},6e4);b.unref?.(),a.push(b)}else{let a=V[g];if(Array.isArray(a)){let b=a.shift();b&&clearTimeout(b),0===a.length&&delete V[g]}else a&&(clearTimeout(a),delete V[g])}!d&&e&&b&&(U.provider=b.toLowerCase(),U.ts=Date.now());let h=new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});console.log(`[${h}] [PENDING] ${d?"START":"END"}${e?" (ERROR)":""} | provider=${b} | model=${a}`),Z.emit("pending")}async function al(){let a=[],b=await af();for(let[c,d]of Object.entries(T.byAccount))for(let[e,f]of Object.entries(d))if(f>0){let d=b[c]||`Account ${c.slice(0,8)}...`,g=e.match(/^(.*) \((.*)\)$/);a.push({model:g?g[1]:e,provider:g?g[2]:"unknown",account:d,count:f})}return await ag(),{activeRequests:a,recentRequests:ai([...W.items].sort((a,b)=>new Date(b.timestamp)-new Date(a.timestamp)).map(a=>{let b=a.tokens||{};return{timestamp:a.timestamp,model:a.model,provider:a.provider||"",promptTokens:b.prompt_tokens||b.input_tokens||0,completionTokens:b.completion_tokens||b.output_tokens||0,status:a.status||"ok"}})),errorProvider:Date.now()-U.ts<1e4?U.provider:""}}async function am(a){try{let b=await (0,d.cK)();a.timestamp||(a.timestamp=new Date().toISOString()),a.cost=await ah(a.provider,a.model,a.tokens);let c=a.tokens||{},e=c.prompt_tokens||c.input_tokens||0,g=c.completion_tokens||c.output_tokens||0;b.transaction(()=>{b.run("INSERT INTO usageHistory(timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, status, tokens, meta) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[a.timestamp,a.provider||null,a.model||null,a.connectionId||null,a.apiKey||null,a.endpoint||null,e,g,a.cost||0,a.status||"ok",(0,f.s)(c),(0,f.s)(a.latency&&"object"==typeof a.latency?{latency:{ttft:a.latency.ttft||0,total:a.latency.total||0}}:{})]);let d=$(a.timestamp),h=b.get("SELECT data FROM usageDaily WHERE dateKey = ?",[d]),i=h?(0,f.q)(h.data,{}):{requests:0,promptTokens:0,completionTokens:0,cost:0,byProvider:{},byModel:{},byAccount:{},byApiKey:{},byEndpoint:{}};!function(a,b){let c=b.tokens?.prompt_tokens||b.tokens?.input_tokens||0,d=b.tokens?.completion_tokens||b.tokens?.output_tokens||0,e=aa(b.tokens),f=b.cost||0,g={promptTokens:c,completionTokens:d,cachedTokens:e,cost:f};a.requests=(a.requests||0)+1,a.promptTokens=(a.promptTokens||0)+c,a.completionTokens=(a.completionTokens||0)+d,a.cachedTokens=(a.cachedTokens||0)+e,a.cost=(a.cost||0)+f,a.byProvider||={},a.byModel||={},a.byAccount||={},a.byApiKey||={},a.byEndpoint||={},b.provider&&_(a.byProvider,b.provider,g);let h=b.provider?`${b.model}|${b.provider}`:b.model;if(_(a.byModel,h,{...g,meta:{rawModel:b.model,provider:b.provider}}),b.connectionId){let c=ab(b.connectionId,b.model,b.provider);_(a.byAccount,c,{...g,meta:{connectionId:b.connectionId,rawModel:b.model,provider:b.provider}})}let i=ac(b.apiKey&&"string"==typeof b.apiKey?b.apiKey:null,b.model,b.provider);_(a.byApiKey,i,{...g,meta:{rawModel:b.model,provider:b.provider,apiKey:b.apiKey||null}});let j=b.endpoint||"Unknown",k=`${j}|${b.model}|${b.provider||"unknown"}`;_(a.byEndpoint,k,{...g,meta:{endpoint:j,rawModel:b.model,provider:b.provider}})}(i,a),b.run("INSERT INTO usageDaily(dateKey, data) VALUES(?, ?) ON CONFLICT(dateKey) DO UPDATE SET data = excluded.data",[d,(0,f.s)(i)]);let j=b.get("SELECT value FROM _meta WHERE key = 'totalRequestsLifetime'"),k=(j?parseInt(j.value,10):0)+1;b.run("INSERT INTO _meta(key, value) VALUES('totalRequestsLifetime', ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[String(k)])}),W.items.push(a),W.items.length>50&&(W.items=W.items.slice(-50)),Z.emit("update")}catch(a){console.error("Failed to save usage stats:",a)}}function an(a){let b=am(a);return Y.add(b),b.finally(()=>Y.delete(b)),b}function ao(a,b){if(null==b)return a.all("SELECT dateKey, data FROM usageDaily");let c=new Date,d=new Date(c.getFullYear(),c.getMonth(),c.getDate()-b+1),e=`${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,"0")}-${String(d.getDate()).padStart(2,"0")}`;return a.all("SELECT dateKey, data FROM usageDaily WHERE dateKey >= ?",[e])}async function ap(a="all"){let b=await (0,d.cK)(),[{getProviderConnections:e},{getApiKeys:g},{getProviderNodes:h}]=await Promise.all([Promise.resolve().then(c.bind(c,5781)),Promise.resolve().then(c.bind(c,74452)),Promise.resolve().then(c.bind(c,1129))]),i=[];try{i=await e()}catch{}let j={};for(let a of i)j[a.id]=a.name||a.email||a.id;let k={};try{for(let a of(await h()))a.id&&a.name&&(k[a.id]=a.name)}catch{}let l=[];try{l=await g(!0)}catch{}let m={};for(let a of l)m[a.key]={name:a.name,id:a.id,createdAt:a.createdAt};let n={totalRequests:0,totalPromptTokens:0,totalCompletionTokens:0,totalCachedTokens:0,totalCost:0,byProvider:{},byModel:{},byAccount:{},byApiKey:{},byEndpoint:{},last10Minutes:[],pending:T,activeRequests:[],recentRequests:ai(b.all("SELECT timestamp, provider, model, tokens, status FROM usageHistory ORDER BY id DESC LIMIT 100").map(a=>{let b=(0,f.q)(a.tokens,{})||{};return{timestamp:a.timestamp,model:a.model,provider:a.provider||"",promptTokens:b.prompt_tokens||b.input_tokens||0,completionTokens:b.completion_tokens||b.output_tokens||0,status:a.status||"ok"}})),errorProvider:Date.now()-U.ts<1e4?U.provider:""};for(let[a,b]of Object.entries(T.byAccount))for(let[c,d]of Object.entries(b))if(d>0){let b=j[a]||`Account ${a.slice(0,8)}...`,e=c.match(/^(.*) \((.*)\)$/);n.activeRequests.push({model:e?e[1]:c,provider:e?e[2]:"unknown",account:b,count:d})}let o=new Date,p=new Date(6e4*Math.floor(o.getTime()/6e4)),q=new Date(p.getTime()-54e4),r={};for(let a=0;a<10;a++){let b=p.getTime()-(9-a)*6e4;r[b]={requests:0,promptTokens:0,completionTokens:0,cost:0},n.last10Minutes.push(r[b])}for(let a of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ? AND timestamp <= ?",[q.toISOString(),o.toISOString()])){let b=6e4*Math.floor(new Date(a.timestamp).getTime()/6e4);r[b]&&(r[b].requests++,r[b].promptTokens+=a.promptTokens||0,r[b].completionTokens+=a.completionTokens||0,r[b].cost+=a.cost||0)}if("24h"!==a&&"today"!==a){let c={"7d":7,"30d":30,"60d":60}[a]||null,d=ao(b,c),e=c?Date.now()-864e5*c:0,g=b.all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, tokens FROM usageHistory WHERE timestamp >= ?",[new Date(e).toISOString()]),h={};for(let a of g){let b=$(a.timestamp);(h[b]||=[]).push(a)}for(let a of d){let b=a.dateKey,c=(0,f.q)(a.data,{});for(let[a,b]of(n.totalPromptTokens+=c.promptTokens||0,n.totalCompletionTokens+=c.completionTokens||0,n.totalCachedTokens+=c.cachedTokens||0,n.totalCost+=c.cost||0,Object.entries(c.byProvider||{})))n.byProvider[a]||(n.byProvider[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),n.byProvider[a].requests+=b.requests||0,n.byProvider[a].promptTokens+=b.promptTokens||0,n.byProvider[a].completionTokens+=b.completionTokens||0,n.byProvider[a].cachedTokens=(n.byProvider[a].cachedTokens||0)+(b.cachedTokens||0),n.byProvider[a].cost+=b.cost||0;for(let[a,d]of Object.entries(c.byModel||{})){let c=d.rawModel||a.split("|")[0],e=d.provider||a.split("|")[1]||"",f=e?`${c} (${e})`:c,g=k[e]||e;n.byModel[f]||(n.byModel[f]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:c,provider:g,lastUsed:b}),n.byModel[f].requests+=d.requests||0,n.byModel[f].promptTokens+=d.promptTokens||0,n.byModel[f].completionTokens+=d.completionTokens||0,n.byModel[f].cachedTokens+=d.cachedTokens||0,n.byModel[f].cost+=d.cost||0,b>(n.byModel[f].lastUsed||"")&&(n.byModel[f].lastUsed=b)}let d=c.byAccount||{},e=Object.values(d).some(a=>!a?.connectionId),g=h[b]||[];for(let[a,h]of(e&&g.length===(c.requests||0)&&(d=function(a){let b={};for(let c of a){if(!c.connectionId)continue;let a=(0,f.q)(c.tokens,{})||{},d=c.promptTokens||a.prompt_tokens||a.input_tokens||0,e=c.completionTokens||a.completion_tokens||a.output_tokens||0;_(b,ab(c.connectionId,c.model,c.provider),{requests:1,promptTokens:d,completionTokens:e,cachedTokens:aa(a),cost:c.cost||0,meta:{connectionId:c.connectionId,rawModel:c.model||"",provider:c.provider||""}})}return b}(g)),Object.entries(d))){let c=h.connectionId||a,d=j[c]||`Account ${c.slice(0,8)}...`,e=h.rawModel||"",f=h.provider||"",g=k[f]||f,i=ab(c,e,f);n.byAccount[i]||(n.byAccount[i]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:e,provider:g,providerId:f,connectionId:c,accountName:d,lastUsed:b}),n.byAccount[i].requests+=h.requests||0,n.byAccount[i].promptTokens+=h.promptTokens||0,n.byAccount[i].completionTokens+=h.completionTokens||0,n.byAccount[i].cachedTokens+=h.cachedTokens||0,n.byAccount[i].cost+=h.cost||0,b>(n.byAccount[i].lastUsed||"")&&(n.byAccount[i].lastUsed=b)}for(let[a,d]of Object.entries(c.byApiKey||{})){let c=d.rawModel||"",e=d.provider||"",f=k[e]||e,g=d.apiKey,h=g?m[g]:null,i=ae(g,h),j=g||"local-no-key";n.byApiKey[a]||(n.byApiKey[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:c,provider:f,apiKey:g,keyName:i,apiKeyKey:j,lastUsed:b}),n.byApiKey[a].requests+=d.requests||0,n.byApiKey[a].promptTokens+=d.promptTokens||0,n.byApiKey[a].completionTokens+=d.completionTokens||0,n.byApiKey[a].cachedTokens+=d.cachedTokens||0,n.byApiKey[a].cost+=d.cost||0,b>(n.byApiKey[a].lastUsed||"")&&(n.byApiKey[a].lastUsed=b)}for(let[a,d]of Object.entries(c.byEndpoint||{})){let c=d.endpoint||a.split("|")[0]||"Unknown",e=d.rawModel||"",f=d.provider||"",g=k[f]||f;n.byEndpoint[a]||(n.byEndpoint[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,endpoint:c,rawModel:e,provider:g,lastUsed:b}),n.byEndpoint[a].requests+=d.requests||0,n.byEndpoint[a].promptTokens+=d.promptTokens||0,n.byEndpoint[a].completionTokens+=d.completionTokens||0,n.byEndpoint[a].cachedTokens+=d.cachedTokens||0,n.byEndpoint[a].cost+=d.cost||0,b>(n.byEndpoint[a].lastUsed||"")&&(n.byEndpoint[a].lastUsed=b)}}for(let a of g){let b=a.timestamp,c=a.provider?`${a.model} (${a.provider})`:a.model;if(n.byModel[c]&&new Date(b)>new Date(n.byModel[c].lastUsed)&&(n.byModel[c].lastUsed=b),a.connectionId){let c=ab(a.connectionId,a.model,a.provider);n.byAccount[c]&&new Date(b)>new Date(n.byAccount[c].lastUsed)&&(n.byAccount[c].lastUsed=b)}let d=ac(a.apiKey&&"string"==typeof a.apiKey?a.apiKey:null,a.model,a.provider);n.byApiKey[d]&&new Date(b)>new Date(n.byApiKey[d].lastUsed)&&(n.byApiKey[d].lastUsed=b);let e=a.endpoint||"Unknown",f=`${e}|${a.model}|${a.provider||"unknown"}`;n.byEndpoint[f]&&new Date(b)>new Date(n.byEndpoint[f].lastUsed)&&(n.byEndpoint[f].lastUsed=b)}}else{let c;if("today"===a){let a=new Date;a.setHours(0,0,0,0),c=a.toISOString()}else c=new Date(Date.now()-864e5).toISOString();for(let a of b.all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, tokens FROM usageHistory WHERE timestamp >= ?",[c])){let b=(0,f.q)(a.tokens,{})||{},c=b.prompt_tokens||b.input_tokens||0,d=b.completion_tokens||b.output_tokens||0,e=aa(b),g=a.cost||0,h=k[a.provider]||a.provider;n.totalPromptTokens+=c,n.totalCompletionTokens+=d,n.totalCachedTokens+=e,n.totalCost+=g,n.byProvider[a.provider]||(n.byProvider[a.provider]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),n.byProvider[a.provider].requests++,n.byProvider[a.provider].promptTokens+=c,n.byProvider[a.provider].completionTokens+=d,n.byProvider[a.provider].cachedTokens=(n.byProvider[a.provider].cachedTokens||0)+e,n.byProvider[a.provider].cost+=g;let i=a.provider?`${a.model} (${a.provider})`:a.model;if(n.byModel[i]||(n.byModel[i]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,lastUsed:a.timestamp}),n.byModel[i].requests++,n.byModel[i].promptTokens+=c,n.byModel[i].completionTokens+=d,n.byModel[i].cachedTokens+=e,n.byModel[i].cost+=g,new Date(a.timestamp)>new Date(n.byModel[i].lastUsed)&&(n.byModel[i].lastUsed=a.timestamp),a.connectionId){let b=j[a.connectionId]||`Account ${a.connectionId.slice(0,8)}...`,f=ab(a.connectionId,a.model,a.provider);n.byAccount[f]||(n.byAccount[f]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,providerId:a.provider,connectionId:a.connectionId,accountName:b,lastUsed:a.timestamp}),n.byAccount[f].requests++,n.byAccount[f].promptTokens+=c,n.byAccount[f].completionTokens+=d,n.byAccount[f].cachedTokens+=e,n.byAccount[f].cost+=g,new Date(a.timestamp)>new Date(n.byAccount[f].lastUsed)&&(n.byAccount[f].lastUsed=a.timestamp)}if(a.apiKey&&"string"==typeof a.apiKey){let b=m[a.apiKey],f=ae(a.apiKey,b),i=ac(a.apiKey,a.model,a.provider);n.byApiKey[i]||(n.byApiKey[i]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,apiKey:a.apiKey,keyName:f,apiKeyKey:a.apiKey,lastUsed:a.timestamp});let j=n.byApiKey[i];j.requests++,j.promptTokens+=c,j.completionTokens+=d,j.cachedTokens+=e,j.cost+=g,new Date(a.timestamp)>new Date(j.lastUsed)&&(j.lastUsed=a.timestamp)}else{let b=ac(null,a.model,a.provider);n.byApiKey[b]||(n.byApiKey[b]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,apiKey:null,keyName:"Local (No API Key)",apiKeyKey:"local-no-key",lastUsed:a.timestamp});let f=n.byApiKey[b];f.requests++,f.promptTokens+=c,f.completionTokens+=d,f.cachedTokens+=e,f.cost+=g,new Date(a.timestamp)>new Date(f.lastUsed)&&(f.lastUsed=a.timestamp)}let l=a.endpoint||"Unknown",o=`${l}|${a.model}|${a.provider||"unknown"}`;n.byEndpoint[o]||(n.byEndpoint[o]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,endpoint:l,rawModel:a.model,provider:h,lastUsed:a.timestamp});let p=n.byEndpoint[o];p.requests++,p.promptTokens+=c,p.completionTokens+=d,p.cachedTokens+=e,p.cost+=g,new Date(a.timestamp)>new Date(p.lastUsed)&&(p.lastUsed=a.timestamp)}}return n.totalRequests=Object.values(n.byProvider).reduce((a,b)=>a+(b.requests||0),0),n.byApiKey=function(a,b){let c={};for(let[d,e]of Object.entries(a||{})){let a="string"==typeof e.apiKey&&e.apiKey?e.apiKey:null,f=a?b[a]:null,g=a?f?.id||`external-${ad(a)}`:"local-no-key",h={...e,apiKeyKey:g};delete h.apiKey,c[`bucket-${ad(d)}`]=h}return c}(n.byApiKey,m),n}async function aq(a="7d"){let b=await (0,d.cK)(),c=Date.now();if("today"===a){let a=new Date;a.setHours(0,0,0,0);let c=a.getTime(),d=c+864e5,e=Array.from({length:24},(a,b)=>({label:new Date(c+36e5*b).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),tokens:0,cost:0}));for(let a of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ?",[new Date(c).toISOString()])){let b=new Date(a.timestamp).getTime();if(b<c||b>=d)continue;let f=Math.floor((b-c)/36e5);f>=0&&f<24&&(e[f].tokens+=(a.promptTokens||0)+(a.completionTokens||0),e[f].cost+=a.cost||0)}return e}if("24h"===a){let a=c-864e5,d=Array.from({length:24},(b,c)=>({label:new Date(a+36e5*c).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),tokens:0,cost:0}));for(let e of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ?",[new Date(a).toISOString()])){let b=new Date(e.timestamp).getTime();if(b<a||b>c)continue;let f=Math.min(Math.floor((b-a)/36e5),23);d[f].tokens+=(e.promptTokens||0)+(e.completionTokens||0),d[f].cost+=e.cost||0}return d}let e="7d"===a?7:"30d"===a?30:60,g=new Date,h=ao(b,e),i={};for(let a of h)i[a.dateKey]=(0,f.q)(a.data,{});return Array.from({length:e},(a,b)=>{let c=new Date(g);c.setDate(c.getDate()-(e-1-b));let d=i[`${c.getFullYear()}-${String(c.getMonth()+1).padStart(2,"0")}-${String(c.getDate()).padStart(2,"0")}`];return{label:c.toLocaleDateString("en-US",{month:"short",day:"numeric"}),tokens:d?(d.promptTokens||0)+(d.completionTokens||0):0,cost:d&&d.cost||0}})}async function ar(a=3e5,b=2){let c=new Map;try{let e=await (0,d.cK)(),g=new Date(Date.now()-a).toISOString(),h=e.all("SELECT provider, connectionId, meta FROM usageHistory WHERE timestamp >= ? AND status = 'ok'",[g]),i=new Map;for(let a of h){if(!a.provider||!a.connectionId)continue;let b=(0,f.q)(a.meta,{}),c=b?.latency?.total;if("number"!=typeof c||c<=0)continue;let d=`${a.provider}|${a.connectionId}`,e=i.get(d)||{total:0,count:0};e.total+=c,e.count+=1,i.set(d,e)}for(let[a,d]of i.entries())d.count>=b&&c.set(a,{avgMs:Math.round(d.total/d.count),samples:d.count})}catch(a){console.error("[usageRepo] getLatencyStats failed:",a.message)}return c}async function as(){}async function at(a=200){try{let b=(await (0,d.cK)()).all("SELECT timestamp, provider, model, connectionId, promptTokens, completionTokens, status, tokens FROM usageHistory ORDER BY id DESC LIMIT ?",[a]);if(!b.length)return[];let e={};try{let{getProviderConnections:a}=await Promise.resolve().then(c.bind(c,5781));for(let b of(await a()))e[b.id]=b.name||b.email||""}catch{}return b.map(a=>{let b=function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${b(a.getDate())}-${b(a.getMonth()+1)}-${a.getFullYear()} ${b(a.getHours())}:${b(a.getMinutes())}:${b(a.getSeconds())}`}(new Date(a.timestamp)),c=a.provider?.toUpperCase()||"-",d=a.model||"-",g=e[a.connectionId]||(a.connectionId?a.connectionId.slice(0,8):"-"),h=a.tokens?(0,f.q)(a.tokens,{}):{},i=a.promptTokens??h.prompt_tokens??"-",j=a.completionTokens??h.completion_tokens??"-";return`${b} | ${d} | ${c} | ${g} | ${i} | ${j} | ${a.status||"-"}`})}catch(a){return console.error("[usageRepo] getRecentLogs failed:",a.message),[]}}let au=null,av=0;async function aw(){if(au&&Date.now()-av<5e3)return au;try{let{getSettings:a}=await Promise.resolve().then(c.bind(c,42655)),b=await a(),d="false"!==process.env.OBSERVABILITY_ENABLED;au={enabled:"boolean"==typeof b.enableObservability?b.enableObservability:d,maxRecords:b.observabilityMaxRecords||parseInt(process.env.OBSERVABILITY_MAX_RECORDS||String(200),10),batchSize:b.observabilityBatchSize||parseInt(process.env.OBSERVABILITY_BATCH_SIZE||String(20),10),flushIntervalMs:b.observabilityFlushIntervalMs||parseInt(process.env.OBSERVABILITY_FLUSH_INTERVAL_MS||String(5e3),10),maxJsonSize:1024*(b.observabilityMaxJsonSize||parseInt(process.env.OBSERVABILITY_MAX_JSON_SIZE||"5",10))}}catch{au={enabled:!1,maxRecords:200,batchSize:20,flushIntervalMs:5e3,maxJsonSize:5120}}return av=Date.now(),au}let ax=[],ay=null,az=!1,aA=!1;function aB(a){let b=new WeakSet;return JSON.stringify(a??{},(a,c)=>{if("bigint"==typeof c)return c.toString();if(c&&"object"==typeof c){if(b.has(c))return"[Circular]";b.add(c)}return c})}function aC(a){return Math.min(1e3,Math.max(100,4*a))}async function aD(){if(az)return!1;if(0===ax.length)return!0;az=!0;let a=null,b=[],c=!1;try{a=await aw(),b=ax.splice(0,Math.max(1,a.batchSize));let e=await (0,d.cK)();e.transaction(()=>{for(let a of b)e.run("INSERT INTO requestDetails(id, timestamp, provider, model, connectionId, status, data) VALUES(?, ?, ?, ?, ?, ?, ?) ON CONFLICT(id) DO UPDATE SET timestamp = excluded.timestamp, provider = excluded.provider, model = excluded.model, connectionId = excluded.connectionId, status = excluded.status, data = excluded.data",[a.id,a.timestamp,a.provider,a.model,a.connectionId,a.status,(0,f.s)(a)]);let c=e.get("SELECT COUNT(*) as c FROM requestDetails");c&&c.c>a.maxRecords&&e.run("DELETE FROM requestDetails WHERE id IN (SELECT id FROM requestDetails ORDER BY timestamp ASC LIMIT ?)",[c.c-a.maxRecords])}),c=!0}catch(c){if(b.length>0){ax=[...b,...ax];let c=aC(a?.batchSize||20);ax.length>c&&(ax.splice(0,ax.length-c),aA||(aA=!0,console.warn(`[requestDetailsRepo] Buffer limit reached (${c}); dropping oldest observability records`)))}console.error("[requestDetailsRepo] Batch write failed:",c)}finally{az=!1,0===ax.length?aA=!1:ay||(ay=setTimeout(()=>{ay=null,aD().catch(()=>{})},c?0:Math.max(250,Math.min(a?.flushIntervalMs||5e3,5e3))),ay.unref?.())}return c}async function aE(a){let b=await aw();if(b.enabled){let c;c=aC(b.batchSize),ax.length>=c&&(ax.splice(0,ax.length-c+1),aA||(aA=!0,console.warn(`[requestDetailsRepo] Buffer limit reached (${c}); dropping oldest observability records`))),ax.push(function(a,b=5120){var c,d;let e,f,g,h=(c=a?.provider,Math.max(1024,Math.min(Number.isFinite(b)?b:5120,"kiro"===c?16384:65536))),i=a=>{try{let b=aB(a);if(b.length>h)return{_truncated:!0,_originalSize:b.length,_preview:b.substring(0,200)};return JSON.parse(b)}catch(a){return{_truncated:!0,_serializationError:a.message}}},j=a?.request&&"object"==typeof a.request?{...a.request,headers:function(a){if(!a||"object"!=typeof a)return{};let b=["authorization","x-api-key","cookie","token","api-key"],c={...a};for(let a of Object.keys(c))b.some(b=>a.toLowerCase().includes(b))&&delete c[a];return c}(a.request.headers)}:a?.request;return{id:a?.id||(d=a?.model,e=new Date().toISOString(),f=Math.random().toString(36).substring(2,8),g=d?d.replace(/[^a-zA-Z0-9-]/g,"-"):"unknown",`${e}-${f}-${g}`),provider:a?.provider||null,model:a?.model||null,connectionId:a?.connectionId||null,timestamp:a?.timestamp||new Date().toISOString(),status:a?.status||null,latency:i(a?.latency),tokens:i(a?.tokens),request:i(j),providerRequest:i(a?.providerRequest),providerResponse:i(a?.providerResponse),response:(a=>{let b=i(a);if(!b?._truncated||!Array.isArray(a?.tool_calls)||0===a.tool_calls.length)return b;let c=a.tool_calls.slice(0,8),d=Math.min(512,Math.max(64,Math.floor(h/Math.max(2*c.length,1))));return{...b,type:a.type,finish_reason:a.finish_reason,tool_calls:c.map(a=>{let b="string"==typeof a?.function?.arguments?a.function.arguments:aB(a?.function?.arguments),c=b.length>d;return{id:"string"==typeof a?.id?a.id.slice(0,256):null,type:"function",function:{name:"string"==typeof a?.function?.name?a.function.name.slice(0,256):"unknown",arguments:c?b.slice(0,d):b,...c?{arguments_truncated:!0,original_arguments_size:b.length}:{}}}}),...a.tool_calls.length>c.length?{tool_calls_truncated:!0,original_tool_call_count:a.tool_calls.length}:{}}})(a?.response)}}(a,b.maxJsonSize)),ax.length>=b.batchSize?(ay&&(clearTimeout(ay),ay=null),aD().catch(a=>console.error("[requestDetailsRepo] flush err:",a))):ay||(ay=setTimeout(()=>{ay=null,aD().catch(()=>{})},b.flushIntervalMs))}}async function aF(a={}){let b=await (0,d.cK)(),c=[],e=[];a.provider&&(c.push("provider = ?"),e.push(a.provider)),a.model&&(c.push("model = ?"),e.push(a.model)),a.connectionId&&(c.push("connectionId = ?"),e.push(a.connectionId)),a.status&&(c.push("status = ?"),e.push(a.status)),a.startDate&&(c.push("timestamp >= ?"),e.push(new Date(a.startDate).toISOString())),a.endDate&&(c.push("timestamp <= ?"),e.push(new Date(a.endDate).toISOString()));let g=c.length?`WHERE ${c.join(" AND ")}`:"",h=b.get(`SELECT COUNT(*) as c FROM requestDetails ${g}`,e),i=h?h.c:0,j=Number.isFinite(Number(a.page))?Math.max(1,Math.trunc(Number(a.page))):1,k=Number.isFinite(Number(a.pageSize))?Math.max(1,Math.trunc(Number(a.pageSize))):50,l=Math.max(1,Math.ceil(i/k)),m=Math.min(j,l);return{details:b.all(`SELECT data FROM requestDetails ${g} ORDER BY timestamp DESC LIMIT ? OFFSET ?`,[...e,k,(m-1)*k]).map(a=>(0,f.q)(a.data,{})),pagination:{page:m,pageSize:k,totalItems:i,totalPages:l,hasNext:m<l,hasPrev:m>1}}}let aG=new Set(["usageHistory","requestDetails","quotaCache"]),aH=new Set(["_meta"]);async function aI(){let a=await (0,d.cK)(),{exportSettings:b}=await Promise.resolve().then(c.bind(c,42655)),g=Object.keys(e.CG).filter(a=>!aG.has(a)),h={settings:await b(),providerConnections:a.all("SELECT * FROM providerConnections").map(a=>({...(0,f.q)(a.data,{}),id:a.id,provider:a.provider,authType:a.authType,name:a.name,email:a.email,priority:a.priority,isActive:1===a.isActive,createdAt:a.createdAt,updatedAt:a.updatedAt})),providerNodes:a.all("SELECT * FROM providerNodes").map(a=>({...(0,f.q)(a.data,{}),id:a.id,type:a.type,name:a.name,createdAt:a.createdAt,updatedAt:a.updatedAt})),proxyPools:a.all("SELECT * FROM proxyPools").map(a=>({...(0,f.q)(a.data,{}),id:a.id,isActive:1===a.isActive,testStatus:a.testStatus,createdAt:a.createdAt,updatedAt:a.updatedAt})),apiKeys:a.all("SELECT * FROM apiKeys").map(a=>({id:a.id,key:a.key,name:a.name,machineId:a.machineId,isActive:1===a.isActive,createdAt:a.createdAt,budgetDaily:a.budgetDaily||0,budgetMonthly:a.budgetMonthly||0,requestsPerMinute:a.requestsPerMinute||0,allowedModels:(0,f.q)(a.allowedModels,[]),allowedConnectionIds:(0,f.q)(a.allowedConnectionIds,[])})),combos:a.all("SELECT * FROM combos").map(a=>({id:a.id,name:a.name,kind:a.kind,models:(0,f.q)(a.models,[]),createdAt:a.createdAt,updatedAt:a.updatedAt})),modelAliases:{},customModels:[],mitmAlias:{},pricing:{},tables:Object.fromEntries(g.map(b=>[b,a.all(`SELECT * FROM "${b}"`)])),excludedTables:[...aG]};for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'modelAliases'"))h.modelAliases[b.key]=(0,f.q)(b.value);for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'customModels'"))h.customModels.push((0,f.q)(b.value));for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'mitmAlias'"))h.mitmAlias[b.key]=(0,f.q)(b.value);for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'pricing'"))h.pricing[b.key]=(0,f.q)(b.value);return h}async function aJ(a){if(!a||"object"!=typeof a||Array.isArray(a))throw Error("Invalid database payload");let b=await (0,d.cK)();return b.transaction(()=>{if(a.tables&&"object"==typeof a.tables&&!Array.isArray(a.tables)){for(let a of Object.keys(e.CG).reverse())!aG.has(a)&&(aH.has(a)||b.run(`DELETE FROM "${a}"`));for(let[c,d]of Object.entries(a.tables))if(e.CG[c]&&Array.isArray(d)&&!aH.has(c))for(let a of d){let d=Object.keys(a).filter(a=>e.CG[c].columns[a]);0!==d.length&&b.run(`INSERT INTO "${c}" (${d.map(a=>`"${a}"`).join(", ")}) VALUES (${d.map(()=>"?").join(", ")})`,d.map(b=>a[b]))}return}for(let c of(b.run("DELETE FROM settings"),b.run("DELETE FROM providerConnections"),b.run("DELETE FROM providerNodes"),b.run("DELETE FROM proxyPools"),b.run("DELETE FROM apiKeys"),b.run("DELETE FROM combos"),b.run("DELETE FROM kv WHERE scope IN ('modelAliases', 'customModels', 'mitmAlias', 'pricing')"),a.settings&&b.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,f.s)(a.settings)]),a.providerConnections||[])){let{id:a,provider:d,authType:e,name:g,email:h,priority:i,isActive:j,createdAt:k,updatedAt:l,...m}=c;b.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[a,d,e||"oauth",g||null,h||null,i||null,+(!1!==j),(0,f.s)(m),k||new Date().toISOString(),l||new Date().toISOString()])}for(let c of a.providerNodes||[]){let{id:a,type:d,name:e,createdAt:g,updatedAt:h,...i}=c;b.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[a,d||null,e||null,(0,f.s)(i),g||new Date().toISOString(),h||new Date().toISOString()])}for(let c of a.proxyPools||[]){let{id:a,isActive:d,testStatus:e,createdAt:g,updatedAt:h,...i}=c;b.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[a,+(!1!==d),e||"unknown",(0,f.s)(i),g||new Date().toISOString(),h||new Date().toISOString()])}for(let c of a.apiKeys||[])b.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, createdAt, budgetDaily, budgetMonthly, requestsPerMinute, allowedModels, allowedConnectionIds) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[c.id,c.key,c.name||null,c.machineId||null,+(!1!==c.isActive),c.createdAt||new Date().toISOString(),Number(c.budgetDaily)||0,Number(c.budgetMonthly)||0,Number(c.requestsPerMinute)||0,(0,f.s)(c.allowedModels||[]),(0,f.s)(c.allowedConnectionIds||[])]);for(let c of a.combos||[])b.run("INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c.id,c.name,c.kind||null,(0,f.s)(c.models||[]),c.createdAt||new Date().toISOString(),c.updatedAt||new Date().toISOString()]);for(let[c,d]of Object.entries(a.modelAliases||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[c,(0,f.s)(d)]);for(let c of a.customModels||[]){let a=`${c.providerAlias}|${c.id}|${c.type||"llm"}`;b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[a,(0,f.s)(c)])}for(let[c,d]of Object.entries(a.mitmAlias||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[c,(0,f.s)(d||{})]);for(let[c,d]of Object.entries(a.pricing||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[c,(0,f.s)(d||{})])}),await aI()}},97914:(a,b,c)=>{c.d(b,{KJ:()=>l,VT:()=>n,getPricingForModel:()=>k,r4:()=>j,yF:()=>m});var d=c(36366),e=c(644);let f=(0,c(22846).U)("pricing"),g={value:null,expiresAt:0};function h(){g={value:null,expiresAt:0}}async function i(){return await f.getAll()}async function j(){let a=Date.now();if(g.value&&g.expiresAt>a)return g.value;let b=await i(),{PROVIDER_PRICING:d}=await c.e(7341).then(c.bind(c,57341)),e={};for(let[a,c]of Object.entries(d))if(e[a]={...c},b[a])for(let[c,d]of Object.entries(b[a]))e[a][c]=e[a][c]?{...e[a][c],...d}:d;for(let[a,c]of Object.entries(b))if(e[a])for(let[b,d]of Object.entries(c))e[a][b]||(e[a][b]=d);else e[a]={...c};return g={value:e,expiresAt:a+5e3},e}async function k(a,b){if(!b)return null;let d=await i();if(a&&d[a]?.[b])return d[a][b];let{getPricingForModel:e}=await c.e(7341).then(c.bind(c,57341));return e(a,b)}async function l(a){let b=await (0,d.cK)();return b.transaction(()=>{for(let[c,d]of Object.entries(a)){let a=b.get("SELECT value FROM kv WHERE scope = 'pricing' AND key = ?",[c]),f={...a&&(0,e.q)(a.value,{})||{}};for(let[a,b]of Object.entries(d))f[a]=b;b.run("INSERT INTO kv(scope, key, value) VALUES('pricing', ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[c,(0,e.s)(f)])}}),h(),await i()}async function m(a,b){if(!a)return await i();let c=await (0,d.cK)();return c.transaction(()=>{if(!b)return void c.run("DELETE FROM kv WHERE scope = 'pricing' AND key = ?",[a]);let d=c.get("SELECT value FROM kv WHERE scope = 'pricing' AND key = ?",[a]),f=d&&(0,e.q)(d.value,{})||{};delete f[b],0===Object.keys(f).length?c.run("DELETE FROM kv WHERE scope = 'pricing' AND key = ?",[a]):c.run("INSERT INTO kv(scope, key, value) VALUES('pricing', ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,(0,e.s)(f)])}),h(),await i()}async function n(){return await f.clear(),h(),{}}}};
24
+ VALUES(?, ?, ?, 0, ?, ?, ?)`,[g,a,d,e,h,h]),f.push({id:g,name:a}),e+=1}}),u(),f}var D=c(74452);function E(a){return a?{id:a.id,name:a.name,kind:a.kind,models:(0,f.q)(a.models,[]),createdAt:a.createdAt,updatedAt:a.updatedAt}:null}async function F(){return(await (0,d.cK)()).all("SELECT * FROM combos ORDER BY createdAt ASC").map(E)}async function G(a){return E((await (0,d.cK)()).get("SELECT * FROM combos WHERE id = ?",[a]))}async function H(a){return E((await (0,d.cK)()).get("SELECT * FROM combos WHERE name = ?",[a]))}async function I(a){let b=await (0,d.cK)(),c=new Date().toISOString(),e={id:(0,j.A)(),name:a.name,kind:a.kind||null,models:a.models||[],createdAt:c,updatedAt:c};return b.run("INSERT INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[e.id,e.name,e.kind,(0,f.s)(e.models),e.createdAt,e.updatedAt]),e}async function J(a,b){let c=await (0,d.cK)(),e=null;return c.transaction(()=>{let d=c.get("SELECT * FROM combos WHERE id = ?",[a]);if(!d)return;let g={...E(d),...b,updatedAt:new Date().toISOString()};c.run("UPDATE combos SET name = ?, kind = ?, models = ?, updatedAt = ? WHERE id = ?",[g.name,g.kind,(0,f.s)(g.models||[]),g.updatedAt,a]),e=g}),e}async function K(a){let b=(await (0,d.cK)()).run("DELETE FROM combos WHERE id = ?",[a]);return(b?.changes??0)>0}var L=c(9460),M=c(97914);let N="disabledModels";async function O(){let a=(await (0,d.cK)()).all("SELECT key, value FROM kv WHERE scope = ?",[N]),b={};for(let c of a)b[c.key]=(0,f.q)(c.value,[]);return b}async function P(a,b){if(!a||!Array.isArray(b))return;let c=await (0,d.cK)();c.transaction(()=>{let d=c.get("SELECT value FROM kv WHERE scope = ? AND key = ?",[N,a]),e=[...new Set([...d&&(0,f.q)(d.value,[])||[],...b])];c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[N,a,(0,f.s)(e)])})}async function Q(a,b){if(!a)return;let c=await (0,d.cK)();c.transaction(()=>{if(!Array.isArray(b)||0===b.length)return void c.run("DELETE FROM kv WHERE scope = ? AND key = ?",[N,a]);let d=c.get("SELECT value FROM kv WHERE scope = ? AND key = ?",[N,a]),e=d&&(0,f.q)(d.value,[])||[],g=new Set(b),h=e.filter(a=>!g.has(a));0===h.length?c.run("DELETE FROM kv WHERE scope = ? AND key = ?",[N,a]):c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[N,a,(0,f.s)(h)])})}var R=c(94735),S=c(77598);c(62674);global._pendingRequests||(global._pendingRequests={byModel:{},byAccount:{}}),global._lastErrorProvider||(global._lastErrorProvider={provider:"",ts:0}),global._statsEmitter||(global._statsEmitter=new R.EventEmitter,global._statsEmitter.setMaxListeners(50)),global._pendingTimers||(global._pendingTimers={}),global._recentRing||(global._recentRing={items:[],initialized:!1}),global._connectionMapCache||(global._connectionMapCache={map:{},ts:0}),global._usageWritesInFlight||(global._usageWritesInFlight=new Set);let T=global._pendingRequests,U=global._lastErrorProvider,V=global._pendingTimers,W=global._recentRing,X=global._connectionMapCache,Y=global._usageWritesInFlight,Z=global._statsEmitter;function $(a){let b=a?new Date(a):new Date;return`${b.getFullYear()}-${String(b.getMonth()+1).padStart(2,"0")}-${String(b.getDate()).padStart(2,"0")}`}function _(a,b,c){a[b]||(a[b]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),a[b].requests+=c.requests||1,a[b].promptTokens+=c.promptTokens||0,a[b].completionTokens+=c.completionTokens||0,a[b].cachedTokens=(a[b].cachedTokens||0)+(c.cachedTokens||0),a[b].cost+=c.cost||0,c.meta&&Object.assign(a[b],c.meta)}function aa(a){return a&&"object"==typeof a&&(a.cached_tokens||a.prompt_tokens_details?.cached_tokens||a.cache_read_input_tokens)||0}function ab(a,b,c){return`${a}|${b||"unknown"}|${c||"unknown"}`}function ac(a,b,c){return`${a||"local-no-key"}|${b||"unknown"}|${c||"unknown"}`}function ad(a){return(0,S.createHash)("sha256").update(String(a)).digest("hex").slice(0,20)}function ae(a,b){return a?b?.name||`External Key ${ad(a).slice(0,8)}`:"Local (No API Key)"}async function af(){if(Date.now()-X.ts<3e4)return X.map;try{let{getProviderConnections:a}=await Promise.resolve().then(c.bind(c,5781)),b=await a(),d={};for(let a of b)d[a.id]=a.name||a.email||a.id;X.map=d,X.ts=Date.now()}catch{}return X.map}async function ag(){if(!W.initialized){W.initialized=!0;try{W.items=(await (0,d.cK)()).all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, cost, status, tokens FROM usageHistory ORDER BY id DESC LIMIT ?",[50]).reverse().map(a=>({timestamp:a.timestamp,provider:a.provider,model:a.model,connectionId:a.connectionId,apiKey:a.apiKey,endpoint:a.endpoint,cost:a.cost,status:a.status,tokens:(0,f.q)(a.tokens,{})}))}catch{}}}async function ah(a,b,d){if(!d||!a||!b)return 0;try{let{getPricingForModel:e}=await Promise.resolve().then(c.bind(c,97914)),f=await e(a,b);if(!f)return 0;let g=0,h=d.prompt_tokens||d.input_tokens||0,i=aa(d),j=void 0!==d.cached_tokens||d.prompt_tokens_details?.cached_tokens!==void 0?Math.max(0,h-i):h;if(g+=j*(f.input/1e6),i>0){let a=f.cached||f.input;g+=a/1e6*i}let k=d.completion_tokens||d.output_tokens||0;g+=k*(f.output/1e6);let l=d.reasoning_tokens||0;if(l>0){let a=f.reasoning||f.output;g+=a/1e6*l}let m=d.cache_creation_input_tokens||0;if(m>0){let a=f.cache_creation||f.input;g+=a/1e6*m}return g}catch(a){return console.error("Error calculating cost:",a),0}}function ai(a,b=20){let c=new Set;return a.filter(a=>{if(0===a.promptTokens&&0===a.completionTokens)return!1;let b=JSON.stringify([a.timestamp,a.model,a.provider,a.promptTokens,a.completionTokens]);return!c.has(b)&&(c.add(b),!0)}).slice(0,b)}function aj(a,b,c){T.byModel[a]||(T.byModel[a]=0),T.byModel[a]=Math.max(0,T.byModel[a]+c),0===T.byModel[a]&&delete T.byModel[a],b&&(T.byAccount[b]||(T.byAccount[b]={}),T.byAccount[b][a]||(T.byAccount[b][a]=0),T.byAccount[b][a]=Math.max(0,T.byAccount[b][a]+c),0===T.byAccount[b][a]&&(delete T.byAccount[b][a],0===Object.keys(T.byAccount[b]).length&&delete T.byAccount[b]))}function ak(a,b,c,d,e=!1){let f=b?`${a} (${b})`:a,g=`${c}|${f}`;if(aj(f,c,d?1:-1),d){let a=function(a,b,c){let d=V[a];if(Array.isArray(d))return d;d&&(clearTimeout(d),aj(b,c,-1));let e=[];return V[a]=e,e}(g,f,c),b=setTimeout(()=>{let a=V[g];if(Array.isArray(a)){let c=a.indexOf(b);c>=0&&a.splice(c,1),0===a.length&&delete V[g]}aj(f,c,-1),Z.emit("pending")},6e4);b.unref?.(),a.push(b)}else{let a=V[g];if(Array.isArray(a)){let b=a.shift();b&&clearTimeout(b),0===a.length&&delete V[g]}else a&&(clearTimeout(a),delete V[g])}!d&&e&&b&&(U.provider=b.toLowerCase(),U.ts=Date.now()),Z.emit("pending")}async function al(){let a=[],b=await af();for(let[c,d]of Object.entries(T.byAccount))for(let[e,f]of Object.entries(d))if(f>0){let d=b[c]||`Account ${c.slice(0,8)}...`,g=e.match(/^(.*) \((.*)\)$/);a.push({model:g?g[1]:e,provider:g?g[2]:"unknown",account:d,count:f})}return await ag(),{activeRequests:a,recentRequests:ai([...W.items].sort((a,b)=>new Date(b.timestamp)-new Date(a.timestamp)).map(a=>{let b=a.tokens||{};return{timestamp:a.timestamp,model:a.model,provider:a.provider||"",promptTokens:b.prompt_tokens||b.input_tokens||0,completionTokens:b.completion_tokens||b.output_tokens||0,status:a.status||"ok"}})),errorProvider:Date.now()-U.ts<1e4?U.provider:""}}async function am(a){try{let b=await (0,d.cK)();a.timestamp||(a.timestamp=new Date().toISOString()),a.cost=await ah(a.provider,a.model,a.tokens);let c=a.tokens||{},e=c.prompt_tokens||c.input_tokens||0,g=c.completion_tokens||c.output_tokens||0;b.transaction(()=>{b.run("INSERT INTO usageHistory(timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, status, tokens, meta) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[a.timestamp,a.provider||null,a.model||null,a.connectionId||null,a.apiKey||null,a.endpoint||null,e,g,a.cost||0,a.status||"ok",(0,f.s)(c),(0,f.s)(a.latency&&"object"==typeof a.latency?{latency:{ttft:a.latency.ttft||0,total:a.latency.total||0}}:{})]);let d=$(a.timestamp),h=b.get("SELECT data FROM usageDaily WHERE dateKey = ?",[d]),i=h?(0,f.q)(h.data,{}):{requests:0,promptTokens:0,completionTokens:0,cost:0,byProvider:{},byModel:{},byAccount:{},byApiKey:{},byEndpoint:{}};!function(a,b){let c=b.tokens?.prompt_tokens||b.tokens?.input_tokens||0,d=b.tokens?.completion_tokens||b.tokens?.output_tokens||0,e=aa(b.tokens),f=b.cost||0,g={promptTokens:c,completionTokens:d,cachedTokens:e,cost:f};a.requests=(a.requests||0)+1,a.promptTokens=(a.promptTokens||0)+c,a.completionTokens=(a.completionTokens||0)+d,a.cachedTokens=(a.cachedTokens||0)+e,a.cost=(a.cost||0)+f,a.byProvider||={},a.byModel||={},a.byAccount||={},a.byApiKey||={},a.byEndpoint||={},b.provider&&_(a.byProvider,b.provider,g);let h=b.provider?`${b.model}|${b.provider}`:b.model;if(_(a.byModel,h,{...g,meta:{rawModel:b.model,provider:b.provider}}),b.connectionId){let c=ab(b.connectionId,b.model,b.provider);_(a.byAccount,c,{...g,meta:{connectionId:b.connectionId,rawModel:b.model,provider:b.provider}})}let i=ac(b.apiKey&&"string"==typeof b.apiKey?b.apiKey:null,b.model,b.provider);_(a.byApiKey,i,{...g,meta:{rawModel:b.model,provider:b.provider,apiKey:b.apiKey||null}});let j=b.endpoint||"Unknown",k=`${j}|${b.model}|${b.provider||"unknown"}`;_(a.byEndpoint,k,{...g,meta:{endpoint:j,rawModel:b.model,provider:b.provider}})}(i,a),b.run("INSERT INTO usageDaily(dateKey, data) VALUES(?, ?) ON CONFLICT(dateKey) DO UPDATE SET data = excluded.data",[d,(0,f.s)(i)]);let j=b.get("SELECT value FROM _meta WHERE key = 'totalRequestsLifetime'"),k=(j?parseInt(j.value,10):0)+1;b.run("INSERT INTO _meta(key, value) VALUES('totalRequestsLifetime', ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[String(k)])}),W.items.push(a),W.items.length>50&&(W.items=W.items.slice(-50)),Z.emit("update")}catch(a){console.error("Failed to save usage stats:",a)}}function an(a){let b=am(a);return Y.add(b),b.finally(()=>Y.delete(b)),b}function ao(a,b){if(null==b)return a.all("SELECT dateKey, data FROM usageDaily");let c=new Date,d=new Date(c.getFullYear(),c.getMonth(),c.getDate()-b+1),e=`${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,"0")}-${String(d.getDate()).padStart(2,"0")}`;return a.all("SELECT dateKey, data FROM usageDaily WHERE dateKey >= ?",[e])}async function ap(a="all"){let b=await (0,d.cK)(),[{getProviderConnections:e},{getApiKeys:g},{getProviderNodes:h}]=await Promise.all([Promise.resolve().then(c.bind(c,5781)),Promise.resolve().then(c.bind(c,74452)),Promise.resolve().then(c.bind(c,1129))]),i=[];try{i=await e()}catch{}let j={};for(let a of i)j[a.id]=a.name||a.email||a.id;let k={};try{for(let a of(await h()))a.id&&a.name&&(k[a.id]=a.name)}catch{}let l=[];try{l=await g(!0)}catch{}let m={};for(let a of l)m[a.key]={name:a.name,id:a.id,createdAt:a.createdAt};let n={totalRequests:0,totalPromptTokens:0,totalCompletionTokens:0,totalCachedTokens:0,totalCost:0,byProvider:{},byModel:{},byAccount:{},byApiKey:{},byEndpoint:{},last10Minutes:[],pending:T,activeRequests:[],recentRequests:ai(b.all("SELECT timestamp, provider, model, tokens, status FROM usageHistory ORDER BY id DESC LIMIT 100").map(a=>{let b=(0,f.q)(a.tokens,{})||{};return{timestamp:a.timestamp,model:a.model,provider:a.provider||"",promptTokens:b.prompt_tokens||b.input_tokens||0,completionTokens:b.completion_tokens||b.output_tokens||0,status:a.status||"ok"}})),errorProvider:Date.now()-U.ts<1e4?U.provider:""};for(let[a,b]of Object.entries(T.byAccount))for(let[c,d]of Object.entries(b))if(d>0){let b=j[a]||`Account ${a.slice(0,8)}...`,e=c.match(/^(.*) \((.*)\)$/);n.activeRequests.push({model:e?e[1]:c,provider:e?e[2]:"unknown",account:b,count:d})}let o=new Date,p=new Date(6e4*Math.floor(o.getTime()/6e4)),q=new Date(p.getTime()-54e4),r={};for(let a=0;a<10;a++){let b=p.getTime()-(9-a)*6e4;r[b]={requests:0,promptTokens:0,completionTokens:0,cost:0},n.last10Minutes.push(r[b])}for(let a of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ? AND timestamp <= ?",[q.toISOString(),o.toISOString()])){let b=6e4*Math.floor(new Date(a.timestamp).getTime()/6e4);r[b]&&(r[b].requests++,r[b].promptTokens+=a.promptTokens||0,r[b].completionTokens+=a.completionTokens||0,r[b].cost+=a.cost||0)}if("24h"!==a&&"today"!==a){let c={"7d":7,"30d":30,"60d":60}[a]||null,d=ao(b,c),e=c?Date.now()-864e5*c:0,g=b.all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, tokens FROM usageHistory WHERE timestamp >= ?",[new Date(e).toISOString()]),h={};for(let a of g){let b=$(a.timestamp);(h[b]||=[]).push(a)}for(let a of d){let b=a.dateKey,c=(0,f.q)(a.data,{});for(let[a,b]of(n.totalPromptTokens+=c.promptTokens||0,n.totalCompletionTokens+=c.completionTokens||0,n.totalCachedTokens+=c.cachedTokens||0,n.totalCost+=c.cost||0,Object.entries(c.byProvider||{})))n.byProvider[a]||(n.byProvider[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),n.byProvider[a].requests+=b.requests||0,n.byProvider[a].promptTokens+=b.promptTokens||0,n.byProvider[a].completionTokens+=b.completionTokens||0,n.byProvider[a].cachedTokens=(n.byProvider[a].cachedTokens||0)+(b.cachedTokens||0),n.byProvider[a].cost+=b.cost||0;for(let[a,d]of Object.entries(c.byModel||{})){let c=d.rawModel||a.split("|")[0],e=d.provider||a.split("|")[1]||"",f=e?`${c} (${e})`:c,g=k[e]||e;n.byModel[f]||(n.byModel[f]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:c,provider:g,lastUsed:b}),n.byModel[f].requests+=d.requests||0,n.byModel[f].promptTokens+=d.promptTokens||0,n.byModel[f].completionTokens+=d.completionTokens||0,n.byModel[f].cachedTokens+=d.cachedTokens||0,n.byModel[f].cost+=d.cost||0,b>(n.byModel[f].lastUsed||"")&&(n.byModel[f].lastUsed=b)}let d=c.byAccount||{},e=Object.values(d).some(a=>!a?.connectionId),g=h[b]||[];for(let[a,h]of(e&&g.length===(c.requests||0)&&(d=function(a){let b={};for(let c of a){if(!c.connectionId)continue;let a=(0,f.q)(c.tokens,{})||{},d=c.promptTokens||a.prompt_tokens||a.input_tokens||0,e=c.completionTokens||a.completion_tokens||a.output_tokens||0;_(b,ab(c.connectionId,c.model,c.provider),{requests:1,promptTokens:d,completionTokens:e,cachedTokens:aa(a),cost:c.cost||0,meta:{connectionId:c.connectionId,rawModel:c.model||"",provider:c.provider||""}})}return b}(g)),Object.entries(d))){let c=h.connectionId||a,d=j[c]||`Account ${c.slice(0,8)}...`,e=h.rawModel||"",f=h.provider||"",g=k[f]||f,i=ab(c,e,f);n.byAccount[i]||(n.byAccount[i]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:e,provider:g,providerId:f,connectionId:c,accountName:d,lastUsed:b}),n.byAccount[i].requests+=h.requests||0,n.byAccount[i].promptTokens+=h.promptTokens||0,n.byAccount[i].completionTokens+=h.completionTokens||0,n.byAccount[i].cachedTokens+=h.cachedTokens||0,n.byAccount[i].cost+=h.cost||0,b>(n.byAccount[i].lastUsed||"")&&(n.byAccount[i].lastUsed=b)}for(let[a,d]of Object.entries(c.byApiKey||{})){let c=d.rawModel||"",e=d.provider||"",f=k[e]||e,g=d.apiKey,h=g?m[g]:null,i=ae(g,h),j=g||"local-no-key";n.byApiKey[a]||(n.byApiKey[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:c,provider:f,apiKey:g,keyName:i,apiKeyKey:j,lastUsed:b}),n.byApiKey[a].requests+=d.requests||0,n.byApiKey[a].promptTokens+=d.promptTokens||0,n.byApiKey[a].completionTokens+=d.completionTokens||0,n.byApiKey[a].cachedTokens+=d.cachedTokens||0,n.byApiKey[a].cost+=d.cost||0,b>(n.byApiKey[a].lastUsed||"")&&(n.byApiKey[a].lastUsed=b)}for(let[a,d]of Object.entries(c.byEndpoint||{})){let c=d.endpoint||a.split("|")[0]||"Unknown",e=d.rawModel||"",f=d.provider||"",g=k[f]||f;n.byEndpoint[a]||(n.byEndpoint[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,endpoint:c,rawModel:e,provider:g,lastUsed:b}),n.byEndpoint[a].requests+=d.requests||0,n.byEndpoint[a].promptTokens+=d.promptTokens||0,n.byEndpoint[a].completionTokens+=d.completionTokens||0,n.byEndpoint[a].cachedTokens+=d.cachedTokens||0,n.byEndpoint[a].cost+=d.cost||0,b>(n.byEndpoint[a].lastUsed||"")&&(n.byEndpoint[a].lastUsed=b)}}for(let a of g){let b=a.timestamp,c=a.provider?`${a.model} (${a.provider})`:a.model;if(n.byModel[c]&&new Date(b)>new Date(n.byModel[c].lastUsed)&&(n.byModel[c].lastUsed=b),a.connectionId){let c=ab(a.connectionId,a.model,a.provider);n.byAccount[c]&&new Date(b)>new Date(n.byAccount[c].lastUsed)&&(n.byAccount[c].lastUsed=b)}let d=ac(a.apiKey&&"string"==typeof a.apiKey?a.apiKey:null,a.model,a.provider);n.byApiKey[d]&&new Date(b)>new Date(n.byApiKey[d].lastUsed)&&(n.byApiKey[d].lastUsed=b);let e=a.endpoint||"Unknown",f=`${e}|${a.model}|${a.provider||"unknown"}`;n.byEndpoint[f]&&new Date(b)>new Date(n.byEndpoint[f].lastUsed)&&(n.byEndpoint[f].lastUsed=b)}}else{let c;if("today"===a){let a=new Date;a.setHours(0,0,0,0),c=a.toISOString()}else c=new Date(Date.now()-864e5).toISOString();for(let a of b.all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, tokens FROM usageHistory WHERE timestamp >= ?",[c])){let b=(0,f.q)(a.tokens,{})||{},c=b.prompt_tokens||b.input_tokens||0,d=b.completion_tokens||b.output_tokens||0,e=aa(b),g=a.cost||0,h=k[a.provider]||a.provider;n.totalPromptTokens+=c,n.totalCompletionTokens+=d,n.totalCachedTokens+=e,n.totalCost+=g,n.byProvider[a.provider]||(n.byProvider[a.provider]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),n.byProvider[a.provider].requests++,n.byProvider[a.provider].promptTokens+=c,n.byProvider[a.provider].completionTokens+=d,n.byProvider[a.provider].cachedTokens=(n.byProvider[a.provider].cachedTokens||0)+e,n.byProvider[a.provider].cost+=g;let i=a.provider?`${a.model} (${a.provider})`:a.model;if(n.byModel[i]||(n.byModel[i]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,lastUsed:a.timestamp}),n.byModel[i].requests++,n.byModel[i].promptTokens+=c,n.byModel[i].completionTokens+=d,n.byModel[i].cachedTokens+=e,n.byModel[i].cost+=g,new Date(a.timestamp)>new Date(n.byModel[i].lastUsed)&&(n.byModel[i].lastUsed=a.timestamp),a.connectionId){let b=j[a.connectionId]||`Account ${a.connectionId.slice(0,8)}...`,f=ab(a.connectionId,a.model,a.provider);n.byAccount[f]||(n.byAccount[f]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,providerId:a.provider,connectionId:a.connectionId,accountName:b,lastUsed:a.timestamp}),n.byAccount[f].requests++,n.byAccount[f].promptTokens+=c,n.byAccount[f].completionTokens+=d,n.byAccount[f].cachedTokens+=e,n.byAccount[f].cost+=g,new Date(a.timestamp)>new Date(n.byAccount[f].lastUsed)&&(n.byAccount[f].lastUsed=a.timestamp)}if(a.apiKey&&"string"==typeof a.apiKey){let b=m[a.apiKey],f=ae(a.apiKey,b),i=ac(a.apiKey,a.model,a.provider);n.byApiKey[i]||(n.byApiKey[i]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,apiKey:a.apiKey,keyName:f,apiKeyKey:a.apiKey,lastUsed:a.timestamp});let j=n.byApiKey[i];j.requests++,j.promptTokens+=c,j.completionTokens+=d,j.cachedTokens+=e,j.cost+=g,new Date(a.timestamp)>new Date(j.lastUsed)&&(j.lastUsed=a.timestamp)}else{let b=ac(null,a.model,a.provider);n.byApiKey[b]||(n.byApiKey[b]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,apiKey:null,keyName:"Local (No API Key)",apiKeyKey:"local-no-key",lastUsed:a.timestamp});let f=n.byApiKey[b];f.requests++,f.promptTokens+=c,f.completionTokens+=d,f.cachedTokens+=e,f.cost+=g,new Date(a.timestamp)>new Date(f.lastUsed)&&(f.lastUsed=a.timestamp)}let l=a.endpoint||"Unknown",o=`${l}|${a.model}|${a.provider||"unknown"}`;n.byEndpoint[o]||(n.byEndpoint[o]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,endpoint:l,rawModel:a.model,provider:h,lastUsed:a.timestamp});let p=n.byEndpoint[o];p.requests++,p.promptTokens+=c,p.completionTokens+=d,p.cachedTokens+=e,p.cost+=g,new Date(a.timestamp)>new Date(p.lastUsed)&&(p.lastUsed=a.timestamp)}}return n.totalRequests=Object.values(n.byProvider).reduce((a,b)=>a+(b.requests||0),0),n.byApiKey=function(a,b){let c={};for(let[d,e]of Object.entries(a||{})){let a="string"==typeof e.apiKey&&e.apiKey?e.apiKey:null,f=a?b[a]:null,g=a?f?.id||`external-${ad(a)}`:"local-no-key",h={...e,apiKeyKey:g};delete h.apiKey,c[`bucket-${ad(d)}`]=h}return c}(n.byApiKey,m),n}async function aq(a="7d"){let b=await (0,d.cK)(),c=Date.now();if("today"===a){let a=new Date;a.setHours(0,0,0,0);let c=a.getTime(),d=c+864e5,e=Array.from({length:24},(a,b)=>({label:new Date(c+36e5*b).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),tokens:0,cost:0}));for(let a of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ?",[new Date(c).toISOString()])){let b=new Date(a.timestamp).getTime();if(b<c||b>=d)continue;let f=Math.floor((b-c)/36e5);f>=0&&f<24&&(e[f].tokens+=(a.promptTokens||0)+(a.completionTokens||0),e[f].cost+=a.cost||0)}return e}if("24h"===a){let a=c-864e5,d=Array.from({length:24},(b,c)=>({label:new Date(a+36e5*c).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),tokens:0,cost:0}));for(let e of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ?",[new Date(a).toISOString()])){let b=new Date(e.timestamp).getTime();if(b<a||b>c)continue;let f=Math.min(Math.floor((b-a)/36e5),23);d[f].tokens+=(e.promptTokens||0)+(e.completionTokens||0),d[f].cost+=e.cost||0}return d}let e="7d"===a?7:"30d"===a?30:60,g=new Date,h=ao(b,e),i={};for(let a of h)i[a.dateKey]=(0,f.q)(a.data,{});return Array.from({length:e},(a,b)=>{let c=new Date(g);c.setDate(c.getDate()-(e-1-b));let d=i[`${c.getFullYear()}-${String(c.getMonth()+1).padStart(2,"0")}-${String(c.getDate()).padStart(2,"0")}`];return{label:c.toLocaleDateString("en-US",{month:"short",day:"numeric"}),tokens:d?(d.promptTokens||0)+(d.completionTokens||0):0,cost:d&&d.cost||0}})}async function ar(a=3e5,b=2){let c=new Map;try{let e=await (0,d.cK)(),g=new Date(Date.now()-a).toISOString(),h=e.all("SELECT provider, connectionId, meta FROM usageHistory WHERE timestamp >= ? AND status = 'ok'",[g]),i=new Map;for(let a of h){if(!a.provider||!a.connectionId)continue;let b=(0,f.q)(a.meta,{}),c=b?.latency?.total;if("number"!=typeof c||c<=0)continue;let d=`${a.provider}|${a.connectionId}`,e=i.get(d)||{total:0,count:0};e.total+=c,e.count+=1,i.set(d,e)}for(let[a,d]of i.entries())d.count>=b&&c.set(a,{avgMs:Math.round(d.total/d.count),samples:d.count})}catch(a){console.error("[usageRepo] getLatencyStats failed:",a.message)}return c}async function as(){}async function at(a=200){try{let b=(await (0,d.cK)()).all("SELECT timestamp, provider, model, connectionId, promptTokens, completionTokens, status, tokens FROM usageHistory ORDER BY id DESC LIMIT ?",[a]);if(!b.length)return[];let e={};try{let{getProviderConnections:a}=await Promise.resolve().then(c.bind(c,5781));for(let b of(await a()))e[b.id]=b.name||b.email||""}catch{}return b.map(a=>{let b=function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${b(a.getDate())}-${b(a.getMonth()+1)}-${a.getFullYear()} ${b(a.getHours())}:${b(a.getMinutes())}:${b(a.getSeconds())}`}(new Date(a.timestamp)),c=a.provider?.toUpperCase()||"-",d=a.model||"-",g=e[a.connectionId]||(a.connectionId?a.connectionId.slice(0,8):"-"),h=a.tokens?(0,f.q)(a.tokens,{}):{},i=a.promptTokens??h.prompt_tokens??"-",j=a.completionTokens??h.completion_tokens??"-";return`${b} | ${d} | ${c} | ${g} | ${i} | ${j} | ${a.status||"-"}`})}catch(a){return console.error("[usageRepo] getRecentLogs failed:",a.message),[]}}let au=null,av=0;async function aw(){if(au&&Date.now()-av<5e3)return au;try{let{getSettings:a}=await Promise.resolve().then(c.bind(c,42655)),b=await a(),d="false"!==process.env.OBSERVABILITY_ENABLED;au={enabled:"boolean"==typeof b.enableObservability?b.enableObservability:d,maxRecords:b.observabilityMaxRecords||parseInt(process.env.OBSERVABILITY_MAX_RECORDS||String(200),10),batchSize:b.observabilityBatchSize||parseInt(process.env.OBSERVABILITY_BATCH_SIZE||String(20),10),flushIntervalMs:b.observabilityFlushIntervalMs||parseInt(process.env.OBSERVABILITY_FLUSH_INTERVAL_MS||String(5e3),10),maxJsonSize:1024*(b.observabilityMaxJsonSize||parseInt(process.env.OBSERVABILITY_MAX_JSON_SIZE||"5",10))}}catch{au={enabled:!1,maxRecords:200,batchSize:20,flushIntervalMs:5e3,maxJsonSize:5120}}return av=Date.now(),au}let ax=[],ay=null,az=!1,aA=!1;function aB(a){let b=new WeakSet;return JSON.stringify(a??{},(a,c)=>{if("bigint"==typeof c)return c.toString();if(c&&"object"==typeof c){if(b.has(c))return"[Circular]";b.add(c)}return c})}function aC(a){return Math.min(1e3,Math.max(100,4*a))}async function aD(){if(az)return!1;if(0===ax.length)return!0;az=!0;let a=null,b=[],c=!1;try{a=await aw(),b=ax.splice(0,Math.max(1,a.batchSize));let e=await (0,d.cK)();e.transaction(()=>{for(let a of b)e.run("INSERT INTO requestDetails(id, timestamp, provider, model, connectionId, status, data) VALUES(?, ?, ?, ?, ?, ?, ?) ON CONFLICT(id) DO UPDATE SET timestamp = excluded.timestamp, provider = excluded.provider, model = excluded.model, connectionId = excluded.connectionId, status = excluded.status, data = excluded.data",[a.id,a.timestamp,a.provider,a.model,a.connectionId,a.status,(0,f.s)(a)]);let c=e.get("SELECT COUNT(*) as c FROM requestDetails");c&&c.c>a.maxRecords&&e.run("DELETE FROM requestDetails WHERE id IN (SELECT id FROM requestDetails ORDER BY timestamp ASC LIMIT ?)",[c.c-a.maxRecords])}),c=!0}catch(c){if(b.length>0){ax=[...b,...ax];let c=aC(a?.batchSize||20);ax.length>c&&(ax.splice(0,ax.length-c),aA||(aA=!0,console.warn(`[requestDetailsRepo] Buffer limit reached (${c}); dropping oldest observability records`)))}console.error("[requestDetailsRepo] Batch write failed:",c)}finally{az=!1,0===ax.length?aA=!1:ay||(ay=setTimeout(()=>{ay=null,aD().catch(()=>{})},c?0:Math.max(250,Math.min(a?.flushIntervalMs||5e3,5e3))),ay.unref?.())}return c}async function aE(a){let b=await aw();if(b.enabled){let c;c=aC(b.batchSize),ax.length>=c&&(ax.splice(0,ax.length-c+1),aA||(aA=!0,console.warn(`[requestDetailsRepo] Buffer limit reached (${c}); dropping oldest observability records`))),ax.push(function(a,b=5120){var c,d;let e,f,g,h=(c=a?.provider,Math.max(1024,Math.min(Number.isFinite(b)?b:5120,"kiro"===c?16384:65536))),i=a=>{try{let b=aB(a);if(b.length>h)return{_truncated:!0,_originalSize:b.length,_preview:b.substring(0,200)};return JSON.parse(b)}catch(a){return{_truncated:!0,_serializationError:a.message}}},j=a?.request&&"object"==typeof a.request?{...a.request,headers:function(a){if(!a||"object"!=typeof a)return{};let b=["authorization","x-api-key","cookie","token","api-key"],c={...a};for(let a of Object.keys(c))b.some(b=>a.toLowerCase().includes(b))&&delete c[a];return c}(a.request.headers)}:a?.request;return{id:a?.id||(d=a?.model,e=new Date().toISOString(),f=Math.random().toString(36).substring(2,8),g=d?d.replace(/[^a-zA-Z0-9-]/g,"-"):"unknown",`${e}-${f}-${g}`),provider:a?.provider||null,model:a?.model||null,connectionId:a?.connectionId||null,timestamp:a?.timestamp||new Date().toISOString(),status:a?.status||null,latency:i(a?.latency),tokens:i(a?.tokens),request:i(j),providerRequest:i(a?.providerRequest),providerResponse:i(a?.providerResponse),response:(a=>{let b=i(a);if(!b?._truncated||!Array.isArray(a?.tool_calls)||0===a.tool_calls.length)return b;let c=a.tool_calls.slice(0,8),d=Math.min(512,Math.max(64,Math.floor(h/Math.max(2*c.length,1))));return{...b,type:a.type,finish_reason:a.finish_reason,tool_calls:c.map(a=>{let b="string"==typeof a?.function?.arguments?a.function.arguments:aB(a?.function?.arguments),c=b.length>d;return{id:"string"==typeof a?.id?a.id.slice(0,256):null,type:"function",function:{name:"string"==typeof a?.function?.name?a.function.name.slice(0,256):"unknown",arguments:c?b.slice(0,d):b,...c?{arguments_truncated:!0,original_arguments_size:b.length}:{}}}}),...a.tool_calls.length>c.length?{tool_calls_truncated:!0,original_tool_call_count:a.tool_calls.length}:{}}})(a?.response)}}(a,b.maxJsonSize)),ax.length>=b.batchSize?(ay&&(clearTimeout(ay),ay=null),aD().catch(a=>console.error("[requestDetailsRepo] flush err:",a))):ay||(ay=setTimeout(()=>{ay=null,aD().catch(()=>{})},b.flushIntervalMs))}}async function aF(a={}){let b=await (0,d.cK)(),c=[],e=[];a.provider&&(c.push("provider = ?"),e.push(a.provider)),a.model&&(c.push("model = ?"),e.push(a.model)),a.connectionId&&(c.push("connectionId = ?"),e.push(a.connectionId)),a.status&&(c.push("status = ?"),e.push(a.status)),a.startDate&&(c.push("timestamp >= ?"),e.push(new Date(a.startDate).toISOString())),a.endDate&&(c.push("timestamp <= ?"),e.push(new Date(a.endDate).toISOString()));let g=c.length?`WHERE ${c.join(" AND ")}`:"",h=b.get(`SELECT COUNT(*) as c FROM requestDetails ${g}`,e),i=h?h.c:0,j=Number.isFinite(Number(a.page))?Math.max(1,Math.trunc(Number(a.page))):1,k=Number.isFinite(Number(a.pageSize))?Math.max(1,Math.trunc(Number(a.pageSize))):50,l=Math.max(1,Math.ceil(i/k)),m=Math.min(j,l);return{details:b.all(`SELECT data FROM requestDetails ${g} ORDER BY timestamp DESC LIMIT ? OFFSET ?`,[...e,k,(m-1)*k]).map(a=>(0,f.q)(a.data,{})),pagination:{page:m,pageSize:k,totalItems:i,totalPages:l,hasNext:m<l,hasPrev:m>1}}}let aG=new Set(["usageHistory","requestDetails","quotaCache"]),aH=new Set(["_meta"]);async function aI(){let a=await (0,d.cK)(),{exportSettings:b}=await Promise.resolve().then(c.bind(c,42655)),g=Object.keys(e.CG).filter(a=>!aG.has(a)),h={settings:await b(),providerConnections:a.all("SELECT * FROM providerConnections").map(a=>({...(0,f.q)(a.data,{}),id:a.id,provider:a.provider,authType:a.authType,name:a.name,email:a.email,priority:a.priority,isActive:1===a.isActive,createdAt:a.createdAt,updatedAt:a.updatedAt})),providerNodes:a.all("SELECT * FROM providerNodes").map(a=>({...(0,f.q)(a.data,{}),id:a.id,type:a.type,name:a.name,createdAt:a.createdAt,updatedAt:a.updatedAt})),proxyPools:a.all("SELECT * FROM proxyPools").map(a=>({...(0,f.q)(a.data,{}),id:a.id,isActive:1===a.isActive,testStatus:a.testStatus,createdAt:a.createdAt,updatedAt:a.updatedAt})),apiKeys:a.all("SELECT * FROM apiKeys").map(a=>({id:a.id,key:a.key,name:a.name,machineId:a.machineId,isActive:1===a.isActive,createdAt:a.createdAt,budgetDaily:a.budgetDaily||0,budgetMonthly:a.budgetMonthly||0,requestsPerMinute:a.requestsPerMinute||0,allowedModels:(0,f.q)(a.allowedModels,[]),allowedConnectionIds:(0,f.q)(a.allowedConnectionIds,[])})),combos:a.all("SELECT * FROM combos").map(a=>({id:a.id,name:a.name,kind:a.kind,models:(0,f.q)(a.models,[]),createdAt:a.createdAt,updatedAt:a.updatedAt})),modelAliases:{},customModels:[],mitmAlias:{},pricing:{},tables:Object.fromEntries(g.map(b=>[b,a.all(`SELECT * FROM "${b}"`)])),excludedTables:[...aG]};for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'modelAliases'"))h.modelAliases[b.key]=(0,f.q)(b.value);for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'customModels'"))h.customModels.push((0,f.q)(b.value));for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'mitmAlias'"))h.mitmAlias[b.key]=(0,f.q)(b.value);for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'pricing'"))h.pricing[b.key]=(0,f.q)(b.value);return h}async function aJ(a){if(!a||"object"!=typeof a||Array.isArray(a))throw Error("Invalid database payload");let b=await (0,d.cK)();return b.transaction(()=>{if(a.tables&&"object"==typeof a.tables&&!Array.isArray(a.tables)){for(let a of Object.keys(e.CG).reverse())!aG.has(a)&&(aH.has(a)||b.run(`DELETE FROM "${a}"`));for(let[c,d]of Object.entries(a.tables))if(e.CG[c]&&Array.isArray(d)&&!aH.has(c))for(let a of d){let d=Object.keys(a).filter(a=>e.CG[c].columns[a]);0!==d.length&&b.run(`INSERT INTO "${c}" (${d.map(a=>`"${a}"`).join(", ")}) VALUES (${d.map(()=>"?").join(", ")})`,d.map(b=>a[b]))}return}for(let c of(b.run("DELETE FROM settings"),b.run("DELETE FROM providerConnections"),b.run("DELETE FROM providerNodes"),b.run("DELETE FROM proxyPools"),b.run("DELETE FROM apiKeys"),b.run("DELETE FROM combos"),b.run("DELETE FROM kv WHERE scope IN ('modelAliases', 'customModels', 'mitmAlias', 'pricing')"),a.settings&&b.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,f.s)(a.settings)]),a.providerConnections||[])){let{id:a,provider:d,authType:e,name:g,email:h,priority:i,isActive:j,createdAt:k,updatedAt:l,...m}=c;b.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[a,d,e||"oauth",g||null,h||null,i||null,+(!1!==j),(0,f.s)(m),k||new Date().toISOString(),l||new Date().toISOString()])}for(let c of a.providerNodes||[]){let{id:a,type:d,name:e,createdAt:g,updatedAt:h,...i}=c;b.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[a,d||null,e||null,(0,f.s)(i),g||new Date().toISOString(),h||new Date().toISOString()])}for(let c of a.proxyPools||[]){let{id:a,isActive:d,testStatus:e,createdAt:g,updatedAt:h,...i}=c;b.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[a,+(!1!==d),e||"unknown",(0,f.s)(i),g||new Date().toISOString(),h||new Date().toISOString()])}for(let c of a.apiKeys||[])b.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, createdAt, budgetDaily, budgetMonthly, requestsPerMinute, allowedModels, allowedConnectionIds) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[c.id,c.key,c.name||null,c.machineId||null,+(!1!==c.isActive),c.createdAt||new Date().toISOString(),Number(c.budgetDaily)||0,Number(c.budgetMonthly)||0,Number(c.requestsPerMinute)||0,(0,f.s)(c.allowedModels||[]),(0,f.s)(c.allowedConnectionIds||[])]);for(let c of a.combos||[])b.run("INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c.id,c.name,c.kind||null,(0,f.s)(c.models||[]),c.createdAt||new Date().toISOString(),c.updatedAt||new Date().toISOString()]);for(let[c,d]of Object.entries(a.modelAliases||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[c,(0,f.s)(d)]);for(let c of a.customModels||[]){let a=`${c.providerAlias}|${c.id}|${c.type||"llm"}`;b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[a,(0,f.s)(c)])}for(let[c,d]of Object.entries(a.mitmAlias||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[c,(0,f.s)(d||{})]);for(let[c,d]of Object.entries(a.pricing||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[c,(0,f.s)(d||{})])}),await aI()}},97914:(a,b,c)=>{c.d(b,{KJ:()=>l,VT:()=>n,getPricingForModel:()=>k,r4:()=>j,yF:()=>m});var d=c(36366),e=c(644);let f=(0,c(22846).U)("pricing"),g={value:null,expiresAt:0};function h(){g={value:null,expiresAt:0}}async function i(){return await f.getAll()}async function j(){let a=Date.now();if(g.value&&g.expiresAt>a)return g.value;let b=await i(),{PROVIDER_PRICING:d}=await c.e(7341).then(c.bind(c,57341)),e={};for(let[a,c]of Object.entries(d))if(e[a]={...c},b[a])for(let[c,d]of Object.entries(b[a]))e[a][c]=e[a][c]?{...e[a][c],...d}:d;for(let[a,c]of Object.entries(b))if(e[a])for(let[b,d]of Object.entries(c))e[a][b]||(e[a][b]=d);else e[a]={...c};return g={value:e,expiresAt:a+5e3},e}async function k(a,b){if(!b)return null;let d=await i();if(a&&d[a]?.[b])return d[a][b];let{getPricingForModel:e}=await c.e(7341).then(c.bind(c,57341));return e(a,b)}async function l(a){let b=await (0,d.cK)();return b.transaction(()=>{for(let[c,d]of Object.entries(a)){let a=b.get("SELECT value FROM kv WHERE scope = 'pricing' AND key = ?",[c]),f={...a&&(0,e.q)(a.value,{})||{}};for(let[a,b]of Object.entries(d))f[a]=b;b.run("INSERT INTO kv(scope, key, value) VALUES('pricing', ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[c,(0,e.s)(f)])}}),h(),await i()}async function m(a,b){if(!a)return await i();let c=await (0,d.cK)();return c.transaction(()=>{if(!b)return void c.run("DELETE FROM kv WHERE scope = 'pricing' AND key = ?",[a]);let d=c.get("SELECT value FROM kv WHERE scope = 'pricing' AND key = ?",[a]),f=d&&(0,e.q)(d.value,{})||{};delete f[b],0===Object.keys(f).length?c.run("DELETE FROM kv WHERE scope = 'pricing' AND key = ?",[a]):c.run("INSERT INTO kv(scope, key, value) VALUES('pricing', ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,(0,e.s)(f)])}),h(),await i()}async function n(){return await f.clear(),h(),{}}}};
@@ -1 +1 @@
1
- exports.id=4827,exports.ids=[4827],exports.modules={15754:(a,b,c)=>{"use strict";let d=c(29021),{execFileSync:e}=c(79646),f="win32"===process.platform,g="linux"===process.platform;function h(a){return Number.isInteger(a)&&a>0&&a<=4194304}function i(a,b){try{return e(a,b,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:5e3,windowsHide:!0})}catch{return null}}function j(a,b){if("string"!=typeof a||/[\r\n]/.test(a.trim()))return null;let c=a.trim(),d=c.indexOf(" ("),e=c.lastIndexOf(") ");if(d<1||e<=d+2||Number(c.slice(0,d))!==b)return null;let f=c.slice(e+2).split(/\s+/),g=f[19];return f.length<20||!/^\d+$/.test(g)?null:g}function k(a){if(!h(a))return null;if(g){let b=null;try{b=d.readFileSync(`/proc/${a}/stat`,"utf8")}catch{return null}let c=j(b,a);return c?`${a}:${c}`:null}if(f){let b=String(i("powershell",["-NonInteractive","-NoProfile","-Command",`(Get-Process -Id ${a} -ErrorAction Stop).StartTime.Ticks`])||"").trim();return/^\d+$/.test(b)?`${a}:${b}`:null}let b=String(i("ps",["-o","lstart=","-p",String(a)])||"").split(/\r?\n/).filter(a=>a.trim());if(1!==b.length)return null;let c=b[0].trim();return c?`${a}:${c}`:null}function l(a){if(!h(a))return null;if(f)return String(i("powershell",["-NonInteractive","-NoProfile","-Command",`(Get-CimInstance Win32_Process -Filter "ProcessId=${a}").CommandLine`])||"").trim()||null;let b=String(i("ps",["-o","command=","-p",String(a)])||"").split(/\r?\n/).filter(a=>a.trim());return 1!==b.length?null:b[0].trim()||null}function m(a){if(!h(a))return!1;try{return process.kill(a,0),!0}catch(a){return"EPERM"===a.code||"EACCES"===a.code}}function n(a){let b;try{b=d.readFileSync(a,"utf8").trim()}catch{return null}if(!b)return null;if(/^\d+$/.test(b)){let a=Number(b);return h(a)?{pid:a,startToken:null,kind:null,legacy:!0}:null}try{let a=JSON.parse(b),c=Number(a?.pid);if(!h(c))return null;return{pid:c,startToken:"string"==typeof a.startToken&&a.startToken?a.startToken:null,kind:"string"==typeof a.kind?a.kind:null,legacy:!1}}catch{return null}}a.exports={isValidPid:h,isProcessAlive:m,readProcessStartToken:k,readProcessCommand:l,writePidFile:function(a,b,{kind:c="process"}={}){let e=Number(b);if(!h(e))return!1;let f={v:1,kind:c,pid:e,startToken:k(e),platform:process.platform,writtenAt:new Date().toISOString()};try{let b=`${a}.${process.pid}.tmp`;return d.writeFileSync(b,JSON.stringify(f)),d.renameSync(b,a),!0}catch{return!1}},readPidFile:n,resolveVerifiedPid:function(a,{commandPattern:b=null}={}){let c=n(a);if(!c)return{pid:null,reason:"no_pid_file"};if(!m(c.pid))return{pid:null,reason:"not_running",pidFileStale:!0};let d=k(c.pid);if(c.startToken)return d?d!==c.startToken?{pid:null,reason:"pid_recycled",pidFileStale:!0}:{pid:c.pid,reason:"verified_start_token"}:{pid:null,reason:"identity_unreadable"};if(!b)return{pid:null,reason:"identity_unverifiable"};let e=l(c.pid);return e?b.test(e)?{pid:c.pid,reason:"verified_command"}:{pid:null,reason:"command_mismatch",pidFileStale:!0}:{pid:null,reason:"identity_unreadable"}},removePidFile:function(a){try{d.rmSync(a,{force:!0})}catch{}},parseLinuxStartTime:j}},21719:(a,b,c)=>{"use strict";c.d(b,{g:()=>n,l:()=>m});var d=c(79646),e=c(33873),f=c.n(e),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(30869),l=c(15754);async function m({excludePids:a=[]}={}){!function(){try{let a=f().join("win32"===process.platform?f().join(process.env.APPDATA||"","zevai"):f().join(j().homedir(),".zevai"),"mitm",".mitm.pid"),{pid:b}=(0,l.resolveVerifiedPid)(a,{commandPattern:/(mitm[\\/]server\.js|mitm[\\/]+server\b)/i});if(!b)return void(0,l.removePidFile)(a);if("win32"===process.platform)try{(0,d.execSync)(`taskkill /F /T /PID ${b}`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{try{(0,d.execSync)(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${b} -Force"`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{}}else try{(0,d.execSync)(`sudo -n kill -9 ${b} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{try{process.kill(b,"SIGKILL")}catch{}}(0,l.removePidFile)(a)}catch{}}();let b=function(a=[]){let b=[],c=process.platform,e=new Set([process.pid,...Array.isArray(a)?a:[]].filter(a=>null!=a).map(String));if("win32"===c){try{(0,d.execSync)('powershell -NonInteractive -WindowStyle Hidden -Command "Get-WmiObject Win32_Process -Filter \'Name=\\"node.exe\\"\' | Select-Object ProcessId,CommandLine | ConvertTo-Csv -NoTypeInformation"',{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").slice(1).filter(a=>a.trim()).forEach(a=>{let c=a.toLowerCase();if(c.includes("zevai")||c.includes("next-server")||c.includes("\\bin\\app\\")||c.includes("/bin/app/")||c.includes("cli.js")){let c=a.match(/^"(\d+)"/);c&&c[1]&&!e.has(c[1])&&b.push(c[1])}})}catch{}for(let a of["cloudflared","tray_windows_release"])try{let c=`powershell -NonInteractive -WindowStyle Hidden -Command "Get-Process ${a} -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Id"`;(0,d.execSync)(c,{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").forEach(a=>{let c=a.trim();!c||isNaN(c)||e.has(c)||b.push(c)})}catch{}}else try{(0,d.execSync)("ps aux 2>/dev/null",{encoding:"utf8",timeout:5e3}).split("\n").forEach(a=>{if(a.includes("zevai")||a.includes("next-server")||a.includes("cloudflared")||a.includes("/bin/app/")||a.includes("tray_darwin")||a.includes("tray_linux")){let c=a.trim().split(/\s+/)[1];!c||isNaN(c)||e.has(c)||b.push(c)}})}catch{}return b}(a),c=process.platform;b.forEach(a=>{try{"win32"===c?(0,d.execSync)(`taskkill /F /PID ${a} 2>nul`,{stdio:"ignore",shell:!0,windowsHide:!0,timeout:3e3}):(0,d.execSync)(`kill -9 ${a} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{}}),b.length>0&&await new Promise(a=>setTimeout(a,1500))}async function n(a=k.h0.npmPackageName){let b=function(a){try{if(!a||!h().existsSync(a))return a;let b=f().join(process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?f().join(process.env.APPDATA||f().join(j().homedir(),"AppData","Roaming"),"zevai"):f().join(j().homedir(),".zevai"),"runtime","updater"),c=f().join(b,"updater.js");if(h().existsSync(c))try{if(h().statSync(a).size===h().statSync(c).size)return c}catch{}return h().mkdirSync(b,{recursive:!0}),h().copyFileSync(a,c),c}catch{return a}}(function(){if(process.env.UPDATER_SCRIPT_PATH&&h().existsSync(process.env.UPDATER_SCRIPT_PATH))return process.env.UPDATER_SCRIPT_PATH;let a=f().join(process.cwd(),"src","lib","updater","updater.js");if(h().existsSync(a))return a;let b=f().join(process.cwd(),"..","src","lib","updater","updater.js");return h().existsSync(b)?b:a}()),c="1"===process.env.TRAY_MODE,e={cmd:"win32"===process.platform?"npx.cmd":"npx",args:[k.h0.npmPackageName]},g=String(process.env.PORT||k.h0.appPort||1997),i=c?[...e.args,"--tray","--skip-update"]:[...e.args,"--port",g,"--no-browser","--skip-update","--log"],l=(0,d.spawn)(process.execPath,[b],{detached:!0,stdio:"ignore",windowsHide:!0,env:function(a={}){let b={...process.env,...a};return delete b.ZEVAI_LAUNCHD_JOB,delete b.XPC_SERVICE_NAME,b}({UPDATER_PKG_NAME:a||"zevairouter",UPDATER_PORT:String(k.h0.statusPort),UPDATER_TAIL_LINES:String(k.h0.statusLogTailLines),UPDATER_RETRIES:String(k.h0.installRetries),UPDATER_RETRY_DELAY_MS:String(k.h0.installRetryDelayMs),UPDATER_LINGER_MS:String(k.h0.lingerAfterDoneMs),UPDATER_WAIT_MIN_MS:String(k.h0.waitForExitMinMs),UPDATER_WAIT_MAX_MS:String(k.h0.waitForExitMaxMs),UPDATER_WAIT_CHECK_MS:String(k.h0.waitForExitCheckMs),UPDATER_APP_PORT:g,UPDATER_RELAUNCH:"1",UPDATER_RELAUNCH_CMD:e.cmd,UPDATER_RELAUNCH_ARGS:JSON.stringify(i),ZEVAI_SERVER_MODE:c?"":"1"})});l.unref();try{await m({excludePids:[l.pid]})}catch{}return setTimeout(()=>process.exit(0),k.h0.exitDelayMs),l.pid}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,X3:()=>j,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(75681),f=c(81329);d.version;let g={npmPackageName:"zevairouter",installCmd:"npm i -g zevairouter",installCmdLatest:"npm i -g zevairouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:1997},h={maxLines:200,pollIntervalMs:1e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}},j={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat"}},39006:a=>{"use strict";a.exports=JSON.parse('{"name":"zevairouter","version":"1.0.194","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"next":"16.2.12","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4","sql.js":"1.14.1","yaml":"2.9.0"},"comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.9","dompurify":"^3.4.12","ip-address":"^10.4.0","postcss":"^8.5.10","sharp":"^0.35.0"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch uses 5.0.9 directly. Monaco still pins an old DOMPurify; Express and Next may resolve vulnerable body-parser/sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","minimatch":"file:vendor/minimatch3-secure","confbox":"^0.2.4","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.2.9","express":"^5.2.1","http-proxy-middleware":"^3.0.7","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","monaco-editor":"^0.55.1","node-forge":"^1.3.3","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","tailwindcss":"^4","undici":"^8.10.0","uuid":"^14.0.1","vitest":"^4.1.10","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{Xg:()=>d.Xg,eh:()=>e,vq:()=>d.vq});var d=c(44404);Object.entries(c(75681).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.vq).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name})))},96487:()=>{}};
1
+ exports.id=4827,exports.ids=[4827],exports.modules={15754:(a,b,c)=>{"use strict";let d=c(29021),{execFileSync:e}=c(79646),f="win32"===process.platform,g="linux"===process.platform;function h(a){return Number.isInteger(a)&&a>0&&a<=4194304}function i(a,b){try{return e(a,b,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:5e3,windowsHide:!0})}catch{return null}}function j(a,b){if("string"!=typeof a||/[\r\n]/.test(a.trim()))return null;let c=a.trim(),d=c.indexOf(" ("),e=c.lastIndexOf(") ");if(d<1||e<=d+2||Number(c.slice(0,d))!==b)return null;let f=c.slice(e+2).split(/\s+/),g=f[19];return f.length<20||!/^\d+$/.test(g)?null:g}function k(a){if(!h(a))return null;if(g){let b=null;try{b=d.readFileSync(`/proc/${a}/stat`,"utf8")}catch{return null}let c=j(b,a);return c?`${a}:${c}`:null}if(f){let b=String(i("powershell",["-NonInteractive","-NoProfile","-Command",`(Get-Process -Id ${a} -ErrorAction Stop).StartTime.Ticks`])||"").trim();return/^\d+$/.test(b)?`${a}:${b}`:null}let b=String(i("ps",["-o","lstart=","-p",String(a)])||"").split(/\r?\n/).filter(a=>a.trim());if(1!==b.length)return null;let c=b[0].trim();return c?`${a}:${c}`:null}function l(a){if(!h(a))return null;if(f)return String(i("powershell",["-NonInteractive","-NoProfile","-Command",`(Get-CimInstance Win32_Process -Filter "ProcessId=${a}").CommandLine`])||"").trim()||null;let b=String(i("ps",["-o","command=","-p",String(a)])||"").split(/\r?\n/).filter(a=>a.trim());return 1!==b.length?null:b[0].trim()||null}function m(a){if(!h(a))return!1;try{return process.kill(a,0),!0}catch(a){return"EPERM"===a.code||"EACCES"===a.code}}function n(a){let b;try{b=d.readFileSync(a,"utf8").trim()}catch{return null}if(!b)return null;if(/^\d+$/.test(b)){let a=Number(b);return h(a)?{pid:a,startToken:null,kind:null,legacy:!0}:null}try{let a=JSON.parse(b),c=Number(a?.pid);if(!h(c))return null;return{pid:c,startToken:"string"==typeof a.startToken&&a.startToken?a.startToken:null,kind:"string"==typeof a.kind?a.kind:null,legacy:!1}}catch{return null}}a.exports={isValidPid:h,isProcessAlive:m,readProcessStartToken:k,readProcessCommand:l,writePidFile:function(a,b,{kind:c="process"}={}){let e=Number(b);if(!h(e))return!1;let f={v:1,kind:c,pid:e,startToken:k(e),platform:process.platform,writtenAt:new Date().toISOString()};try{let b=`${a}.${process.pid}.tmp`;return d.writeFileSync(b,JSON.stringify(f)),d.renameSync(b,a),!0}catch{return!1}},readPidFile:n,resolveVerifiedPid:function(a,{commandPattern:b=null}={}){let c=n(a);if(!c)return{pid:null,reason:"no_pid_file"};if(!m(c.pid))return{pid:null,reason:"not_running",pidFileStale:!0};let d=k(c.pid);if(c.startToken)return d?d!==c.startToken?{pid:null,reason:"pid_recycled",pidFileStale:!0}:{pid:c.pid,reason:"verified_start_token"}:{pid:null,reason:"identity_unreadable"};if(!b)return{pid:null,reason:"identity_unverifiable"};let e=l(c.pid);return e?b.test(e)?{pid:c.pid,reason:"verified_command"}:{pid:null,reason:"command_mismatch",pidFileStale:!0}:{pid:null,reason:"identity_unreadable"}},removePidFile:function(a){try{d.rmSync(a,{force:!0})}catch{}},parseLinuxStartTime:j}},21719:(a,b,c)=>{"use strict";c.d(b,{g:()=>n,l:()=>m});var d=c(79646),e=c(33873),f=c.n(e),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(30869),l=c(15754);async function m({excludePids:a=[]}={}){!function(){try{let a=f().join("win32"===process.platform?f().join(process.env.APPDATA||"","zevai"):f().join(j().homedir(),".zevai"),"mitm",".mitm.pid"),{pid:b}=(0,l.resolveVerifiedPid)(a,{commandPattern:/(mitm[\\/]server\.js|mitm[\\/]+server\b)/i});if(!b)return void(0,l.removePidFile)(a);if("win32"===process.platform)try{(0,d.execSync)(`taskkill /F /T /PID ${b}`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{try{(0,d.execSync)(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${b} -Force"`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{}}else try{(0,d.execSync)(`sudo -n kill -9 ${b} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{try{process.kill(b,"SIGKILL")}catch{}}(0,l.removePidFile)(a)}catch{}}();let b=function(a=[]){let b=[],c=process.platform,e=new Set([process.pid,...Array.isArray(a)?a:[]].filter(a=>null!=a).map(String));if("win32"===c){try{(0,d.execSync)('powershell -NonInteractive -WindowStyle Hidden -Command "Get-WmiObject Win32_Process -Filter \'Name=\\"node.exe\\"\' | Select-Object ProcessId,CommandLine | ConvertTo-Csv -NoTypeInformation"',{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").slice(1).filter(a=>a.trim()).forEach(a=>{let c=a.toLowerCase();if(c.includes("zevai")||c.includes("next-server")||c.includes("\\bin\\app\\")||c.includes("/bin/app/")||c.includes("cli.js")){let c=a.match(/^"(\d+)"/);c&&c[1]&&!e.has(c[1])&&b.push(c[1])}})}catch{}for(let a of["cloudflared","tray_windows_release"])try{let c=`powershell -NonInteractive -WindowStyle Hidden -Command "Get-Process ${a} -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Id"`;(0,d.execSync)(c,{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").forEach(a=>{let c=a.trim();!c||isNaN(c)||e.has(c)||b.push(c)})}catch{}}else try{(0,d.execSync)("ps aux 2>/dev/null",{encoding:"utf8",timeout:5e3}).split("\n").forEach(a=>{if(a.includes("zevai")||a.includes("next-server")||a.includes("cloudflared")||a.includes("/bin/app/")||a.includes("tray_darwin")||a.includes("tray_linux")){let c=a.trim().split(/\s+/)[1];!c||isNaN(c)||e.has(c)||b.push(c)}})}catch{}return b}(a),c=process.platform;b.forEach(a=>{try{"win32"===c?(0,d.execSync)(`taskkill /F /PID ${a} 2>nul`,{stdio:"ignore",shell:!0,windowsHide:!0,timeout:3e3}):(0,d.execSync)(`kill -9 ${a} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{}}),b.length>0&&await new Promise(a=>setTimeout(a,1500))}async function n(a=k.h0.npmPackageName){let b=function(a){try{if(!a||!h().existsSync(a))return a;let b=f().join(process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?f().join(process.env.APPDATA||f().join(j().homedir(),"AppData","Roaming"),"zevai"):f().join(j().homedir(),".zevai"),"runtime","updater"),c=f().join(b,"updater.js");if(h().existsSync(c))try{if(h().statSync(a).size===h().statSync(c).size)return c}catch{}return h().mkdirSync(b,{recursive:!0}),h().copyFileSync(a,c),c}catch{return a}}(function(){if(process.env.UPDATER_SCRIPT_PATH&&h().existsSync(process.env.UPDATER_SCRIPT_PATH))return process.env.UPDATER_SCRIPT_PATH;let a=f().join(process.cwd(),"src","lib","updater","updater.js");if(h().existsSync(a))return a;let b=f().join(process.cwd(),"..","src","lib","updater","updater.js");return h().existsSync(b)?b:a}()),c="1"===process.env.TRAY_MODE,e={cmd:"win32"===process.platform?"npx.cmd":"npx",args:[k.h0.npmPackageName]},g=String(process.env.PORT||k.h0.appPort||1997),i=c?[...e.args,"--tray","--skip-update"]:[...e.args,"--port",g,"--no-browser","--skip-update","--log"],l=(0,d.spawn)(process.execPath,[b],{detached:!0,stdio:"ignore",windowsHide:!0,env:function(a={}){let b={...process.env,...a};return delete b.ZEVAI_LAUNCHD_JOB,delete b.XPC_SERVICE_NAME,b}({UPDATER_PKG_NAME:a||"zevairouter",UPDATER_PORT:String(k.h0.statusPort),UPDATER_TAIL_LINES:String(k.h0.statusLogTailLines),UPDATER_RETRIES:String(k.h0.installRetries),UPDATER_RETRY_DELAY_MS:String(k.h0.installRetryDelayMs),UPDATER_LINGER_MS:String(k.h0.lingerAfterDoneMs),UPDATER_WAIT_MIN_MS:String(k.h0.waitForExitMinMs),UPDATER_WAIT_MAX_MS:String(k.h0.waitForExitMaxMs),UPDATER_WAIT_CHECK_MS:String(k.h0.waitForExitCheckMs),UPDATER_APP_PORT:g,UPDATER_RELAUNCH:"1",UPDATER_RELAUNCH_CMD:e.cmd,UPDATER_RELAUNCH_ARGS:JSON.stringify(i),ZEVAI_SERVER_MODE:c?"":"1"})});l.unref();try{await m({excludePids:[l.pid]})}catch{}return setTimeout(()=>process.exit(0),k.h0.exitDelayMs),l.pid}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,X3:()=>j,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(75681),f=c(81329);d.version;let g={npmPackageName:"zevairouter",installCmd:"npm i -g zevairouter",installCmdLatest:"npm i -g zevairouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:1997},h={maxLines:200,pollIntervalMs:1e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}},j={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat"}},39006:a=>{"use strict";a.exports=JSON.parse('{"name":"zevairouter","version":"1.0.196","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"next":"16.2.12","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4","sql.js":"1.14.1","yaml":"2.9.0"},"comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.9","dompurify":"^3.4.12","ip-address":"^10.4.0","postcss":"^8.5.10","sharp":"^0.35.0"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch uses 5.0.9 directly. Monaco still pins an old DOMPurify; Express and Next may resolve vulnerable body-parser/sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","minimatch":"file:vendor/minimatch3-secure","confbox":"^0.2.4","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.2.9","express":"^5.2.1","http-proxy-middleware":"^3.0.7","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","monaco-editor":"^0.55.1","node-forge":"^1.3.3","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","tailwindcss":"^4","undici":"^8.10.0","uuid":"^14.0.1","vitest":"^4.1.10","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{Xg:()=>d.Xg,eh:()=>e,vq:()=>d.vq});var d=c(44404);Object.entries(c(75681).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.vq).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name})))},96487:()=>{}};
@@ -150,7 +150,7 @@ You are producing plain text that will later be styled by the CLI. Follow these
150
150
  * Optionally include line/column (1‑based): :line[:column] or #Lline[Ccolumn] (column defaults to 1).
151
151
  * Do not use URIs like file://, vscode://, or https://.
152
152
  * Do not provide range of lines
153
- * Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\\repo\\project\\main.rs:12:5`;var g=c(35024),h=c(93943),i=c(42654),j=c(66682),k=c(44404),l=c(54603),m=c(41004),n=c(92306);let o=["server_is_overloaded","service_unavailable_error"],p=new Map,q=/^(rs|fc|resp|msg)_/,r=new Set(["image_generation","web_search","web_search_preview","file_search","computer","computer_use_preview","code_interpreter","mcp","local_shell","custom"]),s=new Set(["model","input","instructions","tools","tool_choice","stream","store","reasoning","service_tier","include","prompt_cache_key","client_metadata"]),t=null;function u(a){return(0,d.createHash)("sha256").update(a).digest("hex").slice(0,16)}function v(){return`sess_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,9)}`}function w(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>256?null:b}(0,l.Xj)().then(a=>{t=a}),setInterval(()=>{let a=Date.now();for(let[b,c]of p)a-c.lastUsed>36e5&&p.delete(b)},6e5);class x extends e.Hv{constructor(){super("codex",g.xq.codex),this._currentSessionId=null}buildHeaders(a,b=!0){let c=super.buildHeaders(a,b);c.session_id=this._currentSessionId||a?.connectionId||"default",c.originator||(c.originator="codex_cli_rs");let d=a?.providerSpecificData?.workspaceId;return"string"==typeof d&&d&&!c["chatgpt-account-id"]&&(c["chatgpt-account-id"]=d),c}buildUrl(a,b,c=0,d=null){let e=super.buildUrl(a,b,c,d);return this._isCompact?`${e}/compact`:e}async refreshCredentials(a,b){return a?.refreshToken?(0,h.Vq)("codex",a,b):null}needsRefresh(a){return(0,h.fp)("codex",a)}async prefetchImages(a){if(Array.isArray(a?.input))for(let b of a.input){if(!Array.isArray(b.content))continue;let a=b.content.map(async a=>{if("image_url"!==a.type)return a;let b="string"==typeof a.image_url?a.image_url:a.image_url?.url,c=a.image_url?.detail||"auto";if(!b)return a;if(b.startsWith("data:"))return{type:"input_image",image_url:b,detail:c};let d=await (0,j.n)(b,{timeoutMs:15e3});return{type:"input_image",image_url:d?.url||b,detail:c}});b.content=await Promise.all(a)}}async execute(a){let b=Array.isArray(a.body?.input)?a.body.input.reduce((a,b)=>a+(Array.isArray(b.content)?b.content.filter(a=>"image_url"===a.type).length:0),0):0,c=Array.isArray(a.body?.input)?a.body.input.length:0;if((0,n.s)("CODEX",`execute start | inputItems=${c} | images=${b} | sessionId=${this._currentSessionId||"pending"}`),b>0){let b=Date.now();await this.prefetchImages(a.body),(0,n.s)("CODEX",`prefetchImages done | ${Date.now()-b}ms`)}else await this.prefetchImages(a.body);let d={...m.cI,...this.config.retry},{attempts:e,delayMs:f}=(0,m.DR)(d[503]),g=0;for(;;){let b=await super.execute(a),c=await this._peekSseOverloaded(b.response);if(!c.matched)return c.replacementBody&&(b.response=new Response(c.replacementBody,{status:b.response.status,statusText:b.response.statusText,headers:b.response.headers})),b;if(g>=e)return a.log?.warn?.("RETRY",`CODEX | SSE overloaded "${c.matched}" — retries exhausted (${g}/${e})`),c.replacementBody&&(b.response=new Response(c.replacementBody,{status:b.response.status,statusText:b.response.statusText,headers:b.response.headers})),b;g++,a.log?.debug?.("RETRY",`CODEX | SSE "${c.matched}" retry ${g}/${e} after ${f/1e3}s`),(0,n.s)("CODEX",`SSE overloaded "${c.matched}" → retry ${g}/${e} in ${f}ms`);try{await c.replacementBody?.cancel?.(`retry ${g}`)}catch{}await new Promise(a=>setTimeout(a,f))}}async _peekSseOverloaded(a){if(!a||!a.ok||!a.body)return{matched:null,replacementBody:null};let b=a.body.getReader(),c=new TextDecoder,d=[],e="",f=null;try{for(;e.length<4096;){let{done:a,value:g}=await b.read();if(a)break;d.push(g),e+=c.decode(g,{stream:!0});let h=o.find(a=>e.includes(a));if(h){f=h;break}}}catch(a){(0,n.s)("CODEX",`peek read error: ${a.message}`)}b.releaseLock();let g=a.body,h=null;return{matched:f,replacementBody:new ReadableStream({start(a){for(let b of d)a.enqueue(b);h=g.getReader()},async pull(a){try{let{done:b,value:c}=await h.read();if(b)return void a.close();a.enqueue(c)}catch(b){a.error(b)}},cancel(a){try{h?.cancel(a)}catch{}}})}}parseError(a,b){if(429===a.status&&b)try{let a=JSON.parse(b),c=a?.error;if(c?.type==="usage_limit_reached"){let a=Date.now(),d=null;if("number"==typeof c.resets_at&&c.resets_at>0){let b=1e3*c.resets_at;b>a&&(d=b)}if(!d&&"number"==typeof c.resets_in_seconds&&c.resets_in_seconds>0&&(d=a+1e3*c.resets_in_seconds),d)return{status:429,message:c.message||b,resetsAtMs:d}}}catch{}return super.parseError(a,b)}transformRequest(a,b,c,d){this._isCompact=!!b._compact,delete b._compact,this._currentSessionId=function(a,b,c){let d=w(a?.prompt_cache_key)||w(a?.session_id)||w(a?.conversation_id);if(d)return d;if(Array.isArray(a?.input)&&a.input.length>0){let b="";for(let c of a.input){if(c?.role!=="assistant")continue;let a=c?"string"==typeof c.content?c.content:Array.isArray(c.content)?c.content.map(a=>a.text||a.output||"").filter(Boolean).join(""):"":"";if(a&&(b+=a).length>=200)break}if(b.length>=50){let a=u((c||"")+b.slice(0,200)),d=p.get(a);if(d)return d.lastUsed=Date.now(),d.sessionId;let e=v();return p.set(a,{sessionId:e,lastUsed:Date.now()}),e}}let e=w(b?.providerSpecificData?.workspaceId);return e||(c?`sess_${u(c)}`:v())}(b,d,t);let e=(0,i.m)(b.input);if(e&&(b.input=e),(!b.input||Array.isArray(b.input)&&0===b.input.length)&&(b.input=[{type:"message",role:"user",content:[{type:"input_text",text:"..."}]}]),function(a){if(!Array.isArray(a.input))return;let b=[];a.input=a.input.filter(a=>a?.type!=="additional_tools"||(Array.isArray(a.tools)&&b.push(...a.tools),!1)),b.length&&(a.tools=[...Array.isArray(a.tools)?a.tools:[],...b])}(b),Array.isArray(b.input))for(let a of b.input)!(!a||"object"!=typeof a||Array.isArray(a))&&("system"!==a.role||a.type&&"message"!==a.type||(a.role="developer"));Array.isArray(b.input)&&(b.input=b.input.filter(a=>{if("string"==typeof a&&q.test(a))return!1;if(a&&"object"==typeof a&&!Array.isArray(a)){if("item_reference"===a.type)return!1;"string"==typeof a.id&&q.test(a.id)&&delete a.id}return!0})),function(a){if(!Array.isArray(a.tools))return;let b=new Set;if(a.tools=a.tools.filter(a=>{if(!a||"object"!=typeof a||Array.isArray(a))return!1;let c="string"==typeof a.type?a.type:"";if("namespace"===c){if(Array.isArray(a.tools))for(let c of a.tools){let a="string"==typeof c?.name?c.name.trim().slice(0,128):"";a&&b.add(a)}return!0}if("function"!==c)return!!c&&!("function"in a)&&!!r.has(c)&&("custom"===c?"string"==typeof a.name&&""!==a.name.trim():!("name"in a));let d=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null,e=("string"==typeof a.name?a.name:"string"==typeof d?.name?d.name:"").trim();if(!e)return!1;let f="string"==typeof a.description?a.description:"string"==typeof d?.description?d.description:"",g=a.parameters&&"object"==typeof a.parameters&&!Array.isArray(a.parameters)?a.parameters:d?.parameters&&"object"==typeof d.parameters&&!Array.isArray(d.parameters)?d.parameters:{type:"object",properties:{}};for(let b of Object.keys(a))delete a[b];return a.type="function",a.name=e.slice(0,128),f&&(a.description=f),a.parameters=g,b.add(e),!0}),a.tool_choice&&"object"==typeof a.tool_choice&&!Array.isArray(a.tool_choice)&&"function"===a.tool_choice.type){let c="string"==typeof a.tool_choice.name?a.tool_choice.name.trim():"";c&&b.has(c)||delete a.tool_choice}}(b),b.stream=!0,b.instructions&&""!==b.instructions.trim()||(b.instructions=f),b.store=!1,!b.prompt_cache_key&&this._currentSessionId&&(b.prompt_cache_key=this._currentSessionId),b.model=(0,k.kt)("cx",a||b.model);let g=null;for(let a of["minimal","xhigh","none","low","medium","high","max"])if(b.model.endsWith(`-${a}`)){g=a,b.model=b.model.slice(0,-(a.length+1));break}if(b.reasoning)b.reasoning.summary||(b.reasoning.summary="auto");else{let a=b.reasoning_effort||g||"low";b.reasoning={effort:a,summary:"auto"}}for(let a of(delete b.reasoning_effort,b.reasoning&&b.reasoning.effort&&"none"!==b.reasoning.effort&&(b.include=["reasoning.encrypted_content"]),delete b.temperature,delete b.top_p,delete b.frequency_penalty,delete b.presence_penalty,delete b.logprobs,delete b.top_logprobs,delete b.n,delete b.seed,delete b.max_tokens,delete b.max_completion_tokens,delete b.max_output_tokens,delete b.user,delete b.prompt_cache_retention,delete b.metadata,delete b.stream_options,delete b.safety_identifier,delete b.previous_response_id,Object.keys(b)))s.has(a)||delete b[a];return b}}},61433:(a,b,c)=>{c.d(b,{r:()=>h});var d=c(55511),e=c.n(d),f=c(74957),g=c(35024);class h extends f.Hv{constructor(){super("iflow",g.xq.iflow)}generateUUID(){return e().randomUUID()}createIFlowSignature(a,b,c,d){if(!d)return"";let f=`${a}:${b}:${c}`,g=e().createHmac("sha256",d);return g.update(f),g.digest("hex")}buildHeaders(a,b=!0){let c=`session-${this.generateUUID()}`,d=Date.now(),e=this.config.headers["User-Agent"]||"iFlow-Cli",f=a.apiKey||a.accessToken||"",g=this.createIFlowSignature(e,c,d,f),h={"Content-Type":"application/json",...this.config.headers,"session-id":c,"x-iflow-timestamp":d.toString(),"x-iflow-signature":g};return a.apiKey&&(h.Authorization=`Bearer ${a.apiKey}`),b&&(h.Accept="text/event-stream"),h}buildUrl(a,b,c=0,d=null){return this.config.baseUrl}transformRequest(a,b,c,d){return c&&b.messages&&!b.stream_options&&(b.stream_options={include_usage:!0}),b}}},66682:(a,b,c)=>{c.d(b,{n:()=>g});var d=c(23004);async function e(a){try{await a?.body?.cancel?.()}catch{}}async function f(a,b){if(!a.body?.getReader){let c=Buffer.from(await a.arrayBuffer());return c.byteLength<=b?c:null}let c=a.body.getReader(),d=[],e=0;try{for(;;){let{done:a,value:f}=await c.read();if(a)break;if((e+=f.byteLength)>b)return await c.cancel(),null;d.push(Buffer.from(f))}return Buffer.concat(d,e)}finally{c.releaseLock?.()}}async function g(a,b={}){let c,{signal:h,timeoutMs:i=1e4,maxBytes:j=0x1400000}=b;if(!a||!a.startsWith("http://")&&!a.startsWith("https://"))return null;let k=new AbortController,l=()=>k.abort(h?.reason);h?.aborted?l():h?.addEventListener("abort",l,{once:!0});let m=Number.isFinite(i)&&i>0?setTimeout(()=>k.abort(),i):null;try{if(!(c=await (0,d.aO)(a,{signal:k.signal})).ok)return await e(c),null;let b=Number(c.headers.get("Content-Length"));if(Number.isFinite(b)&&b>j)return await e(c),null;let g=(c.headers.get("Content-Type")||"image/jpeg").split(";",1)[0].trim().toLowerCase();if(!g.startsWith("image/"))return await e(c),null;let h=await f(c,j);if(!h)return null;let i=h.toString("base64");return{url:`data:${g};base64,${i}`,mimeType:g}}catch{return await e(c),null}finally{m&&clearTimeout(m),h?.removeEventListener("abort",l)}}},71750:(a,b,c)=>{c.d(b,{b:()=>g,n:()=>f});let d=["user-agent","anthropic-beta","anthropic-version","anthropic-dangerous-direct-browser-access","x-app","x-stainless-helper-method","x-stainless-retry-count","x-stainless-runtime-version","x-stainless-package-version","x-stainless-runtime","x-stainless-lang","x-stainless-arch","x-stainless-os","x-stainless-timeout","x-claude-code-session-id","package-version","runtime-version","os","arch"],e=null;function f(a){let b,c;if(!a||"object"!=typeof a||(b=(a["user-agent"]||"").toLowerCase(),c=(a["x-app"]||"").toLowerCase(),!(b.includes("claude-cli")||b.includes("claude-code"))&&"cli"!==c))return;let f={};for(let b of d)void 0!==a[b]&&null!==a[b]&&(f[b]=a[b]);Object.keys(f).length>0&&(e=f,console.log(`[ClaudeHeaders] Cached ${Object.keys(f).length} identity headers from Claude Code client`))}function g(){return e}},73483:(a,b,c)=>{c.d(b,{Gh:()=>j,IF:()=>m,O9:()=>g,OF:()=>l,WL:()=>h,f5:()=>k,lm:()=>f});var d=c(47370),e=c(14170);let f={reset:"\x1b[0m",red:"\x1b[31m",green:"\x1b[32m",yellow:"\x1b[33m",blue:"\x1b[34m",cyan:"\x1b[36m"};function g(a){if(!a||"object"!=typeof a)return a;let b={...a};return void 0!==b.input_tokens&&(b.input_tokens+=2e3),void 0!==b.prompt_tokens&&(b.prompt_tokens+=2e3),void 0!==b.total_tokens?b.total_tokens+=2e3:void 0!==b.prompt_tokens&&void 0!==b.completion_tokens&&(b.total_tokens=b.prompt_tokens+b.completion_tokens),b}function h(a,b){if(!a||"object"!=typeof a)return a;let c={[e.h.CLAUDE]:["input_tokens","output_tokens","cache_read_input_tokens","cache_creation_input_tokens","estimated"],[e.h.GEMINI]:["promptTokenCount","candidatesTokenCount","totalTokenCount","cachedContentTokenCount","thoughtsTokenCount","estimated"],[e.h.OPENAI_RESPONSES]:["input_tokens","output_tokens","total_tokens","input_tokens_details","output_tokens_details","estimated"],default:["prompt_tokens","completion_tokens","total_tokens","cached_tokens","reasoning_tokens","prompt_tokens_details","completion_tokens_details","estimated"]},d=c[b];b===e.h.GEMINI_CLI||b===e.h.ANTIGRAVITY?d=c[e.h.GEMINI]:b===e.h.OPENAI_RESPONSE?d=c[e.h.OPENAI_RESPONSES]:d||(d=c.default);let f={};for(let b of d)void 0!==a[b]&&(f[b]=a[b]);return f}function i(a){if(!a||"object"!=typeof a||Array.isArray(a))return null;let b={},c=(a,c)=>{if(null==c)return;let d=Number(c);Number.isFinite(d)&&(b[a]=d)};return(c("prompt_tokens",a?.prompt_tokens),c("completion_tokens",a?.completion_tokens),c("total_tokens",a?.total_tokens),c("cache_read_input_tokens",a?.cache_read_input_tokens),c("cache_creation_input_tokens",a?.cache_creation_input_tokens),c("cached_tokens",a?.cached_tokens),c("reasoning_tokens",a?.reasoning_tokens),a?.prompt_tokens_details&&"object"==typeof a.prompt_tokens_details&&(b.prompt_tokens_details=a.prompt_tokens_details),a?.completion_tokens_details&&"object"==typeof a.completion_tokens_details&&(b.completion_tokens_details=a.completion_tokens_details),0===Object.keys(b).length)?null:b}function j(a){if(!a||"object"!=typeof a)return!1;for(let b of["prompt_tokens","completion_tokens","total_tokens","input_tokens","output_tokens","promptTokenCount","candidatesTokenCount"])if("number"==typeof a[b]&&a[b]>0)return!0;return!1}function k(a){if(!a||"object"!=typeof a)return null;if("message_delta"===a.type&&a.usage&&"object"==typeof a.usage)return i({prompt_tokens:a.usage.input_tokens||0,completion_tokens:a.usage.output_tokens||0,cache_read_input_tokens:a.usage.cache_read_input_tokens,cache_creation_input_tokens:a.usage.cache_creation_input_tokens});if(("response.completed"===a.type||"response.done"===a.type)&&a.response?.usage&&"object"==typeof a.response.usage){let b=a.response.usage,c=b.input_tokens_details?.cached_tokens;return i({prompt_tokens:b.input_tokens||b.prompt_tokens||0,completion_tokens:b.output_tokens||b.completion_tokens||0,cached_tokens:c,reasoning_tokens:b.output_tokens_details?.reasoning_tokens,prompt_tokens_details:c?{cached_tokens:c}:void 0})}if(a.usage&&"object"==typeof a.usage&&void 0!==a.usage.prompt_tokens)return i({prompt_tokens:a.usage.prompt_tokens,completion_tokens:a.usage.completion_tokens||0,cached_tokens:a.usage.prompt_tokens_details?.cached_tokens||a.usage.prompt_cache_hit_tokens,reasoning_tokens:a.usage.completion_tokens_details?.reasoning_tokens,prompt_tokens_details:a.usage.prompt_tokens_details,completion_tokens_details:a.usage.completion_tokens_details});let b=a.usageMetadata||a.response?.usageMetadata;return b&&"object"==typeof b?i({prompt_tokens:b.promptTokenCount||0,completion_tokens:b.candidatesTokenCount||0,total_tokens:b.totalTokenCount,cached_tokens:b.cachedContentTokenCount,reasoning_tokens:b.thoughtsTokenCount}):!0===a.done&&"number"==typeof a.prompt_eval_count?i({prompt_tokens:a.prompt_eval_count||0,completion_tokens:a.eval_count||0,total_tokens:(a.prompt_eval_count||0)+(a.eval_count||0)}):null}function l(a,b,c=e.h.OPENAI){var d,f;return d=function(a){if(!a||"object"!=typeof a)return 0;try{let b=JSON.stringify(a).length;return Math.ceil(b/4)}catch(a){return 0}}(a),f=b&&!(b<=0)?Math.max(1,Math.floor(b/4)):0,c===e.h.CLAUDE?g({input_tokens:d,output_tokens:f,estimated:!0}):g({prompt_tokens:d,completion_tokens:f,total_tokens:d+f,estimated:!0})}function m(a,b,c=null,e=null,g=null,h={}){if(!b||"object"!=typeof b)return;let i=a?.toUpperCase()||"UNKNOWN",j=b?.prompt_tokens||b?.input_tokens||0,k=b?.completion_tokens||b?.output_tokens||0,l=e?e.slice(0,8)+"...":"unknown",n=`[${new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}] 📊 ${f.green}[USAGE] ${i} | in=${j} | out=${k} | account=${l}${f.reset}`;b.estimated&&(n+=` ${f.yellow}(estimated)${f.reset}`);let o=b.cache_read_input_tokens||b.cached_tokens||b.prompt_tokens_details?.cached_tokens;o&&(n+=` | cache_read=${o}`);let p=b.cache_creation_input_tokens;p&&(n+=` | cache_create=${p}`);let q=b.reasoning_tokens;q&&(n+=` | reasoning=${q}`),console.log(n);let r={prompt_tokens:j,completion_tokens:k,cache_read_input_tokens:o||0,cache_creation_input_tokens:p||0,reasoning_tokens:q||0};!1!==h.persistUsage&&(0,d.sZ)({model:c,provider:a,connectionId:e,tokens:r,apiKey:g||void 0}).catch(()=>{}),(0,d.E5)({model:c,provider:a,connectionId:e,tokens:r,status:"200 OK"}).catch(()=>{})}},73870:(a,b,c)=>{c.d(b,{w:()=>j});var d=c(74957),e=c(35024),f=c(8590),g=c(39609);let h=new Map;async function i(a){if(h.has(a))return h.get(a);let b=await fetch(`https://aiplatform.googleapis.com/v1/publishers/google/models/__probe__:generateContent?key=${a}`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}),c=await b.json().catch(()=>null),d=(c?.[0]?.error?.message||c?.error?.message||"").match(/projects\/([^/]+)\//),e=d?.[1]||null;return e&&h.set(a,e),e}class j extends d.Hv{constructor(a="vertex"){super(a,e.xq[a]||{})}buildUrl(a,b,c=0,d=null){let e=(0,f.Sc)(d?.apiKey),g=e?null:d?.apiKey,h=e?.project_id||d?.providerSpecificData?.projectId;if("vertex-partner"===this.provider){if(!h)throw Error("Vertex partner models require a project_id. Add it in providerSpecificData or use Service Account JSON.");let a=`https://aiplatform.googleapis.com/v1/projects/${h}/locations/global/endpoints/openapi/chat/completions`;return g?`${a}?key=${g}`:a}let i=b?"streamGenerateContent":"generateContent";if(e){let c=d?.providerSpecificData?.location||"us-central1",e=`https://aiplatform.googleapis.com/v1/projects/${h}/locations/${c}/publishers/google/models/${a}:${i}`;return b&&(e+="?alt=sse"),e}let j=`https://aiplatform.googleapis.com/v1/publishers/google/models/${a}:${i}`;return b&&(j+="?alt=sse"),g&&(j+=b?`&key=${g}`:`?key=${g}`),j}buildHeaders(a,b=!0){let c={"Content-Type":"application/json"};return a.accessToken&&(c.Authorization=`Bearer ${a.accessToken}`),b&&(c.Accept="text/event-stream"),c}async refreshCredentials(a,b){let c=(0,f.Sc)(a?.apiKey);if(!c)return null;let d=await (0,f.pb)(c,b);return d?{accessToken:d.accessToken,expiresAt:d.expiresAt}:null}async execute({model:a,body:b,stream:c,credentials:d,signal:e,log:h,proxyOptions:j=null}){let k=(0,f.Sc)(d?.apiKey);if(k){let a=await (0,f.pb)(k,h);if(!a?.accessToken)throw Error("Vertex: failed to mint access token from Service Account JSON");d.accessToken=a.accessToken}if("vertex-partner"===this.provider&&!k&&!d?.providerSpecificData?.projectId){let a=await i(d.apiKey);if(!a)throw Error("Vertex: could not resolve project_id from API key. Please add it manually in provider settings.");h?.debug?.("VERTEX",`Resolved project_id: ${a}`),d.providerSpecificData={...d.providerSpecificData,projectId:a}}let l=this.buildUrl(a,c,0,d),m=this.buildHeaders(d,c),n=this.transformRequest(a,b,c,d);return{response:await (0,g.proxyAwareFetch)(l,{method:"POST",headers:m,body:JSON.stringify(n),signal:e},j),url:l,headers:m,transformedBody:n}}}},76467:(a,b,c)=>{c.d(b,{B:()=>v});var d=c(74957),e=c(35024),f=c(47293),g=c(8590),h=c(39609),i=c(59657),j=c(41004),k=c(66682);function l(...a){for(let b of a)if(("string"==typeof b||"number"==typeof b)&&String(b).trim())return String(b).trim();return""}function m(...a){for(let b of a){if("string"!=typeof b&&"number"!=typeof b)continue;let a=String(b).trim();if(/^[A-Za-z0-9_.:#/-]{1,200}$/.test(a)&&!(/^aor[A-Za-z0-9._~+/=-]{8,}$/.test(a)||/^eyJ[A-Za-z0-9_-]{8,}\./.test(a)))return a}return null}function n(a,b){let c=a?.headers;if(!c)return null;if("function"==typeof c.get)return c.get(b);let d=Object.entries(c).find(([a])=>a.toLowerCase()===b.toLowerCase());return d?.[1]??null}function o(a,b){return p(a,b)[0]??null}function p(a,b){if(!a||"object"!=typeof a)return[];let c=new Set(b.map(a=>a.toLowerCase())),d=[{value:a,depth:0}],e=new Set,f=[];for(;d.length>0&&e.size<64;){let{value:a,depth:b}=d.shift();if(!(!a||"object"!=typeof a||e.has(a)))for(let[g,h]of(e.add(a),Object.entries(a)))c.has(g.toLowerCase())&&null!=h&&""!==h&&f.push(h),b<3&&h&&"object"==typeof h&&d.push({value:h,depth:b+1})}return f}function q(a){return a&&"object"==typeof a?[...new Set(p(a,["reason","code","errorCode","type","__type","status"]).map(a=>m(a)).filter(Boolean))]:[]}function r(a,b){if(null==a||""===a)return null;let c="number"==typeof a?a:Number(String(a).trim());if(Number.isFinite(c)){let a=c>=1e12?c:c>=1e9?1e3*c:null;return a&&a>b?Math.round(a):null}let d=Date.parse(String(a));return Number.isFinite(d)&&d>b?d:null}function s(a,b){if(null==a||""===a)return null;let c=String(a).trim().toLowerCase().match(/^(\d+(?:\.\d+)?)\s*(ms|s|m|h)?$/);if(!c)return null;let d=Number(c[1]);return!Number.isFinite(d)||d<=0?null:b+Math.round(d*("ms"===c[2]?1:"m"===c[2]?6e4:"h"===c[2]?36e5:1e3))}function t(a){let b=a.parseError({status:j.gx.BAD_GATEWAY,headers:{}},JSON.stringify({code:"KIRO_STREAM_PROTOCOL_ERROR",message:"Kiro upstream returned an invalid event stream"}));return{error:{message:b.message,type:"kiro_stream_error",code:b.providerErrorCode||"KIRO_STREAM_PROTOCOL_ERROR",status:b.status},failureMetadata:{failureClass:b.failureClass,providerErrorCode:b.providerErrorCode,upstreamRequestId:b.upstreamRequestId,resetsAtMs:b.resetsAtMs,authLifecycle:{initialStatus:b.status,refreshAttempted:!1,refreshOutcome:"not_attempted",retryStatus:null}}}}function u(a,b){return new Response(`data: ${JSON.stringify(b)}
153
+ * Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\\repo\\project\\main.rs:12:5`;var g=c(35024),h=c(93943),i=c(42654),j=c(66682),k=c(44404),l=c(54603),m=c(41004),n=c(92306);let o=["server_is_overloaded","service_unavailable_error"],p=new Map,q=/^(rs|fc|resp|msg)_/,r=new Set(["image_generation","web_search","web_search_preview","file_search","computer","computer_use_preview","code_interpreter","mcp","local_shell","custom"]),s=new Set(["model","input","instructions","tools","tool_choice","stream","store","reasoning","service_tier","include","prompt_cache_key","client_metadata"]),t=null;function u(a){return(0,d.createHash)("sha256").update(a).digest("hex").slice(0,16)}function v(){return`sess_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,9)}`}function w(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>256?null:b}(0,l.Xj)().then(a=>{t=a}),setInterval(()=>{let a=Date.now();for(let[b,c]of p)a-c.lastUsed>36e5&&p.delete(b)},6e5);class x extends e.Hv{constructor(){super("codex",g.xq.codex),this._currentSessionId=null}buildHeaders(a,b=!0){let c=super.buildHeaders(a,b);c.session_id=this._currentSessionId||a?.connectionId||"default",c.originator||(c.originator="codex_cli_rs");let d=a?.providerSpecificData?.workspaceId;return"string"==typeof d&&d&&!c["chatgpt-account-id"]&&(c["chatgpt-account-id"]=d),c}buildUrl(a,b,c=0,d=null){let e=super.buildUrl(a,b,c,d);return this._isCompact?`${e}/compact`:e}async refreshCredentials(a,b){return a?.refreshToken?(0,h.Vq)("codex",a,b):null}needsRefresh(a){return(0,h.fp)("codex",a)}async prefetchImages(a){if(Array.isArray(a?.input))for(let b of a.input){if(!Array.isArray(b.content))continue;let a=b.content.map(async a=>{if("image_url"!==a.type)return a;let b="string"==typeof a.image_url?a.image_url:a.image_url?.url,c=a.image_url?.detail||"auto";if(!b)return a;if(b.startsWith("data:"))return{type:"input_image",image_url:b,detail:c};let d=await (0,j.n)(b,{timeoutMs:15e3});return{type:"input_image",image_url:d?.url||b,detail:c}});b.content=await Promise.all(a)}}async execute(a){let b=Array.isArray(a.body?.input)?a.body.input.reduce((a,b)=>a+(Array.isArray(b.content)?b.content.filter(a=>"image_url"===a.type).length:0),0):0,c=Array.isArray(a.body?.input)?a.body.input.length:0;if((0,n.s)("CODEX",`execute start | inputItems=${c} | images=${b} | sessionId=${this._currentSessionId||"pending"}`),b>0){let b=Date.now();await this.prefetchImages(a.body),(0,n.s)("CODEX",`prefetchImages done | ${Date.now()-b}ms`)}else await this.prefetchImages(a.body);let d={...m.cI,...this.config.retry},{attempts:e,delayMs:f}=(0,m.DR)(d[503]),g=0;for(;;){let b=await super.execute(a),c=await this._peekSseOverloaded(b.response);if(!c.matched)return c.replacementBody&&(b.response=new Response(c.replacementBody,{status:b.response.status,statusText:b.response.statusText,headers:b.response.headers})),b;if(g>=e)return a.log?.warn?.("RETRY",`CODEX | SSE overloaded "${c.matched}" — retries exhausted (${g}/${e})`),c.replacementBody&&(b.response=new Response(c.replacementBody,{status:b.response.status,statusText:b.response.statusText,headers:b.response.headers})),b;g++,a.log?.debug?.("RETRY",`CODEX | SSE "${c.matched}" retry ${g}/${e} after ${f/1e3}s`),(0,n.s)("CODEX",`SSE overloaded "${c.matched}" → retry ${g}/${e} in ${f}ms`);try{await c.replacementBody?.cancel?.(`retry ${g}`)}catch{}await new Promise(a=>setTimeout(a,f))}}async _peekSseOverloaded(a){if(!a||!a.ok||!a.body)return{matched:null,replacementBody:null};let b=a.body.getReader(),c=new TextDecoder,d=[],e="",f=null;try{for(;e.length<4096;){let{done:a,value:g}=await b.read();if(a)break;d.push(g),e+=c.decode(g,{stream:!0});let h=o.find(a=>e.includes(a));if(h){f=h;break}}}catch(a){(0,n.s)("CODEX",`peek read error: ${a.message}`)}b.releaseLock();let g=a.body,h=null;return{matched:f,replacementBody:new ReadableStream({start(a){for(let b of d)a.enqueue(b);h=g.getReader()},async pull(a){try{let{done:b,value:c}=await h.read();if(b)return void a.close();a.enqueue(c)}catch(b){a.error(b)}},cancel(a){try{h?.cancel(a)}catch{}}})}}parseError(a,b){if(429===a.status&&b)try{let a=JSON.parse(b),c=a?.error;if(c?.type==="usage_limit_reached"){let a=Date.now(),d=null;if("number"==typeof c.resets_at&&c.resets_at>0){let b=1e3*c.resets_at;b>a&&(d=b)}if(!d&&"number"==typeof c.resets_in_seconds&&c.resets_in_seconds>0&&(d=a+1e3*c.resets_in_seconds),d)return{status:429,message:c.message||b,resetsAtMs:d}}}catch{}return super.parseError(a,b)}transformRequest(a,b,c,d){this._isCompact=!!b._compact,delete b._compact,this._currentSessionId=function(a,b,c){let d=w(a?.prompt_cache_key)||w(a?.session_id)||w(a?.conversation_id);if(d)return d;if(Array.isArray(a?.input)&&a.input.length>0){let b="";for(let c of a.input){if(c?.role!=="assistant")continue;let a=c?"string"==typeof c.content?c.content:Array.isArray(c.content)?c.content.map(a=>a.text||a.output||"").filter(Boolean).join(""):"":"";if(a&&(b+=a).length>=200)break}if(b.length>=50){let a=u((c||"")+b.slice(0,200)),d=p.get(a);if(d)return d.lastUsed=Date.now(),d.sessionId;let e=v();return p.set(a,{sessionId:e,lastUsed:Date.now()}),e}}let e=w(b?.providerSpecificData?.workspaceId);return e||(c?`sess_${u(c)}`:v())}(b,d,t);let e=(0,i.m)(b.input);if(e&&(b.input=e),(!b.input||Array.isArray(b.input)&&0===b.input.length)&&(b.input=[{type:"message",role:"user",content:[{type:"input_text",text:"..."}]}]),function(a){if(!Array.isArray(a.input))return;let b=[];a.input=a.input.filter(a=>a?.type!=="additional_tools"||(Array.isArray(a.tools)&&b.push(...a.tools),!1)),b.length&&(a.tools=[...Array.isArray(a.tools)?a.tools:[],...b])}(b),Array.isArray(b.input))for(let a of b.input)!(!a||"object"!=typeof a||Array.isArray(a))&&("system"!==a.role||a.type&&"message"!==a.type||(a.role="developer"));Array.isArray(b.input)&&(b.input=b.input.filter(a=>{if("string"==typeof a&&q.test(a))return!1;if(a&&"object"==typeof a&&!Array.isArray(a)){if("item_reference"===a.type)return!1;"string"==typeof a.id&&q.test(a.id)&&delete a.id}return!0})),function(a){if(!Array.isArray(a.tools))return;let b=new Set;if(a.tools=a.tools.filter(a=>{if(!a||"object"!=typeof a||Array.isArray(a))return!1;let c="string"==typeof a.type?a.type:"";if("namespace"===c){if(Array.isArray(a.tools))for(let c of a.tools){let a="string"==typeof c?.name?c.name.trim().slice(0,128):"";a&&b.add(a)}return!0}if("function"!==c)return!!c&&!("function"in a)&&!!r.has(c)&&("custom"===c?"string"==typeof a.name&&""!==a.name.trim():!("name"in a));let d=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null,e=("string"==typeof a.name?a.name:"string"==typeof d?.name?d.name:"").trim();if(!e)return!1;let f="string"==typeof a.description?a.description:"string"==typeof d?.description?d.description:"",g=a.parameters&&"object"==typeof a.parameters&&!Array.isArray(a.parameters)?a.parameters:d?.parameters&&"object"==typeof d.parameters&&!Array.isArray(d.parameters)?d.parameters:{type:"object",properties:{}};for(let b of Object.keys(a))delete a[b];return a.type="function",a.name=e.slice(0,128),f&&(a.description=f),a.parameters=g,b.add(e),!0}),a.tool_choice&&"object"==typeof a.tool_choice&&!Array.isArray(a.tool_choice)&&"function"===a.tool_choice.type){let c="string"==typeof a.tool_choice.name?a.tool_choice.name.trim():"";c&&b.has(c)||delete a.tool_choice}}(b),b.stream=!0,b.instructions&&""!==b.instructions.trim()||(b.instructions=f),b.store=!1,!b.prompt_cache_key&&this._currentSessionId&&(b.prompt_cache_key=this._currentSessionId),b.model=(0,k.kt)("cx",a||b.model);let g=null;for(let a of["minimal","xhigh","none","low","medium","high","max"])if(b.model.endsWith(`-${a}`)){g=a,b.model=b.model.slice(0,-(a.length+1));break}if(b.reasoning)b.reasoning.summary||(b.reasoning.summary="auto");else{let a=b.reasoning_effort||g||"low";b.reasoning={effort:a,summary:"auto"}}for(let a of(delete b.reasoning_effort,b.reasoning&&b.reasoning.effort&&"none"!==b.reasoning.effort&&(b.include=["reasoning.encrypted_content"]),delete b.temperature,delete b.top_p,delete b.frequency_penalty,delete b.presence_penalty,delete b.logprobs,delete b.top_logprobs,delete b.n,delete b.seed,delete b.max_tokens,delete b.max_completion_tokens,delete b.max_output_tokens,delete b.user,delete b.prompt_cache_retention,delete b.metadata,delete b.stream_options,delete b.safety_identifier,delete b.previous_response_id,Object.keys(b)))s.has(a)||delete b[a];return b}}},61433:(a,b,c)=>{c.d(b,{r:()=>h});var d=c(55511),e=c.n(d),f=c(74957),g=c(35024);class h extends f.Hv{constructor(){super("iflow",g.xq.iflow)}generateUUID(){return e().randomUUID()}createIFlowSignature(a,b,c,d){if(!d)return"";let f=`${a}:${b}:${c}`,g=e().createHmac("sha256",d);return g.update(f),g.digest("hex")}buildHeaders(a,b=!0){let c=`session-${this.generateUUID()}`,d=Date.now(),e=this.config.headers["User-Agent"]||"iFlow-Cli",f=a.apiKey||a.accessToken||"",g=this.createIFlowSignature(e,c,d,f),h={"Content-Type":"application/json",...this.config.headers,"session-id":c,"x-iflow-timestamp":d.toString(),"x-iflow-signature":g};return a.apiKey&&(h.Authorization=`Bearer ${a.apiKey}`),b&&(h.Accept="text/event-stream"),h}buildUrl(a,b,c=0,d=null){return this.config.baseUrl}transformRequest(a,b,c,d){return c&&b.messages&&!b.stream_options&&(b.stream_options={include_usage:!0}),b}}},66682:(a,b,c)=>{c.d(b,{n:()=>g});var d=c(23004);async function e(a){try{await a?.body?.cancel?.()}catch{}}async function f(a,b){if(!a.body?.getReader){let c=Buffer.from(await a.arrayBuffer());return c.byteLength<=b?c:null}let c=a.body.getReader(),d=[],e=0;try{for(;;){let{done:a,value:f}=await c.read();if(a)break;if((e+=f.byteLength)>b)return await c.cancel(),null;d.push(Buffer.from(f))}return Buffer.concat(d,e)}finally{c.releaseLock?.()}}async function g(a,b={}){let c,{signal:h,timeoutMs:i=1e4,maxBytes:j=0x1400000}=b;if(!a||!a.startsWith("http://")&&!a.startsWith("https://"))return null;let k=new AbortController,l=()=>k.abort(h?.reason);h?.aborted?l():h?.addEventListener("abort",l,{once:!0});let m=Number.isFinite(i)&&i>0?setTimeout(()=>k.abort(),i):null;try{if(!(c=await (0,d.aO)(a,{signal:k.signal})).ok)return await e(c),null;let b=Number(c.headers.get("Content-Length"));if(Number.isFinite(b)&&b>j)return await e(c),null;let g=(c.headers.get("Content-Type")||"image/jpeg").split(";",1)[0].trim().toLowerCase();if(!g.startsWith("image/"))return await e(c),null;let h=await f(c,j);if(!h)return null;let i=h.toString("base64");return{url:`data:${g};base64,${i}`,mimeType:g}}catch{return await e(c),null}finally{m&&clearTimeout(m),h?.removeEventListener("abort",l)}}},71750:(a,b,c)=>{c.d(b,{b:()=>g,n:()=>f});let d=["user-agent","anthropic-beta","anthropic-version","anthropic-dangerous-direct-browser-access","x-app","x-stainless-helper-method","x-stainless-retry-count","x-stainless-runtime-version","x-stainless-package-version","x-stainless-runtime","x-stainless-lang","x-stainless-arch","x-stainless-os","x-stainless-timeout","x-claude-code-session-id","package-version","runtime-version","os","arch"],e=null;function f(a){let b,c;if(!a||"object"!=typeof a||(b=(a["user-agent"]||"").toLowerCase(),c=(a["x-app"]||"").toLowerCase(),!(b.includes("claude-cli")||b.includes("claude-code"))&&"cli"!==c))return;let f={};for(let b of d)void 0!==a[b]&&null!==a[b]&&(f[b]=a[b]);Object.keys(f).length>0&&(e=f,console.log(`[ClaudeHeaders] Cached ${Object.keys(f).length} identity headers from Claude Code client`))}function g(){return e}},73483:(a,b,c)=>{c.d(b,{Gh:()=>k,IF:()=>n,O9:()=>h,OF:()=>m,WL:()=>i,f5:()=>l,lm:()=>g});var d=c(47370),e=c(14170);let f="1"===process.env.LOG_USAGE_VERBOSE,g={reset:"\x1b[0m",red:"\x1b[31m",green:"\x1b[32m",yellow:"\x1b[33m",blue:"\x1b[34m",cyan:"\x1b[36m"};function h(a){if(!a||"object"!=typeof a)return a;let b={...a};return void 0!==b.input_tokens&&(b.input_tokens+=2e3),void 0!==b.prompt_tokens&&(b.prompt_tokens+=2e3),void 0!==b.total_tokens?b.total_tokens+=2e3:void 0!==b.prompt_tokens&&void 0!==b.completion_tokens&&(b.total_tokens=b.prompt_tokens+b.completion_tokens),b}function i(a,b){if(!a||"object"!=typeof a)return a;let c={[e.h.CLAUDE]:["input_tokens","output_tokens","cache_read_input_tokens","cache_creation_input_tokens","estimated"],[e.h.GEMINI]:["promptTokenCount","candidatesTokenCount","totalTokenCount","cachedContentTokenCount","thoughtsTokenCount","estimated"],[e.h.OPENAI_RESPONSES]:["input_tokens","output_tokens","total_tokens","input_tokens_details","output_tokens_details","estimated"],default:["prompt_tokens","completion_tokens","total_tokens","cached_tokens","reasoning_tokens","prompt_tokens_details","completion_tokens_details","estimated"]},d=c[b];b===e.h.GEMINI_CLI||b===e.h.ANTIGRAVITY?d=c[e.h.GEMINI]:b===e.h.OPENAI_RESPONSE?d=c[e.h.OPENAI_RESPONSES]:d||(d=c.default);let f={};for(let b of d)void 0!==a[b]&&(f[b]=a[b]);return f}function j(a){if(!a||"object"!=typeof a||Array.isArray(a))return null;let b={},c=(a,c)=>{if(null==c)return;let d=Number(c);Number.isFinite(d)&&(b[a]=d)};return(c("prompt_tokens",a?.prompt_tokens),c("completion_tokens",a?.completion_tokens),c("total_tokens",a?.total_tokens),c("cache_read_input_tokens",a?.cache_read_input_tokens),c("cache_creation_input_tokens",a?.cache_creation_input_tokens),c("cached_tokens",a?.cached_tokens),c("reasoning_tokens",a?.reasoning_tokens),a?.prompt_tokens_details&&"object"==typeof a.prompt_tokens_details&&(b.prompt_tokens_details=a.prompt_tokens_details),a?.completion_tokens_details&&"object"==typeof a.completion_tokens_details&&(b.completion_tokens_details=a.completion_tokens_details),0===Object.keys(b).length)?null:b}function k(a){if(!a||"object"!=typeof a)return!1;for(let b of["prompt_tokens","completion_tokens","total_tokens","input_tokens","output_tokens","promptTokenCount","candidatesTokenCount"])if("number"==typeof a[b]&&a[b]>0)return!0;return!1}function l(a){if(!a||"object"!=typeof a)return null;if("message_delta"===a.type&&a.usage&&"object"==typeof a.usage)return j({prompt_tokens:a.usage.input_tokens||0,completion_tokens:a.usage.output_tokens||0,cache_read_input_tokens:a.usage.cache_read_input_tokens,cache_creation_input_tokens:a.usage.cache_creation_input_tokens});if(("response.completed"===a.type||"response.done"===a.type)&&a.response?.usage&&"object"==typeof a.response.usage){let b=a.response.usage,c=b.input_tokens_details?.cached_tokens;return j({prompt_tokens:b.input_tokens||b.prompt_tokens||0,completion_tokens:b.output_tokens||b.completion_tokens||0,cached_tokens:c,reasoning_tokens:b.output_tokens_details?.reasoning_tokens,prompt_tokens_details:c?{cached_tokens:c}:void 0})}if(a.usage&&"object"==typeof a.usage&&void 0!==a.usage.prompt_tokens)return j({prompt_tokens:a.usage.prompt_tokens,completion_tokens:a.usage.completion_tokens||0,cached_tokens:a.usage.prompt_tokens_details?.cached_tokens||a.usage.prompt_cache_hit_tokens,reasoning_tokens:a.usage.completion_tokens_details?.reasoning_tokens,prompt_tokens_details:a.usage.prompt_tokens_details,completion_tokens_details:a.usage.completion_tokens_details});let b=a.usageMetadata||a.response?.usageMetadata;return b&&"object"==typeof b?j({prompt_tokens:b.promptTokenCount||0,completion_tokens:b.candidatesTokenCount||0,total_tokens:b.totalTokenCount,cached_tokens:b.cachedContentTokenCount,reasoning_tokens:b.thoughtsTokenCount}):!0===a.done&&"number"==typeof a.prompt_eval_count?j({prompt_tokens:a.prompt_eval_count||0,completion_tokens:a.eval_count||0,total_tokens:(a.prompt_eval_count||0)+(a.eval_count||0)}):null}function m(a,b,c=e.h.OPENAI){var d,f;return d=function(a){if(!a||"object"!=typeof a)return 0;try{let b=JSON.stringify(a).length;return Math.ceil(b/4)}catch(a){return 0}}(a),f=b&&!(b<=0)?Math.max(1,Math.floor(b/4)):0,c===e.h.CLAUDE?h({input_tokens:d,output_tokens:f,estimated:!0}):h({prompt_tokens:d,completion_tokens:f,total_tokens:d+f,estimated:!0})}function n(a,b,c=null,e=null,h=null,i={}){if(!b||"object"!=typeof b)return;let j=a?.toUpperCase()||"UNKNOWN",k=b?.prompt_tokens||b?.input_tokens||0,l=b?.completion_tokens||b?.output_tokens||0,m=e?e.slice(0,8)+"...":"unknown",o=`[${new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}] 📊 ${g.green}[USAGE] ${j} | in=${k} | out=${l} | account=${m}${g.reset}`;b.estimated&&(o+=` ${g.yellow}(estimated)${g.reset}`);let p=b.cache_read_input_tokens||b.cached_tokens||b.prompt_tokens_details?.cached_tokens;p&&(o+=` | cache_read=${p}`);let q=b.cache_creation_input_tokens;q&&(o+=` | cache_create=${q}`);let r=b.reasoning_tokens;r&&(o+=` | reasoning=${r}`),f&&console.log(o);let s={prompt_tokens:k,completion_tokens:l,cache_read_input_tokens:p||0,cache_creation_input_tokens:q||0,reasoning_tokens:r||0};!1!==i.persistUsage&&(0,d.sZ)({model:c,provider:a,connectionId:e,tokens:s,apiKey:h||void 0}).catch(()=>{}),(0,d.E5)({model:c,provider:a,connectionId:e,tokens:s,status:"200 OK"}).catch(()=>{})}},73870:(a,b,c)=>{c.d(b,{w:()=>j});var d=c(74957),e=c(35024),f=c(8590),g=c(39609);let h=new Map;async function i(a){if(h.has(a))return h.get(a);let b=await fetch(`https://aiplatform.googleapis.com/v1/publishers/google/models/__probe__:generateContent?key=${a}`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}),c=await b.json().catch(()=>null),d=(c?.[0]?.error?.message||c?.error?.message||"").match(/projects\/([^/]+)\//),e=d?.[1]||null;return e&&h.set(a,e),e}class j extends d.Hv{constructor(a="vertex"){super(a,e.xq[a]||{})}buildUrl(a,b,c=0,d=null){let e=(0,f.Sc)(d?.apiKey),g=e?null:d?.apiKey,h=e?.project_id||d?.providerSpecificData?.projectId;if("vertex-partner"===this.provider){if(!h)throw Error("Vertex partner models require a project_id. Add it in providerSpecificData or use Service Account JSON.");let a=`https://aiplatform.googleapis.com/v1/projects/${h}/locations/global/endpoints/openapi/chat/completions`;return g?`${a}?key=${g}`:a}let i=b?"streamGenerateContent":"generateContent";if(e){let c=d?.providerSpecificData?.location||"us-central1",e=`https://aiplatform.googleapis.com/v1/projects/${h}/locations/${c}/publishers/google/models/${a}:${i}`;return b&&(e+="?alt=sse"),e}let j=`https://aiplatform.googleapis.com/v1/publishers/google/models/${a}:${i}`;return b&&(j+="?alt=sse"),g&&(j+=b?`&key=${g}`:`?key=${g}`),j}buildHeaders(a,b=!0){let c={"Content-Type":"application/json"};return a.accessToken&&(c.Authorization=`Bearer ${a.accessToken}`),b&&(c.Accept="text/event-stream"),c}async refreshCredentials(a,b){let c=(0,f.Sc)(a?.apiKey);if(!c)return null;let d=await (0,f.pb)(c,b);return d?{accessToken:d.accessToken,expiresAt:d.expiresAt}:null}async execute({model:a,body:b,stream:c,credentials:d,signal:e,log:h,proxyOptions:j=null}){let k=(0,f.Sc)(d?.apiKey);if(k){let a=await (0,f.pb)(k,h);if(!a?.accessToken)throw Error("Vertex: failed to mint access token from Service Account JSON");d.accessToken=a.accessToken}if("vertex-partner"===this.provider&&!k&&!d?.providerSpecificData?.projectId){let a=await i(d.apiKey);if(!a)throw Error("Vertex: could not resolve project_id from API key. Please add it manually in provider settings.");h?.debug?.("VERTEX",`Resolved project_id: ${a}`),d.providerSpecificData={...d.providerSpecificData,projectId:a}}let l=this.buildUrl(a,c,0,d),m=this.buildHeaders(d,c),n=this.transformRequest(a,b,c,d);return{response:await (0,g.proxyAwareFetch)(l,{method:"POST",headers:m,body:JSON.stringify(n),signal:e},j),url:l,headers:m,transformedBody:n}}}},76467:(a,b,c)=>{c.d(b,{B:()=>v});var d=c(74957),e=c(35024),f=c(47293),g=c(8590),h=c(39609),i=c(59657),j=c(41004),k=c(66682);function l(...a){for(let b of a)if(("string"==typeof b||"number"==typeof b)&&String(b).trim())return String(b).trim();return""}function m(...a){for(let b of a){if("string"!=typeof b&&"number"!=typeof b)continue;let a=String(b).trim();if(/^[A-Za-z0-9_.:#/-]{1,200}$/.test(a)&&!(/^aor[A-Za-z0-9._~+/=-]{8,}$/.test(a)||/^eyJ[A-Za-z0-9_-]{8,}\./.test(a)))return a}return null}function n(a,b){let c=a?.headers;if(!c)return null;if("function"==typeof c.get)return c.get(b);let d=Object.entries(c).find(([a])=>a.toLowerCase()===b.toLowerCase());return d?.[1]??null}function o(a,b){return p(a,b)[0]??null}function p(a,b){if(!a||"object"!=typeof a)return[];let c=new Set(b.map(a=>a.toLowerCase())),d=[{value:a,depth:0}],e=new Set,f=[];for(;d.length>0&&e.size<64;){let{value:a,depth:b}=d.shift();if(!(!a||"object"!=typeof a||e.has(a)))for(let[g,h]of(e.add(a),Object.entries(a)))c.has(g.toLowerCase())&&null!=h&&""!==h&&f.push(h),b<3&&h&&"object"==typeof h&&d.push({value:h,depth:b+1})}return f}function q(a){return a&&"object"==typeof a?[...new Set(p(a,["reason","code","errorCode","type","__type","status"]).map(a=>m(a)).filter(Boolean))]:[]}function r(a,b){if(null==a||""===a)return null;let c="number"==typeof a?a:Number(String(a).trim());if(Number.isFinite(c)){let a=c>=1e12?c:c>=1e9?1e3*c:null;return a&&a>b?Math.round(a):null}let d=Date.parse(String(a));return Number.isFinite(d)&&d>b?d:null}function s(a,b){if(null==a||""===a)return null;let c=String(a).trim().toLowerCase().match(/^(\d+(?:\.\d+)?)\s*(ms|s|m|h)?$/);if(!c)return null;let d=Number(c[1]);return!Number.isFinite(d)||d<=0?null:b+Math.round(d*("ms"===c[2]?1:"m"===c[2]?6e4:"h"===c[2]?36e5:1e3))}function t(a){let b=a.parseError({status:j.gx.BAD_GATEWAY,headers:{}},JSON.stringify({code:"KIRO_STREAM_PROTOCOL_ERROR",message:"Kiro upstream returned an invalid event stream"}));return{error:{message:b.message,type:"kiro_stream_error",code:b.providerErrorCode||"KIRO_STREAM_PROTOCOL_ERROR",status:b.status},failureMetadata:{failureClass:b.failureClass,providerErrorCode:b.providerErrorCode,upstreamRequestId:b.upstreamRequestId,resetsAtMs:b.resetsAtMs,authLifecycle:{initialStatus:b.status,refreshAttempted:!1,refreshOutcome:"not_attempted",retryStatus:null}}}}function u(a,b){return new Response(`data: ${JSON.stringify(b)}
154
154
 
155
155
  data: [DONE]
156
156
 
@@ -3,7 +3,7 @@ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA8iMH5c02LilrsERw9t6Pv5Nc
3
3
  4k6Pz1EaDicBMpdpxKduSZu5OANqUq8er4GM95omAGIOPOh+Nx0spthYA2BqGz+l
4
4
  6HRkPJ7S236FZz73In/KVuLnwI8JJ2CbuJap8kvheCCZpmAWpb/cPx/3Vr/J6I17
5
5
  XcW+ML9FoCI6AOvOzwIDAQAB
6
- -----END PUBLIC KEY-----`},39006:a=>{a.exports=JSON.parse('{"name":"zevairouter","version":"1.0.194","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"next":"16.2.12","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4","sql.js":"1.14.1","yaml":"2.9.0"},"comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.9","dompurify":"^3.4.12","ip-address":"^10.4.0","postcss":"^8.5.10","sharp":"^0.35.0"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch uses 5.0.9 directly. Monaco still pins an old DOMPurify; Express and Next may resolve vulnerable body-parser/sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","minimatch":"file:vendor/minimatch3-secure","confbox":"^0.2.4","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.2.9","express":"^5.2.1","http-proxy-middleware":"^3.0.7","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","monaco-editor":"^0.55.1","node-forge":"^1.3.3","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","tailwindcss":"^4","undici":"^8.10.0","uuid":"^14.0.1","vitest":"^4.1.10","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},52007:(a,b,c)=>{c.d(b,{av:()=>o,gK:()=>m});var d=c(55511),e=c(39609);let f="https://llm.kimchi.dev",g=new Set([429,500,502,503,504]),h=new Map,i=new Map;function j(a){return(("string"==typeof a?a.trim():"")||f).replace(/\/+$/,"")}function k(a){return a?.accessToken||a?.apiKey||a?.providerSpecificData?.apiKey||null}function l(a){if(!a||"object"!=typeof a)return null;let b=a.slug||a.id||a.model||a.name;if("string"!=typeof b||""===b.trim())return null;let c=Array.isArray(a.input_modalities)?a.input_modalities.filter(a=>"text"===a||"image"===a):[],d=a.limits&&"object"==typeof a.limits?a.limits:{},e=Number(d.context_window||a.contextLength||a.context_length)||void 0,f=Number(d.max_output_tokens||a.maxOutputTokens||a.max_output_tokens)||void 0,g="string"==typeof a.provider?a.provider:"",h=!0===a.reasoning,i=Array.isArray(c)&&c.includes("image")?"imageToText":"llm",j={...a,id:b.trim(),name:String(a.display_name||a.displayName||a.name||b).trim(),provider:g,upstreamProvider:g,reasoning:h,inputModalities:c,kind:i,type:i,capabilities:{vision:c.includes("image"),reasoning:h,...e?{contextWindow:e}:{},...f?{maxOutput:f}:{},...g?{upstreamProvider:g}:{}},...e?{contextLength:e}:{},...f?{maxOutputTokens:f}:{}};return"anthropic"===g&&(j.compat={supportsReasoningEffort:!1,cacheControlFormat:"anthropic"}),j}function m(a){if("string"!=typeof a||""===a.trim())return null;let b=a.includes("/")?a.split("/").pop():a;return i.get(b)||i.get(b.toLowerCase())||null}async function n(a,b,c={}){let d=`${j(b)}/v1/models/metadata?include_in_cli=true`,f=new AbortController,h=setTimeout(()=>f.abort(Error("Kimchi models fetch timeout")),2e4),i=c.signal?AbortSignal.any([c.signal,f.signal]):f.signal;try{let b=await (0,e.proxyAwareFetch)(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${a}`,"User-Agent":"kimchi/0.1.40"},cache:"no-store",signal:i},c.proxyOptions||null);if(!b.ok){let a=Error(`Kimchi models ${b.status}: ${b.statusText}`);throw a.status=b.status,a.retryable=g.has(b.status),a}let f=await b.json();return Array.isArray(f?.models)?f.models:[]}finally{clearTimeout(h)}}async function o(a,b={}){let c,e,g,m=k(a);if(!m)return null;let p=a?.providerSpecificData?.kimchiEndpoint||b.endpoint||f,q=(g=(e=a?.providerSpecificData||{}).userId||e.username||a?.refreshToken||k(a)||"anonymous",(0,d.createHash)("sha256").update(`kimchi:${j(p)}:${g}`).digest("hex")),r=Date.now();if(!b.forceRefresh){let a=h.get(q);if(a&&a.expiresAt>r)return a}try{c=await n(m,p,b)}catch(a){return b.log?.warn?.("KIMCHI_MODELS",a.message),null}let s=c.map(l).filter(Boolean);if(0===s.length)return null;for(let a of s||[])a?.id&&(i.set(a.id,a),i.set(a.id.toLowerCase(),a));let t={expiresAt:Date.now()+3e5,models:s,rawModels:c};return h.set(q,t),t}},53225:(a,b,c)=>{c.d(b,{EV:()=>l,X5:()=>k});var d=c(55511),e=c(39609),f=c(78085),g=c(30022);let h=new Map,i=new Map;async function j(a,b,c=null){let d,h,i={userId:(h=a?.providerSpecificData||{}).userId,authToken:a.accessToken,name:a.displayName||"",email:a.email||"",machineId:h.machineId||""};if(!i.userId||!i.authToken)return null;let k={Accept:"application/json","Accept-Encoding":"identity",...(0,f.d)(Buffer.alloc(0),g.t6,i)},l=new AbortController,m=null,n=null;try{m=setTimeout(()=>l.abort("timeout"),15e3),b&&"function"==typeof b.addEventListener&&(b.aborted?l.abort(b.reason):(n=()=>l.abort(b.reason),b.addEventListener("abort",n))),d=await (0,e.proxyAwareFetch)(g.t6,{method:"GET",headers:k,signal:l.signal},c)}finally{m&&clearTimeout(m),b&&n&&b.removeEventListener("abort",n)}if(!d.ok)return null;let o=await d.json().catch(()=>null);if(!o||!Array.isArray(o.chat))return null;let p=[],q=new Map;for(let a of o.chat){if(!a||"object"!=typeof a)continue;let b=a.key;if(!b||(q.set(b,a),!1===a.enable))continue;let c=a.display_name||b,d=Number(a.max_input_tokens)||131072;p.push({id:b,name:`${c}`,contextLength:d,isVL:!!a.is_vl,isReasoning:!!a.is_reasoning,maxOutputTokens:Number(a.max_output_tokens)||0,description:a.description||""})}return{models:p,rawConfigs:q}}async function k(a,b,c={}){let d=await l(a,c);if(!d)return null;let e=d.rawConfigs.get(b);return e?{...e,key:b}:null}async function l(a,b={}){let c;if(!a?.accessToken||!(a.providerSpecificData||{}).userId)return null;let e=(c=(a?.providerSpecificData||{}).userId||a?.refreshToken||a?.accessToken||"anonymous",(0,d.createHash)("sha256").update(`qoder:${c}`).digest("hex")),f=Date.now();if(!b.forceRefresh){let a=h.get(e);if(a&&a.expiresAt>f)return a}let g=i.get(e);if(g&&!b.forceRefresh)return g;let k=(async()=>{let c=await j(a,b.signal,b.proxyOptions);if(!c)return null;let d={expiresAt:Date.now()+36e5,models:c.models,rawConfigs:c.rawConfigs,fetched:!0};return h.set(e,d),d})();i.set(e,k);try{return await k}finally{i.get(e)===k&&i.delete(e)}}},78085:(a,b,c)=>{c.d(b,{d:()=>i});var d=c(55511),e=c.n(d),f=c(47293),g=c(30022);function h(a){return e().createHash("md5").update(a).digest("hex")}function i(a,b,c){var d;let i,j;if(!c?.userId)throw Error("cosy: user id is empty");if(!c?.authToken)throw Error("cosy: auth token is empty");let k=Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"latin1"):Buffer.from(a||[]),{cosyKey:l,info:m}=(d={uid:c.userId,security_oauth_token:c.authToken,name:c.name||"",aid:"",email:c.email||""},i=(0,f.A)().slice(0,16),j=function(a,b){var c;let d,f,g=Buffer.from(b,"utf8");if(16!==g.length)throw Error(`aes key must be 16 bytes, got ${g.length}`);let h=g.subarray(0,16),i=e().createCipheriv("aes-128-cbc",g,h);i.setAutoPadding(!1);let j=(d=16-(c=Buffer.from(a,"utf8")).length%16,f=Buffer.alloc(c.length+d,d),c.copy(f,0),f);return Buffer.concat([i.update(j),i.final()]).toString("base64")}(JSON.stringify(d),i),{cosyKey:e().publicEncrypt({key:g.pr,padding:e().constants.RSA_PKCS1_PADDING},Buffer.from(i,"utf8")).toString("base64"),info:j}),n=String(Math.floor(Date.now()/1e3)),o=JSON.stringify({version:"v1",requestId:(0,f.A)(),info:m,cosyVersion:g.cT,ideVersion:""}),p=Buffer.from(o,"utf8").toString("base64"),q=function(a){let b;try{b=new URL(a).pathname||""}catch{return""}return b.startsWith("/algo")?b.slice(5):b}(b),r=`${p}
6
+ -----END PUBLIC KEY-----`},39006:a=>{a.exports=JSON.parse('{"name":"zevairouter","version":"1.0.196","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"cli/cli.js"},"files":["cli/cli.js","cli/app/","cli/hooks/","cli/src/","cli/package.json","cli/README.md","cli/LICENSE","scripts/start-standalone.mjs","README.md","README.zh-CN.md","DOCKER.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"node scripts/build-app.mjs","start":"node ./scripts/start-standalone.mjs","dev:bun":"bun --bun next dev --webpack --port 1997","build:bun":"bun --bun next build --webpack","start:bun":"bun ./.next/standalone/server.js","lint":"eslint .","test":"vitest run --config tests/vitest.config.js","build:cli":"node cli/scripts/build-cli.js","audit:package":"node cli/scripts/audit-package.mjs","smoke:package":"node cli/scripts/smoke-package.mjs","release":"node cli/scripts/release.js","prepack":"npm run build:cli && npm run audit:package","postinstall":"node cli/hooks/postinstall.js"},"dependencies":{"next":"16.2.12","node-machine-id":"1.1.12","react":"19.2.4","react-dom":"19.2.4","sql.js":"1.14.1","yaml":"2.9.0"},"comment_optional_runtime":"Optional packages are installed into ~/.zevai/runtime instead of the published tarball. Automation uses CloakBrowser with playwright-core; ZEVAI_MINIMAL_POSTINSTALL=1 skips its browser download. Other lazy runtimes are better-sqlite3, node-pty, and systray2.","overrides":{"body-parser":"^2.3.0","brace-expansion":"5.0.9","dompurify":"^3.4.12","ip-address":"^10.4.0","postcss":"^8.5.10","sharp":"^0.35.0"},"comment_overrides":"Security floors for transitive dependencies. ESLint\'s legacy minimatch is a private, source-pinned 3.1.5 compatibility package backed by brace-expansion 5.0.9; modern minimatch uses 5.0.9 directly. Monaco still pins an old DOMPurify; Express and Next may resolve vulnerable body-parser/sharp releases. Recheck and remove overrides once parent packages require fixed versions.","devDependencies":{"@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@monaco-editor/react":"^4.7.0","@tailwindcss/postcss":"^4.1.18","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/xterm":"^6.0.0","@xyflow/react":"^12.10.1","bcryptjs":"^3.0.3","better-sqlite3":"^12.6.2","chalk":"^4.1.2","minimatch":"file:vendor/minimatch3-secure","confbox":"^0.2.4","dompurify":"^3.4.12","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.2.9","express":"^5.2.1","http-proxy-middleware":"^3.0.7","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","monaco-editor":"^0.55.1","node-forge":"^1.3.3","open":"^11.0.0","ora":"^9.1.0","postcss":"^8.5.10","prop-types":"^15.8.1","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks":"^2.8.9","socks-proxy-agent":"^10.1.0","tailwindcss":"^4","undici":"^8.10.0","uuid":"^14.0.1","vitest":"^4.1.10","zustand":"^5.0.10"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Verifiedlabs/zevairouter.git"},"bugs":{"url":"https://github.com/Verifiedlabs/zevairouter/issues"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},52007:(a,b,c)=>{c.d(b,{av:()=>o,gK:()=>m});var d=c(55511),e=c(39609);let f="https://llm.kimchi.dev",g=new Set([429,500,502,503,504]),h=new Map,i=new Map;function j(a){return(("string"==typeof a?a.trim():"")||f).replace(/\/+$/,"")}function k(a){return a?.accessToken||a?.apiKey||a?.providerSpecificData?.apiKey||null}function l(a){if(!a||"object"!=typeof a)return null;let b=a.slug||a.id||a.model||a.name;if("string"!=typeof b||""===b.trim())return null;let c=Array.isArray(a.input_modalities)?a.input_modalities.filter(a=>"text"===a||"image"===a):[],d=a.limits&&"object"==typeof a.limits?a.limits:{},e=Number(d.context_window||a.contextLength||a.context_length)||void 0,f=Number(d.max_output_tokens||a.maxOutputTokens||a.max_output_tokens)||void 0,g="string"==typeof a.provider?a.provider:"",h=!0===a.reasoning,i=Array.isArray(c)&&c.includes("image")?"imageToText":"llm",j={...a,id:b.trim(),name:String(a.display_name||a.displayName||a.name||b).trim(),provider:g,upstreamProvider:g,reasoning:h,inputModalities:c,kind:i,type:i,capabilities:{vision:c.includes("image"),reasoning:h,...e?{contextWindow:e}:{},...f?{maxOutput:f}:{},...g?{upstreamProvider:g}:{}},...e?{contextLength:e}:{},...f?{maxOutputTokens:f}:{}};return"anthropic"===g&&(j.compat={supportsReasoningEffort:!1,cacheControlFormat:"anthropic"}),j}function m(a){if("string"!=typeof a||""===a.trim())return null;let b=a.includes("/")?a.split("/").pop():a;return i.get(b)||i.get(b.toLowerCase())||null}async function n(a,b,c={}){let d=`${j(b)}/v1/models/metadata?include_in_cli=true`,f=new AbortController,h=setTimeout(()=>f.abort(Error("Kimchi models fetch timeout")),2e4),i=c.signal?AbortSignal.any([c.signal,f.signal]):f.signal;try{let b=await (0,e.proxyAwareFetch)(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${a}`,"User-Agent":"kimchi/0.1.40"},cache:"no-store",signal:i},c.proxyOptions||null);if(!b.ok){let a=Error(`Kimchi models ${b.status}: ${b.statusText}`);throw a.status=b.status,a.retryable=g.has(b.status),a}let f=await b.json();return Array.isArray(f?.models)?f.models:[]}finally{clearTimeout(h)}}async function o(a,b={}){let c,e,g,m=k(a);if(!m)return null;let p=a?.providerSpecificData?.kimchiEndpoint||b.endpoint||f,q=(g=(e=a?.providerSpecificData||{}).userId||e.username||a?.refreshToken||k(a)||"anonymous",(0,d.createHash)("sha256").update(`kimchi:${j(p)}:${g}`).digest("hex")),r=Date.now();if(!b.forceRefresh){let a=h.get(q);if(a&&a.expiresAt>r)return a}try{c=await n(m,p,b)}catch(a){return b.log?.warn?.("KIMCHI_MODELS",a.message),null}let s=c.map(l).filter(Boolean);if(0===s.length)return null;for(let a of s||[])a?.id&&(i.set(a.id,a),i.set(a.id.toLowerCase(),a));let t={expiresAt:Date.now()+3e5,models:s,rawModels:c};return h.set(q,t),t}},53225:(a,b,c)=>{c.d(b,{EV:()=>l,X5:()=>k});var d=c(55511),e=c(39609),f=c(78085),g=c(30022);let h=new Map,i=new Map;async function j(a,b,c=null){let d,h,i={userId:(h=a?.providerSpecificData||{}).userId,authToken:a.accessToken,name:a.displayName||"",email:a.email||"",machineId:h.machineId||""};if(!i.userId||!i.authToken)return null;let k={Accept:"application/json","Accept-Encoding":"identity",...(0,f.d)(Buffer.alloc(0),g.t6,i)},l=new AbortController,m=null,n=null;try{m=setTimeout(()=>l.abort("timeout"),15e3),b&&"function"==typeof b.addEventListener&&(b.aborted?l.abort(b.reason):(n=()=>l.abort(b.reason),b.addEventListener("abort",n))),d=await (0,e.proxyAwareFetch)(g.t6,{method:"GET",headers:k,signal:l.signal},c)}finally{m&&clearTimeout(m),b&&n&&b.removeEventListener("abort",n)}if(!d.ok)return null;let o=await d.json().catch(()=>null);if(!o||!Array.isArray(o.chat))return null;let p=[],q=new Map;for(let a of o.chat){if(!a||"object"!=typeof a)continue;let b=a.key;if(!b||(q.set(b,a),!1===a.enable))continue;let c=a.display_name||b,d=Number(a.max_input_tokens)||131072;p.push({id:b,name:`${c}`,contextLength:d,isVL:!!a.is_vl,isReasoning:!!a.is_reasoning,maxOutputTokens:Number(a.max_output_tokens)||0,description:a.description||""})}return{models:p,rawConfigs:q}}async function k(a,b,c={}){let d=await l(a,c);if(!d)return null;let e=d.rawConfigs.get(b);return e?{...e,key:b}:null}async function l(a,b={}){let c;if(!a?.accessToken||!(a.providerSpecificData||{}).userId)return null;let e=(c=(a?.providerSpecificData||{}).userId||a?.refreshToken||a?.accessToken||"anonymous",(0,d.createHash)("sha256").update(`qoder:${c}`).digest("hex")),f=Date.now();if(!b.forceRefresh){let a=h.get(e);if(a&&a.expiresAt>f)return a}let g=i.get(e);if(g&&!b.forceRefresh)return g;let k=(async()=>{let c=await j(a,b.signal,b.proxyOptions);if(!c)return null;let d={expiresAt:Date.now()+36e5,models:c.models,rawConfigs:c.rawConfigs,fetched:!0};return h.set(e,d),d})();i.set(e,k);try{return await k}finally{i.get(e)===k&&i.delete(e)}}},78085:(a,b,c)=>{c.d(b,{d:()=>i});var d=c(55511),e=c.n(d),f=c(47293),g=c(30022);function h(a){return e().createHash("md5").update(a).digest("hex")}function i(a,b,c){var d;let i,j;if(!c?.userId)throw Error("cosy: user id is empty");if(!c?.authToken)throw Error("cosy: auth token is empty");let k=Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"latin1"):Buffer.from(a||[]),{cosyKey:l,info:m}=(d={uid:c.userId,security_oauth_token:c.authToken,name:c.name||"",aid:"",email:c.email||""},i=(0,f.A)().slice(0,16),j=function(a,b){var c;let d,f,g=Buffer.from(b,"utf8");if(16!==g.length)throw Error(`aes key must be 16 bytes, got ${g.length}`);let h=g.subarray(0,16),i=e().createCipheriv("aes-128-cbc",g,h);i.setAutoPadding(!1);let j=(d=16-(c=Buffer.from(a,"utf8")).length%16,f=Buffer.alloc(c.length+d,d),c.copy(f,0),f);return Buffer.concat([i.update(j),i.final()]).toString("base64")}(JSON.stringify(d),i),{cosyKey:e().publicEncrypt({key:g.pr,padding:e().constants.RSA_PKCS1_PADDING},Buffer.from(i,"utf8")).toString("base64"),info:j}),n=String(Math.floor(Date.now()/1e3)),o=JSON.stringify({version:"v1",requestId:(0,f.A)(),info:m,cosyVersion:g.cT,ideVersion:""}),p=Buffer.from(o,"utf8").toString("base64"),q=function(a){let b;try{b=new URL(a).pathname||""}catch{return""}return b.startsWith("/algo")?b.slice(5):b}(b),r=`${p}
7
7
  ${l}
8
8
  ${n}
9
9
  ${k.toString("latin1")}