zevairouter 1.1.57 → 1.1.58
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 +6 -0
- package/cli/app/.next-cli-build/BUILD_ID +1 -1
- package/cli/app/.next-cli-build/app-path-routes-manifest.json +24 -24
- package/cli/app/.next-cli-build/build-manifest.json +2 -2
- package/cli/app/.next-cli-build/prerender-manifest.json +3 -3
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +1 -1
- 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 +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 +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 +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 +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 +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 +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 +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 +20 -20
- 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 +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 +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 +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 +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 +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +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 +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page.js +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 +2 -2
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +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 +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- 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 +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/crush-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +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/forge-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/test/route.js +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/cloudflare-ai/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +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 +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 +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 +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 +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 +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 +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 +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 +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 +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/json-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +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 +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 +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 +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 +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 +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +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 +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 +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 +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 +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +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 +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 +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/cloudflare-ai/discover-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/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 +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/web-login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- 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 +3 -3
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +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 +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +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 +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 +2 -2
- package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/_full.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/_full.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- 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/_full.segment.rsc +2 -2
- 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 +2 -2
- package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +2 -2
- 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 +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 +2 -2
- package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- package/cli/app/.next-cli-build/server/app/login/page.js +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 +2 -2
- package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +2 -2
- 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/manifest.webmanifest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app-paths-manifest.json +24 -24
- package/cli/app/.next-cli-build/server/chunks/1019.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1384.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1509.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1757.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1782.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/2025.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/2301.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2557.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2970.js +2 -2
- package/cli/app/.next-cli-build/server/chunks/3190.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3487.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3792.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3815.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/412.js +2 -2
- package/cli/app/.next-cli-build/server/chunks/4730.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4754.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4780.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5000.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5124.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5330.js +6 -6
- package/cli/app/.next-cli-build/server/chunks/5580.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5626.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5728.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5992.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5999.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6176.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6492.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6630.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6846.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7135.js +2 -2
- package/cli/app/.next-cli-build/server/chunks/7319.js +18 -18
- package/cli/app/.next-cli-build/server/chunks/7401.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7793.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8028.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8795.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/8895.js +20 -20
- package/cli/app/.next-cli-build/server/chunks/8972.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/9548.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/9618.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/9679.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/9816.js +1 -0
- package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/middleware.js +2 -2
- package/cli/app/.next-cli-build/server/pages/404.html +1 -1
- package/cli/app/.next-cli-build/server/pages/500.html +1 -1
- package/cli/app/.next-cli-build/server/preview-props.json +3 -3
- package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/cli/app/.next-cli-build/static/chunks/620-26853319ef19031a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-6418732dff81242a.js +68 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-4fa479cd9921e97e.js → page-a0e271ee32723312.js} +1 -1
- package/cli/app/CHANGELOG.md +6 -0
- package/cli/app/package.json +1 -1
- package/cli/cli.js +32 -1479
- package/cli/package.json +1 -1
- package/cli/src/cli/processCleanup.js +382 -0
- package/cli/src/cli/routerControl.js +250 -0
- package/cli/src/cli/routerProbe.js +140 -0
- package/cli/src/cli/routerRuntime.js +829 -0
- package/package.json +1 -1
- package/cli/app/.next-cli-build/server/chunks/4404.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/5571.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/6008.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/6352.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/8590.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/86.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/891.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/620-8147a0822eb0b014.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-9ddb0e99c1469d8c.js +0 -68
- /package/cli/app/.next-cli-build/static/{mVu8Jz9Ce-wzeTI4BSBqB → aviA-1Kh6XEnlO-8_ANax}/_buildManifest.js +0 -0
- /package/cli/app/.next-cli-build/static/{mVu8Jz9Ce-wzeTI4BSBqB → aviA-1Kh6XEnlO-8_ANax}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=6008,exports.ids=[6008],exports.modules={19225:(a,b,c)=>{a.exports=c(44870)},29240:(a,b,c)=>{c.d(b,{Dw:()=>m,GJ:()=>l,Ip:()=>k,MZ:()=>h,RV:()=>j,bo:()=>i});var d=c(17404);function e(a){let b="string"==typeof a?a.trim():"";return b.startsWith("models/")?b.slice(7):b}function f(a){let b=e(a).toLowerCase(),c=new Set([b]),f=b.indexOf("/");if(f>0){let a=b.slice(0,f),e=b.slice(f+1),g=(0,d.rs)(a),h=(0,d.wG)(g);g&&c.add(`${String(g).toLowerCase()}/${e}`),h&&c.add(`${String(h).toLowerCase()}/${e}`)}return[...c]}function g(a,b){let c=String(b||"").trim().toLowerCase();if(!c.includes("*"))return!1;if("*"===c)return!0;let d=c.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return RegExp(`^${d}$`,"i").test(String(a||"").trim().toLowerCase())}function h(a){let b=a?.headers?.get?.("Authorization");return b?.startsWith("Bearer ")?b.slice(7):a?.headers?.get?.("x-api-key")||null}function i(a,b){if(!b)return!0;if(!0!==b.active)return!1;let c=Array.isArray(b.allowedCombos)?b.allowedCombos:[];if(0===c.length)return!0;let d=e(a);return c.some(a=>e(a)===d)}function j(a,b,c=null){let d=Array.isArray(c);if(!b)return{allowed:!0,kind:d?"combo":"model"};if(!0!==b.active)return{allowed:!1,kind:"inactive"};if(d){if(!i(a,b))return{allowed:!1,kind:"combo"};let d=c.find(a=>!l("string"==typeof a?a:"",b));return d?{allowed:!1,kind:"model",model:"string"==typeof d?d:""}:{allowed:!0,kind:"combo"}}return l(a,b)?{allowed:!0,kind:"model"}:{allowed:!1,kind:"model"}}function k(a,b){if(b?.kind==="combo")return`Combo ${a} is not allowed for this API key`;let c=b?.model||a;return`Model ${c} is not allowed for this API key`}function l(a,b){let c;if(!b)return!0;if(!0!==b.active)return!1;let h=Array.isArray(b.allowedModels)?b.allowedModels:[];if(0===h.length)return!0;let{deny:i,allow:j}=function(a){let b=[],c=[];for(let d of a){let a=String(d??"").trim();(a.startsWith("!")||a.startsWith("-"))&&a.length>1?b.push(a.slice(1).toLowerCase()):a&&c.push(a)}return{deny:b,allow:c}}(h);return c=f(a),!i.some(a=>c.some(b=>{if(g(b,a))return!0;let c=b.includes("/")?b.split("/").slice(1).join("/"):b;return b.includes(a)||c.includes(a)}))&&(0===j.length||j.some(b=>(function(a,b){let c=f(a);if(c.some(a=>a===e(b).toLowerCase())||c.some(a=>g(a,b)))return!0;let h=/^([^/*]+)\/\*$/.exec(String(b||"").trim().toLowerCase());if(!h)return!1;let i=String((0,d.rs)(h[1])||"").toLowerCase();return!!i&&c.some(a=>a.startsWith(`${i}/`))})(a,b)))}function m(a,b,c=new Map){if(!b)return[...a];let d=new Set(Array.isArray(b.allowedConnectionIds)?b.allowedConnectionIds:[]);return a.filter(a=>!!l(a?.id,b)&&(0===d.size||(c.get(e(a?.id))||c.get(a?.id)||[]).some(a=>d.has(a))))}},45974:(a,b,c)=>{c.d(b,{FN:()=>n,VZ:()=>o,XJ:()=>s,vO:()=>p});var d=c(39326),e=c(72521),f=c(7803);let g=new Map,h=new Map,i=new Map,j=new Map,k=new Map;function l(a){if(!a||"string"!=typeof a)return null;let b=(a.includes("/")?a.slice(a.indexOf("/")+1):a).toLowerCase();return b.startsWith("claude-")||b.startsWith("gpt-")||"claude"===b?"claude_gpt":b.startsWith("gemini-")&&!b.includes("image")||"gemini"===b?"gemini":null}function m(a,b){if(!a||"object"!=typeof a||!b)return null;let c="string"==typeof b?(b.includes("/")?b.slice(b.indexOf("/")+1):b).replace(/\([^()]+\)\s*$/,"").trim():"",d=l(c),e=[];if(a[c]&&e.push(a[c]),"claude-sonnet-5-5"===c&&a["claude-sonnet-5-5-high"]&&e.push(a["claude-sonnet-5-5-high"]),"claude-opus-5-5"===c&&a["claude-opus-5-5-high"]&&e.push(a["claude-opus-5-5-high"]),"gemini-3.8-flash"===c&&a["gemini-3.8-flash-medium"]&&e.push(a["gemini-3.8-flash-medium"]),"gemini-3.7-flash"===c&&a["gemini-3.7-flash-medium"]&&e.push(a["gemini-3.7-flash-medium"]),"gemini-3.6-flash"===c&&a["gemini-3.6-flash-medium"]&&e.push(a["gemini-3.6-flash-medium"]),"claude_gpt"===d?(a.claude_gpt_session&&e.push(a.claude_gpt_session),a.claude_gpt_weekly&&e.push(a.claude_gpt_weekly)):"gemini"===d&&(a.gemini_session&&e.push(a.gemini_session),a.gemini_weekly&&e.push(a.gemini_weekly)),0===e.length)return null;let f=Date.now(),g=[];for(let a of e)if(a&&"number"==typeof a.remainingPercentage&&!(a.remainingPercentage>0))if(a.resetAt){let b=new Date(a.resetAt).getTime();b>f&&g.push({...a,resetMs:b})}else g.push({...a,resetMs:0});if(g.length>0){g.sort((a,b)=>b.resetMs-a.resetMs);let a=g[0];return{used:a.used,total:a.total,remainingPercentage:0,resetAt:a.resetAt,displayName:a.displayName||c}}let h=e.filter(a=>a&&"number"==typeof a.remainingPercentage);return 0===h.length?null:(h.sort((a,b)=>a.remainingPercentage-b.remainingPercentage),h[0])}function n(a,b,c=Date.now()){if(!a||!b)return null;let d=g.get(a),e=m(d,b)||d?.[b];if(!e||"number"!=typeof e.remainingPercentage||e.remainingPercentage>0||!e.resetAt)return null;let f=new Date(e.resetAt).getTime();return!Number.isFinite(f)||f<=c?null:e.resetAt}function o(a,b,c=Date.now()){return null!==n(a,b,c)}function p(a,b){if(!a||!b)return;let c=`${a}|${b}`;j.delete(c);let d=k.get(c);if(void 0===d)return;k.delete(c);let e=g.get(a),f=new Date(d).toISOString();e?.[b]?.resetAt===f&&delete e[b];let h=l(b);"claude_gpt"===h&&e?.claude_gpt_session?.resetAt===f?delete e.claude_gpt_session:"gemini"===h&&e?.gemini_session?.resetAt===f&&delete e.gemini_session,e&&g.set(a,e)}async function q(a,b,c){let d=Date.now(),e=i.get(a);if(e)return e;if(d-(h.get(a)||0)<3e4)return g.get(a)||null;h.set(a,d);let f=r(a,b,c);i.set(a,f);try{return await f}finally{i.delete(a)}}async function r(a,b,c){try{let f=await (0,d.B)(c||{}),h=await (0,e.my)({provider:"antigravity",accessToken:b,providerSpecificData:c||{},projectId:c?.projectId},{connectionProxyEnabled:!0===f.connectionProxyEnabled,connectionProxyUrl:f.connectionProxyUrl||"",connectionNoProxy:f.connectionNoProxy||"",vercelRelayUrl:f.vercelRelayUrl||"",strictProxy:!0===f.strictProxy});if(!h?.quotas||h.message)return null;return g.set(a,function(a,b){let c=Date.now();for(let[d,e]of k)if(d.startsWith(`${a}|`)){if(e<=c){k.delete(d);continue}b[d.slice(a.length+1)]={remainingPercentage:0,resetAt:new Date(e).toISOString()}}return b}(a,{...h.quotas})),g.get(a)}catch(b){return f.warn("AG_QUOTA",`${String(a).slice(0,8)} | refresh failed: ${b?.message||b}`),null}}async function s(a,b,c,d,e){if(!a||!c)return null;f.info("AG_QUOTA",`${String(a).slice(0,8)} | ${b} on ${c} — refreshing quota`);let h=m(await q(a,d,e),c);if(!h||h.remainingPercentage>0){let d=`${a}|${c}`,e=Date.now(),h=j.get(d),i=h&&e-h.windowStart<=6e4?h.windowStart:e,l=h&&i===h.windowStart?h.count+1:1;if(j.set(d,{count:l,windowStart:i}),l>=3){j.delete(d);let h=e+9e5,i=g.get(a)||{};return i[c]={remainingPercentage:0,resetAt:new Date(h).toISOString()},g.set(a,i),k.set(d,h),f.warn("AG_QUOTA",`${String(a).slice(0,8)} | STRIKE_${b} ${c} — CACHE_BLOCK 15m`),h}return null}if(j.delete(`${a}|${c}`),!h.resetAt)return null;let i=new Date(h.resetAt).getTime();if(!Number.isFinite(i)||i<=Date.now())return null;let l=g.get(a)||{};return l[c]={remainingPercentage:0,resetAt:h.resetAt},g.set(a,l),f.warn("AG_QUOTA",`${String(a).slice(0,8)} | UPSTREAM_${b} ${c} — CACHE_BLOCK until ${h.resetAt}`),i}},47293:(a,b,c)=>{c.d(b,{A:()=>f});let d=new Uint8Array(16);var e=c(50122);let f=function(a,b,c){return b||a||!crypto.randomUUID?function(a,b,c){let f=(a=a||{}).random??a.rng?.()??crypto.getRandomValues(d);if(f.length<16)throw Error("Random bytes length must be >= 16");if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,b){if((c=c||0)<0||c+16>b.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[c+a]=f[a];return b}return(0,e.k)(f)}(a,b,c):crypto.randomUUID()}},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},79761:(a,b,c)=>{c.d(b,{BU:()=>l,hb:()=>k,tH:()=>j});var d=c(40669),e=c(35989),f=c(75434);let g=new Set(["account","provider","egress","integrity"]);function h(a,b="unknown",c=160){return String(a||"").trim().toLowerCase().replace(/[^a-z0-9._:-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,c)||b}function i(a={}){let b=g.has(a.scope)?a.scope:null;if(!b)return null;let c=h((0,d.g2)(h(a.provider)),"unknown-provider",80),f=h(a.accountId||a.connectionId,"unknown-account"),j=h(a.egressId,"direct"),k=(0,e.Nm)(a.modelFamily||a.model);return Object.freeze("account"===b?{scope:b,provider:c,accountId:f}:"provider"===b?{scope:b,provider:c}:"egress"===b?{scope:b,egressId:j}:{scope:b,provider:c,modelFamily:k,egressId:j})}let j=function(a={}){let b="function"==typeof a.now?a.now:Date.now,c="function"==typeof a.onTransition?a.onTransition:()=>{},e=new Map,f=0;function g(a,b,d){c(Object.freeze({type:"circuit",provider:a.dimensions.provider,phase:b,reason:a.dimensions.scope,deadlineMs:a.openUntilMs?Math.max(0,a.openUntilMs-d):0,...a.dimensions.modelFamily?{modelFamily:a.dimensions.modelFamily}:{}}))}function j(a){for(let[b,c]of e)c.failures=c.failures.filter(b=>a-b.atMs<=6e4),"closed"===c.mode&&0===c.failures.length&&a-c.lastTouchedAtMs>18e5&&e.delete(b);let b=[...e.entries()].filter(([,a])=>"closed"===a.mode).sort((a,b)=>a[1].lastTouchedAtMs-b[1].lastTouchedAtMs);for(;b.length>2048;)e.delete(b.shift()[0])}function k(a,c=!1){let d=i(a);if(!d)return null;let f=Object.values(d).join("\x1f"),g=e.get(f);return!g&&c&&(g={dimensions:d,mode:"closed",failures:[],openDurationMs:3e4,openUntilMs:null,probeLeaseId:null,probeSuccesses:0,lastTouchedAtMs:b()},e.set(f,g)),g}function l(a,b){a?.mode==="open"&&b>=a.openUntilMs&&(a.mode="half_open",a.probeLeaseId=null,g(a,"half_open",b))}function m(a,b,c=a.openDurationMs){a.mode="open",a.openDurationMs=Math.min(3e5,Math.max(3e4,c)),a.openUntilMs=b+a.openDurationMs,a.probeLeaseId=null,a.probeSuccesses=0,a.lastTouchedAtMs=b,g(a,"open",b)}return Object.freeze({recordFailure:function(a={}){let c;if(!1===a.evidentiary)return!1;let e=b();j(e);let f=k(a,!0);return!!f&&(l(f,e),"closed"===f.mode)&&(f.failures=f.failures.filter(a=>e-a.atMs<=6e4),f.failures.push(Object.freeze({atMs:e,accountId:h(a.accountId||a.connectionId,"unknown-account"),provider:h((0,d.g2)(h(a.provider)),"unknown-provider",80)})),f.lastTouchedAtMs=e,c=f.failures.length,("integrity"===f.dimensions.scope?c>=1:!(c<5)&&("provider"===f.dimensions.scope?new Set(f.failures.map(a=>a.accountId)).size>=2:"egress"!==f.dimensions.scope||new Set(f.failures.map(a=>a.provider)).size>=2))&&m(f,e),!0)},recordSuccess:function(a={}){let c=b(),d=k(a);return!!d&&(l(d,c),"closed"===d.mode&&(d.failures=[],d.lastTouchedAtMs=c,!0))},getDecision:function(a){let c=b();j(c);let d=i(a),e=k(a);return e?(l(e,c),Object.freeze({...e.dimensions,state:e.mode,openUntilMs:e.openUntilMs,openDurationMs:e.openDurationMs,probeInFlight:!!e.probeLeaseId,consecutiveProbeSuccesses:e.probeSuccesses})):Object.freeze({...d||{scope:null},state:"closed",openUntilMs:null,openDurationMs:3e4,probeInFlight:!1,consecutiveProbeSuccesses:0})},tryAcquireProbe:function(a){let c=b(),d=k(a);return d?(l(d,c),"half_open"!==d.mode)?Object.freeze({acquired:!1,reason:"open"===d.mode?"circuit_open":"circuit_closed"}):d.probeLeaseId?Object.freeze({acquired:!1,reason:"probe_in_flight"}):(d.probeLeaseId=`probe-${c}-${++f}`,d.lastTouchedAtMs=c,Object.freeze({acquired:!0,leaseId:d.probeLeaseId})):Object.freeze({acquired:!1,reason:"circuit_closed"})},releaseProbe:function(a,c={}){let d=b(),e=k(a);if(!e||"half_open"!==e.mode||!e.probeLeaseId||c.leaseId!==e.probeLeaseId)return!1;if(e.probeLeaseId=null,e.lastTouchedAtMs=d,!0===c.cancelled)return!0;if(!0===c.success)return e.probeSuccesses+=1,e.probeSuccesses>=2&&(e.mode="closed",e.failures=[],e.openDurationMs=3e4,e.openUntilMs=null,e.probeLeaseId=null,e.probeSuccesses=0,e.lastTouchedAtMs=d,g(e,"closed",d)),!0;return m(e,d,Math.min(3e5,2*e.openDurationMs)),!0}})}({onTransition:f.cN}),k=j.recordFailure;j.recordSuccess,j.getDecision,j.tryAcquireProbe;let l=j.releaseProbe},80238:(a,b,c)=>{c.d(b,{Pt:()=>E,Tr:()=>F,c1:()=>A,kI:()=>G,uT:()=>z,vk:()=>D});var d=c(89718),e=c(39326),f=c(12557),g=c(3662),h=c(29679),i=c(91254),j=c(17404),k=c(7803),l=c(45974),m=c(93930),n=c(79761);let o=Promise.resolve(),p=new Set(["policy_suspended","credential_rejected","reauth_required"]),q=new Set(["authentication","entitlement_or_quota","permission_denied","rate_limited","upstream_transient"]),r=new Set(["not_attempted","succeeded","transient_failed","rejected"]);function s(a,b=200){return null==a||""===a?null:String(a).slice(0,b).replace(/[^a-zA-Z0-9._:/#-]/g,"")||null}function t(a){let b=Number(a);return Number.isInteger(b)&&b>=0&&b<=599?b:null}function u(a,b){let c=a&&"object"==typeof a&&!Array.isArray(a)?a:{},d=Number(b??c.resetsAtMs),e=new Date(d),f=Number.isFinite(d)&&d>0&&Number.isFinite(e.getTime())?e.toISOString():null;return{failureClass:s(c.failureClass,80)?.toLowerCase()||null,providerErrorCode:s(c.providerErrorCode),upstreamRequestId:s(c.upstreamRequestId),failureResetAt:f,authLifecycle:function(a){if(!a||"object"!=typeof a||Array.isArray(a))return null;let b=r.has(a.refreshOutcome)?a.refreshOutcome:"not_attempted";return{initialStatus:t(a.initialStatus),refreshAttempted:!0===a.refreshAttempted,refreshOutcome:b,retryStatus:t(a.retryStatus)}}(c.authLifecycle)}}function v(a,b){return({policy_suspended:"Kiro reports that this account is suspended or disabled by upstream policy.",credential_rejected:"Kiro rejected the credential after a successful token refresh.",reauth_required:"Kiro rejected the refresh credential; sign in again before re-enabling.",entitlement_or_quota:"Kiro entitlement or quota is temporarily unavailable.",rate_limited:"Kiro rate limit is temporarily exhausted.",authentication:"Kiro authentication is temporarily unavailable.",permission_denied:"Kiro denied this request without confirming an account suspension.",upstream_transient:"Kiro upstream is temporarily unavailable."})[a]||`Kiro upstream request failed with status ${b||"unknown"}.`}function w(a){return"string"!=typeof a?"":a.trim().replace(/^(?:kiro|kr)\//i,"")}function x(a,b){let c=a?.providerSpecificData?.enabledModels;if(!Array.isArray(c)||0===c.length)return!0;let d=w(b);return c.some(a=>w(a)===d)}function y(a){return Object.freeze({...a,supportedModels:Object.freeze([...a.supportedModels||[]]),supportedOperations:Object.freeze([...a.supportedOperations||[]]),capabilities:Object.freeze([...a.capabilities||[]]),quota:a.quota?Object.freeze({...a.quota}):null,circuits:Object.freeze({...a.circuits||{}}),eligibility:Object.freeze({eligible:a.eligibility.eligible,reasons:Object.freeze([...a.eligibility.reasons])})})}async function z(a,b=null,c={}){let e=(0,j.rs)(a),g=Array.isArray(c.allowedConnectionIds)?c.allowedConnectionIds:null;if(!g&&c.apiKey&&(g=await (0,d.ME)(c.apiKey)),j.AI_PROVIDERS[e]?.noAuth){let a={id:"noauth",provider:e,priority:1,legacyOrder:0,isActive:!0,quarantinedAt:null,reauthRequired:!1,supportedModels:[],supportedOperations:[c.operation||"chat"],capabilities:c.capabilities||[],modelLocked:!1,quota:null,circuits:{},transportAvailable:!1!==c.transportAvailable,outboundAllowed:!1!==c.outboundAllowed,egressId:"direct",health:null,sticky:!1};return a.eligibility=(0,m.Z)(a,{...c,provider:e,model:b,operation:c.operation||"chat",allowedConnectionIds:g,pinnedConnectionId:c.strictPreferred?c.preferredConnectionId:null}),Object.freeze([y(a)])}let[h,i]=await Promise.all([(0,d.getProviderConnections)({provider:e}),(0,d.tV)(e)]),k=new Map(i.map(a=>[a.connectionId,a])),o=Number.isFinite(c.nowMs)?c.nowMs:Date.now(),p=c.circuitRegistry||n.tH;return Object.freeze(h.map((a,d)=>{let h,i=a.providerSpecificData||{},j=k.get(a.id)||null,n=Date.parse(j?.fetchedAt),q=Number.isFinite(n)&&o-n<=f.JN,r=(0,f.td)(j?.usage,e,b),s=(0,f.yH)(j,o),t=Array.isArray(i.enabledModels)?i.enabledModels.map(a=>w(a)):[],u=i.connectionProxyPoolId||i.proxyPoolId||(i.vercelRelayUrl?"relay":"direct"),v={account:{scope:"account",provider:e,accountId:a.id},provider:{scope:"provider",provider:e},egress:{scope:"egress",egressId:u},integrity:{scope:"integrity",provider:e,model:b,egressId:u}},x=Object.fromEntries(Object.entries(v).map(([a,b])=>[a,p.getDecision(b)])),z=Object.entries(x).filter(([,a])=>"half_open"===a.state),A=Object.values(x).some(a=>"open"===a.state);if(!0===c.acquireCircuitProbes&&!A&&1===z.length){let[a]=z[0],b=p.tryAcquireProbe(v[a]);x[a]={...x[a],probeAcquired:!0===b.acquired,...b.leaseId?{probeLeaseId:b.leaseId}:{}}}let B={id:a.id,provider:e,priority:Number.isFinite(a.priority)?a.priority:999,legacyOrder:d,isActive:!0===a.isActive,quarantinedAt:a.quarantinedAt||null,reauthRequired:"reauth_required"===a.failureClass||"token_expired"===a.autoDisabledReason||"reauth_required"===a.autoDisabledReason,supportedModels:t,supportedOperations:Array.isArray(i.supportedOperations)?i.supportedOperations:[c.operation||"chat"],capabilities:Array.isArray(i.capabilities)?i.capabilities:[],modelLocked:(0,f.Bl)(a,b,e)||(h=a.id,"antigravity"===e&&!!(0,l.FN)(h,b,o)),quota:j?{provenance:q?"fresh":"last_successful",exhausted:!!s,remaining:r>=0?r:null,total:r>=0?100:null,fetchedAtMs:Number.isFinite(n)?n:null,validUntilMs:Number.isFinite(n)?n+f.JN:null,exhaustedUntilMs:s||null}:null,circuits:x,transportAvailable:!1!==c.transportAvailable&&!1!==i.transportAvailable,outboundAllowed:!1!==c.outboundAllowed,egressId:u,health:"unavailable"===a.testStatus||a.lastError?"degraded":"success"===a.testStatus||"connected"===a.testStatus?"healthy":null,sticky:a.consecutiveUseCount>0};return B.eligibility=(0,m.Z)(B,{...c,provider:e,model:b,operation:c.operation||"chat",allowedConnectionIds:g,pinnedConnectionId:c.strictPreferred?c.preferredConnectionId:null,nowMs:o}),y(B)}))}async function A(a,b=null,g=null,m={}){let n,p=b instanceof Set?b:b?new Set([b]):new Set,q=m?.preferredConnectionId||null,r=!!m?.strictPreferred,s=o;o=new Promise(a=>{n=a});try{let b;await s;let n=(0,j.rs)(a);if(j.AI_PROVIDERS[n]?.noAuth){let a=((await (0,d.mt)()).providerStrategies||{})[n]||{},b=a.rotateStrategy||"none",c=a.proxyPoolId||null;if("none"!==b){let a=(await (0,d.ui)({isActive:!0})).filter(a=>a.proxyUrl),f=a.filter(a=>"error"!==a.testStatus),g=(f.length?f:a).map(a=>a.id);c=(0,e.p)(g,b,n)}let f=await (0,e.B)({proxyPoolId:c||""});return{id:"noauth",connectionId:"noauth",connectionName:"Public",isActive:!0,accessToken:"public",providerSpecificData:{connectionProxyEnabled:f.connectionProxyEnabled,connectionProxyUrl:f.connectionProxyUrl,connectionNoProxy:f.connectionNoProxy,connectionProxyPoolId:f.proxyPoolId||null,strictProxy:!0===f.strictProxy,vercelRelayUrl:f.vercelRelayUrl||""}}}let o=await (0,d.getProviderConnections)({provider:n,isActive:!0}),t=Array.isArray(m?.allowedConnectionIds)?m.allowedConnectionIds:null;if(!t&&m?.apiKey&&(t=await (0,d.ME)(m.apiKey)),Array.isArray(t)&&t.length>0){let b=new Set(t);o=o.filter(a=>b.has(a.id)),k.debug("AUTH",`${a} | API key scoped to ${o.length} allowed connection(s)`)}k.debug("AUTH",`${a} | total connections: ${o.length}, excludeIds: ${p.size>0?[...p].join(","):"none"}, model: ${g||"any"}`);let u=null;if("kiro"===n&&g)try{u=await (0,h.ED)(g)}catch(a){k.warn("AUTH",`Kiro model support cache unavailable: ${a?.message||a}`)}let v=u?.state==="supported"||u?.state==="unsupported",w={modelUnavailable:!0,provider:n,model:g};if(0===o.length){if(v)return k.warn("AUTH",`${a} | no eligible supporter for ${g}`),w;return k.warn("AUTH",`No credentials for ${a}`),null}let y=o.filter(a=>!a.quarantinedAt),z=new Set,A=new Set,B=!1;if("kiro"===n&&g){let a=y=y.filter(a=>x(a,g)),b=new Set(u?.unsupportedConnectionIds||[]),c=new Set(u?.freshCatalogConnectionIds||[]),d=o.filter(a=>{let c=a?.providerSpecificData?.enabledModels;return Array.isArray(c)&&c.length>0&&x(a,g)&&!b.has(a.id)}).map(a=>a.id),e=new Set([...u?.supportingConnectionIds||[],...d].filter(a=>!b.has(a)));A=new Set([...b,...[...c].filter(a=>!e.has(a))]),y=y.filter(a=>!A.has(a.id)),B=a.length>0&&a.every(a=>A.has(a.id)),e.size>0?(z=e,v=!0):u?.state==="unsupported"&&(y=[])}let C=new Map;if("codebuddy-cn"===n)for(let a of(await (0,d.tV)(n))){let b=(0,f.yH)(a);b&&C.set(a.connectionId,b)}let D=new Map;if("codebuddy-cn"===n)for(let a of o){if(11140!==Number(a.providerErrorCode))continue;let b=(0,f.kJ)(a);b&&D.set(a.id,b)}let E=new Set,F=new Set;if("codex"===n&&g){let a=await (0,d.tV)(n),b=new Map(a.map(a=>[a.connectionId,a]));for(let a of o)(0,f.xB)(a,g,n)&&F.add(a.id),(0,f.N2)(a,g,b.get(a.id),n,{ignoreProbe:!0})&&!F.has(a.id)&&E.add(a.id)}if("codebuddy"===n||"codebuddy-cn"===n)for(let a of o)(0,i.hN)(a)&&(0,f.xB)(a,null,n)&&F.add(a.id);let G=a=>D.has(a.id)||("codebuddy"===n||"codebuddy-cn"===n)&&(0,i.hN)(a)&&F.has(a.id)||(0,f.Bl)(a,g,n)&&!E.has(a.id),H=a=>F.has(a.id)?"codebuddy"===n||"codebuddy-cn"===n?a[(0,f.UM)(null,n)]:new Date(Date.now()+1e3).toISOString():[(0,f.V0)(a,g,n),D.get(a.id)].filter(Boolean).sort().at(-1)||null,I=y.filter(a=>!(p.has(a.id)||G(a)||C.has(a.id)||"antigravity"===n&&(0,l.VZ)(a.id,g))),J=I,K=!1;if("kiro"===n&&g&&!r){let a=I.filter(a=>z.has(a.id));if(a.length>0)J=a;else{let a=I.filter(a=>!z.has(a.id)),b=[...p].filter(a=>!z.has(a)).length;J=a,b>=3?(J=[],K=!0):p.size>0&&0===a.length&&(K=!0)}}if(r&&q){let b=o.find(a=>a.id===q);if(!b)return k.warn("AUTH",`${a} | pinned account not found: ${q}`),null;if(b.quarantinedAt)return k.warn("AUTH",`${a} | pinned account is quarantined: ${b.id?.slice(0,8)}`),null;if(A.has(b.id))return k.warn("AUTH",`${a} | pinned account does not support ${g}: ${b.id?.slice(0,8)}`),w;if(!y.some(a=>a.id===b.id))return k.warn("AUTH",`${a} | pinned account is not eligible for ${g||"this request"}: ${b.id?.slice(0,8)}`),v?w:null;if(p.has(b.id))return k.warn("AUTH",`${a} | pinned account excluded after failure: ${b.id?.slice(0,8)}`),null;if(G(b)||C.has(b.id)){let a=[H(b),C.has(b.id)?new Date(C.get(b.id)).toISOString():null].filter(Boolean).sort().at(-1);return{allRateLimited:!0,retryAfter:a,retryAfterHuman:(0,f.Qo)(a),lastError:b.lastError||"Pinned account unavailable",lastErrorCode:b.errorCode||null}}J=[b]}if(k.debug("AUTH",`${a} | available: ${J.length}/${y.length}`),o.forEach(a=>{let b=p.has(a.id),c=G(a),d=E.has(a.id),e=C.get(a.id),h=!!a.quarantinedAt,i=A.has(a.id);if(b||c||e||d||h||i){let j=(0,f.kJ)(a),l=F.has(a.id);k.debug("AUTH",` → ${a.id?.slice(0,8)} | ${b?"excluded":""} ${c?`modelLocked(${g}) until ${j}`:""} ${d?`staleLockRecovered(${g})`:""} ${l?`recoveryProbeInFlight(${g})`:""} ${e?`quotaExhausted until ${new Date(e).toISOString()}`:""} ${h?"quarantined":""} ${i?`unsupported(${g})`:""}`)}}),0===J.length){if(K)return k.warn("AUTH",`${a} | bounded fallback exhausted for ${g}`),null;let b=y.filter(a=>G(a)),c=y.map(a=>[G(a)?H(a):null,C.has(a.id)?new Date(C.get(a.id)).toISOString():null,"antigravity"===n?(0,l.FN)(a.id,g):null].filter(Boolean).sort().at(-1)).filter(Boolean).sort()[0]||null;if(c){let d=b[0];return k.warn("AUTH",`${a} | all ${y.length} candidate accounts locked for ${g||"all"} (${(0,f.Qo)(c)}) | lastError=${d?.lastError?.slice(0,50)}`),{allRateLimited:!0,retryAfter:c,retryAfterHuman:(0,f.Qo)(c),lastError:d?.lastError||null,lastErrorCode:d?.errorCode||null}}return k.warn("AUTH",`${a} | all ${o.length} accounts unavailable`),v||B?w:null}let L=await (0,d.mt)(),M=(L.providerStrategies||{})[n]||{},N=M.fallbackStrategy||L.fallbackStrategy||"fill-first";if(q&&(b=J.find(a=>a.id===q))&&k.debug("AUTH",`${a} | pinned to ${b.id?.slice(0,8)} (${b.name||b.email||"unnamed"})`),b);else if(r&&q)return k.warn("AUTH",`${a} | pinned account unavailable: ${q}`),null;else if("round-robin"===N){let a=M.stickyRoundRobinLimit||L.stickyRoundRobinLimit||3,c=[...J].sort((a,b)=>a.lastUsedAt||b.lastUsedAt?a.lastUsedAt?b.lastUsedAt?new Date(b.lastUsedAt)-new Date(a.lastUsedAt):-1:1:(a.priority||999)-(b.priority||999))[0],e=c?.consecutiveUseCount||0;c&&c.lastUsedAt&&e<a?(b=c,await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:(b.consecutiveUseCount||0)+1})):(b=[...J].sort((a,b)=>a.lastUsedAt||b.lastUsedAt?a.lastUsedAt?b.lastUsedAt?new Date(a.lastUsedAt)-new Date(b.lastUsedAt):1:-1:(a.priority||999)-(b.priority||999))[0],await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:1}))}else if("most-quota"===N){let a=await Promise.all(J.map(async a=>{let b=-1;try{let c=await (0,d.getQuotaSnapshot)(a.id);b=(0,f.td)(c?.usage,n,g)}catch{}return{conn:a,remaining:b}}));a.sort((a,b)=>a.remaining!==b.remaining?b.remaining-a.remaining:(a.conn.priority||999)-(b.conn.priority||999)),b=(a.filter(a=>0!==a.remaining)[0]||a[0]).conn,await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:1})}else if("lowest-latency"===N){let{getLatencyStats:e}=await Promise.resolve().then(c.bind(c,14686)),f=await e(),g=J.map(a=>{let b=f.get(`${a.provider}|${a.id}`)||f.get(`${n}|${a.id}`);return{conn:a,avgMs:b?b.avgMs:null,samples:b?b.samples:0}});g.sort((a,b)=>null===a.avgMs&&null===b.avgMs?(a.conn.priority||999)-(b.conn.priority||999):null===a.avgMs?1:null===b.avgMs?-1:a.avgMs!==b.avgMs?a.avgMs-b.avgMs:(a.conn.priority||999)-(b.conn.priority||999)),b=g[0].conn,k.debug("AUTH",`${a} | lowest-latency → ${b.id?.slice(0,8)} (${g[0].avgMs??"?"}ms avg, ${g[0].samples} samples)`),await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:1})}else b=J[0];if(E.has(b.id)){let a=(0,f.WP)(g,n);await (0,d.updateProviderConnection)(b.id,a),b={...b,...a}}if(("codebuddy"===n||"codebuddy-cn"===n)&&(0,i.hN)(b)){let a=(0,f.WP)(null,n);await (0,d.updateProviderConnection)(b.id,a),b={...b,...a}}let O=await (0,e.B)(b.providerSpecificData||{});return{authType:b.authType,apiKey:b.apiKey,accessToken:b.accessToken,refreshToken:b.refreshToken,idToken:b.idToken,expiresAt:b.expiresAt,expiresIn:b.expiresIn,lastRefreshAt:b.lastRefreshAt,projectId:b.projectId||b.providerSpecificData?.projectId||null,connectionName:b.displayName||b.name||b.email||b.id,copilotToken:b.providerSpecificData?.copilotToken,providerSpecificData:{...b.providerSpecificData||{},connectionProxyEnabled:O.connectionProxyEnabled,connectionProxyUrl:O.connectionProxyUrl,connectionNoProxy:O.connectionNoProxy,strictProxy:!0===O.strictProxy,connectionProxyPoolId:O.proxyPoolId||null,vercelRelayUrl:O.vercelRelayUrl||""},connectionId:b.id,testStatus:b.testStatus,lastError:b.lastError,_connection:b}}finally{n&&n()}}async function B(a,b,e,h=null,l=null,m=null,n=null,o=null){let p,q,r;if(!a||"noauth"===a)return{shouldFallback:!1,cooldownMs:0};let s=(0,j.rs)(h),t=(0,f.UM)(l,s);if((0,f.d5)(b,e))return await (0,d.updateProviderConnection)(a,{[t]:null}),k.warn("AUTH",`shared egress/WAF error; fallback without locking account [${b}]`),{shouldFallback:!0,cooldownMs:0};if((0,f.P0)(b,e))return await (0,d.updateProviderConnection)(a,{[t]:null}),k.warn("AUTH",`non-account error; no fallback [${b}] ${"string"==typeof e?e.slice(0,100):"Provider error"}`),{shouldFallback:!1,cooldownMs:0};let u=(await (0,d.getProviderConnections)({provider:s})).find(b=>b.id===a),v=u?.backoffLevel||0,w=(0,f.UO)(e),x="codebuddy-cn"===s&&14018===w,y="codebuddy"===s&&14018===w,z="codebuddy-cn"===s&&11140===w;if(z){let c=new Date().toISOString(),e="CodeBuddy CN rejected this credential (11140 request illegal).";return await (0,d.Iu)(a,(a,d)=>{if(a.manuallyReenabledAt&&a.manuallyReenabledAt!==n?.manuallyReenabledAt)return null;let f={...a,providerSpecificData:(0,i.r_)(a.providerSpecificData,c,w)};return{connection:{[t]:null,isActive:!1,testStatus:"unavailable",lastError:e,errorCode:b,providerErrorCode:w,quarantinedAt:c,quarantineReason:e,lastErrorAt:c,autoDisabledAt:c,autoDisabledReason:"credential_rejected",consecutiveAuthFailures:Math.max(1,(a.consecutiveAuthFailures||0)+1),backoffLevel:0,providerSpecificData:f.providerSpecificData},quotaUsage:(0,i.pX)(d?.usage||{},f)}}),k.warn("AUTH",`${u?.displayName||u?.name||a.slice(0,8)} quarantined immediately [11140]`),{shouldFallback:!0,cooldownMs:0}}if(x){let b=await (0,d.getQuotaSnapshot)(a);m=(0,f.lI)(b?.usage)||m}let A=function(a,b,c){if("github"!==c||402!==Number(a)||!String(b||"").toLowerCase().includes("you've reached your additional usage limit for your plan"))return null;let d=new Date;return Date.UTC(d.getUTCFullYear(),d.getUTCMonth()+1,1)}(b,e,s);A&&A>Date.now()?(p=!0,q=A-Date.now(),r=0):m&&m>Date.now()?(p=!0,q=Math.min(m-Date.now(),g.fh),r=0):{shouldFallback:p,cooldownMs:q,newBackoffLevel:r}=(0,f.hk)(b,e,v);let C=l&&(0,f.Hp)(b,e)?(0,f.gU)(l,s):{};if(!p)return await (0,d.updateProviderConnection)(a,{[t]:null,...C}),{shouldFallback:!1,cooldownMs:0};let D="string"==typeof e?e.slice(0,100):"Provider error",E=x||y,F=A||E?null:(0,f.LV)(s,l),G=(0,f.S5)(F,q,s),H=new Date().toISOString(),I={...G,...C,[t]:null,...E?{[(0,f.UM)(null,s)]:null}:{},testStatus:"unavailable",lastError:D,errorCode:b,providerErrorCode:w,modelLockReason:{model:F||"__all",providerErrorCode:w,reason:D,lockedAt:H,resetsAt:new Date(Date.now()+q).toISOString()},lastErrorAt:H,backoffLevel:r??v};if(E)try{await (0,d.Iu)(a,(a,b)=>{if(a.manuallyReenabledAt&&a.manuallyReenabledAt!==n?.manuallyReenabledAt)return null;let c={...a,providerSpecificData:(0,i.QN)(a.providerSpecificData,H)};return{connection:{...I,providerSpecificData:c.providerSpecificData},quotaUsage:(0,i.pX)(b?.usage||{},c)}})}catch(a){throw k.warn("AUTH",`CodeBuddy runtime exhaustion update failed: ${a?.message||a}`),a}else await (0,d.updateProviderConnection)(a,I);let J=Object.keys(G)[0],K=u?.displayName||u?.name||u?.email||a.slice(0,8);if(k.warn("AUTH",`${K} locked ${J} for ${Math.round(q/1e3)}s [${b}]`),h&&c.e(6802).then(c.bind(c,86802)).then(a=>{a.alertProviderDown(h,`${K}: ${D}`),(429===b||D.toLowerCase().includes("quota"))&&a.alertQuotaExhausted(h,K)}).catch(()=>{}),h&&b&&D&&console.error(`❌ ${h} [${b}]: ${D}`),new Set([401,403]).has(b)&&!x){let c=("string"==typeof e?e:"").toLowerCase(),f=["quota","payment","billing","entitlement","subscription","insufficient_quota"].some(a=>c.includes(a)),g=o?.failureClass==="credential_rejected";if(z||g||!f&&["token expired","token is expired","token has expired","expired token","token invalid","invalid token","revoked","invalid_grant","unauthorized","invalid api key","invalid_api_key","banned","suspended","restricted","account disabled"].some(a=>c.includes(a))){let e=(u?.consecutiveAuthFailures||0)+1;e>=3?(await (0,d.updateProviderConnection)(a,{isActive:!1,autoDisabledAt:new Date().toISOString(),autoDisabledReason:c.includes("banned")||c.includes("suspended")||c.includes("restricted")||c.includes("account disabled")?"banned":"token_expired",consecutiveAuthFailures:e}),k.warn("AUTH",`⛔ Auto-disabled ${K} after ${e} consecutive auth failures [${b}]: ${D}`)):(await (0,d.updateProviderConnection)(a,{consecutiveAuthFailures:e}),k.warn("AUTH",`${K} auth failure ${e}/3 [${b}]: ${D}`))}}return{shouldFallback:!0,cooldownMs:q}}async function C(a,b,c,e,g){if(!a||"noauth"===a)return{shouldFallback:!1,cooldownMs:0};let h=(await (0,d.getProviderConnections)({provider:c})).find(b=>b.id===a),i=h?.displayName||h?.name||h?.email||a.slice(0,8),j=new Date().toISOString(),l=`${c} rejected the refresh credential; sign in again before re-enabling.`;return await (0,d.updateProviderConnection)(a,{[(0,f.UM)(e,c)]:null,isActive:!1,testStatus:"unavailable",lastError:l,lastErrorType:"auth",errorCode:b,failureClass:"reauth_required",providerErrorCode:g.providerErrorCode,upstreamRequestId:g.upstreamRequestId,failureResetAt:g.failureResetAt,authLifecycle:g.authLifecycle,quarantinedAt:j,quarantineReason:l,lastErrorAt:j,autoDisabledAt:j,autoDisabledReason:"reauth_required",consecutiveAuthFailures:Math.max(1,(h?.consecutiveAuthFailures||0)+1),backoffLevel:0}),k.warn("AUTH",`${i} quarantined immediately [reauth_required]`),{shouldFallback:!0,cooldownMs:0}}async function D(a,b,c,e=null,i=null,l=null,m=null,n=null){let o,r,t,w=(0,j.rs)(e);if("antigravity"===w){let c=u(m,l),e="policy_suspended"===c.failureClass&&"ORG_CODE_ASSIST_RESTRICTED"===c.providerErrorCode,g="account_validation_required"===c.failureClass&&"VALIDATION_REQUIRED"===c.providerErrorCode;if(e||g){if(!a||"noauth"===a)return{shouldFallback:!1,cooldownMs:0};let e=(await (0,d.getProviderConnections)({provider:w})).find(b=>b.id===a),h=new Date().toISOString(),j=g?"Google requires account verification before Antigravity can use Gemini Code Assist.":"Google organization policy blocks Gemini Code Assist access for this Antigravity account.",l=(0,f.UM)(i,w);await (0,d.Op)(a,a=>({...Object.fromEntries(Object.keys(a||{}).filter(a=>a.startsWith("modelLock_")).map(a=>[a,null])),[l]:null,modelLockReason:null,isActive:!1,testStatus:"unavailable",lastError:j,errorCode:b,failureClass:c.failureClass,providerErrorCode:c.providerErrorCode,upstreamRequestId:c.upstreamRequestId,failureResetAt:c.failureResetAt,authLifecycle:c.authLifecycle,quarantinedAt:h,quarantineReason:j,lastErrorAt:h,autoDisabledAt:h,autoDisabledReason:c.failureClass,consecutiveAuthFailures:Math.max(1,(a?.consecutiveAuthFailures||0)+1),backoffLevel:0}));let m=e?.displayName||e?.name||e?.email||a.slice(0,8);return k.warn("AUTH",`${m} quarantined immediately [${c.failureClass}]`),{shouldFallback:!0,cooldownMs:0}}}if("kiro"!==w){let d=u(m,l);return"reauth_required"===d.failureClass?C(a,b,w,i,d):B(a,b,c,e,i,l,n,d)}if(!a||"noauth"===a)return{shouldFallback:!1,cooldownMs:0};let x=(0,f.UM)(i,w),y=u(m,l),{failureClass:z}=y;if("shared_egress_waf"===z||(0,f.d5)(b,c))return await (0,d.updateProviderConnection)(a,{[x]:null}),k.warn("AUTH",`Kiro shared egress/WAF error; fallback without account punishment [${b}]`),{shouldFallback:!0,cooldownMs:0};if(function(a,b){if("invalid_model"===a)return!0;let c=String(b||"").toUpperCase();return/INVALID[_-]?MODEL|MODEL[_-]?(?:NOT[_-]?(?:FOUND|SUPPORTED)|UNSUPPORTED)/.test(c)}(z,y.providerErrorCode)){await (0,d.updateProviderConnection)(a,{[x]:null});let b=!1;try{await (0,h.FL)(a,i);let c=(await (0,d.getProviderConnections)({provider:w,isActive:!0})).filter(a=>!a.quarantinedAt).map(a=>a.id);b=!!i&&await (0,h.CY)(i,a,c)}catch(a){k.warn("AUTH",`Kiro model support cache update failed: ${a?.message||a}`)}return k.warn("AUTH",`Kiro model is unsupported by ${a.slice(0,8)}; ${b?"trying a known supporter":"not rotating to an unknown account"}`),{shouldFallback:b,cooldownMs:0}}if(function(a,b){if("invalid_request"===a||"request_error"===a)return!0;let c=String(b||"").toUpperCase();return/INVALID[_-]?(?:REQUEST|ARGUMENT)|VALIDATION|BAD[_-]?REQUEST|MALFORMED/.test(c)}(z,y.providerErrorCode)||(0,f.P0)(b,c))return await (0,d.updateProviderConnection)(a,{[x]:null}),k.warn("AUTH",`Kiro request error; no account lock or credential rotation [${b}]`),{shouldFallback:!1,cooldownMs:0};let A=(await (0,d.getProviderConnections)({provider:w})).find(b=>b.id===a),E=A?.backoffLevel||0,F=y.providerErrorCode||s((0,f.UO)(c)),G=A?.displayName||A?.name||A?.email||a.slice(0,8);if(p.has(z)){let c=new Date().toISOString(),e=v(z,b);return await (0,d.updateProviderConnection)(a,{[x]:null,isActive:!1,testStatus:"unavailable",lastError:e,errorCode:b,failureClass:z,providerErrorCode:F,upstreamRequestId:y.upstreamRequestId,failureResetAt:y.failureResetAt,authLifecycle:y.authLifecycle,quarantinedAt:c,quarantineReason:e,lastErrorAt:c,autoDisabledAt:c,autoDisabledReason:z,consecutiveAuthFailures:Math.max(1,(A?.consecutiveAuthFailures||0)+1),backoffLevel:0}),k.warn("AUTH",`${G} quarantined immediately [${z}]`),{shouldFallback:!0,cooldownMs:0}}let H=Number(l);if(Number.isFinite(H)&&H>Date.now()?(o=!0,r=Math.min(H-Date.now(),g.fh),t=0):{shouldFallback:o,cooldownMs:r,newBackoffLevel:t}=(0,f.hk)(b,c,E),!o)return await (0,d.updateProviderConnection)(a,{[x]:null}),{shouldFallback:!1,cooldownMs:0};let I=q.has(z)||403===b||408===b||429===b||b>=500,J=z||(429===b?"rate_limited":403===b?"permission_denied":b>=500?"upstream_transient":null),K=v(J,b),L=I?null:(0,f.LV)(w,i),M=(0,f.S5)(L,r,w),N=new Date().toISOString(),O=new Date(Date.now()+r).toISOString();await (0,d.updateProviderConnection)(a,{...M,[x]:null,testStatus:"unavailable",lastError:K,errorCode:b,failureClass:J,providerErrorCode:F,upstreamRequestId:y.upstreamRequestId,failureResetAt:y.failureResetAt,authLifecycle:y.authLifecycle,modelLockReason:{model:L||"__all",providerErrorCode:F,reason:K,lockedAt:N,resetsAt:O},lastErrorAt:N,backoffLevel:t??E,consecutiveAuthFailures:0});let P=Object.keys(M)[0];if(k.warn("AUTH",`${G} locked ${P} for ${Math.round(r/1e3)}s [${b}]`),!z&&(401===b||403===b)){let e=("string"==typeof c?c:"").toLowerCase();if(!["quota","payment","billing","entitlement","subscription","insufficient_quota"].some(a=>e.includes(a))&&["token expired","token invalid","invalid token","revoked","unauthorized","invalid api key","invalid_api_key","banned","suspended","restricted","account disabled"].some(a=>e.includes(a))){let c=(A?.consecutiveAuthFailures||0)+1,f=["banned","suspended","restricted","account disabled"].some(a=>e.includes(a));if(c>=3){let e=new Date().toISOString(),g=f?v("policy_suspended",b):"Kiro rejected this credential three consecutive times.";await (0,d.updateProviderConnection)(a,{isActive:!1,quarantinedAt:e,quarantineReason:g,failureClass:f?"policy_suspended":"authentication",autoDisabledAt:e,autoDisabledReason:f?"policy_suspended":"token_expired",consecutiveAuthFailures:c}),k.warn("AUTH",`${G} quarantined after ${c} unstructured auth failures`)}else await (0,d.updateProviderConnection)(a,{consecutiveAuthFailures:c})}}return{shouldFallback:!0,cooldownMs:r}}async function E(a,b,c=null){if(!a||"noauth"===a)return;let e=b._connection||b,g=(0,j.rs)(e.provider),h=(0,f.LV)(g,c),l=Date.now(),m=(0,f.UM)(c,g),n=!1,o=!1,p=(a,b=!1)=>{if(!a||b&&(a.quarantinedAt||e.quarantinedAt))return null;let d=(a,b)=>{if(!a.startsWith(b))return!1;let d=a.slice(b.length);return"__all"===d||!c||(0,f.LV)(g,d)===h};if(b&&Object.keys(a).some(b=>(d(b,"modelLock_")||d(b,"modelRecoveryProbe_"))&&a[b]!==e[b]&&Date.parse(a[b])>l))return n=!0,null;let i=Object.keys(a).filter(a=>a.startsWith("modelLock_")),j=c?(0,f.MC)(c,g):null,k=!!j&&null!=a[j];if("unavailable"!==a.testStatus&&!a.lastError&&0===i.length&&!k)return null;let o=i.filter(d=>{if(b&&a[d]!==e[d])return!1;let i=d.slice(10);if(c&&(0,f.LV)(g,i)===h||c&&"modelLock___all"===d)return!0;let j=a[d];return j&&new Date(j).getTime()<=l});if(0===o.length&&"unavailable"!==a.testStatus&&!a.lastError&&!k)return null;let p=i.filter(b=>!o.includes(b)&&Date.parse(a[b])>l),q={...Object.fromEntries(o.map(a=>[a,null])),...k?{[j]:null}:{}};return b&&a[m]!==e[m]||(q[m]=null),0===p.length&&Object.assign(q,{testStatus:"active",lastError:null,errorCode:null,providerErrorCode:null,..."kiro"===g?{failureClass:null,upstreamRequestId:null,failureResetAt:null,authLifecycle:null}:{},modelLockReason:null,lastErrorAt:null,backoffLevel:0,consecutiveAuthFailures:0}),q};if("kiro"===g){await (0,d.Op)(a,a=>p(a,!0)),n&&k.debug("AUTH",`Kiro success did not clear newer failure state for ${a.slice(0,8)}`);return}if("codebuddy"===g||"codebuddy-cn"===g){let b=(0,i.kt)(e);await (0,d.Iu)(a,a=>{if(a.quarantinedAt||(0,i.uF)(a))return null;let c=(0,i.kt)(a);if(c&&c!==b)return null;let d=p(a)||{};return(b&&(0,i.kt)(a)===b&&(d.providerSpecificData=(0,i.US)(a.providerSpecificData),d[(0,f.UM)(null,g)]=null,o=!0),0===Object.keys(d).length)?null:{connection:d,...o?{quotaUsage:null}:{}}});return}let q=p(e);q&&await (0,d.updateProviderConnection)(a,q)}function F(a){let b=a.headers.get("Authorization");if(b?.startsWith("Bearer "))return b.slice(7);let c=a.headers.get("x-api-key");return c||null}async function G(a){return!!a&&await (0,d.ek)(a)}},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()}}},93930:(a,b,c)=>{c.d(b,{Z:()=>e});let d=Object.freeze([["unsupported_model",(a,b)=>Array.isArray(a.supportedModels)&&a.supportedModels.length>0&&!a.supportedModels.includes(b.model)],["unsupported_operation",(a,b)=>Array.isArray(a.supportedOperations)&&a.supportedOperations.length>0&&!a.supportedOperations.includes(b.operation)],["unsupported_capability",(a,b)=>{let c=new Set(a.capabilities||[]);return c.size>0&&(b.requiredCapabilities||[]).some(a=>!c.has(a))}],["api_key_model_restricted",(a,b)=>Array.isArray(b.allowedModels)&&b.allowedModels.length>0&&!b.allowedModels.includes(b.model)],["api_key_provider_restricted",(a,b)=>Array.isArray(b.allowedProviders)&&b.allowedProviders.length>0&&!b.allowedProviders.includes(a.provider)],["connection_restricted",(a,b)=>Array.isArray(b.allowedConnectionIds)&&b.allowedConnectionIds.length>0&&!b.allowedConnectionIds.includes(a.id)],["explicit_pin_mismatch",(a,b)=>!!b.pinnedConnectionId&&b.pinnedConnectionId!==a.id],["inactive",a=>!0!==a.isActive],["quarantined",a=>!!a.quarantinedAt],["reauth_required",a=>!0===a.reauthRequired],["model_locked",a=>!0===a.modelLocked],["quota_exhausted",(a,b)=>{let c=a.quota;return!!c&&!0===c.exhausted&&("last_successful"!==c.provenance||!(Number(c.remaining)>0&&Number(c.validUntilMs)>Number(b.nowMs||Date.now())))}],["circuit_open",a=>Object.values(a.circuits||{}).some(a=>a?.state==="open"||a?.state==="half_open"&&a?.probeAcquired!==!0)],["missing_transport",a=>!1===a.transportAvailable],["outbound_rejected",a=>!1===a.outboundAllowed]]);function e(a={},b={}){let c=d.filter(([,c])=>c(a,b)).map(([a])=>a);return Object.freeze({eligible:0===c.length,reasons:Object.freeze(c)})}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports.id=6352,exports.ids=[1998,2409,4790,6352,9718],exports.modules={13808:(a,b,c)=>{"use strict";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()}}},13868:(a,b,c)=>{"use strict";c.d(b,{Q6:()=>R,cO:()=>L,go:()=>O,hn:()=>E,KY:()=>S,kF:()=>s,$w:()=>C});var d=c(55511),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(49120),j=c(71998),k=c(20116),l=c(90715),m=c(62409),n=c(82506);let o=new Set(["success","failed","failed_invalid_credentials","failed_exchange","failed_timeout","failed_restricted","failed_browser_blocked","cancelled"]),p=h().join(i.DATA_DIR,"kiro-bulk-import"),q=h().join(p,"meta.json"),r=new Set(["queued","running","needs_manual"]);function s(){return new Date().toISOString()}function t(a=p){f().mkdirSync(a,{recursive:!0})}function u(a,b=p){return t(b),h().join(b,`${a}.json`)}function v(a){try{if(!f().existsSync(a))return null;return JSON.parse(f().readFileSync(a,"utf8"))}catch{return null}}function w(a,b){t(h().dirname(a));let c=`${a}.${process.pid}.tmp`;f().writeFileSync(c,JSON.stringify(b,null,2),"utf8"),f().renameSync(c,a)}function x(a,b=p){return t(b),h().join(b,`${a}.resume.enc`)}function y(){return(0,d.createHash)("sha256").update(String(function(){if(process.env.BULK_IMPORT_RESUME_SECRET)return process.env.BULK_IMPORT_RESUME_SECRET;let a=h().join(i.DATA_DIR,"bulk-import-resume-key");try{return f().readFileSync(a,"utf8").trim()}catch{}try{t(i.DATA_DIR);let b=(0,d.randomBytes)(32).toString("hex");return f().writeFileSync(a,b,{mode:384}),b}catch{return(0,d.randomBytes)(32).toString("hex")}}())).digest()}function z(a){try{f().existsSync(a)&&f().rmSync(a)}catch{}}function A(a=q){return v(a)?.latestJobId||null}function B(a){if((0,k.uT)(a))return Math.min(8,Math.max(1,(0,k.q)()));let b=Number.parseInt(a,10);return Number.isFinite(b)?Math.min(8,Math.max(1,b)):4}function C(a=[]){let b=Array.isArray(a)?a:[],c=[],d=[];return b.forEach((a,b)=>{let e=String(a||"").trim();if(!e||e.startsWith("#"))return;let f="",g="";if(e.includes("|")){let[a="",...b]=e.split("|");f=a.trim(),g=b.join("|").trim()}else if(e.includes(" ")){let a=e.indexOf(" ");f=e.substring(0,a).trim(),g=e.substring(a+1).trim()}else if(e.includes(":")){let a=e.indexOf(":"),b=e.substring(0,a).trim();b.includes("@")&&(f=b,g=e.substring(a+1).trim())}f&&g?c.push({line:b+1,email:f,password:g}):d.push(b+1)}),{parsed:c,invalidLines:d}}function D(a){return{total:a.length,queued:a.filter(a=>"queued"===a.status).length,running:a.filter(a=>"running"===a.status).length,success:a.filter(a=>"success"===a.status).length,failed:a.filter(a=>"failed"===a.status||"failed_invalid_credentials"===a.status||"failed_exchange"===a.status||"failed_timeout"===a.status||"failed_restricted"===a.status||"failed_browser_blocked"===a.status).length,needs_manual:a.filter(a=>"needs_manual"===a.status).length}}function E(a,b,c="info"){return{id:(0,d.randomUUID)(),at:s(),step:a,message:b,level:c}}function F(a,b,c,d="info"){let e=E(b,c,d);return a.currentStep=b,a.updatedAt=e.at,a.logs=a.logs||[],a.logs.push(e),a.logs.length>40&&a.logs.splice(0,a.logs.length-40),e}function G(a){return a.flatMap(a=>(a.logs||[]).map(b=>({...b,message:(0,l.yr)(b.message),email:a.email,line:a.line,workerId:a.workerId||null,status:a.status}))).sort((a,b)=>String(a.at).localeCompare(String(b.at))).slice(-80)}function H(a){if(!a)return null;try{return new URL(a),(0,l.Eq)(a)}catch{return a.length>20?`${a.slice(0,10)}***${a.slice(-10)}`:a}}function I(a){return{email:a.email,status:a.status,error:(0,l.yr)(a.error)||null,connectionId:a.connectionId||null,workerId:a.workerId||null,line:a.line,proxyUrl:H(a.proxyUrl)||null,currentStep:a.currentStep||null,updatedAt:a.updatedAt||null,logs:(a.logs||[]).slice(-20).map(a=>({...a,message:(0,l.yr)(a.message)})),manualSessionAvailable:!!a.manualSession?.page&&"needs_manual"===a.status,manualSessionOpened:!!a.manualSession?.opened}}function J(a,b={}){return{jobId:a.jobId,status:a.status,summary:D(a.accounts),concurrency:a.concurrency,createdAt:a.createdAt,startedAt:a.startedAt,finishedAt:a.finishedAt,accounts:a.accounts.map(I),activity:G(a.accounts),error:(0,l.yr)(a.error)||null,preview:b.preview||null}}function K(a){if(!a||r.has(a.status))return!1;let b=a.finishedAt?Date.parse(a.finishedAt):0/0;return!!Number.isFinite(b)&&Date.now()-b<=18e5}function L(a,b={}){return a?{found:!0,stale:!1,recoverable:r.has(a.status)||K(a),job:a}:{found:!1,stale:!!b.stale,recoverable:!1,job:null}}async function M(a){let{launchBulkImportBrowser:b}=await Promise.all([c.e(7774),c.e(5949)]).then(c.bind(c,75949)),d=process.env.ZEVAI_KIRO_HEADLESS;return b({engine:a?.engine||"cloakbrowser",headless:"1"===d||"true"===d,windowSize:{width:1280,height:900}})}async function N(a){let{exchangeAndSaveKiroSocialConnection:b}=await c.e(4136).then(c.bind(c,34136));return b(a)}async function O(a,b,e={}){let f,g,h=b,i=null,{DEFAULT_CONTEXT_CLOSE_TIMEOUT_MS:j,DEFAULT_CONTEXT_CREATE_TIMEOUT_MS:k,newStealthContext:l,withAutomationTimeout:m}=await Promise.all([c.e(7774),c.e(5949)]).then(c.bind(c,75949)),n=Number.isFinite(e.timeoutMs)&&e.timeoutMs>0?e.timeoutMs:k,o=Number.isFinite(e.closeTimeoutMs)&&e.closeTimeoutMs>0?e.closeTimeoutMs:j,p="codebuddy-cn"===e.profile&&!0===e.nativeCloakProfile;if(b){let{ensureSocksHttpBridge:a,isSocksProxyUrl:d}=await Promise.all([c.e(3092),c.e(6652)]).then(c.bind(c,76652));d(b)&&(i=await m(a(b),{timeoutMs:n,message:`SOCKS proxy bridge timed out after ${Math.round(n/1e3)}s`,code:"SOCKS_BRIDGE_TIMEOUT",onLateResolve:a=>a?.release?.()}),i?.httpProxyUrl&&(h=i.httpProxyUrl))}let q=function(a){if(!a)return null;let b=String(a).trim();if(!b)return null;try{let a=new URL(b),c=(a.protocol||"http:").replace(/:$/,"")||"http",d={server:`${c}://${a.hostname}${a.port?`:${a.port}`:""}`};return a.username&&(d.username=decodeURIComponent(a.username)),a.password&&(d.password=decodeURIComponent(a.password)),d}catch{return{server:b}}}(h),r=q?{proxy:q}:{},s=!p&&(!0===e.randomizeFingerprint||null!=e.fingerprintSeed),t=null;if(s)try{let{buildAccountFingerprint:a,compactAccountFingerprint:b}=await Promise.all([c.e(7774),c.e(5949)]).then(c.bind(c,75949));t=a(e.fingerprintSeed??(0,d.randomUUID)()),!0===e.lowMemory&&(t=b(t)),r.viewport={...t.viewport},r.deviceScaleFactor=t.deviceScaleFactor,r.fingerprint={hardwareConcurrency:t.hardwareConcurrency,deviceMemory:t.deviceMemory,maxTouchPoints:t.maxTouchPoints,screen:t.screen}}catch{t=null}if(r.viewport||p||(r.viewport={width:1280,height:900}),r.ignoreHTTPSErrors=!0,"codebuddy-cn"===e.profile&&!p){let a="china"===String(e.region||"").toLowerCase();r.locale="zh-CN",r.languages=["zh-CN","zh","en-US","en"],r.timezoneId=a?"Asia/Shanghai":"Asia/Hong_Kong",r.geolocation=a?{longitude:121.4737,latitude:31.2304}:{longitude:114.1694,latitude:22.3193},r.permissions=["geolocation"],r.extraHTTPHeaders={...r.extraHTTPHeaders||{},"Accept-Language":"zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"}}e.locale&&(r.locale=e.locale),e.timezoneId&&(r.timezoneId=e.timezoneId),e.geolocation&&(r.geolocation=e.geolocation),Array.isArray(e.languages)&&(r.languages=e.languages),e.viewport&&(r.viewport=e.viewport),"number"==typeof e.deviceScaleFactor&&(r.deviceScaleFactor=e.deviceScaleFactor),e.extraHTTPHeaders&&(r.extraHTTPHeaders={...r.extraHTTPHeaders||{},...e.extraHTTPHeaders});try{f=await m(l(a,r),{timeoutMs:n,message:`Browser context creation timed out after ${Math.round(n/1e3)}s`,code:"BROWSER_CONTEXT_TIMEOUT",onLateResolve:a=>m(a?.close?.(),{timeoutMs:o,message:`Late browser context close timed out after ${Math.round(o/1e3)}s`,code:"BROWSER_CONTEXT_CLOSE_TIMEOUT"}).catch(()=>null)})}catch(a){throw await i?.release().catch(()=>null),a}let u=f.close.bind(f),v=null;f.close=(...a)=>(v||(v=m(Promise.resolve().then(()=>u(...a)),{timeoutMs:o,message:`Browser context close timed out after ${Math.round(o/1e3)}s`,code:"BROWSER_CONTEXT_CLOSE_TIMEOUT"}).finally(()=>i?.release().catch(()=>null))),v);try{g=await m(f.newPage(),{timeoutMs:n,message:`Browser page creation timed out after ${Math.round(n/1e3)}s`,code:"BROWSER_PAGE_TIMEOUT"})}catch(a){throw await f.close().catch(()=>null),a}try{await g.route(/facebook\.net|hotjar|clarity\.ms|hm\.baidu|sentry\.io|browser\.sentry-cdn|doubleclick\.net/i,a=>a.abort())}catch{}return{context:f,page:g}}async function P(a){let b,d,e,f,g=a?.manualSession;if(!g?.context)return!1;let h=g.context,i=g.page;try{b=await Promise.all([c.e(7774),c.e(5949)]).then(c.bind(c,75949))}catch{return!1}let j=null,k="";try{j=await b.withAutomationTimeout(Promise.resolve().then(()=>h.storageState()),{timeoutMs:b.DEFAULT_CONTEXT_CLOSE_TIMEOUT_MS,message:"Browser storage-state capture timed out",code:"BROWSER_STORAGE_STATE_TIMEOUT"})}catch{j=null}try{k=i?.url?.()||""}catch{k=""}try{d=await b.launchBulkImportBrowser({headless:!1,windowSize:{width:1280,height:900}})}catch{return!1}try{e=await b.withAutomationTimeout(b.newStealthContext(d,{viewport:null,...j?{storageState:j}:{}}),{timeoutMs:b.DEFAULT_CONTEXT_CREATE_TIMEOUT_MS,message:"Headed browser context creation timed out",code:"BROWSER_CONTEXT_TIMEOUT",onLateResolve:a=>b.withAutomationTimeout(Promise.resolve().then(()=>a?.close?.()),{timeoutMs:b.DEFAULT_CONTEXT_CLOSE_TIMEOUT_MS,message:"Late headed browser context close timed out",code:"BROWSER_CONTEXT_CLOSE_TIMEOUT"}).catch(()=>null)})}catch{return await b.forceCloseBrowser(d).catch(()=>null),!1}let l=e.close.bind(e),m=null;e.close=(...a)=>(m||(m=b.withAutomationTimeout(Promise.resolve().then(()=>l(...a)),{timeoutMs:b.DEFAULT_CONTEXT_CLOSE_TIMEOUT_MS,message:"Headed browser context close timed out",code:"BROWSER_CONTEXT_CLOSE_TIMEOUT"})),m);try{f=await b.withAutomationTimeout(e.newPage(),{timeoutMs:b.DEFAULT_CONTEXT_CREATE_TIMEOUT_MS,message:"Headed browser page creation timed out",code:"BROWSER_PAGE_TIMEOUT"})}catch{return await e.close().catch(()=>null),await b.forceCloseBrowser(d).catch(()=>null),!1}if(k)try{await f.goto(k,{waitUntil:"domcontentloaded",timeout:2e4})}catch{}if(a.manualSession!==g)return await e.close().catch(()=>null),await b.forceCloseBrowser(d).catch(()=>null),!1;let n=g.rebind;if(g.context=e,g.page=f,g.headedBrowser={close:()=>b.forceCloseBrowser(d)},"function"==typeof n)try{await n({context:e,page:f})}catch{}return Promise.resolve().then(()=>h.close()).catch(()=>null),!0}async function Q(a,{account:b}={}){if(!a)return!1;try{let d=a.context?.(),e=d?.browser?.(),f=function(a){if(!a)return!1;let b=a._options||a._initializer||{};return"boolean"!=typeof b.headless||b.headless}(e);if(e)try{let{getBulkImportBrowserHeadless:a}=await Promise.all([c.e(7774),c.e(5949)]).then(c.bind(c,75949)),b=a(e);"boolean"==typeof b&&(f=b)}catch{}if(b&&f&&await P(b))return await b.manualSession.page.bringToFront?.().catch(()=>null),!0;if(!d?.newCDPSession)return await a.bringToFront?.().catch(()=>null),!0;let g=await d.newCDPSession(a),h=null;try{let a=await g.send("Target.getTargetInfo"),b=a?.targetInfo?.targetId,c=await g.send("Browser.getWindowForTarget",b?{targetId:b}:{});h=c?.windowId??null}catch{h=null}return null!=h&&await g.send("Browser.setWindowBounds",{windowId:h,bounds:{windowState:"normal",left:80,top:80,width:1280,height:960}}).catch(()=>null),await a.bringToFront?.().catch(()=>null),await g.detach?.().catch(()=>null),!0}catch{return await a.bringToFront?.().catch(()=>null),!0}}class R{constructor({browserLauncher:a=M,googleAutomation:b=n.Th,socialExchange:c=N,kiroServiceFactory:d=()=>new m.KiroService,storageName:e="kiro-bulk-import"}={}){this.browserLauncher=a,this.googleAutomation=b,this.socialExchange=c,this.kiroServiceFactory=d,this.storageDir=h().join(i.DATA_DIR,e),this.metaFile=h().join(this.storageDir,"meta.json"),this.jobs=new Map,this.latestJobId=A(this.metaFile)}buildPersistedSnapshot(a){return J(a,{preview:a.lastPreview||null})}readPersistedJob(a){return a?v(u(a,this.storageDir)):null}writePersistedJob(a,b){a&&b&&w(u(a,this.storageDir),b)}persistLatestJobId(a){!function(a,b=q){w(b,{latestJobId:a||null,updatedAt:s()})}(a,this.metaFile)}persistResumeBlob(a){try{!function(a,b){try{let c,e,g,i,j;t(h().dirname(a));let k=`${a}.${process.pid}.tmp`;f().writeFileSync(k,JSON.stringify((c=(0,d.randomBytes)(12),e=(0,d.createCipheriv)("aes-256-gcm",y(),c),g=Buffer.from(JSON.stringify(b),"utf8"),i=Buffer.concat([e.update(g),e.final()]),j=e.getAuthTag(),{v:1,alg:"aes-256-gcm",iv:c.toString("base64"),tag:j.toString("base64"),data:i.toString("base64")})),{mode:384}),f().renameSync(k,a)}catch{}}(x(a.jobId,this.storageDir),{jobId:a.jobId,concurrency:a.concurrency,proxyPoolMode:a.proxyPoolMode,proxyUrls:a.proxyUrls||[],createdAt:a.createdAt,accounts:a.accounts.map(a=>({line:a.line,email:a.email,password:a.password}))})}catch{}}hydrateInterruptedJob(a){if(!a||this.jobs.has(a))return!1;let b=v(u(a,this.storageDir));if(!b||!r.has(b.status))return!1;let c=function(a){let b=v(a);if(!b)return null;if(!b||"aes-256-gcm"!==b.alg||!b.iv||!b.tag||!b.data)return null;try{let a=(0,d.createDecipheriv)("aes-256-gcm",y(),Buffer.from(b.iv,"base64"));a.setAuthTag(Buffer.from(b.tag,"base64"));let c=Buffer.concat([a.update(Buffer.from(b.data,"base64")),a.final()]);return JSON.parse(c.toString("utf8"))}catch{return null}}(x(a,this.storageDir));if(!c||!Array.isArray(c.accounts)||0===c.accounts.length)return this.markJobInterrupted(a,b),!1;let e=new Map(c.accounts.map(a=>[a.line,a.password])),f=new Map(c.accounts.map(a=>[a.line,a.email])),g=b.createdAt||c.createdAt||s(),h=(b.accounts||[]).map(a=>{let b=o.has(a.status),c=Array.isArray(a.logs)?[...a.logs]:[],d={line:a.line,email:a.email||f.get(a.line)||"",password:b?void 0:e.get(a.line)??null,proxyUrl:null,status:a.status,error:a.error||null,connectionId:a.connectionId||null,workerId:b&&a.workerId||null,manualSession:null,runtimeSession:null,currentStep:a.currentStep||null,updatedAt:a.updatedAt||g,logs:c};return b||(d.status="queued",d.currentStep="queued",d.error=null,d.logs.push(E("resumed","Re-queued after a server restart to continue automatically"))),d}),i={jobId:a,status:"running",concurrency:B(c.concurrency),proxyPoolMode:c.proxyPoolMode||"none",proxyUrls:Array.isArray(c.proxyUrls)?c.proxyUrls:[],createdAt:g,startedAt:b.startedAt||g,finishedAt:null,error:null,cancelRequested:!1,browser:null,nextIndex:0,manualFollowups:new Set,persistPromise:Promise.resolve(),lastPreview:b.preview||null,lastPreviewCapturedAt:0,accounts:h};return(this.jobs.set(a,i),this.latestJobId||(this.latestJobId=a),h.some(a=>"queued"===a.status))?this.runJob(a):(i.status="completed",i.finishedAt=s(),this.persistJobSnapshot(i,{forcePreview:!1}),z(x(a,this.storageDir))),!0}markJobInterrupted(a,b){let c="Job was interrupted by a server restart and could not be auto-resumed (saved credentials were unavailable). Please start a new bulk login.",d=(b.accounts||[]).map(a=>{if(o.has(a.status))return a;let b=Array.isArray(a.logs)?[...a.logs]:[];return b.push(E("failed",c,"error")),{...a,status:"failed",error:c,currentStep:"failed",updatedAt:s(),manualSessionAvailable:!1,logs:b}}),e={...b,status:"failed",error:b.error||c,finishedAt:b.finishedAt||s(),accounts:d,summary:D(d),activity:G(d)};try{w(u(a,this.storageDir),e)}catch{}z(x(a,this.storageDir))}async startJob({accounts:a,concurrency:b,proxyPoolMode:e,proxyPoolId:f,engine:g}={}){let{parsed:h,invalidLines:i}=C(a);if(!h.length){let a=i.length>0?"Invalid account format. Use one account per line: gmail@example.com|password":"At least one account entry is required",b={error:a};throw i.length>0&&(b.invalidLines=i),Object.assign(Error(a),b)}if(i.length>0){let a="Invalid account format. Use one account per line: gmail@example.com|password";throw Object.assign(Error(a),{error:a,invalidLines:i})}let k=[];if("all"===e)k=(await (0,j.ui)({isActive:!0})).map(a=>a.proxyUrl).filter(Boolean);else if("single"===e&&f){let a=await (0,j.hr)(f);a?.isActive&&a?.proxyUrl&&(k=[a.proxyUrl])}let l=(0,d.randomUUID)(),m=s();this.hydrateInterruptedJob(this.latestJobId);let n=[...this.jobs.values()].find(a=>r.has(a.status));if(n)throw Object.assign(Error("A bulk import job is already active"),{error:"A bulk import job is already active",code:"BULK_IMPORT_ACTIVE",jobId:n.jobId});let o=g;try{let{normalizeBulkImportEngine:a}=await Promise.all([c.e(7774),c.e(5949)]).then(c.bind(c,75949));o=a(g)}catch{o=g||"cloakbrowser"}let p={jobId:l,status:"running",concurrency:B(b),engine:o,proxyPoolMode:e||"none",proxyUrls:k,createdAt:m,startedAt:m,finishedAt:null,error:null,cancelRequested:!1,browser:null,nextIndex:0,manualFollowups:new Set,persistPromise:Promise.resolve(),lastPreview:null,lastPreviewCapturedAt:0,accounts:h.map(a=>({line:a.line,email:a.email,password:a.password,proxyUrl:null,status:"queued",error:null,connectionId:null,workerId:null,manualSession:null,runtimeSession:null,currentStep:"queued",updatedAt:m,logs:[E("queued","Queued and waiting for an available worker")]}))};return this.jobs.set(l,p),this.latestJobId=l,this.persistLatestJobId(l),await this.persistJobSnapshot(p,{forcePreview:!1}),this.persistResumeBlob(p),this.runJob(l),J(p)}getJob(a){this.hydrateInterruptedJob(a);let b=this.jobs.get(a);return b?J(b,{preview:b.lastPreview||null}):v(u(a,this.storageDir))}async getJobWithPreview(a){this.hydrateInterruptedJob(a);let b=this.jobs.get(a);if(!b)return v(u(a,this.storageDir));let c=await this.capturePreview(b);return b.lastPreview=c||b.lastPreview||null,await this.persistJobSnapshot(b,{forcePreview:!1}),J(b,{preview:b.lastPreview||null})}async getLatestJobWithPreview({includeRecentTerminal:a=!1}={}){let b=this.latestJobId||A(this.metaFile);if(!b)return null;let c=await this.getJobWithPreview(b);return c&&(r.has(c.status)||a&&K(c))?c:null}cancelJob(a){let b=this.jobs.get(a);if(!b)return v(u(a,this.storageDir));for(let a of(b.cancelRequested=!0,b.accounts||[]))if("queued"===a.status||"running"===a.status||"needs_manual"===a.status){let b=a.manualSession,d=a.runtimeSession,e=b?.context||d?.context||null,f=b?.headedBrowser||null,g=b?.ownedBrowser||null;e&&e.close().catch(()=>null),f&&f.close().catch(()=>null),g&&Promise.all([c.e(7774),c.e(5949)]).then(c.bind(c,75949)).then(({forceCloseBrowser:a})=>a(g)).catch(()=>g.close().catch(()=>null)),a.manualSession=null,a.runtimeSession=null,this.finalizeAccount(a,"cancelled",{error:"Job cancelled",step:"cancelled",message:"Job cancelled by user"})}if(b.browser){let a=b.browser;b.browser=null,Promise.all([c.e(7774),c.e(5949)]).then(c.bind(c,75949)).then(({forceCloseBrowser:b})=>b(a)).catch(()=>a.close().catch(()=>null))}return("queued"===b.status||"running"===b.status)&&(b.status="cancelled",b.finishedAt=b.finishedAt||s()),this.persistJobSnapshot(b,{forcePreview:!0}),J(b)}async openManualSession(a,b){let c=this.jobs.get(a);if(!c)return null;let d=Number.parseInt(b,10),e=c.accounts.find(a=>a.workerId===d&&"needs_manual"===a.status&&a.manualSession?.page);if(!e)return{ok:!1,error:"Manual session not found for this worker",job:J(c)};let f=e.manualSession,g=await Q(f.page,{account:e});return e.manualSession!==f?(f.headedBrowser&&(await Promise.resolve(f.context?.close?.()).catch(()=>null),await Promise.resolve(f.headedBrowser.close?.()).catch(()=>null)),{ok:!1,error:"Manual session ended while the browser window was opening",job:J(c)}):(f.opened=g,f.openedAt=g?f.openedAt||s():f.openedAt||null,await this.persistJobSnapshot(c,{forcePreview:!0}),{ok:!0,job:J(c),account:I(e)})}dequeueAccount(a,b){for(;a.nextIndex<a.accounts.length;){let c=a.accounts[a.nextIndex];if(a.nextIndex+=1,"queued"===c.status)return c.status="running",c.workerId=b,c.error=null,a.proxyUrls?.length&&(c.proxyUrl=a.proxyUrls[(a.nextIndex-1)%a.proxyUrls.length]),F(c,"worker_assigned",`Worker ${b} picked up this account${c.proxyUrl?` (proxy: ${H(c.proxyUrl)})`:""}`),this.persistJobSnapshot(a,{forcePreview:!1}),c}return null}finalizeAccount(a,b,c={}){return a.status=b,a.error=c.error||null,a.connectionId=c.connectionId||null,(c.step||c.message)&&F(a,c.step||b,c.message||c.error||b.replaceAll("_"," ")),a}setAccountStep(a,b,c,d="info"){F(a,b,c,d)}async persistJobSnapshot(a,{forcePreview:b=!1}={}){if(!a)return;let c=async()=>{if(b||Date.now()-(a.lastPreviewCapturedAt||0)>=1500){let b=await this.capturePreview(a);b&&(a.lastPreview=b),a.lastPreviewCapturedAt=Date.now()}this.writePersistedJob(a.jobId,this.buildPersistedSnapshot(a))};a.persistPromise=Promise.resolve(a.persistPromise).catch(()=>null).then(c).catch(b=>{a.lastPersistError=b?.message||String(b)}),await a.persistPromise}async capturePreview(a){let b=a.accounts.find(a=>"running"===a.status&&a.runtimeSession?.page)||a.accounts.find(a=>"needs_manual"===a.status&&a.manualSession?.page);if(!b)return null;let c=b.runtimeSession?.page||b.manualSession?.page;if(!c)return null;try{let a=await c.screenshot({type:"jpeg",quality:55,fullPage:!1,animations:"disabled",caret:"hide"});return{email:b.email||null,phone:b.phone||null,workerId:b.workerId||null,status:b.status,step:b.currentStep||null,updatedAt:b.updatedAt||s(),imageData:`data:image/jpeg;base64,${a.toString("base64")}`}}catch{return{email:b.email||null,phone:b.phone||null,workerId:b.workerId||null,status:b.status,step:b.currentStep||null,updatedAt:b.updatedAt||s(),imageData:null}}}async runManualFollowup(a,b,c,d,e,f){let g=(async()=>{let c=async()=>{let a=b.manualSession,c=a?.context||d,e=a?.headedBrowser||null;c&&await c.close().catch(()=>null),e&&await e.close().catch(()=>null)};try{let c=await e;if(a.cancelRequested){this.finalizeAccount(b,"cancelled",{error:"Job cancelled",step:"cancelled",message:"Job cancelled while waiting for manual completion"}),await this.persistJobSnapshot(a,{forcePreview:!0});return}this.setAccountStep(b,"exchanging_tokens","Exchanging Kiro callback for OAuth tokens"),await this.persistJobSnapshot(a,{forcePreview:!0});let{connection:d}=await this.socialExchange({code:c.code,codeVerifier:f,provider:"google"});this.finalizeAccount(b,"success",{connectionId:d.id,step:"connection_saved",message:"Kiro connection saved successfully"}),await this.persistJobSnapshot(a,{forcePreview:!0})}catch(c){a.cancelRequested?this.finalizeAccount(b,"cancelled",{error:"Job cancelled",step:"cancelled",message:"Job cancelled while waiting for manual completion"}):this.finalizeAccount(b,"failed_exchange",{error:c.message||"Manual assist flow failed during token exchange.",step:"exchange_failed",message:c.message||"Manual assist flow failed during token exchange."}),await this.persistJobSnapshot(a,{forcePreview:!0})}finally{await c(),b.manualSession=null,b.runtimeSession=null,a.manualFollowups.delete(g),await this.persistJobSnapshot(a,{forcePreview:!0})}})();a.manualFollowups.add(g)}async processAccount(a,b,c){if(a.cancelRequested||!a.browser)return void this.finalizeAccount(b,"cancelled",{error:"Job cancelled"});let d=this.kiroServiceFactory().createSocialAuthorization("google"),e=null;try{let f=await O(a.browser,b.proxyUrl);e=f.context;let{page:g}=f,h=(0,n.zZ)(e,g);b.runtimeSession={context:e,page:g},this.setAccountStep(b,"preparing_worker",`Worker ${c} is preparing a browser context`),await this.persistJobSnapshot(a,{forcePreview:!0});let i=await this.googleAutomation({page:g,authUrl:d.authUrl,email:b.email,password:b.password,callbackPromise:h,onStep:(c,d)=>{this.setAccountStep(b,c,d),this.persistJobSnapshot(a,{forcePreview:!1})}});if("success"===i.status){this.setAccountStep(b,"exchanging_tokens","Exchanging Kiro callback for OAuth tokens"),await this.persistJobSnapshot(a,{forcePreview:!0});let{connection:c}=await this.socialExchange({code:i.code,codeVerifier:d.codeVerifier,provider:"google"});this.finalizeAccount(b,"success",{connectionId:c.id,step:"connection_saved",message:"Kiro connection saved successfully"}),b.runtimeSession=null,await e?.close().catch(()=>null),await this.persistJobSnapshot(a,{forcePreview:!0});return}if("needs_manual"===i.status){b.manualSession={context:e,page:g,opened:!1,openedAt:null,rebind:"function"==typeof h?.rebind?h.rebind:null},this.setAccountStep(b,"awaiting_manual","Waiting for manual completion in the browser session"),this.finalizeAccount(b,"needs_manual",{error:i.error,step:"awaiting_manual",message:i.error}),await this.persistJobSnapshot(a,{forcePreview:!0}),await this.runManualFollowup(a,b,c,e,h,d.codeVerifier);return}let j=o.has(i.status)?i.status:"failed";this.finalizeAccount(b,j,{error:i.error||"Kiro Google automation failed.",step:j,message:i.error||"Kiro Google automation failed."}),b.runtimeSession=null,await e?.close().catch(()=>null),await this.persistJobSnapshot(a,{forcePreview:!0})}catch(c){this.finalizeAccount(b,"failed",{error:c.message||"Unexpected Kiro bulk import failure.",step:"failed",message:c.message||"Unexpected Kiro bulk import failure."}),b.runtimeSession=null,await e?.close().catch(()=>null),await this.persistJobSnapshot(a,{forcePreview:!0})}finally{b.password=void 0}}async runWorker(a,b){for(;!a.cancelRequested;){let c=this.dequeueAccount(a,b);if(!c)return;await this.processAccount(a,c,b)}}shouldPrelaunchBrowser(a){return!0}async runJob(a){let b=this.jobs.get(a);if(b)try{let{DEFAULT_BROWSER_LAUNCH_TIMEOUT_MS:a,forceCloseBrowser:d,withAutomationTimeout:e}=await Promise.all([c.e(7774),c.e(5949)]).then(c.bind(c,75949));if(this.shouldPrelaunchBrowser(b)){let c=Promise.resolve().then(()=>this.browserLauncher(b));b.browser=await e(c,{timeoutMs:a,message:`Automation browser launch timed out after ${Math.round(a/1e3)}s`,code:"BROWSER_LAUNCH_TIMEOUT",onLateResolve:a=>d(a)})}b.accounts.forEach(a=>{"queued"===a.status&&1===(a.logs||[]).length&&this.setAccountStep(a,"waiting_for_worker","Waiting for a free worker")}),await this.persistJobSnapshot(b,{forcePreview:!1});let f=Math.min(b.concurrency,Math.max(b.accounts.length,1)),g=Array.from({length:f},(a,c)=>this.runWorker(b,c+1));await Promise.allSettled(g),b.manualFollowups.size>0&&await Promise.allSettled([...b.manualFollowups]),b.cancelRequested?(b.status="cancelled",b.accounts.forEach(a=>{("queued"===a.status||"running"===a.status||"needs_manual"===a.status)&&this.finalizeAccount(a,"cancelled",{error:"Job cancelled",step:"cancelled",message:"Job cancelled before completion"})})):b.status="completed",await this.persistJobSnapshot(b,{forcePreview:!0})}catch(a){b.status="failed",b.error=a.message||"Failed to start Kiro bulk import job.",b.accounts.forEach(a=>{("queued"===a.status||"running"===a.status)&&(this.finalizeAccount(a,"failed",{error:b.error,step:"failed",message:b.error}),a.password=void 0)}),await this.persistJobSnapshot(b,{forcePreview:!0})}finally{if(b.browser){let a=b.browser;b.browser=null;try{let{forceCloseBrowser:b}=await Promise.all([c.e(7774),c.e(5949)]).then(c.bind(c,75949));await b(a)}catch{await a.close().catch(()=>null)}}b.finishedAt=s(),await this.persistJobSnapshot(b,{forcePreview:!0}),z(x(b.jobId,this.storageDir))}}}function S(){return(!globalThis.__kiroBulkImportSingleton&&(globalThis.__kiroBulkImportSingleton={manager:new R}),globalThis.__kiroBulkImportSingleton).manager}},20116:(a,b,c)=>{"use strict";c.d(b,{q:()=>h,si:()=>g,uT:()=>i});var d=c(21820),e=c.n(d);function f(a){return Number.isFinite(a)?Math.max(0,Math.floor(a)):0}function g(){let a=[];try{a=e().cpus()||[]}catch{a=[]}let b=0,c=0;try{b=e().totalmem()}catch{b=0}try{c=e().freemem()}catch{c=0}let d=Array.isArray(a)?a.length:0,f=a[0]?.model?String(a[0].model).trim():null,g=b/0x40000000,h=c/0x40000000,i="unknown",j="unknown";try{i=e().platform()}catch{}try{j=e().arch()}catch{}return{cpuCount:d,cpuModel:f,totalMemBytes:b,totalMemGb:g,freeMemBytes:c,freeMemGb:h,platform:i,arch:j}}function h(){return function(a=null){let b=a||g(),{cpuCount:c,totalMemGb:d}=b,e=f(d/4),h=f(c/2),i="fallback",j=0;return e>0&&h>0?(j=Math.min(e,h),i=e<=h?"ram":"cpu"):e>0?(j=e,i="ram"):h>0?(j=h,i="cpu"):(j=4,i="fallback"),{recommended:Math.min(8,Math.max(1,j||4)),limitedBy:i,ramBudget:e,cpuBudget:h,minWorkers:1,maxWorkers:8,ramGbPerWorker:4,cpuDivisor:2,specs:b}}().recommended}function i(a){return!0===a||"string"==typeof a&&"auto"===a.trim().toLowerCase()}Object.freeze({RAM_GB_PER_WORKER:4,CPU_DIVISOR:2,SAFE_MIN_WORKERS:1,SAFE_MAX_WORKERS:8,FALLBACK_WORKERS:4})},47293:(a,b,c)=>{"use strict";c.d(b,{A:()=>f});let d=new Uint8Array(16);var e=c(50122);let f=function(a,b,c){return b||a||!crypto.randomUUID?function(a,b,c){let f=(a=a||{}).random??a.rng?.()??crypto.getRandomValues(d);if(f.length<16)throw Error("Random bytes length must be >= 16");if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,b){if((c=c||0)<0||c+16>b.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[c+a]=f[a];return b}return(0,e.k)(f)}(a,b,c):crypto.randomUUID()}},50122:(a,b,c)=>{"use strict";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()}},52060:(a,b,c)=>{"use strict";c.d(b,{A:()=>d,C:()=>e});let d="2.178.1",e=`CLI/${d} CodeBuddy/${d}`},59304:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d={id:"muse",alias:"muse",aliases:["muse-ai","meta-model-api","muse-code","muse-subscription"],category:"oauth",authModes:["oauth","apikey"],hasOAuth:!0,priority:120,passthroughModels:!0,display:{name:"Muse (Meta Model API)",icon:"auto_awesome",color:"#0866FF",textIcon:"MU",website:"https://muse.ai",notice:{text:"Sign in with your Meta account (Muse Code subscription) or paste a Model API key from dev.meta.ai. Subscription keys are minted per account; Meta may train on contributor-tier data.",apiKeyUrl:"https://dev.meta.ai",signupUrl:"https://muse.ai"}},transport:{baseUrl:"https://api.meta.ai/v1/chat/completions",validateUrl:"https://api.meta.ai/v1/models",modelsUrl:"https://api.meta.ai/v1/models",format:"openai",auth:{combined:!0,header:"Authorization",scheme:"bearer",hooks:["museHeaders"]},transports:[{format:"openai",baseUrl:"https://api.meta.ai/v1/chat/completions",auth:{combined:!0,header:"Authorization",scheme:"bearer",hooks:["museHeaders"]}},{format:"openai-responses",baseUrl:"https://api.meta.ai/v1/responses",auth:{combined:!0,header:"Authorization",scheme:"bearer",hooks:["museHeaders"]},thinkingFormat:"openai-responses"}]},oauth:{clientId:"1031625952748946",deviceCodeUrl:"https://auth.meta.com/oidc/device/authorization/",tokenUrl:"https://auth.meta.com/oidc/device/token/"},models:[{id:"muse-spark-1.3",name:"Muse Spark 1.3",targetFormat:"openai-responses",supportedFormats:["openai-responses"]},{id:"muse-spark-1.2",name:"Muse Spark 1.2",targetFormat:"openai-responses",supportedFormats:["openai-responses"]},{id:"muse-spark-1.1",name:"Muse Spark 1.1",targetFormat:"openai-responses",supportedFormats:["openai-responses"]},{id:"muse-spark-1.3-contributor",name:"Muse Spark 1.3 Contributor",targetFormat:"openai-responses",supportedFormats:["openai-responses"]},{id:"muse-spark-1.2-contributor",name:"Muse Spark 1.2 Contributor",targetFormat:"openai-responses",supportedFormats:["openai-responses"]}],serviceKinds:["llm"]}},62409:(a,b,c)=>{"use strict";c.d(b,{KiroService:()=>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"){(0,d.S6)(a);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,e="us-east-1"){(0,d.S6)(e);let f=`https://oidc.${e}.amazonaws.com/device_authorization`,g=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:a,clientSecret:b,startUrl:c})});if(!g.ok){let a=await g.text();throw Error(`Failed to start device authorization: ${a}`)}let h=await g.json();return{deviceCode:h.deviceCode,userCode:h.userCode,verificationUri:h.verificationUri,verificationUriComplete:h.verificationUriComplete,expiresIn:h.expiresIn,interval:h.interval||5}}async pollDeviceToken(a,b,c,e="us-east-1"){(0,d.S6)(e);let f=`https://oidc.${e}.amazonaws.com/token`,g=await fetch(f,{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"})}),h=await g.json();return!g.ok||h.error?{success:!1,error:h.error,errorDescription:h.error_description,pending:"authorization_pending"===h.error||"slow_down"===h.error}:{success:!0,tokens:{accessToken:h.accessToken,refreshToken:h.refreshToken,expiresIn:h.expiresIn,tokenType:h.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:e,clientSecret:g,region:h}=b;if(e&&g){let b=h||"us-east-1";(0,d.S6)(b);let c=`https://oidc.${b}.amazonaws.com/token`,f=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:e,clientSecret:g,refreshToken:a,grantType:"refresh_token"})});if(!f.ok){let a=await f.text();throw Error(`Token refresh failed: ${a}`)}let i=await f.json();return{accessToken:i.accessToken,refreshToken:i.refreshToken||a,expiresIn:i.expiresIn}}let i=await fetch(`${f}/refreshToken`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:a})});if(!i.ok){let a=await i.text();throw Error(`Token refresh failed: ${a}`)}let j=await i.json();return{accessToken:j.accessToken,refreshToken:j.refreshToken||a,profileArn:j.profileArn,expiresIn:j.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 listAvailableProfiles(a,b="us-east-1"){(0,d.S6)(b);let c=`https://codewhisperer.${b}.amazonaws.com`,e=await fetch(c,{method:"POST",headers:{"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.ListAvailableProfiles",Authorization:`Bearer ${a}`,Accept:"application/json"},body:JSON.stringify({maxResults:10})});if(!e.ok){let a=await e.text();throw Error(`Failed to list profiles: ${a}`)}let f=await e.json(),g=Array.isArray(f?.profiles)?f.profiles:[],h=a=>a?.arn||a?.profileArn||null,i=g.find(a=>h(a)?.split(":")[3]===b)||g[0];return h(i)}async validateApiKey(a,b="us-east-1"){if(!a||"string"!=typeof a||!a.trim())throw Error("API key is required");let c=a.trim(),d=null;try{d=await this.listAvailableProfiles(c,b)}catch(a){throw Error(`API key validation failed: ${a.message}`)}return{accessToken:c,refreshToken:null,profileArn:d,region:b,authMethod:"api_key"}}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}}}},62821:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d={id:"qoder-cn",alias:"qdcn",category:"oauth",authModes:["oauth","apikey"],hasOAuth:!0,priority:30,authHint:"Personal Access Token (pt-...) from https://qoder.com.cn/account/integrations",display:{name:"Qoder CN",icon:"water_drop",color:"#EC4899",website:"https://qoder.com.cn",notice:{signupUrl:"https://qoder.com.cn"}},transport:{baseUrl:"https://gateway.qoder.com.cn/algo/api/v2/service/pro/sse/agent_chat_generation",format:"openai",headers:{},timeoutMs:12e4,stallTimeoutMs:12e4,usage:{url:"https://openapi.qoder.com.cn/api/v2/quota/usage"}},oauth:{openApiBaseUrl:"https://openapi.qoder.com.cn",centerBaseUrl:"https://gateway.qoder.com.cn",chatBaseUrl:"https://gateway.qoder.com.cn",deviceTokenUrl:"https://openapi.qoder.com.cn/api/v1/deviceToken/poll",refreshUrl:"https://gateway.qoder.com.cn/algo/api/v3/user/refresh_token",userInfoUrl:"https://openapi.qoder.com.cn/api/v1/userinfo",quotaUsageUrl:"https://openapi.qoder.com.cn/api/v2/quota/usage",loginUrl:"https://qoder.com.cn/device/selectAccounts"},features:{usage:!0,usageApikey:!0},models:[{id:"ultimate",name:"Ultimate"},{id:"auto",name:"Auto"},{id:"performance",name:"Performance"},{id:"efficient",name:"Efficient"},{id:"lite",name:"Lite"},{id:"qmodel_38max",name:"Qwen3.8-Max"},{id:"qmodel_latest",name:"Qwen3.7-Max"},{id:"qmodel",name:"Qwen3.7-Plus"},{id:"qfmodel",name:"Qwen3.8-Flash"},{id:"kmodel_latest",name:"Kimi-K3"},{id:"kmodel",name:"Kimi-K2.7-Code"},{id:"gmodel",name:"GLM-5.3"},{id:"gfmodel",name:"GLM-5.3-Flash"},{id:"dmodel",name:"DeepSeek-V4-Pro"},{id:"dfmodel",name:"DeepSeek-V4-Flash"},{id:"mmodel",name:"MiniMax-M3"}],serviceKinds:["llm"]}},71998:(a,b,c)=>{"use strict";c.d(b,{Fh:()=>d.Fh,Iu:()=>d.Iu,Kg:()=>d.Kg,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.getModelAliases,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.deleteModelAlias,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.updateProviderConnection,uv:()=>d.uv});var d=c(89718)},78335:()=>{},82506:(a,b,c)=>{"use strict";c.d(b,{$K:()=>ae,Jl:()=>S,PB:()=>ao,Th:()=>aq,i_:()=>ab,np:()=>aa,rk:()=>ap,vN:()=>ar,zZ:()=>an});let d='input[type="email"], input[autocomplete="username"], input#identifierId, input[name="identifier"], input[name="Email"], input[type="text"][autofocus], input[aria-label*="Email" i], input[aria-label*="email" i], input[aria-label*="phone" i], input[aria-label*="telepon" i]',e='input[type="password"], input[name="Passwd"], input[name="password"], input[aria-label*="Password" i], input[aria-label*="password" i], input[aria-label*="Sandi" i], input[aria-label*="kata sandi" i]',f=['button:has-text("Next")','button:has-text("Berikutnya")','button:has-text("Continue")','div[role="button"]:has-text("Next")','div[role="button"]:has-text("Berikutnya")',"#identifierNext button","#passwordNext button"],g=["#submit_approve_access","#submit_approve_access button","#confirm",'form#tos_form input[type="submit"]','button[jsname]:has-text("Allow")','button:has-text("Allow")','[role="button"]:has-text("Allow")','input[type="submit"][value="Allow"]','input[type="button"][value="Allow"]','button[jsname]:has-text("Izinkan")','button:has-text("Izinkan")','[role="button"]:has-text("Izinkan")','button:has-text("Continue")','button:has-text("Next")','button:has-text("Yes")','button:has-text("Accept")','button:has-text("Lanjutkan")','button:has-text("Berikutnya")','button:has-text("Setuju")','button:has-text("Saya mengerti")','button:has-text("Oke")','button:has-text("OK")','button:has-text("Got it")','button:has-text("I understand")','div[role="button"]:has-text("Continue")','div[role="button"]:has-text("Next")','div[role="button"]:has-text("Allow")','div[role="button"]:has-text("Lanjutkan")','div[role="button"]:has-text("Berikutnya")','div[role="button"]:has-text("Izinkan")','div[role="button"]:has-text("Setuju")','div[role="button"]:has-text("Saya mengerti")','div[role="button"]:has-text("Oke")','div[role="button"]:has-text("OK")','div[role="button"]:has-text("Got it")','div[role="button"]:has-text("I understand")','input[type="button"][value="Saya mengerti"]','input[type="submit"][value="Saya mengerti"]'],h=['button:has-text("Skip")','button:has-text("Lewati")','button:has-text("Not now")','button:has-text("Bukan sekarang")','button:has-text("No thanks")','button:has-text("Tidak sekarang")','div[role="button"]:has-text("Skip")','div[role="button"]:has-text("Not now")'],i=["#social-google","a#social-google",'a:has-text("Sign in with Google")','a:has-text("Sign up with Google")','a:has-text("Log in with Google")','a:has-text("Login with Google")','a:has-text("Continue with Google")','a:has-text("Sign in with Google")','button:has-text("Sign up with Google")','button:has-text("Log in with Google")','button:has-text("Login with Google")','button:has-text("Continue with Google")','button:has-text("Sign in with Google")','button[aria-label*="Continue with Google" i]','button[aria-label*="Google" i]','button:has-text("Google")','a:has-text("Google")','div[role="button"]:has-text("Continue with Google")','div[role="button"]:has-text("Login with Google")','div[role="button"]:has-text("Google")','span:has-text("Continue with Google")','span:has-text("Login with Google")','span:has-text("Google")','[aria-label*="Google" i]','[data-provider*="google" i]','button:has-text("Login with Google")','button:has-text("Continue with Google")','[data-testid*="google" i]'],j=["#onetrust-accept-btn-handler","#onetrust-reject-all-handler","#accept-recommended-btn-handler",'button:has-text("Allow All")','button:has-text("Reject All")','button:has-text("Accept All")','button:has-text("Accept all")','button:has-text("Confirm My Choices")'],k=["#agree-policy-account","#agree-policy","#agree-policy-sso",'input[type="checkbox"][id*="agree" i]','input[type="checkbox"][name*="agree" i]','input[type="checkbox"][id*="policy" i]','input[type="checkbox"][name*="policy" i]','input[type="checkbox"][id*="terms" i]','input[type="checkbox"][name*="terms" i]','.login-checkbox input[type="checkbox"]','[class*="checkbox"] input[type="checkbox"]','[class*="agree"] input[type="checkbox"]','input[type="checkbox"]'],l=['.ui-dialog button:has-text("Confirm")','dialog button:has-text("Confirm")','button:has-text("Confirm")','button:has-text("I agree")','button:has-text("Agree")','button:has-text("同意")','button:has-text("确认")'],m=['button:has-text("Continue")','[role="button"]:has-text("Continue")','button:has-text("Get started")','button:has-text("GET STARTED")','input[type="submit"][value="GET STARTED"]','button:has-text("Start")','button:has-text("Confirm")','button:has-text("Done")','button:has-text("Next")','button:has-text("Skip")','button:has-text("Not now")','button:has-text("Save")','button:has-text("Create")','button:has-text("Enter")','button:has-text("Launch")','button:has-text("Use CodeBuddy")','button:has-text("Go to CodeBuddy")'],n=["select",'[role="combobox"]','.page-region [role="combobox"]',".page-region .t-select",'.page-region [class*="t-select"]','.page-region [class*="select"]',".page-region input[placeholder]",'button:has-text("Region")','[role="button"]:has-text("Region")','button:has-text("Select region")','[role="button"]:has-text("Select region")','button:has-text("Data region")','[aria-label*="region" i]','[placeholder*="region" i]'],o=["text=/^Indonesia$/i","text=/^ID$/i","text=/^Singapore$/i","text=/^SG$/i","text=/^Japan$/i","text=/^JP$/i","text=/^Thailand$/i","text=/^TH$/i","text=/^Global$/i","text=/^International$/i","text=/^United States$/i","text=/^US$/i","text=/^Asia Pacific$/i","text=/^Hong Kong$/i","text=/^Default$/i"],p=[{selector:'input[name*="workspace" i]',value:"Default"},{selector:'input[placeholder*="workspace" i]',value:"Default"},{selector:'input[name*="team" i]',value:"Default"},{selector:'input[placeholder*="team" i]',value:"Default"},{selector:'input[name*="name" i]',value:"Default"},{selector:'input[placeholder*="name" i]',value:"Default"}],q=["wrong password","incorrect password","couldn't find your google account","couldn’t find your google account","enter a valid email","couldn’t sign you in","couldn't sign you in","invalid email or password","password is incorrect"],r=["2-step verification","2-step verification required","verify it’s you","verify it's you","check your phone","confirm it’s you","confirm it's you","recovery email","recovery phone","suspicious sign-in prevented","unusual activity detected","captcha","i'm not a robot","im not a robot","not a robot","recaptcha","select all images","select all squares","try again later","browser or app may not be secure","try using a different browser","couldn’t sign you in","couldn't sign you in","this browser or app may not be secure"],s=["restricted","account has been restricted","account is restricted","account has been suspended","account is suspended","account has been disabled","account is disabled","account has been banned","account is banned","access denied","account blocked","your account has been","violation of terms","terms of service violation","temporarily locked","permanently locked","account locked","akun dibatasi","akun diblokir","akun ditangguhkan"],t=["welcome to your new google account","selamat datang di akun google baru anda","welcome to your new account","selamat datang di akun baru","privacy and terms","privasi dan persyaratan","personalize your google services","personalisasikan layanan google anda","add recovery phone","tambahkan nomor telepon pemulihan","choose your settings","pilih setelan anda"],u=["welcome to your new account","selamat datang di akun baru","your administrator decides which","administrator anda memutuskan layanan","your organisation administrator manages","your organization administrator manages"];function v(a){if(!a||!a.startsWith("kiro://kiro.kiroAgent/authenticate-success"))return null;let b=a.indexOf("?"),c=new URLSearchParams(b>=0?a.slice(b+1):""),d=c.get("code"),e=c.get("state");return d?{callbackUrl:a,code:d,state:e}:null}function w(a){let b="function"==typeof a.frames?a.frames():[];return[a,...b.filter(b=>b!==a.mainFrame?.())]}async function x(a,b){for(let c of w(a))for(let a of b){let b=c.locator(a).first();if(await b.count().catch(()=>0)&&await b.isVisible().catch(()=>!1))return await b.click({timeout:5e3}).catch(()=>null),!0}return!1}async function y(a,b){for(let c of w(a))for(let a of b){let b=c.locator(a).first();if(await b.count().catch(()=>0)){if((await b.scrollIntoViewIfNeeded().catch(()=>null),await b.isVisible().catch(()=>!1)&&await b.isEnabled().catch(()=>!0))&&await b.click({timeout:5e3}).then(()=>!0).catch(()=>!1))return!0}}return!1}async function z(a,b){for(let c of w(a)){let a=c.locator(b).first();if(await a.count().catch(()=>0)&&await a.isVisible().catch(()=>!1))return a}return null}async function A(a,b,{timeout:c=15e3,pollInterval:d=150}={}){let e=Date.now()+c;for(;Date.now()<e;){let c=await z(a,b);if(c)return c;let f=e-Date.now();if(f<=0)break;await new Promise(a=>setTimeout(a,Math.min(d,f)))}return null}function B(a=50){return new Promise(b=>setTimeout(b,a))}async function C(a,{timeout:b=8e3,interval:c=100}={}){let d=Date.now()+b;for(;Date.now()<d;){try{if(await a())return!0}catch{}await B(c)}return!1}function D(a){try{let b=new URL(a).hostname;return"accounts.google.com"===b||b.endsWith(".accounts.google.com")||/^accounts\.google\./i.test(b)}catch{return!1}}async function E(a,{fromUrl:b="",urlMatch:c=null,selector:d=null,timeout:e=8e3}={}){let f=b||a.url?.()||"";return C(async()=>{let b=a.url?.()||"";return!!(c&&("function"==typeof c&&c(b)||c instanceof RegExp&&c.test(b))||b&&b!==f&&!b.startsWith("about:")||d&&await z(a,d))||!1},{timeout:e,interval:80})}async function F(a,b,{timeout:c=15e3}={}){if(!a||null==b)return!1;try{await a.click({timeout:3e3})}catch{}try{if(await a.fill(String(b),{timeout:Math.min(c,8e3)}),await a.inputValue().catch(()=>"")===b)return!0}catch{}try{await a.fill("",{timeout:2e3})}catch{}try{let d=Math.floor(15+20*Math.random());await a.type(String(b),{delay:d,timeout:c})}catch{try{await a.fill(String(b),{timeout:c})}catch{return!1}}let d="";try{d=await a.inputValue()}catch{d=""}return d===b}async function G(a){let b=[];for(let c of w(a))try{b.push(await c.evaluate(()=>document.body?.innerText||""))}catch{}return b.join("\n")}function H(a,b){let c=String(a||"").toLowerCase();return b.some(a=>c.includes(a))}function I(a){try{let b=new URL(a.url());return"accounts.google.com"===b.hostname||b.hostname.endsWith(".accounts.google.com")||/^accounts\.google\./i.test(b.hostname)}catch{return!1}}function J(a){return/grok|cloudflare/i.test(String(a||""))}function K(a){try{let b=new URL(a||"");return"dash.cloudflare.com"===b.hostname&&b.pathname.includes("/login")}catch{return!1}}function L(a){try{let b=new URL(a||""),c=b.hostname||"";return("accounts.x.ai"===c||"auth.x.ai"===c||c.endsWith(".x.ai"))&&/\/oauth2\/device\/done\/?$/i.test(b.pathname)}catch{return!1}}function M(a,b=""){return!!L(a.url?.()||"")||!!ad(a)&&/device authorized/i.test(String(b||""))&&/you can close (?:this )?window/i.test(String(b||""))}function N(a,b="provider"){let c=`Authorization failed for ${b}`,d=String(a?.message||c),e=a?.name==="TimeoutError"||/timed?\s*out|timeout/i.test(d);return{status:e?"failed_timeout":"failed",step:e?"oauth_timeout":"oauth_failed",message:e?`Timed out waiting for ${b} authorization`:`${b} authorization failed: ${d}`,error:d}}async function O(a,b){if(L(a.url?.()||""))return!1;for(let c of j)try{let d=a.locator(c).first();if(await d.isVisible({timeout:100}).catch(()=>!1)){if(!await d.click({timeout:2e3,noWaitAfter:!0}).then(()=>!0).catch(()=>!1))continue;if(!await C(async()=>!await d.isVisible({timeout:50}).catch(()=>!1),{timeout:800,interval:50}))return!1;return b?.("dismissing_cookies","Dismissed cookie / privacy banner"),!0}}catch{}return!!await a.evaluate(()=>{try{let a=a=>{if(!(a instanceof HTMLElement))return!1;let b=window.getComputedStyle(a);return"none"!==b.display&&"hidden"!==b.visibility&&0!==Number(b.opacity||"1")&&a.getClientRects().length>0},b=document.querySelector("#onetrust-banner-sdk"),c=document.querySelector("#onetrust-accept-btn-handler");if(!a(b)&&!a(c))return!1;if("function"==typeof window.OneTrust?.AllowAll)return window.OneTrust.AllowAll(),!0;if(a(c))return c.click(),!0}catch{}return!1}).catch(()=>!1)&&!!await C(async()=>!await a.evaluate(()=>{let a=a=>{if(!(a instanceof HTMLElement))return!1;let b=window.getComputedStyle(a);return"none"!==b.display&&"hidden"!==b.visibility&&0!==Number(b.opacity||"1")&&a.getClientRects().length>0};return a(document.querySelector("#onetrust-banner-sdk"))||a(document.querySelector("#onetrust-accept-btn-handler"))}).catch(()=>!1),{timeout:800,interval:50})&&(b?.("dismissing_cookies","Dismissed cookie / privacy banner"),!0)}async function P(a){return!!function(a){try{let b=new URL(a.url());if(b.pathname.startsWith("/not-supported")||b.pathname.includes("/signin/rejected")||b.pathname.includes("/rejected")||"about.google"===b.hostname||b.hostname.endsWith(".about.google"))return!0}catch{}return!1}(a)||H(await G(a).catch(()=>""),["browser or app may not be secure","try using a different browser","couldn't sign you in","couldn’t sign you in","this browser or app may not be secure","browser is not secure"])}function Q(a){return!!(a&&a.__zevaiSettled)}async function R(a,b,{maxWaitMs:c=2e4,successPromise:d=null}={}){let e=Date.now(),f="";for(d&&"function"==typeof d.then&&(d.__zevaiSettledHooked||(d.__zevaiSettledHooked=!0,d.then(()=>{d.__zevaiSettled=!0},()=>{d.__zevaiSettled=!0})));Date.now()-e<c;){if(Q(d))return b?.("waiting_google_redirect","OAuth callback already received — leaving interstitial wait"),!1;let c=a.url?.()||"",e=String(await G(a).catch(()=>"")).trim(),g=/\/accounts\/SetSID/i.test(c),h=/\/AccountChooser/i.test(c),i=e.length<30;if(!(g||i&&/accounts\.google\./i.test(c))&&!h)return!1;if(c!==f&&(b?.("waiting_google_redirect",`Waiting for Google redirect (url=${c.slice(0,120)} empty=${i})`),f=c),h&&await y(a,["div[data-identifier]","div[data-email]","li[data-identifier]",'div[role="link"]','div[role="button"]'])){b?.("selecting_google_account","Selected account from Google AccountChooser"),await E(a,{timeout:5e3});continue}let j=[a.waitForNavigation({waitUntil:"domcontentloaded",timeout:3e3}).catch(()=>null),B(400)];d&&!Q(d)&&j.push(d.then(()=>null).catch(()=>null)),await Promise.race(j)}return!0}function S(a){try{let b=new URL(a.url()).hostname||"";return/codebuddy\.(ai|cn)$/.test(b)||b.endsWith(".codebuddy.ai")||b.endsWith(".codebuddy.cn")||"accounts.x.ai"===b||"auth.x.ai"===b||b.endsWith(".x.ai")||"grok.com"===b||b.endsWith(".grok.com")||"dash.cloudflare.com"===b||b.endsWith(".cloudflare.com")||"qoder.com"===b||b.endsWith(".qoder.com")}catch{return!1}}async function T(a,b){if(!I(a))return!1;let c=await G(a);return!!/wants to access|ingin mengakses|akses ke akun google|allow/i.test(c)&&(await a.evaluate(()=>{let a=document.scrollingElement||document.documentElement||document.body;a&&(a.scrollTop=a.scrollHeight),window.scrollTo(0,document.body?.scrollHeight||document.documentElement?.scrollHeight||0)}).catch(()=>null),await a.waitForTimeout(300),!!await y(a,g)&&(b("approving_google_consent","Approving Google OAuth consent"),await a.waitForTimeout(1e3),!0))}async function U(a,b){let c=String(b||"");if(!H(c,t))return!1;if(await a.evaluate(()=>{let a=document.scrollingElement||document.documentElement||document.body;a&&(a.scrollTop=a.scrollHeight),window.scrollTo(0,document.body?.scrollHeight||document.documentElement?.scrollHeight||0)}).catch(()=>null),await a.waitForTimeout(500),H(c,u)){if(await y(a,g))return await a.waitForTimeout(700),!0;if(await a.evaluate(()=>{let a=[document.getElementById("confirm"),document.querySelector('form#tos_form input[type="submit"]'),document.querySelector('input[type="submit"][value="Saya mengerti"]'),document.querySelector('input[type="submit"][value="I understand"]')].filter(Boolean)[0];return!!a&&(a.scrollIntoView({block:"center"}),a.click(),!0)}).catch(()=>!1)||await a.evaluate(()=>{let a=document.getElementById("tos_form");return!!a&&(a.submit(),!0)}).catch(()=>!1))return await a.waitForTimeout(800),!0}return!!(await y(a,h)||await y(a,g))&&(await a.waitForTimeout(700),!0)}async function V(a){let b=/global|international|singapore|united states|^us$|asia|hong kong|default/i;for(let c of w(a)){let a=c.locator("select"),d=await a.count().catch(()=>0);for(let c=0;c<d;c+=1){let d=a.nth(c),e=await d.isVisible().catch(()=>!1),f=await d.isEnabled().catch(()=>!0);if(!e||!f)continue;let g=await d.evaluate((a,b)=>{let c=RegExp(b,"i"),d=[...a.options].filter(a=>!a.disabled&&""!==a.value),e=d.find(a=>c.test(`${a.label} ${a.textContent} ${a.value}`));return(e||d[0])?.value||""},b.source).catch(()=>"");if(g&&await d.selectOption(g).then(()=>!0).catch(()=>!1))return!0}}return!1}async function W(a){let b=!1;for(let c of w(a))for(let{selector:a,value:d}of p){let e=c.locator(a).first();if(!await e.count().catch(()=>0))continue;let f=await e.isVisible().catch(()=>!1),g=await e.isEnabled().catch(()=>!0);!(!f||!g||await e.inputValue().catch(()=>""))&&await e.fill(d,{timeout:5e3}).then(()=>!0).catch(()=>!1)&&(b=!0)}return b}async function X(a,b){await b.scrollIntoViewIfNeeded().catch(()=>null);let c=await b.isVisible().catch(()=>!1),d=await b.isEnabled().catch(()=>!0);if(!c||!d)return!1;let e=await b.boundingBox().catch(()=>null);if(!e||e.width<=0||e.height<=0)return!1;let f=e.x+e.width/2,g=e.y+e.height/2;return await a.mouse.move(f,g),await a.mouse.down(),await a.mouse.up(),!0}async function Y(a,b,c){for(let d of w(a)){let e=d.locator(b),f=Math.min(await e.count().catch(()=>0),80),g=[];for(let a=0;a<f;a+=1){let b=e.nth(a);if(!await b.isVisible().catch(()=>!1))continue;let c=(await b.innerText({timeout:1e3}).catch(()=>"")||await b.textContent({timeout:1e3}).catch(()=>"")||"").trim();c&&g.push({locator:b,text:c})}for(let b of c){let c=g.find(a=>b.test(a.text));if(c&&await X(a,c.locator).catch(()=>!1))return c.text}if(g[0]&&await X(a,g[0].locator).catch(()=>!1))return g[0].text}return""}async function Z(a,b){for(let c of w(a))for(let d of b){let b=c.locator(d),e=Math.min(await b.count().catch(()=>0),20);for(let c=0;c<e;c+=1){let d=b.nth(c);if(await X(a,d).catch(()=>!1))return!0}}return!1}async function $(a,b){if(!S(a)||I(a))return!1;let c=await a.evaluate(async()=>{let a=document.body?.innerText||"";if(!(document.querySelector(".page-region")||/select\s+region|region|country|area|get started|complete/i.test(a)))return null;try{let a=await fetch("https://www.codebuddy.ai/console/login/account",{method:"POST",credentials:"include",headers:{accept:"application/json, text/plain, */*","content-type":"application/json","x-requested-with":"XMLHttpRequest","x-domain":window.location.hostname||"www.codebuddy.ai"},referrer:"https://www.codebuddy.ai/register/user/complete",body:JSON.stringify({attributes:{countryCode:["62"],countryFullName:["Indonesia"],countryName:["ID"]}})}),b=await a.text().catch(()=>""),c=null;try{c=b?JSON.parse(b):null}catch{c={raw:b}}if(a.ok&&(!c||0===c.code||200===c.code||void 0===c.code))return{action:"submitted_via_api"};return{action:"api_failed",status:a.status,code:c?.code,message:c?.msg||c?.message||b||`HTTP ${a.status}`}}catch(a){return{action:"api_failed",message:a?.message||"region submit request failed"}}}).catch(()=>null);return!!c?.action&&("submitted_via_api"===c.action?(b("submitting_codebuddy_region","Submitted CodeBuddy region via account API"),await a.waitForTimeout(1500),!0):(b("codebuddy_region_api_failed",c.message?`CodeBuddy region API submit failed: ${c.message}`:"CodeBuddy region API submit failed"),!1))}async function _(a,b){if(!S(a)||I(a)||!await a.locator(".page-region").first().count().then(Boolean).catch(()=>!1))return!1;let c=[/indonesia|^id$|\u5370\u5ea6\u5c3c\u897f\u4e9a/i,/singapore|^sg$|\u65b0\u52a0\u5761/i,/japan|^jp$|\u65e5\u672c/i,/thailand|^th$|\u6cf0\u56fd/i,/global|international|default/i];if(await Z(a,[".page-region [class*='28B894']",".page-region button:has-text('Get started')",".page-region button:has-text('Start')",".page-region button:has-text('Submit')",".page-region button:has-text('Continue')",".page-region [role='button']:has-text('Get started')",".page-region [role='button']:has-text('Start')",".page-region [role='button']:has-text('Submit')",".page-region [role='button']:has-text('Continue')"]))return b("submitting_codebuddy_region","Submitted CodeBuddy region selection"),await a.waitForTimeout(1200),!0;let d=await Y(a,"ul.dropdown-section li, .dropdown-section li, [role='option'], .t-select-option, [class*='option']",c);if(d)return b("selecting_codebuddy_region",`Selected CodeBuddy region: ${d}`),await a.waitForTimeout(900),!0;if(!await Z(a,[".page-region .t-select",".page-region [class*='t-select']",".page-region [role='combobox']",".page-region input[placeholder]",".page-region [class*='select']",".page-region [class*='cursor-pointer']"]))return!1;b("opening_codebuddy_region_selector","Opening CodeBuddy region selector"),await a.waitForTimeout(600);let e=await Y(a,"ul.dropdown-section li, .dropdown-section li, [role='option'], .t-select-option, [class*='option']",c);return e&&(b("selecting_codebuddy_region",`Selected CodeBuddy region: ${e}`),await a.waitForTimeout(900)),!0}async function aa(a,b){if(!S(a)||I(a))return!1;if(await $(a,b)||await _(a,b))return!0;for(let c of w(a)){let d=await c.evaluate(()=>{let a=a=>{if(!(a instanceof HTMLElement))return!1;let b=window.getComputedStyle(a);if("hidden"===b.visibility||"none"===b.display||0===Number(b.opacity))return!1;let c=a.getBoundingClientRect();return c.width>0&&c.height>0},b=document.querySelector(".page-region"),c=document.body?.innerText||"";if(!(b||/select\s+region|region|country|area|get started|complete/i.test(c)))return null;let d=a=>{for(let b of(a.scrollIntoView({block:"center",inline:"center"}),["pointerdown","mousedown","pointerup","mouseup","click"]))a.dispatchEvent(new MouseEvent(b,{bubbles:!0,cancelable:!0,view:window,buttons:+!!b.endsWith("down")}))},e=[/indonesia|^id$|\u5370\u5ea6\u5c3c\u897f\u4e9a/i,/singapore|^sg$|\u65b0\u52a0\u5761/i,/japan|^jp$|\u65e5\u672c/i,/thailand|^th$|\u6cf0\u56fd/i,/global|international|default/i],f=b||document.body,g=["button","[role='button']","input[type='submit']",".t-button","[class*='button']","[class*='28B894']"],h=[...f.querySelectorAll(g.join(","))].filter(a).filter(a=>{let b=`${a.innerText||""} ${a.getAttribute("aria-label")||""} ${a.getAttribute("value")||""}`,c=a.getAttribute("class")||"";return/submit|start|continue|confirm|done|get started|complete|\u5b8c\u6210|\u5f00\u59cb|\u786e\u5b9a|\u4e0b\u4e00\u6b65/i.test(b)||c.includes("28B894")});if(h.length)return d(h[0]),{action:"submitted"};let i=["ul.dropdown-section li",".dropdown-section li","[role='option']",".t-select-option","[class*='option']","[class*='dropdown'] li"],j=[...document.querySelectorAll(i.join(","))].filter(a).filter(a=>(a.innerText||a.textContent||"").trim());if(j.length){let a=e.map(a=>j.find(b=>a.test((b.innerText||b.textContent||"").trim()))).find(Boolean)||j[0],b=(a.innerText||a.textContent||"").trim();return d(a),{action:"selected",label:b}}let k=["[role='combobox']",".t-select","[class*='t-select']","[class*='select']","input[placeholder]",".text-sm","[class*='cursor-pointer']"],l=[...f.querySelectorAll(k.join(","))].filter(a).filter(a=>{let b=`${a.innerText||""} ${a.getAttribute("placeholder")||""} ${a.getAttribute("aria-label")||""}`;return/region|country|area|select|placeholder|\u5730\u533a|\u56fd\u5bb6|\u9009\u62e9/i.test(b)||a.matches?.(".t-select,[class*='t-select'],input[placeholder],[class*='select']")});return l.length?(d(l[0]),{action:"opened"}):null}).catch(()=>null);if(d?.action){if("selected"===d.action)return b("selecting_codebuddy_region",`Selected CodeBuddy region${d.label?`: ${d.label}`:""}`),await a.waitForTimeout(700),!0;if("submitted"===d.action)return b("submitting_codebuddy_region","Submitted CodeBuddy region selection"),await a.waitForTimeout(1200),!0;return b("opening_codebuddy_region_selector","Opening CodeBuddy region selector"),await a.waitForTimeout(700),!0}}return!1}async function ab(a,b){if(!S(a)||I(a))return!1;let c=await a.evaluate(async()=>{let a=new URL(window.location.href);if(!/\/started\/?$/.test(a.pathname))return null;let b=a.searchParams.get("platform")||"CLI",c=a.searchParams.get("state");if(!c)return null;for(let a of[...new Set([window.location.hostname||"www.codebuddy.ai"].filter(Boolean))]){let d=new URL("/console/auth/login",window.location.origin);d.searchParams.set("platform",b),d.searchParams.set("state",c),d.searchParams.set("domain",a);try{let b=await fetch(d.toString(),{method:"GET",credentials:"include",redirect:"manual",headers:{"x-requested-with":"XMLHttpRequest","X-Domain":a}});if("opaqueredirect"===b.type||b.status>=300&&b.status<400)return{action:"attempted",domain:a,message:"redirected"};let c=await b.text(),e=null;try{e=c?JSON.parse(c):null}catch{e={raw:c}}if(b.ok&&(!e||0===e.code||200===e.code||void 0===e.code))return{action:"authorized",domain:a};if(b.ok)return{action:"attempted",domain:a,code:e?.code,message:e?.msg||e?.message||""}}catch(a){}}return{action:"failed"}}).catch(()=>null);return!!c?.action&&"failed"!==c.action&&("authorized"===c.action?b("authorizing_codebuddy_cli_state","Authorized CodeBuddy CLI login state"):b("authorizing_codebuddy_cli_state",c.message?`Attempted CodeBuddy CLI login state authorization: ${c.message}`:"Attempted CodeBuddy CLI login state authorization"),await a.waitForTimeout(1200),!0)}async function ac(a){try{for(let b of[/continue with google/i,/sign in with google/i,/sign up with google/i,/^google$/i]){let c=a.getByRole("button",{name:b}).first();if(await c.isVisible({timeout:300}).catch(()=>!1))return!0;let d=a.getByRole("link",{name:b}).first();if(await d.isVisible({timeout:200}).catch(()=>!1))return!0}}catch{}for(let b of i)try{let c=a.locator(b).first();if(await c.isVisible({timeout:200}).catch(()=>!1))return!0}catch{}return!1}function ad(a){try{let b=new URL(a.url()).hostname||"";return"accounts.x.ai"===b||"auth.x.ai"===b||b.endsWith(".x.ai")||"grok.com"===b||b.endsWith(".grok.com")}catch{return!1}}async function ae(a,b,c){if(!S(a)||I(a))return!1;if(await y(a,l))return b("accepting_provider_privacy_dialog",`Confirmed ${c} privacy or terms dialog`),await a.waitForTimeout(800),!0;if(await ab(a,b)||await aa(a,b))return!0;if(!ad(a)){if(await V(a))return b("selecting_provider_region",`Selected ${c} region`),await a.waitForTimeout(700),!0;if(await y(a,n))return b("opening_provider_region_selector",`Opening ${c} region selector`),await a.waitForTimeout(500),await y(a,o)&&(b("selecting_provider_region",`Selected ${c} region`),await a.waitForTimeout(700)),!0;if(await y(a,o))return b("selecting_provider_region",`Selected ${c} region`),await a.waitForTimeout(700),!0;if(await W(a))return b("filling_provider_onboarding",`Filled ${c} onboarding defaults`),await a.waitForTimeout(500),!0}if(ad(a))return!1;try{let b=new URL(a.url()).hostname||"";if("dash.cloudflare.com"===b||b.endsWith(".cloudflare.com"))return!1}catch{}return!await ac(a)&&!!await y(a,m)&&(b("continuing_provider_onboarding",`Continuing ${c} onboarding`),await a.waitForTimeout(1e3),!0)}async function af(a,b,{alreadyAuthed:c=!1}={}){if(!ad(a)||await ac(a))return!1;let d=await G(a).catch(()=>"");if(/device authorized|you can close|invalid action/i.test(d)||!(/enter the code shown in your terminal/i.test(d)||/only enter this code if you just initiated/i.test(d)||/sign in to grok/i.test(d)&&/continue/i.test(d)&&!/login with/i.test(d)))return!1;let e=a.url?.()||"",f=!1;try{let b=a.getByRole("button",{name:/^Continue$/i}).first();await b.isVisible({timeout:300}).catch(()=>!1)&&(await b.click({timeout:5e3}),f=!0)}catch{}return f||(f=await y(a,['button[type="submit"]:has-text("Continue")','button:has-text("Continue")'])),!!f&&(b?.(c?"confirming_device_code_after_login":"confirming_device_code",c?"Confirmed device user code on xAI after Google sign-in":"Confirmed device user code on xAI"),await E(a,{fromUrl:e,urlMatch:a=>/sign-in|login|oauth/i.test(a)&&a!==e,selector:[...i.slice(0,8),'button:has-text("Login with Google")','button:has-text("Login with email")','button:has-text("Allow")','button:has-text("Authorize")'].join(", "),timeout:1e4}),!0)}async function ag(a,b){return!!await b.isEnabled().catch(()=>!0)&&(await b.scrollIntoViewIfNeeded().catch(()=>null),!!await b.click({timeout:2500,force:!0,noWaitAfter:!0}).then(()=>!0).catch(()=>!1)||X(a,b).catch(()=>!1))}async function ah(a){for(let b of[/continue with google/i,/login with google/i,/log in with google/i,/sign up with google/i,/sign in with google/i,/^google$/i]){try{let c=a.getByRole("button",{name:b}).first();if(await c.isVisible({timeout:250}).catch(()=>!1)&&await ag(a,c))return!0}catch{}try{let c=a.getByRole("link",{name:b}).first();if(await c.isVisible({timeout:200}).catch(()=>!1)&&await ag(a,c))return!0}catch{}}try{let b=a.locator('button[aria-label*="Google" i]').first();if(await b.isVisible({timeout:200}).catch(()=>!1)&&await ag(a,b))return!0}catch{}try{let b=a.locator('button:has-text("Google")').first();if(await b.isVisible({timeout:150}).catch(()=>!1)&&await ag(a,b))return!0}catch{}return!1}async function ai(a,b){for(let c of w(a))for(let d of k)try{let e=c.locator(d).first();if(!await e.count().catch(()=>0)||!await e.isVisible().catch(()=>!1))continue;if(await e.isChecked().catch(()=>!1))return!1;if(await e.check({force:!0,timeout:3e3}).then(()=>!0).catch(()=>!1)||await e.click({force:!0,timeout:3e3}).then(()=>!0).catch(()=>!1))return b?.("accepting_provider_terms","Accepted provider terms for Google login"),await C(async()=>{try{let b=a.getByRole("button",{name:/google/i}).first();return await b.isVisible().catch(()=>!1)&&await b.isEnabled().catch(()=>!0)}catch{return!0}},{timeout:2e3,interval:80}),!0}catch{}return!1}async function aj(a,b,{allowGoogleClick:c=!0}={}){if(I(a))return!1;if(await O(a,b),await y(a,l))return b("accepting_provider_privacy_dialog","Confirmed provider privacy agreement dialog"),!0;let e=await ai(a,b);if(!c)return e;let f=await ah(a);if(!f)for(let b of i.slice(0,16))try{let c=a.locator(b).first();if(await c.isVisible({timeout:100}).catch(()=>!1)&&await ag(a,c)){f=!0;break}}catch{}if(f){b("selecting_google_login","Selecting Google login"),await y(a,l)&&b("accepting_provider_privacy_dialog","Confirmed provider privacy agreement dialog");let c=K(a.url?.()||"");if(await E(a,{urlMatch:a=>D(a),selector:d,timeout:c?1e4:12e3})||I(a))b("google_login_page","Reached Google sign-in after provider SSO");else try{let c=a.context?.(),d=c?.pages?.()||[];for(let a=d.length-1;a>=0;a-=1){let c=d[a],e=c.url?.()||"";if(D(e)){b("google_login_popup","Google sign-in opened in a popup");break}}}catch{}return!0}return e}async function ak(a,b){if(!ad(a)||await ac(a))return!1;for(let c of[/^(Allow|Authorize|Approve|Confirm)$/i,/^(Allow|Authorize|Approve)\b/i])try{let d=a.getByRole("button",{name:c}).first();if(await d.isVisible({timeout:200}).catch(()=>!1)){let a=await d.innerText().catch(()=>"")||"";if(/google/i.test(a))continue;return await d.click({timeout:3e3,noWaitAfter:!0}),b?.("approving_consent","Approving xAI device authorization"),!0}}catch{}return!1}async function al(a,{seenGoogleAuth:b,passwordSubmittedAt:c}={}){return!(ad(a)||K(a.url?.()||""))&&(!!I(a)||!!(b&&c&&!await ac(a)))}async function am(a,b){if(!function(a){try{let b=new URL(a.url()).hostname||"";return"qoder.com"===b||b.endsWith(".qoder.com")}catch{return!1}}(a))return!1;for(let c of[a.getByRole("button",{name:/^Continue$/i}).first(),a.locator('button:has-text("Continue")').first(),a.getByRole("link",{name:/^Continue$/i}).first(),a.locator('a:has-text("Continue")').first()])try{if(await c.isVisible({timeout:250}).catch(()=>!1)&&await ag(a,c))return b?.("approving_qoder_device","Approving Qoder device sign-in (Continue)"),!0}catch{}return!1}function an(a,b,c=9e5){let d,e,f=new Promise((a,b)=>{d=a,e=b}),g=!1,h=a,i=new Set,j=new Map,k=setTimeout(()=>{l(null,Error("Timed out waiting for Kiro callback"))},c);function l(a,b=null){if(!g){for(let a of(g=!0,clearTimeout(k),j.values()))for(let b of a)try{b()}catch{}j.clear(),i.clear(),b?e(b):d(a)}}function m(a){let b=v(a||"");return b&&l(b),!!b}function n(a){try{m(a?.url?.()||"");let b="function"==typeof a?.headers?a.headers():null,c=b?.location||b?.Location||"";c&&m(c)}catch{}}function o(a,b){if(!a||i.has(a))return;i.add(a);let c=a=>m(a?.url?.()||""),d=a=>m(a?.url?.()||""),e=a=>m(a?.url?.()||""),f=a=>n(a),j=()=>m(a.url?.()||""),k=()=>{a.context?.()===h&&l(null,Error("Browser session closed while waiting for Kiro callback"))};a.on("framenavigated",c),a.on("request",d),a.on("requestfailed",e),a.on("response",f),a.on("domcontentloaded",j),a.on("load",j),a.on("close",k),b.push(()=>{a.off("framenavigated",c),a.off("request",d),a.off("requestfailed",e),a.off("response",f),a.off("domcontentloaded",j),a.off("load",j),a.off("close",k)}),(async()=>{try{if(g)return;let c=a.context?.();if(!c?.newCDPSession)return;let d=await c.newCDPSession(a);await d.send("Network.enable").catch(()=>null);let e=a=>{try{let b=a?.response?.headers||{},c=b.location||b.Location||"";c&&m(c),m(a?.response?.url||"")}catch{}},f=a=>{try{m(a?.request?.url||"")}catch{}};d.on("Network.responseReceived",e),d.on("Network.requestWillBeSent",f),b.push(()=>{try{d.off?.("Network.responseReceived",e)}catch{}try{d.off?.("Network.requestWillBeSent",f)}catch{}d.detach?.().catch(()=>null)})}catch{}})();let o=v(a.url?.()||"");o&&l(o)}function p(a,b){if(g||j.has(a))return;let c=[];j.set(a,c);let d=a=>o(a,c),e=()=>{a===h&&l(null,Error("Browser context closed while waiting for Kiro callback"))},f=a=>m(a?.url?.()||""),i=a=>m(a?.url?.()||""),k=a=>n(a);a.on("page",d),a.on("close",e),a.on("request",f),a.on("requestfailed",i),a.on("response",k),c.push(()=>a.off("page",d)),c.push(()=>a.off("close",e)),c.push(()=>a.off("request",f)),c.push(()=>a.off("requestfailed",i)),c.push(()=>a.off("response",k)),b&&o(b,c)}return p(a,b),f.rebind=({context:a,page:b}={})=>{a&&(h=a,p(a,b))},f.abort=(a="Job cancelled")=>{l(null,Error(a))},f}function ao(a,b,{prefix:c,timeoutMs:d=9e5}={}){let e,f,g=new Promise((a,b)=>{e=a,f=b}),h=!1,i=new Set,j=new Map,k=setTimeout(()=>{l(null,Error("Timed out waiting for OAuth callback"))},d);function l(a,b=null){if(!h){for(let a of(h=!0,clearTimeout(k),j.values()))for(let b of a)try{b()}catch{}j.clear(),b?f(b):e(a)}}function m(a,b){if(!a||i.has(a))return;i.add(a);let d=a=>{let b=function(a,b){if(!a||!b||!a.startsWith(b))return null;let c=a.indexOf("?"),d=new URLSearchParams(c>=0?a.slice(c+1):""),e=d.get("code"),f=d.get("state");return e?{callbackUrl:a,code:e,state:f}:null}(a||"",c);b&&l(b)},e=a=>d(a?.url?.()||""),f=a=>d(a?.url?.()||""),g=a=>d(a?.url?.()||""),h=()=>d(a.url?.()||"");a.on("framenavigated",e),a.on("request",f),a.on("requestfailed",g),a.on("domcontentloaded",h),a.on("load",h),b.push(()=>{a.off("framenavigated",e),a.off("request",f),a.off("requestfailed",g),a.off("domcontentloaded",h),a.off("load",h)}),d(a.url?.()||"")}function n(a,b){if(h||j.has(a))return;let c=[];j.set(a,c);let d=a=>m(a,c);a.on("page",d),c.push(()=>a.off("page",d)),b&&m(b,c)}return n(a,b),g.rebind=({context:a,page:b}={})=>{a&&n(a,b)},g}async function ap({page:a,authUrl:b,email:c,password:h,successPromise:i,shortTimeoutMs:j=9e4,serviceLabel:k="provider",openingStep:l="opening_google_oauth",openingMessage:m="Opening Google OAuth page",successStep:n="oauth_success_received",successMessage:o="OAuth success received",onStep:p,skipGoto:t=!1,expectGoogleSoon:u=!1}){let v=Date.now(),w=(a,b)=>{p?.(a,b)},y=a=>({maxWaitMs:a,successPromise:i}),D=0,L=0,Q=0,V=!1,W=0,X=!1,Y=!1,Z=0,$=0,_=0,aa=!1,ab=J(k)?6e3:18e3,ad=J(k)?12e3:8e3,ag=J(k)?3e3:8e3,ah=J(k),ai=ah?4e3:25e3,an=ah?120:500,ao=t&&I(a);t?ao?w("google_login_page","Already on Google sign-in — filling credentials"):u?(w("waiting_google_redirect","Waiting for Google after provider SSO click"),await C(()=>I(a),{timeout:25e3,interval:100})?(ao=!0,Q=Date.now(),w("google_login_page","Reached Google sign-in after provider SSO")):w("google_redirect_slow","Google redirect slow — will retry SSO click")):(w(l,m),await O(a,w)):(w(l,m),await a.goto(b,{waitUntil:"domcontentloaded",timeout:6e4}),await O(a,w));let aq=K(a.url?.()||"")||/cloudflare/i.test(String(k||""));if(!ao){await C(async()=>!!(I(a)||await z(a,'button[aria-label*="Google" i], button:has-text("Continue with Google"), button:has-text("Login with Google"), button:has-text("Google")')||!aq&&await z(a,d)||!aq&&await z(a,'button:has-text("Continue")')),{timeout:ah?8e3:12e3,interval:80}),ah||await R(a,w,y(8e3));for(let b=0;b<(ah||aq?8:2)&&!I(a);b+=1)if(await O(a,w),!await af(a,w)){if(await aj(a,w)){if(Q=Date.now(),I(a))break;await B(50);continue}await C(async()=>I(a)||await ac(a)||/enter the code|login with google|continue with google/i.test(await G(a).catch(()=>"")),{timeout:600,interval:80})||await B(80)}ah||await R(a,w,y(6e3))}if(I(a)){V=!0;let b=await A(a,d,{timeout:1e4});b&&(w("entering_email","Entering Google email"),await F(b,c)?(w("submitting_email","Submitting email"),await x(a,f),L=Date.now(),await E(a,{selector:e,timeout:ah?8e3:12e3}),ah||await R(a,w,y(8e3))):w("email_fill_failed","Could not fill the Google email field; will retry in the polling loop"))}else S(a)&&w("waiting_for_google_sso",`Provider page still open (${(a.url?.()||"").slice(0,80)}) — will keep selecting Google login`);for(;Date.now()-v<j;){let j=await Promise.race([i.then(a=>({kind:"success",result:a})).catch(a=>({kind:"success_error",error:a})),new Promise(a=>setTimeout(()=>a(null),an))]);if(j?.kind==="success")return w(n,o),{status:"success",...j.result};if(j?.kind==="success_error"){let a=N(j.error,k);return w(a.step,a.message),{status:a.status,error:a.error}}if(ah&&V&&D&&/cloudflare/i.test(String(k||"")))try{let b=new URL(a.url?.()||"");if("dash.cloudflare.com"===b.hostname&&!b.pathname.includes("/login")&&!b.href.includes("oidcJwt")){w("waiting_cf_harvest","On Cloudflare dashboard — waiting for Workers AI token harvest");let a=await Promise.race([i.then(a=>({kind:"success",result:a})).catch(a=>({kind:"success_error",error:a})),B(2e3).then(()=>null)]);if(a?.kind==="success")return w(n,o),{status:"success",...a.result};if(a?.kind==="success_error"){let b=N(a.error,k);return w(b.step,b.message),{status:b.status,error:b.error}}continue}}catch{}if(await R(a,w,y(ah?2500:8e3)))continue;if(await T(a,w)){ah?await E(a,{timeout:4e3}):await R(a,w,y(12e3));continue}if(await P(a)){let b=a.url?.()||"";return w("browser_blocked_by_google",`Google blocked this browser (url=${b.slice(0,120)}). Use headed CloakBrowser (Xvfb on Linux).`),{status:"failed_browser_blocked",error:'Google blocked the automated browser ("This browser or app may not be secure" / signin rejected). Kiro bulk must use headed CloakBrowser (Xvfb on Linux), not headless Chrome.'}}let l=await G(a);if(M(a,l)){aa||(w("waiting_xai_release","xAI device authorized in browser — waiting for the token endpoint"),aa=!0),await B(1e3);continue}if(H(l,q))return w("invalid_credentials","Google rejected the supplied email or password"),{status:"failed_invalid_credentials",error:"Google rejected the supplied email or password."};if(H(l,s))return w("account_restricted","Account is restricted, suspended, or banned by the provider"),{status:"failed_restricted",error:"Account is restricted, suspended, or banned. Skipping."};if(H(l,r)){let a=/captcha|recaptcha|not a robot|select all images|select all squares/i.test(l);return w(a?"google_captcha":"manual_assist_required",a?"Google CAPTCHA / bot check":"Google requested CAPTCHA, 2FA, or recovery verification"),{status:"needs_manual",error:a?"Google CAPTCHA (bot check). Not fixed by lowering workers — use headed CloakBrowser with Xvfb, a residential proxy, and avoid blocking Google domains. Open manual assist to solve CAPTCHA once.":"Manual assist required in the browser session (CAPTCHA, 2FA, recovery, or suspicious-login challenge)."}}if(await U(a,l)){w("google_onboarding","Accepted Google onboarding or privacy prompt");continue}if(S(a)&&(/rate[_ ]?limit/i.test(l)||/error=rate_limited/i.test(a.url?.()||"")))return w("device_rate_limited","xAI device authorization rate-limited"),{status:"failed",error:"xAI rate-limited device authorization. Wait a few minutes and retry (too many rapid device-code attempts)."};if(S(a)&&/invalid action|invalid[_ ]?code|code (has )?expired|expired code/i.test(l)&&b&&V&&_<3&&Date.now()-$>4e3){_+=1,$=Date.now(),W=0,X=!1,Y=!1,w("device_invalid_reopen",`Device page error — reopening auth URL (${_}/3)`),await a.goto(b,{waitUntil:"domcontentloaded",timeout:6e4}).catch(()=>null),await C(async()=>await z(a,'button:has-text("Continue"), button:has-text("Allow"), button:has-text("Authorize")')||await ac(a),{timeout:4e3,interval:80});continue}let m=!!(V&&D);if((!m||!Y)&&await af(a,w,{alreadyAuthed:m})){m&&(Y=!0);continue}let p=!m&&(!Q||Date.now()-Q>ag);if(await aj(a,w,{allowGoogleClick:p})){p&&(Q=Date.now());continue}if(m&&!X&&Date.now()-W>3e3&&await ak(a,w)){W=Date.now(),X=!0;continue}if(m&&Date.now()-Z>3e3&&await am(a,w)){Z=Date.now();continue}if(await ae(a,w,k))continue;if(I(a)){V=!0;let b=await z(a,e);if(b){let c=Date.now()-D;if(D&&c<ab){w("waiting_after_password",`Password already submitted ${Math.round(c/1e3)}s ago — waiting for Google redirect`),await R(a,w,y(ah?2e3:6e3));continue}if(w("entering_password","Entering Google password"),await F(b,h)){w("submitting_password","Submitting password");let b=a.url?.()||"";await x(a,f),D=Date.now(),await Promise.race([a.waitForNavigation({waitUntil:"domcontentloaded",timeout:ah?6e3:1e4}).catch(()=>null),E(a,{fromUrl:b,timeout:ah?6e3:1e4}),i.then(()=>null).catch(()=>null)]),await R(a,w,y(ai))}else w("password_fill_failed","Could not fill the Google password field; retrying loop"),await B(100);continue}let g=await z(a,d);if(g){let b=Date.now()-L;if(L&&b<ad){w("waiting_after_email",`Email already submitted ${Math.round(b/1e3)}s ago — waiting for password/next screen`),await E(a,{selector:e,timeout:Math.max(200,ad-b)});continue}w("entering_email","Entering Google email"),await F(g,c)?(w("submitting_email","Submitting email"),await x(a,f),L=Date.now(),await E(a,{selector:e,timeout:ah?6e3:1e4})):(w("email_fill_failed","Could not fill the Google email field; retrying loop"),await B(80));continue}}await O(a,w);let t=(()=>{try{let b=new URL(a.url()).hostname||"";return"dash.cloudflare.com"===b||b.endsWith(".cloudflare.com")}catch{return!1}})();if(await al(a,{seenGoogleAuth:V,passwordSubmittedAt:D})&&await x(a,g)){w("approving_consent",`Approving Google or ${k} consent`),W=Date.now(),await E(a,{timeout:ah?2e3:4e3});continue}if(t&&!V&&await aj(a,w)){Q=Date.now();continue}if(Math.floor((Date.now()-v)/5e3)!==Math.floor((Date.now()-v-an)/5e3)){let b=a.url?.()||"",c=String(l||await G(a).catch(()=>"")).slice(0,100).replace(/\s+/g," ");w("waiting_for_next_screen",`Waiting for the next Google or ${k} screen (url=${b.slice(0,100)} body=${c})`)}else w("waiting_for_next_screen",`Waiting for the next Google or ${k} screen`);await B(an)}if(await P(a))return w("browser_blocked_by_google","Google blocked browser at end of automation window"),{status:"failed_browser_blocked",error:'Google blocked the automated browser ("This browser or app may not be secure"). Use headed CloakBrowser (Xvfb).'};let ar=a.url?.()||"",as=String(await G(a).catch(()=>"")).slice(0,120).replace(/\s+/g," ");return w("manual_assist_required",`Flow did not complete ${k} authorization automatically (url=${ar.slice(0,100)} body=${as})`),{status:"needs_manual",error:`Manual assist required — ${k} authorization did not finish automatically (last url: ${ar.slice(0,140)}). If you see "browser may not be secure", use headed CloakBrowser.`}}async function aq({page:a,authUrl:b,email:c,password:d,callbackPromise:e,shortTimeoutMs:f=9e4,onStep:g}){return ap({page:a,authUrl:b,email:c,password:d,successPromise:e,shortTimeoutMs:f,serviceLabel:"Kiro",openingStep:"opening_google_oauth",openingMessage:"Opening Google OAuth page",successStep:"kiro_callback_received",successMessage:"Kiro callback received",onStep:g})}let ar={waitForFirstVisibleLocator:A,fillInputResilient:F,parseSelectorList:function(a){return String(a||"").split(",").map(a=>a.trim()).filter(Boolean)},getFirstVisibleLocator:z,waitForPageAdvance:E,waitUntil:C,handleXaiDeviceCodeConfirm:af,GOOGLE_LOGIN_BUTTON_SELECTORS:i,isGrokish:J,isXaiDeviceDonePage:M,classifyAuthorizationFailure:N,shouldUseGenericApprove:al,dismissCookieBanners:O,clickGoogleLoginRole:ah,isCloudflareLoginUrl:K}},89718:(a,b,c)=>{"use strict";c.d(b,{CG:()=>d.CG,Fh:()=>d.Fh,Iq:()=>d.Iq,Iu:()=>d.Iu,K1:()=>d.K1,KJ:()=>d.KJ,KK:()=>d.KK,Kg:()=>d.Kg,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,ME:()=>d.ME,Mc:()=>d.Mc,NR:()=>d.NR,OH:()=>d.OH,Op:()=>d.Op,PX:()=>d.PX,Pb:()=>d.Pb,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,c:()=>d.c,dK:()=>d.dK,deleteModelAlias:()=>d.fv,ek:()=>d.ek,fK:()=>d.fK,getComboByName:()=>d.Dj,getModelAliases:()=>d.OM,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,tV:()=>d.tV,uH:()=>d.uH,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(14686)},90715:(a,b,c)=>{"use strict";c.d(b,{Eq:()=>r,eK:()=>u,js:()=>v,yr:()=>s});let d=["id","provider","authType","name","displayName","email","priority","globalPriority","defaultModel","isActive","testStatus","status","lastTested","lastError","lastErrorAt","lastErrorType","errorType","errorCode","statusCode","providerErrorCode","rateLimitedUntil","expiresAt","expiresIn","tokenType","scope","projectId","lastUsedAt","consecutiveUseCount","consecutiveAuthFailures","backoffLevel","autoDisabledAt","autoDisabledReason","failureClass","upstreamRequestId","failureResetAt","quarantinedAt","quarantineReason","manuallyReenabledAt","createdAt","updatedAt"],e=["baseUrl","profile","i2vReady","azureEndpoint","deployment","apiVersion","organization","accountId","accessKeyId","region","projectId","resourceUrl","proxyPoolId","connectionProxyEnabled","connectionProxyUrl","connectionNoProxy","githubLogin","githubName","githubEmail","githubUserId","username","firstName","lastName","authMethod","authKind","chatgptAccountId","chatgptPlanType","uid","enterpriseId","userId","organizationId","profileArn","startUrl","machineId","subscriptionTier","hasGrokCodeAccess","domain","refreshExpiresAt","refreshExpiresIn","tokenType","email","name","expireTime","nodeName","prefix","apiType","enabledModels"],f=["model","providerErrorCode","reason","lockedAt","resetsAt"],g=new Set(["baseUrl","azureEndpoint","resourceUrl","startUrl","connectionProxyUrl"]),h=new Set(["lastError","autoDisabledReason","failureClass","providerErrorCode","upstreamRequestId","quarantineReason"]),i=new Set(["not_attempted","succeeded","transient_failed","rejected"]),j=/(?:api[_-]?key|access[_-]?token|auth|credential|password|secret|signature|token)/i,k=/([?&](?:api[_-]?key|access[_-]?token|auth|credential|password|secret|signature|token)=)[^&#\s;,]+/gi,l=/(\b(?:api[_-]?key|access[_-]?token|authorization|auth|credential|password|passwd|secret|signature|token)\b["']?\s*[:=]\s*)(?!(?:Bearer|Basic)\b)(?:"[^"]*"|'[^']*'|[^\s,;&}]+)/gi,m=/\b(Bearer|Basic)\s+[a-z\d._~+\/-]+=*/gi,n=/([a-z][a-z\d+.-]*:\/\/)[^@\s/]+@/gi,o=/(^|[\s("'`])[^:@/\s]+:[^@/\s]+@/gi,p=["id","name","noProxy","type","isActive","strictProxy","testStatus","lastTestedAt","lastError","createdAt","updatedAt","boundConnectionCount"];function q(a){return null===a||["string","number","boolean"].includes(typeof a)?a:Array.isArray(a)&&a.every(a=>null===a||["string","number","boolean"].includes(typeof a))?[...a]:void 0}function r(a){if("string"!=typeof a||!a)return a;if(/^[a-z][a-z\d+.-]*:\/\//i.test(a))try{let b=new URL(a);for(let a of(b.username&&(b.username="***"),b.password&&(b.password="***"),b.searchParams.keys()))j.test(a)&&b.searchParams.set(a,"***");return b.toString()}catch{}return a.replace(n,"$1***:***@").replace(o,"$1***:***@").replace(k,"$1***").replace(l,"$1***")}function s(a){return"string"==typeof a&&a?a.replace(n,"$1***:***@").replace(o,"$1***:***@").replace(k,"$1***").replace(l,"$1***").replace(m,"$1 ***"):a}function t(a){return"string"==typeof a?s(a):Array.isArray(a)?a.map(a=>"string"==typeof a?s(a):a):a}function u(a,{revealProxyUrl:b=!1}={}){if(!a||"object"!=typeof a)return{};let c={};for(let b of p){let d=q(a[b]);void 0!==d&&(c[b]=d)}let d=q(a.proxyUrl);return"string"==typeof d&&(c.proxyUrl=b?d:r(d)),void 0!==c.lastError&&(c.lastError=t(c.lastError)),c}function v(a){if(!a||"object"!=typeof a)return{};let b={};for(let c of d){let d=q(a[c]);void 0!==d&&(b[c]=h.has(c)?t(d):d)}for(let[c,d]of Object.entries(a)){if(!c.startsWith("modelLock_"))continue;let a=q(d);void 0!==a&&(b[c]=a)}let c=function(a){if(!a||"object"!=typeof a||Array.isArray(a))return;let b={};for(let c of f){let d=q(a[c]);void 0!==d&&(b[c]="reason"===c?t(d):d)}return Object.keys(b).length>0?b:void 0}(a.modelLockReason);c&&(b.modelLockReason=c);let j=function(a){if(!a||"object"!=typeof a||Array.isArray(a))return;let b={};for(let c of["initialStatus","retryStatus"]){let d=a[c];(null===d||Number.isInteger(d)&&d>=0&&d<=599)&&(b[c]=d)}return"boolean"==typeof a.refreshAttempted&&(b.refreshAttempted=a.refreshAttempted),i.has(a.refreshOutcome)&&(b.refreshOutcome=a.refreshOutcome),Object.keys(b).length>0?b:void 0}(a.authLifecycle);j&&(b.authLifecycle=j);let k=function(a){if(!a||"object"!=typeof a||Array.isArray(a))return;let b={};for(let c of e){let d=q(a[c]);void 0!==d&&(b[c]=g.has(c)?r(d):d)}return b}(a.providerSpecificData);return k&&(b.providerSpecificData=k),b}},96487:()=>{}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=8590,exports.ids=[8590],exports.modules={8590:(a,b,c)=>{c.d(b,{$B:()=>I,I9:()=>v,Og:()=>s,Ql:()=>E,R_:()=>r,Sc:()=>J,jR:()=>H,jT:()=>p,kI:()=>q,oD:()=>k,pb:()=>L,qZ:()=>M});var d=c(35024),e=c(75924),f=c(39609),g=c(18080),h=c(52060);let i=null;async function j(a,b){return a?o("xai",a,async()=>{try{i||(i=new(await Promise.all([c.e(2990),c.e(4730)]).then(c.bind(c,84730))).XaiService);let b=await i.refreshAccessToken(a);return{accessToken:b.access_token,refreshToken:b.refresh_token||a,expiresIn:b.expires_in,idToken:b.id_token}}catch(c){b?.warn?.("TOKEN_REFRESH","xAI OAuth refresh failed",{status:c?.status||null,code:z(c?.code,c?.status),permanent:c?.permanent===!0});let a=String(c?.message||"");if(c?.permanent===!0||a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant",code:z(c?.code||"invalid_grant",c?.status)};return null}},b):null}let k=3e5,l=new Map;function m(){let a=Error("Request aborted");return a.name="AbortError",a}function n(a,b){return a.waiterCount+=1,new Promise((c,d)=>{let e=!1,f=(c,d)=>{e||(e=!0,b?.removeEventListener?.("abort",g),a.waiterCount=Math.max(0,a.waiterCount-1),0!==a.waiterCount||a.settled||(a.acceptingWaiters=!1,a.controller.abort(m())),c(d))},g=()=>f(d,m());b?.addEventListener?.("abort",g,{once:!0}),b?.aborted&&g(),a.promise.then(a=>f(c,a),a=>f(d,a))})}async function o(a,b,c,d,e=null){let f,g;if(e?.aborted)throw m();if(!b)return c();let h=`${a}:${b}`,i=l.get(h);if(i){if(i.promise){if(!1===i.acceptingWaiters||i.controller.signal.aborted)try{return await (e?.aborted?Promise.reject(m()):new Promise((a,b)=>{let c=!1,d=(a,b)=>{c||(c=!0,e?.removeEventListener?.("abort",f),a(b))},f=()=>d(b,m());e?.addEventListener?.("abort",f,{once:!0}),e?.aborted&&f(),i.promise.then(b=>d(a,b),a=>d(b,a))}))}catch(f){if(e?.aborted)throw m();if(i.controller.signal.aborted&&f?.name==="AbortError")return o(a,b,c,d,e);throw f}return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),n(i,e)}if(i.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),i.result;l.delete(h)}let j={controller:new AbortController,promise:new Promise((a,b)=>{f=a,g=b}),acceptingWaiters:!0,settled:!1,waiterCount:0};return l.set(h,j),(async()=>{try{let a=await c(j.controller.signal),b={result:a,expiresAt:Date.now()+1e4};l.set(h,b);let d=setTimeout(()=>{l.get(h)===b&&l.delete(h)},1e4);d.unref?.(),j.settled=!0,f(a)}catch(a){l.get(h)===j&&l.delete(h),j.settled=!0,g(a)}})(),n(j,e)}function p(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function q(a,b){if(!a||!b)return a;let c=Date.parse(b.lastRefreshAt||""),d=Date.parse(a.lastRefreshAt||"");return Number.isFinite(c)&&(!Number.isFinite(d)||c>d)&&b.refreshToken&&b.refreshToken!==a.refreshToken?{...a,refreshToken:b.refreshToken,accessToken:b.accessToken||a.accessToken,expiresAt:b.expiresAt||b.tokenExpiresAt||a.expiresAt,lastRefreshAt:b.lastRefreshAt||a.lastRefreshAt}:a}function r(a={}){let b=String(a.code||a.error||"refresh_token_rejected").slice(0,120),c=Error("Refresh credential rejected; re-authentication required.");return c.name="RefreshCredentialError",c.code=b,c.permanent=!0,c}function s(a){return e.Wu[a]||k}async function t(a,b,c,e){let f=d.xq[a];return f&&f.refreshUrl?b?o(a,b,async()=>{try{let c=await fetch(f.refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:f.clientId,client_secret:f.clientSecret})});if(!c.ok){let b=await c.text();return A(b,c.status,e,a)}let d=await c.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||b,expiresIn:d.expires_in}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},e):(e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function u(a,b){return a?o("claude",a,async()=>{try{let c=await fetch(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.claude.clientId})});if(!c.ok){let a=await c.text();return A(a,c.status,b,"Claude")}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!f.access_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}},b):null}async function v(a,b,c,d){return a?o(`google:${b}`,a,async()=>{try{let f=await fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})});if(!f.ok){let a=await f.text();return A(a,f.status,d,"Google")}let g=await f.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}async function w(a,b){return a?o("qwen",a,async()=>{let c=e.NA.qwen.token;try{let e=await fetch(c,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.qwen.clientId})});if(200===e.status){let c=await e.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await e.text().catch(()=>"");return A(a,e.status,b,"Qwen")}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null},b):null}async function x(a,b,c="codebuddy"){return a?o(c,a,async()=>{try{let e=d.xq[c]||d.xq.codebuddy||{},g=e.refreshUrl||"https://www.codebuddy.ai/v2/plugin/auth/token/refresh",i=e.domain||"www.codebuddy.ai",j=await (0,f.proxyAwareFetch)(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":h.C,"X-Requested-With":"XMLHttpRequest","X-Domain":i,"X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!j.ok){let a=await j.text().catch(()=>"");return A(a,j.status,b,c)}let k=await j.json(),l=k?.data||k,m=l?.accessToken||l?.access_token;if(!m)return null;return{accessToken:m,refreshToken:l?.refreshToken||l?.refresh_token||a,expiresIn:l?.expiresIn||l?.expires_in||86400}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing token for ${c}`,{error:a.message}),null}},b):null}function y(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error&&"object"==typeof c.error?c.error:null,e=d?.code||d?.type||("string"==typeof c?.error?c.error:"")||c?.error_code||"",f=d?.message||d?.error_description||c?.error_description||c?.message||a||"",g=`${e} ${f}`.toLowerCase(),h=400===b||401===b||["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_refresh_token","invalid_grant"].some(a=>g.includes(a));return{status:b,code:e,description:f,permanent:h}}function z(a,b){let c="string"==typeof a?a.trim():"";return/^[a-zA-Z0-9_.:-]{1,120}$/.test(c)?c:`HTTP_${Number(b)||0}`}function A(a,b,c,d){let e=y(a,b),f=z(e.code,b);return c?.error?.("TOKEN_REFRESH",`${d} OAuth refresh failed`,{status:b,code:f,permanent:e.permanent}),e.permanent?{error:"unrecoverable_refresh_error",code:f}:null}function B(a,b,c,d){let e=function(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error&&"object"==typeof c.error?c.error:c,e=[d?.reason,c?.reason,d?.code,c?.code,d?.errorCode,c?.errorCode,d?.type,c?.type,d?.__type,c?.__type,"string"==typeof c?.error?c.error:""].filter(a=>("string"==typeof a||"number"==typeof a)&&String(a).trim()),f=e.map(a=>String(a).trim()).find(a=>/^[A-Za-z0-9_.:#/-]{1,200}$/.test(a)&&!/^aor[A-Za-z0-9._~+/=-]{8,}$/.test(a)&&!/^eyJ[A-Za-z0-9_-]{8,}\./.test(a))||null,g=[d?.message,d?.Message,d?.error_description,c?.message,c?.Message,c?.error_description,c?"":a].find(a=>"string"==typeof a&&a.trim())||"",h=e.map(a=>String(a).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")),i=["invalid_grant","invalid_grant_exception","invalid_refresh_token","refresh_token_expired","refresh_token_revoked","refresh_token_reused","refresh_token_invalidated","expired_token","token_revoked","invalid_token","invalid_token_exception","invalid_client","invalid_client_exception","unauthorized_client"],j=h.some(a=>{let b=a.replace(/_exception$/,"");return i.some(a=>b===a||b.endsWith(`_${a}`))}),k=g.toLowerCase().slice(0,4e3),l=400===b||401===b||j||/\binvalid[_ -]?grant\b/.test(k)||/\brefresh token\b.{0,60}\b(?:expired|invalid|revoked|reused|disabled)\b/.test(k)||/\b(?:expired|invalid|revoked|reused|disabled)\b.{0,60}\brefresh token\b/.test(k);return{status:b,code:f,permanent:l}}(b,a.status);c?.error?.("TOKEN_REFRESH",`Kiro ${d} refresh failed`,{status:a.status,code:e.code,permanent:e.permanent});let f=Error(e.permanent?"Kiro refresh credential rejected":"Kiro refresh temporarily unavailable");throw f.name=e.permanent?"KiroRefreshCredentialError":"KiroRefreshTransientError",f.status=a.status,f.code=e.code,f.permanent=e.permanent,f}function C(a,b){a?.error?.("TOKEN_REFRESH",`Kiro ${b} refresh returned no access token`);let c=Error("Kiro refresh returned an invalid response");throw c.name="KiroRefreshTransientError",c.status=502,c.code="MISSING_ACCESS_TOKEN",c.permanent=!1,c}async function D(a,b){return a?o("codex",a,async()=>{try{let c=await fetch(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:d.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text();return y(a,c.status).permanent,A(a,c.status,b,"Codex")}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,hasIdToken:!!f.id_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,idToken:f.id_token,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function E(a,b,c,e=null,h=null){return a?o("kiro",a,async h=>{let i=b?.authMethod,j=b?.clientId,k=b?.clientSecret,l=b?.region;if("external_idp"===i){let d;try{d=(0,g.uo)(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Kiro external IdP refresh rejected: ${a.message}`),null}let i=await (0,f.proxyAwareFetch)(d.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:d.body,signal:h},{...e,singleTransportAttempt:!0});if(!i.ok){let a=await i.text();return B(i,a,c,"external IdP")}let j=await i.json();return j?.access_token?{accessToken:j.access_token,refreshToken:j.refresh_token||a,expiresIn:j.expires_in,providerSpecificData:d.providerSpecificData}:C(c,"external IdP")}if(j&&k){let b="idc"===i&&l?`https://oidc.${l}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",d=await (0,f.proxyAwareFetch)(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:j,clientSecret:k,refreshToken:a,grantType:"refresh_token"}),signal:h},{...e,singleTransportAttempt:!0});if(!d.ok){let a=await d.text();return B(d,a,c,"AWS")}let g=await d.json();return g?.accessToken?(c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!g.accessToken,expiresIn:g.expiresIn}),{accessToken:g.accessToken,refreshToken:g.refreshToken||a,expiresIn:g.expiresIn}):C(c,"AWS")}let m=await (0,f.proxyAwareFetch)(d.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/2.12.2"},body:JSON.stringify({refreshToken:a}),signal:h},{...e,singleTransportAttempt:!0});if(!m.ok){let a=await m.text();return B(m,a,c,"social")}let n=await m.json();return n?.accessToken?(c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!n.accessToken,expiresIn:n.expiresIn}),{accessToken:n.accessToken,refreshToken:n.refreshToken||a,expiresIn:n.expiresIn}):C(c,"social")},c,h):null}async function F(a,b){return a?o("iflow",a,async()=>{let c=btoa(`${d.xq.iflow.clientId}:${d.xq.iflow.clientSecret}`),f=await fetch(e.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.iflow.clientId,client_secret:d.xq.iflow.clientSecret})});if(!f.ok)return A(await f.text(),f.status,b,"iFlow");let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed iFlow token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function G(a,b){return a?o("github",a,async()=>{let c={grant_type:"refresh_token",refresh_token:a,client_id:d.xq.github.clientId};d.xq.github.clientSecret&&(c.client_secret=d.xq.github.clientSecret);let f=await fetch(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(c)});if(!f.ok)return A(await f.text(),f.status,b,"GitHub");let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function H(a,b){return a?o("copilot",a,async()=>{try{let c=await fetch("https://api.github.com/copilot_internal/v2/token",{headers:{Authorization:`token ${a}`,"User-Agent":e.x0.USER_AGENT,"Editor-Version":`vscode/${e.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${e.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":e.x0.API_VERSION}});if(!c.ok)return await c.body?.cancel?.().catch?.(()=>{}),b?.error?.("TOKEN_REFRESH","Copilot token refresh failed",{status:c.status}),null;let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function I(a,b,c){if(!b.refreshToken&&"vertex"!==a&&"vertex-partner"!==a)return null;switch(a){case"gemini-cli":case"antigravity":return v(b.refreshToken,d.xq[a].clientId,d.xq[a].clientSecret,c);case"claude":return u(b.refreshToken,c);case"codex":return D(b.refreshToken,c);case"qwen":return w(b.refreshToken,c);case"codebuddy":return x(b.refreshToken,c,"codebuddy");case"codebuddy-cn":return x(b.refreshToken,c,"codebuddy-cn");case"iflow":return F(b.refreshToken,c);case"github":return G(b.refreshToken,c);case"kiro":return E(b.refreshToken,b.providerSpecificData,c);case"xai":case"grok-cli":return j(b.refreshToken,c);case"vertex":case"vertex-partner":{let a=J(b.apiKey);if(!a)return null;return L(a,c)}default:return t(a,b.refreshToken,b,c)}}function J(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let K=new Map;async function L(a,b){let d=a.client_email,e=K.get(d);if(e&&e.expiresAt-Date.now()>3e5)return{accessToken:e.token,expiresAt:e.expiresAt};try{let{SignJWT:e,importPKCS8:f}=await Promise.all([c.e(6935),c.e(8971)]).then(c.bind(c,8971));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let g=await f(a.private_key.replace(/\\n/g,"\n"),"RS256"),h=Math.floor(Date.now()/1e3),i=await new e({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience("https://oauth2.googleapis.com/token").setIssuedAt(h).setExpirationTime(h+3600).sign(g),j=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i})});if(!j.ok){let a=await j.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:k,expires_in:l}=await j.json(),m=Date.now()+(l??3600)*1e3;return K.set(d,{token:k,expiresAt:m}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:k,expiresAt:m}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}async function M(a,b=3,c=null,d=null){let e=()=>{let a=Error("Request aborted");return a.name="AbortError",a},f=a=>d?d.aborted?Promise.reject(e()):new Promise((b,c)=>{let f,g=()=>{clearTimeout(f),d.removeEventListener("abort",g),c(e())};f=setTimeout(()=>{d.removeEventListener("abort",g),b()},a),d.addEventListener("abort",g,{once:!0})}):new Promise(b=>setTimeout(b,a));for(let g=0;g<b;g++){if(d?.aborted)throw e();if(g>0){let a=1e3*g;c?.debug?.("TOKEN_REFRESH",`Retry ${g}/${b} after ${a}ms`),await f(a)}try{let b=await a();if(p(b))throw r(b);if(b)return b}catch(a){if(d?.aborted||a?.name==="AbortError")throw e();if(a?.permanent===!0)throw a;c?.warn?.("TOKEN_REFRESH",`Attempt ${g+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}},18080:(a,b,c)=>{c.d(b,{Xj:()=>i,uo:()=>j});let d=new Set(["login.microsoftonline.com","login.microsoft.com","login.windows.net"]);function e(a){return"string"==typeof a?a.trim():""}function f(a){let b,c=e(a);if(!c)throw Error("token_endpoint is required");try{b=new URL(c)}catch{throw Error("token_endpoint must be a valid URL")}if("https:"!==b.protocol)throw Error("token_endpoint must use https");if(!d.has(b.hostname.toLowerCase()))throw Error("token_endpoint must be a Microsoft login endpoint");return b.toString()}function g(a){return Array.isArray(a)?a.map(e).filter(Boolean).join(" "):e(a)}function h(a){try{if(!a||"string"!=typeof a)return null;let b=a.split(".");if(3!==b.length)return null;let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=(4-c.length%4)%4;return JSON.parse(Buffer.from(`${c}${"=".repeat(d)}`,"base64").toString("utf8"))}catch{return null}}function i(a){let b=a;if("string"==typeof b)try{b=JSON.parse(b)}catch{throw Error("CLIProxyAPI auth JSON is invalid")}if(!b||"object"!=typeof b)throw Error("CLIProxyAPI auth JSON is required");let c=e(b.auth_method||b.authMethod);if(c&&"external_idp"!==c)throw Error("Only external_idp Kiro auth is supported by this importer");let d=e(b.access_token||b.accessToken),i=e(b.refresh_token||b.refreshToken),j=e(b.client_id||b.clientId),k=f(b.token_endpoint||b.tokenEndpoint),l=e(b.profile_arn||b.profileArn),m=e(b.region)||"us-east-1",n=g(b.scopes||b.scope);if(!d)throw Error("access_token is required");if(!i)throw Error("refresh_token is required");if(!j)throw Error("client_id is required");if(!n)throw Error("scopes is required");if(!l)throw Error("profile_arn is required");let o=h(d),p=b.email||o?.email||o?.preferred_username||o?.upn||o?.sub||null;return{accessToken:d,refreshToken:i,expiresAt:function(a){let b=a.expired||a.expires_at||a.expiresAt;if(b){let a=new Date(b).getTime();if(Number.isFinite(a))return new Date(a).toISOString()}let c=Number(a.expires_in||a.expiresIn||0);if(Number.isFinite(c)&&c>0)return new Date(Date.now()+1e3*c).toISOString();let d=h(a.access_token||a.accessToken);return d?.exp?new Date(1e3*d.exp).toISOString():new Date(Date.now()+36e5).toISOString()}(b),email:p,providerSpecificData:{profileArn:l,region:m,authMethod:"external_idp",provider:"CLIProxyAPI",clientId:j,tokenEndpoint:k,scope:n}}}function j(a,b={}){let c=e(b.clientId||b.client_id),d=f(b.tokenEndpoint||b.token_endpoint),h=g(b.scope||b.scopes);if(!a)throw Error("refresh token is required");if(!c)throw Error("clientId is required for external_idp refresh");if(!h)throw Error("scope is required for external_idp refresh");return{tokenEndpoint:d,body:new URLSearchParams({grant_type:"refresh_token",client_id:c,refresh_token:a,scope:h}),providerSpecificData:{...b,authMethod:"external_idp",clientId:c,tokenEndpoint:d,scope:h}}}}};
|