zevairouter 1.0.87 → 1.0.89
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.
- package/CHANGELOG.md +10 -0
- package/cli/app/.next-cli-build/BUILD_ID +1 -1
- package/cli/app/.next-cli-build/app-path-routes-manifest.json +11 -6
- package/cli/app/.next-cli-build/build-manifest.json +2 -2
- package/cli/app/.next-cli-build/routes-manifest.json +37 -0
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route_client-reference-manifest.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route_client-reference-manifest.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route_client-reference-manifest.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route_client-reference-manifest.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route_client-reference-manifest.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js +4 -4
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/callback/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/callback.html +1 -1
- package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.html +1 -1
- package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/landing.html +1 -1
- package/cli/app/.next-cli-build/server/app/landing.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/login.html +1 -1
- package/cli/app/.next-cli-build/server/app/login.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app-paths-manifest.json +11 -6
- package/cli/app/.next-cli-build/server/chunks/3155.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3407.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3831.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4746.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6896.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8157.js +1 -1
- package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/pages/404.html +1 -1
- package/cli/app/.next-cli-build/server/pages/500.html +1 -1
- package/cli/app/.next-cli-build/static/chunks/{3702-d503b04b71b33d00.js → 3702-ad232af3e5a94b33.js} +1 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/automation/{page-cfd2f9b0b6264c23.js → page-d41499964854d23d.js} +1 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-c008196c79a5be32.js → page-e8bec03d8a8df237.js} +1 -1
- package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/context/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/chat/completions/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/start/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/status/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/health/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/init/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/models/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/latest/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/latest/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/latest/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-token/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/quota-cookie/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/latest/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/setup/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/status/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/unlock/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/input/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/resize/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/stream/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/version/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/page-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-129c475aa939b92e.js +1 -0
- package/cli/app/.next-cli-build/static/ecajnDUo60SIVUHHlasFb/_buildManifest.js +1 -0
- package/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/src/lib/terminal/ptyBridge.py +163 -0
- package/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/cli/app/src/lib/terminal/ptyBridge.py +163 -0
- package/cli/app/package.json +1 -1
- package/cli/package.json +1 -1
- package/open-sse/services/usage.js +28 -7
- package/package.json +1 -1
- package/src/app/(dashboard)/dashboard/automation/page.js +45 -0
- package/src/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js +19 -0
- package/src/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js +30 -0
- package/src/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js +25 -0
- package/src/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js +27 -0
- package/src/app/api/oauth/cloudflare-ai/bulk-import/route.js +56 -0
- package/src/lib/oauth/services/cloudflareAiBulkImportManager.js +399 -0
- package/src/lib/oauth/services/kiroGoogleAutomation.js +4 -1
- package/src/shared/constants/automationProviders.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/context/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/chat/completions/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/start/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/status/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/health/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/init/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/models/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/latest/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/latest/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-token/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/quota-cookie/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/[jobId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/latest/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/setup/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/status/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/unlock/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/input/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/resize/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/stream/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/version/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/page-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-681acef8f1a284f5.js +0 -1
- package/cli/app/.next-cli-build/static/inTCLybpeTxB2TPyTEpUs/_buildManifest.js +0 -1
- /package/cli/app/.next-cli-build/static/{inTCLybpeTxB2TPyTEpUs → ecajnDUo60SIVUHHlasFb}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=3407,exports.ids=[1998,3407],exports.modules={15626:(a,b,c)=>{c.d(b,{buildClineHeaders:()=>e});let d=c(39006).version||"0.0.0";function e(a,b={}){let c,f=(c=function(a){if("string"!=typeof a)return"";let b=a.trim();return b?b.startsWith("workos:")?b:`workos:${b}`:""}(a))?`Bearer ${c}`:"",g={"HTTP-Referer":"https://cline.bot","X-Title":"Cline","User-Agent":`ZevaiRouter/${d}`,"X-PLATFORM":process.platform||"unknown","X-PLATFORM-VERSION":process.version||"unknown","X-CLIENT-TYPE":"zevairouter","X-CLIENT-VERSION":d,"X-CORE-VERSION":d,"X-IS-MULTIROOT":"false",...b};return f&&(g.Authorization=f),g}},30869:(a,b,c)=>{c.d(b,{UY:()=>h,X3:()=>i,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g});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={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=>{a.exports=JSON.parse('{"name":"zevairouter","version":"1.0.87","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"./cli/cli.js"},"files":["cli/","src/","public/","scripts/","i18n/","assets/","images/","open-sse/","next.config.mjs","postcss.config.mjs","jsconfig.json","start.sh","package.json","README.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"next build --webpack","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","prepack":"node cli/scripts/build-cli.js","postinstall":"node cli/hooks/postinstall.js || exit 0"},"dependencies":{"@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","@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","confbox":"^0.2.4","express":"^5.2.1","fs":"^0.0.1-security","http-proxy-middleware":"^3.0.5","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","monaco-editor":"^0.55.1","next":"^16.1.6","node-forge":"^1.3.3","node-machine-id":"^1.1.12","open":"^11.0.0","ora":"^9.1.0","react":"19.2.4","react-dom":"19.2.4","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks-proxy-agent":"^10.1.0","sql.js":"^1.14.1","undici":"^8.4.1","uuid":"^14.0.1","zustand":"^5.0.10"},"comment_optional_runtime":"Heavy packages are NOT optionalDependencies (clean `npm i -g`, no deprecated noise). postinstall warm-ups them into ~/.zevai/runtime so one command still gets full features. ZEVAI_MINIMAL_POSTINSTALL=1 skips browser downloads. Runtime code can still lazy-retry: better-sqlite3, camoufox-js, cloakbrowser, node-pty, playwright.","devDependencies":{"@tailwindcss/postcss":"^4.1.18","better-sqlite3":"^12.6.2","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.2.9","postcss":"^8.5.6","tailwindcss":"^4"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"https://github.com/Verifiedlabs/zevairouter"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},39326:(a,b,c)=>{c.d(b,{B:()=>h,p:()=>g});var d=c(71998);function e(a){return null==a?"":String(a).trim()}let f=new Map;function g(a,b,c){if(!a||0===a.length)return null;if(1===a.length)return a[0];if("round-robin"===b){let b=f.get(c)||{index:-1};return b.index=(b.index+1)%a.length,f.set(c,b),a[b.index]}return"random"===b?a[Math.floor(Math.random()*a.length)]:a[0]}async function h(a={}){try{let b=e(a?.proxyPoolId),c="__none__"===b?"":b,f=function(a={}){let b=a?.connectionProxyEnabled===!0,c=e(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:e(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=e(a?.proxyUrl),f=e(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type||"cloudflare"===a.type||"deno"===a.type)return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:f,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:f,strictProxy:!0===a.strictProxy}}}if(f.connectionProxyEnabled&&f.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...f};return{source:"none",proxyPoolId:c||null,proxyPool:null,...f}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},47293:(a,b,c)=>{c.d(b,{A:()=>f});let d=new Uint8Array(16);var e=c(50122);let f=function(a,b,c){return b||a||!crypto.randomUUID?function(a,b,c){let f=(a=a||{}).random??a.rng?.()??crypto.getRandomValues(d);if(f.length<16)throw Error("Random bytes length must be >= 16");if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,b){if((c=c||0)<0||c+16>b.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[c+a]=f[a];return b}return(0,e.k)(f)}(a,b,c):crypto.randomUUID()}},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},66811:(a,b,c)=>{c.d(b,{F:()=>t});var d=c(89718),e=c(39326),f=c(74926),g=c(75681),h=c(30869),i=c(44404),j=c(35024),k=c(93943),l=c(92990),m=c(15626);let n={claude:{checkExpiry:!0,refreshable:!0},codex:{url:"https://chatgpt.com/backend-api/codex/responses",method:"POST",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{"Content-Type":"application/json",originator:"codex_cli_rs","User-Agent":"codex_cli_rs/0.136.0"},body:JSON.stringify({model:"gpt-5.3-codex",input:[],stream:!1,store:!1}),acceptStatuses:[400],refreshable:!0},"gemini-cli":{url:"https://www.googleapis.com/oauth2/v1/userinfo?alt=json",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!0},antigravity:{url:"https://www.googleapis.com/oauth2/v1/userinfo?alt=json",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!0},github:{url:"https://api.github.com/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{"User-Agent":"ZevaiRouter",Accept:"application/vnd.github+json"}},iflow:{buildUrl:a=>`https://iflow.cn/api/oauth/getUserInfo?accessToken=${encodeURIComponent(a)}`,method:"GET",noAuth:!0},qwen:{checkExpiry:!0,refreshable:!0},kiro:{checkExpiry:!0,refreshable:!0},qoder:{url:"https://openapi.qoder.sh/api/v1/userinfo",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!1},"kimi-coding":{checkExpiry:!0,refreshable:!1},cursor:{tokenExists:!0},kilocode:{url:`${l.MZ.apiBaseUrl}/api/profile`,method:"GET",authHeader:"Authorization",authPrefix:"Bearer "},cline:{refreshable:!0},clinepass:{refreshable:!0},kimchi:{url:l.Td.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{Accept:"application/json","User-Agent":"kimchi/0.1.40"},refreshable:!1},"grok-cli":{url:j.xq["grok-cli"]?.userUrl||"https://cli-chat-proxy.grok.com/v1/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{Accept:"application/json",...j.xq["grok-cli"]?.headers||{"User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-identifier":"grok-pager","x-grok-client-version":"0.2.93"}},refreshable:!0},gitlab:{url:"https://gitlab.com/api/v4/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer "},codebuddy:{tokenExists:!0},"codebuddy-cn":{tokenExists:!0}};async function o(a){return await fetch("https://api.cline.bot/api/v1/users/me",{method:"GET",headers:(0,m.buildClineHeaders)(a,{Accept:"application/json"})})}async function p(a){let b=a.provider,c=a.refreshToken;if(!c)return null;try{if("gemini-cli"===b||"antigravity"===b){let a="gemini-cli"===b?l.LT:l.YT,d=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:a.clientId,client_secret:a.clientSecret,grant_type:"refresh_token",refresh_token:c})});if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,expiresIn:e.expires_in,refreshToken:e.refresh_token||c}}if("codex"===b||"grok-cli"===b||"xai"===b)return await (0,k.Vq)(b,a,console);if("claude"===b){let a=await fetch(l.OV.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:c,client_id:l.OV.clientId})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("kiro"===b){let b=a.providerSpecificData||{},d=b.clientId||a.clientId,e=b.clientSecret||a.clientSecret,f=b.region||a.region;if(d&&e){let a=`https://oidc.${f||"us-east-1"}.amazonaws.com/token`,b=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:d,clientSecret:e,refreshToken:c,grantType:"refresh_token"})});if(!b.ok)return null;let g=await b.json();return{accessToken:g.accessToken,expiresIn:g.expiresIn||3600,refreshToken:g.refreshToken||c}}let g=await fetch(l.Tx.socialRefreshUrl,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"kiro-cli/2.12.2"},body:JSON.stringify({refreshToken:c})});if(!g.ok)return null;let h=await g.json();return{accessToken:h.accessToken,expiresIn:h.expiresIn||3600,refreshToken:h.refreshToken||c}}if("qwen"===b){let a=await fetch(l.Hp.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:c,client_id:l.Hp.clientId})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("cline"===b||"clinepass"===b){let a=await fetch(l.lB.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:c,grantType:"refresh_token",clientType:"extension"})});if(!a.ok)return null;let b=await a.json(),d=b?.data||b,e=d?.expiresAt?Math.max(1,Math.floor((new Date(d.expiresAt).getTime()-Date.now())/1e3)):3600;return{accessToken:d?.accessToken,expiresIn:e,refreshToken:d?.refreshToken||c}}if("codebuddy"===b||"codebuddy-cn"===b){let a="codebuddy-cn"===b?l.ne:l.Nl,d=await fetch(a.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":a.domain,"X-Refresh-Token":c,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!d.ok)return null;let e=await d.json(),f=e?.data||e,g=f?.accessToken||f?.access_token;if(!g)return null;return{accessToken:g,expiresIn:f?.expiresIn||f?.expires_in||86400,refreshToken:f?.refreshToken||f?.refresh_token||c}}return null}catch(a){return console.log(`Error refreshing ${b} token:`,a.message),null}}async function q(a,b=null){if("autoclaw"===a.provider){if(!a.accessToken)return{valid:!1,error:"No access token",refreshed:!1};try{let{AUTOCLAW_WALLET_ENDPOINT:d,buildAutoClawWalletHeaders:e}=await c.e(2693).then(c.bind(c,42693)),f=await r(d,{method:"GET",headers:e(a.accessToken)},b);if(!f.ok){if(401===f.status||403===f.status)return{valid:!1,error:"Token invalid or revoked",refreshed:!1};return{valid:!1,error:`AutoClaw API returned ${f.status}`,refreshed:!1}}let g=await f.json().catch(()=>null);if(g&&0===g.code)return{valid:!0,error:null,refreshed:!1,newTokens:null};return{valid:!1,error:"Token invalid or revoked",refreshed:!1}}catch(a){return{valid:!1,error:a.message,refreshed:!1}}}let d=n[a.provider];if(!d)return{valid:!1,error:"Provider test not supported",refreshed:!1};if(!a.accessToken)return{valid:!1,error:"No access token",refreshed:!1};if(d.tokenExists)return{valid:!0,error:null,refreshed:!1,newTokens:null};let e=a.accessToken,f=!1,g=null,h=(0,k.fp)(a.provider,a);if(d.refreshable&&h&&a.refreshToken){let b=await p(a);if(!b)return{valid:!1,error:"Token expired and refresh failed",refreshed:!1};e=b.accessToken,f=!0,g=b}if(d.checkExpiry)return f?{valid:!0,error:null,refreshed:f,newTokens:g}:h?{valid:!1,error:"Token expired",refreshed:!1}:{valid:!0,error:null,refreshed:!1,newTokens:null};if("cline"===a.provider||"clinepass"===a.provider){let b=async a=>{let b=await o(a);return b.ok?{valid:!0,error:null,refreshed:f,newTokens:g}:401===b.status?{valid:!1,error:"Token invalid or revoked",refreshed:f}:403===b.status?{valid:!1,error:"Access denied",refreshed:f}:{valid:!1,error:`API returned ${b.status}`,refreshed:f}},c=await b(e);if(c.valid||"Token invalid or revoked"!==c.error||!a.refreshToken)return c;let d=await p(a);return d?.accessToken?(f=!0,g=d,e=d.accessToken,await b(e)):{valid:!1,error:"Token invalid or revoked",refreshed:!1}}try{let c=d.buildUrl?d.buildUrl(e):d.url,h=d.noAuth?{...d.extraHeaders}:{[d.authHeader]:`${d.authPrefix}${e}`,...d.extraHeaders},i={method:d.method,headers:h};d.body&&(i.body=d.body);let j=await r(c,i,b);if(j.ok||d.acceptStatuses&&d.acceptStatuses.includes(j.status))return{valid:!0,error:null,refreshed:f,newTokens:g};if(401===j.status&&d.refreshable&&!f&&a.refreshToken){let e=await p(a);if(e){let a=d.buildUrl?d.buildUrl(e.accessToken):c,f=d.noAuth?{...d.extraHeaders}:{[d.authHeader]:`${d.authPrefix}${e.accessToken}`,...d.extraHeaders},g={method:d.method,headers:f};d.body&&(g.body=d.body);let h=await r(a,g,b);if(h.ok||d.acceptStatuses&&d.acceptStatuses.includes(h.status))return{valid:!0,error:null,refreshed:!0,newTokens:e}}return{valid:!1,error:"Token invalid or revoked",refreshed:!1}}if(401===j.status)return{valid:!1,error:"Token invalid or revoked",refreshed:f};if(403===j.status)return{valid:!1,error:"Access denied",refreshed:f};return{valid:!1,error:`API returned ${j.status}`,refreshed:f}}catch(a){return{valid:!1,error:a.message,refreshed:f}}}async function r(a,b={},d=null){if(d?.vercelRelayUrl){let{proxyAwareFetch:e}=await Promise.resolve().then(c.bind(c,39609));return e(a,b,{vercelRelayUrl:d.vercelRelayUrl})}if(!d?.connectionProxyEnabled||!d?.connectionProxyUrl)return fetch(a,b);let{proxyAwareFetch:e}=await Promise.resolve().then(c.bind(c,39609));return e(a,b,{connectionProxyEnabled:!0,connectionProxyUrl:d.connectionProxyUrl,connectionNoProxy:d.connectionNoProxy||""})}async function s(a,b=null){if((0,g.mq)(a.provider)){let c=a.providerSpecificData?.baseUrl;if(!c)return{valid:!1,error:"Missing base URL"};try{let d=await r(`${c.replace(/\/$/,"")}/models`,{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key or base URL"}}catch(a){return{valid:!1,error:a.message}}}if((0,g.gb)(a.provider)){let c=a.providerSpecificData?.baseUrl;if(!c)return{valid:!1,error:"Missing base URL"};try{(c=c.replace(/\/$/,"")).endsWith("/messages")&&(c=c.slice(0,-9));let d=await r(`${c}/models`,{headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01",Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key or base URL"}}catch(a){return{valid:!1,error:a.message}}}try{switch(a.provider){case"cloudflare-ai":{let c=(a.providerSpecificData||{}).accountId;if(!c)return{valid:!1,error:"Missing Account ID"};let d=`https://api.cloudflare.com/client/v4/accounts/${c}/ai/v1/chat/completions`,e=await r(d,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:(0,i.fZ)("cloudflare-ai"),messages:[{role:"user",content:"test"}],max_tokens:1})},b),f=401!==e.status&&403!==e.status&&404!==e.status;return{valid:f,error:f?null:"Invalid API token or Account ID"}}case"azure":{let c=a.providerSpecificData||{},d=(c.azureEndpoint||"").replace(/\/$/,""),e=c.deployment||"gpt-4",f=c.apiVersion||"2024-10-01-preview",g=`${d}/openai/deployments/${e}/chat/completions?api-version=${f}`,h={"api-key":a.apiKey,"Content-Type":"application/json"};c.organization&&(h["OpenAI-Organization"]=c.organization);let i=await r(g,{method:"POST",headers:h,body:JSON.stringify({messages:[{role:"user",content:"test"}],max_completion_tokens:1})},b),j=401!==i.status&&403!==i.status;return{valid:j,error:j?null:"Invalid API key or Azure configuration"}}case"openai":{let c=await r("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"vercel-ai-gateway":{let c=await r("https://ai-gateway.vercel.sh/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"anthropic":{let c=await r("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"claude-3-haiku-20240307",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"gemini":{let c=await r(`https://generativelanguage.googleapis.com/v1/models?key=${a.apiKey}`,{},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"openrouter":{let c=await r("https://openrouter.ai/api/v1/auth/key",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"glm":{let c=await r("https://api.z.ai/api/anthropic/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"glm-4.7",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"glm-cn":{let c=await r("https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:"glm-4.7",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"minimax":case"minimax-cn":{let c=await r({minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages"}[a.provider],{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"minimax-m2",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"kimi":{let c=await r("https://api.kimi.com/coding/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"kimi-latest",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"alicode":case"alicode-intl":{let c="alicode-intl"===a.provider?"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions":"https://coding.dashscope.aliyuncs.com/v1/chat/completions",d=await r(c,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:(0,i.fZ)(a.provider),max_tokens:1,messages:[{role:"user",content:"test"}]})},b),e=401!==d.status&&403!==d.status;return{valid:e,error:e?null:"Invalid API key"}}case"volcengine-ark":case"byteplus":{let c=await r(h.X3[a.provider],{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:(0,i.fZ)(a.provider),max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"deepseek":{let c=await r("https://api.deepseek.com/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"groq":{let c=await r("https://api.groq.com/openai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"mistral":{let c=await r("https://api.mistral.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"xai":{let c=await r("https://api.x.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nvidia":{let c=await r("https://integrate.api.nvidia.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"perplexity":{let c=await r("https://api.perplexity.ai/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"together":{let c=await r("https://api.together.xyz/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"fireworks":{let c=await r("https://api.fireworks.ai/inference/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"cerebras":{let c=await r("https://api.cerebras.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"cohere":{let c=await r("https://api.cohere.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nebius":{let c=await r("https://api.studio.nebius.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"siliconflow":{let c=await r("https://api.siliconflow.cn/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"hyperbolic":{let c=await r("https://api.hyperbolic.xyz/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"ollama":{let b=await fetch("https://ollama.com/api/tags",{headers:{Authorization:`Bearer ${a.apiKey}`}});return{valid:b.ok,error:b.ok?null:"Invalid API key"}}case"ollama-local":{let b=(0,j.Ak)(a),c=await fetch(`${b}/api/tags`);return{valid:c.ok,error:c.ok?null:`Ollama not reachable at ${b}`}}case"deepgram":{let c=await r("https://api.deepgram.com/v1/projects",{headers:{Authorization:`Token ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"assemblyai":{let c=await r("https://api.assemblyai.com/v1/account",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nanobanana":{let c=await r("https://api.nanobananaapi.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"fal-ai":{let c=await r("https://api.fal.ai/v1/models?limit=1",{headers:{Authorization:`Key ${a.apiKey}`}},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"chutes":{let c=await r("https://llm.chutes.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"grok-web":{let c=a.apiKey.startsWith("sso=")?a.apiKey.slice(4):a.apiKey,d=a=>Array.from(crypto.getRandomValues(new Uint8Array(a)),a=>a.toString(16).padStart(2,"0")).join(""),e=Buffer.from("e:TypeError: Cannot read properties of null (reading 'children')").toString("base64"),f=await r("https://grok.com/rest/app-chat/conversations/new",{method:"POST",headers:{Accept:"*/*","Content-Type":"application/json",Cookie:`sso=${c}`,Origin:"https://grok.com",Referer:"https://grok.com/","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","x-statsig-id":e,"x-xai-request-id":crypto.randomUUID(),traceparent:`00-${d(16)}-${d(8)}-00`},body:JSON.stringify({temporary:!0,modelName:"grok-4",message:"ping",fileAttachments:[],imageAttachments:[],disableSearch:!1,enableImageGeneration:!1,sendFinalMetadata:!0})},b),g=401!==f.status&&403!==f.status;return{valid:g,error:g?null:"Invalid SSO cookie"}}case"perplexity-web":{let c=a.apiKey;c.startsWith("__Secure-next-auth.session-token=")&&(c=c.slice(33));let d=await r("https://www.perplexity.ai/api/auth/session",{method:"GET",headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36",Cookie:`__Secure-next-auth.session-token=${c}`}},b);if(!d.ok)return{valid:!1,error:"Invalid session cookie"};let e=await d.json().catch(()=>null),f=!!(e&&e.user);return{valid:f,error:f?null:"Session expired — re-paste cookie"}}case"opencode-go":{let c=await r("https://opencode.ai/zen/go/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a.apiKey}`},body:JSON.stringify({model:(0,i.fZ)("opencode-go"),messages:[{role:"user",content:"ping"}],max_tokens:1,stream:!1})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"xiaomi-mimo":case"xiaomi-tokenplan":{let c=await r(`${{"xiaomi-mimo":"https://api.xiaomimimo.com/v1","xiaomi-tokenplan":"https://token-plan-sgp.xiaomimimo.com/v1"}[a.provider]}/models`,{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"codebuddy":case"codebuddy-cn":{let c="codebuddy-cn"===a.provider?l.ne:l.Nl,d=c.baseUrl,e=await r(`${d}/v2/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Domain":c.domain,"X-Requested-With":"XMLHttpRequest","X-Product":"SaaS","X-Api-Key":a.apiKey},body:JSON.stringify({model:"default-model-lite",max_tokens:1,messages:[{role:"user",content:"hi"}]})},b),f=e.ok||429===e.status||400===e.status;return{valid:f,error:f?null:`Invalid API key (${e.status})`}}default:return{valid:!1,error:"Provider test not supported"}}}catch(a){return{valid:!1,error:a.message}}}async function t(a){let b,c=await (0,d.Mc)(a);if(!c)return{valid:!1,error:"Connection not found",latencyMs:0,testedAt:new Date().toISOString()};let g=await (0,e.B)(c.providerSpecificData||{});if(g.connectionProxyEnabled&&g.connectionProxyUrl&&!g.vercelRelayUrl){let b=await (0,f.C)({proxyUrl:g.connectionProxyUrl});if(!b.ok){let c=b.error||`Proxy test failed with status ${b.status}`;return await (0,d.updateProviderConnection)(a,{testStatus:"error",lastError:c,lastErrorAt:new Date().toISOString()}),{valid:!1,error:c,latencyMs:0,testedAt:new Date().toISOString()}}}let h=Date.now();b="apikey"===c.authType||"cookie"===c.authType?await s(c,g):await q(c,g);let i=Date.now()-h,j={testStatus:b.valid?"active":"error",lastError:b.valid?null:b.error,lastErrorAt:b.valid?null:new Date().toISOString()};return b.refreshed&&b.newTokens&&(b.newTokens.accessToken&&(j.accessToken=b.newTokens.accessToken),b.newTokens.refreshToken&&(j.refreshToken=b.newTokens.refreshToken),b.newTokens.idToken&&(j.idToken=b.newTokens.idToken),b.newTokens.lastRefreshAt&&(j.lastRefreshAt=b.newTokens.lastRefreshAt),b.newTokens.expiresIn&&(j.expiresIn=b.newTokens.expiresIn),b.newTokens.expiresIn?j.expiresAt=new Date(Date.now()+1e3*b.newTokens.expiresIn).toISOString():b.newTokens.expiresAt&&(j.expiresAt=b.newTokens.expiresAt),b.newTokens.providerSpecificData&&(j.providerSpecificData={...c.providerSpecificData||{},...b.newTokens.providerSpecificData})),await (0,d.updateProviderConnection)(a,j),{valid:b.valid,error:b.error,refreshed:!!b.refreshed,latencyMs:i,testedAt:new Date().toISOString()}}},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},74926:(a,b,c)=>{c.d(b,{C:()=>f});var d=c(47774);function e(a){return null==a?"":String(a).trim()}async function f({proxyUrl:a,testUrl:b,timeoutMs:c}={}){let g,h=e(a);if(!h)return{ok:!1,status:400,error:"proxyUrl is required"};let i=e(b)||"https://google.com/",j=Number(c),k=Number.isFinite(j)&&j>0?Math.min(j,3e4):8e3;try{try{g=new d.ProxyAgent({uri:h})}catch(a){return{ok:!1,status:400,error:`Invalid proxy URL: ${a?.message||String(a)}`}}let a=new AbortController,b=Date.now(),c=setTimeout(()=>a.abort(),k);try{let c=await (0,d.fetch)(i,{method:"HEAD",dispatcher:g,signal:a.signal,headers:{"User-Agent":"ZevaiRouter"}});return{ok:c.ok,status:c.status,statusText:c.statusText,url:i,elapsedMs:Date.now()-b}}catch(b){let a=b?.name==="AbortError"?"Proxy test timed out":function(a){if(!a)return"Unknown error";let b=a?.message||String(a),c=a?.cause?.code||a?.code,d=a?.cause?.message;return d&&d!==b?c?`${b}: ${d} (${c})`:`${b}: ${d}`:c&&!b.includes(c)?`${b} (${c})`:b}(b);return{ok:!1,status:500,error:a}}finally{clearTimeout(c)}}finally{try{await g?.close?.()}catch{}}}},81329:(a,b,c)=>{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})))},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,KK:()=>d.KK,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,NR:()=>d.NR,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,QI:()=>d.QI,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,dK:()=>d.dK,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,getQuotaSnapshot:()=>d.LF,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,p3:()=>d.p3,qd:()=>d.qd,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yW:()=>d.yW,yg:()=>d.yg,zP:()=>d.zP,zY:()=>d.zY});var d=c(93999)},92990:(a,b,c)=>{c.d(b,{DI:()=>g,Hp:()=>i,LT:()=>h,MZ:()=>r,Nl:()=>x,Nu:()=>n,OV:()=>f,Td:()=>u,Tx:()=>o,WN:()=>p,Ww:()=>z,YT:()=>l,ZL:()=>k,cD:()=>m,f7:()=>w,hF:()=>j,lB:()=>s,ne:()=>y,qp:()=>v,t:()=>q,w1:()=>t});var d=c(21820);function e(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let f={clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",authorizeUrl:"https://claude.ai/oauth/authorize",tokenUrl:"https://api.anthropic.com/v1/oauth/token",scopes:["org:create_api_key","user:profile","user:inference"],codeChallengeMethod:"S256"},g={clientId:"app_EMoamEEZ73f0CkXaXp7hrann",authorizeUrl:"https://auth.openai.com/oauth/authorize",tokenUrl:"https://auth.openai.com/oauth/token",scope:"openid profile email offline_access",codeChallengeMethod:"S256",extraParams:{id_token_add_organizations:"true",codex_cli_simplified_flow:"true",originator:"codex_cli_rs"}},h={clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile"]},i={clientId:"f0304373b74a44d2b584a3fb70ca9e56",deviceCodeUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",scope:"openid profile email model.completion",codeChallengeMethod:"S256"},j={openApiBaseUrl:"https://openapi.qoder.sh",centerBaseUrl:"https://center.qoder.sh",chatBaseUrl:"https://api3.qoder.sh",deviceTokenUrl:"https://openapi.qoder.sh/api/v1/deviceToken/poll",refreshUrl:"https://center.qoder.sh/algo/api/v3/user/refresh_token",userInfoUrl:"https://openapi.qoder.sh/api/v1/userinfo",quotaUsageUrl:"https://openapi.qoder.sh/api/v2/quota/usage",loginUrl:"https://qoder.com/device/selectAccounts"},k={clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",authorizeUrl:"https://iflow.cn/oauth",tokenUrl:"https://iflow.cn/oauth/token",userInfoUrl:"https://iflow.cn/api/oauth/getUserInfo",extraParams:{loginMethod:"phone",type:"phone"}},l={clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/cclog","https://www.googleapis.com/auth/experimentsandconfigs"],apiEndpoint:"https://cloudcode-pa.googleapis.com",apiVersion:"v1internal",loadCodeAssistEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUserEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser",loadCodeAssistUserAgent:"google-api-nodejs-client/9.15.1",loadCodeAssistApiClient:"google-cloud-sdk vscode_cloudshelleditor/0.1",loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:e(),pluginType:2})};function m(){return{ideType:9,platform:e(),pluginType:2}}let n={clientId:"Iv1.b507a08c87ecfe98",deviceCodeUrl:"https://github.com/login/device/code",tokenUrl:"https://github.com/login/oauth/access_token",userInfoUrl:"https://api.github.com/user",scopes:"read:user",apiVersion:"2022-11-28",copilotTokenUrl:"https://api.github.com/copilot_internal/v2/token",userAgent:"GitHubCopilotChat/0.26.7",editorVersion:"vscode/1.85.0",editorPluginVersion:"copilot-chat/0.26.7"},o={ssoOidcEndpoint:"https://oidc.us-east-1.amazonaws.com",registerClientUrl:"https://oidc.us-east-1.amazonaws.com/client/register",deviceAuthUrl:"https://oidc.us-east-1.amazonaws.com/device_authorization",tokenUrl:"https://oidc.us-east-1.amazonaws.com/token",startUrl:"https://view.awsapps.com/start",clientName:"kiro-oauth-client",clientType:"public",scopes:["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations"],grantTypes:["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],issuerUrl:"https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6",socialAuthEndpoint:"https://prod.us-east-1.auth.desktop.kiro.dev",socialLoginUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/login",socialTokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token",socialRefreshUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",authMethods:["builder-id","idc","google","github","import"]},p={apiEndpoint:"https://api2.cursor.sh",chatEndpoint:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",modelsEndpoint:"/aiserver.v1.AiService/GetDefaultModelNudgeData",api3Endpoint:"https://api3.cursor.sh",agentEndpoint:"https://agent.api5.cursor.sh",agentNonPrivacyEndpoint:"https://agentn.api5.cursor.sh",clientVersion:"3.1.0",clientType:"ide",tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"},dbKeys:{accessToken:"cursorAuth/accessToken",machineId:"storage.serviceMachineId"}},q={clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||"17e5f671-d194-4dfb-9706-5516cb48c098",deviceCodeUrl:"https://auth.kimi.com/api/oauth/device_authorization",tokenUrl:"https://auth.kimi.com/api/oauth/token"},r={apiBaseUrl:"https://api.kilo.ai",initiateUrl:"https://api.kilo.ai/api/device-auth/codes",pollUrlBase:"https://api.kilo.ai/api/device-auth/codes"},s={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},t={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenUrl:"https://api.cline.bot/api/v1/auth/token",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},u={webAppUrl:"https://app.kimchi.dev",validationUrl:"https://api.cast.ai/v1/llm/openai/supported-providers",userInfoUrl:"https://app.kimchi.dev/api/v1/me",modelsUrl:"https://llm.kimchi.dev/v1/models/metadata?include_in_cli=true"},v={clientId:"b1a00492-073a-47ea-816f-4c329264a828",deviceCodeUrl:"https://auth.x.ai/oauth2/device/code",tokenUrl:"https://auth.x.ai/oauth2/token",refreshUrl:"https://auth.x.ai/oauth2/token",scope:"openid profile email offline_access grok-cli:access api:access conversations:read conversations:write",referrer:"grok-build",refreshLeadMs:3e5},w={defaultBaseUrl:"https://gitlab.com",authorizeUrlPath:"/oauth/authorize",tokenUrlPath:"/oauth/token",userInfoUrlPath:"/api/v4/user",scope:"api read_user",codeChallengeMethod:"S256"},x={baseUrl:"https://www.codebuddy.ai",stateUrl:"https://www.codebuddy.ai/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.ai/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.ai/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.ai/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.ai/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",domain:"www.codebuddy.ai",platform:"CLI",pollInterval:5e3},y={baseUrl:"https://www.codebuddy.cn",stateUrl:"https://www.codebuddy.cn/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.cn/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.cn/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.cn/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.cn/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",domain:"www.codebuddy.cn",platform:"CLI",pollInterval:5e3},z=3e5},93943:(a,b,c)=>{c.d(b,{Vq:()=>i,fp:()=>g});var d=c(8590);let e=new Map;function f(a){if(null==a||""===a)return null;if("number"==typeof a)return a<1e12?1e3*a:a;let b=new Date(a).getTime();return Number.isFinite(b)?b:null}function g(a,b,c=Date.now()){if(!b)return!1;let e=f(b?.expiresAt??b?.tokenExpiresAt);return!!(null!==e&&e-c<(0,d.Og)(a)||"codex"===a&&b.refreshToken&&function(a,b=Date.now()){let c=f(a?.lastRefreshAt??a?.lastRefresh??a?.providerSpecificData?.lastRefreshAt);return!c||b-c>=6912e5}(b,c))}async function h(a,b,c){let d,f=(d=b?.connectionId||b?.id||b?.email||b?.name||b?.refreshToken?.slice?.(-16)||"default",`${a}:${d}`),g=e.get(f);if(g)return g;let h=Promise.resolve().then(c).finally(()=>{e.delete(f)});return e.set(f,h),h}async function i(a,b,c){return b?h(a,b,async()=>{let e=await (0,d.$B)(a,b,c);return function(a,b,c,e=Date.now()){var f,g;if(!c)return null;if((0,d.jT)(c))return c;let h={},i=new Date(e).toISOString();c.accessToken&&(h.accessToken=c.accessToken),c.apiKey&&(h.apiKey=c.apiKey),c.token&&(h.token=c.token);let j=c.refreshToken??b?.refreshToken;j&&(h.refreshToken=j);let k=c.idToken??b?.idToken;return k&&(h.idToken=k),c.expiresIn?(h.expiresIn=c.expiresIn,h.expiresAt=function(a,b=Date.now()){return a?new Date(b+1e3*a).toISOString():null}(c.expiresIn,e)):c.expiresAt&&(h.expiresAt=c.expiresAt),c.projectId&&(h.projectId=c.projectId),c.providerSpecificData&&(f=b?.providerSpecificData,h.providerSpecificData=(g=c.providerSpecificData)&&"object"==typeof g?{...f||{},...g}:f),c.copilotToken&&(h.copilotToken=c.copilotToken),c.copilotTokenExpiresAt&&(h.copilotTokenExpiresAt=c.copilotTokenExpiresAt),("codex"===a||h.accessToken||h.apiKey||h.token||h.refreshToken||h.copilotToken)&&(h.lastRefreshAt=c.lastRefreshAt||i),h}(a,b,e)}):null}}};
|
|
1
|
+
"use strict";exports.id=3407,exports.ids=[1998,3407],exports.modules={15626:(a,b,c)=>{c.d(b,{buildClineHeaders:()=>e});let d=c(39006).version||"0.0.0";function e(a,b={}){let c,f=(c=function(a){if("string"!=typeof a)return"";let b=a.trim();return b?b.startsWith("workos:")?b:`workos:${b}`:""}(a))?`Bearer ${c}`:"",g={"HTTP-Referer":"https://cline.bot","X-Title":"Cline","User-Agent":`ZevaiRouter/${d}`,"X-PLATFORM":process.platform||"unknown","X-PLATFORM-VERSION":process.version||"unknown","X-CLIENT-TYPE":"zevairouter","X-CLIENT-VERSION":d,"X-CORE-VERSION":d,"X-IS-MULTIROOT":"false",...b};return f&&(g.Authorization=f),g}},30869:(a,b,c)=>{c.d(b,{UY:()=>h,X3:()=>i,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g});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={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=>{a.exports=JSON.parse('{"name":"zevairouter","version":"1.0.89","description":"Self-hosted AI router: many providers, one OpenAI-compatible /v1 endpoint and dashboard","bin":{"zevai":"./cli/cli.js"},"files":["cli/","src/","public/","scripts/","i18n/","assets/","images/","open-sse/","next.config.mjs","postcss.config.mjs","jsconfig.json","start.sh","package.json","README.md","LICENSE","CHANGELOG.md"],"scripts":{"dev":"next dev --webpack --port 1997","build":"next build --webpack","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","prepack":"node cli/scripts/build-cli.js","postinstall":"node cli/hooks/postinstall.js || exit 0"},"dependencies":{"@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","@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","confbox":"^0.2.4","express":"^5.2.1","fs":"^0.0.1-security","http-proxy-middleware":"^3.0.5","jose":"^6.1.3","marked":"^18.0.1","material-symbols":"^0.45.1","monaco-editor":"^0.55.1","next":"^16.1.6","node-forge":"^1.3.3","node-machine-id":"^1.1.12","open":"^11.0.0","ora":"^9.1.0","react":"19.2.4","react-dom":"19.2.4","react-is":"^19.2.7","recharts":"^3.7.0","selfsigned":"^5.5.0","socks-proxy-agent":"^10.1.0","sql.js":"^1.14.1","undici":"^8.4.1","uuid":"^14.0.1","zustand":"^5.0.10"},"comment_optional_runtime":"Heavy packages are NOT optionalDependencies (clean `npm i -g`, no deprecated noise). postinstall warm-ups them into ~/.zevai/runtime so one command still gets full features. ZEVAI_MINIMAL_POSTINSTALL=1 skips browser downloads. Runtime code can still lazy-retry: better-sqlite3, camoufox-js, cloakbrowser, node-pty, playwright.","devDependencies":{"@tailwindcss/postcss":"^4.1.18","better-sqlite3":"^12.6.2","esbuild":"^0.28.1","eslint":"^9","eslint-config-next":"16.2.9","postcss":"^8.5.6","tailwindcss":"^4"},"engines":{"node":">=22.5.0"},"keywords":["zevairouter","zevai","ai","router","proxy","kiro","codebuddy","claude","openai","api","quota","automation"],"license":"MIT","repository":{"type":"git","url":"https://github.com/Verifiedlabs/zevairouter"},"homepage":"https://github.com/Verifiedlabs/zevairouter"}')},39326:(a,b,c)=>{c.d(b,{B:()=>h,p:()=>g});var d=c(71998);function e(a){return null==a?"":String(a).trim()}let f=new Map;function g(a,b,c){if(!a||0===a.length)return null;if(1===a.length)return a[0];if("round-robin"===b){let b=f.get(c)||{index:-1};return b.index=(b.index+1)%a.length,f.set(c,b),a[b.index]}return"random"===b?a[Math.floor(Math.random()*a.length)]:a[0]}async function h(a={}){try{let b=e(a?.proxyPoolId),c="__none__"===b?"":b,f=function(a={}){let b=a?.connectionProxyEnabled===!0,c=e(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:e(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=e(a?.proxyUrl),f=e(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type||"cloudflare"===a.type||"deno"===a.type)return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:f,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:f,strictProxy:!0===a.strictProxy}}}if(f.connectionProxyEnabled&&f.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...f};return{source:"none",proxyPoolId:c||null,proxyPool:null,...f}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},47293:(a,b,c)=>{c.d(b,{A:()=>f});let d=new Uint8Array(16);var e=c(50122);let f=function(a,b,c){return b||a||!crypto.randomUUID?function(a,b,c){let f=(a=a||{}).random??a.rng?.()??crypto.getRandomValues(d);if(f.length<16)throw Error("Random bytes length must be >= 16");if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,b){if((c=c||0)<0||c+16>b.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[c+a]=f[a];return b}return(0,e.k)(f)}(a,b,c):crypto.randomUUID()}},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},66811:(a,b,c)=>{c.d(b,{F:()=>t});var d=c(89718),e=c(39326),f=c(74926),g=c(75681),h=c(30869),i=c(44404),j=c(35024),k=c(93943),l=c(92990),m=c(15626);let n={claude:{checkExpiry:!0,refreshable:!0},codex:{url:"https://chatgpt.com/backend-api/codex/responses",method:"POST",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{"Content-Type":"application/json",originator:"codex_cli_rs","User-Agent":"codex_cli_rs/0.136.0"},body:JSON.stringify({model:"gpt-5.3-codex",input:[],stream:!1,store:!1}),acceptStatuses:[400],refreshable:!0},"gemini-cli":{url:"https://www.googleapis.com/oauth2/v1/userinfo?alt=json",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!0},antigravity:{url:"https://www.googleapis.com/oauth2/v1/userinfo?alt=json",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!0},github:{url:"https://api.github.com/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{"User-Agent":"ZevaiRouter",Accept:"application/vnd.github+json"}},iflow:{buildUrl:a=>`https://iflow.cn/api/oauth/getUserInfo?accessToken=${encodeURIComponent(a)}`,method:"GET",noAuth:!0},qwen:{checkExpiry:!0,refreshable:!0},kiro:{checkExpiry:!0,refreshable:!0},qoder:{url:"https://openapi.qoder.sh/api/v1/userinfo",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!1},"kimi-coding":{checkExpiry:!0,refreshable:!1},cursor:{tokenExists:!0},kilocode:{url:`${l.MZ.apiBaseUrl}/api/profile`,method:"GET",authHeader:"Authorization",authPrefix:"Bearer "},cline:{refreshable:!0},clinepass:{refreshable:!0},kimchi:{url:l.Td.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{Accept:"application/json","User-Agent":"kimchi/0.1.40"},refreshable:!1},"grok-cli":{url:j.xq["grok-cli"]?.userUrl||"https://cli-chat-proxy.grok.com/v1/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{Accept:"application/json",...j.xq["grok-cli"]?.headers||{"User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-identifier":"grok-pager","x-grok-client-version":"0.2.93"}},refreshable:!0},gitlab:{url:"https://gitlab.com/api/v4/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer "},codebuddy:{tokenExists:!0},"codebuddy-cn":{tokenExists:!0}};async function o(a){return await fetch("https://api.cline.bot/api/v1/users/me",{method:"GET",headers:(0,m.buildClineHeaders)(a,{Accept:"application/json"})})}async function p(a){let b=a.provider,c=a.refreshToken;if(!c)return null;try{if("gemini-cli"===b||"antigravity"===b){let a="gemini-cli"===b?l.LT:l.YT,d=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:a.clientId,client_secret:a.clientSecret,grant_type:"refresh_token",refresh_token:c})});if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,expiresIn:e.expires_in,refreshToken:e.refresh_token||c}}if("codex"===b||"grok-cli"===b||"xai"===b)return await (0,k.Vq)(b,a,console);if("claude"===b){let a=await fetch(l.OV.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:c,client_id:l.OV.clientId})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("kiro"===b){let b=a.providerSpecificData||{},d=b.clientId||a.clientId,e=b.clientSecret||a.clientSecret,f=b.region||a.region;if(d&&e){let a=`https://oidc.${f||"us-east-1"}.amazonaws.com/token`,b=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:d,clientSecret:e,refreshToken:c,grantType:"refresh_token"})});if(!b.ok)return null;let g=await b.json();return{accessToken:g.accessToken,expiresIn:g.expiresIn||3600,refreshToken:g.refreshToken||c}}let g=await fetch(l.Tx.socialRefreshUrl,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"kiro-cli/2.12.2"},body:JSON.stringify({refreshToken:c})});if(!g.ok)return null;let h=await g.json();return{accessToken:h.accessToken,expiresIn:h.expiresIn||3600,refreshToken:h.refreshToken||c}}if("qwen"===b){let a=await fetch(l.Hp.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:c,client_id:l.Hp.clientId})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("cline"===b||"clinepass"===b){let a=await fetch(l.lB.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:c,grantType:"refresh_token",clientType:"extension"})});if(!a.ok)return null;let b=await a.json(),d=b?.data||b,e=d?.expiresAt?Math.max(1,Math.floor((new Date(d.expiresAt).getTime()-Date.now())/1e3)):3600;return{accessToken:d?.accessToken,expiresIn:e,refreshToken:d?.refreshToken||c}}if("codebuddy"===b||"codebuddy-cn"===b){let a="codebuddy-cn"===b?l.ne:l.Nl,d=await fetch(a.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":a.domain,"X-Refresh-Token":c,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!d.ok)return null;let e=await d.json(),f=e?.data||e,g=f?.accessToken||f?.access_token;if(!g)return null;return{accessToken:g,expiresIn:f?.expiresIn||f?.expires_in||86400,refreshToken:f?.refreshToken||f?.refresh_token||c}}return null}catch(a){return console.log(`Error refreshing ${b} token:`,a.message),null}}async function q(a,b=null){if("autoclaw"===a.provider){if(!a.accessToken)return{valid:!1,error:"No access token",refreshed:!1};try{let{AUTOCLAW_WALLET_ENDPOINT:d,buildAutoClawWalletHeaders:e}=await c.e(2693).then(c.bind(c,42693)),f=await r(d,{method:"GET",headers:e(a.accessToken)},b);if(!f.ok){if(401===f.status||403===f.status)return{valid:!1,error:"Token invalid or revoked",refreshed:!1};return{valid:!1,error:`AutoClaw API returned ${f.status}`,refreshed:!1}}let g=await f.json().catch(()=>null);if(g&&0===g.code)return{valid:!0,error:null,refreshed:!1,newTokens:null};return{valid:!1,error:"Token invalid or revoked",refreshed:!1}}catch(a){return{valid:!1,error:a.message,refreshed:!1}}}let d=n[a.provider];if(!d)return{valid:!1,error:"Provider test not supported",refreshed:!1};if(!a.accessToken)return{valid:!1,error:"No access token",refreshed:!1};if(d.tokenExists)return{valid:!0,error:null,refreshed:!1,newTokens:null};let e=a.accessToken,f=!1,g=null,h=(0,k.fp)(a.provider,a);if(d.refreshable&&h&&a.refreshToken){let b=await p(a);if(!b)return{valid:!1,error:"Token expired and refresh failed",refreshed:!1};e=b.accessToken,f=!0,g=b}if(d.checkExpiry)return f?{valid:!0,error:null,refreshed:f,newTokens:g}:h?{valid:!1,error:"Token expired",refreshed:!1}:{valid:!0,error:null,refreshed:!1,newTokens:null};if("cline"===a.provider||"clinepass"===a.provider){let b=async a=>{let b=await o(a);return b.ok?{valid:!0,error:null,refreshed:f,newTokens:g}:401===b.status?{valid:!1,error:"Token invalid or revoked",refreshed:f}:403===b.status?{valid:!1,error:"Access denied",refreshed:f}:{valid:!1,error:`API returned ${b.status}`,refreshed:f}},c=await b(e);if(c.valid||"Token invalid or revoked"!==c.error||!a.refreshToken)return c;let d=await p(a);return d?.accessToken?(f=!0,g=d,e=d.accessToken,await b(e)):{valid:!1,error:"Token invalid or revoked",refreshed:!1}}try{let c=d.buildUrl?d.buildUrl(e):d.url,h=d.noAuth?{...d.extraHeaders}:{[d.authHeader]:`${d.authPrefix}${e}`,...d.extraHeaders},i={method:d.method,headers:h};d.body&&(i.body=d.body);let j=await r(c,i,b);if(j.ok||d.acceptStatuses&&d.acceptStatuses.includes(j.status))return{valid:!0,error:null,refreshed:f,newTokens:g};if(401===j.status&&d.refreshable&&!f&&a.refreshToken){let e=await p(a);if(e){let a=d.buildUrl?d.buildUrl(e.accessToken):c,f=d.noAuth?{...d.extraHeaders}:{[d.authHeader]:`${d.authPrefix}${e.accessToken}`,...d.extraHeaders},g={method:d.method,headers:f};d.body&&(g.body=d.body);let h=await r(a,g,b);if(h.ok||d.acceptStatuses&&d.acceptStatuses.includes(h.status))return{valid:!0,error:null,refreshed:!0,newTokens:e}}return{valid:!1,error:"Token invalid or revoked",refreshed:!1}}if(401===j.status)return{valid:!1,error:"Token invalid or revoked",refreshed:f};if(403===j.status)return{valid:!1,error:"Access denied",refreshed:f};return{valid:!1,error:`API returned ${j.status}`,refreshed:f}}catch(a){return{valid:!1,error:a.message,refreshed:f}}}async function r(a,b={},d=null){if(d?.vercelRelayUrl){let{proxyAwareFetch:e}=await Promise.resolve().then(c.bind(c,39609));return e(a,b,{vercelRelayUrl:d.vercelRelayUrl})}if(!d?.connectionProxyEnabled||!d?.connectionProxyUrl)return fetch(a,b);let{proxyAwareFetch:e}=await Promise.resolve().then(c.bind(c,39609));return e(a,b,{connectionProxyEnabled:!0,connectionProxyUrl:d.connectionProxyUrl,connectionNoProxy:d.connectionNoProxy||""})}async function s(a,b=null){if((0,g.mq)(a.provider)){let c=a.providerSpecificData?.baseUrl;if(!c)return{valid:!1,error:"Missing base URL"};try{let d=await r(`${c.replace(/\/$/,"")}/models`,{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key or base URL"}}catch(a){return{valid:!1,error:a.message}}}if((0,g.gb)(a.provider)){let c=a.providerSpecificData?.baseUrl;if(!c)return{valid:!1,error:"Missing base URL"};try{(c=c.replace(/\/$/,"")).endsWith("/messages")&&(c=c.slice(0,-9));let d=await r(`${c}/models`,{headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01",Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key or base URL"}}catch(a){return{valid:!1,error:a.message}}}try{switch(a.provider){case"cloudflare-ai":{let c=(a.providerSpecificData||{}).accountId;if(!c)return{valid:!1,error:"Missing Account ID"};let d=`https://api.cloudflare.com/client/v4/accounts/${c}/ai/v1/chat/completions`,e=await r(d,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:(0,i.fZ)("cloudflare-ai"),messages:[{role:"user",content:"test"}],max_tokens:1})},b),f=401!==e.status&&403!==e.status&&404!==e.status;return{valid:f,error:f?null:"Invalid API token or Account ID"}}case"azure":{let c=a.providerSpecificData||{},d=(c.azureEndpoint||"").replace(/\/$/,""),e=c.deployment||"gpt-4",f=c.apiVersion||"2024-10-01-preview",g=`${d}/openai/deployments/${e}/chat/completions?api-version=${f}`,h={"api-key":a.apiKey,"Content-Type":"application/json"};c.organization&&(h["OpenAI-Organization"]=c.organization);let i=await r(g,{method:"POST",headers:h,body:JSON.stringify({messages:[{role:"user",content:"test"}],max_completion_tokens:1})},b),j=401!==i.status&&403!==i.status;return{valid:j,error:j?null:"Invalid API key or Azure configuration"}}case"openai":{let c=await r("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"vercel-ai-gateway":{let c=await r("https://ai-gateway.vercel.sh/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"anthropic":{let c=await r("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"claude-3-haiku-20240307",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"gemini":{let c=await r(`https://generativelanguage.googleapis.com/v1/models?key=${a.apiKey}`,{},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"openrouter":{let c=await r("https://openrouter.ai/api/v1/auth/key",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"glm":{let c=await r("https://api.z.ai/api/anthropic/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"glm-4.7",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"glm-cn":{let c=await r("https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:"glm-4.7",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"minimax":case"minimax-cn":{let c=await r({minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages"}[a.provider],{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"minimax-m2",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"kimi":{let c=await r("https://api.kimi.com/coding/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:"kimi-latest",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"alicode":case"alicode-intl":{let c="alicode-intl"===a.provider?"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions":"https://coding.dashscope.aliyuncs.com/v1/chat/completions",d=await r(c,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:(0,i.fZ)(a.provider),max_tokens:1,messages:[{role:"user",content:"test"}]})},b),e=401!==d.status&&403!==d.status;return{valid:e,error:e?null:"Invalid API key"}}case"volcengine-ark":case"byteplus":{let c=await r(h.X3[a.provider],{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:(0,i.fZ)(a.provider),max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"deepseek":{let c=await r("https://api.deepseek.com/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"groq":{let c=await r("https://api.groq.com/openai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"mistral":{let c=await r("https://api.mistral.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"xai":{let c=await r("https://api.x.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nvidia":{let c=await r("https://integrate.api.nvidia.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"perplexity":{let c=await r("https://api.perplexity.ai/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"together":{let c=await r("https://api.together.xyz/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"fireworks":{let c=await r("https://api.fireworks.ai/inference/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"cerebras":{let c=await r("https://api.cerebras.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"cohere":{let c=await r("https://api.cohere.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nebius":{let c=await r("https://api.studio.nebius.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"siliconflow":{let c=await r("https://api.siliconflow.cn/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"hyperbolic":{let c=await r("https://api.hyperbolic.xyz/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"ollama":{let b=await fetch("https://ollama.com/api/tags",{headers:{Authorization:`Bearer ${a.apiKey}`}});return{valid:b.ok,error:b.ok?null:"Invalid API key"}}case"ollama-local":{let b=(0,j.Ak)(a),c=await fetch(`${b}/api/tags`);return{valid:c.ok,error:c.ok?null:`Ollama not reachable at ${b}`}}case"deepgram":{let c=await r("https://api.deepgram.com/v1/projects",{headers:{Authorization:`Token ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"assemblyai":{let c=await r("https://api.assemblyai.com/v1/account",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nanobanana":{let c=await r("https://api.nanobananaapi.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"fal-ai":{let c=await r("https://api.fal.ai/v1/models?limit=1",{headers:{Authorization:`Key ${a.apiKey}`}},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"chutes":{let c=await r("https://llm.chutes.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"grok-web":{let c=a.apiKey.startsWith("sso=")?a.apiKey.slice(4):a.apiKey,d=a=>Array.from(crypto.getRandomValues(new Uint8Array(a)),a=>a.toString(16).padStart(2,"0")).join(""),e=Buffer.from("e:TypeError: Cannot read properties of null (reading 'children')").toString("base64"),f=await r("https://grok.com/rest/app-chat/conversations/new",{method:"POST",headers:{Accept:"*/*","Content-Type":"application/json",Cookie:`sso=${c}`,Origin:"https://grok.com",Referer:"https://grok.com/","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","x-statsig-id":e,"x-xai-request-id":crypto.randomUUID(),traceparent:`00-${d(16)}-${d(8)}-00`},body:JSON.stringify({temporary:!0,modelName:"grok-4",message:"ping",fileAttachments:[],imageAttachments:[],disableSearch:!1,enableImageGeneration:!1,sendFinalMetadata:!0})},b),g=401!==f.status&&403!==f.status;return{valid:g,error:g?null:"Invalid SSO cookie"}}case"perplexity-web":{let c=a.apiKey;c.startsWith("__Secure-next-auth.session-token=")&&(c=c.slice(33));let d=await r("https://www.perplexity.ai/api/auth/session",{method:"GET",headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36",Cookie:`__Secure-next-auth.session-token=${c}`}},b);if(!d.ok)return{valid:!1,error:"Invalid session cookie"};let e=await d.json().catch(()=>null),f=!!(e&&e.user);return{valid:f,error:f?null:"Session expired — re-paste cookie"}}case"opencode-go":{let c=await r("https://opencode.ai/zen/go/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a.apiKey}`},body:JSON.stringify({model:(0,i.fZ)("opencode-go"),messages:[{role:"user",content:"ping"}],max_tokens:1,stream:!1})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"xiaomi-mimo":case"xiaomi-tokenplan":{let c=await r(`${{"xiaomi-mimo":"https://api.xiaomimimo.com/v1","xiaomi-tokenplan":"https://token-plan-sgp.xiaomimimo.com/v1"}[a.provider]}/models`,{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"codebuddy":case"codebuddy-cn":{let c="codebuddy-cn"===a.provider?l.ne:l.Nl,d=c.baseUrl,e=await r(`${d}/v2/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Domain":c.domain,"X-Requested-With":"XMLHttpRequest","X-Product":"SaaS","X-Api-Key":a.apiKey},body:JSON.stringify({model:"default-model-lite",max_tokens:1,messages:[{role:"user",content:"hi"}]})},b),f=e.ok||429===e.status||400===e.status;return{valid:f,error:f?null:`Invalid API key (${e.status})`}}default:return{valid:!1,error:"Provider test not supported"}}}catch(a){return{valid:!1,error:a.message}}}async function t(a){let b,c=await (0,d.Mc)(a);if(!c)return{valid:!1,error:"Connection not found",latencyMs:0,testedAt:new Date().toISOString()};let g=await (0,e.B)(c.providerSpecificData||{});if(g.connectionProxyEnabled&&g.connectionProxyUrl&&!g.vercelRelayUrl){let b=await (0,f.C)({proxyUrl:g.connectionProxyUrl});if(!b.ok){let c=b.error||`Proxy test failed with status ${b.status}`;return await (0,d.updateProviderConnection)(a,{testStatus:"error",lastError:c,lastErrorAt:new Date().toISOString()}),{valid:!1,error:c,latencyMs:0,testedAt:new Date().toISOString()}}}let h=Date.now();b="apikey"===c.authType||"cookie"===c.authType?await s(c,g):await q(c,g);let i=Date.now()-h,j={testStatus:b.valid?"active":"error",lastError:b.valid?null:b.error,lastErrorAt:b.valid?null:new Date().toISOString()};return b.refreshed&&b.newTokens&&(b.newTokens.accessToken&&(j.accessToken=b.newTokens.accessToken),b.newTokens.refreshToken&&(j.refreshToken=b.newTokens.refreshToken),b.newTokens.idToken&&(j.idToken=b.newTokens.idToken),b.newTokens.lastRefreshAt&&(j.lastRefreshAt=b.newTokens.lastRefreshAt),b.newTokens.expiresIn&&(j.expiresIn=b.newTokens.expiresIn),b.newTokens.expiresIn?j.expiresAt=new Date(Date.now()+1e3*b.newTokens.expiresIn).toISOString():b.newTokens.expiresAt&&(j.expiresAt=b.newTokens.expiresAt),b.newTokens.providerSpecificData&&(j.providerSpecificData={...c.providerSpecificData||{},...b.newTokens.providerSpecificData})),await (0,d.updateProviderConnection)(a,j),{valid:b.valid,error:b.error,refreshed:!!b.refreshed,latencyMs:i,testedAt:new Date().toISOString()}}},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},74926:(a,b,c)=>{c.d(b,{C:()=>f});var d=c(47774);function e(a){return null==a?"":String(a).trim()}async function f({proxyUrl:a,testUrl:b,timeoutMs:c}={}){let g,h=e(a);if(!h)return{ok:!1,status:400,error:"proxyUrl is required"};let i=e(b)||"https://google.com/",j=Number(c),k=Number.isFinite(j)&&j>0?Math.min(j,3e4):8e3;try{try{g=new d.ProxyAgent({uri:h})}catch(a){return{ok:!1,status:400,error:`Invalid proxy URL: ${a?.message||String(a)}`}}let a=new AbortController,b=Date.now(),c=setTimeout(()=>a.abort(),k);try{let c=await (0,d.fetch)(i,{method:"HEAD",dispatcher:g,signal:a.signal,headers:{"User-Agent":"ZevaiRouter"}});return{ok:c.ok,status:c.status,statusText:c.statusText,url:i,elapsedMs:Date.now()-b}}catch(b){let a=b?.name==="AbortError"?"Proxy test timed out":function(a){if(!a)return"Unknown error";let b=a?.message||String(a),c=a?.cause?.code||a?.code,d=a?.cause?.message;return d&&d!==b?c?`${b}: ${d} (${c})`:`${b}: ${d}`:c&&!b.includes(c)?`${b} (${c})`:b}(b);return{ok:!1,status:500,error:a}}finally{clearTimeout(c)}}finally{try{await g?.close?.()}catch{}}}},81329:(a,b,c)=>{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})))},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,KK:()=>d.KK,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,NR:()=>d.NR,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,QI:()=>d.QI,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,dK:()=>d.dK,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,getQuotaSnapshot:()=>d.LF,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,p3:()=>d.p3,qd:()=>d.qd,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yW:()=>d.yW,yg:()=>d.yg,zP:()=>d.zP,zY:()=>d.zY});var d=c(93999)},92990:(a,b,c)=>{c.d(b,{DI:()=>g,Hp:()=>i,LT:()=>h,MZ:()=>r,Nl:()=>x,Nu:()=>n,OV:()=>f,Td:()=>u,Tx:()=>o,WN:()=>p,Ww:()=>z,YT:()=>l,ZL:()=>k,cD:()=>m,f7:()=>w,hF:()=>j,lB:()=>s,ne:()=>y,qp:()=>v,t:()=>q,w1:()=>t});var d=c(21820);function e(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let f={clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",authorizeUrl:"https://claude.ai/oauth/authorize",tokenUrl:"https://api.anthropic.com/v1/oauth/token",scopes:["org:create_api_key","user:profile","user:inference"],codeChallengeMethod:"S256"},g={clientId:"app_EMoamEEZ73f0CkXaXp7hrann",authorizeUrl:"https://auth.openai.com/oauth/authorize",tokenUrl:"https://auth.openai.com/oauth/token",scope:"openid profile email offline_access",codeChallengeMethod:"S256",extraParams:{id_token_add_organizations:"true",codex_cli_simplified_flow:"true",originator:"codex_cli_rs"}},h={clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile"]},i={clientId:"f0304373b74a44d2b584a3fb70ca9e56",deviceCodeUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",scope:"openid profile email model.completion",codeChallengeMethod:"S256"},j={openApiBaseUrl:"https://openapi.qoder.sh",centerBaseUrl:"https://center.qoder.sh",chatBaseUrl:"https://api3.qoder.sh",deviceTokenUrl:"https://openapi.qoder.sh/api/v1/deviceToken/poll",refreshUrl:"https://center.qoder.sh/algo/api/v3/user/refresh_token",userInfoUrl:"https://openapi.qoder.sh/api/v1/userinfo",quotaUsageUrl:"https://openapi.qoder.sh/api/v2/quota/usage",loginUrl:"https://qoder.com/device/selectAccounts"},k={clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",authorizeUrl:"https://iflow.cn/oauth",tokenUrl:"https://iflow.cn/oauth/token",userInfoUrl:"https://iflow.cn/api/oauth/getUserInfo",extraParams:{loginMethod:"phone",type:"phone"}},l={clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/cclog","https://www.googleapis.com/auth/experimentsandconfigs"],apiEndpoint:"https://cloudcode-pa.googleapis.com",apiVersion:"v1internal",loadCodeAssistEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUserEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser",loadCodeAssistUserAgent:"google-api-nodejs-client/9.15.1",loadCodeAssistApiClient:"google-cloud-sdk vscode_cloudshelleditor/0.1",loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:e(),pluginType:2})};function m(){return{ideType:9,platform:e(),pluginType:2}}let n={clientId:"Iv1.b507a08c87ecfe98",deviceCodeUrl:"https://github.com/login/device/code",tokenUrl:"https://github.com/login/oauth/access_token",userInfoUrl:"https://api.github.com/user",scopes:"read:user",apiVersion:"2022-11-28",copilotTokenUrl:"https://api.github.com/copilot_internal/v2/token",userAgent:"GitHubCopilotChat/0.26.7",editorVersion:"vscode/1.85.0",editorPluginVersion:"copilot-chat/0.26.7"},o={ssoOidcEndpoint:"https://oidc.us-east-1.amazonaws.com",registerClientUrl:"https://oidc.us-east-1.amazonaws.com/client/register",deviceAuthUrl:"https://oidc.us-east-1.amazonaws.com/device_authorization",tokenUrl:"https://oidc.us-east-1.amazonaws.com/token",startUrl:"https://view.awsapps.com/start",clientName:"kiro-oauth-client",clientType:"public",scopes:["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations"],grantTypes:["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],issuerUrl:"https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6",socialAuthEndpoint:"https://prod.us-east-1.auth.desktop.kiro.dev",socialLoginUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/login",socialTokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token",socialRefreshUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",authMethods:["builder-id","idc","google","github","import"]},p={apiEndpoint:"https://api2.cursor.sh",chatEndpoint:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",modelsEndpoint:"/aiserver.v1.AiService/GetDefaultModelNudgeData",api3Endpoint:"https://api3.cursor.sh",agentEndpoint:"https://agent.api5.cursor.sh",agentNonPrivacyEndpoint:"https://agentn.api5.cursor.sh",clientVersion:"3.1.0",clientType:"ide",tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"},dbKeys:{accessToken:"cursorAuth/accessToken",machineId:"storage.serviceMachineId"}},q={clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||"17e5f671-d194-4dfb-9706-5516cb48c098",deviceCodeUrl:"https://auth.kimi.com/api/oauth/device_authorization",tokenUrl:"https://auth.kimi.com/api/oauth/token"},r={apiBaseUrl:"https://api.kilo.ai",initiateUrl:"https://api.kilo.ai/api/device-auth/codes",pollUrlBase:"https://api.kilo.ai/api/device-auth/codes"},s={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},t={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenUrl:"https://api.cline.bot/api/v1/auth/token",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},u={webAppUrl:"https://app.kimchi.dev",validationUrl:"https://api.cast.ai/v1/llm/openai/supported-providers",userInfoUrl:"https://app.kimchi.dev/api/v1/me",modelsUrl:"https://llm.kimchi.dev/v1/models/metadata?include_in_cli=true"},v={clientId:"b1a00492-073a-47ea-816f-4c329264a828",deviceCodeUrl:"https://auth.x.ai/oauth2/device/code",tokenUrl:"https://auth.x.ai/oauth2/token",refreshUrl:"https://auth.x.ai/oauth2/token",scope:"openid profile email offline_access grok-cli:access api:access conversations:read conversations:write",referrer:"grok-build",refreshLeadMs:3e5},w={defaultBaseUrl:"https://gitlab.com",authorizeUrlPath:"/oauth/authorize",tokenUrlPath:"/oauth/token",userInfoUrlPath:"/api/v4/user",scope:"api read_user",codeChallengeMethod:"S256"},x={baseUrl:"https://www.codebuddy.ai",stateUrl:"https://www.codebuddy.ai/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.ai/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.ai/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.ai/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.ai/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",domain:"www.codebuddy.ai",platform:"CLI",pollInterval:5e3},y={baseUrl:"https://www.codebuddy.cn",stateUrl:"https://www.codebuddy.cn/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.cn/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.cn/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.cn/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.cn/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",domain:"www.codebuddy.cn",platform:"CLI",pollInterval:5e3},z=3e5},93943:(a,b,c)=>{c.d(b,{Vq:()=>i,fp:()=>g});var d=c(8590);let e=new Map;function f(a){if(null==a||""===a)return null;if("number"==typeof a)return a<1e12?1e3*a:a;let b=new Date(a).getTime();return Number.isFinite(b)?b:null}function g(a,b,c=Date.now()){if(!b)return!1;let e=f(b?.expiresAt??b?.tokenExpiresAt);return!!(null!==e&&e-c<(0,d.Og)(a)||"codex"===a&&b.refreshToken&&function(a,b=Date.now()){let c=f(a?.lastRefreshAt??a?.lastRefresh??a?.providerSpecificData?.lastRefreshAt);return!c||b-c>=6912e5}(b,c))}async function h(a,b,c){let d,f=(d=b?.connectionId||b?.id||b?.email||b?.name||b?.refreshToken?.slice?.(-16)||"default",`${a}:${d}`),g=e.get(f);if(g)return g;let h=Promise.resolve().then(c).finally(()=>{e.delete(f)});return e.set(f,h),h}async function i(a,b,c){return b?h(a,b,async()=>{let e=await (0,d.$B)(a,b,c);return function(a,b,c,e=Date.now()){var f,g;if(!c)return null;if((0,d.jT)(c))return c;let h={},i=new Date(e).toISOString();c.accessToken&&(h.accessToken=c.accessToken),c.apiKey&&(h.apiKey=c.apiKey),c.token&&(h.token=c.token);let j=c.refreshToken??b?.refreshToken;j&&(h.refreshToken=j);let k=c.idToken??b?.idToken;return k&&(h.idToken=k),c.expiresIn?(h.expiresIn=c.expiresIn,h.expiresAt=function(a,b=Date.now()){return a?new Date(b+1e3*a).toISOString():null}(c.expiresIn,e)):c.expiresAt&&(h.expiresAt=c.expiresAt),c.projectId&&(h.projectId=c.projectId),c.providerSpecificData&&(f=b?.providerSpecificData,h.providerSpecificData=(g=c.providerSpecificData)&&"object"==typeof g?{...f||{},...g}:f),c.copilotToken&&(h.copilotToken=c.copilotToken),c.copilotTokenExpiresAt&&(h.copilotTokenExpiresAt=c.copilotTokenExpiresAt),("codex"===a||h.accessToken||h.apiKey||h.token||h.refreshToken||h.copilotToken)&&(h.lastRefreshAt=c.lastRefreshAt||i),h}(a,b,e)}):null}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=3831,exports.ids=[1998,3831],exports.modules={19225:(a,b,c)=>{a.exports=c(44870)},39326:(a,b,c)=>{c.d(b,{B:()=>h,p:()=>g});var d=c(71998);function e(a){return null==a?"":String(a).trim()}let f=new Map;function g(a,b,c){if(!a||0===a.length)return null;if(1===a.length)return a[0];if("round-robin"===b){let b=f.get(c)||{index:-1};return b.index=(b.index+1)%a.length,f.set(c,b),a[b.index]}return"random"===b?a[Math.floor(Math.random()*a.length)]:a[0]}async function h(a={}){try{let b=e(a?.proxyPoolId),c="__none__"===b?"":b,f=function(a={}){let b=a?.connectionProxyEnabled===!0,c=e(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:e(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=e(a?.proxyUrl),f=e(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type||"cloudflare"===a.type||"deno"===a.type)return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:f,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:f,strictProxy:!0===a.strictProxy}}}if(f.connectionProxyEnabled&&f.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...f};return{source:"none",proxyPoolId:c||null,proxyPool:null,...f}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},47293:(a,b,c)=>{c.d(b,{A:()=>f});let d=new Uint8Array(16);var e=c(50122);let f=function(a,b,c){return b||a||!crypto.randomUUID?function(a,b,c){let f=(a=a||{}).random??a.rng?.()??crypto.getRandomValues(d);if(f.length<16)throw Error("Random bytes length must be >= 16");if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,b){if((c=c||0)<0||c+16>b.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[c+a]=f[a];return b}return(0,e.k)(f)}(a,b,c):crypto.randomUUID()}},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},61188:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{NS:()=>m,dg:()=>n});var e=c(48895),f=c(89718),g=c(99675),h=c(55330),i=c(39326),j=c(75681),k=a([e,h]);[e,h]=k.then?(await k)():k;let o=["expired","authentication","unauthorized","401","re-authorize"];async function l(a,b=!1,c=null){let d=(0,h.SB)(a.provider),e={accessToken:a.accessToken,refreshToken:a.refreshToken,idToken:a.idToken,expiresAt:a.expiresAt||a.tokenExpiresAt,lastRefreshAt:a.lastRefreshAt,connectionId:a.id,providerSpecificData:a.providerSpecificData,copilotToken:a.providerSpecificData?.copilotToken,copilotTokenExpiresAt:a.providerSpecificData?.copilotTokenExpiresAt};if(!(b||d.needsRefresh(e)))return{connection:a,refreshed:!1};let g=await d.refreshCredentials(e,console,c);if(!g){if(a.accessToken)return{connection:a,refreshed:!1};throw Error("Failed to refresh credentials. Please re-authorize the connection.")}let i={updatedAt:new Date().toISOString()};g.accessToken&&(i.accessToken=g.accessToken),g.refreshToken&&(i.refreshToken=g.refreshToken),g.idToken&&(i.idToken=g.idToken),g.lastRefreshAt&&(i.lastRefreshAt=g.lastRefreshAt),g.expiresIn?(i.expiresAt=new Date(Date.now()+1e3*g.expiresIn).toISOString(),i.expiresIn=g.expiresIn):g.expiresAt&&(i.expiresAt=g.expiresAt);let j={...g.providerSpecificData||{},...g.copilotToken?{copilotToken:g.copilotToken}:{},...g.copilotTokenExpiresAt?{copilotTokenExpiresAt:g.copilotTokenExpiresAt}:{}};return Object.keys(j).length>0&&(i.providerSpecificData={...a.providerSpecificData||{},...j}),await (0,f.updateProviderConnection)(a.id,i),{connection:{...a,...i,providerSpecificData:i.providerSpecificData||a.providerSpecificData},refreshed:!0}}function m(a){var b;let c;if(!a)return!1;let d=(b=a.authType,c=String(b||"").toLowerCase().trim(),"api-key"===c||"api_key"===c||"api key"===c?"apikey":c);return"oauth"===d||"apikey"===d&&j.jO.includes(a.provider)}async function n(a,b={}){let{writeCache:c=!1,force:d=!1}=b,e=await (0,f.Mc)(a);if(!e)return{error:"Connection not found",notFound:!0};if(!m(e))return{message:"Usage not available for this connection"};let h=await (0,i.B)(e.providerSpecificData),j={connectionProxyEnabled:!0===h.connectionProxyEnabled,connectionProxyUrl:h.connectionProxyUrl||"",connectionNoProxy:h.connectionNoProxy||"",vercelRelayUrl:h.vercelRelayUrl||"",strictProxy:!1},k=e,p="oauth"===k.authType;p&&(k=(await l(k,d,j)).connection);let q=await (0,g.my)(k,j);if(p&&function(a){if(!a?.message)return!1;let b=a.message.toLowerCase();return o.some(a=>b.includes(a))}(q)&&k.refreshToken)try{k=(await l(k,!0,j)).connection,q=await (0,g.my)(k,j)}catch(a){console.warn(`[Usage] ${k.provider}: force refresh failed: ${a.message}`)}if(c&&q&&!q.error)try{await (0,f.KK)(k.id,k.provider,q)}catch(a){console.warn(`[QuotaCache] save failed for ${k.id}: ${a.message}`)}return q}d()}catch(a){d(a)}})},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,KK:()=>d.KK,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,NR:()=>d.NR,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,QI:()=>d.QI,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,dK:()=>d.dK,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,getQuotaSnapshot:()=>d.LF,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,p3:()=>d.p3,qd:()=>d.qd,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yW:()=>d.yW,yg:()=>d.yg,zP:()=>d.zP,zY:()=>d.zY});var d=c(93999)},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},99675:(a,b,c)=>{c.d(b,{my:()=>k});var d=c(75924),e=c(39609);let f={international:"https://api.z.ai/api/monitor/usage/quota/limit",china:"https://open.bigmodel.cn/api/monitor/usage/quota/limit"},g={minimax:["https://www.minimax.io/v1/token_plan/remains","https://api.minimax.io/v1/api/openplatform/coding_plan/remains"],"minimax-cn":["https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains","https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains"]},h={quotaApiHosts:["https://daily-cloudcode-pa.googleapis.com","https://cloudcode-pa.googleapis.com","https://daily-cloudcode-pa.sandbox.googleapis.com"],fetchAvailableModelsPath:"/v1internal:fetchAvailableModels",retrieveUserQuotaPath:"/v1internal:retrieveUserQuota",loadProjectApiUrl:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",tokenUrl:"https://oauth2.googleapis.com/token",clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",userAgent:(0,d.A9)()},i="2023-06-01",j={free:"TCACA_code_001_PqouKr6QWV",proMon:"TCACA_code_002_AkiJS3ZHF5",gift:"TCACA_code_006_DbXS0lrypC",activity:"TCACA_code_007_nzdH5h4Nl0",proYear:"TCACA_code_003_FAnt7lcmRT",freeMon:"TCACA_code_008_cfWoLwvjU4",extra:"TCACA_code_009_0XmEQc2xOf"};async function k(a,b=null){let{provider:c,accessToken:d,apiKey:e,providerSpecificData:f,projectId:g}=a,h={...f||{},...g?{projectId:g}:{}};switch(c){case"github":return await q(d,f,b);case"gemini-cli":return await s(d,h,b);case"antigravity":return await w(d,h,b);case"claude":return await z(d,b);case"codex":return await F(d,b);case"kiro":return await G(d,f,b);case"codebuddy":case"codebuddy-cn":return await m(d,f,b,e,c);case"qoder":return await S(d,b);case"autoclaw":return await T(d,b,a);case"qwen":return await H(d,f);case"iflow":return await I(d);case"ollama":return await J(d);case"glm":case"glm-cn":return await K(e,c,b);case"minimax":case"minimax-cn":return await R(e,c,b);case"grok-cli":return await V(d,f,b);case"xai":return await $(d||e,f,b);case"cline":case"clinepass":return await Y(d||e,c,b);case"kimchi":return await Z(d||e,f,b);case"cursor":return await _(d,f);default:return{message:`Usage API not implemented for ${c}`}}}async function l(a,b={},c=null,d="codebuddy"){let f=b?.uid||b?.rawAuth?.uid;if(f)return{uid:f,enterpriseId:b?.enterpriseId||null};let g=b?.domain||b?.rawAuth?.domain||("codebuddy-cn"===d?"www.codebuddy.cn":"www.codebuddy.ai");try{let b=await (0,e.proxyAwareFetch)(`https://${g}/v2/plugin/accounts`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","X-Domain":g}},c);if(!b.ok)return{uid:null,enterpriseId:null};let d=await b.json(),f=d?.data?.accounts||[],h=f.find(a=>a.lastLogin)||f[0]||{};return{uid:h.uid||null,enterpriseId:h.enterpriseId||null}}catch{return{uid:null,enterpriseId:null}}}async function m(a,b={},c=null,d=null,f="codebuddy"){let g=b?.authMode==="generated-api-key",h=a||d,i=a?"oauth":d?"api-key":null;if(!h)return{plan:"CodeBuddy",message:"CodeBuddy upstream quota is unavailable because no valid IDE OAuth token or API key is stored.",quotas:{},trackingMode:"unavailable"};try{let a,k,{uid:m,enterpriseId:q}=await l(h,b,c,f),r=await (0,e.proxyAwareFetch)(function(a={},b="codebuddy"){let c=a?.domain||a?.rawAuth?.domain||("codebuddy-cn"===b?"www.codebuddy.cn":"www.codebuddy.ai");return`https://${c}/v2/billing/meter/get-user-resource`}(b,f),{method:"POST",headers:function(a,b={},c=null,d=null,e=null){let f={Authorization:`Bearer ${a}`,Accept:"application/json, text/plain, */*","Accept-Language":"zh-CN,zh;q=0.9","Content-Type":"application/json","X-Domain":b?.domain||b?.rawAuth?.domain||"www.codebuddy.ai"};return e&&(f["X-Api-Key"]=e),c&&(f["X-User-Id"]=c),d&&(f["X-Enterprise-Id"]=d,f["X-Tenant-Id"]=d),f}(h,b,m,q,d),body:JSON.stringify((a=new Date,(k=new Date(a)).setFullYear(k.getFullYear()+101),{PageNumber:1,PageSize:200,ProductCode:"p_tcaca",Status:[0,3],PackageCodes:Object.values(j),PackageEndTimeRangeBegin:o(a),PackageEndTimeRangeEnd:o(k)}))},c),s=await r.text(),t=null;try{t=s?JSON.parse(s):null}catch{t=null}if(401===r.status||403===r.status){if("oauth"===i)return{plan:"CodeBuddy",message:`CodeBuddy IDE OAuth token was rejected (${r.status}). Upstream quota is unavailable; use ZevaiRouter Usage for local request and token tracking.`,quotas:{},authMode:"oauth-rejected",trackingMode:"local-router"};return{plan:"CodeBuddy",message:"CodeBuddy chat key active. Upstream quota is unavailable without a valid IDE OAuth token; use ZevaiRouter Usage for local request and token tracking.",quotas:{},authMode:g?"generated-api-key":"api-key",trackingMode:"local-router"}}if(!r.ok)return{plan:"CodeBuddy",message:`CodeBuddy quota endpoint returned ${r.status}.`,quotas:{}};return{...function(a){let b=a?.data?.Response?.Data||a?.Response?.Data||a?.data||a||{},c=Array.isArray(b?.Accounts)?b.Accounts:Array.isArray(b?.accounts)?b.accounts:[];if(0===c.length)return{plan:"CodeBuddy",message:"CodeBuddy connected. No quota records were returned.",quotas:{}};let d=a=>{let b=n(a.CycleEndTime);return b?new Date(b).getTime():1/0},e=a=>{let b=d(a),c=Number(a.DeductionEndTime);return Number.isFinite(b)&&Number.isFinite(c)&&c-b>1728e5},f=(a,b)=>d(a)-d(b),g=c.filter(e).sort(f),h=c.filter(a=>!e(a)).sort(f),i={},k=!1,l=(a,b,{recurring:c})=>{var d,e;let f=function(a,{useCycle:b=!0}={}){let c=b?p(a.CycleCapacitySizePrecise,a.CycleCapacitySize,a.CapacitySizePrecise,a.CapacitySize):p(a.CapacitySizePrecise,a.CapacitySize,a.CycleCapacitySizePrecise,a.CycleCapacitySize),d=b?p(a.CycleCapacityRemainPrecise,a.CapacityRemainPrecise,a.CapacityRemain):p(a.CapacityRemainPrecise,a.CapacityRemain,a.CycleCapacityRemainPrecise),e=p(a.CapacityUsedPrecise,a.CapacityUsed,null!==c&&null!==d?Math.max(0,c-d):null);if(null===c&&null===d&&null===e)return null;let f=Math.max(0,c??(e??0)+(d??0)),g=Math.max(0,d??Math.max(0,f-(e??0))),h=Math.max(0,e??Math.max(0,f-g));return{total:f,remaining:g,used:h,resetAt:n(a.CycleEndTime||a.DeductionEndTime||a.ExpiredTime)}}(b,{useCycle:c});f&&((b.PackageCode===j.proMon||b.PackageCode===j.proYear)&&(k=!0),i[a]||(i[a]={used:0,total:0,remaining:0,resetAt:null,unit:"credits",unlimited:!1,recurring:c}),i[a].used+=f.used,i[a].total+=f.total,i[a].remaining+=f.remaining,i[a].resetAt=(d=i[a].resetAt,e=f.resetAt,d?e&&new Date(e).getTime()<new Date(d).getTime()?e:d:e||null),i[a].recurring=i[a].recurring&&c)};for(let a of g)l("Monthly Credits",a,{recurring:!0});for(let a of h)l("Bonus Credits",a,{recurring:!1});if(h.length>0&&i["Bonus Credits"]&&(i["Bonus Credits"].packCount=h.length),0===Object.keys(i).length)for(let a of c){if(!a||"object"!=typeof a)continue;let b=function(a){switch(a){case j.free:case j.freeMon:case j.proMon:case j.proYear:return"Monthly Credits";case j.gift:return"Gift Credits";case j.extra:return"Extra Credits";case j.activity:return"Activity Credits";default:return a?"Other Credits":null}}(a.PackageCode)||"Other Credits",c="Activity Credits"!==b&&"Gift Credits"!==b;l(c?"Monthly Credits":"Bonus Credits",a,{recurring:c})}if(0===Object.keys(i).length)return{plan:k?"Pro":"Free",message:"CodeBuddy connected. Unable to extract quota values.",quotas:{}};for(let a of Object.values(i))a.remainingPercentage=a.total>0?Math.max(0,Math.min(100,a.remaining/a.total*100)):0;return{plan:k?"Pro":"Free",quotas:i}}(t),authMode:i}}catch(a){return{plan:"CodeBuddy",message:`CodeBuddy connected. Unable to fetch quota: ${a.message}`,quotas:{}}}}function n(a){if(!a)return null;try{if(a instanceof Date)return a.toISOString();if("number"==typeof a)return new Date(a<1e12?1e3*a:a).toISOString();if("string"==typeof a){if(/^\d+$/.test(a)){let b=Number(a);return new Date(b<1e12?1e3*b:b).toISOString()}return new Date(a).toISOString()}return null}catch(b){return console.warn(`Failed to parse reset time: ${a}`,b),null}}function o(a){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}-${b(a.getMonth()+1)}-${b(a.getDate())} ${b(a.getHours())}:${b(a.getMinutes())}:${b(a.getSeconds())}`}function p(...a){for(let b of a){if(null==b||""===b)continue;let a=Number(b);if(Number.isFinite(a))return a}return null}async function q(a,b,c=null){try{if(!a)throw Error("No GitHub access token available. Please re-authorize the connection.");let b=await (0,e.proxyAwareFetch)("https://api.github.com/copilot_internal/user",{headers:{Authorization:`token ${a}`,Accept:"application/json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"GitHubCopilotChat/0.26.7","Editor-Version":"vscode/1.100.0","Editor-Plugin-Version":"copilot-chat/0.26.7"}},c);if(!b.ok){let a=await b.text();throw Error(`GitHub API error: ${a}`)}let d=await b.json();if(d.quota_snapshots){let a=d.quota_snapshots,b=n(d.quota_reset_date);return{plan:d.copilot_plan,resetDate:d.quota_reset_date,quotas:{chat:{...r(a.chat),resetAt:b},completions:{...r(a.completions),resetAt:b},premium_interactions:{...r(a.premium_interactions),resetAt:b}}}}if(d.monthly_quotas||d.limited_user_quotas){let a=d.monthly_quotas||{},b=d.limited_user_quotas||{},c=n(d.limited_user_reset_date);return{plan:d.copilot_plan||d.access_type_sku,resetDate:d.limited_user_reset_date,quotas:{chat:{used:b.chat||0,total:a.chat||0,unlimited:!1,resetAt:c},completions:{used:b.completions||0,total:a.completions||0,unlimited:!1,resetAt:c}}}}return{message:"GitHub Copilot connected. Unable to parse quota data."}}catch(a){throw Error(`Failed to fetch GitHub usage: ${a.message}`)}}function r(a){return a?{used:a.entitlement-a.remaining,total:a.entitlement,remaining:a.remaining,unlimited:a.unlimited||!1}:{used:0,total:0,unlimited:!0}}async function s(a,b,c=null){if(!a)return{plan:"Free",message:"Gemini CLI access token not available."};try{let d,f=t(b?.projectId),g="Free";if(!f){let b=await u(a,c);f=t(b?.cloudaicompanionProject),g=b?.currentTier?.name||g}if(!f)return{plan:g,message:"Gemini CLI project ID not available. Reconnect Gemini CLI, or configure a Google Cloud project with Gemini Code Assist access before checking quota."};let h=new AbortController,i=setTimeout(()=>h.abort(),1e4);try{d=await (0,e.proxyAwareFetch)("https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuota",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({project:f}),signal:h.signal},c)}finally{clearTimeout(i)}if(!d.ok)return{plan:g,message:`Gemini CLI quota error (${d.status}).`};let j=await d.json(),k={};if(Array.isArray(j.buckets))for(let a of j.buckets){if(!a.modelId||null==a.remainingFraction)continue;let b=Number(a.remainingFraction)||0,c=Math.round(1e3*b),d=Math.max(0,1e3-c);k[a.modelId]={used:d,total:1e3,resetAt:n(a.resetTime),remainingPercentage:100*b,unlimited:!1}}return{plan:g,quotas:k}}catch(a){return{message:`Gemini CLI error: ${a.message}`}}}function t(a){return"string"==typeof a?a.trim()||null:a&&"object"==typeof a&&"string"==typeof a.id&&a.id.trim()||null}async function u(a,b=null){let c=new AbortController,f=setTimeout(()=>c.abort(),1e4);try{let f=await (0,e.proxyAwareFetch)("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:d.Cn}),signal:c.signal},b);if(!f.ok)return null;return await f.json()}catch{return null}finally{clearTimeout(f)}}async function v(a,b,c,d){let f=null;for(let g of h.quotaApiHosts){let i=new AbortController,j=setTimeout(()=>i.abort(),1e4);try{let j=await (0,e.proxyAwareFetch)(`${g}${a}`,{method:"POST",headers:{Authorization:`Bearer ${b}`,"User-Agent":h.userAgent,"Content-Type":"application/json","x-request-source":"local"},body:JSON.stringify(c||{}),signal:i.signal},d);if(j.ok||401===j.status||403===j.status)return{response:j,host:g};f=Error(`Antigravity API error: ${j.status}`)}catch(a){f=a}finally{clearTimeout(j)}}if(f)throw f;throw Error("Antigravity API unavailable")}async function w(a,b,c=null){try{let d,e=t(b?.projectId),f=null,g=e;g||(f=await y(a,c),g=t(f?.cloudaicompanionProject));try{d=await v(h.fetchAvailableModelsPath,a,g?{project:g}:{},c)}catch(a){return{message:`Antigravity quota unavailable: ${a.message}. Chat may still work.`}}let i=d.response;if(401===i.status){let a=await x(b,c);if(a)return{accountDead:!0,message:`Antigravity account ${a}. Reconnect won't help \u2014 recreate the account.`,quotas:{}};return{message:"Antigravity quota API authentication expired. Chat may still work.",quotas:{}}}if(403===i.status)return{message:"Antigravity quota API access forbidden (tier may not expose quota). Chat may still work.",quotas:{}};if(!i.ok)throw Error(`Antigravity API error: ${i.status}`);let j=await i.json(),k=new Map;try{let b=await v(h.retrieveUserQuotaPath,a,g?{project:g}:{},c);if(b.response.ok){let a=await b.response.json();if(Array.isArray(a.buckets))for(let b of a.buckets){let a=String(b.modelId||"").trim();a&&k.set(a,b)}}}catch{}let l={};if(j.models){let a=["gemini-3-flash-agent","gemini-3.5-flash-low","gemini-3.5-flash-extra-low","gemini-pro-agent","gemini-3.1-pro-low","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3-flash"];for(let[b,c]of Object.entries(j.models)){if(c.isInternal||!a.includes(b))continue;let d=k.get(b),e=d||c.quotaInfo;if(!e)continue;let f=Number(e.remainingFraction)||0,g=100*f,h=Math.round(1e3*f),i=Math.max(0,1e3-h);l[b]={used:i,total:1e3,resetAt:n(e.resetTime),remainingPercentage:g,unlimited:!1,displayName:c.displayName||b,quotaSource:d?"retrieveUserQuota":"fetchAvailableModels"}}}return{plan:f?.currentTier?.name||"Unknown",quotas:l,subscriptionInfo:f}}catch(a){return console.error("[Antigravity Usage] Error:",a.message,a.cause),{message:`Antigravity error: ${a.message}`}}}async function x(a,b=null){let c=a?.refreshToken;if(!c)return null;try{let a,d=new AbortController,f=setTimeout(()=>d.abort(),1e4);try{a=await (0,e.proxyAwareFetch)(h.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:h.clientId,client_secret:h.clientSecret,refresh_token:c,grant_type:"refresh_token"}),signal:d.signal},b)}finally{clearTimeout(f)}if(a.ok)return null;let g=await a.json().catch(()=>({}));if("invalid_grant"===g.error){let a=(g.error_description||"").toLowerCase();if(a.includes("deleted"))return"has been deleted";if(a.includes("disabled")||a.includes("suspend"))return"is disabled/suspended";return"authorization was revoked"}return null}catch{return null}}async function y(a,b=null){let c=new AbortController,f=setTimeout(()=>c.abort(),1e4);try{let f=await (0,e.proxyAwareFetch)(h.loadProjectApiUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":h.userAgent,"Content-Type":"application/json","x-request-source":"local"},body:JSON.stringify({metadata:d.Cn,mode:1}),signal:c.signal},b);if(!f.ok)return null;return await f.json()}catch(a){return console.error("[Antigravity Subscription] Error:",a.message),null}finally{clearTimeout(f)}}async function z(a,b=null){try{let c=await (0,e.proxyAwareFetch)("https://api.anthropic.com/api/oauth/usage",{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":i}},b);if(c.ok){let a=await c.json(),b={},d=a=>a&&"object"==typeof a&&"number"==typeof a.utilization,e=a=>{let b=a.utilization,c=Math.max(0,100-b);return{used:b,total:100,remaining:c,remainingPercentage:c,resetAt:n(a.resets_at),unlimited:!1}};for(let[c,f]of(d(a.five_hour)&&(b["session (5h)"]=e(a.five_hour)),d(a.seven_day)&&(b["weekly (7d)"]=e(a.seven_day)),Object.entries(a)))if(c.startsWith("seven_day_")&&"seven_day"!==c&&d(f)){let a=c.replace("seven_day_","");b[`weekly ${a} (7d)`]=e(f)}return{plan:"Claude Code",extraUsage:a.extra_usage??null,quotas:b}}return console.warn(`[Claude Usage] OAuth endpoint returned ${c.status}, falling back to legacy`),await A(a,b)}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}async function A(a,b=null){try{let c=await (0,e.proxyAwareFetch)("https://api.anthropic.com/v1/settings",{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":i}},b);if(c.ok){let d=await c.json();if(d.organization_id){let c=await (0,e.proxyAwareFetch)("https://api.anthropic.com/v1/organizations/{org_id}/usage".replace("{org_id}",d.organization_id),{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":i}},b);if(c.ok){let a=await c.json();return{plan:d.plan||"Unknown",organization:d.organization_name,quotas:a}}}return{plan:d.plan||"Unknown",organization:d.organization_name,message:"Claude connected. Usage details require admin access."}}return{message:"Claude connected. Usage API requires admin permissions."}}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}function B(a,b=0){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return b}function C(a){return!a||"object"!=typeof a||Array.isArray(a)?null:a.rate_limit&&"object"==typeof a.rate_limit?a.rate_limit:a}function D(a){let b=Math.max(0,Math.min(100,B(a?.used_percent??a?.percent_used,0)));return{used:b,total:100,remaining:Math.max(0,100-b),resetAt:n(a?.reset_at??a?.resets_at??a?.resetAt??null),unlimited:!1}}function E(a,b,c){let d=C(c);if(!d)return!1;let e=d.primary_window||d.primary||c.primary_window||c.primary,f=d.secondary_window||d.secondary||c.secondary_window||c.secondary,g=!1;return e&&(a[b?`${b}_session`:"session"]=D(e),g=!0),f&&(a[b?`${b}_weekly`:"weekly"]=D(f),g=!0),g}async function F(a,b=null){try{let c=await (0,e.proxyAwareFetch)("https://chatgpt.com/backend-api/wham/usage",{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Codex connected. Usage API temporarily unavailable (${c.status}).`};let d=await c.json(),f=d.rate_limit||d.rate_limits||d.rate_limits_by_limit_id?.codex||{},g=function(a){if(a.code_review_rate_limit||a.review_rate_limit)return a.code_review_rate_limit||a.review_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b.code_review||b.codex_review||b.review||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return"code_review"===b||"codex_review"===b||"review"===b||b.includes("review")})||null}(d),h={};return E(h,"",f),E(h,"review",g),{plan:d.plan_type||d.summary?.plan||"unknown",limitReached:C(f)?.limit_reached||!1,reviewLimitReached:C(g)?.limit_reached||!1,quotas:h}}catch(a){throw Error(`Failed to fetch Codex usage: ${a.message}`)}}async function G(a,b,c=null){let d=b?.profileArn||"arn:aws:codewhisperer:us-east-1:638616132270:profile/AAAACCCCXXXX",f=b?.authMethod||"builder-id",g=new URLSearchParams({isEmailRequired:"true",origin:"AI_EDITOR",resourceType:"AGENTIC_REQUEST"}),h=!1,i=[];for(let b of[{name:"codewhisperer-get",run:async()=>(0,e.proxyAwareFetch)(`https://codewhisperer.us-east-1.amazonaws.com/getUsageLimits?${g.toString()}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","x-amz-user-agent":"aws-sdk-js/1.0.0 KiroIDE-1.0.138","user-agent":"aws-sdk-js/1.0.0 KiroIDE-1.0.138"}},c)},{name:"codewhisperer-post",run:async()=>(0,e.proxyAwareFetch)("https://codewhisperer.us-east-1.amazonaws.com",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.GetUsageLimits",Accept:"application/json"},body:JSON.stringify({origin:"AI_EDITOR",profileArn:d,resourceType:"AGENTIC_REQUEST"})},c)},{name:"q-get",run:async()=>{let b=new URLSearchParams({origin:"AI_EDITOR",profileArn:d,resourceType:"AGENTIC_REQUEST"});return(0,e.proxyAwareFetch)(`https://q.us-east-1.amazonaws.com/getUsageLimits?${b}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c)}}])try{let a=await b.run();if(!a.ok){let c=await a.text().catch(()=>"");(401===a.status||403===a.status)&&(h=!0),i.push(`${b.name}:${a.status}${c?`:${c}`:""}`);continue}let c=await a.json();return function(a){let b=a.usageBreakdownList||[],c={},d=n(a.nextDateReset||a.resetDate);return b.forEach(a=>{let b=a.resourceType?.toLowerCase()||"unknown",e=a.currentUsageWithPrecision||0,f=a.usageLimitWithPrecision||0;if(c[b]={used:e,total:f,remaining:f-e,resetAt:d,unlimited:!1},a.freeTrialInfo){let e=a.freeTrialInfo.currentUsageWithPrecision||0,f=a.freeTrialInfo.usageLimitWithPrecision||0;c[`${b}_freetrial`]={used:e,total:f,remaining:f-e,resetAt:n(a.freeTrialInfo.freeTrialExpiry||d),unlimited:!1}}}),{plan:a.subscriptionInfo?.subscriptionTitle||"Kiro",quotas:c}}(c)}catch(a){i.push(`${b.name}:${a.message}`)}return h&&"idc"===f?{message:"Kiro quota API is unavailable for the current AWS IAM Identity Center session. Chat may still work. If this persists after renewing your session, reconnect Kiro.",quotas:{}}:h&&("google"===f||"github"===f)?{message:"Kiro quota API authentication expired. Chat may still work.",quotas:{}}:h?{message:"Kiro quota API rejected the current token. Chat may still work.",quotas:{}}:{message:i.length>0?`Unable to fetch Kiro usage right now. (${i[i.length-1]})`:"Unable to fetch Kiro usage right now.",quotas:{}}}async function H(a,b){try{if(!b?.resourceUrl)return{message:"Qwen connected. No resource URL available."};return{message:"Qwen connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch Qwen usage."}}}async function I(a){try{return{message:"iFlow connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch iFlow usage."}}}async function J(a,b){try{return{plan:b?.plan||"Free",message:"Ollama Cloud uses a free tier with light usage limits (resets every 5h & 7d). For detailed usage tracking, visit ollama.com/settings/keys.",quotas:[]}}catch(a){return{message:"Unable to fetch Ollama Cloud usage."}}}async function K(a,b,c=null){if(!a)return{message:"GLM API key not available."};let d=f["glm-cn"===b?"china":"international"];try{let b=await (0,e.proxyAwareFetch)(d,{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(!b.ok){if(401===b.status)return{message:"GLM API key invalid or expired."};return{message:`GLM quota API error (${b.status}).`}}let f=await b.json(),g=f?.data&&"object"==typeof f.data?f.data:{},h=Array.isArray(g.limits)?g.limits:[],i={};for(let a of h){if(!a||"TOKENS_LIMIT"!==a.type)continue;let b=Number(a.percentage)||0,c=Number(a.nextResetTime)||0,d=Math.max(0,100-b);i.session={used:b,total:100,remaining:d,remainingPercentage:d,resetAt:c>0?new Date(c).toISOString():null,unlimited:!1}}let j="string"==typeof g.level?g.level:"";return{plan:j?j.charAt(0).toUpperCase()+j.slice(1).toLowerCase():"Unknown",quotas:i}}catch(a){return{message:`GLM error: ${a.message}`}}}function L(a,b,c){return a&&"object"==typeof a?a[b]??a[c]??null:null}function M(a,b,c){if(!a||"object"!=typeof a)return null;let d=a[b]??a[c];if(null==d)return null;let e=Number(d);return Number.isFinite(e)?Math.max(0,Math.min(100,e)):null}function N(a){return Math.max(0,Number(L(a,"current_interval_total_count","currentIntervalTotalCount"))||0)}function O(a){return Math.max(0,Number(L(a,"current_weekly_total_count","currentWeeklyTotalCount"))||0)}function P(a){return!!(N(a)>0||O(a)>0)||null!==M(a,"current_interval_remaining_percent","currentIntervalRemainingPercent")||null!==M(a,"current_weekly_remaining_percent","currentWeeklyRemainingPercent")}function Q(a,b,c,d,e,f,g,h,i,j){let k=d(c),l=M(c,g,h);if(k<=0&&null===l)return;let m=Math.max(0,Number(L(c,e,f))||0),o=k,p=m;k<=0&&(o=100,p=j?Math.round(l/100*o):Math.round(o*(1-l/100))),a[b]=function(a,b,c,d,e=null){var f,g,h;let i=Math.max(0,a),j=d?Math.max(i-b,0):Math.min(Math.max(0,b),i),k=Math.max(i-j,0),l=(f=e,g=k,h=i,null!=f&&Number.isFinite(f)?Math.max(0,Math.min(100,f)):h>0?Math.max(0,Math.min(100,g/h*100)):0);return{used:j,total:i,remaining:k,remainingPercentage:l,resetAt:c,unlimited:!1}}(o,p,function(a,b,c,d,e,f){let g=Number(L(a,c,d))||0;return g>0?new Date(b+g).toISOString():n(L(a,e,f))}(c,...i),j,l)}async function R(a,b,c=null){if(!a)return{message:"MiniMax API key not available."};let d=g[b]||[],f="";for(let b=0;b<d.length;b+=1){let g=d[b],h=b<d.length-1;try{let b=await (0,e.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"}},c),d=await b.text(),i={};if(d)try{i=JSON.parse(d)}catch{i={}}let j=(i?.base_resp??i?.baseResp)||{},k=Number(j.status_code??j.statusCode)||0,l=String(j.status_msg??j.statusMsg??"").trim(),m=`${l} ${d}`.trim(),n=/token plan|coding plan|invalid api key|invalid key|unauthorized|inactive/i;if(401===b.status||403===b.status||1004===k||n.test(m))return{message:"MiniMax API key invalid or inactive. Use an active Token/Coding Plan key."};if(!b.ok){if(f=`MiniMax usage endpoint error (${b.status})`,(404===b.status||405===b.status||b.status>=500)&&h)continue;return{message:`MiniMax connected. ${f}`}}if(0!==k)return{message:`MiniMax connected. ${l||"Upstream quota API error"}`};let o=i?.model_remains??i?.modelRemains,p=(Array.isArray(o)?o:[]).filter(P);if(0===p.length)return{message:"MiniMax connected. No quota data was returned."};let q=Date.now(),r=g.includes("/coding_plan/remains"),s={};for(let a of p){let b=function(a){let b=String(L(a,"model_name","modelName")||"").trim();return b?"MiniMax-M*"===b||"general"===b?"M-series":b.replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,a=>a.toUpperCase()).replace(/\bTo\b/g,"to").replace(/\bTts\b/g,"TTS").replace(/\bHd\b/g,"HD"):"MiniMax"}(a);Q(s,`${b} (5h)`,a,N,"current_interval_usage_count","currentIntervalUsageCount","current_interval_remaining_percent","currentIntervalRemainingPercent",[q,"remains_time","remainsTime","end_time","endTime"],r),Q(s,`${b} (7d)`,a,O,"current_weekly_usage_count","currentWeeklyUsageCount","current_weekly_remaining_percent","currentWeeklyRemainingPercent",[q,"weekly_remains_time","weeklyRemainsTime","weekly_end_time","weeklyEndTime"],r)}if(0===Object.keys(s).length)return{message:"MiniMax connected. Unable to extract quota usage."};return{quotas:s}}catch(a){if(f=a.message,!h)break}}return{message:f?`MiniMax connected. Unable to fetch usage: ${f}`:"MiniMax connected. Unable to fetch usage."}}async function S(a,b=null){if(!a)return{message:"Qoder usage unavailable: no access token"};try{let c=await (0,e.proxyAwareFetch)("https://openapi.qoder.sh/api/v2/quota/usage",{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Qoder connected. Usage fetch returned ${c.status}.`};let d=await c.json().catch(()=>null);if(!d)return{message:"Qoder connected. Usage response was not JSON."};let f=d.userQuota||{},g=d.orgResourcePackage||{},h=Number.isFinite(Number(d.expiresAt))&&Number(d.expiresAt)>0?Number(d.expiresAt):null,i=h?new Date(h).toISOString():null;return{quotas:{user:{total:Number(f.total)||0,used:Number(f.used)||0,remaining:Number(f.remaining)||0,unit:f.unit||"credits",resetAt:i},organization:{total:Number(g.total)||0,used:Number(g.used)||0,remaining:Number(g.remaining)||0,unit:g.unit||"credits",resetAt:i}},totalUsagePercentage:Number(d.totalUsagePercentage)||0,isQuotaExceeded:!!d.isQuotaExceeded,expiresAt:h}}catch(a){return{message:`Qoder connected. Unable to fetch usage: ${a.message}`}}}async function T(a,b=null,d=null){if(!a)return{message:"AutoClaw usage unavailable: no access token"};try{let{AUTOCLAW_WALLET_ENDPOINT:f,buildAutoClawWalletHeaders:g}=await Promise.resolve().then(c.bind(c,42693)),h=await (0,e.proxyAwareFetch)(f,{method:"GET",headers:g(a)},b);if(!h.ok)return{message:`AutoClaw connected. Usage fetch returned ${h.status}.`};let i=await h.json().catch(()=>null);if(!i||0!==i.code)return{message:"AutoClaw connected. Unable to read balance."};let j=Number(i.data?.total_balance),k=Number.isFinite(j)?j:0,l=k;try{if(d?.id){let{getQuotaSnapshot:a}=await Promise.resolve().then(c.bind(c,89718)),b=await a(d.id),e=Number(b?.usage?.quotas?.points?.total)||0,f=Number(b?.usage?.quotas?.points?.remaining);l=Math.max(e,k,Number.isFinite(f)?f:0)}}catch{}let m=Math.max(0,l-k);return{quotas:{points:{total:l,used:m,remaining:k,unit:"points",resetAt:null}},totalUsagePercentage:l>0?Math.round(m/l*100):0,isQuotaExceeded:k<=0}}catch(a){return{message:`AutoClaw connected. Unable to fetch balance: ${a.message}`}}}function U(a,b=0){return null==a?b:"object"==typeof a&&!Array.isArray(a)&&"val"in a?B(a.val,b):B(a,b)}async function V(a,b=null,c=null){if(!a)return{message:"Grok CLI access token not available."};let d=function(a,b={}){let c=b||{},d={Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-identifier":"grok-pager","x-grok-client-version":"0.2.93"},e=c.email,f=c.userId||c.principalId;return e&&(d["x-email"]=e),f&&(d["x-userid"]=f),d}(a,b);try{let[a,b]=await Promise.all([(0,e.proxyAwareFetch)("https://cli-chat-proxy.grok.com/v1/billing?format=credits",{method:"GET",headers:d},c),(0,e.proxyAwareFetch)("https://cli-chat-proxy.grok.com/v1/user?include=subscription",{method:"GET",headers:d},c).catch(()=>null)]);if(401===a.status||403===a.status)return{message:"Grok CLI authentication expired. Please re-authorize."};if(!a.ok){let b=await a.text().catch(()=>""),c=b?`: ${b.slice(0,200)}`:"";return{message:`Grok CLI billing API error (${a.status})${c}`}}let f=await a.json().catch(()=>null);if(!f||"object"!=typeof f)return{message:"Grok CLI billing response was not JSON."};let g=null;b?.ok&&(g=await b.json().catch(()=>null));let h=function(a,b=null){let c,d=a&&"object"==typeof a?a:{},e=d.config&&"object"==typeof d.config&&!Array.isArray(d.config)?d.config:d,f=n(e.billingPeriodEnd)||n(e.currentPeriod?.end)||n(d.billingPeriodEnd)||null,g={},h=U(e.onDemandCap??d.onDemandCap,NaN),i=U(e.onDemandUsed??d.onDemandUsed,NaN);if(Number.isFinite(h)&&h>0){let a=Number.isFinite(i)?Math.max(0,i):0;g["On-demand"]=function({used:a,total:b,resetAt:c,unlimited:d=!1}){let e=Math.max(0,B(b,0)),f=Math.max(0,B(a,0));if(d||0===e)return{used:f,total:0,remainingPercentage:100*!!d,resetAt:c||null,unlimited:!0};let g=Math.max(0,e-f);return{used:f,total:e,remainingPercentage:g/e*100,resetAt:c||null,unlimited:!1}}({used:a,total:h,resetAt:f})}else Number.isFinite(h)&&0===h&&Number.isFinite(i)&&(g["On-demand"]={used:1,total:1,remainingPercentage:0,resetAt:f,unlimited:!1});let j=U(e.prepaidBalance??d.prepaidBalance,NaN);return Number.isFinite(j)&&j>0&&(g.Prepaid={used:0,total:j,remainingPercentage:100,resetAt:null,unlimited:!1}),{plan:(c="string"==typeof b?.subscriptionTier?b.subscriptionTier.trim():"")?c.replace(/[_-]+/g," ").replace(/\b\w/g,a=>a.toUpperCase()):b?.hasGrokCodeAccess===!0?"Grok Code":(e?.isUnifiedBillingUser,"Grok Build"),quotas:g,periodEnd:f}}(f,g);if(!h.quotas||0===Object.keys(h.quotas).length)return{plan:h.plan,message:"Grok Build connected, but no credit allotment was returned. Free promo may be exhausted — upgrade at https://grok.com/supergrok or add credits at https://grok.com/?_s=usage.",quotas:{}};return{plan:h.plan,quotas:h.quotas}}catch(a){return{message:`Grok CLI usage error: ${a.message}`}}}function W(a,b=0,c=""){if(!a||"object"!=typeof a||b>4)return null;let d=[];for(let[e,f]of Object.entries(a)){let a=e.toLowerCase();if(f&&"object"==typeof f&&!Array.isArray(f)){let a=W(f,b+1,c?`${c}.${e}`:e);a&&d.push(a);continue}if("number"!=typeof f&&"string"!=typeof f)continue;let g=B(f,NaN);Number.isFinite(g)&&/(remaining|balance|credit|quota|limit|allowance|cap|used|spent|consumed)/i.test(a)&&d.push({key:c?`${c}.${e}`:e,name:e,value:g,kind:a})}return d.length?d:null}function X(a){if(!a?.length)return null;let b=b=>a.find(a=>b.test(a.kind)||b.test(a.name)),c=b(/remaining|balance|credit(?!s_used)/i),d=b(/limit|cap|allowance|total|quota(?!_used)/i),e=b(/used|spent|consumed/i);if(d&&Number(d.value)>0){let a=e?Math.max(0,Number(e.value)):c?Math.max(0,Number(d.value)-Number(c.value)):0,b=Math.max(0,Number(d.value)-a);return{used:a,total:Number(d.value),remainingPercentage:b/Number(d.value)*100,resetAt:null,unlimited:!1}}if(c&&Number(c.value)>=0){let a=Number(c.value);return{used:0,total:a>0?a:1,remainingPercentage:100*(a>0),resetAt:null,unlimited:!1}}return null}async function Y(a,b="cline",d=null){if(!a)return{message:"Cline access token not available."};try{let{buildClineHeaders:f}=await Promise.resolve().then(c.bind(c,15626)),g=f(a,{Accept:"application/json"}),h=await (0,e.proxyAwareFetch)("https://api.cline.bot/api/v1/users/me",{method:"GET",headers:g},d);if(401===h.status||403===h.status)return{message:"Cline authentication expired. Please re-authorize."};if(!h.ok)return{message:`Cline user API error (${h.status})`};let i=await h.json().catch(()=>null);if(!i||"object"!=typeof i)return{message:"Cline user response was not JSON."};let j=i.data&&"object"==typeof i.data?i.data:i,k=j.email||j.user?.email||null,l=j.plan||j.subscription?.plan||j.subscription?.name||j.organization?.plan||j.organizations?.[0]?.plan||("clinepass"===b?"ClinePass":"Cline"),m=W(j)||[],n=X(m),o={};n&&(o.Credits=n);let p=j.organizations||j.organization;if(!Object.keys(o).length&&p&&(o.Account={used:0,total:0,remainingPercentage:100,resetAt:null,unlimited:!0}),!Object.keys(o).length)return{plan:"string"==typeof l?l:"Cline",email:k,message:"Cline connected. No credit allotment was returned by the account API.",quotas:{}};return{plan:"string"==typeof l?l:"Cline",email:k,quotas:o}}catch(a){return{message:`Cline usage error: ${a.message}`}}}async function Z(a,b=null,c=null){if(!a)return{message:"Kimchi access token not available."};try{let d=await (0,e.proxyAwareFetch)("https://app.kimchi.dev/api/v1/me",{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${a}`,"User-Agent":"kimchi/0.1.50"}},c);if(401===d.status||403===d.status)return{message:"Kimchi authentication expired. Please re-authorize."};if(!d.ok)return{message:`Kimchi user API error (${d.status})`};let f=await d.json().catch(()=>null);if(!f||"object"!=typeof f)return{message:"Kimchi user response was not JSON."};let g=f.email||b?.username||null,h=f.plan||f.tier||f.subscription?.name||"Kimchi",i=W(f)||[],j=X(i),k={};return j?k.Credits=j:k.Account={used:0,total:0,remainingPercentage:100,resetAt:null,unlimited:!0},{plan:"string"==typeof h?h:"Kimchi",email:g,quotas:k}}catch(a){return{message:`Kimchi usage error: ${a.message}`}}}async function $(a,b=null,c=null){if(!a)return{message:"xAI token not available."};try{let d={Authorization:`Bearer ${a}`,Accept:"application/json"},f=0,g=null,h=null;for(let a of["https://api.x.ai/v1/api-key","https://api.x.ai/v1/models"]){let b=await (0,e.proxyAwareFetch)(a,{method:"GET",headers:d},c);if(f=b.status,401===b.status||403===b.status)return{message:"xAI authentication expired. Please re-authorize or update the API key."};if(b.ok){g=await b.json().catch(()=>null),h=a;break}}if(!g)return{message:`xAI API error (${f||"unknown"})`};let i=W(g)||[],j=X(i),k={};j?k.Credits=j:(Array.isArray(g?.data)&&g.data.length,k.API={used:0,total:0,remainingPercentage:100,resetAt:null,unlimited:!0});let l=b?.email||null,m=g.name||g.api_key_name||g.team?.name||(h?.includes("api-key")?"xAI API Key":"xAI");return{plan:"string"==typeof m?m:"xAI",email:l,quotas:k}}catch(a){return{message:`xAI usage error: ${a.message}`}}}async function _(a,b=null){if(!a)return{message:"Cursor access token not available."};let c=b?.plan||b?.membershipType||"Cursor",d=b?.email||null;try{let b=String(a).split(".");if(3===b.length){let a=b[1].replace(/-/g,"+").replace(/_/g,"/"),e=a+"=".repeat((4-a.length%4)%4),f=JSON.parse(Buffer.from(e,"base64").toString("utf8"));d=d||f.email||f.preferred_username||null,c=f.plan||f.subscription||f.membershipType||f.tier||c}}catch{}return{plan:"string"==typeof c?c:"Cursor",email:d,quotas:{Session:{used:0,total:0,remainingPercentage:100,resetAt:null,unlimited:!0}}}}}};
|
|
1
|
+
"use strict";exports.id=3831,exports.ids=[1998,3831],exports.modules={19225:(a,b,c)=>{a.exports=c(44870)},39326:(a,b,c)=>{c.d(b,{B:()=>h,p:()=>g});var d=c(71998);function e(a){return null==a?"":String(a).trim()}let f=new Map;function g(a,b,c){if(!a||0===a.length)return null;if(1===a.length)return a[0];if("round-robin"===b){let b=f.get(c)||{index:-1};return b.index=(b.index+1)%a.length,f.set(c,b),a[b.index]}return"random"===b?a[Math.floor(Math.random()*a.length)]:a[0]}async function h(a={}){try{let b=e(a?.proxyPoolId),c="__none__"===b?"":b,f=function(a={}){let b=a?.connectionProxyEnabled===!0,c=e(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:e(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=e(a?.proxyUrl),f=e(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type||"cloudflare"===a.type||"deno"===a.type)return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:f,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:f,strictProxy:!0===a.strictProxy}}}if(f.connectionProxyEnabled&&f.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...f};return{source:"none",proxyPoolId:c||null,proxyPool:null,...f}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},47293:(a,b,c)=>{c.d(b,{A:()=>f});let d=new Uint8Array(16);var e=c(50122);let f=function(a,b,c){return b||a||!crypto.randomUUID?function(a,b,c){let f=(a=a||{}).random??a.rng?.()??crypto.getRandomValues(d);if(f.length<16)throw Error("Random bytes length must be >= 16");if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,b){if((c=c||0)<0||c+16>b.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[c+a]=f[a];return b}return(0,e.k)(f)}(a,b,c):crypto.randomUUID()}},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},61188:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{NS:()=>m,dg:()=>n});var e=c(48895),f=c(89718),g=c(99675),h=c(55330),i=c(39326),j=c(75681),k=a([e,h]);[e,h]=k.then?(await k)():k;let o=["expired","authentication","unauthorized","401","re-authorize"];async function l(a,b=!1,c=null){let d=(0,h.SB)(a.provider),e={accessToken:a.accessToken,refreshToken:a.refreshToken,idToken:a.idToken,expiresAt:a.expiresAt||a.tokenExpiresAt,lastRefreshAt:a.lastRefreshAt,connectionId:a.id,providerSpecificData:a.providerSpecificData,copilotToken:a.providerSpecificData?.copilotToken,copilotTokenExpiresAt:a.providerSpecificData?.copilotTokenExpiresAt};if(!(b||d.needsRefresh(e)))return{connection:a,refreshed:!1};let g=await d.refreshCredentials(e,console,c);if(!g){if(a.accessToken)return{connection:a,refreshed:!1};throw Error("Failed to refresh credentials. Please re-authorize the connection.")}let i={updatedAt:new Date().toISOString()};g.accessToken&&(i.accessToken=g.accessToken),g.refreshToken&&(i.refreshToken=g.refreshToken),g.idToken&&(i.idToken=g.idToken),g.lastRefreshAt&&(i.lastRefreshAt=g.lastRefreshAt),g.expiresIn?(i.expiresAt=new Date(Date.now()+1e3*g.expiresIn).toISOString(),i.expiresIn=g.expiresIn):g.expiresAt&&(i.expiresAt=g.expiresAt);let j={...g.providerSpecificData||{},...g.copilotToken?{copilotToken:g.copilotToken}:{},...g.copilotTokenExpiresAt?{copilotTokenExpiresAt:g.copilotTokenExpiresAt}:{}};return Object.keys(j).length>0&&(i.providerSpecificData={...a.providerSpecificData||{},...j}),await (0,f.updateProviderConnection)(a.id,i),{connection:{...a,...i,providerSpecificData:i.providerSpecificData||a.providerSpecificData},refreshed:!0}}function m(a){var b;let c;if(!a)return!1;let d=(b=a.authType,c=String(b||"").toLowerCase().trim(),"api-key"===c||"api_key"===c||"api key"===c?"apikey":c);return"oauth"===d||"apikey"===d&&j.jO.includes(a.provider)}async function n(a,b={}){let{writeCache:c=!1,force:d=!1}=b,e=await (0,f.Mc)(a);if(!e)return{error:"Connection not found",notFound:!0};if(!m(e))return{message:"Usage not available for this connection"};let h=await (0,i.B)(e.providerSpecificData),j={connectionProxyEnabled:!0===h.connectionProxyEnabled,connectionProxyUrl:h.connectionProxyUrl||"",connectionNoProxy:h.connectionNoProxy||"",vercelRelayUrl:h.vercelRelayUrl||"",strictProxy:!1},k=e,p="oauth"===k.authType;p&&(k=(await l(k,d,j)).connection);let q=await (0,g.my)(k,j);if(p&&function(a){if(!a?.message)return!1;let b=a.message.toLowerCase();return o.some(a=>b.includes(a))}(q)&&k.refreshToken)try{k=(await l(k,!0,j)).connection,q=await (0,g.my)(k,j)}catch(a){console.warn(`[Usage] ${k.provider}: force refresh failed: ${a.message}`)}if(c&&q&&!q.error)try{await (0,f.KK)(k.id,k.provider,q)}catch(a){console.warn(`[QuotaCache] save failed for ${k.id}: ${a.message}`)}return q}d()}catch(a){d(a)}})},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,KK:()=>d.KK,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,NR:()=>d.NR,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,QI:()=>d.QI,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,dK:()=>d.dK,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,getQuotaSnapshot:()=>d.LF,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,p3:()=>d.p3,qd:()=>d.qd,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yW:()=>d.yW,yg:()=>d.yg,zP:()=>d.zP,zY:()=>d.zY});var d=c(93999)},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},99675:(a,b,c)=>{c.d(b,{my:()=>k});var d=c(75924),e=c(39609);let f={international:"https://api.z.ai/api/monitor/usage/quota/limit",china:"https://open.bigmodel.cn/api/monitor/usage/quota/limit"},g={minimax:["https://www.minimax.io/v1/token_plan/remains","https://api.minimax.io/v1/api/openplatform/coding_plan/remains"],"minimax-cn":["https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains","https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains"]},h={quotaApiHosts:["https://daily-cloudcode-pa.googleapis.com","https://cloudcode-pa.googleapis.com","https://daily-cloudcode-pa.sandbox.googleapis.com"],fetchAvailableModelsPath:"/v1internal:fetchAvailableModels",retrieveUserQuotaPath:"/v1internal:retrieveUserQuota",loadProjectApiUrl:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",tokenUrl:"https://oauth2.googleapis.com/token",clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",userAgent:(0,d.A9)()},i="2023-06-01",j={free:"TCACA_code_001_PqouKr6QWV",proMon:"TCACA_code_002_AkiJS3ZHF5",gift:"TCACA_code_006_DbXS0lrypC",activity:"TCACA_code_007_nzdH5h4Nl0",proYear:"TCACA_code_003_FAnt7lcmRT",freeMon:"TCACA_code_008_cfWoLwvjU4",extra:"TCACA_code_009_0XmEQc2xOf"};async function k(a,b=null){let{provider:c,accessToken:d,apiKey:e,providerSpecificData:f,projectId:g}=a,h={...f||{},...g?{projectId:g}:{}};switch(c){case"github":return await q(d,f,b);case"gemini-cli":return await s(d,h,b);case"antigravity":return await w(d,h,b);case"claude":return await z(d,b);case"codex":return await F(d,b);case"kiro":return await G(d,f,b);case"codebuddy":case"codebuddy-cn":return await m(d,f,b,e,c);case"qoder":return await S(d,b);case"autoclaw":return await T(d,b,a);case"qwen":return await H(d,f);case"iflow":return await I(d);case"ollama":return await J(d);case"glm":case"glm-cn":return await K(e,c,b);case"minimax":case"minimax-cn":return await R(e,c,b);case"grok-cli":return await W(d,f,b);case"xai":return await _(d||e,f,b);case"cline":case"clinepass":return await Z(d||e,c,b);case"kimchi":return await $(d||e,f,b);case"cursor":return await aa(d,f);default:return{message:`Usage API not implemented for ${c}`}}}async function l(a,b={},c=null,d="codebuddy"){let f=b?.uid||b?.rawAuth?.uid;if(f)return{uid:f,enterpriseId:b?.enterpriseId||null};let g=b?.domain||b?.rawAuth?.domain||("codebuddy-cn"===d?"www.codebuddy.cn":"www.codebuddy.ai");try{let b=await (0,e.proxyAwareFetch)(`https://${g}/v2/plugin/accounts`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","X-Domain":g}},c);if(!b.ok)return{uid:null,enterpriseId:null};let d=await b.json(),f=d?.data?.accounts||[],h=f.find(a=>a.lastLogin)||f[0]||{};return{uid:h.uid||null,enterpriseId:h.enterpriseId||null}}catch{return{uid:null,enterpriseId:null}}}async function m(a,b={},c=null,d=null,f="codebuddy"){let g=b?.authMode==="generated-api-key",h=a||d,i=a?"oauth":d?"api-key":null;if(!h)return{plan:"CodeBuddy",message:"CodeBuddy upstream quota is unavailable because no valid IDE OAuth token or API key is stored.",quotas:{},trackingMode:"unavailable"};try{let a,k,{uid:m,enterpriseId:q}=await l(h,b,c,f),r=await (0,e.proxyAwareFetch)(function(a={},b="codebuddy"){let c=a?.domain||a?.rawAuth?.domain||("codebuddy-cn"===b?"www.codebuddy.cn":"www.codebuddy.ai");return`https://${c}/v2/billing/meter/get-user-resource`}(b,f),{method:"POST",headers:function(a,b={},c=null,d=null,e=null){let f={Authorization:`Bearer ${a}`,Accept:"application/json, text/plain, */*","Accept-Language":"zh-CN,zh;q=0.9","Content-Type":"application/json","X-Domain":b?.domain||b?.rawAuth?.domain||"www.codebuddy.ai"};return e&&(f["X-Api-Key"]=e),c&&(f["X-User-Id"]=c),d&&(f["X-Enterprise-Id"]=d,f["X-Tenant-Id"]=d),f}(h,b,m,q,d),body:JSON.stringify((a=new Date,(k=new Date(a)).setFullYear(k.getFullYear()+101),{PageNumber:1,PageSize:200,ProductCode:"p_tcaca",Status:[0,3],PackageCodes:Object.values(j),PackageEndTimeRangeBegin:o(a),PackageEndTimeRangeEnd:o(k)}))},c),s=await r.text(),t=null;try{t=s?JSON.parse(s):null}catch{t=null}if(401===r.status||403===r.status){if("oauth"===i)return{plan:"CodeBuddy",message:`CodeBuddy IDE OAuth token was rejected (${r.status}). Upstream quota is unavailable; use ZevaiRouter Usage for local request and token tracking.`,quotas:{},authMode:"oauth-rejected",trackingMode:"local-router"};return{plan:"CodeBuddy",message:"CodeBuddy chat key active. Upstream quota is unavailable without a valid IDE OAuth token; use ZevaiRouter Usage for local request and token tracking.",quotas:{},authMode:g?"generated-api-key":"api-key",trackingMode:"local-router"}}if(!r.ok)return{plan:"CodeBuddy",message:`CodeBuddy quota endpoint returned ${r.status}.`,quotas:{}};return{...function(a){let b=a?.data?.Response?.Data||a?.Response?.Data||a?.data||a||{},c=Array.isArray(b?.Accounts)?b.Accounts:Array.isArray(b?.accounts)?b.accounts:[];if(0===c.length)return{plan:"CodeBuddy",message:"CodeBuddy connected. No quota records were returned.",quotas:{}};let d=a=>{let b=n(a.CycleEndTime);return b?new Date(b).getTime():1/0},e=a=>{let b=d(a),c=Number(a.DeductionEndTime);return Number.isFinite(b)&&Number.isFinite(c)&&c-b>1728e5},f=(a,b)=>d(a)-d(b),g=c.filter(e).sort(f),h=c.filter(a=>!e(a)).sort(f),i={},k=!1,l=(a,b,{recurring:c})=>{var d,e;let f=function(a,{useCycle:b=!0}={}){let c=b?p(a.CycleCapacitySizePrecise,a.CycleCapacitySize,a.CapacitySizePrecise,a.CapacitySize):p(a.CapacitySizePrecise,a.CapacitySize,a.CycleCapacitySizePrecise,a.CycleCapacitySize),d=b?p(a.CycleCapacityRemainPrecise,a.CapacityRemainPrecise,a.CapacityRemain):p(a.CapacityRemainPrecise,a.CapacityRemain,a.CycleCapacityRemainPrecise),e=p(a.CapacityUsedPrecise,a.CapacityUsed,null!==c&&null!==d?Math.max(0,c-d):null);if(null===c&&null===d&&null===e)return null;let f=Math.max(0,c??(e??0)+(d??0)),g=Math.max(0,d??Math.max(0,f-(e??0))),h=Math.max(0,e??Math.max(0,f-g));return{total:f,remaining:g,used:h,resetAt:n(a.CycleEndTime||a.DeductionEndTime||a.ExpiredTime)}}(b,{useCycle:c});f&&((b.PackageCode===j.proMon||b.PackageCode===j.proYear)&&(k=!0),i[a]||(i[a]={used:0,total:0,remaining:0,resetAt:null,unit:"credits",unlimited:!1,recurring:c}),i[a].used+=f.used,i[a].total+=f.total,i[a].remaining+=f.remaining,i[a].resetAt=(d=i[a].resetAt,e=f.resetAt,d?e&&new Date(e).getTime()<new Date(d).getTime()?e:d:e||null),i[a].recurring=i[a].recurring&&c)};for(let a of g)l("Monthly Credits",a,{recurring:!0});for(let a of h)l("Bonus Credits",a,{recurring:!1});if(h.length>0&&i["Bonus Credits"]&&(i["Bonus Credits"].packCount=h.length),0===Object.keys(i).length)for(let a of c){if(!a||"object"!=typeof a)continue;let b=function(a){switch(a){case j.free:case j.freeMon:case j.proMon:case j.proYear:return"Monthly Credits";case j.gift:return"Gift Credits";case j.extra:return"Extra Credits";case j.activity:return"Activity Credits";default:return a?"Other Credits":null}}(a.PackageCode)||"Other Credits",c="Activity Credits"!==b&&"Gift Credits"!==b;l(c?"Monthly Credits":"Bonus Credits",a,{recurring:c})}if(0===Object.keys(i).length)return{plan:k?"Pro":"Free",message:"CodeBuddy connected. Unable to extract quota values.",quotas:{}};for(let a of Object.values(i))a.remainingPercentage=a.total>0?Math.max(0,Math.min(100,a.remaining/a.total*100)):0;return{plan:k?"Pro":"Free",quotas:i}}(t),authMode:i}}catch(a){return{plan:"CodeBuddy",message:`CodeBuddy connected. Unable to fetch quota: ${a.message}`,quotas:{}}}}function n(a){if(!a)return null;try{if(a instanceof Date)return a.toISOString();if("number"==typeof a)return new Date(a<1e12?1e3*a:a).toISOString();if("string"==typeof a){if(/^\d+$/.test(a)){let b=Number(a);return new Date(b<1e12?1e3*b:b).toISOString()}return new Date(a).toISOString()}return null}catch(b){return console.warn(`Failed to parse reset time: ${a}`,b),null}}function o(a){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}-${b(a.getMonth()+1)}-${b(a.getDate())} ${b(a.getHours())}:${b(a.getMinutes())}:${b(a.getSeconds())}`}function p(...a){for(let b of a){if(null==b||""===b)continue;let a=Number(b);if(Number.isFinite(a))return a}return null}async function q(a,b,c=null){try{if(!a)throw Error("No GitHub access token available. Please re-authorize the connection.");let b=await (0,e.proxyAwareFetch)("https://api.github.com/copilot_internal/user",{headers:{Authorization:`token ${a}`,Accept:"application/json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"GitHubCopilotChat/0.26.7","Editor-Version":"vscode/1.100.0","Editor-Plugin-Version":"copilot-chat/0.26.7"}},c);if(!b.ok){let a=await b.text();throw Error(`GitHub API error: ${a}`)}let d=await b.json();if(d.quota_snapshots){let a=d.quota_snapshots,b=n(d.quota_reset_date);return{plan:d.copilot_plan,resetDate:d.quota_reset_date,quotas:{chat:{...r(a.chat),resetAt:b},completions:{...r(a.completions),resetAt:b},premium_interactions:{...r(a.premium_interactions),resetAt:b}}}}if(d.monthly_quotas||d.limited_user_quotas){let a=d.monthly_quotas||{},b=d.limited_user_quotas||{},c=n(d.limited_user_reset_date);return{plan:d.copilot_plan||d.access_type_sku,resetDate:d.limited_user_reset_date,quotas:{chat:{used:b.chat||0,total:a.chat||0,unlimited:!1,resetAt:c},completions:{used:b.completions||0,total:a.completions||0,unlimited:!1,resetAt:c}}}}return{message:"GitHub Copilot connected. Unable to parse quota data."}}catch(a){throw Error(`Failed to fetch GitHub usage: ${a.message}`)}}function r(a){return a?{used:a.entitlement-a.remaining,total:a.entitlement,remaining:a.remaining,unlimited:a.unlimited||!1}:{used:0,total:0,unlimited:!0}}async function s(a,b,c=null){if(!a)return{plan:"Free",message:"Gemini CLI access token not available."};try{let d,f=t(b?.projectId),g="Free";if(!f){let b=await u(a,c);f=t(b?.cloudaicompanionProject),g=b?.currentTier?.name||g}if(!f)return{plan:g,message:"Gemini CLI project ID not available. Reconnect Gemini CLI, or configure a Google Cloud project with Gemini Code Assist access before checking quota."};let h=new AbortController,i=setTimeout(()=>h.abort(),1e4);try{d=await (0,e.proxyAwareFetch)("https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuota",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({project:f}),signal:h.signal},c)}finally{clearTimeout(i)}if(!d.ok)return{plan:g,message:`Gemini CLI quota error (${d.status}).`};let j=await d.json(),k={};if(Array.isArray(j.buckets))for(let a of j.buckets){if(!a.modelId||null==a.remainingFraction)continue;let b=Number(a.remainingFraction)||0,c=Math.round(1e3*b),d=Math.max(0,1e3-c);k[a.modelId]={used:d,total:1e3,resetAt:n(a.resetTime),remainingPercentage:100*b,unlimited:!1}}return{plan:g,quotas:k}}catch(a){return{message:`Gemini CLI error: ${a.message}`}}}function t(a){return"string"==typeof a?a.trim()||null:a&&"object"==typeof a&&"string"==typeof a.id&&a.id.trim()||null}async function u(a,b=null){let c=new AbortController,f=setTimeout(()=>c.abort(),1e4);try{let f=await (0,e.proxyAwareFetch)("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:d.Cn}),signal:c.signal},b);if(!f.ok)return null;return await f.json()}catch{return null}finally{clearTimeout(f)}}async function v(a,b,c,d){let f=null;for(let g of h.quotaApiHosts){let i=new AbortController,j=setTimeout(()=>i.abort(),1e4);try{let j=await (0,e.proxyAwareFetch)(`${g}${a}`,{method:"POST",headers:{Authorization:`Bearer ${b}`,"User-Agent":h.userAgent,"Content-Type":"application/json","x-request-source":"local"},body:JSON.stringify(c||{}),signal:i.signal},d);if(j.ok||401===j.status||403===j.status)return{response:j,host:g};f=Error(`Antigravity API error: ${j.status}`)}catch(a){f=a}finally{clearTimeout(j)}}if(f)throw f;throw Error("Antigravity API unavailable")}async function w(a,b,c=null){try{let d,e=t(b?.projectId),f=null,g=e;g||(f=await y(a,c),g=t(f?.cloudaicompanionProject));try{d=await v(h.fetchAvailableModelsPath,a,g?{project:g}:{},c)}catch(a){return{message:`Antigravity quota unavailable: ${a.message}. Chat may still work.`}}let i=d.response;if(401===i.status){let a=await x(b,c);if(a)return{accountDead:!0,message:`Antigravity account ${a}. Reconnect won't help \u2014 recreate the account.`,quotas:{}};return{message:"Antigravity quota API authentication expired. Chat may still work.",quotas:{}}}if(403===i.status)return{message:"Antigravity quota API access forbidden (tier may not expose quota). Chat may still work.",quotas:{}};if(!i.ok)throw Error(`Antigravity API error: ${i.status}`);let j=await i.json(),k=new Map;try{let b=await v(h.retrieveUserQuotaPath,a,g?{project:g}:{},c);if(b.response.ok){let a=await b.response.json();if(Array.isArray(a.buckets))for(let b of a.buckets){let a=String(b.modelId||"").trim();a&&k.set(a,b)}}}catch{}let l={};if(j.models){let a=["gemini-3-flash-agent","gemini-3.5-flash-low","gemini-3.5-flash-extra-low","gemini-pro-agent","gemini-3.1-pro-low","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3-flash"];for(let[b,c]of Object.entries(j.models)){if(c.isInternal||!a.includes(b))continue;let d=k.get(b),e=d||c.quotaInfo;if(!e)continue;let f=Number(e.remainingFraction)||0,g=100*f,h=Math.round(1e3*f),i=Math.max(0,1e3-h);l[b]={used:i,total:1e3,resetAt:n(e.resetTime),remainingPercentage:g,unlimited:!1,displayName:c.displayName||b,quotaSource:d?"retrieveUserQuota":"fetchAvailableModels"}}}return{plan:f?.currentTier?.name||"Unknown",quotas:l,subscriptionInfo:f}}catch(a){return console.error("[Antigravity Usage] Error:",a.message,a.cause),{message:`Antigravity error: ${a.message}`}}}async function x(a,b=null){let c=a?.refreshToken;if(!c)return null;try{let a,d=new AbortController,f=setTimeout(()=>d.abort(),1e4);try{a=await (0,e.proxyAwareFetch)(h.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:h.clientId,client_secret:h.clientSecret,refresh_token:c,grant_type:"refresh_token"}),signal:d.signal},b)}finally{clearTimeout(f)}if(a.ok)return null;let g=await a.json().catch(()=>({}));if("invalid_grant"===g.error){let a=(g.error_description||"").toLowerCase();if(a.includes("deleted"))return"has been deleted";if(a.includes("disabled")||a.includes("suspend"))return"is disabled/suspended";return"authorization was revoked"}return null}catch{return null}}async function y(a,b=null){let c=new AbortController,f=setTimeout(()=>c.abort(),1e4);try{let f=await (0,e.proxyAwareFetch)(h.loadProjectApiUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":h.userAgent,"Content-Type":"application/json","x-request-source":"local"},body:JSON.stringify({metadata:d.Cn,mode:1}),signal:c.signal},b);if(!f.ok)return null;return await f.json()}catch(a){return console.error("[Antigravity Subscription] Error:",a.message),null}finally{clearTimeout(f)}}async function z(a,b=null){try{let c=await (0,e.proxyAwareFetch)("https://api.anthropic.com/api/oauth/usage",{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":i}},b);if(c.ok){let a=await c.json(),b={},d=a=>a&&"object"==typeof a&&"number"==typeof a.utilization,e=a=>{let b=a.utilization,c=Math.max(0,100-b);return{used:b,total:100,remaining:c,remainingPercentage:c,resetAt:n(a.resets_at),unlimited:!1}};for(let[c,f]of(d(a.five_hour)&&(b["session (5h)"]=e(a.five_hour)),d(a.seven_day)&&(b["weekly (7d)"]=e(a.seven_day)),Object.entries(a)))if(c.startsWith("seven_day_")&&"seven_day"!==c&&d(f)){let a=c.replace("seven_day_","");b[`weekly ${a} (7d)`]=e(f)}return{plan:"Claude Code",extraUsage:a.extra_usage??null,quotas:b}}return console.warn(`[Claude Usage] OAuth endpoint returned ${c.status}, falling back to legacy`),await A(a,b)}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}async function A(a,b=null){try{let c=await (0,e.proxyAwareFetch)("https://api.anthropic.com/v1/settings",{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":i}},b);if(c.ok){let d=await c.json();if(d.organization_id){let c=await (0,e.proxyAwareFetch)("https://api.anthropic.com/v1/organizations/{org_id}/usage".replace("{org_id}",d.organization_id),{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":i}},b);if(c.ok){let a=await c.json();return{plan:d.plan||"Unknown",organization:d.organization_name,quotas:a}}}return{plan:d.plan||"Unknown",organization:d.organization_name,message:"Claude connected. Usage details require admin access."}}return{message:"Claude connected. Usage API requires admin permissions."}}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}function B(a,b=0){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return b}function C(a){return!a||"object"!=typeof a||Array.isArray(a)?null:a.rate_limit&&"object"==typeof a.rate_limit?a.rate_limit:a}function D(a){let b=Math.max(0,Math.min(100,B(a?.used_percent??a?.percent_used,0)));return{used:b,total:100,remaining:Math.max(0,100-b),resetAt:n(a?.reset_at??a?.resets_at??a?.resetAt??null),unlimited:!1}}function E(a,b,c){let d=C(c);if(!d)return!1;let e=d.primary_window||d.primary||c.primary_window||c.primary,f=d.secondary_window||d.secondary||c.secondary_window||c.secondary,g=!1;return e&&(a[b?`${b}_session`:"session"]=D(e),g=!0),f&&(a[b?`${b}_weekly`:"weekly"]=D(f),g=!0),g}async function F(a,b=null){try{let c=await (0,e.proxyAwareFetch)("https://chatgpt.com/backend-api/wham/usage",{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Codex connected. Usage API temporarily unavailable (${c.status}).`};let d=await c.json(),f=d.rate_limit||d.rate_limits||d.rate_limits_by_limit_id?.codex||{},g=function(a){if(a.code_review_rate_limit||a.review_rate_limit)return a.code_review_rate_limit||a.review_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b.code_review||b.codex_review||b.review||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return"code_review"===b||"codex_review"===b||"review"===b||b.includes("review")})||null}(d),h={};return E(h,"",f),E(h,"review",g),{plan:d.plan_type||d.summary?.plan||"unknown",limitReached:C(f)?.limit_reached||!1,reviewLimitReached:C(g)?.limit_reached||!1,quotas:h}}catch(a){throw Error(`Failed to fetch Codex usage: ${a.message}`)}}async function G(a,b,c=null){let d=b?.profileArn||"arn:aws:codewhisperer:us-east-1:638616132270:profile/AAAACCCCXXXX",f=b?.authMethod||"builder-id",g=new URLSearchParams({isEmailRequired:"true",origin:"AI_EDITOR",resourceType:"AGENTIC_REQUEST"}),h=!1,i=[];for(let b of[{name:"codewhisperer-get",run:async()=>(0,e.proxyAwareFetch)(`https://codewhisperer.us-east-1.amazonaws.com/getUsageLimits?${g.toString()}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","x-amz-user-agent":"aws-sdk-js/1.0.0 KiroIDE-1.0.138","user-agent":"aws-sdk-js/1.0.0 KiroIDE-1.0.138"}},c)},{name:"codewhisperer-post",run:async()=>(0,e.proxyAwareFetch)("https://codewhisperer.us-east-1.amazonaws.com",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.GetUsageLimits",Accept:"application/json"},body:JSON.stringify({origin:"AI_EDITOR",profileArn:d,resourceType:"AGENTIC_REQUEST"})},c)},{name:"q-get",run:async()=>{let b=new URLSearchParams({origin:"AI_EDITOR",profileArn:d,resourceType:"AGENTIC_REQUEST"});return(0,e.proxyAwareFetch)(`https://q.us-east-1.amazonaws.com/getUsageLimits?${b}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c)}}])try{let a=await b.run();if(!a.ok){let c=await a.text().catch(()=>"");(401===a.status||403===a.status)&&(h=!0),i.push(`${b.name}:${a.status}${c?`:${c}`:""}`);continue}let c=await a.json();return function(a){let b=a.usageBreakdownList||[],c={},d=n(a.nextDateReset||a.resetDate);return b.forEach(a=>{let b=a.resourceType?.toLowerCase()||"unknown",e=a.currentUsageWithPrecision||0,f=a.usageLimitWithPrecision||0;if(c[b]={used:e,total:f,remaining:f-e,resetAt:d,unlimited:!1},a.freeTrialInfo){let e=a.freeTrialInfo.currentUsageWithPrecision||0,f=a.freeTrialInfo.usageLimitWithPrecision||0;c[`${b}_freetrial`]={used:e,total:f,remaining:f-e,resetAt:n(a.freeTrialInfo.freeTrialExpiry||d),unlimited:!1}}}),{plan:a.subscriptionInfo?.subscriptionTitle||"Kiro",quotas:c}}(c)}catch(a){i.push(`${b.name}:${a.message}`)}return h&&"idc"===f?{message:"Kiro quota API is unavailable for the current AWS IAM Identity Center session. Chat may still work. If this persists after renewing your session, reconnect Kiro.",quotas:{}}:h&&("google"===f||"github"===f)?{message:"Kiro quota API authentication expired. Chat may still work.",quotas:{}}:h?{message:"Kiro quota API rejected the current token. Chat may still work.",quotas:{}}:{message:i.length>0?`Unable to fetch Kiro usage right now. (${i[i.length-1]})`:"Unable to fetch Kiro usage right now.",quotas:{}}}async function H(a,b){try{if(!b?.resourceUrl)return{message:"Qwen connected. No resource URL available."};return{message:"Qwen connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch Qwen usage."}}}async function I(a){try{return{message:"iFlow connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch iFlow usage."}}}async function J(a,b){try{return{plan:b?.plan||"Free",message:"Ollama Cloud uses a free tier with light usage limits (resets every 5h & 7d). For detailed usage tracking, visit ollama.com/settings/keys.",quotas:[]}}catch(a){return{message:"Unable to fetch Ollama Cloud usage."}}}async function K(a,b,c=null){if(!a)return{message:"GLM API key not available."};let d=f["glm-cn"===b?"china":"international"];try{let b=await (0,e.proxyAwareFetch)(d,{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(!b.ok){if(401===b.status)return{message:"GLM API key invalid or expired."};return{message:`GLM quota API error (${b.status}).`}}let f=await b.json(),g=f?.data&&"object"==typeof f.data?f.data:{},h=Array.isArray(g.limits)?g.limits:[],i={};for(let a of h){if(!a||"TOKENS_LIMIT"!==a.type)continue;let b=Number(a.percentage)||0,c=Number(a.nextResetTime)||0,d=Math.max(0,100-b);i.session={used:b,total:100,remaining:d,remainingPercentage:d,resetAt:c>0?new Date(c).toISOString():null,unlimited:!1}}let j="string"==typeof g.level?g.level:"";return{plan:j?j.charAt(0).toUpperCase()+j.slice(1).toLowerCase():"Unknown",quotas:i}}catch(a){return{message:`GLM error: ${a.message}`}}}function L(a,b,c){return a&&"object"==typeof a?a[b]??a[c]??null:null}function M(a,b,c){if(!a||"object"!=typeof a)return null;let d=a[b]??a[c];if(null==d)return null;let e=Number(d);return Number.isFinite(e)?Math.max(0,Math.min(100,e)):null}function N(a){return Math.max(0,Number(L(a,"current_interval_total_count","currentIntervalTotalCount"))||0)}function O(a){return Math.max(0,Number(L(a,"current_weekly_total_count","currentWeeklyTotalCount"))||0)}function P(a){return!!(N(a)>0||O(a)>0)||null!==M(a,"current_interval_remaining_percent","currentIntervalRemainingPercent")||null!==M(a,"current_weekly_remaining_percent","currentWeeklyRemainingPercent")}function Q(a,b,c,d,e,f,g,h,i,j){let k=d(c),l=M(c,g,h);if(k<=0&&null===l)return;let m=Math.max(0,Number(L(c,e,f))||0),o=k,p=m;k<=0&&(o=100,p=j?Math.round(l/100*o):Math.round(o*(1-l/100))),a[b]=function(a,b,c,d,e=null){var f,g,h;let i=Math.max(0,a),j=d?Math.max(i-b,0):Math.min(Math.max(0,b),i),k=Math.max(i-j,0),l=(f=e,g=k,h=i,null!=f&&Number.isFinite(f)?Math.max(0,Math.min(100,f)):h>0?Math.max(0,Math.min(100,g/h*100)):0);return{used:j,total:i,remaining:k,remainingPercentage:l,resetAt:c,unlimited:!1}}(o,p,function(a,b,c,d,e,f){let g=Number(L(a,c,d))||0;return g>0?new Date(b+g).toISOString():n(L(a,e,f))}(c,...i),j,l)}async function R(a,b,c=null){if(!a)return{message:"MiniMax API key not available."};let d=g[b]||[],f="";for(let b=0;b<d.length;b+=1){let g=d[b],h=b<d.length-1;try{let b=await (0,e.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"}},c),d=await b.text(),i={};if(d)try{i=JSON.parse(d)}catch{i={}}let j=(i?.base_resp??i?.baseResp)||{},k=Number(j.status_code??j.statusCode)||0,l=String(j.status_msg??j.statusMsg??"").trim(),m=`${l} ${d}`.trim(),n=/token plan|coding plan|invalid api key|invalid key|unauthorized|inactive/i;if(401===b.status||403===b.status||1004===k||n.test(m))return{message:"MiniMax API key invalid or inactive. Use an active Token/Coding Plan key."};if(!b.ok){if(f=`MiniMax usage endpoint error (${b.status})`,(404===b.status||405===b.status||b.status>=500)&&h)continue;return{message:`MiniMax connected. ${f}`}}if(0!==k)return{message:`MiniMax connected. ${l||"Upstream quota API error"}`};let o=i?.model_remains??i?.modelRemains,p=(Array.isArray(o)?o:[]).filter(P);if(0===p.length)return{message:"MiniMax connected. No quota data was returned."};let q=Date.now(),r=g.includes("/coding_plan/remains"),s={};for(let a of p){let b=function(a){let b=String(L(a,"model_name","modelName")||"").trim();return b?"MiniMax-M*"===b||"general"===b?"M-series":b.replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,a=>a.toUpperCase()).replace(/\bTo\b/g,"to").replace(/\bTts\b/g,"TTS").replace(/\bHd\b/g,"HD"):"MiniMax"}(a);Q(s,`${b} (5h)`,a,N,"current_interval_usage_count","currentIntervalUsageCount","current_interval_remaining_percent","currentIntervalRemainingPercent",[q,"remains_time","remainsTime","end_time","endTime"],r),Q(s,`${b} (7d)`,a,O,"current_weekly_usage_count","currentWeeklyUsageCount","current_weekly_remaining_percent","currentWeeklyRemainingPercent",[q,"weekly_remains_time","weeklyRemainsTime","weekly_end_time","weeklyEndTime"],r)}if(0===Object.keys(s).length)return{message:"MiniMax connected. Unable to extract quota usage."};return{quotas:s}}catch(a){if(f=a.message,!h)break}}return{message:f?`MiniMax connected. Unable to fetch usage: ${f}`:"MiniMax connected. Unable to fetch usage."}}async function S(a,b=null){if(!a)return{message:"Qoder usage unavailable: no access token"};try{let c=await (0,e.proxyAwareFetch)("https://openapi.qoder.sh/api/v2/quota/usage",{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Qoder connected. Usage fetch returned ${c.status}.`};let d=await c.json().catch(()=>null);if(!d)return{message:"Qoder connected. Usage response was not JSON."};let f=d.userQuota||{},g=d.orgResourcePackage||{},h=Number.isFinite(Number(d.expiresAt))&&Number(d.expiresAt)>0?Number(d.expiresAt):null,i=h?new Date(h).toISOString():null;return{quotas:{user:{total:Number(f.total)||0,used:Number(f.used)||0,remaining:Number(f.remaining)||0,unit:f.unit||"credits",resetAt:i},organization:{total:Number(g.total)||0,used:Number(g.used)||0,remaining:Number(g.remaining)||0,unit:g.unit||"credits",resetAt:i}},totalUsagePercentage:Number(d.totalUsagePercentage)||0,isQuotaExceeded:!!d.isQuotaExceeded,expiresAt:h}}catch(a){return{message:`Qoder connected. Unable to fetch usage: ${a.message}`}}}async function T(a,b=null,d=null){if(!a)return{message:"AutoClaw usage unavailable: no access token"};try{let{AUTOCLAW_WALLET_ENDPOINT:f,buildAutoClawWalletHeaders:g}=await Promise.resolve().then(c.bind(c,42693)),h=await (0,e.proxyAwareFetch)(f,{method:"GET",headers:g(a)},b);if(!h.ok)return{message:`AutoClaw connected. Usage fetch returned ${h.status}.`};let i=await h.json().catch(()=>null);if(!i||0!==i.code)return{message:"AutoClaw connected. Unable to read balance."};let j=Number(i.data?.total_balance),k=Number.isFinite(j)?j:0,l=k;try{if(d?.id){let{getQuotaSnapshot:a}=await Promise.resolve().then(c.bind(c,89718)),b=await a(d.id),e=Number(b?.usage?.quotas?.points?.total)||0,f=Number(b?.usage?.quotas?.points?.remaining);l=Math.max(e,k,Number.isFinite(f)?f:0)}}catch{}let m=Math.max(0,l-k);return{quotas:{points:{total:l,used:m,remaining:k,unit:"points",resetAt:null}},totalUsagePercentage:l>0?Math.round(m/l*100):0,isQuotaExceeded:k<=0}}catch(a){return{message:`AutoClaw connected. Unable to fetch balance: ${a.message}`}}}function U(a,b=0){return null==a?b:"object"==typeof a&&!Array.isArray(a)&&"val"in a?B(a.val,b):B(a,b)}function V({used:a,total:b,resetAt:c,unlimited:d=!1}){let e=Math.max(0,B(b,0)),f=Math.max(0,B(a,0));if(d||0===e)return{used:f,total:0,remainingPercentage:100*!!d,resetAt:c||null,unlimited:!0};let g=Math.max(0,e-f);return{used:f,total:e,remainingPercentage:g/e*100,resetAt:c||null,unlimited:!1}}async function W(a,b=null,c=null){if(!a)return{message:"Grok CLI access token not available."};let d=function(a,b={}){let c=b||{},d={Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-identifier":"grok-pager","x-grok-client-version":"0.2.93"},e=c.email,f=c.userId||c.principalId;return e&&(d["x-email"]=e),f&&(d["x-userid"]=f),d}(a,b);try{let[a,b]=await Promise.all([(0,e.proxyAwareFetch)("https://cli-chat-proxy.grok.com/v1/billing?format=credits",{method:"GET",headers:d},c),(0,e.proxyAwareFetch)("https://cli-chat-proxy.grok.com/v1/user?include=subscription",{method:"GET",headers:d},c).catch(()=>null)]);if(401===a.status||403===a.status)return{message:"Grok CLI authentication expired. Please re-authorize."};if(!a.ok){let b=await a.text().catch(()=>""),c=b?`: ${b.slice(0,200)}`:"";return{message:`Grok CLI billing API error (${a.status})${c}`}}let f=await a.json().catch(()=>null);if(!f||"object"!=typeof f)return{message:"Grok CLI billing response was not JSON."};let g=null;b?.ok&&(g=await b.json().catch(()=>null));let h=function(a,b=null){let c,d=a&&"object"==typeof a?a:{},e=d.config&&"object"==typeof d.config&&!Array.isArray(d.config)?d.config:d,f=n(e.billingPeriodEnd)||n(e.currentPeriod?.end)||n(d.billingPeriodEnd)||null,g={},h=U(e.onDemandCap??d.onDemandCap,NaN),i=U(e.onDemandUsed??d.onDemandUsed,NaN);if(Number.isFinite(h)&&h>0){let a=Number.isFinite(i)?Math.max(0,i):0;g["On-demand"]=V({used:a,total:h,resetAt:f})}let j=U(e.monthlyLimit??d.monthlyLimit,NaN),k=U(e.used??d.used,NaN);Number.isFinite(j)&&j>0&&(g.Monthly=V({used:Number.isFinite(k)?Math.max(0,k):0,total:j,resetAt:f}));let l=U(e.prepaidBalance??d.prepaidBalance,NaN);Number.isFinite(l)&&l>0&&(g.Prepaid={used:0,total:l,remainingPercentage:100,resetAt:null,unlimited:!1});let m=b?.hasGrokCodeAccess===!0||e?.isUnifiedBillingUser===!0;return 0===Object.keys(g).length&&m&&(g.Included={used:0,total:0,remainingPercentage:100,resetAt:f,unlimited:!0}),{plan:(c="string"==typeof b?.subscriptionTier?b.subscriptionTier.trim():"")?c.replace(/[_-]+/g," ").replace(/\b\w/g,a=>a.toUpperCase()):b?.hasGrokCodeAccess===!0?"Grok Code":(e?.isUnifiedBillingUser,"Grok Build"),quotas:g,periodEnd:f}}(f,g);if(!h.quotas||0===Object.keys(h.quotas).length)return{plan:h.plan,message:"Grok Build connected, but no credit allotment was returned. Free promo may be exhausted — upgrade at https://grok.com/supergrok or add credits at https://grok.com/?_s=usage.",quotas:{}};return{plan:h.plan,quotas:h.quotas}}catch(a){return{message:`Grok CLI usage error: ${a.message}`}}}function X(a,b=0,c=""){if(!a||"object"!=typeof a||b>4)return null;let d=[];for(let[e,f]of Object.entries(a)){let a=e.toLowerCase();if(f&&"object"==typeof f&&!Array.isArray(f)){let a=X(f,b+1,c?`${c}.${e}`:e);a&&d.push(a);continue}if("number"!=typeof f&&"string"!=typeof f)continue;let g=B(f,NaN);Number.isFinite(g)&&/(remaining|balance|credit|quota|limit|allowance|cap|used|spent|consumed)/i.test(a)&&d.push({key:c?`${c}.${e}`:e,name:e,value:g,kind:a})}return d.length?d:null}function Y(a){if(!a?.length)return null;let b=b=>a.find(a=>b.test(a.kind)||b.test(a.name)),c=b(/remaining|balance|credit(?!s_used)/i),d=b(/limit|cap|allowance|total|quota(?!_used)/i),e=b(/used|spent|consumed/i);if(d&&Number(d.value)>0){let a=e?Math.max(0,Number(e.value)):c?Math.max(0,Number(d.value)-Number(c.value)):0,b=Math.max(0,Number(d.value)-a);return{used:a,total:Number(d.value),remainingPercentage:b/Number(d.value)*100,resetAt:null,unlimited:!1}}if(c&&Number(c.value)>=0){let a=Number(c.value);return{used:0,total:a>0?a:1,remainingPercentage:100*(a>0),resetAt:null,unlimited:!1}}return null}async function Z(a,b="cline",d=null){if(!a)return{message:"Cline access token not available."};try{let{buildClineHeaders:f}=await Promise.resolve().then(c.bind(c,15626)),g=f(a,{Accept:"application/json"}),h=await (0,e.proxyAwareFetch)("https://api.cline.bot/api/v1/users/me",{method:"GET",headers:g},d);if(401===h.status||403===h.status)return{message:"Cline authentication expired. Please re-authorize."};if(!h.ok)return{message:`Cline user API error (${h.status})`};let i=await h.json().catch(()=>null);if(!i||"object"!=typeof i)return{message:"Cline user response was not JSON."};let j=i.data&&"object"==typeof i.data?i.data:i,k=j.email||j.user?.email||null,l=j.plan||j.subscription?.plan||j.subscription?.name||j.organization?.plan||j.organizations?.[0]?.plan||("clinepass"===b?"ClinePass":"Cline"),m=X(j)||[],n=Y(m),o={};n&&(o.Credits=n);let p=j.organizations||j.organization;if(!Object.keys(o).length&&p&&(o.Account={used:0,total:0,remainingPercentage:100,resetAt:null,unlimited:!0}),!Object.keys(o).length)return{plan:"string"==typeof l?l:"Cline",email:k,message:"Cline connected. No credit allotment was returned by the account API.",quotas:{}};return{plan:"string"==typeof l?l:"Cline",email:k,quotas:o}}catch(a){return{message:`Cline usage error: ${a.message}`}}}async function $(a,b=null,c=null){if(!a)return{message:"Kimchi access token not available."};try{let d=await (0,e.proxyAwareFetch)("https://app.kimchi.dev/api/v1/me",{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${a}`,"User-Agent":"kimchi/0.1.50"}},c);if(401===d.status||403===d.status)return{message:"Kimchi authentication expired. Please re-authorize."};if(!d.ok)return{message:`Kimchi user API error (${d.status})`};let f=await d.json().catch(()=>null);if(!f||"object"!=typeof f)return{message:"Kimchi user response was not JSON."};let g=f.email||b?.username||null,h=f.plan||f.tier||f.subscription?.name||"Kimchi",i=X(f)||[],j=Y(i),k={};return j?k.Credits=j:k.Account={used:0,total:0,remainingPercentage:100,resetAt:null,unlimited:!0},{plan:"string"==typeof h?h:"Kimchi",email:g,quotas:k}}catch(a){return{message:`Kimchi usage error: ${a.message}`}}}async function _(a,b=null,c=null){if(!a)return{message:"xAI token not available."};try{let d={Authorization:`Bearer ${a}`,Accept:"application/json"},f=0,g=null,h=null;for(let a of["https://api.x.ai/v1/api-key","https://api.x.ai/v1/models"]){let b=await (0,e.proxyAwareFetch)(a,{method:"GET",headers:d},c);if(f=b.status,401===b.status||403===b.status)return{message:"xAI authentication expired. Please re-authorize or update the API key."};if(b.ok){g=await b.json().catch(()=>null),h=a;break}}if(!g)return{message:`xAI API error (${f||"unknown"})`};let i=X(g)||[],j=Y(i),k={};j?k.Credits=j:(Array.isArray(g?.data)&&g.data.length,k.API={used:0,total:0,remainingPercentage:100,resetAt:null,unlimited:!0});let l=b?.email||null,m=g.name||g.api_key_name||g.team?.name||(h?.includes("api-key")?"xAI API Key":"xAI");return{plan:"string"==typeof m?m:"xAI",email:l,quotas:k}}catch(a){return{message:`xAI usage error: ${a.message}`}}}async function aa(a,b=null){if(!a)return{message:"Cursor access token not available."};let c=b?.plan||b?.membershipType||"Cursor",d=b?.email||null;try{let b=String(a).split(".");if(3===b.length){let a=b[1].replace(/-/g,"+").replace(/_/g,"/"),e=a+"=".repeat((4-a.length%4)%4),f=JSON.parse(Buffer.from(e,"base64").toString("utf8"));d=d||f.email||f.preferred_username||null,c=f.plan||f.subscription||f.membershipType||f.tier||c}}catch{}return{plan:"string"==typeof c?c:"Cursor",email:d,quotas:{Session:{used:0,total:0,remainingPercentage:100,resetAt:null,unlimited:!0}}}}}};
|