@rabbi696/ezrouter 0.6.15 â 0.6.16
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 +72 -1
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +27 -27
- package/app/.next-cli-build/build-manifest.json +2 -2
- 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/convoy/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/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/error-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +10 -6
- 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 +1 -1
- 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 +3 -3
- 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 +1 -1
- 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/routing-health/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/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.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/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.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 +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- 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 +1 -1
- 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/changelog/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
- 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.nft.json +1 -1
- 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-native/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
- 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.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.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 +1 -1
- 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.nft.json +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 +1 -1
- 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-settings/route.js.nft.json +1 -1
- 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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +1 -1
- 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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- 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/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/import/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/combos/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/convoy/rules/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.nft.json +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/internal/codex-native/lease/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/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.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/mcp-gateway/instances/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/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.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.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/enabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/enabled/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/callback/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.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.nft.json +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.nft.json +1 -1
- 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]/refresh-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/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.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.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 +1 -1
- 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 +1 -1
- 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/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.nft.json +1 -1
- 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.nft.json +1 -1
- 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 +1 -1
- 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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
- 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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/routing-health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/routing-health/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.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.nft.json +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/token-saver/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tool-disclosure/stats/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 +1 -1
- 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.nft.json +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/error-logs/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/alpha/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/alpha/search/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.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/codex/alpha/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/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 +3 -3
- 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.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.nft.json +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 +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +1 -1
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- 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 +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- 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 +4 -4
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- 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 +27 -27
- package/app/.next-cli-build/server/chunks/1253.js +1 -1
- package/app/.next-cli-build/server/chunks/1482.js +4 -2
- package/app/.next-cli-build/server/chunks/1531.js +1 -1
- package/app/.next-cli-build/server/chunks/1641.js +1 -0
- package/app/.next-cli-build/server/chunks/1733.js +1 -1
- package/app/.next-cli-build/server/chunks/1847.js +1 -1
- package/app/.next-cli-build/server/chunks/2269.js +1 -1
- package/app/.next-cli-build/server/chunks/2348.js +1 -1
- package/app/.next-cli-build/server/chunks/2898.js +1 -1
- package/app/.next-cli-build/server/chunks/3583.js +2 -2
- package/app/.next-cli-build/server/chunks/3593.js +2 -2
- package/app/.next-cli-build/server/chunks/369.js +22 -22
- package/app/.next-cli-build/server/chunks/3886.js +1 -1
- package/app/.next-cli-build/server/chunks/3912.js +1 -1
- package/app/.next-cli-build/server/chunks/3977.js +2 -2
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4378.js +3 -3
- package/app/.next-cli-build/server/chunks/4485.js +1 -1
- package/app/.next-cli-build/server/chunks/4574.js +1 -1
- package/app/.next-cli-build/server/chunks/4646.js +1 -1
- package/app/.next-cli-build/server/chunks/4704.js +2 -2
- package/app/.next-cli-build/server/chunks/4739.js +2 -2
- package/app/.next-cli-build/server/chunks/4768.js +1 -1
- package/app/.next-cli-build/server/chunks/4780.js +2 -2
- package/app/.next-cli-build/server/chunks/4803.js +2 -2
- package/app/.next-cli-build/server/chunks/4827.js +1 -1
- package/app/.next-cli-build/server/chunks/4878.js +1 -1
- package/app/.next-cli-build/server/chunks/5011.js +1 -1
- package/app/.next-cli-build/server/chunks/507.js +2 -2
- package/app/.next-cli-build/server/chunks/5130.js +1 -1
- package/app/.next-cli-build/server/chunks/{8421.js â 5251.js} +1 -1
- package/app/.next-cli-build/server/chunks/5258.js +2 -2
- package/app/.next-cli-build/server/chunks/5434.js +1 -1
- package/app/.next-cli-build/server/chunks/5460.js +40 -0
- package/app/.next-cli-build/server/chunks/5704.js +254 -0
- package/app/.next-cli-build/server/chunks/5872.js +1 -0
- package/app/.next-cli-build/server/chunks/5875.js +1 -1
- package/app/.next-cli-build/server/chunks/6252.js +2 -2
- package/app/.next-cli-build/server/chunks/6420.js +1 -1
- package/app/.next-cli-build/server/chunks/6670.js +2 -2
- package/app/.next-cli-build/server/chunks/6769.js +1 -0
- package/app/.next-cli-build/server/chunks/6799.js +2 -2
- package/app/.next-cli-build/server/chunks/698.js +2 -2
- package/app/.next-cli-build/server/chunks/7073.js +2 -2
- package/app/.next-cli-build/server/chunks/7218.js +1 -1
- package/app/.next-cli-build/server/chunks/7239.js +2 -2
- package/app/.next-cli-build/server/chunks/7362.js +1 -1
- package/app/.next-cli-build/server/chunks/7594.js +6 -6
- package/app/.next-cli-build/server/chunks/7663.js +1 -1
- package/app/.next-cli-build/server/chunks/7677.js +1 -1
- package/app/.next-cli-build/server/chunks/7775.js +1 -1
- package/app/.next-cli-build/server/chunks/7811.js +1 -0
- package/app/.next-cli-build/server/chunks/7965.js +2 -2
- package/app/.next-cli-build/server/chunks/8062.js +2 -2
- package/app/.next-cli-build/server/chunks/8129.js +1 -1
- package/app/.next-cli-build/server/chunks/8231.js +1 -1
- package/app/.next-cli-build/server/chunks/8243.js +5 -5
- package/app/.next-cli-build/server/chunks/8306.js +1 -1
- package/app/.next-cli-build/server/chunks/8469.js +2 -2
- package/app/.next-cli-build/server/chunks/8520.js +2 -2
- package/app/.next-cli-build/server/chunks/8644.js +1 -1
- package/app/.next-cli-build/server/chunks/8772.js +1 -1
- package/app/.next-cli-build/server/chunks/8976.js +1 -1
- package/app/.next-cli-build/server/chunks/9026.js +24 -24
- package/app/.next-cli-build/server/chunks/9062.js +1 -1
- package/app/.next-cli-build/server/chunks/9303.js +1 -1
- package/app/.next-cli-build/server/chunks/9485.js +1 -1
- package/app/.next-cli-build/server/chunks/9718.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +3 -3
- 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/static/chunks/1321-73fdccd2b1bf151d.js +1 -0
- package/app/.next-cli-build/static/chunks/{5497-8766958582f95dc7.js â 5497-ff58e90f4053e184.js} +3 -3
- package/app/.next-cli-build/static/chunks/{6252-34f2d410651e1103.js â 6252-886aa8324e135e9c.js} +13 -13
- package/app/.next-cli-build/static/chunks/8105-9b41dc96e4b019cf.js +1 -0
- package/app/.next-cli-build/static/chunks/9227-4471c8f39a105c5f.js +5 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-89b4f70958736f2a.js â page-c35f746b4bd9fc90.js} +18 -14
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-fa195b4f7348e2d6.js â page-0868ecc0d2f1bd04.js} +2 -2
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-a31d9ca05cc3d528.js â page-6cb070834a750fdd.js} +1 -1
- package/app/CHANGELOG.md +54 -32
- package/app/package.json +1 -1
- package/app/public/CHANGELOG.md +54 -32
- package/app/src/mitm/server.js +24 -24
- package/cli.js +71 -69
- package/package.json +1 -1
- package/src/cli/commands/connect.js +157 -15
- package/src/cli/commands/connectTools.js +222 -4
- package/src/cli/commands/show.js +101 -0
- package/src/cli/menus/providers.js +8 -0
- package/app/.next-cli-build/server/chunks/3252.js +0 -1
- package/app/.next-cli-build/server/chunks/3267.js +0 -40
- package/app/.next-cli-build/server/chunks/6707.js +0 -1
- package/app/.next-cli-build/server/chunks/8450.js +0 -254
- package/app/.next-cli-build/server/chunks/9143.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-043afc56cba448b8.js +0 -1
- package/app/.next-cli-build/static/chunks/8105-9dfc2c5ffef6e778.js +0 -1
- package/app/.next-cli-build/static/chunks/9227-af65f6ac1fca28c9.js +0 -3
- /package/app/.next-cli-build/static/{zQapcWqcr7oLVi5jh7t01 â Y5Sk8uSUyB0vJ-ZgW1X1U}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{zQapcWqcr7oLVi5jh7t01 â Y5Sk8uSUyB0vJ-ZgW1X1U}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=4768,exports.ids=[4768],exports.modules={44768:(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}}c.d(b,{exchangeTokens:()=>ab,fetchKiroProfileArn:()=>h}),c(48450),c(25467);var i=c(13073);let j={config:i.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})},k={config:i.DI,flowType:"authorization_code_pkce",fixedPort:i.DI.fixedPort,callbackPath:i.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=function(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}}(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||g(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}};var l=c(55511),m=c.n(l),n=c(25482);let o=null;async function p(){if(o)return o;try{let a=await fetch(n.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return o={authorizeUrl:d(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:d(b.token_endpoint,"token_endpoint")}}}catch{}return o={authorizeUrl:n.oT.authorizeUrl,tokenUrl:n.oT.tokenUrl}}let q={config:n.oT,flowType:"authorization_code_pkce",fixedPort:n.oT.loopbackPort,callbackPath:n.oT.callbackPath,pkceVerifierBytes:n.Ue,prepareConfig:async a=>{let b=await p();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let e=m().randomBytes(16).toString("hex"),f=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:e,plan:"generic",referrer:"cli-proxy-api"}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${f}`},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=e(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}};var r=c(83382);let s={config:i.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":r.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,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":r.hY},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 e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,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":r.hY,"x-xai-token-auth":"xai-grok-cli","x-grok-client-version":r.uG}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=e(a.id_token)||g(a.access_token)||b?.user?.email||null,d=b?.user?.userId||b?.user?.principalId||null,f=[b?.user?.firstName,b?.user?.lastName].filter(Boolean).join(" ").trim()||null,h=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:h,scope:a.scope,email:c||void 0,displayName:f||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}}}},t="1.0.0",u={config:i.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":t},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":t},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 e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,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":t},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 e=c.action_url||c.require_payment_action_url;if(!c.api_key&&(c.require_payment||e))throw Error(`Muse Code subscription required${e?`: ${e}`:""}`);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}}}},v={config:i.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(`${i.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},d="";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,i.cD)(),mode:1})});if(b.ok){let a=await b.json();d=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:d}},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})},w={config:i.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}),signal:AbortSignal.timeout(1e4)});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":i.YT.loadCodeAssistUserAgent,"x-request-source":"local"},c=(0,i.cD)(),d={};try{let b=await fetch(`${i.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"},signal:AbortSignal.timeout(5e3)});b.ok&&(d=await b.json())}catch(a){console.log("Failed to fetch user info:",a)}let e="",f="legacy-tier";try{let a=await fetch(i.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c}),signal:AbortSignal.timeout(5e3)});if(a.ok){let b=await a.json();if(e=b.cloudaicompanionProject?.id||b.cloudaicompanionProject||"",Array.isArray(b.allowedTiers)){for(let a of b.allowedTiers)if(a.isDefault&&a.id){f=a.id.trim();break}}}}catch(a){console.log("Failed to load code assist:",a)}return e&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(i.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:f,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:d,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})},x={config:i.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(`${i.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 d=c.data||{};if(!d.apiKey||""===d.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(d.email?.trim()||d.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:d}},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})};function y(a){return{config:a,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(5345).then(c.bind(c,37726)),d=await 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,_qoderMachineToken:d.machineToken}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(5345).then(c.bind(c,37726)),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||"",_qoderMachineToken:e?._qoderMachineToken||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||"",machineToken:a._qoderMachineToken||a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}}}let z=y(i.hF),A=y(i.t3),B={config:i.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(i.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":i.Nu.apiVersion,"User-Agent":i.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(i.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":i.Nu.apiVersion,"User-Agent":i.Nu.userAgent}});return{copilotToken:c,userInfo:d.ok?await d.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}})},C={config:i.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,i.S6)(d);let e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,f="idc"===c.authMethod?"idc":"builder-id",g=`https://oidc.${d}.amazonaws.com/client/register`,h=`https://oidc.${d}.amazonaws.com/device_authorization`,j=await fetch(g,{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(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:k.clientId,clientSecret:k.clientSecret,startUrl:e})});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:d,_authMethod:f,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,f=d?._region||"us-east-1";(0,i.S6)(f);let g=`https://oidc.${f}.amazonaws.com/token`,h=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:d?._clientId,clientSecret:d?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{e=await h.json()}catch(a){e={error:"invalid_response",error_description:await h.text()}}return e.accessToken?{ok:!0,data:{access_token:e.accessToken,refresh_token:e.refreshToken,expires_in:e.expiresIn,profile_arn:e?.profileArn||null,_clientId:d?._clientId,_clientSecret:d?._clientSecret,_region:d?._region,_authMethod:d?._authMethod,_startUrl:d?._startUrl}}:{ok:!1,data:{error:e.error||"authorization_pending",error_description:e.error_description||e.message}}},mapTokens:a=>{let b=g(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||i.Tx.startUrl}}}},D={config:i.WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})},E={config:i.aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,10793)),d=m().randomUUID(),e={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...b(d)},f=await fetch(a.deviceCodeUrl,{method:"POST",headers:e,body:new URLSearchParams({client_id:a.clientId})});if(!f.ok){let a=await f.text();throw Error(`Device code request failed: ${a}`)}let g=await f.json(),h=a.authorizeDeviceUrl||"https://www.kimi.com/code/authorize_device";return{device_code:g.device_code,user_code:g.user_code,verification_uri:g.verification_uri||h,verification_uri_complete:g.verification_uri_complete||`${h}?user_code=${g.user_code}`,expires_in:g.expires_in,interval:g.interval||5,_kimiDeviceId:d}},pollToken:async(a,b,d,e)=>{let f,{buildKimiHeaders:g}=await Promise.resolve().then(c.bind(c,10793)),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}:{}}})},F={config:i.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}}:{}})},G={config:i.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}})},H={config:i.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}})},I={config:i.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"}})},J={config:i.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:{}})},K={config:i.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:{}})},L={config:i.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}}}};function M(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}async function N(a){let b=JSON.stringify({loginTraceID:a,login_trace_id:a}),c="no successful response";for(let a of i.SK.loginGuidanceUrls)try{let d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":i.SK.userAgent},body:b});if(!d.ok){c=`${a} HTTP ${d.status}`;continue}let e=await d.json(),f=M(e,[["Result","LoginHost"],["Result","loginHost"],["Result","LoginURL"],["result","loginHost"],["data","Result","LoginHost"],["data","loginHost"],["LoginHost"],["loginHost"]]);if(f)return f;c=`${a} missing LoginHost`}catch(b){c=`${a} ${b.message}`}throw Error(`Trae GetLoginGuidance failed: ${c}`)}function O(){return[...i.SK.apiOrigins]}async function P(a,b){let c=JSON.stringify({ClientID:i.SK.clientId,RefreshToken:a,ClientSecret:i.SK.clientSecret,UserID:""}),d="no successful response";for(let e of O()){let f=`${e.replace(/\/$/,"")}${i.SK.exchangeTokenPath}`;try{let e,g={Accept:"application/json","Content-Type":"application/json","User-Agent":i.SK.userAgent};b&&(g["x-cloudide-token"]=b);let h=await fetch(f,{method:"POST",headers:g,body:c}),j=await h.text();if(!h.ok){d=`${f} HTTP ${h.status}`;continue}try{e=JSON.parse(j)}catch{d=`${f} invalid JSON`;continue}let k=M(e,[["Result","AccessToken"],["Result","accessToken"],["result","access_token"],["accessToken"]]);if(!k){let a=M(e,[["message"],["msg"],["error"],["Result","Message"]])||"missing AccessToken";d=`${f} ${a}`;continue}return{accessToken:k,refreshToken:M(e,[["Result","RefreshToken"],["result","refresh_token"],["refreshToken"]])||a,expiresIn:null,expiresAt:M(e,[["Result","ExpiresAt"],["Result","expiresAt"],["result","expires_at"],["expiresAt"]])}}catch(a){d=`${f} ${a.message}`}}throw Error(`Trae ExchangeToken failed: ${d}`)}async function Q(a){for(let b of O()){let c=`${b.replace(/\/$/,"")}${i.SK.getUserInfoPath}`;try{let b=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":i.SK.userAgent,"x-cloudide-token":a},body:JSON.stringify({})});if(!b.ok)continue;let d=await b.json();return{email:M(d,[["Result","NonPlainTextEmail"],["Result","Email"],["Result","email"],["email"],["data","email"]]),name:M(d,[["Result","ScreenName"],["Result","Nickname"],["Result","Name"],["result","nickname"],["nickname"],["name"]]),aiRegion:M(d,[["Result","AIRegion"],["Result","aiRegion"],["aiRegion"]]),region:M(d,[["Result","Region"],["Result","region"],["region"]]),tenant:M(d,[["Result","TenantID"],["Result","tenantId"],["tenantId"]]),userId:M(d,[["Result","UserID"],["Result","userId"],["userId"]])}}catch{}}return{email:null,name:null}}let R={config:i.SK,flowType:"authorization_code",callbackPath:i.SK.callbackPath,prepareConfig:async a=>{let b=m().randomUUID(),c=await N(b);return{...a,loginTraceID:b,loginHost:c}},buildAuthUrl:(a,b,c)=>{var d;let e,f,g={plugin_version:i.SK.defaultPluginVersion,machine_id:m().randomUUID(),device_id:i.SK.defaultDeviceId,x_device_brand:"unknown",x_device_type:"unknown",x_os_version:"unknown",x_env:"",x_app_version:i.SK.defaultAppVersion,x_app_type:i.SK.defaultAppType},h=a.loginTraceID||c;return d=a.loginHost,(e=new URL(d.startsWith("http")?d:`https://${d.replace(/^\/+/,"")}`)).pathname=i.SK.authorizationPath,(f=new URLSearchParams).set("login_version","1"),f.set("auth_from","trae"),f.set("login_channel","native_ide"),f.set("plugin_version",g.plugin_version),f.set("auth_type","local"),f.set("client_id",i.SK.clientId),f.set("redirect","0"),f.set("login_trace_id",h),f.set("auth_callback_url",b),f.set("machine_id",g.machine_id),f.set("device_id",g.device_id),f.set("x_device_id",g.device_id),f.set("x_machine_id",g.machine_id),f.set("x_device_brand",g.x_device_brand),f.set("x_device_type",g.x_device_type),f.set("x_os_version",g.x_os_version),f.set("x_env",g.x_env),f.set("x_app_version",g.x_app_version),f.set("x_app_type",g.x_app_type),e.search=f.toString(),e.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*i.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 P(d,e),_authMethod:"oauth"}},postExchange:async a=>({userInfo:await Q(a.accessToken)}),mapTokens:(a,b)=>{let c,d=a.expiresIn||(a.expiresAt?Math.max(60,Number(a.expiresAt)-Math.floor(Date.now()/1e3)):24*i.SK.tokenLifetimeDays*3600),e=b?.userInfo||{},f=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:f,region:e.region||f,tenant:e.tenant||"marscode",userId:e.userId||"",scope:"sg"===(c=(f||"").toLowerCase())||c.includes("singapore")?"marscode-sg":"cn"===c||c.includes("cn")||c.includes("china")?"marscode-cn":"marscode-us",webId:"",bizUserId:"",userUniqueId:"",appLanguage:"en",appVersion:i.SK.defaultAppVersion,userRegion:"SG"===f?"SG":"US",userIdentity:"Free"}}}};async function S(a,b,c){let d=`${a.replace(/\/$/,"")}${b}`,e=await fetch(d,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":i.eD.userAgent},body:JSON.stringify(c)}),f=await e.text();if(!e.ok)throw Error(`Windsurf ${b} HTTP ${e.status}: ${f.slice(0,200)}`);try{return JSON.parse(f)}catch{throw Error(`Windsurf ${b} invalid JSON`)}}async function T(a){let b=await S(i.eD.registerApiBaseUrl,i.eD.registerPath,{firebase_id_token:a}),c=M(b,[["apiKey"],["api_key"]]);if(!c)throw Error("Windsurf RegisterUser missing apiKey");return{apiKey:c,apiServerUrl:M(b,[["apiServerUrl"],["api_server_url"]])||i.eD.defaultApiServerUrl,name:M(b,[["name"]])}}async function U(a,b){try{let c=await S(a,i.eD.oneTimeAuthPath,{firebaseIdToken:b}),d=M(c,[["authToken"],["auth_token"]]);if(!d)return{email:null,name:null};let e=await S(a,i.eD.currentUserPath,{authToken:d,includeSubscription:!0}),f=e.user||e;return{email:M(f,[["email"]]),name:M(f,[["name"]])}}catch{return{email:null,name:null}}}let V={config:i.eD,flowType:"authorization_code",callbackPath:i.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 T(b);return{accessToken:c.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:c.apiServerUrl,firebaseIdToken:b,_authMethod:"imported"}}let{firebaseIdToken:g}=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),h=await T(g);return{accessToken:h.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:h.apiServerUrl,firebaseIdToken:g,_authMethod:"oauth"}},postExchange:async a=>a.firebaseIdToken?{userInfo:await U(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}})};var W=c(33373);async function X(a,b){let c=await Y(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})=>$(a.organizationName))||b[0],d=c.projects.find(a=>$(a?.projectName))||c.projects[0];return c.organization?.organizationId&&d?.projectId?{organizationId:c.organization.organizationId,projectId:d.projectId}:null}(await Z(`${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`,g=await Z(f,{headers:d},"api keys")||[],h=Array.isArray(g)?g.find(b=>b?.name===a.planApiKeyName):null;h||(h=await Z(f,{method:"POST",headers:d,body:JSON.stringify({name:a.planApiKeyName})},"api key create"));let i=h?.apiKey?.trim();if(!i)throw Error("Z.ai api_keys response is missing apiKey");let j=await Z(`${f}/copy/${encodeURIComponent(i)}`,{headers:d},"api key copy"),k=j?.secretKey?.trim();if(!k)throw Error("Z.ai api key copy response is missing secretKey");return{planApiKey:`${i}.${k}`,businessToken:c}}async function Y(a,b){let c=await Z(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 Z(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(!_(d?.code)||d?.success===!1)throw Error(d?.msg||`Z.ai ${c} returned business error ${d?.code}`);return d?.data??d??null}function $(a){let b=String(a||"").trim().toLowerCase();return b.includes("éģ莤æēæ")||b.includes("éģ莤饚įŽ")||"default"===b}function _(a){return null==a||0===a||200===a||"0"===a||"200"===a}let aa={claude:j,codex:k,xai:q,"grok-cli":s,muse:u,"gemini-cli":v,antigravity:w,iflow:x,qoder:z,"qoder-cn":A,github:B,kiro:C,cursor:D,kimi:E,kilocode:F,cline:G,clinepass:H,gitlab:I,"codebuddy-cn":J,"codebuddy-intl":K,kimchi:L,trae:R,windsurf:V,zed:{config:i.RY,flowType:"authorization_code",callbackPath:"/",prepareConfig:async(a,b)=>{let c=Number(b?.nativeAppPort)||i.RY.defaultNativeAppPort,d=(0,W.le)(a,{nativeAppPort:c});return{...a,...d}},buildAuthUrl:(a,b,c)=>a.authUrl,exchangeToken:async(a,b,c,d,e,f)=>{let{userId:g,encryptedAccessToken:h}=(0,W.Q_)(b);return{accessToken:(0,W.Wc)(h,d),userId:g,systemId:f?.systemId||a.systemId}},postExchange:async a=>{let b={accessToken:a.accessToken,providerSpecificData:{userId:a.userId,systemId:a.systemId}},c=null;try{c=await (0,W.qJ)(b,{config:i.RY})}catch{}let d=(0,W.k9)(b,c);return{userInfo:c,organizationId:d,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||""}})},glm:{config:i._0,flowType:"device_code",requestDeviceCode:async a=>{let b=m().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(!_(d.code)||!d.data)throw Error(d.msg||"ZCode OAuth init returned no data");let e=d.data;if(!e.flow_id||!e.authorize_url)throw Error("ZCode OAuth init response missing flow_id/authorize_url");return{device_code:e.flow_id,verification_uri:e.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}(e.expires_at)??300,interval:e.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 f=await fetch(`${a.cliPollUrl}/${encodeURIComponent(b)}`,{headers:{Authorization:`Bearer ${e}`}});if(!f.ok)return{ok:!0,data:{error:"access_denied",error_description:`ZCode poll failed (HTTP ${f.status})`}};let g=await f.json();if(!_(g.code))return{ok:!0,data:{error:"access_denied",error_description:g.msg||"ZCode poll failed"}};let h=g.data||{};if("pending"===h.status)return{ok:!0,data:{error:"authorization_pending"}};if("failed"===h.status)return{ok:!0,data:{error:"access_denied",error_description:"ZCode authorization failed or was cancelled"}};if("ready"!==h.status)return{ok:!0,data:{error:"authorization_pending",error_description:`Unknown status: ${h.status}`}};let i=h[a.providerId]||h[h.providerId]||{},j=i.access_token||i.accessToken||h.accessToken||h.access_token;if(!j)return{ok:!0,data:{error:"access_denied",error_description:"ZCode poll response missing access token"}};let{planApiKey:k,businessToken:l}=await X(a,j);return{ok:!0,data:{access_token:k,_zcodeJwtToken:h.token||"",_zaiBusinessToken:l,_zaiRefreshToken:i.refresh_token||i.refreshToken||h.refresh_token||h.refreshToken||"",_zcodeUser:h.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}:{}}}}}};async function ab(a,b,c,d,e,f){let g=function(a){let b=aa["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}(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)}}};
|
|
1
|
+
"use strict";exports.id=4768,exports.ids=[4768],exports.modules={44768:(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}}c.d(b,{exchangeTokens:()=>ab,fetchKiroProfileArn:()=>h}),c(65704),c(25467);var i=c(13073);let j={config:i.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})},k={config:i.DI,flowType:"authorization_code_pkce",fixedPort:i.DI.fixedPort,callbackPath:i.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=function(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}}(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||g(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}};var l=c(55511),m=c.n(l),n=c(25482);let o=null;async function p(){if(o)return o;try{let a=await fetch(n.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return o={authorizeUrl:d(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:d(b.token_endpoint,"token_endpoint")}}}catch{}return o={authorizeUrl:n.oT.authorizeUrl,tokenUrl:n.oT.tokenUrl}}let q={config:n.oT,flowType:"authorization_code_pkce",fixedPort:n.oT.loopbackPort,callbackPath:n.oT.callbackPath,pkceVerifierBytes:n.Ue,prepareConfig:async a=>{let b=await p();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let e=m().randomBytes(16).toString("hex"),f=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:e,plan:"generic",referrer:"cli-proxy-api"}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${f}`},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=e(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}};var r=c(83382);let s={config:i.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":r.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,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":r.hY},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 e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,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":r.hY,"x-xai-token-auth":"xai-grok-cli","x-grok-client-version":r.uG}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=e(a.id_token)||g(a.access_token)||b?.user?.email||null,d=b?.user?.userId||b?.user?.principalId||null,f=[b?.user?.firstName,b?.user?.lastName].filter(Boolean).join(" ").trim()||null,h=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:h,scope:a.scope,email:c||void 0,displayName:f||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}}}},t="1.0.0",u={config:i.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":t},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":t},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 e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,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":t},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 e=c.action_url||c.require_payment_action_url;if(!c.api_key&&(c.require_payment||e))throw Error(`Muse Code subscription required${e?`: ${e}`:""}`);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}}}},v={config:i.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(`${i.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},d="";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,i.cD)(),mode:1})});if(b.ok){let a=await b.json();d=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:d}},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})},w={config:i.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}),signal:AbortSignal.timeout(1e4)});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":i.YT.loadCodeAssistUserAgent,"x-request-source":"local"},c=(0,i.cD)(),d={};try{let b=await fetch(`${i.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"},signal:AbortSignal.timeout(5e3)});b.ok&&(d=await b.json())}catch(a){console.log("Failed to fetch user info:",a)}let e="",f="legacy-tier";try{let a=await fetch(i.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c}),signal:AbortSignal.timeout(5e3)});if(a.ok){let b=await a.json();if(e=b.cloudaicompanionProject?.id||b.cloudaicompanionProject||"",Array.isArray(b.allowedTiers)){for(let a of b.allowedTiers)if(a.isDefault&&a.id){f=a.id.trim();break}}}}catch(a){console.log("Failed to load code assist:",a)}return e&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(i.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:f,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:d,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})},x={config:i.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(`${i.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 d=c.data||{};if(!d.apiKey||""===d.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(d.email?.trim()||d.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:d}},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})};function y(a){return{config:a,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(5345).then(c.bind(c,37726)),d=await 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,_qoderMachineToken:d.machineToken}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(5345).then(c.bind(c,37726)),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||"",_qoderMachineToken:e?._qoderMachineToken||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||"",machineToken:a._qoderMachineToken||a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}}}let z=y(i.hF),A=y(i.t3),B={config:i.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(i.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":i.Nu.apiVersion,"User-Agent":i.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(i.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":i.Nu.apiVersion,"User-Agent":i.Nu.userAgent}});return{copilotToken:c,userInfo:d.ok?await d.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}})},C={config:i.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,i.S6)(d);let e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,f="idc"===c.authMethod?"idc":"builder-id",g=`https://oidc.${d}.amazonaws.com/client/register`,h=`https://oidc.${d}.amazonaws.com/device_authorization`,j=await fetch(g,{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(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:k.clientId,clientSecret:k.clientSecret,startUrl:e})});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:d,_authMethod:f,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,f=d?._region||"us-east-1";(0,i.S6)(f);let g=`https://oidc.${f}.amazonaws.com/token`,h=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:d?._clientId,clientSecret:d?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{e=await h.json()}catch(a){e={error:"invalid_response",error_description:await h.text()}}return e.accessToken?{ok:!0,data:{access_token:e.accessToken,refresh_token:e.refreshToken,expires_in:e.expiresIn,profile_arn:e?.profileArn||null,_clientId:d?._clientId,_clientSecret:d?._clientSecret,_region:d?._region,_authMethod:d?._authMethod,_startUrl:d?._startUrl}}:{ok:!1,data:{error:e.error||"authorization_pending",error_description:e.error_description||e.message}}},mapTokens:a=>{let b=g(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||i.Tx.startUrl}}}},D={config:i.WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})},E={config:i.aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,10793)),d=m().randomUUID(),e={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...b(d)},f=await fetch(a.deviceCodeUrl,{method:"POST",headers:e,body:new URLSearchParams({client_id:a.clientId})});if(!f.ok){let a=await f.text();throw Error(`Device code request failed: ${a}`)}let g=await f.json(),h=a.authorizeDeviceUrl||"https://www.kimi.com/code/authorize_device";return{device_code:g.device_code,user_code:g.user_code,verification_uri:g.verification_uri||h,verification_uri_complete:g.verification_uri_complete||`${h}?user_code=${g.user_code}`,expires_in:g.expires_in,interval:g.interval||5,_kimiDeviceId:d}},pollToken:async(a,b,d,e)=>{let f,{buildKimiHeaders:g}=await Promise.resolve().then(c.bind(c,10793)),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}:{}}})},F={config:i.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}}:{}})},G={config:i.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}})},H={config:i.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}})},I={config:i.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"}})},J={config:i.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:{}})},K={config:i.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:{}})},L={config:i.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}}}};function M(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}async function N(a){let b=JSON.stringify({loginTraceID:a,login_trace_id:a}),c="no successful response";for(let a of i.SK.loginGuidanceUrls)try{let d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":i.SK.userAgent},body:b});if(!d.ok){c=`${a} HTTP ${d.status}`;continue}let e=await d.json(),f=M(e,[["Result","LoginHost"],["Result","loginHost"],["Result","LoginURL"],["result","loginHost"],["data","Result","LoginHost"],["data","loginHost"],["LoginHost"],["loginHost"]]);if(f)return f;c=`${a} missing LoginHost`}catch(b){c=`${a} ${b.message}`}throw Error(`Trae GetLoginGuidance failed: ${c}`)}function O(){return[...i.SK.apiOrigins]}async function P(a,b){let c=JSON.stringify({ClientID:i.SK.clientId,RefreshToken:a,ClientSecret:i.SK.clientSecret,UserID:""}),d="no successful response";for(let e of O()){let f=`${e.replace(/\/$/,"")}${i.SK.exchangeTokenPath}`;try{let e,g={Accept:"application/json","Content-Type":"application/json","User-Agent":i.SK.userAgent};b&&(g["x-cloudide-token"]=b);let h=await fetch(f,{method:"POST",headers:g,body:c}),j=await h.text();if(!h.ok){d=`${f} HTTP ${h.status}`;continue}try{e=JSON.parse(j)}catch{d=`${f} invalid JSON`;continue}let k=M(e,[["Result","AccessToken"],["Result","accessToken"],["result","access_token"],["accessToken"]]);if(!k){let a=M(e,[["message"],["msg"],["error"],["Result","Message"]])||"missing AccessToken";d=`${f} ${a}`;continue}return{accessToken:k,refreshToken:M(e,[["Result","RefreshToken"],["result","refresh_token"],["refreshToken"]])||a,expiresIn:null,expiresAt:M(e,[["Result","ExpiresAt"],["Result","expiresAt"],["result","expires_at"],["expiresAt"]])}}catch(a){d=`${f} ${a.message}`}}throw Error(`Trae ExchangeToken failed: ${d}`)}async function Q(a){for(let b of O()){let c=`${b.replace(/\/$/,"")}${i.SK.getUserInfoPath}`;try{let b=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":i.SK.userAgent,"x-cloudide-token":a},body:JSON.stringify({})});if(!b.ok)continue;let d=await b.json();return{email:M(d,[["Result","NonPlainTextEmail"],["Result","Email"],["Result","email"],["email"],["data","email"]]),name:M(d,[["Result","ScreenName"],["Result","Nickname"],["Result","Name"],["result","nickname"],["nickname"],["name"]]),aiRegion:M(d,[["Result","AIRegion"],["Result","aiRegion"],["aiRegion"]]),region:M(d,[["Result","Region"],["Result","region"],["region"]]),tenant:M(d,[["Result","TenantID"],["Result","tenantId"],["tenantId"]]),userId:M(d,[["Result","UserID"],["Result","userId"],["userId"]])}}catch{}}return{email:null,name:null}}let R={config:i.SK,flowType:"authorization_code",callbackPath:i.SK.callbackPath,prepareConfig:async a=>{let b=m().randomUUID(),c=await N(b);return{...a,loginTraceID:b,loginHost:c}},buildAuthUrl:(a,b,c)=>{var d;let e,f,g={plugin_version:i.SK.defaultPluginVersion,machine_id:m().randomUUID(),device_id:i.SK.defaultDeviceId,x_device_brand:"unknown",x_device_type:"unknown",x_os_version:"unknown",x_env:"",x_app_version:i.SK.defaultAppVersion,x_app_type:i.SK.defaultAppType},h=a.loginTraceID||c;return d=a.loginHost,(e=new URL(d.startsWith("http")?d:`https://${d.replace(/^\/+/,"")}`)).pathname=i.SK.authorizationPath,(f=new URLSearchParams).set("login_version","1"),f.set("auth_from","trae"),f.set("login_channel","native_ide"),f.set("plugin_version",g.plugin_version),f.set("auth_type","local"),f.set("client_id",i.SK.clientId),f.set("redirect","0"),f.set("login_trace_id",h),f.set("auth_callback_url",b),f.set("machine_id",g.machine_id),f.set("device_id",g.device_id),f.set("x_device_id",g.device_id),f.set("x_machine_id",g.machine_id),f.set("x_device_brand",g.x_device_brand),f.set("x_device_type",g.x_device_type),f.set("x_os_version",g.x_os_version),f.set("x_env",g.x_env),f.set("x_app_version",g.x_app_version),f.set("x_app_type",g.x_app_type),e.search=f.toString(),e.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*i.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 P(d,e),_authMethod:"oauth"}},postExchange:async a=>({userInfo:await Q(a.accessToken)}),mapTokens:(a,b)=>{let c,d=a.expiresIn||(a.expiresAt?Math.max(60,Number(a.expiresAt)-Math.floor(Date.now()/1e3)):24*i.SK.tokenLifetimeDays*3600),e=b?.userInfo||{},f=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:f,region:e.region||f,tenant:e.tenant||"marscode",userId:e.userId||"",scope:"sg"===(c=(f||"").toLowerCase())||c.includes("singapore")?"marscode-sg":"cn"===c||c.includes("cn")||c.includes("china")?"marscode-cn":"marscode-us",webId:"",bizUserId:"",userUniqueId:"",appLanguage:"en",appVersion:i.SK.defaultAppVersion,userRegion:"SG"===f?"SG":"US",userIdentity:"Free"}}}};async function S(a,b,c){let d=`${a.replace(/\/$/,"")}${b}`,e=await fetch(d,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":i.eD.userAgent},body:JSON.stringify(c)}),f=await e.text();if(!e.ok)throw Error(`Windsurf ${b} HTTP ${e.status}: ${f.slice(0,200)}`);try{return JSON.parse(f)}catch{throw Error(`Windsurf ${b} invalid JSON`)}}async function T(a){let b=await S(i.eD.registerApiBaseUrl,i.eD.registerPath,{firebase_id_token:a}),c=M(b,[["apiKey"],["api_key"]]);if(!c)throw Error("Windsurf RegisterUser missing apiKey");return{apiKey:c,apiServerUrl:M(b,[["apiServerUrl"],["api_server_url"]])||i.eD.defaultApiServerUrl,name:M(b,[["name"]])}}async function U(a,b){try{let c=await S(a,i.eD.oneTimeAuthPath,{firebaseIdToken:b}),d=M(c,[["authToken"],["auth_token"]]);if(!d)return{email:null,name:null};let e=await S(a,i.eD.currentUserPath,{authToken:d,includeSubscription:!0}),f=e.user||e;return{email:M(f,[["email"]]),name:M(f,[["name"]])}}catch{return{email:null,name:null}}}let V={config:i.eD,flowType:"authorization_code",callbackPath:i.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 T(b);return{accessToken:c.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:c.apiServerUrl,firebaseIdToken:b,_authMethod:"imported"}}let{firebaseIdToken:g}=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),h=await T(g);return{accessToken:h.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:h.apiServerUrl,firebaseIdToken:g,_authMethod:"oauth"}},postExchange:async a=>a.firebaseIdToken?{userInfo:await U(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}})};var W=c(33373);async function X(a,b){let c=await Y(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})=>$(a.organizationName))||b[0],d=c.projects.find(a=>$(a?.projectName))||c.projects[0];return c.organization?.organizationId&&d?.projectId?{organizationId:c.organization.organizationId,projectId:d.projectId}:null}(await Z(`${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`,g=await Z(f,{headers:d},"api keys")||[],h=Array.isArray(g)?g.find(b=>b?.name===a.planApiKeyName):null;h||(h=await Z(f,{method:"POST",headers:d,body:JSON.stringify({name:a.planApiKeyName})},"api key create"));let i=h?.apiKey?.trim();if(!i)throw Error("Z.ai api_keys response is missing apiKey");let j=await Z(`${f}/copy/${encodeURIComponent(i)}`,{headers:d},"api key copy"),k=j?.secretKey?.trim();if(!k)throw Error("Z.ai api key copy response is missing secretKey");return{planApiKey:`${i}.${k}`,businessToken:c}}async function Y(a,b){let c=await Z(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 Z(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(!_(d?.code)||d?.success===!1)throw Error(d?.msg||`Z.ai ${c} returned business error ${d?.code}`);return d?.data??d??null}function $(a){let b=String(a||"").trim().toLowerCase();return b.includes("éģ莤æēæ")||b.includes("éģ莤饚įŽ")||"default"===b}function _(a){return null==a||0===a||200===a||"0"===a||"200"===a}let aa={claude:j,codex:k,xai:q,"grok-cli":s,muse:u,"gemini-cli":v,antigravity:w,iflow:x,qoder:z,"qoder-cn":A,github:B,kiro:C,cursor:D,kimi:E,kilocode:F,cline:G,clinepass:H,gitlab:I,"codebuddy-cn":J,"codebuddy-intl":K,kimchi:L,trae:R,windsurf:V,zed:{config:i.RY,flowType:"authorization_code",callbackPath:"/",prepareConfig:async(a,b)=>{let c=Number(b?.nativeAppPort)||i.RY.defaultNativeAppPort,d=(0,W.le)(a,{nativeAppPort:c});return{...a,...d}},buildAuthUrl:(a,b,c)=>a.authUrl,exchangeToken:async(a,b,c,d,e,f)=>{let{userId:g,encryptedAccessToken:h}=(0,W.Q_)(b);return{accessToken:(0,W.Wc)(h,d),userId:g,systemId:f?.systemId||a.systemId}},postExchange:async a=>{let b={accessToken:a.accessToken,providerSpecificData:{userId:a.userId,systemId:a.systemId}},c=null;try{c=await (0,W.qJ)(b,{config:i.RY})}catch{}let d=(0,W.k9)(b,c);return{userInfo:c,organizationId:d,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||""}})},glm:{config:i._0,flowType:"device_code",requestDeviceCode:async a=>{let b=m().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(!_(d.code)||!d.data)throw Error(d.msg||"ZCode OAuth init returned no data");let e=d.data;if(!e.flow_id||!e.authorize_url)throw Error("ZCode OAuth init response missing flow_id/authorize_url");return{device_code:e.flow_id,verification_uri:e.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}(e.expires_at)??300,interval:e.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 f=await fetch(`${a.cliPollUrl}/${encodeURIComponent(b)}`,{headers:{Authorization:`Bearer ${e}`}});if(!f.ok)return{ok:!0,data:{error:"access_denied",error_description:`ZCode poll failed (HTTP ${f.status})`}};let g=await f.json();if(!_(g.code))return{ok:!0,data:{error:"access_denied",error_description:g.msg||"ZCode poll failed"}};let h=g.data||{};if("pending"===h.status)return{ok:!0,data:{error:"authorization_pending"}};if("failed"===h.status)return{ok:!0,data:{error:"access_denied",error_description:"ZCode authorization failed or was cancelled"}};if("ready"!==h.status)return{ok:!0,data:{error:"authorization_pending",error_description:`Unknown status: ${h.status}`}};let i=h[a.providerId]||h[h.providerId]||{},j=i.access_token||i.accessToken||h.accessToken||h.access_token;if(!j)return{ok:!0,data:{error:"access_denied",error_description:"ZCode poll response missing access token"}};let{planApiKey:k,businessToken:l}=await X(a,j);return{ok:!0,data:{access_token:k,_zcodeJwtToken:h.token||"",_zaiBusinessToken:l,_zaiRefreshToken:i.refresh_token||i.refreshToken||h.refresh_token||h.refreshToken||"",_zcodeUser:h.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}:{}}}}}};async function ab(a,b,c,d,e,f){let g=function(a){let b=aa["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}(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)}}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=4780,exports.ids=[4780],exports.modules={34780:(a,b,c)=>{c.d(b,{createSqlJsAdapter:()=>m});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(46293),i=c.n(h),j=c(76040);c(85612);let k=null;async function l(){return k||(k=await i()())}async function m(a){let b=await l(),c=e().existsSync(a)?e().readFileSync(a):null,d=new b.Database(c);d.exec(j.oG);let f=!1,h=null,i=0;function k(){let b,c=d.export(),h=g().dirname(a),j=g().join(h,`.${g().basename(a)}.tmp-${process.pid}-${i++}`);try{b=e().openSync(j,"w"),e().writeFileSync(b,Buffer.from(c)),e().fsyncSync(b)}catch(a){if(void 0!==b)try{e().closeSync(b)}catch{}try{e().unlinkSync(j)}catch{}throw a}e().closeSync(b);try{e().renameSync(j,a)}catch(a){try{e().unlinkSync(j)}catch{}throw a}f=!1}function m(){f=!0,h&&clearTimeout(h),h=setTimeout(()=>{if(h=null,f)try{k()}catch(a){console.error("[sqljs] save failed:",a)}},100)}function n(a){if(!(!a||Array.isArray(a)&&0===a.length))return a}let o=()=>{if(f)try{k()}catch{}},p=()=>{o(),process.exit(0)};return process.once("beforeExit",o),process.once("SIGINT",p),process.once("SIGTERM",p),{driver:"sql.js",run:function(a,b=[]){let c=d.prepare(a);try{c.bind(n(b)),c.step();let a=d.getRowsModified(),e=d.exec("SELECT last_insert_rowid() as id")[0]?.values?.[0]?.[0]??null;return m(),{changes:a,lastInsertRowid:e}}finally{c.free()}},get:function(a,b=[]){let c=d.prepare(a);try{if(c.bind(n(b)),c.step())return c.getAsObject();return}finally{c.free()}},all:function(a,b=[]){let c=d.prepare(a);try{c.bind(n(b));let a=[];for(;c.step();)a.push(c.getAsObject());return a}finally{c.free()}},exec:function(a){d.exec(a),m()},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}`),m(),c}catch(a){try{d.exec(`ROLLBACK TO ${b}`),d.exec(`RELEASE ${b}`)}catch{}throw a}},close:function(){h&&clearTimeout(h),f&&k(),d.close()},raw:d}}},76040:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=
|
|
1
|
+
"use strict";exports.id=4780,exports.ids=[4780],exports.modules={34780:(a,b,c)=>{c.d(b,{createSqlJsAdapter:()=>m});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(46293),i=c.n(h),j=c(76040);c(85612);let k=null;async function l(){return k||(k=await i()())}async function m(a){let b=await l(),c=e().existsSync(a)?e().readFileSync(a):null,d=new b.Database(c);d.exec(j.oG);let f=!1,h=null,i=0;function k(){let b,c=d.export(),h=g().dirname(a),j=g().join(h,`.${g().basename(a)}.tmp-${process.pid}-${i++}`);try{b=e().openSync(j,"w"),e().writeFileSync(b,Buffer.from(c)),e().fsyncSync(b)}catch(a){if(void 0!==b)try{e().closeSync(b)}catch{}try{e().unlinkSync(j)}catch{}throw a}e().closeSync(b);try{e().renameSync(j,a)}catch(a){try{e().unlinkSync(j)}catch{}throw a}f=!1}function m(){f=!0,h&&clearTimeout(h),h=setTimeout(()=>{if(h=null,f)try{k()}catch(a){console.error("[sqljs] save failed:",a)}},100)}function n(a){if(!(!a||Array.isArray(a)&&0===a.length))return a}let o=()=>{if(f)try{k()}catch{}},p=()=>{o(),process.exit(0)};return process.once("beforeExit",o),process.once("SIGINT",p),process.once("SIGTERM",p),{driver:"sql.js",run:function(a,b=[]){let c=d.prepare(a);try{c.bind(n(b)),c.step();let a=d.getRowsModified(),e=d.exec("SELECT last_insert_rowid() as id")[0]?.values?.[0]?.[0]??null;return m(),{changes:a,lastInsertRowid:e}}finally{c.free()}},get:function(a,b=[]){let c=d.prepare(a);try{if(c.bind(n(b)),c.step())return c.getAsObject();return}finally{c.free()}},all:function(a,b=[]){let c=d.prepare(a);try{c.bind(n(b));let a=[];for(;c.step();)a.push(c.getAsObject());return a}finally{c.free()}},exec:function(a){d.exec(a),m()},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}`),m(),c}catch(a){try{d.exec(`ROLLBACK TO ${b}`),d.exec(`RELEASE ${b}`)}catch{}throw a}},close:function(){h&&clearTimeout(h),f&&k(),d.close()},raw:d}}},76040:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=7,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",scope:"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",config:"TEXT",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},mcpInstances:{columns:{id:"TEXT PRIMARY KEY",slug:"TEXT UNIQUE NOT NULL",title:"TEXT",kind:"TEXT NOT NULL",transport:"TEXT NOT NULL",url:"TEXT",command:"TEXT",args:"TEXT",env:"TEXT",headers:"TEXT",oauth:"INTEGER DEFAULT 0",oauthTokens:"TEXT",enabled:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_inst_slug ON mcpInstances(slug)","CREATE INDEX IF NOT EXISTS idx_mcp_inst_enabled ON mcpInstances(enabled)"]},mcpGatewayKeys:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT",key:"TEXT UNIQUE NOT NULL",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_gwkey ON mcpGatewayKeys(key)"]},mcpKeyGrants:{columns:{keyId:"TEXT NOT NULL",instanceId:"TEXT NOT NULL",toolAllowlist:"TEXT"},primaryKey:"PRIMARY KEY (keyId, instanceId)",indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_grant_key ON mcpKeyGrants(keyId)"]},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)"]},errorLogs:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",endpoint:"TEXT",provider:"TEXT",model:"TEXT",connectionId:"TEXT",comboName:"TEXT",statusCode:"TEXT",errorMessage:"TEXT",request:"TEXT",providerRequest:"TEXT",providerResponse:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_el_ts ON errorLogs(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_el_provider ON errorLogs(provider)","CREATE INDEX IF NOT EXISTS idx_el_model ON errorLogs(model)","CREATE INDEX IF NOT EXISTS idx_el_conn ON errorLogs(connectionId)","CREATE INDEX IF NOT EXISTS idx_el_combo ON errorLogs(comboName)"]},tokenSaverDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},convoyRules:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT NOT NULL",enabled:"INTEGER DEFAULT 1",priority:"INTEGER DEFAULT 0",matchType:"TEXT NOT NULL DEFAULT 'literal'",action:"TEXT NOT NULL DEFAULT 'replace'",pattern:"TEXT NOT NULL",replacement:"TEXT DEFAULT ''",caseSensitive:"INTEGER DEFAULT 1",providerIds:"TEXT DEFAULT '[]'",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_cr_enabled ON convoyRules(enabled)","CREATE INDEX IF NOT EXISTS idx_cr_priority ON convoyRules(enabled, priority)"]}};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",scope:"TEXT",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",config:"TEXT",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},mcpInstances:{columns:{id:"TEXT PRIMARY KEY",slug:"TEXT UNIQUE NOT NULL",title:"TEXT",kind:"TEXT NOT NULL",transport:"TEXT NOT NULL",url:"TEXT",command:"TEXT",args:"TEXT",env:"TEXT",headers:"TEXT",oauth:"INTEGER DEFAULT 0",oauthTokens:"TEXT",enabled:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_inst_slug ON mcpInstances(slug)","CREATE INDEX IF NOT EXISTS idx_mcp_inst_enabled ON mcpInstances(enabled)"]},mcpGatewayKeys:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT",key:"TEXT UNIQUE NOT NULL",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_gwkey ON mcpGatewayKeys(key)"]},mcpKeyGrants:{columns:{keyId:"TEXT NOT NULL",instanceId:"TEXT NOT NULL",toolAllowlist:"TEXT"},primaryKey:"PRIMARY KEY (keyId, instanceId)",indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_grant_key ON mcpKeyGrants(keyId)"]},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)"]},errorLogs:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",endpoint:"TEXT",provider:"TEXT",model:"TEXT",connectionId:"TEXT",comboName:"TEXT",statusCode:"TEXT",errorMessage:"TEXT",request:"TEXT",providerRequest:"TEXT",providerResponse:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_el_ts ON errorLogs(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_el_provider ON errorLogs(provider)","CREATE INDEX IF NOT EXISTS idx_el_model ON errorLogs(model)","CREATE INDEX IF NOT EXISTS idx_el_conn ON errorLogs(connectionId)","CREATE INDEX IF NOT EXISTS idx_el_combo ON errorLogs(comboName)"]},tokenSaverDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},convoyRules:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT NOT NULL",enabled:"INTEGER DEFAULT 1",priority:"INTEGER DEFAULT 0",matchType:"TEXT NOT NULL DEFAULT 'literal'",action:"TEXT NOT NULL DEFAULT 'replace'",pattern:"TEXT NOT NULL",replacement:"TEXT DEFAULT ''",caseSensitive:"INTEGER DEFAULT 1",providerIds:"TEXT DEFAULT '[]'",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_cr_enabled ON convoyRules(enabled)","CREATE INDEX IF NOT EXISTS idx_cr_priority ON convoyRules(enabled, priority)"]}};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,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=4803,exports.ids=[4803],exports.modules={34050:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=
|
|
1
|
+
"use strict";exports.id=4803,exports.ids=[4803],exports.modules={34050:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=7,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",scope:"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",config:"TEXT",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},mcpInstances:{columns:{id:"TEXT PRIMARY KEY",slug:"TEXT UNIQUE NOT NULL",title:"TEXT",kind:"TEXT NOT NULL",transport:"TEXT NOT NULL",url:"TEXT",command:"TEXT",args:"TEXT",env:"TEXT",headers:"TEXT",oauth:"INTEGER DEFAULT 0",oauthTokens:"TEXT",enabled:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_inst_slug ON mcpInstances(slug)","CREATE INDEX IF NOT EXISTS idx_mcp_inst_enabled ON mcpInstances(enabled)"]},mcpGatewayKeys:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT",key:"TEXT UNIQUE NOT NULL",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_gwkey ON mcpGatewayKeys(key)"]},mcpKeyGrants:{columns:{keyId:"TEXT NOT NULL",instanceId:"TEXT NOT NULL",toolAllowlist:"TEXT"},primaryKey:"PRIMARY KEY (keyId, instanceId)",indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_grant_key ON mcpKeyGrants(keyId)"]},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)"]},errorLogs:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",endpoint:"TEXT",provider:"TEXT",model:"TEXT",connectionId:"TEXT",comboName:"TEXT",statusCode:"TEXT",errorMessage:"TEXT",request:"TEXT",providerRequest:"TEXT",providerResponse:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_el_ts ON errorLogs(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_el_provider ON errorLogs(provider)","CREATE INDEX IF NOT EXISTS idx_el_model ON errorLogs(model)","CREATE INDEX IF NOT EXISTS idx_el_conn ON errorLogs(connectionId)","CREATE INDEX IF NOT EXISTS idx_el_combo ON errorLogs(comboName)"]},tokenSaverDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},convoyRules:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT NOT NULL",enabled:"INTEGER DEFAULT 1",priority:"INTEGER DEFAULT 0",matchType:"TEXT NOT NULL DEFAULT 'literal'",action:"TEXT NOT NULL DEFAULT 'replace'",pattern:"TEXT NOT NULL",replacement:"TEXT DEFAULT ''",caseSensitive:"INTEGER DEFAULT 1",providerIds:"TEXT DEFAULT '[]'",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_cr_enabled ON convoyRules(enabled)","CREATE INDEX IF NOT EXISTS idx_cr_priority ON convoyRules(enabled, priority)"]}};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(", ")})`}},54803:(a,b,c)=>{c.d(b,{createNodeSqliteAdapter:()=>f});var d=c(34050),e=c(11356);async function f(a){let b=process.emit;process.emit=function(a,c,...d){return!("warning"===a&&c?.name==="ExperimentalWarning"&&/SQLite/i.test(c.message||""))&&b.call(process,a,c,...d)};let f=new(await Promise.resolve().then(c.t.bind(c,79868,23))).DatabaseSync(a);f.exec(d.oG);let g=new Map;function h(a){let b=g.get(a);return b||(b=f.prepare(a),g.set(a,b)),b}let i=setInterval(()=>{try{f.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},6e4);function j(){try{f.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}try{g.clear()}catch{}try{f.close()}catch{}}return"function"==typeof i.unref&&i.unref(),(0,e.Bb)(j,100),{driver:"node:sqlite",run(a,b=[]){let c=h(a).run(...b);return{changes:Number(c.changes??0),lastInsertRowid:Number(c.lastInsertRowid??0)}},get:(a,b=[])=>h(a).get(...b),all:(a,b=[])=>h(a).all(...b),exec:a=>f.exec(a),transaction(a){let b=`sp_${Math.random().toString(36).slice(2)}`;f.exec(`SAVEPOINT ${b}`);try{let c=a();return f.exec(`RELEASE ${b}`),c}catch(a){try{f.exec(`ROLLBACK TO ${b}`),f.exec(`RELEASE ${b}`)}catch{}throw a}},checkpoint(){try{f.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(i),j()},raw:f}}}};
|
|
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",scope:"TEXT",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",config:"TEXT",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},mcpInstances:{columns:{id:"TEXT PRIMARY KEY",slug:"TEXT UNIQUE NOT NULL",title:"TEXT",kind:"TEXT NOT NULL",transport:"TEXT NOT NULL",url:"TEXT",command:"TEXT",args:"TEXT",env:"TEXT",headers:"TEXT",oauth:"INTEGER DEFAULT 0",oauthTokens:"TEXT",enabled:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_inst_slug ON mcpInstances(slug)","CREATE INDEX IF NOT EXISTS idx_mcp_inst_enabled ON mcpInstances(enabled)"]},mcpGatewayKeys:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT",key:"TEXT UNIQUE NOT NULL",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_gwkey ON mcpGatewayKeys(key)"]},mcpKeyGrants:{columns:{keyId:"TEXT NOT NULL",instanceId:"TEXT NOT NULL",toolAllowlist:"TEXT"},primaryKey:"PRIMARY KEY (keyId, instanceId)",indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_grant_key ON mcpKeyGrants(keyId)"]},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)"]},errorLogs:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",endpoint:"TEXT",provider:"TEXT",model:"TEXT",connectionId:"TEXT",comboName:"TEXT",statusCode:"TEXT",errorMessage:"TEXT",request:"TEXT",providerRequest:"TEXT",providerResponse:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_el_ts ON errorLogs(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_el_provider ON errorLogs(provider)","CREATE INDEX IF NOT EXISTS idx_el_model ON errorLogs(model)","CREATE INDEX IF NOT EXISTS idx_el_conn ON errorLogs(connectionId)","CREATE INDEX IF NOT EXISTS idx_el_combo ON errorLogs(comboName)"]},tokenSaverDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},convoyRules:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT NOT NULL",enabled:"INTEGER DEFAULT 1",priority:"INTEGER DEFAULT 0",matchType:"TEXT NOT NULL DEFAULT 'literal'",action:"TEXT NOT NULL DEFAULT 'replace'",pattern:"TEXT NOT NULL",replacement:"TEXT DEFAULT ''",caseSensitive:"INTEGER DEFAULT 1",providerIds:"TEXT DEFAULT '[]'",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_cr_enabled ON convoyRules(enabled)","CREATE INDEX IF NOT EXISTS idx_cr_priority ON convoyRules(enabled, priority)"]}};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(", ")})`}},54803:(a,b,c)=>{c.d(b,{createNodeSqliteAdapter:()=>f});var d=c(34050),e=c(11356);async function f(a){let b=process.emit;process.emit=function(a,c,...d){return!("warning"===a&&c?.name==="ExperimentalWarning"&&/SQLite/i.test(c.message||""))&&b.call(process,a,c,...d)};let f=new(await Promise.resolve().then(c.t.bind(c,79868,23))).DatabaseSync(a);f.exec(d.oG);let g=new Map;function h(a){let b=g.get(a);return b||(b=f.prepare(a),g.set(a,b)),b}let i=setInterval(()=>{try{f.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},6e4);function j(){try{f.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}try{g.clear()}catch{}try{f.close()}catch{}}return"function"==typeof i.unref&&i.unref(),(0,e.Bb)(j,100),{driver:"node:sqlite",run(a,b=[]){let c=h(a).run(...b);return{changes:Number(c.changes??0),lastInsertRowid:Number(c.lastInsertRowid??0)}},get:(a,b=[])=>h(a).get(...b),all:(a,b=[])=>h(a).all(...b),exec:a=>f.exec(a),transaction(a){let b=`sp_${Math.random().toString(36).slice(2)}`;f.exec(`SAVEPOINT ${b}`);try{let c=a();return f.exec(`RELEASE ${b}`),c}catch(a){try{f.exec(`ROLLBACK TO ${b}`),f.exec(`RELEASE ${b}`)}catch{}throw a}},checkpoint(){try{f.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(i),j()},raw:f}}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
exports.id=4827,exports.ids=[615,4827,9485],exports.modules={4630:(a,b,c)=>{"use strict";c.d(b,{Ak:()=>e,Yg:()=>h,sr:()=>d.sr,xq:()=>d.xq});var d=c(39141);function e(a){return(a?.providerSpecificData?.baseUrl?.trim()||"http://localhost:11434").replace(/\/$/,"")}let f=d.xq["xiaomi-tokenplan"]?.regions||{},g=d.xq["xiaomi-tokenplan"]?.defaultRegion;function h(a){return f[a?.providerSpecificData?.region]||f[g]}},16329:(a,b,c)=>{"use strict";c.d(b,{Bb:()=>e,Om:()=>g});let d=globalThis.__9routerShutdownState??={flushers:new Set,priorities:new Map,shutdownPromise:null,signalHandler:null,beforeExitHandler:null};function e(a,b=0){if("function"!=typeof a)throw TypeError("shutdown flusher must be a function");return d.flushers.add(a),d.priorities.set(a,Number.isFinite(b)?b:0),d.signalHandler??=()=>g(0),d.beforeExitHandler??=()=>f(),process.listeners("SIGINT").includes(d.signalHandler)||process.once("SIGINT",d.signalHandler),process.listeners("SIGTERM").includes(d.signalHandler)||process.once("SIGTERM",d.signalHandler),process.listeners("beforeExit").includes(d.beforeExitHandler)||process.once("beforeExit",d.beforeExitHandler),()=>{d.flushers.delete(a),d.priorities.delete(a)}}function f(){return d.shutdownPromise||(d.shutdownPromise=(async()=>{let a=new Map;for(let b of d.flushers){let c=d.priorities.get(b)??0;a.has(c)||a.set(c,[]),a.get(c).push(b)}for(let b of[...a.keys()].sort((a,b)=>a-b))for(let c of(await Promise.allSettled(a.get(b).map(a=>Promise.resolve().then(a)))))"rejected"===c.status&&console.error("[Shutdown] flusher failed:",c.reason?.message||c.reason)})()),d.shutdownPromise}async function g(a=0){await f(),process.exit(a)}},21719:(a,b,c)=>{"use strict";c.d(b,{g:()=>n,l:()=>m});var d=c(79646),e=c(33873),f=c.n(e),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(30869),l=c(16329);async function m(){!function(){try{let a=f().join("win32"===process.platform?f().join(process.env.APPDATA||"","ezrouter"):f().join(j().homedir(),".ezrouter"),"mitm",".mitm.pid");if(!h().existsSync(a))return;let b=parseInt(h().readFileSync(a,"utf8").trim(),10);if(!b)return;if("win32"===process.platform)try{(0,d.execSync)(`taskkill /F /T /PID ${b}`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{try{(0,d.execSync)(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${b} -Force"`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{}}else try{(0,d.execSync)(`sudo -n kill -9 ${b} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{try{process.kill(b,"SIGKILL")}catch{}}try{h().unlinkSync(a)}catch{}}catch{}}();let a=function(){let a=[];if("win32"===process.platform){try{(0,d.execSync)('powershell -NonInteractive -WindowStyle Hidden -Command "Get-WmiObject Win32_Process -Filter \'Name=\\"node.exe\\"\' | Select-Object ProcessId,CommandLine | ConvertTo-Csv -NoTypeInformation"',{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").slice(1).filter(a=>a.trim()).forEach(b=>{let c=b.toLowerCase();if(c.includes("ezrouter")||c.includes("9router")||c.includes("next-server")||c.includes("\\bin\\app\\")||c.includes("/bin/app/")||c.includes("cli.js")){let c=b.match(/^"(\d+)"/);c&&c[1]&&c[1]!==process.pid.toString()&&a.push(c[1])}})}catch{}for(let b of["cloudflared","tray_windows_release"])try{let c=`powershell -NonInteractive -WindowStyle Hidden -Command "Get-Process ${b} -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Id"`;(0,d.execSync)(c,{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").forEach(b=>{let c=b.trim();c&&!isNaN(c)&&a.push(c)})}catch{}}else try{(0,d.execSync)("ps -eo pid,comm,args 2>/dev/null",{encoding:"utf8",timeout:5e3}).split("\n").slice(1).forEach(b=>{let c=b.trim();if(!c)return;let d=c.split(/\s+/)[0];if(!d||isNaN(d)||d===process.pid.toString())return;let e=c.toLowerCase();(e.includes("node")&&(e.includes("ezrouter")||e.includes("9router"))&&(e.includes("cli.js")||e.includes("/ezrouter")||e.includes("/9router"))||e.includes("next-server")||e.includes("cloudflared")&&(e.includes("ezrouter")||e.includes("9router"))||e.includes("/bin/app/")||e.includes("tray_darwin")||e.includes("tray_linux"))&&a.push(d)})}catch{}return a}(),b=process.platform;a.forEach(a=>{try{"win32"===b?(0,d.execSync)(`taskkill /F /PID ${a} 2>nul`,{stdio:"ignore",shell:!0,windowsHide:!0,timeout:3e3}):(0,d.execSync)(`kill -9 ${a} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{}}),a.length>0&&await new Promise(a=>setTimeout(a,1500))}function n(a=k.h0.npmPackageName){let b=function(a){try{if(!a||!h().existsSync(a))return a;let b=f().join(process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?f().join(process.env.APPDATA||f().join(j().homedir(),"AppData","Roaming"),"ezrouter"):f().join(j().homedir(),".ezrouter"),"runtime","updater"),c=f().join(b,"updater.js");if(h().existsSync(c))try{if(h().statSync(a).size===h().statSync(c).size)return c}catch{}return h().mkdirSync(b,{recursive:!0}),h().copyFileSync(a,c),c}catch{return a}}(function(){if(process.env.UPDATER_SCRIPT_PATH&&h().existsSync(process.env.UPDATER_SCRIPT_PATH))return process.env.UPDATER_SCRIPT_PATH;let a=f().join(process.cwd(),"src","lib","updater","updater.js");if(h().existsSync(a))return a;let b=f().join(process.cwd(),"..","src","lib","updater","updater.js");return h().existsSync(b)?b:a}()),c="1"===process.env.TRAY_MODE,e={cmd:"win32"===process.platform?"npx.cmd":"npx",args:[k.h0.npmPackageName]},g=c?[...e.args,"--tray","--skip-update"]:[...e.args,"--skip-update"];(0,d.spawn)(process.execPath,[b],{detached:!0,stdio:"ignore",windowsHide:!0,env:{...process.env,UPDATER_PKG_NAME:a,UPDATER_PORT:String(k.h0.statusPort),UPDATER_TAIL_LINES:String(k.h0.statusLogTailLines),UPDATER_RETRIES:String(k.h0.installRetries),UPDATER_RETRY_DELAY_MS:String(k.h0.installRetryDelayMs),UPDATER_LINGER_MS:String(k.h0.lingerAfterDoneMs),UPDATER_WAIT_MIN_MS:String(k.h0.waitForExitMinMs),UPDATER_WAIT_MAX_MS:String(k.h0.waitForExitMaxMs),UPDATER_WAIT_CHECK_MS:String(k.h0.waitForExitCheckMs),UPDATER_APP_PORT:String(process.env.PORT||k.h0.appPort),UPDATER_RELAUNCH:"1",UPDATER_RELAUNCH_CMD:e.cmd,UPDATER_RELAUNCH_ARGS:JSON.stringify(g)}}).unref(),setTimeout(()=>(0,l.Om)(0),k.h0.exitDelayMs)}},29485:(a,b,c)=>{"use strict";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(4630),e=c(17218),f=c(39141),g=c(6595),h=c(8382),i=c(19956);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))}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rabbi696/ezrouter",installCmd:"npm i -g @rabbi696/ezrouter",installCmdLatest:"npm i -g @rabbi696/ezrouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20126},h={maxLines:200,pollIntervalMs:1e3,streamTimeoutMs:5e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingInactiveSession:!0,inactiveMinPingIntervalMs:18e6,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},39006:a=>{"use strict";a.exports={rE:"0.6.15"}},40615:(a,b,c)=>{"use strict";c.d(b,{AI_PROVIDERS:()=>u,js:()=>B,DI:()=>n,fg:()=>k,Pd:()=>o,Vj:()=>p,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>D,wb:()=>C,br:()=>l,wG:()=>A,zt:()=>v,gb:()=>r,gC:()=>s,AR:()=>t,mq:()=>q,YI:()=>x,rs:()=>w,p5:()=>z});var d=c(17218);let e="â ī¸ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.default.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","systemoneConfig","credentialFallback","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.default.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.fastMode?{fastMode:a.fastMode}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.baseUrlField?{baseUrlField:a.baseUrlField}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.models?{models:a.models}:{},...a.authModes?{authModes:a.authModes}:{},...a.features?{features:{...a.features}}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.apiKeyOptionalWith?{apiKeyOptionalWith:a.apiKeyOptionalWith}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-",p="custom-video-";function q(a){return"string"==typeof a&&a.startsWith(m)}function r(a){return"string"==typeof a&&a.startsWith(n)}function s(a){return"string"==typeof a&&a.startsWith(o)}function t(a){return"string"==typeof a&&a.startsWith(p)}let u={...h,...i,...j,...k,...l};function v(a){for(let b of Object.values(u))if(b.alias===a||b.id===a)return b;return null}function w(a){let b=v(a);return b?.id||a}function x(a){return!!a&&(!!v(a)||q(a)||r(a))}let y={nvidia:40};function z(a,b){let c=(a?.rpmByProvider||{})[b];if(0===c||"0"===c)return 0;let d=Number(c);return Number.isFinite(d)&&d>0?d:y[b]||0}function A(a){let b=u[a];return b?.alias||a}let B=Object.values(u).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(u).reduce((a,b)=>(a[b.id]=b.alias,a),{});let C=d.default.filter(a=>a.features?.usage).map(a=>a.id),D=d.default.filter(a=>a.features?.usageApikey).map(a=>a.id)},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{CP:()=>f,Xg:()=>d.Xg,bs:()=>g,eh:()=>e,vq:()=>d.PROVIDER_MODELS,zc:()=>i});var d=c(29485);Object.entries(c(40615).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b,g={vision:{icon:"visibility",label:"Vision",desc:"Supports image input",color:"text-blue-500"},reasoning:{icon:"neurology",label:"Reasoning",desc:"Supports reasoning / thinking",color:"text-amber-500"}},h={"gemini-live":{label:"Gemini Live (realtime WebSocket)",desc:"Streams audio over bidiGenerateContent and returns incremental transcription segments"}};function i(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(h,a.trim())}Object.freeze(Object.keys(h))},96487:()=>{}};
|
|
1
|
+
exports.id=4827,exports.ids=[615,4827,9485],exports.modules={16329:(a,b,c)=>{"use strict";c.d(b,{Bb:()=>e,Om:()=>g});let d=globalThis.__9routerShutdownState??={flushers:new Set,priorities:new Map,shutdownPromise:null,signalHandler:null,beforeExitHandler:null};function e(a,b=0){if("function"!=typeof a)throw TypeError("shutdown flusher must be a function");return d.flushers.add(a),d.priorities.set(a,Number.isFinite(b)?b:0),d.signalHandler??=()=>g(0),d.beforeExitHandler??=()=>f(),process.listeners("SIGINT").includes(d.signalHandler)||process.once("SIGINT",d.signalHandler),process.listeners("SIGTERM").includes(d.signalHandler)||process.once("SIGTERM",d.signalHandler),process.listeners("beforeExit").includes(d.beforeExitHandler)||process.once("beforeExit",d.beforeExitHandler),()=>{d.flushers.delete(a),d.priorities.delete(a)}}function f(){return d.shutdownPromise||(d.shutdownPromise=(async()=>{let a=new Map;for(let b of d.flushers){let c=d.priorities.get(b)??0;a.has(c)||a.set(c,[]),a.get(c).push(b)}for(let b of[...a.keys()].sort((a,b)=>a-b))for(let c of(await Promise.allSettled(a.get(b).map(a=>Promise.resolve().then(a)))))"rejected"===c.status&&console.error("[Shutdown] flusher failed:",c.reason?.message||c.reason)})()),d.shutdownPromise}async function g(a=0){await f(),process.exit(a)}},21719:(a,b,c)=>{"use strict";c.d(b,{g:()=>n,l:()=>m});var d=c(79646),e=c(33873),f=c.n(e),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(30869),l=c(16329);async function m(){!function(){try{let a=f().join("win32"===process.platform?f().join(process.env.APPDATA||"","ezrouter"):f().join(j().homedir(),".ezrouter"),"mitm",".mitm.pid");if(!h().existsSync(a))return;let b=parseInt(h().readFileSync(a,"utf8").trim(),10);if(!b)return;if("win32"===process.platform)try{(0,d.execSync)(`taskkill /F /T /PID ${b}`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{try{(0,d.execSync)(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${b} -Force"`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{}}else try{(0,d.execSync)(`sudo -n kill -9 ${b} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{try{process.kill(b,"SIGKILL")}catch{}}try{h().unlinkSync(a)}catch{}}catch{}}();let a=function(){let a=[];if("win32"===process.platform){try{(0,d.execSync)('powershell -NonInteractive -WindowStyle Hidden -Command "Get-WmiObject Win32_Process -Filter \'Name=\\"node.exe\\"\' | Select-Object ProcessId,CommandLine | ConvertTo-Csv -NoTypeInformation"',{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").slice(1).filter(a=>a.trim()).forEach(b=>{let c=b.toLowerCase();if(c.includes("ezrouter")||c.includes("9router")||c.includes("next-server")||c.includes("\\bin\\app\\")||c.includes("/bin/app/")||c.includes("cli.js")){let c=b.match(/^"(\d+)"/);c&&c[1]&&c[1]!==process.pid.toString()&&a.push(c[1])}})}catch{}for(let b of["cloudflared","tray_windows_release"])try{let c=`powershell -NonInteractive -WindowStyle Hidden -Command "Get-Process ${b} -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Id"`;(0,d.execSync)(c,{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").forEach(b=>{let c=b.trim();c&&!isNaN(c)&&a.push(c)})}catch{}}else try{(0,d.execSync)("ps -eo pid,comm,args 2>/dev/null",{encoding:"utf8",timeout:5e3}).split("\n").slice(1).forEach(b=>{let c=b.trim();if(!c)return;let d=c.split(/\s+/)[0];if(!d||isNaN(d)||d===process.pid.toString())return;let e=c.toLowerCase();(e.includes("node")&&(e.includes("ezrouter")||e.includes("9router"))&&(e.includes("cli.js")||e.includes("/ezrouter")||e.includes("/9router"))||e.includes("next-server")||e.includes("cloudflared")&&(e.includes("ezrouter")||e.includes("9router"))||e.includes("/bin/app/")||e.includes("tray_darwin")||e.includes("tray_linux"))&&a.push(d)})}catch{}return a}(),b=process.platform;a.forEach(a=>{try{"win32"===b?(0,d.execSync)(`taskkill /F /PID ${a} 2>nul`,{stdio:"ignore",shell:!0,windowsHide:!0,timeout:3e3}):(0,d.execSync)(`kill -9 ${a} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{}}),a.length>0&&await new Promise(a=>setTimeout(a,1500))}function n(a=k.h0.npmPackageName){let b=function(a){try{if(!a||!h().existsSync(a))return a;let b=f().join(process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?f().join(process.env.APPDATA||f().join(j().homedir(),"AppData","Roaming"),"ezrouter"):f().join(j().homedir(),".ezrouter"),"runtime","updater"),c=f().join(b,"updater.js");if(h().existsSync(c))try{if(h().statSync(a).size===h().statSync(c).size)return c}catch{}return h().mkdirSync(b,{recursive:!0}),h().copyFileSync(a,c),c}catch{return a}}(function(){if(process.env.UPDATER_SCRIPT_PATH&&h().existsSync(process.env.UPDATER_SCRIPT_PATH))return process.env.UPDATER_SCRIPT_PATH;let a=f().join(process.cwd(),"src","lib","updater","updater.js");if(h().existsSync(a))return a;let b=f().join(process.cwd(),"..","src","lib","updater","updater.js");return h().existsSync(b)?b:a}()),c="1"===process.env.TRAY_MODE,e={cmd:"win32"===process.platform?"npx.cmd":"npx",args:[k.h0.npmPackageName]},g=c?[...e.args,"--tray","--skip-update"]:[...e.args,"--skip-update"];(0,d.spawn)(process.execPath,[b],{detached:!0,stdio:"ignore",windowsHide:!0,env:{...process.env,UPDATER_PKG_NAME:a,UPDATER_PORT:String(k.h0.statusPort),UPDATER_TAIL_LINES:String(k.h0.statusLogTailLines),UPDATER_RETRIES:String(k.h0.installRetries),UPDATER_RETRY_DELAY_MS:String(k.h0.installRetryDelayMs),UPDATER_LINGER_MS:String(k.h0.lingerAfterDoneMs),UPDATER_WAIT_MIN_MS:String(k.h0.waitForExitMinMs),UPDATER_WAIT_MAX_MS:String(k.h0.waitForExitMaxMs),UPDATER_WAIT_CHECK_MS:String(k.h0.waitForExitCheckMs),UPDATER_APP_PORT:String(process.env.PORT||k.h0.appPort),UPDATER_RELAUNCH:"1",UPDATER_RELAUNCH_CMD:e.cmd,UPDATER_RELAUNCH_ARGS:JSON.stringify(g)}}).unref(),setTimeout(()=>(0,l.Om)(0),k.h0.exitDelayMs)}},29485:(a,b,c)=>{"use strict";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(17218),e=c(39141),f=c(6595),g=c(8382),h=c(19956);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))}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rabbi696/ezrouter",installCmd:"npm i -g @rabbi696/ezrouter",installCmdLatest:"npm i -g @rabbi696/ezrouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20126},h={maxLines:200,pollIntervalMs:1e3,streamTimeoutMs:5e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingInactiveSession:!0,inactiveMinPingIntervalMs:18e6,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},39006:a=>{"use strict";a.exports={rE:"0.6.16"}},40615:(a,b,c)=>{"use strict";c.d(b,{AI_PROVIDERS:()=>u,js:()=>B,DI:()=>n,fg:()=>k,Pd:()=>o,Vj:()=>p,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>D,wb:()=>C,br:()=>l,wG:()=>A,zt:()=>v,gb:()=>r,gC:()=>s,AR:()=>t,mq:()=>q,YI:()=>x,rs:()=>w,p5:()=>z});var d=c(17218);let e="â ī¸ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.default.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","systemoneConfig","credentialFallback","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.default.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.fastMode?{fastMode:a.fastMode}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.baseUrlField?{baseUrlField:a.baseUrlField}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.models?{models:a.models}:{},...a.authModes?{authModes:a.authModes}:{},...a.features?{features:{...a.features}}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.apiKeyOptionalWith?{apiKeyOptionalWith:a.apiKeyOptionalWith}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-",p="custom-video-";function q(a){return"string"==typeof a&&a.startsWith(m)}function r(a){return"string"==typeof a&&a.startsWith(n)}function s(a){return"string"==typeof a&&a.startsWith(o)}function t(a){return"string"==typeof a&&a.startsWith(p)}let u={...h,...i,...j,...k,...l};function v(a){for(let b of Object.values(u))if(b.alias===a||b.id===a)return b;return null}function w(a){let b=v(a);return b?.id||a}function x(a){return!!a&&(!!v(a)||q(a)||r(a))}let y={nvidia:40};function z(a,b){let c=(a?.rpmByProvider||{})[b];if(0===c||"0"===c)return 0;let d=Number(c);return Number.isFinite(d)&&d>0?d:y[b]||0}function A(a){let b=u[a];return b?.alias||a}let B=Object.values(u).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(u).reduce((a,b)=>(a[b.id]=b.alias,a),{});let C=d.default.filter(a=>a.features?.usage).map(a=>a.id),D=d.default.filter(a=>a.features?.usageApikey).map(a=>a.id)},78335:()=>{},81329:(a,b,c)=>{"use strict";c.d(b,{CP:()=>f,Xg:()=>d.Xg,bs:()=>g,eh:()=>e,vq:()=>d.PROVIDER_MODELS,zc:()=>i});var d=c(29485);Object.entries(c(40615).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b,g={vision:{icon:"visibility",label:"Vision",desc:"Supports image input",color:"text-blue-500"},reasoning:{icon:"neurology",label:"Reasoning",desc:"Supports reasoning / thinking",color:"text-amber-500"}},h={"gemini-live":{label:"Gemini Live (realtime WebSocket)",desc:"Streams audio over bidiGenerateContent and returns incremental transcription segments"}};function i(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(h,a.trim())}Object.freeze(Object.keys(h))},96487:()=>{}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=4878,exports.ids=[4878],exports.modules={7803:(a,b,c)=>{c.r(b),c.d(b,{debug:()=>o,debugEnabled:()=>w,error:()=>r,errorLine:()=>l,fmtThink:()=>m,info:()=>p,line:()=>k,maskKey:()=>v,nextTag:()=>i,request:()=>s,response:()=>t,stream:()=>u,tagForSession:()=>j,warn:()=>q});let d={DEBUG:0,INFO:1,WARN:2,ERROR:3},e=d[process.env.LOG_LEVEL?.toUpperCase?.()]??d.INFO;function f(){return new Date().toLocaleTimeString("en-US",{hour12:!1})}let g=["\uD83D\uDFE2","\uD83D\uDD35","\uD83D\uDFE3","\uD83D\uDFE1","\uD83D\uDFE0","\uD83D\uDD34","âĒ","\uD83D\uDFE4"],h=0;function i(){let a=g[h%g.length];return h++,a}function j(a){if(!a)return i();let b=0;for(let c=0;c<a.length;c++)b=31*b+a.charCodeAt(c)|0;return g[Math.abs(b)%g.length]}function k(a,b,c){e>d.INFO||console.log(`[${f()}] ${a} ${b} ${c}`)}function l(a,b,c){console.log(`[${f()}] ${a} ${b} ${c}`)}function m(a){return a&&a.mode?"none"===a.mode?"off":"auto"===a.mode?"auto":"budget"===a.mode?a.budget>=1e3?`${Math.round(a.budget/1e3)}k`:`${a.budget}`:"level"===a.mode?a.level:null:null}function n(a){if(!a)return"";if("string"==typeof a)return a;try{return JSON.stringify(a)}catch{return String(a)}}function o(a,b,c){if(e<=d.DEBUG){let d=c?` ${n(c)}`:"";console.log(`[${f()}] đ [${a}] ${b}${d}`)}}function p(a,b,c){if(e<=d.INFO){let d=c?` ${n(c)}`:"";console.log(`[${f()}] âšī¸ [${a}] ${b}${d}`)}}function q(a,b,c){if(e<=d.WARN){let d=c?` ${n(c)}`:"";console.warn(`[${f()}] â ī¸ [${a}] ${b}${d}`)}}function r(a,b,c){if(e<=d.ERROR){let d=c?` ${n(c)}`:"";console.log(`[${f()}] â [${a}] ${b}${d}`)}}function s(a,b,c){let d=c?` ${n(c)}`:"";console.log(`\x1b[36m[${f()}] đĨ ${a} ${b}${d}\x1b[0m`)}function t(a,b,c){let d=c?` ${n(c)}`:"";console.log(`[${f()}] ${a<400?"\uD83D\uDCE4":"\uD83D\uDCA5"} ${a} (${b}ms)${d}`)}function u(a,b){let c=b?` ${n(b)}`:"";console.log(`[${f()}] đ [STREAM] ${a}${c}`)}function v(a){return!a||a.length<8?"***":`${a.slice(0,4)}...${a.slice(-4)}`}let w=e<=d.DEBUG},19225:(a,b,c)=>{a.exports=c(44870)},23433:(a,b,c)=>{c.d(b,{Pt:()=>y,Tr:()=>z,c1:()=>w,kI:()=>C,vk:()=>x,$A:()=>B});var d=c(89718),e=c(39326),f=c(49263),g=c(87252),h=c(49190),i=c(58336),j=c(40615),k=c(79963),l=c(11973),m=c(6165);let n=new Map;function o(a,b){if(!a||!b)return null;let c="number"==typeof b?b:new Date(b).getTime();return!Number.isFinite(c)||Date.now()-c>=12e4?null:a}async function p(a){let b=await (0,e.B)(a.providerSpecificData||{}).then(a=>({connectionProxyEnabled:!0===a.connectionProxyEnabled,connectionProxyUrl:a.connectionProxyUrl||"",connectionNoProxy:a.connectionNoProxy||"",vercelRelayUrl:a.vercelRelayUrl||"",strictProxy:!1})),c=(0,l.my)(a,b,{}),d=new Promise((a,b)=>setTimeout(()=>b(Error("quota fetch timeout")),3e3)),f=await Promise.race([c,d]),g=(0,m.wi)(a.provider,f);return g||null}async function q(a){var b,c;if(!Object.values((0,m.fo)(a)).some(a=>Number(a)>0&&100>=Number(a)))return{paused:!1,reason:"disabled",snapshot:null};if(!(0,m.Kr)(a))return{paused:!1,reason:"ineligible",snapshot:null};let e=function(a){let b=n.get(a.id);if(b){let a=o(b.snapshot,b.fetchedAt);if(a)return a}let c=a.lastQuotaSnapshot;if(c){let a=o(c,c.fetchedAt);if(a)return a}return null}(a);if(!e){try{e=await p(a)}catch{e=null}e&&(b=a.id,c=e,n.set(b,{snapshot:c,fetchedAt:Date.now()}),(0,d.updateProviderConnection)(b,{lastQuotaSnapshot:c}).catch(()=>{}))}let f=(0,m.RU)({...a,lastQuotaSnapshot:e});return{paused:f,reason:f?"below-threshold":e?"ok":"no-data",snapshot:e}}var r=c(45974),s=c(71600),t=c(7803);let u=Promise.resolve(),v=new Set([...Object.keys(j.IS),...Object.keys(j.nJ)]);async function w(a,b=null,c=null,g={}){let l,m=b instanceof Set?b:b?new Set([b]):new Set,n=g?.preferredConnectionId||null,o=g?.cacheKey||null,p=g?.requestedModel||c,v=u;u=new Promise(a=>{l=a});try{let b;await v;let l=(0,j.rs)(a);if(j.IS[l]?.noAuth){let a=((await (0,d.mt)()).providerStrategies||{})[l]||{},b=a.rotateStrategy||"none",c=a.proxyPoolId||null;if("none"!==b){let a=(await (0,d.ui)({isActive:!0})).filter(a=>a.proxyUrl).map(a=>a.id);c=(0,e.p)(a,b,l)}let f=await (0,e.B)({proxyPoolId:c||""});return{id:"noauth",connectionName:"Public",isActive:!0,accessToken:"public",providerSpecificData:{connectionProxyEnabled:f.connectionProxyEnabled,connectionProxyUrl:f.connectionProxyUrl,connectionNoProxy:f.connectionNoProxy,strictProxy:!0===f.strictProxy,connectionProxyPoolId:f.proxyPoolId||null,vercelRelayUrl:f.vercelRelayUrl||""}}}let u=await (0,d.getProviderConnections)({provider:l,isActive:!0}),w=g?.strictConnectionId?u.filter(a=>a.id===g.strictConnectionId):u;if(t.debug("AUTH",`${a} | total connections: ${w.length}, excludeIds: ${m.size>0?[...m].join(","):"none"}, model: ${c||"any"}`),0===w.length)return t.warn("AUTH",`No credentials for ${a}`),null;let x=await (0,d.mt)(),y=(0,j.p5)(x,l),z="antigravity"===l,A=z&&c?(0,r.d0)():null,B=w.filter(a=>{if(m.has(a.id)||(0,f.Bl)(a,c)||(0,k.kM)(a.id,y))return!1;let b=a.providerSpecificData?.enabledModels;if("codex"===l&&Array.isArray(b)&&b.length&&p&&!b.includes(p))return!1;if(z&&c&&A){let b=A.get(a.id)?.[c];if(b&&b.remainingPercentage<=0&&b.resetAt&&new Date(b.resetAt).getTime()>Date.now()){let d=a.id?.slice(0,8)||"unknown";return t.info("AG_QUOTA",`${d} | CACHE_BLOCK ${c} â skip upstream until ${b.resetAt}`),!1}}return!0}),C=(await Promise.all(B.map(async b=>(await q(b)).paused?(t.info("AUTH",`${a} | ${b.id?.slice(0,8)} skipped: quota paused (window below per-window threshold)`),null):b))).filter(Boolean);if(t.debug("AUTH",`${a} | available: ${C.length}/${w.length}`),w.forEach(a=>{let b=m.has(a.id),d=(0,f.Bl)(a,c);if(b||d){let e=(0,f.kJ)(a);t.debug("AUTH",` â ${a.id?.slice(0,8)} | ${b?"excluded":""} ${d?`modelLocked(${c}) until ${e}`:""}`)}}),0===C.length){let b=w.filter(a=>(0,f.Bl)(a,c)),d=b.map(a=>(0,f.kJ)(a)).filter(Boolean);z&&c&&A&&w.forEach(a=>{let b=A.get(a.id)?.[c]?.resetAt;b&&new Date(b).getTime()>Date.now()&&d.push(b)});let e=d.sort()[0]||null;if(e){let d=b.find(a=>(0,f.kJ)(a)===e)||b[0],g=!!d?.lastErrorModel&&d.lastErrorModel===(c||null),h=g&&d?.lastError||null,i=g&&d?.errorCode||null;return t.warn("AUTH",`${a} | all ${w.length} accounts locked for ${c||"all"} (${(0,f.Qo)(e)}) | lastError=${g?d?.lastError?.slice(0,50):`<withheld: belongs to ${d?.lastErrorModel||"unknown"}>`}`),{allRateLimited:!0,retryAfter:e,retryAfterHuman:(0,f.Qo)(e),lastError:h,lastErrorCode:i}}let g=w.map(a=>(0,k.Vs)(a.id,y)).filter(a=>null!=a);if(g.length===w.length&&g.length>0){let b=Math.min(...g),c=new Date(Date.now()+b).toISOString();return t.warn("AUTH",`${a} | all ${w.length} accounts at the ${y} RPM cap (${Math.ceil(b/1e3)}s)`),{allRateLimited:!0,retryAfter:c,retryAfterHuman:(0,f.Qo)(c),lastError:`Local ${y} RPM cap reached for every ${a} account`,lastErrorCode:null}}return t.warn("AUTH",`${a} | all ${w.length} accounts unavailable`),null}let D=(x.providerStrategies||{})[l]||{},E=D.fallbackStrategy||x.fallbackStrategy||"fill-first";if(n&&(b=C.find(a=>a.id===n))&&t.info("AUTH",`${a} | pinned to ${b.id?.slice(0,8)} (${b.name||b.email||"unnamed"})`),b);else if(E===h.cL){let{connection:e,reason:f}=(0,i.Sn)(B,{model:c,config:x.latencyAwareConfig});b=e||B[0],t.debug("AUTH",`${a} | latency-aware â ${b.id?.slice(0,8)} (${f})`),await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:1})}else if("round-robin"===E){let a=D.stickyRoundRobinLimit||x.stickyRoundRobinLimit||3,c=[...C].sort((a,b)=>a.lastUsedAt||b.lastUsedAt?a.lastUsedAt?b.lastUsedAt?new Date(b.lastUsedAt)-new Date(a.lastUsedAt):-1:1:(a.priority||999)-(b.priority||999))[0],e=c?.consecutiveUseCount||0;c&&c.lastUsedAt&&e<a?(b=c,await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:(b.consecutiveUseCount||0)+1})):(b=[...C].sort((a,b)=>a.lastUsedAt||b.lastUsedAt?a.lastUsedAt?b.lastUsedAt?new Date(a.lastUsedAt)-new Date(b.lastUsedAt):1:-1:(a.priority||999)-(b.priority||999))[0],await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:1}))}else"cache-affinity"===E&&o?(b=(0,s.N)(o,C),await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString()})):b=C[0];y>0&&(0,k.Vi)(b.id);let F=await (0,e.B)(b.providerSpecificData||{});return{authType:b.authType,apiKey:b.apiKey,accessToken:b.accessToken,refreshToken:b.refreshToken,idToken:b.idToken,expiresAt:b.expiresAt,expiresIn:b.expiresIn,lastRefreshAt:b.lastRefreshAt,projectId:b.projectId,connectionName:b.displayName||b.name||b.email||b.id,copilotToken:b.providerSpecificData?.copilotToken,providerSpecificData:{...b.providerSpecificData||{},connectionProxyEnabled:F.connectionProxyEnabled,connectionProxyUrl:F.connectionProxyUrl,connectionNoProxy:F.connectionNoProxy,strictProxy:!0===F.strictProxy,connectionProxyPoolId:F.proxyPoolId||null,vercelRelayUrl:F.vercelRelayUrl||""},connectionId:b.id,testStatus:b.testStatus,lastError:b.lastError,_connection:b}}finally{l&&l()}}async function x(a,b,c,e=null,h=null,i=null){let k,l,m;if(!a||"noauth"===a)return{shouldFallback:!1,cooldownMs:0};let n=(await (0,d.getProviderConnections)({provider:e})).find(b=>b.id===a),o=n?.backoffLevel||0,p=(0,j.rs)(e),q=null;try{let a=await (0,d.mt)(),b=a?.retryDelayByProvider?.[p];if(null!=b&&"auto"!==b){let a=Number(b);Number.isFinite(a)&&a>0&&(q=Math.min(1e3*a,g.fh))}}catch{}let r=(0,f.hk)(b,c,o,(0,j.rs)(e));if(r.shouldFallback&&i&&i>Date.now()?(k=!0,l="antigravity"===(0,j.rs)(e)?i-Date.now():Math.min(i-Date.now(),g.fh),m=0):({shouldFallback:k,cooldownMs:l,newBackoffLevel:m}=r,k&&null==(0,f.Ib)(c)&&(null!=q?(l=q,m=0):l>6e4&&v.has(p)&&(l=6e4))),!k)return{shouldFallback:!1,cooldownMs:0};let s=function(a){let b=a=>String(a).replace(/\s+/g," ").trim().slice(0,200);if("string"==typeof a)return a.slice(0,200);if(!a||"object"!=typeof a)return"Provider error";let c="string"==typeof a.code?a.code:"string"==typeof a.cause?.code?a.cause.code:null;if(a instanceof Error){let d=a.message?b(a.message):a.name||"Provider error";return c&&!d.includes(c)?b(`${d} (${c})`):d}for(let d of[a.error?.message,a.message,"string"==typeof a.error?a.error:null,a.detail,a.reason])if("string"==typeof d&&d.trim())return b(c&&!d.includes(c)?`${d} (${c})`:d);return c?b(`Provider error (${c})`):"Provider error"}(c),u=(0,f.S5)(h,l);await (0,d.updateProviderConnection)(a,{...u,testStatus:"unavailable",lastError:s,errorCode:b,lastErrorModel:h||null,lastErrorAt:new Date().toISOString(),backoffLevel:m??o});let w=Object.keys(u)[0],y=n?.displayName||n?.name||n?.email||a.slice(0,8);return t.warn("AUTH",`${y} locked ${w} for ${Math.round(l/1e3)}s [${b}]`),e&&b&&s&&console.error(`â ${e} [${b}]: ${s}`),{shouldFallback:!0,cooldownMs:l}}async function y(a,b,c=null){if(!a||"noauth"===a)return;let e=b._connection||b,f=Date.now(),g=Object.keys(e).filter(a=>a.startsWith("modelLock_"));if(!e.testStatus&&!e.lastError&&0===g.length)return;let h=g.filter(a=>{if(c&&a===`modelLock_${c}`||c&&"modelLock___all"===a)return!0;let b=e[a];return b&&new Date(b).getTime()<=f});if(0===h.length&&"unavailable"!==e.testStatus&&!e.lastError)return;let i=g.filter(a=>{if(h.includes(a))return!1;let b=e[a];return b&&new Date(b).getTime()>f}),j=Object.fromEntries(h.map(a=>[a,null]));0===i.length&&Object.assign(j,{testStatus:"active",lastError:null,errorCode:null,lastErrorModel:null,lastErrorAt:null,backoffLevel:0}),await (0,d.updateProviderConnection)(a,j)}function z(a){return A(a)[0]||null}function A(a){let b=[],c=a=>{a&&!b.includes(a)&&b.push(a)},d=a.headers.get("Authorization");return d?.startsWith("Bearer ")&&c(d.slice(7)),c(a.headers.get("x-api-key")),b}async function B(a){let b=A(a);for(let a of b)if(await (0,d.ek)(a))return{apiKey:a,valid:!0};return{apiKey:b[0]||null,valid:!1}}async function C(a){return!!a&&await (0,d.ek)(a)}},45974:(a,b,c)=>{c.d(b,{XJ:()=>q,d0:()=>n,vO:()=>m});var d=c(39326),e=c(71040),f=c(7803);let g=new Map,h=new Map,i=new Map,j=["RATE_LIMIT_EXCEEDED","QUOTA_EXHAUSTED","Individual quota reached"],k=new Map,l=new Map;function m(a,b){let c=`${a}|${b}`;k.delete(c);let d=l.get(c);if(void 0===d)return;l.delete(c);let e=g.get(a);e?.[b]?.resetAt===new Date(d).toISOString()&&(delete e[b],g.set(a,e))}function n(){return g}async function o(a,b,c){let d=Date.now(),e=i.get(a);if(e)return e;let j=h.get(a)||0;if(d-j<3e4)return f.debug("AG_QUOTA",`${a.slice(0,8)} | skip refresh (${Math.round((d-j)/1e3)}s ago)`),g.get(a)||null;h.set(a,d);let k=p(a,b,c,d);i.set(a,k);try{return await k}finally{i.delete(a)}}async function p(a,b,c,h){try{let f=await (0,d.B)(c||{}),h={connectionProxyEnabled:!0===f.connectionProxyEnabled,connectionProxyUrl:f.connectionProxyUrl||"",connectionNoProxy:f.connectionNoProxy||"",vercelRelayUrl:f.vercelRelayUrl||"",strictProxy:!0===f.strictProxy},i=await (0,e.c)(b,c,h);if(!i?.quotas||i.message)return null;return g.set(a,function(a,b){let c=Date.now();for(let[d,e]of l)if(d.startsWith(`${a}|`)){if(e<=c){l.delete(d);continue}b[d.slice(a.length+1)]={remainingPercentage:0,resetAt:new Date(e).toISOString()}}return b}(a,i.quotas)),i.quotas}catch(b){return f.warn("AG_QUOTA",`${a.slice(0,8)} | refresh failed: ${b.message}`),null}}async function q(a,b,c,d,e,h=""){f.info("AG_QUOTA",`${a.slice(0,8)} | ${b} on ${c} â refreshing quota`);let i=(await o(a,d,e))?.[c],m=j.some(a=>h.includes(a));if(429===b&&!m&&(!i||i.remainingPercentage>0))return null;if((!i||i.remainingPercentage>0)&&m){let d=`${a}|${c}`,e=Date.now(),h=k.get(d),j=h&&e-h.windowStart<=6e4?h.windowStart:e,m=h&&j===h.windowStart?h.count+1:1;if(k.set(d,{count:m,windowStart:j}),m>=3){k.delete(d);let h=e+9e5,j=i?`${Math.round(i.remainingPercentage)}%`:"unknown";f.warn("AG_QUOTA",`${a.slice(0,8)} | STRIKE_${b} ${c} â ${m}x 429 (quota ${j}); CACHE_BLOCK 15m`);let n=g.get(a)||{};return n[c]={remainingPercentage:0,resetAt:new Date(h).toISOString()},g.set(a,n),l.set(d,h),h}return null}if(k.delete(`${a}|${c}`),!i.resetAt)return null;let n=new Date(i.resetAt).getTime();return n<=Date.now()?null:(f.warn("AG_QUOTA",`${a.slice(0,8)} | UPSTREAM_${b} ${c} â quota exhausted; CACHE_BLOCK until ${i.resetAt}`),n)}},71600:(a,b,c)=>{c.d(b,{G:()=>f,N:()=>g});var d=c(77598);function e(a){if("string"==typeof a)return a;try{return JSON.stringify(a??"")}catch{return""}}function f(a){if(!a||"object"!=typeof a)return null;let b="string"==typeof a.prompt_cache_key?a.prompt_cache_key.trim():"";if(b)return b;let c="string"==typeof a.metadata?.user_id?a.metadata.user_id.trim():"";if(c)return c;let f=Array.isArray(a.messages)?a.messages:[],g=[];void 0!==a.system&&null!==a.system&&g.push(e(a.system));let h=null;for(let a of f)if(a&&"object"==typeof a){if("system"===a.role||"developer"===a.role){g.push(e(a.content));continue}h=a;break}let i=g.join("\n");if(!i&&!h)return null;let j=`${i}\0${h?`${h.role}:${e(h.content)}`:""}`;return(0,d.createHash)("sha256").update(j).digest("hex")}function g(a,b){let c=null,e="";for(let f of b){let b=(0,d.createHash)("sha256").update(`${a}\0${f.id}`).digest("hex");(!c||b>e||b===e&&String(f.id)<String(c.id))&&(c=f,e=b)}return c}},79963:(a,b,c)=>{c.d(b,{CI:()=>f,Vi:()=>h,Vs:()=>i,kM:()=>g});let d=new Map;function e(a,b){let c=d.get(a);if(!c)return[];let e=b-6e4,f=0;for(;f<c.length&&c[f].t<=e;)f+=1;let g=0===f?c:c.slice(f);return g.length?d.set(a,g):d.delete(a),g}function f(a,b=Date.now()){return e(a,b).reduce((a,b)=>a+b.n,0)}function g(a,b,c=Date.now()){return!!b&&!(b<=0)&&f(a,c)>=b}function h(a,b=1,c){if(!a)return;let f=1,g=Date.now();if(void 0!==c?(f=b,g=c):"number"==typeof b&&(b>=1e6?(f=1,g=b):(f=b,g=Date.now())),!(f>0))return;let i=e(a,g);i.push({t:g,n:f}),d.set(a,i)}function i(a,b,c=Date.now()){if(!g(a,b,c))return null;let e=(d.get(a)||[])[0];return e?Math.max(0,e.t+6e4-c):null}},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}}};
|
|
1
|
+
"use strict";exports.id=4878,exports.ids=[4878],exports.modules={7803:(a,b,c)=>{c.r(b),c.d(b,{debug:()=>o,debugEnabled:()=>w,error:()=>r,errorLine:()=>l,fmtThink:()=>m,info:()=>p,line:()=>k,maskKey:()=>v,nextTag:()=>i,request:()=>s,response:()=>t,stream:()=>u,tagForSession:()=>j,warn:()=>q});let d={DEBUG:0,INFO:1,WARN:2,ERROR:3},e=d[process.env.LOG_LEVEL?.toUpperCase?.()]??d.INFO;function f(){return new Date().toLocaleTimeString("en-US",{hour12:!1})}let g=["\uD83D\uDFE2","\uD83D\uDD35","\uD83D\uDFE3","\uD83D\uDFE1","\uD83D\uDFE0","\uD83D\uDD34","âĒ","\uD83D\uDFE4"],h=0;function i(){let a=g[h%g.length];return h++,a}function j(a){if(!a)return i();let b=0;for(let c=0;c<a.length;c++)b=31*b+a.charCodeAt(c)|0;return g[Math.abs(b)%g.length]}function k(a,b,c){e>d.INFO||console.log(`[${f()}] ${a} ${b} ${c}`)}function l(a,b,c){console.log(`[${f()}] ${a} ${b} ${c}`)}function m(a){return a&&a.mode?"none"===a.mode?"off":"auto"===a.mode?"auto":"budget"===a.mode?a.budget>=1e3?`${Math.round(a.budget/1e3)}k`:`${a.budget}`:"level"===a.mode?a.level:null:null}function n(a){if(!a)return"";if("string"==typeof a)return a;try{return JSON.stringify(a)}catch{return String(a)}}function o(a,b,c){if(e<=d.DEBUG){let d=c?` ${n(c)}`:"";console.log(`[${f()}] đ [${a}] ${b}${d}`)}}function p(a,b,c){if(e<=d.INFO){let d=c?` ${n(c)}`:"";console.log(`[${f()}] âšī¸ [${a}] ${b}${d}`)}}function q(a,b,c){if(e<=d.WARN){let d=c?` ${n(c)}`:"";console.warn(`[${f()}] â ī¸ [${a}] ${b}${d}`)}}function r(a,b,c){if(e<=d.ERROR){let d=c?` ${n(c)}`:"";console.log(`[${f()}] â [${a}] ${b}${d}`)}}function s(a,b,c){let d=c?` ${n(c)}`:"";console.log(`\x1b[36m[${f()}] đĨ ${a} ${b}${d}\x1b[0m`)}function t(a,b,c){let d=c?` ${n(c)}`:"";console.log(`[${f()}] ${a<400?"\uD83D\uDCE4":"\uD83D\uDCA5"} ${a} (${b}ms)${d}`)}function u(a,b){let c=b?` ${n(b)}`:"";console.log(`[${f()}] đ [STREAM] ${a}${c}`)}function v(a){return!a||a.length<8?"***":`${a.slice(0,4)}...${a.slice(-4)}`}let w=e<=d.DEBUG},19225:(a,b,c)=>{a.exports=c(44870)},23433:(a,b,c)=>{c.d(b,{Pt:()=>y,Tr:()=>z,c1:()=>w,kI:()=>C,vk:()=>x,$A:()=>B});var d=c(89718),e=c(39326),f=c(49263),g=c(87252),h=c(49190),i=c(58336),j=c(40615),k=c(79963),l=c(11973),m=c(6165);let n=new Map;function o(a,b){if(!a||!b)return null;let c="number"==typeof b?b:new Date(b).getTime();return!Number.isFinite(c)||Date.now()-c>=12e4?null:a}async function p(a){let b=await (0,e.B)(a.providerSpecificData||{}).then(a=>({connectionProxyEnabled:!0===a.connectionProxyEnabled,connectionProxyUrl:a.connectionProxyUrl||"",connectionNoProxy:a.connectionNoProxy||"",vercelRelayUrl:a.vercelRelayUrl||"",strictProxy:!1})),c=(0,l.my)(a,b,{}),d=new Promise((a,b)=>setTimeout(()=>b(Error("quota fetch timeout")),3e3)),f=await Promise.race([c,d]),g=(0,m.wi)(a.provider,f);return g||null}async function q(a){var b,c;if(!Object.values((0,m.fo)(a)).some(a=>Number(a)>0&&100>=Number(a)))return{paused:!1,reason:"disabled",snapshot:null};if(!(0,m.Kr)(a))return{paused:!1,reason:"ineligible",snapshot:null};let e=function(a){let b=n.get(a.id);if(b){let a=o(b.snapshot,b.fetchedAt);if(a)return a}let c=a.lastQuotaSnapshot;if(c){let a=o(c,c.fetchedAt);if(a)return a}return null}(a);if(!e){try{e=await p(a)}catch{e=null}e&&(b=a.id,c=e,n.set(b,{snapshot:c,fetchedAt:Date.now()}),(0,d.updateProviderConnection)(b,{lastQuotaSnapshot:c}).catch(()=>{}))}let f=(0,m.RU)({...a,lastQuotaSnapshot:e});return{paused:f,reason:f?"below-threshold":e?"ok":"no-data",snapshot:e}}var r=c(45974),s=c(71600),t=c(7803);let u=Promise.resolve(),v=new Set([...Object.keys(j.IS),...Object.keys(j.nJ)]);async function w(a,b=null,c=null,g={}){let l,m=b instanceof Set?b:b?new Set([b]):new Set,n=g?.preferredConnectionId||null,o=g?.cacheKey||null,p=g?.requestedModel||c,v=u;u=new Promise(a=>{l=a});try{let b;await v;let l=(0,j.rs)(a);if(j.IS[l]?.noAuth){let a=((await (0,d.mt)()).providerStrategies||{})[l]||{},b=a.rotateStrategy||"none",c=a.proxyPoolId||null;if("none"!==b){let a=(await (0,d.ui)({isActive:!0})).filter(a=>a.proxyUrl).map(a=>a.id);c=(0,e.p)(a,b,l)}let f=await (0,e.B)({proxyPoolId:c||""});return{id:"noauth",connectionName:"Public",isActive:!0,accessToken:"public",providerSpecificData:{connectionProxyEnabled:f.connectionProxyEnabled,connectionProxyUrl:f.connectionProxyUrl,connectionNoProxy:f.connectionNoProxy,strictProxy:!0===f.strictProxy,connectionProxyPoolId:f.proxyPoolId||null,vercelRelayUrl:f.vercelRelayUrl||""}}}let u=await (0,d.getProviderConnections)({provider:l,isActive:!0}),w=g?.strictConnectionId?u.filter(a=>a.id===g.strictConnectionId):u;if(t.debug("AUTH",`${a} | total connections: ${w.length}, excludeIds: ${m.size>0?[...m].join(","):"none"}, model: ${c||"any"}`),0===w.length)return t.warn("AUTH",`No credentials for ${a}`),null;let x=await (0,d.mt)(),y=(0,j.p5)(x,l),z="antigravity"===l,A=z&&c?(0,r.d0)():null,B=w.filter(a=>{if(m.has(a.id)||(0,f.Bl)(a,c)||(0,k.kM)(a.id,y))return!1;let b=a.providerSpecificData?.enabledModels;if("codex"===l&&Array.isArray(b)&&b.length&&p&&!b.includes(p))return!1;if(z&&c&&A){let b=A.get(a.id)?.[c];if(b&&b.remainingPercentage<=0&&b.resetAt&&new Date(b.resetAt).getTime()>Date.now()){let d=a.id?.slice(0,8)||"unknown";return t.info("AG_QUOTA",`${d} | CACHE_BLOCK ${c} â skip upstream until ${b.resetAt}`),!1}}return!0}),C=(await Promise.all(B.map(async b=>(await q(b)).paused?(t.info("AUTH",`${a} | ${b.id?.slice(0,8)} skipped: quota paused (window below per-window threshold)`),null):b))).filter(Boolean);if(t.debug("AUTH",`${a} | available: ${C.length}/${w.length}`),w.forEach(a=>{let b=m.has(a.id),d=(0,f.Bl)(a,c);if(b||d){let e=(0,f.kJ)(a);t.debug("AUTH",` â ${a.id?.slice(0,8)} | ${b?"excluded":""} ${d?`modelLocked(${c}) until ${e}`:""}`)}}),0===C.length){let b=w.filter(a=>(0,f.Bl)(a,c)),d=b.map(a=>(0,f.kJ)(a)).filter(Boolean);z&&c&&A&&w.forEach(a=>{let b=A.get(a.id)?.[c]?.resetAt;b&&new Date(b).getTime()>Date.now()&&d.push(b)});let e=d.sort()[0]||null;if(e){let d=b.find(a=>(0,f.kJ)(a)===e)||b[0],g=!d?.lastErrorModel||d.lastErrorModel===(c||null),h=g&&d?.lastError||null,i=g&&d?.errorCode||null;return t.warn("AUTH",`${a} | all ${w.length} accounts locked for ${c||"all"} (${(0,f.Qo)(e)}) | lastError=${g?d?.lastError?.slice(0,50):`<withheld: belongs to ${d?.lastErrorModel||"unknown"}>`}`),{allRateLimited:!0,retryAfter:e,retryAfterHuman:(0,f.Qo)(e),lastError:h,lastErrorCode:i}}let g=w.map(a=>(0,k.Vs)(a.id,y)).filter(a=>null!=a);if(g.length===w.length&&g.length>0){let b=Math.min(...g),c=new Date(Date.now()+b).toISOString();return t.warn("AUTH",`${a} | all ${w.length} accounts at the ${y} RPM cap (${Math.ceil(b/1e3)}s)`),{allRateLimited:!0,retryAfter:c,retryAfterHuman:(0,f.Qo)(c),lastError:`Local ${y} RPM cap reached for every ${a} account`,lastErrorCode:null}}return t.warn("AUTH",`${a} | all ${w.length} accounts unavailable`),null}let D=(x.providerStrategies||{})[l]||{},E=D.fallbackStrategy||x.fallbackStrategy||"fill-first",F=a=>{let b=global._pendingRequests?.byAccount?.[a],c=b?Object.values(b).reduce((a,b)=>a+(b||0),0):0,d=global._pendingSelections?.get(a),e=d&&Date.now()-d<5e3;return c+(e&&0===c?1:0)};if(n&&(b=C.find(a=>a.id===n))&&t.info("AUTH",`${a} | pinned to ${b.id?.slice(0,8)} (${b.name||b.email||"unnamed"})`),b);else{let e=C.filter(a=>0===F(a.id)),f=e.length>0?e:C;if(E===h.cL){let{connection:e,reason:g}=(0,i.Sn)(f,{model:c,config:x.latencyAwareConfig});b=e||f[0],t.debug("AUTH",`${a} | latency-aware â ${b.id?.slice(0,8)} (${g})`),await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:1})}else if("round-robin"===E){let a=D.stickyRoundRobinLimit||x.stickyRoundRobinLimit||3,c=[...f].sort((a,b)=>a.lastUsedAt||b.lastUsedAt?a.lastUsedAt?b.lastUsedAt?new Date(b.lastUsedAt)-new Date(a.lastUsedAt):-1:1:(a.priority||999)-(b.priority||999))[0],e=c?.consecutiveUseCount||0;c&&c.lastUsedAt&&e<a&&0===F(c.id)?(b=c,await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:(b.consecutiveUseCount||0)+1})):(b=[...f].sort((a,b)=>a.lastUsedAt||b.lastUsedAt?a.lastUsedAt?b.lastUsedAt?new Date(a.lastUsedAt)-new Date(b.lastUsedAt):1:-1:(a.priority||999)-(b.priority||999))[0],await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString(),consecutiveUseCount:1}))}else"cache-affinity"===E&&o?(b=(0,s.N)(o,f),await (0,d.updateProviderConnection)(b.id,{lastUsedAt:new Date().toISOString()})):b=f[0]}y>0&&(0,k.Vi)(b.id),global._pendingSelections||(global._pendingSelections=new Map),global._pendingSelections.set(b.id,Date.now());let G=await (0,e.B)(b.providerSpecificData||{});return{authType:b.authType,apiKey:b.apiKey,accessToken:b.accessToken,refreshToken:b.refreshToken,idToken:b.idToken,expiresAt:b.expiresAt,expiresIn:b.expiresIn,lastRefreshAt:b.lastRefreshAt,projectId:b.projectId,connectionName:b.displayName||b.name||b.email||b.id,copilotToken:b.providerSpecificData?.copilotToken,providerSpecificData:{...b.providerSpecificData||{},connectionProxyEnabled:G.connectionProxyEnabled,connectionProxyUrl:G.connectionProxyUrl,connectionNoProxy:G.connectionNoProxy,strictProxy:!0===G.strictProxy,connectionProxyPoolId:G.proxyPoolId||null,vercelRelayUrl:G.vercelRelayUrl||""},connectionId:b.id,testStatus:b.testStatus,lastError:b.lastError,_connection:b}}finally{l&&l()}}async function x(a,b,c,e=null,h=null,i=null){let k,l,m;if(!a||"noauth"===a)return{shouldFallback:!1,cooldownMs:0};let n=(await (0,d.getProviderConnections)({provider:e})).find(b=>b.id===a),o=n?.backoffLevel||0,p=(0,j.rs)(e),q=null;try{let a=await (0,d.mt)(),b=a?.retryDelayByProvider?.[p];if(null!=b&&"auto"!==b){let a=Number(b);Number.isFinite(a)&&a>0&&(q=Math.min(1e3*a,g.fh))}}catch{}let r=(0,f.hk)(b,c,o,(0,j.rs)(e));if(r.shouldFallback&&i&&i>Date.now()?(k=!0,l="antigravity"===(0,j.rs)(e)?i-Date.now():Math.min(i-Date.now(),g.fh),m=0):({shouldFallback:k,cooldownMs:l,newBackoffLevel:m}=r,k&&null==(0,f.Ib)(c)&&(null!=q?(l=q,m=0):l>6e4&&v.has(p)&&(l=6e4))),!k)return{shouldFallback:!1,cooldownMs:0};let s=function(a){let b=a=>String(a).replace(/\s+/g," ").trim().slice(0,200);if("string"==typeof a)return a.slice(0,200);if(!a||"object"!=typeof a)return"Provider error";let c="string"==typeof a.code?a.code:"string"==typeof a.cause?.code?a.cause.code:null;if(a instanceof Error){let d=a.message?b(a.message):a.name||"Provider error";return c&&!d.includes(c)?b(`${d} (${c})`):d}for(let d of[a.error?.message,a.message,"string"==typeof a.error?a.error:null,a.detail,a.reason])if("string"==typeof d&&d.trim())return b(c&&!d.includes(c)?`${d} (${c})`:d);return c?b(`Provider error (${c})`):"Provider error"}(c),u=(0,f.S5)(h,l);await (0,d.updateProviderConnection)(a,{...u,testStatus:"unavailable",lastError:s,errorCode:b,lastErrorModel:h||null,lastErrorAt:new Date().toISOString(),backoffLevel:m??o});let w=Object.keys(u)[0],y=n?.displayName||n?.name||n?.email||a.slice(0,8);return t.warn("AUTH",`${y} locked ${w} for ${Math.round(l/1e3)}s [${b}]`),e&&b&&s&&console.error(`â ${e} [${b}]: ${s}`),{shouldFallback:!0,cooldownMs:l}}async function y(a,b,c=null){if(!a||"noauth"===a)return;let e=b._connection||b,f=Date.now(),g=Object.keys(e).filter(a=>a.startsWith("modelLock_"));if(!e.testStatus&&!e.lastError&&!e.errorCode&&0===g.length)return;let h=g.filter(a=>{if(c&&a===`modelLock_${c}`||c&&"modelLock___all"===a)return!0;let b=e[a];return b&&new Date(b).getTime()<=f});if(0===h.length&&"unavailable"!==e.testStatus&&!e.lastError&&!e.errorCode)return;let i=g.filter(a=>{if(h.includes(a))return!1;let b=e[a];return b&&new Date(b).getTime()>f}),j=Object.fromEntries(h.map(a=>[a,null]));0===i.length&&Object.assign(j,{testStatus:"active",lastError:null,errorCode:null,lastErrorModel:null,lastErrorAt:null,backoffLevel:0}),await (0,d.updateProviderConnection)(a,j)}function z(a){return A(a)[0]||null}function A(a){let b=[],c=a=>{a&&!b.includes(a)&&b.push(a)},d=a.headers.get("Authorization");return d?.startsWith("Bearer ")&&c(d.slice(7)),c(a.headers.get("x-api-key")),b}async function B(a){let b=A(a);for(let a of b)if(await (0,d.ek)(a))return{apiKey:a,valid:!0};return{apiKey:b[0]||null,valid:!1}}async function C(a){return!!a&&await (0,d.ek)(a)}},45974:(a,b,c)=>{c.d(b,{XJ:()=>q,d0:()=>n,vO:()=>m});var d=c(39326),e=c(71040),f=c(7803);let g=new Map,h=new Map,i=new Map,j=["RATE_LIMIT_EXCEEDED","QUOTA_EXHAUSTED","Individual quota reached"],k=new Map,l=new Map;function m(a,b){let c=`${a}|${b}`;k.delete(c);let d=l.get(c);if(void 0===d)return;l.delete(c);let e=g.get(a);e?.[b]?.resetAt===new Date(d).toISOString()&&(delete e[b],g.set(a,e))}function n(){return g}async function o(a,b,c){let d=Date.now(),e=i.get(a);if(e)return e;let j=h.get(a)||0;if(d-j<3e4)return f.debug("AG_QUOTA",`${a.slice(0,8)} | skip refresh (${Math.round((d-j)/1e3)}s ago)`),g.get(a)||null;h.set(a,d);let k=p(a,b,c,d);i.set(a,k);try{return await k}finally{i.delete(a)}}async function p(a,b,c,h){try{let f=await (0,d.B)(c||{}),h={connectionProxyEnabled:!0===f.connectionProxyEnabled,connectionProxyUrl:f.connectionProxyUrl||"",connectionNoProxy:f.connectionNoProxy||"",vercelRelayUrl:f.vercelRelayUrl||"",strictProxy:!0===f.strictProxy},i=await (0,e.c)(b,c,h);if(!i?.quotas||i.message)return null;return g.set(a,function(a,b){let c=Date.now();for(let[d,e]of l)if(d.startsWith(`${a}|`)){if(e<=c){l.delete(d);continue}b[d.slice(a.length+1)]={remainingPercentage:0,resetAt:new Date(e).toISOString()}}return b}(a,i.quotas)),i.quotas}catch(b){return f.warn("AG_QUOTA",`${a.slice(0,8)} | refresh failed: ${b.message}`),null}}async function q(a,b,c,d,e,h=""){f.info("AG_QUOTA",`${a.slice(0,8)} | ${b} on ${c} â refreshing quota`);let i=(await o(a,d,e))?.[c],m=j.some(a=>h.includes(a));if(429===b&&!m&&(!i||i.remainingPercentage>0))return null;if((!i||i.remainingPercentage>0)&&m){let d=`${a}|${c}`,e=Date.now(),h=k.get(d),j=h&&e-h.windowStart<=6e4?h.windowStart:e,m=h&&j===h.windowStart?h.count+1:1;if(k.set(d,{count:m,windowStart:j}),m>=3){k.delete(d);let h=e+9e5,j=i?`${Math.round(i.remainingPercentage)}%`:"unknown";f.warn("AG_QUOTA",`${a.slice(0,8)} | STRIKE_${b} ${c} â ${m}x 429 (quota ${j}); CACHE_BLOCK 15m`);let n=g.get(a)||{};return n[c]={remainingPercentage:0,resetAt:new Date(h).toISOString()},g.set(a,n),l.set(d,h),h}return null}if(k.delete(`${a}|${c}`),!i.resetAt)return null;let n=new Date(i.resetAt).getTime();return n<=Date.now()?null:(f.warn("AG_QUOTA",`${a.slice(0,8)} | UPSTREAM_${b} ${c} â quota exhausted; CACHE_BLOCK until ${i.resetAt}`),n)}},71600:(a,b,c)=>{c.d(b,{G:()=>f,N:()=>g});var d=c(77598);function e(a){if("string"==typeof a)return a;try{return JSON.stringify(a??"")}catch{return""}}function f(a){if(!a||"object"!=typeof a)return null;let b="string"==typeof a.prompt_cache_key?a.prompt_cache_key.trim():"";if(b)return b;let c="string"==typeof a.metadata?.user_id?a.metadata.user_id.trim():"";if(c)return c;let f=Array.isArray(a.messages)?a.messages:[],g=[];void 0!==a.system&&null!==a.system&&g.push(e(a.system));let h=null;for(let a of f)if(a&&"object"==typeof a){if("system"===a.role||"developer"===a.role){g.push(e(a.content));continue}h=a;break}let i=g.join("\n");if(!i&&!h)return null;let j=`${i}\0${h?`${h.role}:${e(h.content)}`:""}`;return(0,d.createHash)("sha256").update(j).digest("hex")}function g(a,b){let c=null,e="";for(let f of b){let b=(0,d.createHash)("sha256").update(`${a}\0${f.id}`).digest("hex");(!c||b>e||b===e&&String(f.id)<String(c.id))&&(c=f,e=b)}return c}},79963:(a,b,c)=>{c.d(b,{CI:()=>f,Vi:()=>h,Vs:()=>i,kM:()=>g});let d=new Map;function e(a,b){let c=d.get(a);if(!c)return[];let e=b-6e4,f=0;for(;f<c.length&&c[f].t<=e;)f+=1;let g=0===f?c:c.slice(f);return g.length?d.set(a,g):d.delete(a),g}function f(a,b=Date.now()){return e(a,b).reduce((a,b)=>a+b.n,0)}function g(a,b,c=Date.now()){return!!b&&!(b<=0)&&f(a,c)>=b}function h(a,b=1,c){if(!a)return;let f=1,g=Date.now();if(void 0!==c?(f=b,g=c):"number"==typeof b&&(b>=1e6?(f=1,g=b):(f=b,g=Date.now())),!(f>0))return;let i=e(a,g);i.push({t:g,n:f}),d.set(a,i)}function i(a,b,c=Date.now()){if(!g(a,b,c))return null;let e=(d.get(a)||[])[0];return e?Math.max(0,e.t+6e4-c):null}},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=5011,exports.ids=[5011],exports.modules={79963:(a,b,c)=>{c.d(b,{CI:()=>f,Vi:()=>h,Vs:()=>i,kM:()=>g});let d=new Map;function e(a,b){let c=d.get(a);if(!c)return[];let e=b-6e4,f=0;for(;f<c.length&&c[f].t<=e;)f+=1;let g=0===f?c:c.slice(f);return g.length?d.set(a,g):d.delete(a),g}function f(a,b=Date.now()){return e(a,b).reduce((a,b)=>a+b.n,0)}function g(a,b,c=Date.now()){return!!b&&!(b<=0)&&f(a,c)>=b}function h(a,b=1,c){if(!a)return;let f=1,g=Date.now();if(void 0!==c?(f=b,g=c):"number"==typeof b&&(b>=1e6?(f=1,g=b):(f=b,g=Date.now())),!(f>0))return;let i=e(a,g);i.push({t:g,n:f}),d.set(a,i)}function i(a,b,c=Date.now()){if(!g(a,b,c))return null;let e=(d.get(a)||[])[0];return e?Math.max(0,e.t+6e4-c):null}},95011:(a,b,c)=>{c.d(b,{keyUsageSnapshot:()=>f});var d=c(
|
|
1
|
+
"use strict";exports.id=5011,exports.ids=[5011],exports.modules={79963:(a,b,c)=>{c.d(b,{CI:()=>f,Vi:()=>h,Vs:()=>i,kM:()=>g});let d=new Map;function e(a,b){let c=d.get(a);if(!c)return[];let e=b-6e4,f=0;for(;f<c.length&&c[f].t<=e;)f+=1;let g=0===f?c:c.slice(f);return g.length?d.set(a,g):d.delete(a),g}function f(a,b=Date.now()){return e(a,b).reduce((a,b)=>a+b.n,0)}function g(a,b,c=Date.now()){return!!b&&!(b<=0)&&f(a,c)>=b}function h(a,b=1,c){if(!a)return;let f=1,g=Date.now();if(void 0!==c?(f=b,g=c):"number"==typeof b&&(b>=1e6?(f=1,g=b):(f=b,g=Date.now())),!(f>0))return;let i=e(a,g);i.push({t:g,n:f}),d.set(a,i)}function i(a,b,c=Date.now()){if(!g(a,b,c))return null;let e=(d.get(a)||[])[0];return e?Math.max(0,e.t+6e4-c):null}},95011:(a,b,c)=>{c.d(b,{keyUsageSnapshot:()=>f});var d=c(33079),e=c(79963);function f(a,b=Date.now()){let c,g;return{rpmUsed:(0,e.CI)((c=a.id,`key:${c}:rpm`),b),tpmUsed:(0,e.CI)((g=a.id,`key:${g}:tpm`),b),spendUsed:function(a,b=Date.now()){let c=(0,d.Ld)(a.budgetPeriod),e=a.budgetStartedAt?Date.parse(a.budgetStartedAt):null;return c&&e&&b-e>=c?0:a.spend||0}(a,b)}}}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=507,exports.ids=[507],exports.modules={76040:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=
|
|
1
|
+
"use strict";exports.id=507,exports.ids=[507],exports.modules={76040:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=7,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",scope:"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",config:"TEXT",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},mcpInstances:{columns:{id:"TEXT PRIMARY KEY",slug:"TEXT UNIQUE NOT NULL",title:"TEXT",kind:"TEXT NOT NULL",transport:"TEXT NOT NULL",url:"TEXT",command:"TEXT",args:"TEXT",env:"TEXT",headers:"TEXT",oauth:"INTEGER DEFAULT 0",oauthTokens:"TEXT",enabled:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_inst_slug ON mcpInstances(slug)","CREATE INDEX IF NOT EXISTS idx_mcp_inst_enabled ON mcpInstances(enabled)"]},mcpGatewayKeys:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT",key:"TEXT UNIQUE NOT NULL",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_gwkey ON mcpGatewayKeys(key)"]},mcpKeyGrants:{columns:{keyId:"TEXT NOT NULL",instanceId:"TEXT NOT NULL",toolAllowlist:"TEXT"},primaryKey:"PRIMARY KEY (keyId, instanceId)",indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_grant_key ON mcpKeyGrants(keyId)"]},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)"]},errorLogs:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",endpoint:"TEXT",provider:"TEXT",model:"TEXT",connectionId:"TEXT",comboName:"TEXT",statusCode:"TEXT",errorMessage:"TEXT",request:"TEXT",providerRequest:"TEXT",providerResponse:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_el_ts ON errorLogs(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_el_provider ON errorLogs(provider)","CREATE INDEX IF NOT EXISTS idx_el_model ON errorLogs(model)","CREATE INDEX IF NOT EXISTS idx_el_conn ON errorLogs(connectionId)","CREATE INDEX IF NOT EXISTS idx_el_combo ON errorLogs(comboName)"]},tokenSaverDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},convoyRules:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT NOT NULL",enabled:"INTEGER DEFAULT 1",priority:"INTEGER DEFAULT 0",matchType:"TEXT NOT NULL DEFAULT 'literal'",action:"TEXT NOT NULL DEFAULT 'replace'",pattern:"TEXT NOT NULL",replacement:"TEXT DEFAULT ''",caseSensitive:"INTEGER DEFAULT 1",providerIds:"TEXT DEFAULT '[]'",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_cr_enabled ON convoyRules(enabled)","CREATE INDEX IF NOT EXISTS idx_cr_priority ON convoyRules(enabled, priority)"]}};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(", ")})`}},90507:(a,b,c)=>{c.d(b,{createBetterSqliteAdapter:()=>h});var d=c(87550),e=c.n(d),f=c(76040),g=c(85612);function h(a){let b=new(e())(a);b.exec(f.oG);let c=new Map;function d(a){let d=c.get(a);return d||(d=b.prepare(a),c.set(a,d)),d}let h=setInterval(()=>{try{b.pragma("wal_checkpoint(TRUNCATE)")}catch{}},6e4);function i(){try{b.pragma("wal_checkpoint(TRUNCATE)")}catch{}try{c.clear()}catch{}try{b.close()}catch{}}return"function"==typeof h.unref&&h.unref(),(0,g.Bb)(i,100),{driver:"better-sqlite3",run:(a,b=[])=>d(a).run(...b),get:(a,b=[])=>d(a).get(...b),all:(a,b=[])=>d(a).all(...b),exec:a=>b.exec(a),transaction:a=>b.transaction(a)(),checkpoint(){try{b.pragma("wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(h),i()},raw:b}}}};
|
|
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",scope:"TEXT",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",config:"TEXT",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},mcpInstances:{columns:{id:"TEXT PRIMARY KEY",slug:"TEXT UNIQUE NOT NULL",title:"TEXT",kind:"TEXT NOT NULL",transport:"TEXT NOT NULL",url:"TEXT",command:"TEXT",args:"TEXT",env:"TEXT",headers:"TEXT",oauth:"INTEGER DEFAULT 0",oauthTokens:"TEXT",enabled:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_inst_slug ON mcpInstances(slug)","CREATE INDEX IF NOT EXISTS idx_mcp_inst_enabled ON mcpInstances(enabled)"]},mcpGatewayKeys:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT",key:"TEXT UNIQUE NOT NULL",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_gwkey ON mcpGatewayKeys(key)"]},mcpKeyGrants:{columns:{keyId:"TEXT NOT NULL",instanceId:"TEXT NOT NULL",toolAllowlist:"TEXT"},primaryKey:"PRIMARY KEY (keyId, instanceId)",indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_grant_key ON mcpKeyGrants(keyId)"]},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)"]},errorLogs:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",endpoint:"TEXT",provider:"TEXT",model:"TEXT",connectionId:"TEXT",comboName:"TEXT",statusCode:"TEXT",errorMessage:"TEXT",request:"TEXT",providerRequest:"TEXT",providerResponse:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_el_ts ON errorLogs(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_el_provider ON errorLogs(provider)","CREATE INDEX IF NOT EXISTS idx_el_model ON errorLogs(model)","CREATE INDEX IF NOT EXISTS idx_el_conn ON errorLogs(connectionId)","CREATE INDEX IF NOT EXISTS idx_el_combo ON errorLogs(comboName)"]},tokenSaverDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},convoyRules:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT NOT NULL",enabled:"INTEGER DEFAULT 1",priority:"INTEGER DEFAULT 0",matchType:"TEXT NOT NULL DEFAULT 'literal'",action:"TEXT NOT NULL DEFAULT 'replace'",pattern:"TEXT NOT NULL",replacement:"TEXT DEFAULT ''",caseSensitive:"INTEGER DEFAULT 1",providerIds:"TEXT DEFAULT '[]'",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_cr_enabled ON convoyRules(enabled)","CREATE INDEX IF NOT EXISTS idx_cr_priority ON convoyRules(enabled, priority)"]}};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(", ")})`}},90507:(a,b,c)=>{c.d(b,{createBetterSqliteAdapter:()=>h});var d=c(87550),e=c.n(d),f=c(76040),g=c(85612);function h(a){let b=new(e())(a);b.exec(f.oG);let c=new Map;function d(a){let d=c.get(a);return d||(d=b.prepare(a),c.set(a,d)),d}let h=setInterval(()=>{try{b.pragma("wal_checkpoint(TRUNCATE)")}catch{}},6e4);function i(){try{b.pragma("wal_checkpoint(TRUNCATE)")}catch{}try{c.clear()}catch{}try{b.close()}catch{}}return"function"==typeof h.unref&&h.unref(),(0,g.Bb)(i,100),{driver:"better-sqlite3",run:(a,b=[])=>d(a).run(...b),get:(a,b=[])=>d(a).get(...b),all:(a,b=[])=>d(a).all(...b),exec:a=>b.exec(a),transaction:a=>b.transaction(a)(),checkpoint(){try{b.pragma("wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(h),i()},raw:b}}}};
|