zevairouter 1.0.36 → 1.0.38
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 +25 -0
- package/cli/app/.next-cli-build/BUILD_ID +1 -1
- package/cli/app/.next-cli-build/app-path-routes-manifest.json +3 -3
- package/cli/app/.next-cli-build/build-manifest.json +2 -2
- 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/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 +2 -2
- 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.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/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/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/_global-error.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page.js.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/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.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/status/route.js.nft.json +1 -1
- 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.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.nft.json +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/codex-gateway/accounts/route.js.nft.json +1 -1
- 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.nft.json +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.nft.json +1 -1
- 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/deepseek-tui-settings/route.js.nft.json +1 -1
- 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/hermes-settings/route.js.nft.json +1 -1
- 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.nft.json +1 -1
- 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.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/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/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]/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/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/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 +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 +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 +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 +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 +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 +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 +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/autoclaw/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/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/import-token/route.js +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 +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/iflow/cookie/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/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/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]/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 +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/bulk-delete/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/client/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/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.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.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/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.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/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 +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 +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.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.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/providers/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/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/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/[kind]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/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 +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 +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.nft.json +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 +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 +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/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.html +1 -1
- package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing/page.js.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/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login/page.js.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 +4 -4
- package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.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-paths-manifest.json +3 -3
- package/cli/app/.next-cli-build/server/chunks/2409.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2777.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3104.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3110.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/318.js +8 -15
- package/cli/app/.next-cli-build/server/chunks/412.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4161.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4177.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4404.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4746.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5024.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5681.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6896.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7153.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8255.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8335.js +10 -0
- package/cli/app/.next-cli-build/server/chunks/8590.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8895.js +3 -3
- package/cli/app/.next-cli-build/server/chunks/891.js +1 -1
- package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/pages/404.html +1 -1
- package/cli/app/.next-cli-build/server/pages/500.html +1 -1
- package/cli/app/.next-cli-build/static/chunks/1321-6e91d87d2a4816b9.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/5497-2a485830a005737d.js +7 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-41ea0d0c8e98a115.js +3 -0
- package/cli/app/package.json +3 -3
- package/cli/app/public/providers/clinepass.png +0 -0
- package/cli/app/public/providers/grok-cli.png +0 -0
- package/cli/app/public/providers/kimchi.png +0 -0
- package/cli/app/public/providers/kimchi.svg +4 -0
- package/cli/app/public/providers/perplexity-agent.png +0 -0
- package/cli/package.json +1 -1
- package/open-sse/config/appConstants.js +2 -0
- package/open-sse/config/providerModels.js +81 -1
- package/open-sse/config/providers.js +69 -0
- package/open-sse/executors/codebuddy-cn.js +31 -0
- package/open-sse/executors/default.js +2 -1
- package/open-sse/executors/grok-cli.js +397 -0
- package/open-sse/executors/index.js +14 -0
- package/open-sse/executors/kimchi.js +123 -0
- package/open-sse/executors/mimo-free.js +156 -0
- package/open-sse/handlers/chatCore.js +12 -21
- package/open-sse/services/kimchiModels.js +176 -0
- package/open-sse/services/model.js +5 -0
- package/open-sse/services/tokenRefresh.js +2 -0
- package/open-sse/services/usage.js +250 -24
- package/open-sse/utils/stream.js +14 -0
- package/open-sse/utils/thinkingSuffix.js +64 -0
- package/package.json +3 -3
- package/public/providers/clinepass.png +0 -0
- package/public/providers/grok-cli.png +0 -0
- package/public/providers/kimchi.png +0 -0
- package/public/providers/kimchi.svg +4 -0
- package/public/providers/perplexity-agent.png +0 -0
- package/src/app/(dashboard)/dashboard/providers/[id]/ModelRow.js +7 -3
- package/src/app/(dashboard)/dashboard/providers/[id]/page.js +17 -16
- package/src/app/api/oauth/[provider]/[action]/route.js +4 -4
- package/src/app/api/providers/[id]/models/route.js +20 -0
- package/src/app/api/providers/[id]/test/testUtils.js +33 -3
- package/src/app/api/v1/models/route.js +10 -1
- package/src/lib/network/connectionProxy.js +27 -0
- package/src/lib/oauth/constants/oauth.js +33 -0
- package/src/lib/oauth/providers.js +243 -0
- package/src/shared/components/NoAuthProxyCard.js +56 -8
- package/src/shared/components/OAuthModal.js +24 -7
- package/src/shared/constants/providers.js +141 -1
- package/src/sse/services/auth.js +11 -4
- package/cli/app/.next-cli-build/server/chunks/3188.js +0 -10
- package/cli/app/.next-cli-build/static/chunks/1321-1915f34ac5033b82.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/5497-f496fb3861cb944d.js +0 -7
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-00b727c93ebc0e37.js +0 -3
- /package/cli/app/.next-cli-build/static/{w0R4xFPIyjPTTgiJ8h4Lz → r3r8UzNCpFb_r_5RqCNis}/_buildManifest.js +0 -0
- /package/cli/app/.next-cli-build/static/{w0R4xFPIyjPTTgiJ8h4Lz → r3r8UzNCpFb_r_5RqCNis}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=2409,exports.ids=[2409],exports.modules={13808:(a,b,c)=>{c.d(b,{$N:()=>f,OK:()=>g,Zl:()=>h,lz:()=>i});var d=c(55511),e=c.n(d);function f(a=32){return e().randomBytes(a).toString("base64url")}function g(a){return e().createHash("sha256").update(a).digest("base64url")}function h(){return e().randomBytes(32).toString("base64url")}function i(a=32){let b=f(a),c=g(b);return{codeVerifier:b,codeChallenge:c,state:h()}}},62409:(a,b,c)=>{c.d(b,{v:()=>g});var d=c(92990),e=c(13808);let f="https://prod.us-east-1.auth.desktop.kiro.dev";class g{createSocialAuthorization(a){if(!a||!["google","github"].includes(a))throw Error("Invalid provider. Use 'google' or 'github'");let{codeVerifier:b,codeChallenge:c,state:d}=(0,e.lz)();return{authUrl:this.buildSocialLoginUrl(a,c,d),state:d,codeVerifier:b,codeChallenge:c,provider:a}}async registerClient(a="us-east-1"){let b=`https://oidc.${a}.amazonaws.com/client/register`,c=await fetch(b,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientName:d.Tx.clientName,clientType:d.Tx.clientType,scopes:d.Tx.scopes,grantTypes:d.Tx.grantTypes,issuerUrl:d.Tx.issuerUrl})});if(!c.ok){let a=await c.text();throw Error(`Failed to register client: ${a}`)}let e=await c.json();return{clientId:e.clientId,clientSecret:e.clientSecret,clientSecretExpiresAt:e.clientSecretExpiresAt}}async startDeviceAuthorization(a,b,c,d="us-east-1"){let e=`https://oidc.${d}.amazonaws.com/device_authorization`,f=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:a,clientSecret:b,startUrl:c})});if(!f.ok){let a=await f.text();throw Error(`Failed to start device authorization: ${a}`)}let g=await f.json();return{deviceCode:g.deviceCode,userCode:g.userCode,verificationUri:g.verificationUri,verificationUriComplete:g.verificationUriComplete,expiresIn:g.expiresIn,interval:g.interval||5}}async pollDeviceToken(a,b,c,d="us-east-1"){let e=`https://oidc.${d}.amazonaws.com/token`,f=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:a,clientSecret:b,deviceCode:c,grantType:"urn:ietf:params:oauth:grant-type:device_code"})}),g=await f.json();return!f.ok||g.error?{success:!1,error:g.error,errorDescription:g.error_description,pending:"authorization_pending"===g.error||"slow_down"===g.error}:{success:!0,tokens:{accessToken:g.accessToken,refreshToken:g.refreshToken,expiresIn:g.expiresIn,tokenType:g.tokenType}}}buildSocialLoginUrl(a,b,c){return`${f}/login?idp=${"google"===a?"Google":"Github"}&redirect_uri=${encodeURIComponent("kiro://kiro.kiroAgent/authenticate-success")}&code_challenge=${b}&code_challenge_method=S256&state=${c}&prompt=select_account`}async exchangeSocialCode(a,b){let c=await fetch(`${f}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:a,code_verifier:b,redirect_uri:"kiro://kiro.kiroAgent/authenticate-success"})});if(!c.ok){let a=await c.text();throw Error(`Token exchange failed: ${a}`)}let d=await c.json();return{accessToken:d.accessToken,refreshToken:d.refreshToken,profileArn:d.profileArn,expiresIn:d.expiresIn||3600}}async refreshToken(a,b={}){let{authMethod:c,clientId:d,clientSecret:e,region:g}=b;if(d&&e){let b=`https://oidc.${g||"us-east-1"}.amazonaws.com/token`,c=await fetch(b,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:d,clientSecret:e,refreshToken:a,grantType:"refresh_token"})});if(!c.ok){let a=await c.text();throw Error(`Token refresh failed: ${a}`)}let f=await c.json();return{accessToken:f.accessToken,refreshToken:f.refreshToken||a,expiresIn:f.expiresIn}}let h=await fetch(`${f}/refreshToken`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:a})});if(!h.ok){let a=await h.text();throw Error(`Token refresh failed: ${a}`)}let i=await h.json();return{accessToken:i.accessToken,refreshToken:i.refreshToken||a,profileArn:i.profileArn,expiresIn:i.expiresIn||3600}}async validateImportToken(a){if(!a.startsWith("aorAAAAAG"))throw Error("Invalid token format. Token should start with aorAAAAAG...");try{let b=await this.refreshToken(a);return{accessToken:b.accessToken,refreshToken:b.refreshToken||a,profileArn:b.profileArn,expiresIn:b.expiresIn,authMethod:"imported"}}catch(a){throw Error(`Token validation failed: ${a.message}`)}}async listAvailableModels(a,b){let c=await fetch("https://codewhisperer.us-east-1.amazonaws.com",{method:"POST",headers:{"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.ListAvailableModels",Authorization:`Bearer ${a}`,Accept:"application/json"},body:JSON.stringify({origin:"AI_EDITOR",profileArn:b})});if(!c.ok){let a=await c.text();throw Error(`Failed to list models: ${a}`)}return((await c.json()).models||[]).map(a=>({id:a.modelId,name:a.modelName||a.modelId,description:a.description,rateMultiplier:a.rateMultiplier,rateUnit:a.rateUnit,maxInputTokens:a.tokenLimits?.maxInputTokens||0}))}extractEmailFromJWT(a){try{let b=a.split(".");if(3!==b.length)return null;let c=b[1];for(;c.length%4;)c+="=";let d=JSON.parse(atob(c.replace(/-/g,"+").replace(/_/g,"/")));return d.email||d.preferred_username||d.sub}catch{return null}}}},92990:(a,b,c)=>{c.d(b,{DI:()=>g,Hp:()=>i,LT:()=>h,MZ:()=>r,Nl:()=>u,Nu:()=>n,OV:()=>f,Tx:()=>o,WN:()=>p,Ww:()=>w,YT:()=>l,ZL:()=>k,cD:()=>m,f7:()=>t,hF:()=>j,lB:()=>s,ne:()=>v,t:()=>q});var d=c(21820);function e(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let f={clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",authorizeUrl:"https://claude.ai/oauth/authorize",tokenUrl:"https://api.anthropic.com/v1/oauth/token",scopes:["org:create_api_key","user:profile","user:inference"],codeChallengeMethod:"S256"},g={clientId:"app_EMoamEEZ73f0CkXaXp7hrann",authorizeUrl:"https://auth.openai.com/oauth/authorize",tokenUrl:"https://auth.openai.com/oauth/token",scope:"openid profile email offline_access",codeChallengeMethod:"S256",extraParams:{id_token_add_organizations:"true",codex_cli_simplified_flow:"true",originator:"codex_cli_rs"}},h={clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile"]},i={clientId:"f0304373b74a44d2b584a3fb70ca9e56",deviceCodeUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",scope:"openid profile email model.completion",codeChallengeMethod:"S256"},j={openApiBaseUrl:"https://openapi.qoder.sh",centerBaseUrl:"https://center.qoder.sh",chatBaseUrl:"https://api3.qoder.sh",deviceTokenUrl:"https://openapi.qoder.sh/api/v1/deviceToken/poll",refreshUrl:"https://center.qoder.sh/algo/api/v3/user/refresh_token",userInfoUrl:"https://openapi.qoder.sh/api/v1/userinfo",quotaUsageUrl:"https://openapi.qoder.sh/api/v2/quota/usage",loginUrl:"https://qoder.com/device/selectAccounts"},k={clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",authorizeUrl:"https://iflow.cn/oauth",tokenUrl:"https://iflow.cn/oauth/token",userInfoUrl:"https://iflow.cn/api/oauth/getUserInfo",extraParams:{loginMethod:"phone",type:"phone"}},l={clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/cclog","https://www.googleapis.com/auth/experimentsandconfigs"],apiEndpoint:"https://cloudcode-pa.googleapis.com",apiVersion:"v1internal",loadCodeAssistEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUserEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser",loadCodeAssistUserAgent:"google-api-nodejs-client/9.15.1",loadCodeAssistApiClient:"google-cloud-sdk vscode_cloudshelleditor/0.1",loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:e(),pluginType:2})};function m(){return{ideType:9,platform:e(),pluginType:2}}let n={clientId:"Iv1.b507a08c87ecfe98",deviceCodeUrl:"https://github.com/login/device/code",tokenUrl:"https://github.com/login/oauth/access_token",userInfoUrl:"https://api.github.com/user",scopes:"read:user",apiVersion:"2022-11-28",copilotTokenUrl:"https://api.github.com/copilot_internal/v2/token",userAgent:"GitHubCopilotChat/0.26.7",editorVersion:"vscode/1.85.0",editorPluginVersion:"copilot-chat/0.26.7"},o={ssoOidcEndpoint:"https://oidc.us-east-1.amazonaws.com",registerClientUrl:"https://oidc.us-east-1.amazonaws.com/client/register",deviceAuthUrl:"https://oidc.us-east-1.amazonaws.com/device_authorization",tokenUrl:"https://oidc.us-east-1.amazonaws.com/token",startUrl:"https://view.awsapps.com/start",clientName:"kiro-oauth-client",clientType:"public",scopes:["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations"],grantTypes:["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],issuerUrl:"https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6",socialAuthEndpoint:"https://prod.us-east-1.auth.desktop.kiro.dev",socialLoginUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/login",socialTokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token",socialRefreshUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",authMethods:["builder-id","idc","google","github","import"]},p={apiEndpoint:"https://api2.cursor.sh",chatEndpoint:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",modelsEndpoint:"/aiserver.v1.AiService/GetDefaultModelNudgeData",api3Endpoint:"https://api3.cursor.sh",agentEndpoint:"https://agent.api5.cursor.sh",agentNonPrivacyEndpoint:"https://agentn.api5.cursor.sh",clientVersion:"3.1.0",clientType:"ide",tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"},dbKeys:{accessToken:"cursorAuth/accessToken",machineId:"storage.serviceMachineId"}},q={clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||"17e5f671-d194-4dfb-9706-5516cb48c098",deviceCodeUrl:"https://auth.kimi.com/api/oauth/device_authorization",tokenUrl:"https://auth.kimi.com/api/oauth/token"},r={apiBaseUrl:"https://api.kilo.ai",initiateUrl:"https://api.kilo.ai/api/device-auth/codes",pollUrlBase:"https://api.kilo.ai/api/device-auth/codes"},s={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},t={defaultBaseUrl:"https://gitlab.com",authorizeUrlPath:"/oauth/authorize",tokenUrlPath:"/oauth/token",userInfoUrlPath:"/api/v4/user",scope:"api read_user",codeChallengeMethod:"S256"},u={baseUrl:"https://www.codebuddy.ai",stateUrl:"https://www.codebuddy.ai/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.ai/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.ai/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.ai/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.ai/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",domain:"www.codebuddy.ai",platform:"CLI",pollInterval:5e3},v={baseUrl:"https://www.codebuddy.cn",stateUrl:"https://www.codebuddy.cn/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.cn/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.cn/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.cn/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.cn/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",domain:"www.codebuddy.cn",platform:"CLI",pollInterval:5e3},w=3e5}};
|
|
1
|
+
"use strict";exports.id=2409,exports.ids=[2409],exports.modules={13808:(a,b,c)=>{c.d(b,{$N:()=>f,OK:()=>g,Zl:()=>h,lz:()=>i});var d=c(55511),e=c.n(d);function f(a=32){return e().randomBytes(a).toString("base64url")}function g(a){return e().createHash("sha256").update(a).digest("base64url")}function h(){return e().randomBytes(32).toString("base64url")}function i(a=32){let b=f(a),c=g(b);return{codeVerifier:b,codeChallenge:c,state:h()}}},62409:(a,b,c)=>{c.d(b,{v:()=>g});var d=c(92990),e=c(13808);let f="https://prod.us-east-1.auth.desktop.kiro.dev";class g{createSocialAuthorization(a){if(!a||!["google","github"].includes(a))throw Error("Invalid provider. Use 'google' or 'github'");let{codeVerifier:b,codeChallenge:c,state:d}=(0,e.lz)();return{authUrl:this.buildSocialLoginUrl(a,c,d),state:d,codeVerifier:b,codeChallenge:c,provider:a}}async registerClient(a="us-east-1"){let b=`https://oidc.${a}.amazonaws.com/client/register`,c=await fetch(b,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientName:d.Tx.clientName,clientType:d.Tx.clientType,scopes:d.Tx.scopes,grantTypes:d.Tx.grantTypes,issuerUrl:d.Tx.issuerUrl})});if(!c.ok){let a=await c.text();throw Error(`Failed to register client: ${a}`)}let e=await c.json();return{clientId:e.clientId,clientSecret:e.clientSecret,clientSecretExpiresAt:e.clientSecretExpiresAt}}async startDeviceAuthorization(a,b,c,d="us-east-1"){let e=`https://oidc.${d}.amazonaws.com/device_authorization`,f=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:a,clientSecret:b,startUrl:c})});if(!f.ok){let a=await f.text();throw Error(`Failed to start device authorization: ${a}`)}let g=await f.json();return{deviceCode:g.deviceCode,userCode:g.userCode,verificationUri:g.verificationUri,verificationUriComplete:g.verificationUriComplete,expiresIn:g.expiresIn,interval:g.interval||5}}async pollDeviceToken(a,b,c,d="us-east-1"){let e=`https://oidc.${d}.amazonaws.com/token`,f=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:a,clientSecret:b,deviceCode:c,grantType:"urn:ietf:params:oauth:grant-type:device_code"})}),g=await f.json();return!f.ok||g.error?{success:!1,error:g.error,errorDescription:g.error_description,pending:"authorization_pending"===g.error||"slow_down"===g.error}:{success:!0,tokens:{accessToken:g.accessToken,refreshToken:g.refreshToken,expiresIn:g.expiresIn,tokenType:g.tokenType}}}buildSocialLoginUrl(a,b,c){return`${f}/login?idp=${"google"===a?"Google":"Github"}&redirect_uri=${encodeURIComponent("kiro://kiro.kiroAgent/authenticate-success")}&code_challenge=${b}&code_challenge_method=S256&state=${c}&prompt=select_account`}async exchangeSocialCode(a,b){let c=await fetch(`${f}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:a,code_verifier:b,redirect_uri:"kiro://kiro.kiroAgent/authenticate-success"})});if(!c.ok){let a=await c.text();throw Error(`Token exchange failed: ${a}`)}let d=await c.json();return{accessToken:d.accessToken,refreshToken:d.refreshToken,profileArn:d.profileArn,expiresIn:d.expiresIn||3600}}async refreshToken(a,b={}){let{authMethod:c,clientId:d,clientSecret:e,region:g}=b;if(d&&e){let b=`https://oidc.${g||"us-east-1"}.amazonaws.com/token`,c=await fetch(b,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:d,clientSecret:e,refreshToken:a,grantType:"refresh_token"})});if(!c.ok){let a=await c.text();throw Error(`Token refresh failed: ${a}`)}let f=await c.json();return{accessToken:f.accessToken,refreshToken:f.refreshToken||a,expiresIn:f.expiresIn}}let h=await fetch(`${f}/refreshToken`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:a})});if(!h.ok){let a=await h.text();throw Error(`Token refresh failed: ${a}`)}let i=await h.json();return{accessToken:i.accessToken,refreshToken:i.refreshToken||a,profileArn:i.profileArn,expiresIn:i.expiresIn||3600}}async validateImportToken(a){if(!a.startsWith("aorAAAAAG"))throw Error("Invalid token format. Token should start with aorAAAAAG...");try{let b=await this.refreshToken(a);return{accessToken:b.accessToken,refreshToken:b.refreshToken||a,profileArn:b.profileArn,expiresIn:b.expiresIn,authMethod:"imported"}}catch(a){throw Error(`Token validation failed: ${a.message}`)}}async listAvailableModels(a,b){let c=await fetch("https://codewhisperer.us-east-1.amazonaws.com",{method:"POST",headers:{"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.ListAvailableModels",Authorization:`Bearer ${a}`,Accept:"application/json"},body:JSON.stringify({origin:"AI_EDITOR",profileArn:b})});if(!c.ok){let a=await c.text();throw Error(`Failed to list models: ${a}`)}return((await c.json()).models||[]).map(a=>({id:a.modelId,name:a.modelName||a.modelId,description:a.description,rateMultiplier:a.rateMultiplier,rateUnit:a.rateUnit,maxInputTokens:a.tokenLimits?.maxInputTokens||0}))}extractEmailFromJWT(a){try{let b=a.split(".");if(3!==b.length)return null;let c=b[1];for(;c.length%4;)c+="=";let d=JSON.parse(atob(c.replace(/-/g,"+").replace(/_/g,"/")));return d.email||d.preferred_username||d.sub}catch{return null}}}},92990:(a,b,c)=>{c.d(b,{DI:()=>g,Hp:()=>i,LT:()=>h,MZ:()=>r,Nl:()=>x,Nu:()=>n,OV:()=>f,Td:()=>u,Tx:()=>o,WN:()=>p,Ww:()=>z,YT:()=>l,ZL:()=>k,cD:()=>m,f7:()=>w,hF:()=>j,lB:()=>s,ne:()=>y,qp:()=>v,t:()=>q,w1:()=>t});var d=c(21820);function e(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let f={clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",authorizeUrl:"https://claude.ai/oauth/authorize",tokenUrl:"https://api.anthropic.com/v1/oauth/token",scopes:["org:create_api_key","user:profile","user:inference"],codeChallengeMethod:"S256"},g={clientId:"app_EMoamEEZ73f0CkXaXp7hrann",authorizeUrl:"https://auth.openai.com/oauth/authorize",tokenUrl:"https://auth.openai.com/oauth/token",scope:"openid profile email offline_access",codeChallengeMethod:"S256",extraParams:{id_token_add_organizations:"true",codex_cli_simplified_flow:"true",originator:"codex_cli_rs"}},h={clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile"]},i={clientId:"f0304373b74a44d2b584a3fb70ca9e56",deviceCodeUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",scope:"openid profile email model.completion",codeChallengeMethod:"S256"},j={openApiBaseUrl:"https://openapi.qoder.sh",centerBaseUrl:"https://center.qoder.sh",chatBaseUrl:"https://api3.qoder.sh",deviceTokenUrl:"https://openapi.qoder.sh/api/v1/deviceToken/poll",refreshUrl:"https://center.qoder.sh/algo/api/v3/user/refresh_token",userInfoUrl:"https://openapi.qoder.sh/api/v1/userinfo",quotaUsageUrl:"https://openapi.qoder.sh/api/v2/quota/usage",loginUrl:"https://qoder.com/device/selectAccounts"},k={clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",authorizeUrl:"https://iflow.cn/oauth",tokenUrl:"https://iflow.cn/oauth/token",userInfoUrl:"https://iflow.cn/api/oauth/getUserInfo",extraParams:{loginMethod:"phone",type:"phone"}},l={clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/cclog","https://www.googleapis.com/auth/experimentsandconfigs"],apiEndpoint:"https://cloudcode-pa.googleapis.com",apiVersion:"v1internal",loadCodeAssistEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUserEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser",loadCodeAssistUserAgent:"google-api-nodejs-client/9.15.1",loadCodeAssistApiClient:"google-cloud-sdk vscode_cloudshelleditor/0.1",loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:e(),pluginType:2})};function m(){return{ideType:9,platform:e(),pluginType:2}}let n={clientId:"Iv1.b507a08c87ecfe98",deviceCodeUrl:"https://github.com/login/device/code",tokenUrl:"https://github.com/login/oauth/access_token",userInfoUrl:"https://api.github.com/user",scopes:"read:user",apiVersion:"2022-11-28",copilotTokenUrl:"https://api.github.com/copilot_internal/v2/token",userAgent:"GitHubCopilotChat/0.26.7",editorVersion:"vscode/1.85.0",editorPluginVersion:"copilot-chat/0.26.7"},o={ssoOidcEndpoint:"https://oidc.us-east-1.amazonaws.com",registerClientUrl:"https://oidc.us-east-1.amazonaws.com/client/register",deviceAuthUrl:"https://oidc.us-east-1.amazonaws.com/device_authorization",tokenUrl:"https://oidc.us-east-1.amazonaws.com/token",startUrl:"https://view.awsapps.com/start",clientName:"kiro-oauth-client",clientType:"public",scopes:["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations"],grantTypes:["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],issuerUrl:"https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6",socialAuthEndpoint:"https://prod.us-east-1.auth.desktop.kiro.dev",socialLoginUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/login",socialTokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token",socialRefreshUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",authMethods:["builder-id","idc","google","github","import"]},p={apiEndpoint:"https://api2.cursor.sh",chatEndpoint:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",modelsEndpoint:"/aiserver.v1.AiService/GetDefaultModelNudgeData",api3Endpoint:"https://api3.cursor.sh",agentEndpoint:"https://agent.api5.cursor.sh",agentNonPrivacyEndpoint:"https://agentn.api5.cursor.sh",clientVersion:"3.1.0",clientType:"ide",tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"},dbKeys:{accessToken:"cursorAuth/accessToken",machineId:"storage.serviceMachineId"}},q={clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||"17e5f671-d194-4dfb-9706-5516cb48c098",deviceCodeUrl:"https://auth.kimi.com/api/oauth/device_authorization",tokenUrl:"https://auth.kimi.com/api/oauth/token"},r={apiBaseUrl:"https://api.kilo.ai",initiateUrl:"https://api.kilo.ai/api/device-auth/codes",pollUrlBase:"https://api.kilo.ai/api/device-auth/codes"},s={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},t={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenUrl:"https://api.cline.bot/api/v1/auth/token",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},u={webAppUrl:"https://app.kimchi.dev",validationUrl:"https://api.cast.ai/v1/llm/openai/supported-providers",userInfoUrl:"https://app.kimchi.dev/api/v1/me",modelsUrl:"https://llm.kimchi.dev/v1/models/metadata?include_in_cli=true"},v={clientId:"b1a00492-073a-47ea-816f-4c329264a828",deviceCodeUrl:"https://auth.x.ai/oauth2/device/code",tokenUrl:"https://auth.x.ai/oauth2/token",refreshUrl:"https://auth.x.ai/oauth2/token",scope:"openid profile email offline_access grok-cli:access api:access conversations:read conversations:write",referrer:"grok-build",refreshLeadMs:3e5},w={defaultBaseUrl:"https://gitlab.com",authorizeUrlPath:"/oauth/authorize",tokenUrlPath:"/oauth/token",userInfoUrlPath:"/api/v4/user",scope:"api read_user",codeChallengeMethod:"S256"},x={baseUrl:"https://www.codebuddy.ai",stateUrl:"https://www.codebuddy.ai/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.ai/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.ai/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.ai/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.ai/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",domain:"www.codebuddy.ai",platform:"CLI",pollInterval:5e3},y={baseUrl:"https://www.codebuddy.cn",stateUrl:"https://www.codebuddy.cn/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.cn/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.cn/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.cn/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.cn/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",domain:"www.codebuddy.cn",platform:"CLI",pollInterval:5e3},z=3e5}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=2777,exports.ids=[1998,2777],exports.modules={19225:(a,b,c)=>{a.exports=c(44870)},39326:(a,b,c)=>{c.d(b,{B:()=>f});var d=c(71998);function e(a){return null==a?"":String(a).trim()}async function f(a={}){try{let b=e(a?.proxyPoolId),c="__none__"===b?"":b,f=function(a={}){let b=a?.connectionProxyEnabled===!0,c=e(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:e(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=e(a?.proxyUrl),f=e(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type||"cloudflare"===a.type||"deno"===a.type)return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:f,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:f,strictProxy:!0===a.strictProxy}}}if(f.connectionProxyEnabled&&f.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...f};return{source:"none",proxyPoolId:c||null,proxyPool:null,...f}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},61188:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{NS:()=>m,dg:()=>n});var e=c(48895),f=c(89718),g=c(99675),h=c(55330),i=c(39326),j=c(75681),k=a([e,h]);[e,h]=k.then?(await k)():k;let o=["expired","authentication","unauthorized","401","re-authorize"];async function l(a,b=!1,c=null){let d=(0,h.SB)(a.provider),e={accessToken:a.accessToken,refreshToken:a.refreshToken,idToken:a.idToken,expiresAt:a.expiresAt||a.tokenExpiresAt,lastRefreshAt:a.lastRefreshAt,connectionId:a.id,providerSpecificData:a.providerSpecificData,copilotToken:a.providerSpecificData?.copilotToken,copilotTokenExpiresAt:a.providerSpecificData?.copilotTokenExpiresAt};if(!(b||d.needsRefresh(e)))return{connection:a,refreshed:!1};let g=await d.refreshCredentials(e,console,c);if(!g){if(a.accessToken)return{connection:a,refreshed:!1};throw Error("Failed to refresh credentials. Please re-authorize the connection.")}let i={updatedAt:new Date().toISOString()};g.accessToken&&(i.accessToken=g.accessToken),g.refreshToken&&(i.refreshToken=g.refreshToken),g.idToken&&(i.idToken=g.idToken),g.lastRefreshAt&&(i.lastRefreshAt=g.lastRefreshAt),g.expiresIn?(i.expiresAt=new Date(Date.now()+1e3*g.expiresIn).toISOString(),i.expiresIn=g.expiresIn):g.expiresAt&&(i.expiresAt=g.expiresAt);let j={...g.providerSpecificData||{},...g.copilotToken?{copilotToken:g.copilotToken}:{},...g.copilotTokenExpiresAt?{copilotTokenExpiresAt:g.copilotTokenExpiresAt}:{}};return Object.keys(j).length>0&&(i.providerSpecificData={...a.providerSpecificData||{},...j}),await (0,f.updateProviderConnection)(a.id,i),{connection:{...a,...i,providerSpecificData:i.providerSpecificData||a.providerSpecificData},refreshed:!0}}function m(a){var b;let c;if(!a)return!1;let d=(b=a.authType,c=String(b||"").toLowerCase().trim(),"api-key"===c||"api_key"===c||"api key"===c?"apikey":c);return"oauth"===d||"apikey"===d&&j.jO.includes(a.provider)}async function n(a,b={}){let{writeCache:c=!1,force:d=!1}=b,e=await (0,f.Mc)(a);if(!e)return{error:"Connection not found",notFound:!0};if(!m(e))return{message:"Usage not available for this connection"};let h=await (0,i.B)(e.providerSpecificData),j={connectionProxyEnabled:!0===h.connectionProxyEnabled,connectionProxyUrl:h.connectionProxyUrl||"",connectionNoProxy:h.connectionNoProxy||"",vercelRelayUrl:h.vercelRelayUrl||"",strictProxy:!1},k=e,p="oauth"===k.authType;p&&(k=(await l(k,d,j)).connection);let q=await (0,g.m)(k,j);if(p&&function(a){if(!a?.message)return!1;let b=a.message.toLowerCase();return o.some(a=>b.includes(a))}(q)&&k.refreshToken)try{k=(await l(k,!0,j)).connection,q=await (0,g.m)(k,j)}catch(a){console.warn(`[Usage] ${k.provider}: force refresh failed: ${a.message}`)}if(c&&q&&!q.error)try{await (0,f.KK)(k.id,k.provider,q)}catch(a){console.warn(`[QuotaCache] save failed for ${k.id}: ${a.message}`)}return q}d()}catch(a){d(a)}})},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,KK:()=>d.KK,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,NR:()=>d.NR,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,QI:()=>d.QI,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,dK:()=>d.dK,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,getQuotaSnapshot:()=>d.LF,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,p3:()=>d.p3,qd:()=>d.qd,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yW:()=>d.yW,yg:()=>d.yg,zP:()=>d.zP,zY:()=>d.zY});var d=c(93999)},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}},99675:(a,b,c)=>{c.d(b,{m:()=>k});var d=c(75924),e=c(39609);let f={international:"https://api.z.ai/api/monitor/usage/quota/limit",china:"https://open.bigmodel.cn/api/monitor/usage/quota/limit"},g={minimax:["https://www.minimax.io/v1/token_plan/remains","https://api.minimax.io/v1/api/openplatform/coding_plan/remains"],"minimax-cn":["https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains","https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains"]},h={quotaApiHosts:["https://daily-cloudcode-pa.googleapis.com","https://cloudcode-pa.googleapis.com","https://daily-cloudcode-pa.sandbox.googleapis.com"],fetchAvailableModelsPath:"/v1internal:fetchAvailableModels",retrieveUserQuotaPath:"/v1internal:retrieveUserQuota",loadProjectApiUrl:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",tokenUrl:"https://oauth2.googleapis.com/token",clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",userAgent:(0,d.A9)()},i="2023-06-01",j={free:"TCACA_code_001_PqouKr6QWV",proMon:"TCACA_code_002_AkiJS3ZHF5",gift:"TCACA_code_006_DbXS0lrypC",activity:"TCACA_code_007_nzdH5h4Nl0",proYear:"TCACA_code_003_FAnt7lcmRT",freeMon:"TCACA_code_008_cfWoLwvjU4",extra:"TCACA_code_009_0XmEQc2xOf"};async function k(a,b=null){let{provider:c,accessToken:d,apiKey:e,providerSpecificData:f,projectId:g}=a,h={...f||{},...g?{projectId:g}:{}};switch(c){case"github":return await q(d,f,b);case"gemini-cli":return await s(d,h,b);case"antigravity":return await w(d,h,b);case"claude":return await z(d,b);case"codex":return await E(d,b);case"kiro":return await F(d,f,b);case"codebuddy":case"codebuddy-cn":return await m(d,f,b,e,c);case"qoder":return await R(d,b);case"autoclaw":return await S(d,b,a);case"qwen":return await G(d,f);case"iflow":return await H(d);case"ollama":return await I(d);case"glm":case"glm-cn":return await J(e,c,b);case"minimax":case"minimax-cn":return await Q(e,c,b);default:return{message:`Usage API not implemented for ${c}`}}}async function l(a,b={},c=null,d="codebuddy"){let f=b?.uid||b?.rawAuth?.uid;if(f)return{uid:f,enterpriseId:b?.enterpriseId||null};let g=b?.domain||b?.rawAuth?.domain||("codebuddy-cn"===d?"www.codebuddy.cn":"www.codebuddy.ai");try{let b=await (0,e.proxyAwareFetch)(`https://${g}/v2/plugin/accounts`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","X-Domain":g}},c);if(!b.ok)return{uid:null,enterpriseId:null};let d=await b.json(),f=d?.data?.accounts||[],h=f.find(a=>a.lastLogin)||f[0]||{};return{uid:h.uid||null,enterpriseId:h.enterpriseId||null}}catch{return{uid:null,enterpriseId:null}}}async function m(a,b={},c=null,d=null,f="codebuddy"){let g=b?.authMode==="generated-api-key",h=a||d,i=a?"oauth":d?"api-key":null;if(!h)return{plan:"CodeBuddy",message:"CodeBuddy upstream quota is unavailable because no valid IDE OAuth token or API key is stored.",quotas:{},trackingMode:"unavailable"};try{let a,k,{uid:m,enterpriseId:q}=await l(h,b,c,f),r=await (0,e.proxyAwareFetch)(function(a={},b="codebuddy"){let c=a?.domain||a?.rawAuth?.domain||("codebuddy-cn"===b?"www.codebuddy.cn":"www.codebuddy.ai");return`https://${c}/v2/billing/meter/get-user-resource`}(b,f),{method:"POST",headers:function(a,b={},c=null,d=null,e=null){let f={Authorization:`Bearer ${a}`,Accept:"application/json, text/plain, */*","Accept-Language":"zh-CN,zh;q=0.9","Content-Type":"application/json","X-Domain":b?.domain||b?.rawAuth?.domain||"www.codebuddy.ai"};return e&&(f["X-Api-Key"]=e),c&&(f["X-User-Id"]=c),d&&(f["X-Enterprise-Id"]=d,f["X-Tenant-Id"]=d),f}(h,b,m,q,d),body:JSON.stringify((a=new Date,(k=new Date(a)).setFullYear(k.getFullYear()+101),{PageNumber:1,PageSize:200,ProductCode:"p_tcaca",Status:[0,3],PackageCodes:Object.values(j),PackageEndTimeRangeBegin:o(a),PackageEndTimeRangeEnd:o(k)}))},c),s=await r.text(),t=null;try{t=s?JSON.parse(s):null}catch{t=null}if(401===r.status||403===r.status){if("oauth"===i)return{plan:"CodeBuddy",message:`CodeBuddy IDE OAuth token was rejected (${r.status}). Upstream quota is unavailable; use ZevaiRouter Usage for local request and token tracking.`,quotas:{},authMode:"oauth-rejected",trackingMode:"local-router"};return{plan:"CodeBuddy",message:"CodeBuddy chat key active. Upstream quota is unavailable without a valid IDE OAuth token; use ZevaiRouter Usage for local request and token tracking.",quotas:{},authMode:g?"generated-api-key":"api-key",trackingMode:"local-router"}}if(!r.ok)return{plan:"CodeBuddy",message:`CodeBuddy quota endpoint returned ${r.status}.`,quotas:{}};return{...function(a){let b=a?.data?.Response?.Data||a?.Response?.Data||a?.data||a||{},c=Array.isArray(b?.Accounts)?b.Accounts:Array.isArray(b?.accounts)?b.accounts:[];if(0===c.length)return{plan:"CodeBuddy",message:"CodeBuddy connected. No quota records were returned.",quotas:{}};let d={},e=!1;for(let a of c){var f,g;if(!a||"object"!=typeof a)continue;let b=function(a){switch(a){case j.free:case j.freeMon:case j.proMon:case j.proYear:return"Monthly Credits";case j.gift:return"Gift Credits";case j.extra:return"Extra Credits";case j.activity:return"Activity Credits";default:return a?"Other Credits":null}}(a.PackageCode);if(!b)continue;(a.PackageCode===j.proMon||a.PackageCode===j.proYear)&&(e=!0);let c=function(a){let b=p(a.CycleCapacitySizePrecise,a.CycleCapacitySize,a.CapacitySizePrecise,a.CapacitySize),c=p(a.CycleCapacityRemainPrecise,a.CapacityRemainPrecise,a.CapacityRemain),d=p(a.CapacityUsedPrecise,a.CapacityUsed,null!==b&&null!==c?Math.max(0,b-c):null);if(null===b&&null===c&&null===d)return null;let e=Math.max(0,b??(d??0)+(c??0)),f=Math.max(0,c??Math.max(0,e-(d??0))),g=Math.max(0,d??Math.max(0,e-f));return{total:e,remaining:f,used:g,resetAt:n(a.CycleEndTime||a.DeductionEndTime||a.ExpiredTime)}}(a);c&&(d[b]||(d[b]={used:0,total:0,remaining:0,resetAt:null,unit:"credits",unlimited:!1}),d[b].used+=c.used,d[b].total+=c.total,d[b].remaining+=c.remaining,d[b].resetAt=(f=d[b].resetAt,g=c.resetAt,f?g&&new Date(g).getTime()<new Date(f).getTime()?g:f:g||null))}if(0===Object.keys(d).length)return{plan:e?"Pro":"Free",message:"CodeBuddy connected. Unable to extract quota values.",quotas:{}};for(let a of Object.values(d))a.remainingPercentage=a.total>0?Math.max(0,Math.min(100,a.remaining/a.total*100)):0;return{plan:e?"Pro":"Free",quotas:d}}(t),authMode:i}}catch(a){return{plan:"CodeBuddy",message:`CodeBuddy connected. Unable to fetch quota: ${a.message}`,quotas:{}}}}function n(a){if(!a)return null;try{if(a instanceof Date)return a.toISOString();if("number"==typeof a)return new Date(a<1e12?1e3*a:a).toISOString();if("string"==typeof a){if(/^\d+$/.test(a)){let b=Number(a);return new Date(b<1e12?1e3*b:b).toISOString()}return new Date(a).toISOString()}return null}catch(b){return console.warn(`Failed to parse reset time: ${a}`,b),null}}function o(a){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}-${b(a.getMonth()+1)}-${b(a.getDate())} ${b(a.getHours())}:${b(a.getMinutes())}:${b(a.getSeconds())}`}function p(...a){for(let b of a){if(null==b||""===b)continue;let a=Number(b);if(Number.isFinite(a))return a}return null}async function q(a,b,c=null){try{if(!a)throw Error("No GitHub access token available. Please re-authorize the connection.");let b=await (0,e.proxyAwareFetch)("https://api.github.com/copilot_internal/user",{headers:{Authorization:`token ${a}`,Accept:"application/json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"GitHubCopilotChat/0.26.7","Editor-Version":"vscode/1.100.0","Editor-Plugin-Version":"copilot-chat/0.26.7"}},c);if(!b.ok){let a=await b.text();throw Error(`GitHub API error: ${a}`)}let d=await b.json();if(d.quota_snapshots){let a=d.quota_snapshots,b=n(d.quota_reset_date);return{plan:d.copilot_plan,resetDate:d.quota_reset_date,quotas:{chat:{...r(a.chat),resetAt:b},completions:{...r(a.completions),resetAt:b},premium_interactions:{...r(a.premium_interactions),resetAt:b}}}}if(d.monthly_quotas||d.limited_user_quotas){let a=d.monthly_quotas||{},b=d.limited_user_quotas||{},c=n(d.limited_user_reset_date);return{plan:d.copilot_plan||d.access_type_sku,resetDate:d.limited_user_reset_date,quotas:{chat:{used:b.chat||0,total:a.chat||0,unlimited:!1,resetAt:c},completions:{used:b.completions||0,total:a.completions||0,unlimited:!1,resetAt:c}}}}return{message:"GitHub Copilot connected. Unable to parse quota data."}}catch(a){throw Error(`Failed to fetch GitHub usage: ${a.message}`)}}function r(a){return a?{used:a.entitlement-a.remaining,total:a.entitlement,remaining:a.remaining,unlimited:a.unlimited||!1}:{used:0,total:0,unlimited:!0}}async function s(a,b,c=null){if(!a)return{plan:"Free",message:"Gemini CLI access token not available."};try{let d,f=t(b?.projectId),g="Free";if(!f){let b=await u(a,c);f=t(b?.cloudaicompanionProject),g=b?.currentTier?.name||g}if(!f)return{plan:g,message:"Gemini CLI project ID not available. Reconnect Gemini CLI, or configure a Google Cloud project with Gemini Code Assist access before checking quota."};let h=new AbortController,i=setTimeout(()=>h.abort(),1e4);try{d=await (0,e.proxyAwareFetch)("https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuota",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({project:f}),signal:h.signal},c)}finally{clearTimeout(i)}if(!d.ok)return{plan:g,message:`Gemini CLI quota error (${d.status}).`};let j=await d.json(),k={};if(Array.isArray(j.buckets))for(let a of j.buckets){if(!a.modelId||null==a.remainingFraction)continue;let b=Number(a.remainingFraction)||0,c=Math.round(1e3*b),d=Math.max(0,1e3-c);k[a.modelId]={used:d,total:1e3,resetAt:n(a.resetTime),remainingPercentage:100*b,unlimited:!1}}return{plan:g,quotas:k}}catch(a){return{message:`Gemini CLI error: ${a.message}`}}}function t(a){return"string"==typeof a?a.trim()||null:a&&"object"==typeof a&&"string"==typeof a.id&&a.id.trim()||null}async function u(a,b=null){let c=new AbortController,f=setTimeout(()=>c.abort(),1e4);try{let f=await (0,e.proxyAwareFetch)("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:d.Cn}),signal:c.signal},b);if(!f.ok)return null;return await f.json()}catch{return null}finally{clearTimeout(f)}}async function v(a,b,c,d){let f=null;for(let g of h.quotaApiHosts){let i=new AbortController,j=setTimeout(()=>i.abort(),1e4);try{let j=await (0,e.proxyAwareFetch)(`${g}${a}`,{method:"POST",headers:{Authorization:`Bearer ${b}`,"User-Agent":h.userAgent,"Content-Type":"application/json","x-request-source":"local"},body:JSON.stringify(c||{}),signal:i.signal},d);if(j.ok||401===j.status||403===j.status)return{response:j,host:g};f=Error(`Antigravity API error: ${j.status}`)}catch(a){f=a}finally{clearTimeout(j)}}if(f)throw f;throw Error("Antigravity API unavailable")}async function w(a,b,c=null){try{let d,e=t(b?.projectId),f=null,g=e;g||(f=await y(a,c),g=t(f?.cloudaicompanionProject));try{d=await v(h.fetchAvailableModelsPath,a,g?{project:g}:{},c)}catch(a){return{message:`Antigravity quota unavailable: ${a.message}. Chat may still work.`}}let i=d.response;if(401===i.status){let a=await x(b,c);if(a)return{accountDead:!0,message:`Antigravity account ${a}. Reconnect won't help \u2014 recreate the account.`,quotas:{}};return{message:"Antigravity quota API authentication expired. Chat may still work.",quotas:{}}}if(403===i.status)return{message:"Antigravity quota API access forbidden (tier may not expose quota). Chat may still work.",quotas:{}};if(!i.ok)throw Error(`Antigravity API error: ${i.status}`);let j=await i.json(),k=new Map;try{let b=await v(h.retrieveUserQuotaPath,a,g?{project:g}:{},c);if(b.response.ok){let a=await b.response.json();if(Array.isArray(a.buckets))for(let b of a.buckets){let a=String(b.modelId||"").trim();a&&k.set(a,b)}}}catch{}let l={};if(j.models){let a=["gemini-3-flash-agent","gemini-3.5-flash-low","gemini-3.5-flash-extra-low","gemini-pro-agent","gemini-3.1-pro-low","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3-flash"];for(let[b,c]of Object.entries(j.models)){if(c.isInternal||!a.includes(b))continue;let d=k.get(b),e=d||c.quotaInfo;if(!e)continue;let f=Number(e.remainingFraction)||0,g=100*f,h=Math.round(1e3*f),i=Math.max(0,1e3-h);l[b]={used:i,total:1e3,resetAt:n(e.resetTime),remainingPercentage:g,unlimited:!1,displayName:c.displayName||b,quotaSource:d?"retrieveUserQuota":"fetchAvailableModels"}}}return{plan:f?.currentTier?.name||"Unknown",quotas:l,subscriptionInfo:f}}catch(a){return console.error("[Antigravity Usage] Error:",a.message,a.cause),{message:`Antigravity error: ${a.message}`}}}async function x(a,b=null){let c=a?.refreshToken;if(!c)return null;try{let a,d=new AbortController,f=setTimeout(()=>d.abort(),1e4);try{a=await (0,e.proxyAwareFetch)(h.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:h.clientId,client_secret:h.clientSecret,refresh_token:c,grant_type:"refresh_token"}),signal:d.signal},b)}finally{clearTimeout(f)}if(a.ok)return null;let g=await a.json().catch(()=>({}));if("invalid_grant"===g.error){let a=(g.error_description||"").toLowerCase();if(a.includes("deleted"))return"has been deleted";if(a.includes("disabled")||a.includes("suspend"))return"is disabled/suspended";return"authorization was revoked"}return null}catch{return null}}async function y(a,b=null){let c=new AbortController,f=setTimeout(()=>c.abort(),1e4);try{let f=await (0,e.proxyAwareFetch)(h.loadProjectApiUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":h.userAgent,"Content-Type":"application/json","x-request-source":"local"},body:JSON.stringify({metadata:d.Cn,mode:1}),signal:c.signal},b);if(!f.ok)return null;return await f.json()}catch(a){return console.error("[Antigravity Subscription] Error:",a.message),null}finally{clearTimeout(f)}}async function z(a,b=null){try{let c=await (0,e.proxyAwareFetch)("https://api.anthropic.com/api/oauth/usage",{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":i}},b);if(c.ok){let a=await c.json(),b={},d=a=>a&&"object"==typeof a&&"number"==typeof a.utilization,e=a=>{let b=a.utilization,c=Math.max(0,100-b);return{used:b,total:100,remaining:c,remainingPercentage:c,resetAt:n(a.resets_at),unlimited:!1}};for(let[c,f]of(d(a.five_hour)&&(b["session (5h)"]=e(a.five_hour)),d(a.seven_day)&&(b["weekly (7d)"]=e(a.seven_day)),Object.entries(a)))if(c.startsWith("seven_day_")&&"seven_day"!==c&&d(f)){let a=c.replace("seven_day_","");b[`weekly ${a} (7d)`]=e(f)}return{plan:"Claude Code",extraUsage:a.extra_usage??null,quotas:b}}return console.warn(`[Claude Usage] OAuth endpoint returned ${c.status}, falling back to legacy`),await A(a,b)}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}async function A(a,b=null){try{let c=await (0,e.proxyAwareFetch)("https://api.anthropic.com/v1/settings",{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":i}},b);if(c.ok){let d=await c.json();if(d.organization_id){let c=await (0,e.proxyAwareFetch)("https://api.anthropic.com/v1/organizations/{org_id}/usage".replace("{org_id}",d.organization_id),{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":i}},b);if(c.ok){let a=await c.json();return{plan:d.plan||"Unknown",organization:d.organization_name,quotas:a}}}return{plan:d.plan||"Unknown",organization:d.organization_name,message:"Claude connected. Usage details require admin access."}}return{message:"Claude connected. Usage API requires admin permissions."}}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}function B(a){return!a||"object"!=typeof a||Array.isArray(a)?null:a.rate_limit&&"object"==typeof a.rate_limit?a.rate_limit:a}function C(a){let b=Math.max(0,Math.min(100,function(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}(a?.used_percent??a?.percent_used,0)));return{used:b,total:100,remaining:Math.max(0,100-b),resetAt:n(a?.reset_at??a?.resets_at??a?.resetAt??null),unlimited:!1}}function D(a,b,c){let d=B(c);if(!d)return!1;let e=d.primary_window||d.primary||c.primary_window||c.primary,f=d.secondary_window||d.secondary||c.secondary_window||c.secondary,g=!1;return e&&(a[b?`${b}_session`:"session"]=C(e),g=!0),f&&(a[b?`${b}_weekly`:"weekly"]=C(f),g=!0),g}async function E(a,b=null){try{let c=await (0,e.proxyAwareFetch)("https://chatgpt.com/backend-api/wham/usage",{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Codex connected. Usage API temporarily unavailable (${c.status}).`};let d=await c.json(),f=d.rate_limit||d.rate_limits||d.rate_limits_by_limit_id?.codex||{},g=function(a){if(a.code_review_rate_limit||a.review_rate_limit)return a.code_review_rate_limit||a.review_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b.code_review||b.codex_review||b.review||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return"code_review"===b||"codex_review"===b||"review"===b||b.includes("review")})||null}(d),h={};return D(h,"",f),D(h,"review",g),{plan:d.plan_type||d.summary?.plan||"unknown",limitReached:B(f)?.limit_reached||!1,reviewLimitReached:B(g)?.limit_reached||!1,quotas:h}}catch(a){throw Error(`Failed to fetch Codex usage: ${a.message}`)}}async function F(a,b,c=null){let d=b?.profileArn||"arn:aws:codewhisperer:us-east-1:638616132270:profile/AAAACCCCXXXX",f=b?.authMethod||"builder-id",g=new URLSearchParams({isEmailRequired:"true",origin:"AI_EDITOR",resourceType:"AGENTIC_REQUEST"}),h=!1,i=[];for(let b of[{name:"codewhisperer-get",run:async()=>(0,e.proxyAwareFetch)(`https://codewhisperer.us-east-1.amazonaws.com/getUsageLimits?${g.toString()}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","x-amz-user-agent":"aws-sdk-js/1.0.0 KiroIDE","user-agent":"aws-sdk-js/1.0.0 KiroIDE"}},c)},{name:"codewhisperer-post",run:async()=>(0,e.proxyAwareFetch)("https://codewhisperer.us-east-1.amazonaws.com",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.GetUsageLimits",Accept:"application/json"},body:JSON.stringify({origin:"AI_EDITOR",profileArn:d,resourceType:"AGENTIC_REQUEST"})},c)},{name:"q-get",run:async()=>{let b=new URLSearchParams({origin:"AI_EDITOR",profileArn:d,resourceType:"AGENTIC_REQUEST"});return(0,e.proxyAwareFetch)(`https://q.us-east-1.amazonaws.com/getUsageLimits?${b}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c)}}])try{let a=await b.run();if(!a.ok){let c=await a.text().catch(()=>"");(401===a.status||403===a.status)&&(h=!0),i.push(`${b.name}:${a.status}${c?`:${c}`:""}`);continue}let c=await a.json();return function(a){let b=a.usageBreakdownList||[],c={},d=n(a.nextDateReset||a.resetDate);return b.forEach(a=>{let b=a.resourceType?.toLowerCase()||"unknown",e=a.currentUsageWithPrecision||0,f=a.usageLimitWithPrecision||0;if(c[b]={used:e,total:f,remaining:f-e,resetAt:d,unlimited:!1},a.freeTrialInfo){let e=a.freeTrialInfo.currentUsageWithPrecision||0,f=a.freeTrialInfo.usageLimitWithPrecision||0;c[`${b}_freetrial`]={used:e,total:f,remaining:f-e,resetAt:n(a.freeTrialInfo.freeTrialExpiry||d),unlimited:!1}}}),{plan:a.subscriptionInfo?.subscriptionTitle||"Kiro",quotas:c}}(c)}catch(a){i.push(`${b.name}:${a.message}`)}return h&&"idc"===f?{message:"Kiro quota API is unavailable for the current AWS IAM Identity Center session. Chat may still work. If this persists after renewing your session, reconnect Kiro.",quotas:{}}:h&&("google"===f||"github"===f)?{message:"Kiro quota API authentication expired. Chat may still work.",quotas:{}}:h?{message:"Kiro quota API rejected the current token. Chat may still work.",quotas:{}}:{message:i.length>0?`Unable to fetch Kiro usage right now. (${i[i.length-1]})`:"Unable to fetch Kiro usage right now.",quotas:{}}}async function G(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 H(a){try{return{message:"iFlow connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch iFlow usage."}}}async function I(a,b){try{return{plan:b?.plan||"Free",message:"Ollama Cloud uses a free tier with light usage limits (resets every 5h & 7d). For detailed usage tracking, visit ollama.com/settings/keys.",quotas:[]}}catch(a){return{message:"Unable to fetch Ollama Cloud usage."}}}async function J(a,b,c=null){if(!a)return{message:"GLM API key not available."};let d=f["glm-cn"===b?"china":"international"];try{let b=await (0,e.proxyAwareFetch)(d,{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(!b.ok){if(401===b.status)return{message:"GLM API key invalid or expired."};return{message:`GLM quota API error (${b.status}).`}}let f=await b.json(),g=f?.data&&"object"==typeof f.data?f.data:{},h=Array.isArray(g.limits)?g.limits:[],i={};for(let a of h){if(!a||"TOKENS_LIMIT"!==a.type)continue;let b=Number(a.percentage)||0,c=Number(a.nextResetTime)||0,d=Math.max(0,100-b);i.session={used:b,total:100,remaining:d,remainingPercentage:d,resetAt:c>0?new Date(c).toISOString():null,unlimited:!1}}let j="string"==typeof g.level?g.level:"";return{plan:j?j.charAt(0).toUpperCase()+j.slice(1).toLowerCase():"Unknown",quotas:i}}catch(a){return{message:`GLM error: ${a.message}`}}}function K(a,b,c){return a&&"object"==typeof a?a[b]??a[c]??null:null}function L(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 M(a){return Math.max(0,Number(K(a,"current_interval_total_count","currentIntervalTotalCount"))||0)}function N(a){return Math.max(0,Number(K(a,"current_weekly_total_count","currentWeeklyTotalCount"))||0)}function O(a){return!!(M(a)>0||N(a)>0)||null!==L(a,"current_interval_remaining_percent","currentIntervalRemainingPercent")||null!==L(a,"current_weekly_remaining_percent","currentWeeklyRemainingPercent")}function P(a,b,c,d,e,f,g,h,i,j){let k=d(c),l=L(c,g,h);if(k<=0&&null===l)return;let m=Math.max(0,Number(K(c,e,f))||0),o=k,p=m;k<=0&&(o=100,p=j?Math.round(l/100*o):Math.round(o*(1-l/100))),a[b]=function(a,b,c,d,e=null){var f,g,h;let i=Math.max(0,a),j=d?Math.max(i-b,0):Math.min(Math.max(0,b),i),k=Math.max(i-j,0),l=(f=e,g=k,h=i,null!=f&&Number.isFinite(f)?Math.max(0,Math.min(100,f)):h>0?Math.max(0,Math.min(100,g/h*100)):0);return{used:j,total:i,remaining:k,remainingPercentage:l,resetAt:c,unlimited:!1}}(o,p,function(a,b,c,d,e,f){let g=Number(K(a,c,d))||0;return g>0?new Date(b+g).toISOString():n(K(a,e,f))}(c,...i),j,l)}async function Q(a,b,c=null){if(!a)return{message:"MiniMax API key not available."};let d=g[b]||[],f="";for(let b=0;b<d.length;b+=1){let g=d[b],h=b<d.length-1;try{let b=await (0,e.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"}},c),d=await b.text(),i={};if(d)try{i=JSON.parse(d)}catch{i={}}let j=(i?.base_resp??i?.baseResp)||{},k=Number(j.status_code??j.statusCode)||0,l=String(j.status_msg??j.statusMsg??"").trim(),m=`${l} ${d}`.trim(),n=/token plan|coding plan|invalid api key|invalid key|unauthorized|inactive/i;if(401===b.status||403===b.status||1004===k||n.test(m))return{message:"MiniMax API key invalid or inactive. Use an active Token/Coding Plan key."};if(!b.ok){if(f=`MiniMax usage endpoint error (${b.status})`,(404===b.status||405===b.status||b.status>=500)&&h)continue;return{message:`MiniMax connected. ${f}`}}if(0!==k)return{message:`MiniMax connected. ${l||"Upstream quota API error"}`};let o=i?.model_remains??i?.modelRemains,p=(Array.isArray(o)?o:[]).filter(O);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(K(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);P(s,`${b} (5h)`,a,M,"current_interval_usage_count","currentIntervalUsageCount","current_interval_remaining_percent","currentIntervalRemainingPercent",[q,"remains_time","remainsTime","end_time","endTime"],r),P(s,`${b} (7d)`,a,N,"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 R(a,b=null){if(!a)return{message:"Qoder usage unavailable: no access token"};try{let c=await (0,e.proxyAwareFetch)("https://openapi.qoder.sh/api/v2/quota/usage",{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Qoder connected. Usage fetch returned ${c.status}.`};let d=await c.json().catch(()=>null);if(!d)return{message:"Qoder connected. Usage response was not JSON."};let f=d.userQuota||{},g=d.orgResourcePackage||{},h=Number.isFinite(Number(d.expiresAt))&&Number(d.expiresAt)>0?Number(d.expiresAt):null,i=h?new Date(h).toISOString():null;return{quotas:{user:{total:Number(f.total)||0,used:Number(f.used)||0,remaining:Number(f.remaining)||0,unit:f.unit||"credits",resetAt:i},organization:{total:Number(g.total)||0,used:Number(g.used)||0,remaining:Number(g.remaining)||0,unit:g.unit||"credits",resetAt:i}},totalUsagePercentage:Number(d.totalUsagePercentage)||0,isQuotaExceeded:!!d.isQuotaExceeded,expiresAt:h}}catch(a){return{message:`Qoder connected. Unable to fetch usage: ${a.message}`}}}async function S(a,b=null,d=null){if(!a)return{message:"AutoClaw usage unavailable: no access token"};try{let{AUTOCLAW_WALLET_ENDPOINT:f,buildAutoClawWalletHeaders:g}=await Promise.resolve().then(c.bind(c,42693)),h=await (0,e.proxyAwareFetch)(f,{method:"GET",headers:g(a)},b);if(!h.ok)return{message:`AutoClaw connected. Usage fetch returned ${h.status}.`};let i=await h.json().catch(()=>null);if(!i||0!==i.code)return{message:"AutoClaw connected. Unable to read balance."};let j=Number(i.data?.total_balance),k=Number.isFinite(j)?j:0,l=k;try{if(d?.id){let{getQuotaSnapshot:a}=await Promise.resolve().then(c.bind(c,89718)),b=await a(d.id),e=Number(b?.usage?.quotas?.points?.total)||0,f=Number(b?.usage?.quotas?.points?.remaining);l=Math.max(e,k,Number.isFinite(f)?f:0)}}catch{}let m=Math.max(0,l-k);return{quotas:{points:{total:l,used:m,remaining:k,unit:"points",resetAt:null}},totalUsagePercentage:l>0?Math.round(m/l*100):0,isQuotaExceeded:k<=0}}catch(a){return{message:`AutoClaw connected. Unable to fetch balance: ${a.message}`}}}}};
|
|
1
|
+
"use strict";exports.id=2777,exports.ids=[1998,2777],exports.modules={19225:(a,b,c)=>{a.exports=c(44870)},39326:(a,b,c)=>{c.d(b,{B:()=>h,p:()=>g});var d=c(71998);function e(a){return null==a?"":String(a).trim()}let f=new Map;function g(a,b,c){if(!a||0===a.length)return null;if(1===a.length)return a[0];if("round-robin"===b){let b=f.get(c)||{index:-1};return b.index=(b.index+1)%a.length,f.set(c,b),a[b.index]}return"random"===b?a[Math.floor(Math.random()*a.length)]:a[0]}async function h(a={}){try{let b=e(a?.proxyPoolId),c="__none__"===b?"":b,f=function(a={}){let b=a?.connectionProxyEnabled===!0,c=e(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:e(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=e(a?.proxyUrl),f=e(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type||"cloudflare"===a.type||"deno"===a.type)return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:f,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:f,strictProxy:!0===a.strictProxy}}}if(f.connectionProxyEnabled&&f.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...f};return{source:"none",proxyPoolId:c||null,proxyPool:null,...f}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},61188:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{NS:()=>m,dg:()=>n});var e=c(48895),f=c(89718),g=c(99675),h=c(55330),i=c(39326),j=c(75681),k=a([e,h]);[e,h]=k.then?(await k)():k;let o=["expired","authentication","unauthorized","401","re-authorize"];async function l(a,b=!1,c=null){let d=(0,h.SB)(a.provider),e={accessToken:a.accessToken,refreshToken:a.refreshToken,idToken:a.idToken,expiresAt:a.expiresAt||a.tokenExpiresAt,lastRefreshAt:a.lastRefreshAt,connectionId:a.id,providerSpecificData:a.providerSpecificData,copilotToken:a.providerSpecificData?.copilotToken,copilotTokenExpiresAt:a.providerSpecificData?.copilotTokenExpiresAt};if(!(b||d.needsRefresh(e)))return{connection:a,refreshed:!1};let g=await d.refreshCredentials(e,console,c);if(!g){if(a.accessToken)return{connection:a,refreshed:!1};throw Error("Failed to refresh credentials. Please re-authorize the connection.")}let i={updatedAt:new Date().toISOString()};g.accessToken&&(i.accessToken=g.accessToken),g.refreshToken&&(i.refreshToken=g.refreshToken),g.idToken&&(i.idToken=g.idToken),g.lastRefreshAt&&(i.lastRefreshAt=g.lastRefreshAt),g.expiresIn?(i.expiresAt=new Date(Date.now()+1e3*g.expiresIn).toISOString(),i.expiresIn=g.expiresIn):g.expiresAt&&(i.expiresAt=g.expiresAt);let j={...g.providerSpecificData||{},...g.copilotToken?{copilotToken:g.copilotToken}:{},...g.copilotTokenExpiresAt?{copilotTokenExpiresAt:g.copilotTokenExpiresAt}:{}};return Object.keys(j).length>0&&(i.providerSpecificData={...a.providerSpecificData||{},...j}),await (0,f.updateProviderConnection)(a.id,i),{connection:{...a,...i,providerSpecificData:i.providerSpecificData||a.providerSpecificData},refreshed:!0}}function m(a){var b;let c;if(!a)return!1;let d=(b=a.authType,c=String(b||"").toLowerCase().trim(),"api-key"===c||"api_key"===c||"api key"===c?"apikey":c);return"oauth"===d||"apikey"===d&&j.jO.includes(a.provider)}async function n(a,b={}){let{writeCache:c=!1,force:d=!1}=b,e=await (0,f.Mc)(a);if(!e)return{error:"Connection not found",notFound:!0};if(!m(e))return{message:"Usage not available for this connection"};let h=await (0,i.B)(e.providerSpecificData),j={connectionProxyEnabled:!0===h.connectionProxyEnabled,connectionProxyUrl:h.connectionProxyUrl||"",connectionNoProxy:h.connectionNoProxy||"",vercelRelayUrl:h.vercelRelayUrl||"",strictProxy:!1},k=e,p="oauth"===k.authType;p&&(k=(await l(k,d,j)).connection);let q=await (0,g.my)(k,j);if(p&&function(a){if(!a?.message)return!1;let b=a.message.toLowerCase();return o.some(a=>b.includes(a))}(q)&&k.refreshToken)try{k=(await l(k,!0,j)).connection,q=await (0,g.my)(k,j)}catch(a){console.warn(`[Usage] ${k.provider}: force refresh failed: ${a.message}`)}if(c&&q&&!q.error)try{await (0,f.KK)(k.id,k.provider,q)}catch(a){console.warn(`[QuotaCache] save failed for ${k.id}: ${a.message}`)}return q}d()}catch(a){d(a)}})},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,KK:()=>d.KK,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,NR:()=>d.NR,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,QI:()=>d.QI,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,dK:()=>d.dK,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,getQuotaSnapshot:()=>d.LF,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,p3:()=>d.p3,qd:()=>d.qd,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yW:()=>d.yW,yg:()=>d.yg,zP:()=>d.zP,zY:()=>d.zY});var d=c(93999)},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}},99675:(a,b,c)=>{c.d(b,{my:()=>k});var d=c(75924),e=c(39609);let f={international:"https://api.z.ai/api/monitor/usage/quota/limit",china:"https://open.bigmodel.cn/api/monitor/usage/quota/limit"},g={minimax:["https://www.minimax.io/v1/token_plan/remains","https://api.minimax.io/v1/api/openplatform/coding_plan/remains"],"minimax-cn":["https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains","https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains"]},h={quotaApiHosts:["https://daily-cloudcode-pa.googleapis.com","https://cloudcode-pa.googleapis.com","https://daily-cloudcode-pa.sandbox.googleapis.com"],fetchAvailableModelsPath:"/v1internal:fetchAvailableModels",retrieveUserQuotaPath:"/v1internal:retrieveUserQuota",loadProjectApiUrl:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",tokenUrl:"https://oauth2.googleapis.com/token",clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",userAgent:(0,d.A9)()},i="2023-06-01",j={free:"TCACA_code_001_PqouKr6QWV",proMon:"TCACA_code_002_AkiJS3ZHF5",gift:"TCACA_code_006_DbXS0lrypC",activity:"TCACA_code_007_nzdH5h4Nl0",proYear:"TCACA_code_003_FAnt7lcmRT",freeMon:"TCACA_code_008_cfWoLwvjU4",extra:"TCACA_code_009_0XmEQc2xOf"};async function k(a,b=null){let{provider:c,accessToken:d,apiKey:e,providerSpecificData:f,projectId:g}=a,h={...f||{},...g?{projectId:g}:{}};switch(c){case"github":return await q(d,f,b);case"gemini-cli":return await s(d,h,b);case"antigravity":return await w(d,h,b);case"claude":return await z(d,b);case"codex":return await F(d,b);case"kiro":return await G(d,f,b);case"codebuddy":case"codebuddy-cn":return await m(d,f,b,e,c);case"qoder":return await S(d,b);case"autoclaw":return await T(d,b,a);case"qwen":return await H(d,f);case"iflow":return await I(d);case"ollama":return await J(d);case"glm":case"glm-cn":return await K(e,c,b);case"minimax":case"minimax-cn":return await R(e,c,b);case"grok-cli":return await V(d,f,b);default:return{message:`Usage API not implemented for ${c}`}}}async function l(a,b={},c=null,d="codebuddy"){let f=b?.uid||b?.rawAuth?.uid;if(f)return{uid:f,enterpriseId:b?.enterpriseId||null};let g=b?.domain||b?.rawAuth?.domain||("codebuddy-cn"===d?"www.codebuddy.cn":"www.codebuddy.ai");try{let b=await (0,e.proxyAwareFetch)(`https://${g}/v2/plugin/accounts`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","X-Domain":g}},c);if(!b.ok)return{uid:null,enterpriseId:null};let d=await b.json(),f=d?.data?.accounts||[],h=f.find(a=>a.lastLogin)||f[0]||{};return{uid:h.uid||null,enterpriseId:h.enterpriseId||null}}catch{return{uid:null,enterpriseId:null}}}async function m(a,b={},c=null,d=null,f="codebuddy"){let g=b?.authMode==="generated-api-key",h=a||d,i=a?"oauth":d?"api-key":null;if(!h)return{plan:"CodeBuddy",message:"CodeBuddy upstream quota is unavailable because no valid IDE OAuth token or API key is stored.",quotas:{},trackingMode:"unavailable"};try{let a,k,{uid:m,enterpriseId:q}=await l(h,b,c,f),r=await (0,e.proxyAwareFetch)(function(a={},b="codebuddy"){let c=a?.domain||a?.rawAuth?.domain||("codebuddy-cn"===b?"www.codebuddy.cn":"www.codebuddy.ai");return`https://${c}/v2/billing/meter/get-user-resource`}(b,f),{method:"POST",headers:function(a,b={},c=null,d=null,e=null){let f={Authorization:`Bearer ${a}`,Accept:"application/json, text/plain, */*","Accept-Language":"zh-CN,zh;q=0.9","Content-Type":"application/json","X-Domain":b?.domain||b?.rawAuth?.domain||"www.codebuddy.ai"};return e&&(f["X-Api-Key"]=e),c&&(f["X-User-Id"]=c),d&&(f["X-Enterprise-Id"]=d,f["X-Tenant-Id"]=d),f}(h,b,m,q,d),body:JSON.stringify((a=new Date,(k=new Date(a)).setFullYear(k.getFullYear()+101),{PageNumber:1,PageSize:200,ProductCode:"p_tcaca",Status:[0,3],PackageCodes:Object.values(j),PackageEndTimeRangeBegin:o(a),PackageEndTimeRangeEnd:o(k)}))},c),s=await r.text(),t=null;try{t=s?JSON.parse(s):null}catch{t=null}if(401===r.status||403===r.status){if("oauth"===i)return{plan:"CodeBuddy",message:`CodeBuddy IDE OAuth token was rejected (${r.status}). Upstream quota is unavailable; use ZevaiRouter Usage for local request and token tracking.`,quotas:{},authMode:"oauth-rejected",trackingMode:"local-router"};return{plan:"CodeBuddy",message:"CodeBuddy chat key active. Upstream quota is unavailable without a valid IDE OAuth token; use ZevaiRouter Usage for local request and token tracking.",quotas:{},authMode:g?"generated-api-key":"api-key",trackingMode:"local-router"}}if(!r.ok)return{plan:"CodeBuddy",message:`CodeBuddy quota endpoint returned ${r.status}.`,quotas:{}};return{...function(a){let b=a?.data?.Response?.Data||a?.Response?.Data||a?.data||a||{},c=Array.isArray(b?.Accounts)?b.Accounts:Array.isArray(b?.accounts)?b.accounts:[];if(0===c.length)return{plan:"CodeBuddy",message:"CodeBuddy connected. No quota records were returned.",quotas:{}};let d=a=>{let b=n(a.CycleEndTime);return b?new Date(b).getTime():1/0},e=a=>{let b=d(a),c=Number(a.DeductionEndTime);return Number.isFinite(b)&&Number.isFinite(c)&&c-b>1728e5},f=(a,b)=>d(a)-d(b),g=c.filter(e).sort(f),h=c.filter(a=>!e(a)).sort(f),i={},k=!1,l=(a,b,{recurring:c})=>{var d,e;let f=function(a,{useCycle:b=!0}={}){let c=b?p(a.CycleCapacitySizePrecise,a.CycleCapacitySize,a.CapacitySizePrecise,a.CapacitySize):p(a.CapacitySizePrecise,a.CapacitySize,a.CycleCapacitySizePrecise,a.CycleCapacitySize),d=b?p(a.CycleCapacityRemainPrecise,a.CapacityRemainPrecise,a.CapacityRemain):p(a.CapacityRemainPrecise,a.CapacityRemain,a.CycleCapacityRemainPrecise),e=p(a.CapacityUsedPrecise,a.CapacityUsed,null!==c&&null!==d?Math.max(0,c-d):null);if(null===c&&null===d&&null===e)return null;let f=Math.max(0,c??(e??0)+(d??0)),g=Math.max(0,d??Math.max(0,f-(e??0))),h=Math.max(0,e??Math.max(0,f-g));return{total:f,remaining:g,used:h,resetAt:n(a.CycleEndTime||a.DeductionEndTime||a.ExpiredTime)}}(b,{useCycle:c});f&&((b.PackageCode===j.proMon||b.PackageCode===j.proYear)&&(k=!0),i[a]||(i[a]={used:0,total:0,remaining:0,resetAt:null,unit:"credits",unlimited:!1,recurring:c}),i[a].used+=f.used,i[a].total+=f.total,i[a].remaining+=f.remaining,i[a].resetAt=(d=i[a].resetAt,e=f.resetAt,d?e&&new Date(e).getTime()<new Date(d).getTime()?e:d:e||null),i[a].recurring=i[a].recurring&&c)};for(let a of g)l("Monthly Credits",a,{recurring:!0});for(let a of h)l("Bonus Credits",a,{recurring:!1});if(h.length>0&&i["Bonus Credits"]&&(i["Bonus Credits"].packCount=h.length),0===Object.keys(i).length)for(let a of c){if(!a||"object"!=typeof a)continue;let b=function(a){switch(a){case j.free:case j.freeMon:case j.proMon:case j.proYear:return"Monthly Credits";case j.gift:return"Gift Credits";case j.extra:return"Extra Credits";case j.activity:return"Activity Credits";default:return a?"Other Credits":null}}(a.PackageCode)||"Other Credits",c="Activity Credits"!==b&&"Gift Credits"!==b;l(c?"Monthly Credits":"Bonus Credits",a,{recurring:c})}if(0===Object.keys(i).length)return{plan:k?"Pro":"Free",message:"CodeBuddy connected. Unable to extract quota values.",quotas:{}};for(let a of Object.values(i))a.remainingPercentage=a.total>0?Math.max(0,Math.min(100,a.remaining/a.total*100)):0;return{plan:k?"Pro":"Free",quotas:i}}(t),authMode:i}}catch(a){return{plan:"CodeBuddy",message:`CodeBuddy connected. Unable to fetch quota: ${a.message}`,quotas:{}}}}function n(a){if(!a)return null;try{if(a instanceof Date)return a.toISOString();if("number"==typeof a)return new Date(a<1e12?1e3*a:a).toISOString();if("string"==typeof a){if(/^\d+$/.test(a)){let b=Number(a);return new Date(b<1e12?1e3*b:b).toISOString()}return new Date(a).toISOString()}return null}catch(b){return console.warn(`Failed to parse reset time: ${a}`,b),null}}function o(a){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}-${b(a.getMonth()+1)}-${b(a.getDate())} ${b(a.getHours())}:${b(a.getMinutes())}:${b(a.getSeconds())}`}function p(...a){for(let b of a){if(null==b||""===b)continue;let a=Number(b);if(Number.isFinite(a))return a}return null}async function q(a,b,c=null){try{if(!a)throw Error("No GitHub access token available. Please re-authorize the connection.");let b=await (0,e.proxyAwareFetch)("https://api.github.com/copilot_internal/user",{headers:{Authorization:`token ${a}`,Accept:"application/json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"GitHubCopilotChat/0.26.7","Editor-Version":"vscode/1.100.0","Editor-Plugin-Version":"copilot-chat/0.26.7"}},c);if(!b.ok){let a=await b.text();throw Error(`GitHub API error: ${a}`)}let d=await b.json();if(d.quota_snapshots){let a=d.quota_snapshots,b=n(d.quota_reset_date);return{plan:d.copilot_plan,resetDate:d.quota_reset_date,quotas:{chat:{...r(a.chat),resetAt:b},completions:{...r(a.completions),resetAt:b},premium_interactions:{...r(a.premium_interactions),resetAt:b}}}}if(d.monthly_quotas||d.limited_user_quotas){let a=d.monthly_quotas||{},b=d.limited_user_quotas||{},c=n(d.limited_user_reset_date);return{plan:d.copilot_plan||d.access_type_sku,resetDate:d.limited_user_reset_date,quotas:{chat:{used:b.chat||0,total:a.chat||0,unlimited:!1,resetAt:c},completions:{used:b.completions||0,total:a.completions||0,unlimited:!1,resetAt:c}}}}return{message:"GitHub Copilot connected. Unable to parse quota data."}}catch(a){throw Error(`Failed to fetch GitHub usage: ${a.message}`)}}function r(a){return a?{used:a.entitlement-a.remaining,total:a.entitlement,remaining:a.remaining,unlimited:a.unlimited||!1}:{used:0,total:0,unlimited:!0}}async function s(a,b,c=null){if(!a)return{plan:"Free",message:"Gemini CLI access token not available."};try{let d,f=t(b?.projectId),g="Free";if(!f){let b=await u(a,c);f=t(b?.cloudaicompanionProject),g=b?.currentTier?.name||g}if(!f)return{plan:g,message:"Gemini CLI project ID not available. Reconnect Gemini CLI, or configure a Google Cloud project with Gemini Code Assist access before checking quota."};let h=new AbortController,i=setTimeout(()=>h.abort(),1e4);try{d=await (0,e.proxyAwareFetch)("https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuota",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({project:f}),signal:h.signal},c)}finally{clearTimeout(i)}if(!d.ok)return{plan:g,message:`Gemini CLI quota error (${d.status}).`};let j=await d.json(),k={};if(Array.isArray(j.buckets))for(let a of j.buckets){if(!a.modelId||null==a.remainingFraction)continue;let b=Number(a.remainingFraction)||0,c=Math.round(1e3*b),d=Math.max(0,1e3-c);k[a.modelId]={used:d,total:1e3,resetAt:n(a.resetTime),remainingPercentage:100*b,unlimited:!1}}return{plan:g,quotas:k}}catch(a){return{message:`Gemini CLI error: ${a.message}`}}}function t(a){return"string"==typeof a?a.trim()||null:a&&"object"==typeof a&&"string"==typeof a.id&&a.id.trim()||null}async function u(a,b=null){let c=new AbortController,f=setTimeout(()=>c.abort(),1e4);try{let f=await (0,e.proxyAwareFetch)("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:d.Cn}),signal:c.signal},b);if(!f.ok)return null;return await f.json()}catch{return null}finally{clearTimeout(f)}}async function v(a,b,c,d){let f=null;for(let g of h.quotaApiHosts){let i=new AbortController,j=setTimeout(()=>i.abort(),1e4);try{let j=await (0,e.proxyAwareFetch)(`${g}${a}`,{method:"POST",headers:{Authorization:`Bearer ${b}`,"User-Agent":h.userAgent,"Content-Type":"application/json","x-request-source":"local"},body:JSON.stringify(c||{}),signal:i.signal},d);if(j.ok||401===j.status||403===j.status)return{response:j,host:g};f=Error(`Antigravity API error: ${j.status}`)}catch(a){f=a}finally{clearTimeout(j)}}if(f)throw f;throw Error("Antigravity API unavailable")}async function w(a,b,c=null){try{let d,e=t(b?.projectId),f=null,g=e;g||(f=await y(a,c),g=t(f?.cloudaicompanionProject));try{d=await v(h.fetchAvailableModelsPath,a,g?{project:g}:{},c)}catch(a){return{message:`Antigravity quota unavailable: ${a.message}. Chat may still work.`}}let i=d.response;if(401===i.status){let a=await x(b,c);if(a)return{accountDead:!0,message:`Antigravity account ${a}. Reconnect won't help \u2014 recreate the account.`,quotas:{}};return{message:"Antigravity quota API authentication expired. Chat may still work.",quotas:{}}}if(403===i.status)return{message:"Antigravity quota API access forbidden (tier may not expose quota). Chat may still work.",quotas:{}};if(!i.ok)throw Error(`Antigravity API error: ${i.status}`);let j=await i.json(),k=new Map;try{let b=await v(h.retrieveUserQuotaPath,a,g?{project:g}:{},c);if(b.response.ok){let a=await b.response.json();if(Array.isArray(a.buckets))for(let b of a.buckets){let a=String(b.modelId||"").trim();a&&k.set(a,b)}}}catch{}let l={};if(j.models){let a=["gemini-3-flash-agent","gemini-3.5-flash-low","gemini-3.5-flash-extra-low","gemini-pro-agent","gemini-3.1-pro-low","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3-flash"];for(let[b,c]of Object.entries(j.models)){if(c.isInternal||!a.includes(b))continue;let d=k.get(b),e=d||c.quotaInfo;if(!e)continue;let f=Number(e.remainingFraction)||0,g=100*f,h=Math.round(1e3*f),i=Math.max(0,1e3-h);l[b]={used:i,total:1e3,resetAt:n(e.resetTime),remainingPercentage:g,unlimited:!1,displayName:c.displayName||b,quotaSource:d?"retrieveUserQuota":"fetchAvailableModels"}}}return{plan:f?.currentTier?.name||"Unknown",quotas:l,subscriptionInfo:f}}catch(a){return console.error("[Antigravity Usage] Error:",a.message,a.cause),{message:`Antigravity error: ${a.message}`}}}async function x(a,b=null){let c=a?.refreshToken;if(!c)return null;try{let a,d=new AbortController,f=setTimeout(()=>d.abort(),1e4);try{a=await (0,e.proxyAwareFetch)(h.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:h.clientId,client_secret:h.clientSecret,refresh_token:c,grant_type:"refresh_token"}),signal:d.signal},b)}finally{clearTimeout(f)}if(a.ok)return null;let g=await a.json().catch(()=>({}));if("invalid_grant"===g.error){let a=(g.error_description||"").toLowerCase();if(a.includes("deleted"))return"has been deleted";if(a.includes("disabled")||a.includes("suspend"))return"is disabled/suspended";return"authorization was revoked"}return null}catch{return null}}async function y(a,b=null){let c=new AbortController,f=setTimeout(()=>c.abort(),1e4);try{let f=await (0,e.proxyAwareFetch)(h.loadProjectApiUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":h.userAgent,"Content-Type":"application/json","x-request-source":"local"},body:JSON.stringify({metadata:d.Cn,mode:1}),signal:c.signal},b);if(!f.ok)return null;return await f.json()}catch(a){return console.error("[Antigravity Subscription] Error:",a.message),null}finally{clearTimeout(f)}}async function z(a,b=null){try{let c=await (0,e.proxyAwareFetch)("https://api.anthropic.com/api/oauth/usage",{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":i}},b);if(c.ok){let a=await c.json(),b={},d=a=>a&&"object"==typeof a&&"number"==typeof a.utilization,e=a=>{let b=a.utilization,c=Math.max(0,100-b);return{used:b,total:100,remaining:c,remainingPercentage:c,resetAt:n(a.resets_at),unlimited:!1}};for(let[c,f]of(d(a.five_hour)&&(b["session (5h)"]=e(a.five_hour)),d(a.seven_day)&&(b["weekly (7d)"]=e(a.seven_day)),Object.entries(a)))if(c.startsWith("seven_day_")&&"seven_day"!==c&&d(f)){let a=c.replace("seven_day_","");b[`weekly ${a} (7d)`]=e(f)}return{plan:"Claude Code",extraUsage:a.extra_usage??null,quotas:b}}return console.warn(`[Claude Usage] OAuth endpoint returned ${c.status}, falling back to legacy`),await A(a,b)}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}async function A(a,b=null){try{let c=await (0,e.proxyAwareFetch)("https://api.anthropic.com/v1/settings",{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":i}},b);if(c.ok){let d=await c.json();if(d.organization_id){let c=await (0,e.proxyAwareFetch)("https://api.anthropic.com/v1/organizations/{org_id}/usage".replace("{org_id}",d.organization_id),{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":i}},b);if(c.ok){let a=await c.json();return{plan:d.plan||"Unknown",organization:d.organization_name,quotas:a}}}return{plan:d.plan||"Unknown",organization:d.organization_name,message:"Claude connected. Usage details require admin access."}}return{message:"Claude connected. Usage API requires admin permissions."}}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}function B(a,b=0){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return b}function C(a){return!a||"object"!=typeof a||Array.isArray(a)?null:a.rate_limit&&"object"==typeof a.rate_limit?a.rate_limit:a}function D(a){let b=Math.max(0,Math.min(100,B(a?.used_percent??a?.percent_used,0)));return{used:b,total:100,remaining:Math.max(0,100-b),resetAt:n(a?.reset_at??a?.resets_at??a?.resetAt??null),unlimited:!1}}function E(a,b,c){let d=C(c);if(!d)return!1;let e=d.primary_window||d.primary||c.primary_window||c.primary,f=d.secondary_window||d.secondary||c.secondary_window||c.secondary,g=!1;return e&&(a[b?`${b}_session`:"session"]=D(e),g=!0),f&&(a[b?`${b}_weekly`:"weekly"]=D(f),g=!0),g}async function F(a,b=null){try{let c=await (0,e.proxyAwareFetch)("https://chatgpt.com/backend-api/wham/usage",{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Codex connected. Usage API temporarily unavailable (${c.status}).`};let d=await c.json(),f=d.rate_limit||d.rate_limits||d.rate_limits_by_limit_id?.codex||{},g=function(a){if(a.code_review_rate_limit||a.review_rate_limit)return a.code_review_rate_limit||a.review_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b.code_review||b.codex_review||b.review||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return"code_review"===b||"codex_review"===b||"review"===b||b.includes("review")})||null}(d),h={};return E(h,"",f),E(h,"review",g),{plan:d.plan_type||d.summary?.plan||"unknown",limitReached:C(f)?.limit_reached||!1,reviewLimitReached:C(g)?.limit_reached||!1,quotas:h}}catch(a){throw Error(`Failed to fetch Codex usage: ${a.message}`)}}async function G(a,b,c=null){let d=b?.profileArn||"arn:aws:codewhisperer:us-east-1:638616132270:profile/AAAACCCCXXXX",f=b?.authMethod||"builder-id",g=new URLSearchParams({isEmailRequired:"true",origin:"AI_EDITOR",resourceType:"AGENTIC_REQUEST"}),h=!1,i=[];for(let b of[{name:"codewhisperer-get",run:async()=>(0,e.proxyAwareFetch)(`https://codewhisperer.us-east-1.amazonaws.com/getUsageLimits?${g.toString()}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","x-amz-user-agent":"aws-sdk-js/1.0.0 KiroIDE","user-agent":"aws-sdk-js/1.0.0 KiroIDE"}},c)},{name:"codewhisperer-post",run:async()=>(0,e.proxyAwareFetch)("https://codewhisperer.us-east-1.amazonaws.com",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.GetUsageLimits",Accept:"application/json"},body:JSON.stringify({origin:"AI_EDITOR",profileArn:d,resourceType:"AGENTIC_REQUEST"})},c)},{name:"q-get",run:async()=>{let b=new URLSearchParams({origin:"AI_EDITOR",profileArn:d,resourceType:"AGENTIC_REQUEST"});return(0,e.proxyAwareFetch)(`https://q.us-east-1.amazonaws.com/getUsageLimits?${b}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c)}}])try{let a=await b.run();if(!a.ok){let c=await a.text().catch(()=>"");(401===a.status||403===a.status)&&(h=!0),i.push(`${b.name}:${a.status}${c?`:${c}`:""}`);continue}let c=await a.json();return function(a){let b=a.usageBreakdownList||[],c={},d=n(a.nextDateReset||a.resetDate);return b.forEach(a=>{let b=a.resourceType?.toLowerCase()||"unknown",e=a.currentUsageWithPrecision||0,f=a.usageLimitWithPrecision||0;if(c[b]={used:e,total:f,remaining:f-e,resetAt:d,unlimited:!1},a.freeTrialInfo){let e=a.freeTrialInfo.currentUsageWithPrecision||0,f=a.freeTrialInfo.usageLimitWithPrecision||0;c[`${b}_freetrial`]={used:e,total:f,remaining:f-e,resetAt:n(a.freeTrialInfo.freeTrialExpiry||d),unlimited:!1}}}),{plan:a.subscriptionInfo?.subscriptionTitle||"Kiro",quotas:c}}(c)}catch(a){i.push(`${b.name}:${a.message}`)}return h&&"idc"===f?{message:"Kiro quota API is unavailable for the current AWS IAM Identity Center session. Chat may still work. If this persists after renewing your session, reconnect Kiro.",quotas:{}}:h&&("google"===f||"github"===f)?{message:"Kiro quota API authentication expired. Chat may still work.",quotas:{}}:h?{message:"Kiro quota API rejected the current token. Chat may still work.",quotas:{}}:{message:i.length>0?`Unable to fetch Kiro usage right now. (${i[i.length-1]})`:"Unable to fetch Kiro usage right now.",quotas:{}}}async function H(a,b){try{if(!b?.resourceUrl)return{message:"Qwen connected. No resource URL available."};return{message:"Qwen connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch Qwen usage."}}}async function I(a){try{return{message:"iFlow connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch iFlow usage."}}}async function J(a,b){try{return{plan:b?.plan||"Free",message:"Ollama Cloud uses a free tier with light usage limits (resets every 5h & 7d). For detailed usage tracking, visit ollama.com/settings/keys.",quotas:[]}}catch(a){return{message:"Unable to fetch Ollama Cloud usage."}}}async function K(a,b,c=null){if(!a)return{message:"GLM API key not available."};let d=f["glm-cn"===b?"china":"international"];try{let b=await (0,e.proxyAwareFetch)(d,{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(!b.ok){if(401===b.status)return{message:"GLM API key invalid or expired."};return{message:`GLM quota API error (${b.status}).`}}let f=await b.json(),g=f?.data&&"object"==typeof f.data?f.data:{},h=Array.isArray(g.limits)?g.limits:[],i={};for(let a of h){if(!a||"TOKENS_LIMIT"!==a.type)continue;let b=Number(a.percentage)||0,c=Number(a.nextResetTime)||0,d=Math.max(0,100-b);i.session={used:b,total:100,remaining:d,remainingPercentage:d,resetAt:c>0?new Date(c).toISOString():null,unlimited:!1}}let j="string"==typeof g.level?g.level:"";return{plan:j?j.charAt(0).toUpperCase()+j.slice(1).toLowerCase():"Unknown",quotas:i}}catch(a){return{message:`GLM error: ${a.message}`}}}function L(a,b,c){return a&&"object"==typeof a?a[b]??a[c]??null:null}function M(a,b,c){if(!a||"object"!=typeof a)return null;let d=a[b]??a[c];if(null==d)return null;let e=Number(d);return Number.isFinite(e)?Math.max(0,Math.min(100,e)):null}function N(a){return Math.max(0,Number(L(a,"current_interval_total_count","currentIntervalTotalCount"))||0)}function O(a){return Math.max(0,Number(L(a,"current_weekly_total_count","currentWeeklyTotalCount"))||0)}function P(a){return!!(N(a)>0||O(a)>0)||null!==M(a,"current_interval_remaining_percent","currentIntervalRemainingPercent")||null!==M(a,"current_weekly_remaining_percent","currentWeeklyRemainingPercent")}function Q(a,b,c,d,e,f,g,h,i,j){let k=d(c),l=M(c,g,h);if(k<=0&&null===l)return;let m=Math.max(0,Number(L(c,e,f))||0),o=k,p=m;k<=0&&(o=100,p=j?Math.round(l/100*o):Math.round(o*(1-l/100))),a[b]=function(a,b,c,d,e=null){var f,g,h;let i=Math.max(0,a),j=d?Math.max(i-b,0):Math.min(Math.max(0,b),i),k=Math.max(i-j,0),l=(f=e,g=k,h=i,null!=f&&Number.isFinite(f)?Math.max(0,Math.min(100,f)):h>0?Math.max(0,Math.min(100,g/h*100)):0);return{used:j,total:i,remaining:k,remainingPercentage:l,resetAt:c,unlimited:!1}}(o,p,function(a,b,c,d,e,f){let g=Number(L(a,c,d))||0;return g>0?new Date(b+g).toISOString():n(L(a,e,f))}(c,...i),j,l)}async function R(a,b,c=null){if(!a)return{message:"MiniMax API key not available."};let d=g[b]||[],f="";for(let b=0;b<d.length;b+=1){let g=d[b],h=b<d.length-1;try{let b=await (0,e.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"}},c),d=await b.text(),i={};if(d)try{i=JSON.parse(d)}catch{i={}}let j=(i?.base_resp??i?.baseResp)||{},k=Number(j.status_code??j.statusCode)||0,l=String(j.status_msg??j.statusMsg??"").trim(),m=`${l} ${d}`.trim(),n=/token plan|coding plan|invalid api key|invalid key|unauthorized|inactive/i;if(401===b.status||403===b.status||1004===k||n.test(m))return{message:"MiniMax API key invalid or inactive. Use an active Token/Coding Plan key."};if(!b.ok){if(f=`MiniMax usage endpoint error (${b.status})`,(404===b.status||405===b.status||b.status>=500)&&h)continue;return{message:`MiniMax connected. ${f}`}}if(0!==k)return{message:`MiniMax connected. ${l||"Upstream quota API error"}`};let o=i?.model_remains??i?.modelRemains,p=(Array.isArray(o)?o:[]).filter(P);if(0===p.length)return{message:"MiniMax connected. No quota data was returned."};let q=Date.now(),r=g.includes("/coding_plan/remains"),s={};for(let a of p){let b=function(a){let b=String(L(a,"model_name","modelName")||"").trim();return b?"MiniMax-M*"===b||"general"===b?"M-series":b.replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,a=>a.toUpperCase()).replace(/\bTo\b/g,"to").replace(/\bTts\b/g,"TTS").replace(/\bHd\b/g,"HD"):"MiniMax"}(a);Q(s,`${b} (5h)`,a,N,"current_interval_usage_count","currentIntervalUsageCount","current_interval_remaining_percent","currentIntervalRemainingPercent",[q,"remains_time","remainsTime","end_time","endTime"],r),Q(s,`${b} (7d)`,a,O,"current_weekly_usage_count","currentWeeklyUsageCount","current_weekly_remaining_percent","currentWeeklyRemainingPercent",[q,"weekly_remains_time","weeklyRemainsTime","weekly_end_time","weeklyEndTime"],r)}if(0===Object.keys(s).length)return{message:"MiniMax connected. Unable to extract quota usage."};return{quotas:s}}catch(a){if(f=a.message,!h)break}}return{message:f?`MiniMax connected. Unable to fetch usage: ${f}`:"MiniMax connected. Unable to fetch usage."}}async function S(a,b=null){if(!a)return{message:"Qoder usage unavailable: no access token"};try{let c=await (0,e.proxyAwareFetch)("https://openapi.qoder.sh/api/v2/quota/usage",{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Qoder connected. Usage fetch returned ${c.status}.`};let d=await c.json().catch(()=>null);if(!d)return{message:"Qoder connected. Usage response was not JSON."};let f=d.userQuota||{},g=d.orgResourcePackage||{},h=Number.isFinite(Number(d.expiresAt))&&Number(d.expiresAt)>0?Number(d.expiresAt):null,i=h?new Date(h).toISOString():null;return{quotas:{user:{total:Number(f.total)||0,used:Number(f.used)||0,remaining:Number(f.remaining)||0,unit:f.unit||"credits",resetAt:i},organization:{total:Number(g.total)||0,used:Number(g.used)||0,remaining:Number(g.remaining)||0,unit:g.unit||"credits",resetAt:i}},totalUsagePercentage:Number(d.totalUsagePercentage)||0,isQuotaExceeded:!!d.isQuotaExceeded,expiresAt:h}}catch(a){return{message:`Qoder connected. Unable to fetch usage: ${a.message}`}}}async function T(a,b=null,d=null){if(!a)return{message:"AutoClaw usage unavailable: no access token"};try{let{AUTOCLAW_WALLET_ENDPOINT:f,buildAutoClawWalletHeaders:g}=await Promise.resolve().then(c.bind(c,42693)),h=await (0,e.proxyAwareFetch)(f,{method:"GET",headers:g(a)},b);if(!h.ok)return{message:`AutoClaw connected. Usage fetch returned ${h.status}.`};let i=await h.json().catch(()=>null);if(!i||0!==i.code)return{message:"AutoClaw connected. Unable to read balance."};let j=Number(i.data?.total_balance),k=Number.isFinite(j)?j:0,l=k;try{if(d?.id){let{getQuotaSnapshot:a}=await Promise.resolve().then(c.bind(c,89718)),b=await a(d.id),e=Number(b?.usage?.quotas?.points?.total)||0,f=Number(b?.usage?.quotas?.points?.remaining);l=Math.max(e,k,Number.isFinite(f)?f:0)}}catch{}let m=Math.max(0,l-k);return{quotas:{points:{total:l,used:m,remaining:k,unit:"points",resetAt:null}},totalUsagePercentage:l>0?Math.round(m/l*100):0,isQuotaExceeded:k<=0}}catch(a){return{message:`AutoClaw connected. Unable to fetch balance: ${a.message}`}}}function U(a,b=0){return null==a?b:"object"==typeof a&&!Array.isArray(a)&&"val"in a?B(a.val,b):B(a,b)}async function V(a,b=null,c=null){if(!a)return{message:"Grok CLI access token not available."};let d=function(a,b={}){let c=b||{},d={Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-identifier":"grok-pager","x-grok-client-version":"0.2.93"},e=c.email,f=c.userId||c.principalId;return e&&(d["x-email"]=e),f&&(d["x-userid"]=f),d}(a,b);try{let[a,b]=await Promise.all([(0,e.proxyAwareFetch)("https://cli-chat-proxy.grok.com/v1/billing?format=credits",{method:"GET",headers:d},c),(0,e.proxyAwareFetch)("https://cli-chat-proxy.grok.com/v1/user?include=subscription",{method:"GET",headers:d},c).catch(()=>null)]);if(401===a.status||403===a.status)return{message:"Grok CLI authentication expired. Please re-authorize."};if(!a.ok){let b=await a.text().catch(()=>""),c=b?`: ${b.slice(0,200)}`:"";return{message:`Grok CLI billing API error (${a.status})${c}`}}let f=await a.json().catch(()=>null);if(!f||"object"!=typeof f)return{message:"Grok CLI billing response was not JSON."};let g=null;b?.ok&&(g=await b.json().catch(()=>null));let h=function(a,b=null){let c,d=a&&"object"==typeof a?a:{},e=d.config&&"object"==typeof d.config&&!Array.isArray(d.config)?d.config:d,f=n(e.billingPeriodEnd)||n(e.currentPeriod?.end)||n(d.billingPeriodEnd)||null,g={},h=U(e.onDemandCap??d.onDemandCap,NaN),i=U(e.onDemandUsed??d.onDemandUsed,NaN);if(Number.isFinite(h)&&h>0){let a=Number.isFinite(i)?Math.max(0,i):0;g["On-demand"]=function({used:a,total:b,resetAt:c,unlimited:d=!1}){let e=Math.max(0,B(b,0)),f=Math.max(0,B(a,0));if(d||0===e)return{used:f,total:0,remainingPercentage:100*!!d,resetAt:c||null,unlimited:!0};let g=Math.max(0,e-f);return{used:f,total:e,remainingPercentage:g/e*100,resetAt:c||null,unlimited:!1}}({used:a,total:h,resetAt:f})}else Number.isFinite(h)&&0===h&&Number.isFinite(i)&&(g["On-demand"]={used:1,total:1,remainingPercentage:0,resetAt:f,unlimited:!1});let j=U(e.prepaidBalance??d.prepaidBalance,NaN);return Number.isFinite(j)&&j>0&&(g.Prepaid={used:0,total:j,remainingPercentage:100,resetAt:null,unlimited:!1}),{plan:(c="string"==typeof b?.subscriptionTier?b.subscriptionTier.trim():"")?c.replace(/[_-]+/g," ").replace(/\b\w/g,a=>a.toUpperCase()):b?.hasGrokCodeAccess===!0?"Grok Code":(e?.isUnifiedBillingUser,"Grok Build"),quotas:g,periodEnd:f}}(f,g);if(!h.quotas||0===Object.keys(h.quotas).length)return{plan:h.plan,message:"Grok Build connected, but no credit allotment was returned. Free promo may be exhausted — upgrade at https://grok.com/supergrok or add credits at https://grok.com/?_s=usage.",quotas:{}};return{plan:h.plan,quotas:h.quotas}}catch(a){return{message:`Grok CLI usage error: ${a.message}`}}}}};
|
|
@@ -40,4 +40,4 @@
|
|
|
40
40
|
<style>body{font-family:system-ui;display:flex;justify-content:center;align-items:center;height:100vh;margin:0;background:#f5f5f5}.c{text-align:center;padding:2rem;background:#fff;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.1)}.i{color:${a?"#22c55e":"#ef4444"};font-size:3rem}h1{margin:1rem 0}p{color:#666}</style>
|
|
41
41
|
</head><body><div class="c"><div class="i">${a?"✓":"✗"}</div><h1>${c}</h1><p>${b}</p><p>Closing in <span id="cd">3</span>s...</p>
|
|
42
42
|
<script>let n=3;const c=document.getElementById("cd");const t=setInterval(()=>{n--;c.textContent=n;if(n<=0){clearInterval(t);window.close();}},1000);</script>
|
|
43
|
-
</div></body></html>`}function o(a){return new Promise(b=>{if(h)return void b({success:!0});let d=e().createServer(async(b,d)=>{let e=new f.URL(b.url,"http://localhost");if("/callback"!==e.pathname&&"/auth/callback"!==e.pathname){d.writeHead(404),d.end("Not found");return}let g=e.searchParams.get("code"),h=e.searchParams.get("state"),i=e.searchParams.get("error"),k=h?j.get(h):null;if(k){try{if(i)throw Error(e.searchParams.get("error_description")||i);if(!g)throw Error("No authorization code received");let{exchangeTokens:a}=await Promise.all([c.e(5433),c.e(4404),c.e(3110),c.e(318),c.e(8895),c.e(4177)]).then(c.bind(c,74177)),{createProviderConnection:b}=await c.e(1998).then(c.bind(c,71998)),f=await a("codex",g,k.redirectUri,k.codeVerifier,h),j=await b({provider:"codex",authType:"oauth",...f,expiresAt:f.expiresIn?new Date(Date.now()+1e3*f.expiresIn).toISOString():null,testStatus:"active"});k.status="done",k.connectionId=j.id,k.email=j.email,d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),d.end(n(!0,"You can close this window."))}catch(a){k.status="error",k.error=a.message,d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),d.end(n(!1,a.message))}finally{p()}return}let l=`http://localhost:${a}/callback${e.search}`;d.writeHead(302,{Location:l}),d.end(),p()});d.listen(1455,"127.0.0.1",()=>{h=d,i=setTimeout(()=>p(),3e5),b({success:!0})}),d.on("error",a=>{"EADDRINUSE"===a.code?b({success:!1,reason:"port_busy"}):b({success:!1,reason:a.message})})})}function p(){i&&(clearTimeout(i),i=null),h&&(h.close(),h=null)}let q=null,r=null,s=new Map;function t({state:a,codeVerifier:b,redirectUri:c}){return!!a&&!!b&&!!c&&(s.set(a,{codeVerifier:b,redirectUri:c,status:"pending",createdAt:Date.now()}),!0)}function u(a){return s.get(a)||null}function v(a){s.delete(a)}function w(a){return new Promise(b=>{if(q)return void b({success:!0});let d=e().createServer(async(b,d)=>{let e=new f.URL(b.url,"http://localhost");if("/callback"!==e.pathname&&"/auth/callback"!==e.pathname){d.writeHead(404),d.end("Not found");return}let g=e.searchParams.get("code"),h=e.searchParams.get("state"),i=e.searchParams.get("error"),j=h?s.get(h):null;if(j){try{if(i)throw Error(e.searchParams.get("error_description")||i);if(!g)throw Error("No authorization code received");let{exchangeTokens:a}=await Promise.all([c.e(5433),c.e(4404),c.e(3110),c.e(318),c.e(8895),c.e(4177)]).then(c.bind(c,74177)),{createProviderConnection:b}=await c.e(1998).then(c.bind(c,71998)),f=await a("xai",g,j.redirectUri,j.codeVerifier,h),k=await b({provider:"xai",authType:"oauth",...f,expiresAt:f.expiresIn?new Date(Date.now()+1e3*f.expiresIn).toISOString():null,testStatus:"active"});j.status="done",j.connectionId=k.id,j.email=k.email,d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),d.end(n(!0,"You can close this window."))}catch(a){j.status="error",j.error=a.message,d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),d.end(n(!1,a.message))}finally{x()}return}let k=`http://localhost:${a}/callback${e.search}`;d.writeHead(302,{Location:k}),d.end(),x()});d.listen(56121,"127.0.0.1",()=>{q=d,r=setTimeout(()=>x(),3e5),b({success:!0})}),d.on("error",a=>{"EADDRINUSE"===a.code?b({success:!1,reason:"port_busy"}):b({success:!1,reason:a.message})})})}function x(){r&&(clearTimeout(r),r=null),q&&(q.close(),q=null)}},73159:(a,b,c)=>{c.d(b,{Ue:()=>i,oT:()=>j});let d="https://auth.x.ai",e="/oauth2/authorize",f="/oauth2/token",g="/.well-known/openid-configuration",h="/callback",i=96,j={clientId:"b1a00492-073a-47ea-816f-4c329264a828",issuer:d,authEndpointPath:e,tokenEndpointPath:f,discoveryPath:g,authorizeUrl:`${d}${e}`,tokenUrl:`${d}${f}`,discoveryUrl:`${d}${g}`,scope:"openid profile email offline_access grok-cli:access api:access",apiBaseUrl:"https://api.x.ai/v1",redirectUri:`http://127.0.0.1:56121${h}`,loopbackPort:56121,callbackPath:h,pkceVerifierBytes:96,refreshLeadSeconds:300,userAgent:"grok-cli/9router",codeChallengeMethod:"S256"}},92990:(a,b,c)=>{c.d(b,{DI:()=>g,Hp:()=>i,LT:()=>h,MZ:()=>r,Nl:()=>u,Nu:()=>n,OV:()=>f,Tx:()=>o,WN:()=>p,Ww:()=>w,YT:()=>l,ZL:()=>k,cD:()=>m,f7:()=>t,hF:()=>j,lB:()=>s,ne:()=>v,t:()=>q});var d=c(21820);function e(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let f={clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",authorizeUrl:"https://claude.ai/oauth/authorize",tokenUrl:"https://api.anthropic.com/v1/oauth/token",scopes:["org:create_api_key","user:profile","user:inference"],codeChallengeMethod:"S256"},g={clientId:"app_EMoamEEZ73f0CkXaXp7hrann",authorizeUrl:"https://auth.openai.com/oauth/authorize",tokenUrl:"https://auth.openai.com/oauth/token",scope:"openid profile email offline_access",codeChallengeMethod:"S256",extraParams:{id_token_add_organizations:"true",codex_cli_simplified_flow:"true",originator:"codex_cli_rs"}},h={clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile"]},i={clientId:"f0304373b74a44d2b584a3fb70ca9e56",deviceCodeUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",scope:"openid profile email model.completion",codeChallengeMethod:"S256"},j={openApiBaseUrl:"https://openapi.qoder.sh",centerBaseUrl:"https://center.qoder.sh",chatBaseUrl:"https://api3.qoder.sh",deviceTokenUrl:"https://openapi.qoder.sh/api/v1/deviceToken/poll",refreshUrl:"https://center.qoder.sh/algo/api/v3/user/refresh_token",userInfoUrl:"https://openapi.qoder.sh/api/v1/userinfo",quotaUsageUrl:"https://openapi.qoder.sh/api/v2/quota/usage",loginUrl:"https://qoder.com/device/selectAccounts"},k={clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",authorizeUrl:"https://iflow.cn/oauth",tokenUrl:"https://iflow.cn/oauth/token",userInfoUrl:"https://iflow.cn/api/oauth/getUserInfo",extraParams:{loginMethod:"phone",type:"phone"}},l={clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/cclog","https://www.googleapis.com/auth/experimentsandconfigs"],apiEndpoint:"https://cloudcode-pa.googleapis.com",apiVersion:"v1internal",loadCodeAssistEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUserEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser",loadCodeAssistUserAgent:"google-api-nodejs-client/9.15.1",loadCodeAssistApiClient:"google-cloud-sdk vscode_cloudshelleditor/0.1",loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:e(),pluginType:2})};function m(){return{ideType:9,platform:e(),pluginType:2}}let n={clientId:"Iv1.b507a08c87ecfe98",deviceCodeUrl:"https://github.com/login/device/code",tokenUrl:"https://github.com/login/oauth/access_token",userInfoUrl:"https://api.github.com/user",scopes:"read:user",apiVersion:"2022-11-28",copilotTokenUrl:"https://api.github.com/copilot_internal/v2/token",userAgent:"GitHubCopilotChat/0.26.7",editorVersion:"vscode/1.85.0",editorPluginVersion:"copilot-chat/0.26.7"},o={ssoOidcEndpoint:"https://oidc.us-east-1.amazonaws.com",registerClientUrl:"https://oidc.us-east-1.amazonaws.com/client/register",deviceAuthUrl:"https://oidc.us-east-1.amazonaws.com/device_authorization",tokenUrl:"https://oidc.us-east-1.amazonaws.com/token",startUrl:"https://view.awsapps.com/start",clientName:"kiro-oauth-client",clientType:"public",scopes:["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations"],grantTypes:["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],issuerUrl:"https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6",socialAuthEndpoint:"https://prod.us-east-1.auth.desktop.kiro.dev",socialLoginUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/login",socialTokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token",socialRefreshUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",authMethods:["builder-id","idc","google","github","import"]},p={apiEndpoint:"https://api2.cursor.sh",chatEndpoint:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",modelsEndpoint:"/aiserver.v1.AiService/GetDefaultModelNudgeData",api3Endpoint:"https://api3.cursor.sh",agentEndpoint:"https://agent.api5.cursor.sh",agentNonPrivacyEndpoint:"https://agentn.api5.cursor.sh",clientVersion:"3.1.0",clientType:"ide",tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"},dbKeys:{accessToken:"cursorAuth/accessToken",machineId:"storage.serviceMachineId"}},q={clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||"17e5f671-d194-4dfb-9706-5516cb48c098",deviceCodeUrl:"https://auth.kimi.com/api/oauth/device_authorization",tokenUrl:"https://auth.kimi.com/api/oauth/token"},r={apiBaseUrl:"https://api.kilo.ai",initiateUrl:"https://api.kilo.ai/api/device-auth/codes",pollUrlBase:"https://api.kilo.ai/api/device-auth/codes"},s={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},t={defaultBaseUrl:"https://gitlab.com",authorizeUrlPath:"/oauth/authorize",tokenUrlPath:"/oauth/token",userInfoUrlPath:"/api/v4/user",scope:"api read_user",codeChallengeMethod:"S256"},u={baseUrl:"https://www.codebuddy.ai",stateUrl:"https://www.codebuddy.ai/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.ai/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.ai/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.ai/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.ai/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",domain:"www.codebuddy.ai",platform:"CLI",pollInterval:5e3},v={baseUrl:"https://www.codebuddy.cn",stateUrl:"https://www.codebuddy.cn/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.cn/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.cn/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.cn/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.cn/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",domain:"www.codebuddy.cn",platform:"CLI",pollInterval:5e3},w=3e5}};
|
|
43
|
+
</div></body></html>`}function o(a){return new Promise(b=>{if(h)return void b({success:!0});let d=e().createServer(async(b,d)=>{let e=new f.URL(b.url,"http://localhost");if("/callback"!==e.pathname&&"/auth/callback"!==e.pathname){d.writeHead(404),d.end("Not found");return}let g=e.searchParams.get("code"),h=e.searchParams.get("state"),i=e.searchParams.get("error"),k=h?j.get(h):null;if(k){try{if(i)throw Error(e.searchParams.get("error_description")||i);if(!g)throw Error("No authorization code received");let{exchangeTokens:a}=await Promise.all([c.e(5433),c.e(4404),c.e(8335),c.e(3110),c.e(318),c.e(8895),c.e(4177)]).then(c.bind(c,74177)),{createProviderConnection:b}=await c.e(1998).then(c.bind(c,71998)),f=await a("codex",g,k.redirectUri,k.codeVerifier,h),j=await b({provider:"codex",authType:"oauth",...f,expiresAt:f.expiresIn?new Date(Date.now()+1e3*f.expiresIn).toISOString():null,testStatus:"active"});k.status="done",k.connectionId=j.id,k.email=j.email,d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),d.end(n(!0,"You can close this window."))}catch(a){k.status="error",k.error=a.message,d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),d.end(n(!1,a.message))}finally{p()}return}let l=`http://localhost:${a}/callback${e.search}`;d.writeHead(302,{Location:l}),d.end(),p()});d.listen(1455,"127.0.0.1",()=>{h=d,i=setTimeout(()=>p(),3e5),b({success:!0})}),d.on("error",a=>{"EADDRINUSE"===a.code?b({success:!1,reason:"port_busy"}):b({success:!1,reason:a.message})})})}function p(){i&&(clearTimeout(i),i=null),h&&(h.close(),h=null)}let q=null,r=null,s=new Map;function t({state:a,codeVerifier:b,redirectUri:c}){return!!a&&!!b&&!!c&&(s.set(a,{codeVerifier:b,redirectUri:c,status:"pending",createdAt:Date.now()}),!0)}function u(a){return s.get(a)||null}function v(a){s.delete(a)}function w(a){return new Promise(b=>{if(q)return void b({success:!0});let d=e().createServer(async(b,d)=>{let e=new f.URL(b.url,"http://localhost");if("/callback"!==e.pathname&&"/auth/callback"!==e.pathname){d.writeHead(404),d.end("Not found");return}let g=e.searchParams.get("code"),h=e.searchParams.get("state"),i=e.searchParams.get("error"),j=h?s.get(h):null;if(j){try{if(i)throw Error(e.searchParams.get("error_description")||i);if(!g)throw Error("No authorization code received");let{exchangeTokens:a}=await Promise.all([c.e(5433),c.e(4404),c.e(8335),c.e(3110),c.e(318),c.e(8895),c.e(4177)]).then(c.bind(c,74177)),{createProviderConnection:b}=await c.e(1998).then(c.bind(c,71998)),f=await a("xai",g,j.redirectUri,j.codeVerifier,h),k=await b({provider:"xai",authType:"oauth",...f,expiresAt:f.expiresIn?new Date(Date.now()+1e3*f.expiresIn).toISOString():null,testStatus:"active"});j.status="done",j.connectionId=k.id,j.email=k.email,d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),d.end(n(!0,"You can close this window."))}catch(a){j.status="error",j.error=a.message,d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),d.end(n(!1,a.message))}finally{x()}return}let k=`http://localhost:${a}/callback${e.search}`;d.writeHead(302,{Location:k}),d.end(),x()});d.listen(56121,"127.0.0.1",()=>{q=d,r=setTimeout(()=>x(),3e5),b({success:!0})}),d.on("error",a=>{"EADDRINUSE"===a.code?b({success:!1,reason:"port_busy"}):b({success:!1,reason:a.message})})})}function x(){r&&(clearTimeout(r),r=null),q&&(q.close(),q=null)}},73159:(a,b,c)=>{c.d(b,{Ue:()=>i,oT:()=>j});let d="https://auth.x.ai",e="/oauth2/authorize",f="/oauth2/token",g="/.well-known/openid-configuration",h="/callback",i=96,j={clientId:"b1a00492-073a-47ea-816f-4c329264a828",issuer:d,authEndpointPath:e,tokenEndpointPath:f,discoveryPath:g,authorizeUrl:`${d}${e}`,tokenUrl:`${d}${f}`,discoveryUrl:`${d}${g}`,scope:"openid profile email offline_access grok-cli:access api:access",apiBaseUrl:"https://api.x.ai/v1",redirectUri:`http://127.0.0.1:56121${h}`,loopbackPort:56121,callbackPath:h,pkceVerifierBytes:96,refreshLeadSeconds:300,userAgent:"grok-cli/9router",codeChallengeMethod:"S256"}},92990:(a,b,c)=>{c.d(b,{DI:()=>g,Hp:()=>i,LT:()=>h,MZ:()=>r,Nl:()=>x,Nu:()=>n,OV:()=>f,Td:()=>u,Tx:()=>o,WN:()=>p,Ww:()=>z,YT:()=>l,ZL:()=>k,cD:()=>m,f7:()=>w,hF:()=>j,lB:()=>s,ne:()=>y,qp:()=>v,t:()=>q,w1:()=>t});var d=c(21820);function e(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let f={clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",authorizeUrl:"https://claude.ai/oauth/authorize",tokenUrl:"https://api.anthropic.com/v1/oauth/token",scopes:["org:create_api_key","user:profile","user:inference"],codeChallengeMethod:"S256"},g={clientId:"app_EMoamEEZ73f0CkXaXp7hrann",authorizeUrl:"https://auth.openai.com/oauth/authorize",tokenUrl:"https://auth.openai.com/oauth/token",scope:"openid profile email offline_access",codeChallengeMethod:"S256",extraParams:{id_token_add_organizations:"true",codex_cli_simplified_flow:"true",originator:"codex_cli_rs"}},h={clientId:"681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile"]},i={clientId:"f0304373b74a44d2b584a3fb70ca9e56",deviceCodeUrl:"https://chat.qwen.ai/api/v1/oauth2/device/code",tokenUrl:"https://chat.qwen.ai/api/v1/oauth2/token",scope:"openid profile email model.completion",codeChallengeMethod:"S256"},j={openApiBaseUrl:"https://openapi.qoder.sh",centerBaseUrl:"https://center.qoder.sh",chatBaseUrl:"https://api3.qoder.sh",deviceTokenUrl:"https://openapi.qoder.sh/api/v1/deviceToken/poll",refreshUrl:"https://center.qoder.sh/algo/api/v3/user/refresh_token",userInfoUrl:"https://openapi.qoder.sh/api/v1/userinfo",quotaUsageUrl:"https://openapi.qoder.sh/api/v2/quota/usage",loginUrl:"https://qoder.com/device/selectAccounts"},k={clientId:"10009311001",clientSecret:"4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",authorizeUrl:"https://iflow.cn/oauth",tokenUrl:"https://iflow.cn/oauth/token",userInfoUrl:"https://iflow.cn/api/oauth/getUserInfo",extraParams:{loginMethod:"phone",type:"phone"}},l={clientId:"1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",clientSecret:"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",authorizeUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v1/userinfo",scopes:["https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/userinfo.email","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/cclog","https://www.googleapis.com/auth/experimentsandconfigs"],apiEndpoint:"https://cloudcode-pa.googleapis.com",apiVersion:"v1internal",loadCodeAssistEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",onboardUserEndpoint:"https://cloudcode-pa.googleapis.com/v1internal:onboardUser",loadCodeAssistUserAgent:"google-api-nodejs-client/9.15.1",loadCodeAssistApiClient:"google-cloud-sdk vscode_cloudshelleditor/0.1",loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:e(),pluginType:2})};function m(){return{ideType:9,platform:e(),pluginType:2}}let n={clientId:"Iv1.b507a08c87ecfe98",deviceCodeUrl:"https://github.com/login/device/code",tokenUrl:"https://github.com/login/oauth/access_token",userInfoUrl:"https://api.github.com/user",scopes:"read:user",apiVersion:"2022-11-28",copilotTokenUrl:"https://api.github.com/copilot_internal/v2/token",userAgent:"GitHubCopilotChat/0.26.7",editorVersion:"vscode/1.85.0",editorPluginVersion:"copilot-chat/0.26.7"},o={ssoOidcEndpoint:"https://oidc.us-east-1.amazonaws.com",registerClientUrl:"https://oidc.us-east-1.amazonaws.com/client/register",deviceAuthUrl:"https://oidc.us-east-1.amazonaws.com/device_authorization",tokenUrl:"https://oidc.us-east-1.amazonaws.com/token",startUrl:"https://view.awsapps.com/start",clientName:"kiro-oauth-client",clientType:"public",scopes:["codewhisperer:completions","codewhisperer:analysis","codewhisperer:conversations"],grantTypes:["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],issuerUrl:"https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6",socialAuthEndpoint:"https://prod.us-east-1.auth.desktop.kiro.dev",socialLoginUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/login",socialTokenUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token",socialRefreshUrl:"https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",authMethods:["builder-id","idc","google","github","import"]},p={apiEndpoint:"https://api2.cursor.sh",chatEndpoint:"/aiserver.v1.ChatService/StreamUnifiedChatWithTools",modelsEndpoint:"/aiserver.v1.AiService/GetDefaultModelNudgeData",api3Endpoint:"https://api3.cursor.sh",agentEndpoint:"https://agent.api5.cursor.sh",agentNonPrivacyEndpoint:"https://agentn.api5.cursor.sh",clientVersion:"3.1.0",clientType:"ide",tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"},dbKeys:{accessToken:"cursorAuth/accessToken",machineId:"storage.serviceMachineId"}},q={clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||"17e5f671-d194-4dfb-9706-5516cb48c098",deviceCodeUrl:"https://auth.kimi.com/api/oauth/device_authorization",tokenUrl:"https://auth.kimi.com/api/oauth/token"},r={apiBaseUrl:"https://api.kilo.ai",initiateUrl:"https://api.kilo.ai/api/device-auth/codes",pollUrlBase:"https://api.kilo.ai/api/device-auth/codes"},s={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},t={appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",authorizeUrl:"https://api.cline.bot/api/v1/auth/authorize",tokenUrl:"https://api.cline.bot/api/v1/auth/token",tokenExchangeUrl:"https://api.cline.bot/api/v1/auth/token",refreshUrl:"https://api.cline.bot/api/v1/auth/refresh"},u={webAppUrl:"https://app.kimchi.dev",validationUrl:"https://api.cast.ai/v1/llm/openai/supported-providers",userInfoUrl:"https://app.kimchi.dev/api/v1/me",modelsUrl:"https://llm.kimchi.dev/v1/models/metadata?include_in_cli=true"},v={clientId:"b1a00492-073a-47ea-816f-4c329264a828",deviceCodeUrl:"https://auth.x.ai/oauth2/device/code",tokenUrl:"https://auth.x.ai/oauth2/token",refreshUrl:"https://auth.x.ai/oauth2/token",scope:"openid profile email offline_access grok-cli:access api:access conversations:read conversations:write",referrer:"grok-build",refreshLeadMs:3e5},w={defaultBaseUrl:"https://gitlab.com",authorizeUrlPath:"/oauth/authorize",tokenUrlPath:"/oauth/token",userInfoUrlPath:"/api/v4/user",scope:"api read_user",codeChallengeMethod:"S256"},x={baseUrl:"https://www.codebuddy.ai",stateUrl:"https://www.codebuddy.ai/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.ai/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.ai/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.ai/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.ai/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",domain:"www.codebuddy.ai",platform:"CLI",pollInterval:5e3},y={baseUrl:"https://www.codebuddy.cn",stateUrl:"https://www.codebuddy.cn/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.cn/v2/plugin/auth/token",accountUrl:"https://www.codebuddy.cn/v2/plugin/login/account",accountsUrl:"https://www.codebuddy.cn/v2/plugin/accounts",refreshUrl:"https://www.codebuddy.cn/v2/plugin/auth/token/refresh",userAgent:"CLI/2.63.2 CodeBuddy/2.63.2",domain:"www.codebuddy.cn",platform:"CLI",pollInterval:5e3},z=3e5}};
|