9router-proxy 0.5.97 → 0.6.0
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/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +9 -5
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/prerender-manifest.json +26 -26
- package/app/.next-cli-build/react-loadable-manifest.json +67 -0
- package/app/.next-cli-build/routes-manifest.json +26 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +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/cli-tools/all-statuses/route.js +27 -12
- 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 +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +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 +2 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +4 -0
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -2
- 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 +2 -2
- 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 +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +24 -9
- 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 +3 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- 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 +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +42 -0
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route_client-reference-manifest.js +1 -0
- 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]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/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 +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- 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 -0
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +9 -5
- package/app/.next-cli-build/server/chunks/1306.js +1 -0
- package/app/.next-cli-build/server/chunks/1731.js +1 -0
- package/app/.next-cli-build/server/chunks/1839.js +1 -1
- package/app/.next-cli-build/server/chunks/2214.js +2 -2
- package/app/.next-cli-build/server/chunks/24.js +1 -1
- package/app/.next-cli-build/server/chunks/2409.js +1 -1
- package/app/.next-cli-build/server/chunks/{9528.js → 2750.js} +2 -3
- package/app/.next-cli-build/server/chunks/2760.js +1 -0
- package/app/.next-cli-build/server/chunks/3210.js +1 -1
- package/app/.next-cli-build/server/chunks/3449.js +1 -0
- package/app/.next-cli-build/server/chunks/3535.js +1 -1
- package/app/.next-cli-build/server/chunks/3726.js +1 -1
- package/app/.next-cli-build/server/chunks/3891.js +1 -0
- package/app/.next-cli-build/server/chunks/3943.js +1 -1
- package/app/.next-cli-build/server/chunks/3966.js +1 -1
- package/app/.next-cli-build/server/chunks/4049.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +2 -2
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4190.js +1 -0
- package/app/.next-cli-build/server/chunks/436.js +1 -1
- package/app/.next-cli-build/server/chunks/4572.js +1 -1
- package/app/.next-cli-build/server/chunks/4746.js +1 -1
- package/app/.next-cli-build/server/chunks/4884.js +3 -3
- package/app/.next-cli-build/server/chunks/5026.js +1 -1
- package/app/.next-cli-build/server/chunks/5069.js +1 -1
- package/app/.next-cli-build/server/chunks/{2778.js → 5299.js} +29 -18
- package/app/.next-cli-build/server/chunks/5330.js +7 -7
- package/app/.next-cli-build/server/chunks/5615.js +3 -3
- package/app/.next-cli-build/server/chunks/562.js +1 -0
- package/app/.next-cli-build/server/chunks/6070.js +1 -1
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6249.js +2 -2
- package/app/.next-cli-build/server/chunks/6457.js +1 -1
- package/app/.next-cli-build/server/chunks/6708.js +1 -0
- package/app/.next-cli-build/server/chunks/6763.js +1 -1
- package/app/.next-cli-build/server/chunks/6877.js +1 -1
- package/app/.next-cli-build/server/chunks/6921.js +67 -0
- package/app/.next-cli-build/server/chunks/6922.js +1 -1
- package/app/.next-cli-build/server/chunks/700.js +1 -0
- package/app/.next-cli-build/server/chunks/7041.js +1 -0
- package/app/.next-cli-build/server/chunks/7066.js +1 -0
- package/app/.next-cli-build/server/chunks/7121.js +1 -0
- package/app/.next-cli-build/server/chunks/7211.js +1 -1
- package/app/.next-cli-build/server/chunks/7220.js +1 -1
- package/app/.next-cli-build/server/chunks/7247.js +1 -1
- package/app/.next-cli-build/server/chunks/7716.js +1 -1
- package/app/.next-cli-build/server/chunks/7843.js +1 -1
- package/app/.next-cli-build/server/chunks/7911.js +1 -0
- package/app/.next-cli-build/server/chunks/7995.js +6 -6
- package/app/.next-cli-build/server/chunks/8363.js +1 -1
- package/app/.next-cli-build/server/chunks/8402.js +1 -1
- package/app/.next-cli-build/server/chunks/8499.js +5 -5
- package/app/.next-cli-build/server/chunks/8635.js +1 -1
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/8895.js +8 -8
- package/app/.next-cli-build/server/chunks/8920.js +1 -1
- package/app/.next-cli-build/server/chunks/9055.js +2 -0
- package/app/.next-cli-build/server/chunks/9128.js +1 -1
- package/app/.next-cli-build/server/chunks/9402.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +2 -2
- package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/Pm8r3lt24W2zPSHP-HWt8/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/124.c092990b4bdb9713.js +1 -0
- package/app/.next-cli-build/static/chunks/1321-722b3ba12fb90c9c.js +1 -0
- package/app/.next-cli-build/static/chunks/1649-772a31b7f3a65900.js +1 -0
- package/app/.next-cli-build/static/chunks/2435.8a5a02e626c780d0.js +1 -0
- package/app/.next-cli-build/static/chunks/3842-da1878db3339b090.js +1 -0
- package/app/.next-cli-build/static/chunks/5462.c82c64c26a864ec0.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-d1d3efe2c72086a3.js +7 -0
- package/app/.next-cli-build/static/chunks/5815-de6408f8865f88f8.js +1 -0
- package/app/.next-cli-build/static/chunks/6808-d08581bd3ec10128.js +1 -0
- package/app/.next-cli-build/static/chunks/{6447-706004106e6d03ff.js → 761-5f63fd0d31d03600.js} +31 -20
- package/app/.next-cli-build/static/chunks/763-82556b77902c26fd.js +1 -0
- package/app/.next-cli-build/static/chunks/809-e1f8430398963827.js +3 -0
- package/app/.next-cli-build/static/chunks/8569.df0d706176dc1f57.js +1 -0
- package/app/.next-cli-build/static/chunks/9233.1939b75215f8cdcf.js +67 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-ca89dcf426c74779.js → page-47caf1cd52ad4b91.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-d721aa02fd6dc229.js → page-72ec90d965d57554.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-380f1b80350b23b4.js → page-bb76399120456e3e.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-08d02f26c201563c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-cfcb45884632a585.js → page-66757e17ed9f3b23.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-a2112a715423804a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-a40d84d4f27edd8a.js → page-0825f811e863492d.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-d7b40543599e82bf.js → page-cb24c102a5535c19.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-cbb1ba118b052f0e.js → page-52036f4792a313ea.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-fbbaf3ed3a147133.js → page-e9115d1643fe83ab.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-e0f49f53559a4932.js → page-830479c6d2b66001.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-0eae4c30300946df.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-558ba86898d31c4a.js → page-a49e8b527b71b335.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-f09e9a4381b3f214.js +27 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-0a7d4e1b0ca385bc.js → page-8dee526b0891af9f.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-8e2af722266f9488.js → page-a9be7ed9f48cf08c.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-3a34726f76033b40.js → page-62191da25897532f.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-c13245238182b386.js → page-ce1a79a72b996ef0.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-abe38e6377ed4950.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-8ec563b885652f2b.js → page-cfdf2480dbe558ad.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-56c7545e40d9ec94.js → page-8a823c86edc9c9e9.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-6b1c30be4655dec9.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-5f49319e3301cd87.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-528881684d589195.js → layout-a39c08212f881306.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/login/{page-660374ffb28a0929.js → page-89eb6dc8740863de.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-6680a0968873a9a5.js +1 -0
- package/app/.next-cli-build/static/chunks/webpack-8e6082996069dfa8.js +1 -0
- package/app/.next-cli-build/static/css/34a50b560d15a5ac.css +1 -0
- package/app/node_modules/caniuse-lite/data/agents.js +1 -1
- package/app/node_modules/caniuse-lite/data/browserVersions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/aac.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/apng.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-find.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/audio.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/av1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/avif.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/beacon.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/bigint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/border-image.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/brotli.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/calc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/canvas.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/classlist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/colr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/console-time.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/const.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/contenteditable.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-all.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-canvas.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-first-line.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-has.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-if.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-opacity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-reflections.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-table.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-when-else.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/currentcolor.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/customevent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/customizable-select.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/datalist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dataset.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/datauri.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/decorators.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/details.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dialog.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dnssec.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/download.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/eme.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/eot.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es5.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/es6.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fetch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/filereader.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flac.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fontface.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/forms.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/heif.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hevc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/hidden.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/history.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/http2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/http3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ime.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/imports.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/innertext.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-event.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-number.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-range.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-search.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/jpegxr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/json.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/lazyload.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/let.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/loading-lazy-media.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mathml.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/menu.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/meter.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/midi.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mp3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/notifications.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/object-values.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ogv.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/online-status.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/opus.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/outline.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/path2d.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/picture.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ping.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pointer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/portals.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/progress.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/promises.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/proximity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/proxy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/push-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rellist.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rem.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ruby.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/run-in.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/script-async.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sdch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/setimmediate.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sni.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/spdy.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/srcset.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/stream.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/streams.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-filters.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-html.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/svg.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/sxg.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/template.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/temporal.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/touch.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/ttf.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/u2f.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/url.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/vibration.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/video.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wasm.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wav.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/web-share.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webgl.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webhid.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webm.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webp.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/websockets.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webusb.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webvr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/webxr.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/will-change.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/woff.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/woff2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/word-break.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xhtml.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
- package/app/node_modules/caniuse-lite/data/features/zstd.js +1 -1
- package/app/node_modules/caniuse-lite/data/versionGroups.js +1 -1
- package/app/node_modules/caniuse-lite/package.json +1 -1
- package/app/package.json +1 -1
- package/app/public/providers/agnes.png +0 -0
- package/app/public/providers/atria.png +0 -0
- package/app/public/providers/bai.png +0 -0
- package/app/public/providers/dahl.png +0 -0
- package/app/public/providers/hermes.png +0 -0
- package/app/public/providers/tokenharbor.png +0 -0
- package/hooks/trayRuntime.js +152 -7
- package/package.json +4 -2
- package/src/cli/tray/tray.js +8 -5
- package/src/cli/utils/modelSelector.js +73 -10
- package/app/.next-cli-build/server/chunks/2870.js +0 -1
- package/app/.next-cli-build/server/chunks/3933.js +0 -67
- package/app/.next-cli-build/server/chunks/6022.js +0 -1
- package/app/.next-cli-build/server/chunks/6984.js +0 -1
- package/app/.next-cli-build/server/chunks/8306.js +0 -1
- package/app/.next-cli-build/server/chunks/9820.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-51c9a181d2c170ea.js +0 -1
- package/app/.next-cli-build/static/chunks/2997-559e004193f2a2ee.js +0 -67
- package/app/.next-cli-build/static/chunks/5497-8e392875d8d17222.js +0 -7
- package/app/.next-cli-build/static/chunks/809-c530a61052bf57d9.js +0 -3
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-663f892bfb9c79d1.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-d9dba7b1a84d7b1b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-3d29afe881b86a20.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-bf649e1e7bfffe06.js +0 -27
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-9af0cda95f346ab2.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-0e367c183e161fca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-63854721fb4ee44d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/start/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/login/status/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-8d5a053022fc1e16.js +0 -1
- package/app/.next-cli-build/static/chunks/webpack-c156bc04aeb5cff4.js +0 -1
- package/app/.next-cli-build/static/css/2fe9cf66a66ec7a4.css +0 -1
- package/app/.next-cli-build/static/rAOrEk5gEUgHCtv3eF7Bm/_buildManifest.js +0 -1
- package/app/public/providers/mimo-free.png +0 -0
- /package/app/.next-cli-build/static/{rAOrEk5gEUgHCtv3eF7Bm → Pm8r3lt24W2zPSHP-HWt8}/_ssgManifest.js +0 -0
|
@@ -6,7 +6,7 @@ data: ${JSON.stringify(a)}
|
|
|
6
6
|
|
|
7
7
|
`:`data: ${JSON.stringify(a)}
|
|
8
8
|
|
|
9
|
-
`}function m(a,b,c){let{error:h}=(0,e.xJ)(a,b),i=c===d.h.CLAUDE?l({type:"error",error:h},d.h.CLAUDE):l({error:h},c)+f.$U;return g.encode(i)}},9708:(a,b,c)=>{c.d(b,{D:()=>f});var d=c(96179),e=c(35024);class f extends d.L{constructor(){super("ollama-local")}buildUrl(a,b,c=0,d=null){return`${(0,e.Ak)(d)}/api/chat`}}},11655:(a,b,c)=>{c.d(b,{x:()=>s});var d=c(74957),e=c(35024),f=c(75924),g=c(41004),h=c(65377),i=c(4845),j=c(88499),k=c(14170),l=c(9024),m=c(39609),n=c(96760),o=c(78959),p=c(74129),q=c(55511),r=c.n(q);class s extends d.H{constructor(){super("github",e.xq.github),this.knownCodexModels=new Set}isClaudeModel(a){return/claude/i.test(a||"")}buildUrl(a,b,c=0){return this.config.baseUrl}buildHeaders(a,b=!0){let c=a.copilotToken||a.accessToken;return{Authorization:`Bearer ${c}`,"Content-Type":"application/json","copilot-integration-id":"vscode-chat","editor-version":`vscode/${f.x0.VSCODE_VERSION}`,"editor-plugin-version":`copilot-chat/${f.x0.COPILOT_CHAT_VERSION}`,"user-agent":f.x0.USER_AGENT,"openai-intent":"conversation-panel","x-github-api-version":f.x0.API_VERSION,"x-request-id":r().randomUUID?.()||`${Date.now()}-${Math.random().toString(36).slice(2)}`,"x-vscode-user-agent-library-version":"electron-fetch","X-Initiator":"user","anthropic-version":p.b8,Accept:b?"text/event-stream":"application/json"}}sanitizeMessagesForChatCompletions(a){if(!a?.messages)return a;let b={...a};return b.messages=a.messages.map(a=>{if(!a.content||"string"==typeof a.content)return a;if(Array.isArray(a.content)){let b=a.content.map(a=>{if("text"===a.type||"image_url"===a.type)return a;let b=a.text||a.content||JSON.stringify(a);return{type:"text",text:"string"==typeof b?b:JSON.stringify(b)}}).filter(a=>""!==a.text);return{...a,content:b.length>0?b:null}}return a}),b}requiresMaxCompletionTokens(a){return/gpt-5|o[134]-/i.test(a)}transformRequest(a,b,c,d){let e={...b};return this.requiresMaxCompletionTokens(a)&&void 0!==e.max_tokens&&(e.max_completion_tokens=e.max_tokens,delete e.max_tokens),"none"===e.reasoning_effort&&delete e.reasoning_effort,(0,n.c)("github",a,e),e}supportsResponsesEndpoint(a){let b=(a||"").toLowerCase();return!(b.includes("gemini")||b.includes("claude"))}async execute(a){let{model:b,log:c}=a;if(this.isClaudeModel(b))return c?.debug("GITHUB",`Using /v1/messages route for ${b}`),this.executeWithMessagesEndpoint(a);if(this.knownCodexModels.has(b)&&this.supportsResponsesEndpoint(b))return c?.debug("GITHUB",`Using cached /responses route for ${b}`),this.executeWithResponsesEndpoint(a);let d={...a,body:this.sanitizeMessagesForChatCompletions(a.body)},e=await super.execute({...d,proxyOptions:a.proxyOptions||null});if(e.response.status===g.gx.BAD_REQUEST&&this.supportsResponsesEndpoint(b)){let d=await e.response.clone().text();if(d.includes("not accessible via the /chat/completions endpoint")||d.includes("The requested model is not supported"))return c?.warn("GITHUB",`Model ${b} requires /responses. Switching...`),this.knownCodexModels.add(b),this.executeWithResponsesEndpoint(a)}return e}async executeWithResponsesEndpoint({model:a,body:b,stream:c,credentials:d,signal:e,log:f,proxyOptions:g=null}){let k=this.config.responsesUrl,n=this.buildHeaders(d,c),p=(0,h.h)(a,b,c,d);f?.debug("GITHUB","Sending translated request to /responses");let q=await (0,m.proxyAwareFetch)(k,{method:"POST",headers:n,body:JSON.stringify(p),signal:e},g);if(!q.ok)return{response:q,url:k,headers:n,transformedBody:p};let r=(0,j.Ws)("openai-responses");r.model=a;let s=new TextDecoder,t="",u=new TransformStream({async transform(a,b){let d=(t+=s.decode(a,{stream:!0})).split("\n");for(let a of(t=d.pop()||"",d)){let d=a.trim();if(!d)continue;let e=(0,l.tV)(d);if(!e)continue;if(e.done&&!0===c){b.enqueue(new TextEncoder().encode(o.$U));continue}let f=(0,i.v)(e,r);if(f){let a=(0,l.v8)(f,"openai");b.enqueue(new TextEncoder().encode(a))}}},flush(a){if(t.trim()){let b=(0,l.tV)(t.trim());if(b&&!b.done){let c=(0,i.v)(b,r);c&&a.enqueue(new TextEncoder().encode((0,l.v8)(c,"openai")))}}}});return q.body?{response:new Response(q.body.pipeThrough(u),{status:q.status,statusText:q.statusText,headers:q.headers}),url:k,headers:n,transformedBody:p}:{response:new Response("",{status:q.status,headers:q.headers}),url:k,headers:n,transformedBody:p}}async executeWithMessagesEndpoint({model:a,body:b,stream:c,credentials:d,signal:e,log:f,proxyOptions:g=null}){let h=this.config.messagesUrl,i=this.buildHeaders(d,c),n=(0,j.GH)(k.h.OPENAI,k.h.CLAUDE,a,b,!0,d,"github"),p=n._toolNameMap;delete n._toolNameMap,f?.debug("GITHUB","Sending translated request to /v1/messages");let q=await (0,m.proxyAwareFetch)(h,{method:"POST",headers:i,body:JSON.stringify(n),signal:e},g);if(!q.ok)return{response:q,url:h,headers:i,transformedBody:n};let r=(0,j.Ws)(k.h.CLAUDE);r.model=a,p&&(r.toolNameMap=p);let s=new TextDecoder,t="",u=(a,b)=>{for(let c of b)a.enqueue(new TextEncoder().encode((0,l.v8)(c,"openai")))},v=new TransformStream({async transform(a,b){let d=(t+=s.decode(a,{stream:!0})).split("\n");for(let a of(t=d.pop()||"",d)){let d=a.trim();if(!d)continue;let e=(0,l.tV)(d);if(e){if(e.done&&!0===c){b.enqueue(new TextEncoder().encode(o.$U));continue}u(b,(0,j.Y8)(k.h.CLAUDE,k.h.OPENAI,e,r))}}},flush(a){if(t.trim()){let b=(0,l.tV)(t.trim());b&&!b.done&&u(a,(0,j.Y8)(k.h.CLAUDE,k.h.OPENAI,b,r))}}});return q.body?{response:new Response(q.body.pipeThrough(v),{status:q.status,statusText:q.statusText,headers:q.headers}),url:h,headers:i,transformedBody:n}:{response:new Response("",{status:q.status,headers:q.headers}),url:h,headers:i,transformedBody:n}}async refreshCopilotToken(a,b,c=null){try{let d=await (0,m.proxyAwareFetch)("https://api.github.com/copilot_internal/v2/token",{headers:{Authorization:`token ${a}`,"User-Agent":f.x0.USER_AGENT,"Editor-Version":`vscode/${f.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${f.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":f.x0.API_VERSION}},c);if(!d.ok){let a=await d.text();return b?.error?.("TOKEN",`Copilot token refresh failed: ${d.status} ${a}`),null}let e=await d.json();return b?.info?.("TOKEN","Copilot token refreshed"),{token:e.token,expiresAt:e.expires_at}}catch(a){return b?.error?.("TOKEN",`Copilot refresh error: ${a.message}`),null}}async refreshGitHubToken(a,b,c=null){try{let d={grant_type:"refresh_token",refresh_token:a,client_id:this.config.clientId};this.config.clientSecret&&(d.client_secret=this.config.clientSecret);let e=await (0,m.proxyAwareFetch)(f.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(d)},c);if(!e.ok)return null;let g=await e.json();return b?.info?.("TOKEN","GitHub token refreshed"),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return b?.error?.("TOKEN",`GitHub refresh error: ${a.message}`),null}}async refreshCredentials(a,b,c=null){let d=await this.refreshCopilotToken(a.accessToken,b,c);if(!d&&a.refreshToken){let e=await this.refreshGitHubToken(a.refreshToken,b,c);if(e?.accessToken)return(d=await this.refreshCopilotToken(e.accessToken,b,c))?{...e,copilotToken:d.token,copilotTokenExpiresAt:d.expiresAt}:e}return d?{accessToken:a.accessToken,refreshToken:a.refreshToken,copilotToken:d.token,copilotTokenExpiresAt:d.expiresAt}:null}needsRefresh(a){if(!a.copilotToken)return!0;if(a.copilotTokenExpiresAt){let b=a.copilotTokenExpiresAt;if("number"==typeof b&&b<1e12?b*=1e3:"string"==typeof b&&(b=new Date(b).getTime()),b-Date.now()<3e5)return!0}return super.needsRefresh(a)}}},12132:(a,b,c)=>{c.r(b),c.d(b,{MIMO_API_BASE:()=>D,MIMO_API_UA:()=>E,getMimoAccountCookie:()=>F,getMimoAccountUsage:()=>G,invalidateMimoAccountCookieCache:()=>C,readDesktopPassToken:()=>v,resolveMimoServerBase:()=>y});var d=c(73024),e=c.n(d),f=c(48161),g=c.n(f),h=c(76760),i=c.n(h),j=c(77598),k=c.n(j),l=c(39609);let m={cn:"https://mimo-server-cn.xiaomimimo.com",sgp:"https://mimo-server-sgp.xiaomimimo.com",ams:"https://mimo-server-ams.xiaomimimo.com",ru:"https://mimo-server-ru.xiaomimimo.com",in:"https://mimo-server-in.xiaomimimo.com"},n=m.sgp,o={cn:"mimopc",sgp:"mimosgp",ams:"mimoams",ru:"mimoru",in:"mimoin"},p="account.xiaomi.com",q="miNative PC/Normal Windows_NT/10.0.19045 SDKV/1.0.0 DEVT/PC DEVS/Windows APP/miaccount_desktop APPV/0.1.0",r="MiClaw/1.0",s=new Map,t=new Map;async function u(){let a,b=(a=g().homedir(),"win32"===process.platform?i().join(a,"AppData","Roaming","Xiaomi MiMo","Partitions","xiaomi-account","Network","Cookies"):"darwin"===process.platform?i().join(a,"Library","Application Support","Xiaomi MiMo","Partitions","xiaomi-account","Network","Cookies"):i().join(a,".config","Xiaomi MiMo","Partitions","xiaomi-account","Network","Cookies"));if(!e().existsSync(b))return null;let d=i().join(g().tmpdir(),`9r-mimo-cookies-${process.pid}-${k().randomBytes(4).toString("hex")}.db`);try{e().copyFileSync(b,d)}catch{return null}try{let{DatabaseSync:a}=await Promise.resolve().then(c.t.bind(c,79868,23)),b=new a(d,{readOnly:!0}),e=b.prepare("SELECT name, value FROM cookies WHERE host_key = ?").all("."+p);b.close();let f=Object.fromEntries(e.map(a=>[a.name,a.value]));return f.passToken?f:null}catch{return null}finally{try{e().unlinkSync(d)}catch{}}}async function v(){try{let a=await u();if(!a?.passToken)return null;return{passToken:a.passToken,userId:a.userId||null,cUserId:a.cUserId||null}}catch{return null}}function w(a,b){for(let c of b.headers.getSetCookie?.()||[]){let b=/^([^=]+)=([^;]*)/.exec(c.trim());b&&b[2]&&(a[b[1]]=b[2])}}function x(a){return Object.entries(a).filter(([,a])=>a).map(([a,b])=>`${a}=${b}`).join("; ")}function y(a=null){return m[String(a?.region||"").toLowerCase()]||n}async function z(a,b,c=n,d="sgp"){let e=String(d||"").toLowerCase(),f=o[String(e||"").toLowerCase()]||o.sgp,g=await A(a,"cn"===e?null:b,c,f);return g&&console.log(`[mimoAccount] desktop 2-phase OK (sid=${f})`),g}async function A(a,b,c,d){var e,f;let g,h=a=>console.log(`[mimoAccount] desktopPhase fail: ${a}`),i={...a},j={};i.userId&&(j.userId=i.userId),i.passToken&&(j.passToken=i.passToken),i.cUserId&&(j.cUserId=i.cUserId);let m=`https://${p}/pass/serviceLogin?_locale=zh_CN&_snsNone=true&sid=${encodeURIComponent(d)}&_json=true`,n=await (0,l.proxyAwareFetch)(m,{headers:{Cookie:x(j),"User-Agent":r,Accept:"application/json"}},b),o=await n.text(),q=o.replace(/^&&&START&&&/,""),s=q.match(/"nonce"\s*:\s*(\d+)/)?.[1],t=null;try{t=JSON.parse(q)}catch{}if(s&&t&&(t.nonce=s),!t||"number"!=typeof t.code||0!==t.code||!t.location||!t.nonce||!t.ssecurity)return h(`phase1 sid=${d} http=${n.status} code=${t?.code??"?"} hasLoc=${!!t?.location} secondValidation=${t?.bSecondValidation??"?"} notificationUrl=${t?.notificationUrl?"present":"no"} body=${JSON.stringify(o.slice(0,200))}`),null;w(i,n);let u=t.location.includes("?")?"&":"?",v=`${t.location}${u}clientSign=${(e=s||t.nonce,g=`nonce=${e}`+((f=t.ssecurity)&&f.trim()?`&${f}`:""),encodeURIComponent(k().createHash("sha1").update(g).digest("base64")))}`;for(let a=0;a<8;a++){let a=await (0,l.proxyAwareFetch)(v,{redirect:"manual",headers:{"User-Agent":r}},b);w(i,a);let c=a.headers.get("location");if(a.status>=300&&a.status<400&&c){v=new URL(c,v).toString();continue}break}let y=`${d}_serviceToken`;if(!i.serviceToken&&i[y]&&(i.serviceToken=i[y]),!i.serviceToken)return h(`phase2 no serviceToken sid=${d} jar=[${Object.keys(i).join(",")}]`),null;let z={};for(let[a,b]of Object.entries(i))b&&("serviceToken"===a||"userId"===a||/_(ph|slh)$/.test(a))&&(z[a]=b);return x(z)}async function B(a,b){let c=y(a),d=a?.mimoPassToken?{passToken:a.mimoPassToken,userId:a.mimoUserId,cUserId:a.mimoCUserId}:await u();if(!d)return{cookie:null,reason:"no-pass-token"};let e=k().createHash("sha256").update(`${c}|${d.passToken}`).digest("hex"),f=s.get(e);if(f&&Date.now()-f.at<18e5)return{cookie:f.cookie};let g=t.get(e);if(g){let a=await g;return a?{cookie:a}:{cookie:null,reason:"sso-failed"}}let h=(async()=>{try{return await z(d,b,c,a?.region)}catch(a){return console.log(`[mimoAccount] acquire threw: ${a?.message||a} | ${String(a?.stack||"").split("\n").slice(1,4).join(" <- ")}`),null}finally{t.delete(e)}})();t.set(e,h);let i=await h;return i?(s.set(e,{cookie:i,at:Date.now()}),{cookie:i}):{cookie:null,reason:"sso-failed"}}function C(){s.clear()}let D=n,E=q;async function F(a=null,b=null){try{let{cookie:c}=await B(a,b);return c}catch(a){return console.log(`[mimoAccount] getMimoAccountCookie threw: ${a?.message||a} | ${String(a?.stack||"").split("\n").slice(1,4).join(" <- ")}`),null}}async function G(a=null,b=null){let{cookie:c,reason:d}=await B(a,b);if(!c)return{error:"no-pass-token"===d?"no-session":"session-failed"};try{let d=await (0,l.proxyAwareFetch)(`${y(a)}/api/user/usage`,{headers:{"User-Agent":q,Cookie:c,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b);if(!d.ok)return{error:`http-${d.status}`};let e=await d.json().catch(()=>null);if(!e||0!==e.code||!e.data)return{error:"bad-response"};return{percent:e.data.percent,resetDate:e.data.resetDate,resetAt:e.data.resetAt}}catch(a){return{error:a.message}}}},13120:(a,b,c)=>{c.d(b,{H:()=>o});var d=c(77598),e=c.n(d),f=c(96179),g=c(80662),h=c(99511),i=c(57247),j=c(37981);let k="x-opencode-session",l="_opencodeGoSession";function m(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>256?null:b}function n(a){let b=(0,i.SM)("opencode-go").find(b=>b.id===String(a||"").replace(/\([^()]+\)\s*$/,"").trim());return"openai-responses"===(0,h.gr)(b)}class o extends f.L{constructor(){super("opencode-go")}buildUrl(a,b,c=0,d=null){return n(a)?"https://opencode.ai/zen/go/v1/responses":super.buildUrl(a,b,c,d)}prepareRequestCredentials({body:a,credentials:b,providerSessionId:c,clientTool:d}={}){let f,h=b||{},i=function(a){if(!a||"object"!=typeof a)return null;for(let[b,c]of Object.entries(a))if(b.toLowerCase()===k)return m(c);return null}(h.rawHeaders),j=m(c)||(0,g.oV)({headers:h.rawHeaders,body:a,connectionId:h.connectionId,scope:"opencode-go"});return{...h,[l]:i||(f=e().createHash("sha256").update(`opencode-go\0${d||"generic"}\0${j}`).digest("hex").slice(0,32),`ses_${f}`)}}async execute(a){let b=this.prepareRequestCredentials(a);return super.execute({...a,credentials:b})}buildHeaders(a,b=!0,c,d){let e=super.buildHeaders(a||{},b,c,d),f=a?.[l];if(f)return e[k]=f,e;let g=this.prepareRequestCredentials({credentials:a});return e[k]=g[l],e}transformRequest(a,b,c,d){let e=super.transformRequest(a,b);if(!n(a||b?.model))return e;let f=(0,j.me)(e.input);return f&&(e.input=f),Array.isArray(e.input)&&0!==e.input.length||(e.input=[{type:"message",role:"user",content:[{type:"input_text",text:"..."}]}]),void 0===e.max_output_tokens&&(void 0!==e.max_completion_tokens?e.max_output_tokens=e.max_completion_tokens:void 0!==e.max_tokens&&(e.max_output_tokens=e.max_tokens)),delete e.max_tokens,delete e.max_completion_tokens,void 0!==e.reasoning_effort&&void 0===e.reasoning&&(e.reasoning={effort:e.reasoning_effort,summary:"auto"}),!e.reasoning||"object"!=typeof e.reasoning||Array.isArray(e.reasoning)||e.reasoning.summary||(e.reasoning.summary="auto"),delete e.reasoning_effort,e.stream=!0,e.store=!1,!function(a){if(!Array.isArray(a.tools))return;let b=new Set;if(a.tools=a.tools.filter(a=>{if(!a||"object"!=typeof a||Array.isArray(a))return!1;let c=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null,d=("string"==typeof a.name?a.name:"string"==typeof c?.name?c.name:"").trim();if(!d)return!1;let e="string"==typeof a.description?a.description:"string"==typeof c?.description?c.description:"",f=a.parameters&&"object"==typeof a.parameters&&!Array.isArray(a.parameters)?a.parameters:c?.parameters&&"object"==typeof c.parameters&&!Array.isArray(c.parameters)?c.parameters:{type:"object",properties:{}};for(let b of("object"!==f.type||f.properties||(f={...f,properties:{}}),Object.keys(a)))delete a[b];return a.type="function",a.name=d.slice(0,128),e&&(a.description=e),a.parameters=f,b.add(a.name),!0}),a.tool_choice&&"object"==typeof a.tool_choice&&!Array.isArray(a.tool_choice)&&"function"===a.tool_choice.type){let c="string"==typeof a.tool_choice.name?a.tool_choice.name.trim():"";c&&b.has(c)||delete a.tool_choice}}(e),Array.isArray(e.input)&&(e.input=e.input.filter(a=>!!(!a||"object"!=typeof a||Array.isArray(a))||"reasoning"!==a.type&&((delete a.encrypted_content,delete a.reasoning_encrypted_content,"function_call"===a.type)?!!a.name&&"string"==typeof a.name&&""!==a.name.trim()&&(a.name=a.name.trim().slice(0,128),a.call_id=(0,j.N8)(a.call_id),a.arguments=(0,j.We)(a.arguments),!0):("function_call_output"===a.type&&(a.call_id=(0,j.N8)(a.call_id),a.output=(0,j.DP)(a.output)),!0)))),e}}},19932:(a,b,c)=>{c.d(b,{T:()=>A});var d=c(74957);let e=`You are Codex, based on GPT-5. You are running as a coding agent in the Codex CLI on a user's computer.
|
|
9
|
+
`}function m(a,b,c){let{error:h}=(0,e.xJ)(a,b),i=c===d.h.CLAUDE?l({type:"error",error:h},d.h.CLAUDE):l({error:h},c)+f.$U;return g.encode(i)}},9708:(a,b,c)=>{c.d(b,{D:()=>f});var d=c(96179),e=c(35024);class f extends d.L{constructor(){super("ollama-local")}buildUrl(a,b,c=0,d=null){return`${(0,e.Ak)(d)}/api/chat`}}},11655:(a,b,c)=>{c.d(b,{x:()=>s});var d=c(74957),e=c(35024),f=c(75924),g=c(41004),h=c(65377),i=c(4845),j=c(88499),k=c(14170),l=c(9024),m=c(39609),n=c(96760),o=c(78959),p=c(74129),q=c(55511),r=c.n(q);class s extends d.H{constructor(){super("github",e.xq.github),this.knownCodexModels=new Set}isClaudeModel(a){return/claude/i.test(a||"")}buildUrl(a,b,c=0){return this.config.baseUrl}buildHeaders(a,b=!0){let c=a.copilotToken||a.accessToken;return{Authorization:`Bearer ${c}`,"Content-Type":"application/json","copilot-integration-id":"vscode-chat","editor-version":`vscode/${f.x0.VSCODE_VERSION}`,"editor-plugin-version":`copilot-chat/${f.x0.COPILOT_CHAT_VERSION}`,"user-agent":f.x0.USER_AGENT,"openai-intent":"conversation-panel","x-github-api-version":f.x0.API_VERSION,"x-request-id":r().randomUUID?.()||`${Date.now()}-${Math.random().toString(36).slice(2)}`,"x-vscode-user-agent-library-version":"electron-fetch","X-Initiator":"user","anthropic-version":p.b8,Accept:b?"text/event-stream":"application/json"}}sanitizeMessagesForChatCompletions(a){if(!a?.messages)return a;let b={...a};return b.messages=a.messages.map(a=>{if(!a.content||"string"==typeof a.content)return a;if(Array.isArray(a.content)){let b=a.content.map(a=>{if("text"===a.type||"image_url"===a.type)return a;let b=a.text||a.content||JSON.stringify(a);return{type:"text",text:"string"==typeof b?b:JSON.stringify(b)}}).filter(a=>""!==a.text);return{...a,content:b.length>0?b:null}}return a}),b}requiresMaxCompletionTokens(a){return/gpt-5|o[134]-/i.test(a)}transformRequest(a,b,c,d){let e={...b};return this.requiresMaxCompletionTokens(a)&&void 0!==e.max_tokens&&(e.max_completion_tokens=e.max_tokens,delete e.max_tokens),"none"===e.reasoning_effort&&delete e.reasoning_effort,(0,n.c)("github",a,e),e}supportsResponsesEndpoint(a){let b=(a||"").toLowerCase();return!(b.includes("gemini")||b.includes("claude"))}async execute(a){let{model:b,log:c}=a;if(this.isClaudeModel(b))return c?.debug("GITHUB",`Using /v1/messages route for ${b}`),this.executeWithMessagesEndpoint(a);if(this.knownCodexModels.has(b)&&this.supportsResponsesEndpoint(b))return c?.debug("GITHUB",`Using cached /responses route for ${b}`),this.executeWithResponsesEndpoint(a);let d={...a,body:this.sanitizeMessagesForChatCompletions(a.body)},e=await super.execute({...d,proxyOptions:a.proxyOptions||null});if(e.response.status===g.gx.BAD_REQUEST&&this.supportsResponsesEndpoint(b)){let d=await e.response.clone().text();if(d.includes("not accessible via the /chat/completions endpoint")||d.includes("The requested model is not supported"))return c?.warn("GITHUB",`Model ${b} requires /responses. Switching...`),this.knownCodexModels.add(b),this.executeWithResponsesEndpoint(a)}return e}async executeWithResponsesEndpoint({model:a,body:b,stream:c,credentials:d,signal:e,log:f,proxyOptions:g=null}){let k=this.config.responsesUrl,n=this.buildHeaders(d,c),p=(0,h.h)(a,b,c,d);f?.debug("GITHUB","Sending translated request to /responses");let q=await (0,m.proxyAwareFetch)(k,{method:"POST",headers:n,body:JSON.stringify(p),signal:e},g);if(!q.ok)return{response:q,url:k,headers:n,transformedBody:p};let r=(0,j.Ws)("openai-responses");r.model=a;let s=new TextDecoder,t="",u=new TransformStream({async transform(a,b){let d=(t+=s.decode(a,{stream:!0})).split("\n");for(let a of(t=d.pop()||"",d)){let d=a.trim();if(!d)continue;let e=(0,l.tV)(d);if(!e)continue;if(e.done&&!0===c){b.enqueue(new TextEncoder().encode(o.$U));continue}let f=(0,i.v)(e,r);if(f){let a=(0,l.v8)(f,"openai");b.enqueue(new TextEncoder().encode(a))}}},flush(a){if(t.trim()){let b=(0,l.tV)(t.trim());if(b&&!b.done){let c=(0,i.v)(b,r);c&&a.enqueue(new TextEncoder().encode((0,l.v8)(c,"openai")))}}}});return q.body?{response:new Response(q.body.pipeThrough(u),{status:q.status,statusText:q.statusText,headers:q.headers}),url:k,headers:n,transformedBody:p}:{response:new Response("",{status:q.status,headers:q.headers}),url:k,headers:n,transformedBody:p}}async executeWithMessagesEndpoint({model:a,body:b,stream:c,credentials:d,signal:e,log:f,proxyOptions:g=null}){let h=this.config.messagesUrl,i=this.buildHeaders(d,c),n=(0,j.GH)(k.h.OPENAI,k.h.CLAUDE,a,b,!0,d,"github"),p=n._toolNameMap;delete n._toolNameMap,f?.debug("GITHUB","Sending translated request to /v1/messages");let q=await (0,m.proxyAwareFetch)(h,{method:"POST",headers:i,body:JSON.stringify(n),signal:e},g);if(!q.ok)return{response:q,url:h,headers:i,transformedBody:n};let r=(0,j.Ws)(k.h.CLAUDE);r.model=a,p&&(r.toolNameMap=p);let s=new TextDecoder,t="",u=(a,b)=>{for(let c of b)a.enqueue(new TextEncoder().encode((0,l.v8)(c,"openai")))},v=new TransformStream({async transform(a,b){let d=(t+=s.decode(a,{stream:!0})).split("\n");for(let a of(t=d.pop()||"",d)){let d=a.trim();if(!d)continue;let e=(0,l.tV)(d);if(e){if(e.done&&!0===c){b.enqueue(new TextEncoder().encode(o.$U));continue}u(b,(0,j.Y8)(k.h.CLAUDE,k.h.OPENAI,e,r))}}},flush(a){if(t.trim()){let b=(0,l.tV)(t.trim());b&&!b.done&&u(a,(0,j.Y8)(k.h.CLAUDE,k.h.OPENAI,b,r))}}});return q.body?{response:new Response(q.body.pipeThrough(v),{status:q.status,statusText:q.statusText,headers:q.headers}),url:h,headers:i,transformedBody:n}:{response:new Response("",{status:q.status,headers:q.headers}),url:h,headers:i,transformedBody:n}}async refreshCopilotToken(a,b,c=null){try{let d=await (0,m.proxyAwareFetch)("https://api.github.com/copilot_internal/v2/token",{headers:{Authorization:`token ${a}`,"User-Agent":f.x0.USER_AGENT,"Editor-Version":`vscode/${f.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${f.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":f.x0.API_VERSION}},c);if(!d.ok){let a=await d.text();return b?.error?.("TOKEN",`Copilot token refresh failed: ${d.status} ${a}`),null}let e=await d.json();return b?.info?.("TOKEN","Copilot token refreshed"),{token:e.token,expiresAt:e.expires_at}}catch(a){return b?.error?.("TOKEN",`Copilot refresh error: ${a.message}`),null}}async refreshGitHubToken(a,b,c=null){try{let d={grant_type:"refresh_token",refresh_token:a,client_id:this.config.clientId};this.config.clientSecret&&(d.client_secret=this.config.clientSecret);let e=await (0,m.proxyAwareFetch)(f.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(d)},c);if(!e.ok)return null;let g=await e.json();return b?.info?.("TOKEN","GitHub token refreshed"),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return b?.error?.("TOKEN",`GitHub refresh error: ${a.message}`),null}}async refreshCredentials(a,b,c=null){let d=await this.refreshCopilotToken(a.accessToken,b,c);if(!d&&a.refreshToken){let e=await this.refreshGitHubToken(a.refreshToken,b,c);if(e?.accessToken)return(d=await this.refreshCopilotToken(e.accessToken,b,c))?{...e,copilotToken:d.token,copilotTokenExpiresAt:d.expiresAt}:e}return d?{accessToken:a.accessToken,refreshToken:a.refreshToken,copilotToken:d.token,copilotTokenExpiresAt:d.expiresAt}:null}needsRefresh(a){if(!a.copilotToken)return!0;if(a.copilotTokenExpiresAt){let b=a.copilotTokenExpiresAt;if("number"==typeof b&&b<1e12?b*=1e3:"string"==typeof b&&(b=new Date(b).getTime()),b-Date.now()<3e5)return!0}return super.needsRefresh(a)}}},12132:(a,b,c)=>{c.r(b),c.d(b,{MIMO_API_BASE:()=>D,MIMO_API_UA:()=>E,getMimoAccountCookie:()=>F,getMimoAccountUsage:()=>G,invalidateMimoAccountCookieCache:()=>C,readDesktopPassToken:()=>v,resolveMimoServerBase:()=>y});var d=c(73024),e=c.n(d),f=c(48161),g=c.n(f),h=c(76760),i=c.n(h),j=c(77598),k=c.n(j),l=c(39609);let m={cn:"https://mimo-server-cn.xiaomimimo.com",sgp:"https://mimo-server-sgp.xiaomimimo.com",ams:"https://mimo-server-ams.xiaomimimo.com",ru:"https://mimo-server-ru.xiaomimimo.com",in:"https://mimo-server-in.xiaomimimo.com"},n=m.sgp,o={cn:"mimopc",sgp:"mimosgp",ams:"mimoams",ru:"mimoru",in:"mimoin"},p="account.xiaomi.com",q="miNative PC/Normal Windows_NT/10.0.19045 SDKV/1.0.0 DEVT/PC DEVS/Windows APP/miaccount_desktop APPV/0.1.0",r="MiClaw/1.0",s=new Map,t=new Map;async function u(){let a,b=(a=g().homedir(),"win32"===process.platform?i().join(a,"AppData","Roaming","Xiaomi MiMo","Partitions","xiaomi-account","Network","Cookies"):"darwin"===process.platform?i().join(a,"Library","Application Support","Xiaomi MiMo","Partitions","xiaomi-account","Network","Cookies"):i().join(a,".config","Xiaomi MiMo","Partitions","xiaomi-account","Network","Cookies"));if(!e().existsSync(b))return null;let d=i().join(g().tmpdir(),`9r-mimo-cookies-${process.pid}-${k().randomBytes(4).toString("hex")}.db`);try{e().copyFileSync(b,d)}catch{return null}try{let{DatabaseSync:a}=await Promise.resolve().then(c.t.bind(c,79868,23)),b=new a(d,{readOnly:!0}),e=b.prepare("SELECT name, value FROM cookies WHERE host_key = ?").all("."+p);b.close();let f=Object.fromEntries(e.map(a=>[a.name,a.value]));return f.passToken?f:null}catch{return null}finally{try{e().unlinkSync(d)}catch{}}}async function v(){try{let a=await u();if(!a?.passToken)return null;return{passToken:a.passToken,userId:a.userId||null,cUserId:a.cUserId||null}}catch{return null}}function w(a,b){for(let c of b.headers.getSetCookie?.()||[]){let b=/^([^=]+)=([^;]*)/.exec(c.trim());b&&b[2]&&(a[b[1]]=b[2])}}function x(a){return Object.entries(a).filter(([,a])=>a).map(([a,b])=>`${a}=${b}`).join("; ")}function y(a=null){return m[String(a?.region||"").toLowerCase()]||n}async function z(a,b,c=n,d="sgp"){let e=String(d||"").toLowerCase(),f=o[String(e||"").toLowerCase()]||o.sgp,g=await A(a,"cn"===e?null:b,c,f);return g&&console.log(`[mimoAccount] desktop 2-phase OK (sid=${f})`),g}async function A(a,b,c,d){var e,f;let g,h=a=>console.log(`[mimoAccount] desktopPhase fail: ${a}`),i={...a},j={};i.userId&&(j.userId=i.userId),i.passToken&&(j.passToken=i.passToken),i.cUserId&&(j.cUserId=i.cUserId);let m=`https://${p}/pass/serviceLogin?_locale=zh_CN&_snsNone=true&sid=${encodeURIComponent(d)}&_json=true`,n=await (0,l.proxyAwareFetch)(m,{headers:{Cookie:x(j),"User-Agent":r,Accept:"application/json"}},b),o=await n.text(),q=o.replace(/^&&&START&&&/,""),s=q.match(/"nonce"\s*:\s*(\d+)/)?.[1],t=null;try{t=JSON.parse(q)}catch{}if(s&&t&&(t.nonce=s),!t||"number"!=typeof t.code||0!==t.code||!t.location||!t.nonce||!t.ssecurity)return h(`phase1 sid=${d} http=${n.status} code=${t?.code??"?"} hasLoc=${!!t?.location} secondValidation=${t?.bSecondValidation??"?"} notificationUrl=${t?.notificationUrl?"present":"no"} body=${JSON.stringify(o.slice(0,200))}`),null;w(i,n);let u=t.location.includes("?")?"&":"?",v=`${t.location}${u}clientSign=${(e=s||t.nonce,g=`nonce=${e}`+((f=t.ssecurity)&&f.trim()?`&${f}`:""),encodeURIComponent(k().createHash("sha1").update(g).digest("base64")))}`;for(let a=0;a<8;a++){let a=await (0,l.proxyAwareFetch)(v,{redirect:"manual",headers:{"User-Agent":r}},b);w(i,a);let c=a.headers.get("location");if(a.status>=300&&a.status<400&&c){v=new URL(c,v).toString();continue}break}let y=`${d}_serviceToken`;if(!i.serviceToken&&i[y]&&(i.serviceToken=i[y]),!i.serviceToken)return h(`phase2 no serviceToken sid=${d} jar=[${Object.keys(i).join(",")}]`),null;let z={};for(let[a,b]of Object.entries(i))b&&("serviceToken"===a||"userId"===a||/_(ph|slh)$/.test(a))&&(z[a]=b);return x(z)}async function B(a,b){let c=y(a),d=a?.mimoPassToken?{passToken:a.mimoPassToken,userId:a.mimoUserId,cUserId:a.mimoCUserId}:await u();if(!d)return{cookie:null,reason:"no-pass-token"};let e=k().createHash("sha256").update(`${c}|${d.passToken}`).digest("hex"),f=s.get(e);if(f&&Date.now()-f.at<18e5)return{cookie:f.cookie};let g=t.get(e);if(g){let a=await g;return a?{cookie:a}:{cookie:null,reason:"sso-failed"}}let h=(async()=>{try{return await z(d,b,c,a?.region)}catch(a){return console.log(`[mimoAccount] acquire threw: ${a?.message||a} | ${String(a?.stack||"").split("\n").slice(1,4).join(" <- ")}`),null}finally{t.delete(e)}})();t.set(e,h);let i=await h;return i?(s.set(e,{cookie:i,at:Date.now()}),{cookie:i}):{cookie:null,reason:"sso-failed"}}function C(){s.clear()}let D=n,E=q;async function F(a=null,b=null){try{let{cookie:c}=await B(a,b);return c}catch(a){return console.log(`[mimoAccount] getMimoAccountCookie threw: ${a?.message||a} | ${String(a?.stack||"").split("\n").slice(1,4).join(" <- ")}`),null}}async function G(a=null,b=null){let{cookie:c,reason:d}=await B(a,b);if(!c)return{error:"no-pass-token"===d?"no-session":"session-failed"};try{let d=await (0,l.proxyAwareFetch)(`${y(a)}/api/user/usage`,{headers:{"User-Agent":q,Cookie:c,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b);if(!d.ok)return{error:`http-${d.status}`};let e=await d.json().catch(()=>null);if(!e||0!==e.code||!e.data)return{error:"bad-response"};return{percent:e.data.percent,resetDate:e.data.resetDate,resetAt:e.data.resetAt}}catch(a){return{error:a.message}}}},13120:(a,b,c)=>{c.d(b,{H:()=>o});var d=c(77598),e=c.n(d),f=c(96179),g=c(80662),h=c(57247),i=c(14170),j=c(37981);let k="x-opencode-session",l="_opencodeGoSession";function m(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>256?null:b}function n(a){return(0,h.ux)("opencode-go",a)===i.h.OPENAI_RESPONSES}class o extends f.L{constructor(){super("opencode-go")}buildUrl(a,b,c=0,d=null){return n(a)?"https://opencode.ai/zen/go/v1/responses":super.buildUrl(a,b,c,d)}prepareRequestCredentials({body:a,credentials:b,providerSessionId:c,clientTool:d}={}){let f,h=b||{},i=function(a){if(!a||"object"!=typeof a)return null;for(let[b,c]of Object.entries(a))if(b.toLowerCase()===k)return m(c);return null}(h.rawHeaders),j=m(c)||(0,g.oV)({headers:h.rawHeaders,body:a,connectionId:h.connectionId,scope:"opencode-go"});return{...h,[l]:i||(f=e().createHash("sha256").update(`opencode-go\0${d||"generic"}\0${j}`).digest("hex").slice(0,32),`ses_${f}`)}}async execute(a){let b=this.prepareRequestCredentials(a);return super.execute({...a,credentials:b})}buildHeaders(a,b=!0,c,d){let e=super.buildHeaders(a||{},b,c,d),f=a?.[l];if(f)return e[k]=f,e;let g=this.prepareRequestCredentials({credentials:a});return e[k]=g[l],e}transformRequest(a,b,c,d){let e=super.transformRequest(a,b);if(!n(a||b?.model))return e;let f=(0,j.me)(e.input);return f&&(e.input=f),Array.isArray(e.input)&&0!==e.input.length||(e.input=[{type:"message",role:"user",content:[{type:"input_text",text:"..."}]}]),void 0===e.max_output_tokens&&(void 0!==e.max_completion_tokens?e.max_output_tokens=e.max_completion_tokens:void 0!==e.max_tokens&&(e.max_output_tokens=e.max_tokens)),delete e.max_tokens,delete e.max_completion_tokens,void 0!==e.reasoning_effort&&void 0===e.reasoning&&(e.reasoning={effort:e.reasoning_effort,summary:"auto"}),!e.reasoning||"object"!=typeof e.reasoning||Array.isArray(e.reasoning)||e.reasoning.summary||(e.reasoning.summary="auto"),delete e.reasoning_effort,e.stream=!0,e.store=!1,!function(a){if(!Array.isArray(a.tools))return;let b=new Set;if(a.tools=a.tools.filter(a=>{if(!a||"object"!=typeof a||Array.isArray(a))return!1;let c=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null,d=("string"==typeof a.name?a.name:"string"==typeof c?.name?c.name:"").trim();if(!d)return!1;let e="string"==typeof a.description?a.description:"string"==typeof c?.description?c.description:"",f=a.parameters&&"object"==typeof a.parameters&&!Array.isArray(a.parameters)?a.parameters:c?.parameters&&"object"==typeof c.parameters&&!Array.isArray(c.parameters)?c.parameters:{type:"object",properties:{}};for(let b of("object"!==f.type||f.properties||(f={...f,properties:{}}),Object.keys(a)))delete a[b];return a.type="function",a.name=d.slice(0,128),e&&(a.description=e),a.parameters=f,b.add(a.name),!0}),a.tool_choice&&"object"==typeof a.tool_choice&&!Array.isArray(a.tool_choice)&&"function"===a.tool_choice.type){let c="string"==typeof a.tool_choice.name?a.tool_choice.name.trim():"";c&&b.has(c)||delete a.tool_choice}}(e),Array.isArray(e.input)&&(e.input=e.input.filter(a=>!!(!a||"object"!=typeof a||Array.isArray(a))||"reasoning"!==a.type&&((delete a.encrypted_content,delete a.reasoning_encrypted_content,"function_call"===a.type)?!!a.name&&"string"==typeof a.name&&""!==a.name.trim()&&(a.name=a.name.trim().slice(0,128),a.call_id=(0,j.N8)(a.call_id),a.arguments=(0,j.We)(a.arguments),!0):("function_call_output"===a.type&&(a.call_id=(0,j.N8)(a.call_id),a.output=(0,j.DP)(a.output)),!0)))),e}}},19932:(a,b,c)=>{c.d(b,{T:()=>B});var d=c(74957);let e=`You are Codex, based on GPT-5. You are running as a coding agent in the Codex CLI on a user's computer.
|
|
10
10
|
|
|
11
11
|
## General
|
|
12
12
|
|
|
@@ -122,14 +122,14 @@ You are producing plain text that will later be styled by the CLI. Follow these
|
|
|
122
122
|
* Optionally include line/column (1‑based): :line[:column] or #Lline[Ccolumn] (column defaults to 1).
|
|
123
123
|
* Do not use URIs like file://, vscode://, or https://.
|
|
124
124
|
* Do not provide range of lines
|
|
125
|
-
* Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\\repo\\project\\main.rs:12:5`;var f=c(35024),g=c(93943),h=c(37981),i=c(29463),j=c(57247),k=c(72239),l=c(41004),m=c(92306),n=c(80662);let o=/(^|[^\\])(\\\\)*\\[pP]\{/;function p(a,b={removed:0}){return function a(b,c){if(Array.isArray(b)){let d=!1,e=b.map(b=>{let e=a(b,c);return e!==b&&(d=!0),e});return d?e:b}if(!b||"object"!=typeof b)return b;let d=!1,e={};for(let[g,h]of Object.entries(b)){var f;if("pattern"===g&&"string"==typeof(f=h)&&o.test(f)){c.removed++,d=!0;continue}if("properties"===g&&h&&"object"==typeof h&&!Array.isArray(h)){let b=!1,f={};for(let[d,e]of Object.entries(h)){let g=a(e,c);g!==e&&(b=!0),f[d]=g}b&&(d=!0),e[g]=b?f:h;continue}let b=a(h,c);b!==h&&(d=!0),e[g]=b}return d?e:b}(a,b)}let q=["server_is_overloaded","service_unavailable_error"],r=["selected model is at capacity","model_at_capacity"],s=["event: response.output_text.delta","event: response.function_call_arguments.delta",'"type":"response.output_text.delta"','"type":"response.function_call_arguments.delta"'],t="Selected model is at capacity. Please try a different model.",u=/^(rs|fc|resp|msg)_/,v=new Set(["image_generation","web_search","web_search_preview","file_search","computer","computer_use_preview","code_interpreter","mcp","local_shell","tool_search"]),w=new Set(["custom"]),x=new Set(["model","input","instructions","tools","tool_choice","stream","store","reasoning","service_tier","include","prompt_cache_key","client_metadata","text"]);function y(a,b){let c=(0,k.k)("codex",a);return c?.includes(b)?b:"ultra"===b&&c?.includes("max")?"max":"max"===b||"ultra"===b?"xhigh":b}function z(a,b){return new Response(JSON.stringify({error:{message:b,type:a>=500?"server_error":"invalid_request_error",code:a===l.gx.SERVICE_UNAVAILABLE?"service_unavailable":"upstream_error"}}),{status:a,headers:{"Content-Type":"application/json"}})}class A extends d.H{constructor(){super("codex",f.xq.codex),this._currentSessionId=null}buildHeaders(a,b=!0){let c=super.buildHeaders(a,b);c.session_id=this._currentSessionId||a?.connectionId||"default",c.originator||(c.originator="codex_cli_rs");let d=a?.providerSpecificData?.workspaceId||a?.providerSpecificData?.chatgptAccountId||a?.providerSpecificData?.accountId;return"string"==typeof d&&d&&!c["ChatGPT-Account-ID"]&&(c["ChatGPT-Account-ID"]=d),c}buildUrl(a,b,c=0,d=null){let e=super.buildUrl(a,b,c,d);return this._isCompact?`${e}/compact`:e}async refreshCredentials(a,b){return a?.refreshToken?(0,g.Vq)("codex",a,b):null}needsRefresh(a){return(0,g.fp)("codex",a)}async prefetchImages(a){if(Array.isArray(a?.input))for(let b of a.input){if(!Array.isArray(b.content))continue;let a=b.content.map(async a=>{if("image_url"!==a.type)return a;let b="string"==typeof a.image_url?a.image_url:a.image_url?.url,c=a.image_url?.detail||"auto";if(!b)return a;if(b.startsWith("data:"))return{type:"input_image",image_url:b,detail:c};let d=await (0,i.ni)(b,{timeoutMs:15e3});return{type:"input_image",image_url:d?.url||b,detail:c}});b.content=await Promise.all(a)}}async execute(a){let b=Array.isArray(a.body?.input)?a.body.input.reduce((a,b)=>a+(Array.isArray(b.content)?b.content.filter(a=>"image_url"===a.type).length:0),0):0,c=Array.isArray(a.body?.input)?a.body.input.length:0;if((0,m.s)("CODEX",`execute start | inputItems=${c} | images=${b} | sessionId=${this._currentSessionId||"pending"}`),b>0){let b=Date.now();await this.prefetchImages(a.body),(0,m.s)("CODEX",`prefetchImages done | ${Date.now()-b}ms`)}else await this.prefetchImages(a.body);let d={...l.cI,...this.config.retry},{attempts:e,delayMs:f}=(0,l.DR)(d[503]),g=0;for(;;){let b=await super.execute(a),c=await this._peekSseTransientError(b.response);if(!c.matched)return c.replacementBody&&(b.response=new Response(c.replacementBody,{status:b.response.status,statusText:b.response.statusText,headers:b.response.headers})),b;if(c.accountFallback)return a.log?.warn?.("RETRY",`CODEX | SSE account fallback "${c.message}"`),b.response=z(l.gx.SERVICE_UNAVAILABLE,c.message||t),b;if(g>=e)return a.log?.warn?.("RETRY",`CODEX | SSE overloaded "${c.matched}" — retries exhausted (${g}/${e})`),b.response=z(l.gx.SERVICE_UNAVAILABLE,c.message||c.matched),b;g++,a.log?.debug?.("RETRY",`CODEX | SSE "${c.matched}" retry ${g}/${e} after ${f/1e3}s`),(0,m.s)("CODEX",`SSE overloaded "${c.matched}" → retry ${g}/${e} in ${f}ms`),await new Promise(a=>setTimeout(a,f))}}async _peekSseTransientError(a){if(!a||!a.ok||!a.body)return{matched:null,message:null,accountFallback:!1,replacementBody:null};let b=a.body.getReader(),c=new TextDecoder,d=[],e="",f=null,g=!1;try{for(;e.length<262144;){let{done:a,value:h}=await b.read();if(a)break;d.push(h);let i=(e+=c.decode(h,{stream:!0})).toLowerCase(),j=r.find(a=>i.includes(a));if(j){f=j,g=!0;break}let k=q.find(a=>i.includes(a));if(k){f=k;break}if(s.some(a=>i.includes(a)))break}}catch(a){(0,m.s)("CODEX",`peek read error: ${a.message}`)}if(f){try{await b.cancel()}catch{}try{b.releaseLock()}catch{}return{matched:f,message:function(a,b){let c=a?.match(/Selected model is at capacity\. Please try a different model\./i)?.[0];if(c)return c;for(let b of String(a||"").split(/\r?\n/)){if(!b.startsWith("data:"))continue;let a=b.slice(5).trim();if(a&&"[DONE]"!==a)try{let b=function a(b,c=0){if(!b||c>6||"string"==typeof b)return null;if(Array.isArray(b)){for(let d of b){let b=a(d,c+1);if(b)return b}return null}if("object"!=typeof b)return null;if("string"==typeof b.message&&b.message.trim())return b.message;if("string"==typeof b.error?.message&&b.error.message.trim())return b.error.message;if("string"==typeof b.response?.error?.message&&b.response.error.message.trim())return b.response.error.message;for(let d of Object.values(b)){let b=a(d,c+1);if(b)return b}return null}(JSON.parse(a));if(b)return b}catch{}}return b||t}(e,f),accountFallback:g,replacementBody:null}}b.releaseLock();let h=a.body,i=null;return{matched:null,message:null,accountFallback:!1,replacementBody:new ReadableStream({start(a){for(let b of d)a.enqueue(b);i=h.getReader()},async pull(a){try{let{done:b,value:c}=await i.read();if(b)return void a.close();a.enqueue(c)}catch(b){a.error(b)}},cancel(a){try{i?.cancel(a)}catch{}}})}}parseError(a,b){if(429===a.status&&b)try{let a=JSON.parse(b),c=a?.error;if(c?.type==="usage_limit_reached"){let a=Date.now(),d=null;if("number"==typeof c.resets_at&&c.resets_at>0){let b=1e3*c.resets_at;b>a&&(d=b)}if(!d&&"number"==typeof c.resets_in_seconds&&c.resets_in_seconds>0&&(d=a+1e3*c.resets_in_seconds),d)return{status:429,message:c.message||b,resetsAtMs:d}}}catch{}return super.parseError(a,b)}transformRequest(a,b,c,d){this._isCompact=!!b._compact,delete b._compact,this._currentSessionId=(0,n.oV)({headers:d?.rawHeaders,body:b,connectionId:d?.connectionId,workspaceId:d?.providerSpecificData?.workspaceId,scope:"codex"});let f=(0,h.me)(b.input);if(f&&(b.input=f),(!b.input||Array.isArray(b.input)&&0===b.input.length)&&(b.input=[{type:"message",role:"user",content:[{type:"input_text",text:"..."}]}]),Array.isArray(b.input))for(let a of b.input)!(!a||"object"!=typeof a||Array.isArray(a))&&("system"!==a.role||a.type&&"message"!==a.type||(a.role="developer"));Array.isArray(b.input)&&(b.input=b.input.filter(a=>{if("string"==typeof a&&u.test(a))return!1;if(a&&"object"==typeof a&&!Array.isArray(a)){if("item_reference"===a.type)return!1;"string"==typeof a.id&&u.test(a.id)&&delete a.id}return!0})),function(a){if(!Array.isArray(a.tools))return;let b=new Set,c={removed:0};if(a.tools=a.tools.filter(a=>{if(!a||"object"!=typeof a||Array.isArray(a))return!1;let d="string"==typeof a.type?a.type:"";if("namespace"===d){if(Array.isArray(a.tools))for(let d of a.tools){let a="string"==typeof d?.name?d.name.trim().slice(0,128):"";a&&b.add(a),d?.parameters&&"object"==typeof d.parameters&&(d.parameters=p(d.parameters,c))}return!0}if("function"!==d)return!!w.has(d)||!!d&&!a.function&&"string"!=typeof a.name&&v.has(d);let e=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null,f=("string"==typeof a.name?a.name:"string"==typeof e?.name?e.name:"").trim();if(!f)return!1;let g="string"==typeof a.description?a.description:"string"==typeof e?.description?e.description:"",h=a.parameters&&"object"==typeof a.parameters&&!Array.isArray(a.parameters)?a.parameters:e?.parameters&&"object"==typeof e.parameters&&!Array.isArray(e.parameters)?e.parameters:{type:"object",properties:{}};for(let b of Object.keys(a))delete a[b];return a.type="function",a.name=f.slice(0,128),g&&(a.description=g),a.parameters=p(h,c),b.add(f),!0}),c.removed>0&&(0,m.s)("CODEX",`stripped ${c.removed} unsupported tool schema pattern(s)`),a.tool_choice&&"object"==typeof a.tool_choice&&!Array.isArray(a.tool_choice)&&"function"===a.tool_choice.type){let c="string"==typeof a.tool_choice.name?a.tool_choice.name.trim():"";c&&b.has(c)||delete a.tool_choice}}(b),b.stream=!0,b.instructions&&""!==b.instructions.trim()||(b.instructions=e),b.store=!1,!b.prompt_cache_key&&this._currentSessionId&&(b.prompt_cache_key=this._currentSessionId),b.model=(0,j.kt)("cx",b.model||a);let g=null;for(let a of["none","minimal","low","medium","high","xhigh"])if(b.model.endsWith(`-${a}`)){g=a,b.model=b.model.replace(`-${a}`,"");break}if(b.reasoning)b.reasoning.effort=y(b.model,b.reasoning.effort),b.reasoning.summary||(b.reasoning.summary="auto");else{let a=y(b.model,b.reasoning_effort||g||"low");b.reasoning={effort:a,summary:"auto"}}for(let a of(delete b.reasoning_effort,b.reasoning&&b.reasoning.effort&&"none"!==b.reasoning.effort&&(b.include=["reasoning.encrypted_content"]),delete b.temperature,delete b.top_p,delete b.frequency_penalty,delete b.presence_penalty,delete b.logprobs,delete b.top_logprobs,delete b.n,delete b.seed,delete b.max_tokens,delete b.max_completion_tokens,delete b.max_output_tokens,delete b.user,delete b.prompt_cache_retention,delete b.metadata,delete b.stream_options,delete b.safety_identifier,delete b.previous_response_id,"fast"===b.service_tier&&(b.service_tier="priority"),b.service_tier&&"priority"!==b.service_tier&&delete b.service_tier,Object.keys(b)))x.has(a)||delete b[a];return b}}},19946:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{ou:()=>L});var e=c(74957),f=c(35024),g=c(41004),h=c(55456),i=c(81756),j=c(73483),k=c(78959),l=c(92536),m=c(14170),n=c(21317),o=c(39609),p=c(74075),q=c.n(p),r=c(55511),s=c.n(r);let a=null;if(!("u">typeof caches&&"object"==typeof caches||"u">typeof EdgeRuntime))try{a=await Promise.resolve().then(c.t.bind(c,73496,23))}catch{}let F="/agent.v1.AgentService/Run";function t(...a){let b=a.reduce((a,b)=>a+b.length,0),c=new Uint8Array(b),d=0;for(let b of a)c.set(b,d),d+=b.length;return c}let G=(a,b)=>(0,h.Xh)(a,2,b),H=(a,b)=>(0,h.Xh)(a,2,b);function u(a){return"string"==typeof a?a:Array.isArray(a)?a.filter(a=>a?.type===n.x4.TEXT&&"string"==typeof a.text).map(a=>a.text).join("\n"):""}function v(a){return!a||a.type===n.x4.TEXT||"string"==typeof a}function w(a){let b=u(a?.content),c=[];if(a?.role===n.z7.ASSISTANT&&a.tool_calls?.length)for(let b of a.tool_calls)c.push(`[tool_call id=${b.id||""} name=${b.function?.name||"tool"} args=${b.function?.arguments||"{}"}]`);a?.role===n.z7.TOOL&&c.push(`[tool_result id=${a.tool_call_id||""}]`);let d=[b,...c].filter(Boolean).join("\n");if(!d)return null;let e=G(1,d);return a.role===n.z7.ASSISTANT?H(2,H(1,H(1,e))):H(1,H(1,H(1,e)))}function x(a,b){let c=a?.get(b)?.[0]?.value;return c?Buffer.from(c).toString("utf8"):""}function y(a){let b=Number(a?.get(1)?.[0]?.value||0),c=x(a,15);return{id:b,execId:c}}function z(a,b,c,d){let e=[];return a&&e.push((0,h.Xh)(1,0,a)),e.push(G(15,b||"")),e.push((0,h.Xh)(c,2,d||new Uint8Array)),(0,h.tM)(H(2,t(...e)))}let I={2:2,3:3,4:4,5:5,7:7,8:8,9:9,16:16,20:20,23:23};function A(a,b,c,d){let e=[];return a&&e.push((0,h.Xh)(1,0,a)),e.push((0,h.Xh)(b,2,c||new Uint8Array)),d&&d.length&&e.push((0,h.Xh)(4,2,d)),(0,h.tM)(H(3,t(...e)))}let J="1"===process.env.CURSOR_STREAM_DEBUG,K=(...a)=>{J&&console.log(...a)};function B(a){let b=String(a||"").split("/").pop();return/^composer(?:-|$)/i.test(b)}function C(a){if(!a)return"";let b="</think>",c=a.lastIndexOf(b);return c<0?"":a.slice(c+b.length).trimStart()}function D(a,b,c,d){if(b+5>a.length)return K(`[CURSOR BUFFER${d}] Reached end, offset=${b}, remaining=${a.length-b}`),{status:"done"};let e=a[b],f=a.readUInt32BE(b+1);if(K(`[CURSOR BUFFER${d}] Frame ${c+1}: flags=0x${e.toString(16).padStart(2,"0")}, length=${f}`),b+5+f>a.length)return K(`[CURSOR BUFFER${d}] Incomplete frame, offset=${b}, length=${f}, buffer.length=${a.length}`),{status:"done"};let g=a.slice(b+5,b+5+f),h=b+5+f;return(g=function(a,b){if(a.length>10&&123===a[0]&&34===a[1])try{if(a.toString("utf-8").startsWith('{"error"'))return K("[DECOMPRESS] Detected JSON error, skipping decompression"),a}catch{}if(1===b||2===b||3===b)try{return q().gunzipSync(a)}catch(c){try{return q().inflateSync(a)}catch(d){try{return q().inflateRawSync(a)}catch(e){K(`[DECOMPRESS ERROR] flags=${b}, payloadSize=${a.length}, gzip=${c.message}, deflate=${d.message}, raw=${e.message}`),K("[DECOMPRESS ERROR] First 50 bytes (hex):",a.slice(0,50).toString("hex"))}}}return a}(g,e))?{status:"ok",payload:g,offset:h}:(K(`[CURSOR BUFFER${d}] Frame ${c+1}: decompression failed, skipping`),{status:"skip",offset:h})}function E(a){let b=a?.error?.details?.[0]?.debug?.details?.title||a?.error?.details?.[0]?.debug?.details?.detail||a?.error?.message||"API Error",c=a?.error?.code==="resource_exhausted";return new Response(JSON.stringify({error:{message:b,type:c?"rate_limit_error":"api_error",code:a?.error?.details?.[0]?.debug?.error||"unknown"}}),{status:c?g.gx.RATE_LIMITED:g.gx.BAD_REQUEST,headers:{"Content-Type":"application/json"}})}class L extends e.H{constructor(){super("cursor",f.xq.cursor)}buildUrl(){return`${this.config.baseUrl}${this.config.chatPath}`}buildHeaders(a){let b=a.accessToken,c=a.providerSpecificData?.machineId,d=a.providerSpecificData?.ghostMode!==!1;if(!c)throw Error("Machine ID is required for Cursor API");return(0,i.JA)(b,c,d)}transformRequest(a,b,c,d){let e=b.messages||[],f=b.tools||[],g=b.reasoning_effort||null,i=d?.rawHeaders?.["user-agent"]||"",j=i.includes("claude-cli")||i.includes("claude-code")||i.includes("Claude Code");return(0,h.yI)(e,a,f,g,j)}async makeFetchRequest(a,b,c,d,e=null){let f=await (0,o.proxyAwareFetch)(a,{method:"POST",headers:b,body:c,signal:d},e);return{status:f.status,headers:Object.fromEntries(f.headers.entries()),body:Buffer.from(await f.arrayBuffer())}}makeHttp2Request(b,c,d,e){if(!a)throw Error("http2 module not available");return new Promise((f,g)=>{let h=new URL(b),i=a.connect(`https://${h.host}`),j=[],k={},l=!1,m=a=>(...b)=>{l||(l=!0,clearTimeout(n),i.close(),a(...b))},n=setTimeout(m(()=>{g(Error("HTTP/2 request timed out"))}),6e4);i.on("error",m(g));let o=i.request({":method":"POST",":path":h.pathname,":authority":h.host,":scheme":"https",...c});if(o.on("response",a=>{k=a}),o.on("data",a=>{j.push(a)}),o.on("end",m(()=>{f({status:k[":status"],headers:k,body:Buffer.concat(j)})})),o.on("error",m(g)),e){let a=m(()=>g(Error("Request aborted")));e.addEventListener("abort",a,{once:!0})}o.write(d),o.end()})}openAgentHttp2Stream(b,c,d){if(!a)throw Error("HTTP/2 is required for Cursor AgentService (endpoint is h2-only)");let e=new URL(b),f=a.connect(`https://${e.host}`),g=[],h=null,i=!1,j=null,k=null,l=a=>{if(!h)return;let b=h;h=null,b(a)},m=a=>{j||(j=a,i=!0,l(null))},n=()=>{try{k?.destroy()}catch{}try{f.close()}catch{}};if(f.on("error",m),(k=f.request({":method":"POST",":path":e.pathname,":authority":e.host,":scheme":"https",...c})).on("error",m),k.on("data",a=>{h?l({value:a,done:!1}):g.push(a)}),k.on("end",()=>{i=!0,l({value:void 0,done:!0})}),d){let a=()=>{m(Error("Request aborted")),n()};d.aborted?a():d.addEventListener("abort",a,{once:!0})}return{responseHeaders:new Promise((a,b)=>{let c=a=>b(a);f.once("error",c),k.once("error",c),k.once("response",b=>{f.off("error",c),k.off("error",c),a(b)})}),write(a){k&&!k.destroyed&&k.write(Buffer.from(a))},end(){try{k&&!k.destroyed&&k.end()}catch{}},close:n,async read(){if(g.length)return{value:g.shift(),done:!1};if(i){if(j)throw j;return{value:void 0,done:!0}}let a=await new Promise(a=>{h=a});if(j)throw j;return a||{value:void 0,done:!0}}}}async executeAgent({model:a,body:b,stream:c,credentials:d,signal:e,log:i}){let o,p,r=f.sr.cursor?.agentEndpoint;if(!r)throw Error("Cursor AgentService endpoint is not configured");let v=`${r}${F}`,D=this.buildHeaders(d),E=new AbortController;e?.addEventListener&&e.addEventListener("abort",()=>E.abort(e.reason),{once:!0});let J=b.tools||[];try{(o=this.openAgentHttp2Stream(v,D,E.signal)).write(function(a,b,c=[]){let d=a.filter(a=>a?.role===n.z7.SYSTEM).map(a=>u(a.content)).filter(Boolean).join("\n\n"),e=a.filter(a=>a?.role!==n.z7.SYSTEM),f=[...e].map(a=>a?.role).lastIndexOf(n.z7.USER),g=f>=0?e[f]:e.at(-1),i=e.slice(0,f>=0?f:-1).map(w).filter(Boolean),j=u(g?.content)||"Continue.",k=d?`${d}
|
|
125
|
+
* Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\\repo\\project\\main.rs:12:5`;var f=c(35024),g=c(93943),h=c(37981),i=c(29463),j=c(57247),k=c(72239),l=c(41004),m=c(92306),n=c(80662);let o=/(^|[^\\])(\\\\)*\\[pP]\{/;function p(a,b={removed:0}){return function a(b,c){if(Array.isArray(b)){let d=!1,e=b.map(b=>{let e=a(b,c);return e!==b&&(d=!0),e});return d?e:b}if(!b||"object"!=typeof b)return b;let d=!1,e={};for(let[g,h]of Object.entries(b)){var f;if("pattern"===g&&"string"==typeof(f=h)&&o.test(f)){c.removed++,d=!0;continue}if("properties"===g&&h&&"object"==typeof h&&!Array.isArray(h)){let b=!1,f={};for(let[d,e]of Object.entries(h)){let g=a(e,c);g!==e&&(b=!0),f[d]=g}b&&(d=!0),e[g]=b?f:h;continue}let b=a(h,c);b!==h&&(d=!0),e[g]=b}return d?e:b}(a,b)}let q=["server_is_overloaded","service_unavailable_error"],r=["selected model is at capacity","model_at_capacity"],s=["event: response.output_text.delta","event: response.function_call_arguments.delta",'"type":"response.output_text.delta"','"type":"response.function_call_arguments.delta"'],t="Selected model is at capacity. Please try a different model.";function u(a){let b=String(a||"").replace(/\([^()]+\)\s*$/,"");return(0,j.SM)("cx").some(a=>a.id===b&&!0===a.responsesLite)}let v=/^(rs|fc|resp|msg)_/,w=new Set(["image_generation","web_search","web_search_preview","file_search","computer","computer_use_preview","code_interpreter","mcp","local_shell","tool_search"]),x=new Set(["custom"]),y=new Set(["model","input","instructions","tools","tool_choice","stream","store","reasoning","service_tier","include","prompt_cache_key","client_metadata","text","parallel_tool_calls"]);function z(a,b){let c=(0,k.k)("codex",a);return c?.includes(b)?b:u(a)&&("none"===b||"minimal"===b)?"low":"ultra"===b&&c?.includes("max")?"max":"max"===b||"ultra"===b?"xhigh":b}function A(a,b){return new Response(JSON.stringify({error:{message:b,type:a>=500?"server_error":"invalid_request_error",code:a===l.gx.SERVICE_UNAVAILABLE?"service_unavailable":"upstream_error"}}),{status:a,headers:{"Content-Type":"application/json"}})}class B extends d.H{constructor(){super("codex",f.xq.codex),this._currentSessionId=null}buildHeaders(a,b=!0,c=null,d=null){let e=super.buildHeaders(a,b);u(d&&(0,j.kt)("cx",d))&&(e["x-openai-internal-codex-responses-lite"]="true"),e.session_id=this._currentSessionId||a?.connectionId||"default",e.originator||(e.originator="codex_cli_rs");let f=a?.providerSpecificData?.workspaceId||a?.providerSpecificData?.chatgptAccountId||a?.providerSpecificData?.accountId;return"string"==typeof f&&f&&!e["ChatGPT-Account-ID"]&&(e["ChatGPT-Account-ID"]=f),e}buildUrl(a,b,c=0,d=null){let e=super.buildUrl(a,b,c,d);return this._isCompact?`${e}/compact`:e}async refreshCredentials(a,b){return a?.refreshToken?(0,g.Vq)("codex",a,b):null}needsRefresh(a){return(0,g.fp)("codex",a)}async prefetchImages(a){if(Array.isArray(a?.input))for(let b of a.input){if(!Array.isArray(b.content))continue;let a=b.content.map(async a=>{if("image_url"!==a.type)return a;let b="string"==typeof a.image_url?a.image_url:a.image_url?.url,c=a.image_url?.detail||"auto";if(!b)return a;if(b.startsWith("data:"))return{type:"input_image",image_url:b,detail:c};let d=await (0,i.ni)(b,{timeoutMs:15e3});return{type:"input_image",image_url:d?.url||b,detail:c}});b.content=await Promise.all(a)}}async execute(a){let b=Array.isArray(a.body?.input)?a.body.input.reduce((a,b)=>a+(Array.isArray(b.content)?b.content.filter(a=>"image_url"===a.type).length:0),0):0,c=Array.isArray(a.body?.input)?a.body.input.length:0;if((0,m.s)("CODEX",`execute start | inputItems=${c} | images=${b} | sessionId=${this._currentSessionId||"pending"}`),b>0){let b=Date.now();await this.prefetchImages(a.body),(0,m.s)("CODEX",`prefetchImages done | ${Date.now()-b}ms`)}else await this.prefetchImages(a.body);let d={...l.cI,...this.config.retry},{attempts:e,delayMs:f}=(0,l.DR)(d[503]),g=0;for(;;){let b=await super.execute(a),c=await this._peekSseTransientError(b.response);if(!c.matched)return c.replacementBody&&(b.response=new Response(c.replacementBody,{status:b.response.status,statusText:b.response.statusText,headers:b.response.headers})),b;if(c.accountFallback)return a.log?.warn?.("RETRY",`CODEX | SSE account fallback "${c.message}"`),b.response=A(l.gx.SERVICE_UNAVAILABLE,c.message||t),b;if(g>=e)return a.log?.warn?.("RETRY",`CODEX | SSE overloaded "${c.matched}" — retries exhausted (${g}/${e})`),b.response=A(l.gx.SERVICE_UNAVAILABLE,c.message||c.matched),b;g++,a.log?.debug?.("RETRY",`CODEX | SSE "${c.matched}" retry ${g}/${e} after ${f/1e3}s`),(0,m.s)("CODEX",`SSE overloaded "${c.matched}" → retry ${g}/${e} in ${f}ms`),await new Promise(a=>setTimeout(a,f))}}async _peekSseTransientError(a){if(!a||!a.ok||!a.body)return{matched:null,message:null,accountFallback:!1,replacementBody:null};let b=a.body.getReader(),c=new TextDecoder,d=[],e="",f=null,g=!1;try{for(;e.length<262144;){let{done:a,value:h}=await b.read();if(a)break;d.push(h);let i=(e+=c.decode(h,{stream:!0})).toLowerCase(),j=r.find(a=>i.includes(a));if(j){f=j,g=!0;break}let k=q.find(a=>i.includes(a));if(k){f=k;break}if(s.some(a=>i.includes(a)))break}}catch(a){(0,m.s)("CODEX",`peek read error: ${a.message}`)}if(f){try{await b.cancel()}catch{}try{b.releaseLock()}catch{}return{matched:f,message:function(a,b){let c=a?.match(/Selected model is at capacity\. Please try a different model\./i)?.[0];if(c)return c;for(let b of String(a||"").split(/\r?\n/)){if(!b.startsWith("data:"))continue;let a=b.slice(5).trim();if(a&&"[DONE]"!==a)try{let b=function a(b,c=0){if(!b||c>6||"string"==typeof b)return null;if(Array.isArray(b)){for(let d of b){let b=a(d,c+1);if(b)return b}return null}if("object"!=typeof b)return null;if("string"==typeof b.message&&b.message.trim())return b.message;if("string"==typeof b.error?.message&&b.error.message.trim())return b.error.message;if("string"==typeof b.response?.error?.message&&b.response.error.message.trim())return b.response.error.message;for(let d of Object.values(b)){let b=a(d,c+1);if(b)return b}return null}(JSON.parse(a));if(b)return b}catch{}}return b||t}(e,f),accountFallback:g,replacementBody:null}}b.releaseLock();let h=a.body,i=null;return{matched:null,message:null,accountFallback:!1,replacementBody:new ReadableStream({start(a){for(let b of d)a.enqueue(b);i=h.getReader()},async pull(a){try{let{done:b,value:c}=await i.read();if(b)return void a.close();a.enqueue(c)}catch(b){a.error(b)}},cancel(a){try{i?.cancel(a)}catch{}}})}}parseError(a,b){if(429===a.status&&b)try{let a=JSON.parse(b),c=a?.error;if(c?.type==="usage_limit_reached"){let a=Date.now(),d=null;if("number"==typeof c.resets_at&&c.resets_at>0){let b=1e3*c.resets_at;b>a&&(d=b)}if(!d&&"number"==typeof c.resets_in_seconds&&c.resets_in_seconds>0&&(d=a+1e3*c.resets_in_seconds),d)return{status:429,message:c.message||b,resetsAtMs:d}}}catch{}return super.parseError(a,b)}transformRequest(a,b,c,d){this._isCompact=!!b._compact,delete b._compact,this._currentSessionId=(0,n.oV)({headers:d?.rawHeaders,body:b,connectionId:d?.connectionId,workspaceId:d?.providerSpecificData?.workspaceId,scope:"codex"});let f=(0,h.me)(b.input);f&&(b.input=f);let g=(0,j.kt)("cx",b.model||a),i=u(g);if((!b.input||Array.isArray(b.input)&&0===b.input.length)&&(b.input=[{type:"message",role:"user",content:[{type:"input_text",text:"..."}]}]),Array.isArray(b.input))for(let a of b.input)!(!a||"object"!=typeof a||Array.isArray(a))&&("system"!==a.role||a.type&&"message"!==a.type||(a.role="developer"));if(!function(a,b=!1){Array.isArray(a.input)&&(a.input=a.input.filter(a=>{if("string"==typeof a&&v.test(a))return!1;if(a&&"object"==typeof a&&!Array.isArray(a)){if("item_reference"===a.type)return!1;"string"==typeof a.id&&v.test(a.id)&&!(b&&"developer"===a.role&&a.id.startsWith("msg_"))&&delete a.id}return!0}))}(b,i),!function(a){if(!Array.isArray(a.tools))return;let b=new Set,c={removed:0};if(a.tools=a.tools.filter(a=>{if(!a||"object"!=typeof a||Array.isArray(a))return!1;let d="string"==typeof a.type?a.type:"";if("namespace"===d){if(Array.isArray(a.tools))for(let d of a.tools){let a="string"==typeof d?.name?d.name.trim().slice(0,128):"";a&&b.add(a),d?.parameters&&"object"==typeof d.parameters&&(d.parameters=p(d.parameters,c))}return!0}if("function"!==d)return!!x.has(d)||!!d&&!a.function&&"string"!=typeof a.name&&w.has(d);let e=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null,f=("string"==typeof a.name?a.name:"string"==typeof e?.name?e.name:"").trim();if(!f)return!1;let g="string"==typeof a.description?a.description:"string"==typeof e?.description?e.description:"",h=a.parameters&&"object"==typeof a.parameters&&!Array.isArray(a.parameters)?a.parameters:e?.parameters&&"object"==typeof e.parameters&&!Array.isArray(e.parameters)?e.parameters:{type:"object",properties:{}};for(let b of Object.keys(a))delete a[b];return a.type="function",a.name=f.slice(0,128),g&&(a.description=g),a.parameters=p(h,c),b.add(f),!0}),c.removed>0&&(0,m.s)("CODEX",`stripped ${c.removed} unsupported tool schema pattern(s)`),a.tool_choice&&"object"==typeof a.tool_choice&&!Array.isArray(a.tool_choice)&&"function"===a.tool_choice.type){let c="string"==typeof a.tool_choice.name?a.tool_choice.name.trim():"";c&&b.has(c)||delete a.tool_choice}}(b),b.stream=!0,i||b.instructions&&""!==b.instructions.trim()||(b.instructions=e),b.store=!1,!b.prompt_cache_key&&this._currentSessionId&&(b.prompt_cache_key=this._currentSessionId),b.model=g,i){let a=Array.isArray(b.input)?b.input:[b.input];if(!a.some(a=>a?.type==="additional_tools")){let c="string"==typeof b.instructions&&b.instructions.trim()?b.instructions:e,d=[{type:"additional_tools",role:"developer",tools:Array.isArray(b.tools)?b.tools:[]}];c&&d.push({type:"message",role:"developer",content:[{type:"input_text",text:c}]}),a.unshift(...d)}b.input=a,b.instructions="",b.tools=null,b.tool_choice||="auto",b.parallel_tool_calls=!1}else delete b.parallel_tool_calls;let k=null;for(let a of["none","minimal","low","medium","high","xhigh"])if(b.model.endsWith(`-${a}`)){k=a,b.model=b.model.replace(`-${a}`,"");break}if(b.reasoning)b.reasoning.effort=z(b.model,b.reasoning.effort),i||b.reasoning.summary||(b.reasoning.summary="auto");else{let a=z(b.model,b.reasoning_effort||k||(i?"medium":"low"));b.reasoning=i?{effort:a}:{effort:a,summary:"auto"}}for(let a of(i&&(b.reasoning.context="all_turns"),delete b.reasoning_effort,b.reasoning&&b.reasoning.effort&&"none"!==b.reasoning.effort&&(b.include=["reasoning.encrypted_content"]),delete b.temperature,delete b.top_p,delete b.frequency_penalty,delete b.presence_penalty,delete b.logprobs,delete b.top_logprobs,delete b.n,delete b.seed,delete b.max_tokens,delete b.max_completion_tokens,delete b.max_output_tokens,delete b.user,delete b.prompt_cache_retention,delete b.metadata,delete b.stream_options,delete b.safety_identifier,delete b.previous_response_id,"fast"===b.service_tier&&(b.service_tier="priority"),b.service_tier&&"priority"!==b.service_tier&&delete b.service_tier,Object.keys(b)))y.has(a)||delete b[a];return b}}},19946:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{ou:()=>L});var e=c(74957),f=c(35024),g=c(41004),h=c(55456),i=c(81756),j=c(73483),k=c(78959),l=c(92536),m=c(14170),n=c(43698),o=c(39609),p=c(74075),q=c.n(p),r=c(55511),s=c.n(r);let a=null;if(!("u">typeof caches&&"object"==typeof caches||"u">typeof EdgeRuntime))try{a=await Promise.resolve().then(c.t.bind(c,73496,23))}catch{}let F="/agent.v1.AgentService/Run";function t(...a){let b=a.reduce((a,b)=>a+b.length,0),c=new Uint8Array(b),d=0;for(let b of a)c.set(b,d),d+=b.length;return c}let G=(a,b)=>(0,h.Xh)(a,2,b),H=(a,b)=>(0,h.Xh)(a,2,b);function u(a){return"string"==typeof a?a:Array.isArray(a)?a.filter(a=>a?.type===n.x4.TEXT&&"string"==typeof a.text).map(a=>a.text).join("\n"):""}function v(a){return!a||a.type===n.x4.TEXT||"string"==typeof a}function w(a){let b=u(a?.content),c=[];if(a?.role===n.z7.ASSISTANT&&a.tool_calls?.length)for(let b of a.tool_calls)c.push(`[tool_call id=${b.id||""} name=${b.function?.name||"tool"} args=${b.function?.arguments||"{}"}]`);a?.role===n.z7.TOOL&&c.push(`[tool_result id=${a.tool_call_id||""}]`);let d=[b,...c].filter(Boolean).join("\n");if(!d)return null;let e=G(1,d);return a.role===n.z7.ASSISTANT?H(2,H(1,H(1,e))):H(1,H(1,H(1,e)))}function x(a,b){let c=a?.get(b)?.[0]?.value;return c?Buffer.from(c).toString("utf8"):""}function y(a){let b=Number(a?.get(1)?.[0]?.value||0),c=x(a,15);return{id:b,execId:c}}function z(a,b,c,d){let e=[];return a&&e.push((0,h.Xh)(1,0,a)),e.push(G(15,b||"")),e.push((0,h.Xh)(c,2,d||new Uint8Array)),(0,h.tM)(H(2,t(...e)))}let I={2:2,3:3,4:4,5:5,7:7,8:8,9:9,16:16,20:20,23:23};function A(a,b,c,d){let e=[];return a&&e.push((0,h.Xh)(1,0,a)),e.push((0,h.Xh)(b,2,c||new Uint8Array)),d&&d.length&&e.push((0,h.Xh)(4,2,d)),(0,h.tM)(H(3,t(...e)))}let J="1"===process.env.CURSOR_STREAM_DEBUG,K=(...a)=>{J&&console.log(...a)};function B(a){let b=String(a||"").split("/").pop();return/^composer(?:-|$)/i.test(b)}function C(a){if(!a)return"";let b="</think>",c=a.lastIndexOf(b);return c<0?"":a.slice(c+b.length).trimStart()}function D(a,b,c,d){if(b+5>a.length)return K(`[CURSOR BUFFER${d}] Reached end, offset=${b}, remaining=${a.length-b}`),{status:"done"};let e=a[b],f=a.readUInt32BE(b+1);if(K(`[CURSOR BUFFER${d}] Frame ${c+1}: flags=0x${e.toString(16).padStart(2,"0")}, length=${f}`),b+5+f>a.length)return K(`[CURSOR BUFFER${d}] Incomplete frame, offset=${b}, length=${f}, buffer.length=${a.length}`),{status:"done"};let g=a.slice(b+5,b+5+f),h=b+5+f;return(g=function(a,b){if(a.length>10&&123===a[0]&&34===a[1])try{if(a.toString("utf-8").startsWith('{"error"'))return K("[DECOMPRESS] Detected JSON error, skipping decompression"),a}catch{}if(1===b||2===b||3===b)try{return q().gunzipSync(a)}catch(c){try{return q().inflateSync(a)}catch(d){try{return q().inflateRawSync(a)}catch(e){K(`[DECOMPRESS ERROR] flags=${b}, payloadSize=${a.length}, gzip=${c.message}, deflate=${d.message}, raw=${e.message}`),K("[DECOMPRESS ERROR] First 50 bytes (hex):",a.slice(0,50).toString("hex"))}}}return a}(g,e))?{status:"ok",payload:g,offset:h}:(K(`[CURSOR BUFFER${d}] Frame ${c+1}: decompression failed, skipping`),{status:"skip",offset:h})}function E(a){let b=a?.error?.details?.[0]?.debug?.details?.title||a?.error?.details?.[0]?.debug?.details?.detail||a?.error?.message||"API Error",c=a?.error?.code==="resource_exhausted";return new Response(JSON.stringify({error:{message:b,type:c?"rate_limit_error":"api_error",code:a?.error?.details?.[0]?.debug?.error||"unknown"}}),{status:c?g.gx.RATE_LIMITED:g.gx.BAD_REQUEST,headers:{"Content-Type":"application/json"}})}class L extends e.H{constructor(){super("cursor",f.xq.cursor)}buildUrl(){return`${this.config.baseUrl}${this.config.chatPath}`}buildHeaders(a){let b=a.accessToken,c=a.providerSpecificData?.machineId,d=a.providerSpecificData?.ghostMode!==!1;if(!c)throw Error("Machine ID is required for Cursor API");return(0,i.JA)(b,c,d)}transformRequest(a,b,c,d){let e=b.messages||[],f=b.tools||[],g=b.reasoning_effort||null,i=d?.rawHeaders?.["user-agent"]||"",j=i.includes("claude-cli")||i.includes("claude-code")||i.includes("Claude Code");return(0,h.yI)(e,a,f,g,j)}async makeFetchRequest(a,b,c,d,e=null){let f=await (0,o.proxyAwareFetch)(a,{method:"POST",headers:b,body:c,signal:d},e);return{status:f.status,headers:Object.fromEntries(f.headers.entries()),body:Buffer.from(await f.arrayBuffer())}}makeHttp2Request(b,c,d,e){if(!a)throw Error("http2 module not available");return new Promise((f,g)=>{let h=new URL(b),i=a.connect(`https://${h.host}`),j=[],k={},l=!1,m=a=>(...b)=>{l||(l=!0,clearTimeout(n),i.close(),a(...b))},n=setTimeout(m(()=>{g(Error("HTTP/2 request timed out"))}),6e4);i.on("error",m(g));let o=i.request({":method":"POST",":path":h.pathname,":authority":h.host,":scheme":"https",...c});if(o.on("response",a=>{k=a}),o.on("data",a=>{j.push(a)}),o.on("end",m(()=>{f({status:k[":status"],headers:k,body:Buffer.concat(j)})})),o.on("error",m(g)),e){let a=m(()=>g(Error("Request aborted")));e.addEventListener("abort",a,{once:!0})}o.write(d),o.end()})}openAgentHttp2Stream(b,c,d){if(!a)throw Error("HTTP/2 is required for Cursor AgentService (endpoint is h2-only)");let e=new URL(b),f=a.connect(`https://${e.host}`),g=[],h=null,i=!1,j=null,k=null,l=a=>{if(!h)return;let b=h;h=null,b(a)},m=a=>{j||(j=a,i=!0,l(null))},n=()=>{try{k?.destroy()}catch{}try{f.close()}catch{}};if(f.on("error",m),(k=f.request({":method":"POST",":path":e.pathname,":authority":e.host,":scheme":"https",...c})).on("error",m),k.on("data",a=>{h?l({value:a,done:!1}):g.push(a)}),k.on("end",()=>{i=!0,l({value:void 0,done:!0})}),d){let a=()=>{m(Error("Request aborted")),n()};d.aborted?a():d.addEventListener("abort",a,{once:!0})}return{responseHeaders:new Promise((a,b)=>{let c=a=>b(a);f.once("error",c),k.once("error",c),k.once("response",b=>{f.off("error",c),k.off("error",c),a(b)})}),write(a){k&&!k.destroyed&&k.write(Buffer.from(a))},end(){try{k&&!k.destroyed&&k.end()}catch{}},close:n,async read(){if(g.length)return{value:g.shift(),done:!1};if(i){if(j)throw j;return{value:void 0,done:!0}}let a=await new Promise(a=>{h=a});if(j)throw j;return a||{value:void 0,done:!0}}}}async executeAgent({model:a,body:b,stream:c,credentials:d,signal:e,log:i}){let o,p,r=f.sr.cursor?.agentEndpoint;if(!r)throw Error("Cursor AgentService endpoint is not configured");let v=`${r}${F}`,D=this.buildHeaders(d),E=new AbortController;e?.addEventListener&&e.addEventListener("abort",()=>E.abort(e.reason),{once:!0});let J=b.tools||[];try{(o=this.openAgentHttp2Stream(v,D,E.signal)).write(function(a,b,c=[]){let d=a.filter(a=>a?.role===n.z7.SYSTEM).map(a=>u(a.content)).filter(Boolean).join("\n\n"),e=a.filter(a=>a?.role!==n.z7.SYSTEM),f=[...e].map(a=>a?.role).lastIndexOf(n.z7.USER),g=f>=0?e[f]:e.at(-1),i=e.slice(0,f>=0?f:-1).map(w).filter(Boolean),j=u(g?.content)||"Continue.",k=d?`${d}
|
|
126
126
|
|
|
127
127
|
${j}`:j,l=t(G(1,k),G(2,s().randomUUID()),H(3,new Uint8Array),(0,h.Xh)(4,0,1)),m=i.length?t(...i.map(a=>H(1,a))):null,o=t(H(1,l),...m?[H(7,m)]:[]),p=H(1,o),q=t(G(1,b),(0,h.Xh)(7,0,1)),r=t(G(1,b),G(3,b),G(4,b)),v=(0,h.Il)(c),x=t(H(1,new Uint8Array),H(2,p),H(3,r),...v.length?[H(4,v)]:[],H(9,q));return(0,h.tM)(H(1,x))}(b.messages||[],a,J))}catch(a){throw Error(`Cursor AgentService request failed: ${a.message}`)}try{p=await o.responseHeaders}catch(a){throw o.close(),Error(`Cursor AgentService request failed: ${a.message}`)}let L=Number(p[":status"]||0);if(200!==L){let a="";try{for(;;){let{done:b,value:c}=await o.read();if(b)break;a+=Buffer.from(c).toString("utf8")}}catch{}return o.close(),{response:new Response(JSON.stringify({error:{message:`Cursor AgentService ${L}: ${a||"request failed"}`,type:"api_error"}}),{status:L||g.gx.SERVER_ERROR,headers:{"Content-Type":"application/json"}}),url:v,headers:D,transformedBody:b,responseFormat:m.h.OPENAI}}let M=`chatcmpl-msg_${Date.now()}`,N=Math.floor(Date.now()/1e3),O=B(a),P=Buffer.alloc(0),Q=!1,R="",S=0,T=!1,U=a=>{if(T||!R)return;let b=O?C(R):R.trim();b&&(T=!0,a({type:"text",value:b}))},V=async a=>{try{for(;!Q;){let{done:b,value:c}=await o.read();if(b)break;P=Buffer.concat([P,Buffer.from(c)]),P=function(a,b){let c=Buffer.from(a||[]);for(;c.length>=5;){let a=c[0],d=c.readUInt32BE(1);if(c.length<5+d)break;let e=c.subarray(5,5+d);c=c.subarray(5+d),1&a&&(e=q().gunzipSync(e)),2&a||b(e)}return c}(P,b=>{if(Q)return;let c=(0,h.Y8)(b);if(c.has(1)){let b=(0,h.Y8)(c.get(1)[0].value);if(b.has(1)){let c=x((0,h.Y8)(b.get(1)[0].value),1);c&&(T=!0,a({type:"text",value:c}))}if(b.has(4)){let c=x((0,h.Y8)(b.get(4)[0].value),1);if(c&&(R+=c,O)){let b=C(R);if(b.length>S){let c=b.slice(S);S=b.length,T=!0,a({type:"text",value:c})}}}b.has(14)&&(U(a),Q=!0,a({type:"done"}))}if(c.has(4)){let a=(0,h.Y8)(c.get(4)[0].value),b=a.get(1)?.[0]?.value||0,d=a.get(4)?.[0]?.value||null;a.has(2)?o.write(A(b,2,H(1,new Uint8Array),d)):a.has(3)&&o.write(A(b,3,new Uint8Array,d))}if(c.has(2)){let b=(0,h.Y8)(c.get(2)[0].value);if(b.has(10))i?.info?.("CURSOR","AgentService request_context ack"),o.write(function(a){let{id:b,execId:c}=y(a),d=H(1,new Uint8Array),e=H(1,d);return z(b,c,10,e)}(b));else if(b.has(11)){let c=(0,h._e)(b.get(11)[0].value),d=c.toolName||c.name;d?(i?.info?.("CURSOR",`AgentService MCP tool_call ${d}`),Q=!0,a({type:"tool_call",value:{id:c.toolCallId||`call_${s().randomUUID()}`,name:d,arguments:JSON.stringify(c.args||{})}}),a({type:"done",finishReason:"tool_calls"})):(K(`[CURSOR AGENT] Unsupported exec request fields: ${[...b.keys()].join(",")}`),Q=!0,a({type:"error",value:"Cursor AgentService requested an unsupported IDE tool"}))}else{let c=function(a){let{id:b,execId:c}=y(a),d=[...a?.keys?.()||[]].find(a=>1!==a&&15!==a),e=I[d];if(!e)return null;if(9===d)return z(b,c,9,new Uint8Array);let f=H(2,G(2,"Tool not available in this environment. Use the MCP tools provided instead."));return z(b,c,e,f)}(b);c?(i?.info?.("CURSOR",`AgentService rejected IDE exec fields=${[...b.keys()].join(",")}`),o.write(c)):(K(`[CURSOR AGENT] Unsupported exec request fields: ${[...b.keys()].join(",")}`),Q=!0,a({type:"error",value:"Cursor AgentService requested an unsupported IDE tool"}))}}})}}finally{try{o.end()}catch{}try{o.close()}catch{}Q||(U(a),a({type:"done"}))}};if(!1===c){let c="",d="",e=null,f=[],h="stop";if(await V(a=>{"text"===a.type?c+=a.value:"thinking"===a.type?d+=a.value:"tool_call"===a.type?(f.push({id:a.value.id,type:"function",function:{name:a.value.name,arguments:a.value.arguments}}),h="tool_calls"):"error"===a.type?e=a.value:"done"===a.type&&a.finishReason&&(h=a.finishReason)}),e)return{response:new Response(JSON.stringify({error:{message:e,type:"api_error"}}),{status:g.gx.BAD_REQUEST,headers:{"Content-Type":"application/json"}}),url:v,headers:D,transformedBody:b,responseFormat:m.h.OPENAI};let i={role:"assistant",content:c||null,...d?{reasoning_content:d}:{},...f.length?{tool_calls:f}:{}};return{response:new Response(JSON.stringify({id:M,object:"chat.completion",created:N,model:a,choices:[{index:0,message:i,finish_reason:h}],usage:(0,j.OF)(b,c.length,m.h.OPENAI)}),{headers:{"Content-Type":"application/json"}}),url:v,headers:D,transformedBody:b,responseFormat:m.h.OPENAI}}let W=new TextEncoder,X=new ReadableStream({start(b){V(c=>{"text"===c.type?b.enqueue(W.encode((0,l.z)({id:M,created:N,model:a,delta:{content:c.value}}))):"thinking"===c.type?b.enqueue(W.encode((0,l.z)({id:M,created:N,model:a,delta:{reasoning_content:c.value}}))):"tool_call"===c.type?b.enqueue(W.encode((0,l.z)({id:M,created:N,model:a,delta:{tool_calls:[{index:0,id:c.value.id,type:"function",function:{name:c.value.name,arguments:c.value.arguments}}]}}))):"error"===c.type?(b.enqueue(W.encode((0,l.N)({error:{message:c.value,type:"api_error"}}))),b.enqueue(W.encode(k.$U)),b.close()):"done"===c.type&&(b.enqueue(W.encode((0,l.z)({id:M,created:N,model:a,delta:{},finishReason:c.finishReason||"stop"}))),b.enqueue(W.encode(k.$U)),b.close())}).catch(a=>b.error(a))},cancel(){E.abort()}});return{response:new Response(X,{headers:k.pb}),url:v,headers:D,transformedBody:b,responseFormat:m.h.OPENAI}}async execute({model:b,body:c,stream:d,credentials:e,signal:h,log:i,proxyOptions:j=null}){if(Array.isArray(c?.messages)&&0!==c.messages.length&&c.messages.every(a=>Array.isArray(a?.content)?a.content.every(v):a?.content==null||"string"==typeof a.content))try{return await this.executeAgent({model:b,body:c,stream:d,credentials:e,signal:h,log:i})}catch(a){return{response:new Response(JSON.stringify({error:{message:a.message,type:"connection_error",code:""}}),{status:g.gx.SERVER_ERROR,headers:{"Content-Type":"application/json"}}),url:`${f.sr.cursor?.agentEndpoint||""}${F}`,headers:{},transformedBody:c}}let k=this.buildUrl(),l=this.buildHeaders(e),m=this.transformRequest(b,c,d,e);try{let e=j?.enabled===!0||j?.connectionProxyEnabled===!0||!!j?.vercelRelayUrl,f=a&&!e?await this.makeHttp2Request(k,l,m,h):await this.makeFetchRequest(k,l,m,h,j);if(200!==f.status){let a=f.body?.toString()||"Unknown error";return{response:new Response(JSON.stringify({error:{message:`[${f.status}]: ${a}`,type:"invalid_request_error",code:""}}),{status:f.status,headers:{"Content-Type":"application/json"}}),url:k,headers:l,transformedBody:c}}return{response:!1!==d?this.transformProtobufToSSE(f.body,b,c):this.transformProtobufToJSON(f.body,b,c),url:k,headers:l,transformedBody:c}}catch(a){return{response:new Response(JSON.stringify({error:{message:a.message,type:"connection_error",code:""}}),{status:g.gx.SERVER_ERROR,headers:{"Content-Type":"application/json"}}),url:k,headers:l,transformedBody:c}}}transformProtobufToJSON(a,b,c){let d=`chatcmpl-cursor-${Date.now()}`,e=Math.floor(Date.now()/1e3),f=0,i="",k="",l=[],n=new Map,o=new Set,p=0;for(K(`[CURSOR BUFFER] Total length: ${a.length} bytes`);f<a.length;){let b=D(a,f,p,"");if("done"===b.status)break;if(f=b.offset,p++,"skip"===b.status)continue;let c=b.payload;if(c.length>0&&123===c[0])try{let a=c.toString("utf-8");if(a.includes('"error"')){let b=i||n.size>0;if(K(`[CURSOR BUFFER] Error frame (hasContent=${b}): ${a.slice(0,500)}`),b)break;return E(JSON.parse(a))}}catch{}let d=(0,h.CP)(new Uint8Array(c));if(K(`[CURSOR DECODED] Frame ${p}:`,d),d.error){let a=i||n.size>0;if(K(`[CURSOR BUFFER] Decoded error (hasContent=${a}): ${d.error}`),a)break;return new Response(JSON.stringify({error:{message:d.error,type:"rate_limit_error",code:"rate_limited"}}),{status:g.gx.RATE_LIMITED,headers:{"Content-Type":"application/json"}})}if(d.toolCall){let a=d.toolCall;if(n.has(a.id)){let b=n.get(a.id);b.function.arguments+=a.function.arguments,b.isLast=a.isLast}else n.set(a.id,{...a});if(a.isLast){let b=n.get(a.id);o.add(a.id),l.push({id:b.id,type:b.type,function:{name:b.function.name,arguments:b.function.arguments}})}}d.text&&(i+=d.text),d.thinking&&(k+=d.thinking)}let q=B(b)?C(k):"",r=i||q;for(let[a,b]of(K(`[CURSOR BUFFER] Parsed ${p} frames, toolCallsMap size: ${n.size}, finalized toolCalls: ${l.length}`),n.entries()))o.has(a)||(K(`[CURSOR BUFFER] Finalizing incomplete tool call: ${a}, isLast=${b.isLast}`),l.push({id:b.id,type:b.type,function:{name:b.function.name,arguments:b.function.arguments}}));K(`[CURSOR BUFFER] Final toolCalls count: ${l.length}`);let s={role:"assistant",content:r||null};l.length>0&&(s.tool_calls=l);let t=(0,j.OF)(c,r.length,m.h.OPENAI),u={id:d,object:"chat.completion",created:e,model:b,choices:[{index:0,message:s,finish_reason:l.length>0?"tool_calls":"stop"}],usage:t};return new Response(JSON.stringify(u),{status:200,headers:{"Content-Type":"application/json"}})}transformProtobufToSSE(a,b,c){let d=`chatcmpl-cursor-${Date.now()}`,e=Math.floor(Date.now()/1e3),f=[],i=0,n="",o="",p=0,q=[],r=new Map,s=new Set,t=new Set,u=0;for(K(`[CURSOR BUFFER SSE] Total length: ${a.length} bytes`);i<a.length;){let c=D(a,i,u," SSE");if("done"===c.status)break;if(i=c.offset,u++,"skip"===c.status)continue;let j=c.payload;if(123===j[0])try{let a=j.toString("utf-8");if(a.includes('"error"')){let b=f.length>0||n||r.size>0;if(K(`[CURSOR BUFFER SSE] Error frame (hasContent=${b}): ${a.slice(0,500)}`),b)break;return E(JSON.parse(a))}}catch{}let k=(0,h.CP)(new Uint8Array(j));if(K(`[CURSOR DECODED SSE] Frame ${u}:`,k),k.error){let a=f.length>0||n||r.size>0;if(K(`[CURSOR BUFFER SSE] Decoded error (hasContent=${a}): ${k.error}`),a)break;return new Response(JSON.stringify({error:{message:k.error,type:"rate_limit_error",code:"rate_limited"}}),{status:g.gx.RATE_LIMITED,headers:{"Content-Type":"application/json"}})}if(k.toolCall){let a=k.toolCall;if(0===f.length&&f.push((0,l.z)({id:d,created:e,model:b,delta:{role:"assistant",content:""}})),r.has(a.id)){let c=r.get(a.id);c.function.arguments.length,c.function.arguments+=a.function.arguments,c.isLast=a.isLast,a.function.arguments&&(t.add(a.id),f.push((0,l.z)({id:d,created:e,model:b,delta:{tool_calls:[{index:c.index,id:a.id,type:"function",function:{name:a.function.name,arguments:a.function.arguments}}]}})))}else{let c=q.length;s.add(a.id),q.push({...a,index:c}),r.set(a.id,{...a,index:c}),t.add(a.id),f.push((0,l.z)({id:d,created:e,model:b,delta:{tool_calls:[{index:c,id:a.id,type:"function",function:{name:a.function.name,arguments:a.function.arguments}}]}}))}}if(k.text&&(n+=k.text,f.push((0,l.z)({id:d,created:e,model:b,delta:0===f.length&&0===q.length?{role:"assistant",content:k.text}:{content:k.text}}))),B(b)&&k.thinking){o+=k.thinking;let a=C(o);if(a.length>p){let c=a.slice(p);p=a.length,n+=c,f.push((0,l.z)({id:d,created:e,model:b,delta:0===f.length&&0===q.length?{role:"assistant",content:c}:{content:c}}))}}}for(let[a,c]of(K(`[CURSOR BUFFER SSE] Parsed ${u} frames, toolCallsMap size: ${r.size}, toolCalls array: ${q.length}`),r.entries()))if(!s.has(a)){K(`[CURSOR BUFFER SSE] Finalizing incomplete tool call: ${a}, isLast=${c.isLast}`);let g=q.length;q.push({id:c.id,type:c.type,index:g,function:{name:c.function.name,arguments:c.function.arguments}}),t.has(c.id)||f.push((0,l.z)({id:d,created:e,model:b,delta:{tool_calls:[{index:g,id:c.id,type:"function",function:{name:c.function.name,arguments:c.function.arguments}}]}}))}0===f.length&&0===q.length&&f.push((0,l.z)({id:d,created:e,model:b,delta:{role:"assistant",content:""}}));let v=(0,j.OF)(c,n.length,m.h.OPENAI);return f.push(`data: ${JSON.stringify({id:d,object:"chat.completion.chunk",created:e,model:b,choices:[{index:0,delta:{},finish_reason:q.length>0?"tool_calls":"stop"}],usage:v})}
|
|
128
128
|
|
|
129
129
|
`),f.push(k.$U),new Response(f.join(""),{status:200,headers:{...k.pb}})}async refreshCredentials(){return null}}d()}catch(a){d(a)}},1)},23013:(a,b,c)=>{c.d(b,{Ay:()=>z});var d=c(74957),e=c(35024),f=c(78959),g=c(92536);let h=e.xq["perplexity-web"].baseUrl,i="2.18",j={"pplx-auto":["concise","pplx_pro"],"pplx-sonar":["copilot","experimental"],"pplx-gpt":["copilot","gpt54"],"pplx-gemini":["copilot","gemini31pro_high"],"pplx-sonnet":["copilot","claude46sonnet"],"pplx-opus":["copilot","claude46opus"],"pplx-nemotron":["copilot","nv_nemotron_3_super"]},k={"pplx-gpt":"gpt54_thinking","pplx-sonnet":"claude46sonnetthinking","pplx-opus":"claude46opusthinking"},l=/\[\d+\]/g,m=/<grok:[^>]*>.*?<\/grok:[^>]*>/gs,n=/<grok:[^>]*\/>/g,o=/<[?]xml[^?]*[?]>/g,p=/<\/?response\b[^>]*>/gi,q=/ {2,}/g,r=/\n{3,}/g,s=new Map;function t(a){let b=a.map(a=>`${a.role}:${a.content}`).join("\n"),c=0x811c9dc5;for(let a=0;a<b.length;a++)c^=b.charCodeAt(a),c=0x1000193*c>>>0;return c.toString(16).padStart(8,"0")}function u(a,b,c,d){if(!d)return;let e=t([...a,{role:"user",content:b},{role:"assistant",content:c}]);if(s.set(e,{backendUuid:d,ts:Date.now()}),s.size>200){let a=null,b=1/0;for(let[c,d]of s)d.ts<b&&(b=d.ts,a=c);a&&s.delete(a)}}function v(a,b=!0){let c=a;return c=(c=(c=(c=(c=c.replace(o,"")).replace(l,"")).replace(m,"")).replace(n,"")).replace(p,""),b&&(c=(c=(c=c.replace(q," ")).replace(r,"\n\n")).trim()),c}async function*w(a,b){let c=a.getReader(),d=new TextDecoder,e="",f=[];function g(){if(0===f.length)return null;let a=f.join("\n");f=[];let b=a.trim();if(!b||"[DONE]"===b)return"done";try{return JSON.parse(b)}catch{return null}}try{for(;;){if(b?.aborted)return;let{value:a,done:h}=await c.read();if(h)break;for(e+=d.decode(a,{stream:!0});;){let a=e.indexOf("\n");if(a<0)break;let b=e.slice(0,a);e=e.slice(a+1);let c=b.endsWith("\r")?b.slice(0,-1):b;if(""===c){let a=g();if("done"===a)return;a&&(yield a);continue}if(c.startsWith("data:")&&f.push(c.slice(5).trimStart()),"event: end_of_stream"===c)return}}(e+=d.decode()).trim().startsWith("data:")&&f.push(e.trim().slice(5).trimStart());let a=g();a&&"done"!==a&&(yield a)}finally{c.releaseLock()}}async function*x(a,b){let c="",d=null,e=0,f=new Set;for await(let g of w(a,b)){if(g.error_code||g.error_message)return void(yield{error:g.error_message||`Perplexity error: ${g.error_code}`,done:!0});g.backend_uuid&&(d=g.backend_uuid);let a=g.blocks??[];for(let b of a){let a=b.intended_usage??"";if("pro_search_steps"===a&&b.plan_block?.steps){for(let a of b.plan_block.steps)if("SEARCH_WEB"===a.step_type)for(let b of a.search_web_content?.queries??[]){let a=b.query??"";a&&!f.has(a)&&(f.add(a),yield{thinking:`Searching: ${a}`,backendUuid:d??void 0})}else if("READ_RESULTS"===a.step_type)for(let b of(a.read_results_content?.urls??[]).slice(0,3))b&&!f.has(b)&&(f.add(b),yield{thinking:`Reading: ${b}`,backendUuid:d??void 0})}if("plan"===a&&b.plan_block?.goals)for(let a of b.plan_block.goals){let b=a.description??"";b&&!f.has(b)&&(f.add(b),yield{thinking:b,backendUuid:d??void 0})}if(!a.includes("markdown"))continue;let g=b.markdown_block;if(!g)continue;let h=g.chunks??[];if(0!==h.length)if("DONE"===g.progress)c=h.join("");else{let a=c+h.join("");if(a.length>e){let b=a.slice(e);c=a,e=a.length,yield{delta:b,answer:c,backendUuid:d??void 0}}}}if(0===a.length&&g.text){let a=g.text.trim();if(a.length>e){let b=a.slice(e);c=a,e=a.length,yield{delta:b,answer:c,backendUuid:d??void 0}}}if(g.final||"COMPLETED"===g.status)break}yield{delta:"",answer:c,backendUuid:d??void 0,done:!0}}async function y(a,b,c,d,e,f,g){let h="",i=null,j=[];for await(let b of x(a,g)){if(b.backendUuid&&(i=b.backendUuid),b.error)return new Response(JSON.stringify({error:{message:b.error,type:"upstream_error",code:"PPLX_ERROR"}}),{status:502,headers:{"Content-Type":"application/json"}});if(b.thinking){j.push(b.thinking);continue}if(b.done){h=b.answer||h;break}b.answer&&(h=b.answer)}u(e,f,h=v(h),i);let k=j.length>0?j.join("\n"):void 0,l={role:"assistant",content:h};k&&(l.reasoning_content=k);let m=Math.ceil(f.length/4),n=Math.ceil(h.length/4);return new Response(JSON.stringify({id:c,object:"chat.completion",created:d,model:b,system_fingerprint:null,choices:[{index:0,message:l,finish_reason:"stop",logprobs:null}],usage:{prompt_tokens:m,completion_tokens:n,total_tokens:m+n}}),{status:200,headers:{"Content-Type":"application/json"}})}class z extends d.H{constructor(){super("perplexity-web",e.xq["perplexity-web"])}async execute({model:a,body:b,stream:c,credentials:d,signal:e,log:l}){var m,n,o,p,q;let r,w,z,A,B,C=b?.messages;if(!C||!Array.isArray(C)||0===C.length)return{response:new Response(JSON.stringify({error:{message:"Missing or empty messages array",type:"invalid_request"}}),{status:400,headers:{"Content-Type":"application/json"}}),url:h,headers:{},transformedBody:b};(b?.thinking===!0||b?.reasoning_effort!=null&&"none"!==b.reasoning_effort)&&k[a]?(r="copilot",w=k[a],l?.info?.("PPLX-WEB",`Thinking mode → ${a} using ${w}`)):j[a]?[r,w]=j[a]:(r="copilot",w=a,l?.info?.("PPLX-WEB",`Unmapped model ${a}, using as raw preference`));let D=function(a){let b="",c=[];for(let d of a){let a=String(d.role||"user");"developer"===a&&(a="system");let e="";"string"==typeof d.content?e=d.content:Array.isArray(d.content)&&(e=d.content.filter(a=>"text"===a.type).map(a=>String(a.text||"")).join(" ")),e.trim()&&("system"===a?b+=e+"\n":("user"===a||"assistant"===a)&&c.push({role:a,content:e}))}let d="";return c.length>0&&"user"===c[c.length-1].role&&(d=c.pop().content),{systemMsg:b,history:c,currentMsg:d}}(C),E=function(a){if(0===a.length)return null;let b=t(a),c=s.get(b);return c?Date.now()-c.ts>36e5?(s.delete(b),null):c.backendUuid:null}(D.history);E&&l?.info?.("PPLX-WEB",`Session continue: ${E.slice(0,12)}...`);let F=function(a,b,c){if(b)return a.currentMsg;let d={},e=[];a.systemMsg.trim()&&e.push(a.systemMsg.trim());let f=function(a){if(!Array.isArray(a)||0===a.length)return"";let b=a.map(a=>{let b=a?.function||a||{},c=b.name||"unnamed",d=(b.description||"").split("\n")[0].slice(0,200);return`- ${c}: ${d}`});return`Available tools (reference only, cannot invoke):
|
|
130
130
|
${b.join("\n")}`}(c);f&&e.push(f),e.push("You have built-in web search. Answer questions directly using search results."),d.instructions=e,a.history.length>0&&(d.history=a.history),a.currentMsg?d.query=a.currentMsg:0===a.history.length&&(d.query="");let g=JSON.stringify(d);return g.length>96e3?g.slice(-96e3):g}(D,E,b?.tools);if(!F.trim())return{response:new Response(JSON.stringify({error:{message:"Empty query after processing",type:"invalid_request"}}),{status:400,headers:{"Content-Type":"application/json"}}),url:h,headers:{},transformedBody:b};let G=(m=r,n=w,B="u">typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:"UTC",{query_str:F,params:{query_str:F,search_focus:"internet",mode:m,model_preference:n,sources:["web"],attachments:[],frontend_uuid:crypto.randomUUID(),frontend_context_uuid:crypto.randomUUID(),version:i,language:"en-US",timezone:B,search_recency_filter:null,is_incognito:!0,use_schematized_api:!0,last_backend_uuid:E}}),H={"Content-Type":"application/json",Accept:"text/event-stream",Origin:"https://www.perplexity.ai",Referer:"https://www.perplexity.ai/","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36","X-App-ApiClient":"default","X-App-ApiVersion":i};d.accessToken?H.Authorization=`Bearer ${d.accessToken}`:d.apiKey&&(H.Cookie=`__Secure-next-auth.session-token=${d.apiKey}`),l?.info?.("PPLX-WEB",`Query to ${a} (pref=${w}, mode=${r}), len=${F.length}`);let I={method:"POST",headers:H,body:JSON.stringify(G)};e&&(I.signal=e);try{z=await fetch(h,I)}catch(a){return l?.error?.("PPLX-WEB",`Fetch failed: ${a.message||String(a)}`),{response:new Response(JSON.stringify({error:{message:`Perplexity connection failed: ${a.message||String(a)}`,type:"upstream_error"}}),{status:502,headers:{"Content-Type":"application/json"}}),url:h,headers:H,transformedBody:G}}if(!z.ok){let a=z.status,b=`Perplexity returned HTTP ${a}`;return 401===a||403===a?b="Perplexity auth failed — session cookie may be expired. Re-paste your __Secure-next-auth.session-token.":429===a&&(b="Perplexity rate limited. Wait a moment and retry."),l?.warn?.("PPLX-WEB",b),{response:new Response(JSON.stringify({error:{message:b,type:"upstream_error",code:`HTTP_${a}`}}),{status:a,headers:{"Content-Type":"application/json"}}),url:h,headers:H,transformedBody:G}}if(!z.body)return{response:new Response(JSON.stringify({error:{message:"Perplexity returned empty response body",type:"upstream_error"}}),{status:502,headers:{"Content-Type":"application/json"}}),url:h,headers:H,transformedBody:G};let J=`chatcmpl-pplx-${crypto.randomUUID().slice(0,12)}`,K=Math.floor(Date.now()/1e3);if(c){let b;A=new Response((o=z.body,p=D.history,q=D.currentMsg,b=new TextEncoder,new ReadableStream({async start(c){try{c.enqueue(b.encode((0,g.N)({id:J,object:"chat.completion.chunk",created:K,model:a,system_fingerprint:null,choices:[{index:0,delta:{role:"assistant"},finish_reason:null,logprobs:null}]})));let d="",h=null;for await(let f of x(o,e)){if(f.backendUuid&&(h=f.backendUuid),f.error){c.enqueue(b.encode((0,g.N)({id:J,object:"chat.completion.chunk",created:K,model:a,system_fingerprint:null,choices:[{index:0,delta:{content:`[Error: ${f.error}]`},finish_reason:null,logprobs:null}]})));break}if(f.thinking){c.enqueue(b.encode((0,g.N)({id:J,object:"chat.completion.chunk",created:K,model:a,system_fingerprint:null,choices:[{index:0,delta:{reasoning_content:f.thinking+"\n"},finish_reason:null,logprobs:null}]})));continue}if(f.done){d=f.answer||d;break}let e=f.delta||"";e&&(e=v(e,!1))&&c.enqueue(b.encode((0,g.N)({id:J,object:"chat.completion.chunk",created:K,model:a,system_fingerprint:null,choices:[{index:0,delta:{content:e},finish_reason:null,logprobs:null}]}))),f.answer&&(d=f.answer)}c.enqueue(b.encode((0,g.N)({id:J,object:"chat.completion.chunk",created:K,model:a,system_fingerprint:null,choices:[{index:0,delta:{},finish_reason:"stop",logprobs:null}]}))),c.enqueue(b.encode(f.$U)),u(p,q,v(d),h)}catch(d){c.enqueue(b.encode((0,g.N)({id:J,object:"chat.completion.chunk",created:K,model:a,system_fingerprint:null,choices:[{index:0,delta:{content:`[Stream error: ${d.message||String(d)}]`},finish_reason:"stop",logprobs:null}]}))),c.enqueue(b.encode(f.$U))}finally{c.close()}}})),{status:200,headers:{...f.uB}})}else A=await y(z.body,a,J,K,D.history,D.currentMsg,e);return{response:A,url:h,headers:H,transformedBody:G}}}},26878:(a,b,c)=>{c.d(b,{F:()=>f});var d=c(96179),e=c(35024);class f extends d.L{constructor(){super("xiaomi-tokenplan")}buildUrl(a,b,c=0,d=null){let f=(0,e.Yg)(d);return d?.runtimeTransport?.format==="claude"?`${f.replace(/\/v1\/?$/,"")}/anthropic/v1/messages`:`${f}/chat/completions`}}},27617:(a,b,c)=>{c.d(b,{Ay:()=>t});var d=c(77598),e=c.n(d),f=c(96179),g=c(41004),h=c(93943),i=c(6879);function j(a,b){return new Promise((c,d)=>{if(b?.aborted)return void d(k(b));let e=()=>{clearTimeout(f),d(k(b))},f=setTimeout(()=>{b?.removeEventListener?.("abort",e),c()},a);b?.addEventListener?.("abort",e,{once:!0})})}function k(a){let b=Error("CodeArts session-slot wait aborted");return b.name="AbortError",b.cause=a?.reason,b}async function l({attempt:a,model:b="",signal:c=null,log:d=null,budgetMs:e=45e3,nap:f=j}={}){let g=Date.now()+e;for(let h=0;;h++){let{retryInMs:i=null,result:j}=await a(h);if(null==i)return j;let k=g-Date.now();if(k<=i)return d?.warn?.("QUEUE",`CODEARTS | ${b} still refused after ${Math.round(e/1e3)}s of waiting`),j;d?.warn?.("QUEUE",`CODEARTS | ${b} refused, resend in ${i/1e3}s (${Math.round(k/1e3)}s left)`),await f(i,c)}}var m=c(71547);let n=["max_tokens","max_completion_tokens","max_output_tokens"],o={"x-ot-client-type":"CLI","x-ot-client-version":"26.9.3","x-ot-function":"agent-tui","x-language":"zh-cn"};function p(){return e().randomUUID().replace(/-/g,"")}let q=Symbol.for("codearts.sessionId");async function r(a,b){let c=a?.response,d=c?.status;if(d!==g.gx.BAD_REQUEST&&d!==g.gx.RATE_LIMITED)return{result:a};let e=await c.text().catch(()=>""),f=function(a,b){let{response:c}=a;return{...a,response:new Response(b,{status:c.status,statusText:c.statusText,headers:c.headers})}}(a,e);if("string"==typeof e&&e.includes("TM.00001041")){let a;return{retryInMs:(a=Math.min(8e3,2e3*2**b))+Math.floor(a/4*Math.random()),result:f}}if(d===g.gx.RATE_LIMITED&&"queued"===String(c?.headers?.get?.("queue-status")||"").toLowerCase()){let a;return{retryInMs:Math.max(1e3,1e3*(Number.isFinite(a=Number(c?.headers?.get?.("retry-after")))&&a>0?a:5)),result:f}}return{result:f}}class s extends f.L{constructor(a="codearts"){super(a)}async execute(a){var b;let c=(b=a?.providerSessionId)?`ses_${e().createHash("sha256").update(String(b)).digest("hex").slice(0,26)}`:null,d=c&&a?{...a,credentials:{...a.credentials||{},[q]:c}}:a;return l({attempt:async a=>r(await super.execute(d),a),model:a?.model,signal:a?.signal,log:a?.log})}transformRequest(a,b,c,d){let e,f,g=super.transformRequest(a,b,c,d);if(!g||"object"!=typeof g)return g;if(f=(e=String(g.model||a||"")).indexOf("/"),g.model=f>=0?e.slice(f+1):e,void 0===g.tool_stream&&(g.tool_stream=!0),n.some(a=>null!=g[a])||(g.max_tokens=32e3),void 0===g.user_prompt){let a=function(a){let b=Array.isArray(a?.messages)?a.messages:[];for(let a=b.length-1;a>=0;a--){var c;let d=b[a];if(d?.role!=="user")continue;let e=("string"==typeof(c=d.content)?c:Array.isArray(c)?c.map(a=>a?.type==="text"&&"string"==typeof a.text?a.text:"").join(""):"").replace(/[\r\n\t]/g," ");if(e.trim())return e.slice(0,500)}return""}(b);a&&(g.user_prompt=a)}return g}buildHeaders(a,b=!0,c,d,e){let f=a?.providerSpecificData||{},g=f.securityToken||a?.accessToken||"",h=a?.[q]||"ses_silent",j={"Content-Type":"application/json",...o,"x-ot-session-id":h,"x-ot-parent-session-id":"","x-ot-trace-id":p(),"x-ot-span-id":p(),"x-snap-traceid":p(),"user-session-id":h,"User-Agent":m.Qi,...b?{Accept:"text/event-stream"}:{}};return(0,i.Ae)({accessKeyId:f.accessKeyId,secretAccessKey:f.secretAccessKey,securityToken:g,method:"POST",url:c,body:null==e?null:JSON.stringify(e),headers:j})}async refreshCredentials(a,b,c=null){let d=await (0,h.MF)(this.provider,a,()=>(0,m.J9)(a,{log:b,proxyOptions:c||a?.proxyOptions||null}));return d?.providerSpecificData&&(d.providerSpecificData={...a?.providerSpecificData||{},...d.providerSpecificData}),d}}let t=s},32447:(a,b,c)=>{c.d(b,{BL:()=>g});var d=c(96179),e=c(52007);let f=["anthropic_version","anthropic_beta","client_metadata","mcp_servers","stop_sequences","thinking","top_k"];class g extends d.L{constructor(){super("kimchi")}transformRequest(a,b,c,d){let g,h=super.transformRequest(a,b,c,d);if(!h||"object"!=typeof h)return h;for(let a of(!function(a){var b;if(!a?.system||!Array.isArray(a.messages))return;let c=("string"==typeof(b=a.system)?b:Array.isArray(b)?b.map(a=>"string"==typeof a?a:"string"==typeof a?.text?a.text:"").filter(Boolean).join("\n"):"").trim();if(!c)return;let d=a.messages.find(a=>a?.role==="system");d?"string"==typeof d.content?d.content=`${c}
|
|
131
131
|
|
|
132
|
-
${d.content}`:Array.isArray(d.content)&&d.content.unshift({type:"text",text:c}):a.messages.unshift({role:"system",content:c})}(h),f))void 0!==h[a]&&delete h[a];if(delete h.system,g=(0,e.gK)(a),(g?.provider==="anthropic"||g?.upstreamProvider==="anthropic"||/(^|[-_/])(?:claude|anthropic)(?:[-_/]|$)/i.test(String(a||"")))&&(delete h.reasoning_effort,delete h.reasoning,delete h.thinking),Array.isArray(h?.messages))for(let a of h.messages)a&&"object"==typeof a&&(delete a.cache_control,Array.isArray(a.content)&&(a.content=a.content.map(a=>{if(!a||"object"!=typeof a)return a;let{cache_control:b,signature:c,...d}=a;return d})));Array.isArray(h?.tools)&&(h.tools=h.tools.map(a=>{if(!a||"object"!=typeof a)return a;let{cache_control:b,...c}=a;return c}));if(Array.isArray(h?.messages))for(let a of h.messages)a&&"assistant"===a.role&&"string"==typeof a.reasoning_content&&a.reasoning_content.length>8&&delete a.reasoning_content;return h}}},36732:(a,b,c)=>{c.d(b,{Rb:()=>h});var d=c(96179),e=c(12132);let f=new Set(["mimo-v2.6-pro","mimo-v2.6-flash","mimo-v2.6-pro-ultraspeed"]),g="__mimoAccountCookie";class h extends d.L{constructor(){super("xiaomi-mimo")}static isAccountRoute(a,b){let c,d,e=(d=(c=String(a||"")).indexOf("/"))>=0?c.slice(d+1):c;return!!f.has(e)&&!!(b?.[g]||b?.providerSpecificData?.mimoPassToken)}isAccountRoute(a,b){return h.isAccountRoute(a,b)}buildUrl(a,b,c=0,d=null){return this.isAccountRoute(a,d)?`${(0,e.resolveMimoServerBase)(d?.providerSpecificData)}/api/route/chat/completions`:super.buildUrl(a,b,c,d)}buildHeaders(a,b=!0,c,d){return this.isAccountRoute(d,a)&&a?.[g]?{"Content-Type":"application/json",Accept:b?"text/event-stream":"application/json","User-Agent":e.MIMO_API_UA,Cookie:a[g]}:super.buildHeaders(a,b,c,d)}transformRequest(a,b,c,d){let e=super.transformRequest(a,b,c,d);if(this.isAccountRoute(a,d)){let a=e.reasoning_effort||b?.reasoning_effort||b?.output_config?.effort;if(a){delete e.reasoning_effort;let b="xhigh"===String(a).toLowerCase()?"high":String(a).toLowerCase();e.output_config={...e.output_config||{},effort:b}}null==e.temperature&&(e.temperature=1),null==e.top_p&&(e.top_p=.95)}return e}async execute(a){let{model:b,credentials:c,proxyOptions:d=null}=a;if(!this.isAccountRoute(b,c))return super.execute(a);let f=await (0,e.getMimoAccountCookie)(c?.providerSpecificData,d);if(!f)return super.execute(a);c[g]=f;let h=await super.execute(a);if(401===h.response.status){(0,e.invalidateMimoAccountCookieCache)();let b=await (0,e.getMimoAccountCookie)(c?.providerSpecificData,d).catch(()=>null);if(b)return c[g]=b,super.execute(a)}return h}}},38572:(a,b,c)=>{c.d(b,{$:()=>o});var d=c(74957),e=c(35024),f=c(78959),g=c(92536);let h=e.xq["grok-web"].baseUrl,i={"grok-3":{grokModel:"grok-3",modelMode:"MODEL_MODE_GROK_3",isThinking:!1},"grok-3-mini":{grokModel:"grok-3",modelMode:"MODEL_MODE_GROK_3_MINI_THINKING",isThinking:!0},"grok-3-thinking":{grokModel:"grok-3",modelMode:"MODEL_MODE_GROK_3_THINKING",isThinking:!0},"grok-4":{grokModel:"grok-4",modelMode:"MODEL_MODE_GROK_4",isThinking:!1},"grok-4-mini":{grokModel:"grok-4-mini",modelMode:"MODEL_MODE_GROK_4_MINI_THINKING",isThinking:!0},"grok-4-thinking":{grokModel:"grok-4",modelMode:"MODEL_MODE_GROK_4_THINKING",isThinking:!0},"grok-4-heavy":{grokModel:"grok-4",modelMode:"MODEL_MODE_HEAVY",isThinking:!0},"grok-4.1-mini":{grokModel:"grok-4-1-thinking-1129",modelMode:"MODEL_MODE_GROK_4_1_MINI_THINKING",isThinking:!0},"grok-4.1-fast":{grokModel:"grok-4-1-thinking-1129",modelMode:"MODEL_MODE_FAST",isThinking:!1},"grok-4.1-expert":{grokModel:"grok-4-1-thinking-1129",modelMode:"MODEL_MODE_EXPERT",isThinking:!0},"grok-4.1-thinking":{grokModel:"grok-4-1-thinking-1129",modelMode:"MODEL_MODE_GROK_4_1_THINKING",isThinking:!0},"grok-4.2":{grokModel:"grok-420",modelMode:"MODEL_MODE_GROK_420",isThinking:!1},"grok-4.20":{grokModel:"grok-420",modelMode:"MODEL_MODE_GROK_420",isThinking:!1},"grok-4.20-beta":{grokModel:"grok-420",modelMode:"MODEL_MODE_GROK_420",isThinking:!1}};function j(a,b=!1){let c=b?"abcdefghijklmnopqrstuvwxyz0123456789":"abcdefghijklmnopqrstuvwxyz",d="";for(let b=0;b<a;b++)d+=c[Math.floor(Math.random()*c.length)];return d}function k(a){let b=new Uint8Array(a);return crypto.getRandomValues(b),Array.from(b,a=>a.toString(16).padStart(2,"0")).join("")}async function*l(a,b){let c=a.getReader(),d=new TextDecoder,e="";try{for(;;){if(b?.aborted)return;let{value:a,done:f}=await c.read();if(f)break;for(e+=d.decode(a,{stream:!0});;){let a=e.indexOf("\n");if(a<0)break;let b=e.slice(0,a).trim();if(e=e.slice(a+1),b)try{yield JSON.parse(b)}catch{}}}let a=(e+=d.decode()).trim();if(a)try{yield JSON.parse(a)}catch{}}finally{c.releaseLock()}}async function*m(a,b,c){let d="",e="",f=!1;for await(let g of l(a,c)){if(g.error)return void(yield{error:g.error.message||`Grok error: ${g.error.code}`,done:!0});let a=g.result?.response;if(a){if(a.llmInfo?.modelHash&&!d&&(d=a.llmInfo.modelHash),a.responseId&&(e=a.responseId),a.modelResponse){let c=a.modelResponse;f&&b&&(c.message&&(yield{thinking:c.message}),f=!1),c.message&&(yield{fullMessage:c.message,fingerprint:d,responseId:e}),c.metadata?.llm_info?.modelHash&&(d=c.metadata.llm_info.modelHash);continue}null!=a.token&&(yield{delta:a.token,fingerprint:d,responseId:e})}}yield{done:!0,fingerprint:d,responseId:e}}async function n(a,b,c,d,e,f){let g="",h="",i=[];for await(let b of m(a,e,f)){if(b.fingerprint&&(h=b.fingerprint),b.error)return new Response(JSON.stringify({error:{message:b.error,type:"upstream_error",code:"GROK_ERROR"}}),{status:502,headers:{"Content-Type":"application/json"}});if(b.thinking){i.push(b.thinking);continue}if(b.done)break;b.fullMessage?g=b.fullMessage:b.delta&&(g+=b.delta)}let j={role:"assistant",content:g};i.length>0&&(j.reasoning_content=i.join("\n"));let k=Math.ceil(g.length/4),l=Math.ceil(g.length/4);return new Response(JSON.stringify({id:c,object:"chat.completion",created:d,model:b,system_fingerprint:h||null,choices:[{index:0,message:j,finish_reason:"stop",logprobs:null}],usage:{prompt_tokens:k,completion_tokens:l,total_tokens:k+l}}),{status:200,headers:{"Content-Type":"application/json"}})}class o extends d.H{constructor(){super("grok-web",e.xq["grok-web"])}async execute({model:a,body:b,stream:c,credentials:d,signal:e,log:l}){let o,p,q=b?.messages;if(!q||!Array.isArray(q)||0===q.length)return{response:new Response(JSON.stringify({error:{message:"Missing or empty messages array",type:"invalid_request"}}),{status:400,headers:{"Content-Type":"application/json"}}),url:h,headers:{},transformedBody:b};let r=i[a];r||l?.info?.("GROK-WEB",`Unmapped model ${a}, defaulting to grok-4.1-fast`);let{grokModel:s,modelMode:t,isThinking:u}=r||i["grok-4.1-fast"],v=function(a){let b=[];for(let c of a){let a=String(c.role||"user");"developer"===a&&(a="system");let d="";"string"==typeof c.content?d=c.content:Array.isArray(c.content)&&(d=c.content.filter(a=>"text"===a.type).map(a=>String(a.text||"")).join(" ")),d.trim()&&b.push({role:a,text:d})}let c=-1;for(let a=b.length-1;a>=0;a--)if("user"===b[a].role){c=a;break}let d=[];for(let a=0;a<b.length;a++){let{role:e,text:f}=b[a];d.push(a===c?f:`${e}: ${f}`)}return d.join("\n\n")}(q);if(!v.trim())return{response:new Response(JSON.stringify({error:{message:"Empty query after processing",type:"invalid_request"}}),{status:400,headers:{"Content-Type":"application/json"}}),url:h,headers:{},transformedBody:b};let w={temporary:!0,modelName:s,modelMode:t,message:v,fileAttachments:[],imageAttachments:[],disableSearch:!1,enableImageGeneration:!1,returnImageBytes:!1,returnRawGrokInXaiRequest:!1,enableImageStreaming:!1,imageGenerationCount:0,forceConcise:!1,toolOverrides:{},enableSideBySide:!0,sendFinalMetadata:!0,isReasoning:!1,disableTextFollowUps:!1,disableMemory:!0,forceSideBySide:!1,isAsyncChat:!1,disableSelfHarmShortCircuit:!1,deviceEnvInfo:{darkModeEnabled:!1,devicePixelRatio:2,screenWidth:2056,screenHeight:1329,viewportWidth:2056,viewportHeight:1083}},x=k(16),y=k(8),z={Accept:"*/*","Accept-Encoding":"gzip, deflate, br, zstd","Accept-Language":"en-US,en;q=0.9",Baggage:"sentry-environment=production,sentry-release=d6add6fb0460641fd482d767a335ef72b9b6abb8,sentry-public_key=b311e0f2690c81f25e2c4cf6d4f7ce1c","Cache-Control":"no-cache","Content-Type":"application/json",Origin:"https://grok.com",Pragma:"no-cache",Referer:"https://grok.com/","Sec-Ch-Ua":'"Google Chrome";v="136", "Chromium";v="136", "Not(A:Brand";v="24"',"Sec-Ch-Ua-Mobile":"?0","Sec-Ch-Ua-Platform":'"macOS"',"Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","x-statsig-id":btoa(.5>Math.random()?`e:TypeError: Cannot read properties of null (reading 'children["${j(5,!0)}"]')`:`e:TypeError: Cannot read properties of undefined (reading '${j(10)}')`),"x-xai-request-id":crypto.randomUUID(),traceparent:`00-${x}-${y}-00`};if(d.apiKey){let a=d.apiKey;a.startsWith("sso=")&&(a=a.slice(4)),z.Cookie=`sso=${a}`}l?.info?.("GROK-WEB",`Query to ${a} (grok=${s}, mode=${t}), len=${v.length}`);try{o=await fetch(h,{method:"POST",headers:z,body:JSON.stringify(w),signal:e})}catch(a){return l?.error?.("GROK-WEB",`Fetch failed: ${a.message||String(a)}`),{response:new Response(JSON.stringify({error:{message:`Grok connection failed: ${a.message||String(a)}`,type:"upstream_error"}}),{status:502,headers:{"Content-Type":"application/json"}}),url:h,headers:z,transformedBody:w}}if(!o.ok){let a=o.status,b=`Grok returned HTTP ${a}`;return 401===a||403===a?b="Grok auth failed — SSO cookie may be expired. Re-paste your sso cookie value from grok.com.":429===a&&(b="Grok rate limited. Wait a moment and retry, or rotate cookies."),l?.warn?.("GROK-WEB",b),{response:new Response(JSON.stringify({error:{message:b,type:"upstream_error",code:`HTTP_${a}`}}),{status:a,headers:{"Content-Type":"application/json"}}),url:h,headers:z,transformedBody:w}}if(!o.body)return{response:new Response(JSON.stringify({error:{message:"Grok returned empty response body",type:"upstream_error"}}),{status:502,headers:{"Content-Type":"application/json"}}),url:h,headers:z,transformedBody:w};let A=`chatcmpl-grok-${crypto.randomUUID().slice(0,12)}`,B=Math.floor(Date.now()/1e3);if(c){var C;let b;p=new Response((C=o.body,b=new TextEncoder,new ReadableStream({async start(c){try{c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:null,choices:[{index:0,delta:{role:"assistant"},finish_reason:null,logprobs:null}]})));let d="";for await(let f of m(C,u,e)){if(f.fingerprint&&(d=f.fingerprint),f.error){c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:d||null,choices:[{index:0,delta:{content:`[Error: ${f.error}]`},finish_reason:null,logprobs:null}]})));break}if(f.thinking){c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:d||null,choices:[{index:0,delta:{reasoning_content:f.thinking},finish_reason:null,logprobs:null}]})));continue}if(f.done)break;f.delta&&c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:d||null,choices:[{index:0,delta:{content:f.delta},finish_reason:null,logprobs:null}]})))}c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:d||null,choices:[{index:0,delta:{},finish_reason:"stop",logprobs:null}]}))),c.enqueue(b.encode(f.$U))}catch(d){c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:null,choices:[{index:0,delta:{content:`[Stream error: ${d.message||String(d)}]`},finish_reason:"stop",logprobs:null}]}))),c.enqueue(b.encode(f.$U))}finally{c.close()}}})),{status:200,headers:{...f.uB}})}else p=await n(o.body,a,A,B,u,e);return{response:p,url:h,headers:z,transformedBody:w}}}},49059:(a,b,c)=>{c.d(b,{v:()=>e});var d=c(96179);class e extends d.L{constructor(){super("codebuddy-cn")}transformRequest(a,b,c,d){let e=super.transformRequest(a,b,c,d);e.stream=!0;let f="You are a helpful AI assistant that helps with software engineering tasks.",g=/you are claude code|claude.?code.+official.+cli|anthropic.+official.+cli|anxthxropic.+official.+cli|you are (?:cursor|windsurf|cline|aider|continue|copilot|cody)|you are an? (?:ai )?(?:coding |code )?agent|cc_entrypoint\s*=\s*(?:cli|vscode|jetbrains|gui)|claude.?code.+issues|give feedback.+claude.?code|you are .{0,30}(?:powerful )?ai agent|orchestration capabilities|OhMyOpenCode|<agent-identity>|<Role>|<Behavior_Instructions>/i;Array.isArray(e.messages)&&(e.messages=e.messages.map(a=>{let b;if(!a||"system"!==a.role)return a;let c="string"==typeof(b=a.content)?b:Array.isArray(b)?b.map(a=>a&&"string"==typeof a.text?a.text:"").join("\n"):"";return c&&(c.length>2e3||g.test(c))?"string"==typeof a.content?{...a,content:f}:{...a,content:[{type:"text",text:f}]}:a}));let h=e.reasoning_effort;return"none"===h||"off"===h?delete e.reasoning_effort:h&&(e.reasoning_summary="auto"),e}}},49227:(a,b,c)=>{c.d(b,{hG:()=>C});var d=c(77598),e=c.n(d),f=c(74957),g=c(35024),h=c(93943),i=c(37981),j=c(57247),k=c(90737),l=c(41004),m=c(80662),n=c(19713);let o=null;async function p(a="endpoint-proxy-salt"){let b=function(){if(o)return o;try{o=(0,n.machineIdSync)()}catch{o=e().randomUUID()}return o}();return e().createHash("sha256").update(b+a).digest("hex").substring(0,16)}let q=/^(rs|fc|resp|msg)_/,r=new Set(["web_search","x_search","web_search_preview","file_search","image_generation","code_interpreter","mcp","local_shell"]),s=new Set(["model","input","instructions","tools","tool_choice","stream","store","reasoning","include","temperature","top_p","max_output_tokens","parallel_tool_calls","text","metadata","prompt_cache_key"]),t=["low","medium","high","xhigh"],u=/^(?:rs|msg|fc)_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,v={type:"object",properties:{input:{type:"string"}},required:["input"]},w=new Map,x=new WeakMap;function y(a){let b="string"==typeof a?a.trim().toLowerCase():"";return"max"===b?"xhigh":t.includes(b)?b:"high"}function z(a){return"string"==typeof a?a:void 0===a?"":JSON.stringify(a)}function A(a){return"string"==typeof a&&u.test(a)}function B(a){if(!a||"object"!=typeof a||Array.isArray(a))return a;let{internal_chat_message_metadata_passthrough:b,...c}=a;if("reasoning"===a.type)return A(a.id)&&"string"==typeof a.encrypted_content?c:null;if("custom_tool_call"===a.type){let b=a.call_id||a.id,c="string"==typeof a.name?a.name.trim():"";return b&&c?{type:"function_call",call_id:b,name:c,arguments:JSON.stringify({input:z(a.input??a.arguments)})}:null}if("custom_tool_call_output"===a.type||"function_call_output"===a.type){let b=a.call_id||a.id;return b?{type:"function_call_output",call_id:b,output:z(a.output)}:null}if("function_call"===a.type){let b=a.call_id||a.id,c="string"==typeof a.name?a.name.trim():"";return b&&c?{type:"function_call",...A(a.id)?{id:a.id}:{},call_id:b,name:c,arguments:"string"==typeof a.arguments?a.arguments:JSON.stringify(a.arguments??{}),..."string"==typeof a.status?{status:a.status}:{}}:null}return c}class C extends f.H{constructor(){super("grok-cli",g.xq["grok-cli"]),this._currentSessionId=null,this._currentReqId=null,this._currentTurnIdx=1,this._agentId=null}buildUrl(){return this.config.baseUrl}async refreshCredentials(a,b,c=null){return a?.refreshToken?(0,h.Vq)("grok-cli",a,b,c):null}needsRefresh(a){return(0,h.fp)("grok-cli",a)}buildHeaders(a,b=!0){let c=super.buildHeaders(a,b);for(let[a,b]of Object.entries(this.config.headers||{}))null!=b&&void 0===c[a]&&(c[a]=b);c["x-grok-client-identifier"]=this.config.clientIdentifier||c["x-grok-client-identifier"]||k.rK,c["x-grok-client-version"]=this.config.clientVersion||c["x-grok-client-version"]||k.uG;let d=this._currentSessionId||a?.connectionId||e().randomUUID(),f=this._currentReqId||e().randomUUID();c["x-grok-session-id"]=d,c["x-grok-conv-id"]=d,c["x-grok-req-id"]=f,c["x-grok-turn-idx"]=String(this._currentTurnIdx||1),this._agentId&&(c["x-grok-agent-id"]=this._agentId),this._currentModel&&(c["x-grok-model-override"]=this._currentModel);let g=a?.providerSpecificData||{},h=g.email||a?.email,i=g.userId||a?.userId||a?.providerUserId;return h&&(c["x-email"]=h),i&&(c["x-userid"]=i),c}parseError(a,b){if(402===a.status&&b)try{let a=JSON.parse(b),c=a?.code||"",d=a?.error||a?.message||b;return{status:402,message:"string"==typeof d?d:b,code:"string"==typeof c?c:void 0}}catch{}return super.parseError(a,b)}transformRequest(a,b,c,d){let f;this._currentSessionId=(f={prompt_cache_key:b?.prompt_cache_key,session_id:b?.session_id,conversation_id:b?.conversation_id,metadata:b?.metadata},(0,m.oV)({headers:d?.rawHeaders,body:f,connectionId:d?.connectionId||d?.id,workspaceId:d?.providerSpecificData?.workspaceId,scope:"grok-cli"})),this._currentReqId=e().randomUUID(),this._agentId=d?.providerSpecificData?.deviceId||d?.providerSpecificData?.agentId||null;let g=(0,i.me)(b.input);g&&(b.input=g),(!b.input||Array.isArray(b.input)&&0===b.input.length)&&(Array.isArray(b.messages)&&b.messages.length>0?(b.input=b.messages.map(a=>({type:"message",role:a.role||"user",content:"string"==typeof a.content?a.content:JSON.stringify(a.content??"")})),delete b.messages):b.input=[{type:"message",role:"user",content:"..."}]),function(a){if(!Array.isArray(a?.input))return;let b=a.input.map(B).filter(Boolean),c=new Set(b.filter(a=>a?.type==="function_call"&&a.call_id).map(a=>a.call_id));a.input=b.filter(a=>a?.type!=="function_call_output"||c.has(a.call_id))}(b),Array.isArray(b.input)&&(b.input=b.input.filter(a=>{if("string"==typeof a&&q.test(a))return!1;if(a&&"object"==typeof a&&!Array.isArray(a)){if("item_reference"===a.type)return!1;"string"==typeof a.id&&q.test(a.id)&&!A(a.id)&&delete a.id}return!0})),function(a){if(!Array.isArray(a.tools)||0===a.tools.length){delete a.tools,delete a.tool_choice;return}let b=new Set,c=new Set;if(a.tools=a.tools.filter(a=>{if(!a||"object"!=typeof a||Array.isArray(a))return!1;let d="string"==typeof a.type?a.type:"";if("function"!==d){if(r.has(d))return c.add(d),!0;if(!d&&a.function);else if(d&&"string"!=typeof a.name)return!1}if(!("function"===d||""===d||a.function||"string"==typeof a.name)||r.has(d))return r.has(d);let e=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null,f=("string"==typeof a.name?a.name:"string"==typeof e?.name?e.name:"").trim();if(!f)return!1;let g="string"==typeof a.description?a.description:"string"==typeof e?.description?e.description:"",h="custom"===d?v:a.parameters&&"object"==typeof a.parameters&&!Array.isArray(a.parameters)?a.parameters:e?.parameters&&"object"==typeof e.parameters&&!Array.isArray(e.parameters)?e.parameters:{type:"object",properties:{}};for(let b of Object.keys(a))delete a[b];return a.type="function",a.name=f.slice(0,128),g&&(a.description=g),a.parameters=h,b.add(a.name),!0}),0===a.tools.length){delete a.tools,delete a.tool_choice;return}if(a.tool_choice&&"object"==typeof a.tool_choice&&!Array.isArray(a.tool_choice)){let d="string"==typeof a.tool_choice.type?a.tool_choice.type:"";if("function"===d||"custom"===d){let c=a.tool_choice.name??a.tool_choice.function?.name,d="string"==typeof c?c.trim().slice(0,128):"";d&&b.has(d)?a.tool_choice={type:"function",name:d}:delete a.tool_choice}else c.has(d)||delete a.tool_choice}}(b),this._currentTurnIdx=function(a,b,c=null){let d=function(a){if(!Array.isArray(a))return 1;let b=0;for(let c of a){if(!c||"object"!=typeof c||Array.isArray(c))continue;let a="string"==typeof c.type?c.type:"";"user"!==c.role||a&&"message"!==a||(b+=1)}return Math.max(1,b)}(b);if(!a)return d;if(c&&x.has(c))return x.get(c);let e=Date.now(),f=w.get(a),g=f&&e-f.lastUsed<=l.v1.sessionTtlMs?f.turn:0;f&&w.delete(a);let h=g>0?Math.max(d,g+ +!!c):d;for(;w.size>=5e3;)w.delete(w.keys().next().value);return w.set(a,{turn:h,lastUsed:e}),c&&x.set(c,h),h}(this._currentSessionId,b.input,b),b.stream=!0,b.store=!1;let h=function(a){if(!a||"string"!=typeof a)return null;for(let b of t)if(a.endsWith(`-${b}`))return b;return null}(b.model||a),n=b.model||a;h&&(n=n.replace(RegExp(`-${h}$`),"")),(n=(0,j.kt)("gcli",n)||n)===(b.model||a)&&(n=(0,j.kt)("grok-cli",n)||n),b.model=n,this._currentModel=n;let o=(0,k.Au)(n);if(b.reasoning&&"object"==typeof b.reasoning?(o?b.reasoning.effort=y(b.reasoning.effort||b.reasoning_effort||h):delete b.reasoning.effort,b.reasoning.summary||(b.reasoning.summary="concise")):(b.reasoning={summary:"concise"},o&&(b.reasoning.effort=y(b.reasoning_effort||h))),delete b.reasoning_effort,b.reasoning&&"none"!==b.reasoning.effort){let a=Array.isArray(b.include)?b.include:[];a.includes("reasoning.encrypted_content")||a.push("reasoning.encrypted_content"),b.include=a}for(let a of(delete b.messages,delete b.max_tokens,delete b.max_completion_tokens,delete b.n,delete b.seed,delete b.logprobs,delete b.top_logprobs,delete b.frequency_penalty,delete b.presence_penalty,delete b.logit_bias,delete b.user,delete b.stream_options,delete b.prompt_cache_retention,delete b.safety_identifier,delete b.previous_response_id,Object.keys(b)))s.has(a)||delete b[a];return b}async execute(a){if(this._agentId||a.credentials?.providerSpecificData?.deviceId)a.credentials?.providerSpecificData?.deviceId&&(this._agentId=a.credentials.providerSpecificData.deviceId);else try{let a=await p("grok-cli-agent");this._agentId=[a.slice(0,8),a.slice(8,12),"5"+a.slice(13,16),"a"+a.slice(17,20),a.slice(0,12).padEnd(12,"0")].join("-")}catch{this._agentId=e().randomUUID()}return super.execute(a)}}},51349:(a,b,c)=>{c.d(b,{m:()=>e});var d=c(96179);class e extends d.L{constructor(){super("codebuddy-intl")}transformRequest(a,b,c,d){let e=super.transformRequest(a,b,c,d);e.stream=!0;let f=e.reasoning_effort;"none"===f||"off"===f?delete e.reasoning_effort:f&&(e.reasoning_summary="auto");let g=Array.isArray(e.messages)?e.messages:[];for(let a of(e.messages=[{role:"system",content:"You are CodeBuddy Code."}],g))!a||"object"!=typeof a||["system","developer"].includes(a.role)||("user"===a.role&&"string"==typeof a.content?e.messages.push({...a,content:[{type:"text",text:a.content}]}):e.messages.push({...a}));return e}}},55330:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{SB:()=>I});var e=c(39536),f=c(98625),g=c(95128),h=c(11655),i=c(61433),j=c(56411),k=c(76467),l=c(32447),m=c(19932),n=c(19946),o=c(73870),p=c(4493),q=c(13120),r=c(17373),s=c(38572),t=c(49227),u=c(23013),v=c(9708),w=c(90926),x=c(26878),y=c(36732),z=c(49059),A=c(51349),B=c(85308),C=c(27617),D=c(98665),E=c(93509),F=c(96179),G=c(95089);c(74957);var H=a([n]);n=(H.then?(await H)():H)[0];let J={antigravity:new e.c,azure:new f.P,"gemini-cli":new g.V,github:new h.x,iflow:new i.r,qoder:new j.DH,"qoder-cn":new j.DH("qoder-cn"),kiro:new k.B,kimchi:new l.BL,codex:new m.T,cursor:new n.ou,cu:new n.ou,vertex:new o.w("vertex"),"vertex-partner":new o.w("vertex-partner"),opencode:new p.j9,"opencode-go":new q.H,"opencode-zen":new r.mO,"grok-web":new s.$,"grok-cli":new t.hG,gcli:new t.hG,gb:new t.hG,"perplexity-web":new u.Ay,"ollama-local":new v.D,commandcode:new w.Ak,"xiaomi-tokenplan":new x.F,"xiaomi-mimo":new y.Rb,codearts:new C.Ay,"codebuddy-cn":new z.v,"codebuddy-intl":new A.m,trae:new B.A,"trae-enterprise":new B.A("trae-enterprise"),zed:new D.A,windsurf:new E.Ay,"devin-cli":new G.c},K=new Map;function I(a){return J[a]?J[a]:(K.has(a)||K.set(a,new F.L(a)),K.get(a))}d()}catch(a){d(a)}})},56411:(a,b,c)=>{c.d(b,{DH:()=>R});let d=(()=>{let a=new Int16Array(128).fill(-1);for(let b=0;b<64;b++)a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(b)]="_doRTgHZBKcGVjlvpC,@aFSx#DPuNJme&i*MzLOEn)sUrthbf%Y^w.(kIQyXqWA!".charCodeAt(b);return a[61]=36,a})();var e=c(30015),f=c(94755),g=c(55511),h=c(74957),i=c(35024),j=c(39609),k=c(43659),l=c(78959),m=c(41004),n=c(69704),o=c(53225),p=c(19804),q=c(29463);function r(a){let b=Number(a);return Number.isFinite(b)?b:null}var s=c(76924);let t=/^image\//i,u=/data:[^;]+;base64,[A-Za-z0-9+/=\s]+/g;function v(a){let b=String(a||"").toLowerCase();return b.includes("png")?"png":b.includes("jpeg")||b.includes("jpg")?"jpg":b.includes("gif")?"gif":b.includes("webp")?"webp":b.includes("bmp")?"bmp":b.includes("pdf")?"pdf":"bin"}function w(a){return"string"==typeof a&&a?Math.floor(3*a.replace(/\s/g,"").length/4):0}function x({name:a,mime:b,bytes:c,reason:d}){let e=c?`, ${c} bytes`:"";return`[file omitted: ${a||b||"attachment"}${e} — ${d}]`}async function y({buffer:a,mediaType:b,credentials:c,proxyOptions:d,signal:g}){let h=(0,f.A)(),i=`${(0,n.e9)(c)}/algo${n.o8}?request_id=${h}`,{boundary:k,body:l}=function(a,{fieldName:b="file",fileName:c,mediaType:d}={}){let e=`----9routerQoder${Date.now().toString(16)}${Math.random().toString(16).slice(2)}`,f=c||`upload.${v(d)}`,g=Buffer.from(`--${e}\r
|
|
132
|
+
${d.content}`:Array.isArray(d.content)&&d.content.unshift({type:"text",text:c}):a.messages.unshift({role:"system",content:c})}(h),f))void 0!==h[a]&&delete h[a];if(delete h.system,g=(0,e.gK)(a),(g?.provider==="anthropic"||g?.upstreamProvider==="anthropic"||/(^|[-_/])(?:claude|anthropic)(?:[-_/]|$)/i.test(String(a||"")))&&(delete h.reasoning_effort,delete h.reasoning,delete h.thinking),Array.isArray(h?.messages))for(let a of h.messages)a&&"object"==typeof a&&(delete a.cache_control,Array.isArray(a.content)&&(a.content=a.content.map(a=>{if(!a||"object"!=typeof a)return a;let{cache_control:b,signature:c,...d}=a;return d})));Array.isArray(h?.tools)&&(h.tools=h.tools.map(a=>{if(!a||"object"!=typeof a)return a;let{cache_control:b,...c}=a;return c}));if(Array.isArray(h?.messages))for(let a of h.messages)a&&"assistant"===a.role&&"string"==typeof a.reasoning_content&&a.reasoning_content.length>8&&delete a.reasoning_content;return h}}},36732:(a,b,c)=>{c.d(b,{Rb:()=>h});var d=c(96179),e=c(12132);let f=new Set(["mimo-v2.6-pro","mimo-v2.6-flash","mimo-v2.6-pro-ultraspeed"]),g="__mimoAccountCookie";class h extends d.L{constructor(){super("xiaomi-mimo")}static isAccountRoute(a,b){let c,d,e=(d=(c=String(a||"")).indexOf("/"))>=0?c.slice(d+1):c;return!!f.has(e)&&!!(b?.[g]||b?.providerSpecificData?.mimoPassToken)}isAccountRoute(a,b){return h.isAccountRoute(a,b)}buildUrl(a,b,c=0,d=null){return this.isAccountRoute(a,d)?`${(0,e.resolveMimoServerBase)(d?.providerSpecificData)}/api/route/chat/completions`:super.buildUrl(a,b,c,d)}buildHeaders(a,b=!0,c,d){return this.isAccountRoute(d,a)&&a?.[g]?{"Content-Type":"application/json",Accept:b?"text/event-stream":"application/json","User-Agent":e.MIMO_API_UA,Cookie:a[g]}:super.buildHeaders(a,b,c,d)}transformRequest(a,b,c,d){let e=super.transformRequest(a,b,c,d);if(this.isAccountRoute(a,d)){let a=e.reasoning_effort||b?.reasoning_effort||b?.output_config?.effort;if(a){delete e.reasoning_effort;let b="xhigh"===String(a).toLowerCase()?"high":String(a).toLowerCase();e.output_config={...e.output_config||{},effort:b}}null==e.temperature&&(e.temperature=1),null==e.top_p&&(e.top_p=.95)}return e}async execute(a){let{model:b,credentials:c,proxyOptions:d=null}=a;if(!this.isAccountRoute(b,c))return super.execute(a);let f=await (0,e.getMimoAccountCookie)(c?.providerSpecificData,d);if(!f)return super.execute(a);c[g]=f;let h=await super.execute(a);if(401===h.response.status){(0,e.invalidateMimoAccountCookieCache)();let b=await (0,e.getMimoAccountCookie)(c?.providerSpecificData,d).catch(()=>null);if(b)return c[g]=b,super.execute(a)}return h}}},38572:(a,b,c)=>{c.d(b,{$:()=>o});var d=c(74957),e=c(35024),f=c(78959),g=c(92536);let h=e.xq["grok-web"].baseUrl,i={"grok-3":{grokModel:"grok-3",modelMode:"MODEL_MODE_GROK_3",isThinking:!1},"grok-3-mini":{grokModel:"grok-3",modelMode:"MODEL_MODE_GROK_3_MINI_THINKING",isThinking:!0},"grok-3-thinking":{grokModel:"grok-3",modelMode:"MODEL_MODE_GROK_3_THINKING",isThinking:!0},"grok-4":{grokModel:"grok-4",modelMode:"MODEL_MODE_GROK_4",isThinking:!1},"grok-4-mini":{grokModel:"grok-4-mini",modelMode:"MODEL_MODE_GROK_4_MINI_THINKING",isThinking:!0},"grok-4-thinking":{grokModel:"grok-4",modelMode:"MODEL_MODE_GROK_4_THINKING",isThinking:!0},"grok-4-heavy":{grokModel:"grok-4",modelMode:"MODEL_MODE_HEAVY",isThinking:!0},"grok-4.1-mini":{grokModel:"grok-4-1-thinking-1129",modelMode:"MODEL_MODE_GROK_4_1_MINI_THINKING",isThinking:!0},"grok-4.1-fast":{grokModel:"grok-4-1-thinking-1129",modelMode:"MODEL_MODE_FAST",isThinking:!1},"grok-4.1-expert":{grokModel:"grok-4-1-thinking-1129",modelMode:"MODEL_MODE_EXPERT",isThinking:!0},"grok-4.1-thinking":{grokModel:"grok-4-1-thinking-1129",modelMode:"MODEL_MODE_GROK_4_1_THINKING",isThinking:!0},"grok-4.2":{grokModel:"grok-420",modelMode:"MODEL_MODE_GROK_420",isThinking:!1},"grok-4.20":{grokModel:"grok-420",modelMode:"MODEL_MODE_GROK_420",isThinking:!1},"grok-4.20-beta":{grokModel:"grok-420",modelMode:"MODEL_MODE_GROK_420",isThinking:!1}};function j(a,b=!1){let c=b?"abcdefghijklmnopqrstuvwxyz0123456789":"abcdefghijklmnopqrstuvwxyz",d="";for(let b=0;b<a;b++)d+=c[Math.floor(Math.random()*c.length)];return d}function k(a){let b=new Uint8Array(a);return crypto.getRandomValues(b),Array.from(b,a=>a.toString(16).padStart(2,"0")).join("")}async function*l(a,b){let c=a.getReader(),d=new TextDecoder,e="";try{for(;;){if(b?.aborted)return;let{value:a,done:f}=await c.read();if(f)break;for(e+=d.decode(a,{stream:!0});;){let a=e.indexOf("\n");if(a<0)break;let b=e.slice(0,a).trim();if(e=e.slice(a+1),b)try{yield JSON.parse(b)}catch{}}}let a=(e+=d.decode()).trim();if(a)try{yield JSON.parse(a)}catch{}}finally{c.releaseLock()}}async function*m(a,b,c){let d="",e="",f=!1;for await(let g of l(a,c)){if(g.error)return void(yield{error:g.error.message||`Grok error: ${g.error.code}`,done:!0});let a=g.result?.response;if(a){if(a.llmInfo?.modelHash&&!d&&(d=a.llmInfo.modelHash),a.responseId&&(e=a.responseId),a.modelResponse){let c=a.modelResponse;f&&b&&(c.message&&(yield{thinking:c.message}),f=!1),c.message&&(yield{fullMessage:c.message,fingerprint:d,responseId:e}),c.metadata?.llm_info?.modelHash&&(d=c.metadata.llm_info.modelHash);continue}null!=a.token&&(yield{delta:a.token,fingerprint:d,responseId:e})}}yield{done:!0,fingerprint:d,responseId:e}}async function n(a,b,c,d,e,f){let g="",h="",i=[];for await(let b of m(a,e,f)){if(b.fingerprint&&(h=b.fingerprint),b.error)return new Response(JSON.stringify({error:{message:b.error,type:"upstream_error",code:"GROK_ERROR"}}),{status:502,headers:{"Content-Type":"application/json"}});if(b.thinking){i.push(b.thinking);continue}if(b.done)break;b.fullMessage?g=b.fullMessage:b.delta&&(g+=b.delta)}let j={role:"assistant",content:g};i.length>0&&(j.reasoning_content=i.join("\n"));let k=Math.ceil(g.length/4),l=Math.ceil(g.length/4);return new Response(JSON.stringify({id:c,object:"chat.completion",created:d,model:b,system_fingerprint:h||null,choices:[{index:0,message:j,finish_reason:"stop",logprobs:null}],usage:{prompt_tokens:k,completion_tokens:l,total_tokens:k+l}}),{status:200,headers:{"Content-Type":"application/json"}})}class o extends d.H{constructor(){super("grok-web",e.xq["grok-web"])}async execute({model:a,body:b,stream:c,credentials:d,signal:e,log:l}){let o,p,q=b?.messages;if(!q||!Array.isArray(q)||0===q.length)return{response:new Response(JSON.stringify({error:{message:"Missing or empty messages array",type:"invalid_request"}}),{status:400,headers:{"Content-Type":"application/json"}}),url:h,headers:{},transformedBody:b};let r=i[a];r||l?.info?.("GROK-WEB",`Unmapped model ${a}, defaulting to grok-4.1-fast`);let{grokModel:s,modelMode:t,isThinking:u}=r||i["grok-4.1-fast"],v=function(a){let b=[];for(let c of a){let a=String(c.role||"user");"developer"===a&&(a="system");let d="";"string"==typeof c.content?d=c.content:Array.isArray(c.content)&&(d=c.content.filter(a=>"text"===a.type).map(a=>String(a.text||"")).join(" ")),d.trim()&&b.push({role:a,text:d})}let c=-1;for(let a=b.length-1;a>=0;a--)if("user"===b[a].role){c=a;break}let d=[];for(let a=0;a<b.length;a++){let{role:e,text:f}=b[a];d.push(a===c?f:`${e}: ${f}`)}return d.join("\n\n")}(q);if(!v.trim())return{response:new Response(JSON.stringify({error:{message:"Empty query after processing",type:"invalid_request"}}),{status:400,headers:{"Content-Type":"application/json"}}),url:h,headers:{},transformedBody:b};let w={temporary:!0,modelName:s,modelMode:t,message:v,fileAttachments:[],imageAttachments:[],disableSearch:!1,enableImageGeneration:!1,returnImageBytes:!1,returnRawGrokInXaiRequest:!1,enableImageStreaming:!1,imageGenerationCount:0,forceConcise:!1,toolOverrides:{},enableSideBySide:!0,sendFinalMetadata:!0,isReasoning:!1,disableTextFollowUps:!1,disableMemory:!0,forceSideBySide:!1,isAsyncChat:!1,disableSelfHarmShortCircuit:!1,deviceEnvInfo:{darkModeEnabled:!1,devicePixelRatio:2,screenWidth:2056,screenHeight:1329,viewportWidth:2056,viewportHeight:1083}},x=k(16),y=k(8),z={Accept:"*/*","Accept-Encoding":"gzip, deflate, br, zstd","Accept-Language":"en-US,en;q=0.9",Baggage:"sentry-environment=production,sentry-release=d6add6fb0460641fd482d767a335ef72b9b6abb8,sentry-public_key=b311e0f2690c81f25e2c4cf6d4f7ce1c","Cache-Control":"no-cache","Content-Type":"application/json",Origin:"https://grok.com",Pragma:"no-cache",Referer:"https://grok.com/","Sec-Ch-Ua":'"Google Chrome";v="136", "Chromium";v="136", "Not(A:Brand";v="24"',"Sec-Ch-Ua-Mobile":"?0","Sec-Ch-Ua-Platform":'"macOS"',"Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","x-statsig-id":btoa(.5>Math.random()?`e:TypeError: Cannot read properties of null (reading 'children["${j(5,!0)}"]')`:`e:TypeError: Cannot read properties of undefined (reading '${j(10)}')`),"x-xai-request-id":crypto.randomUUID(),traceparent:`00-${x}-${y}-00`};if(d.apiKey){let a=d.apiKey;a.startsWith("sso=")&&(a=a.slice(4)),z.Cookie=`sso=${a}`}l?.info?.("GROK-WEB",`Query to ${a} (grok=${s}, mode=${t}), len=${v.length}`);try{o=await fetch(h,{method:"POST",headers:z,body:JSON.stringify(w),signal:e})}catch(a){return l?.error?.("GROK-WEB",`Fetch failed: ${a.message||String(a)}`),{response:new Response(JSON.stringify({error:{message:`Grok connection failed: ${a.message||String(a)}`,type:"upstream_error"}}),{status:502,headers:{"Content-Type":"application/json"}}),url:h,headers:z,transformedBody:w}}if(!o.ok){let a=o.status,b=`Grok returned HTTP ${a}`;return 401===a||403===a?b="Grok auth failed — SSO cookie may be expired. Re-paste your sso cookie value from grok.com.":429===a&&(b="Grok rate limited. Wait a moment and retry, or rotate cookies."),l?.warn?.("GROK-WEB",b),{response:new Response(JSON.stringify({error:{message:b,type:"upstream_error",code:`HTTP_${a}`}}),{status:a,headers:{"Content-Type":"application/json"}}),url:h,headers:z,transformedBody:w}}if(!o.body)return{response:new Response(JSON.stringify({error:{message:"Grok returned empty response body",type:"upstream_error"}}),{status:502,headers:{"Content-Type":"application/json"}}),url:h,headers:z,transformedBody:w};let A=`chatcmpl-grok-${crypto.randomUUID().slice(0,12)}`,B=Math.floor(Date.now()/1e3);if(c){var C;let b;p=new Response((C=o.body,b=new TextEncoder,new ReadableStream({async start(c){try{c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:null,choices:[{index:0,delta:{role:"assistant"},finish_reason:null,logprobs:null}]})));let d="";for await(let f of m(C,u,e)){if(f.fingerprint&&(d=f.fingerprint),f.error){c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:d||null,choices:[{index:0,delta:{content:`[Error: ${f.error}]`},finish_reason:null,logprobs:null}]})));break}if(f.thinking){c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:d||null,choices:[{index:0,delta:{reasoning_content:f.thinking},finish_reason:null,logprobs:null}]})));continue}if(f.done)break;f.delta&&c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:d||null,choices:[{index:0,delta:{content:f.delta},finish_reason:null,logprobs:null}]})))}c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:d||null,choices:[{index:0,delta:{},finish_reason:"stop",logprobs:null}]}))),c.enqueue(b.encode(f.$U))}catch(d){c.enqueue(b.encode((0,g.N)({id:A,object:"chat.completion.chunk",created:B,model:a,system_fingerprint:null,choices:[{index:0,delta:{content:`[Stream error: ${d.message||String(d)}]`},finish_reason:"stop",logprobs:null}]}))),c.enqueue(b.encode(f.$U))}finally{c.close()}}})),{status:200,headers:{...f.uB}})}else p=await n(o.body,a,A,B,u,e);return{response:p,url:h,headers:z,transformedBody:w}}}},49059:(a,b,c)=>{c.d(b,{v:()=>e});var d=c(96179);class e extends d.L{constructor(){super("codebuddy-cn")}transformRequest(a,b,c,d){let e=super.transformRequest(a,b,c,d);e.stream=!0;let f="You are a helpful AI assistant that helps with software engineering tasks.",g=/you are claude code|claude.?code.+official.+cli|anthropic.+official.+cli|anxthxropic.+official.+cli|you are (?:cursor|windsurf|cline|aider|continue|copilot|cody)|you are an? (?:ai )?(?:coding |code )?agent|cc_entrypoint\s*=\s*(?:cli|vscode|jetbrains|gui)|claude.?code.+issues|give feedback.+claude.?code|you are .{0,30}(?:powerful )?ai agent|orchestration capabilities|OhMyOpenCode|<agent-identity>|<Role>|<Behavior_Instructions>/i;Array.isArray(e.messages)&&(e.messages=e.messages.map(a=>{let b;if(!a||"system"!==a.role)return a;let c="string"==typeof(b=a.content)?b:Array.isArray(b)?b.map(a=>a&&"string"==typeof a.text?a.text:"").join("\n"):"";return c&&(c.length>2e3||g.test(c))?"string"==typeof a.content?{...a,content:f}:{...a,content:[{type:"text",text:f}]}:a}));let h=e.reasoning_effort;return"none"===h||"off"===h?delete e.reasoning_effort:h&&(e.reasoning_summary="auto"),e}}},49227:(a,b,c)=>{c.d(b,{hG:()=>C});var d=c(77598),e=c.n(d),f=c(74957),g=c(35024),h=c(93943),i=c(37981),j=c(57247),k=c(90737),l=c(41004),m=c(80662),n=c(19713);let o=null;async function p(a="endpoint-proxy-salt"){let b=function(){if(o)return o;try{o=(0,n.machineIdSync)()}catch{o=e().randomUUID()}return o}();return e().createHash("sha256").update(b+a).digest("hex").substring(0,16)}let q=/^(rs|fc|resp|msg)_/,r=new Set(["web_search","x_search","web_search_preview","file_search","image_generation","code_interpreter","mcp","local_shell"]),s=new Set(["model","input","instructions","tools","tool_choice","stream","store","reasoning","include","temperature","top_p","max_output_tokens","parallel_tool_calls","text","metadata","prompt_cache_key"]),t=["low","medium","high","xhigh"],u=/^(?:rs|msg|fc)_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,v={type:"object",properties:{input:{type:"string"}},required:["input"]},w=new Map,x=new WeakMap;function y(a){let b="string"==typeof a?a.trim().toLowerCase():"";return"max"===b?"xhigh":t.includes(b)?b:"high"}function z(a){return"string"==typeof a?a:void 0===a?"":JSON.stringify(a)}function A(a){return"string"==typeof a&&u.test(a)}function B(a){if(!a||"object"!=typeof a||Array.isArray(a))return a;let{internal_chat_message_metadata_passthrough:b,...c}=a;if("reasoning"===a.type)return A(a.id)&&"string"==typeof a.encrypted_content?c:null;if("custom_tool_call"===a.type){let b=a.call_id||a.id,c="string"==typeof a.name?a.name.trim():"";return b&&c?{type:"function_call",call_id:b,name:c,arguments:JSON.stringify({input:z(a.input??a.arguments)})}:null}if("custom_tool_call_output"===a.type||"function_call_output"===a.type){let b=a.call_id||a.id;return b?{type:"function_call_output",call_id:b,output:z(a.output)}:null}if("function_call"===a.type){let b=a.call_id||a.id,c="string"==typeof a.name?a.name.trim():"";return b&&c?{type:"function_call",...A(a.id)?{id:a.id}:{},call_id:b,name:c,arguments:"string"==typeof a.arguments?a.arguments:JSON.stringify(a.arguments??{}),..."string"==typeof a.status?{status:a.status}:{}}:null}return c}class C extends f.H{constructor(){super("grok-cli",g.xq["grok-cli"]),this._currentSessionId=null,this._currentReqId=null,this._currentTurnIdx=1,this._agentId=null}buildUrl(){return this.config.baseUrl}async refreshCredentials(a,b,c=null){return a?.refreshToken?(0,h.Vq)("grok-cli",a,b,c):null}needsRefresh(a){return(0,h.fp)("grok-cli",a)}buildHeaders(a,b=!0){let c=super.buildHeaders(a,b);for(let[a,b]of Object.entries(this.config.headers||{}))null!=b&&void 0===c[a]&&(c[a]=b);c["x-grok-client-identifier"]=this.config.clientIdentifier||c["x-grok-client-identifier"]||k.rK,c["x-grok-client-version"]=this.config.clientVersion||c["x-grok-client-version"]||k.uG;let d=this._currentSessionId||a?.connectionId||e().randomUUID(),f=this._currentReqId||e().randomUUID();c["x-grok-session-id"]=d,c["x-grok-conv-id"]=d,c["x-grok-req-id"]=f,c["x-grok-turn-idx"]=String(this._currentTurnIdx||1),this._agentId&&(c["x-grok-agent-id"]=this._agentId),this._currentModel&&(c["x-grok-model-override"]=this._currentModel);let g=a?.providerSpecificData||{},h=g.email||a?.email,i=g.userId||a?.userId||a?.providerUserId;return h&&(c["x-email"]=h),i&&(c["x-userid"]=i),c}parseError(a,b){if(402===a.status&&b)try{let a=JSON.parse(b),c=a?.code||"",d=a?.error||a?.message||b;return{status:402,message:"string"==typeof d?d:b,code:"string"==typeof c?c:void 0}}catch{}return super.parseError(a,b)}transformRequest(a,b,c,d){let f;this._currentSessionId=(f={prompt_cache_key:b?.prompt_cache_key,session_id:b?.session_id,conversation_id:b?.conversation_id,metadata:b?.metadata},(0,m.oV)({headers:d?.rawHeaders,body:f,connectionId:d?.connectionId||d?.id,workspaceId:d?.providerSpecificData?.workspaceId,scope:"grok-cli"})),this._currentReqId=e().randomUUID(),this._agentId=d?.providerSpecificData?.deviceId||d?.providerSpecificData?.agentId||null;let g=(0,i.me)(b.input);g&&(b.input=g),(!b.input||Array.isArray(b.input)&&0===b.input.length)&&(Array.isArray(b.messages)&&b.messages.length>0?(b.input=b.messages.map(a=>({type:"message",role:a.role||"user",content:"string"==typeof a.content?a.content:JSON.stringify(a.content??"")})),delete b.messages):b.input=[{type:"message",role:"user",content:"..."}]),function(a){if(!Array.isArray(a?.input))return;let b=a.input.map(B).filter(Boolean),c=new Set(b.filter(a=>a?.type==="function_call"&&a.call_id).map(a=>a.call_id));a.input=b.filter(a=>a?.type!=="function_call_output"||c.has(a.call_id))}(b),Array.isArray(b.input)&&(b.input=b.input.filter(a=>{if("string"==typeof a&&q.test(a))return!1;if(a&&"object"==typeof a&&!Array.isArray(a)){if("item_reference"===a.type)return!1;"string"==typeof a.id&&q.test(a.id)&&!A(a.id)&&delete a.id}return!0})),function(a){if(!Array.isArray(a.tools)||0===a.tools.length){delete a.tools,delete a.tool_choice;return}let b=new Set,c=new Set;if(a.tools=a.tools.filter(a=>{if(!a||"object"!=typeof a||Array.isArray(a))return!1;let d="string"==typeof a.type?a.type:"";if("function"!==d){if(r.has(d))return c.add(d),!0;if(!d&&a.function);else if(d&&"string"!=typeof a.name)return!1}if(!("function"===d||""===d||a.function||"string"==typeof a.name)||r.has(d))return r.has(d);let e=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null,f=("string"==typeof a.name?a.name:"string"==typeof e?.name?e.name:"").trim();if(!f)return!1;let g="string"==typeof a.description?a.description:"string"==typeof e?.description?e.description:"",h="custom"===d?v:a.parameters&&"object"==typeof a.parameters&&!Array.isArray(a.parameters)?a.parameters:e?.parameters&&"object"==typeof e.parameters&&!Array.isArray(e.parameters)?e.parameters:{type:"object",properties:{}};for(let b of Object.keys(a))delete a[b];return a.type="function",a.name=f.slice(0,128),g&&(a.description=g),a.parameters=h,b.add(a.name),!0}),0===a.tools.length){delete a.tools,delete a.tool_choice;return}if(a.tool_choice&&"object"==typeof a.tool_choice&&!Array.isArray(a.tool_choice)){let d="string"==typeof a.tool_choice.type?a.tool_choice.type:"";if("function"===d||"custom"===d){let c=a.tool_choice.name??a.tool_choice.function?.name,d="string"==typeof c?c.trim().slice(0,128):"";d&&b.has(d)?a.tool_choice={type:"function",name:d}:delete a.tool_choice}else c.has(d)||delete a.tool_choice}}(b),this._currentTurnIdx=function(a,b,c=null){let d=function(a){if(!Array.isArray(a))return 1;let b=0;for(let c of a){if(!c||"object"!=typeof c||Array.isArray(c))continue;let a="string"==typeof c.type?c.type:"";"user"!==c.role||a&&"message"!==a||(b+=1)}return Math.max(1,b)}(b);if(!a)return d;if(c&&x.has(c))return x.get(c);let e=Date.now(),f=w.get(a),g=f&&e-f.lastUsed<=l.v1.sessionTtlMs?f.turn:0;f&&w.delete(a);let h=g>0?Math.max(d,g+ +!!c):d;for(;w.size>=5e3;)w.delete(w.keys().next().value);return w.set(a,{turn:h,lastUsed:e}),c&&x.set(c,h),h}(this._currentSessionId,b.input,b),b.stream=!0,b.store=!1;let h=function(a){if(!a||"string"!=typeof a)return null;for(let b of t)if(a.endsWith(`-${b}`))return b;return null}(b.model||a),n=b.model||a;h&&(n=n.replace(RegExp(`-${h}$`),"")),(n=(0,j.kt)("gcli",n)||n)===(b.model||a)&&(n=(0,j.kt)("grok-cli",n)||n),b.model=n,this._currentModel=n;let o=(0,k.Au)(n);if(b.reasoning&&"object"==typeof b.reasoning?(o?b.reasoning.effort=y(b.reasoning.effort||b.reasoning_effort||h):delete b.reasoning.effort,b.reasoning.summary||(b.reasoning.summary="concise")):(b.reasoning={summary:"concise"},o&&(b.reasoning.effort=y(b.reasoning_effort||h))),delete b.reasoning_effort,b.reasoning&&"none"!==b.reasoning.effort){let a=Array.isArray(b.include)?b.include:[];a.includes("reasoning.encrypted_content")||a.push("reasoning.encrypted_content"),b.include=a}for(let a of(delete b.messages,delete b.max_tokens,delete b.max_completion_tokens,delete b.n,delete b.seed,delete b.logprobs,delete b.top_logprobs,delete b.frequency_penalty,delete b.presence_penalty,delete b.logit_bias,delete b.user,delete b.stream_options,delete b.prompt_cache_retention,delete b.safety_identifier,delete b.previous_response_id,Object.keys(b)))s.has(a)||delete b[a];return b}async execute(a){if(this._agentId||a.credentials?.providerSpecificData?.deviceId)a.credentials?.providerSpecificData?.deviceId&&(this._agentId=a.credentials.providerSpecificData.deviceId);else try{let a=await p("grok-cli-agent");this._agentId=[a.slice(0,8),a.slice(8,12),"5"+a.slice(13,16),"a"+a.slice(17,20),a.slice(0,12).padEnd(12,"0")].join("-")}catch{this._agentId=e().randomUUID()}return super.execute(a)}}},51349:(a,b,c)=>{c.d(b,{m:()=>e});var d=c(96179);class e extends d.L{constructor(){super("codebuddy-intl")}transformRequest(a,b,c,d){let e=super.transformRequest(a,b,c,d);e.stream=!0;let f=e.reasoning_effort;"none"===f||"off"===f?delete e.reasoning_effort:f&&(e.reasoning_summary="auto");let g=Array.isArray(e.messages)?e.messages:[];for(let a of(e.messages=[{role:"system",content:"You are CodeBuddy Code."}],g))!a||"object"!=typeof a||["system","developer"].includes(a.role)||("user"===a.role&&"string"==typeof a.content?e.messages.push({...a,content:[{type:"text",text:a.content}]}):e.messages.push({...a}));return e}}},55330:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{SB:()=>J});var e=c(39536),f=c(98625),g=c(95128),h=c(11655),i=c(61433),j=c(56411),k=c(76467),l=c(32447),m=c(19932),n=c(19946),o=c(73870),p=c(4493),q=c(13120),r=c(17373),s=c(38572),t=c(49227),u=c(23013),v=c(9708),w=c(90926),x=c(26878),y=c(36732),z=c(49059),A=c(51349),B=c(85308),C=c(27617),D=c(71880),E=c(98665),F=c(93509),G=c(96179),H=c(95089);c(74957);var I=a([n]);n=(I.then?(await I)():I)[0];let K={antigravity:new e.c,azure:new f.P,"gemini-cli":new g.V,github:new h.x,iflow:new i.r,qoder:new j.DH,"qoder-cn":new j.DH("qoder-cn"),kiro:new k.B,kimchi:new l.BL,codex:new m.T,cursor:new n.ou,cu:new n.ou,vertex:new o.w("vertex"),"vertex-partner":new o.w("vertex-partner"),opencode:new p.j9,"opencode-go":new q.H,"opencode-zen":new r.mO,"grok-web":new s.$,"grok-cli":new t.hG,gcli:new t.hG,gb:new t.hG,"perplexity-web":new u.Ay,"ollama-local":new v.D,commandcode:new w.Ak,"xiaomi-tokenplan":new x.F,"xiaomi-mimo":new y.Rb,codearts:new C.Ay,deveco:new D.y,"codebuddy-cn":new z.v,"codebuddy-intl":new A.m,trae:new B.A,"trae-enterprise":new B.A("trae-enterprise"),zed:new E.A,windsurf:new F.Ay,"devin-cli":new H.c},L=new Map;function J(a){return K[a]?K[a]:(L.has(a)||L.set(a,new G.L(a)),L.get(a))}d()}catch(a){d(a)}})},56411:(a,b,c)=>{c.d(b,{DH:()=>R});let d=(()=>{let a=new Int16Array(128).fill(-1);for(let b=0;b<64;b++)a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(b)]="_doRTgHZBKcGVjlvpC,@aFSx#DPuNJme&i*MzLOEn)sUrthbf%Y^w.(kIQyXqWA!".charCodeAt(b);return a[61]=36,a})();var e=c(30015),f=c(94755),g=c(55511),h=c(74957),i=c(35024),j=c(39609),k=c(43659),l=c(78959),m=c(41004),n=c(69704),o=c(53225),p=c(19804),q=c(29463);function r(a){let b=Number(a);return Number.isFinite(b)?b:null}var s=c(76924);let t=/^image\//i,u=/data:[^;]+;base64,[A-Za-z0-9+/=\s]+/g;function v(a){let b=String(a||"").toLowerCase();return b.includes("png")?"png":b.includes("jpeg")||b.includes("jpg")?"jpg":b.includes("gif")?"gif":b.includes("webp")?"webp":b.includes("bmp")?"bmp":b.includes("pdf")?"pdf":"bin"}function w(a){return"string"==typeof a&&a?Math.floor(3*a.replace(/\s/g,"").length/4):0}function x({name:a,mime:b,bytes:c,reason:d}){let e=c?`, ${c} bytes`:"";return`[file omitted: ${a||b||"attachment"}${e} — ${d}]`}async function y({buffer:a,mediaType:b,credentials:c,proxyOptions:d,signal:g}){let h=(0,f.A)(),i=`${(0,n.e9)(c)}/algo${n.o8}?request_id=${h}`,{boundary:k,body:l}=function(a,{fieldName:b="file",fileName:c,mediaType:d}={}){let e=`----9routerQoder${Date.now().toString(16)}${Math.random().toString(16).slice(2)}`,f=c||`upload.${v(d)}`,g=Buffer.from(`--${e}\r
|
|
133
133
|
Content-Disposition: form-data; name="${b}"; filename="${f}"\r
|
|
134
134
|
Content-Type: ${d||"application/octet-stream"}\r
|
|
135
135
|
\r
|
|
@@ -143,7 +143,7 @@ Content-Type: ${d||"application/octet-stream"}\r
|
|
|
143
143
|
|
|
144
144
|
`)),c.enqueue(i.encode(l.$U)),j=!0;return}let a=h||`upstream status ${g}`,e=O(h)?m.gx.RATE_LIMITED:g,f=JSON.stringify({id:`qoder-error-${Date.now()}`,object:"chat.completion.chunk",created:Math.floor(Date.now()/1e3),model:b,choices:[],error:(0,k.xJ)(e,`[qoder error ${g}: ${J(a,200)}]`).error});c.enqueue(i.encode(`data: ${f}
|
|
145
145
|
|
|
146
|
-
`)),c.enqueue(i.encode(l.$U)),j=!0;return}h&&(n.handleInner(h,c),o())};return new Response(new ReadableStream({async start(a){try{let b;for(;-1!==(b=g.indexOf("\n"));){let c=g.slice(0,b);if(g=g.slice(b+1),p(c,a),j){await e.cancel().catch(()=>{}),a.close();return}}for(h&&(g+=d.decode()).length>0&&(p(g,a),g="");!j&&!h;){let b,{done:c,value:f}=await e.read();if(c){(g+=d.decode()).length>0&&(p(g,a),g="");break}for(g+=d.decode(f,{stream:!0});-1!==(b=g.indexOf("\n"));){let c=g.slice(0,b);if(g=g.slice(b+1),p(c,a),j){await e.cancel().catch(()=>{}),a.close();return}}}}catch{}finally{if(!j)try{n.flush(a),j=!0}catch{}try{a.close()}catch{}await e.cancel().catch(()=>{})}},cancel:()=>e.cancel().catch(()=>{})}),{status:a.status,statusText:a.statusText,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache"}})}class R extends h.H{constructor(a="qoder"){super(a,i.xq[a]),this.region="qoder-cn"===a?"cn":"intl"}buildUrl(a){return`${(0,n.e9)(a,this.region)}/algo${n.F8}?FetchKeys=llm_model_result&AgentId=agent_common&Encode=1`}async execute({model:a,body:b,stream:c,credentials:f,signal:g,log:h,proxyOptions:i=null}){let k,l,n,p,q=f?.apiKey||f?.accessToken;if((0,o.zh)(q))try{f=await (0,o._M)(f,i,g,this.region)}catch(a){return h?.error?.("QODER",`PAT exchange failed: ${a.message}`),{response:new Response(JSON.stringify({error:{message:`qoder PAT exchange failed: ${a.message}`}}),{status:401,headers:{"Content-Type":"application/json"}}),url:this.buildUrl(f),headers:{},transformedBody:b}}let r=this.buildUrl(f),s=f?.providerSpecificData||{};if(!s.userId)return{response:new Response(JSON.stringify({error:{message:"qoder credential is missing userId; reconnect the account"}}),{status:401,headers:{"Content-Type":"application/json"}}),url:r,headers:{},transformedBody:b};if(!f?.accessToken)return{response:new Response(JSON.stringify({error:{message:"qoder credential is missing accessToken; reconnect the account"}}),{status:401,headers:{"Content-Type":"application/json"}}),url:r,headers:{},transformedBody:b};try{({qoderKey:k,payload:l}=await K({model:a,body:b,credentials:f,log:h,proxyOptions:i,signal:g,region:this.region}))}catch(a){return{response:new Response(JSON.stringify({error:{message:a.message}}),{status:400,headers:{"Content-Type":"application/json"}}),url:r,headers:{},transformedBody:b}}let t=function(a){let b=(Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"utf8"):Buffer.from(a)).toString("base64"),c=b.length,e=Math.floor(c/3),f=b.slice(c-e)+b.slice(e,c-e)+b.slice(0,e),g=Buffer.alloc(c);for(let a=0;a<c;a++){let b=f.charCodeAt(a);b<128&&d[b]>=0?g[a]=d[b]:g[a]=b}return g.toString("latin1")}(Buffer.from(JSON.stringify(l),"utf8")),u=Buffer.from(t,"latin1");try{n=(0,e.d)(u,r,{userId:s.userId,authToken:f.accessToken,name:f.displayName||"",email:f.email||"",machineId:s.machineId||""})}catch(a){return{response:new Response(JSON.stringify({error:{message:`qoder cosy signing failed: ${a.message}`}}),{status:401,headers:{"Content-Type":"application/json"}}),url:r,headers:{},transformedBody:b}}let v={"Content-Type":"application/json",Accept:"text/event-stream","Cache-Control":"no-cache","X-Model-Key":k,"X-Model-Source":l.model_config&&l.model_config.source||"system","Accept-Encoding":"identity",...n},w=this.config?.timeoutMs||m.pH,x=new AbortController,y=setTimeout(()=>x.abort(Error("fetch connect timeout")),w),z=g?AbortSignal.any([g,x.signal]):x.signal;try{p=await (0,j.proxyAwareFetch)(r,{method:"POST",headers:v,body:u,signal:z},{...i,strictProxy:!0})}catch(a){if(z.aborted)throw z.reason;throw a}finally{clearTimeout(y)}return p.ok?{response:await Q(p,`${this.provider}/${k}`,h),url:r,headers:v,transformedBody:l}:{response:p,url:r,headers:v,transformedBody:l}}async refreshCredentials(){return null}parseError(a,b){let c=super.parseError(a,b),d=function(a){let b=L(a);if(!M.test(b))return null;let c=b.match(/"retryAfterSeconds"\s*:\s*(\d+)/),d=c?Number(c[1]):0;return d>0?1e3*d:null}(b);return d&&(c.resetsAtMs=Date.now()+d),c}needsRefresh(){return!1}}},61433:(a,b,c)=>{c.d(b,{r:()=>h});var d=c(55511),e=c.n(d),f=c(74957),g=c(35024);class h extends f.H{constructor(){super("iflow",g.xq.iflow)}generateUUID(){return e().randomUUID()}createIFlowSignature(a,b,c,d){if(!d)return"";let f=`${a}:${b}:${c}`,g=e().createHmac("sha256",d);return g.update(f),g.digest("hex")}buildHeaders(a,b=!0){let c=`session-${this.generateUUID()}`,d=Date.now(),e=this.config.headers["User-Agent"]||"iFlow-Cli",f=a.apiKey||a.accessToken||"",g=this.createIFlowSignature(e,c,d,f),h={"Content-Type":"application/json",...this.config.headers,"session-id":c,"x-iflow-timestamp":d.toString(),"x-iflow-signature":g};return a.apiKey&&(h.Authorization=`Bearer ${a.apiKey}`),b&&(h.Accept="text/event-stream"),h}buildUrl(a,b,c=0,d=null){return this.config.baseUrl}transformRequest(a,b,c,d){return c&&b.messages&&!b.stream_options&&(b.stream_options={include_usage:!0}),b}}},73483:(a,b,c)=>{c.d(b,{Gh:()=>k,IF:()=>o,O9:()=>g,OF:()=>n,WL:()=>h,_6:()=>j,_L:()=>m,f5:()=>l,lm:()=>f});var d=c(14170);let e="1"===process.env.LOG_USAGE_VERBOSE,f={reset:"\x1b[0m",red:"\x1b[31m",green:"\x1b[32m",yellow:"\x1b[33m",blue:"\x1b[34m",cyan:"\x1b[36m"};function g(a){if(!a||"object"!=typeof a)return a;let b={...a};return void 0!==b.input_tokens&&(b.input_tokens+=2e3),void 0!==b.prompt_tokens&&(b.prompt_tokens+=2e3),void 0!==b.total_tokens?b.total_tokens+=2e3:void 0!==b.prompt_tokens&&void 0!==b.completion_tokens&&(b.total_tokens=b.prompt_tokens+b.completion_tokens),b}function h(a,b){if(!a||"object"!=typeof a)return a;let c={[d.h.CLAUDE]:["input_tokens","output_tokens","cache_read_input_tokens","cache_creation_input_tokens","estimated"],[d.h.GEMINI]:["promptTokenCount","candidatesTokenCount","totalTokenCount","cachedContentTokenCount","thoughtsTokenCount","estimated"],[d.h.OPENAI_RESPONSES]:["input_tokens","output_tokens","input_tokens_details","output_tokens_details","estimated"],default:["prompt_tokens","completion_tokens","total_tokens","cached_tokens","reasoning_tokens","prompt_tokens_details","completion_tokens_details","estimated"]},e=c[b];b===d.h.GEMINI_CLI||b===d.h.ANTIGRAVITY?e=c[d.h.GEMINI]:b===d.h.OPENAI_RESPONSE?e=c[d.h.OPENAI_RESPONSES]:e||(e=c.default);let f={};for(let b of e)void 0!==a[b]&&(f[b]=a[b]);return f}function i(a){if(!a||"object"!=typeof a||Array.isArray(a))return null;let b={},c=(a,c)=>{if(null==c)return;let d=Number(c);Number.isFinite(d)&&(b[a]=d)};return(c("prompt_tokens",a?.prompt_tokens),c("completion_tokens",a?.completion_tokens),c("total_tokens",a?.total_tokens),c("cache_read_input_tokens",a?.cache_read_input_tokens),c("cache_creation_input_tokens",a?.cache_creation_input_tokens),c("cached_tokens",a?.cached_tokens),c("reasoning_tokens",a?.reasoning_tokens),a?.prompt_tokens_details&&"object"==typeof a.prompt_tokens_details&&(b.prompt_tokens_details=a.prompt_tokens_details),a?.completion_tokens_details&&"object"==typeof a.completion_tokens_details&&(b.completion_tokens_details=a.completion_tokens_details),0===Object.keys(b).length)?null:b}function j(a){let b;if(!a||"object"!=typeof a||Array.isArray(a))return null;let c=a=>Number.isFinite(Number(a))?Number(a):0,d=c(a.completion_tokens??a.output_tokens),e=c(a.reasoning_tokens),f=c(a.cache_creation_input_tokens??a.prompt_tokens_details?.cache_creation_tokens),g=c(a.prompt_tokens??a.input_tokens);void 0===a.cached_tokens&&(void 0!==a.cache_read_input_tokens||void 0!==a.cache_creation_input_tokens)?g=g+(b=c(a.cache_read_input_tokens))+f:b=c(a.cached_tokens??a.prompt_tokens_details?.cached_tokens);let h={prompt_tokens:g,completion_tokens:d,total_tokens:g+d,cached_tokens:b,cache_creation_input_tokens:f};return e>0&&(h.reasoning_tokens=e),h}function k(a){if(!a||"object"!=typeof a)return!1;for(let b of["prompt_tokens","completion_tokens","total_tokens","input_tokens","output_tokens","promptTokenCount","candidatesTokenCount"])if("number"==typeof a[b]&&a[b]>0)return!0;return!1}function l(a){if(!a||"object"!=typeof a)return null;if("message_start"===a.type&&a.message?.usage&&"object"==typeof a.message.usage){let b=a.message.usage;return i({prompt_tokens:b.input_tokens||0,completion_tokens:b.output_tokens||0,cache_read_input_tokens:b.cache_read_input_tokens,cache_creation_input_tokens:b.cache_creation_input_tokens})}if("message_delta"===a.type&&a.usage&&"object"==typeof a.usage)return i({prompt_tokens:a.usage.input_tokens||0,completion_tokens:a.usage.output_tokens||0,cache_read_input_tokens:a.usage.cache_read_input_tokens,cache_creation_input_tokens:a.usage.cache_creation_input_tokens});if(("response.completed"===a.type||"response.done"===a.type)&&a.response?.usage&&"object"==typeof a.response.usage){let b=a.response.usage,c=b.input_tokens_details?.cached_tokens;return i({prompt_tokens:b.input_tokens||b.prompt_tokens||0,completion_tokens:b.output_tokens||b.completion_tokens||0,cached_tokens:c,reasoning_tokens:b.output_tokens_details?.reasoning_tokens,prompt_tokens_details:c?{cached_tokens:c}:void 0})}if(a.usage&&"object"==typeof a.usage&&void 0!==a.usage.prompt_tokens)return i({prompt_tokens:a.usage.prompt_tokens,completion_tokens:a.usage.completion_tokens||0,cached_tokens:a.usage.prompt_tokens_details?.cached_tokens||a.usage.prompt_cache_hit_tokens,reasoning_tokens:a.usage.completion_tokens_details?.reasoning_tokens,prompt_tokens_details:a.usage.prompt_tokens_details,completion_tokens_details:a.usage.completion_tokens_details});let b=a.usageMetadata||a.response?.usageMetadata;return b&&"object"==typeof b?i({prompt_tokens:b.promptTokenCount||0,completion_tokens:b.candidatesTokenCount||0,total_tokens:b.totalTokenCount,cached_tokens:b.cachedContentTokenCount,reasoning_tokens:b.thoughtsTokenCount}):!0===a.done&&"number"==typeof a.prompt_eval_count?i({prompt_tokens:a.prompt_eval_count||0,completion_tokens:a.eval_count||0,total_tokens:(a.prompt_eval_count||0)+(a.eval_count||0)}):null}function m(a,b){if(!a)return b||null;if(!b)return a;let c={...a};for(let[a,d]of Object.entries(b))"number"==typeof d&&Number.isFinite(d)?c[a]=Math.max("number"==typeof c[a]?c[a]:0,d):d&&"object"==typeof d&&(c[a]=d);return c}function n(a,b,c=d.h.OPENAI){var e,f;return e=function(a){if(!a||"object"!=typeof a)return 0;try{let b=JSON.stringify(a).length;return Math.ceil(b/4)}catch(a){return 0}}(a),f=b&&!(b<=0)?Math.max(1,Math.floor(b/4)):0,c===d.h.CLAUDE?g({input_tokens:e,output_tokens:f,estimated:!0}):g({prompt_tokens:e,completion_tokens:f,total_tokens:e+f,estimated:!0})}function o(a,b,c=null,d=null,g=null){if(!b||"object"!=typeof b||!e)return;let h=a?.toUpperCase()||"UNKNOWN",i=b?.prompt_tokens||b?.input_tokens||0,j=b?.completion_tokens||b?.output_tokens||0,k=d?d.slice(0,8)+"...":"unknown",l=`[${new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}] 📊 ${f.green}[USAGE] ${h} | in=${i} | out=${j} | account=${k}${f.reset}`;b.estimated&&(l+=` ${f.yellow}(estimated)${f.reset}`);let m=b.cache_read_input_tokens||b.cached_tokens||b.prompt_tokens_details?.cached_tokens;m&&(l+=` | cache_read=${m}`);let n=b.cache_creation_input_tokens;n&&(l+=` | cache_create=${n}`);let p=b.reasoning_tokens;p&&(l+=` | reasoning=${p}`),console.log(l)}},73870:(a,b,c)=>{c.d(b,{w:()=>k});var d=c(74957),e=c(35024),f=c(8521),g=c(39609);let h=new Map;function i(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("authorized_user"===b.type&&b.client_id&&b.client_secret&&b.refresh_token)return b;return null}catch{return null}}async function j(a){if(h.has(a))return h.get(a);let b=await fetch(`https://aiplatform.googleapis.com/v1/publishers/google/models/__probe__:generateContent?key=${a}`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}),c=await b.json().catch(()=>null),d=(c?.[0]?.error?.message||c?.error?.message||"").match(/projects\/([^/]+)\//),e=d?.[1]||null;return e&&h.set(a,e),e}class k extends d.H{constructor(a="vertex"){super(a,e.xq[a]||{})}buildUrl(a,b,c=0,d=null){let e=(0,f.Sc)(d?.apiKey),g=i(d?.apiKey),h=!!e||!!g||!!d?.accessToken,j=h?null:d?.apiKey,k=e?.project_id||g?.quota_project_id||d?.providerSpecificData?.projectId;if("vertex-partner"===this.provider){if(!k)throw Error("Vertex partner models require a project_id. Add it in providerSpecificData or use Service Account JSON.");let a=`https://aiplatform.googleapis.com/v1/projects/${k}/locations/global/endpoints/openapi/chat/completions`;return j?`${a}?key=${j}`:a}let l=b?"streamGenerateContent":"generateContent";if(h){if(!k)throw Error("Vertex OAuth/ADC requires a project_id. Add quota_project_id to your ADC JSON or set providerSpecificData.projectId.");let c=d?.providerSpecificData?.location||"us-central1",e=`https://aiplatform.googleapis.com/v1/projects/${k}/locations/${c}/publishers/google/models/${a}:${l}`;return b&&(e+="?alt=sse"),e}let m=`https://aiplatform.googleapis.com/v1/publishers/google/models/${a}:${l}`;return b&&(m+="?alt=sse"),j&&(m+=b?`&key=${j}`:`?key=${j}`),m}buildHeaders(a,b=!0){let c={"Content-Type":"application/json"};return a.accessToken&&(c.Authorization=`Bearer ${a.accessToken}`),b&&(c.Accept="text/event-stream"),c}async refreshCredentials(a,b){let c=(0,f.Sc)(a?.apiKey);if(!c)return null;let d=await (0,f.pb)(c,b);return d?{accessToken:d.accessToken,expiresAt:d.expiresAt}:null}async execute({model:a,body:b,stream:c,credentials:d,signal:e,log:h,proxyOptions:k=null}){let l=(0,f.Sc)(d?.apiKey),m=i(d?.apiKey);if(l){let a=await (0,f.pb)(l,h);if(!a?.accessToken)throw Error("Vertex: failed to mint access token from Service Account JSON");d.accessToken=a.accessToken}if(m){let a=await (0,f.I9)(m.refresh_token,m.client_id,m.client_secret,h);if(!a?.accessToken)throw Error("Vertex: failed to refresh access token from ADC JSON (authorized_user)");d.accessToken=a.accessToken}if("vertex-partner"===this.provider&&!l&&!m&&!d?.providerSpecificData?.projectId){let a=await j(d.apiKey);if(!a)throw Error("Vertex: could not resolve project_id from API key. Please add it manually in provider settings.");h?.debug?.("VERTEX",`Resolved project_id: ${a}`),d.providerSpecificData={...d.providerSpecificData,projectId:a}}let n=this.buildUrl(a,c,0,d),o=this.buildHeaders(d,c),p=this.transformRequest(a,b,c,d);return{response:await (0,g.proxyAwareFetch)(n,{method:"POST",headers:o,body:JSON.stringify(p),signal:e},k),url:n,headers:o,transformedBody:p}}}},76467:(a,b,c)=>{c.d(b,{B:()=>L});var d=c(74957),e=c(35024),f=c(6382),g=c(94755),h=c(8521),i=c(78959),j=c(24),k=c(41004);let l=new Set(["assistantResponseEvent","reasoningContentEvent","codeEvent","toolUseEvent","messageStopEvent","metadataEvent","MetadataEvent","contextUsageEvent","meteringEvent","metricsEvent"]),m=new TextEncoder,n=new TextDecoder,o=Uint32Array.from({length:256},(a,b)=>{let c=b;for(let a=0;a<8;a++)c=c>>>1^(1&c?0xedb88320:0);return c>>>0}),p=Object.freeze({tool:"Retry the previous response because its Kiro tool_call wrapper was malformed. If you use the wrapper tool named tool_call, its input must contain a non-empty name and an arguments field.",ellipsis:"Retry the previous response because it ended with only an ellipsis. Return the complete final answer, not only ... or ….",short_final:"Retry the previous response because its final only announced a future action. Complete the check now and return the result or a concrete blocker."}),q=/^(?:(?:(?:現在|接著|接下來|下一步)[,,::\s]*(?:我(?:只)?(?:會|要|將|再)?\s*)?|我只再)(?:補|查|確認|驗證|追(?:查|蹤)?|繼續|檢查|測試)|我(?:會|要|將)(?:再|重新)?(?:補(?:齊|查)?|抓取|查(?:詢)?|確認|驗證|追(?:查|蹤)?|繼續|檢查|測試)|(?:(?:next|now|then)\b[\s,:-]*)?(?:i(?:'ll| will| am going to| need to)|let me)\s+(?:verify|check|confirm|validate|investigate|trace|continue|follow up|test)\b)/iu,r=/^目前證據顯示[\s\S]{1,700}[。.!?;;]\s*最後補查\s+504\s+access\s+log[,,]\s*確認\s+host[//]路徑與是否為集中流量[。.!]?$/iu,s=/^(?:(?:next|now|then)\b[\s,:-]*)?(?:i(?:'ll| will| am going to| need to)|let me)\s+(?:verify|check|confirm|validate|investigate|trace|continue|follow up|test)\b/iu,t=/(?:[:;\n]|[.!?]\s+\S|\b(?:status|checksum|response|deployment)\s+(?:is|are|was|were|matches?|equals?|returned)\b)/iu,u=/^(?:(?:現在|接著|接下來|下一步)[,,::\s]*(?:我(?:只)?(?:會|要|將|再)?\s*)?|我只再|我(?:會|要|將)(?:再|重新)?)(?:補|抓取|查|確認|驗證|追|繼續|檢查|測試)/u,v=/(?:[。!?]\s*\S|(?:版本|狀態|回應|結果|部署|校驗碼)(?:是|為|等於|顯示))/u,w=/(?:請(?:你|先)|你(?:先|需要|可以|提供|確認|批准|允許)|等待(?:你|使用者)|等你|核准|同意|授權|\b(?:after|when|once)\s+you\b|\byour\s+(?:approval|confirmation|permission|input)\b|\bwait(?:ing)?\s+for\s+you\b|\bplease\s+(?:approve|confirm|provide|send)\b)/iu,x=/(?:已(?:經)?完成|完成(?:了|驗證|確認)|修復完成|確認無誤|驗證(?:完成|通過)|測試(?:均)?通過|結論|總結|\b(?:done|completed|fixed|verified|confirmed|passed|in conclusion|summary)\b|\b(?:is|are) complete\b)/iu,y=/(?:顯示|發現|因此|成功|失敗|正常|無錯誤|沒有錯誤|\b(?:found|shows?|showed|because|therefore|succeeded|failed|healthy|green|no errors?)\b)/iu;function z(a){let b=0xffffffff;for(let c of a)b=o[(b^c)&255]^b>>>8;return(0xffffffff^b)>>>0}function A(a,b){let c=Number.parseInt(process.env?.[a]||"",10);return Number.isFinite(c)&&c>0?c:b}function B(a,b){let c=new Uint8Array(b),d=0;for(let b of a)c.set(b,d),d+=b.byteLength;return c}function C(a){let b=Error(a?.message||a||"Request aborted");return b.name="AbortError",b}async function D(a,b,c,d){let e,f;if(b?.aborted)throw C(b.reason);let g=new Promise((a,b)=>{e=setTimeout(()=>b(Error(d)),c)}),h=new Promise((a,c)=>{f=()=>c(C(b.reason)),b?.addEventListener("abort",f,{once:!0})});try{return await Promise.race([a.read(),g,h])}finally{clearTimeout(e),b?.removeEventListener?.("abort",f)}}async function E(a,b,c,d){let e=a?.body?.getReader?.();if(!e)return"";let f=[],g=0;try{for(;g<c;){let{done:a,value:h}=await D(e,b,d,"Kiro retry error body stalled");if(a)break;let i=c-g,j=h.byteLength>i?h.slice(0,i):h;if(f.push(j),g+=j.byteLength,h.byteLength>i)break}}finally{await e.cancel("bounded Kiro retry error body").catch(()=>{})}return n.decode(B(f,g))}function F(a){let b=String(a||"").trim().replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase().replace(/[\s-]+/g,"_");return["endturn","end_turn","stop","stop_sequence"].includes(b)?"end_turn":["tooluse","tool_use","tool_calls"].includes(b)?"tool_use":["maxtokens","max_tokens","max_output_tokens","length"].includes(b)?"max_tokens":b||null}let G=new Set(["model_context_window_exceeded","max_tokens"]);function H(a,b){return["malformed_model_output","invalid_model_output"].includes(a)?"retryable_protocol_failure":["cancelled","pause_turn","model_context_window_exceeded"].includes(a)?"terminal_incomplete":"refusal"===a||/(?:content.*filter|guardrail|safety|policy|blocked)/u.test(a)?"terminal_refusal":"max_tokens"===a?b?"terminal_incomplete":"length":a&&!["end_turn","tool_use"].includes(a)?"unknown_failure":b||"tool_use"===a?"tool_use":a&&"end_turn"!==a?"unknown_failure":"complete"}function I(a,b){if(!b)return a;if(!a)return b;let c=a=>{let b=H(a,!1);return"terminal_refusal"===b?6:"terminal_incomplete"===b?5:"unknown_failure"===b?4:"retryable_protocol_failure"===b?3:"length"===b?2:1};return c(b)>c(a)?b:a}function J(a){return["...","…"].includes(String(a||"").trim())}function K(a,b,c){return m.encode(`data: ${JSON.stringify({error:{message:b,type:"upstream_error",code:a,...c?{details:c}:{}}})}
|
|
146
|
+
`)),c.enqueue(i.encode(l.$U)),j=!0;return}h&&(n.handleInner(h,c),o())};return new Response(new ReadableStream({async start(a){try{let b;for(;-1!==(b=g.indexOf("\n"));){let c=g.slice(0,b);if(g=g.slice(b+1),p(c,a),j){await e.cancel().catch(()=>{}),a.close();return}}for(h&&(g+=d.decode()).length>0&&(p(g,a),g="");!j&&!h;){let b,{done:c,value:f}=await e.read();if(c){(g+=d.decode()).length>0&&(p(g,a),g="");break}for(g+=d.decode(f,{stream:!0});-1!==(b=g.indexOf("\n"));){let c=g.slice(0,b);if(g=g.slice(b+1),p(c,a),j){await e.cancel().catch(()=>{}),a.close();return}}}}catch{}finally{if(!j)try{n.flush(a),j=!0}catch{}try{a.close()}catch{}await e.cancel().catch(()=>{})}},cancel:()=>e.cancel().catch(()=>{})}),{status:a.status,statusText:a.statusText,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache"}})}class R extends h.H{constructor(a="qoder"){super(a,i.xq[a]),this.region="qoder-cn"===a?"cn":"intl"}buildUrl(a){return`${(0,n.e9)(a,this.region)}/algo${n.F8}?FetchKeys=llm_model_result&AgentId=agent_common&Encode=1`}async execute({model:a,body:b,stream:c,credentials:f,signal:g,log:h,proxyOptions:i=null}){let k,l,n,p,q=f?.apiKey||f?.accessToken;if((0,o.zh)(q))try{f=await (0,o._M)(f,i,g,this.region)}catch(a){return h?.error?.("QODER",`PAT exchange failed: ${a.message}`),{response:new Response(JSON.stringify({error:{message:`qoder PAT exchange failed: ${a.message}`}}),{status:401,headers:{"Content-Type":"application/json"}}),url:this.buildUrl(f),headers:{},transformedBody:b}}let r=this.buildUrl(f),s=f?.providerSpecificData||{};if(!s.userId)return{response:new Response(JSON.stringify({error:{message:"qoder credential is missing userId; reconnect the account"}}),{status:401,headers:{"Content-Type":"application/json"}}),url:r,headers:{},transformedBody:b};if(!f?.accessToken)return{response:new Response(JSON.stringify({error:{message:"qoder credential is missing accessToken; reconnect the account"}}),{status:401,headers:{"Content-Type":"application/json"}}),url:r,headers:{},transformedBody:b};try{({qoderKey:k,payload:l}=await K({model:a,body:b,credentials:f,log:h,proxyOptions:i,signal:g,region:this.region}))}catch(a){return{response:new Response(JSON.stringify({error:{message:a.message}}),{status:400,headers:{"Content-Type":"application/json"}}),url:r,headers:{},transformedBody:b}}let t=function(a){let b=(Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"utf8"):Buffer.from(a)).toString("base64"),c=b.length,e=Math.floor(c/3),f=b.slice(c-e)+b.slice(e,c-e)+b.slice(0,e),g=Buffer.alloc(c);for(let a=0;a<c;a++){let b=f.charCodeAt(a);b<128&&d[b]>=0?g[a]=d[b]:g[a]=b}return g.toString("latin1")}(Buffer.from(JSON.stringify(l),"utf8")),u=Buffer.from(t,"latin1");try{n=(0,e.d)(u,r,{userId:s.userId,authToken:f.accessToken,name:f.displayName||"",email:f.email||"",machineId:s.machineId||""})}catch(a){return{response:new Response(JSON.stringify({error:{message:`qoder cosy signing failed: ${a.message}`}}),{status:401,headers:{"Content-Type":"application/json"}}),url:r,headers:{},transformedBody:b}}let v={"Content-Type":"application/json",Accept:"text/event-stream","Cache-Control":"no-cache","X-Model-Key":k,"X-Model-Source":l.model_config&&l.model_config.source||"system","Accept-Encoding":"identity",...n},w=this.config?.timeoutMs||m.pH,x=new AbortController,y=setTimeout(()=>x.abort(Error("fetch connect timeout")),w),z=g?AbortSignal.any([g,x.signal]):x.signal;try{p=await (0,j.proxyAwareFetch)(r,{method:"POST",headers:v,body:u,signal:z},{...i,strictProxy:!0})}catch(a){if(z.aborted)throw z.reason;throw a}finally{clearTimeout(y)}return p.ok?{response:await Q(p,`${this.provider}/${k}`,h),url:r,headers:v,transformedBody:l}:{response:p,url:r,headers:v,transformedBody:l}}async refreshCredentials(){return null}parseError(a,b){let c=super.parseError(a,b),d=function(a){let b=L(a);if(!M.test(b))return null;let c=b.match(/"retryAfterSeconds"\s*:\s*(\d+)/),d=c?Number(c[1]):0;return d>0?1e3*d:null}(b);return d&&(c.resetsAtMs=Date.now()+d),c}needsRefresh(){return!1}}},61433:(a,b,c)=>{c.d(b,{r:()=>h});var d=c(55511),e=c.n(d),f=c(74957),g=c(35024);class h extends f.H{constructor(){super("iflow",g.xq.iflow)}generateUUID(){return e().randomUUID()}createIFlowSignature(a,b,c,d){if(!d)return"";let f=`${a}:${b}:${c}`,g=e().createHmac("sha256",d);return g.update(f),g.digest("hex")}buildHeaders(a,b=!0){let c=`session-${this.generateUUID()}`,d=Date.now(),e=this.config.headers["User-Agent"]||"iFlow-Cli",f=a.apiKey||a.accessToken||"",g=this.createIFlowSignature(e,c,d,f),h={"Content-Type":"application/json",...this.config.headers,"session-id":c,"x-iflow-timestamp":d.toString(),"x-iflow-signature":g};return a.apiKey&&(h.Authorization=`Bearer ${a.apiKey}`),b&&(h.Accept="text/event-stream"),h}buildUrl(a,b,c=0,d=null){return this.config.baseUrl}transformRequest(a,b,c,d){return c&&b.messages&&!b.stream_options&&(b.stream_options={include_usage:!0}),b}}},71880:(a,b,c)=>{c.d(b,{y:()=>u});var d=c(77598),e=c.n(d),f=c(96179),g=c(41004),h=c(93943),i=c(7630),j=c(57247),k=c(43659);let l=["max_tokens","max_completion_tokens","max_output_tokens"],m=new Set(["4016","4015","4011",4016,4015,4011]),n="currently overloaded",o=Symbol.for("deveco.chatId");function p(a){let b=String(a||""),c=b.indexOf("/");return c>=0?b.slice(c+1):b}function q(a){return a?e().createHash("sha256").update(String(a)).digest("hex").slice(0,32):e().randomUUID().replace(/-/g,"")}function r(a){let b=p(a);return(0,j.KC)("deveco").find(a=>a.id===b)||null}async function s(a,b){let c=a.body.getReader(),d=[],e=0,f=!1,g=null,h=new Promise(a=>{g=setTimeout(()=>a("timeout"),b)}),i=null;try{for(;e<8192;){i=c.read();let a=await Promise.race([i,h]);if("timeout"===a){f=!0;break}if(i=null,a.done||(d.push(a.value),e+=a.value.byteLength,Buffer.from(t(d)).toString("utf8").includes(n)))break}}catch{}return clearTimeout(g),{head:d.length?Buffer.from(t(d)).toString("utf8"):"",replayed:new Response(new ReadableStream({async start(a){try{for(let b of d)a.enqueue(b);let b=i;for(;;){let{done:d,value:e}=await (b||c.read());if(b=null,d)break;a.enqueue(e)}a.close()}catch(b){a.error(b)}},cancel(a){c.cancel(a).catch(()=>{})}}),{status:a.status,statusText:a.statusText,headers:a.headers}),timedOut:f}}function t(a){let b=new Uint8Array(a.reduce((a,b)=>a+b.byteLength,0)),c=0;for(let d of a)b.set(d,c),c+=d.byteLength;return b}class u extends f.L{constructor(a="deveco"){super(a)}async execute(a){var b,c,d;let e,f=q(a?.providerSessionId),h=a?{...a,credentials:{...a.credentials||{},[o]:f}}:a,i=await super.execute(h),j=i?.response;if(!j||200!==j.status)return i;if(!(j.headers?.get?.("content-type")||"").includes("event-stream")){let a=function(a){if(!a||!a.includes("errorCode"))return null;try{let b=JSON.parse(a);if(void 0===b.errorCode)return null;return m.has(b.errorCode)||/token|jwt|auth|login|realname/i.test(String(b.errorMsg||""))?b:null}catch{return null}}(await j.clone().text().catch(()=>""));return a?function(a,b,c){let{response:d}=a;return{...a,response:new Response(b,{status:c,statusText:d.statusText,headers:d.headers})}}(i,JSON.stringify({error:{type:"authentication_error",message:a.errorMsg||"DevEco token rejected — reconnect the account"}}),g.gx.UNAUTHORIZED):i}let l=r(a?.model);if(!l?.contextLength||(b=i,c=a,d=4.5*l.contextLength,(e=b.bodyStr||JSON.stringify(b.transformedBody||c?.body||{})).includes(";base64,")?!(Buffer.byteLength(e.replace(/;base64,[A-Za-z0-9+/=]+/g,""),"utf8")>d):!(e.length>d||!(3*e.length<=d)&&Buffer.byteLength(e,"utf8")>d)))return i;let{head:p,replayed:t,timedOut:u}=await s(j,3e3);return u||!p.includes(n)?{...i,response:t}:{...i,response:new Response(JSON.stringify((0,k.xJ)(g.gx.BAD_REQUEST,`prompt is too long: DevEco built-in models cap the conversation at ${l.contextLength} tokens and this request exceeds that window. Compact or shrink the context, or route this model to a larger-context provider.`)),{status:g.gx.BAD_REQUEST,headers:{"Content-Type":"application/json"}})}}transformRequest(a,b,c,d){let e=super.transformRequest(a,b,c,d);return e&&"object"==typeof e&&(e.model=p(e.model||a),e.stream=!0,l.some(a=>null!=e[a])||(e.max_tokens=r(e.model||a)?.maxOutputTokens||32e3),void 0===e.tool_choice||Array.isArray(e.tools)&&0!==e.tools.length||delete e.tool_choice),e}buildHeaders(a,b=!0,c,d,e){let f=a?.accessToken||a?.providerSpecificData?.securityToken||"";return{"Content-Type":"application/json",Authorization:`Bearer ${f}`,"Chat-Id":a?.[o]||q(null),lang:"en",...b?{Accept:"text/event-stream"}:{}}}parseError(a,b){if(b)try{let c=JSON.parse(b),d=c?.error?.message||c?.message;if("string"==typeof d&&d)return{status:a.status,message:d}}catch{}return super.parseError(a,b)}async refreshCredentials(a,b,c=null){let d=await (0,h.MF)(this.provider,a,()=>(0,i.WH)(a,{log:b,proxyOptions:c||a?.proxyOptions||null}));return d?.providerSpecificData&&(d.providerSpecificData={...a?.providerSpecificData||{},...d.providerSpecificData}),d}}},73483:(a,b,c)=>{c.d(b,{Gh:()=>k,IF:()=>o,O9:()=>g,OF:()=>n,WL:()=>h,_6:()=>j,_L:()=>m,f5:()=>l,lm:()=>f});var d=c(14170);let e="1"===process.env.LOG_USAGE_VERBOSE,f={reset:"\x1b[0m",red:"\x1b[31m",green:"\x1b[32m",yellow:"\x1b[33m",blue:"\x1b[34m",cyan:"\x1b[36m"};function g(a){if(!a||"object"!=typeof a)return a;let b={...a};return void 0!==b.input_tokens&&(b.input_tokens+=2e3),void 0!==b.prompt_tokens&&(b.prompt_tokens+=2e3),void 0!==b.total_tokens?b.total_tokens+=2e3:void 0!==b.prompt_tokens&&void 0!==b.completion_tokens&&(b.total_tokens=b.prompt_tokens+b.completion_tokens),b}function h(a,b){if(!a||"object"!=typeof a)return a;let c={[d.h.CLAUDE]:["input_tokens","output_tokens","cache_read_input_tokens","cache_creation_input_tokens","estimated"],[d.h.GEMINI]:["promptTokenCount","candidatesTokenCount","totalTokenCount","cachedContentTokenCount","thoughtsTokenCount","estimated"],[d.h.OPENAI_RESPONSES]:["input_tokens","output_tokens","input_tokens_details","output_tokens_details","estimated"],default:["prompt_tokens","completion_tokens","total_tokens","cached_tokens","reasoning_tokens","prompt_tokens_details","completion_tokens_details","estimated"]},e=c[b];b===d.h.GEMINI_CLI||b===d.h.ANTIGRAVITY?e=c[d.h.GEMINI]:b===d.h.OPENAI_RESPONSE?e=c[d.h.OPENAI_RESPONSES]:e||(e=c.default);let f={};for(let b of e)void 0!==a[b]&&(f[b]=a[b]);return f}function i(a){if(!a||"object"!=typeof a||Array.isArray(a))return null;let b={},c=(a,c)=>{if(null==c)return;let d=Number(c);Number.isFinite(d)&&(b[a]=d)};return(c("prompt_tokens",a?.prompt_tokens),c("completion_tokens",a?.completion_tokens),c("total_tokens",a?.total_tokens),c("cache_read_input_tokens",a?.cache_read_input_tokens),c("cache_creation_input_tokens",a?.cache_creation_input_tokens),c("cached_tokens",a?.cached_tokens),c("reasoning_tokens",a?.reasoning_tokens),a?.prompt_tokens_details&&"object"==typeof a.prompt_tokens_details&&(b.prompt_tokens_details=a.prompt_tokens_details),a?.completion_tokens_details&&"object"==typeof a.completion_tokens_details&&(b.completion_tokens_details=a.completion_tokens_details),0===Object.keys(b).length)?null:b}function j(a){let b;if(!a||"object"!=typeof a||Array.isArray(a))return null;let c=a=>Number.isFinite(Number(a))?Number(a):0,d=c(a.completion_tokens??a.output_tokens),e=c(a.reasoning_tokens),f=c(a.cache_creation_input_tokens??a.prompt_tokens_details?.cache_creation_tokens),g=c(a.prompt_tokens??a.input_tokens);void 0===a.cached_tokens&&(void 0!==a.cache_read_input_tokens||void 0!==a.cache_creation_input_tokens)?g=g+(b=c(a.cache_read_input_tokens))+f:b=c(a.cached_tokens??a.prompt_tokens_details?.cached_tokens);let h={prompt_tokens:g,completion_tokens:d,total_tokens:g+d,cached_tokens:b,cache_creation_input_tokens:f};return e>0&&(h.reasoning_tokens=e),h}function k(a){if(!a||"object"!=typeof a)return!1;for(let b of["prompt_tokens","completion_tokens","total_tokens","input_tokens","output_tokens","promptTokenCount","candidatesTokenCount"])if("number"==typeof a[b]&&a[b]>0)return!0;return!1}function l(a){if(!a||"object"!=typeof a)return null;if("message_start"===a.type&&a.message?.usage&&"object"==typeof a.message.usage){let b=a.message.usage;return i({prompt_tokens:b.input_tokens||0,completion_tokens:b.output_tokens||0,cache_read_input_tokens:b.cache_read_input_tokens,cache_creation_input_tokens:b.cache_creation_input_tokens})}if("message_delta"===a.type&&a.usage&&"object"==typeof a.usage)return i({prompt_tokens:a.usage.input_tokens||0,completion_tokens:a.usage.output_tokens||0,cache_read_input_tokens:a.usage.cache_read_input_tokens,cache_creation_input_tokens:a.usage.cache_creation_input_tokens});if(("response.completed"===a.type||"response.done"===a.type)&&a.response?.usage&&"object"==typeof a.response.usage){let b=a.response.usage,c=b.input_tokens_details?.cached_tokens;return i({prompt_tokens:b.input_tokens||b.prompt_tokens||0,completion_tokens:b.output_tokens||b.completion_tokens||0,cached_tokens:c,reasoning_tokens:b.output_tokens_details?.reasoning_tokens,prompt_tokens_details:c?{cached_tokens:c}:void 0})}if(a.usage&&"object"==typeof a.usage&&void 0!==a.usage.prompt_tokens)return i({prompt_tokens:a.usage.prompt_tokens,completion_tokens:a.usage.completion_tokens||0,cached_tokens:a.usage.prompt_tokens_details?.cached_tokens||a.usage.prompt_cache_hit_tokens,reasoning_tokens:a.usage.completion_tokens_details?.reasoning_tokens,prompt_tokens_details:a.usage.prompt_tokens_details,completion_tokens_details:a.usage.completion_tokens_details});let b=a.usageMetadata||a.response?.usageMetadata;return b&&"object"==typeof b?i({prompt_tokens:b.promptTokenCount||0,completion_tokens:b.candidatesTokenCount||0,total_tokens:b.totalTokenCount,cached_tokens:b.cachedContentTokenCount,reasoning_tokens:b.thoughtsTokenCount}):!0===a.done&&"number"==typeof a.prompt_eval_count?i({prompt_tokens:a.prompt_eval_count||0,completion_tokens:a.eval_count||0,total_tokens:(a.prompt_eval_count||0)+(a.eval_count||0)}):null}function m(a,b){if(!a)return b||null;if(!b)return a;let c={...a};for(let[a,d]of Object.entries(b))"number"==typeof d&&Number.isFinite(d)?c[a]=Math.max("number"==typeof c[a]?c[a]:0,d):d&&"object"==typeof d&&(c[a]=d);return c}function n(a,b,c=d.h.OPENAI){var e,f;return e=function(a){if(!a||"object"!=typeof a)return 0;try{let b=JSON.stringify(a).length;return Math.ceil(b/4)}catch(a){return 0}}(a),f=b&&!(b<=0)?Math.max(1,Math.floor(b/4)):0,c===d.h.CLAUDE?g({input_tokens:e,output_tokens:f,estimated:!0}):g({prompt_tokens:e,completion_tokens:f,total_tokens:e+f,estimated:!0})}function o(a,b,c=null,d=null,g=null){if(!b||"object"!=typeof b||!e)return;let h=a?.toUpperCase()||"UNKNOWN",i=b?.prompt_tokens||b?.input_tokens||0,j=b?.completion_tokens||b?.output_tokens||0,k=d?d.slice(0,8)+"...":"unknown",l=`[${new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}] 📊 ${f.green}[USAGE] ${h} | in=${i} | out=${j} | account=${k}${f.reset}`;b.estimated&&(l+=` ${f.yellow}(estimated)${f.reset}`);let m=b.cache_read_input_tokens||b.cached_tokens||b.prompt_tokens_details?.cached_tokens;m&&(l+=` | cache_read=${m}`);let n=b.cache_creation_input_tokens;n&&(l+=` | cache_create=${n}`);let p=b.reasoning_tokens;p&&(l+=` | reasoning=${p}`),console.log(l)}},73870:(a,b,c)=>{c.d(b,{w:()=>k});var d=c(74957),e=c(35024),f=c(8521),g=c(39609);let h=new Map;function i(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("authorized_user"===b.type&&b.client_id&&b.client_secret&&b.refresh_token)return b;return null}catch{return null}}async function j(a){if(h.has(a))return h.get(a);let b=await fetch(`https://aiplatform.googleapis.com/v1/publishers/google/models/__probe__:generateContent?key=${a}`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}),c=await b.json().catch(()=>null),d=(c?.[0]?.error?.message||c?.error?.message||"").match(/projects\/([^/]+)\//),e=d?.[1]||null;return e&&h.set(a,e),e}class k extends d.H{constructor(a="vertex"){super(a,e.xq[a]||{})}buildUrl(a,b,c=0,d=null){let e=(0,f.Sc)(d?.apiKey),g=i(d?.apiKey),h=!!e||!!g||!!d?.accessToken,j=h?null:d?.apiKey,k=e?.project_id||g?.quota_project_id||d?.providerSpecificData?.projectId;if("vertex-partner"===this.provider){if(!k)throw Error("Vertex partner models require a project_id. Add it in providerSpecificData or use Service Account JSON.");let a=`https://aiplatform.googleapis.com/v1/projects/${k}/locations/global/endpoints/openapi/chat/completions`;return j?`${a}?key=${j}`:a}let l=b?"streamGenerateContent":"generateContent";if(h){if(!k)throw Error("Vertex OAuth/ADC requires a project_id. Add quota_project_id to your ADC JSON or set providerSpecificData.projectId.");let c=d?.providerSpecificData?.location||"us-central1",e=`https://aiplatform.googleapis.com/v1/projects/${k}/locations/${c}/publishers/google/models/${a}:${l}`;return b&&(e+="?alt=sse"),e}let m=`https://aiplatform.googleapis.com/v1/publishers/google/models/${a}:${l}`;return b&&(m+="?alt=sse"),j&&(m+=b?`&key=${j}`:`?key=${j}`),m}buildHeaders(a,b=!0){let c={"Content-Type":"application/json"};return a.accessToken&&(c.Authorization=`Bearer ${a.accessToken}`),b&&(c.Accept="text/event-stream"),c}async refreshCredentials(a,b){let c=(0,f.Sc)(a?.apiKey);if(!c)return null;let d=await (0,f.pb)(c,b);return d?{accessToken:d.accessToken,expiresAt:d.expiresAt}:null}async execute({model:a,body:b,stream:c,credentials:d,signal:e,log:h,proxyOptions:k=null}){let l=(0,f.Sc)(d?.apiKey),m=i(d?.apiKey);if(l){let a=await (0,f.pb)(l,h);if(!a?.accessToken)throw Error("Vertex: failed to mint access token from Service Account JSON");d.accessToken=a.accessToken}if(m){let a=await (0,f.I9)(m.refresh_token,m.client_id,m.client_secret,h);if(!a?.accessToken)throw Error("Vertex: failed to refresh access token from ADC JSON (authorized_user)");d.accessToken=a.accessToken}if("vertex-partner"===this.provider&&!l&&!m&&!d?.providerSpecificData?.projectId){let a=await j(d.apiKey);if(!a)throw Error("Vertex: could not resolve project_id from API key. Please add it manually in provider settings.");h?.debug?.("VERTEX",`Resolved project_id: ${a}`),d.providerSpecificData={...d.providerSpecificData,projectId:a}}let n=this.buildUrl(a,c,0,d),o=this.buildHeaders(d,c),p=this.transformRequest(a,b,c,d);return{response:await (0,g.proxyAwareFetch)(n,{method:"POST",headers:o,body:JSON.stringify(p),signal:e},k),url:n,headers:o,transformedBody:p}}}},76467:(a,b,c)=>{c.d(b,{B:()=>L});var d=c(74957),e=c(35024),f=c(6382),g=c(94755),h=c(8521),i=c(78959),j=c(24),k=c(41004);let l=new Set(["assistantResponseEvent","reasoningContentEvent","codeEvent","toolUseEvent","messageStopEvent","metadataEvent","MetadataEvent","contextUsageEvent","meteringEvent","metricsEvent"]),m=new TextEncoder,n=new TextDecoder,o=Uint32Array.from({length:256},(a,b)=>{let c=b;for(let a=0;a<8;a++)c=c>>>1^(1&c?0xedb88320:0);return c>>>0}),p=Object.freeze({tool:"Retry the previous response because its Kiro tool_call wrapper was malformed. If you use the wrapper tool named tool_call, its input must contain a non-empty name and an arguments field.",ellipsis:"Retry the previous response because it ended with only an ellipsis. Return the complete final answer, not only ... or ….",short_final:"Retry the previous response because its final only announced a future action. Complete the check now and return the result or a concrete blocker."}),q=/^(?:(?:(?:現在|接著|接下來|下一步)[,,::\s]*(?:我(?:只)?(?:會|要|將|再)?\s*)?|我只再)(?:補|查|確認|驗證|追(?:查|蹤)?|繼續|檢查|測試)|我(?:會|要|將)(?:再|重新)?(?:補(?:齊|查)?|抓取|查(?:詢)?|確認|驗證|追(?:查|蹤)?|繼續|檢查|測試)|(?:(?:next|now|then)\b[\s,:-]*)?(?:i(?:'ll| will| am going to| need to)|let me)\s+(?:verify|check|confirm|validate|investigate|trace|continue|follow up|test)\b)/iu,r=/^目前證據顯示[\s\S]{1,700}[。.!?;;]\s*最後補查\s+504\s+access\s+log[,,]\s*確認\s+host[//]路徑與是否為集中流量[。.!]?$/iu,s=/^(?:(?:next|now|then)\b[\s,:-]*)?(?:i(?:'ll| will| am going to| need to)|let me)\s+(?:verify|check|confirm|validate|investigate|trace|continue|follow up|test)\b/iu,t=/(?:[:;\n]|[.!?]\s+\S|\b(?:status|checksum|response|deployment)\s+(?:is|are|was|were|matches?|equals?|returned)\b)/iu,u=/^(?:(?:現在|接著|接下來|下一步)[,,::\s]*(?:我(?:只)?(?:會|要|將|再)?\s*)?|我只再|我(?:會|要|將)(?:再|重新)?)(?:補|抓取|查|確認|驗證|追|繼續|檢查|測試)/u,v=/(?:[。!?]\s*\S|(?:版本|狀態|回應|結果|部署|校驗碼)(?:是|為|等於|顯示))/u,w=/(?:請(?:你|先)|你(?:先|需要|可以|提供|確認|批准|允許)|等待(?:你|使用者)|等你|核准|同意|授權|\b(?:after|when|once)\s+you\b|\byour\s+(?:approval|confirmation|permission|input)\b|\bwait(?:ing)?\s+for\s+you\b|\bplease\s+(?:approve|confirm|provide|send)\b)/iu,x=/(?:已(?:經)?完成|完成(?:了|驗證|確認)|修復完成|確認無誤|驗證(?:完成|通過)|測試(?:均)?通過|結論|總結|\b(?:done|completed|fixed|verified|confirmed|passed|in conclusion|summary)\b|\b(?:is|are) complete\b)/iu,y=/(?:顯示|發現|因此|成功|失敗|正常|無錯誤|沒有錯誤|\b(?:found|shows?|showed|because|therefore|succeeded|failed|healthy|green|no errors?)\b)/iu;function z(a){let b=0xffffffff;for(let c of a)b=o[(b^c)&255]^b>>>8;return(0xffffffff^b)>>>0}function A(a,b){let c=Number.parseInt(process.env?.[a]||"",10);return Number.isFinite(c)&&c>0?c:b}function B(a,b){let c=new Uint8Array(b),d=0;for(let b of a)c.set(b,d),d+=b.byteLength;return c}function C(a){let b=Error(a?.message||a||"Request aborted");return b.name="AbortError",b}async function D(a,b,c,d){let e,f;if(b?.aborted)throw C(b.reason);let g=new Promise((a,b)=>{e=setTimeout(()=>b(Error(d)),c)}),h=new Promise((a,c)=>{f=()=>c(C(b.reason)),b?.addEventListener("abort",f,{once:!0})});try{return await Promise.race([a.read(),g,h])}finally{clearTimeout(e),b?.removeEventListener?.("abort",f)}}async function E(a,b,c,d){let e=a?.body?.getReader?.();if(!e)return"";let f=[],g=0;try{for(;g<c;){let{done:a,value:h}=await D(e,b,d,"Kiro retry error body stalled");if(a)break;let i=c-g,j=h.byteLength>i?h.slice(0,i):h;if(f.push(j),g+=j.byteLength,h.byteLength>i)break}}finally{await e.cancel("bounded Kiro retry error body").catch(()=>{})}return n.decode(B(f,g))}function F(a){let b=String(a||"").trim().replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase().replace(/[\s-]+/g,"_");return["endturn","end_turn","stop","stop_sequence"].includes(b)?"end_turn":["tooluse","tool_use","tool_calls"].includes(b)?"tool_use":["maxtokens","max_tokens","max_output_tokens","length"].includes(b)?"max_tokens":b||null}let G=new Set(["model_context_window_exceeded","max_tokens"]);function H(a,b){return["malformed_model_output","invalid_model_output"].includes(a)?"retryable_protocol_failure":["cancelled","pause_turn","model_context_window_exceeded"].includes(a)?"terminal_incomplete":"refusal"===a||/(?:content.*filter|guardrail|safety|policy|blocked)/u.test(a)?"terminal_refusal":"max_tokens"===a?b?"terminal_incomplete":"length":a&&!["end_turn","tool_use"].includes(a)?"unknown_failure":b||"tool_use"===a?"tool_use":a&&"end_turn"!==a?"unknown_failure":"complete"}function I(a,b){if(!b)return a;if(!a)return b;let c=a=>{let b=H(a,!1);return"terminal_refusal"===b?6:"terminal_incomplete"===b?5:"unknown_failure"===b?4:"retryable_protocol_failure"===b?3:"length"===b?2:1};return c(b)>c(a)?b:a}function J(a){return["...","…"].includes(String(a||"").trim())}function K(a,b,c){return m.encode(`data: ${JSON.stringify({error:{message:b,type:"upstream_error",code:a,...c?{details:c}:{}}})}
|
|
147
147
|
|
|
148
148
|
data: [DONE]
|
|
149
149
|
|
|
@@ -155,9 +155,9 @@ ${d}`:d}return c}(b.body,"invalid_tool"===f?"tool":f):structuredClone(b.body||{}
|
|
|
155
155
|
${a}`):"assistant"===c.role?b.push(`[Assistant]
|
|
156
156
|
${a}`):b.push(a)}return JSON.stringify([{type:"text",data:{content:b.join("\n\n")}}])}(b?.messages||[]),j=`chatcmpl-${this.provider}-${Date.now()}`,k=Math.floor(Date.now()/1e3),l=(a,b)=>new Response(JSON.stringify({error:{message:b,type:"api_error",code:""}}),{status:a,headers:{"Content-Type":"application/json"}}),m=d?.accessToken||"";if(!m)return{response:l(401,`${this.provider}: no Cloud-IDE-JWT — reconnect this provider`),url:this.base(),headers:{},transformedBody:b};let n=this.buildHeaders({...d,accessToken:m},!1!==c);try{f=await this.createSession(n,i,a,g,e,m,h)}catch(a){return{response:l(502,a?.message?String(a.message):String(a)),url:this.base(),headers:n,transformedBody:b}}let o=[],p={},q=0,r=null,s=null,t="",u=a=>{a.tool_call_info?.name==="finish"&&(t=a.tool_call_info?.params?.summary||t);let b=a.id;if(!b)return"";b in p||o.push(b);let c=a.thought||"";c.length>=(p[b]||"").length&&(p[b]=c);let d=o.map(a=>p[a]).join(""),e=d.slice(q);return q=d.length,e},v=()=>{let a=o.map(a=>p[a]).join("");return t.startsWith(a)&&t.length>a.length?t.slice(a.length):""};if(!1!==c){let c=new TextEncoder;return{response:new Response(new ReadableStream({start:async b=>{let d=a=>b.enqueue(c.encode(`data: ${JSON.stringify(a)}
|
|
157
157
|
|
|
158
|
-
`));d({id:j,object:"chat.completion.chunk",created:k,model:a,choices:[{index:0,delta:{role:"assistant"},finish_reason:null}]});try{if(await this.streamEvents(n,f.sessionId,f.messageId,(b,c)=>{if("error"===b)return s=c,!0;if("token_usage"===b&&(r=c),"plan_item"===b){let b=u(c);b&&d({id:j,object:"chat.completion.chunk",created:k,model:a,choices:[{index:0,delta:{content:b},finish_reason:null}]})}return"done"===b},e,h),s)d({id:j,object:"chat.completion.chunk",created:k,model:a,choices:[],error:{message:`${this.provider} ${s.code||""}: ${s.message||""}`,type:"api_error"}});else{let b=v();b&&d({id:j,object:"chat.completion.chunk",created:k,model:a,choices:[{index:0,delta:{content:b},finish_reason:null}]}),r&&d({id:j,object:"chat.completion.chunk",created:k,model:a,choices:[],usage:{prompt_tokens:r.prompt_tokens||0,completion_tokens:r.completion_tokens||0,total_tokens:r.total_tokens||0}}),d({id:j,object:"chat.completion.chunk",created:k,model:a,choices:[{index:0,delta:{},finish_reason:"stop"}]})}b.enqueue(c.encode("data: [DONE]\n\n")),b.close()}catch(a){b.error(a)}}}),{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}}),url:this.base(),headers:n,transformedBody:b}}try{await this.streamEvents(n,f.sessionId,f.messageId,(a,b)=>"error"===a?(s=b,!0):("token_usage"===a&&(r=b),"plan_item"===a&&u(b),"done"===a),e,h)}catch(a){return{response:l(502,a?.message?String(a.message):String(a)),url:this.base(),headers:n,transformedBody:b}}if(s)return{response:l(502,`${this.provider} ${s.code||""}: ${s.message||""}`),url:this.base(),headers:n,transformedBody:b};let w={id:j,object:"chat.completion",created:k,model:a,choices:[{index:0,message:{role:"assistant",content:o.map(a=>p[a]).join("")+v()},finish_reason:"stop"}]};return r&&(w.usage={prompt_tokens:r.prompt_tokens||0,completion_tokens:r.completion_tokens||0,total_tokens:r.total_tokens||0}),{response:new Response(JSON.stringify(w),{status:200,headers:{"Content-Type":"application/json"}}),url:this.base(),headers:n,transformedBody:b}}async refreshCredentials(){return null}}},90926:(a,b,c)=>{c.d(b,{Ak:()=>i});var d=c(55511),e=c(74957),f=c(35024),g=c(47723),h=c(78959);class i extends e.H{constructor(){super("commandcode",f.xq.commandcode)}transformRequest(a,b,c,d){return b.stream=!0,b}buildHeaders(a,b=!0){let c={"Content-Type":"application/json",...this.config.headers||{},"x-session-id":(0,d.randomUUID)()},e=a?.apiKey||a?.accessToken;return e&&(c.Authorization=`Bearer ${e}`),b&&(c.Accept="text/event-stream"),c}async execute(a){for(let b=0;b<=2;b++){let c=await super.execute(a);if(!c?.response?.ok||!c.response.body)return c;let d=await j(c.response,a.model);if(!d.ok&&b<2&&(502===d.status||503===d.status||504===d.status)){a.log?.debug?.("RETRY",`CommandCode upstream returned status ${d.status}, retrying ${b+1}/2...`),await new Promise(a=>setTimeout(a,1e3*(b+1)));continue}return c.response=d,c}}parseError(a,b){let c=null;try{c=JSON.parse(b||"{}")}catch{c=null}let d=c?.error||c,e=d?.message||c?.message||b||a.statusText;return{status:Number(d?.code||d?.statusCode||a.status)||a.status,message:e||`CommandCode upstream error: ${a.status}`}}}async function j(a,b){var c,d
|
|
158
|
+
`));d({id:j,object:"chat.completion.chunk",created:k,model:a,choices:[{index:0,delta:{role:"assistant"},finish_reason:null}]});try{if(await this.streamEvents(n,f.sessionId,f.messageId,(b,c)=>{if("error"===b)return s=c,!0;if("token_usage"===b&&(r=c),"plan_item"===b){let b=u(c);b&&d({id:j,object:"chat.completion.chunk",created:k,model:a,choices:[{index:0,delta:{content:b},finish_reason:null}]})}return"done"===b},e,h),s)d({id:j,object:"chat.completion.chunk",created:k,model:a,choices:[],error:{message:`${this.provider} ${s.code||""}: ${s.message||""}`,type:"api_error"}});else{let b=v();b&&d({id:j,object:"chat.completion.chunk",created:k,model:a,choices:[{index:0,delta:{content:b},finish_reason:null}]}),r&&d({id:j,object:"chat.completion.chunk",created:k,model:a,choices:[],usage:{prompt_tokens:r.prompt_tokens||0,completion_tokens:r.completion_tokens||0,total_tokens:r.total_tokens||0}}),d({id:j,object:"chat.completion.chunk",created:k,model:a,choices:[{index:0,delta:{},finish_reason:"stop"}]})}b.enqueue(c.encode("data: [DONE]\n\n")),b.close()}catch(a){b.error(a)}}}),{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}}),url:this.base(),headers:n,transformedBody:b}}try{await this.streamEvents(n,f.sessionId,f.messageId,(a,b)=>"error"===a?(s=b,!0):("token_usage"===a&&(r=b),"plan_item"===a&&u(b),"done"===a),e,h)}catch(a){return{response:l(502,a?.message?String(a.message):String(a)),url:this.base(),headers:n,transformedBody:b}}if(s)return{response:l(502,`${this.provider} ${s.code||""}: ${s.message||""}`),url:this.base(),headers:n,transformedBody:b};let w={id:j,object:"chat.completion",created:k,model:a,choices:[{index:0,message:{role:"assistant",content:o.map(a=>p[a]).join("")+v()},finish_reason:"stop"}]};return r&&(w.usage={prompt_tokens:r.prompt_tokens||0,completion_tokens:r.completion_tokens||0,total_tokens:r.total_tokens||0}),{response:new Response(JSON.stringify(w),{status:200,headers:{"Content-Type":"application/json"}}),url:this.base(),headers:n,transformedBody:b}}async refreshCredentials(){return null}}},90926:(a,b,c)=>{c.d(b,{Ak:()=>i});var d=c(55511),e=c(74957),f=c(35024),g=c(47723),h=c(78959);class i extends e.H{constructor(){super("commandcode",f.xq.commandcode)}transformRequest(a,b,c,d){return b.stream=!0,b}buildHeaders(a,b=!0){let c={"Content-Type":"application/json",...this.config.headers||{},"x-session-id":(0,d.randomUUID)()},e=a?.apiKey||a?.accessToken;return e&&(c.Authorization=`Bearer ${e}`),b&&(c.Accept="text/event-stream"),c}async execute(a){for(let b=0;b<=2;b++){let c=await super.execute(a);if(!c?.response?.ok||!c.response.body)return c;let d=await j(c.response,a.model);if(!d.ok&&b<2&&(502===d.status||503===d.status||504===d.status)){a.log?.debug?.("RETRY",`CommandCode upstream returned status ${d.status}, retrying ${b+1}/2...`),await new Promise(a=>setTimeout(a,1e3*(b+1)));continue}return c.response=d,c}}parseError(a,b){let c=null;try{c=JSON.parse(b||"{}")}catch{c=null}let d=c?.error||c,e=d?.message||c?.message||b||a.statusText;return{status:Number(d?.code||d?.statusCode||a.status)||a.status,message:e||`CommandCode upstream error: ${a.status}`}}}async function j(a,b){var c,d;let e,f=a.body.getReader(),i=new TextDecoder,j="",k=[],l=null;try{for(;;){let{value:a,done:b}=await f.read();if(b){let a=j.trim();if(a)try{let b=a.startsWith("data:")?a.slice(5).trim():a,c=JSON.parse(b);c?.type==="error"&&(l=c)}catch{}break}k.push(a);let c=(j+=i.decode(a,{stream:!0})).split("\n");j=c.pop()||"";let d=!1;for(let a of c){let b,c=a.trim();if(!c)continue;let e=c.startsWith("data:")?c.slice(5).trim():c;if(!e||"[DONE]"===e){d=!0;break}try{b=JSON.parse(e)}catch{continue}if(b?.type==="error"){l=b,d=!0;break}if(b?.type==="text-delta"||b?.type==="reasoning-delta"||b?.type==="tool-input-start"||b?.type==="tool-call"||b?.type==="finish"||b?.type==="finish-step"){d=!0;break}}if(d)break}}catch{try{f.releaseLock()}catch{}return a}if(l){try{await f.cancel()}catch{}let{statusCode:a,message:b,type:c}=function(a){if(!a||"object"!=typeof a)return{statusCode:503,message:"CommandCode upstream error",type:"server_error"};let b=a.error??a.message??"unknown",c="",d=null,e="server_error";if("object"==typeof b&&null!==b?(c=b.message||b.error||JSON.stringify(b),b.statusCode&&Number.isInteger(Number(b.statusCode))?d=Number(b.statusCode):b.status&&Number.isInteger(Number(b.status))&&(d=Number(b.status)),b.type&&(e=b.type)):c="string"==typeof b?b:JSON.stringify(b),a.statusCode&&Number.isInteger(Number(a.statusCode))&&(d=Number(a.statusCode)),!d||d<400||d>599){let a=c.toLowerCase();a.includes("rate limit")||a.includes("too many requests")?(d=429,e="rate_limit_error"):a.includes("unauthorized")||a.includes("invalid api key")||a.includes("authentication")?(d=401,e="authentication_error"):a.includes("payment required")||a.includes("billing")?(d=402,e="billing_error"):a.includes("quota")||a.includes("forbidden")||a.includes("permission")?(d=403,e="permission_error"):a.includes("not found")?(d=404,e="invalid_request_error"):a.includes("unavailable")||a.includes("overloaded")||a.includes("server error")?(d=503,e="server_error"):d=503}return{statusCode:d,message:c,type:e}}(l);return new Response(JSON.stringify({error:{message:`[CommandCode error: ${b}]`,type:c,code:a}}),{status:a,statusText:503===a?"Service Unavailable":429===a?"Too Many Requests":"Bad Gateway",headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}return function(a,b,c=null){let d=new TextDecoder,e=new TextEncoder,f="",i={model:b},j=(a,b)=>{if(a)for(let c of Array.isArray(a)?a:[a])null!=c&&b.enqueue(e.encode(`data: ${JSON.stringify(c)}
|
|
159
159
|
|
|
160
|
-
`))},k=new TransformStream({transform(a,b){let c=(f+=d.decode(a,{stream:!0})).split("\n");for(let a of(f=c.pop()||"",c)){let c=a.trim();c&&j((0,g.H)(c,i),b)}},flush(a){let b=f.trim();b&&j((0,g.H)(b,i),a),a.enqueue(e.encode(h.$U))}});return new Response(a.pipeThrough(k),{status:c?.status||200,statusText:c?.statusText||"OK",headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive",...c?.headers?Object.fromEntries(c.headers.entries()):{},"content-type":"text/event-stream"}})}((c=
|
|
160
|
+
`))},k=new TransformStream({transform(a,b){let c=(f+=d.decode(a,{stream:!0})).split("\n");for(let a of(f=c.pop()||"",c)){let c=a.trim();c&&j((0,g.H)(c,i),b)}},flush(a){let b=f.trim();b&&j((0,g.H)(b,i),a),a.enqueue(e.encode(h.$U))}});return new Response(a.pipeThrough(k),{status:c?.status||200,statusText:c?.statusText||"OK",headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive",...c?.headers?Object.fromEntries(c.headers.entries()):{},"content-type":"text/event-stream"}})}((c=k,d=f,e=0,new ReadableStream({async pull(a){if(e<c.length)return void a.enqueue(c[e++]);try{let{value:b,done:c}=await d.read();c?a.close():a.enqueue(b)}catch(b){a.error(b)}},async cancel(a){try{await d.cancel(a)}catch{}}})),b,a)}},92536:(a,b,c)=>{function d(a){return`data: ${JSON.stringify(a)}
|
|
161
161
|
|
|
162
162
|
`}function e({id:a,created:b,model:c,delta:f,finishReason:g=null}){return d({id:a,object:"chat.completion.chunk",created:b,model:c,choices:[{index:0,delta:f,finish_reason:g}]})}c.d(b,{N:()=>d,z:()=>e})},93509:(a,b,c)=>{c.d(b,{Ay:()=>t});var d=c(74957),e=c(39609),f=c(35024),g=c(77598);let h="https://server.codeium.com/exa.language_server_pb.LanguageServerService/GetChatMessage",i="3.14.0",j={"swe-1.6-fast":"swe-1-6-fast","swe-1.6":"swe-1-6","swe-1.5-fast":"swe-1-5-fast","swe-1.5":"swe-1-5","claude-opus-4.7-max":"claude-opus-4-7-max","claude-opus-4.7-xhigh":"claude-opus-4-7-xhigh","claude-opus-4.7-high":"claude-opus-4-7-high","claude-opus-4.7-medium":"claude-opus-4-7-medium","claude-opus-4.7-low":"claude-opus-4-7-low","claude-opus-4.7-review":"opus-4-7-review","claude-sonnet-4.6-thinking-1m":"claude-sonnet-4-6-thinking-1m","claude-sonnet-4.6-1m":"claude-sonnet-4-6-1m","claude-sonnet-4.6-thinking":"claude-sonnet-4-6-thinking","claude-sonnet-4.6":"claude-sonnet-4-6","claude-opus-4.6-thinking":"claude-opus-4-6-thinking","claude-opus-4.6":"claude-opus-4-6","claude-opus-4.5-thinking":"MODEL_CLAUDE_4_5_OPUS_THINKING","claude-opus-4.5":"MODEL_CLAUDE_4_5_OPUS","claude-sonnet-4.5-thinking":"MODEL_PRIVATE_3","claude-sonnet-4.5":"MODEL_PRIVATE_2","claude-haiku-4.5":"MODEL_PRIVATE_11","gpt-5.5-xhigh-fast":"gpt-5-5-xhigh-priority","gpt-5.5-high-fast":"gpt-5-5-high-priority","gpt-5.5-medium-fast":"gpt-5-5-medium-priority","gpt-5.5-low-fast":"gpt-5-5-low-priority","gpt-5.5-none-fast":"gpt-5-5-none-priority","gpt-5.5-xhigh":"gpt-5-5-xhigh","gpt-5.5-high":"gpt-5-5-high","gpt-5.5-medium":"gpt-5-5-medium","gpt-5.5-low":"gpt-5-5-low","gpt-5.5-none":"gpt-5-5-none","gpt-5.5-review":"gpt-5-5-review","gpt-5.5":"gpt-5-5-medium","gpt-5.4-xhigh-fast":"gpt-5-4-xhigh-priority","gpt-5.4-high-fast":"gpt-5-4-high-priority","gpt-5.4-medium-fast":"gpt-5-4-medium-priority","gpt-5.4-low-fast":"gpt-5-4-low-priority","gpt-5.4-none-fast":"gpt-5-4-none-priority","gpt-5.4-xhigh":"gpt-5-4-xhigh","gpt-5.4-high":"gpt-5-4-high","gpt-5.4-medium":"gpt-5-4-medium","gpt-5.4-low":"gpt-5-4-low","gpt-5.4-none":"gpt-5-4-none","gpt-5.4-mini-xhigh":"gpt-5-4-mini-xhigh","gpt-5.4-mini-high":"gpt-5-4-mini-high","gpt-5.4-mini-medium":"gpt-5-4-mini-medium","gpt-5.4-mini-low":"gpt-5-4-mini-low","gpt-5.4":"gpt-5-4-medium","gpt-5.3-codex-xhigh-fast":"gpt-5-3-codex-xhigh-priority","gpt-5.3-codex-high-fast":"gpt-5-3-codex-high-priority","gpt-5.3-codex-medium-fast":"gpt-5-3-codex-medium-priority","gpt-5.3-codex-low-fast":"gpt-5-3-codex-low-priority","gpt-5.3-codex-xhigh":"gpt-5-3-codex-xhigh","gpt-5.3-codex-high":"gpt-5-3-codex-high","gpt-5.3-codex-medium":"gpt-5-3-codex-medium","gpt-5.3-codex-low":"gpt-5-3-codex-low","gpt-5.3-codex":"gpt-5-3-codex-medium","gpt-5.2-xhigh":"MODEL_GPT_5_2_XHIGH","gpt-5.2-high":"MODEL_GPT_5_2_HIGH","gpt-5.2-medium":"MODEL_GPT_5_2_MEDIUM","gpt-5.2-low":"MODEL_GPT_5_2_LOW","gpt-5.2-none":"MODEL_GPT_5_2_NONE","gpt-5.2":"MODEL_GPT_5_2_MEDIUM","gpt-5":"gpt-5","gpt-4.1":"MODEL_CHAT_GPT_4_1_2025_04_14","gpt-4.1-mini":"gpt-4.1-mini","gpt-4o":"MODEL_CHAT_GPT_4O_2024_08_06","gemini-3.1-pro-high":"gemini-3-1-pro-high","gemini-3.1-pro-low":"gemini-3-1-pro-low","gemini-3.1-pro":"gemini-3-1-pro-high","gemini-3.0-flash-high":"MODEL_GOOGLE_GEMINI_3_0_FLASH_HIGH","gemini-3.0-flash-medium":"MODEL_GOOGLE_GEMINI_3_0_FLASH_MEDIUM","gemini-3.0-flash-low":"MODEL_GOOGLE_GEMINI_3_0_FLASH_LOW","gemini-3.0-flash-minimal":"MODEL_GOOGLE_GEMINI_3_0_FLASH_MINIMAL","gemini-3.0-flash":"MODEL_GOOGLE_GEMINI_3_0_FLASH_HIGH","gemini-2.5-pro":"MODEL_GOOGLE_GEMINI_2_5_PRO","deepseek-v4":"deepseek-v4","kimi-k2.6":"kimi-k2-6","kimi-k2.5":"kimi-k2-5","glm-5.1":"glm-5-1"};function k(a){let b=[],c=a>>>0;for(;c>127;)b.push(127&c|128),c>>>=7;return b.push(127&c),new Uint8Array(b)}function l(a){let b=new Uint8Array(a.reduce((a,b)=>a+b.length,0)),c=0;for(let d of a)b.set(d,c),c+=d.length;return b}let m=new TextEncoder,n=new TextDecoder;function o(a,b){return l([k(a<<3|2),k(b.length),b])}function p(a,b){return o(a,m.encode(b))}function q(a,b){let c=0,d=0;for(;b<a.length;){let e=a[b++];if(c|=(127&e)<<d,(128&e)==0)break;d+=7}return[c>>>0,b]}function r(a,b){let c=0;for(;c<a.length;){let d;[d,c]=q(a,c);let e=d>>>3,f=7&d;if(2===f){let d;[d,c]=q(a,c);let f=a.slice(c,c+d);if(c+=d,e===b)return n.decode(f)}else if(0===f){let b;[b,c]=q(a,c)}else if(1===f)c+=8;else if(5===f)c+=4;else break}return null}class s extends d.H{constructor(){super("windsurf",f.xq.windsurf||{id:"windsurf",baseUrl:h})}buildUrl(){return h}buildHeaders(a,b=!0){let c=a?.accessToken||a?.apiKey||"";return{"Content-Type":"application/grpc-web+proto",Accept:"application/grpc-web+proto",...c?{Authorization:`Bearer ${c}`}:{},"User-Agent":`windsurf/${i}`,"X-Grpc-Web":"1"}}transformRequest(){return null}async execute({model:a,body:b,stream:c,credentials:d,signal:f,log:h,upstreamExtraHeaders:k,proxyOptions:m=null}){let n,q=d?.accessToken||d?.apiKey||"",r=j[a]??a,s=b??{},t=function(a){let b=[];for(let c of a){let a=String(c.role||"user"),d="";if("string"==typeof c.content)d=c.content;else if(Array.isArray(c.content))for(let a of c.content)a&&"object"==typeof a&&"text"===a.type&&(d+=String(a.text||""));b.push({role:a,content:d,toolCallId:c.tool_call_id})}return b}(Array.isArray(s.messages)?s.messages:[]);0===t.length&&t.push({role:"user",content:""});let u=function(a,b,c){let d=(0,g.randomUUID)(),e=(0,g.randomUUID)(),f=[o(1,l([p(1,a),p(2,"windsurf"),p(3,i),p(4,"3.14.0"),p(5,d),p(6,"en-US")])),p(2,e),o(3,p(1,b))];for(let a of c)f.push(o(4,function(a){let b=[p(1,a.role),p(2,a.content)];return a.toolCallId&&b.push(p(3,a.toolCallId)),l(b)}(a)));return l(f)}(q,r,t),v=((n=new Uint8Array(5+u.length))[0]=0,new DataView(n.buffer).setUint32(1,u.length,!1),n.set(u,5),n),w=this.buildUrl(),x=this.buildHeaders(d);k&&Object.assign(x,k),h?.debug?.("WS",`Windsurf → ${r} (${t.length} messages)`);let y=await (0,e.proxyAwareFetch)(w,{method:"POST",headers:x,body:v,signal:f},m);return y.ok||200===y.status?{response:this.transformToSSE(y,a),url:w,headers:x,transformedBody:u}:{response:y,url:w,headers:x,transformedBody:u}}transformToSSE(a,b){let c=`chatcmpl-ws-${Date.now()}`,d=Math.floor(Date.now()/1e3),e=this;return new Response(new ReadableStream({async start(f){let g=new TextEncoder,h=!1,i="",j=0,k=0,m=null,o=a=>f.enqueue(g.encode(a));try{let g=new Uint8Array(0),p=a.body?.getReader(),s=(a,f)=>{if(128===a){let a=n.decode(f),b=/grpc-status:\s*(\d+)/i.exec(a);if(b&&"0"!==b[1]){let c=/grpc-message:\s*(.+)/i.exec(a);m=c?decodeURIComponent(c[1].trim()):`gRPC status ${b[1]}`}return}if(0!==a)return;let g=e.constructor.decodeCompletionChunk?e.constructor.decodeCompletionChunk(f):function(a){let b=0;for(;b<a.length;){let c;[c,b]=q(a,b);let d=c>>>3,e=7&c;if(2===e){let c;[c,b]=q(a,b);let e=a.slice(b,b+c);if(b+=c,1===d){let a=r(e,1);if(null!==a)return{kind:"content",text:a}}else if(3===d){let a=function(a){let b=0,c=null;for(;b<a.length;){let d;[d,b]=q(a,b);let e=d>>>3,f=7&d;if(2===f){let d;[d,b]=q(a,b),1===e&&(c=a.slice(b,b+d)),b+=d}else if(0===f){let c;[c,b]=q(a,b)}else break}if(!c)return[0,0];let d=0,e=0;for(b=0;b<c.length;){let a;[a,b]=q(c,b);let f=a>>>3,g=7&a;if(0===g){let a;[a,b]=q(c,b),1===f?d=a:2===f&&(e=a)}else if(2===g){let a;[a,b]=q(c,b),b+=a}else break}return[d,e]}(e);return{kind:"done",promptTokens:a[0],completionTokens:a[1]}}else if(4===d)return{kind:"error",message:r(e,1)??"unknown windsurf error"}}else if(0===e){let c;[c,b]=q(a,b)}else if(1===e)b+=8;else if(5===e)b+=4;else break}return{kind:"unknown"}}(f);"content"===g.kind&&g.text?(i+=g.text,h||(o(`data: ${JSON.stringify({id:c,object:"chat.completion.chunk",created:d,model:b,choices:[{index:0,delta:{role:"assistant",content:""},finish_reason:null}]})}
|
|
163
163
|
|
|
@@ -221,6 +221,6 @@ ${d}`))}return b.join("\n\n")||"(empty)"}(k),p=function(a){let b=[],c=a=>{"strin
|
|
|
221
221
|
|
|
222
222
|
`):f(`data: ${JSON.stringify({id:z,object:"chat.completion.chunk",created:A,model:a,choices:[{index:0,delta:{},finish_reason:d}],usage:{prompt_tokens:Math.ceil(o.length/4),completion_tokens:Math.ceil(C.length/4),total_tokens:Math.ceil((o.length+C.length)/4),estimated:!0}})}
|
|
223
223
|
|
|
224
|
-
`),f("data: [DONE]\n\n");try{n||(n=!0,k.stdin.end())}catch{}let e=setTimeout(()=>{k.killed||k.kill("SIGKILL")},2e3);e.unref?.(),b.close(),y()},K="";k.stdout.on("data",b=>{let c;for(K+=b.toString("utf8");-1!==(c=K.indexOf("\n"));){let b,e=K.slice(0,c).trim();if(K=K.slice(c+1),e){try{b=JSON.parse(e)}catch{continue}if(!u&&void 0!==b.result&&!b.method){u=!0,E("session/new",{cwd:p,mcpServers:[],model:a||void 0});continue}if(u&&!v&&void 0!==b.result&&!b.method){if(!(t=(b.result||{}).sessionId||null))return void J("Devin ACP: session/new returned no sessionId");v=!0,w=!0,E("session/prompt",{sessionId:t,prompt:[{type:"text",text:o}]});continue}if(v&&w&&void 0!==b.result&&!b.method){if(!B){let a=b.result||void 0,c=function(a){if("string"==typeof a.content)return a.content;if("string"==typeof a.text)return a.text;let b=a.message;if(b&&"string"==typeof b.content)return b.content;let c=a.messages;return Array.isArray(c)?c.filter(a=>"assistant"===a.role).map(a=>String(a.content||"")).join("\n"):""}(a);c&&(C=c,F(c));let d=a&&a.stopReason||"";if(d&&"cancelled"!==d)return void J()}continue}if("session/request_permission"===b.method&&void 0!==b.id){let a=b.params?.options||[],c=a.find(a=>/allow/i.test(String(a.kind||"")))||a[0];c&&k.stdin.write(JSON.stringify({jsonrpc:"2.0",id:b.id,result:{outcome:{outcome:"selected",optionId:c.optionId}}})+"\n");continue}if("_cognition.ai/agent_stopped"===b.method||"$/agent_stopped"===b.method)return void("error"===b.params?.cause?J(String(b.params?.errorMessage||b.params?.message||b.params?.error||"Devin agent error")):J());if("session/update"===b.method||"$/update"===b.method){let a=b.params;if(!a)continue;let c=a.update||{},e=c.sessionUpdate||a.type,f=void 0!==c.content?c.content:a.content,g="string"==typeof f?f:f?.text??a.delta??a.text??"";if(x&&!G&&("tool_call"===e||"tool_call_update"===e)){let a=c.toolCallId;if("string"==typeof c.title&&c.title.startsWith("Calling mcp_")&&/from clientTools\b/.test(c.title)){var d;let b=c.title.match(/^Calling (mcp_\S+)\b/),e=(d=b?b[1]:"").startsWith(m)?d.slice(m.length):d;a&&e&&H.set(a,e)}let b=a?H.get(a):null;if(b&&c.rawInput){G=!0,H.delete(a),I(b,c.rawInput,a||`call_${Date.now()}`),J(null,"tool_calls");return}continue}if("agent_message_chunk"===e||"message_delta"===e||"text_delta"===e||"content_delta"===e)g&&F(g);else if("agent_thought_chunk"===e);else if("message_stop"===e||"stop"===e||"done"===e)return void J();else if("error"===e)return void J(String(a.message||a.error||"Devin ACP error"));continue}if(b.error)return void J(`Devin ACP error ${b.error.code}: ${b.error.message}`)}}}),k.stderr.on("data",a=>{g?.debug?.("DEVIN",`stderr: ${a.toString("utf8").slice(0,200)}`)}),k.on("close",a=>{D?y():0===a||l?J():J(B?void 0:`Devin CLI exited with code ${a}`)}),E("initialize",{protocolVersion:"0.3",clientInfo:{name:"9router",version:"1.0"},capabilities:{}})}}),{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}}),url:"devin://acp/stdio",headers:{},transformedBody:{model:a,cwd:p,clientTools:u.map(a=>a?.function?.name||a?.name).filter(Boolean),clientToolResults:Object.keys(v),mcpServers:Object.keys(s),promptLength:Array.isArray(b?.messages)?b.messages.length:Array.isArray(b?.input)?b.input.length:0}}}}},95128:(a,b,c)=>{c.d(b,{V:()=>
|
|
224
|
+
`),f("data: [DONE]\n\n");try{n||(n=!0,k.stdin.end())}catch{}let e=setTimeout(()=>{k.killed||k.kill("SIGKILL")},2e3);e.unref?.(),b.close(),y()},K="";k.stdout.on("data",b=>{let c;for(K+=b.toString("utf8");-1!==(c=K.indexOf("\n"));){let b,e=K.slice(0,c).trim();if(K=K.slice(c+1),e){try{b=JSON.parse(e)}catch{continue}if(!u&&void 0!==b.result&&!b.method){u=!0,E("session/new",{cwd:p,mcpServers:[],model:a||void 0});continue}if(u&&!v&&void 0!==b.result&&!b.method){if(!(t=(b.result||{}).sessionId||null))return void J("Devin ACP: session/new returned no sessionId");v=!0,w=!0,E("session/prompt",{sessionId:t,prompt:[{type:"text",text:o}]});continue}if(v&&w&&void 0!==b.result&&!b.method){if(!B){let a=b.result||void 0,c=function(a){if("string"==typeof a.content)return a.content;if("string"==typeof a.text)return a.text;let b=a.message;if(b&&"string"==typeof b.content)return b.content;let c=a.messages;return Array.isArray(c)?c.filter(a=>"assistant"===a.role).map(a=>String(a.content||"")).join("\n"):""}(a);c&&(C=c,F(c));let d=a&&a.stopReason||"";if(d&&"cancelled"!==d)return void J()}continue}if("session/request_permission"===b.method&&void 0!==b.id){let a=b.params?.options||[],c=a.find(a=>/allow/i.test(String(a.kind||"")))||a[0];c&&k.stdin.write(JSON.stringify({jsonrpc:"2.0",id:b.id,result:{outcome:{outcome:"selected",optionId:c.optionId}}})+"\n");continue}if("_cognition.ai/agent_stopped"===b.method||"$/agent_stopped"===b.method)return void("error"===b.params?.cause?J(String(b.params?.errorMessage||b.params?.message||b.params?.error||"Devin agent error")):J());if("session/update"===b.method||"$/update"===b.method){let a=b.params;if(!a)continue;let c=a.update||{},e=c.sessionUpdate||a.type,f=void 0!==c.content?c.content:a.content,g="string"==typeof f?f:f?.text??a.delta??a.text??"";if(x&&!G&&("tool_call"===e||"tool_call_update"===e)){let a=c.toolCallId;if("string"==typeof c.title&&c.title.startsWith("Calling mcp_")&&/from clientTools\b/.test(c.title)){var d;let b=c.title.match(/^Calling (mcp_\S+)\b/),e=(d=b?b[1]:"").startsWith(m)?d.slice(m.length):d;a&&e&&H.set(a,e)}let b=a?H.get(a):null;if(b&&c.rawInput){G=!0,H.delete(a),I(b,c.rawInput,a||`call_${Date.now()}`),J(null,"tool_calls");return}continue}if("agent_message_chunk"===e||"message_delta"===e||"text_delta"===e||"content_delta"===e)g&&F(g);else if("agent_thought_chunk"===e);else if("message_stop"===e||"stop"===e||"done"===e)return void J();else if("error"===e)return void J(String(a.message||a.error||"Devin ACP error"));continue}if(b.error)return void J(`Devin ACP error ${b.error.code}: ${b.error.message}`)}}}),k.stderr.on("data",a=>{g?.debug?.("DEVIN",`stderr: ${a.toString("utf8").slice(0,200)}`)}),k.on("close",a=>{D?y():0===a||l?J():J(B?void 0:`Devin CLI exited with code ${a}`)}),E("initialize",{protocolVersion:"0.3",clientInfo:{name:"9router",version:"1.0"},capabilities:{}})}}),{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}}),url:"devin://acp/stdio",headers:{},transformedBody:{model:a,cwd:p,clientTools:u.map(a=>a?.function?.name||a?.name).filter(Boolean),clientToolResults:Object.keys(v),mcpServers:Object.keys(s),promptLength:Array.isArray(b?.messages)?b.messages.length:Array.isArray(b?.input)?b.input.length:0}}}}},95128:(a,b,c)=>{c.d(b,{V:()=>h});var d=c(74957),e=c(35024),f=c(75924),g=c(39609);class h extends d.H{constructor(){super("gemini-cli",e.xq["gemini-cli"])}buildUrl(a,b,c=0){return`${this.config.baseUrl}:${b?"streamGenerateContent?alt=sse":"generateContent"}`}buildHeaders(a,b=!0){return{"Content-Type":"application/json",Authorization:`Bearer ${a.accessToken}`,"User-Agent":(0,f.sX)(this._currentModel),"X-Goog-Api-Client":f.go,Accept:b?"text/event-stream":"application/json"}}transformRequest(a,b,c,d){return(this._currentModel=a,b&&b.request&&b.model)?b:{project:d?.projectId||b?.project,model:a,request:b}}parseError(a,b){let c=super.parseError(a,b);if(429!==a.status||!b)return c;try{let a=JSON.parse(b),d=a?.error?.details;if(Array.isArray(d)){for(let a of d)if(a?.["@type"]==="type.googleapis.com/google.rpc.RetryInfo"&&a?.retryDelay){c.retryAfter=a.retryDelay;break}}}catch{}return c}async refreshCredentials(a,b,c=null){if(!a.refreshToken)return null;try{let d=await (0,g.proxyAwareFetch)(f.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a.refreshToken,client_id:this.config.clientId,client_secret:this.config.clientSecret})},c);if(!d.ok)return null;let e=await d.json();return b?.info?.("TOKEN","Gemini CLI refreshed"),{accessToken:e.access_token,refreshToken:e.refresh_token||a.refreshToken,expiresIn:e.expires_in,projectId:a.projectId}}catch(a){return b?.error?.("TOKEN",`Gemini CLI refresh error: ${a.message}`),null}}}},98625:(a,b,c)=>{c.d(b,{P:()=>e});var d=c(96179);class e extends d.L{constructor(){super("azure")}buildUrl(a,b,c=0,d=null){let e=d?.providerSpecificData?.azureEndpoint||process.env.AZURE_ENDPOINT||"https://api.openai.com",f=d?.providerSpecificData?.apiVersion||process.env.AZURE_API_VERSION||"2024-10-01-preview",g=d?.providerSpecificData?.deployment||a||process.env.AZURE_DEPLOYMENT||"gpt-4",h=e.replace(/\/$/,"");return`${h}/openai/deployments/${g}/chat/completions?api-version=${f}`}buildHeaders(a,b=!0){let c={"Content-Type":"application/json",...this.config.headers},d=a?.apiKey||a?.accessToken||process.env.OPENAI_API_KEY;d&&(c["api-key"]=d);let e=a?.providerSpecificData?.organization||process.env.AZURE_ORGANIZATION;return e&&(c["OpenAI-Organization"]=e),b&&(c.Accept="text/event-stream"),c}transformRequest(a,b,c,d){return b}}},98665:(a,b,c)=>{c.d(b,{A:()=>v});var d=c(74957),e=c(14170),f=c(88499),g=c(19979),h=c(97102),i=c(65377),j=c(29675),k=c(32546),l=c(4845),m=c(49804);let n="anthropic",o="open_ai",p="google",q="x_ai";function r(a,b){let c=String(a||"").toLowerCase();if("anthropic"===c)return n;if("openai"===c||"open_ai"===c)return o;if("google"===c||"gemini"===c)return p;if("xai"===c||"x_ai"===c||"x-ai"===c)return q;let d=String(b||"").toLowerCase();return d.includes("claude")?n:d.includes("gemini")?p:d.includes("grok")||d.includes("xai")?q:o}function s(a,b,c){return a===n?(0,j.P)(b,c):a===p?(0,k.o)(b,c):a===o?(0,l.v)(b,c):b}function t(a,b,c){if(c)for(let d of Array.isArray(c)?c:[c])d&&a.enqueue(b.encode(`data: ${JSON.stringify(d)}
|
|
225
225
|
|
|
226
226
|
`))}class u extends d.H{constructor(){super("zed")}async resolveModel(a,b,c,d){try{let d=await (0,m.w9)(b,{config:this.config,signal:c}),e=d?.rawById?.get(a)??null;if(!e){let d=await (0,m.w9)(b,{config:this.config,signal:c,forceRefresh:!0});e=d?.rawById?.get(a)??null}return{raw:e,provider:r(e?.provider,a)}}catch(c){let b=c instanceof Error?c.message:String(c);return d?.warn?.("ZED",`model catalog unavailable, inferring provider for ${a}: ${b}`),{raw:null,provider:r(null,a)}}}async execute({model:a,body:b,stream:c,credentials:d,signal:j,log:k,proxyOptions:l=null}){let{provider:q}=await this.resolveModel(a,d,j,k),r=function(a,b,c,d,e){if(a===n)return(0,g.p)(b,c,!0);if(a===p){let a=(0,h.m$)(b,c,!0);return delete a.safetySettings,a}return a===o?(0,i.h)(b,c,!0,e):{...c||{},model:b,stream:!1!==d}}(q,a,b,c,d),u=b||{},v={thread_id:u.thread_id||d?._clientSessionId,prompt_id:u.prompt_id,provider:q,model:a,provider_request:r},w=await (0,m.zn)(d,"/completions",{config:this.config,signal:j,fetchOptions:{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/x-ndjson, text/event-stream, */*","User-Agent":"9router/zed","x-zed-version":this.config?.appVersion?.toString()||"0.200.0",[m.xK.clientSupportsStatus]:"true",[m.xK.clientSupportsStreamEnded]:"true"},body:JSON.stringify(v)}});return{response:w.ok?function(a,b,c){if(!a.ok||!a.body)return a;let d=new TextDecoder,g=new TextEncoder,h=function(a,b){if(a===n)return(0,f.Ws)(e.h.CLAUDE);if(a===p)return(0,f.Ws)(e.h.GEMINI);if(a===o)return(0,f.Ws)(e.h.OPENAI_RESPONSES);let c=(0,f.Ws)(e.h.OPENAI);return c.model=b,c}(b,c),i="",j=!1,k=a=>{j||(t(a,g,s(b,null,h)),a.enqueue(g.encode("data: [DONE]\n\n")),j=!0)},l=(a,d)=>{if(j)return;let e=function(a){let b=a.replace(/\r$/,"").trim();if(!b)return null;if(b.startsWith("data:")&&(b=b.slice(5).trimStart()),"[DONE]"===b)return{done:!0};try{let a=JSON.parse(b);if(a&&Object.prototype.hasOwnProperty.call(a,"event"))return{event:a.event};if(a&&Object.prototype.hasOwnProperty.call(a,"status"))return{status:a.status};return{event:a}}catch{return null}}(a);if(e){if(e.done)return void k(d);if(e.status){let a=function(a){if(!a)return null;if("string"==typeof a)return{type:a};if("object"==typeof a){let b=Object.keys(a)[0];return b&&"object"==typeof a[b]?{type:b,...a[b]}:a}return null}(e.status);if(a?.type==="failed"||a?.failed){let b=a.failed||a,e=String(b.message||b.error||b.code||"request failed");t(d,g,{id:`chatcmpl-zed-error-${Date.now()}`,object:"chat.completion.chunk",created:Math.floor(Date.now()/1e3),model:c,choices:[{index:0,delta:{content:`[Zed error] ${e}`},finish_reason:"stop"}]}),k(d)}else(a?.type==="stream_ended"||"stream_ended"===a)&&k(d);return}t(d,g,s(b,e.event,h))}};return new Response(a.body.pipeThrough(new TransformStream({transform(a,b){let c;for(i+=d.decode(a,{stream:!0});-1!==(c=i.indexOf("\n"));){let a=i.slice(0,c);i=i.slice(c+1),l(a,b)}},flush(a){(i+=d.decode())&&(l(i,a),i=""),k(a)}})),{status:a.status,statusText:a.statusText,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache"}})}(w,q,a):w,url:`${this.config?.llmBaseUrl||"https://cloud.zed.dev"}/completions`,headers:{"Content-Type":"application/json",Authorization:"Bearer <zed-llm-token>"},transformedBody:v}}parseError(a,b){let c=null;try{c=JSON.parse(b||"{}")}catch{c=null}let d=c?.error||void 0,e=c?.code||d?.code||"",f=c?.message||d?.message||b||a.statusText;return"trial_blocked"===e?{status:a.status,message:`Zed trial access is blocked upstream. The account can list hosted models, but Zed is refusing completions until trial/billing access is enabled or unblocked. Zed says: ${f}`}:e?{status:a.status,message:`Zed ${e}: ${f}`}:{status:a.status,message:f||`Zed upstream error: ${a.status}`}}async refreshCredentials(){return null}needsRefresh(){return!1}}let v=u}};
|