67router 1.0.1 → 1.0.3
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/README.md +73 -1
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +5 -3
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +17 -17
- package/app/.next-cli-build/required-server-files.json +2 -1
- package/app/.next-cli-build/routes-manifest.json +12 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +12 -8
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +2 -2
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -29
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +25 -0
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -26
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +68 -0
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/favicon.ico.body +0 -0
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +5 -3
- package/app/.next-cli-build/server/chunks/1757.js +25 -0
- package/app/.next-cli-build/server/chunks/238.js +1 -0
- package/app/.next-cli-build/server/chunks/24.js +1 -1
- package/app/.next-cli-build/server/chunks/3047.js +1 -0
- package/app/.next-cli-build/server/chunks/3593.js +2 -2
- package/app/.next-cli-build/server/chunks/3943.js +1 -1
- package/app/.next-cli-build/server/chunks/3966.js +1 -1
- package/app/.next-cli-build/server/chunks/4049.js +1 -1
- package/app/.next-cli-build/server/chunks/4055.js +2 -2
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4252.js +1 -0
- package/app/.next-cli-build/server/chunks/436.js +1 -1
- package/app/.next-cli-build/server/chunks/4663.js +1 -1
- package/app/.next-cli-build/server/chunks/4739.js +2 -2
- package/app/.next-cli-build/server/chunks/4780.js +2 -2
- package/app/.next-cli-build/server/chunks/4872.js +1 -0
- package/app/.next-cli-build/server/chunks/507.js +2 -2
- package/app/.next-cli-build/server/chunks/5217.js +2 -2
- package/app/.next-cli-build/server/chunks/5258.js +2 -2
- package/app/.next-cli-build/server/chunks/5299.js +20 -19
- package/app/.next-cli-build/server/chunks/5330.js +7 -7
- package/app/.next-cli-build/server/chunks/5500.js +1 -1
- package/app/.next-cli-build/server/chunks/5615.js +1 -1
- package/app/.next-cli-build/server/chunks/5946.js +2 -2
- package/app/.next-cli-build/server/chunks/6070.js +1 -1
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6249.js +2 -2
- package/app/.next-cli-build/server/chunks/{4037.js → 6540.js} +1 -1
- package/app/.next-cli-build/server/chunks/6763.js +1 -1
- package/app/.next-cli-build/server/chunks/6922.js +1 -1
- package/app/.next-cli-build/server/chunks/698.js +2 -2
- package/app/.next-cli-build/server/chunks/7037.js +1 -1
- package/app/.next-cli-build/server/chunks/7211.js +1 -1
- package/app/.next-cli-build/server/chunks/7247.js +1 -1
- package/app/.next-cli-build/server/chunks/7285.js +1 -0
- package/app/.next-cli-build/server/chunks/7552.js +1 -0
- package/app/.next-cli-build/server/chunks/7716.js +1 -1
- package/app/.next-cli-build/server/chunks/7965.js +2 -2
- package/app/.next-cli-build/server/chunks/8251.js +1 -0
- package/app/.next-cli-build/server/chunks/827.js +1 -1
- package/app/.next-cli-build/server/chunks/8402.js +1 -1
- package/app/.next-cli-build/server/chunks/8416.js +1 -1
- package/app/.next-cli-build/server/chunks/8499.js +3 -3
- package/app/.next-cli-build/server/chunks/8520.js +2 -2
- package/app/.next-cli-build/server/chunks/8635.js +1 -1
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/8895.js +5 -5
- package/app/.next-cli-build/server/chunks/8920.js +1 -1
- package/app/.next-cli-build/server/chunks/9100.js +21 -0
- package/app/.next-cli-build/server/chunks/915.js +2 -2
- package/app/.next-cli-build/server/chunks/936.js +1 -0
- package/app/.next-cli-build/server/chunks/9378.js +1 -0
- package/app/.next-cli-build/server/chunks/9604.js +1 -0
- package/app/.next-cli-build/server/chunks/9696.js +7 -0
- package/app/.next-cli-build/server/instrumentation.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +4 -4
- package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/1321-10507ce87a2d1e74.js +1 -0
- package/app/.next-cli-build/static/chunks/{2694-a1e5a15b567b3016.js → 2694-fa4a038c7addaf24.js} +2 -2
- package/app/.next-cli-build/static/chunks/5497-3353154ebc0a5eb1.js +7 -0
- package/app/.next-cli-build/static/chunks/761-14e8dc284c182522.js +125 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-5c93b8979ef66e54.js → page-99efb86d0bd7063d.js} +15 -11
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-3ec2eae580cfd6e9.js +27 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-d61c6b11bb916a3c.js +4 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c2e6b6ae60d66ee6.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-4b073ba7273cde14.js +1 -0
- package/app/.next-cli-build/static/chunks/app/_global-error/page-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/landing/page-d95764e0f3861cfe.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-7ee9602010473e2d.js +1 -0
- package/app/.next-cli-build/static/css/1b93179163bad564.css +1 -0
- package/app/.next-cli-build/static/eXoiEKu5yWZkk7npUXFrc/_buildManifest.js +1 -0
- package/app/cli/.build-home/AppData/Roaming/67router/db/backups/schema-1-to-2-1.0.1-20261009-073855/data.sqlite +0 -0
- package/app/cli/.build-home/AppData/Roaming/67router/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/67router/db/data.sqlite-wal +0 -0
- package/app/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js +131 -0
- package/app/node_modules/@aws/lambda-invoke-store/package.json +55 -0
- package/app/node_modules/@aws-sdk/core/client.js +5 -0
- package/app/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +984 -0
- package/app/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +349 -0
- package/app/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +2949 -0
- package/app/node_modules/@aws-sdk/core/httpAuthSchemes.js +5 -0
- package/app/node_modules/@aws-sdk/core/package.json +146 -0
- package/app/node_modules/@aws-sdk/core/protocols.js +5 -0
- package/app/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-cjs/index.js +202 -0
- package/app/node_modules/@aws-sdk/credential-provider-cognito-identity/dist-cjs/loadCognitoIdentity-v413cIIq.js +4 -0
- package/app/node_modules/@aws-sdk/credential-provider-cognito-identity/package.json +59 -0
- package/app/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +39 -0
- package/app/node_modules/@aws-sdk/credential-provider-env/package.json +63 -0
- package/app/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +179 -0
- package/app/node_modules/@aws-sdk/credential-provider-http/package.json +75 -0
- package/app/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +229 -0
- package/app/node_modules/@aws-sdk/credential-provider-ini/package.json +73 -0
- package/app/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +290 -0
- package/app/node_modules/@aws-sdk/credential-provider-login/package.json +66 -0
- package/app/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +166 -0
- package/app/node_modules/@aws-sdk/credential-provider-node/package.json +71 -0
- package/app/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +76 -0
- package/app/node_modules/@aws-sdk/credential-provider-process/package.json +63 -0
- package/app/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +192 -0
- package/app/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js +3 -0
- package/app/node_modules/@aws-sdk/credential-provider-sso/package.json +67 -0
- package/app/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +58 -0
- package/app/node_modules/@aws-sdk/credential-provider-web-identity/package.json +71 -0
- package/app/node_modules/@aws-sdk/credential-providers/dist-cjs/index.js +284 -0
- package/app/node_modules/@aws-sdk/credential-providers/dist-cjs/loadSts-C4jOcYxJ.js +3 -0
- package/app/node_modules/@aws-sdk/credential-providers/package.json +85 -0
- package/app/node_modules/@aws-sdk/nested-clients/cognito-identity.js +5 -0
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +616 -0
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +590 -0
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +468 -0
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +674 -0
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +881 -0
- package/app/node_modules/@aws-sdk/nested-clients/package.json +121 -0
- package/app/node_modules/@aws-sdk/nested-clients/signin.js +5 -0
- package/app/node_modules/@aws-sdk/nested-clients/sso-oidc.js +5 -0
- package/app/node_modules/@aws-sdk/nested-clients/sso.js +5 -0
- package/app/node_modules/@aws-sdk/nested-clients/sts.js +5 -0
- package/app/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +155 -0
- package/app/node_modules/@aws-sdk/signature-v4-multi-region/package.json +60 -0
- package/app/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +158 -0
- package/app/node_modules/@aws-sdk/token-providers/package.json +69 -0
- package/app/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +372 -0
- package/app/node_modules/@aws-sdk/xml-builder/package.json +63 -0
- package/app/node_modules/@smithy/core/cbor.js +5 -0
- package/app/node_modules/@smithy/core/checksum.js +5 -0
- package/app/node_modules/@smithy/core/client.js +5 -0
- package/app/node_modules/@smithy/core/config.js +5 -0
- package/app/node_modules/@smithy/core/dist-cjs/index.js +344 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +2550 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +577 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +1200 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +779 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +879 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +924 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1099 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +848 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +709 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +1765 -0
- package/app/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +189 -0
- package/app/node_modules/@smithy/core/endpoints.js +5 -0
- package/app/node_modules/@smithy/core/event-streams.js +5 -0
- package/app/node_modules/@smithy/core/package.json +258 -0
- package/app/node_modules/@smithy/core/protocols.js +5 -0
- package/app/node_modules/@smithy/core/retry.js +5 -0
- package/app/node_modules/@smithy/core/schema.js +5 -0
- package/app/node_modules/@smithy/core/serde.js +5 -0
- package/app/node_modules/@smithy/core/transport.js +5 -0
- package/app/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +370 -0
- package/app/node_modules/@smithy/credential-provider-imds/package.json +57 -0
- package/app/node_modules/@smithy/node-http-handler/dist-cjs/index.js +859 -0
- package/app/node_modules/@smithy/node-http-handler/package.json +56 -0
- package/app/node_modules/@smithy/signature-v4/dist-cjs/index.js +585 -0
- package/app/node_modules/@smithy/signature-v4/package.json +53 -0
- package/app/node_modules/@smithy/types/dist-cjs/index.js +96 -0
- package/app/node_modules/@smithy/types/package.json +50 -0
- package/app/node_modules/bowser/es5.js +1 -0
- package/app/node_modules/bowser/package.json +93 -0
- package/app/package.json +4 -1
- package/app/public/providers/bedrock-xai.png +0 -0
- package/app/public/providers/bedrock.png +0 -0
- package/app/server.js +1 -1
- package/app/src/mitm/server.js +24 -24
- package/cli.js +9 -6
- package/package.json +1 -1
- package/src/cli/api/client.js +17 -4
- package/src/cli/commands/connect.js +156 -16
- package/src/cli/commands/connectTools.js +282 -21
- package/src/cli/commands/show.js +101 -0
- package/src/cli/menus/cliTools.js +116 -17
- package/src/cli/menus/combos.js +9 -2
- package/src/cli/menus/providers.js +8 -0
- package/src/cli/tray/autostart.js +2 -2
- package/src/cli/tray/icon.ico +0 -0
- package/src/cli/tray/icon.png +0 -0
- package/src/cli/tray/tray.js +7 -7
- package/src/cli/tray/tray.ps1 +1 -1
- package/src/cli/utils/comboModelId.js +10 -0
- package/app/.next-cli-build/server/chunks/1731.js +0 -1
- package/app/.next-cli-build/server/chunks/4572.js +0 -1
- package/app/.next-cli-build/server/chunks/458.js +0 -1
- package/app/.next-cli-build/server/chunks/4850.js +0 -1
- package/app/.next-cli-build/server/chunks/4884.js +0 -21
- package/app/.next-cli-build/server/chunks/5524.js +0 -1
- package/app/.next-cli-build/server/chunks/5670.js +0 -1
- package/app/.next-cli-build/server/chunks/700.js +0 -1
- package/app/.next-cli-build/server/chunks/7220.js +0 -1
- package/app/.next-cli-build/server/chunks/9128.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-c545acd5fe356d7b.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-1564aeaafa84c485.js +0 -7
- package/app/.next-cli-build/static/chunks/761-620fbf946f547a62.js +0 -124
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-319aa3378d3ab380.js +0 -27
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-2476e19d152dd091.js +0 -4
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-9f91a799bf128657.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-49a84b0cda78a0cb.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/landing/page-26c6c887a10d753f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-11746d5d6532f1f0.js +0 -1
- package/app/.next-cli-build/static/css/820ca25fc8556f66.css +0 -1
- package/app/.next-cli-build/static/ghb3xq22SZISfX5LQ5iP2/_buildManifest.js +0 -1
- /package/app/.next-cli-build/static/{ghb3xq22SZISfX5LQ5iP2 → eXoiEKu5yWZkk7npUXFrc}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=3593,exports.ids=[3593],exports.modules={53593:(a,b,c)=>{c.d(b,{createSqlJsAdapter:()=>k});var d=c(73024),e=c.n(d),f=c(46293),g=c.n(f),h=c(63775);let i=null;async function j(){return i||(i=await g()())}async function k(a){let b=await j(),c=e().existsSync(a)?e().readFileSync(a):null,d=new b.Database(c);d.exec(h.oG);let f=!1,g=null;function i(){let b=d.export();e().writeFileSync(a,Buffer.from(b)),f=!1}function k(){f=!0,g&&clearTimeout(g),g=setTimeout(()=>{if(g=null,f)try{i()}catch(a){console.error("[sqljs] save failed:",a)}},100)}function l(a){if(!(!a||Array.isArray(a)&&0===a.length))return a}let m=()=>{if(f)try{i()}catch{}};return process.on("beforeExit",m),process.on("SIGINT",m),process.on("SIGTERM",m),{driver:"sql.js",run:function(a,b=[]){let c=d.prepare(a);try{c.bind(l(b)),c.step();let a=d.getRowsModified(),e=d.exec("SELECT last_insert_rowid() as id")[0]?.values?.[0]?.[0]??null;return k(),{changes:a,lastInsertRowid:e}}finally{c.free()}},get:function(a,b=[]){let c=d.prepare(a);try{if(c.bind(l(b)),c.step())return c.getAsObject();return}finally{c.free()}},all:function(a,b=[]){let c=d.prepare(a);try{c.bind(l(b));let a=[];for(;c.step();)a.push(c.getAsObject());return a}finally{c.free()}},exec:function(a){d.exec(a),k()},transaction:function(a){let b=`sp_${Math.random().toString(36).slice(2)}`;d.exec(`SAVEPOINT ${b}`);try{let c=a();return d.exec(`RELEASE ${b}`),k(),c}catch(a){try{d.exec(`ROLLBACK TO ${b}`),d.exec(`RELEASE ${b}`)}catch{}throw a}},close:function(){g&&clearTimeout(g),f&&i(),d.close()},raw:d}}},63775:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=
|
|
1
|
+
"use strict";exports.id=3593,exports.ids=[3593],exports.modules={53593:(a,b,c)=>{c.d(b,{createSqlJsAdapter:()=>k});var d=c(73024),e=c.n(d),f=c(46293),g=c.n(f),h=c(63775);let i=null;async function j(){return i||(i=await g()())}async function k(a){let b=await j(),c=e().existsSync(a)?e().readFileSync(a):null,d=new b.Database(c);d.exec(h.oG);let f=!1,g=null;function i(){let b=d.export();e().writeFileSync(a,Buffer.from(b)),f=!1}function k(){f=!0,g&&clearTimeout(g),g=setTimeout(()=>{if(g=null,f)try{i()}catch(a){console.error("[sqljs] save failed:",a)}},100)}function l(a){if(!(!a||Array.isArray(a)&&0===a.length))return a}let m=()=>{if(f)try{i()}catch{}};return process.on("beforeExit",m),process.on("SIGINT",m),process.on("SIGTERM",m),{driver:"sql.js",run:function(a,b=[]){let c=d.prepare(a);try{c.bind(l(b)),c.step();let a=d.getRowsModified(),e=d.exec("SELECT last_insert_rowid() as id")[0]?.values?.[0]?.[0]??null;return k(),{changes:a,lastInsertRowid:e}}finally{c.free()}},get:function(a,b=[]){let c=d.prepare(a);try{if(c.bind(l(b)),c.step())return c.getAsObject();return}finally{c.free()}},all:function(a,b=[]){let c=d.prepare(a);try{c.bind(l(b));let a=[];for(;c.step();)a.push(c.getAsObject());return a}finally{c.free()}},exec:function(a){d.exec(a),k()},transaction:function(a){let b=`sp_${Math.random().toString(36).slice(2)}`;d.exec(`SAVEPOINT ${b}`);try{let c=a();return d.exec(`RELEASE ${b}`),k(),c}catch(a){try{d.exec(`ROLLBACK TO ${b}`),d.exec(`RELEASE ${b}`)}catch{}throw a}},close:function(){g&&clearTimeout(g),f&&i(),d.close()},raw:d}}},63775:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=2,e=`
|
|
2
2
|
PRAGMA journal_mode = WAL;
|
|
3
3
|
PRAGMA synchronous = NORMAL;
|
|
4
4
|
PRAGMA temp_store = MEMORY;
|
|
@@ -6,4 +6,4 @@ PRAGMA mmap_size = 30000000;
|
|
|
6
6
|
PRAGMA cache_size = -64000;
|
|
7
7
|
PRAGMA foreign_keys = ON;
|
|
8
8
|
PRAGMA busy_timeout = 5000;
|
|
9
|
-
`,f={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",endpoint:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function g(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}}};
|
|
9
|
+
`,f={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL",accessRestricted:"INTEGER DEFAULT 0",accessAllow:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",endpoint:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function g(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=3943,exports.ids=[3943],exports.modules={8521:(a,b,c)=>{c.d(b,{oD:()=>B,Og:()=>D,jT:()=>C,Sc:()=>E,Wm:()=>r,jR:()=>w,I9:()=>q,Ql:()=>t,$B:()=>J,pb:()=>G,qZ:()=>K});var d=c(35024),e=c(75924),f=c(39609);let g=new Map;async function h(a,b,c,d){if(!b)return c();let e=`${a}:${b}`,f=g.get(e);if(f){if(f.promise)return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),f.promise;if(f.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),f.result;g.delete(e)}let h=(async()=>{try{let a=await c();return g.set(e,{result:a,expiresAt:Date.now()+1e4}),a}catch(a){throw g.delete(e),a}})();return g.set(e,{promise:h}),h}var i=c(18080);let j=null;async function k(a,b){return a?h("xai",a,async()=>{try{j||(j=new(await Promise.all([c.e(5615),c.e(4730)]).then(c.bind(c,84730))).XaiService);let b=await j.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 refresh failed: ${c?.message||c}`);let a=String(c?.message||"");if(a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant"};return null}},b):null}let l={claude:{bodyFormat:"json",includeClientSecret:!1,url:()=>e.NA.anthropic.token,dedupKey:"claude"},iflow:{url:()=>e.NA.iflow.token,dedupKey:"iflow",extraHeaders:(a,b)=>({Authorization:`Basic ${btoa(`${b.clientId}:${b.clientSecret}`)}`})},github:{url:()=>e.NA.github.token,dedupKey:"github",includeClientSecret:a=>!!a?.clientSecret},kimi:{dedupKey:"kimi",extraHeaders:a=>(0,e.buildKimiHeaders)(a?.providerSpecificData?.deviceId)}};async function m(a,b,c,e){let f=d.xq[a],g=l[a]||{},i=function(a,b,c){if(c?.url)try{return c.url()}catch{}return b?.refreshUrl||d.sr[a]?.tokenUrl||null}(a,f,g);return f&&i?b?h(g.dedupKey||a,b,async()=>{try{let d,h,j,{format:k,body:l}=(d=g?.bodyFormat==="json"?"json":"form",h=g?.includeClientSecret===void 0||("function"==typeof g.includeClientSecret?g.includeClientSecret(f):g.includeClientSecret),j={grant_type:"refresh_token",refresh_token:b,client_id:f.clientId},(h&&f.clientSecret&&(j.client_secret=f.clientSecret),"json"===d)?{format:"json",body:JSON.stringify(j)}:{format:"form",body:new URLSearchParams(j)}),m={"Content-Type":"json"===k?"application/json":"application/x-www-form-urlencoded",Accept:"application/json",...g.extraHeaders&&g.extraHeaders(c,f)||{}},n=await fetch(i,{method:"POST",headers:m,body:l});if(!n.ok){let b=await n.text();return e?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:n.status,error:b}),null}let o=await n.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!o.access_token,hasNewRefreshToken:!!o.refresh_token,expiresIn:o.expires_in}),{accessToken:o.access_token,refreshToken:o.refresh_token||b,expiresIn:o.expires_in,...g.parse&&g.parse(o)||{}}}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 n(a,b,c){return m("kimi",a,b,c)}async function o(a,b){return a?h("cline",a,async()=>{try{let c=await fetch(d.xq.cline?.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a,grantType:"refresh_token",clientType:"extension"})});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Cline token",{status:c.status,error:a}),null}let e=await c.json(),f=e?.data||e;if(!f?.accessToken)return null;let g=f.expiresAt?Math.max(1,Math.floor((new Date(f.expiresAt).getTime()-Date.now())/1e3)):f.expiresIn||f.expires_in||3600;return{accessToken:f.accessToken,refreshToken:f.refreshToken||a,expiresIn:g}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing Cline token: ${a.message}`),null}},b):null}async function p(a,b){return m("claude",a,{},b)}async function q(a,b,c,d){return a?h(`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 d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:f.status,error:a}),null}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 r(a,b){return a?h("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(),d=function(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error?.code||c?.error||c?.error_code||"",e=c?.error_description||c?.message||a||"",f=`${d} ${e}`.toLowerCase();return{status:b,code:d,description:e,permanent:["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_grant"].some(a=>f.includes(a))}}(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-auth required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:c.status,error:a,code:d.code,permanent:d.permanent}),null}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 s(a,b,d){if(a?.profileArn)return{};let e=d?.trim?.()||null;if(!e){let{fetchKiroProfileArn:a}=await Promise.all([c.e(7774),c.e(5433),c.e(8920),c.e(24),c.e(2329),c.e(3225),c.e(6922),c.e(5215),c.e(700),c.e(8499),c.e(6249),c.e(5330),c.e(8895),c.e(4049),c.e(3535)]).then(c.bind(c,74177));e=await a(b)}return e?{providerSpecificData:{profileArn:e}}:{}}async function t(a,b,c,e=null){return a?h("kiro",a,async()=>{let g=b?.authMethod,h=b?.clientId,j=b?.clientSecret,k=b?.region;if("external_idp"===g){let d;try{d=(0,i.uo)(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Invalid Kiro external_idp refresh config: ${a.message}`),null}let g=await (0,f.proxyAwareFetch)(d.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:d.body},e);if(!g.ok){let a=await g.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro external_idp token",{status:g.status,error:a}),null}let h=await g.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro external_idp token",{hasNewAccessToken:!!h.access_token,hasNewRefreshToken:!!h.refresh_token,expiresIn:h.expires_in}),{accessToken:h.access_token,refreshToken:h.refresh_token||a,expiresIn:h.expires_in,providerSpecificData:d.providerSpecificData}}if(h&&j){let d="idc"===g&&k?`https://oidc.${k}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",i=await (0,f.proxyAwareFetch)(d,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:h,clientSecret:j,refreshToken:a,grantType:"refresh_token"})},e);if(!i.ok){let a=await i.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:i.status,error:a}),null}let l=await i.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!l.accessToken,expiresIn:l.expiresIn}),{accessToken:l.accessToken,refreshToken:l.refreshToken||a,expiresIn:l.expiresIn,...await s(b,l.accessToken,l.profileArn)}}let l=await (0,f.proxyAwareFetch)(d.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a})},e);if(!l.ok){let a=await l.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:l.status,error:a}),null}let m=await l.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!m.accessToken,expiresIn:m.expiresIn}),{accessToken:m.accessToken,refreshToken:m.refreshToken||a,expiresIn:m.expiresIn,...await s(b,m.accessToken,m.profileArn)}},c):null}async function u(a,b){return m("iflow",a,{},b)}async function v(a,b){return m("github",a,{},b)}async function w(a,b){return a?h("copilot",a,async()=>{try{let c=await fetch(d.sr.github?.copilotTokenUrl,{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){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:c.status,error:a}),null}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!f.token,expiresAt:f.expires_at}),{token:f.token,expiresAt:f.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function x(a,b){return a?h("codebuddy-cn",a,async()=>{let c=d.sr["codebuddy-cn"]||{},e=await fetch(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!e.ok){let a=await e.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy token",{status:e.status,error:a}),null}let f=await e.json();return 0===f.code&&f.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy token refresh returned no token",{code:f.code,msg:f.msg}),null)},b):null}async function y(a,b){return a?h("codebuddy-intl",a,async()=>{let c=d.sr["codebuddy-intl"]||{},e=await fetch(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!e.ok){let a=await e.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy intl token",{status:e.status,error:a}),null}let f=await e.json();return 0===f.code&&f.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy intl token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy intl token refresh returned no token",{code:f.code,msg:f.msg}),null)},b):null}async function z(a,b,c){if(!a)return null;let e=d.sr.trae||{},f=e.exchangeTokenUrl||e.tokenUrl;return f?h("trae",a,async()=>{try{let b,d=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"Trae/1.0.0 antigravity-cockpit-tools"},body:JSON.stringify({ClientID:e.clientId||"ono9krqynydwx5",RefreshToken:a,ClientSecret:e.clientSecret||"-",UserID:""})});if(!d.ok){let a=await d.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Trae token",{status:d.status,error:a}),null}let g=await d.json(),h=g?.Result||g?.result||g,i=h?.AccessToken||h?.accessToken;if(!i)return c?.error?.("TOKEN_REFRESH","Trae refresh returned no AccessToken",{payload:g}),null;let j=h?.RefreshToken||h?.refreshToken||a,k=h?.ExpiresAt||h?.expiresAt;if("number"==typeof k)b=Math.max(1,k-Math.floor(Date.now()/1e3));else if("string"==typeof k){let a=new Date(k).getTime()-Date.now();b=a>0?Math.floor(a/1e3):void 0}return c?.info?.("TOKEN_REFRESH","Successfully refreshed Trae token",{hasNewAccessToken:!!i,hasNewRefreshToken:j!==a,expiresIn:b}),{accessToken:i,refreshToken:j,expiresIn:b}}catch(a){return c?.error?.("TOKEN_REFRESH",`Error refreshing Trae token: ${a.message}`),null}},c):(c?.warn?.("TOKEN_REFRESH","No Trae exchangeTokenUrl configured"),null)}async function A(a,b){return b?.info?.("TOKEN_REFRESH","windsurf: apiKey is long-lived (no refresh_token flow) — skipping"),null}let B=3e5;function C(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 D(a){return e.Wu[a]?e.Wu[a]:"kimi-coding"===a&&e.Wu.kimi?e.Wu.kimi:B}function E(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 F=new Map;async function G(a,b){let d=a.client_email,f=F.get(d);if(f&&f.expiresAt-Date.now()>3e5)return{accessToken:f.token,expiresAt:f.expiresAt};try{let{SignJWT:f,importPKCS8:g}=await Promise.all([c.e(8292),c.e(1455)]).then(c.bind(c,71455));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let h=await g(a.private_key.replace(/\\n/g,"\n"),"RS256"),i=Math.floor(Date.now()/1e3),j=await new f({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience(e.NA.google.token).setIssuedAt(i).setExpirationTime(i+3600).sign(h),k=await fetch(e.NA.google.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:j})});if(!k.ok){let a=await k.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:l,expires_in:m}=await k.json(),n=Date.now()+(m??3600)*1e3;return F.set(d,{token:l,expiresAt:n}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:l,expiresAt:n}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}function H(a,b){let c=E(a.apiKey);return c?G(c,b):null}let I={"gemini-cli":(a,b)=>q(a.refreshToken,d.xq["gemini-cli"].clientId,d.xq["gemini-cli"].clientSecret,b),antigravity:(a,b)=>q(a.refreshToken,d.xq.antigravity.clientId,d.xq.antigravity.clientSecret,b),claude:(a,b)=>p(a.refreshToken,b),codex:(a,b)=>r(a.refreshToken,b),iflow:(a,b)=>u(a.refreshToken,b),github:(a,b)=>v(a.refreshToken,b),kiro:(a,b)=>t(a.refreshToken,a.providerSpecificData,b),xai:(a,b)=>k(a.refreshToken,b),"grok-cli":(a,b)=>k(a.refreshToken,b),gcli:(a,b)=>k(a.refreshToken,b),"codebuddy-cn":(a,b)=>x(a.refreshToken,b),"codebuddy-intl":(a,b)=>y(a.refreshToken,b),trae:(a,b)=>z(a.refreshToken,a,b),cline:(a,b)=>o(a.refreshToken,b),clinepass:(a,b)=>o(a.refreshToken,b),zed:()=>null,windsurf:(a,b)=>A(a,b),kimi:(a,b)=>n(a.refreshToken,a,b),"kimi-coding":(a,b)=>n(a.refreshToken,a,b),vertex:H,"vertex-partner":H};async function J(a,b,c){if(!b.refreshToken)return null;let d=I[a];return d?d(b,c):m(a,b.refreshToken,b,c)}async function K(a,b=3,c=null){for(let d=0;d<b;d++){if(d>0){let a=1e3*d;c?.debug?.("TOKEN_REFRESH",`Retry ${d}/${b} after ${a}ms`),await new Promise(b=>setTimeout(b,a))}try{let b=await a();if(b)return b}catch(a){c?.warn?.("TOKEN_REFRESH",`Attempt ${d+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");let f=b.hostname.toLowerCase();if(!d.has(f))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}}}},93943:(a,b,c)=>{c.d(b,{Dz:()=>i,Vq:()=>l,fp:()=>j});var d=c(8521),e=c(26070);let f=e.sr.codex?.maxRefreshAgeMs,g=new Map;function h(a){if(null==a||""===a)return null;if("number"==typeof a)return a<1e12?1e3*a:a;let b=new Date(a).getTime();return Number.isFinite(b)?b:null}function i(a){return h(a?.expiresAt??a?.tokenExpiresAt)}function j(a,b,c=Date.now()){if(!b)return!1;let g=i(b);if(null!==g&&g-c<(0,d.Og)(a))return!0;let k=e.sr[a]?.maxRefreshAgeMs;return!!(k&&b.refreshToken&&function(a,b=Date.now(),c=f){let d=h(a?.lastRefreshAt??a?.lastRefresh??a?.providerSpecificData?.lastRefreshAt);return!d||b-d>=c}(b,c,k))}async function k(a,b,c){let d,e=(d=b?.connectionId||b?.id||b?.email||b?.name||b?.refreshToken?.slice?.(-16)||"default",`${a}:${d}`),f=g.get(e);if(f)return f;let h=Promise.resolve().then(c).finally(()=>{g.delete(e)});return g.set(e,h),h}async function l(a,b,c){return b?k(a,b,async()=>{let f=await (0,d.$B)(a,b,c);return function(a,b,c,f=Date.now()){var g,h;if(!c)return null;if((0,d.jT)(c))return c;let i={},j=new Date(f).toISOString();c.accessToken&&(i.accessToken=c.accessToken),c.apiKey&&(i.apiKey=c.apiKey),c.token&&(i.token=c.token);let k=c.refreshToken??b?.refreshToken;k&&(i.refreshToken=k);let l=c.idToken??b?.idToken;return l&&(i.idToken=l),c.expiresIn?(i.expiresIn=c.expiresIn,i.expiresAt=function(a,b=Date.now()){return a?new Date(b+1e3*a).toISOString():null}(c.expiresIn,f)):c.expiresAt&&(i.expiresAt=c.expiresAt),c.projectId&&(i.projectId=c.projectId),c.providerSpecificData&&(g=b?.providerSpecificData,i.providerSpecificData=(h=c.providerSpecificData)&&"object"==typeof h?{...g||{},...h}:g),c.copilotToken&&(i.copilotToken=c.copilotToken),c.copilotTokenExpiresAt&&(i.copilotTokenExpiresAt=c.copilotTokenExpiresAt),(e.sr[a]?.trackRefreshAt||i.accessToken||i.apiKey||i.token||i.refreshToken||i.copilotToken)&&(i.lastRefreshAt=c.lastRefreshAt||j),i}(a,b,f)}):null}}};
|
|
1
|
+
"use strict";exports.id=3943,exports.ids=[3943],exports.modules={8521:(a,b,c)=>{c.d(b,{oD:()=>D,Og:()=>F,jT:()=>E,Sc:()=>G,Wm:()=>r,jR:()=>w,I9:()=>q,Ql:()=>t,rE:()=>C,$B:()=>L,pb:()=>I,qZ:()=>M});var d=c(35024),e=c(75924),f=c(39609);let g=new Map;async function h(a,b,c,d){if(!b)return c();let e=`${a}:${b}`,f=g.get(e);if(f){if(f.promise)return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),f.promise;if(f.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),f.result;g.delete(e)}let h=(async()=>{try{let a=await c();return g.set(e,{result:a,expiresAt:Date.now()+1e4}),a}catch(a){throw g.delete(e),a}})();return g.set(e,{promise:h}),h}var i=c(18080);let j=null;async function k(a,b){return a?h("xai",a,async()=>{try{j||(j=new(await Promise.all([c.e(5615),c.e(4730)]).then(c.bind(c,84730))).XaiService);let b=await j.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 refresh failed: ${c?.message||c}`);let a=String(c?.message||"");if(a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant"};return null}},b):null}let l={claude:{bodyFormat:"json",includeClientSecret:!1,url:()=>e.NA.anthropic.token,dedupKey:"claude"},iflow:{url:()=>e.NA.iflow.token,dedupKey:"iflow",extraHeaders:(a,b)=>({Authorization:`Basic ${btoa(`${b.clientId}:${b.clientSecret}`)}`})},github:{url:()=>e.NA.github.token,dedupKey:"github",includeClientSecret:a=>!!a?.clientSecret},kimi:{dedupKey:"kimi",extraHeaders:a=>(0,e.buildKimiHeaders)(a?.providerSpecificData?.deviceId)}};async function m(a,b,c,e){let f=d.xq[a],g=l[a]||{},i=function(a,b,c){if(c?.url)try{return c.url()}catch{}return b?.refreshUrl||d.sr[a]?.tokenUrl||null}(a,f,g);return f&&i?b?h(g.dedupKey||a,b,async()=>{try{let d,h,j,{format:k,body:l}=(d=g?.bodyFormat==="json"?"json":"form",h=g?.includeClientSecret===void 0||("function"==typeof g.includeClientSecret?g.includeClientSecret(f):g.includeClientSecret),j={grant_type:"refresh_token",refresh_token:b,client_id:f.clientId},(h&&f.clientSecret&&(j.client_secret=f.clientSecret),"json"===d)?{format:"json",body:JSON.stringify(j)}:{format:"form",body:new URLSearchParams(j)}),m={"Content-Type":"json"===k?"application/json":"application/x-www-form-urlencoded",Accept:"application/json",...g.extraHeaders&&g.extraHeaders(c,f)||{}},n=await fetch(i,{method:"POST",headers:m,body:l});if(!n.ok){let b=await n.text();return e?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:n.status,error:b}),null}let o=await n.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!o.access_token,hasNewRefreshToken:!!o.refresh_token,expiresIn:o.expires_in}),{accessToken:o.access_token,refreshToken:o.refresh_token||b,expiresIn:o.expires_in,...g.parse&&g.parse(o)||{}}}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 n(a,b,c){return m("kimi",a,b,c)}async function o(a,b){return a?h("cline",a,async()=>{try{let c=await fetch(d.xq.cline?.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a,grantType:"refresh_token",clientType:"extension"})});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Cline token",{status:c.status,error:a}),null}let e=await c.json(),f=e?.data||e;if(!f?.accessToken)return null;let g=f.expiresAt?Math.max(1,Math.floor((new Date(f.expiresAt).getTime()-Date.now())/1e3)):f.expiresIn||f.expires_in||3600;return{accessToken:f.accessToken,refreshToken:f.refreshToken||a,expiresIn:g}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing Cline token: ${a.message}`),null}},b):null}async function p(a,b){return m("claude",a,{},b)}async function q(a,b,c,d){return a?h(`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 d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:f.status,error:a}),null}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 r(a,b){return a?h("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(),d=function(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error?.code||c?.error||c?.error_code||"",e=c?.error_description||c?.message||a||"",f=`${d} ${e}`.toLowerCase();return{status:b,code:d,description:e,permanent:["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_grant"].some(a=>f.includes(a))}}(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-auth required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:c.status,error:a,code:d.code,permanent:d.permanent}),null}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 s(a,b,d){if(a?.profileArn)return{};let e=d?.trim?.()||null;if(!e){let{fetchKiroProfileArn:a}=await Promise.all([c.e(7774),c.e(5433),c.e(8920),c.e(24),c.e(2329),c.e(3225),c.e(6922),c.e(5215),c.e(9696),c.e(7552),c.e(8499),c.e(6249),c.e(5330),c.e(8895),c.e(4049),c.e(3535)]).then(c.bind(c,74177));e=await a(b)}return e?{providerSpecificData:{profileArn:e}}:{}}async function t(a,b,c,e=null){return a?h("kiro",a,async()=>{let g=b?.authMethod,h=b?.clientId,j=b?.clientSecret,k=b?.region;if("external_idp"===g){let d;try{d=(0,i.uo)(a,b)}catch(a){return c?.warn?.("TOKEN_REFRESH",`Invalid Kiro external_idp refresh config: ${a.message}`),null}let g=await (0,f.proxyAwareFetch)(d.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:d.body},e);if(!g.ok){let a=await g.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro external_idp token",{status:g.status,error:a}),null}let h=await g.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro external_idp token",{hasNewAccessToken:!!h.access_token,hasNewRefreshToken:!!h.refresh_token,expiresIn:h.expires_in}),{accessToken:h.access_token,refreshToken:h.refresh_token||a,expiresIn:h.expires_in,providerSpecificData:d.providerSpecificData}}if(h&&j){let d="idc"===g&&k?`https://oidc.${k}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",i=await (0,f.proxyAwareFetch)(d,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:h,clientSecret:j,refreshToken:a,grantType:"refresh_token"})},e);if(!i.ok){let a=await i.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:i.status,error:a}),null}let l=await i.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!l.accessToken,expiresIn:l.expiresIn}),{accessToken:l.accessToken,refreshToken:l.refreshToken||a,expiresIn:l.expiresIn,...await s(b,l.accessToken,l.profileArn)}}let l=await (0,f.proxyAwareFetch)(d.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a})},e);if(!l.ok){let a=await l.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:l.status,error:a}),null}let m=await l.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!m.accessToken,expiresIn:m.expiresIn}),{accessToken:m.accessToken,refreshToken:m.refreshToken||a,expiresIn:m.expiresIn,...await s(b,m.accessToken,m.profileArn)}},c):null}async function u(a,b){return m("iflow",a,{},b)}async function v(a,b){return m("github",a,{},b)}async function w(a,b){return a?h("copilot",a,async()=>{try{let c=await fetch(d.sr.github?.copilotTokenUrl,{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){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:c.status,error:a}),null}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!f.token,expiresAt:f.expires_at}),{token:f.token,expiresAt:f.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function x(a,b){return a?h("codebuddy-cn",a,async()=>{let c=d.sr["codebuddy-cn"]||{},e=await fetch(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!e.ok){let a=await e.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy token",{status:e.status,error:a}),null}let f=await e.json();return 0===f.code&&f.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy token refresh returned no token",{code:f.code,msg:f.msg}),null)},b):null}async function y(a,b){return a?h("codebuddy-intl",a,async()=>{let c=d.sr["codebuddy-intl"]||{},e=await fetch(c.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":c.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!e.ok){let a=await e.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh CodeBuddy intl token",{status:e.status,error:a}),null}let f=await e.json();return 0===f.code&&f.data?.accessToken?(b?.info?.("TOKEN_REFRESH","Successfully refreshed CodeBuddy intl token",{hasNewAccessToken:!!f.data.accessToken,hasNewRefreshToken:!!f.data.refreshToken,expiresIn:f.data.expiresIn}),{accessToken:f.data.accessToken,refreshToken:f.data.refreshToken||a,expiresIn:f.data.expiresIn}):(b?.error?.("TOKEN_REFRESH","CodeBuddy intl token refresh returned no token",{code:f.code,msg:f.msg}),null)},b):null}async function z(a,b,c){if(!a)return null;let e=d.sr.trae||{},f=e.exchangeTokenUrl||e.tokenUrl;return f?h("trae",a,async()=>{try{let b,d=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"Trae/1.0.0 antigravity-cockpit-tools"},body:JSON.stringify({ClientID:e.clientId||"ono9krqynydwx5",RefreshToken:a,ClientSecret:e.clientSecret||"-",UserID:""})});if(!d.ok){let a=await d.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Trae token",{status:d.status,error:a}),null}let g=await d.json(),h=g?.Result||g?.result||g,i=h?.AccessToken||h?.accessToken;if(!i)return c?.error?.("TOKEN_REFRESH","Trae refresh returned no AccessToken",{payload:g}),null;let j=h?.RefreshToken||h?.refreshToken||a,k=h?.ExpiresAt||h?.expiresAt;if("number"==typeof k)b=Math.max(1,k-Math.floor(Date.now()/1e3));else if("string"==typeof k){let a=new Date(k).getTime()-Date.now();b=a>0?Math.floor(a/1e3):void 0}return c?.info?.("TOKEN_REFRESH","Successfully refreshed Trae token",{hasNewAccessToken:!!i,hasNewRefreshToken:j!==a,expiresIn:b}),{accessToken:i,refreshToken:j,expiresIn:b}}catch(a){return c?.error?.("TOKEN_REFRESH",`Error refreshing Trae token: ${a.message}`),null}},c):(c?.warn?.("TOKEN_REFRESH","No Trae exchangeTokenUrl configured"),null)}async function A(a,b){return b?.info?.("TOKEN_REFRESH","windsurf: apiKey is long-lived (no refresh_token flow) — skipping"),null}let B={"minimax-code":"https://account.minimax.cn/oauth2/token","minimax-code-global":"https://account.minimax.io/oauth2/token"};async function C(a,b,c){let d=B[a];return d&&b?h(a,b,async()=>{try{let e=await fetch(d,{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:"mcode-public",scope:"agent.default",audience:"agent-backend"}).toString(),signal:AbortSignal.timeout(3e4)}),f=await e.json().catch(()=>null);if(!e.ok||f&&"string"==typeof f.error&&f.error){let b=f?.error||`HTTP ${e.status}`;if(400===e.status&&f?.error==="invalid_grant")return c?.warn?.("TOKEN_REFRESH",`MiniMax refresh token spent/rejected (${a}) — sign-in gone`),{error:"invalid_grant"};return c?.error?.("TOKEN_REFRESH",`MiniMax token refresh failed (${a})`,{status:e.status,error:b}),null}if(!f?.access_token)return c?.error?.("TOKEN_REFRESH",`MiniMax refresh returned no access_token (${a})`),null;return{accessToken:f.access_token,refreshToken:f.refresh_token||b,expiresIn:f.expires_in}}catch(b){return c?.error?.("TOKEN_REFRESH",`Error refreshing MiniMax token (${a}): ${b.message}`),null}},c):null}let D=3e5;function E(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 F(a){return e.Wu[a]?e.Wu[a]:"kimi-coding"===a&&e.Wu.kimi?e.Wu.kimi:D}function G(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 H=new Map;async function I(a,b){let d=a.client_email,f=H.get(d);if(f&&f.expiresAt-Date.now()>3e5)return{accessToken:f.token,expiresAt:f.expiresAt};try{let{SignJWT:f,importPKCS8:g}=await Promise.all([c.e(8292),c.e(1455)]).then(c.bind(c,71455));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let h=await g(a.private_key.replace(/\\n/g,"\n"),"RS256"),i=Math.floor(Date.now()/1e3),j=await new f({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience(e.NA.google.token).setIssuedAt(i).setExpirationTime(i+3600).sign(h),k=await fetch(e.NA.google.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:j})});if(!k.ok){let a=await k.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:l,expires_in:m}=await k.json(),n=Date.now()+(m??3600)*1e3;return H.set(d,{token:l,expiresAt:n}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:l,expiresAt:n}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}function J(a,b){let c=G(a.apiKey);return c?I(c,b):null}let K={"gemini-cli":(a,b)=>q(a.refreshToken,d.xq["gemini-cli"].clientId,d.xq["gemini-cli"].clientSecret,b),antigravity:(a,b)=>q(a.refreshToken,d.xq.antigravity.clientId,d.xq.antigravity.clientSecret,b),claude:(a,b)=>p(a.refreshToken,b),codex:(a,b)=>r(a.refreshToken,b),iflow:(a,b)=>u(a.refreshToken,b),github:(a,b)=>v(a.refreshToken,b),kiro:(a,b)=>t(a.refreshToken,a.providerSpecificData,b),xai:(a,b)=>k(a.refreshToken,b),"grok-cli":(a,b)=>k(a.refreshToken,b),gcli:(a,b)=>k(a.refreshToken,b),"codebuddy-cn":(a,b)=>x(a.refreshToken,b),"codebuddy-intl":(a,b)=>y(a.refreshToken,b),trae:(a,b)=>z(a.refreshToken,a,b),cline:(a,b)=>o(a.refreshToken,b),clinepass:(a,b)=>o(a.refreshToken,b),zed:()=>null,windsurf:(a,b)=>A(a,b),kimi:(a,b)=>n(a.refreshToken,a,b),"kimi-coding":(a,b)=>n(a.refreshToken,a,b),"minimax-code":(a,b)=>C("minimax-code",a.refreshToken,b),"minimax-code-global":(a,b)=>C("minimax-code-global",a.refreshToken,b),vertex:J,"vertex-partner":J};async function L(a,b,c){if(!b.refreshToken)return null;let d=K[a];return d?d(b,c):m(a,b.refreshToken,b,c)}async function M(a,b=3,c=null){for(let d=0;d<b;d++){if(d>0){let a=1e3*d;c?.debug?.("TOKEN_REFRESH",`Retry ${d}/${b} after ${a}ms`),await new Promise(b=>setTimeout(b,a))}try{let b=await a();if(b)return b}catch(a){c?.warn?.("TOKEN_REFRESH",`Attempt ${d+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");let f=b.hostname.toLowerCase();if(!d.has(f))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}}}},93943:(a,b,c)=>{c.d(b,{Dz:()=>i,Vq:()=>l,fp:()=>j});var d=c(8521),e=c(26070);let f=e.sr.codex?.maxRefreshAgeMs,g=new Map;function h(a){if(null==a||""===a)return null;if("number"==typeof a)return a<1e12?1e3*a:a;let b=new Date(a).getTime();return Number.isFinite(b)?b:null}function i(a){return h(a?.expiresAt??a?.tokenExpiresAt)}function j(a,b,c=Date.now()){if(!b)return!1;let g=i(b);if(null!==g&&g-c<(0,d.Og)(a))return!0;let k=e.sr[a]?.maxRefreshAgeMs;return!!(k&&b.refreshToken&&function(a,b=Date.now(),c=f){let d=h(a?.lastRefreshAt??a?.lastRefresh??a?.providerSpecificData?.lastRefreshAt);return!d||b-d>=c}(b,c,k))}async function k(a,b,c){let d,e=(d=b?.connectionId||b?.id||b?.email||b?.name||b?.refreshToken?.slice?.(-16)||"default",`${a}:${d}`),f=g.get(e);if(f)return f;let h=Promise.resolve().then(c).finally(()=>{g.delete(e)});return g.set(e,h),h}async function l(a,b,c){return b?k(a,b,async()=>{let f=await (0,d.$B)(a,b,c);return function(a,b,c,f=Date.now()){var g,h;if(!c)return null;if((0,d.jT)(c))return c;let i={},j=new Date(f).toISOString();c.accessToken&&(i.accessToken=c.accessToken),c.apiKey&&(i.apiKey=c.apiKey),c.token&&(i.token=c.token);let k=c.refreshToken??b?.refreshToken;k&&(i.refreshToken=k);let l=c.idToken??b?.idToken;return l&&(i.idToken=l),c.expiresIn?(i.expiresIn=c.expiresIn,i.expiresAt=function(a,b=Date.now()){return a?new Date(b+1e3*a).toISOString():null}(c.expiresIn,f)):c.expiresAt&&(i.expiresAt=c.expiresAt),c.projectId&&(i.projectId=c.projectId),c.providerSpecificData&&(g=b?.providerSpecificData,i.providerSpecificData=(h=c.providerSpecificData)&&"object"==typeof h?{...g||{},...h}:g),c.copilotToken&&(i.copilotToken=c.copilotToken),c.copilotTokenExpiresAt&&(i.copilotTokenExpiresAt=c.copilotTokenExpiresAt),(e.sr[a]?.trackRefreshAt||i.accessToken||i.apiKey||i.token||i.refreshToken||i.copilotToken)&&(i.lastRefreshAt=c.lastRefreshAt||j),i}(a,b,f)}):null}}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=3966,exports.ids=[3966],exports.modules={83966:(a,b,c)=>{c.d(b,{dM:()=>d});let d={claude:{id:"claude",name:"Claude Code",image:"/providers/claude.png",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",fableModel:"ANTHROPIC_DEFAULT_FABLE_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","fable","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"fable",name:"Claude Fable",alias:"fable",envKey:"ANTHROPIC_DEFAULT_FABLE_MODEL",defaultValue:"cc/claude-fable-5"},{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-5"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-5"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},codex:{id:"codex",name:"OpenAI Codex CLI / App",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},copilot:{id:"copilot",name:"GitHub Copilot",image:"/providers/copilot.png",color:"#1F6FEB",description:"GitHub Copilot in VS Code via 9Router extension",configType:"guide",docsUrl:"https://marketplace.visualstudio.com/items?itemName=hotrungnhan.9router-for-github-copilot",guideSteps:[{step:1,title:"Install Extension",desc:"In VS Code, open Extensions (Ctrl+Shift+X or Cmd+Shift+X), search for '9Router for Github Copilot' and click Install."},{step:2,title:"Configure Server",desc:"Press Cmd+Shift+P (or Ctrl+Shift+P), run '9Router: Configure Server', then enter your Server URL and API Key:",value:"{{baseUrl}}",copyable:!0},{step:3,title:"Select Model in Copilot Chat",desc:"Open Copilot Chat, click the model picker at the bottom → 'Manage Models...' → check the 9Router models to use."}]},opencode:{id:"opencode",name:"OpenCode",image:"/providers/opencode.png",color:"#E87040",description:"OpenCode AI Terminal Assistant",configType:"custom"},cowork:{id:"cowork",name:"Claude Cowork",image:"/providers/claude.png",color:"#D97757",description:"Claude Desktop Cowork (third-party inference)",configType:"custom"},hermes:{id:"hermes",name:"Hermes Agent",image:"/providers/hermes.png",color:"#8B5CF6",description:"Nous Research self-improving AI agent",configType:"custom",roles:[{id:"delegation",label:"Delegation (subagents)"},{id:"vision",label:"Vision"},{id:"
|
|
1
|
+
"use strict";exports.id=3966,exports.ids=[3966],exports.modules={83966:(a,b,c)=>{c.d(b,{dM:()=>d});let d={claude:{id:"claude",name:"Claude Code",image:"/providers/claude.png",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",fableModel:"ANTHROPIC_DEFAULT_FABLE_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","fable","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"fable",name:"Claude Fable",alias:"fable",envKey:"ANTHROPIC_DEFAULT_FABLE_MODEL",defaultValue:"cc/claude-fable-5"},{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-5"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-5"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},codex:{id:"codex",name:"OpenAI Codex CLI / App",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},copilot:{id:"copilot",name:"GitHub Copilot",image:"/providers/copilot.png",color:"#1F6FEB",description:"GitHub Copilot in VS Code via 9Router extension",configType:"guide",docsUrl:"https://marketplace.visualstudio.com/items?itemName=hotrungnhan.9router-for-github-copilot",guideSteps:[{step:1,title:"Install Extension",desc:"In VS Code, open Extensions (Ctrl+Shift+X or Cmd+Shift+X), search for '9Router for Github Copilot' and click Install."},{step:2,title:"Configure Server",desc:"Press Cmd+Shift+P (or Ctrl+Shift+P), run '9Router: Configure Server', then enter your Server URL and API Key:",value:"{{baseUrl}}",copyable:!0},{step:3,title:"Select Model in Copilot Chat",desc:"Open Copilot Chat, click the model picker at the bottom → 'Manage Models...' → check the 9Router models to use."}]},opencode:{id:"opencode",name:"OpenCode",image:"/providers/opencode.png",color:"#E87040",description:"OpenCode AI Terminal Assistant",configType:"custom"},cowork:{id:"cowork",name:"Claude Cowork",image:"/providers/claude.png",color:"#D97757",description:"Claude Desktop Cowork (third-party inference)",configType:"custom"},hermes:{id:"hermes",name:"Hermes Agent",image:"/providers/hermes.png",color:"#8B5CF6",description:"Nous Research self-improving AI agent",configType:"custom",roles:[{id:"delegation",label:"Delegation (subagents)"},{id:"vision",label:"Vision"},{id:"compression",label:"Compression"},{id:"title_generation",label:"Title Generation"},{id:"approval",label:"Approval"},{id:"skills_hub",label:"Skills Hub"},{id:"mcp",label:"MCP"},{id:"review",label:"Review (/review subagent)"},{id:"memory_query_rewrite",label:"Memory Query Rewrite"},{id:"background_review",label:"Background Review"},{id:"curator",label:"Curator"},{id:"monitor",label:"Monitor"},{id:"tts_audio_tags",label:"TTS Audio Tags"},{id:"triage_specifier",label:"Triage Specifier"},{id:"kanban_decomposer",label:"Kanban Decomposer"},{id:"profile_describer",label:"Profile Describer"},{id:"goal_judge",label:"Goal Judge"}]},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresExternalUrl:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Tunnel or Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#5B9BD5",description:"Cline AI Coding Assistant",configType:"custom"},kilo:{id:"kilo",name:"Kilo Code",image:"/providers/kilocode.png",color:"#FF6B6B",description:"Kilo Code AI Assistant",configType:"custom"},roo:{id:"roo",name:"Roo",image:"/providers/roo.png",color:"#FF6B6B",description:"Roo AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Roo Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
|
|
2
2
|
"apiBase": "{{baseUrl}}",
|
|
3
3
|
"title": "{{model}}",
|
|
4
4
|
"model": "{{model}}",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=4049,exports.ids=[4049],exports.modules={220:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.LT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b=await fetch(`${d.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},e="";try{let b=await fetch("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:(0,d.cD)(),mode:1})});if(b.ok){let a=await b.json();e=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})}},3198:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(55511),e=c.n(d);let f={config:c(92990).aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,75924)),d=e().randomUUID(),f={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...b(d)},g=await fetch(a.deviceCodeUrl,{method:"POST",headers:f,body:new URLSearchParams({client_id:a.clientId})});if(!g.ok){let a=await g.text();throw Error(`Device code request failed: ${a}`)}let h=await g.json(),i=a.authorizeDeviceUrl||"https://www.kimi.com/code/authorize_device";return{device_code:h.device_code,user_code:h.user_code,verification_uri:h.verification_uri||i,verification_uri_complete:h.verification_uri_complete||`${i}?user_code=${h.user_code}`,expires_in:h.expires_in,interval:h.interval||5,_kimiDeviceId:d}},pollToken:async(a,b,d,e)=>{let f,{buildKimiHeaders:g}=await Promise.resolve().then(c.bind(c,75924)),h=e?._kimiDeviceId,i={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...g(h)},j=await fetch(a.tokenUrl,{method:"POST",headers:i,body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{f=await j.json()}catch{f={error:"invalid_response",error_description:"non-json token response"}}return"authorization_pending"===f.error||"slow_down"===f.error?{ok:!0,data:f}:(f.access_token&&h&&(f._kimiDeviceId=h),{ok:j.ok||!!f.access_token||!!f.error,data:f})},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{authMethod:"device_code",...a._kimiDeviceId?{deviceId:a._kimiDeviceId}:{}}})}},5867:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e=(0,c(67377).N)(d.t3)},12557:(a,b,c)=>{c.d(b,{Bl:()=>j,Qo:()=>f,S5:()=>l,hk:()=>e,kJ:()=>k});var d=c(3662);function e(a,b,c=0,f=null){let g=b?("string"==typeof b?b:JSON.stringify(b)).toLowerCase():"";for(let b of d.t2)if((!b.provider||b.provider===f)&&(b.text&&g&&g.includes(b.text)||b.status&&b.status===a)){if(b.backoff){let a=Math.min(c+1,d.EQ.maxLevel);return{shouldFallback:!0,cooldownMs:function(a=0){let b=Math.max(0,a-1);return Math.min(d.EQ.base*Math.pow(2,b),d.EQ.max)}(a),newBackoffLevel:a}}return{shouldFallback:!0,cooldownMs:b.cooldownMs}}return a>=400&&a<500&&401!==a&&402!==a&&403!==a&&429!==a?{shouldFallback:!1,cooldownMs:0}:{shouldFallback:!0,cooldownMs:d.wf}}function f(a){if(!a)return"";let b=new Date(a).getTime()-Date.now();if(b<=0)return"reset after 0s";let c=Math.ceil(b/1e3),d=Math.floor(c/3600),e=Math.floor(c%3600/60),f=c%60,g=[];return d>0&&g.push(`${d}h`),e>0&&g.push(`${e}m`),(f>0||0===g.length)&&g.push(`${f}s`),`reset after ${g.join(" ")}`}let g="modelLock_",h=`${g}__all`;function i(a){return a?`${g}${a}`:h}function j(a,b){let c=a[i(b)]||a[h];return!!c&&new Date(c).getTime()>Date.now()}function k(a){if(!a)return null;let b=null,c=Date.now();for(let[d,e]of Object.entries(a)){if(!d.startsWith(g)||!e)continue;let a=new Date(e).getTime();a<=c||(!b||a<b)&&(b=a)}return b?new Date(b).toISOString():null}function l(a,b){return{[i(a)]:new Date(Date.now()+b).toISOString()}}},13342:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(92990),e=c(23358);async function f(a,b,c){let e=`${a.replace(/\/$/,"")}${b}`,f=await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":d.eD.userAgent},body:JSON.stringify(c)}),g=await f.text();if(!f.ok)throw Error(`Windsurf ${b} HTTP ${f.status}: ${g.slice(0,200)}`);try{return JSON.parse(g)}catch{throw Error(`Windsurf ${b} invalid JSON`)}}async function g(a){let b=await f(d.eD.registerApiBaseUrl,d.eD.registerPath,{firebase_id_token:a}),c=(0,e.j)(b,[["apiKey"],["api_key"]]);if(!c)throw Error("Windsurf RegisterUser missing apiKey");return{apiKey:c,apiServerUrl:(0,e.j)(b,[["apiServerUrl"],["api_server_url"]])||d.eD.defaultApiServerUrl,name:(0,e.j)(b,[["name"]])}}async function h(a,b){try{let c=await f(a,d.eD.oneTimeAuthPath,{firebaseIdToken:b}),g=(0,e.j)(c,[["authToken"],["auth_token"]]);if(!g)return{email:null,name:null};let h=await f(a,d.eD.currentUserPath,{authToken:g,includeSubscription:!0}),i=h.user||h;return{email:(0,e.j)(i,[["email"]]),name:(0,e.j)(i,[["name"]])}}catch{return{email:null,name:null}}}let i={config:d.eD,flowType:"authorization_code",callbackPath:d.eD.callbackPath,buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({response_type:"token",client_id:a.clientId,redirect_uri:b,state:c,prompt:"login",redirect_parameters_type:"query",workflow:"onboarding"});return`${a.authBaseUrl}${a.signInPath}?${d.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=String(b||"").trim();if(!(f.includes("?")||f.includes("access_token="))){let b=f.replace(/^Bearer\s+/i,"");if(b.startsWith("sk-ws-"))return{accessToken:b,refreshToken:null,expiresIn:null,apiServerUrl:a.defaultApiServerUrl,firebaseIdToken:null,_authMethod:"imported"};let c=await g(b);return{accessToken:c.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:c.apiServerUrl,firebaseIdToken:b,_authMethod:"imported"}}let{firebaseIdToken:h}=function(a,b){let c=String(a||"").trim(),d=c;c.includes("?")&&(d=c.slice(c.indexOf("?")+1)),c.startsWith("#")&&(d=c.slice(1));let e=Object.fromEntries(new URLSearchParams(d)),f=a=>{for(let b of a){let a=e[b];if(a&&String(a).trim())return String(a).trim()}return null},g=f(["error"]);if(g){let a=f(["error_description"]);throw Error(a?`Windsurf auth failed: ${g} (${a})`:`Windsurf auth failed: ${g}`)}let h=f(["access_token","token"]);if(!h)throw Error("Windsurf callback missing access_token");let i=f(["state"]);if(b&&i&&i!==b)throw Error("Windsurf callback state mismatch");return{firebaseIdToken:h}}(f,e),i=await g(h);return{accessToken:i.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:i.apiServerUrl,firebaseIdToken:h,_authMethod:"oauth"}},postExchange:async a=>a.firebaseIdToken?{userInfo:await h(a.apiServerUrl,a.firebaseIdToken)}:{userInfo:{email:null,name:null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.userInfo?.email||void 0,displayName:b?.userInfo?.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",apiServerUrl:a.apiServerUrl,firebaseIdToken:a.firebaseIdToken}})}},17691:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).Td,flowType:"browser_token",buildAuthUrl:(a,b,c)=>{let d=(a.webAppUrl||"https://app.kimchi.dev").replace(/\/+$/,""),e=new URLSearchParams({callback:b,state:c});return`${d}/cli-auth?${e.toString()}`},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!c)throw Error("Missing Kimchi token");let d=a.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",e=await fetch(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});if(!e.ok)throw Error(`Kimchi token validation failed: ${e.status}`);let f={};if(a.userInfoUrl)try{let b=await fetch(a.userInfoUrl,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});b.ok&&(f=await b.json())}catch{f={}}return{access_token:c,token_type:"Bearer",_kimchiUser:f}},mapTokens:a=>{let b=a._kimchiUser||{},c=b.id?String(b.id):"",d=b.username||"",e=b.email||(c?`kimchi-user-${c}`:null);return{accessToken:a.access_token,refreshToken:null,email:e,displayName:b.name||d||null,providerSpecificData:{authMethod:"browser_token",userId:c,username:d}}}}},18245:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(49804);let f={config:d.RY,flowType:"authorization_code",callbackPath:"/",prepareConfig:async(a,b)=>{let c=Number(b?.nativeAppPort)||d.RY.defaultNativeAppPort,f=(0,e.le)(a,{nativeAppPort:c});return{...a,...f}},buildAuthUrl:(a,b,c)=>a.authUrl,exchangeToken:async(a,b,c,d,f,g)=>{let{userId:h,encryptedAccessToken:i}=(0,e.Q_)(b);return{accessToken:(0,e.Wc)(i,d),userId:h,systemId:g?.systemId||a.systemId}},postExchange:async a=>{let b={accessToken:a.accessToken,providerSpecificData:{userId:a.userId,systemId:a.systemId}},c=null;try{c=await (0,e.qJ)(b,{config:d.RY})}catch{}let f=(0,e.k9)(b,c);return{userInfo:c,organizationId:f,email:c?.email||null,name:c?.name||c?.display_name||null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.email||void 0,displayName:b?.name||void 0,providerSpecificData:{authMethod:"oauth",userId:a.userId,systemId:a.systemId,organizationId:b?.organizationId||""}})}},18941:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).lB,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Cline token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})}},20386:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990);let e="1.0.0",f={config:d.sA,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","x-api-version":e},body:new URLSearchParams({client_id:a.clientId})});if(!b.ok){let a=await b.text();throw Error(`Muse Code device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","x-api-version":e},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let f=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||f,data:c}},postExchange:async a=>{let b,c;for(let c=0;(429===(b=await fetch("https://api.meta.ai/muse-code/key",{method:"POST",headers:{Accept:"application/json",Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","x-api-version":e},body:JSON.stringify({onboard:!0}),redirect:"error"})).status||b.status>=500)&&!(c>=2);c++)await new Promise(a=>setTimeout(a,5e3*(c+1)));let d=await b.text();if(!b.ok){let a=`${b.status} ${d.slice(0,200)}`;try{let b=JSON.parse(d);(b?.title||b?.detail)&&(a=[b.title,b.detail].filter(Boolean).join(": "),b.action_url&&(a+=` — ${b.action_url}`))}catch{}throw Error(`Muse Code key mint failed: ${a}`)}try{c=JSON.parse(d)}catch{throw Error("Muse Code key mint returned invalid JSON")}if(!1===c.is_subs_active)throw Error("Muse Code subscription is inactive — activate it on muse.ai first");let f=c.action_url||c.require_payment_action_url;if(!c.api_key&&(c.require_payment||f))throw Error(`Muse Code subscription required${f?`: ${f}`:""}`);if(!c.api_key)throw Error("Muse Code key response is missing api_key");return{key:c}},mapTokens:(a,b)=>{let c=b?.key||{};return{accessToken:c.api_key,refreshToken:null,expiresIn:null,email:c.user_email?.trim().toLowerCase()||void 0,providerSpecificData:{authMethod:"device_code",oauthAccessToken:a.access_token,subscriptionTier:c.subs_tier_name||null}}}}},23358:(a,b,c)=>{c.d(b,{j:()=>d});function d(a,b){for(let c of b){let b=a;for(let a of c){if(null==b||"object"!=typeof b){b=void 0;break}b=b[a]}if("string"==typeof b&&b.trim())return b.trim();if("number"==typeof b)return String(b)}return null}},24329:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(53129);let f={config:d.DI,flowType:"authorization_code_pkce",fixedPort:d.DI.fixedPort,callbackPath:d.DI.callbackPath,buildAuthUrl:(a,b,c,d)=>{let e=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,...a.extraParams,state:c}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${e}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b=(0,e.YR)(a.id_token),c={accessToken:a.access_token,refreshToken:a.refresh_token,idToken:a.id_token,expiresIn:a.expires_in,lastRefreshAt:new Date().toISOString()},d=b.email||(0,e.J_)(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}}},24336:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(55511),e=c.n(d),f=c(92990),g=c(23358);async function h(a){let b=JSON.stringify({loginTraceID:a,login_trace_id:a}),c="no successful response";for(let a of f.SK.loginGuidanceUrls)try{let d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent},body:b});if(!d.ok){c=`${a} HTTP ${d.status}`;continue}let e=await d.json(),h=(0,g.j)(e,[["Result","LoginHost"],["Result","loginHost"],["Result","LoginURL"],["result","loginHost"],["data","Result","LoginHost"],["data","loginHost"],["LoginHost"],["loginHost"]]);if(h)return h;c=`${a} missing LoginHost`}catch(b){c=`${a} ${b.message}`}throw Error(`Trae GetLoginGuidance failed: ${c}`)}function i(){return[...f.SK.apiOrigins]}async function j(a,b){let c=JSON.stringify({ClientID:f.SK.clientId,RefreshToken:a,ClientSecret:f.SK.clientSecret,UserID:""}),d="no successful response";for(let e of i()){let h=`${e.replace(/\/$/,"")}${f.SK.exchangeTokenPath}`;try{let e,i={Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent};b&&(i["x-cloudide-token"]=b);let j=await fetch(h,{method:"POST",headers:i,body:c}),k=await j.text();if(!j.ok){d=`${h} HTTP ${j.status}`;continue}try{e=JSON.parse(k)}catch{d=`${h} invalid JSON`;continue}let l=(0,g.j)(e,[["Result","AccessToken"],["Result","accessToken"],["result","access_token"],["accessToken"]]);if(!l){let a=(0,g.j)(e,[["message"],["msg"],["error"],["Result","Message"]])||"missing AccessToken";d=`${h} ${a}`;continue}return{accessToken:l,refreshToken:(0,g.j)(e,[["Result","RefreshToken"],["result","refresh_token"],["refreshToken"]])||a,expiresIn:null,expiresAt:(0,g.j)(e,[["Result","ExpiresAt"],["Result","expiresAt"],["result","expires_at"],["expiresAt"]])}}catch(a){d=`${h} ${a.message}`}}throw Error(`Trae ExchangeToken failed: ${d}`)}async function k(a){for(let b of i()){let c=`${b.replace(/\/$/,"")}${f.SK.getUserInfoPath}`;try{let b=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent,"x-cloudide-token":a},body:JSON.stringify({})});if(!b.ok)continue;let d=await b.json();return{email:(0,g.j)(d,[["Result","NonPlainTextEmail"],["Result","Email"],["Result","email"],["email"],["data","email"]]),name:(0,g.j)(d,[["Result","ScreenName"],["Result","Nickname"],["Result","Name"],["result","nickname"],["nickname"],["name"]]),aiRegion:(0,g.j)(d,[["Result","AIRegion"],["Result","aiRegion"],["aiRegion"]]),region:(0,g.j)(d,[["Result","Region"],["Result","region"],["region"]]),tenant:(0,g.j)(d,[["Result","TenantID"],["Result","tenantId"],["tenantId"]]),userId:(0,g.j)(d,[["Result","UserID"],["Result","userId"],["userId"]])}}catch{}}return{email:null,name:null}}let l={config:f.SK,flowType:"authorization_code",callbackPath:f.SK.callbackPath,prepareConfig:async a=>{let b=e().randomUUID(),c=await h(b);return{...a,loginTraceID:b,loginHost:c}},buildAuthUrl:(a,b,c)=>{var d;let g,h,i={plugin_version:f.SK.defaultPluginVersion,machine_id:e().randomUUID(),device_id:f.SK.defaultDeviceId,x_device_brand:"unknown",x_device_type:"unknown",x_os_version:"unknown",x_env:"",x_app_version:f.SK.defaultAppVersion,x_app_type:f.SK.defaultAppType},j=a.loginTraceID||c;return d=a.loginHost,(g=new URL(d.startsWith("http")?d:`https://${d.replace(/^\/+/,"")}`)).pathname=f.SK.authorizationPath,(h=new URLSearchParams).set("login_version","1"),h.set("auth_from","trae"),h.set("login_channel","native_ide"),h.set("plugin_version",i.plugin_version),h.set("auth_type","local"),h.set("client_id",f.SK.clientId),h.set("redirect","0"),h.set("login_trace_id",j),h.set("auth_callback_url",b),h.set("machine_id",i.machine_id),h.set("device_id",i.device_id),h.set("x_device_id",i.device_id),h.set("x_machine_id",i.machine_id),h.set("x_device_brand",i.x_device_brand),h.set("x_device_type",i.x_device_type),h.set("x_os_version",i.x_os_version),h.set("x_env",i.x_env),h.set("x_app_version",i.x_app_version),h.set("x_app_type",i.x_app_type),g.search=h.toString(),g.toString()},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!(/[?=&]/.test(c)&&(c.includes("refreshToken")||c.includes("refresh_token"))))return{accessToken:c.replace(/^(Cloud-IDE-JWT|Bearer)\s+/i,""),refreshToken:null,expiresIn:24*f.SK.tokenLifetimeDays*3600,_authMethod:"imported"};let{refreshToken:d,cloudideToken:e}=function(a){let b=String(a||"").trim(),c=b;b.includes("?")&&(c=b.slice(b.indexOf("?")+1)),b.startsWith("#")&&(c=b.slice(1));let d=Object.fromEntries(new URLSearchParams(c)),e=a=>{for(let b of a){let a=d[b];if(a&&String(a).trim())return String(a).trim()}return null},f=e(["error","error_code","errorCode"]);if(f){let a=e(["error_description","error_desc","message"]);throw Error(a?`Trae auth failed: ${f} (${a})`:`Trae auth failed: ${f}`)}let g=e(["refreshToken","refresh_token","RefreshToken"]);if(!g)throw Error("Trae callback missing refreshToken");let h=e(["loginHost","login_host","LoginHost","host","consoleHost"]);if(!h)throw Error("Trae callback missing loginHost");return{refreshToken:g,loginHost:h,cloudideToken:e(["x-cloudide-token","xCloudideToken","accessToken","access_token","token"])}}(c);return{...await j(d,e),_authMethod:"oauth"}},postExchange:async a=>({userInfo:await k(a.accessToken)}),mapTokens:(a,b)=>{let c,d=a.expiresIn||(a.expiresAt?Math.max(60,Number(a.expiresAt)-Math.floor(Date.now()/1e3)):24*f.SK.tokenLifetimeDays*3600),e=b?.userInfo||{},g=e.aiRegion||"US-East";return{accessToken:a.accessToken,refreshToken:a.refreshToken,expiresIn:d,email:e.email||void 0,displayName:e.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",aiRegion:g,region:e.region||g,tenant:e.tenant||"marscode",userId:e.userId||"",scope:"sg"===(c=(g||"").toLowerCase())||c.includes("singapore")?"marscode-sg":"cn"===c||c.includes("cn")||c.includes("china")?"marscode-cn":"marscode-us",webId:"",bizUserId:"",userUniqueId:"",appLanguage:"en",appVersion:f.SK.defaultAppVersion,userRegion:"SG"===g?"SG":"US",userIdentity:"Free"}}}}},34940:(a,b,c)=>{c.d(b,{A:()=>g});var d=c(90737),e=c(92990),f=c(53129);let g={config:e.qp,flowType:"device_code",requestDeviceCode:async a=>{let b=new URLSearchParams({client_id:a.clientId,scope:a.scope});a.referrer&&b.set("referrer",a.referrer);let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":d.hY},body:b});if(!c.ok){let a=await c.text();throw Error(`Grok CLI device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b)=>{let c,e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":d.hY},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await e.json()}catch{c={error:"invalid_response",error_description:await e.text()}}let f=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:e.ok||f,data:c}},postExchange:async a=>{try{let b=await fetch("https://cli-chat-proxy.grok.com/v1/user",{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","User-Agent":d.hY,"x-xai-token-auth":"xai-grok-cli","x-grok-client-version":d.uG}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=(0,f.pG)(a.id_token)||(0,f.J_)(a.access_token)||b?.user?.email||null,d=b?.user?.userId||b?.user?.principalId||null,e=[b?.user?.firstName,b?.user?.lastName].filter(Boolean).join(" ").trim()||null,g=a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null;return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:g,scope:a.scope,email:c||void 0,displayName:e||void 0,providerSpecificData:{authMethod:"device_code",idToken:a.id_token||null,email:c||null,userId:d,hasGrokCodeAccess:b?.user?.hasGrokCodeAccess??null,subscriptionTier:b?.user?.subscriptionTier??null}}}}},35152:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).w1,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`ClinePass token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})}},41902:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).OV,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d)=>{let e=new URLSearchParams({code:"true",client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c});return`${a.authorizeUrl}?${e.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=b,g="";if(f.includes("#")){let a=f.split("#");f=a[0],g=a[1]||""}let h=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({code:f,state:g||e,grant_type:"authorization_code",client_id:a.clientId,redirect_uri:c,code_verifier:d})});if(!h.ok){let a=await h.text();throw Error(`Token exchange failed: ${a}`)}return await h.json()},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope})}},43659:(a,b,c)=>{c.d(b,{A1:()=>h,lR:()=>j,wO:()=>i,xJ:()=>e,yj:()=>f,zL:()=>g});var d=c(3662);function e(a,b){let c=d.LY[a]||(a>=500?{type:"server_error",code:"internal_server_error"}:{type:"invalid_request_error",code:""});return{error:{message:b||d.O[a]||"An error occurred",type:c.type,code:c.code}}}function f(a,b,c=null){return new Response(JSON.stringify(e(a,b)),{status:a,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*",...c}})}async function g(a,b=null){let c="";try{c=await a.text()}catch{c=""}if(b&&"function"==typeof b.parseError)try{let e=b.parseError(a,c);if(e&&"object"==typeof e){let b=e.message||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:e.status||a.status,message:b,resetsAtMs:e.resetsAtMs}}}catch{}let e="";try{let a=JSON.parse(c);e=a.error?.message||a.message||a.error||c}catch{e=c}let f=("string"==typeof e?e:JSON.stringify(e))||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:a.status,message:f}}function h(a,b,c,d=null){return{success:!1,status:a,error:b,resetsAtMs:c,response:f(a,b,d)}}function i(a,b,c,d,e=null){let f=Math.max(Math.ceil((new Date(c).getTime()-Date.now())/1e3),1);return new Response(JSON.stringify({error:{message:`${b} (${d})`}}),{status:a,headers:{...e,"Content-Type":"application/json","retry-after":String(f)}})}function j(a,b,c,d){let e=d||a.code||"FETCH_FAILED",f=a.message||"Unknown error",g=a.cause?.code,h=a.cause?.message,i=g||h?` (cause: ${[g,h].filter(Boolean).join(": ")})`:"";return`[${e}]: ${f}${i}`}},49475:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.Nu,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scopes})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,device_code:b,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});try{c=await d.json()}catch(a){c={error:"invalid_response",error_description:await d.text()}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(d.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":d.Nu.apiVersion,"User-Agent":d.Nu.userAgent}}),c=b.ok?await b.json():{},e=await fetch(d.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":d.Nu.apiVersion,"User-Agent":d.Nu.userAgent}});return{copilotToken:c,userInfo:e.ok?await e.json():{}}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,name:b?.userInfo?.login||b?.userInfo?.name,displayName:b?.userInfo?.name||b?.userInfo?.login,email:b?.userInfo?.email||null,providerSpecificData:{copilotToken:b?.copilotToken?.token,copilotTokenExpiresAt:b?.copilotToken?.expires_at,githubUserId:b?.userInfo?.id,githubLogin:b?.userInfo?.login,githubName:b?.userInfo?.name,githubEmail:b?.userInfo?.email}})}},53129:(a,b,c)=>{function d(a,b){let c,d=String(a||"").trim();if(!d)throw Error(`xai discovery ${b} is empty`);try{c=new URL(d)}catch(a){throw Error(`xai discovery ${b} is invalid: ${a.message}`)}if("https:"!==c.protocol)throw Error(`xai discovery ${b} must use https: ${d}`);let e=c.hostname.toLowerCase().trim();if("x.ai"!==e&&!e.endsWith(".x.ai"))throw Error(`xai discovery ${b} host ${e} is not on x.ai`);return d}function e(a){if(!a||"string"!=typeof a)return;let b=a.split(".");if(3===b.length)try{let a=b[1].replace(/-/g,"+").replace(/_/g,"/"),c=(4-a.length%4)%4,d=Buffer.from(a+"=".repeat(c),"base64").toString("utf8"),e=JSON.parse(d);return e.email||e.preferred_username||e.sub||void 0}catch{return}}function f(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,e=c+"=".repeat(d);return JSON.parse(Buffer.from(e,"base64").toString("utf8"))}catch{return null}}function g(a){let b=f(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function h(a){if(!a)return null;try{let b=await fetch("https://codewhisperer.us-east-1.amazonaws.com/ListAvailableProfiles",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({maxResults:10})});if(!b.ok)return null;let c=await b.json();return c.profiles?.find(a=>a.arn?.trim())?.arn?.trim()||null}catch{return null}}function i(a){let b=f(a);if(!b)return{};let c=b["https://api.openai.com/auth"]||{};return{email:b.email,chatgptAccountId:c.chatgpt_account_id||b.account_id,chatgptPlanType:c.chatgpt_plan_type||b.plan_type}}c.d(b,{J_:()=>g,YR:()=>i,gR:()=>h,js:()=>d,pG:()=>e})},56187:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=new URLSearchParams({client_id:e.clientId||"",redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${g.toString()}`},exchangeToken:async(a,b,c,d,e,f={})=>{let g=f.baseUrl||a.defaultBaseUrl,h=f.clientId||"",i=f.clientSecret||"",j=new URLSearchParams({client_id:h,grant_type:"authorization_code",code:b,redirect_uri:c,code_verifier:d});i&&j.set("client_secret",i);let k=await fetch(`${g}${a.tokenUrlPath}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:j.toString()});if(!k.ok)throw Error(`GitLab token exchange failed: ${await k.text()}`);let l=await k.json(),m=await fetch(`${g}${a.userInfoUrlPath}`,{headers:{Authorization:`Bearer ${l.access_token}`}}),n=m.ok?await m.json():{};return{...l,_user:n,_baseUrl:g,_clientId:h}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,providerSpecificData:{username:a._user?.username||"",email:a._user?.email||a._user?.public_email||"",name:a._user?.name||"",baseUrl:a._baseUrl,clientId:a._clientId,authKind:"oauth"}})}},57247:(a,b,c)=>{c.d(b,{KC:()=>u,OA:()=>q,PROVIDER_MODELS:()=>f.vq,SM:()=>k,Xg:()=>t,cY:()=>v,ez:()=>p,fZ:()=>l,kt:()=>r,ux:()=>o});var d=c(35024),e=c(458),f=c(26070),g=c(99511),h=c(59096),i=c(14170);let j=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function k(a){return f.vq[a]||[]}function l(a){let b=f.vq[a];return b?.[0]?.id||null}let m=new Set(["kr","kiro"]);function n(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!m.has(c))return;let f=(0,g.Kq)(d);if(f!==d)return a.find(a=>a.id===f)}function o(a,b){if(j(a)&&(0,h.nh)(b))return i.h.OPENAI_RESPONSES;let c=f.vq[a];if(!c)return null;let d=n(c,b,a);return d?(0,g.gr)(d):j(a)&&(0,h.i8)(b)?.targetFormat||null}function p(a,b){let c=f.vq[a];if(!c)return null;let d=n(c,b,a);return d?(0,g.ec)(d):j(a)?(0,h.i8)(b)?.supportedFormats||[i.h.OPENAI]:null}function q(a,b){let c=f.vq[a];if(!c)return null;let d=n(c,b,a);return d?.kind||d?.type||null}function r(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",e=d?b.slice(0,c.index).trim():b,g=n(f.vq[a],e,a),i=g?.upstreamModelId||g?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof e&&e.endsWith(h.d5)?e.slice(0,-h.d5.length)+d:e+d}let s=Object.fromEntries(e.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),t=Object.fromEntries(Object.keys(d.xq).map(a=>[a,s[a]||a]));function u(a){let b=t[a]||a;return f.vq[b]||[]}function v(a,b){return(0,g.g5)(n(f.vq[a],b,a))}},66678:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Gj:()=>J,PY:()=>M,Re:()=>K,Su:()=>L,YR:()=>g.YR,gR:()=>g.gR,kP:()=>I,sO:()=>H});var e=c(48895),f=c(13808),g=c(53129),h=c(41902),i=c(24329),j=c(72520),k=c(34940),l=c(20386),m=c(220),n=c(79188),o=c(86725),p=c(67377),q=c(5867),r=c(49475),s=c(93551),t=c(68446),u=c(3198),v=c(67096),w=c(18941),x=c(35152),y=c(56187),z=c(99799),A=c(86857),B=c(17691),C=c(24336),D=c(13342),E=c(18245),F=c(81884),G=a([e]);e=(G.then?(await G)():G)[0];let N={claude:h.A,codex:i.A,xai:j.A,"grok-cli":k.A,muse:l.A,"gemini-cli":m.A,antigravity:n.A,iflow:o.A,qoder:p.A,"qoder-cn":q.A,github:r.A,kiro:s.A,cursor:t.A,kimi:u.A,kilocode:v.A,cline:w.A,clinepass:x.A,gitlab:y.A,"codebuddy-cn":z.A,"codebuddy-intl":A.A,kimchi:B.A,trae:C.A,windsurf:D.A,zed:E.A,glm:F.A};function H(a){let b=N["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}async function I(a,b,c){let d=H(a),e=d.prepareConfig?await d.prepareConfig(d.config,c||{}):d.config,{codeVerifier:g,codeChallenge:h,state:i}=(0,f.lz)(d.pkceVerifierBytes),j=e.loginTraceID||i,k=e.privateKeyVerifier||g;return{authUrl:"device_code"===d.flowType?null:"authorization_code_pkce"===d.flowType?d.buildAuthUrl(e,b,j,h,c||{}):d.buildAuthUrl(e,b,j,void 0,c||{}),state:j,codeVerifier:k,codeChallenge:h,redirectUri:b,flowType:d.flowType,fixedPort:d.fixedPort,callbackPath:d.callbackPath||"/callback",...e.systemId?{systemId:e.systemId}:{}}}async function J(a,b,c,d,e,f){let g=H(a),h=g.prepareConfig?await g.prepareConfig(g.config,f||{}):g.config,i=await g.exchangeToken(h,b,c,d,e,f||{}),j=null;return g.postExchange&&(j=await g.postExchange(i)),g.mapTokens(i,j)}async function K(a,b,c){let d=H(a);if("device_code"!==d.flowType)throw Error(`Provider ${a} does not support device code flow`);return await d.requestDeviceCode(d.config,b,c||{})}async function L(a,b,c,d){let e=H(a);if("device_code"!==e.flowType)throw Error(`Provider ${a} does not support device code flow`);let f=await e.pollToken(e.config,b,c,d);if(f.ok)if(f.data.access_token){let b=null;if(e.postExchange)try{b=await e.postExchange(f.data)}catch(b){return console.warn(`[oauth] ${a} postExchange failed:`,b?.message||b),{success:!1,error:"exchange_failed",errorDescription:b.message,fatal:!0}}let c=e.mapTokens(f.data,b);if("kiro"===a&&!c.providerSpecificData?.profileArn){let a=await (0,g.gR)(c.accessToken);a&&(c.providerSpecificData.profileArn=a)}return{success:!0,tokens:c}}else if("authorization_pending"===f.data.error||"slow_down"===f.data.error)return{success:!1,error:f.data.error,errorDescription:f.data.error_description||f.data.message,pending:"authorization_pending"===f.data.error};else return{success:!1,error:f.data.error||"no_access_token",errorDescription:f.data.error_description||f.data.message||"No access token received"};return{success:!1,error:f.data.error,errorDescription:f.data.error_description}}let O=!1;async function M(){if(!O){O=!0;try{let{getProviderConnections:a,updateProviderConnection:b}=await Promise.resolve().then(c.bind(c,89718));for(let c of(await a()).filter(a=>{if("codex"!==a.provider||"oauth"!==a.authType||!a.idToken)return!1;let b=!!a.email,c=!!a.providerSpecificData?.chatgptAccountId;return!b||!c})){let a=(0,g.YR)(c.idToken);if(!a.email&&!a.chatgptAccountId)continue;let d={};!c.email&&a.email&&(d.email=a.email),(a.chatgptAccountId||a.chatgptPlanType)&&(d.providerSpecificData={...c.providerSpecificData||{},chatgptAccountId:a.chatgptAccountId,chatgptPlanType:a.chatgptPlanType}),Object.keys(d).length&&await b(c.id,d)}}catch(a){O=!1,console.log("backfillCodexEmails failed:",a?.message||a)}}}d()}catch(a){d(a)}})},67096:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).MZ,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.initiateUrl,{method:"POST",headers:{"Content-Type":"application/json"}});if(!b.ok){if(429===b.status)throw Error("Too many pending authorization requests. Please try again later.");let a=await b.text();throw Error(`Device auth initiation failed: ${a}`)}let c=await b.json();return{device_code:c.code,user_code:c.code,verification_uri:c.verificationUrl,verification_uri_complete:c.verificationUrl,expires_in:c.expiresIn||300,interval:3}},pollToken:async(a,b)=>{let c=await fetch(`${a.pollUrlBase}/${b}`);if(202===c.status)return{ok:!1,data:{error:"authorization_pending"}};if(403===c.status)return{ok:!1,data:{error:"access_denied",error_description:"Authorization denied by user"}};if(410===c.status)return{ok:!1,data:{error:"expired_token",error_description:"Authorization code expired"}};if(!c.ok)return{ok:!1,data:{error:"poll_failed",error_description:`Poll failed: ${c.status}`}};let d=await c.json();if("approved"===d.status&&d.token){let b=null;try{let c=await fetch(`${a.apiBaseUrl}/api/profile`,{headers:{Authorization:`Bearer ${d.token}`}});if(c.ok){let a=await c.json();b=a.organizations?.[0]?.id||null}}catch{}return{ok:!0,data:{access_token:d.token,_userEmail:d.userEmail,_orgId:b}}}return{ok:!1,data:{error:"authorization_pending"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:null,expiresIn:null,email:a._userEmail,...a._orgId?{providerSpecificData:{orgId:a._orgId}}:{}})}},67377:(a,b,c)=>{function d(a){return{config:a,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(3546).then(c.bind(c,73546)),d=new b(a).initiateDeviceFlow();return{device_code:d.nonce,user_code:d.nonce.slice(0,8).toUpperCase(),verification_uri:a.loginUrl,verification_uri_complete:d.verificationUriComplete,expires_in:300,interval:2,codeVerifier:d.codeVerifier,_qoderNonce:d.nonce,_qoderMachineId:d.machineId}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(3546).then(c.bind(c,73546)),h=new g(a),i=b||e?._qoderNonce,j=d||e?._qoderVerifier;if(!i||!j)return{ok:!1,data:{error:"invalid_request",error_description:"Missing nonce/verifier"}};try{f=await h.pollDeviceToken({nonce:i,codeVerifier:j})}catch(a){return{ok:!1,data:{error:"poll_failed",error_description:a.message}}}if("pending"===f.status)return{ok:!1,data:{error:"authorization_pending"}};let k=await h.fetchUserInfo(f.accessToken),l=Math.max(86400,Math.floor((f.expireTime-Date.now())/1e3));return{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:l,_qoderUserId:f.userId,_qoderMachineId:e?._qoderMachineId||"",_qoderName:k.name,_qoderEmail:k.email,_qoderOrganizationId:k.organizationId}}},mapTokens:a=>{let b=(a._qoderEmail||"").trim(),c=(a._qoderName||"").trim()||null,d=a._qoderUserId||"",e=b||(d?`qoder-user-${d}`:null);return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,email:e,displayName:c,providerSpecificData:{authMethod:"device",userId:d,machineId:a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}}}c.d(b,{A:()=>e,N:()=>d});let e=d(c(92990).hF)},68446:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})}},72520:(a,b,c)=>{c.d(b,{A:()=>j});var d=c(55511),e=c.n(d),f=c(73159),g=c(53129);let h=null;async function i(){if(h)return h;try{let a=await fetch(f.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return h={authorizeUrl:(0,g.js)(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:(0,g.js)(b.token_endpoint,"token_endpoint")}}}catch{}return h={authorizeUrl:f.oT.authorizeUrl,tokenUrl:f.oT.tokenUrl}}let j={config:f.oT,flowType:"authorization_code_pkce",fixedPort:f.oT.loopbackPort,callbackPath:f.oT.callbackPath,pkceVerifierBytes:f.Ue,prepareConfig:async a=>{let b=await i();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let f=e().randomBytes(16).toString("hex"),g=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c,nonce:f,plan:"generic",referrer:"cli-proxy-api"}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${g}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`xAI token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b={accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope},c=(0,g.pG)(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}}},74177:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{PY:()=>e.PY,Re:()=>e.Re,Su:()=>e.Su,exchangeTokens:()=>e.Gj,extractCodexAccountInfo:()=>e.YR,fetchKiroProfileArn:()=>e.gR,kP:()=>e.kP,sO:()=>e.sO});var e=c(66678),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},79188:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.YT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b={Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","User-Agent":d.YT.loadCodeAssistUserAgent,"x-request-source":"local"},c=(0,d.cD)(),e=await fetch(`${d.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"}}),f=e.ok?await e.json():{},g="",h="legacy-tier";try{let a=await fetch(d.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c})});if(a.ok){let b=await a.json();if(g=b.cloudaicompanionProject?.id||b.cloudaicompanionProject||"",Array.isArray(b.allowedTiers)){for(let a of b.allowedTiers)if(a.isDefault&&a.id){h=a.id.trim();break}}}}catch(a){console.log("Failed to load code assist:",a)}return g&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(d.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:h,metadata:c})});if(a.ok){let b=await a.json();if(!0===b.done)break}}catch(a){break}await new Promise(a=>setTimeout(a,5e3))}})().catch(()=>{}),{userInfo:f,projectId:g}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})}},81884:(a,b,c)=>{c.d(b,{A:()=>k});var d=c(55511),e=c.n(d);async function f(a,b){let c=await g(a,b),d={Authorization:`Bearer ${c}`,"Content-Type":"application/json"},e=function(a){let b=(Array.isArray(a?.organizations)?a.organizations:[]).map(a=>({organization:a,projects:(a?.projects||[]).filter(a=>"2"!==String(a?.projectType??"").trim())})).filter(({organization:a,projects:b})=>!!(a?.organizationId&&b.length));if(!b.length)return null;let c=b.find(({organization:a})=>i(a.organizationName))||b[0],d=c.projects.find(a=>i(a?.projectName))||c.projects[0];return c.organization?.organizationId&&d?.projectId?{organizationId:c.organization.organizationId,projectId:d.projectId}:null}(await h(`${a.apiBaseUrl}/api/biz/customer/getCustomerInfo`,{headers:d},"customer info"));if(!e)throw Error("Unable to resolve Z.ai organization and project for the coding plan");let f=`${a.apiBaseUrl}/api/biz/v1/organization/${e.organizationId}/projects/${e.projectId}/api_keys`,j=await h(f,{headers:d},"api keys")||[],k=Array.isArray(j)?j.find(b=>b?.name===a.planApiKeyName):null;k||(k=await h(f,{method:"POST",headers:d,body:JSON.stringify({name:a.planApiKeyName})},"api key create"));let l=k?.apiKey?.trim();if(!l)throw Error("Z.ai api_keys response is missing apiKey");let m=await h(`${f}/copy/${encodeURIComponent(l)}`,{headers:d},"api key copy"),n=m?.secretKey?.trim();if(!n)throw Error("Z.ai api key copy response is missing secretKey");return{planApiKey:`${l}.${n}`,businessToken:c}}async function g(a,b){let c=await h(a.businessLoginUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:b})},"Z.ai business login"),d=c?.access_token?.trim()||c?.accessToken?.trim();if(!d)throw Error("Z.ai business login response is missing access_token");return d}async function h(a,b,c){let d,e=await fetch(a,b),f=await e.text();if(!e.ok)throw Error(`Z.ai ${c} request failed (HTTP ${e.status}): ${f.slice(0,200)}`);try{d=JSON.parse(f)}catch{throw Error(`Z.ai ${c} response is not valid JSON`)}if(!j(d?.code)||d?.success===!1)throw Error(d?.msg||`Z.ai ${c} returned business error ${d?.code}`);return d?.data??d??null}function i(a){let b=String(a||"").trim().toLowerCase();return b.includes("默认机构")||b.includes("默认项目")||"default"===b}function j(a){return null==a||0===a||200===a||"0"===a||"200"===a}let k={config:c(92990)._0,flowType:"device_code",requestDeviceCode:async a=>{let b=e().randomBytes(32).toString("hex"),c=await fetch(a.cliInitUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${b}`},body:JSON.stringify({provider:a.providerId||"zai"})});if(!c.ok){let a=await c.text();throw Error(`ZCode OAuth init failed: ${a}`)}let d=await c.json();if(!j(d.code)||!d.data)throw Error(d.msg||"ZCode OAuth init returned no data");let f=d.data;if(!f.flow_id||!f.authorize_url)throw Error("ZCode OAuth init response missing flow_id/authorize_url");return{device_code:f.flow_id,verification_uri:f.authorize_url,expires_in:function(a){let b=Number(a);if(!Number.isFinite(b)||b<=0)return null;let c=Math.floor(((b>1e12?b:1e3*b)-Date.now())/1e3);return c>0?c:null}(f.expires_at)??300,interval:f.poll_interval_sec||3,_zcodePollToken:b}},pollToken:async(a,b,c,d)=>{let e=d?._zcodePollToken;if(!e)return{ok:!0,data:{error:"access_denied",error_description:"Missing ZCode poll token — restart the login flow"}};let g=await fetch(`${a.cliPollUrl}/${encodeURIComponent(b)}`,{headers:{Authorization:`Bearer ${e}`}});if(!g.ok)return{ok:!0,data:{error:"access_denied",error_description:`ZCode poll failed (HTTP ${g.status})`}};let h=await g.json();if(!j(h.code))return{ok:!0,data:{error:"access_denied",error_description:h.msg||"ZCode poll failed"}};let i=h.data||{};if("pending"===i.status)return{ok:!0,data:{error:"authorization_pending"}};if("failed"===i.status)return{ok:!0,data:{error:"access_denied",error_description:"ZCode authorization failed or was cancelled"}};if("ready"!==i.status)return{ok:!0,data:{error:"authorization_pending",error_description:`Unknown status: ${i.status}`}};let k=i[a.providerId]||i[i.providerId]||{},l=k.access_token||k.accessToken||i.accessToken||i.access_token;if(!l)return{ok:!0,data:{error:"access_denied",error_description:"ZCode poll response missing access token"}};let{planApiKey:m,businessToken:n}=await f(a,l);return{ok:!0,data:{access_token:m,_zcodeJwtToken:i.token||"",_zaiBusinessToken:n,_zaiRefreshToken:k.refresh_token||k.refreshToken||i.refresh_token||i.refreshToken||"",_zcodeUser:i.user||{}}}},mapTokens:a=>{let b=a._zcodeUser||{},c=b.name||b.email||null;return{accessToken:a.access_token,refreshToken:null,email:b.email||null,...c?{displayName:c}:{},providerSpecificData:{authMethod:"cli_poll",username:b.name||void 0,userId:b.user_id||void 0,zcodeJwtToken:a._zcodeJwtToken||void 0,zaiBusinessToken:a._zaiBusinessToken||void 0,...a._zaiRefreshToken?{zaiRefreshToken:a._zaiRefreshToken}:{}}}}}},86725:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.ZL,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({loginMethod:a.extraParams.loginMethod,type:a.extraParams.type,redirect:b,state:c,client_id:a.clientId});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=Buffer.from(`${a.clientId}:${a.clientSecret}`).toString("base64"),e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${d}`},body:new URLSearchParams({grant_type:"authorization_code",code:b,redirect_uri:c,client_id:a.clientId,client_secret:a.clientSecret})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},postExchange:async a=>{let b=await fetch(`${d.ZL.userInfoUrl}?accessToken=${encodeURIComponent(a.access_token)}`,{headers:{Accept:"application/json"}});if(!b.ok){let a=await b.text();throw Error(`Failed to fetch user info: ${a}`)}let c=await b.json();if(!c.success)throw Error(`User info request failed: ${c.message||"Unknown error"}`);let e=c.data||{};if(!e.apiKey||""===e.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(e.email?.trim()||e.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,apiKey:b?.userInfo?.apiKey,email:b?.userInfo?.email||b?.userInfo?.phone,displayName:b?.userInfo?.nickname||b?.userInfo?.name})}},86857:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).DV,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy Intl state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy Intl state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})}},93551:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(53129);let f={config:d.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let e=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,d.S6)(e);let f=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,g="idc"===c.authMethod?"idc":"builder-id",h=`https://oidc.${e}.amazonaws.com/client/register`,i=`https://oidc.${e}.amazonaws.com/device_authorization`,j=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientName:a.clientName,clientType:a.clientType,scopes:a.scopes,grantTypes:a.grantTypes,issuerUrl:a.issuerUrl})});if(!j.ok){let a=await j.text();throw Error(`Client registration failed: ${a}`)}let k=await j.json(),l=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:k.clientId,clientSecret:k.clientSecret,startUrl:f})});if(!l.ok){let a=await l.text();throw Error(`Device authorization failed: ${a}`)}let m=await l.json();return{device_code:m.deviceCode,user_code:m.userCode,verification_uri:m.verificationUri,verification_uri_complete:m.verificationUriComplete,expires_in:m.expiresIn,interval:m.interval||5,_clientId:k.clientId,_clientSecret:k.clientSecret,_region:e,_authMethod:g,_startUrl:f}},pollToken:async(a,b,c,e)=>{let f,g=e?._region||"us-east-1";(0,d.S6)(g);let h=`https://oidc.${g}.amazonaws.com/token`,i=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:e?._clientId,clientSecret:e?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{f=await i.json()}catch(a){f={error:"invalid_response",error_description:await i.text()}}return f.accessToken?{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:f.expiresIn,profile_arn:f?.profileArn||null,_clientId:e?._clientId,_clientSecret:e?._clientSecret,_region:e?._region,_authMethod:e?._authMethod,_startUrl:e?._startUrl}}:{ok:!1,data:{error:f.error||"authorization_pending",error_description:f.error_description||f.message}}},mapTokens:a=>{let b=(0,e.J_)(a.access_token);return{accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,email:b,providerSpecificData:{profileArn:a?.profile_arn||null,clientId:a._clientId,clientSecret:a._clientSecret,region:a._region||"us-east-1",authMethod:a._authMethod||"builder-id",startUrl:a._startUrl||d.Tx.startUrl}}}}},99799:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).Nl,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})}}};
|
|
1
|
+
"use strict";exports.id=4049,exports.ids=[4049,7247],exports.modules={220:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.LT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b=await fetch(`${d.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},e="";try{let b=await fetch("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:(0,d.cD)(),mode:1})});if(b.ok){let a=await b.json();e=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})}},3198:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(55511),e=c.n(d);let f={config:c(92990).aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,75924)),d=e().randomUUID(),f={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...b(d)},g=await fetch(a.deviceCodeUrl,{method:"POST",headers:f,body:new URLSearchParams({client_id:a.clientId})});if(!g.ok){let a=await g.text();throw Error(`Device code request failed: ${a}`)}let h=await g.json(),i=a.authorizeDeviceUrl||"https://www.kimi.com/code/authorize_device";return{device_code:h.device_code,user_code:h.user_code,verification_uri:h.verification_uri||i,verification_uri_complete:h.verification_uri_complete||`${i}?user_code=${h.user_code}`,expires_in:h.expires_in,interval:h.interval||5,_kimiDeviceId:d}},pollToken:async(a,b,d,e)=>{let f,{buildKimiHeaders:g}=await Promise.resolve().then(c.bind(c,75924)),h=e?._kimiDeviceId,i={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...g(h)},j=await fetch(a.tokenUrl,{method:"POST",headers:i,body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{f=await j.json()}catch{f={error:"invalid_response",error_description:"non-json token response"}}return"authorization_pending"===f.error||"slow_down"===f.error?{ok:!0,data:f}:(f.access_token&&h&&(f._kimiDeviceId=h),{ok:j.ok||!!f.access_token||!!f.error,data:f})},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{authMethod:"device_code",...a._kimiDeviceId?{deviceId:a._kimiDeviceId}:{}}})}},5867:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e=(0,c(67377).N)(d.t3)},12557:(a,b,c)=>{c.d(b,{Bl:()=>j,Qo:()=>f,S5:()=>l,hk:()=>e,kJ:()=>k});var d=c(3662);function e(a,b,c=0,f=null){let g=b?("string"==typeof b?b:JSON.stringify(b)).toLowerCase():"";for(let b of d.t2)if((!b.provider||b.provider===f)&&(b.text&&g&&g.includes(b.text)||b.status&&b.status===a)){if(b.backoff){let a=Math.min(c+1,d.EQ.maxLevel);return{shouldFallback:!0,cooldownMs:function(a=0){let b=Math.max(0,a-1);return Math.min(d.EQ.base*Math.pow(2,b),d.EQ.max)}(a),newBackoffLevel:a}}return{shouldFallback:!0,cooldownMs:b.cooldownMs}}return a>=400&&a<500&&401!==a&&402!==a&&403!==a&&429!==a?{shouldFallback:!1,cooldownMs:0}:{shouldFallback:!0,cooldownMs:d.wf}}function f(a){if(!a)return"";let b=new Date(a).getTime()-Date.now();if(b<=0)return"reset after 0s";let c=Math.ceil(b/1e3),d=Math.floor(c/3600),e=Math.floor(c%3600/60),f=c%60,g=[];return d>0&&g.push(`${d}h`),e>0&&g.push(`${e}m`),(f>0||0===g.length)&&g.push(`${f}s`),`reset after ${g.join(" ")}`}let g="modelLock_",h=`${g}__all`;function i(a){return a?`${g}${a}`:h}function j(a,b){let c=a[i(b)]||a[h];return!!c&&new Date(c).getTime()>Date.now()}function k(a){if(!a)return null;let b=null,c=Date.now();for(let[d,e]of Object.entries(a)){if(!d.startsWith(g)||!e)continue;let a=new Date(e).getTime();a<=c||(!b||a<b)&&(b=a)}return b?new Date(b).toISOString():null}function l(a,b){return{[i(a)]:new Date(Date.now()+b).toISOString()}}},13342:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(92990),e=c(23358);async function f(a,b,c){let e=`${a.replace(/\/$/,"")}${b}`,f=await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":d.eD.userAgent},body:JSON.stringify(c)}),g=await f.text();if(!f.ok)throw Error(`Windsurf ${b} HTTP ${f.status}: ${g.slice(0,200)}`);try{return JSON.parse(g)}catch{throw Error(`Windsurf ${b} invalid JSON`)}}async function g(a){let b=await f(d.eD.registerApiBaseUrl,d.eD.registerPath,{firebase_id_token:a}),c=(0,e.j)(b,[["apiKey"],["api_key"]]);if(!c)throw Error("Windsurf RegisterUser missing apiKey");return{apiKey:c,apiServerUrl:(0,e.j)(b,[["apiServerUrl"],["api_server_url"]])||d.eD.defaultApiServerUrl,name:(0,e.j)(b,[["name"]])}}async function h(a,b){try{let c=await f(a,d.eD.oneTimeAuthPath,{firebaseIdToken:b}),g=(0,e.j)(c,[["authToken"],["auth_token"]]);if(!g)return{email:null,name:null};let h=await f(a,d.eD.currentUserPath,{authToken:g,includeSubscription:!0}),i=h.user||h;return{email:(0,e.j)(i,[["email"]]),name:(0,e.j)(i,[["name"]])}}catch{return{email:null,name:null}}}let i={config:d.eD,flowType:"authorization_code",callbackPath:d.eD.callbackPath,buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({response_type:"token",client_id:a.clientId,redirect_uri:b,state:c,prompt:"login",redirect_parameters_type:"query",workflow:"onboarding"});return`${a.authBaseUrl}${a.signInPath}?${d.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=String(b||"").trim();if(!(f.includes("?")||f.includes("access_token="))){let b=f.replace(/^Bearer\s+/i,"");if(b.startsWith("sk-ws-"))return{accessToken:b,refreshToken:null,expiresIn:null,apiServerUrl:a.defaultApiServerUrl,firebaseIdToken:null,_authMethod:"imported"};let c=await g(b);return{accessToken:c.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:c.apiServerUrl,firebaseIdToken:b,_authMethod:"imported"}}let{firebaseIdToken:h}=function(a,b){let c=String(a||"").trim(),d=c;c.includes("?")&&(d=c.slice(c.indexOf("?")+1)),c.startsWith("#")&&(d=c.slice(1));let e=Object.fromEntries(new URLSearchParams(d)),f=a=>{for(let b of a){let a=e[b];if(a&&String(a).trim())return String(a).trim()}return null},g=f(["error"]);if(g){let a=f(["error_description"]);throw Error(a?`Windsurf auth failed: ${g} (${a})`:`Windsurf auth failed: ${g}`)}let h=f(["access_token","token"]);if(!h)throw Error("Windsurf callback missing access_token");let i=f(["state"]);if(b&&i&&i!==b)throw Error("Windsurf callback state mismatch");return{firebaseIdToken:h}}(f,e),i=await g(h);return{accessToken:i.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:i.apiServerUrl,firebaseIdToken:h,_authMethod:"oauth"}},postExchange:async a=>a.firebaseIdToken?{userInfo:await h(a.apiServerUrl,a.firebaseIdToken)}:{userInfo:{email:null,name:null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.userInfo?.email||void 0,displayName:b?.userInfo?.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",apiServerUrl:a.apiServerUrl,firebaseIdToken:a.firebaseIdToken}})}},17691:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).Td,flowType:"browser_token",buildAuthUrl:(a,b,c)=>{let d=(a.webAppUrl||"https://app.kimchi.dev").replace(/\/+$/,""),e=new URLSearchParams({callback:b,state:c});return`${d}/cli-auth?${e.toString()}`},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!c)throw Error("Missing Kimchi token");let d=a.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",e=await fetch(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});if(!e.ok)throw Error(`Kimchi token validation failed: ${e.status}`);let f={};if(a.userInfoUrl)try{let b=await fetch(a.userInfoUrl,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});b.ok&&(f=await b.json())}catch{f={}}return{access_token:c,token_type:"Bearer",_kimchiUser:f}},mapTokens:a=>{let b=a._kimchiUser||{},c=b.id?String(b.id):"",d=b.username||"",e=b.email||(c?`kimchi-user-${c}`:null);return{accessToken:a.access_token,refreshToken:null,email:e,displayName:b.name||d||null,providerSpecificData:{authMethod:"browser_token",userId:c,username:d}}}}},18245:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(49804);let f={config:d.RY,flowType:"authorization_code",callbackPath:"/",prepareConfig:async(a,b)=>{let c=Number(b?.nativeAppPort)||d.RY.defaultNativeAppPort,f=(0,e.le)(a,{nativeAppPort:c});return{...a,...f}},buildAuthUrl:(a,b,c)=>a.authUrl,exchangeToken:async(a,b,c,d,f,g)=>{let{userId:h,encryptedAccessToken:i}=(0,e.Q_)(b);return{accessToken:(0,e.Wc)(i,d),userId:h,systemId:g?.systemId||a.systemId}},postExchange:async a=>{let b={accessToken:a.accessToken,providerSpecificData:{userId:a.userId,systemId:a.systemId}},c=null;try{c=await (0,e.qJ)(b,{config:d.RY})}catch{}let f=(0,e.k9)(b,c);return{userInfo:c,organizationId:f,email:c?.email||null,name:c?.name||c?.display_name||null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.email||void 0,displayName:b?.name||void 0,providerSpecificData:{authMethod:"oauth",userId:a.userId,systemId:a.systemId,organizationId:b?.organizationId||""}})}},18941:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).lB,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Cline token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})}},20386:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990);let e="1.0.0",f={config:d.sA,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","x-api-version":e},body:new URLSearchParams({client_id:a.clientId})});if(!b.ok){let a=await b.text();throw Error(`Muse Code device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","x-api-version":e},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let f=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||f,data:c}},postExchange:async a=>{let b,c;for(let c=0;(429===(b=await fetch("https://api.meta.ai/muse-code/key",{method:"POST",headers:{Accept:"application/json",Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","x-api-version":e},body:JSON.stringify({onboard:!0}),redirect:"error"})).status||b.status>=500)&&!(c>=2);c++)await new Promise(a=>setTimeout(a,5e3*(c+1)));let d=await b.text();if(!b.ok){let a=`${b.status} ${d.slice(0,200)}`;try{let b=JSON.parse(d);(b?.title||b?.detail)&&(a=[b.title,b.detail].filter(Boolean).join(": "),b.action_url&&(a+=` — ${b.action_url}`))}catch{}throw Error(`Muse Code key mint failed: ${a}`)}try{c=JSON.parse(d)}catch{throw Error("Muse Code key mint returned invalid JSON")}if(!1===c.is_subs_active)throw Error("Muse Code subscription is inactive — activate it on muse.ai first");let f=c.action_url||c.require_payment_action_url;if(!c.api_key&&(c.require_payment||f))throw Error(`Muse Code subscription required${f?`: ${f}`:""}`);if(!c.api_key)throw Error("Muse Code key response is missing api_key");return{key:c}},mapTokens:(a,b)=>{let c=b?.key||{};return{accessToken:c.api_key,refreshToken:null,expiresIn:null,email:c.user_email?.trim().toLowerCase()||void 0,providerSpecificData:{authMethod:"device_code",oauthAccessToken:a.access_token,subscriptionTier:c.subs_tier_name||null}}}}},23358:(a,b,c)=>{c.d(b,{j:()=>d});function d(a,b){for(let c of b){let b=a;for(let a of c){if(null==b||"object"!=typeof b){b=void 0;break}b=b[a]}if("string"==typeof b&&b.trim())return b.trim();if("number"==typeof b)return String(b)}return null}},24329:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(53129);let f={config:d.DI,flowType:"authorization_code_pkce",fixedPort:d.DI.fixedPort,callbackPath:d.DI.callbackPath,buildAuthUrl:(a,b,c,d)=>{let e=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,...a.extraParams,state:c}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${e}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b=(0,e.YR)(a.id_token),c={accessToken:a.access_token,refreshToken:a.refresh_token,idToken:a.id_token,expiresIn:a.expires_in,lastRefreshAt:new Date().toISOString()},d=b.email||(0,e.J_)(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}}},24336:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(55511),e=c.n(d),f=c(92990),g=c(23358);async function h(a){let b=JSON.stringify({loginTraceID:a,login_trace_id:a}),c="no successful response";for(let a of f.SK.loginGuidanceUrls)try{let d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent},body:b});if(!d.ok){c=`${a} HTTP ${d.status}`;continue}let e=await d.json(),h=(0,g.j)(e,[["Result","LoginHost"],["Result","loginHost"],["Result","LoginURL"],["result","loginHost"],["data","Result","LoginHost"],["data","loginHost"],["LoginHost"],["loginHost"]]);if(h)return h;c=`${a} missing LoginHost`}catch(b){c=`${a} ${b.message}`}throw Error(`Trae GetLoginGuidance failed: ${c}`)}function i(){return[...f.SK.apiOrigins]}async function j(a,b){let c=JSON.stringify({ClientID:f.SK.clientId,RefreshToken:a,ClientSecret:f.SK.clientSecret,UserID:""}),d="no successful response";for(let e of i()){let h=`${e.replace(/\/$/,"")}${f.SK.exchangeTokenPath}`;try{let e,i={Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent};b&&(i["x-cloudide-token"]=b);let j=await fetch(h,{method:"POST",headers:i,body:c}),k=await j.text();if(!j.ok){d=`${h} HTTP ${j.status}`;continue}try{e=JSON.parse(k)}catch{d=`${h} invalid JSON`;continue}let l=(0,g.j)(e,[["Result","AccessToken"],["Result","accessToken"],["result","access_token"],["accessToken"]]);if(!l){let a=(0,g.j)(e,[["message"],["msg"],["error"],["Result","Message"]])||"missing AccessToken";d=`${h} ${a}`;continue}return{accessToken:l,refreshToken:(0,g.j)(e,[["Result","RefreshToken"],["result","refresh_token"],["refreshToken"]])||a,expiresIn:null,expiresAt:(0,g.j)(e,[["Result","ExpiresAt"],["Result","expiresAt"],["result","expires_at"],["expiresAt"]])}}catch(a){d=`${h} ${a.message}`}}throw Error(`Trae ExchangeToken failed: ${d}`)}async function k(a){for(let b of i()){let c=`${b.replace(/\/$/,"")}${f.SK.getUserInfoPath}`;try{let b=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent,"x-cloudide-token":a},body:JSON.stringify({})});if(!b.ok)continue;let d=await b.json();return{email:(0,g.j)(d,[["Result","NonPlainTextEmail"],["Result","Email"],["Result","email"],["email"],["data","email"]]),name:(0,g.j)(d,[["Result","ScreenName"],["Result","Nickname"],["Result","Name"],["result","nickname"],["nickname"],["name"]]),aiRegion:(0,g.j)(d,[["Result","AIRegion"],["Result","aiRegion"],["aiRegion"]]),region:(0,g.j)(d,[["Result","Region"],["Result","region"],["region"]]),tenant:(0,g.j)(d,[["Result","TenantID"],["Result","tenantId"],["tenantId"]]),userId:(0,g.j)(d,[["Result","UserID"],["Result","userId"],["userId"]])}}catch{}}return{email:null,name:null}}let l={config:f.SK,flowType:"authorization_code",callbackPath:f.SK.callbackPath,prepareConfig:async a=>{let b=e().randomUUID(),c=await h(b);return{...a,loginTraceID:b,loginHost:c}},buildAuthUrl:(a,b,c)=>{var d;let g,h,i={plugin_version:f.SK.defaultPluginVersion,machine_id:e().randomUUID(),device_id:f.SK.defaultDeviceId,x_device_brand:"unknown",x_device_type:"unknown",x_os_version:"unknown",x_env:"",x_app_version:f.SK.defaultAppVersion,x_app_type:f.SK.defaultAppType},j=a.loginTraceID||c;return d=a.loginHost,(g=new URL(d.startsWith("http")?d:`https://${d.replace(/^\/+/,"")}`)).pathname=f.SK.authorizationPath,(h=new URLSearchParams).set("login_version","1"),h.set("auth_from","trae"),h.set("login_channel","native_ide"),h.set("plugin_version",i.plugin_version),h.set("auth_type","local"),h.set("client_id",f.SK.clientId),h.set("redirect","0"),h.set("login_trace_id",j),h.set("auth_callback_url",b),h.set("machine_id",i.machine_id),h.set("device_id",i.device_id),h.set("x_device_id",i.device_id),h.set("x_machine_id",i.machine_id),h.set("x_device_brand",i.x_device_brand),h.set("x_device_type",i.x_device_type),h.set("x_os_version",i.x_os_version),h.set("x_env",i.x_env),h.set("x_app_version",i.x_app_version),h.set("x_app_type",i.x_app_type),g.search=h.toString(),g.toString()},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!(/[?=&]/.test(c)&&(c.includes("refreshToken")||c.includes("refresh_token"))))return{accessToken:c.replace(/^(Cloud-IDE-JWT|Bearer)\s+/i,""),refreshToken:null,expiresIn:24*f.SK.tokenLifetimeDays*3600,_authMethod:"imported"};let{refreshToken:d,cloudideToken:e}=function(a){let b=String(a||"").trim(),c=b;b.includes("?")&&(c=b.slice(b.indexOf("?")+1)),b.startsWith("#")&&(c=b.slice(1));let d=Object.fromEntries(new URLSearchParams(c)),e=a=>{for(let b of a){let a=d[b];if(a&&String(a).trim())return String(a).trim()}return null},f=e(["error","error_code","errorCode"]);if(f){let a=e(["error_description","error_desc","message"]);throw Error(a?`Trae auth failed: ${f} (${a})`:`Trae auth failed: ${f}`)}let g=e(["refreshToken","refresh_token","RefreshToken"]);if(!g)throw Error("Trae callback missing refreshToken");let h=e(["loginHost","login_host","LoginHost","host","consoleHost"]);if(!h)throw Error("Trae callback missing loginHost");return{refreshToken:g,loginHost:h,cloudideToken:e(["x-cloudide-token","xCloudideToken","accessToken","access_token","token"])}}(c);return{...await j(d,e),_authMethod:"oauth"}},postExchange:async a=>({userInfo:await k(a.accessToken)}),mapTokens:(a,b)=>{let c,d=a.expiresIn||(a.expiresAt?Math.max(60,Number(a.expiresAt)-Math.floor(Date.now()/1e3)):24*f.SK.tokenLifetimeDays*3600),e=b?.userInfo||{},g=e.aiRegion||"US-East";return{accessToken:a.accessToken,refreshToken:a.refreshToken,expiresIn:d,email:e.email||void 0,displayName:e.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",aiRegion:g,region:e.region||g,tenant:e.tenant||"marscode",userId:e.userId||"",scope:"sg"===(c=(g||"").toLowerCase())||c.includes("singapore")?"marscode-sg":"cn"===c||c.includes("cn")||c.includes("china")?"marscode-cn":"marscode-us",webId:"",bizUserId:"",userUniqueId:"",appLanguage:"en",appVersion:f.SK.defaultAppVersion,userRegion:"SG"===g?"SG":"US",userIdentity:"Free"}}}}},31111:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(91365);let e=(0,d.O)(d.$.cn)},34940:(a,b,c)=>{c.d(b,{A:()=>g});var d=c(90737),e=c(92990),f=c(53129);let g={config:e.qp,flowType:"device_code",requestDeviceCode:async a=>{let b=new URLSearchParams({client_id:a.clientId,scope:a.scope});a.referrer&&b.set("referrer",a.referrer);let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":d.hY},body:b});if(!c.ok){let a=await c.text();throw Error(`Grok CLI device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b)=>{let c,e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":d.hY},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await e.json()}catch{c={error:"invalid_response",error_description:await e.text()}}let f=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:e.ok||f,data:c}},postExchange:async a=>{try{let b=await fetch("https://cli-chat-proxy.grok.com/v1/user",{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","User-Agent":d.hY,"x-xai-token-auth":"xai-grok-cli","x-grok-client-version":d.uG}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=(0,f.pG)(a.id_token)||(0,f.J_)(a.access_token)||b?.user?.email||null,d=b?.user?.userId||b?.user?.principalId||null,e=[b?.user?.firstName,b?.user?.lastName].filter(Boolean).join(" ").trim()||null,g=a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null;return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:g,scope:a.scope,email:c||void 0,displayName:e||void 0,providerSpecificData:{authMethod:"device_code",idToken:a.id_token||null,email:c||null,userId:d,hasGrokCodeAccess:b?.user?.hasGrokCodeAccess??null,subscriptionTier:b?.user?.subscriptionTier??null}}}}},35152:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).w1,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`ClinePass token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})}},41902:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).OV,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d)=>{let e=new URLSearchParams({code:"true",client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c});return`${a.authorizeUrl}?${e.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=b,g="";if(f.includes("#")){let a=f.split("#");f=a[0],g=a[1]||""}let h=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({code:f,state:g||e,grant_type:"authorization_code",client_id:a.clientId,redirect_uri:c,code_verifier:d})});if(!h.ok){let a=await h.text();throw Error(`Token exchange failed: ${a}`)}return await h.json()},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope})}},43659:(a,b,c)=>{c.d(b,{A1:()=>h,lR:()=>j,wO:()=>i,xJ:()=>e,yj:()=>f,zL:()=>g});var d=c(3662);function e(a,b){let c=d.LY[a]||(a>=500?{type:"server_error",code:"internal_server_error"}:{type:"invalid_request_error",code:""});return{error:{message:b||d.O[a]||"An error occurred",type:c.type,code:c.code}}}function f(a,b,c=null){return new Response(JSON.stringify(e(a,b)),{status:a,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*",...c}})}async function g(a,b=null){let c="";try{c=await a.text()}catch{c=""}if(b&&"function"==typeof b.parseError)try{let e=b.parseError(a,c);if(e&&"object"==typeof e){let b=e.message||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:e.status||a.status,message:b,resetsAtMs:e.resetsAtMs}}}catch{}let e="";try{let a=JSON.parse(c);e=a.error?.message||a.message||a.error||c}catch{e=c}let f=("string"==typeof e?e:JSON.stringify(e))||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:a.status,message:f}}function h(a,b,c,d=null){return{success:!1,status:a,error:b,resetsAtMs:c,response:f(a,b,d)}}function i(a,b,c,d,e=null){let f=Math.max(Math.ceil((new Date(c).getTime()-Date.now())/1e3),1);return new Response(JSON.stringify({error:{message:`${b} (${d})`}}),{status:a,headers:{...e,"Content-Type":"application/json","retry-after":String(f)}})}function j(a,b,c,d){let e=d||a.code||"FETCH_FAILED",f=a.message||"Unknown error",g=a.cause?.code,h=a.cause?.message,i=g||h?` (cause: ${[g,h].filter(Boolean).join(": ")})`:"";return`[${e}]: ${f}${i}`}},45891:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(91365);let e=(0,d.O)(d.$.global)},49475:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.Nu,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scopes})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,device_code:b,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});try{c=await d.json()}catch(a){c={error:"invalid_response",error_description:await d.text()}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(d.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":d.Nu.apiVersion,"User-Agent":d.Nu.userAgent}}),c=b.ok?await b.json():{},e=await fetch(d.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":d.Nu.apiVersion,"User-Agent":d.Nu.userAgent}});return{copilotToken:c,userInfo:e.ok?await e.json():{}}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,name:b?.userInfo?.login||b?.userInfo?.name,displayName:b?.userInfo?.name||b?.userInfo?.login,email:b?.userInfo?.email||null,providerSpecificData:{copilotToken:b?.copilotToken?.token,copilotTokenExpiresAt:b?.copilotToken?.expires_at,githubUserId:b?.userInfo?.id,githubLogin:b?.userInfo?.login,githubName:b?.userInfo?.name,githubEmail:b?.userInfo?.email}})}},53129:(a,b,c)=>{function d(a,b){let c,d=String(a||"").trim();if(!d)throw Error(`xai discovery ${b} is empty`);try{c=new URL(d)}catch(a){throw Error(`xai discovery ${b} is invalid: ${a.message}`)}if("https:"!==c.protocol)throw Error(`xai discovery ${b} must use https: ${d}`);let e=c.hostname.toLowerCase().trim();if("x.ai"!==e&&!e.endsWith(".x.ai"))throw Error(`xai discovery ${b} host ${e} is not on x.ai`);return d}function e(a){if(!a||"string"!=typeof a)return;let b=a.split(".");if(3===b.length)try{let a=b[1].replace(/-/g,"+").replace(/_/g,"/"),c=(4-a.length%4)%4,d=Buffer.from(a+"=".repeat(c),"base64").toString("utf8"),e=JSON.parse(d);return e.email||e.preferred_username||e.sub||void 0}catch{return}}function f(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,e=c+"=".repeat(d);return JSON.parse(Buffer.from(e,"base64").toString("utf8"))}catch{return null}}function g(a){let b=f(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function h(a){if(!a)return null;try{let b=await fetch("https://codewhisperer.us-east-1.amazonaws.com/ListAvailableProfiles",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({maxResults:10})});if(!b.ok)return null;let c=await b.json();return c.profiles?.find(a=>a.arn?.trim())?.arn?.trim()||null}catch{return null}}function i(a){let b=f(a);if(!b)return{};let c=b["https://api.openai.com/auth"]||{};return{email:b.email,chatgptAccountId:c.chatgpt_account_id||b.account_id,chatgptPlanType:c.chatgpt_plan_type||b.plan_type}}c.d(b,{J_:()=>g,YR:()=>i,gR:()=>h,js:()=>d,pG:()=>e})},56187:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=new URLSearchParams({client_id:e.clientId||"",redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${g.toString()}`},exchangeToken:async(a,b,c,d,e,f={})=>{let g=f.baseUrl||a.defaultBaseUrl,h=f.clientId||"",i=f.clientSecret||"",j=new URLSearchParams({client_id:h,grant_type:"authorization_code",code:b,redirect_uri:c,code_verifier:d});i&&j.set("client_secret",i);let k=await fetch(`${g}${a.tokenUrlPath}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:j.toString()});if(!k.ok)throw Error(`GitLab token exchange failed: ${await k.text()}`);let l=await k.json(),m=await fetch(`${g}${a.userInfoUrlPath}`,{headers:{Authorization:`Bearer ${l.access_token}`}}),n=m.ok?await m.json():{};return{...l,_user:n,_baseUrl:g,_clientId:h}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,providerSpecificData:{username:a._user?.username||"",email:a._user?.email||a._user?.public_email||"",name:a._user?.name||"",baseUrl:a._baseUrl,clientId:a._clientId,authKind:"oauth"}})}},57247:(a,b,c)=>{c.d(b,{KC:()=>s,OA:()=>p,PROVIDER_MODELS:()=>e.vq,SM:()=>j,Xg:()=>r,cY:()=>t,ez:()=>o,fZ:()=>k,kt:()=>q,ux:()=>n});var d=c(79378),e=c(26070),f=c(99511),g=c(59096),h=c(14170);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}function k(a){let b=e.vq[a];return b?.[0]?.id||null}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function n(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function o(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.ec)(d):i(a)?(0,g.i8)(b)?.supportedFormats||[h.h.OPENAI]:null}function p(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?.kind||d?.type||null}function q(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",f=d?b.slice(0,c.index).trim():b,h=m(e.vq[a],f,a),i=h?.upstreamModelId||h?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof f&&f.endsWith(g.d5)?f.slice(0,-g.d5.length)+d:f+d}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));let r=Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]));function s(a){let b=r[a]||a;return e.vq[b]||[]}function t(a,b){return(0,f.g5)(m(e.vq[a],b,a))}},66678:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Gj:()=>L,PY:()=>O,Re:()=>M,Su:()=>N,YR:()=>g.YR,gR:()=>g.gR,kP:()=>K,sO:()=>J});var e=c(48895),f=c(13808),g=c(53129),h=c(41902),i=c(24329),j=c(72520),k=c(34940),l=c(20386),m=c(220),n=c(79188),o=c(86725),p=c(67377),q=c(5867),r=c(49475),s=c(93551),t=c(68446),u=c(3198),v=c(67096),w=c(18941),x=c(35152),y=c(56187),z=c(99799),A=c(86857),B=c(17691),C=c(24336),D=c(13342),E=c(18245),F=c(81884),G=c(31111),H=c(45891),I=a([e]);e=(I.then?(await I)():I)[0];let P={claude:h.A,codex:i.A,xai:j.A,"grok-cli":k.A,muse:l.A,"gemini-cli":m.A,antigravity:n.A,iflow:o.A,qoder:p.A,"qoder-cn":q.A,github:r.A,kiro:s.A,cursor:t.A,kimi:u.A,kilocode:v.A,cline:w.A,clinepass:x.A,gitlab:y.A,"codebuddy-cn":z.A,"codebuddy-intl":A.A,kimchi:B.A,trae:C.A,windsurf:D.A,zed:E.A,glm:F.A,"minimax-code":G.A,"minimax-code-global":H.A};function J(a){let b=P["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}async function K(a,b,c){let d=J(a),e=d.prepareConfig?await d.prepareConfig(d.config,c||{}):d.config,{codeVerifier:g,codeChallenge:h,state:i}=(0,f.lz)(d.pkceVerifierBytes),j=e.loginTraceID||i,k=e.privateKeyVerifier||g;return{authUrl:"device_code"===d.flowType?null:"authorization_code_pkce"===d.flowType?d.buildAuthUrl(e,b,j,h,c||{}):d.buildAuthUrl(e,b,j,void 0,c||{}),state:j,codeVerifier:k,codeChallenge:h,redirectUri:b,flowType:d.flowType,fixedPort:d.fixedPort,callbackPath:d.callbackPath||"/callback",...e.systemId?{systemId:e.systemId}:{}}}async function L(a,b,c,d,e,f){let g=J(a),h=g.prepareConfig?await g.prepareConfig(g.config,f||{}):g.config,i=await g.exchangeToken(h,b,c,d,e,f||{}),j=null;return g.postExchange&&(j=await g.postExchange(i)),g.mapTokens(i,j)}async function M(a,b,c){let d=J(a);if("device_code"!==d.flowType)throw Error(`Provider ${a} does not support device code flow`);return await d.requestDeviceCode(d.config,b,c||{})}async function N(a,b,c,d){let e=J(a);if("device_code"!==e.flowType)throw Error(`Provider ${a} does not support device code flow`);let f=await e.pollToken(e.config,b,c,d);if(f.ok)if(f.data.access_token){let b=null;if(e.postExchange)try{b=await e.postExchange(f.data)}catch(b){return console.warn(`[oauth] ${a} postExchange failed:`,b?.message||b),{success:!1,error:"exchange_failed",errorDescription:b.message,fatal:!0}}let c=e.mapTokens(f.data,b);if("kiro"===a&&!c.providerSpecificData?.profileArn){let a=await (0,g.gR)(c.accessToken);a&&(c.providerSpecificData.profileArn=a)}return{success:!0,tokens:c}}else if("authorization_pending"===f.data.error||"slow_down"===f.data.error)return{success:!1,error:f.data.error,errorDescription:f.data.error_description||f.data.message,pending:"authorization_pending"===f.data.error};else return{success:!1,error:f.data.error||"no_access_token",errorDescription:f.data.error_description||f.data.message||"No access token received"};return{success:!1,error:f.data.error,errorDescription:f.data.error_description}}let Q=!1;async function O(){if(!Q){Q=!0;try{let{getProviderConnections:a,updateProviderConnection:b}=await Promise.resolve().then(c.bind(c,89718));for(let c of(await a()).filter(a=>{if("codex"!==a.provider||"oauth"!==a.authType||!a.idToken)return!1;let b=!!a.email,c=!!a.providerSpecificData?.chatgptAccountId;return!b||!c})){let a=(0,g.YR)(c.idToken);if(!a.email&&!a.chatgptAccountId)continue;let d={};!c.email&&a.email&&(d.email=a.email),(a.chatgptAccountId||a.chatgptPlanType)&&(d.providerSpecificData={...c.providerSpecificData||{},chatgptAccountId:a.chatgptAccountId,chatgptPlanType:a.chatgptPlanType}),Object.keys(d).length&&await b(c.id,d)}}catch(a){Q=!1,console.log("backfillCodexEmails failed:",a?.message||a)}}}d()}catch(a){d(a)}})},67096:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).MZ,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.initiateUrl,{method:"POST",headers:{"Content-Type":"application/json"}});if(!b.ok){if(429===b.status)throw Error("Too many pending authorization requests. Please try again later.");let a=await b.text();throw Error(`Device auth initiation failed: ${a}`)}let c=await b.json();return{device_code:c.code,user_code:c.code,verification_uri:c.verificationUrl,verification_uri_complete:c.verificationUrl,expires_in:c.expiresIn||300,interval:3}},pollToken:async(a,b)=>{let c=await fetch(`${a.pollUrlBase}/${b}`);if(202===c.status)return{ok:!1,data:{error:"authorization_pending"}};if(403===c.status)return{ok:!1,data:{error:"access_denied",error_description:"Authorization denied by user"}};if(410===c.status)return{ok:!1,data:{error:"expired_token",error_description:"Authorization code expired"}};if(!c.ok)return{ok:!1,data:{error:"poll_failed",error_description:`Poll failed: ${c.status}`}};let d=await c.json();if("approved"===d.status&&d.token){let b=null;try{let c=await fetch(`${a.apiBaseUrl}/api/profile`,{headers:{Authorization:`Bearer ${d.token}`}});if(c.ok){let a=await c.json();b=a.organizations?.[0]?.id||null}}catch{}return{ok:!0,data:{access_token:d.token,_userEmail:d.userEmail,_orgId:b}}}return{ok:!1,data:{error:"authorization_pending"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:null,expiresIn:null,email:a._userEmail,...a._orgId?{providerSpecificData:{orgId:a._orgId}}:{}})}},67377:(a,b,c)=>{function d(a){return{config:a,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(3546).then(c.bind(c,73546)),d=new b(a).initiateDeviceFlow();return{device_code:d.nonce,user_code:d.nonce.slice(0,8).toUpperCase(),verification_uri:a.loginUrl,verification_uri_complete:d.verificationUriComplete,expires_in:300,interval:2,codeVerifier:d.codeVerifier,_qoderNonce:d.nonce,_qoderMachineId:d.machineId}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(3546).then(c.bind(c,73546)),h=new g(a),i=b||e?._qoderNonce,j=d||e?._qoderVerifier;if(!i||!j)return{ok:!1,data:{error:"invalid_request",error_description:"Missing nonce/verifier"}};try{f=await h.pollDeviceToken({nonce:i,codeVerifier:j})}catch(a){return{ok:!1,data:{error:"poll_failed",error_description:a.message}}}if("pending"===f.status)return{ok:!1,data:{error:"authorization_pending"}};let k=await h.fetchUserInfo(f.accessToken),l=Math.max(86400,Math.floor((f.expireTime-Date.now())/1e3));return{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:l,_qoderUserId:f.userId,_qoderMachineId:e?._qoderMachineId||"",_qoderName:k.name,_qoderEmail:k.email,_qoderOrganizationId:k.organizationId}}},mapTokens:a=>{let b=(a._qoderEmail||"").trim(),c=(a._qoderName||"").trim()||null,d=a._qoderUserId||"",e=b||(d?`qoder-user-${d}`:null);return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,email:e,displayName:c,providerSpecificData:{authMethod:"device",userId:d,machineId:a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}}}c.d(b,{A:()=>e,N:()=>d});let e=d(c(92990).hF)},68446:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})}},72520:(a,b,c)=>{c.d(b,{A:()=>j});var d=c(55511),e=c.n(d),f=c(73159),g=c(53129);let h=null;async function i(){if(h)return h;try{let a=await fetch(f.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return h={authorizeUrl:(0,g.js)(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:(0,g.js)(b.token_endpoint,"token_endpoint")}}}catch{}return h={authorizeUrl:f.oT.authorizeUrl,tokenUrl:f.oT.tokenUrl}}let j={config:f.oT,flowType:"authorization_code_pkce",fixedPort:f.oT.loopbackPort,callbackPath:f.oT.callbackPath,pkceVerifierBytes:f.Ue,prepareConfig:async a=>{let b=await i();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let f=e().randomBytes(16).toString("hex"),g=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c,nonce:f,plan:"generic",referrer:"cli-proxy-api"}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${g}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`xAI token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b={accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope},c=(0,g.pG)(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}}},74177:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{PY:()=>e.PY,Re:()=>e.Re,Su:()=>e.Su,exchangeTokens:()=>e.Gj,extractCodexAccountInfo:()=>e.YR,fetchKiroProfileArn:()=>e.gR,kP:()=>e.kP,sO:()=>e.sO});var e=c(66678),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},79188:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.YT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b={Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","User-Agent":d.YT.loadCodeAssistUserAgent,"x-request-source":"local"},c=(0,d.cD)(),e=await fetch(`${d.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"}}),f=e.ok?await e.json():{},g="",h="legacy-tier";try{let a=await fetch(d.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c})});if(a.ok){let b=await a.json();if(g=b.cloudaicompanionProject?.id||b.cloudaicompanionProject||"",Array.isArray(b.allowedTiers)){for(let a of b.allowedTiers)if(a.isDefault&&a.id){h=a.id.trim();break}}}}catch(a){console.log("Failed to load code assist:",a)}return g&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(d.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:h,metadata:c})});if(a.ok){let b=await a.json();if(!0===b.done)break}}catch(a){break}await new Promise(a=>setTimeout(a,5e3))}})().catch(()=>{}),{userInfo:f,projectId:g}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})}},81884:(a,b,c)=>{c.d(b,{A:()=>k});var d=c(55511),e=c.n(d);async function f(a,b){let c=await g(a,b),d={Authorization:`Bearer ${c}`,"Content-Type":"application/json"},e=function(a){let b=(Array.isArray(a?.organizations)?a.organizations:[]).map(a=>({organization:a,projects:(a?.projects||[]).filter(a=>"2"!==String(a?.projectType??"").trim())})).filter(({organization:a,projects:b})=>!!(a?.organizationId&&b.length));if(!b.length)return null;let c=b.find(({organization:a})=>i(a.organizationName))||b[0],d=c.projects.find(a=>i(a?.projectName))||c.projects[0];return c.organization?.organizationId&&d?.projectId?{organizationId:c.organization.organizationId,projectId:d.projectId}:null}(await h(`${a.apiBaseUrl}/api/biz/customer/getCustomerInfo`,{headers:d},"customer info"));if(!e)throw Error("Unable to resolve Z.ai organization and project for the coding plan");let f=`${a.apiBaseUrl}/api/biz/v1/organization/${e.organizationId}/projects/${e.projectId}/api_keys`,j=await h(f,{headers:d},"api keys")||[],k=Array.isArray(j)?j.find(b=>b?.name===a.planApiKeyName):null;k||(k=await h(f,{method:"POST",headers:d,body:JSON.stringify({name:a.planApiKeyName})},"api key create"));let l=k?.apiKey?.trim();if(!l)throw Error("Z.ai api_keys response is missing apiKey");let m=await h(`${f}/copy/${encodeURIComponent(l)}`,{headers:d},"api key copy"),n=m?.secretKey?.trim();if(!n)throw Error("Z.ai api key copy response is missing secretKey");return{planApiKey:`${l}.${n}`,businessToken:c}}async function g(a,b){let c=await h(a.businessLoginUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:b})},"Z.ai business login"),d=c?.access_token?.trim()||c?.accessToken?.trim();if(!d)throw Error("Z.ai business login response is missing access_token");return d}async function h(a,b,c){let d,e=await fetch(a,b),f=await e.text();if(!e.ok)throw Error(`Z.ai ${c} request failed (HTTP ${e.status}): ${f.slice(0,200)}`);try{d=JSON.parse(f)}catch{throw Error(`Z.ai ${c} response is not valid JSON`)}if(!j(d?.code)||d?.success===!1)throw Error(d?.msg||`Z.ai ${c} returned business error ${d?.code}`);return d?.data??d??null}function i(a){let b=String(a||"").trim().toLowerCase();return b.includes("默认机构")||b.includes("默认项目")||"default"===b}function j(a){return null==a||0===a||200===a||"0"===a||"200"===a}let k={config:c(92990)._0,flowType:"device_code",requestDeviceCode:async a=>{let b=e().randomBytes(32).toString("hex"),c=await fetch(a.cliInitUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${b}`},body:JSON.stringify({provider:a.providerId||"zai"})});if(!c.ok){let a=await c.text();throw Error(`ZCode OAuth init failed: ${a}`)}let d=await c.json();if(!j(d.code)||!d.data)throw Error(d.msg||"ZCode OAuth init returned no data");let f=d.data;if(!f.flow_id||!f.authorize_url)throw Error("ZCode OAuth init response missing flow_id/authorize_url");return{device_code:f.flow_id,verification_uri:f.authorize_url,expires_in:function(a){let b=Number(a);if(!Number.isFinite(b)||b<=0)return null;let c=Math.floor(((b>1e12?b:1e3*b)-Date.now())/1e3);return c>0?c:null}(f.expires_at)??300,interval:f.poll_interval_sec||3,_zcodePollToken:b}},pollToken:async(a,b,c,d)=>{let e=d?._zcodePollToken;if(!e)return{ok:!0,data:{error:"access_denied",error_description:"Missing ZCode poll token — restart the login flow"}};let g=await fetch(`${a.cliPollUrl}/${encodeURIComponent(b)}`,{headers:{Authorization:`Bearer ${e}`}});if(!g.ok)return{ok:!0,data:{error:"access_denied",error_description:`ZCode poll failed (HTTP ${g.status})`}};let h=await g.json();if(!j(h.code))return{ok:!0,data:{error:"access_denied",error_description:h.msg||"ZCode poll failed"}};let i=h.data||{};if("pending"===i.status)return{ok:!0,data:{error:"authorization_pending"}};if("failed"===i.status)return{ok:!0,data:{error:"access_denied",error_description:"ZCode authorization failed or was cancelled"}};if("ready"!==i.status)return{ok:!0,data:{error:"authorization_pending",error_description:`Unknown status: ${i.status}`}};let k=i[a.providerId]||i[i.providerId]||{},l=k.access_token||k.accessToken||i.accessToken||i.access_token;if(!l)return{ok:!0,data:{error:"access_denied",error_description:"ZCode poll response missing access token"}};let{planApiKey:m,businessToken:n}=await f(a,l);return{ok:!0,data:{access_token:m,_zcodeJwtToken:i.token||"",_zaiBusinessToken:n,_zaiRefreshToken:k.refresh_token||k.refreshToken||i.refresh_token||i.refreshToken||"",_zcodeUser:i.user||{}}}},mapTokens:a=>{let b=a._zcodeUser||{},c=b.name||b.email||null;return{accessToken:a.access_token,refreshToken:null,email:b.email||null,...c?{displayName:c}:{},providerSpecificData:{authMethod:"cli_poll",username:b.name||void 0,userId:b.user_id||void 0,zcodeJwtToken:a._zcodeJwtToken||void 0,zaiBusinessToken:a._zaiBusinessToken||void 0,...a._zaiRefreshToken?{zaiRefreshToken:a._zaiRefreshToken}:{}}}}}},86725:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.ZL,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({loginMethod:a.extraParams.loginMethod,type:a.extraParams.type,redirect:b,state:c,client_id:a.clientId});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=Buffer.from(`${a.clientId}:${a.clientSecret}`).toString("base64"),e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${d}`},body:new URLSearchParams({grant_type:"authorization_code",code:b,redirect_uri:c,client_id:a.clientId,client_secret:a.clientSecret})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},postExchange:async a=>{let b=await fetch(`${d.ZL.userInfoUrl}?accessToken=${encodeURIComponent(a.access_token)}`,{headers:{Accept:"application/json"}});if(!b.ok){let a=await b.text();throw Error(`Failed to fetch user info: ${a}`)}let c=await b.json();if(!c.success)throw Error(`User info request failed: ${c.message||"Unknown error"}`);let e=c.data||{};if(!e.apiKey||""===e.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(e.email?.trim()||e.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,apiKey:b?.userInfo?.apiKey,email:b?.userInfo?.email||b?.userInfo?.phone,displayName:b?.userInfo?.nickname||b?.userInfo?.name})}},86857:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).DV,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy Intl state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy Intl state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})}},91365:(a,b,c)=>{c.d(b,{$:()=>h,O:()=>g});let d=(a,b)=>"string"==typeof a?.[b]&&a[b].trim()?a[b].trim():void 0,e=(a,b)=>"number"==typeof a?.[b]&&Number.isFinite(a[b])&&a[b]>0?a[b]:void 0;async function f(a,b){let c,d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(b).toString(),signal:AbortSignal.timeout(3e4)});try{c=JSON.parse(await d.text())}catch{}return c&&"object"==typeof c||(c={error:`invalid_json_response (HTTP ${d.status})`}),{status:d.status,body:c}}function g(a){return{config:{clientId:"mcode-public",scope:"agent.default",audience:"agent-backend",deviceUrl:`${a.account}/oauth2/device/code`,tokenUrl:`${a.account}/oauth2/token`},flowType:"device_code",async requestDeviceCode(a,b){let c,g,h;if(!b)throw Error("MiniMax Code sign-in requires a PKCE code challenge");let{status:i,body:j}=await f(a.deviceUrl,{client_id:a.clientId,scope:a.scope,audience:a.audience,code_challenge:b,code_challenge_method:"S256"}),{userCode:k,deviceCode:l,uri:m}={userCode:d(j,"user_code"),deviceCode:d(j,"device_code"),uri:d(j,"verification_uri_complete")??d(j,"verification_uri")??d(j,"verification_url")};if(!k||!m)throw Error(`MiniMax device code response unusable (HTTP ${i})`);let n=!l;return{device_code:l??k,user_code:k,verification_uri:m,expires_in:(c=e(j,"expires_in"),g=e(j,"expired_in"),(c||(g?g<1e12?g:Math.max(1,Math.ceil((g-Date.now())/1e3)):void 0))??600),interval:(h=e(j,"interval"))?n&&h>=60?Math.round(h/1e3):h:5,_minimaxPollByUser:n}},async pollToken(a,b,c,e){if(!b)return{ok:!0,data:{error:"authorization_pending"}};let g={grant_type:"urn:ietf:params:oauth:grant-type:device_code",...e?._minimaxPollByUser?{user_code:b}:{device_code:b},client_id:a.clientId,code_verifier:c},{body:h}=await f(a.tokenUrl,g),i=d(h,"status");return"pending"===i?{ok:!0,data:{error:"authorization_pending"}}:"slow_down"===i?{ok:!0,data:{error:"slow_down"}}:"denied"===i||"access_denied"===i?{ok:!0,data:{error:"access_denied"}}:"expired"===i||"expired_token"===i?{ok:!0,data:{error:"expired_token"}}:i?{ok:!0,data:{error:`unexpected_status:${i}`}}:d(h,"error")?{ok:!0,data:{error:d(h,"error"),error_description:d(h,"error_description")}}:d(h,"access_token")?{ok:!0,data:h}:{ok:!0,data:{error:"no_access_token"}}},mapTokens(a){let b=e(a,"expires_in");return{accessToken:d(a,"access_token"),refreshToken:d(a,"refresh_token")??"",expiresIn:b??3600}}}}let h={cn:{account:"https://account.minimax.cn"},global:{account:"https://account.minimax.io"}}},93551:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(53129);let f={config:d.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let e=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,d.S6)(e);let f=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,g="idc"===c.authMethod?"idc":"builder-id",h=`https://oidc.${e}.amazonaws.com/client/register`,i=`https://oidc.${e}.amazonaws.com/device_authorization`,j=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientName:a.clientName,clientType:a.clientType,scopes:a.scopes,grantTypes:a.grantTypes,issuerUrl:a.issuerUrl})});if(!j.ok){let a=await j.text();throw Error(`Client registration failed: ${a}`)}let k=await j.json(),l=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:k.clientId,clientSecret:k.clientSecret,startUrl:f})});if(!l.ok){let a=await l.text();throw Error(`Device authorization failed: ${a}`)}let m=await l.json();return{device_code:m.deviceCode,user_code:m.userCode,verification_uri:m.verificationUri,verification_uri_complete:m.verificationUriComplete,expires_in:m.expiresIn,interval:m.interval||5,_clientId:k.clientId,_clientSecret:k.clientSecret,_region:e,_authMethod:g,_startUrl:f}},pollToken:async(a,b,c,e)=>{let f,g=e?._region||"us-east-1";(0,d.S6)(g);let h=`https://oidc.${g}.amazonaws.com/token`,i=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:e?._clientId,clientSecret:e?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{f=await i.json()}catch(a){f={error:"invalid_response",error_description:await i.text()}}return f.accessToken?{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:f.expiresIn,profile_arn:f?.profileArn||null,_clientId:e?._clientId,_clientSecret:e?._clientSecret,_region:e?._region,_authMethod:e?._authMethod,_startUrl:e?._startUrl}}:{ok:!1,data:{error:f.error||"authorization_pending",error_description:f.error_description||f.message}}},mapTokens:a=>{let b=(0,e.J_)(a.access_token);return{accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,email:b,providerSpecificData:{profileArn:a?.profile_arn||null,clientId:a._clientId,clientSecret:a._clientSecret,region:a._region||"us-east-1",authMethod:a._authMethod||"builder-id",startUrl:a._startUrl||d.Tx.startUrl}}}}},99799:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).Nl,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})}}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=4055,exports.ids=[4055],exports.modules={4055:(a,b,c)=>{c.d(b,{runMigrationOnce:()=>w});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(7841),i=c(76040);let j=[{version:1,name:"initial",up(a){for(let[b,c]of Object.entries(i.CG))for(let d of(a.exec((0,i.zE)(b,c)),c.indexes||[]))a.exec(d)}}].sort((a,b)=>a.version-b.version);var k=c(91117);let l=null;function m(){if(l)return l;try{let a=g().join(process.cwd(),"package.json");l=JSON.parse(e().readFileSync(a,"utf-8")).version||"0.0.0"}catch{l="0.0.0"}return l}let n=["requestDetails"];function o(a){(0,h.Jh)();let b=m(),c=`${a}-${b}-${function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}${b(a.getMonth()+1)}${b(a.getDate())}-${b(a.getHours())}${b(a.getMinutes())}${b(a.getSeconds())}`}()}`,d=g().join(h.KQ,c);return e().mkdirSync(d,{recursive:!0}),d}function p(){if(e().existsSync(h.KQ))for(let a of e().readdirSync(h.KQ,{withFileTypes:!0}).filter(a=>a.isDirectory()).map(a=>({name:a.name,full:g().join(h.KQ,a.name),mtime:e().statSync(g().join(h.KQ,a.name)).mtimeMs})).sort((a,b)=>b.mtime-a.mtime).slice(3))try{e().rmSync(a.full,{recursive:!0,force:!0})}catch{}}var q=c(33323);let r=g().join(h.HG,".migrated-from-json"),s=new WeakSet;class t extends Error{constructor(a,b){super(a),this.name="MigrationAborted",this.droppedRows=b}}function u(a,b,c,d,e){let f=[];for(let a of c)try{d(a)}catch(b){f.push({...e(a),reason:b.message})}let g=a.get(`SELECT COUNT(*) as c FROM ${b}`)?.c??0;if(g!==c.length)throw console.warn(`[DB][migrate] ${b} row-count mismatch: expected ${c.length}, got ${g}. Dropped:`,f),new t(`${b} row-count mismatch: expected ${c.length}, got ${g}`,f)}function v(a){if(!e().existsSync(a))return null;try{return JSON.parse(e().readFileSync(a,"utf-8"))}catch{return null}}async function w(a){if(s.has(a))return;s.add(a);let b=function(a){try{let b=a.get("SELECT COUNT(*) as c FROM _meta");return!b||0===b.c}catch{return!0}}(a);p(),a.exec((0,i.zE)("_meta",i.CG._meta));let c=parseInt((0,k.dy)(a,"backupSchemaVersion","0"),10)||0;if(!b&&c<i.f$)try{let b=o(`schema-${c}-to-${i.f$}`);!function(a,b,c="data.sqlite"){let d=g().join(b,c);try{e().rmSync(d,{force:!0})}catch{}let f=d.replace(/'/g,"''");a.exec(`ATTACH DATABASE '${f}' AS bak`);try{let b=new Set(n),c=a.all("SELECT name, sql FROM main.sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'").filter(a=>!b.has(a.name));a.transaction(()=>{for(let b of c){let c=b.sql.replace(/CREATE TABLE\s+/i,"CREATE TABLE bak.");a.exec(c),a.exec(`INSERT INTO bak.${b.name} SELECT * FROM main.${b.name}`)}})}finally{try{a.exec("DETACH DATABASE bak")}catch{}}}(a,b),p(),console.log(`[DB][migrate] pre-schema backup ${c} → ${i.f$}: ${b}`)}catch(a){console.warn(`[DB][migrate] pre-schema backup failed (continuing): ${a.message}`)}!function(a){a.exec((0,i.zE)("_meta",i.CG._meta));let b=parseInt((0,k.dy)(a,"schemaVersion","0"),10)||0;if(b>=(j.length?j[j.length-1].version:0))return;let c=j.filter(a=>a.version>b);for(let b of c)a.transaction(()=>{b.up(a),(0,k.np)(a,"schemaVersion",b.version)}),b.version,console.log(`[DB][migrate] applied #${b.version} ${b.name}`);c.length}(a);for(let[b,c]of Object.entries(i.CG)){a.exec((0,i.zE)(b,c));let d=new Set(a.all(`PRAGMA table_info(${b})`).map(a=>a.name));for(let[e,f]of Object.entries(c.columns))if(!d.has(e)){let c=f.replace(/PRIMARY KEY( AUTOINCREMENT)?/i,"").replace(/UNIQUE/i,"").trim();try{a.exec(`ALTER TABLE ${b} ADD COLUMN ${e} ${c}`),console.log(`[DB][sync] +column ${b}.${e}`)}catch(a){console.warn(`[DB][sync] add column ${b}.${e} failed: ${a.message}`)}}for(let b of c.indexes||[])try{a.exec(b)}catch{}}(0,k.np)(a,"backupSchemaVersion",i.f$);let d=e().existsSync(r),f=v(h.Or.main),l=v(h.Or.usage),w=v(h.Or.disabled),x=v(h.Or.details);if(b&&(f||l||w||x)&&!d){let b=Date.now(),c=o("migrate-from-json");for(let a of Object.values(h.Or))!function(a,b,c=null){if(!e().existsSync(a))return;let d=c||g().basename(a),f=g().join(b,d);e().copyFileSync(a,f)}(a,c);try{a.transaction(()=>{if(f&&"object"==typeof f){for(let[b,c]of(f.settings&&a.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,q.s)(f.settings)]),u(a,"providerConnections",f.providerConnections||[],b=>{let{id:c,provider:d,authType:e,name:f,email:g,priority:h,isActive:i,createdAt:j,updatedAt:k,...l}=b;a.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[c,d,e||"oauth",f||null,g||null,h||null,+(!1!==i),(0,q.s)(l),j||new Date().toISOString(),k||new Date().toISOString()])},a=>({id:a.id??null,provider:a.provider??null,name:a.name??null})),u(a,"providerNodes",f.providerNodes||[],b=>{let{id:c,type:d,name:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,d||null,e||null,(0,q.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null,type:a.type??null,name:a.name??null})),u(a,"proxyPools",f.proxyPools||[],b=>{let{id:c,isActive:d,testStatus:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,+(!1!==d),e||"unknown",(0,q.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null})),u(a,"apiKeys",f.apiKeys||[],b=>{a.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.key,b.name||null,b.machineId||null,+(!1!==b.isActive),b.createdAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),u(a,"combos",f.combos||[],b=>{a.run("INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.name,b.kind||null,(0,q.s)(b.models||[]),b.createdAt||new Date().toISOString(),b.updatedAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),Object.entries(f.modelAliases||{})))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[b,(0,q.s)(c)]);for(let b of f.customModels||[]){let c=`${b.providerAlias}|${b.id}|${b.type||"llm"}`;a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[c,(0,q.s)(b)])}for(let[b,c]of Object.entries(f.mitmAlias||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[b,(0,q.s)(c||{})]);for(let[b,c]of Object.entries(f.pricing||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[b,(0,q.s)(c||{})])}if(l&&"object"==typeof l){for(let b of l.history||[]){let c=b.tokens||{};a.run("INSERT INTO usageHistory(timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, status, tokens, meta) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[b.timestamp||new Date().toISOString(),b.provider||null,b.model||null,b.connectionId||null,b.apiKey||null,b.endpoint||null,c.prompt_tokens||c.input_tokens||0,c.completion_tokens||c.output_tokens||0,b.cost||0,b.status||"ok",(0,q.s)(c),(0,q.s)({})])}for(let[b,c]of Object.entries(l.dailySummary||{}))a.run("INSERT OR REPLACE INTO usageDaily(dateKey, data) VALUES(?, ?)",[b,(0,q.s)(c)]);"number"==typeof l.totalRequestsLifetime&&(0,k.np)(a,"totalRequestsLifetime",l.totalRequestsLifetime)}if(w&&"object"==typeof w.disabled)for(let[b,c]of Object.entries(w.disabled))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('disabledModels', ?, ?)",[b,(0,q.s)(c||[])]);if(x&&Array.isArray(x.records))for(let b of x.records)a.run("INSERT OR REPLACE INTO requestDetails(id, timestamp, provider, model, connectionId, status, data) VALUES(?, ?, ?, ?, ?, ?, ?)",[b.id,b.timestamp||new Date().toISOString(),b.provider||null,b.model||null,b.connectionId||null,b.status||null,(0,q.s)(b)]);(0,k.np)(a,"appVersion",m()),(0,k.np)(a,"backupSchemaVersion",i.f$),(0,k.np)(a,"migratedAt",new Date().toISOString())})}catch(a){if(a instanceof t)return void console.error(`[DB][migrate] aborted: ${a.message} | legacy JSON kept | backup: ${c}`);throw a}try{e().writeFileSync(r,new Date().toISOString())}catch{}p(),console.log(`[DB][migrate] JSON → SQLite in ${Date.now()-b}ms | legacy JSON kept at DATA_DIR | backup: ${c}`);return}let y=m();(0,k.dy)(a,"appVersion",null)!==y&&(0,k.np)(a,"appVersion",y)}},76040:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=
|
|
1
|
+
"use strict";exports.id=4055,exports.ids=[4055],exports.modules={4055:(a,b,c)=>{c.d(b,{runMigrationOnce:()=>w});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(7841),i=c(76040);let j=[{version:1,name:"initial",up(a){for(let[b,c]of Object.entries(i.CG))for(let d of(a.exec((0,i.zE)(b,c)),c.indexes||[]))a.exec(d)}}].sort((a,b)=>a.version-b.version);var k=c(91117);let l=null;function m(){if(l)return l;try{let a=g().join(process.cwd(),"package.json");l=JSON.parse(e().readFileSync(a,"utf-8")).version||"0.0.0"}catch{l="0.0.0"}return l}let n=["requestDetails"];function o(a){(0,h.Jh)();let b=m(),c=`${a}-${b}-${function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}${b(a.getMonth()+1)}${b(a.getDate())}-${b(a.getHours())}${b(a.getMinutes())}${b(a.getSeconds())}`}()}`,d=g().join(h.KQ,c);return e().mkdirSync(d,{recursive:!0}),d}function p(){if(e().existsSync(h.KQ))for(let a of e().readdirSync(h.KQ,{withFileTypes:!0}).filter(a=>a.isDirectory()).map(a=>({name:a.name,full:g().join(h.KQ,a.name),mtime:e().statSync(g().join(h.KQ,a.name)).mtimeMs})).sort((a,b)=>b.mtime-a.mtime).slice(3))try{e().rmSync(a.full,{recursive:!0,force:!0})}catch{}}var q=c(33323);let r=g().join(h.HG,".migrated-from-json"),s=new WeakSet;class t extends Error{constructor(a,b){super(a),this.name="MigrationAborted",this.droppedRows=b}}function u(a,b,c,d,e){let f=[];for(let a of c)try{d(a)}catch(b){f.push({...e(a),reason:b.message})}let g=a.get(`SELECT COUNT(*) as c FROM ${b}`)?.c??0;if(g!==c.length)throw console.warn(`[DB][migrate] ${b} row-count mismatch: expected ${c.length}, got ${g}. Dropped:`,f),new t(`${b} row-count mismatch: expected ${c.length}, got ${g}`,f)}function v(a){if(!e().existsSync(a))return null;try{return JSON.parse(e().readFileSync(a,"utf-8"))}catch{return null}}async function w(a){if(s.has(a))return;s.add(a);let b=function(a){try{let b=a.get("SELECT COUNT(*) as c FROM _meta");return!b||0===b.c}catch{return!0}}(a);p(),a.exec((0,i.zE)("_meta",i.CG._meta));let c=parseInt((0,k.dy)(a,"backupSchemaVersion","0"),10)||0;if(!b&&c<i.f$)try{let b=o(`schema-${c}-to-${i.f$}`);!function(a,b,c="data.sqlite"){let d=g().join(b,c);try{e().rmSync(d,{force:!0})}catch{}let f=d.replace(/'/g,"''");a.exec(`ATTACH DATABASE '${f}' AS bak`);try{let b=new Set(n),c=a.all("SELECT name, sql FROM main.sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'").filter(a=>!b.has(a.name));a.transaction(()=>{for(let b of c){let c=b.sql.replace(/CREATE TABLE\s+/i,"CREATE TABLE bak.");a.exec(c),a.exec(`INSERT INTO bak.${b.name} SELECT * FROM main.${b.name}`)}})}finally{try{a.exec("DETACH DATABASE bak")}catch{}}}(a,b),p(),console.log(`[DB][migrate] pre-schema backup ${c} → ${i.f$}: ${b}`)}catch(a){console.warn(`[DB][migrate] pre-schema backup failed (continuing): ${a.message}`)}!function(a){a.exec((0,i.zE)("_meta",i.CG._meta));let b=parseInt((0,k.dy)(a,"schemaVersion","0"),10)||0;if(b>=(j.length?j[j.length-1].version:0))return;let c=j.filter(a=>a.version>b);for(let b of c)a.transaction(()=>{b.up(a),(0,k.np)(a,"schemaVersion",b.version)}),b.version,console.log(`[DB][migrate] applied #${b.version} ${b.name}`);c.length}(a);for(let[b,c]of Object.entries(i.CG)){a.exec((0,i.zE)(b,c));let d=new Set(a.all(`PRAGMA table_info(${b})`).map(a=>a.name));for(let[e,f]of Object.entries(c.columns))if(!d.has(e)){let c=f.replace(/PRIMARY KEY( AUTOINCREMENT)?/i,"").replace(/UNIQUE/i,"").trim();try{a.exec(`ALTER TABLE ${b} ADD COLUMN ${e} ${c}`),console.log(`[DB][sync] +column ${b}.${e}`)}catch(a){console.warn(`[DB][sync] add column ${b}.${e} failed: ${a.message}`)}}for(let b of c.indexes||[])try{a.exec(b)}catch{}}(0,k.np)(a,"backupSchemaVersion",i.f$);let d=e().existsSync(r),f=v(h.Or.main),l=v(h.Or.usage),w=v(h.Or.disabled),x=v(h.Or.details);if(b&&(f||l||w||x)&&!d){let b=Date.now(),c=o("migrate-from-json");for(let a of Object.values(h.Or))!function(a,b,c=null){if(!e().existsSync(a))return;let d=c||g().basename(a),f=g().join(b,d);e().copyFileSync(a,f)}(a,c);try{a.transaction(()=>{if(f&&"object"==typeof f){for(let[b,c]of(f.settings&&a.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,q.s)(f.settings)]),u(a,"providerConnections",f.providerConnections||[],b=>{let{id:c,provider:d,authType:e,name:f,email:g,priority:h,isActive:i,createdAt:j,updatedAt:k,...l}=b;a.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[c,d,e||"oauth",f||null,g||null,h||null,+(!1!==i),(0,q.s)(l),j||new Date().toISOString(),k||new Date().toISOString()])},a=>({id:a.id??null,provider:a.provider??null,name:a.name??null})),u(a,"providerNodes",f.providerNodes||[],b=>{let{id:c,type:d,name:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,d||null,e||null,(0,q.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null,type:a.type??null,name:a.name??null})),u(a,"proxyPools",f.proxyPools||[],b=>{let{id:c,isActive:d,testStatus:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,+(!1!==d),e||"unknown",(0,q.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null})),u(a,"apiKeys",f.apiKeys||[],b=>{a.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.key,b.name||null,b.machineId||null,+(!1!==b.isActive),b.createdAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),u(a,"combos",f.combos||[],b=>{a.run("INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.name,b.kind||null,(0,q.s)(b.models||[]),b.createdAt||new Date().toISOString(),b.updatedAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),Object.entries(f.modelAliases||{})))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[b,(0,q.s)(c)]);for(let b of f.customModels||[]){let c=`${b.providerAlias}|${b.id}|${b.type||"llm"}`;a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[c,(0,q.s)(b)])}for(let[b,c]of Object.entries(f.mitmAlias||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[b,(0,q.s)(c||{})]);for(let[b,c]of Object.entries(f.pricing||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[b,(0,q.s)(c||{})])}if(l&&"object"==typeof l){for(let b of l.history||[]){let c=b.tokens||{};a.run("INSERT INTO usageHistory(timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, status, tokens, meta) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[b.timestamp||new Date().toISOString(),b.provider||null,b.model||null,b.connectionId||null,b.apiKey||null,b.endpoint||null,c.prompt_tokens||c.input_tokens||0,c.completion_tokens||c.output_tokens||0,b.cost||0,b.status||"ok",(0,q.s)(c),(0,q.s)({})])}for(let[b,c]of Object.entries(l.dailySummary||{}))a.run("INSERT OR REPLACE INTO usageDaily(dateKey, data) VALUES(?, ?)",[b,(0,q.s)(c)]);"number"==typeof l.totalRequestsLifetime&&(0,k.np)(a,"totalRequestsLifetime",l.totalRequestsLifetime)}if(w&&"object"==typeof w.disabled)for(let[b,c]of Object.entries(w.disabled))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('disabledModels', ?, ?)",[b,(0,q.s)(c||[])]);if(x&&Array.isArray(x.records))for(let b of x.records)a.run("INSERT OR REPLACE INTO requestDetails(id, timestamp, provider, model, connectionId, status, data) VALUES(?, ?, ?, ?, ?, ?, ?)",[b.id,b.timestamp||new Date().toISOString(),b.provider||null,b.model||null,b.connectionId||null,b.status||null,(0,q.s)(b)]);(0,k.np)(a,"appVersion",m()),(0,k.np)(a,"backupSchemaVersion",i.f$),(0,k.np)(a,"migratedAt",new Date().toISOString())})}catch(a){if(a instanceof t)return void console.error(`[DB][migrate] aborted: ${a.message} | legacy JSON kept | backup: ${c}`);throw a}try{e().writeFileSync(r,new Date().toISOString())}catch{}p(),console.log(`[DB][migrate] JSON → SQLite in ${Date.now()-b}ms | legacy JSON kept at DATA_DIR | backup: ${c}`);return}let y=m();(0,k.dy)(a,"appVersion",null)!==y&&(0,k.np)(a,"appVersion",y)}},76040:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=2,e=`
|
|
2
2
|
PRAGMA journal_mode = WAL;
|
|
3
3
|
PRAGMA synchronous = NORMAL;
|
|
4
4
|
PRAGMA temp_store = MEMORY;
|
|
@@ -6,4 +6,4 @@ PRAGMA mmap_size = 30000000;
|
|
|
6
6
|
PRAGMA cache_size = -64000;
|
|
7
7
|
PRAGMA foreign_keys = ON;
|
|
8
8
|
PRAGMA busy_timeout = 5000;
|
|
9
|
-
`,f={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",endpoint:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function g(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}}};
|
|
9
|
+
`,f={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL",accessRestricted:"INTEGER DEFAULT 0",accessAllow:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",endpoint:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function g(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}}};
|