zevairouter 1.1.80 → 1.1.81
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 +13 -13
- package/cli/app/.next-cli-build/build-manifest.json +2 -2
- package/cli/app/.next-cli-build/prerender-manifest.json +3 -3
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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 +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- 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.nft.json +1 -1
- 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 +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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/settings/pricing/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- 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/_not-found/__PAGE__.segment.rsc +3 -3
- 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.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +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/cline-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- 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-mcp-tools/route.js.nft.json +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/cowork-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
- 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/deepseek-tui-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/dsh-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/dsh-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +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/hermes-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +3 -3
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +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/kilo-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js.nft.json +1 -1
- 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/openclaw-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/test/route.js.nft.json +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/dashboard/chat/completions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +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/init/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +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/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/json-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +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]/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/aistudio/helper/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/aistudio/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-cn/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/codebuddy-intl/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/openrouter/discover-models/route.js.nft.json +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/route.js.nft.json +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/suggested-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/web-login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +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/settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +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/[connectionId]/route.js.nft.json +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/aggregate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- 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/api/chat/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/music/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/music/route.js.nft.json +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/speech/route.js.nft.json +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/transcriptions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +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/chat/completions/route.js.nft.json +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/embeddings/route.js.nft.json +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/images/generations/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +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/messages/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +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/compact/route.js.nft.json +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/responses/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +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/search/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +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/v1/web/fetch/route.js.nft.json +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/[...path]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +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/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- 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/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.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 +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +4 -4
- 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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.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 +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +4 -4
- 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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.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 +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +4 -4
- 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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.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 +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +3 -3
- 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/_full.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.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/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.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/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.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 +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.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 +3 -3
- 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/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- 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/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- 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 +3 -3
- package/cli/app/.next-cli-build/server/app/login.segments/_full.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 +3 -3
- package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app-paths-manifest.json +13 -13
- package/cli/app/.next-cli-build/server/chunks/1257.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1283.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1509.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1757.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1852.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2025.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/267.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2990.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3792.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3815.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/412.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4128.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4177.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4549.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4631.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/5024.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5330.js +4 -2
- package/cli/app/.next-cli-build/server/chunks/5626.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5744.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6166.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6396.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6492.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6936.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7135.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7319.js +13 -11
- package/cli/app/.next-cli-build/server/chunks/7364.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7404.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8517.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8725.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8749.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/9548.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/server/preview-props.json +3 -3
- package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/cli/app/.next-cli-build/static/chunks/{5497-71a02c6639ddb92b.js → 5497-44af6e5aafe6256a.js} +1 -1
- package/cli/app/.next-cli-build/static/chunks/620-7ee9e671a83a36e2.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/{7001-da01aaca36365276.js → 7001-8bbc6a14335afd88.js} +1 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-936f29821afd7d28.js → page-342ac0d9d2fb15c7.js} +1 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-808e3749cba268ff.js +1 -0
- package/cli/app/CHANGELOG.md +10 -0
- package/cli/app/package.json +1 -1
- package/cli/app/src/mitm/server.js +1 -1
- package/cli/package.json +1 -1
- package/package.json +1 -1
- package/cli/app/.next-cli-build/server/chunks/8972.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/620-0f6bd4f59fa0cd33.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-926a39b841570eda.js +0 -1
- /package/cli/app/.next-cli-build/static/{Vbe_S3ECwU1yAXUWqmRCl → 3CLejW1UKDHu2Eb5QKNoj}/_buildManifest.js +0 -0
- /package/cli/app/.next-cli-build/static/{Vbe_S3ECwU1yAXUWqmRCl → 3CLejW1UKDHu2Eb5QKNoj}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var F=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(a){throw t=0,a}};var nr=F((lp,Xn)=>{var $u=require("fs"),Hr=require("path"),jn=require("os"),wa="zevai";function Yn(){return process.platform==="win32"?Hr.join(process.env.APPDATA||Hr.join(jn.homedir(),"AppData","Roaming"),wa):Hr.join(jn.homedir(),`.${wa}`)}function ju(){let e=process.env.DATA_DIR;if(!e)return Yn();try{return $u.mkdirSync(e,{recursive:!0}),e}catch(t){if(t?.code==="EACCES"||t?.code==="EPERM")return console.warn(`[DATA_DIR] '${e}' not writable \u2192 fallback ~/.${wa}`),Yn();throw t}}var Wn=ju(),Yu=Hr.join(Wn,"mitm");Xn.exports={DATA_DIR:Wn,MITM_DIR:Yu}});var xr=F((cp,Zn)=>{var Jn=require("fs"),Wu=process.env.NODE_ENV==="development",Xu=(()=>{if(process.platform==="win32")return null;for(let e of["/usr/sbin/lsof","/usr/bin/lsof","/sbin/lsof"])try{return Jn.accessSync(e,Jn.constants.X_OK),e}catch{}return"lsof"})(),Ju=["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","api2.cursor.sh"],Zu={antigravity:[":generateContent",":streamGenerateContent"],copilot:["/chat/completions","/v1/messages","/responses"],kiro:["/generateAssistantResponse"],cursor:["/BidiAppend","/RunSSE","/RunPoll","/Run"]},e0={antigravity:{"gemini-4-argon-high":"gemini-4-argon-high","gemini-4-argon-medium":"gemini-4-argon-medium","gemini-4-argon-low":"gemini-4-argon-low","gemini-4-carbon-high":"gemini-4-carbon-high","gemini-4-carbon-medium":"gemini-4-carbon-medium","gemini-4-carbon-low":"gemini-4-carbon-low","gemini-4-hydrogen-xhigh":"gemini-4-hydrogen-xhigh","gemini-4-hydrogen-high":"gemini-4-hydrogen-high","gemini-4-hydrogen-medium":"gemini-4-hydrogen-medium","gemini-4-hydrogen-low":"gemini-4-hydrogen-low","gemini-3.8-flash-high":"gemini-3.8-flash-high","gemini-3.8-flash-medium":"gemini-3.8-flash-medium","gemini-3.8-flash-low":"gemini-3.8-flash-low","gemini-default":"gemini-3.8-flash-medium","claude-sonnet-5-5-high":"claude-sonnet-5-5-high","claude-sonnet-5-5-medium":"claude-sonnet-5-5-medium","claude-sonnet-5-5-low":"claude-sonnet-5-5-low","claude-sonnet-5-5":"claude-sonnet-5-5","claude-sonnet-5.5":"claude-sonnet-5-5","claude-sonnet-5.5-high":"claude-sonnet-5-5-high","claude-sonnet-5.5-medium":"claude-sonnet-5-5-medium","claude-sonnet-5.5-low":"claude-sonnet-5-5-low","claude-sonnet-5-5-thinking":"claude-sonnet-5-5","claude-sonnet-5.5-thinking":"claude-sonnet-5-5","claude-opus-5-5-high":"claude-opus-5-5-high","claude-opus-5-5-medium":"claude-opus-5-5-medium","claude-opus-5-5-low":"claude-opus-5-5-low","claude-opus-5-5":"claude-opus-5-5","claude-opus-5.5":"claude-opus-5-5","claude-opus-5.5-high":"claude-opus-5-5-high","claude-opus-5.5-medium":"claude-opus-5-5-medium","claude-opus-5.5-low":"claude-opus-5-5-low","claude-opus-5-5-thinking":"claude-opus-5-5","claude-opus-5.5-thinking":"claude-opus-5-5"}},t0={antigravity:[{match:/flash.*low|low.*flash/i,alias:"gemini-3.8-flash-low"},{match:/flash.*medium|medium.*flash/i,alias:"gemini-3.8-flash-medium"},{match:/flash/i,alias:"gemini-3.8-flash-high"},{match:/opus.*5[.-]5.*high|5[.-]5.*opus.*high/i,alias:"claude-opus-5-5-high"},{match:/opus.*5[.-]5.*medium|5[.-]5.*opus.*medium/i,alias:"claude-opus-5-5-medium"},{match:/opus.*5[.-]5.*low|5[.-]5.*opus.*low/i,alias:"claude-opus-5-5-low"},{match:/sonnet.*5[.-]5.*high|5[.-]5.*sonnet.*high/i,alias:"claude-sonnet-5-5-high"},{match:/sonnet.*5[.-]5.*medium|5[.-]5.*sonnet.*medium/i,alias:"claude-sonnet-5-5-medium"},{match:/sonnet.*5[.-]5.*low|5[.-]5.*sonnet.*low/i,alias:"claude-sonnet-5-5-low"},{match:/opus.*5[.-]5|5[.-]5.*opus/i,alias:"claude-opus-5-5"},{match:/sonnet.*5[.-]5|5[.-]5.*sonnet/i,alias:"claude-sonnet-5-5"},{match:/opus/i,alias:"claude-opus-4-6-thinking"},{match:/sonnet|claude/i,alias:"claude-sonnet-4-6"},{match:/gpt.*oss|oss/i,alias:"gpt-oss-120b-medium"}]},r0={antigravity:[/^tab[_-]/i]},a0=["recordCodeAssistMetrics","recordTrajectoryAnalytics","fetchAdminControls","listExperiments","fetchUserInfo"],n0=new Set(["gemini-3.6-flash-tiered","gemini-3.7-flash-tiered","gemini-3.8-flash-tiered"]);function i0(e,t){let a=String(e||"").replace(/^models\//,"");if(!n0.has(a))return e;try{let r=JSON.parse(Buffer.isBuffer(t)?t.toString():String(t||"")),n=a.includes("3.8")?"3.8":a.includes("3.7")?"3.7":"3.6",s=r?.request?.generationConfig?.thinkingConfig?.thinkingLevel||r?.generationConfig?.thinkingConfig?.thinkingLevel,i=["high","medium","low"].includes(String(s).toLowerCase())?String(s).toLowerCase():"medium";return`gemini-${n}-flash-${i}`}catch{return e}}function s0(e){let t=(e||"").split(":")[0];return t==="api.individual.githubcopilot.com"?"copilot":t==="daily-cloudcode-pa.googleapis.com"||t==="cloudcode-pa.googleapis.com"?"antigravity":t==="q.us-east-1.amazonaws.com"?"kiro":t==="api2.cursor.sh"?"cursor":null}Zn.exports={IS_DEV:Wu,LSOF_BIN:Xu,TARGET_HOSTS:Ju,URL_PATTERNS:Zu,MODEL_SYNONYMS:e0,MODEL_PATTERNS:t0,MODEL_NO_MAP:r0,LOG_BLACKLIST_URL_PARTS:a0,getToolForHost:s0,extractTieredFlashModel:i0}});var wt=F((fp,ai)=>{var Gt=require("fs"),Gr=require("path"),Na=require("zlib"),{DATA_DIR:o0}=nr(),{LOG_BLACKLIST_URL_PARTS:u0}=xr();function ei(){return new Date().toLocaleTimeString("en-US",{hour12:!1})}var l0=e=>console.log(`[${ei()}] [MITM] ${e}`),c0=e=>console.error(`[${ei()}] \u274C [MITM] ${e}`),zt=Gr.join(o0,"logs","mitm");Gt.existsSync(zt)||Gt.mkdirSync(zt,{recursive:!0});function f0(){try{if(!Gt.existsSync(zt))return;for(let e of Gt.readdirSync(zt))try{Gt.rmSync(Gr.join(zt,e),{recursive:!0,force:!0})}catch{}}catch{}}var d0=/^\s*(\{\s*\}|\[\s*\]|null)?\s*$/;function ti(e,t=80){return String(e).replace(/[^a-zA-Z0-9]/g,"_").substring(0,t)}function ri(e){return e?u0.some(t=>e.includes(t)):!1}function h0(e,t){if(!e||e.length===0)return e;try{let a=(t||"").toLowerCase();if(a.includes("gzip"))return Na.gunzipSync(e);if(a.includes("br"))return Na.brotliDecompressSync(e);if(a.includes("deflate"))return Na.inflateSync(e)}catch{}return e}function p0(e,t,a="raw"){if(ri(e.url))return null;try{let r=new Date().toISOString().replace(/[:.]/g,"-"),n=ti((e.headers.host||"")+e.url),s=Gr.join(zt,`${r}_${a}_${n}.req.json`),i=null;try{i=JSON.parse(t.toString())}catch{}return Gt.writeFileSync(s,JSON.stringify({method:e.method,url:e.url,host:e.headers.host,headers:e.headers,body:i??t.toString("utf8")},null,2)),s}catch{return null}}function g0(e,t="raw"){if(ri(e.url))return null;let a=new Date().toISOString().replace(/[:.]/g,"-"),r=ti((e.headers.host||"")+e.url),n=Gr.join(zt,`${a}_${t}_${r}.res.txt`),s=0,i={},o=[];return{writeHeader:(u,l)=>{s=u,i=l||{}},writeChunk:u=>{u!=null&&o.push(Buffer.isBuffer(u)?u:Buffer.from(u))},end:()=>{try{let u=Buffer.concat(o),l=i["content-encoding"]||i["Content-Encoding"],f=h0(u,l).toString("utf8");if(d0.test(f))return;let v={...i};delete v["content-encoding"],delete v["Content-Encoding"];let y=`STATUS: ${s}
|
|
1
|
+
var F=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(a){throw t=0,a}};var nr=F((lp,Xn)=>{var $u=require("fs"),Hr=require("path"),jn=require("os"),wa="zevai";function Yn(){return process.platform==="win32"?Hr.join(process.env.APPDATA||Hr.join(jn.homedir(),"AppData","Roaming"),wa):Hr.join(jn.homedir(),`.${wa}`)}function ju(){let e=process.env.DATA_DIR;if(!e)return Yn();try{return $u.mkdirSync(e,{recursive:!0}),e}catch(t){if(t?.code==="EACCES"||t?.code==="EPERM")return console.warn(`[DATA_DIR] '${e}' not writable \u2192 fallback ~/.${wa}`),Yn();throw t}}var Wn=ju(),Yu=Hr.join(Wn,"mitm");Xn.exports={DATA_DIR:Wn,MITM_DIR:Yu}});var xr=F((cp,Zn)=>{var Jn=require("fs"),Wu=process.env.NODE_ENV==="development",Xu=(()=>{if(process.platform==="win32")return null;for(let e of["/usr/sbin/lsof","/usr/bin/lsof","/sbin/lsof"])try{return Jn.accessSync(e,Jn.constants.X_OK),e}catch{}return"lsof"})(),Ju=["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","api2.cursor.sh"],Zu={antigravity:[":generateContent",":streamGenerateContent"],copilot:["/chat/completions","/v1/messages","/responses"],kiro:["/generateAssistantResponse"],cursor:["/BidiAppend","/RunSSE","/RunPoll","/Run"]},e0={antigravity:{"gemini-4-argon-high":"gemini-4-argon-high","gemini-4-argon-medium":"gemini-4-argon-medium","gemini-4-argon-low":"gemini-4-argon-low","gemini-4-carbon-high":"gemini-4-carbon-high","gemini-4-carbon-medium":"gemini-4-carbon-medium","gemini-4-carbon-low":"gemini-4-carbon-low","gemini-4-hydrogen-xhigh":"gemini-4-hydrogen-xhigh","gemini-4-hydrogen-high":"gemini-4-hydrogen-high","gemini-4-hydrogen-medium":"gemini-4-hydrogen-medium","gemini-4-hydrogen-low":"gemini-4-hydrogen-low","gemini-4-neon-xhigh":"gemini-4-neon-xhigh","gemini-4-neon-high":"gemini-4-neon-high","gemini-4-neon-medium":"gemini-4-neon-medium","gemini-4-neon-low":"gemini-4-neon-low","gemini-3.8-flash-high":"gemini-3.8-flash-high","gemini-3.8-flash-medium":"gemini-3.8-flash-medium","gemini-3.8-flash-low":"gemini-3.8-flash-low","gemini-default":"gemini-3.8-flash-medium","claude-sonnet-5-5-high":"claude-sonnet-5-5-high","claude-sonnet-5-5-medium":"claude-sonnet-5-5-medium","claude-sonnet-5-5-low":"claude-sonnet-5-5-low","claude-sonnet-5-5":"claude-sonnet-5-5","claude-sonnet-5.5":"claude-sonnet-5-5","claude-sonnet-5.5-high":"claude-sonnet-5-5-high","claude-sonnet-5.5-medium":"claude-sonnet-5-5-medium","claude-sonnet-5.5-low":"claude-sonnet-5-5-low","claude-sonnet-5-5-thinking":"claude-sonnet-5-5","claude-sonnet-5.5-thinking":"claude-sonnet-5-5","claude-opus-5-5-high":"claude-opus-5-5-high","claude-opus-5-5-medium":"claude-opus-5-5-medium","claude-opus-5-5-low":"claude-opus-5-5-low","claude-opus-5-5":"claude-opus-5-5","claude-opus-5.5":"claude-opus-5-5","claude-opus-5.5-high":"claude-opus-5-5-high","claude-opus-5.5-medium":"claude-opus-5-5-medium","claude-opus-5.5-low":"claude-opus-5-5-low","claude-opus-5-5-thinking":"claude-opus-5-5","claude-opus-5.5-thinking":"claude-opus-5-5"}},t0={antigravity:[{match:/flash.*low|low.*flash/i,alias:"gemini-3.8-flash-low"},{match:/flash.*medium|medium.*flash/i,alias:"gemini-3.8-flash-medium"},{match:/flash/i,alias:"gemini-3.8-flash-high"},{match:/opus.*5[.-]5.*high|5[.-]5.*opus.*high/i,alias:"claude-opus-5-5-high"},{match:/opus.*5[.-]5.*medium|5[.-]5.*opus.*medium/i,alias:"claude-opus-5-5-medium"},{match:/opus.*5[.-]5.*low|5[.-]5.*opus.*low/i,alias:"claude-opus-5-5-low"},{match:/sonnet.*5[.-]5.*high|5[.-]5.*sonnet.*high/i,alias:"claude-sonnet-5-5-high"},{match:/sonnet.*5[.-]5.*medium|5[.-]5.*sonnet.*medium/i,alias:"claude-sonnet-5-5-medium"},{match:/sonnet.*5[.-]5.*low|5[.-]5.*sonnet.*low/i,alias:"claude-sonnet-5-5-low"},{match:/opus.*5[.-]5|5[.-]5.*opus/i,alias:"claude-opus-5-5"},{match:/sonnet.*5[.-]5|5[.-]5.*sonnet/i,alias:"claude-sonnet-5-5"},{match:/opus/i,alias:"claude-opus-4-6-thinking"},{match:/sonnet|claude/i,alias:"claude-sonnet-4-6"},{match:/gpt.*oss|oss/i,alias:"gpt-oss-120b-medium"}]},r0={antigravity:[/^tab[_-]/i]},a0=["recordCodeAssistMetrics","recordTrajectoryAnalytics","fetchAdminControls","listExperiments","fetchUserInfo"],n0=new Set(["gemini-3.6-flash-tiered","gemini-3.7-flash-tiered","gemini-3.8-flash-tiered"]);function i0(e,t){let a=String(e||"").replace(/^models\//,"");if(!n0.has(a))return e;try{let r=JSON.parse(Buffer.isBuffer(t)?t.toString():String(t||"")),n=a.includes("3.8")?"3.8":a.includes("3.7")?"3.7":"3.6",s=r?.request?.generationConfig?.thinkingConfig?.thinkingLevel||r?.generationConfig?.thinkingConfig?.thinkingLevel,i=["high","medium","low"].includes(String(s).toLowerCase())?String(s).toLowerCase():"medium";return`gemini-${n}-flash-${i}`}catch{return e}}function s0(e){let t=(e||"").split(":")[0];return t==="api.individual.githubcopilot.com"?"copilot":t==="daily-cloudcode-pa.googleapis.com"||t==="cloudcode-pa.googleapis.com"?"antigravity":t==="q.us-east-1.amazonaws.com"?"kiro":t==="api2.cursor.sh"?"cursor":null}Zn.exports={IS_DEV:Wu,LSOF_BIN:Xu,TARGET_HOSTS:Ju,URL_PATTERNS:Zu,MODEL_SYNONYMS:e0,MODEL_PATTERNS:t0,MODEL_NO_MAP:r0,LOG_BLACKLIST_URL_PARTS:a0,getToolForHost:s0,extractTieredFlashModel:i0}});var wt=F((fp,ai)=>{var Gt=require("fs"),Gr=require("path"),Na=require("zlib"),{DATA_DIR:o0}=nr(),{LOG_BLACKLIST_URL_PARTS:u0}=xr();function ei(){return new Date().toLocaleTimeString("en-US",{hour12:!1})}var l0=e=>console.log(`[${ei()}] [MITM] ${e}`),c0=e=>console.error(`[${ei()}] \u274C [MITM] ${e}`),zt=Gr.join(o0,"logs","mitm");Gt.existsSync(zt)||Gt.mkdirSync(zt,{recursive:!0});function f0(){try{if(!Gt.existsSync(zt))return;for(let e of Gt.readdirSync(zt))try{Gt.rmSync(Gr.join(zt,e),{recursive:!0,force:!0})}catch{}}catch{}}var d0=/^\s*(\{\s*\}|\[\s*\]|null)?\s*$/;function ti(e,t=80){return String(e).replace(/[^a-zA-Z0-9]/g,"_").substring(0,t)}function ri(e){return e?u0.some(t=>e.includes(t)):!1}function h0(e,t){if(!e||e.length===0)return e;try{let a=(t||"").toLowerCase();if(a.includes("gzip"))return Na.gunzipSync(e);if(a.includes("br"))return Na.brotliDecompressSync(e);if(a.includes("deflate"))return Na.inflateSync(e)}catch{}return e}function p0(e,t,a="raw"){if(ri(e.url))return null;try{let r=new Date().toISOString().replace(/[:.]/g,"-"),n=ti((e.headers.host||"")+e.url),s=Gr.join(zt,`${r}_${a}_${n}.req.json`),i=null;try{i=JSON.parse(t.toString())}catch{}return Gt.writeFileSync(s,JSON.stringify({method:e.method,url:e.url,host:e.headers.host,headers:e.headers,body:i??t.toString("utf8")},null,2)),s}catch{return null}}function g0(e,t="raw"){if(ri(e.url))return null;let a=new Date().toISOString().replace(/[:.]/g,"-"),r=ti((e.headers.host||"")+e.url),n=Gr.join(zt,`${a}_${t}_${r}.res.txt`),s=0,i={},o=[];return{writeHeader:(u,l)=>{s=u,i=l||{}},writeChunk:u=>{u!=null&&o.push(Buffer.isBuffer(u)?u:Buffer.from(u))},end:()=>{try{let u=Buffer.concat(o),l=i["content-encoding"]||i["Content-Encoding"],f=h0(u,l).toString("utf8");if(d0.test(f))return;let v={...i};delete v["content-encoding"],delete v["Content-Encoding"];let y=`STATUS: ${s}
|
|
2
2
|
HEADERS: ${JSON.stringify(v,null,2)}
|
|
3
3
|
---BODY---
|
|
4
4
|
${f}`;Gt.writeFileSync(n,y)}catch{}},file:n}}ai.exports={log:l0,err:c0,dumpRequest:p0,createResponseDumper:g0,clearDumpDir:f0}});var j=F((dp,ni)=>{ni.exports={options:{usePureJavaScript:!1}}});var oi=F((hp,si)=>{var Ra={};si.exports=Ra;var ii={};Ra.encode=function(e,t,a){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(a!==void 0&&typeof a!="number")throw new TypeError('"maxline" must be a number.');var r="";if(!(e instanceof Uint8Array))r=y0(e,t);else{var n=0,s=t.length,i=t.charAt(0),o=[0];for(n=0;n<e.length;++n){for(var u=0,l=e[n];u<o.length;++u)l+=o[u]<<8,o[u]=l%s,l=l/s|0;for(;l>0;)o.push(l%s),l=l/s|0}for(n=0;e[n]===0&&n<e.length-1;++n)r+=i;for(n=o.length-1;n>=0;--n)r+=t[o[n]]}if(a){var c=new RegExp(".{1,"+a+"}","g");r=r.match(c).join(`\r
|
package/cli/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=8972,exports.ids=[8972],exports.modules={9760:(a,b,c)=>{c.d(b,{EE:()=>n,U:()=>h,YR:()=>o,gs:()=>e,x0:()=>l});let d="https://api.blackbox.ai",e=`${d}/v1/models`,f=`${d}/key/info`,g=["/veo","/sora","/flux","/stable-diffusion","/seedream","/imagen","/nano-banana","/image-","/image/","-image","/edit","-edit","/mochi","/ray-","/fast-animatediff","/fast-svd","/cogvideox","/hidream","/recraft","/ideogram","/bria/","/playgroundai/","/luma/photon","/sana","/wan-","/dreamshaper","hunyuan-video"];function h(a){let b=Array.isArray(a)?a:a?.data||a?.models||a?.results||[];return Array.isArray(b)?b.map(a=>{let b="string"==typeof a?a.trim():String(a?.id||a?.model||a?.name||"").trim();return b&&function(a){if("string"!=typeof a||!a.trim())return!1;let b=a.trim().toLowerCase();return!g.some(a=>b.includes(a))}(b)?{..."object"==typeof a&&a?a:{},id:b,name:a?.name||a?.display_name||a?.displayName||b}:null}).filter(Boolean):[]}function i(a){let b={Accept:"application/json","Content-Type":"application/json"};return"string"==typeof a&&a.trim()&&(b.Authorization=`Bearer ${a.trim()}`),b}function j(a={}){return a.signal?a.signal:AbortSignal.timeout(a.timeoutMs||8e3)}async function k(a){try{await a?.body?.cancel?.()}catch{}}async function l(a={},b={}){let c=b.fetchImpl||fetch;try{let d=await c(e,{method:"GET",headers:i(a.apiKey||a.accessToken),signal:j(b)});if(!d.ok)return await k(d),null;let f=h(await d.json());return f.length?{models:f}:null}catch{return null}}async function m(a,b={}){let c=b.fetchImpl||fetch;if("string"!=typeof a||!a.trim())return null;try{let d=await c(f,{method:"GET",headers:i(a),signal:j(b)});if(!d.ok)return await k(d),null;let e=await d.json();return e?.info||e||null}catch{return null}}async function n(a,b={}){let c=await m(a,b);if(!c)return{plan:"Blackbox API",message:"Blackbox spend data is unavailable for this key.",quotas:{},trackingMode:"unavailable"};let d=Number(c.spend),e=Number(c.max_budget),f=Number.isFinite(d)&&d>=0?d:0,g=Number.isFinite(e)&&e>0,h=g?e:0,i=g?Math.max(0,h-f):null,j=g?Math.max(0,Math.min(100,i/h*100)):100;return{plan:"Blackbox API",quotas:{Spend:{used:f,total:h,...null==i?{}:{remaining:i},remainingPercentage:j,unlimited:!1,unit:"USD",resetAt:c.budget_reset_at||c.expires||null,displayName:g?"API Budget":"API Spend"}},trackingMode:"upstream",spend:f,maxBudget:g?e:null}}async function o(a,b={}){let c=b.fetchImpl||fetch;try{let d=await c(f,{method:"GET",headers:i(a),signal:j(b)});if(d.ok||429===d.status)return await k(d),{valid:!0,error:null};if(401===d.status||403===d.status||404===d.status)return await k(d),{valid:!1,error:"Invalid API key"};let e="";try{e=(await d.text()).slice(0,240)}catch{}return{valid:!1,error:e?`Blackbox validation failed (${d.status}): ${e}`:`Blackbox validation failed (${d.status})`}}catch(a){return{valid:!1,error:a?.message||"Blackbox validation failed"}}}},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;return{connectionProxyEnabled:b,connectionProxyUrl:e(a?.connectionProxyUrl),connectionNoProxy:e(a?.connectionNoProxy)}}(a),g=!1;if(c){let a=await (0,d.hr)(c),b=e(a?.proxyUrl),f=e(a?.noProxy),h=a&&!0===a.isActive&&b;if(g=a?.strictProxy===!0,h){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,strictProxy:g,...f};return{source:"none",proxyPoolId:c||null,proxyPool:null,strictProxy:g,...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}}}},89026:(a,b,c)=>{c.d(b,{Ut:()=>aD,RO:()=>aN,Yt:()=>aM,my:()=>bm});var d=c(39609),e=c(9760);function f(a,b=0){let c="string"==typeof a&&a.trim()?Number(a):a;return Number.isFinite(c)?c:b}function g(a){if(null==a||""===a)return null;try{if(a instanceof Date)return a.toISOString();if("number"==typeof a||/^\d+$/.test(String(a))){let b=Number(a);return new Date(b<1e12?1e3*b:b).toISOString()}return new Date(a).toISOString()}catch{return null}}function h(a,b){return{plan:a,quotas:{Credits:{used:1,total:1,remaining:0,remainingPercentage:0,resetAt:null,unlimited:!1}},authoritative:!0,limitReached:!0,message:b}}function i(a){let b=Error(a);return b.name="AbortError",b.code="USAGE_REQUEST_ABORTED",b}async function j(a,b={}){let c,d=new AbortController,e=b.parentSignal,f=Number.isFinite(b.timeoutMs)&&b.timeoutMs>0?b.timeoutMs:15e3,g=new Promise((a,b)=>{c=b}),h=a=>{let b=a instanceof Error?a:i("Usage request aborted");d.signal.aborted||d.abort(b),c(b)},k=()=>h(e.reason);e?.aborted?h(e.reason):e?.addEventListener("abort",k,{once:!0});let l=setTimeout(()=>h(i(`Usage request timed out after ${f}ms`)),f);l.unref?.();try{return await Promise.race([Promise.resolve().then(()=>a(d.signal)),g])}finally{clearTimeout(l),e?.removeEventListener("abort",k)}}let k={session:"Session (5h)",weekly:"Weekly (7d)",monthly:"Monthly"};function l(a,b){let c=Number(a),d=Number.isFinite(c)?Math.max(0,Math.min(100,c)):100;return{used:Math.round((100-d)*100)/100,total:100,remainingPercentage:d,resetAt:b||null,unlimited:!1}}function m(){return{quotaFetchFailed:!0,message:"Ollama Cloud usage temporarily unavailable."}}async function n(a,b=null){let c=a?.apiKey||a?.accessToken;if(!c)return{message:"Ollama Cloud API key not available."};let e={Authorization:`Bearer ${c}`,Accept:"application/json"};try{return await j(async a=>{let c=await (0,d.proxyAwareFetch)("https://ollama.com/api/usage",{method:"GET",headers:e,signal:a},b);if(401===c.status||403===c.status)return{authError:!0,accountDead:!0,message:"Ollama Cloud API key invalid or expired."};if(402===c.status||429===c.status)return h("Ollama Cloud","Ollama Cloud credits are exhausted.");if(!c.ok)return m();let f=await c.json().catch(()=>null);if(!f||"object"!=typeof f)return m();let g=await (0,d.proxyAwareFetch)("https://ollama.com/api/me",{method:"POST",headers:{...e,"Content-Length":"0"},signal:a},b).then(a=>a.ok?a.json():null).catch(b=>{if(a.aborted)throw b;return null}),i="string"==typeof g?.Plan?g.Plan.trim():"",j=i?i.charAt(0).toUpperCase()+i.slice(1).toLowerCase():"Ollama Cloud",n=f.limits&&"object"==typeof f.limits?f.limits:{},o="free"===i.toLowerCase()&&g?.CreatedAt?function(a,b=new Date){let c=new Date(a);if(Number.isNaN(c.getTime()))return null;let d=(b.getUTCFullYear()-c.getUTCFullYear())*12+(b.getUTCMonth()-c.getUTCMonth());for(let a=Math.max(0,d);a<=d+1;a++){let d=function(a,b){let c=a.getUTCMonth()+b,d=a.getUTCFullYear()+Math.floor(c/12),e=(c%12+12)%12,f=new Date(Date.UTC(d,e+1,0)).getUTCDate();return new Date(Date.UTC(d,e,Math.min(a.getUTCDate(),f),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds()))}(c,a);if(d>b)return d.toISOString()}return null}(g.CreatedAt):null,p={};for(let[a,b]of Object.entries(k)){let c=n[a]?.usage;null!=c&&Number.isFinite(Number(c))&&(p[b]=function(a,b=null){let c=Math.round(100*Math.max(0,Math.min(1,Number(a)||0))),d=100-c;return{used:c,total:100,remaining:d,remainingPercentage:d,resetAt:b,unlimited:!1}}(c,"monthly"===a?o:null))}if(0===Object.keys(p).length){let c=await (0,d.proxyAwareFetch)("https://ollama.com/api/balance",{method:"GET",headers:e,signal:a},b).then(a=>a.ok?a.json():null).catch(b=>{if(a.aborted)throw b;return null}),f=c?.included;if(f?.session&&(p["Session (5h)"]=l(f.session.remaining_percent,f.session.resets_at)),f?.weekly&&(p["Weekly (7d)"]=l(f.weekly.remaining_percent,f.weekly.resets_at)),f?.allowance_usd!==void 0&&f?.balance_usd!==void 0){let a=Number(f.allowance_usd)||0,b=Number(f.balance_usd)||0;p["Allowance ($)"]={used:Math.max(0,Math.round((a-b)*100)/100),total:a,remainingPercentage:a>0?Math.round(b/a*1e4)/100:0,resetAt:f.period?.until||null,unlimited:!1,unit:"USD"}}Number(c?.purchased?.balance_usd)>0&&(p["Purchased Credits"]={used:0,total:Number(c.purchased.balance_usd),remainingPercentage:100,isCreditBalance:!0,currency:"$"})}return 0===Object.keys(p).length?{plan:j,quotas:p,authoritative:!0,message:"Ollama Cloud connected. No usage limits reported."}:{plan:j,quotas:p,authoritative:!0}},{parentSignal:b?.signal})}catch{return m()}}var o=c(12132);function p(a,b,c){let d=Math.max(0,Math.min(100,Math.round(a))),e=null;if("number"==typeof c&&c>0){let a=new Date(c>1e12?c:1e3*c);Number.isNaN(a.getTime())||(e=a.toISOString())}else if("string"==typeof b&&b){let a=new Date(`${b}T00:00:00Z`);Number.isNaN(a.getTime())||(e=a.toISOString())}return{plan:"Xiaomi MiMo Desktop",quotas:{Weekly:{used:100-d,total:100,remainingPercentage:d,resetAt:e,unlimited:!1}}}}async function q(a=null,b=null,c=null){let e=await (0,o.getMimoAccountUsage)(b,c);if("number"==typeof e.percent&&Number.isFinite(e.percent))return p(e.percent,e.resetDate,e.resetAt);let f="string"==typeof a?a.trim():"";if(!f)return{message:"Xiaomi MiMo Desktop not connected. Add credentials to view usage."};try{let a=await (0,d.proxyAwareFetch)("https://aistudio.xiaomimimo.com/open-apis/v1/user/usage",{method:"GET",headers:{Authorization:`Bearer ${f}`,"X-Mimo-Source":"mimocode-cli",Accept:"application/json"},signal:AbortSignal.timeout(1e4)},c);if(401===a.status)return{plan:"Xiaomi MiMo Desktop",message:"Weekly quota requires Xiaomi account session. API key alone is insufficient."};if(!a.ok)return{plan:"Xiaomi MiMo Desktop",message:`Usage API error (${a.status})`};let b=await a.json().catch(()=>null);if(!b||0!==b.code||!b.data)return{plan:"Xiaomi MiMo Desktop",message:"Usage endpoint returned unexpected response."};if("number"!=typeof b.data.percent||!Number.isFinite(b.data.percent))return{plan:"Xiaomi MiMo Desktop",message:"Usage data missing percent field."};return p(b.data.percent,b.data.resetDate)}catch(a){return{message:`Xiaomi MiMo Desktop usage error: ${a.message}`}}}var r=c(10263);let s=(process.env.COMMAND_CODE_API_BASE_URL||"https://api.commandcode.ai").replace(/\/$/,""),t={"individual-go":"Go","individual-go-v1":"Go","individual-goat":"GOAT","individual-pro":"Pro","individual-pro-v1":"Pro","individual-provider":"Provider","individual-max":"Max","individual-ultra":"Ultra","teams-pro":"Teams Pro"},u={"individual-go":10,"individual-go-v1":10,"individual-goat":70,"individual-pro":30,"individual-pro-v1":80,"individual-provider":15,"individual-max":150,"individual-ultra":300,"teams-pro":40},v={go:"individual-go","go-v1":"individual-go-v1",goat:"individual-goat",pro:"individual-pro",provider:"individual-provider",max:"individual-max",ultra:"individual-ultra"};function w(a,b){let c=new URLSearchParams(Object.entries(b||{}).filter(([,a])=>null!=a)).toString();return c?`${a}?${c}`:a}function x(a){if(!a||"object"!=typeof a)return null;let b=f(a.used,0),c=f(a.cap,0);return c<=0&&b<=0?null:{used:b,total:c,percentage:c>0?Math.round(b/c*100):0,colorPercentage:c>0?Math.round((c-b)/c*100):100,percentageIsUsed:!0,remaining:Math.max(0,c-b),unlimited:!1,resetAt:g(a.resetAt),emptyMessage:0!==b||a.resetAt?null:"No usage in this window"}}async function y(a,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"Command Code API key not available. Add a key to view usage."};let c=(0,r.$j)({apiKey:a.trim(),accept:"application/json"}),e=a=>(0,d.proxyAwareFetch)(s+a,{method:"GET",headers:c},b);try{let a=await e(w("/alpha/whoami",{limits:"1"}));if(401===a.status||403===a.status)return{plan:"Command Code",message:"Command Code authentication failed. Check the API key."};if(!a.ok)return{plan:"Command Code",message:`Command Code usage API error (${a.status})`};let b=await a.json().catch(()=>({})),c=b?.org?.id??null,[d,h]=await Promise.all([e(w("/alpha/billing/credits",{orgId:c})),e(w("/alpha/billing/subscriptions",{orgId:c}))]);if(401===d.status||403===d.status||401===h.status||403===h.status)return{plan:"Command Code",message:"Command Code authentication failed. Check the API key."};if(!d.ok)return{plan:"Command Code",message:`Command Code credits API error (${d.status})`};if(!h.ok)return{plan:"Command Code",message:`Command Code subscriptions API error (${h.status})`};let i=await d.json().catch(()=>({})),j=await h.json().catch(()=>({})),k=j?.data?.planId??null,l=function(a){if("string"!=typeof a)return null;let b=a.trim().toLowerCase();return v[b]||b||null}(k),m=l&&t[l]||k||"Command Code",n=l&&u[l]||0,o=i?.credits||{},p=f(o.monthlyCredits,0)+f(o.purchasedCredits,0)+f(o.freeCredits,0),q=n>0?Math.max(0,n-p):0,r={Credits:{name:"Monthly",used:q,total:n>0?n:p,percentage:n>0?Math.round(q/n*100):0,colorPercentage:n>0?Math.round(p/n*100):100,percentageIsUsed:!0,remaining:p,unlimited:n<=0,resetAt:g(j?.data?.currentPeriodEnd)}},s=x(i?.windowLimits?.fiveHour);s&&(r["Session (5h)"]={...s,name:"5-hour limit"});let y=x(i?.windowLimits?.weekly);return y&&(r.Weekly={...y,name:"Weekly limit"}),{plan:m,quotas:r}}catch(a){return{message:`Command Code error: ${a.message}`}}}var z=c(75924);let A={LEVEL_BASIC:"Moderato",LEVEL_INTERMEDIATE:"Allegretto",LEVEL_ADVANCED:"Allegro",LEVEL_STANDARD:"Vivace"};function B(){return{quotaFetchFailed:!0,message:"Kimi usage temporarily unavailable."}}function C(a,b,c,d){let e=Math.max(0,f(b)),h=Math.max(0,f(a)),i=Math.max(0,f(c,e-h));return{used:h,total:e,remaining:i,remainingPercentage:e>0?Math.min(100,i/e*100):0,resetAt:g(d),unlimited:!1}}async function D(a,b=null){let c="string"==typeof a?.apiKey?a.apiKey.trim():"",e="string"==typeof a?.accessToken?a.accessToken.trim():"";if(!c&&!e)return{message:"Kimi access token or API key not available."};let g=c?{"x-api-key":c}:{Authorization:`Bearer ${e}`,...(0,z.buildKimiHeaders)(a?.providerSpecificData?.deviceId)};try{return await j(async a=>{let c,e=await (0,d.proxyAwareFetch)("https://api.kimi.com/coding/v1/usages",{method:"GET",headers:{...g,Accept:"application/json","Content-Type":"application/json"},signal:a},b),i=await e.text().catch(()=>"");if(401===e.status)return{authError:!0,accountDead:!0,message:"Kimi authentication expired. Please re-authorize."};if(403===e.status)return{plan:"Kimi Coding",quotaFetchFailed:!0,usageUnavailable:!0,message:"Kimi connected, but this account has no permission to view usage."};if(402===e.status||429===e.status)return h("Kimi Coding","Kimi credits are exhausted.");if(!e.ok)return B();try{c=JSON.parse(i||"{}")}catch{return B()}let j={},k=c.usage&&"object"==typeof c.usage?c.usage:{},l=f(k.limit??k.Limit);l>0&&(j.Weekly=C(k.used??k.Used,l,k.remaining??k.Remaining,k.resetTime??k.ResetTime??k.reset_at??k.resetAt));let m=(Array.isArray(c.limits)?c.limits:[]).filter(a=>{let b=a?.detail&&"object"==typeof a.detail?a.detail:{};return f(b.limit??b.Limit)>0}),n=new Set;for(let[a,b]of m.entries()){let c=b?.detail&&"object"==typeof b.detail?b.detail:{},d=f(c.limit??c.Limit),e=f(c.remaining??c.Remaining,d);j[function(a,b,c,d){if(1===c)return"Ratelimit";let e=a?.name??a?.type??a?.window??a?.detail?.name??a?.detail?.type??a?.detail?.window,f="string"==typeof e?e.replace(/[^a-zA-Z0-9._ -]/g," ").replace(/\s+/g," ").trim().slice(0,48):"",g=f?`Ratelimit (${f})`:`Ratelimit ${b+1}`,h=g,i=2;for(;d.has(h);)h=`${g} ${i++}`;return d.add(h),h}(b,a,m.length,n)]=C(Math.max(0,d-e),d,e,c.resetTime??c.reset_at??c.resetAt)}let o=c.user?.membership?.level;return{plan:A[o]||(o?String(o).replace(/^LEVEL_/,"").toLowerCase():"Kimi Coding"),quotas:j,authoritative:!0,...0===Object.keys(j).length?{message:"Kimi connected. No usage limits reported."}:{}}},{parentSignal:b?.signal})}catch{return B()}}function E(){return{quotaFetchFailed:!0,message:"DeepSeek balance temporarily unavailable."}}async function F(a,b=null){let c="string"==typeof a?.apiKey?a.apiKey.trim():"";if(!c)return{message:"DeepSeek API key not available. Add a key to view usage."};try{return await j(async a=>{let e=await (0,d.proxyAwareFetch)("https://api.deepseek.com/user/balance",{method:"GET",headers:{Authorization:`Bearer ${c}`,Accept:"application/json","Content-Type":"application/json"},signal:a},b);if(401===e.status||403===e.status)return{authError:!0,accountDead:!0,message:"DeepSeek authentication failed. Check the API key."};if(402===e.status||429===e.status)return h("DeepSeek","DeepSeek balance is exhausted.");if(!e.ok)return E();let g=await e.json().catch(()=>null);if(!g||"object"!=typeof g)return E();let i={};for(let a of Array.isArray(g.balance_infos)?g.balance_infos:[]){if(!a||"object"!=typeof a)continue;let b="string"==typeof a.currency?a.currency.trim().toUpperCase():"";if(!b)continue;let c=Math.max(0,f(a.total_balance??a.totalBalance));i[`Balance (${b})`]={used:0,total:c,remaining:c,remainingPercentage:100*(c>0),resetAt:null,unlimited:!1,unit:b,grantedBalance:Math.max(0,f(a.granted_balance??a.grantedBalance)),toppedUpBalance:Math.max(0,f(a.topped_up_balance??a.toppedUpBalance))}}if(0===Object.keys(i).length)return{plan:"DeepSeek",quotas:i,authoritative:!0,message:"DeepSeek connected. No balance data returned."};let j=!0===g.is_available||!0===g.isAvailable;return{plan:j?"DeepSeek":"DeepSeek (Insufficient Balance)",quotas:i,authoritative:!0,limitReached:!j}},{parentSignal:b?.signal})}catch{return E()}}function G(a){let b=a?.apiKey||a?.accessToken;return"string"==typeof b?b.trim():""}function H(a){return{message:`${a} API key not available. Add a key to view usage.`}}function I(a){return{authError:!0,accountDead:!0,message:`${a} authentication failed. Check the API key.`}}function J(a,b,c={}){let d=Math.max(0,f(b)),e=Math.max(0,f(a)),g=Math.max(0,d-e);return{used:e,total:d,remaining:g,remainingPercentage:d>0?g/d*100:0,resetAt:null,unlimited:!1,...c}}async function K(a){return a.json().catch(()=>null)}async function L(a,b=null){let c=G(a);return c?j(async a=>{let e=await (0,d.proxyAwareFetch)("https://openrouter.ai/api/v1/key",{method:"GET",headers:{Authorization:`Bearer ${c}`,Accept:"application/json"},signal:a},b);if(401===e.status||403===e.status)return I("OpenRouter");if(!e.ok)return{quotaFetchFailed:!0,message:`OpenRouter key API error (${e.status}).`};let g=await K(e),h=g?.data;if(!h||"object"!=typeof h)return{quotaFetchFailed:!0,message:"OpenRouter key response was not usable."};let i=f(h.usage),j=null==h.limit?null:f(h.limit),k={};if(null==j)k["Spend (USD)"]={used:i,total:i,remaining:null,unlimited:!0,unit:"USD"};else{let a=null==h.limit_remaining?Math.max(0,j-i):f(h.limit_remaining);k["Credit (USD)"]={used:i,total:j,remaining:a,remainingPercentage:j>0?a/j*100:0,resetAt:null,unlimited:!1,unit:"USD"}}return null!=h.usage_daily&&(k["Spend today (USD)"]=J(h.usage_daily,h.usage_daily,{unlimited:!0,unit:"USD"})),null!=h.usage_monthly&&(k["Spend this month (USD)"]=J(h.usage_monthly,h.usage_monthly,{unlimited:!0,unit:"USD"})),{plan:h.is_free_tier?"OpenRouter free":"OpenRouter",quotas:k,authoritative:null!=j,message:h.label?`OpenRouter key ${h.label}`:"OpenRouter key usage."}}):H("OpenRouter")}async function M(a,b=null){let c=G(a);if(!c)return H("OpenAI");let e=Math.floor(Date.now()/1e3)-86400,g=`https://api.openai.com/v1/organization/costs?start_time=${e}&bucket_width=1d&limit=1`;return j(async a=>{let e=await (0,d.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${c}`,Accept:"application/json"},signal:a},b);if(401===e.status||403===e.status)return{message:"OpenAI usage needs an admin key. This key can still chat; organization costs are not readable."};if(!e.ok)return{quotaFetchFailed:!0,message:`OpenAI costs API error (${e.status}).`};let h=await K(e),i=h?.data?.[0]?.results;if(!Array.isArray(i))return{message:"OpenAI connected. Cost response had no buckets."};let j=0;for(let a of i)j+=f(a?.amount?.value);return{plan:"OpenAI",quotas:{"Spend (24h, USD)":J(j,j,{unlimited:!0,unit:"USD"})},message:`OpenAI organization spend over the last 24h: $${j.toFixed(4)}.`}})}async function N(a,b=null){let c=G(a);if(!c)return H("Anthropic");let e=a?.providerSpecificData?.organizationId||a?.providerSpecificData?.orgId||a?.organizationId;if(!e)return{message:"Anthropic admin usage needs an organization id on the connection. Chat still works."};let g=new Date,h=new Date(g.getTime()-864e5),i=`https://api.anthropic.com/v1/organizations/${encodeURIComponent(e)}/usage?starting_at=${encodeURIComponent(h.toISOString())}&ending_at=${encodeURIComponent(g.toISOString())}&bucket_width=1d`;return j(async a=>{let e=await (0,d.proxyAwareFetch)(i,{method:"GET",headers:{"x-api-key":c,"anthropic-version":"2023-06-01",Accept:"application/json"},signal:a},b);if(401===e.status||403===e.status)return{message:"Anthropic usage API rejected this key. An admin key is required."};if(!e.ok)return{quotaFetchFailed:!0,message:`Anthropic usage API error (${e.status}).`};let g=await K(e),h=Array.isArray(g?.data)?g.data:[],j=0,k=0;for(let a of h)for(let b of a.results||[])j+=f(b.uncached_input_tokens)+f(b.cache_read_input_tokens),k+=f(b.output_tokens);return{plan:"Anthropic",quotas:{"Input tokens (24h)":J(j,j,{unlimited:!0,unit:"tokens"}),"Output tokens (24h)":J(k,k,{unlimited:!0,unit:"tokens"})},message:"Anthropic organization usage for the last 24h."}})}function O(a,b){let c=a.get(`x-ratelimit-limit-${b}`),d=a.get(`x-ratelimit-remaining-${b}`);if(null===c||null===d)return null;let e=Number(c),f=Number(d);if(!Number.isFinite(e)||!Number.isFinite(f))return null;let g=function(a){if("string"!=typeof a||!a.trim())return null;let b=a.matchAll(/(\d+(?:\.\d+)?)(ms|s|m|h)/g),c=0,d=!1;for(let a of b){d=!0;let b=Number(a[1]),e=a[2];c+=b*("h"===e?36e5:"m"===e?6e4:"ms"===e?1:1e3)}return d?c:null}(a.get(`x-ratelimit-reset-${b}`));return{used:Math.max(0,e-f),total:e,resetAt:null===g?null:new Date(Date.now()+g).toISOString(),unlimited:!1}}async function P(a,b=null){let c=G(a);return c?j(async a=>{let e=await (0,d.proxyAwareFetch)("https://api.groq.com/openai/v1/models",{method:"GET",headers:{Authorization:`Bearer ${c}`,Accept:"application/json"},signal:a},b);if(401===e.status||403===e.status)return I("Groq");if(!e.ok){let a=await e.text().catch(()=>"");return{plan:"Groq",message:`Groq usage API error (${e.status})${a?`: ${a.slice(0,120)}`:""}`}}await e.text().catch(()=>{});let f=O(e.headers,"requests"),g=O(e.headers,"tokens");return f||g?{plan:"Groq",quotas:{...f?{Requests:f}:{},...g?{Tokens:g}:{}}}:{plan:"Groq",message:"Groq connected. No rate-limit data reported for this key yet.",quotas:{}}}):H("Groq")}async function Q(a,b=null){let c=G(a);return c?j(async a=>{let e=await (0,d.proxyAwareFetch)("https://api.mistral.ai/v1/models",{method:"GET",headers:{Authorization:`Bearer ${c}`,Accept:"application/json"},signal:a},b);return 401===e.status||403===e.status?I("Mistral"):e.ok?{message:"Mistral key is valid. Mistral does not publish a key usage API; spend is tracked per request."}:{quotaFetchFailed:!0,message:`Mistral models API error (${e.status}).`}}):H("Mistral")}async function R(a,b=null){let c=G(a);return c?j(async a=>{let e=await (0,d.proxyAwareFetch)("https://api.together.xyz/v1/models",{method:"GET",headers:{Authorization:`Bearer ${c}`,Accept:"application/json"},signal:a},b);return 401===e.status||403===e.status?I("Together"):e.ok?{message:"Together key is valid. Together does not publish a key balance API; spend is tracked per request."}:{quotaFetchFailed:!0,message:`Together models API error (${e.status}).`}}):H("Together")}async function S(a,b=null){let c=G(a);return c?j(async a=>{let e=await (0,d.proxyAwareFetch)(`https://generativelanguage.googleapis.com/v1beta/models?key=${encodeURIComponent(c)}`,{method:"GET",headers:{Accept:"application/json"},signal:a},b);return 400===e.status||401===e.status||403===e.status?I("Gemini"):e.ok?{message:"Gemini API key is valid. Google does not expose AI Studio quota on this key; use Gemini CLI for project quota."}:{quotaFetchFailed:!0,message:`Gemini models API error (${e.status}).`}}):H("Gemini")}var T=c(30022),U=c(21031);function V(a,b,{neverExpires:c=!1,detailUrl:d=null}={}){let e=Math.max(0,Number(a?.total)||0),f=Math.max(0,Number(a?.used)||0),g=Math.max(0,Number(a?.remaining)||0);return{total:e,used:f,remaining:g,remainingPercentage:e>0?Math.min(100,g/e*100):0,unit:a?.unit||"credits",resetAt:b,neverExpires:c,...d?{detailUrl:d}:{},unlimited:!1}}function W(){return{quotaFetchFailed:!0,message:"Qoder usage temporarily unavailable."}}async function X(a,b=null){try{return await j(async c=>{var e;let f,g=(0,T.ty)(a?.provider);try{f=await (0,U.iC)(a,{proxyOptions:b,signal:c,region:g})}catch(a){if(a?.status===401||a?.status===403)return{authError:!0,accountDead:!0,message:"Qoder PAT was rejected. Add a valid Personal Access Token."};throw a}if(!f?.accessToken)return{message:"Qoder usage unavailable: no access token"};let h=await (0,d.proxyAwareFetch)((0,T.ML)(g)||T.x_,{method:"GET",headers:{Authorization:`Bearer ${f.accessToken}`,Accept:"application/json"},signal:c},b);if(401===h.status||403===h.status)return{authError:!0,accountDead:!0,message:"Qoder authentication expired. Reconnect this account."};if(!h.ok)return W();let i=await h.json().catch(()=>null);if(!i||"object"!=typeof i)return W();let j=Number(i.expiresAt),k=2534022144e5===j,l=Number.isFinite(j)&&j>0&&!k?new Date(j).toISOString():null,m={user:V(i.userQuota,l,{neverExpires:k})};return Number(i.orgResourcePackage?.total)>0&&(m.organization=V(i.orgResourcePackage,l,{neverExpires:k})),Number(i.addOnQuota?.total)>0&&(m.addOn=V(i.addOnQuota,null,{neverExpires:!1,detailUrl:"string"==typeof(e=i.addOnQuota.detailUrl)&&e.startsWith("https://")?e:null})),{quotas:m,totalUsagePercentage:Number(i.totalUsagePercentage)||0,isQuotaExceeded:!0===i.isQuotaExceeded,limitReached:!0===i.isQuotaExceeded,expiresAt:Number.isFinite(j)?j:null,authoritative:!0}},{parentSignal:b?.signal})}catch(a){return W()}}let Y={rolling:"Rolling",weekly:"Weekly",monthly:"Monthly"};async function Z(a,b,{url:c,plan:e,missingKey:f,authFailed:h,billingRequired:i,forbidden:j,httpError:k,empty:l}){if("string"!=typeof a||!a.trim())return{message:f};try{let f=await (0,d.proxyAwareFetch)(c,{method:"GET",headers:{Authorization:`Bearer ${a.trim()}`,Accept:"application/json"}},b);if(401===f.status)return{plan:e,message:h};if(403===f.status){let a=await f.json().catch(()=>null);return{plan:e,message:a?.error?.type==="EntitlementError"?i:j}}if(!f.ok)return{plan:e,message:k(f.status)};let m=await f.json().catch(()=>null),n={};for(let[a,b]of Object.entries(Y)){let c=m?.usage?.[a],d=function(a){let b="string"==typeof a&&a.trim()?Number(a):a;return Number.isFinite(b)?Math.max(0,Math.min(100,b)):null}(c?.percent);null!==d&&(n[b]={used:d,total:100,remaining:100-d,remainingPercentage:100-d,resetAt:g(c.resetsAt),unlimited:!1})}if(0===Object.keys(n).length)return{plan:e,message:l};return{plan:e,quotas:n}}catch(a){return{message:`${e} error: ${a.message}`}}}function $(a){let b="string"==typeof a&&a.trim()?Number(a):a;return Number.isFinite(b)&&b>=0?b:null}async function _(a=null,b=null){if("string"!=typeof a||!a.trim())return{message:"Vercel AI Gateway API key not available."};try{let c=await (0,d.proxyAwareFetch)("https://ai-gateway.vercel.sh/v1/credits",{method:"GET",headers:{Authorization:`Bearer ${a.trim()}`,Accept:"application/json"}},b);if(401===c.status||403===c.status)return{message:"Vercel AI Gateway API key invalid or expired."};if(!c.ok)return{message:`Vercel AI Gateway credits API error (${c.status}).`};let e=await c.json().catch(()=>null),f=$(e?.balance),g=$(e?.total_used);if(null===f&&null===g)return{plan:"Pay-as-you-go",message:"Vercel AI Gateway credits response did not contain a balance.",quotas:{}};let h={};return null!==g&&(h["Used (USD)"]={used:g,total:0,remaining:0,remainingPercentage:100,unlimited:!0}),null!==f&&(h["Balance (USD)"]={used:0,total:f,remaining:f,remainingPercentage:100,unlimited:!0}),{plan:"Pay-as-you-go",quotas:h}}catch(a){return{message:`Vercel AI Gateway error: ${a.message}`}}}function aa(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}}let ab={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 ac(a,b={},c=null,e="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"===e?"www.codebuddy.cn":"www.codebuddy.ai");try{let b=await (0,d.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 e=await b.json(),f=e?.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 ad(a,b={},c=null,e=null,f="codebuddy"){let g=b?.authMode==="generated-api-key",h=a||e,i=a?"oauth":e?"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,j,{uid:k,enterpriseId:l}=await ac(h,b,c,f),m=await (0,d.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,k,l,e),body:JSON.stringify((a=new Date,(j=new Date(a)).setFullYear(j.getFullYear()+101),{PageNumber:1,PageSize:200,ProductCode:"p_tcaca",Status:[0,3],PackageEndTimeRangeBegin:ae(a),PackageEndTimeRangeEnd:ae(j)}))},c),n=await m.text(),o=null;try{o=n?JSON.parse(n):null}catch{o=null}if(401===m.status||403===m.status){if("oauth"===i)return{plan:"CodeBuddy",message:`CodeBuddy IDE OAuth token was rejected (${m.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(!m.ok){let a=408===m.status||425===m.status||429===m.status||m.status>=500;return{plan:"CodeBuddy",message:`CodeBuddy quota endpoint returned ${m.status}.`,quotas:{},...a?{quotaFetchFailed:!0}:{}}}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=aa(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={},j=!1,k=(a,b,{recurring:c})=>{var d,e;let f=function(a,{useCycle:b=!0}={}){let c=function(a,b,c){return c?a||b:a&&b?a.precision!==b.precision?a.precision>b.precision?a:b:Math.abs(a.values.total-b.values.total)>=1e-9||Math.abs(a.values.used-b.values.used)>=1e-9||Math.abs(a.values.remaining-b.values.remaining)>=1e-9?a:b:b||a}(af(a,"Cycle"),af(a,""),b);return c?{...c.values,resetAt:aa(a.CycleEndTime||a.DeductionEndTime||a.ExpiredTime)}:null}(b,{useCycle:c});f&&((b.PackageCode===ab.proMon||b.PackageCode===ab.proYear)&&(j=!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)k("Monthly Credits",a,{recurring:!0});for(let a of h)k("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 ab.free:case ab.freeMon:case ab.proMon:case ab.proYear:return"Monthly Credits";case ab.gift:return"Gift Credits";case ab.extra:return"Extra Credits";case ab.activity:return"Activity Credits";default:return a?"Other Credits":null}}(a.PackageCode)||"Other Credits",c="Activity Credits"!==b&&"Gift Credits"!==b;k(c?"Monthly Credits":"Bonus Credits",a,{recurring:c})}if(0===Object.keys(i).length)return{plan:j?"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:j?"Pro":"Free",quotas:i}}(o),authMode:i}}catch(a){return{plan:"CodeBuddy",message:`CodeBuddy connected. Unable to fetch quota: ${a.message}`,quotas:{},quotaFetchFailed:!0}}}function ae(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 af(a,b){let c=ag(a[`${b}CapacitySizePrecise`]),d=c??ag(a[`${b}CapacitySize`]),e=ag(a[`${b}CapacityUsedPrecise`]),f=ag(a[`${b}CapacityRemainPrecise`]),g=e??(null===f?ag(a[`${b}CapacityUsed`]):null),h=f??ag(a[`${b}CapacityRemain`]);if(null===d||null===g&&null===h)return null;let i=Math.max(0,d),j=null!==g?Math.min(i,Math.max(0,g)):Math.max(0,i-Math.min(i,Math.max(0,h))),k=Math.max(0,i-j),l=null===h?null:Math.min(i,Math.max(0,h)),m=null!==l&&1e-9>Math.abs(j+l-i)?l:k;return{values:{total:i,used:j,remaining:m},precision:+(null!==c)+2*(null!==e||null!==f)}}function ag(...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 ah(a,b,c=null){try{if(!a)throw Error("No GitHub access token available. Please re-authorize the connection.");let b=await (0,d.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 e=await b.json();if(e.quota_snapshots){let a=e.quota_snapshots,b=aa(e.quota_reset_date);return{plan:e.copilot_plan,resetDate:e.quota_reset_date,quotas:{chat:{...ai(a.chat),resetAt:b},completions:{...ai(a.completions),resetAt:b},premium_interactions:{...ai(a.premium_interactions),resetAt:b}}}}if(e.monthly_quotas||e.limited_user_quotas){let a=e.monthly_quotas||{},b=e.limited_user_quotas||{},c=aa(e.limited_user_reset_date);return{plan:e.copilot_plan||e.access_type_sku,resetDate:e.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 ai(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 aj(a,b,c=null){if(!a)return{plan:"Free",message:"Gemini CLI access token not available."};try{let e,f=ak(b?.projectId),g="Free";if(!f){let b=await al(a,c);f=ak(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{e=await (0,d.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(!e.ok)return{plan:g,message:`Gemini CLI quota error (${e.status}).`};let j=await e.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:aa(a.resetTime),remainingPercentage:100*b,unlimited:!1}}return{plan:g,quotas:k}}catch(a){return{message:`Gemini CLI error: ${a.message}`}}}function ak(a){return"string"==typeof a?a.trim()||null:a&&"object"==typeof a&&"string"==typeof a.id&&a.id.trim()||null}async function al(a,b=null){let c=new AbortController,e=setTimeout(()=>c.abort(),1e4);try{let e=await (0,d.proxyAwareFetch)("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:z.Cn}),signal:c.signal},b);if(!e.ok)return null;return await e.json()}catch{return null}finally{clearTimeout(e)}}var am=c(77598);let an="2.24.0",ao=`antigravity/hub/${an} darwin/arm64`,ap=new Map,aq=[{pattern:/gemini/i,weekly:{key:"gemini_weekly",displayName:"Gemini (Weekly)"},session:{key:"gemini_session",displayName:"Gemini (5h)"}},{pattern:/claude|gpt/i,weekly:{key:"claude_gpt_weekly",displayName:"Claude & GPT (Weekly)"},session:{key:"claude_gpt_session",displayName:"Claude & GPT (5h)"}}];function ar(a){return(0,am.createHash)("sha256").update(a).digest("hex")}async function as(a,b,c,d,e){let f=new AbortController,g=setTimeout(()=>f.abort(),1e4);try{return await e(a,{method:"POST",headers:{Authorization:`Bearer ${b}`,"User-Agent":ao,"Content-Type":"application/json","X-Client-Name":"antigravity","X-Client-Version":an,"x-request-source":"local"},body:JSON.stringify(c?{project:c}:{}),signal:f.signal},d)}finally{clearTimeout(g)}}async function at(a,b,c=null,{fetchImpl:e=d.proxyAwareFetch,now:f=Date.now,digestImpl:g=ar}={}){let h;try{h=g(`${a}\0${b||""}`);let c=ap.get(h);if(c instanceof Promise)return c;if(c&&c.expiresAt>f())return c.result;c&&ap.delete(h)}catch{return{}}let i=(async()=>{try{let d=await as("https://daily-cloudcode-pa.googleapis.com/v1internal:retrieveUserQuotaSummary",a,b,c,e);if(!d?.ok)return ap.delete(h),{};let g=function(a){if(!a||"object"!=typeof a)return{};let b=Array.isArray(a.groups)?a.groups:Array.isArray(a.quotaSummary?.groups)?a.quotaSummary.groups:null;if(!b)return{};let c={};for(let a of b){if(!a||"object"!=typeof a)continue;let b=aq.find(b=>b.pattern.test([a?.displayName,a?.name,a?.id].filter(a=>"string"==typeof a).join(" ")));if(b)for(let d of Array.isArray(a.buckets)?a.buckets:[]){if(!d||"object"!=typeof d)continue;let a=function(a){let b=String(a?.window||"").toLowerCase(),c=String(a?.period||"").toLowerCase(),d=String(a?.duration||"").toLowerCase(),e=`${a?.bucketId||""} ${a?.displayName||""}`.toLowerCase();return"weekly"===b||"weekly"===c||"p7d"===d||e.includes("weekly")?"weekly":"5h"===b||"daily"===b||"daily"===c||"pt5h"===d||e.includes("five hour")||e.includes("5h")||e.includes("daily")?"session":null}(d);if(!a||!0===d.disabled&&"weekly"===a)continue;let e=!0===d.disabled?0:Number(d.remainingFraction);if(!Number.isFinite(e))continue;let f="weekly"===a?b.weekly:b.session;if(c[f.key])continue;let g=Math.min(1,Math.max(0,e)),h=Math.round(1e3*g);c[f.key]={used:Math.max(0,1e3-h),total:1e3,resetAt:function(a){if(null==a||""===a)return null;let b="number"==typeof a&&a<1e12?1e3*a:a,c="number"==typeof b?b:Date.parse(b);return Number.isFinite(c)?new Date(c).toISOString():null}(d.resetTime),remainingPercentage:100*g,unlimited:!1,displayName:f.displayName,quotaSource:"retrieveUserQuotaSummary",routingAuthoritative:!1}}}return c}(await d.json());if(0===Object.keys(g).length)return ap.delete(h),{};return ap.set(h,{result:g,expiresAt:f()+18e4}),g}catch{return ap.delete(h),{}}})();return ap.set(h,i),i}let au={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,z.A9)(),quotaUserAgent:(0,z.P0)()},av=["gemini-4-argon-high","gemini-4-argon-medium","gemini-4-argon-low","gemini-4-carbon-high","gemini-4-carbon-medium","gemini-4-carbon-low","gemini-4-hydrogen-xhigh","gemini-4-hydrogen-high","gemini-4-hydrogen-medium","gemini-4-hydrogen-low","gemini-3.8-flash-high","gemini-3.8-flash-medium","gemini-3.8-flash-low","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3-flash","claude-sonnet-5-5-high","claude-sonnet-5-5-medium","claude-sonnet-5-5-low","claude-sonnet-5-5","claude-opus-5-5-high","claude-opus-5-5-medium","claude-opus-5-5-low","claude-opus-5-5","gemini-3.1-flash-image"];async function aw(a,b,c,e){let f=null;for(let g of au.quotaApiHosts){let h=new AbortController,i=setTimeout(()=>h.abort(),1e4);try{let i=await (0,d.proxyAwareFetch)(`${g}${a}`,{method:"POST",headers:{Authorization:`Bearer ${b}`,"User-Agent":au.quotaUserAgent,"Content-Type":"application/json","x-request-source":"local"},body:JSON.stringify(c||{}),signal:h.signal},e);if(i.ok||401===i.status||403===i.status)return{response:i,host:g};f=Error(`Antigravity API error: ${i.status}`)}catch(a){f=a}finally{clearTimeout(i)}}if(f)throw f;throw Error("Antigravity API unavailable")}async function ax(a,b,c=null){try{let d,e=ak(b?.projectId),f=await az(a,c),g=ak(f?.cloudaicompanionProject)||e,h=String(f?.paidTier?.id||"").toLowerCase(),i=!h||"free-tier"===h,j=async(b,d={})=>{let e={...await at(a,g,c)};!function(a,b={}){let c=Object.entries(b||{});for(let[b,d]of[["gemini_session",c.filter(([a])=>a.startsWith("gemini-")&&!a.includes("image"))],["claude_gpt_session",c.filter(([a])=>a.startsWith("claude-"))]]){let c=a[b];if(!c||0===d.length||!d.every(([,a])=>(a.remainingPercentage??0)===0)||!(c.remainingPercentage>0))continue;let e=d.reduce((a,[,b])=>!a||b.resetAt&&new Date(b.resetAt)>new Date(a)?b.resetAt:a,null);a[b]={...c,used:c.total,remainingPercentage:0,...e?{resetAt:e}:{}}}}(e,d);let f=Object.keys(e).length>0;return{...b,quotas:i&&f?e:{...d,...e}}};try{d=await aw(au.fetchAvailableModelsPath,a,g?{project:g}:{},c)}catch(a){return await j({message:`Antigravity quota unavailable: ${a.message}. Chat may still work.`})}let k=d.response;if(401===k.status){let a=await ay(b,c);if(a)return{accountDead:!0,message:`Antigravity account ${a}. Reconnect won't help — recreate the account.`,quotas:{}};return await j({message:"Antigravity quota API authentication expired. Chat may still work."})}if(403===k.status)return await j({message:"Antigravity quota API access forbidden (tier may not expose quota). Chat may still work."});if(!k.ok)throw Error(`Antigravity API error: ${k.status}`);let l=await k.json(),m=new Map;try{let b=await aw(au.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&&m.set(a,b)}}}catch{}let n={};if(l.models)for(let[a,b]of Object.entries(l.models)){if(b.isInternal||!av.includes(a))continue;let c=m.get(a),d=c||b.quotaInfo;if(!d)continue;let e=Number(d.remainingFraction)||0,f=100*e,g=Math.round(1e3*e),h=Math.max(0,1e3-g);n[a]={used:h,total:1e3,resetAt:aa(d.resetTime),remainingPercentage:f,unlimited:!1,displayName:b.displayName||a,quotaSource:c?"retrieveUserQuota":"fetchAvailableModels"}}let o=await j({},n);return{plan:f?.paidTier?.name||f?.currentTier?.name||"Unknown",...o,subscriptionInfo:f}}catch(a){return console.error("[Antigravity Usage] Error:",a.message,a.cause),{message:`Antigravity error: ${a.message}`}}}async function ay(a,b=null){let c=a?.refreshToken;if(!c)return null;try{let a,e=new AbortController,f=setTimeout(()=>e.abort(),1e4);try{a=await (0,d.proxyAwareFetch)(au.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:au.clientId,client_secret:au.clientSecret,refresh_token:c,grant_type:"refresh_token"}),signal:e.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 az(a,b=null){let c=new AbortController,e=setTimeout(()=>c.abort(),1e4);try{let e=await (0,d.proxyAwareFetch)(au.loadProjectApiUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":au.userAgent,"Content-Type":"application/json","x-request-source":"local"},body:JSON.stringify({metadata:z.Cn,mode:1}),signal:c.signal},b);if(!e.ok)return null;return await e.json()}catch(a){return console.error("[Antigravity Subscription] Error:",a.message),null}finally{clearTimeout(e)}}let aA="2023-06-01",aB="claude-cli/2.1.92 (external, cli)";async function aC(a,b=null){try{let c=await (0,d.proxyAwareFetch)("https://api.anthropic.com/api/oauth/usage?cedar_ember=1",{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":aA,"User-Agent":aB}},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:aa(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)}if(Array.isArray(a.limits))for(let c of a.limits){if(c?.kind!=="weekly_scoped")continue;let a=String(c?.scope?.model?.display_name||"").trim().toLowerCase();a&&"number"==typeof c.percent&&(b[`weekly ${a} (7d)`]=e({utilization:Math.max(0,Math.min(100,c.percent)),resets_at:c.resets_at}))}return{plan:"Claude Code",extraUsage:a.extra_usage??null,resetCredits:function(a){if(!a?.eligible||!Array.isArray(a.grants))return null;let b=a.grants.filter(a=>a?.id&&!a.paused&&Number(a.resets_left)>0),c=b.find(b=>b.id===a.next_grant_id)||b[0]||null;return{availableCount:b.reduce((a,b)=>a+Number(b.resets_left),0),nextGrantId:c?.id||null,expiresAt:c?.ends_at||null,clears:c?.clears||[],cooldownUntil:a.cooldown_until||null,weeklyResetsAt:a.weekly_resets_at||null,grants:a.grants.filter(a=>a?.id).map(a=>({id:a.id,label:a.label||"",resetsLeft:Number(a.resets_left)||0,resetsTotal:Number(a.resets_total)||0,startsAt:a.starts_at||null,endsAt:a.ends_at||null,clears:Array.isArray(a.clears)?a.clears:[],paused:!0===a.paused,usableNow:!0===a.usable_now,useRequiresLimit:!1!==a.use_requires_limit}))}}(a.cedar_ember),quotas:b}}return console.warn(`[Claude Usage] OAuth endpoint returned ${c.status}, falling back to legacy`),await aE(a,b)}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}async function aD(a,b,c=null){if(!a)throw Error("No Claude access token available. Please re-authorize the connection.");if(!/^[a-z0-9_-]{1,40}$/.test(b||""))throw Error("Invalid reset grant id.");let e={Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":aA,"User-Agent":aB,"Content-Type":"application/json"},f=await (0,d.proxyAwareFetch)("https://api.anthropic.com/api/oauth/profile",{method:"GET",headers:e},c),g=await f.json().catch(()=>null),h=g?.organization?.uuid;if(!f.ok||!h)throw Error(`Cannot resolve Claude organization (${f.status}).`);let i=await (0,d.proxyAwareFetch)("https://api.anthropic.com/api/organizations/{org_id}/reset_rate_limits".replace("{org_id}",h),{method:"POST",headers:e,body:JSON.stringify({program:"cedar_ember",grant_id:b,request_id:crypto.randomUUID()})},c),j=await i.json().catch(()=>null);return{ok:i.ok&&j?.result==="reset",status:i.status,result:j?.result||null,reason:j?.reason||null,resetsLeft:j?.resets_left??null,message:j?.error?.message||null}}async function aE(a,b=null){try{let c=await (0,d.proxyAwareFetch)("https://api.anthropic.com/v1/settings",{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":aA}},b);if(c.ok){let e=await c.json();if(e.organization_id){let c=await (0,d.proxyAwareFetch)("https://api.anthropic.com/v1/organizations/{org_id}/usage".replace("{org_id}",e.organization_id),{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":aA}},b);if(c.ok){let a=await c.json();return{plan:e.plan||"Unknown",organization:e.organization_name,quotas:a}}}return{plan:e.plan||"Unknown",organization:e.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 aF(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 aG(a){if(!a)return null;let b=a instanceof Date?a:new Date("number"==typeof a&&a<1e12?1e3*a:a);return Number.isFinite(b.getTime())?b.toISOString():null}function aH(a){return!a||"object"!=typeof a||Array.isArray(a)?null:a.rate_limit&&"object"==typeof a.rate_limit?a.rate_limit:a}function aI(a,b){let c=aF(a?.limit_window_seconds??a?.limitWindowSeconds??a?.window_seconds??a?.windowSeconds,null);return null===c||c<=0?b:c<=86400?"session":c<=1209600?"weekly":c<=3888e3?"monthly":b}function aJ(a){let b=Math.max(0,Math.min(100,aF(a?.used_percent??a?.percent_used,0)));return{used:b,total:100,remaining:Math.max(0,100-b),resetAt:aa(a?.reset_at??a?.resets_at??a?.resetAt??null),unlimited:!1}}function aK(a,b,c){let d=aH(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;if(e){let c=aI(e,"session");a[b?`${b}_${c}`:c]=aJ(e),g=!0}if(f){let c=aI(f,"weekly");a[b?`${b}_${c}`:c]=aJ(f),g=!0}return g}async function aL(a,b=null){try{let c=await (0,d.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 e=await c.json(),f=e.rate_limit||e.rate_limits||e.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}(e),h=Math.max(0,aF(e.rate_limit_reset_credits?.available_count,0)),i={};return aK(i,"",f),aK(i,"review",g),{plan:e.plan_type||e.summary?.plan||"unknown",limitReached:aH(f)?.limit_reached||!1,reviewLimitReached:aH(g)?.limit_reached||!1,resetCredits:{availableCount:h},quotas:i}}catch(a){throw Error(`Failed to fetch Codex usage: ${a.message}`)}}async function aM(a,b=null,c=null){if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");let e={Authorization:`Bearer ${a}`,Accept:"application/json","OpenAI-Beta":"codex-1",originator:"codex_cli_rs"},f=c?.workspaceId||c?.accountId||c?.chatgptAccountId||null;f&&(e["ChatGPT-Account-ID"]=f);let g=await (0,d.proxyAwareFetch)("https://chatgpt.com/backend-api/wham/rate-limit-reset-credits",{method:"GET",headers:e},b),h=await g.json().catch(()=>null);if(!g.ok)throw Error(h?.message||h?.error||h?.detail||`Codex reset credits API unavailable (${g.status}).`);let i=Array.isArray(h?.credits)?h.credits:[];return{availableCount:Math.max(0,aF(h?.available_count??h?.availableCount,0)),credits:i.map(a=>({status:String(a?.status||"unknown"),grantedAt:aG(a?.granted_at??a?.grantedAt),expiresAt:aG(a?.expires_at??a?.expiresAt)}))}}async function aN(a,b,c=null){let e;if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");if(!b||"string"!=typeof b)throw Error("A redeem request id is required to consume a Codex reset credit.");let f=null;try{e=await (0,d.proxyAwareFetch)("https://chatgpt.com/backend-api/wham/rate-limit-reset-credits/consume",{method:"POST",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({redeem_request_id:b})},c);let g=await e.text();f=g?JSON.parse(g):null}catch(a){throw Error(`Failed to consume Codex reset credit: ${a.message}`)}let g=f?.code||null,h=aF(f?.windows_reset,0);return{ok:e.ok&&("reset"===g||h>0),noCredit:e.ok&&"no_credit"===g,status:e.status,code:g,windowsReset:h,message:f?.message||null,raw:f}}async function aO(a,b,c=null){let e=b?.authMethod||"builder-id",f="api_key"===e,g={...f?{tokentype:"API_KEY"}:{},..."external_idp"===e?{TokenType:"EXTERNAL_IDP"}:{}},h=f?b?.profileArn||"":b?.profileArn||"arn:aws:codewhisperer:us-east-1:638616132270:profile/AAAACCCCXXXX",i=new URLSearchParams({isEmailRequired:"true",origin:"AI_EDITOR",resourceType:"AGENTIC_REQUEST"}),j=!1,k=[];for(let b of[{name:"codewhisperer-get",run:async()=>(0,d.proxyAwareFetch)(`https://codewhisperer.us-east-1.amazonaws.com/getUsageLimits?${i.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",...g}},c)},{name:"codewhisperer-post",run:async()=>(0,d.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",...g},body:JSON.stringify({origin:"AI_EDITOR",...h?{profileArn:h}:{},resourceType:"AGENTIC_REQUEST"})},c)},{name:"q-get",run:async()=>{let b=new URLSearchParams({origin:"AI_EDITOR",...h?{profileArn:h}:{},resourceType:"AGENTIC_REQUEST"});return(0,d.proxyAwareFetch)(`https://q.us-east-1.amazonaws.com/getUsageLimits?${b}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json",...g}},c)}}])try{let a=await b.run();if(!a.ok){let c=await a.text().catch(()=>"");(401===a.status||403===a.status)&&(j=!0),k.push(`${b.name}:${a.status}${c?`:${c}`:""}`);continue}let c=await a.json();return function(a){let b=a.usageBreakdownList||[],c={},d=aa(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:aa(a.freeTrialInfo.freeTrialExpiry||d),unlimited:!1}}}),{plan:a.subscriptionInfo?.subscriptionTitle||"Kiro",quotas:c}}(c)}catch(a){k.push(`${b.name}:${a.message}`)}return j&&"idc"===e?{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:{}}:j&&("google"===e||"github"===e)?{message:"Kiro quota API authentication expired. Chat may still work.",quotas:{}}:j?{message:"Kiro quota API rejected the current token. Chat may still work.",quotas:{}}:{message:k.length>0?`Unable to fetch Kiro usage right now. (${k[k.length-1]})`:"Unable to fetch Kiro usage right now.",quotas:{}}}async function aP(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 aQ(a){try{return{message:"iFlow connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch iFlow usage."}}}let aR={international:"https://api.z.ai/api/monitor/usage/quota/limit",china:"https://open.bigmodel.cn/api/monitor/usage/quota/limit"};async function aS(a,b,c=null){if(!a)return{message:"GLM API key not available."};let e=aR["glm-cn"===b?"china":"international"];try{let b=await (0,d.proxyAwareFetch)(e,{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&&"CREDIT_LIMIT"!==a.type)continue;let b=Number(a.percentage)||0,c=Number(a.nextResetTime)||0,d=Math.max(0,100-b);i[3===a.unit?`Session (${a.number}h)`:6===a.unit?"Weekly (7d)":"TOKENS_LIMIT"===a.type?"Tokens":`Limit (${a.number})`]={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}`}}}let aT={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"]};function aU(a,b,c){return a&&"object"==typeof a?a[b]??a[c]??null:null}function aV(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 aW(a){return Math.max(0,Number(aU(a,"current_interval_total_count","currentIntervalTotalCount"))||0)}function aX(a){return Math.max(0,Number(aU(a,"current_weekly_total_count","currentWeeklyTotalCount"))||0)}function aY(a){return!!(aW(a)>0||aX(a)>0)||null!==aV(a,"current_interval_remaining_percent","currentIntervalRemainingPercent")||null!==aV(a,"current_weekly_remaining_percent","currentWeeklyRemainingPercent")}function aZ(a,b,c,d,e,f,g,h,i,j){let k=d(c),l=aV(c,g,h);if(k<=0&&null===l)return;let m=Math.max(0,Number(aU(c,e,f))||0),n=k,o=m;k<=0&&(n=100,o=j?Math.round(l/100*n):Math.round(n*(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}}(n,o,function(a,b,c,d,e,f){let g=Number(aU(a,c,d))||0;return g>0?new Date(b+g).toISOString():aa(aU(a,e,f))}(c,...i),j,l)}async function a$(a,b,c=null){if(!a)return{message:"MiniMax API key not available."};let e=aT[b]||[],f="";for(let b=0;b<e.length;b+=1){let g=e[b],h=b<e.length-1;try{let b=await (0,d.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"}},c),e=await b.text(),i={};if(e)try{i=JSON.parse(e)}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} ${e}`.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(aY);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(aU(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);aZ(s,`${b} (5h)`,a,aW,"current_interval_usage_count","currentIntervalUsageCount","current_interval_remaining_percent","currentIntervalRemainingPercent",[q,"remains_time","remainsTime","end_time","endTime"],r),aZ(s,`${b} (7d)`,a,aX,"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 a_(a,b=null,e=null){if(!a)return{message:"AutoClaw usage unavailable: no access token"};try{let{AUTOCLAW_WALLET_ENDPOINT:f,buildAutoClawWalletHeaders:g}=await c.e(2693).then(c.bind(c,42693)),h=await (0,d.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(e?.id){let{getQuotaSnapshot:a}=await Promise.resolve().then(c.bind(c,89718)),b=await a(e.id),d=Number(b?.usage?.quotas?.points?.total)||0,f=Number(b?.usage?.quotas?.points?.remaining);l=Math.max(d,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}`}}}async function a0(a,b=null,c=null){let e=String(a||"").trim(),f=String(b?.accountId||"").trim();if(!e)return{message:"Cloudflare API token not available."};if(!f)return{message:"Cloudflare account ID missing. Re-import or edit the connection."};try{let a=await (0,d.proxyAwareFetch)("https://api.cloudflare.com/client/v4/user/tokens/verify",{method:"GET",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}},c);if(401===a.status||403===a.status)return{message:"Cloudflare API token invalid or expired. Re-import the account."};if(!a.ok){let b=await a.text().catch(()=>"");return{message:`Cloudflare token verify failed (${a.status})${b?`: ${b.slice(0,160)}`:""}`}}let g=await a.json().catch(()=>null),h=g?.result?.status||(g?.success?"active":"unknown"),i=b?.accountName||"";try{let a=await (0,d.proxyAwareFetch)(`https://api.cloudflare.com/client/v4/accounts/${encodeURIComponent(f)}`,{method:"GET",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}},c);if(a?.ok){let b=await a.json().catch(()=>null);i=b?.result?.name||i}}catch{}let j=f.length>10?`${f.slice(0,8)}…`:f;return{plan:i?`Workers AI \xb7 ${i}`:`Workers AI \xb7 ${j}`,quotas:{"Workers AI":{used:0,total:0,remainingPercentage:100,resetAt:null,unlimited:!0}},message:h&&"active"!==h?`Token status: ${h}. Cloudflare does not publish remaining free-tier neurons via API.`:"Token valid. CF does not expose remaining free-tier neurons via API — model rate limits still apply."}}catch(a){return{message:`Cloudflare usage error: ${a.message}`}}}var a1=c(71164);let a2=Buffer.from([0,0,0,0,0]);function a3(a,b=0){if(!Buffer.isBuffer(a)||b<0||a.length-b<5)return null;let c=a[b];if(0!==c&&1!==c&&128!==c&&129!==c)return null;let d=b+5,e=a.readUInt32BE(b+1);return e>a.length-d?null:{flag:c,payloadStart:d,payloadLength:e}}function a4(a,b){let c=0n,d=0n,e=b;for(;;){if(e>=a.length)return null;let b=a[e];if(c|=BigInt(127&b)<<d,e+=1,(128&b)==0)break;if((d+=7n)>70n)return null}return{value:Number(c),next:e}}function a5(a,b,c,d){return b+c>a.length?null:{field:{wireType:d,bytes:a.subarray(b,b+c)},next:b+c}}function a6(a){let b=new Map,c=0;for(;c<a.length;){let d=function(a,b){let c=a4(a,b);if(!c)return null;let d=c.value>>>3,e=7&c.value;if(0===d)return null;if(0===e){let b=a4(a,c.next);return b?{fieldNumber:d,field:{wireType:0,value:b.value},next:b.next}:null}if(2===e){let b=function(a,b){let c=a4(a,b);if(!c)return null;let{value:d,next:e}=c;return d<0||e+d>a.length?null:{field:{wireType:2,bytes:a.subarray(e,e+d)},next:e+d}}(a,c.next);return b?{fieldNumber:d,field:b.field,next:b.next}:null}if(1===e){let b=a5(a,c.next,8,1);return b?{fieldNumber:d,field:b.field,next:b.next}:null}if(5===e){let b=a5(a,c.next,4,5);return b?{fieldNumber:d,field:b.field,next:b.next}:null}return null}(a,c);if(!d)return null;b.set(d.fieldNumber,d.field),c=d.next}return b}async function a7(a,b=null,c=d.proxyAwareFetch){if(!a)return null;try{let d=await c("https://grok.com/grok_api_v2.GrokBuildBilling/GetGrokCreditsConfig",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/grpc-web+proto","X-Grpc-Web":"1",Accept:"application/grpc-web+proto"},body:a2},b);if(!d?.ok)return null;let e=await d.arrayBuffer?.().catch(()=>null);if(!e)return null;return function(a){if(!a||!Buffer.isBuffer(a)||0===a.length)return null;try{var b;let c=null!==a3(a,0)?function(a){let b=0;for(;b<a.length;){let c=a3(a,b);if(!c)break;let d=c.payloadStart+c.payloadLength;if((128&c.flag)==0)return a.subarray(c.payloadStart,d);b=d}return null}(a):a;if(!c)return null;let d=a6(c),e=d?.get(1);if(!e||2!==e.wireType)return null;let f=a6(e.bytes);if(!f)return null;let g=(b=f.get(1))?5===b.wireType?b.bytes.readFloatLE(0):1===b.wireType?b.bytes.readDoubleLE(0):null:0;if(null===g||!Number.isFinite(g)||g<0)return null;return{percentUsed:Math.min(100,100*g),resetAt:function(a){if(!a||2!==a.wireType)return null;let b=a6(a.bytes);if(!b)return null;let c=b.get(1),d=b.get(2),e=new Date(1e3*(c?.wireType===0?c.value:0)+Math.round((d?.wireType===0?d.value:0)/1e6));return Number.isNaN(e.getTime())?null:e.toISOString()}(f.get(5))}}catch{return null}}(Buffer.from(e))}catch{return null}}function a8(a,b=0){return null==a?b:"object"==typeof a&&!Array.isArray(a)&&"val"in a?aF(a.val,b):aF(a,b)}function a9(a,b){let c=a?.subscriptionTier??a?.subscription_tier??a?.subscription?.tier??b?.subscriptionTier??b?.subscription_tier;return"string"==typeof c?c.trim():""}let ba={0:"Free",1:"SuperGrok",2:"X Basic",3:"X Premium",4:"X Premium Plus",5:"SuperGrok Heavy",6:"SuperGrok Lite"};function bb({used:a,total:b,resetAt:c,unlimited:d=!1}){let e=Math.max(0,aF(b,0)),f=Math.max(0,aF(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 bc(a,b=null,c=null){if(!a)return{message:"Grok CLI access token not available."};let e=function(a,b={}){let c=b||{},d={Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":a1.f,"x-xai-token-auth":"xai-grok-cli","x-grok-client-identifier":"grok-pager","x-grok-client-version":a1.u},e=c.email,f=c.userId||c.principalId;return e&&(d["x-email"]=e),f&&(d["x-userid"]=f),d}(a,b);try{let[b,f]=await Promise.all([(0,d.proxyAwareFetch)("https://cli-chat-proxy.grok.com/v1/billing?format=credits",{method:"GET",headers:e},c),(0,d.proxyAwareFetch)("https://cli-chat-proxy.grok.com/v1/user?include=subscription",{method:"GET",headers:e},c).catch(()=>null)]);if(401===b.status||403===b.status)return{message:"Grok CLI authentication expired. Please re-authorize."};if(!b.ok){let a=await b.text().catch(()=>""),c=a?`: ${a.slice(0,200)}`:"";return{message:`Grok CLI billing API error (${b.status})${c}`}}let g=await b.json().catch(()=>null);if(!g||"object"!=typeof g)return{message:"Grok CLI billing response was not JSON."};let h=null;f?.ok&&(h=await f.json().catch(()=>null));let i=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=aa(e.billingPeriodEnd)||aa(e.billing_period_end)||aa(e.currentPeriod?.end)||aa(e.resetAt||e.resetsAt||e.periodEnd)||aa(d.billingPeriodEnd)||aa(d.billing_period_end)||aa(d.resetAt||d.resetsAt||d.periodEnd)||null,g={},h=a9(b,e),i=!!h&&!/^(free|none|null)$/i.test(h),j=a8(e.onDemandCap??d.onDemandCap,0/0),k=a8(e.onDemandUsed??d.onDemandUsed,0/0);if(Number.isFinite(j)&&j>0){let a=Number.isFinite(k)?Math.max(0,k):0;g["On-demand"]=bb({used:a,total:j,resetAt:f})}let l=a8(e.monthlyLimit??e.monthly_limit??d.monthlyLimit??d.monthly_limit,0/0),m=a8(e.includedUsed??e.included_used??d.includedUsed??d.included_used,0/0),n=a8(e.totalUsed??e.total_used??d.totalUsed??d.total_used,0/0);if(Number.isFinite(l)&&l>0&&(Number.isFinite(m)||Number.isFinite(n)))g["Monthly included"]=bb({used:Number.isFinite(m)?m:n,total:l,resetAt:f});else{let a=a8(e.used??d.used,0/0);Number.isFinite(l)&&l>0&&(g.Monthly=bb({used:Number.isFinite(a)?Math.max(0,a):0,total:l,resetAt:f}))}let o=a8(e.prepaidBalance??d.prepaidBalance,0/0);Number.isFinite(o)&&o>0&&(g.Prepaid={used:0,total:o,remainingPercentage:100,resetAt:null,unlimited:!1});let p=b?.hasGrokCodeAccess===!0||e?.isUnifiedBillingUser===!0,q=a8(e.creditUsagePercent??e.credit_usage_percent??d.creditUsagePercent,0/0);Number.isFinite(q)&&q>=0&&(g["Weekly SuperGrok"]=bb({used:Math.max(0,Math.min(100,q)),total:100,resetAt:f})),!p||i||g["Weekly SuperGrok"]||(g["Grok Code"]={used:0,total:0,remainingPercentage:100,resetAt:f,unlimited:!0}),0!==Object.keys(g).length||i||(g.Included={used:0,total:0,remainingPercentage:100,resetAt:f,unlimited:!0});let r=Object.keys(g).length>0&&Object.values(g).every(a=>!0!==a.unlimited&&(a.remainingPercentage??100)<=0);return{plan:(c=a9(b,e))?c.replace(/[_-]+/g," ").replace(/\b\w/g,a=>a.toUpperCase()):b?.hasGrokCodeAccess===!0?"Grok Code":(e?.isUnifiedBillingUser,"Grok Build"),quotas:g,periodEnd:f,exhausted:r,subscriptionAccess:i}}(g,h);if(i.plan=function(a){try{return ba[JSON.parse(Buffer.from(String(a).split(".")[1],"base64url")).tier]||""}catch{return""}}(a)||i.plan,!i.quotas||0===Object.keys(i.quotas).length){let b=function(a){if(!a||!Number.isFinite(a.percentUsed))return null;let b=Math.round(Math.max(0,Math.min(100,a.percentUsed)));return{"Weekly SuperGrok":{used:b,total:100,remainingPercentage:100-b,resetAt:"string"==typeof a.resetAt?a.resetAt:null,unlimited:!1}}}(await a7(a,c));if(b)return{plan:i.plan,quotas:b};return{plan:i.plan,message:i.subscriptionAccess?"Subscription access is active; Grok does not expose a numeric included quota.":"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:i.plan,quotas:i.quotas}}catch(a){return{message:`Grok CLI usage error: ${a.message}`}}}function bd(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=bd(f,b+1,c?`${c}.${e}`:e);a&&d.push(a);continue}if("number"!=typeof f&&"string"!=typeof f)continue;let g=aF(f,0/0);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 be(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 bf(a,b="cline",e=null){try{let{buildClineHeaders:f,resolveClineCredential:g}=await c.e(5626).then(c.bind(c,15626)),{token:h,isApiKey:i}=g(a);if(!h)return{message:"Cline access token not available."};let j=f(h,{Accept:"application/json"},{isApiKey:i}),k=await (0,d.proxyAwareFetch)("https://api.cline.bot/api/v1/users/me",{method:"GET",headers:j},e);if(401===k.status||403===k.status)return{message:"Cline authentication expired. Please re-authorize."};if(!k.ok)return{message:`Cline user API error (${k.status})`};let l=await k.json().catch(()=>null);if(!l||"object"!=typeof l)return{message:"Cline user response was not JSON."};let m=l.data&&"object"==typeof l.data?l.data:l,n=m.email||m.user?.email||null,o=m.plan||m.subscription?.plan||m.subscription?.name||m.organization?.plan||m.organizations?.[0]?.plan||("clinepass"===b?"ClinePass":"Cline"),p=bd(m)||[],q=be(p),r={};q&&(r.Credits=q);let s=m.organizations||m.organization;if(!Object.keys(r).length&&s&&(r.Account={used:0,total:0,remainingPercentage:100,resetAt:null,unlimited:!0}),!Object.keys(r).length)return{plan:"string"==typeof o?o:"Cline",email:n,message:"Cline connected. No credit allotment was returned by the account API.",quotas:{}};return{plan:"string"==typeof o?o:"Cline",email:n,quotas:r}}catch(a){return{message:`Cline usage error: ${a.message}`}}}async function bg(a,b=null,c=null){if(!a)return{message:"Kimchi access token not available."};try{let e=await (0,d.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===e.status||403===e.status)return{message:"Kimchi authentication expired. Please re-authorize."};if(!e.ok)return{message:`Kimchi user API error (${e.status})`};let f=await e.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=bd(f)||[],j=be(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 bh(a,b=null,c=null){if(!a)return{message:"xAI token not available."};try{let e={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,d.proxyAwareFetch)(a,{method:"GET",headers:e},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=bd(g)||[],j=be(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}`}}}var bi=c(81756);function bj(a){return Number((aF(a,0)/100).toFixed(2))}function bk(a){return Math.max(0,100-Math.max(0,Math.min(100,aF(a,0))))}async function bl(a,b={},c=null){if(!a||"string"!=typeof a||!a.trim())return{message:"Cursor access token not available. Reconnect Cursor to view quota."};let e=a.trim(),f=b?.machineId||null,g={...(0,bi.JA)(e,f,!0),"content-type":"application/json",accept:"application/json"};try{let a=await (0,d.proxyAwareFetch)("https://api2.cursor.sh/aiserver.v1.DashboardService/GetCurrentPeriodUsage",{method:"POST",headers:g,body:"{}"},c);if(401===a.status||403===a.status)return{plan:"Cursor",message:"Cursor authentication failed. Reconnect the Cursor provider."};let b={},f=null;if(a.ok&&(f=await a.json().catch(()=>null),!function(a,b){let c=b?.planUsage;if(!c||"object"!=typeof c)return;let d=aF(c.limit,0),e=aF(c.includedSpend??c.totalSpend,0),f=aF(c.remaining,Math.max(0,d-e)),g=aa(b.billingCycleEnd);if(d>0){let b=bj(d),h=bj(f);a["Plan (USD)"]={used:bj(e),total:b,remainingPercentage:null!=c.totalPercentUsed?bk(c.totalPercentUsed):b>0?h/b*100:0,resetAt:g}}else if(null!=c.totalPercentUsed){let b=aF(c.totalPercentUsed,0);a["Included usage"]={used:b,total:100,remainingPercentage:bk(b),resetAt:g}}if(null!=c.autoPercentUsed){let b=aF(c.autoPercentUsed,0);a["Auto models (%)"]={used:b,total:100,remainingPercentage:bk(b),resetAt:g}}if(null!=c.apiPercentUsed){let b=aF(c.apiPercentUsed,0);a["Named models (%)"]={used:b,total:100,remainingPercentage:bk(b),resetAt:g}}}(b,f),!function(a,b){let c=b?.spendLimitUsage;if(!c||"object"!=typeof c)return;let d=aF(c.individualLimit,0),e=aa(b.billingCycleEnd);if(d<=0)return;let f=bj(d),g=bj(c.individualRemaining??Math.max(0,d-aF(c.individualUsed,0)));a["On-demand (USD)"]={used:bj(c.individualUsed),total:f,remainingPercentage:f>0?g/f*100:0,resetAt:e}}(b,f)),0===Object.keys(b).length){let f=e.includes("::")?e.split("::")[1]:e,g=await (0,d.proxyAwareFetch)("https://api2.cursor.sh/auth/usage",{method:"GET",headers:{Authorization:`Bearer ${f}`,Accept:"application/json"}},c);if(g.ok)!function(a,b){if(!b||"object"!=typeof b)return;let c=aa(b.startOfMonth);for(let[d,e]of Object.entries(b)){if(!e||"object"!=typeof e||Array.isArray(e))continue;let b=aF(e.maxRequestUsage,0);if(b<=0)continue;let f=aF(e.numRequests,0);a[`${d} requests`]={used:f,total:b,remainingPercentage:Math.max(0,(b-f)/b*100),resetAt:c}}}(b,await g.json().catch(()=>null));else if(!a.ok)return{plan:"Cursor",message:`Cursor usage API error (${a.status})`}}if(0===Object.keys(b).length)return{plan:"Cursor",message:f?.displayMessage||"Cursor connected. No quota data returned for this plan."};let h="Cursor",i=await (0,d.proxyAwareFetch)("https://api2.cursor.sh/aiserver.v1.DashboardService/GetPlanInfo",{method:"POST",headers:g,body:"{}"},c).catch(()=>null),j=i?.ok?(await i.json().catch(()=>null))?.planInfo?.planName:null;return"string"==typeof j&&j.trim()&&(h=`Cursor ${j.trim()}`),{plan:h,quotas:b}}catch(a){return{message:`Cursor error: ${a.message}`}}}async function bm(a,b=null){let{provider:c,accessToken:f,apiKey:g,providerSpecificData:h,projectId:i}=a,j={...h||{},...i?{projectId:i}:{}};switch(c){case"github":return await ah(f,h,b);case"gemini-cli":return await aj(f,j,b);case"antigravity":return await ax(f,j,b);case"claude":return await aC(f,b);case"codex":return await aL(f,b);case"kiro":return await aO(f,h,b);case"codebuddy":case"codebuddy-cn":case"codebuddy-intl":return await ad(f,h,b,g,c);case"qoder":case"qoder-cn":return await X(a,b);case"autoclaw":return await a_(f,b,a);case"qwen":return await aP(f,h);case"iflow":return await aQ(f);case"ollama":return await n(a,b);case"xiaomi-mimo":return await q(g||f,h,b);case"commandcode":return await y(g||f,b);case"kimi":case"kimi-coding":return await D(a,b);case"deepseek":return await F(a,b);case"glm":case"glm-cn":return await aS(g,c,b);case"minimax":case"minimax-cn":return await a$(g,c,b);case"grok-cli":return await bc(f,h,b);case"opencode-go":return await function(a=null,b=null){return Z(a,b,{url:"https://opencode.ai/zen/go/v1/usage",plan:"OpenCode Go",missingKey:"OpenCode Go API key not available. Add a key to view usage.",authFailed:"OpenCode Go authentication failed. Check the API key.",billingRequired:"OpenCode Go subscription required for this API key.",forbidden:"OpenCode Go access forbidden for this API key.",httpError:a=>`OpenCode Go usage API error (${a}).`,empty:"OpenCode Go usage response did not contain valid quota data."})}(g||f,b);case"opencode-zen":return await function(a=null,b=null){return Z(a,b,{url:"https://opencode.ai/zen/v1/usage",plan:"OpenCode Zen",missingKey:"OpenCode Zen API key not available. Add a key to view usage.",authFailed:"OpenCode Zen authentication failed. Check the API key.",billingRequired:"OpenCode Zen billing required for this API key.",forbidden:"OpenCode Zen access forbidden for this API key.",httpError:a=>`OpenCode Zen usage API error (${a}).`,empty:"OpenCode Zen usage response did not contain valid quota data."})}(g||f,b);case"vercel-ai-gateway":return await _(g||f,b);case"cloudflare-ai":return await a0(g||f,h,b);case"xai":return await bh(f||g,h,b);case"cline":case"clinepass":return await bf({accessToken:f,apiKey:g},c,b);case"kimchi":return await bg(f||g,h,b);case"blackbox":return await (0,e.EE)(g||f,{fetchImpl:(a,c)=>(0,d.proxyAwareFetch)(a,c,b)});case"cursor":return await bl(f,h,b);case"openrouter":return await L(a,b);case"openai":return await M(a,b);case"anthropic":return await N(a,b);case"groq":return await P(a,b);case"mistral":return await Q(a,b);case"together":return await R(a,b);case"gemini":return await S(a,b);case"fireworks":case"perplexity":case"vertex":case"vertex-partner":case"azure":return{message:`${c} has no key-scoped usage API. Spend is tracked from requests.`};default:return{message:`Usage API not implemented for ${c}`}}}},91254:(a,b,c)=>{c.d(b,{CG:()=>p,QN:()=>k,US:()=>o,hN:()=>j,kt:()=>i,pX:()=>q,r_:()=>n,uF:()=>m});let d="codebuddyRuntimeExhaustedAt",e="codebuddyRuntimeExhaustedCode",f="codebuddyRuntimeRejectedAt",g="codebuddyRuntimeRejectedCode";function h(a){return a?.provider==="codebuddy"||a?.provider==="codebuddy-cn"||a?.provider==="codebuddy-intl"}function i(a){return h(a)&&a.providerSpecificData?.[d]||null}function j(a){return!!i(a)}function k(a,b){return{...a||{},[d]:b,[e]:14018}}function l(a){return a?.provider!=="codebuddy-cn"?null:a.providerSpecificData?.[f]||null}function m(a){return!!l(a)}function n(a,b,c=11140){return{...a||{},[f]:b,[g]:c}}function o(a){let b={...a||{}};return delete b[d],delete b[e],b}function p(a){let b=o(a);return delete b[f],delete b[g],b}function q(a,b){if(!h(b))return a;let c=l(b),d=i(b);if(!c&&!d)return a;let e=a?.billingQuotas||a?.quotas||{};if(c)return{...a||{},message:"CodeBuddy CN chat API rejected this credential (11140); billing package balance is nominal and does not prove chat access.",billingQuotas:e,runtimeStatus:"credential_rejected",chatUsable:!1,runtimeRejectedAt:c,runtimeRejectedCode:Number(b.providerSpecificData?.[g])||11140};let f=Object.fromEntries(Object.entries(e).map(([a,b])=>{let c=Number(b?.total);return[a,{...b||{},...Number.isFinite(c)?{used:c}:{},remaining:0,remainingPercentage:0}]}));return{...a||{},message:"CodeBuddy chat API reported exhausted credits (14018); billing package balance is nominal until a chat request succeeds.",billingQuotas:e,quotas:f,runtimeStatus:"exhausted",chatUsable:!1,runtimeExhausted:!0,runtimeExhaustedAt:d,runtimeExhaustedCode:14018}}}};
|